{"componentChunkName":"component---src-templates-docs-js","path":"/docs/tools/archive/","result":{"data":{"sitePage":{"id":"SitePage /docs/tools/archive/"}},"pageContext":{"url":"/docs/tools/archive/","relativePath":"docs/tools/archive.md","relativeDir":"docs/tools","base":"archive.md","name":"archive","frontmatter":{"title":"Archive","weight":0,"excerpt":"more tools that I have created or collaborated on.","seo":{"title":"Embed Archive","description":"embeded developer tools and utilities","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Archive</h1>\n<iframe src=\"https://bgoonz-blog-v3-0.netlify.app/archive/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1> Archive</h1>\n<br>\n<iframe src=\"https://resourcerepo2.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n <iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\"  width=\"400\" height=\"575\"\n            src=\"https://bgoonz.blogspot.com/\"  \n           frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\n            encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>     Resource Archive           </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://resourcerepo2.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Google Drive</h1>\n<iframe src=\"https://drive.google.com/embeddedfolderview?id=1DHyQsPLziqSUODclplhnNX1eknzbZrL8#list\" style=\"width:100%; height:600px; border:0;\"></iframe>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>  Cloud Storage </h1>\n<br>\n<h2> Up to 1TB of cloud Storage for file sharing!</h2>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&resid=D21009FDD967A241%21538729&authkey=AHSDSyoYqzg2K2E\" height=\"1000px\" width=\"1300px\">\n</iframe>\n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>    Internet Archive        </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://archive.org/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>   Lambda Student Site </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe class=\"inner\" src=\"https://lambda-resources.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>   Bass Station CSS Showcase</h1>\n<br>\n<br>\n<br>\n<br>\n<iframe class=\"inner\" src=\"https://bgoonz.github.io/bass-station/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>  Interview     </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://web-dev-interview-prep-quiz-website.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>   Speach Recognition api </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://random-static-html-deploys.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>  The Algos Bgoonz Branch </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://thealgorithms.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>Markdown Templates</h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://markdown-templates-42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>CURL</h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz.github.io/everything-curl/index.html\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1> Text Tools     </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://devtools42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Ternary Converter   </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://ternary42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>  Github HTML Render from link </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://githtmlpreview.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Form Builder GUI </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://fourm-builder-gui.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1> Border Builder </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://codepen.io/bgoonz/embed/zYwLVmb?default-tab=html%2Cresult\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h2>Archives</h2>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Original Blog Site </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://web-dev-resource-hub.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>","pages":[{"url":"/","relativePath":"index.md","relativeDir":"","base":"index.md","name":"index","frontmatter":{"title":"Web Dev Hub Home","sections":[{"section_id":"Intro","type":"section_hero","title":"I am a musician, electrical engineer & web developer","image":"images/api-c99e353f761d318322c853c03ebcf21b.gif","content":"\n\n**Please note that this website is in development and is often broken!**\n\n[](https://www.vagrantup.com/)[![](https://img.icons8.com/color/96/000000/gmail.png)](mailto:bryan.guner@gmail.com)[![](https://img.icons8.com/color/96/000000/youtube.png)](https://www.youtube.com/channel/UC9-rYyUMsnEBK8G8fCyrXXA/videos)[![](https://img.icons8.com/color/96/000000/instagram-new.png)](https://www.instagram.com/bgoonz/?hl=en)[![](https://img.icons8.com/color/96/000000/pinterest--v1.png)](https://www.pinterest.com/bryanguner/\\_saved/)[![](https://img.icons8.com/color/96/000000/linkedin.png)](https://www.linkedin.com/in/bryan-guner-046199128/)\n\n[ ](https://webpack.js.org/)[ ](https://www.adobe.com/products/xd.html)\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/a1b7ee1a-11a7-4bd2-a341-2260656e216f/deploy-status)](https://app.netlify.com/sites/bgoonz-blog/deploys)\n\n[![Bryans github activity graph](https://activity-graph.herokuapp.com/graph?username=bgoonz\\&custom_title=This%20is%20Bryans%20Activity\\&hide_border=true\\&theme=chartreuse-dark)](https://github.com/bgoonz/github-readme-activity-graph)\n\n![Jokes](https://readme-jokes.vercel.app/api)\n\n![Python](https://img.shields.io/badge/-Python-05122A?style=flat\\&logo=python) ![HTML](https://img.shields.io/badge/-HTML-05122A?style=flat\\&logo=HTML5) ![CSS](https://img.shields.io/badge/-CSS-05122A?style=flat\\&logo=CSS3\\&logoColor=1572B6) ![JavaScript](https://img.shields.io/badge/-JavaScript-05122A?style=flat\\&logo=javascript)![React](https://img.shields.io/badge/-React-05122A?style=flat\\&logo=react) ![Node.js](https://img.shields.io/badge/-Node.js-05122A?style=flat\\&logo=node.js) ![Visual Studio Code](https://img.shields.io/badge/-Visual%20Studio%20Code-05122A?style=flat\\&logo=visual-studio-code\\&logoColor=007ACC)![Docker](https://img.shields.io/badge/-Docker-05122A?style=flat\\&logo=Docker) ![MongoDB](https://img.shields.io/badge/-MongoDB-05122A?style=flat\\&logo=mongodb) ![PostgreSQL](https://img.shields.io/badge/-PostgreSQL-05122A?style=flat\\&logo=postgresql)![Git](https://img.shields.io/badge/-Git-05122A?style=flat\\&logo=git) ![GitHub](https://img.shields.io/badge/-GitHub-05122A?style=flat\\&logo=github) ![GitLab](https://img.shields.io/badge/-GitLab-05122A?style=flat\\&logo=gitlab) ![Markdown](https://img.shields.io/badge/-Markdown-05122A?style=flat\\&logo=markdown)\n","actions":[{"label":"Contact","url":"https://bgoonz-blog.netlify.app/docs/faq/contact/","style":"secondary","icon_class":"linkedin","new_window":true,"no_follow":false,"type":"action"}]},{"section_id":"features","type":"section_grid","col_number":"three","grid_items":[{"content":"Memoization, Tabulation, and Sorting Algorithms by Example\nWhy is looking at runtime not a reliable method of calculating time\ncomplexity?\n","actions":[{"label":"Get Started","url":"https://bgoonz-blog.netlify.app/docs/data-structures/big-o/","style":"link"}],"title":"A Quick Guide To Big O","image":"images/outdated-packages-732a4523.png","title_url":"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522"},{"content":"*Python has a built in help function that let's you see a description\nof the source code without having to navigate to it… \"-SickNasty …\nAutor Unknown\"  .*\n","actions":[{"label":"View Posts","url":"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb","style":"link"}],"image_alt":"python","title":"Python Guide","title_url":"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb","image":"images/smiling-maple.png"},{"content":"<div id=\"search\"></div> <div id=\"search\" />\n","actions":[{"label":"Learn More","url":"/docs/tools","style":"link"}],"title":"Guitar Effects Triggering w DTW","title_url":"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering","image":"images/panoramic-owl.png"},{"title_url":"https://bryanguner.medium.com/introductory-react-part-2-cda01615a186","image_alt":"img of dtw","content":"As I learn to build web applications in React I will blog about it in\nthis series in an attempt to capture the questions that a complete\nbeginner might encounter that a more seasoned developer would take for\ngranted!\n","actions":[],"type":"grid_item","title":"Beginner Guide React","image":"images/successful-panda.gif"},{"title_url":"https://dev.to/bgoonz/scope-and-context-in-javascript-5cma","image_alt":"img of react","content":"Scope & Context in JS\n\nThe **scope** of a program in JavaScript is the set of variables that are available for use within the program. \n","actions":[],"type":"grid_item","image":"images/pleasant-birch.png","title":"Scope & Closure"},{"image_alt":"Every idea needs a medium","content":"PostgreSQL Cheat Sheet, Everything You Need to Get Started With VSCode\n+ Extensions & Resources, Super Simple Intro To HTML,  Understanding\nGit... etc....\n","actions":[],"type":"grid_item","title":"Web Audio Daw","image":"images/7a8bc98e902a2f6dea90386cdfb154c2-2d55c637.png"}]},{"title":"Current Interests","section_id":"interests","subtitle":"From github repositories to existential questions.","col_number":"three","grid_items":[{"title":"Angolia","title_url":"https://www.algolia.com/doc/","image_alt":"angolia","content":"## Full Text Search\n[Full Text Search](https://www.algolia.com/)\n## &#xA;\n","actions":[],"type":"grid_item","image":"images/spectacular-turmeric.png"},{"title":"Convolutional Neural Networks","title_url":"https://dev.to/bgoonz/everything-you-need-to-become-a-machine-learner-1cjp","image_alt":"neural networks","content":"Artificial neural networks, usually simply called neural networks, are computing systems vaguely inspired by the biological [neural networks](https://github.com/tensorflow/tensorflow)![](/\\_static/app-assets/neural.PNG)\n","actions":[{"label":"lorem-ipsum","url":"#","style":"link","icon_class":"dev","new_window":false,"no_follow":false}],"type":"grid_item","image":"images/neural.PNG"},{"title":"Jamstack","title_url":"jamstack","image_alt":"jamstack","content":"> Why Jamstack Jamstack is the new standard architecture for the...\n\n\\*\\*\n\n> *web. Using Git workflows and modern build tools, pre-rendered content\n> is served to a CDN and made dynamic through APIs and serverless\n> functions. Technologies in the stack include JavaScript frameworks,\n> Static Site Generators, Headless CMSs, and CDNs.*\n","actions":[],"type":"grid_item","image":"images/jamstack.png"},{"title":"Asynchronous JavaScript","title_url":"lorem-ipsum","image_alt":"lorem-ipsum","content":"The term **asynchronous** refers to two or more objects or events **not** existing or happening at the same time (or multiple related things happening without waiting for the previous one to complete). In computing, the word \"asynchronous\" is used in two major contexts.\n\n","actions":[{"label":"lorem-ipsum","url":"https://bgoonz-blog.netlify.app/docs/javascript/asyncjs/","style":"secondary","icon_class":"dev","new_window":true,"no_follow":false}],"type":"grid_item","image":"images/eventloop.gif"},{"title":"NJ Devils","image_alt":"nj-devils","content":"# New Jersey Devils Hockey Team\n\n### (Hockey in general)\n\n## Team identity\n\n[![](https://upload.wikimedia.org/wikipedia/en/thumb/d/da/OldDevils.png/300px-OldDevils.png)](https://en.wikipedia.org/wiki/File:OldDevils.png)\n\nThe old green style jerseys used from 1982 to 1992The jerseys used from 1992 to 2017[Sean Avery](https://en.wikipedia.org/wiki/Sean_Avery) of the [New York Rangers](https://en.wikipedia.org/wiki/New_York_Rangers) attempts to distract Brodeur during the [2008 Stanley Cup playoffs](https://en.wikipedia.org/wiki/2008\\_Stanley_Cup_playoffs). The playoff series was the fifth to feature the [Devils-Rangers rivalry](https://en.wikipedia.org/wiki/Devils%E2%80%93Rangers_rivalry).\n","actions":[{"label":"nj-devils link","url":"https://www.allaboutthejersey.com/","style":"link","icon_class":"dev","new_window":false,"no_follow":false}],"type":"grid_item","image":"images/njdev-219301cd.jpg","title_url":"https://www.allaboutthejersey.com/"},{"title":"ITER Fusion Reactor Experiment (Southern France)","title_url":"https://www.iter.org/","image_alt":"Nuclear Fusion","content":"# Break Even Nuclear Fusion Candidate\nIn December, researchers at the Joint European Torus (JET) started\nconducting fusion experiments with tritium — a rare and radioactive\nisotope of hydrogen. The facility is a one-tenth-volume mock-up of the\nUS$22-billion ITER project and has the same doughnut-shaped 'tokamak'\ndesign — the world's most developed approach to fusion energy. It is\nthe first time since 1997 that researchers have done experiments in a\ntokamak with any significant amount of tritium.\n","actions":[{"label":"Learn More","url":"https://www.iter.org/","style":"secondary","icon_class":"dev","new_window":true,"no_follow":false}],"type":"grid_item","image":"images/iter-c7508519.jpg"}],"type":"section_grid"},{"section_id":"features-two-col","type":"section_grid","title":"Resume & Portfolio","col_number":"two","grid_items":[{"title":"Resume","actions":[{"label":"View In One Drive","url":"https://1drv.ms/b/s!AkGiZ9n9CRDSpLsZsnPtiN7p77vq6A","style":"secondary"},{"label":"Download PDF","url":"https://github.com/bgoonz/bgoonz/raw/master/bryan_guner_resume_2021_V9.pdf","style":"secondary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"}],"image":"images/image-of-resume.png","title_url":"https://github.com/bgoonz/resume-cv-portfolio-samples/raw/master/2021-resume/bryan-guner-resume-2021.pdf"},{"title":"Showcase","content":"![](/\\_static/app-assets/lambda-demo1.gif)My Projects!\n","actions":[{"label":"Learn More","url":"/showcase","style":"secondary"}],"image_alt":"portfolio of websites","image":"images/portfolio-91689538.jpg"}]},{"title":"Blog-Archive-And-Mini-Projects","section_id":"Mini Projects","image_alt":"showcase","image_position":"left","content":"<iframe src=\"https://random-static-html-deploys.netlify.app/\"    class=\"block-content\" width=\"100%  width=\"1200px!important\"\nheight=\"1000px!important\">\n</iframe>","actions":[],"type":"section_content"},{"title":"Latest & Greatest","section_id":"new content","image_alt":"animated gif","image_position":"right","content":"# ***What I've been working on lately:***\n## Web Dev Utilitiy Tools\n<iframe class=\"block-content\" width=\"100%  width=\"1200px!important\"\nheight=\"1000px!important\"\n  src=\"https://web-dev-utility-tools-bgoonz.netlify.app/\"\n frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\n  encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<iframe class=\"block-content\" width=\"100%  width=\"1200px!important\"\nheight=\"1000px!important\"\n  src=\"https://cheatsheets-42.netlify.app/\"\n frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\n  encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<iframe class=\"block-content\" width=\"100%  width=\"1200px!important\"\nheight=\"1000px!important\"\n  src=\"https://bgoonz.github.io/fb-and-twitter-api-embeds/\"\n frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\n  encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n","actions":[],"type":"section_content"},{"section_id":"tools","image_alt":"web tools","image_position":"left","content":"![](images/static-server-5bf5ad2d.PNG)Tool Showcase\n","actions":[],"type":"section_content","title":"Tools Showcase"},{"section_id":"Web Audio DAW","image_alt":"medium","image_position":"left","actions":[{"label":"Go To Web Audio Daw","url":"https://mihirbegmusiclab.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}],"type":"section_content","title":"Web Audio DAW","image":"images/goals.jpg"},{"title":"Quick Links","section_id":"navigate from the home page","col_number":"two","type":"section_docs","subtitle":"quick links home"},{"title":"Contact","section_id":"contact","actions":[{"label":"Contact","url":"/docs/faq/contact","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"email","url":"mailto:bryan.guner@gmail.com","style":"primary","icon_class":"dev","new_window":false,"no_follow":false},{"label":"Subscribe (Youtube)","url":" https://www.youtube.com/channel/UC9-rYyUMsnEBK8G8fCyrXXA?sub_confirmation=1","style":"primary","icon_class":"dev","new_window":false,"no_follow":false}],"type":"section_cta","subtitle":"get in touch! +1 (551) - 254 - 5505"}],"seo":{"title":"Web-Dev-Hub","description":"bigO, Python, Javascript, Audio, Processing, Learning, Blog, React,\nPostgreSQL, Scope, Closure, Web Development, Embed, API, Website, Design,\nMusic, Search","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Web-Dev-Hub","keyName":"property"},{"name":"og:description","value":"my resource sharing and blog site ... centered mostly on web development\nand just a bit of audio production / generally nerdy things I find\ninteresting.","keyName":"property"},{"name":"og:image","value":"images/code.png","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Web-Dev-Hub"},{"name":"twitter:description","value":"Web-Dev-Hub"},{"name":"twitter:image","value":"images/4.jpg","relativeUrl":true}]},"template":"advanced"},"html":""},{"url":"/showcase/","relativePath":"showcase.md","relativeDir":"","base":"showcase.md","name":"showcase","frontmatter":{"title":"Showcase","sections":[{"section_id":"hero","type":"section_hero","title":"Showcase","image":"images/charming-dolphin.gif","content":"Some of my more engaging projects!\n"},{"section_id":"showcase","type":"section_grid","col_number":"three","grid_items":[{"title":"Git HTML PREVIEW","title_url":"https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL","image":"images/futuristic-mars.gif","content":"Preview html files by pasting their url into the search bar **Access-Control-Allow-Origin Header When Site A tries to fetch content from Site B**\n","actions":[{"label":"Live Site","url":"/https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/","style":"icon","icon_class":"github","new_window":true,"no_follow":false,"type":"action"}],"image_alt":"git html preview"},{"title":"Guitar Effects Automation Using Subsequence Dynamic Time Warping","title_url":"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering","image":"images/curious-europa.gif","content":"**Modified subsequence dynamic time warping feature detection using pure data implemented in python**\n","actions":[{"label":"Slide Show","url":"https://1drv.ms/p/s!AkGiZ9n9CRDSpY88x407JwfEKNrDxg?e=faHSx9","style":"link","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}]},{"title":"Data Structures Interactive Learning Hub","title_url":"https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/","image":"images/ds-algo.gif","content":"**Big O notation is the language we use for talking about how long an algorithm takes to run. It's how we compare the efficiency of different approaches to a problem.**\n","actions":[{"label":"Live Site","url":"https://github.com/bgoonz/DS-ALGO-OFFICIAL","style":"icon","icon_class":"github","new_window":true,"no_follow":false,"type":"action"}]},{"title":"Learning Redux","title_url":"https://learning-redux42.netlify.app/","image_alt":"lorem-ipsum","content":"***React Redux provides a pair of custom React hooks that allow your React components to interact with the Redux store.***\n","actions":[{"label":"Website","url":"https://learning-redux42.netlify.app/","style":"icon","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}],"type":"grid_item","image":"images/best-birch.gif"},{"title":"Mihir-Beg-Music.com","title_url":"https://panoramic-eggplant-452e4.netlify.app/","image":"images/7a8bc98e902a2f6dea90386cdfb154c2.png","content":"Artist Showcase & Podcasting Site\n","actions":[{"label":"Live Site","url":"https://panoramic-eggplant-452e4.netlify.app/","style":"link","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}]},{"title":"Aux Blog w NextJS","title_url":"https://bgoonz-blog-v3-0.netlify.app/","image_alt":"get in touch","content":"**Here lives my alternate/backup blog site!**\n","actions":[{"label":"git repo","url":"https://github.com/bgoonz/alternate-blog-theme","style":"icon","icon_class":"github","new_window":true,"no_follow":false,"type":"action"}],"type":"grid_item","image":"images/21ecc2f26e2641c8e9aae5479481bbe2 (5).png"},{"title":"Potluck Planner","title_url":"https://potluck-landing.netlify.app/","image_alt":"lorem-ipsum","content":"## Potluck Planner If you have ever tried to organize a potluck through text messages, online to-do lists or spreadsheets, you'll understand why this app is essential.In the world of social gatherings and potlucks the \"Potluck Planner\" is king. This is your place for all things pot luck.\n","actions":[],"type":"grid_item","image":"images/potluck-planner.JPG"},{"title":"Zumzi Video Conferencing","title_url":"https://github.com/bgoonz/zumzi-chat-messenger","image_alt":"video chat","content":"**Features:   Live Streaming, Screen Sharing, Fine control over all video & audio parameters and user permissions, Supports video streaming at various resolutions: Standard, HD, FHD and 4K, Group Chat, One-to-One chat, Invite Participants**\n","actions":[{"label":"Live Site","url":"https://goofy-perlman-0f61df.netlify.app/","style":"link","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}],"type":"grid_item","image":"images/energetic-sunflower.png"},{"title":"Web Audio Workstation","title_url":"lorem-ipsum","image_alt":"lorem-ipsum","content":"Made using jQuery and Vanilla JS\n","actions":[{"label":"Go To Live Site","url":"https://mihirbegmusiclab.netlify.app/","style":"link","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Github Repo","url":"https://github.com/bgoonz/MihirBegMusicLab","style":"link","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}],"type":"grid_item","image":"images/royal-kangaroo.JPG"}]}],"seo":{"title":"Showcase","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Showcase","keyName":"property"},{"name":"og:description","value":"project showcase","keyName":"property"},{"name":"og:image","value":"images/My Post-4ecb169f.png","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Showcase"},{"name":"twitter:description","value":"This is the showcase page"},{"name":"twitter:image","value":"images/5.jpg","relativeUrl":true}],"description":"Git HTML PREVIEW, Guitar Effects, Data Structures, Redux, Podcast Blog, Contact Form, Potluck Planner, Video Conferencing, Web Audio Workstation"},"template":"advanced"},"html":""},{"url":"/privacy-policy/","relativePath":"privacy-policy.md","relativeDir":"","base":"privacy-policy.md","name":"privacy-policy","frontmatter":{"title":"Privacy Policy","weight":0,"excerpt":"Privacy Policy","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<pre><code>PRIVACY NOTICE\n</code></pre>\n<ul>\n<li>Note: Visit our website at <a href=\"https://bgoonz-blog.netlify.app/\">https://bgoonz-blog.netlify.app/</a></li>\n</ul>\n<!---->\n<ul>\n<li>Note:  Use our Facebook application — <a href=\"https://bgoonz-blog.netlify.app/\">https://bgoonz-blog.netlify.app/</a></li>\n</ul>\n<!---->\n<ul>\n<li>Note:  Engage with us in other related ways ― including any sales, marketing, or events</li>\n</ul>\n<!---->\n<ul>\n<li>Important:  \"<strong>Website</strong>,\" we are referring to any website of ours that references or links to this policy</li>\n</ul>\n<!---->\n<ul>\n<li>Important: \"<strong>App</strong>,\" we are referring to any application of ours that references or links to this policy, including any listed above</li>\n</ul>\n<!---->\n<ul>\n<li>Important: \"<strong>Services</strong>,\" we are referring to our Website, App, and other related services, including any sales, marketing, or events</li>\n</ul>\n<!---->\n<ul>\n<li>Important: <strong>To facilitate account creation and logon process.</strong> If you choose to link your account with us to a third-party account (such as your Google or Facebook account), we use the information you allowed us to collect from those third parties to facilitate account creation and logon process for the performance of the contract.</li>\n</ul>\n<!---->\n<ul>\n<li>Important: <strong>To post testimonials.</strong> We post testimonials on our Services that may contain personal information. Prior to posting a testimonial, we will obtain your consent to use your name and the content of the testimonial. If you wish to update, or delete your testimonial, please contact us at __________ and be sure to include your name, testimonial location, and contact information.</li>\n</ul>\n<!---->\n<ul>\n<li>Note: **Request feedback. **We may use your information to request feedback and to contact you about your use of our Services.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To enable user-to-user communications.</strong> We may use your information in order to enable user-to-user communications with each user's consent.</li>\n</ul>\n<!---->\n<ul>\n<li>**To manage user accounts. **We may use your information for the purposes of managing our account and keeping it in working order.</li>\n</ul>\n<!---->\n<ul>\n<li>**To send administrative information to you. **We may use your personal information to send you product, service and new feature information and/or information about changes to our terms, conditions, and policies.</li>\n</ul>\n<!---->\n<ul>\n<li>**To protect our Services. **We may use your information as part of our efforts to keep our Services safe and secure (for example, for fraud monitoring and prevention).</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To enforce our terms, conditions and policies for business purposes, to comply with legal and regulatory requirements or in connection with our contract.</strong></li>\n</ul>\n<!---->\n<ul>\n<li>**To respond to legal requests and prevent harm. **If we receive a subpoena or other legal request, we may need to inspect the data we hold to determine how to respond.</li>\n<li>**Fulfill and manage your orders. **We may use your information to fulfill and manage your orders, payments, returns, and exchanges made through the Services.</li>\n<li><strong>Administer prize draws and competitions.</strong> We may use your information to administer prize draws and competitions when you elect to participate in our competitions.</li>\n<li><strong>To deliver and facilitate delivery of services to the user.</strong> We may use your information to provide you with the requested service.</li>\n<li><strong>To respond to user inquiries/offer support to users.</strong> We may use your information to respond to your inquiries and solve any potential issues you might have with the use of our Services.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To send you marketing and promotional communications.</strong> We and/or our third-party marketing partners may use the personal information you send to us for our marketing purposes, if this is in accordance with your marketing preferences. For example, when expressing an interest in obtaining information about us or our Services, subscribing to marketing or otherwise contacting us, we will collect personal information from you. You can opt-out of our marketing emails at any time (see the \"<a href=\"https://cdpn.io/bgoonz/fullpage/LYLJZrW#privacyrights\">WHAT ARE YOUR PRIVACY RIGHTS?</a>\" below).</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Deliver targeted advertising to you.</strong> We may use your information to develop and display personalized content and advertising (and work with third parties who do so) tailored to your interests and/or location and to measure its effectiveness.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Consent:</strong> We may process your data if you have given us specific consent to use your personal information for a specific purpose.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Legitimate Interests:</strong> We may process your data when it is reasonably necessary to achieve our legitimate business interests.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Performance of a Contract:</strong> Where we have entered into a contract with you, we may process your personal information to fulfill the terms of our contract.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Legal Obligations:</strong> We may disclose your information where we are legally required to do so in order to comply with applicable law, governmental requests, a judicial proceeding, court order, or legal process, such as in response to a court order or a subpoena (including in response to public authorities to meet national security or law enforcement requirements).</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Vital Interests:</strong> We may disclose your information where we believe it is necessary to investigate, prevent, or take action regarding potential violations of our policies, suspected fraud, situations involving potential threats to the safety of any person and illegal activities, or as evidence in litigation in which we are involved.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Business Transfers.</strong> We may share or transfer your information in connection with, or during negotiations of, any merger, sale of company assets, financing, or acquisition of all or a portion of our business to another company.</li>\n</ul>\n<!---->\n<ul>\n<li>Receiving help through our customer support channels;</li>\n</ul>\n<!---->\n<ul>\n<li>Participation in customer surveys or contests; and</li>\n</ul>\n<!---->\n<ul>\n<li>Facilitation in the delivery of our Services and to respond to your inquiries.</li>\n</ul>\n<!---->\n<ul>\n<li>whether we collect and use your personal information;</li>\n</ul>\n<!---->\n<ul>\n<li>the categories of personal information that we collect;</li>\n</ul>\n<!---->\n<ul>\n<li>the purposes for which the collected personal information is used;</li>\n</ul>\n<!---->\n<ul>\n<li>whether we sell your personal information to third parties;</li>\n</ul>\n<!---->\n<ul>\n<li>the categories of personal information that we sold or disclosed for a business purpose;</li>\n</ul>\n<!---->\n<ul>\n<li>the categories of third parties to whom the personal information was sold or disclosed for a business purpose; and</li>\n</ul>\n<!---->\n<ul>\n<li>the business or commercial purpose for collecting or selling personal information.</li>\n</ul>\n<!---->\n<ul>\n<li>you may object to the processing of your personal data</li>\n</ul>\n<!---->\n<ul>\n<li>you may request correction of your personal data if it is incorrect or no longer relevant, or ask to restrict the processing of the data</li>\n</ul>\n<!---->\n<ul>\n<li>you can designate an authorized agent to make a request under the CCPA on your behalf. We may deny a request from an authorized agent that does not submit proof that they have been validly authorized to act on your behalf in accordance with the CCPA.</li>\n</ul>\n<!---->\n<ul>\n<li>you may request to opt-out from future selling of your personal information to third parties. Upon receiving a request to opt-out, we will act upon the request as soon as feasibly possible, but no later than 15 days from the date of the request submission.</li>\n</ul>"},{"url":"/blog/big-o-complexity/","relativePath":"blog/big-o-complexity.md","relativeDir":"blog","base":"big-o-complexity.md","name":"big-o-complexity","frontmatter":{"title":"Big O Computational Complexity","subtitle":"Explained using gif animations","date":"2021-09-11","thumb_image_alt":"neural network","excerpt":"Bubble sort, sorts an array of integers by bubbling the largest integer to the top.","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"images/neural-c16cd3ca.PNG","image":"images/my-back-0b8b3eaf.png"},"html":"<h3>Sorting Algorithms<img src=\"https://cdn-images-1.medium.com/max/800/0*Ck9aeGY-d5tbz7dT\"><img src=\"https://cdn-images-1.medium.com/max/800/0*AByxtBjFrPVVYmyu\"><img src=\"https://cdn-images-1.medium.com/max/800/0*GeYNxlRcbt2cf0rY\"><img src=\"https://cdn-images-1.medium.com/max/800/0*gbNU6wrszGPrfAZG\"><img src=\"https://cdn-images-1.medium.com/max/800/0*GeU8YwwCoK8GiSTD\"><img src=\"https://cdn-images-1.medium.com/max/800/0*IxqGb72XDVDeeiMl\"><img src=\"https://cdn-images-1.medium.com/max/800/0*HMCR--9niDt5zY6M\"><img src=\"https://cdn-images-1.medium.com/max/800/0*WLl_HpdBGXYx284T\"><img src=\"https://cdn-images-1.medium.com/max/800/0*-LyHJXGPTYsWLDZf\"><img src=\"https://cdn-images-1.medium.com/max/800/0*-naVYGTXzE2Yoali\">\n\n</h3>\n<h3>Bubble Sort</h3>\n<p>Time Complexity: Quadratic O(n^2)</p>\n<ul>\n<li>The inner for-loop contributes to O(n), however in a worst case scenario the while loop will need to run n times before bringing all n elements to their final resting spot.</li>\n</ul>\n<p>Space Complexity: O(1)</p>\n<ul>\n<li>Bubble Sort will always use the same amount of memory regardless of n.</li>\n</ul>\n<p><a href=\"https://gist.github.com/eengineergz/e67e56bed7c5a20a54851867ba5efef6\">https://gist.github.com/eengineergz/e67e56bed7c5a20a54851867ba5efef6</a></p>\n<ul>\n<li>The first major sorting algorithm one learns in introductory programming courses.</li>\n<li>Gives an intro on how to convert unsorted data into sorted data.</li>\n</ul>\n<blockquote>\n<p>It's almost never used in production code because:</p>\n</blockquote>\n<ul>\n<li><em>It's not efficient</em></li>\n<li><em>It's not commonly used</em></li>\n<li><em>There is stigma attached to it</em></li>\n<li><em>Bubbling Up : Term that infers that an item is in motion, moving in some direction, and has some final resting destination.</em></li>\n<li><em>Bubble sort, sorts an array of integers by bubbling the largest integer to the top.</em></li>\n</ul>\n<p><a href=\"https://gist.github.com/eengineergz/fd4acc0c89033bd219ebf9d3ec40b053\">https://gist.github.com/eengineergz/fd4acc0c89033bd219ebf9d3ec40b053</a><a href=\"https://gist.github.com/eengineergz/80934783c628c70ac2a5a48119a82d54\">https://gist.github.com/eengineergz/80934783c628c70ac2a5a48119a82d54</a></p>\n<ul>\n<li><em>Worst Case &#x26; Best Case are always the same because it makes nested loops.</em></li>\n<li><em>Double for loops are polynomial time complexity or more specifically in this case Quadratic (Big O) of: O(n²)</em></li>\n</ul>\n<h3>Selection Sort</h3>\n<p>Time Complexity: Quadratic O(n^2)</p>\n<ul>\n<li>Our outer loop will contribute O(n) while the inner loop will contribute O(n / 2) on average. Because our loops are nested we will get O(n²);</li>\n</ul>\n<p>Space Complexity: O(1)</p>\n<ul>\n<li>Selection Sort will always use the same amount of memory regardless of n.</li>\n</ul>\n<p><a href=\"https://gist.github.com/eengineergz/4abc0fe0bf01599b0c4104b0ba633402\">https://gist.github.com/eengineergz/4abc0fe0bf01599b0c4104b0ba633402</a></p>\n<ul>\n<li>Selection sort organizes the smallest elements to the start of the array.</li>\n</ul>\n<blockquote>\n<p>Summary of how Selection Sort should work:</p>\n</blockquote>\n<ol>\n<li><em>Set MIN to location 0</em></li>\n<li><em>Search the minimum element in the list.</em></li>\n<li><em>Swap with value at location Min</em></li>\n<li><em>Increment Min to point to next element.</em></li>\n<li><em>Repeat until list is sorted.</em></li>\n</ol>\n<p><a href=\"https://gist.github.com/eengineergz/61f130c8e0097572ed908fe2629bdee0\">https://gist.github.com/eengineergz/61f130c8e0097572ed908fe2629bdee0</a></p>\n<h3>Insertion Sort</h3>\n<p>Time Complexity: Quadratic O(n^2)</p>\n<ul>\n<li>Our outer loop will contribute O(n) while the inner loop will contribute O(n / 2) on average. Because our loops are nested we will get O(n²);</li>\n</ul>\n<p>Space Complexity: O(n)</p>\n<ul>\n<li>Because we are creating a subArray for each element in the original input, our Space Comlexity becomes linear.</li>\n</ul>\n<p><a href=\"https://gist.github.com/eengineergz/a9f4b8596c7546ac92746db659186d8c\">https://gist.github.com/eengineergz/a9f4b8596c7546ac92746db659186d8c</a></p>\n<h3>Merge Sort</h3>\n<p>Time Complexity: Log Linear O(nlog(n))</p>\n<ul>\n<li>Since our array gets split in half every single time we contribute O(log(n)). The while loop contained in our helper merge function contributes O(n) therefore our time complexity is O(nlog(n)); Space Complexity: O(n)</li>\n<li>We are linear O(n) time because we are creating subArrays.</li>\n</ul>\n<h3>Example of Merge Sort</h3>\n<p><a href=\"https://gist.github.com/eengineergz/18fbb7edc9f5c4820ccfcecacf3c5e48\">https://gist.github.com/eengineergz/18fbb7edc9f5c4820ccfcecacf3c5e48</a><a href=\"https://gist.github.com/eengineergz/cbb533137a7f957d3bc4077395c1ff64\">https://gist.github.com/eengineergz/cbb533137a7f957d3bc4077395c1ff64</a></p>\n<ul>\n<li><strong>Merge sort is O(nlog(n)) time.</strong></li>\n<li><em>We need a function for merging and a function for sorting.</em></li>\n</ul>\n<blockquote>\n<p>Steps:</p>\n</blockquote>\n<ol>\n<li><em>If there is only one element in the list, it is already sorted; return the array.</em></li>\n<li><em>Otherwise, divide the list recursively into two halves until it can no longer be divided.</em></li>\n<li><em>Merge the smallest lists into new list in a sorted order.</em></li>\n</ol>\n<h3>Quick Sort</h3>\n<p>Time Complexity: Quadratic O(n^2)</p>\n<ul>\n<li>Even though the average time complexity O(nLog(n)), the worst case scenario is always quadratic.</li>\n</ul>\n<p>Space Complexity: O(n)</p>\n<ul>\n<li>Our space complexity is linear O(n) because of the partition arrays we create.</li>\n<li>QS is another Divide and Conquer strategy.</li>\n<li>Some key ideas to keep in mind:</li>\n<li>It is easy to sort elements of an array relative to a particular target value.</li>\n<li>An array of 0 or 1 elements is already trivially sorted.</li>\n</ul>\n<p><a href=\"https://gist.github.com/eengineergz/24bcbc5248a8c4e1671945e9512da57e\">https://gist.github.com/eengineergz/24bcbc5248a8c4e1671945e9512da57e</a></p>\n<h3>Binary Search</h3>\n<p>Time Complexity: Log Time O(log(n))</p>\n<p>Space Complexity: O(1)</p>\n<blockquote>\n<p><em>Recursive Solution</em></p>\n</blockquote>\n<p><a href=\"https://gist.github.com/eengineergz/c82c00a4bcba4b69b7d326d6cad3ac8c\">https://gist.github.com/eengineergz/c82c00a4bcba4b69b7d326d6cad3ac8c</a></p>\n<blockquote>\n<p><em>Min Max Solution</em></p>\n</blockquote>\n<p><a href=\"https://gist.github.com/eengineergz/eb8d1e1684db15cc2c8af28e13f38751\">https://gist.github.com/eengineergz/eb8d1e1684db15cc2c8af28e13f38751</a><a href=\"https://gist.github.com/eengineergz/bc3f576b9795ccef12a108e36f9f820a\">https://gist.github.com/eengineergz/bc3f576b9795ccef12a108e36f9f820a</a></p>\n<ul>\n<li><em>Must be conducted on a sorted array.</em></li>\n<li><em>Binary search is logarithmic time, not exponential b/c n is cut down by two, not growing.</em></li>\n<li><em>Binary Search is part of Divide and Conquer.</em></li>\n</ul>\n<h3>Insertion Sort</h3>\n<ul>\n<li><strong>Works by building a larger and larger sorted region at the left-most end of the array.</strong></li>\n</ul>\n<blockquote>\n<p>Steps:</p>\n</blockquote>\n<ol>\n<li><em>If it is the first element, and it is already sorted; return 1.</em></li>\n<li><em>Pick next element.</em></li>\n<li><em>Compare with all elements in the sorted sub list</em></li>\n<li><em>Shift all the elements in the sorted sub list that is greater than the value to be sorted.</em></li>\n<li><em>Insert the value</em></li>\n<li><em>Repeat until list is sorted.</em></li>\n</ol>\n<p><a href=\"https://gist.github.com/eengineergz/ffead1de0836c4bcc6445780a604f617\">https://gist.github.com/eengineergz/ffead1de0836c4bcc6445780a604f617</a></p>"},{"url":"/blog/blog-archive/","relativePath":"blog/blog-archive.md","relativeDir":"blog","base":"blog-archive.md","name":"blog-archive","frontmatter":{"title":"Blog Archive","subtitle":"Blog Archive","date":"2021-07-26","thumb_image_alt":"Blog page animation","excerpt":"Blog Archive","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"post","thumb_image":"images/3.jpg"},"html":"<h2>Blog Archive</h2>\n <iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\"  width=\"400\" height=\"575\"\n            src=\"https://bgoonz.blogspot.com/\"  \n           frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\n            encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"},{"url":"/blog/300-react-questions/","relativePath":"blog/300-react-questions.md","relativeDir":"blog","base":"300-react-questions.md","name":"300-react-questions","frontmatter":{"title":"React Questions","subtitle":"react excel sheet","date":"2022-01-17","thumb_image_alt":"es6","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"images/web-development-abstract.jpg"},"html":"<h2>React Interview Questions &#x26; Answers</h2>\n<iframe width=\"700\" height=\"800\" frameborder=\"0\" scrolling=\"no\" src=\"https://onedrive.live.com/embed?resid=D21009FDD967A241%21738451&authkey=%21AOsv3osLtuIzGr0&em=2&AllowTyping=True&ActiveCell='Sheet1'!C5&wdDownloadButton=True&wdInConfigurator=True\"></iframe>\n<details>\n<summary> Questions Table  </summary>   \n<h4>Table of Contents</h4>\n<table>\n<thead>\n<tr>\n<th>No.</th>\n<th>Questions</th>\n<th data-type=\"checkbox\">\n</th>\n<th>Answer</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n</td>\n<td>\n<strong>Core React</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>1</td>\n<td>What is React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>2</td>\n<td>What are the major features of React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>3</td>\n<td>What is JSX?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>4</td>\n<td>What is the difference between Element and Component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>5</td>\n<td>How to create components in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>6</td>\n<td>When to use a Class Component over a Function Component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>7</td>\n<td>What are Pure Components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>8</td>\n<td>What is state in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>9</td>\n<td>What are props in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>10</td>\n<td>What is the difference between state and props?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>11</td>\n<td>Why should we not update the state directly?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>12</td>\n<td>What is the purpose of callback function as an argument of setState()?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>13</td>\n<td>What is the difference between HTML and React event handling?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>14</td>\n<td>How to bind methods or event handlers in JSX callbacks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>15</td>\n<td>How to pass a parameter to an event handler or callback?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>16</td>\n<td>What are synthetic events in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>17</td>\n<td>What are inline conditional expressions?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>18</td>\n<td>What is \"key\" prop and what is the benefit of using it in arrays of elements?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>19</td>\n<td>What is the use of refs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>20</td>\n<td>How to create refs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>21</td>\n<td>What are forward refs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>22</td>\n<td>Which is preferred option with in callback refs and findDOMNode()?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>23</td>\n<td>Why are String Refs legacy?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>24</td>\n<td>What is Virtual DOM?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>25</td>\n<td>How Virtual DOM works?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>26</td>\n<td>What is the difference between Shadow DOM and Virtual DOM?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>27</td>\n<td>What is React Fiber?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>28</td>\n<td>What is the main goal of React Fiber?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>29</td>\n<td>What are controlled components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>30</td>\n<td>What are uncontrolled components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>31</td>\n<td>What is the difference between createElement and cloneElement?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>32</td>\n<td>What is Lifting State Up in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>33</td>\n<td>What are the different phases of component lifecycle?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>34</td>\n<td>What are the lifecycle methods of React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>35</td>\n<td>What are Higher-Order components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>36</td>\n<td>How to create props proxy for HOC component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>37</td>\n<td>What is context?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>38</td>\n<td>What is children prop?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>39</td>\n<td>How to write comments in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>40</td>\n<td>What is the purpose of using super constructor with props argument?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>41</td>\n<td>What is reconciliation?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>42</td>\n<td>How to set state with a dynamic key name?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>43</td>\n<td>What would be the common mistake of function being called every time the component renders?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>44</td>\n<td>Is lazy function supports named exports?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>45</td>\n<td>Why React uses className over class attribute?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>46</td>\n<td>What are fragments?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>47</td>\n<td>Why fragments are better than container divs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>48</td>\n<td>What are portals in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>49</td>\n<td>What are stateless components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>50</td>\n<td>What are stateful components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>51</td>\n<td>How to apply validation on props in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>52</td>\n<td>What are the advantages of React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>53</td>\n<td>What are the limitations of React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>54</td>\n<td>What are error boundaries in React v16</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>55</td>\n<td>How error boundaries handled in React v15?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>56</td>\n<td>What are the recommended ways for static type checking?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>57</td>\n<td>What is the use of react-dom package?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>58</td>\n<td>What is the purpose of render method of react-dom?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>59</td>\n<td>What is ReactDOMServer?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>60</td>\n<td>How to use InnerHtml in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>61</td>\n<td>How to use styles in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>62</td>\n<td>How events are different in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>63</td>\n<td>What will happen if you use setState in constructor?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>64</td>\n<td>What is the impact of indexes as keys?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>65</td>\n<td>Is it good to use setState() in componentWillMount() method?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>66</td>\n<td>What will happen if you use props in initial state?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>67</td>\n<td>How do you conditionally render components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>68</td>\n<td>Why we need to be careful when spreading props on DOM elements??</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>69</td>\n<td>How you use decorators in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>70</td>\n<td>How do you memoize a component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>71</td>\n<td>How you implement Server-Side Rendering or SSR?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>72</td>\n<td>How to enable production mode in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>73</td>\n<td>What is CRA and its benefits?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>74</td>\n<td>What is the lifecycle methods order in mounting?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>75</td>\n<td>What are the lifecycle methods going to be deprecated in React v16?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>76</td>\n<td>What is the purpose of getDerivedStateFromProps() lifecycle method?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>77</td>\n<td>What is the purpose of getSnapshotBeforeUpdate() lifecycle method?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>78</td>\n<td>Do Hooks replace render props and higher order components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>79</td>\n<td>What is the recommended way for naming components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>80</td>\n<td>What is the recommended ordering of methods in component class?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>81</td>\n<td>What is a switching component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>82</td>\n<td>Why we need to pass a function to setState()?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>83</td>\n<td>What is strict mode in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>84</td>\n<td>What are React Mixins?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>85</td>\n<td>Why is isMounted() an anti-pattern and what is the proper solution?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>86</td>\n<td>What are the Pointer Events supported in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>87</td>\n<td>Why should component names start with capital letter?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>88</td>\n<td>Are custom DOM attributes supported in React v16?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>89</td>\n<td>What is the difference between constructor and getInitialState?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>90</td>\n<td>Can you force a component to re-render without calling setState?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>91</td>\n<td>What is the difference between super() and super(props) in React using ES6 classes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>92</td>\n<td>How to loop inside JSX?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>93</td>\n<td>How do you access props in attribute quotes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>94</td>\n<td>What is React PropType array with shape?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>95</td>\n<td>How to conditionally apply class attributes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>96</td>\n<td>What is the difference between React and ReactDOM?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>97</td>\n<td>Why ReactDOM is separated from React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>98</td>\n<td>How to use React label element?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>99</td>\n<td>How to combine multiple inline style objects?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>100</td>\n<td>How to re-render the view when the browser is resized?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>101</td>\n<td>What is the difference between setState and replaceState methods?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>102</td>\n<td>How to listen to state changes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>103</td>\n<td>What is the recommended approach of removing an array element in react state?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>104</td>\n<td>Is it possible to use React without rendering HTML?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>105</td>\n<td>How to pretty print JSON with React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>106</td>\n<td>Why you can't update props in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>107</td>\n<td>How to focus an input element on page load?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>108</td>\n<td>What are the possible ways of updating objects in state?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>110</td>\n<td>How can we find the version of React at runtime in the browser?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>111</td>\n<td>What are the approaches to include polyfills in your create-react-app?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>112</td>\n<td>How to use https instead of http in create-react-app?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>113</td>\n<td>How to avoid using relative path imports in create-react-app?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>114</td>\n<td>How to add Google Analytics for react-router?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>115</td>\n<td>How to update a component every second?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>116</td>\n<td>How do you apply vendor prefixes to inline styles in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>117</td>\n<td>How to import and export components using react and ES6?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>118</td>\n<td>What are the exceptions on React component naming?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>119</td>\n<td>Why is a component constructor called only once?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>120</td>\n<td>How to define constants in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>121</td>\n<td>How to programmatically trigger click event in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>122</td>\n<td>Is it possible to use async/await in plain React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>123</td>\n<td>What are the common folder structures for React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>124</td>\n<td>What are the popular packages for animation?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>125</td>\n<td>What is the benefit of styles modules?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>126</td>\n<td>What are the popular React-specific linters?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>127</td>\n<td>How to make AJAX call and In which component lifecycle methods should I make an AJAX call?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>128</td>\n<td>What are render props?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>React Router</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>129</td>\n<td>What is React Router?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>130</td>\n<td>How React Router is different from history library?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>131</td>\n<td>What are the &#x3C;Router> components of React Router v4?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>132</td>\n<td>What is the purpose of push and replace methods of history?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>133</td>\n<td>How do you programmatically navigate using React router v4?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>134</td>\n<td>How to get query parameters in React Router v4</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>135</td>\n<td>Why you get \"Router may have only one child element\" warning?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>136</td>\n<td>How to pass params to history.push method in React Router v4?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>137</td>\n<td>How to implement default or NotFound page?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>138</td>\n<td>How to get history on React Router v4?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>139</td>\n<td>How to perform automatic redirect after login?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>React Internationalization</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>140</td>\n<td>What is React-Intl?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>141</td>\n<td>What are the main features of React Intl?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>142</td>\n<td>What are the two ways of formatting in React Intl?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>143</td>\n<td>How to use FormattedMessage as placeholder using React Intl?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>144</td>\n<td>How to access current locale with React Intl</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>145</td>\n<td>How to format date using React Intl?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>React Testing</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>146</td>\n<td>What is Shallow Renderer in React testing?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>147</td>\n<td>What is TestRenderer package in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>148</td>\n<td>What is the purpose of ReactTestUtils package?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>149</td>\n<td>What is Jest?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>150</td>\n<td>What are the advantages of Jest over Jasmine?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>151</td>\n<td>Give a simple example of Jest test case</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>React Redux</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>152</td>\n<td>What is Flux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>153</td>\n<td>What is Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>154</td>\n<td>What are the core principles of Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>155</td>\n<td>What are the downsides of Redux compared to Flux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>156</td>\n<td>What is the difference between mapStateToProps() and mapDispatchToProps()?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>157</td>\n<td>Can I dispatch an action in reducer?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>158</td>\n<td>How to access Redux store outside a component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>159</td>\n<td>What are the drawbacks of MVW pattern</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>160</td>\n<td>Are there any similarities between Redux and RxJS?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>161</td>\n<td>How to dispatch an action on load?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>162</td>\n<td>How to use connect from React Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>163</td>\n<td>How to reset state in Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>164</td>\n<td>Whats the purpose of at symbol in the redux connect decorator?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>165</td>\n<td>What is the difference between React context and React Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>166</td>\n<td>Why are Redux state functions called reducers?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>167</td>\n<td>How to make AJAX request in Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>168</td>\n<td>Should I keep all component's state in Redux store?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>169</td>\n<td>What is the proper way to access Redux store?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>170</td>\n<td>What is the difference between component and container in React Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>171</td>\n<td>What is the purpose of the constants in Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>172</td>\n<td>What are the different ways to write mapDispatchToProps()?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>173</td>\n<td>What is the use of the ownProps parameter in mapStateToProps() and mapDispatchToProps()?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>174</td>\n<td>How to structure Redux top level directories?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>175</td>\n<td>What is redux-saga?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>176</td>\n<td>What is the mental model of redux-saga?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>177</td>\n<td>What are the differences between call and put in redux-saga</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>178</td>\n<td>What is Redux Thunk?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>179</td>\n<td>What are the differences between redux-saga and redux-thunk</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>180</td>\n<td>What is Redux DevTools?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>181</td>\n<td>What are the features of Redux DevTools?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>182</td>\n<td>What are Redux selectors and Why to use them?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>183</td>\n<td>What is Redux Form?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>184</td>\n<td>What are the main features of Redux Form?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>185</td>\n<td>How to add multiple middlewares to Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>186</td>\n<td>How to set initial state in Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>187</td>\n<td>How Relay is different from Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>188</td>\n<td>What is an action in Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>React Native</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>188</td>\n<td>What is the difference between React Native and React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>189</td>\n<td>How to test React Native apps?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>190</td>\n<td>How to do logging in React Native?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>191</td>\n<td>How to debug your React Native?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>React supported libraries and Integration</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>192</td>\n<td>What is reselect and how it works?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>193</td>\n<td>What is Flow?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>194</td>\n<td>What is the difference between Flow and PropTypes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>195</td>\n<td>How to use font-awesome icons in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>196</td>\n<td>What is React Dev Tools?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>197</td>\n<td>Why is DevTools not loading in Chrome for local files?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>198</td>\n<td>How to use Polymer in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>199</td>\n<td>What are the advantages of React over Vue.js?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>200</td>\n<td>What is the difference between React and Angular?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>201</td>\n<td>Why React tab is not showing up in DevTools?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>202</td>\n<td>What are styled components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>203</td>\n<td>Give an example of Styled Components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>204</td>\n<td>What is Relay?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>205</td>\n<td>How to use TypeScript in create-react-app application?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>\n</td>\n<td>\n<strong>Miscellaneous</strong>\n</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>206</td>\n<td>What are the main features of reselect library?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>207</td>\n<td>Give an example of reselect usage?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>209</td>\n<td>Does the statics object work with ES6 classes in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>210</td>\n<td>Can Redux only be used with React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>211</td>\n<td>Do you need to have a particular build tool to use Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>212</td>\n<td>How Redux Form initialValues get updated from state?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>213</td>\n<td>How React PropTypes allow different type for one prop?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>214</td>\n<td>Can I import an SVG file as react component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>215</td>\n<td>Why are inline ref callbacks or functions not recommended?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>216</td>\n<td>What is render hijacking in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>217</td>\n<td>What are HOC factory implementations?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>218</td>\n<td>How to pass numbers to React component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>219</td>\n<td>Do I need to keep all my state into Redux? Should I ever use react internal state?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>220</td>\n<td>What is the purpose of registerServiceWorker in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>221</td>\n<td>What is React memo function?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>222</td>\n<td>What is React lazy function?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>223</td>\n<td>How to prevent unnecessary updates using setState?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>224</td>\n<td>How do you render Array, Strings and Numbers in React 16 Version?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>225</td>\n<td>How to use class field declarations syntax in React classes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>226</td>\n<td>What are hooks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>227</td>\n<td>What are the rules needs to follow for hooks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>228</td>\n<td>How to ensure hooks followed the rules in your project?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>229</td>\n<td>What are the differences between Flux and Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>230</td>\n<td>What are the benefits of React Router V4?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>231</td>\n<td>Can you describe about componentDidCatch lifecycle method signature?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>232</td>\n<td>In which scenarios error boundaries do not catch errors?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>233</td>\n<td>Why do you not need error boundaries for event handlers?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>234</td>\n<td>What is the difference between try catch block and error boundaries?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>235</td>\n<td>What is the behavior of uncaught errors in react 16?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>236</td>\n<td>What is the proper placement for error boundaries?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>237</td>\n<td>What is the benefit of component stack trace from error boundary?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>238</td>\n<td>What is the required method to be defined for a class component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>239</td>\n<td>What are the possible return types of render method?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>240</td>\n<td>What is the main purpose of constructor?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>241</td>\n<td>Is it mandatory to define constructor for React component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>242</td>\n<td>What are default props?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>243</td>\n<td>Why should not call setState in componentWillUnmount?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>244</td>\n<td>What is the purpose of getDerivedStateFromError?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>245</td>\n<td>What is the methods order when component re-rendered?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>246</td>\n<td>What are the methods invoked during error handling?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>247</td>\n<td>What is the purpose of displayName class property?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>248</td>\n<td>What is the browser support for react applications?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>249</td>\n<td>What is the purpose of unmountComponentAtNode method?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>250</td>\n<td>What is code-splitting?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>251</td>\n<td>What is the benefit of strict mode?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>252</td>\n<td>What are Keyed Fragments?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>253</td>\n<td>Does React support all HTML attributes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>254</td>\n<td>What are the limitations with HOCs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>255</td>\n<td>How to debug forwardRefs in DevTools?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>256</td>\n<td>When component props defaults to true?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>257</td>\n<td>What is NextJS and major features of it?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>258</td>\n<td>How do you pass an event handler to a component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>259</td>\n<td>Is it good to use arrow functions in render methods?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>260</td>\n<td>How to prevent a function from being called multiple times?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>261</td>\n<td>How JSX prevents Injection Attacks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>262</td>\n<td>How do you update rendered elements?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>263</td>\n<td>How do you say that props are read only?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>264</td>\n<td>How do you say that state updates are merged?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>265</td>\n<td>How do you pass arguments to an event handler?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>266</td>\n<td>How to prevent component from rendering?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>267</td>\n<td>What are the conditions to safely use the index as a key?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>268</td>\n<td>Is it keys should be globally unique?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>269</td>\n<td>What is the popular choice for form handling?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>270</td>\n<td>What are the advantages of formik over redux form library?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>271</td>\n<td>Why do you not required to use inheritance?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>272</td>\n<td>Can I use web components in react application?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>273</td>\n<td>What is dynamic import?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>274</td>\n<td>What are loadable components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>275</td>\n<td>What is suspense component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>276</td>\n<td>What is route based code splitting?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>277</td>\n<td>Give an example on How to use context?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>278</td>\n<td>What is the purpose of default value in context?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>279</td>\n<td>How do you use contextType?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>280</td>\n<td>What is a consumer?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>281</td>\n<td>How do you solve performance corner cases while using context?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>282</td>\n<td>What is the purpose of forward ref in HOCs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>283</td>\n<td>Is it ref argument available for all functions or class components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>284</td>\n<td>Why do you need additional care for component libraries while using forward refs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>285</td>\n<td>How to create react class components without ES6?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>286</td>\n<td>Is it possible to use react without JSX?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>287</td>\n<td>What is diffing algorithm?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>288</td>\n<td>What are the rules covered by diffing algorithm?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>289</td>\n<td>When do you need to use refs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>290</td>\n<td>Is it prop must be named as render for render props?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>291</td>\n<td>What are the problems of using render props with pure components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>292</td>\n<td>How do you create HOC using render props?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>293</td>\n<td>What is windowing technique?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>294</td>\n<td>How do you print falsy values in JSX?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>295</td>\n<td>What is the typical use case of portals?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>296</td>\n<td>How do you set default value for uncontrolled component?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>297</td>\n<td>What is your favorite React stack?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>298</td>\n<td>What is the difference between Real DOM and Virtual DOM?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>299</td>\n<td>How to add Bootstrap to a react application?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>300</td>\n<td>Can you list down top websites or applications using react as front end framework?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>301</td>\n<td>Is it recommended to use CSS In JS technique in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>302</td>\n<td>Do I need to rewrite all my class components with hooks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>303</td>\n<td>How to fetch data with React Hooks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>304</td>\n<td>Is Hooks cover all use cases for classes?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>305</td>\n<td>What is the stable release for hooks support?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>306</td>\n<td>Why do we use array destructuring (square brackets notation) in useState?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>307</td>\n<td>What are the sources used for introducing hooks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>308</td>\n<td>How do you access imperative API of web components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>309</td>\n<td>What is formik?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>310</td>\n<td>What are typical middleware choices for handling asynchronous calls in Redux?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>311</td>\n<td>Do browsers understand JSX code?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>312</td>\n<td>Describe about data flow in react?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>313</td>\n<td>What is react scripts?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>314</td>\n<td>What are the features of create react app?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>315</td>\n<td>What is the purpose of renderToNodeStream method?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>316</td>\n<td>What is MobX?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>317</td>\n<td>What are the differences between Redux and MobX?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>318</td>\n<td>Should I learn ES6 before learning ReactJS?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>319</td>\n<td>What is Concurrent Rendering?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>320</td>\n<td>What is the difference between async mode and concurrent mode?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>321</td>\n<td>Can I use javascript urls in react16.9?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>322</td>\n<td>What is the purpose of eslint plugin for hooks?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>323</td>\n<td>What is the difference between Imperative and Declarative in React?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>324</td>\n<td>What are the benefits of using typescript with reactjs?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>325</td>\n<td>How do you make sure that user remains authenticated on page refresh while using Context API State Management?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>326</td>\n<td>What are the benefits of new JSX transform?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>327</td>\n<td>How does new JSX transform different from old transform?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>328</td>\n<td>How do you get redux scaffolding using create-react-app?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n<tr>\n<td>329</td>\n<td>What are React Server components?</td>\n<td>false</td>\n<td>\n</td>\n</tr>\n</tbody>\n</table>\n</details>"},{"url":"/blog/awesome-graphql/","relativePath":"blog/awesome-graphql.md","relativeDir":"blog","base":"awesome-graphql.md","name":"awesome-graphql","frontmatter":{"title":"Awesome GraphQL","subtitle":"The Death Of REST","date":"2021-09-30","thumb_image_alt":"lorem-ipsum","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/GraphQL_Logo.svg/225px-GraphQL_Logo.svg.png","image":"https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/GraphQL_Logo.svg/225px-GraphQL_Logo.svg.png"},"html":"<h2>Table of Contents\n\n</h2>\n<ul>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#spec\">Specification</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#community\">Community</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#meetups\">GraphQL Meetups</a></li>\n<li>\n<p><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib\">Libraries</a></p>\n<ul>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-js\">Javascript</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-ts\">Typescript</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-rb\">Ruby</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-php\">PHP</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-py\">Python</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-java\">Java</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-c\">C/C++</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-go\">Go</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-scala\">Scala</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-perl\">Perl</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-dotnet\">.NET</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-erlang\">Erlang</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-elixir\">Elixir</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-haskell\">Haskell</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-sql\">SQL</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-lua\">Lua</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-elm\">Elm</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-clojure\">Clojure</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-clojurescript\">ClojureScript</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-swift\">Swift</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-ocaml\">OCaml</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-rust\">Rust</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-r\">R</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-julia\">Julia</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-kotlin\">Kotlin</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-unity\">Unity</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#lib-crystal\">Crystal</a></li>\n</ul>\n</li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#tools\">Tools</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#services\">Services</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#databases\">Databases</a></li>\n<li>\n<p><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example\">Examples</a></p>\n<ul>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-js\">Javascript</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-ts\">Typescript</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-rb\">Ruby</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-go\">Go</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-scala\">Scala</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-python\">Python</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-elixir\">Elixir</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-php\">PHP</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#example-reasonml\">ReasonML</a></li>\n</ul>\n</li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#video\">Videos</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#blogs\">Blogs</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#post\">Posts</a></li>\n<li><a href=\"https://github.com/dhruv-kumar-jha/awesome-graphql#workshopper\">Workshoppers</a></li>\n</ul>\n<h2>Specification</h2>\n<ul>\n<li><a href=\"http://facebook.github.io/graphql/\">facebook/graphql</a> - Working Draft of the Specification for GraphQL created by Facebook.</li>\n</ul>\n<h2>Community</h2>\n<ul>\n<li><a href=\"https://graphql.slack.com/messages/general\">Slack</a> - Share and help people on the chat. Get your invite <a href=\"https://graphql-slack.herokuapp.com/\">here</a></li>\n<li><a href=\"https://webchat.freenode.net/?channels=#graphql\">#graphql on Freenode</a> - The official IRC channel for GraphQL</li>\n<li><a href=\"https://www.facebook.com/groups/795330550572866/\">Facebook</a> - Group for discussions, articles and knowledge sharing</li>\n<li><a href=\"https://twitter.com/search?q=%23GraphQL\">Twitter</a> - Use the hashtag <a href=\"https://twitter.com/search?q=%23GraphQL\">#graphql</a></li>\n<li><a href=\"https://stackoverflow.com/questions/tagged/graphql\">StackOverflow</a> - Questions and answers. Use the tag <a href=\"http://stackoverflow.com/questions/tagged/graphql\">graphql</a></li>\n<li><a href=\"https://github.com/APIs-guru/graphql-apis\">GraphQL APIs</a> - A collective list of public GraphQL APIs</li>\n<li><a href=\"https://graphql-world.com/\">GraphQL World</a> - The fastest growing community of GraphQL developers</li>\n</ul>\n<h2>GraphQL Meetups</h2>\n<ul>\n<li><a href=\"https://www.meetup.com/graphql-berlin/\">Berlin</a></li>\n<li><a href=\"https://www.meetup.com/es-ES/GraphQL-BA/\">Buenos Aires</a></li>\n<li><a href=\"https://www.meetup.com/DFW-GraphQL-Meetup/\">Dallas-Fort Worth</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-Istanbul/\">Istanbul</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-London/\">London</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-Melbourne/\">Melbourne</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-Munich/\">Munich</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-NYC/\">New York City</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-SF/\">San Francisco</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-Sydney/\">Sydney</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-TLV/\">Tel Aviv</a></li>\n<li><a href=\"https://www.meetup.com/GraphQL-Toronto/\">Toronto</a></li>\n</ul>\n<h2>Libraries</h2>\n<h3>JavaScript Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/graphql/graphql-js\">GraphQL.js</a> - A reference implementation of GraphQL for JavaScript.</li>\n<li><a href=\"https://github.com/graphql/express-graphql\">express-graphql</a> - GraphQL Express Middleware.</li>\n<li><a href=\"https://github.com/chentsulin/koa-graphql\">koa-graphql</a> - GraphQL Koa Middleware.</li>\n<li><a href=\"https://github.com/SimonDegraeve/hapi-graphql\">hapi-graphql</a> - Create a GraphQL HTTP server with Hapi.</li>\n<li><a href=\"https://github.com/graphql/codemirror-graphql\">codemirror-graphql</a> - GraphQL mode and helpers for CodeMirror.</li>\n<li><a href=\"https://github.com/devknoll/graphql-schema\">graphql-schema</a> - Create GraphQL schemas with a fluent/chainable interface.</li>\n<li><a href=\"https://github.com/mickhansen/graphql-sequelize\">graphql-sequelize</a> - Sequelize helpers for GraphQL.</li>\n<li><a href=\"https://github.com/Glavin001/graphql-sequelize-crud\">graphql-sequelize-crud</a> - Automatically generate queries and mutations from Sequelize models.</li>\n<li><a href=\"https://github.com/RisingStack/graffiti\">graffiti</a> - Node.js GraphQL ORM.</li>\n<li><a href=\"https://github.com/RisingStack/graffiti-mongoose\">graffiti-mongoose</a> - Mongoose (MongoDB) adapter for graffiti (Node.js GraphQL ORM).</li>\n<li><a href=\"https://github.com/ooflorent/babel-plugin-graphql\">babel-plugin-graphql</a> - Babel plugin that compile GraphQL tagged template strings.</li>\n<li><a href=\"https://github.com/gyzerok/adrenaline\">adrenaline</a> - React bindings for Redux with Relay in mind.</li>\n<li><a href=\"https://github.com/brysgo/graphql-bookshelf\">graphql-bookshelf</a> - Some help defining GraphQL schema around BookshelfJS models.</li>\n<li><a href=\"https://github.com/weyoss/graphql-bookshelfjs\">graphql-bookshelfjs</a> - A simple bridge between your graphql queries and your bookshelf models, perform batched and optimised queries.</li>\n<li><a href=\"https://github.com/matthewmueller/graph.ql\">graph.ql</a> - Faster and simpler technique for creating and querying GraphQL schemas.</li>\n<li><a href=\"https://github.com/kennetpostigo/react-reach\">react-reach</a> - A library to communicate with Graphql through Redux</li>\n<li><a href=\"https://github.com/kadirahq/lokka\">Lokka</a> - Simple JavaScript client for GraphQL, which you can use anywhere.</li>\n<li><a href=\"http://strapi.io/documentation/graphql\">Strapi</a> - Open-source Node.js framework that supports \"GraphQL\" out of the box.</li>\n<li><a href=\"https://github.com/larsbs/graysql\">GraysQL</a> - A GraphQL manager and loader.</li>\n<li><a href=\"https://github.com/larsbs/graysql-orm-loader\">graysql-orm-loader</a> - A GraysQL extension to load a GraphQL schema from an ORM.</li>\n<li><a href=\"https://github.com/almilo/annotated-graphql\">Annotated GraphQL</a> - Proof of Concept for annotations in GraphQL (i.e.: transform an existing REST api into a GraphQL endpoint).</li>\n<li><a href=\"https://github.com/apollographql/apollo-client\">Apollo Client</a> - A well-documented GraphQL client. Has React and Angular bindings.</li>\n<li><a href=\"https://github.com/apollographql/graphql-tools\">graphql-tools</a> - Tool library for building and maintaining GraphQL-JS servers.</li>\n<li><a href=\"https://github.com/apollographql/graphql-anywhere\">graphql-anywhere</a> - Run a GraphQL query anywhere, against any data, with no schema.</li>\n<li><a href=\"https://github.com/apollographql/graphql-tag\">graphql-tag</a> - A JavaScript template literal tag that parses GraphQL queries.</li>\n<li><a href=\"https://github.com/julienvincent/modelizr\">modelizr</a> - A library for simplifying the process of writing GraphQL queries, mocking them and normalizing their responses.</li>\n<li><a href=\"https://github.com/Akryum/vue-apollo\">vue-apollo</a> - Vue integration for apollo.</li>\n<li><a href=\"https://github.com/fenos/graphql-thinky\">graphql-thinky</a> - Build an optimized GraphQL schema from Thinky RethinkDB models.</li>\n<li><a href=\"https://github.com/MikeBild/graphql-pouch\">graphql-pouch</a> - A GraphQL-API runtime on top of PouchDB created by GraphQL shorthand notation as a self contained service with CouchDB synchronization.</li>\n<li><a href=\"https://github.com/almilo/gql-tools\">gql-tools</a> - Tool library with CLI for schema generation and manipulation.</li>\n<li><a href=\"https://github.com/excitement-engineer/graphql-iso-date\">graphql-iso-date</a> - A GraphQL date scalar type to be used with GraphQL.js. This scalar represents a date in the ISO 8601 format YYYY-MM-DD.</li>\n<li><a href=\"https://github.com/nodkz/graphql-compose\">graphql-compose</a> - Tool which allows you to construct flexible graphql schema from different data sources via plugins.</li>\n<li><a href=\"https://github.com/mwilliamson/node-graphjoiner\">node-graphjoiner</a> - Create GraphQL APIs using joins, SQL or otherwise.</li>\n<li><a href=\"https://github.com/gucheen/FetchQL\">FetchQL</a> - GraphQL query client with Fetch</li>\n<li><a href=\"https://github.com/stems/join-monster\">Join Monster</a> - A GraphQL-to-SQL query execution layer for batch data fetching.</li>\n<li><a href=\"https://github.com/graphql-community/create-graphql\">Create-GraphQL</a> - Command-line utility to build production-ready servers with GraphQL.</li>\n<li><a href=\"https://github.com/lucasbento/graphql-pokemon\">GraphQL-Pokémon</a> - Get information of a Pokémon with GraphQL!</li>\n<li><a href=\"https://github.com/graphql-factory\">graphql-factory</a> - Create GraphQL types from JSON definitions</li>\n<li><a href=\"https://chrome.google.com/webstore/detail/chromeiql/fkkiamalmpiidkljmicmjfbieiclmeij\">ChromeiQL</a> - Chrome extension to use GraphiQL anywhere</li>\n<li><a href=\"https://github.com/ejoebstl/graphql-auto-mutation\">graphql-auto-mutation</a> - Automatically generates functions for mutations specified in a GraphQL schema.</li>\n<li><a href=\"https://github.com/graphitejs/graphitejs\">GraphiteJS</a> - Full stack GraphQL framework.</li>\n<li><a href=\"https://github.com/tallyb/loopback-graphql\">loopback-graphql</a> - GraphQL Server for Loopback.</li>\n<li><a href=\"https://github.com/octet-stream/parasprite\">parasprite</a> - Describe your GraphQL schema using chainable interface.</li>\n<li><a href=\"https://github.com/f/graphql.js\">GraphQL.js</a> - JavaScript GraphQL Client for Browser and Node.js Usage</li>\n<li><a href=\"https://github.com/arangodb/graphql-sync\">graphql-sync</a> - Promise-free wrapper to GraphQL.js for synchronous environments</li>\n<li><a href=\"https://github.com/apollographql/apollo-fetch\">apollo-fetch</a> - Lightweight GraphQL client that supports custom fetch functions, middleware, and afterware</li>\n<li><a href=\"https://github.com/spikenail/spikenail\">Spikenail</a> - Node.js framework for building GraphQL API almost without coding.</li>\n<li><a href=\"https://github.com/AEB-labs/graphql-weaver\">graphql-weaver</a> - A tool to combine, link and transform GraphQL schemas; combine multiple GraphQL servers into one API.</li>\n<li><a href=\"https://github.com/APIs-guru/graphql-lodash\">graphql-lodash</a> - Data manipulation for GraphQL queries with lodash syntax.</li>\n<li><a href=\"https://github.com/apollographql/apollo-angular\">apollo-angular</a> - Angular integration for Apollo.</li>\n<li><a href=\"https://github.com/lucasconstantino/graphql-resolvers\">graphql-resolvers</a> - Resolver composition library for GraphQL.</li>\n<li><a href=\"https://github.com/thebigredgeek/apollo-resolvers\">apollo-resolvers</a> - Expressive and composable resolvers for Apollo Server and graphql-tools.</li>\n<li><a href=\"https://github.com/thebigredgeek/apollo-errors\">apollo-errors</a> - Machine-readable custom errors for Apollo Server.</li>\n<li><a href=\"https://github.com/helfer/graphql-disable-introspection\">graphql-disable-introspection</a> - Graphql Disable Introspection</li>\n<li><a href=\"https://github.com/arackaf/mongo-graphql-starter\">mongo-graphql-starter</a> - Flexible and robust Mongo based resolvers for Node.</li>\n<li><a href=\"https://github.com/imolorhe/altair\">altair-express-middleware</a> - An express middleware for mounting an instance of Altair GraphQL client.</li>\n<li><a href=\"https://github.com/pa-bru/graphql-cost-analysis\">graphql-cost-analysis</a> - A Graphql query cost analyzer.</li>\n</ul>\n<h5>Relay Related</h5>\n<ul>\n<li><a href=\"https://github.com/facebook/relay\">relay</a> - Relay is a JavaScript framework for building data-driven React applications.</li>\n<li><a href=\"https://github.com/graphql/graphql-relay-js\">graphql-relay-js</a> - A library to help construct a graphql-js server supporting react-relay.</li>\n<li><a href=\"https://github.com/MattMcFarland/sequelize-relay\">sequelize-relay</a> - Serverside library that connects sequelize and graphql-relay-js together.</li>\n<li><a href=\"https://github.com/graphcool/babel-plugin-react-relay\">babel-plugin-react-relay</a> - Babel Plugin for Relay with support for JSON &#x26; graphql-js schemas and URL endpoints.</li>\n<li><a href=\"https://www.npmjs.com/package/babel-relay-plugin\">babel-relay-plugin</a> - Babel Relay Plugin for transpiling GraphQL queries for use with Relay.</li>\n<li><a href=\"https://github.com/relay-tools/react-router-relay\">react-router-relay</a> - Relay integration for React Router.</li>\n<li><a href=\"https://github.com/relay-tools/relay-local-schema\">relay-local-schema</a> - Use Relay without a GraphQL server.</li>\n<li><a href=\"https://github.com/acdlite/relay-sink\">relay-sink</a> - Use Relay to fetch and store data outside of a React component.</li>\n<li><a href=\"https://github.com/acdlite/recompose/tree/master/src/packages/recompose-relay\">recompose-relay</a> - Recompose helpers for Relay.</li>\n<li><a href=\"https://github.com/larsbs/graysql#Graylay\">Graylay</a> - A GraysQL extension to create a Relay compatible Schema.</li>\n<li><a href=\"https://github.com/apollographql/apollo-client\">Apollo Client</a> - A simple alternative to Relay, comes with React and Angular bindings.</li>\n<li><a href=\"https://github.com/nodkz/react-relay-network-layer\">react-relay-network-layer</a> - A network layer for Relay with query batching and middleware support (urlThunk, retryThunk, auth, defer and other).</li>\n<li><a href=\"https://github.com/edvinerikson/relay-subscriptions\">relay-subscriptions</a> - Subscription support for Relay.</li>\n<li><a href=\"https://github.com/alex-cory/portfolio\">Portfolio Relay Example</a> - An example website that fetches data from various apis and uses Relay and GraphQL to feed the data to React components!</li>\n<li><a href=\"https://github.com/lucasbento/react-relay-pokemon\">Relay Pokédex</a> - Project using GraphQL Pokémon to show how powerful Relay is.</li>\n<li><a href=\"https://github.com/ntkme/vue-relay\">vue-relay</a> - A framework for building GraphQL-driven Vue.js applications.</li>\n</ul>\n<h3>TypeScript Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/19majkel94/type-graphql\">TypeGraphQL</a> - Create GraphQL schema and resolvers with TypeScript, using classes and decorators!</li>\n<li><a href=\"http://vesper-framework.com/\">Vesper</a> - NodeJS framework that helps you to create scalable, maintainable, extensible, declarative and fast GraphQL-based server applications.</li>\n<li><a href=\"https://github.com/calebmer/graphql-strong\">graphql-strong</a> - Define your GraphQL schemas with confidence that your values are correct.</li>\n<li><a href=\"https://github.com/3VLINC/graphql-to-typescript\">graphql-to-typescript</a> - Compiles GraphQL files into an importable typescript module with type definitions</li>\n<li><a href=\"https://github.com/Quramy/graphql-decorator\">graphql-decorator</a> - Helps to build GraphQL schema with TypeScript.</li>\n<li><a href=\"https://github.com/indigotech/graphql-schema-decorator\">graphql-schema-decorator</a> - This package makes possible the use of decorators to define a GraphQL schema.</li>\n<li><a href=\"https://github.com/vichyssoise/graphql-typescript\">graphql-typescript</a> - Define and build GraphQL Schemas using typed classes</li>\n<li><a href=\"https://github.com/prismake/typegql\">typegql</a> - Create GraphQL schema with type-safe class decorators.</li>\n</ul>\n<h3>Ruby Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/rmosolgo/graphql-ruby\">graphql-ruby</a> - Ruby implementation of Facebook's GraphQL.</li>\n<li><a href=\"https://github.com/Shopify/graphql-parser\">graphql-parser</a> - A small ruby gem wrapping the libgraphqlparser C library for parsing GraphQL.</li>\n<li><a href=\"https://github.com/github/graphql-client\">graphql-client</a> - A Ruby library for declaring, composing and executing GraphQL queries.</li>\n<li><a href=\"https://github.com/Shopify/graphql-batch\">graphql-batch</a> - A query batching executor for the graphql gem.</li>\n<li><a href=\"https://github.com/exaspark/batch-loader\">batch-loader</a> - A powerful tool to avoid N+1 queries without extra dependencies or primitives.</li>\n<li><a href=\"https://github.com/exAspArk/graphql-guard\">graphql-guard</a> - A simple field-level authorization for the graphql gem.</li>\n</ul>\n<h3>PHP Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/webonyx/graphql-php\">graphql-php</a> - A PHP port of GraphQL reference implementation.</li>\n<li><a href=\"https://github.com/ivome/graphql-relay-php\">graphql-relay-php</a> - Relay helpers for GraphQL &#x26; PHP.</li>\n<li><a href=\"https://github.com/api-platform/api-platform\">API Platform</a> - API framework compatible with Symfony having native GraphQL support.</li>\n<li><a href=\"https://github.com/Folkloreatelier/laravel-graphql\">laravel-graphql</a> - Facebook GraphQL for Laravel 5.</li>\n<li><a href=\"https://github.com/nuwave/laravel-graphql-relay\">laravel-graphql-relay</a> - A Laravel library to help construct a server supporting react-relay.</li>\n<li><a href=\"https://github.com/4rthem/graphql-mapper\">graphql-mapper</a> - This library allows to build a GraphQL schema based on your model.</li>\n<li><a href=\"https://github.com/suribit/GraphQLBundle\">graphql-bundle</a> - GraphQL Bundle for Symfony 2.</li>\n<li><a href=\"https://github.com/overblog/GraphQLBundle\">overblog/graphql-bundle</a> - This bundle provides tools to build a complete GraphQL server in your Symfony App. Supports react-relay.</li>\n<li><a href=\"https://github.com/Youshido/GraphQL\">GraphQL</a> - Well documented PHP implementation with no dependencies.</li>\n<li><a href=\"https://github.com/Youshido/GraphQLBundle\">GraphQL Symfony Bundle</a> - GraphQL Bundle for the Symfony 3 (supports 2.6+).</li>\n<li><a href=\"https://github.com/wp-graphql/wp-graphql\">WPGraphQL</a> - WordPress plugin that exposes a Relay compliant GraphQL endpoint</li>\n<li><a href=\"https://github.com/tim-field/graphql-wp\">graphql-wp</a> - a WordPress plugin that exposes a GraphQL endpoint.</li>\n<li><a href=\"https://www.symfony.fi/entry/graphql-bundle-adds-protocol-support-to-ez-platform-symfony-cms\">eZ Platform GraphQL Bundle</a> - GraphQL Bundle for the eZ Platform Symfony CMS.</li>\n<li><a href=\"https://github.com/stefanorg/graphql-middleware\">GraphQL Middleware</a> - GraphQL Psr7 Middleware</li>\n<li><a href=\"https://github.com/stefanorg/zend-expressive-graphiql\">Zend Expressive GraphiQL Extension</a> - GraphiQL extension for zend expressive</li>\n<li><a href=\"https://github.com/digiaonline/graphql-php\">GraphQL for PHP7</a> - A batteries-included, standard-compliant and easy to work with implementation of the GraphQL specification in PHP7 (based on the reference implementation).</li>\n</ul>\n<h3>Python Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/tryolabs/graphql-parser\">graphql-parser</a> - GraphQL parser for Python.</li>\n<li><a href=\"https://github.com/graphql-python/graphql-core\">graphql-core</a> - GraphQL implementation for Python.</li>\n<li><a href=\"https://github.com/graphql-python/graphql-relay-py\">graphql-relay-py</a> - A library to help construct a graphql-py server supporting react-relay.</li>\n<li><a href=\"https://github.com/tallstreet/graphql-parser-python\">graphql-parser-python</a> - A python wrapper around libgraphqlparser.</li>\n<li><a href=\"https://github.com/graphql-python/graphene\">graphene</a> - A package for creating GraphQL schemas/types in a Pythonic easy way.</li>\n<li><a href=\"https://github.com/graphql-python/graphene-gae\">graphene-gae</a> - Adds GraphQL support to Google AppEngine (GAE).</li>\n<li><a href=\"https://github.com/graphql-python/flask-graphql\">flask-graphql</a> - Adds GraphQL support to your Flask application.</li>\n<li><a href=\"https://github.com/graphcool/python-graphql-client\">python-graphql-client</a> - Simple GraphQL client for Python 2.7+</li>\n<li><a href=\"https://github.com/healx/python-graphjoiner\">python-graphjoiner</a> - Create GraphQL APIs using joins, SQL or otherwise.</li>\n<li><a href=\"https://github.com/graphql-python/graphene-django\">graphene-django</a> - A Django integration for Graphene.</li>\n</ul>\n<h3>Java Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/graphql-java/graphql-java\">graphql-java</a> - GraphQL Java implementation.</li>\n<li><a href=\"https://github.com/graphql-java/graphql-java-type-generator\">graphql-java-type-generator</a> - Auto-generates types for use with GraphQL Java</li>\n<li><a href=\"https://github.com/bpatters/schemagen-graphql\">schemagen-graphql</a> - Schema generation and execution package that turns POJO's into a GraphQL Java queryable set of objects. Enables exposing any service as a GraphQL service using Annotations.</li>\n<li><a href=\"https://github.com/graphql-java/graphql-java-annotations\">graphql-java-annotations</a> - Provides annotations-based syntax for schema definition with GraphQL Java.</li>\n<li><a href=\"https://github.com/oembedler/spring-graphql-common\">spring-graphql-common</a> - Spring Framework GraphQL Library.</li>\n<li><a href=\"https://github.com/graphql-java/graphql-spring-boot\">graphql-spring-boot</a> - GraphQL and GraphiQL Spring Framework Boot Starters.</li>\n<li><a href=\"https://github.com/neo4j-graphql/neo4j-graphql\">neo4j-graphql</a> - GraphQL bindings for Neo4j, generates and runs Cypher.</li>\n<li><a href=\"https://github.com/engagingspaces/vertx-graphql-service-discovery\">vertx-graphql-service-discovery</a> - Asynchronous GraphQL service discovery and querying for your microservices.</li>\n<li><a href=\"https://github.com/engagingspaces/vertx-dataloader\">vertx-dataloader</a> - Port of Facebook DataLoader for efficient, asynchronous batching and caching in clustered GraphQL environments</li>\n<li><a href=\"https://github.com/Billy-Bichon/LiveGQL\">LiveGQL</a> - GraphQL subscription client in Java.</li>\n<li><a href=\"https://github.com/ebridges/rdbms-to-graphql\">rdbms-to-graphql</a> - A Java CLI program that generates a GraphQL schema from a JDBC data source.</li>\n<li><a href=\"https://github.com/google/rejoiner\">Rejoiner</a> - Generates a GraphQL schema based on one or more gRPC microservices, or any other Protobuf source.</li>\n<li><a href=\"https://github.com/leangen/graphql-spqr\">graphql-spqr</a> - GraphQL SPQR aims to make it dead simple to add a GraphQL API to any Java project. It works by dynamically generating a GraphQL schema from Java code.</li>\n</ul>\n<h3>C/C++ Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/graphql/libgraphqlparser\">libgraphqlparser</a> - A GraphQL query parser in C++ with C and C++ APIs.</li>\n</ul>\n<h3>Go Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/graphql-go/graphql\">graphql</a> - An implementation of GraphQL for Go follows graphql-js</li>\n<li><a href=\"https://github.com/machinebox/graphql\">machinebox/graphql</a> - Simple low-level GraphQL client for Go</li>\n<li><a href=\"https://github.com/graphql-go/relay\">graphql-relay-go</a> - A Go/Golang library to help construct a server supporting react-relay.</li>\n<li><a href=\"https://github.com/neelance/graphql-go\">graphql-go</a> - GraphQL server with a focus on ease of use.</li>\n<li><a href=\"https://github.com/tecbot/c-graphqlparser\">c-graphqlparser</a> - Go-gettable version of the libgraphqlparser C library for parsing GraphQL.</li>\n<li><a href=\"https://github.com/tallstreet/graphql\">tallstreet-graphql</a> - GraphQL parser and server for Go that leverages libgraphqlparser</li>\n<li><a href=\"https://github.com/playlyfe/go-graphql\">go-graphql</a> - A powerful GraphQL server implementation for Golang</li>\n<li><a href=\"https://github.com/nicksrandall/dataloader\">dataloader</a> - Implementation of Facebook's DataLoader in Golang</li>\n</ul>\n<h3>Scala Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/sangria-graphql/sangria\">sangria</a> - Scala GraphQL client and server library.</li>\n<li><a href=\"https://github.com/sangria-graphql/sangria-relay\">sangria-relay</a> - Sangria Relay Support.</li>\n<li><a href=\"https://github.com/hrosenhorn/graphql-scala\">graphql-scala</a> - An attempt to get GraphQL going with Scala.</li>\n</ul>\n<h3>Perl Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/CurtTilmes/Perl6-GraphQL\">Perl6-GraphQL</a> - GraphQL for Perl6.</li>\n<li><a href=\"https://github.com/graphql-perl/graphql-perl\">graphql-perl</a> - GraphQL for Perl5.</li>\n</ul>\n<h3>.NET Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/graphql-dotnet/graphql-dotnet\">graphql-dotnet</a> - GraphQL for .NET.</li>\n<li><a href=\"https://github.com/graphql-dotnet/conventions\">Conventions</a> - Reflection-based schema generation for .NET.</li>\n<li><a href=\"https://github.com/ckimes89/graphql-net\">graphql-net</a> - GraphQL to IQueryable for .NET</li>\n<li><a href=\"https://github.com/fsprojects/FSharp.Data.GraphQL\">FSharp.Data.GraphQL</a> - FSharp GraphQL.</li>\n<li><a href=\"https://github.com/graphql-dotnet/graphql-client\">GraphQL.Client</a> - GraphQL Client for .NET.</li>\n</ul>\n<h3>Erlang Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/shopgun/graphql-erlang\">graphql-erlang</a> - Pure Erlang implementation with IDL and pattern-matching.</li>\n</ul>\n<h3>Elixir Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/absinthe-graphql/absinthe\">absinthe-graphql</a> - Fully Featured Elixir GraphQL Library.</li>\n<li><a href=\"https://github.com/graphql-elixir/graphql\">graphql-elixir</a> - GraphQL Elixir.</li>\n<li><a href=\"https://github.com/graphql-elixir/plug_graphql\">plug_graphql</a> - Plug integration for GraphQL Elixir.</li>\n<li><a href=\"https://github.com/graphql-elixir/graphql_relay\">graphql_relay</a> - Relay helpers for GraphQL Elixir.</li>\n<li><a href=\"https://github.com/graphql-elixir/graphql_parser\">graphql_parser</a> - Elixir bindings for <a href=\"https://github.com/graphql/libgraphqlparser\">libgraphqlparser</a></li>\n<li><a href=\"https://github.com/asonge/graphql\">graphql</a> - Elixir GraphQL parser.</li>\n<li><a href=\"https://github.com/peburrows/plot\">plot</a> - GraphQL parser and resolver for Elixir.</li>\n</ul>\n<h3>Haskell Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/jdnavarro/graphql-haskell\">graphql-haskell</a> - GraphQL AST and parser for Haskell.</li>\n</ul>\n<h3>SQL Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/solidsnack/GraphpostgresQL\">GraphpostgresQL</a> - GraphQL for Postgres.</li>\n<li><a href=\"https://github.com/rexxars/sql-to-graphql\">sql-to-graphql</a> - Generate a GraphQL API based on your SQL database structure.</li>\n<li><a href=\"https://github.com/graphile/postgraphile\">PostGraphile</a> - A GraphQL API created by reflection over a PostgreSQL schema.</li>\n<li><a href=\"https://github.com/ebridges/rdbms-to-graphql\">rdbms-to-graphql</a> - A Java CLI program that generates a GraphQL schema from a JDBC data source.</li>\n<li><a href=\"https://github.com/graphcool/prisma\">Prisma</a> - Turn your database into a GraphQL API. Prisma lets you design your data model and have a production ready GraphQL API online in minutes.</li>\n<li><a href=\"https://github.com/bradleyboy/tuql\">tuql</a> - Automatically create a GraphQL server from any sqlite database.</li>\n</ul>\n<h3>Lua Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/bjornbytes/graphql-lua\">graphql-lua</a> - GraphQL for Lua.</li>\n</ul>\n<h3>Elm Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/jamesmacaulay/elm-graphql\">jamesmacaulay/elm-graphql</a> - Client library that lets you build GraphQL queries in Elm.</li>\n<li><a href=\"https://github.com/ghivert/elm-graphql\">ghivert/elm-graphql</a> - Client library that lets you build GraphQL queries in Elm with your own decoders.</li>\n<li><a href=\"https://github.com/jahewson/elm-graphql\">jahewson/elm-graphql</a> - Command-line tool that generates Elm code from queries in .graphql files.</li>\n</ul>\n<h3>Clojure Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/tendant/graphql-clj\">graphql-clj</a> - A Clojure library designed to provide GraphQL implementation.</li>\n<li><a href=\"https://github.com/walmartlabs/lacinia\">lacinia</a> - GraphQL implementation in pure Clojure.</li>\n<li><a href=\"https://github.com/alumbra/alumbra\">alumbra</a> - Simple &#x26; Elegant GraphQL for Clojure!</li>\n</ul>\n<h3>ClojureScript Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/johanatan/speako\">speako</a> - A ClojureScript/NPM compiler for GraphQL Schema Language.</li>\n<li><a href=\"https://github.com/Vincit/venia\">venia</a> - A Clojure(Script) GraphQL query generation</li>\n</ul>\n<h3>Swift Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/GraphQLSwift/GraphQL\">GraphQL</a> - Build GraphQL APIs with Swift.</li>\n<li><a href=\"https://github.com/GraphQLSwift/Graphiti\">Graphiti</a> - Build Swiftier GraphQL APIs with Swift.</li>\n<li><a href=\"https://github.com/dbart01/Gryphin\">Gryphin</a> - Type-safe GraphQL client for iOS and MacOS written in Swift.</li>\n<li><a href=\"https://github.com/apollographql/apollo-ios\">Apollo-iOS</a> - Strongly typed, code-generating, caching GraphQL client for Swift.</li>\n<li><a href=\"https://github.com/florianmari/LiveGQL\">LiveGQL</a> - GraphQL Subscription client in Swift.</li>\n</ul>\n<h3>OCaml Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/andreas/ocaml-graphql-server\">ocaml-graphql-server</a> - GraphQL servers in OCaml.</li>\n</ul>\n<h3>Rust Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/mhallin/juniper\">juniper</a> - GraphQL server library for Rust.</li>\n</ul>\n<h3>R Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/ropensci/graphql\">graphql</a> - Bindings to libgraphqlparser for R.</li>\n<li><a href=\"https://github.com/schloerke/gqlr\">gqlr</a> - GraphQL server package for R.</li>\n<li><a href=\"https://github.com/ropensci/ghql\">ghql</a> - GraphQL client package for R.</li>\n</ul>\n<h3>Julia Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/codeneomatrix/Diana.jl\">Diana.jl</a> - Julia client for GraphQL.</li>\n</ul>\n<h3>Kotlin Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/prestongarno/ktq\">ktq</a> - Kotlin gradle plugin SDL type generator &#x26; runtime client</li>\n</ul>\n<h3>Unity Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/Gazuntype/graphQL-client-unity\">graphQL-client-unity</a> - A Unity client for GraphQL.</li>\n</ul>\n<h3>Crystal Libraries</h3>\n<ul>\n<li><a href=\"https://github.com/ziprandom/graphql-crystal\">graphql-crystal</a> - A graphql implementation for Crystal</li>\n</ul>\n<h2>Tools</h2>\n<ul>\n<li><a href=\"https://github.com/graphql/graphiql\">graphiql</a> - An in-browser IDE for exploring GraphQL.</li>\n<li><a href=\"https://github.com/graphcool/graphql-playground\">GraphQL Playground</a> - GraphQL IDE that supports multi-column schema docs, tabs, query history, configuration of HTTP headers and GraphQL Subscriptions.</li>\n<li><a href=\"https://github.com/skevy/graphiql-app\">GraphiQL.app</a> - A light, Electron-based wrapper around GraphiQL.</li>\n<li><a href=\"https://github.com/Macroz/GraphQLviz\">GraphQLviz</a> - GraphQLviz marries GraphQL (schemas) with Graphviz.</li>\n<li><a href=\"https://github.com/sheerun/graphqlviz\">graphqlviz</a> - GraphQL API visualizer in Node.js</li>\n<li><a href=\"http://facebook.github.io/relay/prototyping/playground.html\">Relay Playground</a></li>\n<li><a href=\"http://dferber90.github.io/graphql-ast-explorer/\">GraphQL AST Explorer</a> - Explore the AST of a GraphQL document interactively</li>\n<li><a href=\"https://www.graphqlhub.com/\">GraphQLHub</a> - Query public API's schemas (e.g. Reddit, Twitter, Github, etc) using GraphiQL</li>\n<li><a href=\"https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/\">js-graphql-intellij-plugin</a> - GraphQL language support for IntelliJ IDEA and WebStorm, including Relay.QL tagged templates in JavaScript and TypeScript.</li>\n<li><a href=\"https://github.com/syrusakbary/gdom\">gdom</a> - DOM Traversing and Scraping using GraphQL.</li>\n<li><a href=\"https://github.com/almilo/annotated-graphql-server\">Annotated GraphQL Server</a> - Server for annotated GraphQL showing how to transform a REST api into a GraphQL endpoint with annotations.</li>\n<li><a href=\"http://nathanrandal.com/graphql-visualizer/\">Model Visualizer</a> - A small webapp that generates an ERD-like visualization of a GraphQL endpoint from an introspection query.</li>\n<li><a href=\"https://github.com/Ghirro/graphql-network\">GraphQL Network</a> - A chrome dev-tools extension for debugging GraphQL network requests.</li>\n<li><a href=\"https://github.com/apollographql/eslint-plugin-graphql\">eslint-plugin-graphql</a> - An ESLint plugin that checks your GraphQL strings against a schema.</li>\n<li><a href=\"https://astexplorer.net/\">AST Explorer</a> - Select \"GraphQL\" at the top, explore the GraphQL AST and highlight different parts by clicking in the query.</li>\n<li><a href=\"https://github.com/jparise/vim-graphql\">vim-graphql</a> - A Vim plugin that provides GraphQL file detection and syntax highlighting.</li>\n<li><a href=\"https://github.com/sarkistlt/graphql-auto-generating-cms\">GraphQL CMS</a> - Use your existing GraphQL schema to generate simple for use, fully functional CMS in a couple steps.</li>\n<li><a href=\"https://github.com/2fd/graphdoc\">graphdoc</a> - Static page generator for documenting GraphQL Schema.</li>\n<li><a href=\"https://github.com/orionsoft/atom-graphql-autocomplete\">graphql-autocomplete</a> - Autocomplete and lint from a GraphQL endpoint in Atom.</li>\n<li><a href=\"https://github.com/redound/graphql-ide\">GraphQL IDE</a> - An extensive IDE for exploring GraphQL API's.</li>\n<li><a href=\"https://github.com/yarax/swagger-to-graphql\">Swagger to GraphQL</a> - GraphQL types builder based on REST API described in Swagger. Allows to migrate to GraphQL from REST for 5 minutes</li>\n<li><a href=\"https://github.com/APIs-guru/graphql-voyager\">GraphQL Voyager</a> - Represent any GraphQL API as an interactive graph.</li>\n<li><a href=\"https://graphql-docs.com/\">GraphQL Docs</a> - Instantly create beautiful GraphQL API docs hosted online.</li>\n<li><a href=\"https://github.com/APIs-guru/graphql-faker\">GraphQL Faker</a> - 🎲 Mock or extend your GraphQL API with faked data. No coding required.</li>\n<li><a href=\"https://github.com/Quramy/ts-graphql-plugin\">ts-graphql-plugin</a> - A language service plugin complete and validate GraphQL query in TypeScript template strings.</li>\n<li><a href=\"https://launchpad.graphql.com/\">Apollo Launchpad</a> - Like JSFiddle for GraphQL server code, write and deploy a GraphQL API directly from your browser.</li>\n<li><a href=\"https://github.com/apollographql/apollo-tracing\">Apollo Tracing</a> - GraphQL extension that enables you to easily get resolver-level performance information as part of a GraphQL response.</li>\n<li><a href=\"https://github.com/imolorhe/altair\">Altair GraphQL Client</a> - A beautiful feature-rich GraphQL Client for all platforms.</li>\n<li><a href=\"https://github.com/abhiaiyer91/apollo-storybook-decorator\">Apollo Storybook Decorator</a> - Wrap your React Storybook stories with Apollo Client, provide mocks for isolated UI testing with GraphQL</li>\n<li><a href=\"https://github.com/Workpop/graphql-metrics\">GraphQL Metrics</a> - instrument GraphQL resolvers, logging response times and statuses (if there was an error or not) to the console as well as to InfluxDB.</li>\n<li><a href=\"https://github.com/Brbb/graphql-rover\">GraphQL Rover</a> - GraphQL schema interactive navigation, rearrange nodes, search and explore types and fields.</li>\n<li><a href=\"https://github.com/marmelab/json-graphql-server\">json-graphql-server</a> - Get a full fake GraphQL API with zero coding in less than 30 seconds, based on a JSON data file.</li>\n<li><a href=\"https://insomnia.rest/\">Insomnia</a> - An full-featured API client with first-party GraphQL query editor</li>\n<li><a href=\"https://github.com/sly777/ran\">RAN Toolkit</a> - Production-ready toolkit/boilerplate with support for GraphQL, SSR, Hot-reload, CSS-in-JS, caching, and more.</li>\n</ul>\n<h2>Databases</h2>\n<ul>\n<li><a href=\"https://www.arangodb.com/\">ArangoDB</a> - Multi-model database that supports GraphQL schemas in JavaScript inside the database.</li>\n<li><a href=\"https://dgraph.io/\">Dgraph</a> - Scalable, distributed, low latency, high throughput Graph database with a GraphQL like language (called <a href=\"https://docs.dgraph.io/query-language/\">GraphQL+</a>) as the query language. Dgrapqh can be queried with graphql by using <a href=\"https://github.com/dpeek/dgraphql\">dgraphql</a></li>\n</ul>\n<h2>Services</h2>\n<ul>\n<li><a href=\"https://graphcms.com/\">GraphCMS</a> - GraphQL based Headless Content Management System.</li>\n<li><a href=\"https://www.graph.cool/\">Graphcool</a> - Your own GraphQL backend in under 5 minutes. Works with every GraphQL client such as Relay and Apollo.</li>\n<li><a href=\"https://hasura.io/\">Hasura</a> - Create tables and get a GraphQL backend in under 60s. Works on top of Postgres that you can directly access. No initial knowledge of graphql required.</li>\n<li><a href=\"https://www.reindex.io/\">Reindex</a> - Instant GraphQL Backend for Your React Apps.</li>\n<li><a href=\"https://scaphold.io/\">Scaphold</a> - GraphQL as a service that includes API integrations such as Stripe and Mailgun.</li>\n<li><a href=\"https://tipe.io/\">Tipe</a> - Next Generation API-first CMS with a GraphQL or REST API. Stop letting your CMS decide how you build your apps.</li>\n<li><a href=\"https://aws.amazon.com/appsync/\">AWS AppSync</a> - Serverless GraphQL</li>\n</ul>\n<h2>Examples</h2>\n<h3>JavaScript Examples</h3>\n<ul>\n<li><a href=\"https://github.com/relayjs/relay-starter-kit\">relay-starter-kit</a> - Barebones starting point for a Relay application.</li>\n<li><a href=\"https://github.com/kriasoft/react-starter-kit\">react-starter-kit</a> - Isomorphic web app boilerplate (Node.js/Express, GraphQL, React)</li>\n<li><a href=\"https://github.com/kriasoft/nodejs-api-starter\">nodejs-api-starter</a> - Boilerplate and tooling for authoring data API backends with Node.js and GraphQL</li>\n<li><a href=\"https://github.com/graphql/swapi-graphql\">swapi-graphql</a> - A GraphQL schema and server wrapping <a href=\"http://swapi.co/\">swapi</a>.</li>\n<li><a href=\"https://github.com/RisingStack/graphql-server\">graphql-server</a> - GraphQL server with Mongoose (MongoDB) and Node.js.</li>\n<li><a href=\"https://github.com/clayallsopp/graphql-intro\">graphql-intro</a> - <a href=\"https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2\">https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2</a></li>\n<li><a href=\"https://github.com/jonsharratt/graphql-aws\">graphql-aws</a> - Amazon AWS GraphQL API Server.</li>\n<li><a href=\"https://github.com/RisingStack/graffiti-todo\">graffiti-todo</a> - Example Relay TodoMVC application using graffiti-mongoose.</li>\n<li><a href=\"https://gist.github.com/devknoll/8b274f1c5d05230bfade\">devknoll/gist:8b274f1c5d05230bfade</a></li>\n<li><a href=\"https://github.com/codefoundries/UniversalRelayBoilerplate\">UniversalRelayBoilerplate</a> Boilerplate + examples for React Native (iOS, Android), React (isomorphic, Material-UI), Relay, GraphQL, JWT, Node.js, Apache Cassandra.</li>\n<li><a href=\"https://github.com/vslinko/ripster/tree/master/src/graphql\">vslinko/ripster</a></li>\n<li><a href=\"https://github.com/fortruce/relay-skeleton\">relay-skeleton</a> - React, Relay, GraphQL project skeleton</li>\n<li><a href=\"https://github.com/mhart/simple-relay-starter\">simple-relay-starter</a> - A very simple starter for React Relay using Browserify.</li>\n<li><a href=\"https://github.com/transedward/relay-chat\">relay-chat</a> - an chat example showing Relay with routing and pagination.</li>\n<li><a href=\"https://github.com/taion/relay-todomvc\">relay-todomvc</a> - Relay TodoMVC with routing.</li>\n<li><a href=\"https://github.com/mrblueblue/graphql-express-sqlite\">graphql-express-sqlite</a> - GraphQL server with Sqlite and Express</li>\n<li><a href=\"https://github.com/chentsulin/koa-graphql-relay-example\">koa-graphql-relay-example</a> - Example of <a href=\"https://github.com/chentsulin/koa-graphql\">koa-graphql</a></li>\n<li><a href=\"https://github.com/lvarayut/relay-fullstack\">relay-fullstack</a> - Relay Starter Kit integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS.</li>\n<li><a href=\"https://github.com/serverless/serverless-graphql-blog\">serverless-graphql-blog</a> - A Serverless Blog leveraging GraphQL to offer a REST API with only 1 endpoint</li>\n<li><a href=\"https://github.com/soonlive/relay-cart\">relay-cart</a> - A simple shopping cart example leveraging relay &#x26; GraphQL with routing and pagination.</li>\n<li><a href=\"https://github.com/applification/graphql-loader\">graphql-loader</a> - Example project to illustrate GraphQL, Express and Facebook DataLoader to connect to third party REST API</li>\n<li><a href=\"https://github.com/alvinthen/swapi-graphql-lambda\">swapi-graphql-lambda</a> - A GraphQL schema hosted in AWS Lambda wrapping <a href=\"http://swapi.co/\">http://swapi.co/</a></li>\n<li><a href=\"http://dev.apollodata.com/react/\">Apollo Client documentation</a> - Documentation and example for building GraphQL apps using apollo client</li>\n<li><a href=\"https://www.apollographql.com/docs/\">Apollo Server tools, products, and libraries documentation</a> - Documentation, tutorial and examples for building GraphQL server and connecting to SQL, MongoDB and REST endpoints.</li>\n<li><a href=\"https://www.apollographql.com/docs/link/\">Apollo Link</a> - The official guide for getting started with Apollo Link - a standard interface for modifying control flow of GraphQL requests and fetching GraphQL results.</li>\n<li><a href=\"https://github.com/nnance/f8app-apollo\">f8-apollo</a> - Refactored version of the official F8 app of 2016, powered by React Native and the Apollo Stack.</li>\n<li><a href=\"https://github.com/fbsamples/f8app\">f8app</a> - Source code of the official F8 app of 2016, powered by React Native and other Facebook open source projects. <a href=\"http://makeitopen.com/\">http://makeitopen.com</a></li>\n<li><a href=\"https://github.com/reindexio/reindex-examples\">Reindex Examples</a> - Example projects for Reindex with using React Native and React.js for web.</li>\n<li><a href=\"https://julienvincent.github.io/modelizr/\">Modelizr Documentation</a> - Documentation and Usage Examples for modelizr</li>\n<li><a href=\"https://github.com/Akryum/frontpage-vue-app\">Vue Apollo Example</a> - Apollo example project for Vue 2.0.</li>\n<li><a href=\"https://github.com/kamilkisiela/angular2-graphql-rest\">angular2-graphql-rest</a> - An example app with REST Api working side by side with GraphQL using Apollo Client with angular2-apollo. Includes step-by-step tutorial how to migrate from REST to GraphQL.</li>\n<li><a href=\"https://github.com/entria/graphql-dataloader-boilerplate\">GraphQL-DataLoader-Boilerplate</a> - Boilerplate to start your GraphQL with DataLoader server</li>\n<li><a href=\"https://github.com/sibelius/graphql-cep\">GraphQL-CEP</a> - Query address by CEP</li>\n<li><a href=\"https://github.com/katopz/react-apollo-graphql-github-example\">Apollo React example for Github GraphQL API</a> - Usage Examples Apollo React for Github GraphQL API with create-react-app</li>\n<li><a href=\"https://github.com/xpepermint/graphql-example\">Intuitive GraphQL Resolver Example</a> - GraphQL application example using <a href=\"https://github.com/xpepermint/rawmodeljs\">RawModel.js</a>.</li>\n<li><a href=\"https://reactql.org/\">ReactQL starter kit</a> - Universal React + Apollo + Redux + React Router 4, with SSR-enabled GraphQL, store (de/re)hydration and production code bundling.</li>\n<li><a href=\"https://github.com/stubailo/microhn\">microhn</a> - Simple Hacker News client built on top of GraphQLHub</li>\n<li><a href=\"https://github.com/sysgears/apollo-universal-starter-kit\">Apollo Web&#x26;Mobile Universal Starter Kit with Hot Code Reload</a> - Apollo, GraphQL, React, React Native, Expo, Redux, Express, SQL and Twitter Bootstrap. Hot Code Reload of back end &#x26; front end using Webpack and Hot Module Replacement.</li>\n<li><a href=\"https://malloc.fi/building-decoupled-sites-and-apps-with-graphql-and-next-js\">Building Decoupled Sites and Apps with GraphQL and Next.js</a></li>\n</ul>\n<h3>TypeScript Examples</h3>\n<ul>\n<li><a href=\"https://github.com/DxCx/webpack-graphql-server\">Basic Apollo Server</a> - Basic Starter for Apollo Server, Using typescript and Webpack.</li>\n<li><a href=\"https://github.com/FinalDes/apollo-express-ts-server-boilerplate\">Apollo Graphql Express Server</a> - Minimal Apollo Graphql Express Server</li>\n<li><a href=\"https://github.com/KATT/shop\">Prisma/Apollo/React Full-stack Example</a> - An e-commerce example project with Prisma, GraphQL API Gateway, React, Apollo, Next.js, SSR, CI, and E2E testing. All TypeScript.</li>\n</ul>\n<h3>Ruby Examples</h3>\n<ul>\n<li><a href=\"https://github.com/rmosolgo/graphql-ruby-demo\">graphql-ruby-demo</a> - Use graphql-ruby to expose a Rails app.</li>\n<li><a href=\"https://github.com/github/github-graphql-rails-example\">github-graphql-rails-example</a> - Example Rails app using GitHub's GraphQL API.</li>\n<li><a href=\"https://github.com/nethsix/relay-on-rails\">relay-on-rails</a> - Barebones starter kit for Relay application with Rails GraphQL server.</li>\n<li><a href=\"https://github.com/gauravtiwari/relay-rails-blog\">relay-rails-blog</a> - A graphql, relay and standard rails application powered demo weblog.</li>\n<li><a href=\"https://github.com/jcdavison/to_eat_app\">to<em>eat</em>app</a> - A sample graphql/rails/relay application with a related 3-part article series.</li>\n</ul>\n<h3>Go Examples</h3>\n<ul>\n<li><a href=\"https://github.com/sogko/golang-relay-starter-kit\">golang-relay-starter-kit</a> - Barebones starting point for a Relay application with Golang GraphQL server.</li>\n<li><a href=\"https://github.com/graphql-go/playground\">golang-graphql-playground</a> - An example Golang GraphQL server written with graphql-go and graphql-relay-go. Try live demo at: <a href=\"http://golanggraphqlplayground-sogko.rhcloud.com/\">http://golanggraphqlplayground-sogko.rhcloud.com</a></li>\n<li><a href=\"https://github.com/sogko/todomvc-relay-go\">todomvc-relay-go</a> - Port of the React/Relay TodoMVC app, driven by a Golang GraphQL backend.</li>\n</ul>\n<h3>Scala Examples</h3>\n<ul>\n<li><a href=\"https://github.com/sangria-graphql/sangria-akka-http-example\">sangria-akka-http-example</a> - An example GraphQL server written with akka-http and <a href=\"http://sangria-graphql.org/\">sangria</a></li>\n<li><a href=\"https://github.com/sangria-graphql/sangria-playground\">sangria-playground</a> - An example of GraphQL server written with Play and sangria.</li>\n</ul>\n<h3>Python Examples</h3>\n<ul>\n<li><a href=\"https://github.com/graphql-python/swapi-graphene\">swapi-graphene</a> - A GraphQL schema and server using <a href=\"http://graphene-python.org/\">Graphene</a> - <a href=\"http://swapi.graphene-python.org/\">View demo online</a>.</li>\n</ul>\n<h3>Elixir Examples</h3>\n<ul>\n<li><a href=\"https://github.com/absinthe-graphql/absinthe_example\">absinthe_example</a> - Example usage of Absinthe GraphQL</li>\n<li><a href=\"https://github.com/graphql-elixir/hello_graphql_phoenix\">hello<em>graphql</em>phoenix</a> - Examples of GraphQL Elixir Plug endpoints mounted in Phoenix - <a href=\"http://playground.graphql-elixir.org/\">View demo online</a>.</li>\n</ul>\n<h3>PHP Examples</h3>\n<ul>\n<li><a href=\"https://siler.leocavalcante.com/graphql/\">Siler's GraphQL guide</a> - A guide on how to build a PHP GraphQL endpoint.</li>\n<li><a href=\"https://github.com/ardani/laravel-graphql\">Laravel GraphQL</a> - A sample integrating GraphQL with Laravel</li>\n<li><a href=\"https://symfony.fi/entry/adding-a-graphql-api-to-your-symfony-flex-app\">Adding a GraphQL API to your Symfony Flex application</a></li>\n</ul>\n<h3>ReasonML Examples</h3>\n<ul>\n<li><a href=\"https://github.com/Gregoirevda/reason-ml-graphql-todo-list\">Todo list example</a> - A todo list integrating GraphQL.</li>\n</ul>\n<h2>Videos</h2>\n<ul>\n<li><a href=\"https://egghead.io/lessons/react-zero-config-apollo-graphql-with-apollo-boost\">Zero-config Apollo + GraphQL with Apollo Boost</a></li>\n<li><a href=\"https://www.youtube.com/embed/UBGzsb2UkeY\">Zero to GraphQL in 30 Minutes</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=9sc8Pyc51uU\">Data fetching for React applications at Facebook</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=X6YbAKiLCLU\">React Native &#x26; Relay: Bringing Modern Web Techniques to Mobile</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=WQLzZf34FJ8\">Exploring GraphQL</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=gY48GW87Feo\">Creating a GraphQL Server</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=S0s935RKKB4\">GraphQL at The Financial Times</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=IrgHurBjQbg\">Relay: An Application Framework For React</a></li>\n<li><a href=\"https://www.youtube.com/watch?t=643&#x26;v=Pxdgu2XIAAg\">Building and Deploying Relay with Facebook</a></li>\n<li><a href=\"https://vimeo.com/144817545\">Introduction to GraphQL</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=_9RgHXqH8J0\">Exploring GraphQL@Scale</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=IMUpYOc9z3c&#x26;feature=youtu.be\">What's Next for Phoenix by Chris McCord</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=Ed6oJXKt3-M\">GraphQL with Nick Schrock</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=DNPVqK_woRQ\">Build a GraphQL server for Node.js using PostgreSQL/MySQL</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=PHabPhgRUuU\">GraphQL server tutorial for Node.js with SQL, MongoDB and REST</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=ENqDNIp1Nd8\">JavaScript Air Episode 023: Transitioning from REST to GraphQL</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=ViXL0YQnioU\">GraphQL Future at react-europe 2016</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=etax3aEe2dA\">GraphQL at Facebook at react-europe 2016</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=z5rz3saDPJ8\">Building native mobile apps with GraphQL at react-europe 2016</a></li>\n</ul>\n<h2>Blogs</h2>\n<ul>\n<li><a href=\"http://graphql.org/blog/\">Official GraphQL blog</a></li>\n<li><a href=\"https://dev-blog.apollodata.com/\">Building Apollo</a></li>\n</ul>\n<h2>Posts</h2>\n<ul>\n<li><a href=\"http://gajus.com/blog/9/using-dataloader-to-batch-requests\">Using DataLoader to batch GraphQL requests</a></li>\n<li><a href=\"https://facebook.github.io/react/blog/2015/02/20/introducing-relay-and-graphql.html\">Introducing Relay and GraphQL</a></li>\n<li><a href=\"https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html\">GraphQL Introduction</a></li>\n<li><a href=\"https://gist.github.com/wincent/598fa75e22bdfa44cf47\">Unofficial Relay FAQ</a></li>\n<li><a href=\"https://medium.com/@clayallsopp/your-first-graphql-server-3c766ab4f0a2\">Your First GraphQL Server</a></li>\n<li><a href=\"https://blog.risingstack.com/graphql-overview-getting-started-with-graphql-and-nodejs/\">GraphQL Overview - Getting Started with GraphQL and Node.js</a></li>\n<li><a href=\"https://medium.freecodecamp.com/introduction-to-graphql-1d8011b80159\">4 Reasons you should try out GraphQL</a></li>\n<li><a href=\"https://medium.com/@frikille/moving-from-rest-to-graphql-e3650b6f5247\">Moving from REST to GraphQL</a></li>\n<li><a href=\"http://davidandsuzi.com/writing-a-basic-api-with-graphql/\">Writing a Basic API with GraphQL</a></li>\n<li><a href=\"https://blog.risingstack.com/start-using-graphql-with-graffiti/?utm_source=nodeweekly&#x26;utm_medium=email\">Start using GraphQL with Graffiti</a></li>\n<li><a href=\"https://www.reindex.io/blog/building-a-graphql-server-with-node-js-and-sql/\">Building a GraphQL Server with Node.js and SQL</a></li>\n<li><a href=\"https://www.slideshare.net/LondonReact/graph-ql\">GraphQL at The Financial Times</a></li>\n<li><a href=\"http://sgwilym.github.io/relay-visual-learners/\">Relay for visual learners</a></li>\n<li><a href=\"https://medium.com/@cpojer/relay-and-routing-36b5439bad9\">Relay and Routing</a></li>\n<li><a href=\"https://wehavefaces.net/learn-golang-graphql-relay-1-e59ea174a902\">Learn Golang + GraphQL + Relay, Part 1: Your first Golang GraphQL server</a></li>\n<li><a href=\"https://wehavefaces.net/learn-golang-graphql-relay-2-a56cbcc3e341\">Learn Golang + GraphQL + Relay, Part 2: Your first Relay application</a></li>\n<li><a href=\"https://0x2a.sh/from-rest-to-graphql-b4e95e94c26b\">From REST to GraphQL</a></li>\n<li><a href=\"http://graphql.org/blog/graphql-a-query-language/\">GraphQL: A data query language</a></li>\n<li><a href=\"http://graphql.org/blog/subscriptions-in-graphql-and-relay/\">Subscriptions in GraphQL and Relay</a></li>\n<li><a href=\"https://medium.com/@clayallsopp/relay-101-building-a-hacker-news-client-bb8b2bdc76e6\">Relay 101: Building A Hacker News Client</a></li>\n<li><a href=\"https://wehavefaces.net/graphql-shorthand-notation-cheatsheet-17cd715861b6\">GraphQL Shorthand Notation Cheatsheet</a></li>\n<li><a href=\"https://githubengineering.com/the-github-graphql-api/\">The GitHub GraphQL API</a></li>\n<li><a href=\"https://medium.com/@katopz/github-graphql-api-react-example-eace824d7b61\">Github GraphQL API React Example</a></li>\n<li><a href=\"https://medium.com/entria/testing-a-graphql-server-using-jest-4e00d0e4980e\">Testing a GraphQL Server using Jest</a></li>\n<li><a href=\"https://medium.com/entria/how-to-implement-viewercansee-in-graphql-78cc48de7464\">How to implement viewerCanSee in GraphQL</a></li>\n<li><a href=\"https://engineeringblog.yelp.com/2017/05/introducing-yelps-local-graph.html\">Introducing Yelp's Local Graph</a></li>\n<li><a href=\"https://labs.getninjas.com.br/sharing-data-in-a-microservices-architecture-using-graphql-97db59357602\">Sharing data in a Microservices Architecture using GraphQL</a></li>\n<li><a href=\"https://blog.codecentric.de/2017/09/graphql-mit-spotify-teil-1-server/\">Let's build a node.js GraphQL server for fetching Spotify REST API, in German</a> | <a href=\"https://blog.codecentric.de/en/2017/01/lets-build-spotify-graphql-server/\">in English</a></li>\n<li><a href=\"https://medium.com/@pierrecriulanscy/client-side-only-realtime-web-applications-with-firebase-graphql-and-apollo-client-2-0-9606160f7cf8\">\"Client-side only\" realtime web applications with Firebase, GraphQL and apollo-client 2.0</a></li>\n</ul>\n<h2>Tutorials</h2>\n<ul>\n<li><a href=\"https://www.howtographql.com/\">How to GraphQL</a> - Fullstack Tutorial Website with Tracks for all Major Frameworks &#x26; Languages including React, Apollo, Relay, JavaScript, Ruby, Java, Elixir and many more</li>\n<li><a href=\"https://github.com/mugli/learning-graphql\">learning-graphql</a> - An attempt to learn GraphQL.</li>\n<li><a href=\"https://www.learnrelay.org/\">Learn Relay</a> - A comprehensive introduction to Relay</li>\n<li><a href=\"https://www.learnapollo.com/\">Learn Apollo</a> - A hands-on tutorial for Apollo GraphQL Client</li>\n</ul>"},{"url":"/blog/flow-control-in-python/","relativePath":"blog/flow-control-in-python.md","relativeDir":"blog","base":"flow-control-in-python.md","name":"flow-control-in-python","frontmatter":{"title":"flow-control-in-python","subtitle":"flow-control-in-python","date":"2021-10-14","thumb_image_alt":"lorem-ipsum","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"images/python1.jpg","image":"images/python2-15e88a3a.jpg"},"html":"<h2>Read It</h2>\n<ul>\n<li><a href=\"https://www.pythoncheatsheet.org\">Website</a></li>\n<li><a href=\"https://github.com/wilfredinni/python-cheatsheet\">Github</a></li>\n<li><a href=\"https://github.com/wilfredinni/Python-cheatsheet/raw/master/python_cheat_sheet.pdf\">PDF</a></li>\n<li><a href=\"https://mybinder.org/v2/gh/wilfredinni/python-cheatsheet/master?filepath=jupyter_notebooks\">Jupyter Notebook</a></li>\n</ul>\n<h2>Flow Control</h2>\n<h3>Comparison Operators</h3>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>==</code></td>\n<td>Equal to</td>\n</tr>\n<tr>\n<td><code>!=</code></td>\n<td>Not equal to</td>\n</tr>\n<tr>\n<td><code>&#x3C;</code></td>\n<td>Less than</td>\n</tr>\n<tr>\n<td><code>></code></td>\n<td>Greater Than</td>\n</tr>\n<tr>\n<td><code>&#x3C;=</code></td>\n<td>Less than or Equal to</td>\n</tr>\n<tr>\n<td><code>>=</code></td>\n<td>Greater than or Equal to</td>\n</tr>\n</tbody>\n</table>\n<p>These operators evaluate to True or False depending on the values you give them.</p>\n<p>Examples:</p>\n<pre><code class=\"language-python\">42 == 42\n</code></pre>\n<pre><code class=\"language-python\">40 == 42\n</code></pre>\n<pre><code class=\"language-python\">'hello' == 'hello'\n</code></pre>\n<pre><code class=\"language-python\">'hello' == 'Hello'\n</code></pre>\n<pre><code class=\"language-python\">'dog' != 'cat'\n</code></pre>\n<pre><code class=\"language-python\">42 == 42.0\n</code></pre>\n<pre><code class=\"language-python\">42 == '42'\n</code></pre>\n<h3>Boolean evaluation</h3>\n<p>Never use <code>==</code> or <code>!=</code> operator to evaluate boolean operation. Use the <code>is</code> or <code>is not</code> operators,\nor use implicit boolean evaluation.</p>\n<p>NO (even if they are valid Python):</p>\n<pre><code class=\"language-python\">True == True\n</code></pre>\n<pre><code class=\"language-python\">True != False\n</code></pre>\n<p>YES (even if they are valid Python):</p>\n<pre><code class=\"language-python\">True is True\n</code></pre>\n<pre><code class=\"language-python\">True is not False\n</code></pre>\n<p>These statements are equivalent:</p>\n<pre><code class=\"language-Python\">if a is True:\n   pass\nif a is not False:\n   pass\nif a:\n   pass\n</code></pre>\n<p>And these as well:</p>\n<pre><code class=\"language-Python\">if a is False:\n   pass\nif a is not True:\n   pass\nif not a:\n   pass\n</code></pre>\n<h3>Boolean Operators</h3>\n<p>There are three Boolean operators: and, or, and not.</p>\n<p>The <em>and</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>True and True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>True and False</td>\n<td>False</td>\n</tr>\n<tr>\n<td>False and True</td>\n<td>False</td>\n</tr>\n<tr>\n<td>False and False</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n<p>The <em>or</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>True or True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>True or False</td>\n<td>True</td>\n</tr>\n<tr>\n<td>False or True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>False or False</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n<p>The <em>not</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>not True</td>\n<td>False</td>\n</tr>\n<tr>\n<td>not False</td>\n<td>True</td>\n</tr>\n</tbody>\n</table>\n<h3>Mixing Boolean and Comparison Operators</h3>\n<pre><code class=\"language-python\">(4 &#x3C; 5) and (5 &#x3C; 6)\n</code></pre>\n<pre><code class=\"language-python\">(4 &#x3C; 5) and (9 &#x3C; 6)\n</code></pre>\n<pre><code class=\"language-python\">(1 == 2) or (2 == 2)\n</code></pre>\n<p>You can also use multiple Boolean operators in an expression, along with the comparison operators:</p>\n<pre><code class=\"language-python\">2 + 2 == 4 and not 2 + 2 == 5 and 2 * 2 == 2 + 2\n</code></pre>\n<h3>if Statements</h3>\n<pre><code class=\"language-python\">if name == 'Alice':\n    print('Hi, Alice.')\n</code></pre>\n<h3>else Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelse:\n    print('Hello, stranger.')\n</code></pre>\n<h3>elif Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 5\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\n</code></pre>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 30\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\nelse:\n    print('You are neither Alice nor a little kid.')\n</code></pre>\n<h3>while Loop Statements</h3>\n<pre><code class=\"language-python\">spam = 0\n\nwhile spam &#x3C; 5:\n    print('Hello, world.')\n    spam = spam + 1\n</code></pre>\n<h3>break Statements</h3>\n<p>If the execution reaches a break statement, it immediately exits the while loop's clause:</p>\n<pre><code class=\"language-python\">while True:\n    print('Please type your name.')\n    name = input()\n    if name == 'your name':\n        break\n\nprint('Thank you!')\n</code></pre>\n<h3>continue Statements</h3>\n<p>When the program execution reaches a continue statement, the program execution immediately jumps back to the start of the loop.</p>\n<pre><code class=\"language-python\">while True:\n    print('Who are you?')\n    name = input()\n    if name != 'Joe':\n        continue\n    print('Hello, Joe. What is the password? (It is a fish.)')\n    password = input()\n    if password == 'swordfish':\n        break\n\nprint('Access granted.')\n</code></pre>\n<h3>for Loops and the range() Function</h3>\n<pre><code class=\"language-python\">print('My name is')\nfor i in range(5):\n    print('Jimmy Five Times ({})'.format(str(i)))\n</code></pre>\n<p>The <em>range()</em> function can also be called with three arguments. The first two arguments will be the start and stop values, and the third will be the step argument. The step is the amount that the variable is increased by after each iteration.</p>\n<pre><code class=\"language-python\">for i in range(0, 10, 2):\n   print(i)\n</code></pre>\n<p>You can even use a negative number for the step argument to make the for loop count down instead of up.</p>\n<pre><code class=\"language-python\">for i in range(5, -1, -1):\n    print(i)\n</code></pre>\n<h3>For else statement</h3>\n<p>This allows you to specify a statement to execute after the full loop has been executed. Only\nuseful when a <code>break</code> condition can occur in the loop:</p>\n<pre><code class=\"language-python\">for i in [1, 2, 3, 4, 5]:\n   if i == 3:\n       break\nelse:\n   print(\"only executed when no item of the list is equal to 3\")\n</code></pre>\n<h3>Importing Modules</h3>\n<pre><code class=\"language-python\">import random\n\nfor i in range(5):\n    print(random.randint(1, 10))\n</code></pre>\n<pre><code class=\"language-python\">import random, sys, os, math\n</code></pre>\n<pre><code class=\"language-python\">from random import *\n</code></pre>\n<h3>Ending a Program with sys.exit</h3>\n<pre><code class=\"language-python\">import sys\n\nwhile True:\n    print('Type exit to exit.')\n    response = input()\n    if response == 'exit':\n        sys.exit()\n    print('You typed {}.'.format(response))\n</code></pre>"},{"url":"/blog/functions-in-python/","relativePath":"blog/functions-in-python.md","relativeDir":"blog","base":"functions-in-python.md","name":"functions-in-python","frontmatter":{"title":"Functions in Python","subtitle":"Functions in Python","date":"2021-10-14","thumb_image_alt":"lorem-ipsum","excerpt":"wubalubadubdub","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"images/python2.jpg"},"html":"<h2>Functions</h2>\n<pre><code class=\"language-python\">def hello(name):\n    print('Hello {}'.format(name))\n</code></pre>\n<h3>Return Values and return Statements</h3>\n<p>When creating a function using the def statement, you can specify what the return value should be with a return statement. A return statement consists of the following:</p>\n<ul>\n<li>The return keyword.</li>\n<li>The value or expression that the function should return.</li>\n</ul>\n<pre><code class=\"language-python\">import random\ndef getAnswer(answerNumber):\n    if answerNumber == 1:\n        return 'It is certain'\n    elif answerNumber == 2:\n        return 'It is decidedly so'\n    elif answerNumber == 3:\n        return 'Yes'\n    elif answerNumber == 4:\n        return 'Reply hazy try again'\n    elif answerNumber == 5:\n        return 'Ask again later'\n    elif answerNumber == 6:\n        return 'Concentrate and ask again'\n    elif answerNumber == 7:\n        return 'My reply is no'\n    elif answerNumber == 8:\n        return 'Outlook not so good'\n    elif answerNumber == 9:\n        return 'Very doubtful'\n\nr = random.randint(1, 9)\nfortune = getAnswer(r)\nprint(fortune)\n</code></pre>\n<h3>The None Value</h3>\n<pre><code class=\"language-python\">spam = print('Hello!')\nspam is None\n</code></pre>\n<p>Note: never compare to <code>None</code> with the <code>==</code> operator. Always use <code>is</code>.</p>\n<h3>print Keyword Arguments</h3>\n<pre><code class=\"language-python\">print('Hello', end='')\nprint('World')\n</code></pre>\n<pre><code class=\"language-python\">print('cats', 'dogs', 'mice')\n</code></pre>\n<pre><code class=\"language-python\">print('cats', 'dogs', 'mice', sep=',')\n</code></pre>\n<h3>Local and Global Scope</h3>\n<ul>\n<li>Code in the global scope cannot use any local variables.</li>\n<li>However, a local scope can access global variables.</li>\n<li>Code in a function's local scope cannot use variables in any other local scope.</li>\n<li>You can use the same name for different variables if they are in different scopes. That is, there can be a local variable named spam and a global variable also named spam.</li>\n</ul>\n<h3>The global Statement</h3>\n<p>If you need to modify a global variable from within a function, use the global statement:</p>\n<pre><code class=\"language-python\">def spam():\n    global eggs\n    eggs = 'spam'\n\neggs = 'global'\nspam()\nprint(eggs)\n</code></pre>\n<p>There are four rules to tell whether a variable is in a local scope or global scope:</p>\n<ol>\n<li>If a variable is being used in the global scope (that is, outside of all functions), then it is always a global variable.</li>\n<li>If there is a global statement for that variable in a function, it is a global variable.</li>\n<li>Otherwise, if the variable is used in an assignment statement in the function, it is a local variable.</li>\n<li>But if the variable is not used in an assignment statement, it is a global variable.</li>\n</ol>"},{"url":"/blog/blogwcomments/","relativePath":"blog/blogwcomments.md","relativeDir":"blog","base":"blogwcomments.md","name":"blogwcomments","frontmatter":{"title":"ExpressJS Apis","subtitle":"lorem-ipsum","date":"2021-07-26","thumb_image_alt":"node and express js","excerpt":"## **Overview**  A **database schema** is the shape of our database. It defines what tables we'll have, which columns should exist within the tables and any restrictions on each column.  A well-designed database schema keeps the data well organized and can help ensure high-quality data.  Note that while schema design is usually left to Database Administrators (DBAs), understanding schema helps when designing APIs and database logic. And in a smaller team, this step may fall on the developer.","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"post","thumb_image":"images/express.png"},"html":"<p><a href=\"https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_where\">SQL Tryit Editor v1.6</a></p>\n<h2>A <strong>database is a collection of data organized for easy retrieval and manipulation</strong>.</h2>\n<p>We're concerned only with digital databases, those that run on computers or other electronic devices. Digital databases have been around since the 1960s. Relational databases, those which store \"related\" data, are the oldest and most common type of database in use today.</p>\n<h3><strong>Data Persistence</strong></h3>\n<p>A database is often necessary because our application or code requires data persistence. This term refers to data that is infrequently accessed and not likely to be modified. In less technical terms, the information will be safely stored and remain untouched unless intentionally modified.</p>\n<p>A familiar example of non-persistent data would be JavaScript objects and arrays, which reset each time the code runs.</p>\n<h3><strong>Relational Databases</strong></h3>\n<p>In relational databases, <strong>the data is stored in tabular format grouped into rows and columns</strong> (similar to spreadsheets). A collection of rows is called a table. Each row represents a single record in the table and is made up of one or more columns.</p>\n<p>These kinds of databases are relational because a <em>relation</em> is a mathematical idea equivalent to a table. So relational databases are databases that store their data in tables.</p>\n<h3><strong>Tables</strong></h3>\n<p><img src=\"https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2e309a41-e107-46f3-81e7-154d732d3dcf/Untitled.png\"></p>\n<p><strong>Below are some basic facts about tables:</strong></p>\n<ul>\n<li>Tables organize data in rows and columns.</li>\n<li>Each row in a table represents one distinct record.</li>\n<li>Each column represents a field or attribute that is common to all the records.</li>\n<li>Fields should have a descriptive name and a data type appropriate for the attribute it represents.</li>\n<li>Tables usually have more rows than columns.</li>\n<li>Tables have primary keys that uniquely identify each row.</li>\n<li>Foreign keys represent the relationships with other tables.</li>\n</ul>\n<h2><strong>Overview</strong></h2>\n<h3>SQL:</h3>\n<p>SQL is a standard language, which means that it almost certainly will be supported, no matter how your database is managed. That said, be aware that the SQL language can vary depending on database management tools. This lesson focuses on a set of core commands that never change. Learning the standard commands is an excellent introduction since the knowledge transfers between database products.</p>\n<p>The syntax for SQL is English-like and requires fewer symbols than programming languages like C, Java, and JavaScript.</p>\n<p>It is declarative and concise, which means there is a lot less to learn to use it effectively.</p>\n<p>When learning SQL, it is helpful to understand that each command is designed for a different purpose. If we classify the commands by purpose, we'll end up with the following sub-categories of SQL:</p>\n<ul>\n<li><strong>Data Definition Language (DDL)</strong>: used to modify database objects. Some examples are: CREATE TABLE, ALTER TABLE, and DROP TABLE.</li>\n<li><strong>Data Manipulation Language (DML)</strong>: used to manipulate the data stored in the database. Some examples are: INSERT, UPDATE, and DELETE.</li>\n<li><strong>Data Query Language (DQL)</strong>: used to ask questions about the data stored in the database. The most commonly used SQL command is SELECT, and it falls in this category.</li>\n<li><strong>Data Control Language (DCL)</strong>: used to manage database security and user's access to data. These commands fall into the realm of Database Administrators. Some examples are GRANT and REVOKE.</li>\n<li><strong>Transaction Control Commands</strong>: used for managing groups of statements that must execute as a unit or not execute at all. Examples are COMMIT and ROLLBACK.</li>\n</ul>\n<p>As a developer, you'll need to get familiar with DDL and become proficient using DML and DQL. This lesson will cover only DML and DQL commands.</p>\n<h2><strong>Overview</strong></h2>\n<p>The four SQL operations covered in this section will allow a user to <strong>query</strong>, <strong>insert</strong>, and <strong>modify</strong> a database table.</p>\n<h3><strong>Query</strong></h3>\n<p>A <strong>query</strong> is a SQL statement used to retrieve data from a database. The command used to write queries is SELECT, and it is one of the most commonly used SQL commands.</p>\n<p>The basic syntax for a SELECT statement is this:</p>\n<p>To see all the fields on a table, we can use a * as the selection.</p>\n<p>The preceding statement would show all the records and all the columns for each record in the employees table.</p>\n<p>To pick the fields we want to see, we use a comma-separated list:</p>\n<p>The return of that statement would hold all records from the listed fields.</p>\n<p>We can extend the SELECT command's capabilities using clauses for things like filtering, sorting, pagination, and more.</p>\n<p>It is possible to query multiple tables in a single query. But, in this section, we only perform queries on a single table. We will cover performing queries on multiple tables in another section.</p>\n<h3><strong>Insert</strong></h3>\n<p>To <strong>insert</strong> new data into a table, we'll use the INSERT command. The basic syntax for an INSERT statement is this:</p>\n<p>Using this formula, we can specify which values will be inserted into which fields like so:</p>\n<h3><strong>Modify</strong></h3>\n<p><strong>Modifying</strong> a database consists of updating and removing records. For these operations, we'll use UPDATE and DELETE commands, respectively.</p>\n<p>The basic syntax for an UPDATE statement is:</p>\n<p>The basic syntax for a DELETE statement is:</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>Filtering results using WHERE clause</strong></h3>\n<p>When querying a database, the default result will be every entry in the given table. However, often, we are looking for a specific record or a set of records that meets certain criteria.</p>\n<p>A WHERE clause can help in both cases.</p>\n<p>Here's an example where we might only want to find customers living in Berlin.</p>\n<p>We can also chain together WHERE clauses using OR and AND to limit our results further.</p>\n<p>The following query includes only records that match both criteria.</p>\n<p>And this query includes records that match either criteria.</p>\n<p>These operators can be combined and grouped with parentheses to add complex selection logic. They behave similarly to what you're used to in programming languages.</p>\n<p>You can read more about SQLite operators from <a href=\"https://www.w3resource.com/sqlite/operators.php\">w3resource (Links to an external site.)</a>.</p>\n<p>To select a single record, we can use a WHERE statement with a uniquely identifying field, like an id:</p>\n<p>Other comparison operators also work in WHERE conditions, such as >, &#x3C;, &#x3C;=, and >=.</p>\n<h3><strong>Ordering results using the ORDER BY clause</strong></h3>\n<p>Query results are shown in the same order the data was inserted. To control how the data is sorted, we can use the ORDER BY clause. Let's see an example.</p>\n<p>We can pass a list of field names to order by and optionally choose asc or desc for the sort direction. The default is asc, so it doesn't need to be specified.</p>\n<p>Some SQL engines also support using field abbreviations when sorting.</p>\n<p>In this case, the results are sorted by the department in ascending order first and then by salary in descending order. The numbers refer to the fields' position in the <em>selection</em> portion of the query, so 1 would be <em>name</em>, 2 would be <em>salary</em>, and so on.</p>\n<p>Note that the WHERE clause should come after the FROM clause. The ORDER BY clause always goes last.</p>\n<h3><strong>Limiting results using the LIMIT clause</strong></h3>\n<p>When we wish to see only a limited number of records, we can use a LIMIT clause.</p>\n<p>The following returns the first ten records in the products table:</p>\n<p>LIMIT clauses are often used in conjunction with ORDER BY. The following shows us the five cheapest products:</p>\n<h3><strong>Inserting data using INSERT</strong></h3>\n<p>An insert statement adds a new record to the database. All non-null fields must be listed out in the same order as their values. Some fields, like ids and timestamps, may be auto-generated and do not need to be included in an INSERT statement.</p>\n<p>The values in an insert statement must not violate any restrictions and constraints that the database has in place, such as expected datatypes. We will learn more about constraints and schema design in a later section.</p>\n<h3><strong>Modifying recording using UPDATE</strong></h3>\n<p>When modifying a record, we identify a single record or a set of records to update using a WHERE clause. Then we can set the new value(s) in place.</p>\n<p>Technically the WHERE clause is not required, but leaving it off would result in every record within the table receiving the update.</p>\n<h3><strong>Removing records using DELETE</strong></h3>\n<p>When removing a record or set of records, we need only identify which record(s) to remove using a WHERE clause:</p>\n<p>Once again, the WHERE clause is not required, but leaving it off would remove every record in the table, so it's essential.</p>\n<h2><strong>Overview</strong></h2>\n<p>Raw SQL is a critical baseline skill. However, Node developers generally use an <strong>Object Relational Mapper (ORM)</strong> or <strong>query builder</strong> to write database commands in a backend codebase. Both <strong>ORMs</strong> and <strong>query builders</strong> are JavaScript libraries that allow us to interface with the database using a JavaScript version of the SQL language.</p>\n<p>For example, instead of a raw SQL SELECT:</p>\n<p>We could use a query builder to write the same logic in JavaScript:</p>\n<p><strong>Query builders</strong> are lightweight and easy to get off the ground, whereas <strong>ORMs</strong> use an object-oriented model and provide more heavy lifting within their rigid structure.</p>\n<p>We will use a <strong>query builder</strong> called <a href=\"https://knexjs.org/\">knex.js (Links to an external site.)</a>.</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>Knex Setup</strong></h3>\n<p>To use Knex in a repository, we'll need to add two libraries:</p>\n<p>knex is our query builder library, and sqlite3 allows us to interface with a sqlite database. We'll learn more about sqlite and other <strong>database management systems</strong> in the following module. For now, know that you need both libraries.</p>\n<p>Next, we use Knex to set up a config file:</p>\n<p>To use the query builder elsewhere in our code, we need to call knex and pass in a config object. We'll be discussing Knex configuration more in a future module. Still, we only need the client, connection, and useNullAsDefault keys as shown above. The filename should point towards the pre-existing database file, which can be recognized by the .db3 extension.</p>\n<p><strong>GOTCHA</strong>: The file path to the database should be with respect to the <strong>root</strong> of the repo, not the configuration file itself.</p>\n<p>Once Knex is configured, we can import the above config file anywhere in our codebase to access the database.</p>\n<p>The db object provides methods that allow us to begin building queries.</p>\n<h3><strong>SELECT using Knex</strong></h3>\n<p>In Knex, the equivalent of SELECT * FROM users is:</p>\n<p>There's a simpler way to write the same command:</p>\n<p>Using this, we could write a GET endpoint.</p>\n<p><strong>NOTE</strong>: All Knex queries return promises.</p>\n<p>Knex also allows for a where clause. In Knex, we could write SELECT * FROM users WHERE id=1 as</p>\n<p>This method will resolve to an array containing a single entry like so: [{ id: 1, name: 'bill' }].</p>\n<p>Using this, we might add a GET endpoint where a specific user:</p>\n<h3><strong>INSERT using Knex</strong></h3>\n<p>In Knex, the equivalent of INSERT INTO users (name, age) VALUES ('Eva', 32) is:</p>\n<p>The insert method in Knex will resolve to an array containing the newly created id for that user like so: [3].</p>\n<h3><strong>UPDATE using Knex</strong></h3>\n<p>In knex, the equivalent of UPDATE users SET name='Ava', age=33 WHERE id=3; is:</p>\n<p>Note that the where method comes before update, unlike in SQL.</p>\n<p>Update will resolve to a count of rows updated.</p>\n<h3><strong>DELETE using Knex</strong></h3>\n<p>In Knex, the equivalent of DELETE FROM users WHERE age=33; is:</p>\n<p>Once again, the where must come before the del. This method will resolve to a count of records removed.</p>\n<h1>Day #2:</h1>\n<h2><strong>Overview</strong></h2>\n<p>SQLlite Studio is an application that allows us to create, open, view, and modify SQLite databases. To fully understand what SQLite Studio is and how it works, we must also understand the concept of the Database Management Systems (DBMS).</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>What is a DBMS?</strong></h3>\n<p>To manage digital databases we use specialized software called <strong>D</strong>ata<strong>B</strong>ase <strong>M</strong>anagement <strong>S</strong>ystems (DBMS). These systems typically run on servers and are managed by <strong>D</strong>ata<strong>B</strong>ase <strong>A</strong>dministrators (DBAs).</p>\n<p>In less technical terms, we need a type of software that will allow us to create, access, and generally manage our databases. In the world of relational databases, we specifically use Relational Database Mangement Systems (RDBMs). Some examples are Postgres, SQLite, MySQL, and Oracle.</p>\n<p>Choosing a DBMS determines everything from how you set up your database, to where and how the data is stored, to what SQL commands you can use. Most systems share the core of the SQL language that you've already learned.</p>\n<p>In other words, you can expect SELECT, UPDATE, INSERT, WHERE , and the like to be the same across all DBMSs, but the subtleties of the language may vary.</p>\n<h3><strong>What is SQLite?</strong></h3>\n<p><strong>SQLite</strong> is the DBMS, as the name suggests, it is a more lightweight system and thus easier to get set up than some others.</p>\n<p>SQLite allows us to store databases as single files. SQLite projects have a .db3 extension. That is the database.</p>\n<p>SQLite is <em>not a database</em> (like relational, graph, or document are databases) but rather <em>a database management system</em>.</p>\n<h3><strong>Opening an existing database in SQLite Studio</strong></h3>\n<p>One useful visual interface we might use with a SQLite database is called <strong>SQLite Studio</strong>. <a href=\"https://sqlitestudio.pl/\">Install SQLITE Studio here. (Links to an external site.)</a></p>\n<p>Once installed, we can use SQLite Studio to open any .db3 file from a previous lesson. We may view the tables, view the data, and even make changes to the database.</p>\n<p>For a more detailed look at SQLite Studio, follow along in the video above.</p>\n<h2><strong>Overview</strong></h2>\n<p>A <strong>database schema</strong> is the shape of our database. It defines what tables we'll have, which columns should exist within the tables and any restrictions on each column.</p>\n<p>A well-designed database schema keeps the data well organized and can help ensure high-quality data.</p>\n<p>Note that while schema design is usually left to Database Administrators (DBAs), understanding schema helps when designing APIs and database logic. And in a smaller team, this step may fall on the developer.</p>\n<h2><strong>Follow Along</strong></h2>\n<p>For a look at schema design in SQLite Studio, follow along in the video above.</p>\n<p>When designing a single table, we need to ask three things:</p>\n<ul>\n<li>What fields (or columns) are present?</li>\n<li>What type of data do we expect for each field?</li>\n<li>Are there other restrictions needed for each column?</li>\n</ul>\n<p>Looking at the following schema diagram for an accounts table, we can the answer to each other those questions:</p>\n<p><a href=\"https://www.notion.so/9790405dda624818822293a383eec2d2\">Untitled</a></p>\n<h3><strong>Table Fields</strong></h3>\n<p>Choosing which fields to include in a table is relatively straight forward. What information needs to be tracked regarding this resource? In the real world, this is determined by the intended use of the product or app.</p>\n<p>However, this is one requirement every table should satisfy: a <strong>primary key</strong>. A primary key is a way to identify each entry in the database uniquely. It is most often represented as a auto-incrementing integer called id or [tablename]Id.</p>\n<h3><strong>Datatypes</strong></h3>\n<p>Each field must also have a specified datatype. The datatype available depends on our DBMS. Some supported datatype in SQLite include:</p>\n<ul>\n<li><strong>Null:</strong> Missing or unknown information.</li>\n<li><strong>Integer:</strong> Whole numbers.</li>\n<li><strong>Real:</strong> Any number, including decimals.</li>\n<li><strong>Text:</strong> Character data.</li>\n<li><strong>Blob:</strong> a large binary object that can be used to store miscellaneous data.</li>\n</ul>\n<p>Any data inserted into the table must match the datatypes determined in schema design.</p>\n<h3><strong>Constraints</strong></h3>\n<p>Beyond datatypes, we may add additional <strong>constraints</strong> on each field. Some examples include:</p>\n<ul>\n<li><strong>Not Null:</strong> The field cannot be left empty</li>\n<li><strong>Unique:</strong> No two records can have the same value in this field</li>\n<li><strong>Primary key:</strong> - Indicates this field is the primary key. Both the not null and unique constraints will be enforced.</li>\n<li><strong>Default:</strong> - Sets a default value if none is provided.</li>\n</ul>\n<p>As with data types, any data that does not satisfy the schema constraints will be rejected from the database.</p>\n<h3><strong>Multi-Table Design</strong></h3>\n<p>Another critical component of schema design is to understand how different tables relate to each other. This will be covered in later lesson.</p>\n<h2><strong>Overview</strong></h2>\n<p>Knex provides a <strong>schema builder</strong>, which allows us to write code to design our database schema. However, beyond thinking about columns and constraints, we must also consider updates.</p>\n<p>When a schema needs to be updated, a developer must feel confident that the changes go into effect everywhere. This means schema updates on the developer's local machine, on any testing or staging versions, on the production database, and then on any other developer's local machines. This is where <strong>migrations</strong> come into play.</p>\n<p>A database migration describes changes made to the structure of a database. Migrations include things like adding new objects, adding new tables, and modifying existing objects or tables.</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>Knex Cli</strong></h3>\n<p>To use migrations (and to make Knex setup easier), we need to use <strong>knex cli</strong>. Install knex globally with npm install -g knex.</p>\n<p>This allows you to use Knex commands within any repo that has knex as a local dependency. If you have any issues with this global install, you can use the npx knex command instead.</p>\n<h3><strong>Initializing Knex</strong></h3>\n<p>To start, add the knex and sqlite3 libraries to your repository.</p>\n<p>npm install knex sqlite3</p>\n<p>We've seen how to use manually create a config object to get started with Knex, but the best practice is to use the following command:</p>\n<p>Or, if Knex isn't globally installed:</p>\n<p>This command will generate a file in your root folder called knexfile.js. It will be auto populated with three config objects, based on different environments. We can delete all except for the development object.</p>\n<p>We'll need to update the location (or desired location) of the database as well as add the useNullAsDefault option. The latter option prevents crashes when working with sqlite3.</p>\n<p>Now, wherever we configure our database, we may use the following syntax instead of hardcoding in a config object.</p>\n<h3><strong>Knex Migrations</strong></h3>\n<p>Once our knexfile is set up, we can begin creating <strong>migrations</strong>. Though it's not required, we are going to add an addition option to the config object to specify a directory for the migration files.</p>\n<p>We can generate a new migration with the following command:</p>\n<p>knex migrate:make [migration-name]</p>\n<p>If we needed to create an accounts table, we might run:</p>\n<p>knex migrate:make create-accounts</p>\n<p>Note that inside data/migrations/ a new file has appeared. Migrations have a timestamp in their filenames automatically. Wither you like this or not, <strong>do not edit migration names.</strong></p>\n<p>The migration file should have both an up and a down function. Within the up function, we write the ended database changes. Within the down function, we write the code to undo the up functions. This allows us to undo any changes made to the schema if necessary.</p>\n<p>References for these methods are found in the <strong>schema builder</strong> section of the <a href=\"https://knexjs.org/\">Knex docs (Links to an external site.)</a>.</p>\n<p>At this point, the table is <strong>not</strong> yet created. To run this (and any other) migrations, use the command:</p>\n<p>knex migrate:latest</p>\n<p>Note if the database does not exist, this command will auto-generate one. We can use SQLite Studio to confirm that the accounts table has been created.</p>\n<h3><strong>Changes and Rollbacks</strong></h3>\n<p>If later down the road, we realize you need to update your schema, you shouldn't edit the migration file. Instead, you will want to create a new migration with the command:</p>\n<p>knex migrate:make accounts-schema-update</p>\n<p>Once we've written our updates into this file we save and close with:</p>\n<p>knex migrate:latest</p>\n<p>If we migrate our database and then quickly realize something isn't right, we can edit the migration file. However, first, we need to <strong>rolllback</strong> (or undo) our last migration with:</p>\n<p>knex migrate:rollback</p>\n<p>Finally, we are free to rerun that file with knex migrate latest.</p>\n<p><strong>NOTE</strong>: A rollback should not be used to edit an old migration file once that file has accepted into a main branch. However, an entire team may use a rollback to return to a previous version of a database.</p>\n<h2><strong>Overview</strong></h2>\n<p>Knex provides a <strong>schema builder</strong>, which allows us to write code to design our database schema. However, beyond thinking about columns and constraints, we must also consider updates.</p>\n<p>When a schema needs to be updated, a developer must feel confident that the changes go into effect everywhere. This means schema updates on the developer's local machine, on any testing or staging versions, on the production database, and then on any other developer's local machines. This is where <strong>migrations</strong> come into play.</p>\n<p>A database migration describes changes made to the structure of a database. Migrations include things like adding new objects, adding new tables, and modifying existing objects or tables.</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>Knex Cli</strong></h3>\n<p>To use migrations (and to make Knex setup easier), we need to use <strong>knex cli</strong>. Install knex globally with npm install -g knex.</p>\n<p>This allows you to use Knex commands within any repo that has knex as a local dependency. If you have any issues with this global install, you can use the npx knex command instead.</p>\n<h3><strong>Initializing Knex</strong></h3>\n<p>To start, add the knex and sqlite3 libraries to your repository.</p>\n<p>npm install knex sqlite3</p>\n<p>We've seen how to use manually create a config object to get started with Knex, but the best practice is to use the following command:</p>\n<p>Or, if Knex isn't globally installed:</p>\n<p>This command will generate a file in your root folder called knexfile.js. It will be auto populated with three config objects, based on different environments. We can delete all except for the development object.</p>\n<p>We'll need to update the location (or desired location) of the database as well as add the useNullAsDefault option. The latter option prevents crashes when working with sqlite3.</p>\n<p>Now, wherever we configure our database, we may use the following syntax instead of hardcoding in a config object.</p>\n<h3><strong>Knex Migrations</strong></h3>\n<p>Once our knexfile is set up, we can begin creating <strong>migrations</strong>. Though it's not required, we are going to add an addition option to the config object to specify a directory for the migration files.</p>\n<p>We can generate a new migration with the following command:</p>\n<p>knex migrate:make [migration-name]</p>\n<p>If we needed to create an accounts table, we might run:</p>\n<p>knex migrate:make create-accounts</p>\n<p>Note that inside data/migrations/ a new file has appeared. Migrations have a timestamp in their filenames automatically. Wither you like this or not, <strong>do not edit migration names.</strong></p>\n<p>The migration file should have both an up and a down function. Within the up function, we write the ended database changes. Within the down function, we write the code to undo the up functions. This allows us to undo any changes made to the schema if necessary.</p>\n<p>References for these methods are found in the <strong>schema builder</strong> section of the <a href=\"https://knexjs.org/\">Knex docs (Links to an external site.)</a>.</p>\n<p>At this point, the table is <strong>not</strong> yet created. To run this (and any other) migrations, use the command:</p>\n<p>knex migrate:latest</p>\n<p>Note if the database does not exist, this command will auto-generate one. We can use SQLite Studio to confirm that the accounts table has been created.</p>\n<h3><strong>Changes and Rollbacks</strong></h3>\n<p>If later down the road, we realize you need to update your schema, you shouldn't edit the migration file. Instead, you will want to create a new migration with the command:</p>\n<p>knex migrate:make accounts-schema-update</p>\n<p>Once we've written our updates into this file we save and close with:</p>\n<p>knex migrate:latest</p>\n<p>If we migrate our database and then quickly realize something isn't right, we can edit the migration file. However, first, we need to <strong>rolllback</strong> (or undo) our last migration with:</p>\n<p>knex migrate:rollback</p>\n<p>Finally, we are free to rerun that file with knex migrate latest.</p>\n<p><strong>NOTE</strong>: A rollback should not be used to edit an old migration file once that file has accepted into a main branch. However, an entire team may use a rollback to return to a previous version of a database.</p>\n<h2><strong>Overview</strong></h2>\n<p>Often we want to pre-populate our database with sample data for testing. <strong>Seeds</strong> allow us to add and reset sample data easily.</p>\n<h2><strong>Follow Along</strong></h2>\n<p>The Knex command-line tool offers a way to <strong>seed</strong> our database; in other words, pre-populate our tables.</p>\n<p>Similarly to migrations, we want to customize where our seed files are generated using our knexfile</p>\n<p>To create a seed run: knex seed:make 001-seedName</p>\n<p>Numbering is a good idea because Knex doesn't attach a timestamp to the name like migrate does. Adding numbers to the file name, we can control the order in which they run.</p>\n<p>We want to create seeds for our accounts table:</p>\n<p>knex seed:make 001-accounts</p>\n<p>A file will appear in the designated seed folder.</p>\n<p>Run the seed files by typing:</p>\n<p>knex seed:run</p>\n<p>You can now use SQLite Studio to confirm that the accounts table has two entries.</p>\n<h1>Day #3:</h1>\n<h2><strong>Overview</strong></h2>\n<p><strong>Foreign keys</strong> are a type of table field used for creating links between tables. Like <strong>primary keys</strong>, they are most often integers that identify (rather than store) data. However, whereas a primary key is used to id rows in a table, foreign keys are used to connect a record in one table to a record in a second table.</p>\n<h2><strong>Follow Along</strong></h2>\n<p>Consider the following farms and ranchers tables.</p>\n<p><a href=\"https://www.notion.so/5b20c5e233dd4a70a33d6ab2c2e1c8bb\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/0b0a909c24a9474fb9df80938546f12a\">Untitled</a></p>\n<p>The farm<em>id in the ranchers table is an example of a foreign key. Each entry in the farm</em>id (foreign key) column corresponds to an id (primary key) in the farms table. This allows us to track which farm each rancher belongs to while keeping the tables normalized.</p>\n<p>If we could only see the ranchers table, we would know that John, Jane, and Jen all work together and that Jim and Jay also work together. However, to know where any of them work, we would need to look at the farms table.</p>\n<p>Now that we understand the basics of querying data from a single table, let's move on to selecting data from multiple tables using JOIN operations.</p>\n<h2><strong>Overview</strong></h2>\n<p>We can use a JOIN to combine query data from multiple tables using a single SELECT statement.</p>\n<p>There are different types of joins; some are listed below:</p>\n<ul>\n<li>inner joins.</li>\n<li>outer joins.</li>\n<li>left joins.</li>\n<li>right joins.</li>\n<li>cross joins.</li>\n<li>non-equality joins.</li>\n<li>self joins.</li>\n</ul>\n<p>Using joins requires that the two tables of interest contain at least one field with shared information. For example, if a <em>departments</em> table has an <em>id</em> field, and an employee table has a <em>department_id</em> field, and the values that exist in the <em>id</em> column of the <em>departments</em> table live in the <em>department_id</em> field of the employee table, we can use those fields to join both tables like so:</p>\n<p>This query will return the data from both tables for every instance where the ON condition is true. If there are employees with no value for department<em>id or where the value stored in the field does not correspond to an existing id in the</em> departments <em>table, then that record will NOT be returned. In a similar fashion, any records from the</em> departments <em>table that don't have an employee associated with them will also be omitted from the results. Basically, if the</em> id* does not show as the value of department_id for an employee, it won't be able to join.</p>\n<p>We can shorten the condition by giving the table names an alias. This is a common practice. Below is the same example using aliases, picking which fields to return and sorting the results:</p>\n<p>Notice that we can take advantage of white space and indentation to make queries more readable.</p>\n<p>There are several ways of writing joins, but the one shown here should work on all database management systems and avoid some pitfalls, so we recommend it.</p>\n<p>The syntax for performing a similar join using Knex is as follows:</p>\n<h2><strong>Follow Along</strong></h2>\n<p>A good explanation of how the different types of joins can be seen <a href=\"https://www.w3resource.com/sql/joins/sql-joins.php\">in this article from w3resource.com (Links to an external site.)</a>.</p>\n<h1>What is SQL Joins?</h1>\n<p>An SQL JOIN clause combines rows from two or more tables. It creates a set of rows in a temporary table.</p>\n<h1>How to Join two tables in SQL?</h1>\n<p>A JOIN works on two or more tables if they have at least one common field and have a relationship between them.</p>\n<p>JOIN keeps the base tables (structure and data) unchanged.</p>\n<h1>Join vs. Subquery</h1>\n<ul>\n<li>JOINs are faster than a subquery and it is very rare that the opposite.</li>\n<li>In JOINs the RDBMS calculates an execution plan, that can predict, what data should be loaded and how much it will take to processed and as a result this process save some times, unlike the subquery there is no pre-process calculation and run all the queries and load all their data to do the processing.</li>\n<li>A JOIN is checked conditions first and then put it into table and displays; where as a subquery take separate temp table internally and checking condition.</li>\n<li>When joins are using, there should be connection between two or more than two tables and each table has a relation with other while subquery means query inside another query, has no need to relation, it works on columns and conditions.</li>\n</ul>\n<h1>SQL JOINS: EQUI JOIN and NON EQUI JOIN</h1>\n<p>The are two types of SQL JOINS - EQUI JOIN and NON EQUI JOIN</p>\n<ol>\n<li>SQL EQUI JOIN :</li>\n</ol>\n<p>The SQL EQUI JOIN is a simple SQL join uses the equal sign(=) as the comparison operator for the condition. It has two types - SQL Outer join and SQL Inner join.</p>\n<ol>\n<li>SQL NON EQUI JOIN :</li>\n</ol>\n<p>The <strong>SQL NON EQUI JOIN</strong> is a join uses comparison operator other than the equal sign like >, &#x3C;, >=, &#x3C;= with the condition.</p>\n<p><strong>SQL EQUI JOIN : INNER JOIN and OUTER JOIN</strong></p>\n<p>The SQL EQUI JOIN can be classified into two types - INNER JOIN and OUTER JOIN</p>\n<ol>\n<li>SQL INNER JOIN</li>\n</ol>\n<p>This type of EQUI JOIN returns all rows from tables where the key record of one table is equal to the key records of another table.</p>\n<ol>\n<li>SQL OUTER JOIN</li>\n</ol>\n<p>This type of EQUI JOIN returns all rows from one table and only those rows from the secondary table where the joined condition is satisfying i.e. the columns are equal in both tables.</p>\n<p>In order to perform a JOIN query, the required information we need are:</p>\n<p><strong>a)</strong> The name of the tables<strong>b)</strong> Name of the columns of two or more tables, based on which a condition will perform.</p>\n<p><strong>Syntax:</strong></p>\n<p><strong>Parameters:</strong></p>\n<p><a href=\"https://www.notion.so/5522c3e6d5d0443eb870f7a34f60c7ff\">Untitled</a></p>\n<p><strong>Pictorial Presentation of SQL Joins:</strong></p>\n<p><img src=\"https://www.w3resource.com/w3r_images/sql-joins-all.gif\"></p>\n<p><strong>Example:</strong></p>\n<p><strong>Sample table: company</strong></p>\n<p><strong>Sample table: foods</strong></p>\n<p>To join two tables 'company' and 'foods', the following SQL statement can be used :</p>\n<p><strong>SQL Code:</strong></p>\n<p>Copy</p>\n<p>Output:</p>\n<h2><strong>Overview</strong></h2>\n<p>While we can write database code directly into our endpoints, best practices dictate that all database logic exists in separate, modular methods. These files containing database access helpers are often called <strong>models</strong></p>\n<h2><strong>Follow Along</strong></h2>\n<p>To handle CRUD operations for a single resource, we would want to create a <strong>model</strong> (or database access file) containing the following methods:</p>\n<p>Each of these functions would use Knex logic to perform the necessary database operation.</p>\n<p>For each method, we can choose what value to return. For example, we may prefer findById() to return a single user object rather than an array.</p>\n<p>We can also use existing methods like findById() to help add() return the new user (instead of just the id).</p>\n<p>Once all methods are written as desired, we can export them like so:</p>\n<p>…and use the helpers in our endpoints</p>\n<p>There should no be knex code in the endpoints themselves.</p>\n<h1>Day #4:</h1>\n<p><img src=\"https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5ecaf43d-ee27-4da1-aa3c-aa1d9d96cc40/Untitled.png\"></p>\n<h2><strong>Overview</strong></h2>\n<p>Normalization is the process of designing or refactoring database tables for maximum consistency and minimum redundancy.</p>\n<p>With objects, we're used to <em>denormalized</em> data, stored with ease of use and speed in mind. Non-normalized tables are considered ineffective in relational databases.</p>\n<h2><strong>Follow Along</strong></h2>\n<p><strong>Data normalization</strong> is a deep topic in database design. To begin thinking about it, we'll explore a few basic guidelines and some data examples that violate these rules.</p>\n<h3><strong>Normalization Guidelines</strong></h3>\n<ul>\n<li>Each record has a primary key.</li>\n<li>No fields are repeated.</li>\n<li>All fields relate directly to the key data.</li>\n<li>Each field entry contains a single data point.</li>\n<li>There are no redundant entries.</li>\n</ul>\n<h3><strong>Denormalized Data</strong></h3>\n<p><a href=\"https://www.notion.so/19a01f68a659470fb85bbe6906fb4bad\">Untitled</a></p>\n<p>This table has two issues. There is no proper id field (as multiple farms may have the same name), and multiple fields are representing the same type of data: animals.</p>\n<p><a href=\"https://www.notion.so/075ad6dd99ac48698625d7b56ca67bef\">Untitled</a></p>\n<p>While we have now eliminated the first two issues, we now have multiple entries in one field, separated by commas. This isn't good either, as its another example of denormalization. There is no \"array\" data type in a relational database, so each field must contain only one data point.</p>\n<p><a href=\"https://www.notion.so/375a15b0cb3f444a8698cd6cb3a08fe0\">Untitled</a></p>\n<p>Now we've solved the multiple fields issue, but we created repeating data (the farm field), which is also an example of denormalization. As well, we can see that if we were tracking additional ranch information (such as annual revenue), that field is only vaguely related to the animal information.</p>\n<p><strong>When these issues begin arising in your schema design, it means that you should separate information into two or more tables.</strong></p>\n<h3><strong>Anomalies</strong></h3>\n<p>Obeying the above guidelines prevent <strong>anomalies</strong> in your database when inserting, updating, or deleting. For example, imagine if the revenue of Beech Ranch changed. With our denormalized schema, it may get updated in some records but not others:</p>\n<p><a href=\"https://www.notion.so/e05f5b2e8ff141798adc6f188f56f31e\">Untitled</a></p>\n<p>Similarly, if Beech Ranch shut down, there would be three (if not more) records that needed to be deleted to remove a single farm.</p>\n<p>Thus a denormalized table opens the door for contradictory, confusing, and unusable data.</p>\n<h2><strong>Challenge</strong></h2>\n<p>What issues does the following table have?</p>\n<p><a href=\"https://www.notion.so/2793e8f6b70a47f48f9208779366e69e\">Untitled</a></p>\n<h2><strong>Overview</strong></h2>\n<p>There are three types of relationships:</p>\n<ul>\n<li>One to one.</li>\n<li>One to many.</li>\n<li>Many to many.</li>\n</ul>\n<p>Determining how data is related can provide a set of guidelines for table representation and guides the use of foreign keys to connect said tables.</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>One to One Relationships</strong></h3>\n<p>Imagine we are storing the financial projections for a series of farms.</p>\n<p>We may wish to attach fields like farm name, address, description, projected revenue, and projected expenses. We could divide these fields into two categories: information related to the farm directly (name, address, description) and information related to the financial projections (revenue, expenses).</p>\n<p>We would say that farms and projections have a <strong>one-to-one</strong> relationship. This is to say that every farm has exactly one projection, and every project corresponds to exactly one farm.</p>\n<p>This data can be represented in two tables: farms and projections</p>\n<p><a href=\"https://www.notion.so/944e594f3464473ea06383bfdea13265\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/de32fcf6760e45f284707274433fee92\">Untitled</a></p>\n<p>The farm_id is the foreign key that links farms and projections together.</p>\n<p>Notes about one-to-one relationships:</p>\n<ul>\n<li>The foreign key should always have a unique constraint to prevent duplicate entries. In the example above, we wouldn't want to allow multiple projections records for one farm.</li>\n<li>The foreign key can be in either table. For example, we may have had a projection_id in the farms table instead. A good rule of thumb is to put the foreign key in whichever table is more auxiliary to the other.</li>\n<li>You can represent one-to-one data in a single table <em>without</em> creating anomalies. However, it is sometimes prudent to use two tables as shown above to keep separate concerns in separate tables.</li>\n</ul>\n<h3><strong>One to Many Relationships</strong></h3>\n<p>Now imagine, we are storing the full-time ranchers employed at each farm. In this case, each rancher would only work at one farm however, each farm may have multiple ranchers.</p>\n<p>This is called a <strong>one-to-many</strong> relationship.</p>\n<p>This is the most common type of relationship between entities. Some other examples:</p>\n<ul>\n<li>One customer can have many orders.</li>\n<li>One user can have many posts.</li>\n<li>One post can have many comments.</li>\n</ul>\n<p>Manage this type of relationship by adding a foreign key on the \"many\" table of the relationship that points to the primary key on the \"one\" table. Consider the farms and ranchers tables.</p>\n<p><a href=\"https://www.notion.so/7dfd2e69c9804a01845f2e9b716a5ac2\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/c95f3d418db94ab4b4532eeba0e4f918\">Untitled</a></p>\n<p>In a many-to-many relationship, the foreign key (in this case farm_id) should <em>not</em> be unique.</p>\n<h3><strong>Many to Many Relationships</strong></h3>\n<p>If we want to track animals on a farm as well, we must explore the <strong>many-to-many</strong> relationship. A farm has multiple animals, and multiple of each type of animal is present at multiple different farms.</p>\n<p>Some other examples:</p>\n<ul>\n<li>an order can have many products and the same product will appear in many orders.</li>\n<li>a book can have more than one author, and an author can write more than one book.</li>\n</ul>\n<p>To model this relationship, we need to introduce an <strong>intermediary table</strong> that holds foreign keys that reference the primary key on the related tables. We now have a farms, animals, and farm_animals table.</p>\n<p><a href=\"https://www.notion.so/3269812d7c2a4578b1a9f6bc27e485b1\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/c2642c7f632f489cb1b9639c80b8400d\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/d0b0042c5e104edd9ed55e122af89084\">Untitled</a></p>\n<p>While each foreign key on the intermediary table is not unique, the combinations of keys should be unique.</p>\n<h2><strong>Overview</strong></h2>\n<p>The Knex query builder library also allows us to create multi-table schemas include foreign keys. However, there are a few extra things to keep in mind when designing a multi-table schema, such as using the correct order when creating tables, dropping tables, seeding data, and removing data.</p>\n<p>We have to consider the way that delete and updates through our API will impact related data.</p>\n<h2><strong>Follow Along</strong></h2>\n<h3><strong>Foreign Key Setup</strong></h3>\n<p>In Knex, foreign key restrictions don't automatically work. Whenever using foreign keys in your schema, add the following code to your knexfile. This will prevent users from entering bad data into a foreign key column.</p>\n<h3><strong>Migrations</strong></h3>\n<p>Let's look at how we might track our farms and ranchers using Knex. In our migration file's up function, we would want to create two tables:</p>\n<p>Note that the foreign key can only be created <em>after</em> the reference table.</p>\n<p>In the down function, the opposite is true. We always want to drop a table with a foreign key <em>before</em> dropping the table it references.</p>\n<p>In the case of a many-to-many relationship, the syntax for creating an intermediary table is identical, except for one additional piece. We need a way to make sure our combination of foreign keys is unique.</p>\n<h3><strong>Seeds</strong></h3>\n<p>Order is also a concern when seeding. We want to create seeds in the <strong>same</strong> order we created our tables. In other words, don't create a seed with a foreign key, until that reference record exists.</p>\n<p>In our example, make sure to write the 01-farms seed file and then the 02-ranchers seed file.</p>\n<p>However, we run into a problem with truncating our seeds, because we want to truncate 02-ranchers <em>before</em> 01-farms. A library called knex-cleaner provides an easy solution for us.</p>\n<p>Run knex seed:make 00-cleanup and npm install knex-cleaner. Inside the cleanup seed, use the following code.</p>\n<p>This removes all tables (excluding the two tables that track migrations) in the correct order before any seed files run.</p>\n<h3><strong>Cascading</strong></h3>\n<p>If a user attempt to delete a record that is referenced by another record (such as attempting to delete Morton Ranch when entries in our ranchers table reference that record), by default, the database will block the action. The same thing can happen when updating a record when a foreign key reference.</p>\n<p>If we want that to override this default, we can delete or update with <strong>cascade</strong>. With cascade, deleting a record also deletes all referencing records, we can set that up in our schema.</p>"},{"url":"/blog/git-gateway/","relativePath":"blog/git-gateway.md","relativeDir":"blog","base":"git-gateway.md","name":"git-gateway","frontmatter":{"title":"Git Bash","subtitle":"understanding git bsh","date":"2021-09-02","thumb_image_alt":"lorem-ipsum","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"images/chrome_oKIMcC3StQ.png"},"html":"<h1>Understanding Git Bash</h1>\n<h1>Git Bash</h1>\n<p>At its core, Git is a set of command line utility programs that are designed to execute on a Unix style command-line environment. Modern operating systems like Linux and macOS both include built-in Unix command line terminals. This makes Linux and macOS complementary operating systems when working with Git. Microsoft Windows instead uses Windows command prompt, a non-Unix terminal environment.</p>\n<p>In Windows environments, Git is often packaged as part of higher level GUI applications. GUIs for Git may attempt to abstract and hide the underlying version control system primitives. This can be a great aid for Git beginners to rapidly contribute to a project. Once a project's collaboration requirements grow with other team members, it is critical to be aware of how the actual raw Git methods work. This is when it can be beneficial to drop a GUI version for the command line tools. Git Bash is offered to provide a terminal Git experience.</p>\n<h2>What is Git Bash?</h2>\n<p>Git Bash is an application for Microsoft Windows environments which provides an emulation layer for a Git command line experience. Bash is an acronym for Bourne Again Shell. A shell is a terminal application used to interface with an operating system through written commands. Bash is a popular default shell on Linux and macOS. Git Bash is a package that installs Bash, some common bash utilities, and Git on a Windows operating system.</p>\n<h2>How to install Git Bash</h2>\n<p>Git Bash comes included as part of the <a href=\"https://gitforwindows.org/\">Git For Windows</a> package. Download and install Git For Windows like other Windows applications. Once downloaded find the included <code>.exe</code> file and open to execute Git Bash.</p>\n<h2>How to use Git Bash</h2>\n<p>Git Bash has the same operations as a standard Bash experience. It will be helpful to review basic Bash usage. Advanced usage of Bash is outside the scope of this Git focused document.</p>\n<h2>How to navigate folders</h2>\n<p>The Bash command <code>pwd</code> is used to print the 'present working directory'. <code>pwd</code> is equivalent to executing cd on a DOS(Windows console host) terminal. This is the folder or path that the current Bash session resides in.</p>\n<p>The Bash command <code>ls</code> is used to 'list' contents of the current working directory. <code>ls</code> is equivalent to <code>DIR</code> on a Windows console host terminal.</p>\n<p>Both Bash and Windows console host have a cd command. cd is an acronym for 'Change Directory'. cd is invoked with an appended directory name. Executing cd will change the terminal sessions current working directory to the passed directory argument.</p>\n<h2>Git Bash Commands</h2>\n<p>Git Bash is packaged with additional commands that can be found in the <code>/usr/bin</code> directory of the Git Bash emulation. Git Bash can actually provide a fairly robust shell experience on Windows. Git Bash comes packaged with the following shell commands which are outside the scope of this document: <code>[Ssh](https://man.openbsd.org/ssh.1)</code>, <code>[scp](https://linux.die.net/man/1/scp)</code>, <code>[cat](http://man7.org/linux/man-pages/man1/cat.1.html)</code>, <code>[find](https://linux.die.net/man/1/find)</code>.</p>\n<p>In addition the previously discussed set of Bash commands, Git Bash includes the full set of Git core commands discussed through out this site. Learn more at the corresponding documentation pages for</p>"},{"url":"/blog/data-structures/","relativePath":"blog/data-structures.md","relativeDir":"blog","base":"data-structures.md","name":"data-structures","frontmatter":{"title":"Leetcode (Data Structures)","subtitle":"practice","date":"2021-09-14","thumb_image_alt":"Big O Cheat Sheet","excerpt":"A guide to computational complexity","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"post","image":"images/ds.PNG","thumb_image":"images/bigo-8f9701e1.jpg"},"html":"<h1>Leetcode</h1>\n<h2>Data Structures &#x26; Algorithms</h2>\n<p><a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\">DS Algo Codebase</a></p>\n<p><a href=\"#115-distinct-subsequenceshttpsleetcodecomproblemsdistinct-subsequencesdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/distinct-subsequences/description/\">115. Distinct Subsequences</a></h2>\n<h3>Problem:</h3>\n<p>Given a string <strong>S</strong> and a string <strong>T</strong>, count the number of distinct subsequences of <strong>S</strong> which equals <strong>T</strong>.</p>\n<p>A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, <code>\"ACE\"</code> is a subsequence of <code>\"ABCDE\"</code> while <code>\"AEC\"</code> is not).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: S = \"rabbbit\", T = \"rabbit\"\nOutput: 3\nExplanation:\n\nAs shown below, there are 3 ways you can generate \"rabbit\" from S.\n(The caret symbol ^ means the chosen letters)\n\nrabbbit\n^^^^ ^^\nrabbbit\n^^ ^^^^\nrabbbit\n^^^ ^^^\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: S = \"babgbag\", T = \"bag\"\nOutput: 5\nExplanation:\n\nAs shown below, there are 5 ways you can generate \"bag\" from S.\n(The caret symbol ^ means the chosen letters)\n\nbabgbag\n^^ ^\nbabgbag\n^^    ^\nbabgbag\n^    ^^\nbabgbag\n  ^  ^^\nbabgbag\n    ^^^\n</code></pre>\n<h3>Solution:</h3>\n<p>Define <code>f(i, j)</code> to be the number of ways that generate <code>T[0...j)</code> from <code>S[0...i)</code>.</p>\n<p>For <code>f(i, j)</code> you can always skip <code>S[i-1]</code>, but can only take it when <code>S[i-1] === T[j-1]</code>.</p>\n<pre><code class=\"language-javascript\">f(0, j) = 0, j > 0 // nothing to delete\nf(i, 0) = 1 // delete all\nf(i, j) = f(i-1, j) + (S[i-1] === T[j-1] ? f(i-1, j-1) : 0)\n</code></pre>\n<p>Dynamic array can be used.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @param {string} t\n * @return {number}\n */\nlet numDistinct = function (s, t) {\n    const lens = s.length;\n    const lent = t.length;\n    const dp = new Array(lent + 1).fill(0);\n    dp[0] = 1;\n    for (let i = 1; i &#x3C;= lens; i++) {\n        for (let j = lent; j >= 1; j--) {\n            if (s[i - 1] === t[j - 1]) {\n                dp[j] += dp[j - 1];\n            }\n        }\n    }\n    return dp[lent];\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Populating Next Right Pointers in Each Node II\": <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii\">https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii</a>\n\"Binary Tree Right Side View\": <a href=\"https://leetcode.com/problems/binary-tree-right-side-view\">https://leetcode.com/problems/binary-tree-right-side-view</a></p>\n<hr>\n<p><a href=\"#116-populating-next-right-pointers-in-each-nodehttpsleetcodecomproblemspopulating-next-right-pointers-in-each-nodedescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/\">116. Populating Next Right Pointers in Each Node</a></h2>\n<h3>Problem:</h3>\n<p>Given a binary tree</p>\n<pre><code>struct TreeLinkNode {\n  TreeLinkNode *left;\n  TreeLinkNode *right;\n  TreeLinkNode *next;\n}\n</code></pre>\n<p>Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to <code>NULL</code>.</p>\n<p>Initially, all next pointers are set to <code>NULL</code>.</p>\n<p><strong>Note:</strong></p>\n<ul>\n<li>You may only use constant extra space.</li>\n<li>Recursive approach is fine, implicit stack space does not count as extra space for this problem.</li>\n<li>You may assume that it is a perfect binary tree (ie, all leaves are at the same level, and every parent has two children).</li>\n</ul>\n<p><strong>Example:</strong></p>\n<p>Given the following perfect binary tree,</p>\n<pre><code>     1\n   /  \\\n  2    3\n / \\  / \\\n4  5  6  7\n</code></pre>\n<p>After calling your function, the tree should look like:</p>\n<pre><code>     1 -> NULL\n   /  \\\n  2 -> 3 -> NULL\n / \\  / \\\n4->5->6->7 -> NULL\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Recursive.</p>\n<p>For every <code>node</code>:</p>\n<ul>\n<li>Left child: points to <code>node.right</code>.</li>\n<li>Right child: points to <code>node.next.left</code> if <code>node.next</code> exists.</li>\n</ul>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n    if (root.left !== null) {\n        root.left.next = root.right;\n        connect(root.left);\n    }\n    if (root.right !== null) {\n        if (root.next !== null) {\n            root.right.next = root.next.left;\n        }\n        connect(root.right);\n    }\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Level order traversal.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n\n    const queue = [NaN, root];\n    while (queue.length > 1) {\n        const node = queue.shift();\n        if (node !== node) {\n            for (let i = 0; i &#x3C; queue.length; i++) {\n                queue[i].next = queue[i + 1] || null;\n            }\n            queue.push(NaN);\n        } else {\n            if (node.left !== null) {\n                queue.push(node.left);\n            }\n            if (node.right !== null) {\n                queue.push(node.right);\n            }\n        }\n    }\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Populating Next Right Pointers in Each Node\": <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node\">https://leetcode.com/problems/populating-next-right-pointers-in-each-node</a></p>\n<hr>\n<p><a href=\"#117-populating-next-right-pointers-in-each-node-iihttpsleetcodecomproblemspopulating-next-right-pointers-in-each-node-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/description/\">117. Populating Next Right Pointers in Each Node II</a></h2>\n<h3>Problem:</h3>\n<p>Given a binary tree</p>\n<pre><code>struct TreeLinkNode {\n  TreeLinkNode *left;\n  TreeLinkNode *right;\n  TreeLinkNode *next;\n}\n</code></pre>\n<p>Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to <code>NULL</code>.</p>\n<p>Initially, all next pointers are set to <code>NULL</code>.</p>\n<p><strong>Note:</strong></p>\n<ul>\n<li>You may only use constant extra space.</li>\n<li>Recursive approach is fine, implicit stack space does not count as extra space for this problem.</li>\n</ul>\n<p><strong>Example:</strong></p>\n<p>Given the following binary tree,</p>\n<pre><code>     1\n   /  \\\n  2    3\n / \\    \\\n4   5    7\n</code></pre>\n<p>After calling your function, the tree should look like:</p>\n<pre><code>     1 -> NULL\n   /  \\\n  2 -> 3 -> NULL\n / \\    \\\n4-> 5 -> 7 -> NULL\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Recursive. See <a href=\"./116.%20Populating%20Next%20Right%20Pointers%20in%20Each%20Node.md\">116. Populating Next Right Pointers in Each Node</a>.</p>\n<p>The tree may not be perfect now. So keep finding <code>next</code> until there is a node with children, or <code>null</code>.</p>\n<p>This also means post-order traversal is required.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n    let next = null;\n    for (let node = root.next; node !== null; node = node.next) {\n        if (node.left !== null) {\n            next = node.left;\n            break;\n        }\n        if (node.right !== null) {\n            next = node.right;\n            break;\n        }\n    }\n    if (root.right !== null) {\n        root.right.next = next;\n    }\n    if (root.left !== null) {\n        root.left.next = root.right || next;\n    }\n    connect(root.right);\n    connect(root.left);\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Level order traversal. Exact same as <a href=\"./116.%20Populating%20Next%20Right%20Pointers%20in%20Each%20Node.md\">116. Populating Next Right Pointers in Each Node</a>.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n\n    const queue = [NaN, root];\n    while (queue.length > 1) {\n        const node = queue.shift();\n        if (node !== node) {\n            for (let i = 0; i &#x3C; queue.length; i++) {\n                queue[i].next = queue[i + 1] || null;\n            }\n            queue.push(NaN);\n        } else {\n            if (node.left !== null) {\n                queue.push(node.left);\n            }\n            if (node.right !== null) {\n                queue.push(node.right);\n            }\n        }\n    }\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\nSimilar Questions:\n\"Pascal's Triangle II\": <a href=\"https://leetcode.com/problems/pascals-triangle-ii\">https://leetcode.com/problems/pascals-triangle-ii</a></p>\n<hr>\n<p><a href=\"#118-pascals-trianglehttpsleetcodecomproblemspascals-triangledescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/pascals-triangle/description/\">118. Pascal's Triangle</a></h2>\n<h3>Problem:</h3>\n<p>Given a non-negative integer <em>numRows</em>, generate the first <em>numRows</em> of Pascal's triangle.</p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif\" alt=\"PascalTriangleAnimated2.gif\"></p>\n<p>In Pascal's triangle, each number is the sum of the two numbers directly above it.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: 5\nOutput:\n[\n     [1],\n    [1,1],\n   [1,2,1],\n  [1,3,3,1],\n [1,4,6,4,1]\n]\n</code></pre>\n<h3>Solution:</h3>\n<p>Dynamic Programming 101.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} numRows\n * @return {number[][]}\n */\nlet generate = function (numRows) {\n    if (numRows &#x3C;= 0) {\n        return [];\n    }\n\n    const result = [[1]];\n    for (let i = 1; i &#x3C; numRows; i++) {\n        const lastRow = result[i - 1];\n        const row = [1];\n        for (let j = 1; j &#x3C; i; j++) {\n            row[j] = lastRow[j] + lastRow[j - 1];\n        }\n        row.push(1);\n        result.push(row);\n    }\n\n    return result;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\nSimilar Questions:\n\"Pascal's Triangle\": <a href=\"https://leetcode.com/problems/pascals-triangle\">https://leetcode.com/problems/pascals-triangle</a></p>\n<hr>\n<p><a href=\"#119-pascals-triangle-iihttpsleetcodecomproblemspascals-triangle-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/pascals-triangle-ii/description/\">119. Pascal's Triangle II</a></h2>\n<h3>Problem:</h3>\n<p>Given a non-negative index <em>k</em> where <em>k</em> ≤ 33, return the <em>k</em>th index row of the Pascal's triangle.</p>\n<p>Note that the row index starts from 0.</p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif\" alt=\"PascalTriangleAnimated2.gif\"></p>\n<p>In Pascal's triangle, each number is the sum of the two numbers directly above it.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: 3\nOutput: [1,3,3,1]\n</code></pre>\n<p><strong>Follow up:</strong></p>\n<p>Could you optimize your algorithm to use only <em>O</em>(<em>k</em>) extra space?</p>\n<h3>Solution:</h3>\n<p>Dynamic Programming 101 with dynamic array.</p>\n<p>State <code>(i, j)</code> depends on <code>(i-1, j)</code> and <code>(i-1, j-1)</code>. So to access <code>(i-1, j-1)</code> iteration must be from right to left.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} rowIndex\n * @return {number[]}\n */\nlet getRow = function (rowIndex) {\n    if (rowIndex &#x3C; 0) {\n        return [];\n    }\n\n    const row = [1];\n    for (let i = 1; i &#x3C;= rowIndex; i++) {\n        for (let j = i - 1; j > 0; j--) {\n            row[j] += row[j - 1];\n        }\n        row.push(1);\n    }\n\n    return row;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Dynamic Programming\": <a href=\"https://leetcode.com/tag/dynamic-programming\">https://leetcode.com/tag/dynamic-programming</a></p>\n<hr>\n<p><a href=\"#120-trianglehttpsleetcodecomproblemstriangledescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/triangle/description/\">120. Triangle</a></h2>\n<h3>Problem:</h3>\n<p>Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.</p>\n<p>For example, given the following triangle</p>\n<pre><code>[\n     [2],\n    [3,4],\n   [6,5,7],\n  [4,1,8,3]\n]\n</code></pre>\n<p>The minimum path sum from top to bottom is <code>11</code> (i.e., <strong>2</strong> + <strong>3</strong> + <strong>5</strong> + <strong>1</strong> = 11).</p>\n<p><strong>Note:</strong></p>\n<p>Bonus point if you are able to do this using only <em>O</em>(<em>n</em>) extra space, where <em>n</em> is the total number of rows in the triangle.</p>\n<h3>Solution:</h3>\n<p>Define <code>f(i, j)</code> to be the minimum path sum from <code>triangle[0][0]</code> to <code>triangle[i][j]</code>.</p>\n<pre><code>f(i, 0) = f(i-1, j) + triangle[i][0]\nf(i, j) = min( f(i-1, j-1), f(i-1, j) ) + triangle[i][j], 0 &#x3C; j &#x3C; i\nf(i, i) = f(i-1, i-1) + triangle[i][i], i > 0\n</code></pre>\n<p>Dynamic array can be used.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[][]} triangle\n * @return {number}\n */\nlet minimumTotal = function (triangle) {\n    if (triangle.length &#x3C;= 0) {\n        return 0;\n    }\n\n    const dp = [triangle[0][0]];\n    for (let i = 1; i &#x3C; triangle.length; i++) {\n        dp[i] = dp[i - 1] + triangle[i][i];\n        for (let j = i - 1; j >= 1; j--) {\n            dp[j] = Math.min(dp[j], dp[j - 1]) + triangle[i][j];\n        }\n        dp[0] += triangle[i][0];\n    }\n    return Math.min(...dp);\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Dynamic Programming\": <a href=\"https://leetcode.com/tag/dynamic-programming\">https://leetcode.com/tag/dynamic-programming</a>\nSimilar Questions:\n\"Maximum Subarray\": <a href=\"https://leetcode.com/problems/maximum-subarray\">https://leetcode.com/problems/maximum-subarray</a>\n\"Best Time to Buy and Sell Stock II\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii</a>\n\"Best Time to Buy and Sell Stock III\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii</a>\n\"Best Time to Buy and Sell Stock IV\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv</a>\n\"Best Time to Buy and Sell Stock with Cooldown\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown</a></p>\n<hr>\n<p><a href=\"#121-best-time-to-buy-and-sell-stockhttpsleetcodecomproblemsbest-time-to-buy-and-sell-stockdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/\">121. Best Time to Buy and Sell Stock</a></h2>\n<h3>Problem:</h3>\n<p>Say you have an array for which the <em>i</em>th element is the price of a given stock on day <em>i</em>.</p>\n<p>If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit.</p>\n<p>Note that you cannot sell a stock before you buy one.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [7,1,5,3,6,4]\nOutput: 5\nExplanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5.\n             Not 7-1 = 6, as selling price needs to be larger than buying price.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n</code></pre>\n<h3>Solution:</h3>\n<p>Only care about positive profits. Take the frist item as base and scan to the right. If we encounter an item <code>j</code> whose price <code>price[j]</code> is lower than the base (which means if we sell now the profit would be negative), we sell <code>j-1</code> instead and make <code>j</code> the new base.</p>\n<p>Because <code>price[j]</code> is lower that the base, using <code>j</code> as new base is guaranteed to gain more profit comparing to the old one.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} prices\n * @return {number}\n */\nlet maxProfit = function (prices) {\n    let max = 0;\n    let base = prices[0];\n    for (let i = 1; i &#x3C; prices.length; i++) {\n        const profit = prices[i] - base;\n        if (profit > max) {\n            max = profit;\n        } else if (profit &#x3C; 0) {\n            base = prices[i];\n        }\n    }\n    return max;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Greedy\": <a href=\"https://leetcode.com/tag/greedy\">https://leetcode.com/tag/greedy</a>\nSimilar Questions:\n\"Best Time to Buy and Sell Stock\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock</a>\n\"Best Time to Buy and Sell Stock III\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii</a>\n\"Best Time to Buy and Sell Stock IV\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv</a>\n\"Best Time to Buy and Sell Stock with Cooldown\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown</a>\n\"Best Time to Buy and Sell Stock with Transaction Fee\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee</a></p>\n<hr>\n<p><a href=\"#122-best-time-to-buy-and-sell-stock-iihttpsleetcodecomproblemsbest-time-to-buy-and-sell-stock-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/description/\">122. Best Time to Buy and Sell Stock II</a></h2>\n<h3>Problem:</h3>\n<p>Say you have an array for which the <em>i</em>th element is the price of a given stock on day <em>i</em>.</p>\n<p>Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times).</p>\n<p><strong>Note:</strong> You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [7,1,5,3,6,4]\nOutput: 7\nExplanation: Buy on day 2 (price = 1) and sell on day 3 (price = 5), profit = 5-1 = 4.\n             Then buy on day 4 (price = 3) and sell on day 5 (price = 6), profit = 6-3 = 3.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [1,2,3,4,5]\nOutput: 4\nExplanation: Buy on day 1 (price = 1) and sell on day 5 (price = 5), profit = 5-1 = 4.\n             Note that you cannot buy on day 1, buy on day 2 and sell them later, as you are\n             engaging multiple transactions at the same time. You must sell before buying again.\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n</code></pre>\n<h3>Solution:</h3>\n<p>Sell immediately after the price drops. Or in other perspective, it is the sum of all the incremental pairs (buy in then immediately sell out).</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} prices\n * @return {number}\n */\nlet maxProfit = function (prices) {\n    let max = 0;\n    for (let i = 1; i &#x3C; prices.length; i++) {\n        if (prices[i] > prices[i - 1]) {\n            max += prices[i] - prices[i - 1];\n        }\n    }\n    return max;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Dynamic Programming\": <a href=\"https://leetcode.com/tag/dynamic-programming\">https://leetcode.com/tag/dynamic-programming</a>\nSimilar Questions:\n\"Best Time to Buy and Sell Stock\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock</a>\n\"Best Time to Buy and Sell Stock II\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii</a>\n\"Best Time to Buy and Sell Stock IV\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv</a>\n\"Maximum Sum of 3 Non-Overlapping Subarrays\": <a href=\"https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays\">https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays</a></p>\n<hr>\n<p><a href=\"#123-best-time-to-buy-and-sell-stock-iiihttpsleetcodecomproblemsbest-time-to-buy-and-sell-stock-iiidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/description/\">123. Best Time to Buy and Sell Stock III</a></h2>\n<h3>Problem:</h3>\n<p>Say you have an array for which the <em>i</em>th element is the price of a given stock on day <em>i</em>.</p>\n<p>Design an algorithm to find the maximum profit. You may complete at most <em>two</em> transactions.</p>\n<p>**Note:**You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [3,3,5,0,0,3,1,4]\nOutput: 6\nExplanation: Buy on day 4 (price = 0) and sell on day 6 (price = 3), profit = 3-0 = 3.\n             Then buy on day 7 (price = 1) and sell on day 8 (price = 4), profit = 4-1 = 3.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [1,2,3,4,5]\nOutput: 4\nExplanation: Buy on day 1 (price = 1) and sell on day 5 (price = 5), profit = 5-1 = 4.\n             Note that you cannot buy on day 1, buy on day 2 and sell them later, as you are\n             engaging multiple transactions at the same time. You must sell before buying again.\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n</code></pre>\n<h3>Solution:</h3>\n<p>Multiple transactions may not be engaged in at the same time. That means if we view the days that involed in the same transaction as a group, there won't be any intersection. We may complete at most <em>two</em> transactions, so divide the days into two groups, <code>[0...k]</code> and <code>[k...n-1]</code>. Notice <code>k</code> exists in both groups because technically we can sell out then immediately buy in at the same day.</p>\n<p>Define <code>p1(i)</code> to be the max profit of day <code>[0...i]</code>. This is just like the problem of <a href=\"./121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.md\">121. Best Time to Buy and Sell Stock</a>.</p>\n<pre><code>p1(0) = 0\np1(i) = max( p1(i-1), prices[i] - min(prices[0], ..., prices[i-1]) ), 0 &#x3C; i &#x3C;= n-1\n</code></pre>\n<p>Define <code>p2(i)</code> to be the max profit of day <code>[i...n-1]</code>. This is the mirror of <code>p1</code>.</p>\n<pre><code>p2(n-1) = 0\np2(i) = max( p2(i+1), max(prices[i], ..., prices[n-1]) - prices[i] ), n-1 > i >= 0\n</code></pre>\n<p>Define <code>f(k)</code> to be <code>p1(k) + p2(k)</code>. We need to get <code>max( f(0), ..., f(n-1) )</code>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} prices\n * @return {number}\n */\nlet maxProfit = function (prices) {\n    const len = prices.length;\n    if (len &#x3C;= 1) {\n        return 0;\n    }\n\n    const dp = [0];\n\n    let min = prices[0];\n    for (let i = 1; i &#x3C; len; i++) {\n        dp[i] = Math.max(dp[i - 1], prices[i] - min);\n        min = Math.min(prices[i], min);\n    }\n\n    let p2 = 0;\n    let max = prices[len - 1];\n    for (let i = len - 2; i >= 0; i--) {\n        max = Math.max(prices[i], max);\n        p2 = Math.max(p2, max - prices[i]);\n        dp[i] += p2;\n    }\n\n    return Math.max(...dp);\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Path Sum\": <a href=\"https://leetcode.com/problems/path-sum\">https://leetcode.com/problems/path-sum</a>\n\"Sum Root to Leaf Numbers\": <a href=\"https://leetcode.com/problems/sum-root-to-leaf-numbers\">https://leetcode.com/problems/sum-root-to-leaf-numbers</a>\n\"Path Sum IV\": <a href=\"https://leetcode.com/problems/path-sum-iv\">https://leetcode.com/problems/path-sum-iv</a>\n\"Longest Univalue Path\": <a href=\"https://leetcode.com/problems/longest-univalue-path\">https://leetcode.com/problems/longest-univalue-path</a></p>\n<hr>\n<p><a href=\"#124-binary-tree-maximum-path-sumhttpsleetcodecomproblemsbinary-tree-maximum-path-sumdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/binary-tree-maximum-path-sum/description/\">124. Binary Tree Maximum Path Sum</a></h2>\n<h3>Problem:</h3>\n<p>Given a <strong>non-empty</strong> binary tree, find the maximum path sum.</p>\n<p>For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path must contain <strong>at least one node</strong> and does not need to go through the root.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [1,2,3]\n\n       1\n      / \\\n     2   3\n\nOutput: 6\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [-10,9,20,null,null,15,7]\n\n   -10\n   / \\\n  9  20\n    /  \\\n   15   7\n\nOutput: 42\n</code></pre>\n<h3>Solution:</h3>\n<p>For every <code>node</code>, there are six possible ways to get the max path sum:</p>\n<ul>\n<li>\n<p>With <code>node.val</code></p>\n<ol>\n<li><code>node.val</code> plus the max sum of a path that ends with <code>node.left</code>.</li>\n<li><code>node.val</code> plus the max sum of a path that starts with <code>node.right</code>.</li>\n<li><code>node.val</code> plus the max sum of both paths.</li>\n<li>Just <code>node.val</code> (the max sum of both paths are negative).</li>\n</ol>\n</li>\n<li>\n<p>Without<code>node.val</code> (disconnected)</p>\n<ol>\n<li>The max-sum path is somewhere under the <code>node.left</code> subtree.</li>\n<li>The max-sum path is somewhere under the <code>node.right</code> subtree.</li>\n</ol>\n</li>\n</ul>\n<p>There are two ways to implement this.</p>\n<h4>ONE</h4>\n<p>Define a function that returns two values. The max sum of a path that may or may not end with <code>root</code> node, and the max sum of the path that ends with <code>root</code> node.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {number}\n */\nlet maxPathSum = function (root) {\n    return Math.max(..._maxPathSum(root));\n};\n\n/**\n * @param {TreeNode} root\n * @return {number[]}\n */\nfunction _maxPathSum(root) {\n    if (!root) {\n        return [-Infinity, -Infinity];\n    }\n\n    const left = _maxPathSum(root.left);\n    const right = _maxPathSum(root.right);\n    return [Math.max(left[0], right[0], root.val + Math.max(0, left[1], right[1], left[1] + right[1])), Math.max(left[1], right[1], 0) + root.val];\n}\n</code></pre>\n<h4>TWO</h4>\n<p>Just return the later (max sum of a path that ends with <code>root</code>). Maintain a global variable to store the disconnected max sum.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {number}\n */\nlet maxPathSum = function (root) {\n    const global = { max: -Infinity };\n    _maxPathSum(root, global);\n    return global.max;\n};\n\n/**\n * @param {TreeNode} root\n * @param {object} global\n * @param {number} global.max\n * @return {number[]}\n */\nfunction _maxPathSum(root, global) {\n    if (!root) {\n        return -Infinity;\n    }\n\n    const left = _maxPathSum(root.left, global);\n    const right = _maxPathSum(root.right, global);\n    const localMax = Math.max(left, right, 0) + root.val;\n    global.max = Math.max(global.max, localMax, root.val + left + right);\n    return localMax;\n}\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Two Pointers\": <a href=\"https://leetcode.com/tag/two-pointers\">https://leetcode.com/tag/two-pointers</a>\n\"String\": <a href=\"https://leetcode.com/tag/string\">https://leetcode.com/tag/string</a>\nSimilar Questions:\n\"Palindrome Linked List\": <a href=\"https://leetcode.com/problems/palindrome-linked-list\">https://leetcode.com/problems/palindrome-linked-list</a>\n\"Valid Palindrome II\": <a href=\"https://leetcode.com/problems/valid-palindrome-ii\">https://leetcode.com/problems/valid-palindrome-ii</a></p>\n<hr>\n<p><a href=\"#125-valid-palindromehttpsleetcodecomproblemsvalid-palindromedescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/valid-palindrome/description/\">125. Valid Palindrome</a></h2>\n<h3>Problem:</h3>\n<p>Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.</p>\n<p><strong>Note:</strong> For the purpose of this problem, we define empty string as valid palindrome.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: \"A man, a plan, a canal: Panama\"\nOutput: true\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: \"race a car\"\nOutput: false\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isPalindrome = function (s) {\n    const clean = s.toLowerCase().split(/[^a-z0-9]*/);\n    return clean.join('') === clean.reverse().join('');\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Remove non-alphanumeric characters then compare.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isPalindrome = function (s) {\n    const clean = s.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();\n    for (let i = 0, j = clean.length - 1; i &#x3C; j; i++, j--) {\n        if (clean[i] !== clean[j]) {\n            return false;\n        }\n    }\n    return true;\n};\n</code></pre>\n<h4>THREE</h4>\n<p>Compare the char codes.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isPalindrome = function (s) {\n    for (let i = 0, j = s.length - 1; i &#x3C; j; i++, j--) {\n        let left = s.charCodeAt(i);\n        while (i &#x3C; j &#x26;&#x26; (left &#x3C; 48 || (left > 57 &#x26;&#x26; left &#x3C; 65) || (left > 90 &#x26;&#x26; left &#x3C; 97) || left > 122)) {\n            left = s.charCodeAt(++i);\n        }\n        if (i >= j) {\n            return true;\n        }\n        if (left >= 65 &#x26;&#x26; left &#x3C;= 90) {\n            left += 32;\n        }\n\n        let right = s.charCodeAt(j);\n        while (i &#x3C; j &#x26;&#x26; (right &#x3C; 48 || (right > 57 &#x26;&#x26; right &#x3C; 65) || (right > 90 &#x26;&#x26; right &#x3C; 97) || right > 122)) {\n            right = s.charCodeAt(--j);\n        }\n        if (i >= j) {\n            return true;\n        }\n        if (right >= 65 &#x26;&#x26; right &#x3C;= 90) {\n            right += 32;\n        }\n\n        if (left !== right) {\n            return false;\n        }\n    }\n\n    return true;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"String\": <a href=\"https://leetcode.com/tag/string\">https://leetcode.com/tag/string</a>\n\"Backtracking\": <a href=\"https://leetcode.com/tag/backtracking\">https://leetcode.com/tag/backtracking</a>\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\nSimilar Questions:\n\"Word Ladder\": <a href=\"https://leetcode.com/problems/word-ladder\">https://leetcode.com/problems/word-ladder</a></p>\n<hr>\n<p><a href=\"#126-word-ladder-iihttpsleetcodecomproblemsword-ladder-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/word-ladder-ii/description/\">126. Word Ladder II</a></h2>\n<h3>Problem:</h3>\n<p>Given two words (<em>beginWord</em> and <em>endWord</em>), and a dictionary's word list, find all shortest transformation sequence(s) from <em>beginWord</em> to <em>endWord</em>, such that:</p>\n<ol>\n<li>Only one letter can be changed at a time</li>\n<li>Each transformed word must exist in the word list. Note that <em>beginWord</em> is <em>not</em> a transformed word.</li>\n</ol>\n<p><strong>Note:</strong></p>\n<ul>\n<li>Return an empty list if there is no such transformation sequence.</li>\n<li>All words have the same length.</li>\n<li>All words contain only lowercase alphabetic characters.</li>\n<li>You may assume no duplicates in the word list.</li>\n<li>You may assume <em>beginWord</em> and <em>endWord</em> are non-empty and are not the same.</li>\n</ul>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\",\nendWord = \"cog\",\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\n\nOutput:\n[\n  [\"hit\",\"hot\",\"dot\",\"dog\",\"cog\"],\n  [\"hit\",\"hot\",\"lot\",\"log\",\"cog\"]\n]\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\"\nendWord = \"cog\"\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\n\nOutput: []\n\nExplanation: The endWord \"cog\" is not in wordList, therefore no possible transformation.\n</code></pre>\n<h3>Solution:</h3>\n<p>This is just like <a href=\"./127.%20Word%20Ladder\">127. Word Ladder</a>.</p>\n<p>The constrain still works, but instead of deleting the words right away, collect them and delete them all when a level ends, so that we can reuse the words (matching different parents in the same level).</p>\n<p>The items in the queue are not just words now. Parent nodes are also kept so that we can backtrack the path from the end.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} beginWord\n * @param {string} endWord\n * @param {string[]} wordList\n * @return {string[][]}\n */\nfunction findLadders(beginWord, endWord, wordList) {\n    wordList = new Set(wordList);\n    if (!wordList.has(endWord)) {\n        return [];\n    }\n\n    const ALPHABET = 'abcdefghijklmnopqrstuvwxyz';\n\n    const result = [];\n    let isEndWordFound = false;\n    const levelWords = new Set();\n    const queue = [[beginWord, null], null];\n    while (queue.length > 1) {\n        const node = queue.shift();\n\n        if (node === null) {\n            if (isEndWordFound) {\n                break;\n            }\n            levelWords.forEach((word) => wordList.delete(word));\n            levelWords.clear();\n            queue.push(null);\n            continue;\n        }\n\n        const word = node[0];\n\n        for (let i = word.length - 1; i >= 0; i--) {\n            const head = word.slice(0, i);\n            const tail = word.slice(i + 1);\n\n            for (let c = 0; c &#x3C; 26; c++) {\n                if (ALPHABET[c] !== word[i]) {\n                    const w = head + ALPHABET[c] + tail;\n                    if (w === endWord) {\n                        const path = [endWord];\n                        for (let n = node; n !== null; n = n[1]) {\n                            path.unshift(n[0]);\n                        }\n                        result.push(path);\n                        isEndWordFound = true;\n                    }\n                    if (wordList.has(w)) {\n                        levelWords.add(w);\n                        queue.push([w, node]);\n                    }\n                }\n            }\n        }\n    }\n\n    return result;\n}\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\nSimilar Questions:\n\"Word Ladder II\": <a href=\"https://leetcode.com/problems/word-ladder-ii\">https://leetcode.com/problems/word-ladder-ii</a>\n\"Minimum Genetic Mutation\": <a href=\"https://leetcode.com/problems/minimum-genetic-mutation\">https://leetcode.com/problems/minimum-genetic-mutation</a></p>\n<hr>\n<p><a href=\"#127-word-ladderhttpsleetcodecomproblemsword-ladderdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/word-ladder/description/\">127. Word Ladder</a></h2>\n<h3>Problem:</h3>\n<p>Given two words (<em>beginWord</em> and <em>endWord</em>), and a dictionary's word list, find the length of shortest transformation sequence from <em>beginWord</em> to <em>endWord</em>, such that:</p>\n<ol>\n<li>Only one letter can be changed at a time.</li>\n<li>Each transformed word must exist in the word list. Note that <em>beginWord</em> is <em>not</em> a transformed word.</li>\n</ol>\n<p><strong>Note:</strong></p>\n<ul>\n<li>Return 0 if there is no such transformation sequence.</li>\n<li>All words have the same length.</li>\n<li>All words contain only lowercase alphabetic characters.</li>\n<li>You may assume no duplicates in the word list.</li>\n<li>You may assume <em>beginWord</em> and <em>endWord</em> are non-empty and are not the same.</li>\n</ul>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\",\nendWord = \"cog\",\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\n\nOutput: 5\n\nExplanation: As one shortest transformation is \"hit\" -> \"hot\" -> \"dot\" -> \"dog\" -> \"cog\",\nreturn its length 5.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\"\nendWord = \"cog\"\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\n\nOutput: 0\n\nExplanation: The endWord \"cog\" is not in wordList, therefore no possible transformation.\n</code></pre>\n<h3>Solution:</h3>\n<p>Think of it as building a tree, with <code>begineWord</code> as root and <code>endWord</code> as leaves.</p>\n<p>The best way control the depth (length of the shortest transformations) while building the tree is level-order traversal (BFS).</p>\n<p>We do not actually build the tree because it is expensive (astronomical if the list is huge). In fact, we only need one shortest path. So just like Dijkstra's algorithm, we say that the first time (level <code>i</code>) we encounter a word that turns out to be in a shortest path, then level <code>i</code> is the lowest level this word could ever get. We can safely remove it from the <code>wordList</code>.</p>\n<p>To find all the next words, instead of filtering the <code>wordList</code>, enumerate all 25 possible words and check if in <code>wordList</code>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} beginWord\n * @param {string} endWord\n * @param {string[]} wordList\n * @return {number}\n */\nlet ladderLength = function (beginWord, endWord, wordList) {\n    wordList = new Set(wordList);\n    if (!wordList.has(endWord)) {\n        return 0;\n    }\n\n    const ALPHABET = 'abcdefghijklmnopqrstuvwxyz';\n\n    let level = 1;\n    const queue = [beginWord, null];\n    while (queue.length > 1) {\n        const word = queue.shift();\n\n        if (word === null) {\n            level++;\n            queue.push(null);\n            continue;\n        }\n\n        for (let i = word.length - 1; i >= 0; i--) {\n            const head = word.slice(0, i);\n            const tail = word.slice(i + 1);\n\n            for (let c = 0; c &#x3C; 26; c++) {\n                if (ALPHABET[c] !== word[i]) {\n                    const word = head + ALPHABET[c] + tail;\n                    if (word === endWord) {\n                        return level + 1;\n                    }\n                    if (wordList.delete(word)) {\n                        queue.push(word);\n                    }\n                }\n            }\n        }\n    }\n\n    return 0;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Union Find\": <a href=\"https://leetcode.com/tag/union-find\">https://leetcode.com/tag/union-find</a>\nSimilar Questions:\n\"Binary Tree Longest Consecutive Sequence\": <a href=\"https://leetcode.com/problems/binary-tree-longest-consecutive-sequence\">https://leetcode.com/problems/binary-tree-longest-consecutive-sequence</a></p>\n<hr>\n<p><a href=\"#128-longest-consecutive-sequencehttpsleetcodecomproblemslongest-consecutive-sequencedescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/longest-consecutive-sequence/description/\">128. Longest Consecutive Sequence</a></h2>\n<h3>Problem:</h3>\n<p>Given an unsorted array of integers, find the length of the longest consecutive elements sequence.</p>\n<p>Your algorithm should run in O(<em>n</em>) complexity.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: [100, 4, 200, 1, 3, 2]\nOutput: 4\nExplanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.\n</code></pre>\n<h3>Solution:</h3>\n<p>Build a Set from the list. Pick a number, find all it's adjacent numbers that are also in the Set. Count them and remove them all from the Set. Repeat until the Set is empty. Time complexity O(n + n) = O(n).</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} nums\n * @return {number}\n */\nlet longestConsecutive = function (nums) {\n    const numSet = new Set(nums);\n    let maxCount = 0;\n    while (numSet.size > 0) {\n        const num = numSet.values().next().value;\n        numSet.delete(num);\n        let count = 1;\n        for (let n = num + 1; numSet.delete(n); n++) {\n            count++;\n        }\n        for (let n = num - 1; numSet.delete(n); n--) {\n            count++;\n        }\n        if (count > maxCount) {\n            maxCount = count;\n        }\n    }\n    return maxCount;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Path Sum\": <a href=\"https://leetcode.com/problems/path-sum\">https://leetcode.com/problems/path-sum</a>\n\"Binary Tree Maximum Path Sum\": <a href=\"https://leetcode.com/problems/binary-tree-maximum-path-sum\">https://leetcode.com/problems/binary-tree-maximum-path-sum</a></p>\n<hr>\n<p><a href=\"#129-sum-root-to-leaf-numbershttpsleetcodecomproblemssum-root-to-leaf-numbersdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/sum-root-to-leaf-numbers/description/\">129. Sum Root to Leaf Numbers</a></h2>\n<h3>Problem:</h3>\n<p>Given a binary tree containing digits from <code>0-9</code> only, each root-to-leaf path could represent a number.</p>\n<p>An example is the root-to-leaf path <code>1->2->3</code> which represents the number <code>123</code>.</p>\n<p>Find the total sum of all root-to-leaf numbers.</p>\n<p><strong>Note:</strong> A leaf is a node with no children.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: [1,2,3]\n    1\n   / \\\n  2   3\nOutput: 25\nExplanation:\nThe root-to-leaf path 1->2 represents the number 12.\nThe root-to-leaf path 1->3 represents the number 13.\nTherefore, sum = 12 + 13 = 25.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [4,9,0,5,1]\n    4\n   / \\\n  9   0\n / \\\n5   1\nOutput: 1026\nExplanation:\nThe root-to-leaf path 4->9->5 represents the number 495.\nThe root-to-leaf path 4->9->1 represents the number 491.\nThe root-to-leaf path 4->0 represents the number 40.\nTherefore, sum = 495 + 491 + 40 = 1026.\n</code></pre>\n<h3>Solution:</h3>\n<p>To write a clean solution for this promblem, use <code>0</code> as indicator of leaf node. If all the children get <code>0</code>, it is a leaf node, return the sum of current level.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {number}\n */\nlet sumNumbers = function (root, sum = 0) {\n    if (!root) {\n        return 0;\n    }\n    sum = sum * 10 + root.val;\n    return sumNumbers(root.left, sum) + sumNumbers(root.right, sum) || sum;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\n\"Union Find\": <a href=\"https://leetcode.com/tag/union-find\">https://leetcode.com/tag/union-find</a>\nSimilar Questions:\n\"Number of Islands\": <a href=\"https://leetcode.com/problems/number-of-islands\">https://leetcode.com/problems/number-of-islands</a>\n\"Walls and Gates\": <a href=\"https://leetcode.com/problems/walls-and-gates\">https://leetcode.com/problems/walls-and-gates</a></p>\n<hr>\n<p><a href=\"#130-surrounded-regionshttpsleetcodecomproblemssurrounded-regionsdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/surrounded-regions/description/\">130. Surrounded Regions</a></h2>\n<h3>Problem:</h3>\n<p>Given a 2D board containing <code>'X'</code> and <code>'O'</code> (<strong>the letter O</strong>), capture all regions surrounded by <code>'X'</code>.</p>\n<p>A region is captured by flipping all <code>'O'</code>s into <code>'X'</code>s in that surrounded region.</p>\n<p><strong>Example:</strong></p>\n<pre><code>X X X X\nX O O X\nX X O X\nX O X X\n</code></pre>\n<p>After running your function, the board should be:</p>\n<pre><code>X X X X\nX X X X\nX X X X\nX O X X\n</code></pre>\n<p><strong>Explanation:</strong></p>\n<p>Surrounded regions shouldn't be on the border, which means that any <code>'O'</code> on the border of the board are not flipped to <code>'X'</code>. Any <code>'O'</code> that is not on the border and it is not connected to an <code>'O'</code> on the border will be flipped to <code>'X'</code>. Two cells are connected if they are adjacent cells connected horizontally or vertically.</p>\n<h3>Solution:</h3>\n<p>Find all the <code>O</code>s that are connected to the <code>O</code>s on the border, change them to <code>#</code>. Then scan the board, change <code>O</code> to <code>X</code> and <code>#</code> back to <code>O</code>.</p>\n<p>The process of finding the connected <code>O</code>s is just like tree traversal. <code>O</code>s on the border are the same level. Their children are the second level. And so on.</p>\n<p>So both BFS and DFS are good. I prefer BFS when pruning is not needed in favor of its readability.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {character[][]} board\n * @return {void} Do not return anything, modify board in-place instead.\n */\nlet solve = function (board) {\n    const height = board.length;\n    if (height &#x3C;= 1) {\n        return;\n    }\n    const width = board[0].length;\n    if (width &#x3C;= 1) {\n        return;\n    }\n\n    const rowend = height - 1;\n    const colend = width - 1;\n\n    const queue = [];\n\n    for (let row = 0; row &#x3C; height; row++) {\n        if (board[row][0] === 'O') {\n            board[row][0] = '#';\n            queue.push(row, 0);\n        }\n        if (board[row][colend] === 'O') {\n            board[row][colend] = '#';\n            queue.push(row, colend);\n        }\n    }\n\n    for (let col = 0; col &#x3C; width; col++) {\n        if (board[0][col] === 'O') {\n            board[0][col] = '#';\n            queue.push(0, col);\n        }\n        if (board[rowend][col] === 'O') {\n            board[rowend][col] = '#';\n            queue.push(rowend, col);\n        }\n    }\n\n    while (queue.length > 0) {\n        const row = queue.shift();\n        const col = queue.shift();\n        if (row &#x3C; rowend &#x26;&#x26; board[row + 1][col] === 'O') {\n            board[row + 1][col] = '#';\n            queue.push(row + 1, col);\n        }\n        if (row > 0 &#x26;&#x26; board[row - 1][col] === 'O') {\n            board[row - 1][col] = '#';\n            queue.push(row - 1, col);\n        }\n        if (board[row][col + 1] === 'O') {\n            board[row][col + 1] = '#';\n            queue.push(row, col + 1);\n        }\n        if (board[row][col - 1] === 'O') {\n            board[row][col - 1] = '#';\n            queue.push(row, col - 1);\n        }\n    }\n\n    for (let row = 0; row &#x3C; height; row++) {\n        for (let col = 0; col &#x3C; width; col++) {\n            if (board[row][col] === '#') {\n                board[row][col] = 'O';\n            } else if (board[row][col] === 'O') {\n                board[row][col] = 'X';\n            }\n        }\n    }\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\n\"Graph\": <a href=\"https://leetcode.com/tag/graph\">https://leetcode.com/tag/graph</a>\nSimilar Questions:\n\"Copy List with Random Pointer\": <a href=\"https://leetcode.com/problems/copy-list-with-random-pointer\">https://leetcode.com/problems/copy-list-with-random-pointer</a></p>\n<hr>\n<p><a href=\"#133-clone-graphhttpsleetcodecomproblemsclone-graphdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/clone-graph/description/\">133. Clone Graph</a></h2>\n<h3>Problem:</h3>\n<p>Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph contains a <code>label</code> (<code>int</code>) and a list (<code>List[UndirectedGraphNode]</code>) of its <code>neighbors</code>. There is an edge between the given node and each of the nodes in its neighbors.</p>\n<p>OJ's undirected graph serialization (so you can understand error output):</p>\n<p>Nodes are labeled uniquely.</p>\n<p>We use <code>#</code> as a separator for each node, and <code>,</code> as a separator for node label and each neighbor of the node.</p>\n<p>As an example, consider the serialized graph <code>{0,1,2#1,2#2,2}</code>.</p>\n<p>The graph has a total of three nodes, and therefore contains three parts as separated by <code>#</code>.</p>\n<ol>\n<li>First node is labeled as <code>0</code>. Connect node <code>0</code> to both nodes <code>1</code> and <code>2</code>.</li>\n<li>Second node is labeled as <code>1</code>. Connect node <code>1</code> to node <code>2</code>.</li>\n<li>Third node is labeled as <code>2</code>. Connect node <code>2</code> to node <code>2</code> (itself), thus forming a self-cycle.</li>\n</ol>\n<p>Visually, the graph looks like the following:</p>\n<pre><code>       1\n      / \\\n     /   \\\n    0 --- 2\n         / \\\n         \\_/\n</code></pre>\n<p><strong>Note</strong>: The information about the tree serialization is only meant so that you can understand error output if you get a wrong answer. You don't need to understand the serialization to solve the problem.</p>\n<h3>Solution:</h3>\n<p>DFS. Cache the visited node before entering the next recursion.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for undirected graph.\n * function UndirectedGraphNode(label) {\n *     this.label = label;\n *     this.neighbors = [];   // Array of UndirectedGraphNode\n * }\n */\n\n/**\n * @param {UndirectedGraphNode} graph\n * @return {UndirectedGraphNode}\n */\nlet cloneGraph = function (graph) {\n    const cache = {};\n    return _clone(graph);\n\n    function _clone(graph) {\n        if (!graph) {\n            return graph;\n        }\n        const label = graph.label;\n        if (!cache[label]) {\n            cache[label] = new UndirectedGraphNode(label);\n            cache[label].neighbors = graph.neighbors.map(_clone);\n        }\n        return cache[label];\n    }\n};\n</code></pre>\n<p><img src=\"https://github.com/everthis/leetcode-js/blob/master/images/binary-tree-upside-down.webp\" alt=\"alt text\" title=\"binary-tree-upside-down\"></p>\n<pre><code class=\"language-js\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {TreeNode}\n */\nconst upsideDownBinaryTree = function (root) {\n    let curr = root;\n    let next = null;\n    let temp = null;\n    let prev = null;\n    while (curr !== null) {\n        next = curr.left;\n        curr.left = temp;\n        temp = curr.right;\n        curr.right = prev;\n        prev = curr;\n        curr = next;\n    }\n    return prev;\n};\n\n// another\n\nconst upsideDownBinaryTree = function (root) {\n    if (root == null || root.left == null) {\n        return root;\n    }\n    const newRoot = upsideDownBinaryTree(root.left);\n    root.left.left = root.right;\n    root.left.right = root;\n    root.left = null;\n    root.right = null;\n    return newRoot;\n};\n</code></pre>\n<p><img src=\"https://github.com/everthis/leetcode-js/blob/master/images/maximum-sum-circular-subarray.png\" alt=\"alt text\" title=\"maximum-sum-circular-subarray\"></p>\n<pre><code class=\"language-js\">/**\n * @param {number[]} A\n * @return {number}\n */\nconst maxSubarraySumCircular = function (A) {\n    let minSum = Infinity,\n        sum = 0,\n        maxSum = -Infinity,\n        curMax = 0,\n        curMin = 0;\n    for (let a of A) {\n        sum += a;\n        curMax = Math.max(curMax + a, a);\n        maxSum = Math.max(maxSum, curMax);\n        curMin = Math.min(curMin + a, a);\n        minSum = Math.min(minSum, curMin);\n    }\n    return maxSum > 0 ? Math.max(maxSum, sum - minSum) : maxSum;\n};\n</code></pre>\n<p><a href=\"#balanced-binary-tree---leetcode\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h1>➤ Balanced Binary Tree - LeetCode</h1>\n<blockquote>\n<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>\n</blockquote>\n<p>Given a binary tree, determine if it is height-balanced.</p>\n<p>For this problem, a height-balanced binary tree is defined as:</p>\n<blockquote>\n<p>a binary tree in which the left and right subtrees of <em>every</em> node differ in height by no more than 1.</p>\n</blockquote>\n<p><strong>Example 1:</strong></p>\n<p><img src=\"https://assets.leetcode.com/uploads/2020/10/06/balance_1.jpg\"></p>\n<p><strong>Input:</strong> root = [3,9,20,null,null,15,7]\n<strong>Output:</strong> true</p>\n<p><strong>Example 2:</strong></p>\n<p><img src=\"https://assets.leetcode.com/uploads/2020/10/06/balance_2.jpg\"></p>\n<p><strong>Input:</strong> root = [1,2,2,3,3,null,null,4,4]\n<strong>Output:</strong> false</p>\n<p><strong>Example 3:</strong></p>\n<p><strong>Input:</strong> root = []\n<strong>Output:</strong> true</p>\n<p><strong>Constraints:</strong></p>\n<ul>\n<li>The number of nodes in the tree is in the range <code>[0, 5000]</code>.</li>\n<li><code>-104 &#x3C;= Node.val &#x3C;= 104</code></li>\n</ul>\n<p><a href=\"https://leetcode.com/problems/balanced-binary-tree/\">Source</a># Convert Sorted Array to Binary Search Tree</p>\n<blockquote>\n<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>\n</blockquote>\n<p>Given an array where elements are sorted in ascending order, convert it to a height balanced BST.</p>\n<p>For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of <em>every</em> node never differ by more than 1.</p>\n<p><strong>Example:</strong></p>\n<p>Given the sorted array: [-10,-3,0,5,9],</p>\n<p>One possible answer is: [0,-3,9,-10,null,5], which represents the following height balanced BST:</p>\n<pre><code>  0\n / \\\\\n</code></pre>\n<p>-3 9\n/ /\n-10 5</p>\n<p><a href=\"https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/\">Source</a># Delete Node in a BST</p>\n<blockquote>\n<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>\n</blockquote>\n<p>Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.</p>\n<p>Basically, the deletion can be divided into two stages:</p>\n<ol>\n<li>Search for a node to remove.</li>\n<li>If the node is found, delete the node.</li>\n</ol>\n<p><strong>Follow up:</strong> Can you solve it with time complexity <code>O(height of tree)</code>?</p>\n<p><strong>Example 1:</strong></p>\n<p><img src=\"https://assets.leetcode.com/uploads/2020/09/04/del_node_1.jpg\"></p>\n<p><strong>Input:</strong> root = [5,3,6,2,4,null,7], key = 3\n<strong>Output:</strong> [5,4,6,2,null,null,7]\n<strong>Explanation:</strong> Given key to delete is 3. So we find the node with value 3 and delete it.\nOne valid answer is [5,4,6,2,null,null,7], shown in the above BST.\nPlease notice that another valid answer is [5,2,6,null,4,null,7] and it's also accepted.\n<img src=\"https://assets.leetcode.com/uploads/2020/09/04/del_node_supp.jpg\"></p>\n<p><strong>Example 2:</strong></p>\n<p><strong>Input:</strong> root = [5,3,6,2,4,null,7], key = 0\n<strong>Output:</strong> [5,3,6,2,4,null,7]\n<strong>Explanation:</strong> The tree does not contain a node with value = 0.</p>\n<p><strong>Example 3:</strong></p>\n<p><strong>Input:</strong> root = [], key = 0\n<strong>Output:</strong> []</p>\n<p><strong>Constraints:</strong></p>\n<ul>\n<li>The number of nodes in the tree is in the range <code>[0, 104]</code>.</li>\n<li><code>-105 &#x3C;= Node.val &#x3C;= 105</code></li>\n<li>Each node has a <strong>unique</strong> value.</li>\n<li><code>root</code> is a valid binary search tree.</li>\n<li><code>-105 &#x3C;= key &#x3C;= 105</code></li>\n</ul>\n<p><a href=\"https://leetcode.com/problems/delete-node-in-a-bst/\">Source</a><img src=\"https://github.com/everthis/leetcode-js/blob/master/images/meeting-room-ii-0.jpg\" alt=\"alt text\" title=\"meeting-room-ii\">\n<img src=\"https://github.com/everthis/leetcode-js/blob/master/images/meeting-room-ii-1.jpg\" alt=\"alt text\" title=\"meeting-room-ii\"></p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[][]} intervals\n * @return {number}\n */\nconst minMeetingRooms = function (intervals) {\n    const len = intervals.length;\n    const starts = new Array(len);\n    const ends = new Array(len);\n    for (let i = 0; i &#x3C; len; i++) {\n        starts[i] = intervals[i][0];\n        ends[i] = intervals[i][1];\n    }\n    starts.sort((a, b) => a - b);\n    ends.sort((a, b) => a - b);\n    let rooms = 0;\n    let endsIdx = 0;\n    for (let i = 0; i &#x3C; len; i++) {\n        if (starts[i] &#x3C; ends[endsIdx]) rooms++;\n        else endsIdx++;\n    }\n    return rooms;\n};\n</code></pre>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>"},{"url":"/blog/","relativePath":"blog/index.md","relativeDir":"blog","base":"index.md","name":"index","frontmatter":{"title":"Blog","subtitle":"Exclusive Blog Content","image":"images/maroon-onion.gif","has_more_link":true,"more_link_text":"Read more","seo":{"title":"Blog","description":"These are blog posts... not nescisarily different from the docs section except these pieces are more subject to my own opinions.","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Blog","keyName":"property"},{"name":"og:description","value":"This is the blog page","keyName":"property"},{"name":"og:image","value":"images/my-blog.png","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Blog"},{"name":"twitter:description","value":"This is the blog page"},{"name":"twitter:image","value":"images/5.jpg","relativeUrl":true}]},"template":"blog"},"html":""},{"url":"/blog/js-closure/","relativePath":"blog/js-closure.md","relativeDir":"blog","base":"js-closure.md","name":"js-closure","frontmatter":{"title":"graphql","subtitle":"lorem-ipsum","date":"2022-01-17","thumb_image_alt":"graphql logo","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post"},"html":"<p>Etiam facilisis lacus nec pretium lobortis. Praesent dapibus justo non efficitur efficitur. Nullam viverra justo arcu, eget egestas tortor pretium id. Sed imperdiet mattis eleifend. Vivamus suscipit et neque imperdiet venenatis.</p>\n<blockquote>\n<p>Vestibulum ullamcorper risus auctor eleifend consequat.</p>\n</blockquote>\n<p><img src=\"https://assets.stackbit.com/components/images/default/post-4.jpeg\" alt=\"Placeholder Image\"></p>\n<p>In malesuada sed urna eget vehicula. Donec fermentum tortor sit amet nisl elementum fringilla. Pellentesque dapibus suscipit faucibus. Nullam malesuada sed urna quis rutrum. Donec facilisis lorem id maximus mattis. Vestibulum quis elit magna. Vestibulum accumsan blandit consequat. Phasellus quis posuere quam.</p>\n<p>Vivamus mollis in tellus ac ullamcorper. Vestibulum sit amet bibendum ipsum, vitae rutrum ex. Nullam cursus, urna et dapibus aliquam, urna leo euismod metus, eu luctus justo mi eget mauris. Proin felis leo, volutpat et purus in, lacinia luctus eros. Pellentesque lobortis massa scelerisque lorem ullamcorper, sit amet elementum nulla scelerisque. In volutpat efficitur nulla, aliquam ornare lectus ultricies ac. Mauris sagittis ornare dictum. Nulla vel felis ut purus fermentum pretium. Sed id lectus ac diam aliquet venenatis. Etiam ac auctor enim. Nunc velit mauris, viverra vel orci ut, egestas rhoncus diam. Morbi scelerisque nibh tellus, vel varius urna malesuada sed. Etiam ultricies sem consequat, posuere urna non, maximus ex. Mauris gravida diam sed augue condimentum pulvinar vel ac dui. Integer vel convallis justo.</p>"},{"url":"/blog/netlify-cms/","relativePath":"blog/netlify-cms.md","relativeDir":"blog","base":"netlify-cms.md","name":"netlify-cms","frontmatter":{"title":"Netlify CMS Reference Sheet","subtitle":"lorem-ipsum","date":"2021-09-30","thumb_image_alt":"lorem-ipsum","excerpt":"lorem-ipsum","seo":{"title":"","description":"Netlify CMS is an open source content management system for your Git workflow that enables you to provide editors with a friendly UI and intuitive workflows","robots":[],"extra":[{"name":"og:image","value":"images/netlify-dee8d6ae.svg","keyName":"property","relativeUrl":true},{"name":"og:title","value":"Intro to Netlify CMS","keyName":"property","relativeUrl":false},{"name":"twitter:card","value":"Intro to Netlify CMS","keyName":"name","relativeUrl":false}]},"template":"post","thumb_image":"images/netlify.png","image":"images/netlify-26904b46.svg"},"html":"<h1>Overview\n\n</h1>\n<p>Netlify CMS is an open source content management system for your Git workflow that enables you to provide editors with a friendly UI and intuitive workflows. You can use it with any static site generator to create faster, more flexible web projects. Content is stored in your Git repository alongside your code for easier versioning, multi-channel publishing, and the option to handle content updates directly in Git.</p>\n<p>At its core, Netlify CMS is an open-source React app that acts as a wrapper for the Git workflow, using the GitHub, GitLab, or Bitbucket API. This provides many advantages, including:</p>\n<ul>\n<li><strong>Fast, web-based UI:</strong> With rich-text editing, real-time preview, and drag-and-drop media uploads.</li>\n<li><strong>Platform agnostic:</strong> Works with most static site generators.</li>\n<li><strong>Easy installation:</strong> Add two files to your site and hook up the backend by including those files in your build process or linking to our Content Delivery Network (CDN).</li>\n<li><strong>Modern authentication:</strong> Using GitHub, GitLab, or Bitbucket and JSON web tokens.</li>\n<li><strong>Flexible content types:</strong> Specify an unlimited number of content types with custom fields.</li>\n<li><strong>Fully extensible:</strong> Create custom-styled previews, UI widgets, and editor plugins.</li>\n</ul>\n<h2>Netlify CMS vs. Netlify</h2>\n<p><a href=\"https://www.netlify.com/\">Netlify.com</a> is a platform you can use to automatically build, deploy, serve, and manage your frontend sites and web apps. It also provides a variety of other features like form processing, serverless functions, and split testing. Not all Netlify sites use Netlify CMS, and not all sites using Netlify CMS are on Netlify.</p>\n<p>The folks at Netlify created Netlify CMS to fill a gap in the static site generation pipeline. There were some great proprietary headless CMS options, but no real contenders that were open source and extensible—that could turn into a community-built ecosystem like WordPress or Drupal. For that reason, Netlify CMS is <em>made</em> to be community-driven, and has never been locked to the Netlify platform (despite the name).</p>\n<p>With this in mind, you can:</p>\n<ul>\n<li>Use Netlify CMS without Netlify and deploy your site where you always have, hooking up your own CI, site hosting, CDN, etc.</li>\n<li>Use Netlify without Netlify CMS and edit your static site in your code editor.</li>\n<li>Or, use them together and have a fully-working CMS-enabled site with <a href=\"https://www.netlifycms.org/docs/start-with-a-template/\">one click</a>!</li>\n</ul>\n<p>If you hook up Netlify CMS to your website, you're basically adding a tool for content editors to make commits to your site repository without touching code or learning Git.</p>\n<ul>\n<li>Add to Your Site<strong>These generatorsstore static files in</strong>Jekyll, GitBook/ (project root)Hugo, Gatsby, Nuxt, Gridsome, Zola, Sapper/staticNext/publicHexo, Middleman, Jigsaw/sourceSpike/viewsWyam/inputPelican/contentVuePress/.vuepress/publicElmstatic/_site11ty/_sitepreact-cli/src/staticnamePost type identifier, used in routes. Must be unique.labelWhat the admin UI calls the post type.folderWhere files of this type are stored, relative to the repo root.createSet to true to allow users to create new files in this collection.slugTemplate for filenames. {{year}}, {{month}}, and {{day}} pulls from the post's date field or save date. {{slug}} is a url-safe version of the post's title. Default is simply {{slug}}.fieldsFields listed here are shown as fields in the content editor, then saved as front matter at the beginning of the document (except for body, which follows the front matter). Each field contains the following properties:</li>\n</ul>\n<p>You can adapt Netlify CMS to a wide variety of projects. It works with any content written in markdown, JSON, YAML, or TOML files, stored in a repo on <a href=\"https://github.com/\">GitHub</a>, <a href=\"https://about.gitlab.com/\">GitLab</a>, or <a href=\"https://bitbucket.org/\">Bitbucket</a>. You can also create your own custom backend.</p>\n<p>This tutorial guides you through the steps for adding Netlify CMS to a site that's built with a common <a href=\"https://www.staticgen.com/\">static site generator</a>, like Jekyll, Hugo, Hexo, or Gatsby. Alternatively, you can <a href=\"https://www.netlifycms.org/docs/start-with-a-template\">start from a template</a> or dive right into <a href=\"https://www.netlifycms.org/docs/configuration-options\">configuration options</a>.</p>\n<h2>App File Structure</h2>\n<p>A static admin folder contains all Netlify CMS files, stored at the root of your published site. Where you store this folder in the source files depends on your static site generator. Here's the static file location for a few of the most popular static site generators:</p>\n<p>If your generator isn't listed here, you can check its documentation, or as a shortcut, look in your project for a css or images folder. The contents of folders like that are usually processed as static files, so it's likely you can store your admin folder next to those. (When you've found the location, feel free to add it to these docs by <a href=\"https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md#pull-requests\">filing a pull request</a>!)</p>\n<p>Inside the admin folder, you'll create two files:</p>\n<p>The first file, admin/index.html, is the entry point for the Netlify CMS admin interface. This means that users navigate to yoursite.com/admin/ to access it. On the code side, it's a basic HTML starter page that loads the Netlify CMS JavaScript file. The second file, admin/config.yml, is the heart of your Netlify CMS installation, and a bit more complex. The <a href=\"https://www.netlifycms.org/docs/add-to-your-site/#configuration\">Configuration</a> section covers the details.</p>\n<p>In this example, we pull the admin/index.html file from a public CDN.</p>\n<p>In the code above the script is loaded from the unpkg CDN. Should there be any issue, jsDelivr can be used as an alternative source. Simply set the src to <a href=\"https://cdn.jsdelivr.net/npm/netlify-cms@%5E2.0.0/dist/netlify-cms.js\">https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js</a></p>\n<h3>Installing with npm</h3>\n<p>You can also use Netlify CMS as an npm module. Wherever you import Netlify CMS, it automatically runs, taking over the current page. Make sure the script that imports it only runs on your CMS page. First install the package and save it to your project:</p>\n<p>Then import it (assuming your project has tooling for imports):</p>\n<h2>Configuration</h2>\n<p>Configuration is different for every site, so we'll break it down into parts. Add all the code snippets in this section to your admin/config.yml file.</p>\n<h3>Backend</h3>\n<p>We're using <a href=\"https://www.netlify.com/\">Netlify</a> for our hosting and authentication in this tutorial, so backend configuration is fairly straightforward.</p>\n<p>For GitHub and GitLab repositories, you can start your Netlify CMS config.yml file with these lines:</p>\n<p><em>(For Bitbucket repositories, use the _[</em>Bitbucket backend<em>](<a href=\"https://www.netlifycms.org/docs/bitbucket-backend\">https://www.netlifycms.org/docs/bitbucket-backend</a>)</em> instructions instead.)_</p>\n<p>The configuration above specifies your backend protocol and your publication branch. Git Gateway is an open source API that acts as a proxy between authenticated users of your site and your site repo. (We'll get to the details of that in the <a href=\"https://www.netlifycms.org/docs/add-to-your-site/#authentication\">Authentication section</a> below.) If you leave out the branch declaration, it defaults to master.</p>\n<h3>Editorial Workflow</h3>\n<p><strong>Note:</strong> Editorial workflow works with GitHub repositories, and support for GitLab and Bitbucket is <a href=\"https://www.netlifycms.org/docs/beta-features/#gitlab-and-bitbucket-editorial-workflow-support\">in beta</a>.</p>\n<p>By default, saving a post in the CMS interface pushes a commit directly to the publication branch specified in backend. However, you also have the option to enable the <a href=\"https://www.netlifycms.org/docs/configuration-options/#publish-mode\">Editorial Workflow</a>, which adds an interface for drafting, reviewing, and approving posts. To do this, add the following line to your Netlify CMS config.yml:</p>\n<h3>Media and Public Folders</h3>\n<p>Netlify CMS allows users to upload images directly within the editor. For this to work, the CMS needs to know where to save them. If you already have an images folder in your project, you could use its path, possibly creating an uploads sub-folder, for example:</p>\n<p>If you're creating a new folder for uploaded media, you'll need to know where your static site generator expects static files. You can refer to the paths outlined above in <a href=\"https://www.netlifycms.org/docs/add-to-your-site/#app-file-structure\">App File Structure</a>, and put your media folder in the same location where you put the admin folder.</p>\n<p>Note that themedia_folder file path is relative to the project root, so the example above would work for Jekyll, GitBook, or any other generator that stores static files at the project root. However, it would not work for Hugo, Hexo, Middleman or others that store static files in a subfolder. Here's an example that could work for a Hugo site:</p>\n<p>The configuration above adds a new setting, public<em>folder. While media</em>folder specifies where uploaded files are saved in the repo, public_folder indicates where they are found in the published site. Image src attributes use this path, which is relative to the file where it's called. For this reason, we usually start the path at the site root, using the opening /.</p>\n<p><em>If public</em>folder is not set, Netlify CMS defaults to the same value as media<em>folder, adding an opening / if one is not included.</em></p>\n<h3>Collections</h3>\n<p>Collections define the structure for the different content types on your static site. Since every site is different, the collections settings differ greatly from one site to the next.</p>\n<p>Let's say your site has a blog, with the posts stored in _posts/blog, and files saved in a date-title format, like 1999-12-31-lets-party.md. Each post begins with settings in yaml-formatted front matter, like so:</p>\n<p>Given this example, our collections settings would look like this in your NetlifyCMS config.yml file:</p>\n<p>Let's break that down:</p>\n<ul>\n<li>label: Field label in the editor UI.</li>\n<li>name: Field name in the document front matter.</li>\n<li>widget: Determines UI style and value data type (details below).</li>\n<li>default (optional): Sets a default value for the field.</li>\n</ul>\n<p>As described above, the widget property specifies a built-in or custom UI widget for a given field. When a content editor enters a value into a widget, that value is saved in the document front matter as the value for the name specified for that field. A full listing of available widgets can be found in the <a href=\"https://www.netlifycms.org/docs/widgets\">Widgets doc</a>.</p>\n<p>Based on this example, you can go through the post types in your site and add the appropriate settings to your Netlify CMS config.yml file. Each post type should be listed as a separate node under the collections field. See the <a href=\"https://www.netlifycms.org/docs/configuration-options/#collections\">Collections reference doc</a> for more configuration options.</p>\n<h3>Filter</h3>\n<p>The entries for any collection can be filtered based on the value of a single field. The example collection below only shows post entries with the value en in the language field.</p>\n<h2>Authentication</h2>\n<p>Now that you have your Netlify CMS files in place and configured, all that's left is to enable authentication. We're using the <a href=\"https://www.netlify.com/\">Netlify</a> platform here because it's one of the quickest ways to get started, but you can learn about other authentication options in the <a href=\"https://www.netlifycms.org/docs/backends-overview\">Backends</a> doc.</p>\n<h3>Setup on Netlify</h3>\n<p>Netlify offers a built-in authentication service called Identity. In order to use it, connect your site repo with Netlify. Netlify has published a general <a href=\"https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/\">Step-by-Step Guide</a> for this, along with detailed guides for many popular static site generators, including <a href=\"https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/\">Jekyll</a>, <a href=\"https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-victor-hugo-on-netlify/\">Hugo</a>, <a href=\"https://www.netlify.com/blog/2015/10/26/a-step-by-step-guide-hexo-on-netlify/\">Hexo</a>, <a href=\"https://www.netlify.com/blog/2015/10/01/a-step-by-step-guide-middleman-on-netlify/\">Middleman</a>, <a href=\"https://www.netlify.com/blog/2016/02/24/a-step-by-step-guide-gatsby-on-netlify/\">Gatsby</a>, and more.</p>\n<h3>Enable Identity and Git Gateway</h3>\n<p>Netlify's Identity and Git Gateway services allow you to manage CMS admin users for your site without requiring them to have an account with your Git host or commit access on your repo. From your site dashboard on Netlify:</p>\n<ol>\n<li>Go to <strong>Settings > Identity</strong>, and select <strong>Enable Identity service</strong>.</li>\n<li>Under <strong>Registration preferences</strong>, select <strong>Open</strong> or <strong>Invite only</strong>. In most cases, you want only invited users to access your CMS, but if you're just experimenting, you can leave it open for convenience.</li>\n<li>If you'd like to allow one-click login with services like Google and GitHub, check the boxes next to the services you'd like to use, under <strong>External providers</strong>.</li>\n<li>Scroll down to <strong>Services > Git Gateway</strong>, and click <strong>Enable Git Gateway</strong>. This authenticates with your Git host and generates an API access token. In this case, we're leaving the <strong>Roles</strong> field blank, which means any logged in user may access the CMS. For information on changing this, check the <a href=\"https://www.netlify.com/docs/identity/\">Netlify Identity documentation</a>.</li>\n</ol>\n<h3>Add the Netlify Identity Widget</h3>\n<p>With the backend set to handle authentication, now you need a frontend interface to connect to it. The open source Netlify Identity Widget is a drop-in widget made for just this purpose. To include the widget in your site, add the following script tag in two places:</p>\n<p>Add this to the &#x3C;head> of your CMS index page at /admin/index.html, as well as the &#x3C;head> of your site's main index page. Depending on how your site generator is set up, this may mean you need to add it to the default template, or to a \"partial\" or \"include\" template. If you can find where the site stylesheet is linked, that's probably the right place. Alternatively, you can include the script in your site using Netlify's <a href=\"https://www.netlify.com/docs/inject-analytics-snippets/\">Script Injection</a> feature.</p>\n<p>When a user logs in with the Netlify Identity widget, an access token directs to the site homepage. In order to complete the login and get back to the CMS, redirect the user back to the /admin/ path. To do this, add the following script before the closing body tag of your site's main index page:</p>\n<p>Note: This example script requires modern JavaScript and does not work on IE11. For legacy browser support, use function expressions (function () {}) in place of the arrow functions (() => {}), or use a transpiler such as <a href=\"https://babeljs.io/\">Babel</a>.</p>\n<h2>Accessing the CMS</h2>\n<p>Your site CMS is now fully configured and ready for login!</p>\n<p>If you set your registration preference to \"Invite only,\" invite yourself (and anyone else you choose) as a site user. To do this, select the <strong>Identity</strong> tab from your site dashboard, and then select the <strong>Invite users</strong> button. Invited users receive an email invitation with a confirmation link. Clicking the link will take you to your site with a login prompt.</p>\n<p>If you left your site registration open, or for return visits after confirming an email invitation, access your site's CMS at yoursite.com/admin/.</p>\n<p><strong>Note:</strong> No matter where you access Netlify CMS — whether running locally, in a staging environment, or in your published site — it always fetches and commits files in your hosted repository (for example, on GitHub), on the branch you configured in your Netlify CMS config.yml file. This means that content fetched in the admin UI matches the content in the repository, which may be different from your locally running site. It also means that content saved using the admin UI saves directly to the hosted repository, even if you're running the UI locally or in staging.</p>\n<p>Examples</p>\n<p>Do\nyou have a great, open source example? Submit a pull request to this page!</p>\n<p>Example\nTools\nType\nSource\nMore info</p>\n<p><a href=\"https://github.com/robertcoopercode/gatsby-netlify-cms\">Gatsby &#x26; Netlify\nCMS Meetup Group Template</a>\nGatsby\ndemo\n<a href=\"https://github.com/robertcoopercode/gatsby-netlify-cms\">robertcoopercode/gatsby-netlify-cms</a>\n<a href=\"https://blog.logrocket.com/gatsby-netlify-cms-a-perfect-pairing-d50d59d16f67\">blog\npost</a></p>\n<p><a href=\"https://briandouglas.me/\">This\nDeveloping Journey</a>\nmiddleman\nblog\n<a href=\"https://github.com/bdougie/blog\">bdougie/blog</a>\n<a href=\"https://www.netlify.com/blog/2017/04/20/creating-a-blog-with-middleman-and-netlify-cms/\">blog\npost</a></p>\n<p><a href=\"https://jamstack-cms.netlify.com/\">Jamstack Recipes</a>\nHugo, Azure\ndemo\n<a href=\"https://github.com/hlaueriksson/jamstack-cms\">hlaueriksson/jamstack-cms</a>\n<a href=\"http://conductofcode.io/post/managing-content-for-a-jamstack-site-with-netlify-cms/\">blog\npost</a></p>\n<p><a href=\"https://bael-theme.jake101.com/\">Bael</a>\nVue, Nuxt\nblog\n<a href=\"https://github.com/jake-101/bael-template\">jake-101/bael-template</a>\n<a href=\"https://bael-theme.jake101.com/blog/2018-06-19-top-10-reasons-why\">blog\npost</a></p>\n<p><a href=\"https://www.forestgarden.wales/\">Forest\nGarden Wales</a>\nHugo\nblog\n<a href=\"https://github.com/forestgardenwales/forestgarden.wales\">forestgardenwales/forestgarden.wales</a>\n<a href=\"https://www.forestgarden.wales/blog/now-using-netlify-cms/\">blog\npost</a></p>\n<p><a href=\"https://jekyll-netlifycms.netlify.com/\">Jekyll Demo</a>\nJekyll, Gulp\ndemo\n<a href=\"https://github.com/NickStees/jekyll-cms\">NickStees/jekyll-cms</a>\n<a href=\"https://github.com/NickStees/jekyll-cms\">read me</a></p>\n<p><a href=\"https://alembic-kit-demo.netlify.com/\">Jekyll feat Alembic\nTheme Demo</a>\nJekyll\ndemo\n<a href=\"https://github.com/daviddarnes/alembic-netlifycms-kit\">DavidDarnes/alembic-netlifycms-kit</a>\n<a href=\"https://github.com/daviddarnes/alembic-netlifycms-kit#starter-kit-for-alembic-with-netlify-cms\">read\nme</a></p>\n<p><a href=\"https://eleventy-netlify-boilerplate.netlify.com/\">Eleventy Starter\nProject</a>\nEleventy\ndemo\n<a href=\"https://github.com/danurbanowicz/eleventy-netlify-boilerplate\">danurbanowicz/eleventy-netlify-boilerplate</a>\n<a href=\"https://github.com/danurbanowicz/eleventy-netlify-boilerplate\">read\nme</a></p>\n<p><a href=\"https://yellowcake.netlify.com/\">YellowCake\n- Complete website with blog</a>\nGatsby, Netlify-CMS, Uploadcare\ndemo\n<a href=\"https://github.com/thriveweb/yellowcake/\">thriveweb/yellowcake</a>\n<a href=\"https://thriveweb.com.au/the-lab/yellowcake-gatsby-react-js-starter-project/\">blog\npost</a></p>\n<p><a href=\"https://github.com/renestalder/nuxt-netlify-cms-starter-template\">Vue.js\n- Nuxt.js Starter Project</a>\nVue, Nuxt\ndemo\n<a href=\"https://github.com/renestalder/nuxt-netlify-cms-starter-template\">renestalder/nuxt-netlify-cms-starter-template</a>\n<a href=\"https://github.com/renestalder/nuxt-netlify-cms-starter-template\">read\nme</a></p>\n<p><a href=\"https://hexocms.imst.xyz/\">Hexo\nDemo</a>\nHexo\ndemo\n<a href=\"https://github.com/DemoMacro/Hexo-NetlifyCMS\">DemoMacro/Hexo-NetlifyCMS</a>\n<a href=\"https://github.com/DemoMacro/Hexo-NetlifyCMS\">read me</a></p>\n<p><a href=\"https://gitbook.imst.xyz/\">Gitbook\nDemo</a>\nGitbook\ndemo\n<a href=\"https://github.com/DemoMacro/Gitbook-NetlifyCMS\">DemoMacro/Gitbook-NetlifyCMS</a>\n<a href=\"https://github.com/DemoMacro/Gitbook-NetlifyCMS\">read me</a></p>\n<p><a href=\"https://vuepress.imst.xyz/\">VuePress\nDemo</a>\nVuePress\ndemo\n<a href=\"https://github.com/DemoMacro/VuePress-NetlifyCMS\">DemoMacro/VuePress-NetlifyCMS</a>\n<a href=\"https://github.com/DemoMacro/VuePress-NetlifyCMS\">read\nme</a></p>\n<p><a href=\"https://jigsaw-blog-netlify-netlifycms-template.netlify.com/\">Jigsaw\nBlog Starter Template Demo</a>\nJigsaw\ndemo\n<a href=\"https://github.com/erickpatrick/jigsaw-blog-netlify-netlifycms-template\">erickpatrick/jigsaw-blog-netlify-netlifycms-template</a>\n<a href=\"https://www.erickpatrick.net/blog/augmenting-tightenco-jigsaw-with-netlifycms/\">blog\npost</a></p>\n<p><a href=\"https://nuxt-netlifycms-boilerplate.netlify.com/\">Nuxt &#x26;\nNetlifyCMS Boilerplate</a>\nVue, Nuxt\ndemo\n<a href=\"https://github.com/tylermercer/nuxt-netlifycms-boilerplate\">tylermercer/nuxt-netlifycms-boilerplate</a>\n<a href=\"https://github.com/tylermercer/nuxt-netlifycms-boilerplate\">read\nme</a></p>\n<p><a href=\"https://netlifycms-nextjs.netlify.com/\">Next.js demo</a>\nNext.js\nblog\n<a href=\"https://github.com/masives/netlifycms-nextjs\">masives/netlifycms-nextjs</a>\n<a href=\"https://github.com/masives/netlifycms-nextjs\">read me</a></p>\n<p><a href=\"https://delog-w3layouts.netlify.com/\">Delog - Jamstack\nBlog with Netlify CMS</a>\nGatsby, Netlify-CMS\ndemo\n<a href=\"https://github.com/W3Layouts/gatsby-starter-delog\">W3Layouts/gatsby-starter-delog</a>\n<a href=\"https://w3layouts.com/articles/delog-gatsby-starter-netlify-cms/\">blog\npost</a></p>\n<p><a href=\"https://netlifycms-gridsome.suits.at/\">Netlify CMS template\nfor Gridsome</a>\nGridsome, Vue\ndemo\n<a href=\"https://github.com/suits-at/netlifycms-gridsome\">suits-at/netlifycms-gridsome</a>\n<a href=\"https://github.com/suits-at/netlifycms-gridsome\">read me</a></p>\n<p><a href=\"https://nextjs-netlify-blog-template.netlify.app/\">Next.js blogging\ntemplate for Netlify</a>\nNext.js, Netlify\nblog\n<a href=\"https://github.com/wutali/nextjs-netlify-blog-template\">wutali/nextjs-netlify-blog-template</a>\n<a href=\"https://github.com/wutali/nextjs-netlify-blog-template\">read\nme</a></p>\n<p><a href=\"https://github.com/pulumi/examples/tree/master/aws-ts-netlify-cms-and-oauth\">Netlify\nCMS and OAuth server on AWS</a>\nNetlify, Pulumi, AWS\nblog\n<a href=\"https://github.com/pulumi/examples/tree/master/aws-ts-netlify-cms-and-oauth\">pulumi/examples/aws-ts-netlify-cms-and-oauth</a>\n<a href=\"https://www.pulumi.com/blog/deploying-the-infrastructure-of-oauth-server-for-cms-app/\">blog\npost</a></p>\n<p><a href=\"https://creativedesignsguru.com/demo/Eleventy-Starter-Boilerplate/eleventy-starter-boilerplate-presentation/\">Eleventy\nStarter Boilerplate</a>\nEleventy, Netlify\ndemo\n<a href=\"https://github.com/ixartz/Eleventy-Starter-Boilerplate\">ixartz/Eleventy-Starter-Boilerplate</a>\n<a href=\"https://github.com/ixartz/Eleventy-Starter-Boilerplate\">read\nme</a></p>\n<p><a href=\"https://ntn-boilerplate.netlify.app/\">Nuxt, Tailwind &#x26;\nNetlifyCMS Boilerplate</a>\nVue, Nuxt\ndemo\n<a href=\"https://github.com/Knogobert/ntn-boilerplate\">Knogobert/ntn-boilerplate</a>\n<a href=\"https://github.com/Knogobert/ntn-boilerplate#readme\">read\nme</a></p>\n<p><a href=\"https://kind-mestorf-5a2bc0.netlify.com/\">Gatsby &#x26; Netlify\nCMS Personal Portfolio</a>\nGatsby\nportfolio\n<a href=\"https://github.com/EarlGeorge/React-Gatsby\">EarlGeorge/React-Gatsby</a>\n<a href=\"https://github.com/EarlGeorge/React-Gatsby/blob/master/README.md\">read\nme</a></p>\n<h1>Gatsby\n\n</h1>\n<p>This guide will help you get started using Netlify CMS and Gatsby.</p>\n<p>To get up and running with Gatsby, you'll need to have <a href=\"https://nodejs.org/\">Node.js</a> installed on your computer. <em>Note: Gatsby's minimum supported Node.js version is Node 8.</em></p>\n<h2>Create a new Gatsby site</h2>\n<p>Let's create a new site using the default Gatsby Starter Blog. Run the following commands in the terminal, in the folder where you'd like to create the blog:</p>\n<h2>Get to know Gatsby</h2>\n<p>In your favorite code editor, open up the code generated for your \"Gatsby Starter Blog\" site, and take a look at the content directory.</p>\n<p>You will see that there are multiple Markdown files that represent blog posts. Open one .md file and you will see something like this:</p>\n<p>We can see above that each blog post has a title, a date, a description and a body. Now, let's recreate this using Netlify CMS.</p>\n<h2>Add Netlify CMS to your site</h2>\n<p>First let's install some dependencies. We'll need netlify-cms-app and gatsby-plugin-netlify-cms. Run the following command in the terminal at the root of your site:</p>\n<h3>Configuration</h3>\n<p>For the purpose of this guide we will deploy to Netlify from a GitHub repository which requires the minimum configuration.</p>\n<p>Create a config.yml file in the directory structure you see below:</p>\n<p>In your config.yml file paste the following configuration:</p>\n<p><strong>Note:</strong> The above configuration allows assets to be stored relative to their content. Therefore posts would be stored in the format below as it is in gatsby-starter-blog.</p>\n<p>Finally, add the plugin to your gatsby-config.js.</p>\n<h3>Push to GitHub</h3>\n<p>It's now time to commit your changes and push to GitHub. The Gatsby starter initializes Git automatically for you, so you only need to do:</p>\n<h3>Add your repo to Netlify</h3>\n<p>Go to Netlify and select 'New Site from Git'. Select GitHub and the repository you just pushed to. Click Configure Netlify on GitHub and give access to your repository. Finish the setup by clicking Deploy Site. Netlify will begin reading your repository and starting building your project.</p>\n<h3>Enable Identity and Git Gateway</h3>\n<p>Netlify's Identity and Git Gateway services allow you to manage CMS admin users for your site without requiring them to have an account with your Git host or commit access on your repo. From your site dashboard on Netlify:</p>\n<ol>\n<li>Go to <strong>Settings > Identity</strong>, and select <strong>Enable Identity service</strong>.</li>\n<li>Under <strong>Registration preferences</strong>, select <strong>Open</strong> or <strong>Invite only</strong>. In most cases, you want only invited users to access your CMS, but if you're just experimenting, you can leave it open for convenience.</li>\n<li>If you'd like to allow one-click login with services like Google and GitHub, check the boxes next to the services you'd like to use, under <strong>External providers</strong>.</li>\n<li>Scroll down to <strong>Services > Git Gateway</strong>, and click <strong>Enable Git Gateway</strong>. This authenticates with your Git host and generates an API access token. In this case, we're leaving the <strong>Roles</strong> field blank, which means any logged in user may access the CMS. For information on changing this, check the <a href=\"https://www.netlify.com/docs/identity/\">Netlify Identity documentation</a>.</li>\n</ol>\n<h2>Start publishing</h2>\n<p>It's time to create your first blog post. Login to your site's /admin/ page and create a new post by clicking New Blog. Add a title, a date and some text. When you click Publish, a new commit will be created in your GitHub repo with this format Create Blog \"year-month-date-title\".</p>\n<p>Then Netlify will detect that there was a commit in your repo, and will start rebuilding your project. When your project is deployed you'll be able to see the post you created.</p>\n<h3>Cleanup</h3>\n<p>It is now safe to remove the default Gatsby blog posts.</p>"},{"url":"/blog/platform-docs/","relativePath":"blog/platform-docs.md","relativeDir":"blog","base":"platform-docs.md","name":"platform-docs","frontmatter":{"title":"Netlify CMS Intro","date":"2021-05-23","image":"images/curious-europa.gif","seo":{"title":"Platform Docs","description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit","extra":[{"name":"og:type","value":"article","keyName":"property"},{"name":"og:title","value":"Platform Docs","keyName":"property"},{"name":"og:description","value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit","keyName":"property"},{"name":"og:image","value":"images/curious-europa.gif","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Platform Docs"},{"name":"twitter:description","value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{"name":"twitter:image","value":"images/curious-europa.gif","relativeUrl":true}]},"template":"post","thumb_image":"images/redu-squarex.jpg"},"html":"<h1>Add to Your Site | Netlify CMS</h1>\n<blockquote>\n<p>Open source content management for your Git workflow</p>\n</blockquote>\n<p>You can adapt Netlify CMS to a wide variety of projects. It works with any content written in markdown, JSON, YAML, or TOML files, stored in a repo on <a href=\"https://github.com/\">GitHub</a>, <a href=\"https://about.gitlab.com/\">GitLab</a>, or <a href=\"https://bitbucket.org/\">Bitbucket</a>. You can also create your own custom backend.</p>\n<p>This tutorial guides you through the steps for adding Netlify CMS to a site that's built with a common <a href=\"https://www.staticgen.com/\">static site generator</a>, like Jekyll, Hugo, Hexo, or Gatsby. Alternatively, you can <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/start-with-a-template\">start from a template</a> or dive right into <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/configuration-options\">configuration options</a>.</p>\n<h2><a href=\"#app-file-structure\"></a>App File Structure</h2>\n<p>A static <code>admin</code> folder contains all Netlify CMS files, stored at the root of your published site. Where you store this folder in the source files depends on your static site generator. Here's the static file location for a few of the most popular static site generators:</p>\n<table>\n<thead>\n<tr>\n<th>These generators</th>\n<th>store static files in</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Jekyll, GitBook</td>\n<td><code>/</code> (project root)</td>\n</tr>\n<tr>\n<td>Hugo, Gatsby, Nuxt, Gridsome, Zola, Sapper</td>\n<td><code>/static</code></td>\n</tr>\n<tr>\n<td>Next</td>\n<td><code>/public</code></td>\n</tr>\n<tr>\n<td>Hexo, Middleman, Jigsaw</td>\n<td><code>/source</code></td>\n</tr>\n<tr>\n<td>Spike</td>\n<td><code>/views</code></td>\n</tr>\n<tr>\n<td>Wyam</td>\n<td><code>/input</code></td>\n</tr>\n<tr>\n<td>Pelican</td>\n<td><code>/content</code></td>\n</tr>\n<tr>\n<td>VuePress</td>\n<td><code>/.vuepress/public</code></td>\n</tr>\n<tr>\n<td>Elmstatic</td>\n<td><code>/_site</code></td>\n</tr>\n<tr>\n<td>11ty</td>\n<td><code>/_site</code></td>\n</tr>\n<tr>\n<td>preact-cli</td>\n<td><code>/src/static</code></td>\n</tr>\n</tbody>\n</table>\n<p>If your generator isn't listed here, you can check its documentation, or as a shortcut, look in your project for a <code>css</code> or <code>images</code> folder. The contents of folders like that are usually processed as static files, so it's likely you can store your <code>admin</code> folder next to those. (When you've found the location, feel free to add it to these docs by <a href=\"https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md#pull-requests\">filing a pull request</a>!)</p>\n<p>Inside the <code>admin</code> folder, you'll create two files:</p>\n<pre><code>admin\n ├ index.html\n └ config.yml\n</code></pre>\n<p>The first file, <code>admin/index.html</code>, is the entry point for the Netlify CMS admin interface. This means that users navigate to <code>yoursite.com/admin/</code> to access it. On the code side, it's a basic HTML starter page that loads the Netlify CMS JavaScript file. In this example, we pull the file from a public CDN:</p>\n<pre><code>&#x3C;!doctype html>\n&#x3C;html>\n&#x3C;head>\n  &#x3C;meta charset=\"utf-8\" />\n  &#x3C;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  &#x3C;title>Content Manager&#x3C;/title>\n&#x3C;/head>\n&#x3C;body>\n\n  &#x3C;script src=\"https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js\">&#x3C;/script>\n&#x3C;/body>\n&#x3C;/html>\n</code></pre>\n<p>In the code above the <code>script</code> is loaded from the <code>unpkg</code> CDN. Should there be any issue, <code>jsDelivr</code> can be used as an alternative source. Simply set the <code>src</code> to <code>https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js</code></p>\n<p>The second file, <code>admin/config.yml</code>, is the heart of your Netlify CMS installation, and a bit more complex. The <a href=\"#configuration\">Configuration</a> section covers the details.</p>\n<h3><a href=\"#installing-with-npm\"></a>Installing with npm</h3>\n<p>You can also use Netlify CMS as an npm module. Wherever you import Netlify CMS, it automatically runs, taking over the current page. Make sure the script that imports it only runs on your CMS page. First install the package and save it to your project:</p>\n<pre><code>npm install netlify-cms-app --save\n</code></pre>\n<p>Then import it (assuming your project has tooling for imports):</p>\n<pre><code>import CMS from 'netlify-cms-app'\n\nCMS.init()\n\nCMS.registerPreviewTemplate('my-template', MyTemplate)\n</code></pre>\n<h2><a href=\"#configuration\"></a>Configuration</h2>\n<p>Configuration is different for every site, so we'll break it down into parts. Add all the code snippets in this section to your <code>admin/config.yml</code> file.</p>\n<h3><a href=\"#backend\"></a>Backend</h3>\n<p>We're using <a href=\"https://www.netlify.com/\">Netlify</a> for our hosting and authentication in this tutorial, so backend configuration is fairly straightforward.</p>\n<p>For GitHub and GitLab repositories, you can start your Netlify CMS <code>config.yml</code> file with these lines:</p>\n<pre><code>backend:\n  name: git-gateway\n  branch: master\n</code></pre>\n<p><em>(For Bitbucket repositories, use the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/bitbucket-backend\">Bitbucket backend</a> instructions instead.)</em></p>\n<p>The configuration above specifies your backend protocol and your publication branch. Git Gateway is an open source API that acts as a proxy between authenticated users of your site and your site repo. (We'll get to the details of that in the <a href=\"#authentication\">Authentication section</a> below.) If you leave out the <code>branch</code> declaration, it defaults to <code>master</code>.</p>\n<h3><a href=\"#editorial-workflow\"></a>Editorial Workflow</h3>\n<p><strong>Note:</strong> Editorial workflow works with GitHub repositories, and support for GitLab and Bitbucket is <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/beta-features/#gitlab-and-bitbucket-editorial-workflow-support\">in beta</a>.</p>\n<p>By default, saving a post in the CMS interface pushes a commit directly to the publication branch specified in <code>backend</code>. However, you also have the option to enable the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/configuration-options/#publish-mode\">Editorial Workflow</a>, which adds an interface for drafting, reviewing, and approving posts. To do this, add the following line to your Netlify CMS <code>config.yml</code>:</p>\n<pre><code>publish_mode: editorial_workflow\n</code></pre>\n<h3><a href=\"#media-and-public-folders\"></a>Media and Public Folders</h3>\n<p>Netlify CMS allows users to upload images directly within the editor. For this to work, the CMS needs to know where to save them. If you already have an <code>images</code> folder in your project, you could use its path, possibly creating an <code>uploads</code> sub-folder, for example:</p>\n<pre><code>media_folder: \"images/uploads\"\n</code></pre>\n<p>If you're creating a new folder for uploaded media, you'll need to know where your static site generator expects static files. You can refer to the paths outlined above in <a href=\"#app-file-structure\">App File Structure</a>, and put your media folder in the same location where you put the <code>admin</code> folder.</p>\n<p>Note that the<code>media_folder</code> file path is relative to the project root, so the example above would work for Jekyll, GitBook, or any other generator that stores static files at the project root. However, it would not work for Hugo, Hexo, Middleman or others that store static files in a subfolder. Here's an example that could work for a Hugo site:</p>\n<pre><code>media_folder: \"static/images/uploads\"\npublic_folder: \"/images/uploads\"\n</code></pre>\n<p>The configuration above adds a new setting, <code>public_folder</code>. While <code>media_folder</code> specifies where uploaded files are saved in the repo, <code>public_folder</code> indicates where they are found in the published site. Image <code>src</code> attributes use this path, which is relative to the file where it's called. For this reason, we usually start the path at the site root, using the opening <code>/</code>.</p>\n<p><em>If `public</em>folder<code>is not set, Netlify CMS defaults to the same value as</code>media<em>folder<code>, adding an opening</code>/` if one is not included.</em></p>\n<h3><a href=\"#collections\"></a>Collections</h3>\n<p>Collections define the structure for the different content types on your static site. Since every site is different, the <code>collections</code> settings differ greatly from one site to the next.</p>\n<p>Let's say your site has a blog, with the posts stored in <code>_posts/blog</code>, and files saved in a date-title format, like <code>1999-12-31-lets-party.md</code>. Each post begins with settings in yaml-formatted front matter, like so:</p>\n<pre><code>---\nlayout: blog\ntitle: \"Let's Party\"\ndate: 1999-12-31 11:59:59 -0800\nthumbnail: \"/images/prince.jpg\"\nrating: 5\n---\n\nThis is the post body, where I write about our last chance to party before the Y2K bug destroys us all.\n</code></pre>\n<p>Given this example, our <code>collections</code> settings would look like this in your NetlifyCMS <code>config.yml</code> file:</p>\n<pre><code>collections:\n  - name: \"blog\"\n    label: \"Blog\"\n    folder: \"_posts/blog\"\n    create: true\n    slug: \"{{year}}-{{month}}-{{day}}-{{slug}}\"\n    fields:\n      - {label: \"Layout\", name: \"layout\", widget: \"hidden\", default: \"blog\"}\n      - {label: \"Title\", name: \"title\", widget: \"string\"}\n      - {label: \"Publish Date\", name: \"date\", widget: \"datetime\"}\n      - {label: \"Featured Image\", name: \"thumbnail\", widget: \"image\"}\n      - {label: \"Rating (scale of 1-5)\", name: \"rating\", widget: \"number\"}\n      - {label: \"Body\", name: \"body\", widget: \"markdown\"}\n</code></pre>\n<p>Let's break that down:</p>\n<table><tbody><tr><td><code>name</code></td><td>Post type identifier, used in routes. Must be unique.</td></tr><tr><td><code>label</code></td><td>What the admin UI calls the post type.</td></tr><tr><td><code>folder</code></td><td>Where files of this type are stored, relative to the repo root.</td></tr><tr><td><code>create</code></td><td>Set to <code>true</code> to allow users to create new files in this collection.</td></tr><tr><td><code>slug</code></td><td>Template for filenames. <code>{{year}}</code>, <code>{{month}}</code>, and <code>{{day}}</code> pulls from the post's <code>date</code> field or save date. <code>{{slug}}</code> is a url-safe version of the post's <code>title</code>. Default is simply <code>{{slug}}</code>.</td></tr><tr><td><code>fields</code></td><td>Fields listed here are shown as fields in the content editor, then saved as front matter at the beginning of the document (except for <code>body</code>, which follows the front matter). Each field contains the following properties:<ul><li><code>label</code>: Field label in the editor UI.</li><li><code>name</code>: Field name in the document front matter.</li><li><code>widget</code>: Determines UI style and value data type (details below).</li><li><code>default</code> (optional): Sets a default value for the field.</li></ul></td></tr></tbody></table>\n<p>As described above, the <code>widget</code> property specifies a built-in or custom UI widget for a given field. When a content editor enters a value into a widget, that value is saved in the document front matter as the value for the <code>name</code> specified for that field. A full listing of available widgets can be found in the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/widgets\">Widgets doc</a>.</p>\n<p>Based on this example, you can go through the post types in your site and add the appropriate settings to your Netlify CMS <code>config.yml</code> file. Each post type should be listed as a separate node under the <code>collections</code> field. See the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/configuration-options/#collections\">Collections reference doc</a> for more configuration options.</p>\n<h3><a href=\"#filter\"></a>Filter</h3>\n<p>The entries for any collection can be filtered based on the value of a single field. The example collection below only shows post entries with the value <code>en</code> in the <code>language</code> field.</p>\n<pre><code>collections:\n  - name: \"posts\"\n    label: \"Post\"\n    folder: \"_posts\"\n    filter:\n      field: language\n      value: en\n    fields:\n      - {label: \"Language\", name: \"language\"}\n</code></pre>\n<h2><a href=\"#authentication\"></a>Authentication</h2>\n<p>Now that you have your Netlify CMS files in place and configured, all that's left is to enable authentication. We're using the <a href=\"https://www.netlify.com/\">Netlify</a> platform here because it's one of the quickest ways to get started, but you can learn about other authentication options in the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/backends-overview\">Backends</a> doc.</p>\n<h3><a href=\"#setup-on-netlify\"></a>Setup on Netlify</h3>\n<p>Netlify offers a built-in authentication service called Identity. In order to use it, connect your site repo with Netlify. Netlify has published a general <a href=\"https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/\">Step-by-Step Guide</a> for this, along with detailed guides for many popular static site generators, including <a href=\"https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/\">Jekyll</a>, <a href=\"https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-victor-hugo-on-netlify/\">Hugo</a>, <a href=\"https://www.netlify.com/blog/2015/10/26/a-step-by-step-guide-hexo-on-netlify/\">Hexo</a>, <a href=\"https://www.netlify.com/blog/2015/10/01/a-step-by-step-guide-middleman-on-netlify/\">Middleman</a>, <a href=\"https://www.netlify.com/blog/2016/02/24/a-step-by-step-guide-gatsby-on-netlify/\">Gatsby</a>, and more.</p>\n<h3><a href=\"#enable-identity-and-git-gateway\"></a>Enable Identity and Git Gateway</h3>\n<p>Netlify's Identity and Git Gateway services allow you to manage CMS admin users for your site without requiring them to have an account with your Git host or commit access on your repo. From your site dashboard on Netlify:</p>\n<ol>\n<li>Go to <strong>Settings > Identity</strong>, and select <strong>Enable Identity service</strong>.</li>\n<li>Under <strong>Registration preferences</strong>, select <strong>Open</strong> or <strong>Invite only</strong>. In most cases, you want only invited users to access your CMS, but if you're just experimenting, you can leave it open for convenience.</li>\n<li>If you'd like to allow one-click login with services like Google and GitHub, check the boxes next to the services you'd like to use, under <strong>External providers</strong>.</li>\n<li>Scroll down to <strong>Services > Git Gateway</strong>, and click <strong>Enable Git Gateway</strong>. This authenticates with your Git host and generates an API access token. In this case, we're leaving the <strong>Roles</strong> field blank, which means any logged in user may access the CMS. For information on changing this, check the <a href=\"https://www.netlify.com/docs/identity/\">Netlify Identity documentation</a>.</li>\n</ol>\n<h3><a href=\"#add-the-netlify-identity-widget\"></a>Add the Netlify Identity Widget</h3>\n<p>With the backend set to handle authentication, now you need a frontend interface to connect to it. The open source Netlify Identity Widget is a drop-in widget made for just this purpose. To include the widget in your site, add the following script tag in two places:</p>\n<pre><code>&#x3C;script src=\"https://identity.netlify.com/v1/netlify-identity-widget.js\">&#x3C;/script>\n</code></pre>\n<p>Add this to the <code>&#x3C;head></code> of your CMS index page at <code>/admin/index.html</code>, as well as the <code>&#x3C;head></code> of your site's main index page. Depending on how your site generator is set up, this may mean you need to add it to the default template, or to a \"partial\" or \"include\" template. If you can find where the site stylesheet is linked, that's probably the right place. Alternatively, you can include the script in your site using Netlify's <a href=\"https://www.netlify.com/docs/inject-analytics-snippets/\">Script Injection</a> feature.</p>\n<p>When a user logs in with the Netlify Identity widget, an access token directs to the site homepage. In order to complete the login and get back to the CMS, redirect the user back to the <code>/admin/</code> path. To do this, add the following script before the closing <code>body</code> tag of your site's main index page:</p>\n<pre><code>&#x3C;script>\n  if (window.netlifyIdentity) {\n    window.netlifyIdentity.on(\"init\", user => {\n      if (!user) {\n        window.netlifyIdentity.on(\"login\", () => {\n          document.location.href = \"/admin/\";\n        });\n      }\n    });\n  }\n&#x3C;/script>\n</code></pre>\n<p>Note: This example script requires modern JavaScript and does not work on IE11. For legacy browser support, use function expressions (<code>function () {}</code>) in place of the arrow functions (<code>() => {}</code>), or use a transpiler such as <a href=\"https://babeljs.io/\">Babel</a>.</p>\n<h2><a href=\"#accessing-the-cms\"></a>Accessing the CMS</h2>\n<p>Your site CMS is now fully configured and ready for login!</p>\n<p>If you set your registration preference to \"Invite only,\" invite yourself (and anyone else you choose) as a site user. To do this, select the <strong>Identity</strong> tab from your site dashboard, and then select the <strong>Invite users</strong> button. Invited users receive an email invitation with a confirmation link. Clicking the link will take you to your site with a login prompt.</p>\n<p>If you left your site registration open, or for return visits after confirming an email invitation, access your site's CMS at <code>yoursite.com/admin/</code>.</p>\n<p><strong>Note:</strong> No matter where you access Netlify CMS — whether running locally, in a staging environment, or in your published site — it always fetches and commits files in your hosted repository (for example, on GitHub), on the branch you configured in your Netlify CMS config.yml file. This means that content fetched in the admin UI matches the content in the repository, which may be different from your locally running site. It also means that content saved using the admin UI saves directly to the hosted repository, even if you're running the UI locally or in staging.</p>\n<p>Happy posting!</p>\n<p><a href=\"https://www.netlifycms.org/docs/add-to-your-site/\">Source</a></p>"},{"url":"/blog/python-for-js-dev/","relativePath":"blog/python-for-js-dev.md","relativeDir":"blog","base":"python-for-js-dev.md","name":"python-for-js-dev","frontmatter":{"title":"Python Resources","date":"2021-06-03","image":"images/python.png","seo":{"title":"python","description":"Commodo ante vis placerat interdum massa massa primis","extra":[{"name":"og:type","value":"article","keyName":"property"},{"name":"og:title","value":"python","keyName":"property"},{"name":"og:description","value":"Commodo ante vis placerat interdum massa massa primis","keyName":"property"},{"name":"og:image","value":"images/python.png","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"python"},{"name":"twitter:description","value":"Commodo ante vis placerat interdum massa massa primis"},{"name":"twitter:image","value":"images/python.png","relativeUrl":true}]},"template":"post","thumb_image":"images/superb-triceratops.jpg","thumb_image_alt":"python logo"},"html":"<h1>Python Study Guide for a JavaScript Programmer\n</h1>\n<p><img src=\"https://miro.medium.com/max/1970/1*3V9VOfPk_hrFdbEAd3j-QQ.png\"><img src=\"https://miro.medium.com/max/52/0*eC4EvZcv6hhH88jX.png?q=20\"><img src=\"https://miro.medium.com/max/647/0*eC4EvZcv6hhH88jX.png\"><img src=\"https://miro.medium.com/max/60/0*Ez_1PZ93N4FfvkRr.png?q=20\"><img src=\"https://miro.medium.com/max/608/0*Ez_1PZ93N4FfvkRr.png\"><img src=\"https://miro.medium.com/max/60/0*eE3E5H0AoqkhqK1z.png?q=20\"><img src=\"https://miro.medium.com/max/1648/0*eE3E5H0AoqkhqK1z.png\"><img src=\"https://miro.medium.com/max/60/0*Q0CMqFd4PozLDFPB.png?q=20\"><img src=\"https://miro.medium.com/max/1638/0*Q0CMqFd4PozLDFPB.png\"><img src=\"https://miro.medium.com/max/3216/0*HQpndNhm1Z_xSoHb.png\"><img src=\"https://miro.medium.com/max/60/0*qHzGRLTOMTf30miT.png?q=20\"><img src=\"https://miro.medium.com/max/1614/0*qHzGRLTOMTf30miT.png\">[</p>\n<p>](<a href=\"https://github.com/bgoonz\">https://github.com/bgoonz</a>)</p>\n<iframe src=\"https://py-prac-42.netlify.app/\" width=\"100%\" height=\"1200px\"><iframe>\n<h1>Applications of Tutorial &#x26; Cheat Sheet Respectivley (At Bottom Of Tutorial):</h1>\n<h1>Basics</h1>\n<ul>\n<li><strong>PEP8</strong> : Python Enhancement Proposals, style-guide for Python.</li>\n<li>print is the equivalent of console.log.</li>\n</ul>\n<blockquote>\n<p>'print() == console.log()'</p>\n</blockquote>\n<h1># is used to make comments in your code.</h1>\n<blockquote>\n<p><em>Python has a built in help function that let's you see a description of the source code without having to navigate to it… \"-SickNasty … Autor Unknown\"</em></p>\n</blockquote>\n<h1>Numbers</h1>\n<ul>\n<li>Python has three types of numbers:</li>\n<li><strong>Integer</strong></li>\n<li><strong>Positive and Negative Counting Numbers.</strong></li>\n</ul>\n<p>No Decimal Point</p>\n<blockquote>\n<p>Created by a literal non-decimal point number … <strong>or</strong> … with the <em>int()</em> constructor.</p>\n</blockquote>\n<p><strong>3. Complex Numbers</strong></p>\n<blockquote>\n<p>Consist of a real part and imaginary part.</p>\n</blockquote>\n<h2>Boolean is a subtype of integer in Python.🤷‍♂️</h2>\n<blockquote>\n<p>If you came from a background in JavaScript and learned to accept the premise(s) of the following meme…</p>\n</blockquote>\n<blockquote>\n<p>Than I am sure you will find the means to suspend your disbelief.</p>\n</blockquote>\n<h1>KEEP IN MIND:</h1>\n<blockquote>\n<p><strong>The i is switched to a j in programming.</strong></p>\n</blockquote>\n<p>T*his is because the letter i is common place as the de facto index for any and all enumerable entities so it just makes sense not to compete for name-**space *<em>when there's another 25 letters that don't get used for every loop under the sun. My most medium apologies to Leonhard Euler.</em></p>\n<ul>\n<li><strong>Type Casting</strong> : The process of converting one number to another.</li>\n</ul>\n<p><strong>The arithmetic operators are the same between JS and Python, with two additions:</strong></p>\n<ul>\n<li><em>\"**\" : Double asterisk for exponent.</em></li>\n<li><em>\"//\" : Integer Division.</em></li>\n<li><strong>There are no spaces between math operations in Python.</strong></li>\n<li><strong>Integer Division gives the other part of the number from Module; it is a way to do round down numbers replacing Math.floor() in JS.</strong></li>\n<li><strong>There are no ++ and -- in Python, the only shorthand operators are:</strong></li>\n</ul>\n<h1>Strings</h1>\n<ul>\n<li>Python uses both single and double quotes.</li>\n<li>You can escape strings like so 'Jodi asked, \"What\\'s up, Sam?\"'</li>\n<li>Multiline strings use triple quotes.</li>\n</ul>\n<p><strong>Use the len() function to get the length of a string.</strong></p>\n<h1><strong>Python uses zero-based indexing</strong></h1>\n<h2>Python allows negative indexing (thank god!)</h2>\n<ul>\n<li>Python let's you use ranges</li>\n</ul>\n<p>You can think of this as roughly equivalent to the slice method called on a JavaScript object or string… *(mind you that in JS … strings are wrapped in an object (under the hood)… upon which the string methods are actually called. As a immutable privative type <strong>by textbook definition</strong>, a string literal could not hope to invoke most of it's methods without violating the state it was bound to on initialization if it were not for this bit of syntactic sugar.)*</p>\n<ul>\n<li>The end range is exclusive just like slice in JS.</li>\n</ul>\n<!---->\n<ul>\n<li>The index string function is the equiv. of indexOf() in JS</li>\n</ul>\n<!---->\n<ul>\n<li>The count function finds out how many times a substring appears in a string… pretty nifty for a hard coded feature of the language.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>You can use + to concatenate strings, just like in JS.</strong></li>\n<li><strong>You can also use \"*\" to repeat strings or multiply strings.</strong></li>\n<li><strong>Use the format() function to use placeholders in a string to input values later on.</strong></li>\n</ul>\n<!---->\n<ul>\n<li>*Shorthand way to use format function is:\n*print(f'Your name is {first<em>name} {last</em>name}')</li>\n</ul>\n<h2>Some useful string methods.</h2>\n<ul>\n<li><strong>Note that in JS join is used on an Array, in Python it is used on String.</strong></li>\n</ul>\n<!---->\n<ul>\n<li>There are also many handy testing methods.</li>\n</ul>\n<h1>Variables and Expressions</h1>\n<ul>\n<li><strong>Duck-Typing</strong> : Programming Style which avoids checking an object's type to figure out what it can do.</li>\n<li>Duck Typing is the fundamental approach of Python.</li>\n<li>Assignment of a value automatically declares a variable.</li>\n</ul>\n<!---->\n<ul>\n<li><strong><em>You can chain variable assignments to give multiple var names the same value.</em></strong></li>\n</ul>\n<h2>Use with caution as this is highly unreadable</h2>\n<h2>The value and type of a variable can be re-assigned at any time.</h2>\n<ul>\n<li>*NaN does not exist in Python, but you can 'create' it like so:\n<strong>print(float(\"nan\"))*</strong></li>\n<li><em>Python replaces null with none.</em></li>\n<li><strong>*none is an object</strong> and can be directly assigned to a variable.*</li>\n</ul>\n<blockquote>\n<p>Using none is a convenient way to check to see why an action may not be operating correctly in your program.</p>\n</blockquote>\n<h1>Boolean Data Type</h1>\n<ul>\n<li>One of the biggest benefits of Python is that it reads more like English than JS does.</li>\n</ul>\n<!---->\n<ul>\n<li>By default, Python considers an object to be true UNLESS it is one of the following:</li>\n<li>Constant None or False</li>\n<li>Zero of any numeric type.</li>\n<li>Empty Sequence or Collection.</li>\n<li>True and False must be capitalized</li>\n</ul>\n<h1>Comparison Operators</h1>\n<ul>\n<li>Python uses all the same equality operators as JS.</li>\n<li>In Python, equality operators are processed from left to right.</li>\n<li>Logical operators are processed in this order:</li>\n<li><strong>NOT</strong></li>\n<li><strong>AND</strong></li>\n<li><strong>OR</strong></li>\n</ul>\n<blockquote>\n<p>Just like in JS, you can use parentheses to change the inherent order of operations.</p>\n<p><strong>Short Circuit</strong> : Stopping a program when a true or false has been reached.</p>\n</blockquote>\n<h1>Identity vs Equality</h1>\n<ul>\n<li>In the Python community it is better to use is and is not over == or !=</li>\n</ul>\n<h1>If Statements</h1>\n<blockquote>\n<p>Remember the order of elif statements matter.</p>\n</blockquote>\n<h1>While Statements</h1>\n<ul>\n<li>Break statement also exists in Python.</li>\n</ul>\n<!---->\n<ul>\n<li>As are continue statements</li>\n</ul>\n<h1>Try/Except Statements</h1>\n<ul>\n<li>Python equivalent to try/catch</li>\n</ul>\n<!---->\n<ul>\n<li>You can name an error to give the output more specificity.</li>\n</ul>\n<!---->\n<ul>\n<li>You can also use the pass commmand to by pass a certain error.</li>\n</ul>\n<!---->\n<ul>\n<li>The pass method won't allow you to bypass every single error so you can chain an exception series like so:</li>\n</ul>\n<!---->\n<ul>\n<li>You can use an else statement to end a chain of except statements.</li>\n</ul>\n<!---->\n<ul>\n<li>finally is used at the end to clean up all actions under any circumstance.</li>\n</ul>\n<!---->\n<ul>\n<li>Using duck typing to check to see if some value is able to use a certain method.</li>\n</ul>\n<h1>Pass</h1>\n<ul>\n<li>Pass Keyword is required to write the JS equivalent of :</li>\n</ul>\n<h1>Functions</h1>\n<ul>\n<li><strong>Function definition includes:</strong></li>\n<li><strong>The def keyword</strong></li>\n<li><strong>The name of the function</strong></li>\n<li><strong>A list of parameters enclosed in parentheses.</strong></li>\n<li><strong>A colon at the end of the line.</strong></li>\n<li><strong>One tab indentation for the code to run.</strong></li>\n<li><strong>You can use default parameters just like in JS</strong></li>\n</ul>\n<h2><strong>Keep in mind, default parameters must always come after regular parameters.</strong></h2>\n<ul>\n<li><em>You can specify arguments by name without destructuring in Python.</em></li>\n</ul>\n<!---->\n<ul>\n<li>The lambda keyword is used to create anonymous functions and are supposed to be one-liners.</li>\n</ul>\n<p>toUpper = lambda s: s.upper()</p>\n<h1>Notes</h1>\n<h2>Formatted Strings</h2>\n<blockquote>\n<p>Remember that in Python join() is called on a string with an array/list passed in as the argument.\nPython has a very powerful formatting engine.\nformat() is also applied directly to strings.</p>\n</blockquote>\n<h1>Comma Thousands Separator</h1>\n<h1>Date and Time</h1>\n<h1>Percentage</h1>\n<h1>Data Tables</h1>\n<p><strong>Python can be used to display html, css, and JS.</strong>\n<em>It is common to use Python as an API (Application Programming Interface)</em></p>\n<h2>Structured Data</h2>\n<h2>Sequence : The most basic data structure in Python where the index determines the order.</h2>\n<blockquote>\n<p>List\nTuple\nRange\nCollections : Unordered data structures, hashable values.</p>\n</blockquote>\n<h2>Dictionaries\nSets</h2>\n<h2>Iterable : Generic name for a sequence or collection; any object that can be iterated through.</h2>\n<h2>Can be mutable or immutable.\nBuilt In Data Types</h2>\n<h1>Lists are the python equivalent of arrays.</h1>\n<h1>You can instantiate</h1>\n<h2>Test if a value is in a list.</h2>\n<h2>Instantiated with parentheses</h2>\n<h2>Sometimes instantiated without</h2>\n<h2>Tuple() built in can be used to convert other data into a tuple</h2>\n<h2>Ranges : A list of numbers which can't be changed; often used with for loops.</h2>\n<p><strong>Declared using one to three parameters</strong>.</p>\n<blockquote>\n<p>Start : opt. default 0, first # in sequence.\nStop : required next number past the last number in the sequence.\nStep : opt. default 1, difference between each number in the sequence.</p>\n</blockquote>\n<h2>Dictionaries : Mappable collection where a hashable value is used as a key to ref. an object stored in the dictionary.</h2>\n<h2>Mutable.</h2>\n<p><strong><em>Declared with curly braces of the built in dict()</em></strong></p>\n<blockquote>\n<p><em>Benefit of dictionaries in Python is that it doesn't matter how it is defined, if the keys and values are the same the dictionaries are considered equal.</em></p>\n</blockquote>\n<p><strong>Use the in operator to see if a key exists in a dictionary.</strong></p>\n<p>S<strong>ets : Unordered collection of distinct objects; objects that need to be hashable.</strong></p>\n<blockquote>\n<p><em>Always be unique, duplicate items are auto dropped from the set.</em></p>\n</blockquote>\n<h2>Common Uses:</h2>\n<blockquote>\n<p>Removing Duplicates\nMembership Testing\nMathematical Operators: Intersection, Union, Difference, Symmetric Difference.</p>\n</blockquote>\n<p><strong>Standard Set is mutable, Python has a immutable version called frozenset.\nSets created by putting comma seperated values inside braces:</strong></p>\n<h2>Also can use set constructor to automatically put it into a set.</h2>\n<p><strong>filter(function, iterable) : creates new iterable of the same type which includes each item for which the function returns true.</strong></p>\n<p><strong>map(function, iterable) : creates new iterable of the same type which includes the result of calling the function on every item of the iterable.</strong></p>\n<p><strong>sorted(iterable, key=None, reverse=False) : creates a new sorted list from the items in the iterable.</strong></p>\n<p><strong>Output is always a list</strong></p>\n<p><strong>key: opt function which coverts and item to a value to be compared.</strong></p>\n<p><strong>reverse: optional boolean.</strong></p>\n<p><strong>enumerate(iterable, start=0) : starts with a sequence and converts it to a series of tuples</strong></p>\n<h2>(0, 'First'), (1, 'Second'), (2, 'Third'), (3, 'Fourth')</h2>\n<h2>(1, 'First'), (2, 'Second'), (3, 'Third'), (4, 'Fourth')</h2>\n<blockquote>\n<p>zip(*iterables) : creates a zip object filled with tuples that combine 1 to 1 the items in each provided iterable.\nFunctions that analyze iterable</p>\n</blockquote>\n<p><strong>len(iterable) : returns the count of the number of items.</strong></p>\n<p><strong>max(*args, key=None) : returns the largest of two or more arguments.</strong></p>\n<p><strong>max(iterable, key=None) : returns the largest item in the iterable.</strong></p>\n<p><em>key optional function which converts an item to a value to be compared.\nmin works the same way as max</em></p>\n<p><strong>sum(iterable) : used with a list of numbers to generate the total.</strong></p>\n<p><em>There is a faster way to concatenate an array of strings into one string, so do not use sum for that.</em></p>\n<p><strong>any(iterable) : returns True if any items in the iterable are true.</strong></p>\n<p><strong>all(iterable) : returns True is all items in the iterable are true.</strong></p>\n<h1>Working with dictionaries</h1>\n<p><strong>dir(dictionary) : returns the list of keys in the dictionary.\nWorking with sets</strong></p>\n<p><strong>Union : The pipe | operator or union(*sets) function can be used to produce a new set which is a combination of all elements in the provided set.</strong></p>\n<h2>Intersection : The &#x26; operator ca be used to produce a new set of only the elements that appear in all sets.</h2>\n<p><strong>Symmetric Difference : The ^ operator can be used to produce a new set of only the elements that appear in exactly one set and not in both.</strong></p>\n<h1><strong>For Statements\nIn python, there is only one for loop.</strong></h1>\n<p>Always Includes:</p>\n<blockquote>\n<p>1. The for keyword\n2. A variable name\n3. The 'in' keyword\n4. An iterable of some kid\n5. A colon\n6. On the next line, an indented block of code called the for clause.</p>\n</blockquote>\n<p><strong>You can use break and continue statements inside for loops as well.</strong></p>\n<p><strong>You can use the range function as the iterable for the for loop.</strong></p>\n<p><strong><em>Common technique is to use the len() on a pre-defined list with a for loop to iterate over the indices of the list.</em></strong></p>\n<p><strong>You can loop and destructure at the same time.</strong></p>\n<blockquote>\n<p>Prints 1, 2</p>\n<p>Prints 3, 4</p>\n<p>Prints 5, 6</p>\n</blockquote>\n<p><strong>You can use values() and keys() to loop over dictionaries.</strong></p>\n<p><em>Prints red</em></p>\n<p><em>Prints 42</em></p>\n<p><em>Prints color</em></p>\n<p><em>Prints age</em></p>\n<p><strong>For loops can also iterate over both keys and values.</strong></p>\n<p><strong>Getting tuples</strong></p>\n<p><em>Prints ('color', 'red')</em></p>\n<p><em>Prints ('age', 42)</em></p>\n<p><em>Destructuring to values</em></p>\n<p><em>Prints Key: age Value: 42</em></p>\n<p><em>Prints Key: color Value: red</em></p>\n<p><strong>Looping over string</strong></p>\n<p><strong>When you order arguments within a function or function call, the args need to occur in a particular order:</strong></p>\n<p><em>formal positional args.</em></p>\n<p>*args</p>\n<p><em>keyword args with default values</em></p>\n<p>**kwargs</p>\n<h1><strong>Importing in Python</strong></h1>\n<p><strong>Modules are similar to packages in Node.js</strong>\nCome in different types:</p>\n<p>Built-In,</p>\n<p>Third-Party,</p>\n<p>Custom.</p>\n<p><strong>All loaded using import statements.</strong></p>\n<h1><strong>Terms</strong></h1>\n<blockquote>\n<p>module : Python code in a separate file.\npackage : Path to a directory that contains modules.\n<a href=\"http://init.py/\"><strong>init.py</strong></a> : Default file for a package.\nsubmodule : Another file in a module's folder.\nfunction : Function in a module.</p>\n</blockquote>\n<p><strong>A module can be any file but it is usually created by placing a special file init.py into a folder. pic</strong></p>\n<p><em>Try to avoid importing with wildcards in Python.</em></p>\n<p><em>Use multiple lines for clarity when importing.</em></p>\n<h1>Watching Out for Python 2</h1>\n<p><strong>Python 3 removed &#x3C;> and only uses !=</strong></p>\n<p><strong>format() was introduced with P3</strong></p>\n<p><strong>All strings in P3 are unicode and encoded.\nmd5 was removed.</strong></p>\n<p><strong>ConfigParser was renamed to configparser\nsets were killed in favor of set() class.</strong></p>\n<h2><strong>print was a statement in P2, but is a function in P3.</strong></h2>\n<h1>Topics revisited (in python syntax)</h1>\n<h1>Cheat Sheet:</h1>\n<h2>If you found this guide helpful feel free to checkout my github/gists where I host similar content:</h2>\n<p><a href=\"https://gist.github.com/bgoonz\">bgoonz's gists · GitHub</a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<h1>Python Cheat Sheet:</h1>\n<h1>If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:</h1>"},{"url":"/blog/web-dev-trends/","relativePath":"blog/web-dev-trends.md","relativeDir":"blog","base":"web-dev-trends.md","name":"web-dev-trends","frontmatter":{"title":"Web Development Tools","subtitle":"In 2021","date":"2021-09-30","thumb_image_alt":"lorem-ipsum","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"post","thumb_image":"images/webdev.png"},"html":"<p><strong>1. AI Chatbots</strong><img src=\"https://blog.sagipl.com/wp-content/uploads/2019/05/AI-Chatbots-1-1024x573.png\"></p>\n<p>Artificial Intelligence (AI) refers to the intelligence displayed by machines. It is primarily used to replace human intelligence.</p>\n<p>As the demand for AI-powered automation, communication, and analytics solutions will rise this year, more web developers will be focusing on building AI-based chatbots and virtual assistant apps.</p>\n<p><strong>2. Single Page Application</strong></p>\n<p><a href=\"https://www.sagipl.com/ipad-apps-development/\">Single-page applications</a>, being light in weight, faster, and more efficient, increased both in demand and popularity in recent years.</p>\n<p>Developers will continue to use SPA for building responsive sites and apps in 2021.</p>\n<p><strong>3. JavaScript Frameworks</strong></p>\n<p>JavaScript continues to remain one of the <a href=\"https://blog.sagipl.com/top-programming-languages/\"><strong>most preferred web development languages</strong></a> owing to its flexibility, power and evolving frameworks.</p>\n<p>This year too, we will see many new applications being developed in this developer-friendly language.</p>\n<p><strong>4. Progressive Web Apps (PWAs)</strong></p>\n<p>These are special web applications which are designed to load with progressive enhancement.</p>\n<p>Because of its fast-loading and high functionality features, PWA will continue to remain one of the year's hottest web trends.</p>\n<p><strong>5. Mobile-Friendly Website</strong></p>\n<p>Mobile-responsive sites are the ones that are designed to work smoothly across devices of all sizes.</p>\n<p>Owing to Google's mobile-first index and other search guidelines, developers will keep offering mobile-optimized sites this year and beyond.</p>\n<p><strong>6. Blockchain Technology</strong></p>\n<p>Blockchain, which was founded as a technology for secure digital payments, is now finding its place as a distributed ledger, which is secure, decentralized and public and will dominate the web development industry in the coming years.</p>\n<p><strong>7. Motion UI</strong></p>\n<p>Motion UI (User Interface) is a technology for creating visually appealing apps, especially animations, graphics, and transitions.</p>\n<p>Owing to its great ability for <a href=\"https://www.sagipl.com/website-design/\">creating an interactive web design</a>, Motion UI will be a primary tool for web developers in 2021.</p>\n<p><strong>8. Accelerated Mobile Pages (AMP)</strong></p>\n<p>Accelerated mobile pages are an initiative by Google to ensure that existing desktop websites give an equally amazing user experience across mobile devices.</p>\n<p>Web developers who are familiar with this tech are helping companies to implement the same on their websites.</p>\n<p><strong>9. Cybersecurity</strong></p>\n<p>Cybersecurity, which is another term for IT security, will continue to have its place in the online space as long as the world of internet is threatened by data breaches, hacking and similar cyber attacks.</p>\n<p>Developers with specialization in IT security will be in high demand this year.</p>\n<p><strong>10. VR and AR</strong></p>\n<p>The Augmented Reality and Virtual Reality Technologies, which were introduced only two years back, have now become a core part of the modern web development frameworks.</p>\n<p>From digital reality to visualization to 3D replicas, AR/VR will be used for enhancing user experience in the online space.</p>\n<p><strong>11. Voice Search</strong></p>\n<p>Following Google's increased focus on voice search queries, websites based on voice search optimization are now trending more than ever.</p>\n<p>As the number of people using voice searches will increase this year, so will the demand for websites optimized for the same.</p>\n<p><strong>12.</strong> <strong>Push Notification</strong></p>\n<p>Push Notification is replacing the Newsletter service. It is not very old but maintaining a high conversion rate better than Newsletters.</p>\n<p>Services and platforms like Onesignal, ZoPush, Push Engage are improving day by day, so it will be in trend in upcoming years and web developers also have to take care of it.</p>\n<p>SAG IPL is a leading global <a href=\"https://www.sagipl.com/web-development/\">web development company</a> providing modern web/app development services to clients worldwide.</p>"},{"url":"/blog/python-resources/","relativePath":"blog/python-resources.md","relativeDir":"blog","base":"python-resources.md","name":"python-resources","frontmatter":{"title":"Python Resources","date":"2021-06-03","image":"images/best-zebra.gif","seo":{"title":"Python Practice","description":"Commodo ante vis placerat interdum massa massa primis","extra":[{"name":"og:type","value":"article","keyName":"property"},{"name":"og:title","value":"Python Practice","keyName":"property"},{"name":"og:description","value":"Commodo ante vis placerat interdum massa massa primis","keyName":"property"},{"name":"og:image","value":"images/2.jpg","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Python Practice"},{"name":"twitter:description","value":"Commodo ante vis placerat interdum massa massa primis"},{"name":"twitter:image","value":"images/2.jpg","relativeUrl":true}]},"template":"post","thumb_image":"images/superb-amaranth.png","thumb_image_alt":"python logo"},"html":"<h1>Beginners Guide To Python<a href=\"https://levelup.gitconnected.com/basic-web-development-environment-setup-9f36c3f15afe\"><strong>Basic Web Development Environment Setup</strong>\n<em>Windows Subsystem for Linux (WSL) and Ubuntu</em>levelup.gitconnected.com</a><img src=\"https://cdn-images-1.medium.com/max/600/1*59V2ZNbyJfsdGR2N20PM7w.png\"><img src=\"https://cdn-images-1.medium.com/max/800/0*oVIDxWdgJXoIt7CI.jpg\"><a href=\"https://trinket.io/python3/2b693977e7\"><strong>Put Python Anywhere on the Web</strong>\n<em>Python in the browser. No installation required.</em>trinket.io</a>\n\n</h1>\n<iframe src=\"https://py-prac-42.netlify.app/\" width=\"100%\" height=\"1200px\"><iframe>\n<p>My favorite language for maintainability is Python. It has simple, clean syntax, object encapsulation, good library support, and optional named parameters.</p>\n<ul>\n<li>Bram Cohen</li>\n</ul>\n<p>Article on basic web development setup… it is geared towards web but VSCode is an incredibly versitile editor and this stack really could suit just about anyone working in the field of computer science.</p>\n<h3>The Repository &#x26; Live Site Behind This Article:</h3>\n<h3>About Python(Taken From Tutorial Page Of Docs):</h3>\n<p><a href=\"https://docs.python.org/3/tutorial/appetite.html\">Python enables programs to be written compactly and readably. Programs written in Python are typically much shorter than equivalent C, C++, or Java programs, for several reasons:</a></p>\n<ul>\n<li>the high-level data types allow you to express complex operations in a single statement;</li>\n<li>statement grouping is done by indentation instead of beginning and ending brackets;</li>\n<li>no variable or argument declarations are necessary.</li>\n</ul>\n<h3>Installing Python:</h3>\n<h3>Windows</h3>\n<p>To determine if your Windows computer already has Python 3:</p>\n<ol>\n<li>Open a command prompt by entering command prompt in the Windows 10 search box and selecting the Command Prompt App in the Best match section of the results.</li>\n<li>Enter the following command and then select the Enter key:</li>\n<li>ConsoleCopy</li>\n</ol>\n<p>python --version</p>\n<ol>\n<li>Running python --version may not return a value, or may return an error message stating <em>'python' is not recognized as an internal or external command, operable program or batch file.</em> This indicates Python is not installed on your Windows system.</li>\n<li>If you see the word Python with a set of numbers separated by . characters, some version of Python is installed.</li>\n</ol>\n<h4>i.e.</h4>\n<blockquote>\n<p>Python 3.8.0</p>\n</blockquote>\n<p><strong>As long as the first number is 3</strong>, you have Python 3 installed.</p>\n<blockquote>\n<p>Download Page:</p>\n<p><a href=\"https://www.python.org/downloads/release/python-395/\">https://www.python.org/downloads/release/python-395/</a></p>\n</blockquote>\n<blockquote>\n<p>Download Link:</p>\n<p><a href=\"https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe\">https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe</a></p>\n</blockquote>\n<h3>Install Jupyter Notebooks:</h3>\n<h3>pip</h3>\n<p>If you use pip, you can install it with:</p>\n<p>If installing using pip install --user, you must add the user-level bin directory to your PATH environment variable in order to launch jupyter lab. If you are using a Unix derivative (FreeBSD, GNU / Linux, OS X), you can achieve this by using export PATH=\"$HOME/.local/bin:$PATH\" command.</p>\n<h3>pipenv</h3>\n<p>If you use pipenv, you can install it as:</p>\n<p>or from a git checkout:</p>\n<p>When using pipenv, in order to launch jupyter lab, you must activate the project's virtualenv. For example, in the directory where pipenv's Pipfile and Pipfile.lock live (i.e., where you ran the above commands):</p>\n<p>Alternatively, you can run jupyter lab inside the virtualenv with</p>\n<p><a href=\"https://nbviewer.jupyter.org/github/bgoonz/Jupyter-Notebooks/tree/master/\">Jupyter Notebook Viewer</a></p>\n<h3>Python Syntax</h3>\n<p>Python syntax was made for readability, and easy editing. For example, the python language uses a : and indented code, while javascript and others generally use {} and indented code.</p>\n<h3>First Program</h3>\n<p>Lets create a <a href=\"https://repl.it/languages/python3\">python 3</a> repl, and call it <em>Hello World</em>. Now you have a blank file called <em>main.py</em>. Now let us write our first line of code:</p>\n<blockquote>\n<p><em>Brian Kernighan actually wrote the first \"Hello, World!\" program as part of the documentation for the BCPL programming language developed by Martin Richards.</em></p>\n</blockquote>\n<p>Now, press the run button, which obviously runs the code. If you are not using replit, this will not work. You should research how to run a file with your text editor.</p>\n<h3>Command Line</h3>\n<p>If you look to your left at the console where hello world was just printed, you can see a >, >>>, or $ depending on what you are using. After the prompt, try typing a line of code.</p>\n<p>The command line allows you to execute single lines of code at a time. It is often used when trying out a new function or method in the language.</p>\n<h3>New: Comments!</h3>\n<p>Another cool thing that you can generally do with all languages, are comments. In python, a comment starts with a #. The computer ignores all text starting after the #.</p>\n<p># Write some comments!</p>\n<p>If you have a huge comment, do <strong>not</strong> comment all the 350 lines, just put ''' before it, and ''' at the end. Technically, this is not a comment but a string, but the computer still ignores it, so we will use it.</p>\n<h3>New: Variables!</h3>\n<p>Unlike many other languages, there is no var, let, or const to declare a variable in python. You simply go name = 'value'.</p>\n<p>Remember, there is a difference between integers and strings. <em>Remember: String = \"\".</em> To convert between these two, you can put an int in a str() function, and a string in a int() function. There is also a less used one, called a float. Mainly, these are integers with decimals. Change them using the float() command.</p>\n<p><a href=\"https://repl.it/@bgoonz/second-scr?lite=true&#x26;referrer=https%3A%2F%2Fbryanguner.medium.com\">https://repl.it/@bgoonz/second-scr?lite=true&#x26;referrer=https%3A%2F%2Fbryanguner.medium.com</a></p>\n<p>Instead of using the , in the print function, you can put a + to combine the variables and string.</p>\n<h3>Operators</h3>\n<p>There are many operators in python:</p>\n<ul>\n<li>+</li>\n<li>-</li>\n<li>/</li>\n<li>*\nThese operators are the same in most languages, and allow for addition, subtraction, division, and multiplicaiton.\nNow, we can look at a few more complicated ones:</li>\n</ul>\n<p><em>simpleops.py</em></p>\n<p>You should already know everything shown above, as it is similar to other languages. If you continue down, you will see more complicated ones.</p>\n<p><em>complexop.py</em></p>\n<p>The ones above are to edit the current value of the variable.\nSorry to JS users, as there is no i++; or anything.</p>\n<h3><em>Fun Fact:\nThe python language was named after Monty Python.</em></h3>\n<p>If you really want to know about the others, view <a href=\"https://www.tutorialspoint.com/python/python_basic_operators.htm\">Py Operators</a></p>\n<h3>More Things With Strings</h3>\n<p>Like the title?\nAnyways, a ' and a \" both indicate a string, but <strong>do not combine them!</strong></p>\n<p><em>quotes.py</em></p>\n<p><em>slicing.py</em></p>\n<h3>String Slicing</h3>\n<p>You can look at only certain parts of the string by slicing it, using [num:num].\nThe first number stands for how far in you go from the front, and the second stands for how far in you go from the back.</p>\n<h3>Methods and Functions</h3>\n<p>Here is a list of functions/methods we will go over:</p>\n<ul>\n<li>.strip()</li>\n<li>len()</li>\n<li>.lower()</li>\n<li>.upper()</li>\n<li>.replace()</li>\n<li>.split()</li>\n</ul>\n<h3>New: Input()</h3>\n<p>Input is a function that gathers input entered from the user in the command line. It takes one optional parameter, which is the users prompt.</p>\n<p><em>inp.py</em></p>\n<p>If you wanted to make it smaller, and look neater to the user, you could do…</p>\n<p><em>inp2.py</em></p>\n<p>Running:\n<em>inp.py</em></p>\n<p><em>inp2.py</em></p>\n<h3>New: Importing Modules</h3>\n<p>Python has created a lot of functions that are located in other .py files. You need to import these <strong>modules</strong> to gain access to the,, You may wonder why python did this. The purpose of separate modules is to make python faster. Instead of storing millions and millions of functions, , it only needs a few basic ones. To import a module, you must write input &#x3C;modulename>. Do not add the .py extension to the file name. In this example , we will be using a python created module named random.</p>\n<p><em>module.py</em></p>\n<p>Now, I have access to all functions in the random.py file. To access a specific function in the module, you would do &#x3C;module>.&#x3C;function>. For example:</p>\n<p><em>module2.py</em></p>\n<blockquote>\n<p>*Pro Tip:\nDo from random import randint to not have to do random.randint(), just randint()\nTo import all functions from a module, you could do from random import **</p>\n</blockquote>\n<blockquote>\n</blockquote>\n<h3>New: Loops!</h3>\n<p>Loops allow you to repeat code over and over again. This is useful if you want to print Hi with a delay of one second 100 times.</p>\n<h4>for Loop</h4>\n<p>The for loop goes through a list of variables, making a seperate variable equal one of the list every time.\nLet's say we wanted to create the example above.</p>\n<p><em>loop.py</em></p>\n<p>This will print Hello with a .3 second delay 100 times. This is just one way to use it, but it is usually used like this:</p>\n<p><em>loop2.py</em></p>\n<p><a href=\"https://storage.googleapis.com/replit/images/1539649280875_37d22e6d49e8e8fbc453631def345387.pn\">https://storage.googleapis.com/replit/images/1539649280875_37d22e6d49e8e8fbc453631def345387.pn</a></p>\n<h4>while Loop</h4>\n<p>The while loop runs the code while something stays true. You would put while &#x3C;expression>. Every time the loop runs, it evaluates if the expression is True. It it is, it runs the code, if not it continues outside of the loop. For example:</p>\n<p><em>while.py</em></p>\n<p>Or you could do:</p>\n<p><em>while2.py</em></p>\n<h3>New: if Statement</h3>\n<p>The if statement allows you to check if something is True. If so, it runs the code, if not, it continues on. It is kind of like a while loop, but it executes <strong>only once</strong>. An if statement is written:</p>\n<p><em>if.py</em></p>\n<p>Now, you may think that it would be better if you could make it print only one message. Not as many that are True. You can do that with an elif statement:</p>\n<p><em>elif.py</em></p>\n<p>Now, you may wonder how to run code if none work. Well, there is a simple statement called else:</p>\n<p><em>else.py</em></p>\n<h3>New: Functions (def)</h3>\n<p>So far, you have only seen how to use functions other people have made. Let use the example that you want to print the a random number between 1 and 9, and print different text every time.\nIt is quite tiring to type:</p>\n<p>Characters: 389</p>\n<p><em>nofunc.py</em></p>\n<p>Now with functions, you can seriously lower the amount of characters:</p>\n<p>Characters: 254</p>\n<p><em>functions.py</em></p>\n<h3>Project Based Learning:</h3>\n<p>The following is a modified version of a tutorial posted By: <a href=\"https://replit.com/@InvisibleOne\">InvisibleOne </a></p>\n<p>I would cite the original tutorial it's self but at the time of this writing I can no longer find it on his repl.it profile and so the only reference I have are my own notes from following the tutorial when I first found it.</p>\n<h3>1. Adventure Story</h3>\n<p>The first thing you need with an adventure story is a great storyline, something that is exciting and fun. The idea is, that at each pivotal point in the story, you give the player the opportunity to make a choice.\nFirst things first, let's import the stuff that we need, like this:</p>\n<p>Now, we need some variables to hold some of the player data.</p>\n<p>Ok, now we have the player's name and nickname, let's welcome them to the game</p>\n<p>Now for the story. The most important part of all stories is the introduction, so let's print our introduction</p>\n<p>Now, we'll give the player their first choice</p>\n<p>There you have it, a pretty simple choose your own ending story. You can make it as complex or uncomplex as you like.</p>\n<h3>2. TEXT ENCODER</h3>\n<p>Ever make secret messages as a kid? I used to. Anyways, here's the way you can make a program to encode messages! It's pretty simple. First things first, let's get the message the user wants to encode, we'll use input() for that:</p>\n<p>Now we need to split that string into a list of characters, this part is a bit more complicated.</p>\n<p>Now we need to convert the characters into code, well do this with a for loop:</p>\n<p>Once we've encoded the text, we'll print it back for the user</p>\n<p>And if you want to decode something, it is this same process but in reverse!</p>\n<h3>3. Guess my Number</h3>\n<p>Number guessing games are fun and pretty simple, all you need are a few loops. To start, we need to import random.</p>\n<p>That is pretty simple. Now we'll make a list with the numbers were want available for the game</p>\n<p>Next, we get a random number from the list</p>\n<p>Now, we need to ask the user for input, we'll to this with a while loop</p>\n<p>Have fun with this!</p>\n<h3>4. Notes</h3>\n<p>Here is a more advanced project, but still pretty easy. This will be using a txt file to save some notes. The first thing we need to do is to create a txt file in your repl, name it 'notes.txt'\nNow, to open a file in python we use open('filename', type) The type can be 'r' for read, or 'w' for write. There is another option, but we won't be using that here. Now, the first thing we are going to do is get what the user would like to save:</p>\n<p>Now we'll open our file and save that text</p>\n<p>There we go, now the information is in the file. Next, we'll retrieve it</p>\n<p>There we go, that's how you can open files and close files with python</p>\n<h3>5. Random Dare Generator</h3>\n<p>Who doesn't love a good dare? Here is a program that can generate random dares. The first thing we'll need to do is as always, import random. Then we'll make some lists of dares</p>"},{"url":"/docs/gists/","relativePath":"docs/gists.md","relativeDir":"docs","base":"gists.md","name":"gists","frontmatter":{"title":"my gists","weight":0,"excerpt":null,"seo":{"title":"Gist Archive","description":"A collection of my github gists","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Gist Archive</h2>\n<h2>Gist Archive</h2>\n<iframe src=\"https://bgoonzgist.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<hr>\n<h2>Featured Gists:</h2>\n<pre><code class=\"language-js\">const Promise = require(\"bluebird\");\nconst fs = Promise.promisifyAll(require(\"fs\"));\nconst crypto = require(\"crypto\");\nconst path = require(\"path\");\nconst pathA = \".\";\nconst pathB = \"/path/to/the/directory/you/want/to/compare/it/to\";\nlet hashes = [];\nfunction hashDirIn(folder) {\n  var pathPromiseA = fs\n    .readdirAsync(folder)\n    .map(function (fileName) {\n      var workPath = path.join(folder, fileName);\n      var statPromise = fs.statAsync(workPath);\n      return Promise.join(\n        statPromise,\n        fileName,\n        function (statPromise, fileName) {\n          if (statPromise.isFile()) {\n            function makeStream(file, callback) {\n              var result = fs.createReadStream(workPath);\n              return callback(result);\n            }\n            function process(stream) {\n              var hash = crypto.createHash(\"md5\");\n              return new Promise(function (resolve, reject) {\n                stream.on(\"data\", function updateProcess(chunk) {\n                  hash.update(chunk, \"utf8\");\n                });\n                stream.on(\"end\", resolve);\n              }).then(function publish() {\n                var digest = hash.digest(\"hex\");\n                hashes.push({ digest: digest, path: workPath });\n              });\n            }\n            return makeStream(fileName, process);\n          }\n        }\n      );\n    })\n    .then(function () {\n      if (i == 1) {\n        hashes.sort(function (a, b) {\n          if (a.digest &#x3C; b.digest) {\n            return -1;\n          }\n          if (a.digest > b.digest) {\n            return 1;\n          }\n          return 0;\n        });\n        var dupe = 1;\n        hashes.map(function (obj, index) {\n          if (index - 1 >= 0) {\n            if (obj.digest == hashes[index - 1].digest) {\n              console.log(\"Dupe \" + dupe + \" found:\");\n              console.log(obj.path);\n              console.log(\"Equal to:\");\n              console.log(hashes[index - 1].path + \"\\n\");\n              dupe++;\n            }\n          }\n        });\n      }\n      i++;\n    });\n}\nvar i = 0;\nhashDirIn(pathA);\nhashDirIn(pathB);\n</code></pre>\n<hr>\n<hr>\n<blockquote>\n<p>will replace any spaces in file names with an underscore!</p>\n</blockquote>\n<pre><code class=\"language-bash\"> for file in *; do mv \"$file\" `echo $file | tr ' ' '_'` ; done\n  ## TAKING IT A STEP FURTHER:\n # Let's do it recursivley:\n  function RecurseDirs ()\n{\n    oldIFS=$IFS\n    IFS=$'\\n'\n    for f in \"$@\"\n    do\n  # YOUR CODE HERE!\n\n[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)]\n\nfor file in \\*; do mv \"$file\" `echo $file | tr ' ' '_'` ; done\n        if [[ -d \"${f}\" ]]; then\ncd \"${f}\"\n            RecurseDirs $(ls -1 \".\")\n            cd ..\n        fi\n    done\n    IFS=$oldIFS\n}\nRecurseDirs \"./\"\n</code></pre>\n<hr>\n<h3>Copy to clipboard jQuerry</h3>\n<blockquote>\n<p>Language: Javascript/Jquery</p>\n</blockquote>\n<blockquote>\n<p>In combination with the script tag : <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\"></script> , this snippet will add a copy to clipboard button to all of your embedded <code> blocks.</p>\n</blockquote>\n<pre><code class=\"language-js\">$(document).ready(function () {\n  $(\"code, pre\").append(\n    '&#x3C;span class=\"command-copy\" >&#x3C;i class=\"fa fa-clipboard\" aria-hidden=\"true\">&#x3C;/i>&#x3C;/span>'\n  );\n  $(\"code span.command-copy\").click(function (e) {\n    var text = $(this).parent().text().trim(); //.text();\n    var copyHex = document.createElement(\"input\");\n    copyHex.value = text;\n    document.body.appendChild(copyHex);\n    copyHex.select();\n    document.execCommand(\"copy\");\n    console.log(copyHex.value);\n    document.body.removeChild(copyHex);\n  });\n\n  $(\"pre span.command-copy\").click(function (e) {\n    var text = $(this).parent().text().trim();\n    var copyHex = document.createElement(\"input\");\n    copyHex.value = text;\n    document.body.appendChild(copyHex);\n    copyHex.select();\n    document.execCommand(\"copy\");\n    console.log(copyHex.value);\n    document.body.removeChild(copyHex);\n  });\n});\n</code></pre>\n<hr>\n<h3>Append Files in PWD</h3>\n<pre><code class=\"language-js\">//APPEND-DIR.js\nconst fs = require(\"fs\");\nlet cat = require(\"child_process\").execSync(\"cat *\").toString(\"UTF-8\");\nfs.writeFile(\"output.md\", cat, (err) => {\n  if (err) throw err;\n});\n</code></pre>\n<hr>\n<h3>doesUserFrequentStarbucks.js</h3>\n<pre><code class=\"language-js\">const isAppleDevice = /Mac|iPod|iPhone|iPad/.test(navigator.platform);\nconsole.log(isAppleDevice);\n// Result: will return true if user is on an Apple device\n</code></pre>\n<hr>\n<h3>arr-intersection.js</h3>\n<pre><code class=\"language-js\">/*\n function named intersection(firstArr) that takes in an array and\nreturns a function. \nWhen the function returned by intersection is invoked\npassing in an array (secondArr) it returns a new array containing the elements\ncommon to both firstArr and secondArr.\n*/\nfunction intersection(firstArr) {\n  return (secondArr) => {\n    let common = [];\n    for (let i = 0; i &#x3C; firstArr.length; i++) {\n      let el = firstArr[i];\n      if (secondArr.indexOf(el) > -1) {\n        common.push(el);\n      }\n    }\n    return common;\n  };\n}\nlet abc = intersection([\"a\", \"b\", \"c\"]); // returns a function\nconsole.log(abc([\"b\", \"d\", \"c\"])); // returns [ 'b', 'c' ]\n\nlet fame = intersection([\"f\", \"a\", \"m\", \"e\"]); // returns a function\nconsole.log(fame([\"a\", \"f\", \"z\", \"b\"])); // returns [ 'f', 'a' ]\n</code></pre>\n<hr>\n<h3>arr-of-cum-partial-sums.js</h3>\n<pre><code class=\"language-js\">/*\nFirst is recurSum(arr, start) which returns the sum of the elements of arr from the index start till the very end.\nSecond is partrecurSum() that recursively concatenates the required sum into an array and when we reach the end of the array, it returns the concatenated array.\n*/\n//arr.length -1 = 5\n//                   arr   [    1,    7,    12,   6,    5,    10   ]\n//                   ind   [    0     1     2     3     4      5   ]\n//                              ↟                              ↟\n//                            start                           end\n\nfunction recurSum(arr, start = 0, sum = 0) {\n  if (start &#x3C; arr.length) {\n    return recurSum(arr, start + 1, sum + arr[start]);\n  }\n  return sum;\n}\n\nfunction rPartSumsArr(arr, partSum = [], start = 0, end = arr.length - 1) {\n  if (start &#x3C;= end) {\n    return rPartSumsArr(\n      arr,\n      partSum.concat(recurSum(arr, start)),\n      ++start,\n      end\n    );\n  }\n  return partSum.reverse();\n}\n\nconsole.log(\n  \"------------------------------------------------rPartSumArr------------------------------------------------\"\n);\nconsole.log(\"rPartSumsArr(arr)=[ 1, 1, 5, 2, 6, 10 ]: \", rPartSumsArr(arr));\nconsole.log(\"rPartSumsArr(arr1)=[ 1, 7, 12, 6, 5, 10 ]: \", rPartSumsArr(arr1));\nconsole.log(\n  \"------------------------------------------------rPartSumArr------------------------------------------------\"\n);\n/*\n------------------------------------------------rPartSumArr------------------------------------------------\nrPartSumsArr(arr)=[ 1, 1, 5, 2, 6, 10 ]:  [ 10, 16, 18, 23, 24, 25 ]\nrPartSumsArr(arr1)=[ 1, 7, 12, 6, 5, 10 ]:  [ 10, 15, 21, 33, 40, 41 ]\n------------------------------------------------rPartSumArr------------------------------------------------\n*/\n</code></pre>\n<hr>\n<h3>camel2Kabab.js</h3>\n<pre><code class=\"language-js\">function camelToKebab(value) {\n  return value.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n</code></pre>\n<hr>\n<h3>camelCase.js</h3>\n<pre><code class=\"language-js\">function camel(str) {\n  return str.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function (match, index) {\n    if (+match === 0) return \"\"; // or if (/\\s+/.test(match)) for white spaces\n    return index === 0 ? match.toLowerCase() : match.toUpperCase();\n  });\n}\n</code></pre>\n<hr>\n<h3>concatLinkedLists.js</h3>\n<pre><code class=\"language-js\">function addTwoNumbers(l1, l2) {\n  let result = new ListNode(0);\n  let currentNode = result;\n  let carryOver = 0;\n  while (l1 != null || l2 != null) {\n    let v1 = 0;\n    let v2 = 0;\n    if (l1 != null) v1 = l1.val;\n    if (l2 != null) v2 = l2.val;\n    let sum = v1 + v2 + carryOver;\n    carryOver = Math.floor(sum / 10);\n    sum = sum % 10;\n    currentNode.next = new ListNode(sum);\n    currentNode = currentNode.next;\n    if (l1 != null) l1 = l1.next;\n    if (l2 != null) l2 = l2.next;\n  }\n  if (carryOver > 0) {\n    currentNode.next = new ListNode(carryOver);\n  }\n  return result.next;\n}\n</code></pre>\n<hr>\n<h3>fast-is-alpha-numeric.js</h3>\n<pre><code class=\"language-js\">//Function to test if a character is alpha numeric that is faster than a regular\n//expression in JavaScript\n\nlet isAlphaNumeric = (char) => {\n  char = char.toString();\n  let id = char.charCodeAt(0);\n  if (\n    !(id > 47 &#x26;&#x26; id &#x3C; 58) &#x26;&#x26; // if not numeric(0-9)\n    !(id > 64 &#x26;&#x26; id &#x3C; 91) &#x26;&#x26; // if not letter(A-Z)\n    !(id > 96 &#x26;&#x26; id &#x3C; 123) // if not letter(a-z)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconsole.log(isAlphaNumeric(\"A\")); //true\nconsole.log(isAlphaNumeric(2)); //true\nconsole.log(isAlphaNumeric(\"z\")); //true\nconsole.log(isAlphaNumeric(\" \")); //false\nconsole.log(isAlphaNumeric(\"!\")); //false\n</code></pre>\n<hr>\n<h3>find-n-replace.js</h3>\n<pre><code class=\"language-js\">function replaceWords(str, before, after) {\n  if (/^[A-Z]/.test(before)) {\n    after = after[0].toUpperCase() + after.substring(1);\n  } else {\n    after = after[0].toLowerCase() + after.substring(1);\n  }\n  return str.replace(before, after);\n}\nconsole.log(replaceWords(\"Let us go to the store\", \"store\", \"mall\")); //\"Let us go to the mall\"\nconsole.log(replaceWords(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")); //\"He is Sitting on the couch\"\nconsole.log(replaceWords(\"His name is Tom\", \"Tom\", \"john\"));\n//\"His name is John\"\n</code></pre>\n<hr>\n<h3>flatten-arr.js</h3>\n<pre><code class=\"language-js\">/*Simple Function to flatten an array into a single layer */\nconst flatten = (array) =>\n  array.reduce(\n    (accum, ele) => accum.concat(Array.isArray(ele) ? flatten(ele) : ele),\n    []\n  );\n</code></pre>\n<hr>\n<h3>isWeekDay.js</h3>\n<pre><code class=\"language-js\">const isWeekday = (date) => date.getDay() % 6 !== 0;\nconsole.log(isWeekday(new Date(2021, 0, 11)));\n// Result: true (Monday)\nconsole.log(isWeekday(new Date(2021, 0, 10)));\n// Result: false (Sunday)\n</code></pre>\n<hr>\n<h3>longest-common-prefix.js</h3>\n<pre><code class=\"language-js\">function longestCommonPrefix(strs) {\n  let prefix = \"\";\n  if (strs.length === 0) return prefix;\n  for (let i = 0; i &#x3C; strs[0].length; i++) {\n    const character = strs[0][i];\n    for (let j = 0; j &#x3C; strs.length; j++) {\n      if (strs[j][i] !== character) return prefix;\n    }\n    prefix = prefix + character;\n  }\n  return prefix;\n}\n</code></pre>"},{"url":"/docs/","relativePath":"docs/index.md","relativeDir":"docs","base":"index.md","name":"index","frontmatter":{"title":"Docs","seo":{"title":"Web Dev Hub","description":"Application, Back-end, Bootstrap, Browser, Caching, Code, CSS, Content Management System (CMS) , Cookies, Domain Name ,Frameworks, Front-end, JavaScript, Python","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Web Dev Hub","keyName":"property"},{"name":"og:description","value":"Docs Home","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Web Dev Hub"},{"name":"twitter:description","value":"Docs Home"}]},"template":"docs","weight":900,"excerpt":"docs quick reference","thumb_img":"images/docs-d74e2940.png","date":"2022-01-21"},"html":"<h1>Go To Sitemap: <a href=\"./docs/sitemap/\">Go Now --></a></h1>\n<hr>\n<div id=\"search\"></div>\n<h1>Actual Docs:</h1>\n<br>\n<br>\n<pre><code>   &#x3C;div id=\"search\" />\n</code></pre>\n<br>\n               <div id=\"search\" className=\"inner\"></div>\n<br>\n<h1>  Docs</h1>\n<br>\n<iframe class=\"inner\" src=\"https://docs42.netlify.app/#C:/MY-WEB-DEV/__NEW_GIT/DOCS/docs-collection\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<h1>Gitpod Docs</h1>\n<br>\n<iframe class=\"inner\" src=\"https://archive-42.github.io/my-docs-gitpod-html/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<hr>\n<h2>Doc Websites &#x26; Repos</h2>\n<ul>\n<li><a href=\"https://github.com/bgoonz/PYTHON_PRAC\">Python Practice</a></li>\n<li><a href=\"https://lambda-resources.netlify.app/\">Lambda Bootcamp Website</a></li>\n<li><a href=\"https://github.com/bgoonz/React_Notes_V3\">React Notes</a></li>\n<li><a href=\"https://github.com/bgoonz/Project-Showcase\">Project Showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\">Data Structures &#x26; Algorithms</a></li>\n<li><a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\">Lambda Site Static Content Server</a></li>\n<li><a href=\"https://github.com/bgoonz/mini-project-showcase\">Mini-Project Showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/Useful-Snippets-js\">Useful Snippets</a></li>\n<li><a href=\"https://github.com/bgoonz/Markdown-Templates\">Markdown Templates</a></li>\n<li><a href=\"https://github.com/bgoonz/zumzi-chat-messenger\">Zumzi Video Conferencing App (mesibo api backend)</a></li>\n</ul>"},{"url":"/docs/search/","relativePath":"docs/search.md","relativeDir":"docs","base":"search.md","name":"search","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Search:</h2>\n<hr>\n<h1>Actual Docs:</h1>\n<br>\n<br>\n<br>\n<br>\n<h1>  Docs</h1>\n<br>\n<div id=\"search\"></div>\n<div id=\"search\" />"},{"url":"/docs/privacy-policy/","relativePath":"docs/privacy-policy.md","relativeDir":"docs","base":"privacy-policy.md","name":"privacy-policy","frontmatter":{"title":"Privacy Policy","weight":0,"excerpt":"Privacy Policy","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<pre><code>PRIVACY NOTICE\n</code></pre>\n<ul>\n<li>Visit our website at <a href=\"https://bgoonz-blog.netlify.app/\">https://bgoonz-blog.netlify.app/</a></li>\n</ul>\n<!---->\n<ul>\n<li>Use our Facebook application — <a href=\"https://bgoonz-blog.netlify.app/\">https://bgoonz-blog.netlify.app/</a></li>\n</ul>\n<!---->\n<ul>\n<li>Engage with us in other related ways ― including any sales, marketing, or events</li>\n</ul>\n<!---->\n<ul>\n<li>\"<strong>Website</strong>,\" we are referring to any website of ours that references or links to this policy</li>\n</ul>\n<!---->\n<ul>\n<li>\"<strong>App</strong>,\" we are referring to any application of ours that references or links to this policy, including any listed above</li>\n</ul>\n<!---->\n<ul>\n<li>\"<strong>Services</strong>,\" we are referring to our Website, App, and other related services, including any sales, marketing, or events</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To facilitate account creation and logon process.</strong> If you choose to link your account with us to a third-party account (such as your Google or Facebook account), we use the information you allowed us to collect from those third parties to facilitate account creation and logon process for the performance of the contract.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To post testimonials.</strong> We post testimonials on our Services that may contain personal information. Prior to posting a testimonial, we will obtain your consent to use your name and the content of the testimonial. If you wish to update, or delete your testimonial, please contact us at __________ and be sure to include your name, testimonial location, and contact information.</li>\n</ul>\n<!---->\n<ul>\n<li>**Request feedback. **We may use your information to request feedback and to contact you about your use of our Services.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To enable user-to-user communications.</strong> We may use your information in order to enable user-to-user communications with each user's consent.</li>\n</ul>\n<!---->\n<ul>\n<li>**To manage user accounts. **We may use your information for the purposes of managing our account and keeping it in working order.</li>\n</ul>\n<!---->\n<ul>\n<li>**To send administrative information to you. **We may use your personal information to send you product, service and new feature information and/or information about changes to our terms, conditions, and policies.</li>\n</ul>\n<!---->\n<ul>\n<li>**To protect our Services. **We may use your information as part of our efforts to keep our Services safe and secure (for example, for fraud monitoring and prevention).</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To enforce our terms, conditions and policies for business purposes, to comply with legal and regulatory requirements or in connection with our contract.</strong></li>\n</ul>\n<!---->\n<ul>\n<li>**To respond to legal requests and prevent harm. **If we receive a subpoena or other legal request, we may need to inspect the data we hold to determine how to respond.</li>\n<li>**Fulfill and manage your orders. **We may use your information to fulfill and manage your orders, payments, returns, and exchanges made through the Services.</li>\n<li><strong>Administer prize draws and competitions.</strong> We may use your information to administer prize draws and competitions when you elect to participate in our competitions.</li>\n<li><strong>To deliver and facilitate delivery of services to the user.</strong> We may use your information to provide you with the requested service.</li>\n<li><strong>To respond to user inquiries/offer support to users.</strong> We may use your information to respond to your inquiries and solve any potential issues you might have with the use of our Services.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>To send you marketing and promotional communications.</strong> We and/or our third-party marketing partners may use the personal information you send to us for our marketing purposes, if this is in accordance with your marketing preferences. For example, when expressing an interest in obtaining information about us or our Services, subscribing to marketing or otherwise contacting us, we will collect personal information from you. You can opt-out of our marketing emails at any time (see the \"<a href=\"https://cdpn.io/bgoonz/fullpage/LYLJZrW#privacyrights\">WHAT ARE YOUR PRIVACY RIGHTS?</a>\" below).</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Deliver targeted advertising to you.</strong> We may use your information to develop and display personalized content and advertising (and work with third parties who do so) tailored to your interests and/or location and to measure its effectiveness.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Consent:</strong> We may process your data if you have given us specific consent to use your personal information for a specific purpose.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Legitimate Interests:</strong> We may process your data when it is reasonably necessary to achieve our legitimate business interests.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Performance of a Contract:</strong> Where we have entered into a contract with you, we may process your personal information to fulfill the terms of our contract.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Legal Obligations:</strong> We may disclose your information where we are legally required to do so in order to comply with applicable law, governmental requests, a judicial proceeding, court order, or legal process, such as in response to a court order or a subpoena (including in response to public authorities to meet national security or law enforcement requirements).</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Vital Interests:</strong> We may disclose your information where we believe it is necessary to investigate, prevent, or take action regarding potential violations of our policies, suspected fraud, situations involving potential threats to the safety of any person and illegal activities, or as evidence in litigation in which we are involved.</li>\n</ul>\n<!---->\n<ul>\n<li><strong>Business Transfers.</strong> We may share or transfer your information in connection with, or during negotiations of, any merger, sale of company assets, financing, or acquisition of all or a portion of our business to another company.</li>\n</ul>\n<!---->\n<ul>\n<li>Receiving help through our customer support channels;</li>\n</ul>\n<!---->\n<ul>\n<li>Participation in customer surveys or contests; and</li>\n</ul>\n<!---->\n<ul>\n<li>Facilitation in the delivery of our Services and to respond to your inquiries.</li>\n</ul>\n<!---->\n<ul>\n<li>whether we collect and use your personal information;</li>\n</ul>\n<!---->\n<ul>\n<li>the categories of personal information that we collect;</li>\n</ul>\n<!---->\n<ul>\n<li>the purposes for which the collected personal information is used;</li>\n</ul>\n<!---->\n<ul>\n<li>whether we sell your personal information to third parties;</li>\n</ul>\n<!---->\n<ul>\n<li>the categories of personal information that we sold or disclosed for a business purpose;</li>\n</ul>\n<!---->\n<ul>\n<li>the categories of third parties to whom the personal information was sold or disclosed for a business purpose; and</li>\n</ul>\n<!---->\n<ul>\n<li>the business or commercial purpose for collecting or selling personal information.</li>\n</ul>\n<!---->\n<ul>\n<li>you may object to the processing of your personal data</li>\n</ul>\n<!---->\n<ul>\n<li>you may request correction of your personal data if it is incorrect or no longer relevant, or ask to restrict the processing of the data</li>\n</ul>\n<!---->\n<ul>\n<li>you can designate an authorized agent to make a request under the CCPA on your behalf. We may deny a request from an authorized agent that does not submit proof that they have been validly authorized to act on your behalf in accordance with the CCPA.</li>\n</ul>\n<!---->\n<ul>\n<li>you may request to opt-out from future selling of your personal information to third parties. Upon receiving a request to opt-out, we will act upon the request as soon as feasibly possible, but no later than 15 days from the date of the request submission.</li>\n</ul>"},{"url":"/docs/about/eng-portfolio/","relativePath":"docs/about/eng-portfolio.md","relativeDir":"docs/about","base":"eng-portfolio.md","name":"eng-portfolio","frontmatter":{"title":"Engineering Portfolio","weight":0,"seo":{"title":"Engineering Portfolio","description":"This is an Engineering Portfolio page that contains a powerpoint portfolio of my work as an electrical engineer!","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Engineering Portfolio","keyName":"property"},{"name":"og:description","value":"This is the Engineering Portfolio page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Engineering Portfolio"},{"name":"twitter:description","value":"This is the Engineering Portfolio page"}]},"template":"docs"},"html":"<h1>Portfolio</h1>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&amp;resid=D21009FDD967A241%21671966&amp;authkey=APaBpP1yOouJY88&amp;em=2&amp;wdAr=1.7777777777777777\" width=\"1186px\" height=\"691px\" frameborder=\"0\">This is an embedded <a target=\"_blank\" href=\"https://office.com\">Microsoft Office</a> presentation, powered by <a target=\"_blank\" href=\"https://office.com/webapps\">Office</a>.</iframe>\n<iframe src=\"https://codesandbox.io/embed/bold-surf-xfsiq?fontsize=14&hidenavigation=1&theme=dark&view=preview\"\nstyle=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\ntitle=\"bold-surf-xfsiq\"\nallow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n></iframe>"},{"url":"/docs/about/README/","relativePath":"docs/about/README.md","relativeDir":"docs/about","base":"README.md","name":"README","frontmatter":{"title":"readme","weight":0,"excerpt":"readme","seo":{"title":"","description":"website documentation","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<div align=\"center\">\n<h1><a href=\"https://bgoonz-blog.netlify.app/\">⇨WEBSITE🗺️⇦</a></h1>\n<h5><a href=\"https://codepen.io/bgoonz/pen/LYLJZrW\">⇨Privacy policy⇦</a></h5>\n</div>\n<hr>\n<div align=\"center\">\n<h5><a href=\"https://bgoonz-blog-2-0.pages.dev/\">Cloudfare-Backup</a> ⇨ <a href=\"https://www.algolia.com/realtime-search-demo/web-dev-resource-hub-9e6b8aa8-6106-44c5-9f59-ff3f9531abd4\">search</a> ⇨ <a href=\"https://bgoonzblog20-backup.netlify.app/#gsc.tab=0\">Backup Repo Deploy</a> ⇨ <a href=\"https://bgoonz.github.io/BGOONZ_BLOG_2.0/\">Github pages</a> ⇨ <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki\">Go To Site Wiki</a>  ⇨ <a href=\"https://bgoonzblog20master.gatsbyjs.io/\">Gatsby Cloud Version</a></h5>\n</div>\n<div align=\"center\">\n<p><a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys\"><img src=\"https://api.netlify.com/api/v1/badges/a1b7ee1a-11a7-4bd2-a341-2260656e216f/deploy-status\" alt=\"Netlify Status\"></a><a href=\"https://www.codefactor.io/repository/github/webdevhub42/bgoonz_blog_2.0\"><img src=\"https://www.codefactor.io/repository/github/webdevhub42/bgoonz_blog_2.0/badge\" alt=\"CodeFactor\"></a><a href=\"https://codescene.io/projects/17026\"><img src=\"https://codescene.io/projects/17026/status-badges/system-mastery\" alt=\"CodeScene System Mastery**\"></a><img src=\"https://views.whatilearened.today/views/github/bgoonz/views.svg\" alt=\"Profile views**\"><a href=\"https://gitter.im/bgoonz/community?utm_source=badge&#x26;utm_medium=badge&#x26;utm_campaign=pr-badge\"><img src=\"https://badges.gitter.im/bgoonz/community.svg\" alt=\"Gitter**\"></a><a href=\"https://codescene.io/projects/17026\"><img src=\"https://codescene.io/projects/17026/status-badges/code-health\" alt=\"CodeScene Code Health\"></a><a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/codeql-analysis.yml\"><img src=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/codeql-analysis.yml/badge.svg\" alt=\"CodeQL\"></a></p>\n<p><a href=\"https://app.getpostman.com/run-collection/aac9892cd5e6fe8241ce?action=collection%2Fimport#?env%5Bblog%5D=dW5kZWZpbmVk\"><img src=\"https://run.pstmn.io/button.svg\" alt=\"Run in Postman\"></a><img src=\"https://visitor-badge-reloaded.herokuapp.com/badge?page_id=bgoonz.visitor.badge.reloaded&#x26;color=00bbbb&#x26;style=for-the-badge&#x26;logo=github\" alt=\"GitHub visitors\"></p>\n</div>\n<details>"},{"url":"/blog/web-scraping/","relativePath":"blog/web-scraping.md","relativeDir":"blog","base":"web-scraping.md","name":"web-scraping","frontmatter":{"title":"Webscraping w nodejs","date":"2021-07-26","image":"images/web-development.gif","seo":{"title":"webscraping","description":"There are a lot of use cases for web scraping","extra":[{"name":"og:type","value":"article","keyName":"property"},{"name":"og:title","value":"Platform Docs","keyName":"property"},{"name":"og:description","value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit","keyName":"property"},{"name":"og:image","value":"images/curious-europa.gif","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Platform Docs"},{"name":"twitter:description","value":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{"name":"twitter:image","value":"images/web-development.gif","relativeUrl":true}]},"template":"post","thumb_image":"images/webscrape.jpeg","thumb_image_alt":"webscraping"},"html":"<h1>Web Scraping with Node.js</h1>\n<blockquote>\n<p>So what's web scraping anyway? It involves automating away the laborious task of collecting information from websites. There are a lot of use cases for web scraping: you might want to collect prices from various e-commerce sites for a price comparison site. Or perhaps you need flight times and</p>\n</blockquote>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*KkVKtysvgh2hIVRI1Irk-Q.jpeg\" alt=\"The Ultimate Guide to Web Scraping with Node.js\"></p>\n<p>So what's web scraping anyway? It involves automating away the laborious task of collecting information from websites.</p>\n<p>There are a lot of use cases for web scraping: you might want to collect prices from various e-commerce sites for a price comparison site. Or perhaps you need flight times and hotel/AirBNB listings for a travel site. Maybe you want to collect emails from various directories for sales leads, or use data from the internet to train machine learning/AI models. Or you could even be wanting to build a search engine like Google!</p>\n<p>Getting started with web scraping is easy, and the process can be broken down into two main parts:</p>\n<ul>\n<li>acquiring the data using an HTML request library or a headless browser,</li>\n<li>and parsing the data to get the exact information you want.</li>\n</ul>\n<p>This guide will walk you through the process with the popular Node.js <a href=\"https://github.com/request/request-promise\">request-promise</a> module, <a href=\"https://github.com/cheeriojs/cheerio\">CheerioJS</a>, and <a href=\"https://github.com/GoogleChrome/puppeteer\">Puppeteer</a>. Working through the examples in this guide, you will learn all the tips and tricks you need to become a pro at gathering any data you need with Node.js!</p>\n<p>We will be gathering a list of all the names and birthdays of U.S. presidents from Wikipedia and the titles of all the posts on the front page of Reddit.</p>\n<p>First things first: Let's install the libraries we'll be using in this guide (Puppeteer will take a while to install as it needs to download Chromium as well).</p>\n<h3>Making your first request</h3>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-install-libraries-L1\" data-line-number=\"1\"></td><td id=\"file-install-libraries-LC1\">npm install --save request request-promise cheerio puppeteer</td></tr></tbody></table>\n<p>Next, let's open a new text file (name the file potusScraper.js), and write a quick function to get the HTML of the Wikipedia \"List of Presidents\" page.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusscraper-js-v1-L1\" data-line-number=\"1\"></td><td id=\"file-potusscraper-js-v1-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusscraper-js-v1-L2\" data-line-number=\"2\"></td><td id=\"file-potusscraper-js-v1-LC2\">const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States';</td></tr><tr><td id=\"file-potusscraper-js-v1-L3\" data-line-number=\"3\"></td><td id=\"file-potusscraper-js-v1-LC3\"></td></tr><tr><td id=\"file-potusscraper-js-v1-L4\" data-line-number=\"4\"></td><td id=\"file-potusscraper-js-v1-LC4\">rp(url)</td></tr><tr><td id=\"file-potusscraper-js-v1-L5\" data-line-number=\"5\"></td><td id=\"file-potusscraper-js-v1-LC5\">.then(function(html){</td></tr><tr><td id=\"file-potusscraper-js-v1-L6\" data-line-number=\"6\"></td><td id=\"file-potusscraper-js-v1-LC6\">//success!</td></tr><tr><td id=\"file-potusscraper-js-v1-L7\" data-line-number=\"7\"></td><td id=\"file-potusscraper-js-v1-LC7\">console.log(html);</td></tr><tr><td id=\"file-potusscraper-js-v1-L8\" data-line-number=\"8\"></td><td id=\"file-potusscraper-js-v1-LC8\">})</td></tr><tr><td id=\"file-potusscraper-js-v1-L9\" data-line-number=\"9\"></td><td id=\"file-potusscraper-js-v1-LC9\">.catch(function(err){</td></tr><tr><td id=\"file-potusscraper-js-v1-L10\" data-line-number=\"10\"></td><td id=\"file-potusscraper-js-v1-LC10\">//handle error</td></tr><tr><td id=\"file-potusscraper-js-v1-L11\" data-line-number=\"11\"></td><td id=\"file-potusscraper-js-v1-LC11\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusscraper-js-v1-output-L1\" data-line-number=\"1\"></td><td id=\"file-potusscraper-js-v1-output-LC1\">&lt;!DOCTYPE html&gt;</td></tr><tr><td id=\"file-potusscraper-js-v1-output-L2\" data-line-number=\"2\"></td><td id=\"file-potusscraper-js-v1-output-LC2\">&lt;html class=\"client-nojs\" lang=\"en\" dir=\"ltr\"&gt;</td></tr><tr><td id=\"file-potusscraper-js-v1-output-L3\" data-line-number=\"3\"></td><td id=\"file-potusscraper-js-v1-output-LC3\">&lt;head&gt;</td></tr><tr><td id=\"file-potusscraper-js-v1-output-L4\" data-line-number=\"4\"></td><td id=\"file-potusscraper-js-v1-output-LC4\">&lt;meta charset=\"UTF-8\"/&gt;</td></tr><tr><td id=\"file-potusscraper-js-v1-output-L5\" data-line-number=\"5\"></td><td id=\"file-potusscraper-js-v1-output-LC5\">&lt;title&gt;List of Presidents of the United States - Wikipedia&lt;/title&gt;</td></tr><tr><td id=\"file-potusscraper-js-v1-output-L6\" data-line-number=\"6\"></td><td id=\"file-potusscraper-js-v1-output-LC6\">...</td></tr></tbody></table>\n<h3>Using Chrome DevTools</h3>\n<p>Cool, we got the raw HTML from the web page! But now we need to make sense of this giant blob of text. To do that, we'll need to use Chrome DevTools to allow us to easily search through the HTML of a web page.</p>\n<p>Using Chrome DevTools is easy: simply open Google Chrome, and right click on the element you would like to scrape (in this case I am right clicking on George Washington, because we want to get links to all of the individual presidents' Wikipedia pages):</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*gLKhu_EO-cDqYna1P9WL_w.png\"></p>\n<p>Now, simply click inspect, and Chrome will bring up its DevTools pane, allowing you to easily inspect the page's source HTML.</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*HSUjFgji22vjwvGi2uZe1A.png\"></p>\n<h3>Parsing HTML with Cheerio.js</h3>\n<p>Awesome, Chrome DevTools is now showing us the exact pattern we should be looking for in the code (a \"big\" tag with a hyperlink inside of it). Let's use Cheerio.js to parse the HTML we received earlier to return a list of links to the individual Wikipedia pages of U.S. presidents.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusscraper-js-v2-L1\" data-line-number=\"1\"></td><td id=\"file-potusscraper-js-v2-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusscraper-js-v2-L2\" data-line-number=\"2\"></td><td id=\"file-potusscraper-js-v2-LC2\">const $ = require('cheerio');</td></tr><tr><td id=\"file-potusscraper-js-v2-L3\" data-line-number=\"3\"></td><td id=\"file-potusscraper-js-v2-LC3\">const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States';</td></tr><tr><td id=\"file-potusscraper-js-v2-L4\" data-line-number=\"4\"></td><td id=\"file-potusscraper-js-v2-LC4\"></td></tr><tr><td id=\"file-potusscraper-js-v2-L5\" data-line-number=\"5\"></td><td id=\"file-potusscraper-js-v2-LC5\">rp(url)</td></tr><tr><td id=\"file-potusscraper-js-v2-L6\" data-line-number=\"6\"></td><td id=\"file-potusscraper-js-v2-LC6\">.then(function(html){</td></tr><tr><td id=\"file-potusscraper-js-v2-L7\" data-line-number=\"7\"></td><td id=\"file-potusscraper-js-v2-LC7\">//success!</td></tr><tr><td id=\"file-potusscraper-js-v2-L8\" data-line-number=\"8\"></td><td id=\"file-potusscraper-js-v2-LC8\">console.log($('big &gt; a', html).length);</td></tr><tr><td id=\"file-potusscraper-js-v2-L9\" data-line-number=\"9\"></td><td id=\"file-potusscraper-js-v2-LC9\">console.log($('big &gt; a', html));</td></tr><tr><td id=\"file-potusscraper-js-v2-L10\" data-line-number=\"10\"></td><td id=\"file-potusscraper-js-v2-LC10\">})</td></tr><tr><td id=\"file-potusscraper-js-v2-L11\" data-line-number=\"11\"></td><td id=\"file-potusscraper-js-v2-LC11\">.catch(function(err){</td></tr><tr><td id=\"file-potusscraper-js-v2-L12\" data-line-number=\"12\"></td><td id=\"file-potusscraper-js-v2-LC12\">//handle error</td></tr><tr><td id=\"file-potusscraper-js-v2-L13\" data-line-number=\"13\"></td><td id=\"file-potusscraper-js-v2-LC13\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusscraper-js-v2-output-L1\" data-line-number=\"1\"></td><td id=\"file-potusscraper-js-v2-output-LC1\">45</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L2\" data-line-number=\"2\"></td><td id=\"file-potusscraper-js-v2-output-LC2\">{ '0':</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L3\" data-line-number=\"3\"></td><td id=\"file-potusscraper-js-v2-output-LC3\">{ type: 'tag',</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L4\" data-line-number=\"4\"></td><td id=\"file-potusscraper-js-v2-output-LC4\">name: 'a',</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L5\" data-line-number=\"5\"></td><td id=\"file-potusscraper-js-v2-output-LC5\">attribs: { href: '/wiki/George_Washington', title: 'George Washington' },</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L6\" data-line-number=\"6\"></td><td id=\"file-potusscraper-js-v2-output-LC6\">children: [ [Object] ],</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L7\" data-line-number=\"7\"></td><td id=\"file-potusscraper-js-v2-output-LC7\">next: null,</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L8\" data-line-number=\"8\"></td><td id=\"file-potusscraper-js-v2-output-LC8\">prev: null,</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L9\" data-line-number=\"9\"></td><td id=\"file-potusscraper-js-v2-output-LC9\">parent:</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L10\" data-line-number=\"10\"></td><td id=\"file-potusscraper-js-v2-output-LC10\">{ type: 'tag',</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L11\" data-line-number=\"11\"></td><td id=\"file-potusscraper-js-v2-output-LC11\">name: 'big',</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L12\" data-line-number=\"12\"></td><td id=\"file-potusscraper-js-v2-output-LC12\">attribs: {},</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L13\" data-line-number=\"13\"></td><td id=\"file-potusscraper-js-v2-output-LC13\">children: [Array],</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L14\" data-line-number=\"14\"></td><td id=\"file-potusscraper-js-v2-output-LC14\">next: null,</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L15\" data-line-number=\"15\"></td><td id=\"file-potusscraper-js-v2-output-LC15\">prev: null,</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L16\" data-line-number=\"16\"></td><td id=\"file-potusscraper-js-v2-output-LC16\">parent: [Object] } },</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L17\" data-line-number=\"17\"></td><td id=\"file-potusscraper-js-v2-output-LC17\">'1':</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L18\" data-line-number=\"18\"></td><td id=\"file-potusscraper-js-v2-output-LC18\">{ type: 'tag'</td></tr><tr><td id=\"file-potusscraper-js-v2-output-L19\" data-line-number=\"19\"></td><td id=\"file-potusscraper-js-v2-output-LC19\">...</td></tr></tbody></table>\n<p>We check to make sure there are exactly 45 elements returned (the number of U.S. presidents), meaning there aren't any extra hidden \"big\" tags elsewhere on the page. Now, we can go through and grab a list of links to all 45 presidential Wikipedia pages by getting them from the \"attribs\" section of each element.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusscraper-js-v3-L1\" data-line-number=\"1\"></td><td id=\"file-potusscraper-js-v3-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusscraper-js-v3-L2\" data-line-number=\"2\"></td><td id=\"file-potusscraper-js-v3-LC2\">const $ = require('cheerio');</td></tr><tr><td id=\"file-potusscraper-js-v3-L3\" data-line-number=\"3\"></td><td id=\"file-potusscraper-js-v3-LC3\">const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States';</td></tr><tr><td id=\"file-potusscraper-js-v3-L4\" data-line-number=\"4\"></td><td id=\"file-potusscraper-js-v3-LC4\"></td></tr><tr><td id=\"file-potusscraper-js-v3-L5\" data-line-number=\"5\"></td><td id=\"file-potusscraper-js-v3-LC5\">rp(url)</td></tr><tr><td id=\"file-potusscraper-js-v3-L6\" data-line-number=\"6\"></td><td id=\"file-potusscraper-js-v3-LC6\">.then(function(html){</td></tr><tr><td id=\"file-potusscraper-js-v3-L7\" data-line-number=\"7\"></td><td id=\"file-potusscraper-js-v3-LC7\">//success!</td></tr><tr><td id=\"file-potusscraper-js-v3-L8\" data-line-number=\"8\"></td><td id=\"file-potusscraper-js-v3-LC8\">const wikiUrls = [];</td></tr><tr><td id=\"file-potusscraper-js-v3-L9\" data-line-number=\"9\"></td><td id=\"file-potusscraper-js-v3-LC9\">for (let i = 0; i &lt; 45; i++) {</td></tr><tr><td id=\"file-potusscraper-js-v3-L10\" data-line-number=\"10\"></td><td id=\"file-potusscraper-js-v3-LC10\">wikiUrls.push($('big &gt; a', html)[i].attribs.href);</td></tr><tr><td id=\"file-potusscraper-js-v3-L11\" data-line-number=\"11\"></td><td id=\"file-potusscraper-js-v3-LC11\">}</td></tr><tr><td id=\"file-potusscraper-js-v3-L12\" data-line-number=\"12\"></td><td id=\"file-potusscraper-js-v3-LC12\">console.log(wikiUrls);</td></tr><tr><td id=\"file-potusscraper-js-v3-L13\" data-line-number=\"13\"></td><td id=\"file-potusscraper-js-v3-LC13\">})</td></tr><tr><td id=\"file-potusscraper-js-v3-L14\" data-line-number=\"14\"></td><td id=\"file-potusscraper-js-v3-LC14\">.catch(function(err){</td></tr><tr><td id=\"file-potusscraper-js-v3-L15\" data-line-number=\"15\"></td><td id=\"file-potusscraper-js-v3-LC15\">//handle error</td></tr><tr><td id=\"file-potusscraper-js-v3-L16\" data-line-number=\"16\"></td><td id=\"file-potusscraper-js-v3-LC16\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusscraper-js-v3-output-L1\" data-line-number=\"1\"></td><td id=\"file-potusscraper-js-v3-output-LC1\"></td></tr><tr><td id=\"file-potusscraper-js-v3-output-L2\" data-line-number=\"2\"></td><td id=\"file-potusscraper-js-v3-output-LC2\">[</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L3\" data-line-number=\"3\"></td><td id=\"file-potusscraper-js-v3-output-LC3\">'/wiki/George_Washington',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L4\" data-line-number=\"4\"></td><td id=\"file-potusscraper-js-v3-output-LC4\">'/wiki/John_Adams',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L5\" data-line-number=\"5\"></td><td id=\"file-potusscraper-js-v3-output-LC5\">'/wiki/Thomas_Jefferson',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L6\" data-line-number=\"6\"></td><td id=\"file-potusscraper-js-v3-output-LC6\">'/wiki/James_Madison',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L7\" data-line-number=\"7\"></td><td id=\"file-potusscraper-js-v3-output-LC7\">'/wiki/James_Monroe',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L8\" data-line-number=\"8\"></td><td id=\"file-potusscraper-js-v3-output-LC8\">'/wiki/John_Quincy_Adams',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L9\" data-line-number=\"9\"></td><td id=\"file-potusscraper-js-v3-output-LC9\">'/wiki/Andrew_Jackson',</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L10\" data-line-number=\"10\"></td><td id=\"file-potusscraper-js-v3-output-LC10\">...</td></tr><tr><td id=\"file-potusscraper-js-v3-output-L11\" data-line-number=\"11\"></td><td id=\"file-potusscraper-js-v3-output-LC11\">]</td></tr></tbody></table>\n<p>Now we have a list of all 45 presidential Wikipedia pages. Let's create a new file (named potusParse.js), which will contain a function to take a presidential Wikipedia page and return the president's name and birthday. First things first, let's get the raw HTML from George Washington's Wikipedia page.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v1-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v1-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusparse-js-v1-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v1-LC2\">const url = 'https://en.wikipedia.org/wiki/George_Washington';</td></tr><tr><td id=\"file-potusparse-js-v1-L3\" data-line-number=\"3\"></td><td id=\"file-potusparse-js-v1-LC3\"></td></tr><tr><td id=\"file-potusparse-js-v1-L4\" data-line-number=\"4\"></td><td id=\"file-potusparse-js-v1-LC4\">rp(url)</td></tr><tr><td id=\"file-potusparse-js-v1-L5\" data-line-number=\"5\"></td><td id=\"file-potusparse-js-v1-LC5\">.then(function(html) {</td></tr><tr><td id=\"file-potusparse-js-v1-L6\" data-line-number=\"6\"></td><td id=\"file-potusparse-js-v1-LC6\">console.log(html);</td></tr><tr><td id=\"file-potusparse-js-v1-L7\" data-line-number=\"7\"></td><td id=\"file-potusparse-js-v1-LC7\">})</td></tr><tr><td id=\"file-potusparse-js-v1-L8\" data-line-number=\"8\"></td><td id=\"file-potusparse-js-v1-LC8\">.catch(function(err) {</td></tr><tr><td id=\"file-potusparse-js-v1-L9\" data-line-number=\"9\"></td><td id=\"file-potusparse-js-v1-LC9\">//handle error</td></tr><tr><td id=\"file-potusparse-js-v1-L10\" data-line-number=\"10\"></td><td id=\"file-potusparse-js-v1-LC10\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v1-output-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v1-output-LC1\">&lt;html class=\"client-nojs\" lang=\"en\" dir=\"ltr\"&gt;</td></tr><tr><td id=\"file-potusparse-js-v1-output-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v1-output-LC2\">&lt;head&gt;</td></tr><tr><td id=\"file-potusparse-js-v1-output-L3\" data-line-number=\"3\"></td><td id=\"file-potusparse-js-v1-output-LC3\">&lt;meta charset=\"UTF-8\"/&gt;</td></tr><tr><td id=\"file-potusparse-js-v1-output-L4\" data-line-number=\"4\"></td><td id=\"file-potusparse-js-v1-output-LC4\">&lt;title&gt;George Washington - Wikipedia&lt;/title&gt;</td></tr><tr><td id=\"file-potusparse-js-v1-output-L5\" data-line-number=\"5\"></td><td id=\"file-potusparse-js-v1-output-LC5\">...</td></tr></tbody></table>\n<p>Let's once again use Chrome DevTools to find the syntax of the code we want to parse, so that we can extract the name and birthday with Cheerio.js.</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*exzZbuIwfrCcbTM2rr9_bw.png\"></p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*yth6AmHpywM77n0wEprpiA.png\"></p>\n<p>So we see that the name is in a class called \"firstHeading\" and the birthday is in a class called \"bday\". Let's modify our code to use Cheerio.js to extract these two classes.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v2-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v2-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusparse-js-v2-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v2-LC2\">const $ = require('cheerio');</td></tr><tr><td id=\"file-potusparse-js-v2-L3\" data-line-number=\"3\"></td><td id=\"file-potusparse-js-v2-LC3\">const url = 'https://en.wikipedia.org/wiki/George_Washington';</td></tr><tr><td id=\"file-potusparse-js-v2-L4\" data-line-number=\"4\"></td><td id=\"file-potusparse-js-v2-LC4\"></td></tr><tr><td id=\"file-potusparse-js-v2-L5\" data-line-number=\"5\"></td><td id=\"file-potusparse-js-v2-LC5\">rp(url)</td></tr><tr><td id=\"file-potusparse-js-v2-L6\" data-line-number=\"6\"></td><td id=\"file-potusparse-js-v2-LC6\">.then(function(html) {</td></tr><tr><td id=\"file-potusparse-js-v2-L7\" data-line-number=\"7\"></td><td id=\"file-potusparse-js-v2-LC7\">console.log($('.firstHeading', html).text());</td></tr><tr><td id=\"file-potusparse-js-v2-L8\" data-line-number=\"8\"></td><td id=\"file-potusparse-js-v2-LC8\">console.log($('.bday', html).text());</td></tr><tr><td id=\"file-potusparse-js-v2-L9\" data-line-number=\"9\"></td><td id=\"file-potusparse-js-v2-LC9\">})</td></tr><tr><td id=\"file-potusparse-js-v2-L10\" data-line-number=\"10\"></td><td id=\"file-potusparse-js-v2-LC10\">.catch(function(err) {</td></tr><tr><td id=\"file-potusparse-js-v2-L11\" data-line-number=\"11\"></td><td id=\"file-potusparse-js-v2-LC11\">//handle error</td></tr><tr><td id=\"file-potusparse-js-v2-L12\" data-line-number=\"12\"></td><td id=\"file-potusparse-js-v2-LC12\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v2-output-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v2-output-LC1\">George Washington</td></tr><tr><td id=\"file-potusparse-js-v2-output-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v2-output-LC2\">1732-02-22</td></tr></tbody></table>\n<h3>Putting it all together</h3>\n<p>Perfect! Now let's wrap this up into a function and export it from this module.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v3-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v3-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusparse-js-v3-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v3-LC2\">const $ = require('cheerio');</td></tr><tr><td id=\"file-potusparse-js-v3-L3\" data-line-number=\"3\"></td><td id=\"file-potusparse-js-v3-LC3\"></td></tr><tr><td id=\"file-potusparse-js-v3-L4\" data-line-number=\"4\"></td><td id=\"file-potusparse-js-v3-LC4\">const potusParse = function(url) {</td></tr><tr><td id=\"file-potusparse-js-v3-L5\" data-line-number=\"5\"></td><td id=\"file-potusparse-js-v3-LC5\">return rp(url)</td></tr><tr><td id=\"file-potusparse-js-v3-L6\" data-line-number=\"6\"></td><td id=\"file-potusparse-js-v3-LC6\">.then(function(html) {</td></tr><tr><td id=\"file-potusparse-js-v3-L7\" data-line-number=\"7\"></td><td id=\"file-potusparse-js-v3-LC7\">return {</td></tr><tr><td id=\"file-potusparse-js-v3-L8\" data-line-number=\"8\"></td><td id=\"file-potusparse-js-v3-LC8\">name: $('.firstHeading', html).text(),</td></tr><tr><td id=\"file-potusparse-js-v3-L9\" data-line-number=\"9\"></td><td id=\"file-potusparse-js-v3-LC9\">birthday: $('.bday', html).text(),</td></tr><tr><td id=\"file-potusparse-js-v3-L10\" data-line-number=\"10\"></td><td id=\"file-potusparse-js-v3-LC10\">};</td></tr><tr><td id=\"file-potusparse-js-v3-L11\" data-line-number=\"11\"></td><td id=\"file-potusparse-js-v3-LC11\">})</td></tr><tr><td id=\"file-potusparse-js-v3-L12\" data-line-number=\"12\"></td><td id=\"file-potusparse-js-v3-LC12\">.catch(function(err) {</td></tr><tr><td id=\"file-potusparse-js-v3-L13\" data-line-number=\"13\"></td><td id=\"file-potusparse-js-v3-LC13\">//handle error</td></tr><tr><td id=\"file-potusparse-js-v3-L14\" data-line-number=\"14\"></td><td id=\"file-potusparse-js-v3-LC14\">});</td></tr><tr><td id=\"file-potusparse-js-v3-L15\" data-line-number=\"15\"></td><td id=\"file-potusparse-js-v3-LC15\">};</td></tr><tr><td id=\"file-potusparse-js-v3-L16\" data-line-number=\"16\"></td><td id=\"file-potusparse-js-v3-LC16\"></td></tr><tr><td id=\"file-potusparse-js-v3-L17\" data-line-number=\"17\"></td><td id=\"file-potusparse-js-v3-LC17\">module.exports = potusParse;</td></tr></tbody></table>\n<p>Now let's return to our original file potusScraper.js and require the potusParse.js module. We'll then apply it to the list of wikiUrls we gathered earlier.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v4-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v4-LC1\"></td></tr><tr><td id=\"file-potusparse-js-v4-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v4-LC2\">const rp = require('request-promise');</td></tr><tr><td id=\"file-potusparse-js-v4-L3\" data-line-number=\"3\"></td><td id=\"file-potusparse-js-v4-LC3\">const $ = require('cheerio');</td></tr><tr><td id=\"file-potusparse-js-v4-L4\" data-line-number=\"4\"></td><td id=\"file-potusparse-js-v4-LC4\">const potusParse = require('./potusParse');</td></tr><tr><td id=\"file-potusparse-js-v4-L5\" data-line-number=\"5\"></td><td id=\"file-potusparse-js-v4-LC5\">const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States';</td></tr><tr><td id=\"file-potusparse-js-v4-L6\" data-line-number=\"6\"></td><td id=\"file-potusparse-js-v4-LC6\"></td></tr><tr><td id=\"file-potusparse-js-v4-L7\" data-line-number=\"7\"></td><td id=\"file-potusparse-js-v4-LC7\">rp(url)</td></tr><tr><td id=\"file-potusparse-js-v4-L8\" data-line-number=\"8\"></td><td id=\"file-potusparse-js-v4-LC8\">.then(function(html) {</td></tr><tr><td id=\"file-potusparse-js-v4-L9\" data-line-number=\"9\"></td><td id=\"file-potusparse-js-v4-LC9\">//success!</td></tr><tr><td id=\"file-potusparse-js-v4-L10\" data-line-number=\"10\"></td><td id=\"file-potusparse-js-v4-LC10\">const wikiUrls = [];</td></tr><tr><td id=\"file-potusparse-js-v4-L11\" data-line-number=\"11\"></td><td id=\"file-potusparse-js-v4-LC11\">for (let i = 0; i &lt; 45; i++) {</td></tr><tr><td id=\"file-potusparse-js-v4-L12\" data-line-number=\"12\"></td><td id=\"file-potusparse-js-v4-LC12\">wikiUrls.push($('big &gt; a', html)[i].attribs.href);</td></tr><tr><td id=\"file-potusparse-js-v4-L13\" data-line-number=\"13\"></td><td id=\"file-potusparse-js-v4-LC13\">}</td></tr><tr><td id=\"file-potusparse-js-v4-L14\" data-line-number=\"14\"></td><td id=\"file-potusparse-js-v4-LC14\">return Promise.all(</td></tr><tr><td id=\"file-potusparse-js-v4-L15\" data-line-number=\"15\"></td><td id=\"file-potusparse-js-v4-LC15\">wikiUrls.map(function(url) {</td></tr><tr><td id=\"file-potusparse-js-v4-L16\" data-line-number=\"16\"></td><td id=\"file-potusparse-js-v4-LC16\">return potusParse('https://en.wikipedia.org' + url);</td></tr><tr><td id=\"file-potusparse-js-v4-L17\" data-line-number=\"17\"></td><td id=\"file-potusparse-js-v4-LC17\">})</td></tr><tr><td id=\"file-potusparse-js-v4-L18\" data-line-number=\"18\"></td><td id=\"file-potusparse-js-v4-LC18\">);</td></tr><tr><td id=\"file-potusparse-js-v4-L19\" data-line-number=\"19\"></td><td id=\"file-potusparse-js-v4-LC19\">})</td></tr><tr><td id=\"file-potusparse-js-v4-L20\" data-line-number=\"20\"></td><td id=\"file-potusparse-js-v4-LC20\">.then(function(presidents) {</td></tr><tr><td id=\"file-potusparse-js-v4-L21\" data-line-number=\"21\"></td><td id=\"file-potusparse-js-v4-LC21\">console.log(presidents);</td></tr><tr><td id=\"file-potusparse-js-v4-L22\" data-line-number=\"22\"></td><td id=\"file-potusparse-js-v4-LC22\">})</td></tr><tr><td id=\"file-potusparse-js-v4-L23\" data-line-number=\"23\"></td><td id=\"file-potusparse-js-v4-LC23\">.catch(function(err) {</td></tr><tr><td id=\"file-potusparse-js-v4-L24\" data-line-number=\"24\"></td><td id=\"file-potusparse-js-v4-LC24\">//handle error</td></tr><tr><td id=\"file-potusparse-js-v4-L25\" data-line-number=\"25\"></td><td id=\"file-potusparse-js-v4-LC25\">console.log(err);</td></tr><tr><td id=\"file-potusparse-js-v4-L26\" data-line-number=\"26\"></td><td id=\"file-potusparse-js-v4-LC26\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-potusparse-js-v4-output-L1\" data-line-number=\"1\"></td><td id=\"file-potusparse-js-v4-output-LC1\"></td></tr><tr><td id=\"file-potusparse-js-v4-output-L2\" data-line-number=\"2\"></td><td id=\"file-potusparse-js-v4-output-LC2\">[</td></tr><tr><td id=\"file-potusparse-js-v4-output-L3\" data-line-number=\"3\"></td><td id=\"file-potusparse-js-v4-output-LC3\">{ name: 'George Washington', birthday: '1732-02-22' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L4\" data-line-number=\"4\"></td><td id=\"file-potusparse-js-v4-output-LC4\">{ name: 'John Adams', birthday: '1735-10-30' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L5\" data-line-number=\"5\"></td><td id=\"file-potusparse-js-v4-output-LC5\">{ name: 'Thomas Jefferson', birthday: '1743-04-13' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L6\" data-line-number=\"6\"></td><td id=\"file-potusparse-js-v4-output-LC6\">{ name: 'James Madison', birthday: '1751-03-16' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L7\" data-line-number=\"7\"></td><td id=\"file-potusparse-js-v4-output-LC7\">{ name: 'James Monroe', birthday: '1758-04-28' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L8\" data-line-number=\"8\"></td><td id=\"file-potusparse-js-v4-output-LC8\">{ name: 'John Quincy Adams', birthday: '1767-07-11' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L9\" data-line-number=\"9\"></td><td id=\"file-potusparse-js-v4-output-LC9\">{ name: 'Andrew Jackson', birthday: '1767-03-15' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L10\" data-line-number=\"10\"></td><td id=\"file-potusparse-js-v4-output-LC10\">{ name: 'Martin Van Buren', birthday: '1782-12-05' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L11\" data-line-number=\"11\"></td><td id=\"file-potusparse-js-v4-output-LC11\">{ name: 'William Henry Harrison', birthday: '1773-02-09' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L12\" data-line-number=\"12\"></td><td id=\"file-potusparse-js-v4-output-LC12\">{ name: 'John Tyler', birthday: '1790-03-29' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L13\" data-line-number=\"13\"></td><td id=\"file-potusparse-js-v4-output-LC13\">{ name: 'James K. Polk', birthday: '1795-11-02' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L14\" data-line-number=\"14\"></td><td id=\"file-potusparse-js-v4-output-LC14\">{ name: 'Zachary Taylor', birthday: '1784-11-24' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L15\" data-line-number=\"15\"></td><td id=\"file-potusparse-js-v4-output-LC15\">{ name: 'Millard Fillmore', birthday: '1800-01-07' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L16\" data-line-number=\"16\"></td><td id=\"file-potusparse-js-v4-output-LC16\">{ name: 'Franklin Pierce', birthday: '1804-11-23' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L17\" data-line-number=\"17\"></td><td id=\"file-potusparse-js-v4-output-LC17\">{ name: 'James Buchanan', birthday: '1791-04-23' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L18\" data-line-number=\"18\"></td><td id=\"file-potusparse-js-v4-output-LC18\">{ name: 'Abraham Lincoln', birthday: '1809-02-12' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L19\" data-line-number=\"19\"></td><td id=\"file-potusparse-js-v4-output-LC19\">{ name: 'Andrew Johnson', birthday: '1808-12-29' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L20\" data-line-number=\"20\"></td><td id=\"file-potusparse-js-v4-output-LC20\">{ name: 'Ulysses S. Grant', birthday: '1822-04-27' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L21\" data-line-number=\"21\"></td><td id=\"file-potusparse-js-v4-output-LC21\">{ name: 'Rutherford B. Hayes', birthday: '1822-10-04' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L22\" data-line-number=\"22\"></td><td id=\"file-potusparse-js-v4-output-LC22\">{ name: 'James A. Garfield', birthday: '1831-11-19' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L23\" data-line-number=\"23\"></td><td id=\"file-potusparse-js-v4-output-LC23\">{ name: 'Chester A. Arthur', birthday: '1829-10-05' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L24\" data-line-number=\"24\"></td><td id=\"file-potusparse-js-v4-output-LC24\">{ name: 'Grover Cleveland', birthday: '1837-03-18' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L25\" data-line-number=\"25\"></td><td id=\"file-potusparse-js-v4-output-LC25\">{ name: 'Benjamin Harrison', birthday: '1833-08-20' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L26\" data-line-number=\"26\"></td><td id=\"file-potusparse-js-v4-output-LC26\">{ name: 'Grover Cleveland', birthday: '1837-03-18' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L27\" data-line-number=\"27\"></td><td id=\"file-potusparse-js-v4-output-LC27\">{ name: 'William McKinley', birthday: '1843-01-29' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L28\" data-line-number=\"28\"></td><td id=\"file-potusparse-js-v4-output-LC28\">{ name: 'Theodore Roosevelt', birthday: '1858-10-27' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L29\" data-line-number=\"29\"></td><td id=\"file-potusparse-js-v4-output-LC29\">{ name: 'William Howard Taft', birthday: '1857-09-15' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L30\" data-line-number=\"30\"></td><td id=\"file-potusparse-js-v4-output-LC30\">{ name: 'Woodrow Wilson', birthday: '1856-12-28' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L31\" data-line-number=\"31\"></td><td id=\"file-potusparse-js-v4-output-LC31\">{ name: 'Warren G. Harding', birthday: '1865-11-02' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L32\" data-line-number=\"32\"></td><td id=\"file-potusparse-js-v4-output-LC32\">{ name: 'Calvin Coolidge', birthday: '1872-07-04' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L33\" data-line-number=\"33\"></td><td id=\"file-potusparse-js-v4-output-LC33\">{ name: 'Herbert Hoover', birthday: '1874-08-10' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L34\" data-line-number=\"34\"></td><td id=\"file-potusparse-js-v4-output-LC34\">{ name: 'Franklin D. Roosevelt', birthday: '1882-01-30' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L35\" data-line-number=\"35\"></td><td id=\"file-potusparse-js-v4-output-LC35\">{ name: 'Harry S. Truman', birthday: '1884-05-08' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L36\" data-line-number=\"36\"></td><td id=\"file-potusparse-js-v4-output-LC36\">{ name: 'Dwight D. Eisenhower', birthday: '1890-10-14' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L37\" data-line-number=\"37\"></td><td id=\"file-potusparse-js-v4-output-LC37\">{ name: 'John F. Kennedy', birthday: '1917-05-29' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L38\" data-line-number=\"38\"></td><td id=\"file-potusparse-js-v4-output-LC38\">{ name: 'Lyndon B. Johnson', birthday: '1908-08-27' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L39\" data-line-number=\"39\"></td><td id=\"file-potusparse-js-v4-output-LC39\">{ name: 'Richard Nixon', birthday: '1913-01-09' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L40\" data-line-number=\"40\"></td><td id=\"file-potusparse-js-v4-output-LC40\">{ name: 'Gerald Ford', birthday: '1913-07-14' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L41\" data-line-number=\"41\"></td><td id=\"file-potusparse-js-v4-output-LC41\">{ name: 'Jimmy Carter', birthday: '1924-10-01' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L42\" data-line-number=\"42\"></td><td id=\"file-potusparse-js-v4-output-LC42\">{ name: 'Ronald Reagan', birthday: '1911-02-06' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L43\" data-line-number=\"43\"></td><td id=\"file-potusparse-js-v4-output-LC43\">{ name: 'George H. W. Bush', birthday: '1924-06-12' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L44\" data-line-number=\"44\"></td><td id=\"file-potusparse-js-v4-output-LC44\">{ name: 'Bill Clinton', birthday: '1946-08-19' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L45\" data-line-number=\"45\"></td><td id=\"file-potusparse-js-v4-output-LC45\">{ name: 'George W. Bush', birthday: '1946-07-06' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L46\" data-line-number=\"46\"></td><td id=\"file-potusparse-js-v4-output-LC46\">{ name: 'Barack Obama', birthday: '1961-08-04' },</td></tr><tr><td id=\"file-potusparse-js-v4-output-L47\" data-line-number=\"47\"></td><td id=\"file-potusparse-js-v4-output-LC47\">{ name: 'Donald Trump', birthday: '1946-06-14' }</td></tr><tr><td id=\"file-potusparse-js-v4-output-L48\" data-line-number=\"48\"></td><td id=\"file-potusparse-js-v4-output-LC48\">]</td></tr></tbody></table>\n<h3>Rendering JavaScript Pages</h3>\n<p>Voilà! A list of the names and birthdays of all 45 U.S. presidents. Using just the request-promise module and Cheerio.js should allow you to scrape the vast majority of sites on the internet.</p>\n<p>Recently, however, many sites have begun using JavaScript to generate dynamic content on their websites. This causes a problem for request-promise and other similar HTTP request libraries (such as axios and fetch), because they only get the response from the initial request, but they cannot execute the JavaScript the way a web browser can.</p>\n<p>Thus, to scrape sites that require JavaScript execution, we need another solution. In our next example, we will get the titles for all of the posts on the front page of Reddit. Let's see what happens when we try to use request-promise as we did in the previous example.</p>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-reddit-js-v1-L1\" data-line-number=\"1\"></td><td id=\"file-reddit-js-v1-LC1\">const rp = require('request-promise');</td></tr><tr><td id=\"file-reddit-js-v1-L2\" data-line-number=\"2\"></td><td id=\"file-reddit-js-v1-LC2\">const url = 'https://www.reddit.com';</td></tr><tr><td id=\"file-reddit-js-v1-L3\" data-line-number=\"3\"></td><td id=\"file-reddit-js-v1-LC3\"></td></tr><tr><td id=\"file-reddit-js-v1-L4\" data-line-number=\"4\"></td><td id=\"file-reddit-js-v1-LC4\">rp(url)</td></tr><tr><td id=\"file-reddit-js-v1-L5\" data-line-number=\"5\"></td><td id=\"file-reddit-js-v1-LC5\">.then(function(html){</td></tr><tr><td id=\"file-reddit-js-v1-L6\" data-line-number=\"6\"></td><td id=\"file-reddit-js-v1-LC6\">//success!</td></tr><tr><td id=\"file-reddit-js-v1-L7\" data-line-number=\"7\"></td><td id=\"file-reddit-js-v1-LC7\">console.log(html);</td></tr><tr><td id=\"file-reddit-js-v1-L8\" data-line-number=\"8\"></td><td id=\"file-reddit-js-v1-LC8\">})</td></tr><tr><td id=\"file-reddit-js-v1-L9\" data-line-number=\"9\"></td><td id=\"file-reddit-js-v1-LC9\">.catch(function(err){</td></tr><tr><td id=\"file-reddit-js-v1-L10\" data-line-number=\"10\"></td><td id=\"file-reddit-js-v1-LC10\">//handle error</td></tr><tr><td id=\"file-reddit-js-v1-L11\" data-line-number=\"11\"></td><td id=\"file-reddit-js-v1-LC11\">});</td></tr><tr><td id=\"file-reddit-js-v1-L12\" data-line-number=\"12\"></td><td id=\"file-reddit-js-v1-LC12\">}</td></tr></tbody></table>\n<p>Here's what the output looks like:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-reddit-js-v1-output-L1\" data-line-number=\"1\"></td><td id=\"file-reddit-js-v1-output-LC1\">&lt;!DOCTYPE html&gt;&lt;html</td></tr><tr><td id=\"file-reddit-js-v1-output-L2\" data-line-number=\"2\"></td><td id=\"file-reddit-js-v1-output-LC2\">lang=\"en\"&gt;&lt;head&gt;&lt;title&gt;reddit: the front page of the</td></tr><tr><td id=\"file-reddit-js-v1-output-L3\" data-line-number=\"3\"></td><td id=\"file-reddit-js-v1-output-LC3\">internet&lt;/title&gt;</td></tr><tr><td id=\"file-reddit-js-v1-output-L4\" data-line-number=\"4\"></td><td id=\"file-reddit-js-v1-output-LC4\">...</td></tr></tbody></table>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*mKzPVGRR4CFKMwQw5y_YnQ.png\"></p>\n<p>Hmmm…not quite what we want. That's because getting the actual content requires you to run the JavaScript on the page! With Puppeteer, that's no problem.</p>\n<p>Puppeteer is an extremely popular new module brought to you by the Google Chrome team that allows you to control a headless browser. This is perfect for programmatically scraping pages that require JavaScript execution. Let's get the HTML from the front page of Reddit using Puppeteer instead of request-promise.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-reddit-js-v2-L1\" data-line-number=\"1\"></td><td id=\"file-reddit-js-v2-LC1\">const puppeteer = require('puppeteer');</td></tr><tr><td id=\"file-reddit-js-v2-L2\" data-line-number=\"2\"></td><td id=\"file-reddit-js-v2-LC2\">const url = 'https://www.reddit.com';</td></tr><tr><td id=\"file-reddit-js-v2-L3\" data-line-number=\"3\"></td><td id=\"file-reddit-js-v2-LC3\"></td></tr><tr><td id=\"file-reddit-js-v2-L4\" data-line-number=\"4\"></td><td id=\"file-reddit-js-v2-LC4\">puppeteer</td></tr><tr><td id=\"file-reddit-js-v2-L5\" data-line-number=\"5\"></td><td id=\"file-reddit-js-v2-LC5\">.launch()</td></tr><tr><td id=\"file-reddit-js-v2-L6\" data-line-number=\"6\"></td><td id=\"file-reddit-js-v2-LC6\">.then(function(browser) {</td></tr><tr><td id=\"file-reddit-js-v2-L7\" data-line-number=\"7\"></td><td id=\"file-reddit-js-v2-LC7\">return browser.newPage();</td></tr><tr><td id=\"file-reddit-js-v2-L8\" data-line-number=\"8\"></td><td id=\"file-reddit-js-v2-LC8\">})</td></tr><tr><td id=\"file-reddit-js-v2-L9\" data-line-number=\"9\"></td><td id=\"file-reddit-js-v2-LC9\">.then(function(page) {</td></tr><tr><td id=\"file-reddit-js-v2-L10\" data-line-number=\"10\"></td><td id=\"file-reddit-js-v2-LC10\">return page.goto(url).then(function() {</td></tr><tr><td id=\"file-reddit-js-v2-L11\" data-line-number=\"11\"></td><td id=\"file-reddit-js-v2-LC11\">return page.content();</td></tr><tr><td id=\"file-reddit-js-v2-L12\" data-line-number=\"12\"></td><td id=\"file-reddit-js-v2-LC12\">});</td></tr><tr><td id=\"file-reddit-js-v2-L13\" data-line-number=\"13\"></td><td id=\"file-reddit-js-v2-LC13\">})</td></tr><tr><td id=\"file-reddit-js-v2-L14\" data-line-number=\"14\"></td><td id=\"file-reddit-js-v2-LC14\">.then(function(html) {</td></tr><tr><td id=\"file-reddit-js-v2-L15\" data-line-number=\"15\"></td><td id=\"file-reddit-js-v2-LC15\">console.log(html);</td></tr><tr><td id=\"file-reddit-js-v2-L16\" data-line-number=\"16\"></td><td id=\"file-reddit-js-v2-LC16\">})</td></tr><tr><td id=\"file-reddit-js-v2-L17\" data-line-number=\"17\"></td><td id=\"file-reddit-js-v2-LC17\">.catch(function(err) {</td></tr><tr><td id=\"file-reddit-js-v2-L18\" data-line-number=\"18\"></td><td id=\"file-reddit-js-v2-LC18\">//handle error</td></tr><tr><td id=\"file-reddit-js-v2-L19\" data-line-number=\"19\"></td><td id=\"file-reddit-js-v2-LC19\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-reddit-js-v2-output-L1\" data-line-number=\"1\"></td><td id=\"file-reddit-js-v2-output-LC1\">&lt;!DOCTYPE html&gt;&lt;html lang=\"en\"&gt;&lt;head&gt;&lt;link</td></tr><tr><td id=\"file-reddit-js-v2-output-L2\" data-line-number=\"2\"></td><td id=\"file-reddit-js-v2-output-LC2\">href=\"//c.amazon-adsystem.com/aax2/apstag.js\" rel=\"preload\"</td></tr><tr><td id=\"file-reddit-js-v2-output-L3\" data-line-number=\"3\"></td><td id=\"file-reddit-js-v2-output-LC3\">as=\"script\"&gt;</td></tr><tr><td id=\"file-reddit-js-v2-output-L4\" data-line-number=\"4\"></td><td id=\"file-reddit-js-v2-output-LC4\">...</td></tr></tbody></table>\n<p>Nice! The page is filled with the correct content!</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*N5HtAiijcMEB_fBQvPd7Ow.png\"></p>\n<p>Now we can use Chrome DevTools like we did in the previous example.</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*tHSgjPMvn3M26N2f7Q2B1Q.png\"></p>\n<p>It looks like Reddit is putting the titles inside \"h2\" tags. Let's use Cheerio.js to extract the h2 tags from the page.</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-reddit-js-v3-L1\" data-line-number=\"1\"></td><td id=\"file-reddit-js-v3-LC1\">const puppeteer = require('puppeteer');</td></tr><tr><td id=\"file-reddit-js-v3-L2\" data-line-number=\"2\"></td><td id=\"file-reddit-js-v3-LC2\">const $ = require('cheerio');</td></tr><tr><td id=\"file-reddit-js-v3-L3\" data-line-number=\"3\"></td><td id=\"file-reddit-js-v3-LC3\">const url = 'https://www.reddit.com';</td></tr><tr><td id=\"file-reddit-js-v3-L4\" data-line-number=\"4\"></td><td id=\"file-reddit-js-v3-LC4\"></td></tr><tr><td id=\"file-reddit-js-v3-L5\" data-line-number=\"5\"></td><td id=\"file-reddit-js-v3-LC5\">puppeteer</td></tr><tr><td id=\"file-reddit-js-v3-L6\" data-line-number=\"6\"></td><td id=\"file-reddit-js-v3-LC6\">.launch()</td></tr><tr><td id=\"file-reddit-js-v3-L7\" data-line-number=\"7\"></td><td id=\"file-reddit-js-v3-LC7\">.then(function(browser) {</td></tr><tr><td id=\"file-reddit-js-v3-L8\" data-line-number=\"8\"></td><td id=\"file-reddit-js-v3-LC8\">return browser.newPage();</td></tr><tr><td id=\"file-reddit-js-v3-L9\" data-line-number=\"9\"></td><td id=\"file-reddit-js-v3-LC9\">})</td></tr><tr><td id=\"file-reddit-js-v3-L10\" data-line-number=\"10\"></td><td id=\"file-reddit-js-v3-LC10\">.then(function(page) {</td></tr><tr><td id=\"file-reddit-js-v3-L11\" data-line-number=\"11\"></td><td id=\"file-reddit-js-v3-LC11\">return page.goto(url).then(function() {</td></tr><tr><td id=\"file-reddit-js-v3-L12\" data-line-number=\"12\"></td><td id=\"file-reddit-js-v3-LC12\">return page.content();</td></tr><tr><td id=\"file-reddit-js-v3-L13\" data-line-number=\"13\"></td><td id=\"file-reddit-js-v3-LC13\">});</td></tr><tr><td id=\"file-reddit-js-v3-L14\" data-line-number=\"14\"></td><td id=\"file-reddit-js-v3-LC14\">})</td></tr><tr><td id=\"file-reddit-js-v3-L15\" data-line-number=\"15\"></td><td id=\"file-reddit-js-v3-LC15\">.then(function(html) {</td></tr><tr><td id=\"file-reddit-js-v3-L16\" data-line-number=\"16\"></td><td id=\"file-reddit-js-v3-LC16\">$('h2', html).each(function() {</td></tr><tr><td id=\"file-reddit-js-v3-L17\" data-line-number=\"17\"></td><td id=\"file-reddit-js-v3-LC17\">console.log($(this).text());</td></tr><tr><td id=\"file-reddit-js-v3-L18\" data-line-number=\"18\"></td><td id=\"file-reddit-js-v3-LC18\">});</td></tr><tr><td id=\"file-reddit-js-v3-L19\" data-line-number=\"19\"></td><td id=\"file-reddit-js-v3-LC19\">})</td></tr><tr><td id=\"file-reddit-js-v3-L20\" data-line-number=\"20\"></td><td id=\"file-reddit-js-v3-LC20\">.catch(function(err) {</td></tr><tr><td id=\"file-reddit-js-v3-L21\" data-line-number=\"21\"></td><td id=\"file-reddit-js-v3-LC21\">//handle error</td></tr><tr><td id=\"file-reddit-js-v3-L22\" data-line-number=\"22\"></td><td id=\"file-reddit-js-v3-LC22\">});</td></tr></tbody></table>\n<p>Output:</p>\n<table data-tab-size=\"8\" data-paste-markdown-skip=\"\"><tbody><tr><td id=\"file-reddit-js-v3-output-L1\" data-line-number=\"1\"></td><td id=\"file-reddit-js-v3-output-LC1\">Russian Pipeline. Upvote so that this is the first image people see when they Google \"Russian Pipeline\"</td></tr><tr><td id=\"file-reddit-js-v3-output-L2\" data-line-number=\"2\"></td><td id=\"file-reddit-js-v3-output-LC2\">John F. Kennedy Jr. Sitting in the pilot seat of the Marine One circa 1963</td></tr><tr><td id=\"file-reddit-js-v3-output-L3\" data-line-number=\"3\"></td><td id=\"file-reddit-js-v3-output-LC3\">I didn't take it as a compliment.</td></tr><tr><td id=\"file-reddit-js-v3-output-L4\" data-line-number=\"4\"></td><td id=\"file-reddit-js-v3-output-LC4\">How beautiful is this</td></tr><tr><td id=\"file-reddit-js-v3-output-L5\" data-line-number=\"5\"></td><td id=\"file-reddit-js-v3-output-LC5\">Hustle like Faye</td></tr><tr><td id=\"file-reddit-js-v3-output-L6\" data-line-number=\"6\"></td><td id=\"file-reddit-js-v3-output-LC6\">The power of a salt water crocodile's tail.</td></tr><tr><td id=\"file-reddit-js-v3-output-L7\" data-line-number=\"7\"></td><td id=\"file-reddit-js-v3-output-LC7\">I'm 36, and will be dead inside of a year.</td></tr><tr><td id=\"file-reddit-js-v3-output-L8\" data-line-number=\"8\"></td><td id=\"file-reddit-js-v3-output-LC8\">F***ing genius.</td></tr><tr><td id=\"file-reddit-js-v3-output-L9\" data-line-number=\"9\"></td><td id=\"file-reddit-js-v3-output-LC9\">TIL Anthony Daniels, who endured years of discomfort in the C-3PO costume, was so annoyed by Alan Tudyk (Rogue One) playing K-2SO in the comfort of a motion-capture suit that he cursed at Tudyk. Tudyk later joked that a \"fuck you\" from Daniels was among the highest compliments he had ever received.</td></tr><tr><td id=\"file-reddit-js-v3-output-L10\" data-line-number=\"10\"></td><td id=\"file-reddit-js-v3-output-LC10\">Reminder about the fact UC Davis paid over $100k to remove this photo from the internet.</td></tr><tr><td id=\"file-reddit-js-v3-output-L11\" data-line-number=\"11\"></td><td id=\"file-reddit-js-v3-output-LC11\">King of the Hill reruns will start airing on Comedy Central July 24th</td></tr><tr><td id=\"file-reddit-js-v3-output-L12\" data-line-number=\"12\"></td><td id=\"file-reddit-js-v3-output-LC12\">[Image] Slow and steady</td></tr><tr><td id=\"file-reddit-js-v3-output-L13\" data-line-number=\"13\"></td><td id=\"file-reddit-js-v3-output-LC13\">White House: Trump open to Russia questioning US citizens</td></tr><tr><td id=\"file-reddit-js-v3-output-L14\" data-line-number=\"14\"></td><td id=\"file-reddit-js-v3-output-LC14\">Godzilla: King of the Monsters Teaser Banner</td></tr><tr><td id=\"file-reddit-js-v3-output-L15\" data-line-number=\"15\"></td><td id=\"file-reddit-js-v3-output-LC15\">He tried</td></tr><tr><td id=\"file-reddit-js-v3-output-L16\" data-line-number=\"16\"></td><td id=\"file-reddit-js-v3-output-LC16\">Soldier reunited with his dog after being away.</td></tr><tr><td id=\"file-reddit-js-v3-output-L17\" data-line-number=\"17\"></td><td id=\"file-reddit-js-v3-output-LC17\">Hiring a hitman on yourself and preparing for battle is the ultimate extreme sport.</td></tr><tr><td id=\"file-reddit-js-v3-output-L18\" data-line-number=\"18\"></td><td id=\"file-reddit-js-v3-output-LC18\">Two paintballs colliding midair</td></tr><tr><td id=\"file-reddit-js-v3-output-L19\" data-line-number=\"19\"></td><td id=\"file-reddit-js-v3-output-LC19\">My thoughts &amp; prayers are with those ears</td></tr><tr><td id=\"file-reddit-js-v3-output-L20\" data-line-number=\"20\"></td><td id=\"file-reddit-js-v3-output-LC20\">When even your fantasy starts dropping hints</td></tr><tr><td id=\"file-reddit-js-v3-output-L21\" data-line-number=\"21\"></td><td id=\"file-reddit-js-v3-output-LC21\">Elon Musk's apology is out</td></tr><tr><td id=\"file-reddit-js-v3-output-L22\" data-line-number=\"22\"></td><td id=\"file-reddit-js-v3-output-LC22\">\"When you're going private so you plant trees to throw some last shade at TDNW before you vanish.\" Thanos' farm advances. The soul children will have full bellies. 1024 points will give him the resources to double, and irrigate, his farm. (See comment)</td></tr><tr><td id=\"file-reddit-js-v3-output-L23\" data-line-number=\"23\"></td><td id=\"file-reddit-js-v3-output-LC23\">Some leaders prefer chess, others prefer hungry hippos. Travis Chapman, oil, 2018</td></tr><tr><td id=\"file-reddit-js-v3-output-L24\" data-line-number=\"24\"></td><td id=\"file-reddit-js-v3-output-LC24\">The S.S. Ste. Claire, retired from ferrying amusement park goers, now ferries The Damned across the river Styx.</td></tr><tr><td id=\"file-reddit-js-v3-output-L25\" data-line-number=\"25\"></td><td id=\"file-reddit-js-v3-output-LC25\">A soldier is reunited with his dog</td></tr><tr><td id=\"file-reddit-js-v3-output-L26\" data-line-number=\"26\"></td><td id=\"file-reddit-js-v3-output-LC26\">*hits blunt*</td></tr><tr><td id=\"file-reddit-js-v3-output-L27\" data-line-number=\"27\"></td><td id=\"file-reddit-js-v3-output-LC27\">Today I Learned</td></tr><tr><td id=\"file-reddit-js-v3-output-L28\" data-line-number=\"28\"></td><td id=\"file-reddit-js-v3-output-LC28\">Black Panther Scene Representing the Pan-African Flag</td></tr><tr><td id=\"file-reddit-js-v3-output-L29\" data-line-number=\"29\"></td><td id=\"file-reddit-js-v3-output-LC29\">The precision of this hydraulic press.</td></tr><tr><td id=\"file-reddit-js-v3-output-L30\" data-line-number=\"30\"></td><td id=\"file-reddit-js-v3-output-LC30\">Let bring the game to another level</td></tr><tr><td id=\"file-reddit-js-v3-output-L31\" data-line-number=\"31\"></td><td id=\"file-reddit-js-v3-output-LC31\">When you're fighting a Dark Souls boss and you gamble to get 'just one extra hit' in instead of rolling out of range.</td></tr><tr><td id=\"file-reddit-js-v3-output-L32\" data-line-number=\"32\"></td><td id=\"file-reddit-js-v3-output-LC32\">\"I check for traps\"</td></tr><tr><td id=\"file-reddit-js-v3-output-L33\" data-line-number=\"33\"></td><td id=\"file-reddit-js-v3-output-LC33\">Anon finds his home at last</td></tr><tr><td id=\"file-reddit-js-v3-output-L34\" data-line-number=\"34\"></td><td id=\"file-reddit-js-v3-output-LC34\">He's hungry</td></tr><tr><td id=\"file-reddit-js-v3-output-L35\" data-line-number=\"35\"></td><td id=\"file-reddit-js-v3-output-LC35\">Being a single mother is a thankless job.</td></tr><tr><td id=\"file-reddit-js-v3-output-L36\" data-line-number=\"36\"></td><td id=\"file-reddit-js-v3-output-LC36\">TIL That when you're pulling out Minigun, you're actually pulling out suitcase that then transforms into Minigun.</td></tr><tr><td id=\"file-reddit-js-v3-output-L37\" data-line-number=\"37\"></td><td id=\"file-reddit-js-v3-output-LC37\">OMG guys don't look!!! 🙈🙈🙈</td></tr><tr><td id=\"file-reddit-js-v3-output-L38\" data-line-number=\"38\"></td><td id=\"file-reddit-js-v3-output-LC38\">hyubsama's emote of his own face denied for political reasons because twitch thinks its a picture of Kim Jong Un</td></tr></tbody></table>\n<h3>Additional Resources</h3>\n<p>And there's the list! At this point you should feel comfortable writing your first web scraper to gather data from any website. Here are a few additional resources that you may find helpful during your web scraping journey:</p>\n<ul>\n<li><a href=\"https://www.scraperapi.com/blog/the-10-best-rotating-proxy-services-for-web-scraping\">List of web scraping proxy services</a></li>\n<li><a href=\"https://www.scraperapi.com/blog/the-10-best-web-scraping-tools\">List of handy web scraping tools</a></li>\n<li><a href=\"https://www.scraperapi.com/blog/5-tips-for-web-scraping\">List of web scraping tips</a></li>\n<li><a href=\"https://www.scraperapi.com/blog/free-shared-dedicated-datacenter-residential-rotating-proxies-for-web-scraping\">Comparison of web scraping proxies</a></li>\n<li><a href=\"https://github.com/cheeriojs/cheerio\">Cheerio Documentation</a></li>\n<li><a href=\"https://github.com/GoogleChrome/puppeteer\">Puppeteer Documentation</a></li>\n</ul>\n<hr>"},{"url":"/docs/sitemap/","relativePath":"docs/sitemap.md","relativeDir":"docs","base":"sitemap.md","name":"sitemap","frontmatter":{"title":"Navigation","weight":900,"excerpt":"Navigation quick reference","seo":{"title":"Web Dev Hub","description":"This website contains docs, blogs, a personal portfolio spread out across multiple pages as well as interactive animations and tools.","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Web Dev Hub","keyName":"property"},{"name":"og:description","value":"Navigation Home","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Web Dev Hub"},{"name":"twitter:description","value":"Navigation Home"},{"name":"og:image","value":"images/background.gif","keyName":"property","relativeUrl":true}]},"template":"docs"},"html":"<h3>204. <a href=\"https://bgoonz-blog.netlify.app/privacy-policy\"><strong>🖥️privacy-policy🌍</strong></a></h3>\n<h3>205. <a href=\"https://bgoonz-blog.netlify.app/readme\"><strong>🖥️readme🌍</strong></a></h3>\n<h3>206. <a href=\"https://bgoonz-blog.netlify.app/showcase\"><strong>🏆showcase🏆</strong></a></h3>\n<h3>207. <a href=\"https://bgoonz-blog.netlify.app/\"><strong>🏠Home🏠</strong></a></h3>\n<hr>\n<hr>\n<h3>0. <a href=\"https://bgoonz-blog.netlify.app/blog/300-react-questions\"><strong>🖥️blog/300-react-questions🌍</strong></a></h3>\n<h3>1. <a href=\"https://bgoonz-blog.netlify.app/blog/awesome-graphql\"><strong>🖥️blog/awesome-graphql🌍</strong></a></h3>\n<h3>2. <a href=\"https://bgoonz-blog.netlify.app/blog/big-o-complexity\"><strong>🖥️blog/big-o-complexity🌍</strong></a></h3>\n<h3>3. <a href=\"https://bgoonz-blog.netlify.app/blog/blog-archive\"><strong>🖥️blog/blog-archive🌍</strong></a></h3>\n<h3>4. <a href=\"https://bgoonz-blog.netlify.app/blog/blogwcomments\"><strong>🖥️blog/blogwcomments🌍</strong></a></h3>\n<h3>5. <a href=\"https://bgoonz-blog.netlify.app/blog/data-structures\"><strong>🖥️blog/data-structures🌍</strong></a></h3>\n<h3>6. <a href=\"https://bgoonz-blog.netlify.app/blog/flow-control-in-python\"><strong>🖥️blog/flow-control-in-python🌍</strong></a></h3>\n<h3>7. <a href=\"https://bgoonz-blog.netlify.app/blog/functions-in-python\"><strong>🖥️blog/functions-in-python🌍</strong></a></h3>\n<h3>8. <a href=\"https://bgoonz-blog.netlify.app/blog/git-gateway\"><strong>🖥️blog/git-gateway🌍</strong></a></h3>\n<h3>9. <a href=\"https://bgoonz-blog.netlify.app/blog/interview-questions-js\"><strong>🖥️blog/interview-questions-js🌍</strong></a></h3>\n<h3>10. <a href=\"https://bgoonz-blog.netlify.app/blog/netlify-cms\"><strong>🖥️blog/netlify-cms🌍</strong></a></h3>\n<h3>11. <a href=\"https://bgoonz-blog.netlify.app/blog/platform-docs\"><strong>🖥️blog/platform-docs🌍</strong></a></h3>\n<h3>12. <a href=\"https://bgoonz-blog.netlify.app/blog/python-for-js-dev\"><strong>🖥️blog/python-for-js-dev🌍</strong></a></h3>\n<h3>13. <a href=\"https://bgoonz-blog.netlify.app/blog/python-resources\"><strong>🖥️blog/python-resources🌍</strong></a></h3>\n<h3>14. <a href=\"https://bgoonz-blog.netlify.app/blog/web-dev-trends\"><strong>🖥️blog/web-dev-trends🌍</strong></a></h3>\n<h3>15. <a href=\"https://bgoonz-blog.netlify.app/blog/web-scraping\"><strong>🖥️blog/web-scraping🌍</strong></a></h3>\n<h3>16. <a href=\"https://bgoonz-blog.netlify.app/blog\"><strong>🖥️blog🌍</strong></a></h3>\n<hr>\n<hr>\n<h2>DOCS:</h2>\n<h3>17. <a href=\"https://bgoonz-blog.netlify.app/docs/about/README\"><strong>📖docs/about/README🌍</strong></a></h3>\n<h3>18. <a href=\"https://bgoonz-blog.netlify.app/docs/about/eng-portfolio\"><strong>📖docs/about/eng-portfolio🌍</strong></a></h3>\n<h3>19. <a href=\"https://bgoonz-blog.netlify.app/docs/about/intrests\"><strong>📖docs/about/intrests🌍</strong></a></h3>\n<h3>20. <a href=\"https://bgoonz-blog.netlify.app/docs/about/job-search\"><strong>📖docs/about/job-search🌍</strong></a></h3>\n<h3>21. <a href=\"https://bgoonz-blog.netlify.app/docs/about/resume\"><strong>📖docs/about/resume🌍</strong></a></h3>\n<h3>22. <a href=\"https://bgoonz-blog.netlify.app/docs/about\"><strong>📖docs/about🌍</strong></a></h3>\n<h3>23. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev\"><strong>📖docs/articles/basic-web-dev🌍</strong></a></h3>\n<h3>24. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/buffers\"><strong>📖docs/articles/buffers🌍</strong></a></h3>\n<h3>25. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/dev-dep\"><strong>📖docs/articles/dev-dep🌍</strong></a></h3>\n<h3>26. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/event-loop\"><strong>📖docs/articles/event-loop🌍</strong></a></h3>\n<h3>27. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/fs-module\"><strong>📖docs/articles/fs-module🌍</strong></a></h3>\n<h3>28. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/how-search-engines-work\"><strong>📖docs/articles/how-search-engines-work🌍</strong></a></h3>\n<h3>29. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/how-the-web-works\"><strong>📖docs/articles/how-the-web-works🌍</strong></a></h3>\n<h3>30. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/http\"><strong>📖docs/articles/http🌍</strong></a></h3>\n<h3>31. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/install\"><strong>📖docs/articles/install🌍</strong></a></h3>\n<h3>32. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/intro\"><strong>📖docs/articles/intro🌍</strong></a></h3>\n<h3>33. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/modules\"><strong>📖docs/articles/modules🌍</strong></a></h3>\n<h3>34. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/nextjs\"><strong>📖docs/articles/nextjs🌍</strong></a></h3>\n<h3>35. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-api-express\"><strong>📖docs/articles/node-api-express🌍</strong></a></h3>\n<h3>36. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-cli-args\"><strong>📖docs/articles/node-cli-args🌍</strong></a></h3>\n<h3>37. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-common-modules\"><strong>📖docs/articles/node-common-modules🌍</strong></a></h3>\n<h3>38. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-env-variables\"><strong>📖docs/articles/node-env-variables🌍</strong></a></h3>\n<h3>39. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-js-language\"><strong>📖docs/articles/node-js-language🌍</strong></a></h3>\n<h3>40. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-package-manager\"><strong>📖docs/articles/node-package-manager🌍</strong></a></h3>\n<h3>41. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-repl\"><strong>📖docs/articles/node-repl🌍</strong></a></h3>\n<h3>42. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-run-cli\"><strong>📖docs/articles/node-run-cli🌍</strong></a></h3>\n<h3>43. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/nodejs\"><strong>📖docs/articles/nodejs🌍</strong></a></h3>\n<h3>44. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/nodevsbrowser\"><strong>📖docs/articles/nodevsbrowser🌍</strong></a></h3>\n<h3>45. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/npm\"><strong>📖docs/articles/npm🌍</strong></a></h3>\n<h3>46. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/npx\"><strong>📖docs/articles/npx🌍</strong></a></h3>\n<h3>47. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/os-module\"><strong>📖docs/articles/os-module🌍</strong></a></h3>\n<h3>48. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/reading-files\"><strong>📖docs/articles/reading-files🌍</strong></a></h3>\n<h3>49. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/semantic-html\"><strong>📖docs/articles/semantic-html🌍</strong></a></h3>\n<h3>50. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/semantic\"><strong>📖docs/articles/semantic🌍</strong></a></h3>\n<h3>51. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/%20%5B**%F0%9F%96%A5%EF%B8%8Fthe-uniform-resource-locator-(url)\"><strong>📖docs/articles/the-uniform-resource-locator-(url)🌍</strong></a></h3>\n<h3>52. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/understanding-firebase\"><strong>📖docs/articles/understanding-firebase🌍</strong></a></h3>\n<h3>53. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/v8\"><strong>📖docs/articles/v8🌍</strong></a></h3>\n<h3>54. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/web-standards-checklist\"><strong>📖docs/articles/web-standards-checklist🌍</strong></a></h3>\n<h3>55. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/webdev-tools\"><strong>📖docs/articles/webdev-tools🌍</strong></a></h3>\n<h3>56. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/writing-files\"><strong>📖docs/articles/writing-files🌍</strong></a></h3>\n<h3>57. <a href=\"https://bgoonz-blog.netlify.app/docs/articles\"><strong>📖docs/articles🌍</strong></a></h3>\n<h3>58. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/audio-feature-extraction\"><strong>📖docs/audio/audio-feature-extraction🌍</strong></a></h3>\n<h3>59. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/audio\"><strong>📖docs/audio/audio🌍</strong></a></h3>\n<h3>60. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/dfft\"><strong>📖docs/audio/dfft🌍</strong></a></h3>\n<h3>61. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/discrete-fft\"><strong>📖docs/audio/discrete-fft🌍</strong></a></h3>\n<h3>62. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/dtw-python-explained\"><strong>📖docs/audio/dtw-python-explained🌍</strong></a></h3>\n<h3>63. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/dynamic-time-warping\"><strong>📖docs/audio/dynamic-time-warping🌍</strong></a></h3>\n<h3>64. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/web-audio-api\"><strong>📖docs/audio/web-audio-api🌍</strong></a></h3>\n<h3>65. <a href=\"https://bgoonz-blog.netlify.app/docs/audio\"><strong>📖docs/audio🌍</strong></a></h3>\n<h3>66. <a href=\"https://bgoonz-blog.netlify.app/docs/career/dev-interview\"><strong>📖docs/career/dev-interview🌍</strong></a></h3>\n<h3>67. <a href=\"https://bgoonz-blog.netlify.app/docs/career/interview-dos-n-donts\"><strong>📖docs/career/interview-dos-n-donts🌍</strong></a></h3>\n<h3>68. <a href=\"https://bgoonz-blog.netlify.app/docs/career/job-boards\"><strong>📖docs/career/job-boards🌍</strong></a></h3>\n<h3>69. <a href=\"https://bgoonz-blog.netlify.app/docs/career\"><strong>📖docs/career🌍</strong></a></h3>\n<h3>71. <a href=\"https://bgoonz-blog.netlify.app/docs/community/bookmarks\"><strong>📖docs/community/bookmarks🌍</strong></a></h3>\n<h3>72. <a href=\"https://bgoonz-blog.netlify.app/docs/community/video-chat\"><strong>📖docs/community/video-chat🌍</strong></a></h3>\n<h3>73. <a href=\"https://bgoonz-blog.netlify.app/docs/community\"><strong>📖docs/community🌍</strong></a></h3>\n<h3>74. <a href=\"https://bgoonz-blog.netlify.app/docs/content/algo\"><strong>📖docs/content/algo🌍</strong></a></h3>\n<h3>75. <a href=\"https://bgoonz-blog.netlify.app/docs/content/archive\"><strong>📖docs/content/archive🌍</strong></a></h3>\n<h3>76. <a href=\"https://bgoonz-blog.netlify.app/docs/content/gatsby-Queries-Mutations\"><strong>📖docs/content/gatsby-Queries-Mutations🌍</strong></a></h3>\n<h3>77. <a href=\"https://bgoonz-blog.netlify.app/docs/content/history-api\"><strong>📖docs/content/history-api🌍</strong></a></h3>\n<h3>78. <a href=\"https://bgoonz-blog.netlify.app/docs/content/main-projects\"><strong>📖docs/content/main-projects🌍</strong></a></h3>\n<h3>79. <a href=\"https://bgoonz-blog.netlify.app/docs/content/trouble-shooting\"><strong>📖docs/content/trouble-shooting🌍</strong></a></h3>\n<h3>80. <a href=\"https://bgoonz-blog.netlify.app/docs/content\"><strong>📖docs/content🌍</strong></a></h3>\n<h3>81. <a href=\"https://bgoonz-blog.netlify.app/docs/data-structures\"><strong>📖docs/data-structures🌍</strong></a></h3>\n<h3>82. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/appendix\"><strong>📖docs/docs/appendix🌍</strong></a></h3>\n<h3>83. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/art-of-command-line\"><strong>📖docs/docs/art-of-command-line🌍</strong></a></h3>\n<h3>84. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/bash\"><strong>📖docs/docs/bash🌍</strong></a></h3>\n<h3>85. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/content\"><strong>📖docs/docs/content🌍</strong></a></h3>\n<h3>86. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/css\"><strong>📖docs/docs/css🌍</strong></a></h3>\n<h3>87. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/data-structures-docs\"><strong>📖docs/docs/data-structures-docs🌍</strong></a></h3>\n<h3>88. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/es-6-features\"><strong>📖docs/docs/es-6-features🌍</strong></a></h3>\n<h3>89. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-reference\"><strong>📖docs/docs/git-reference🌍</strong></a></h3>\n<h3>90. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-repos\"><strong>📖docs/docs/git-repos🌍</strong></a></h3>\n<h3>91. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/html-spec\"><strong>📖docs/docs/html-spec🌍</strong></a></h3>\n<h3>92. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/markdown\"><strong>📖docs/docs/markdown🌍</strong></a></h3>\n<h3>93. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/no-whiteboarding\"><strong>📖docs/docs/no-whiteboarding🌍</strong></a></h3>\n<h3>94. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/node-docs-complete\"><strong>📖docs/docs/node-docs-complete🌍</strong></a></h3>\n<h3>95. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/node-docs-full\"><strong>📖docs/docs/node-docs-full🌍</strong></a></h3>\n<h3>96. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/regex-in-js\"><strong>📖docs/docs/regex-in-js🌍</strong></a></h3>\n<h3>97. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/sitemap\"><strong>📖docs/docs/sitemap🌍</strong></a></h3>\n<h3>98. <a href=\"https://bgoonz-blog.netlify.app/docs/docs\"><strong>📖docs/docs🌍</strong></a></h3>\n<h3>99. <a href=\"https://bgoonz-blog.netlify.app/docs/faq/contact\"><strong>📖docs/faq/contact🌍</strong></a></h3>\n<h3>100. <a href=\"https://bgoonz-blog.netlify.app/docs/faq/plug-ins\"><strong>📖docs/faq/plug-ins🌍</strong></a></h3>\n<h3>101. <a href=\"https://bgoonz-blog.netlify.app/docs/faq\"><strong>📖docs/faq🌍</strong></a></h3>\n<h3>102. <a href=\"https://bgoonz-blog.netlify.app/docs/gists\"><strong>📖docs/gists🌍</strong></a></h3>\n<h3>103. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/callstack-visual\"><strong>📖docs/interact/callstack-visual🌍</strong></a></h3>\n<h3>104. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/clock\"><strong>📖docs/interact/clock🌍</strong></a></h3>\n<h3>105. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/jupyter-notebooks\"><strong>📖docs/interact/jupyter-notebooks🌍</strong></a></h3>\n<h3>106. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/other-sites\"><strong>📖docs/interact/other-sites🌍</strong></a></h3>\n<h3>107. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/video-chat\"><strong>📖docs/interact/video-chat🌍</strong></a></h3>\n<h3>108. <a href=\"https://bgoonz-blog.netlify.app/docs/interact\"><strong>📖docs/interact🌍</strong></a></h3>\n<h3>109. <a href=\"https://bgoonz-blog.netlify.app/docs/interview/job-search-nav\"><strong>📖docs/interview/job-search-nav🌍</strong></a></h3>\n<h3>110. <a href=\"https://bgoonz-blog.netlify.app/docs/interview/review-concepts\"><strong>📖docs/interview/review-concepts🌍</strong></a></h3>\n<h3>111. <a href=\"https://bgoonz-blog.netlify.app/docs/interview\"><strong>📖docs/interview🌍</strong></a></h3>\n<h3>112. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/arrow-functions\"><strong>📖docs/javascript/arrow-functions🌍</strong></a></h3>\n<h3>113. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/asyncjs\"><strong>📖docs/javascript/asyncjs🌍</strong></a></h3>\n<h3>114. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/await-keyword\"><strong>📖docs/javascript/await-keyword🌍</strong></a></h3>\n<h3>115. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/bigo\"><strong>📖docs/javascript/bigo🌍</strong></a></h3>\n<h3>116. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/clean-code\"><strong>📖docs/javascript/clean-code🌍</strong></a></h3>\n<h3>117. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/constructor-functions\"><strong>📖docs/javascript/constructor-functions🌍</strong></a></h3>\n<h3>118. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/for-loops\"><strong>📖docs/javascript/for-loops🌍</strong></a></h3>\n<h3>119. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/promises\"><strong>📖docs/javascript/promises🌍</strong></a></h3>\n<h3>120. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/review\"><strong>📖docs/javascript/review🌍</strong></a></h3>\n<h3>121. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/this-is-about-this\"><strong>📖docs/javascript/this-is-about-this🌍</strong></a></h3>\n<h3>122. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript\"><strong>📖docs/javascript🌍</strong></a></h3>\n<h3>123. <a href=\"https://bgoonz-blog.netlify.app/docs/leetcode\"><strong>📖docs/leetcode🌍</strong></a></h3>\n<h3>124. <a href=\"https://bgoonz-blog.netlify.app/docs/privacy-policy\"><strong>📖docs/privacy-policy🌍</strong></a></h3>\n<h3>125. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/embeded-websites\"><strong>📖docs/projects/embeded-websites🌍</strong></a></h3>\n<h3>126. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/list-of-projects\"><strong>📖docs/projects/list-of-projects🌍</strong></a></h3>\n<h3>127. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/mini-projects2\"><strong>📖docs/projects/mini-projects2🌍</strong></a></h3>\n<h3>128. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/mini-projects\"><strong>📖docs/projects/mini-projects🌍</strong></a></h3>\n<h3>129. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/my-websites\"><strong>📖docs/projects/my-websites🌍</strong></a></h3>\n<h3>130. <a href=\"https://bgoonz-blog.netlify.app/docs/projects\"><strong>📖docs/projects🌍</strong></a></h3>\n<h3>131. <a href=\"https://bgoonz-blog.netlify.app/docs/python/at-length\"><strong>📖docs/python/at-length🌍</strong></a></h3>\n<h3>132. <a href=\"https://bgoonz-blog.netlify.app/docs/python/cheat-sheet\"><strong>📖docs/python/cheat-sheet🌍</strong></a></h3>\n<h3>133. <a href=\"https://bgoonz-blog.netlify.app/docs/python/comprehensive-guide\"><strong>📖docs/python/comprehensive-guide🌍</strong></a></h3>\n<h3>134. <a href=\"https://bgoonz-blog.netlify.app/docs/python/examples\"><strong>📖docs/python/examples🌍</strong></a></h3>\n<h3>135. <a href=\"https://bgoonz-blog.netlify.app/docs/python/flow-control\"><strong>📖docs/python/flow-control🌍</strong></a></h3>\n<h3>136. <a href=\"https://bgoonz-blog.netlify.app/docs/python/functions\"><strong>📖docs/python/functions🌍</strong></a></h3>\n<h3>137. <a href=\"https://bgoonz-blog.netlify.app/docs/python/google-sheets-api\"><strong>📖docs/python/google-sheets-api🌍</strong></a></h3>\n<h3>138. <a href=\"https://bgoonz-blog.netlify.app/docs/python/intro-for-js-devs\"><strong>📖docs/python/intro-for-js-devs🌍</strong></a></h3>\n<h3>139. <a href=\"https://bgoonz-blog.netlify.app/docs/python/python-ds\"><strong>📖docs/python/python-ds🌍</strong></a></h3>\n<h3>140. <a href=\"https://bgoonz-blog.netlify.app/docs/python/snippets\"><strong>📖docs/python/snippets🌍</strong></a></h3>\n<h3>141. <a href=\"https://bgoonz-blog.netlify.app/docs/python\"><strong>📖docs/python🌍</strong></a></h3>\n<h3>142. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet\"><strong>📖docs/quick-reference/Emmet🌍</strong></a></h3>\n<h3>143. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/all-emojis\"><strong>📖docs/quick-reference/all-emojis🌍</strong></a></h3>\n<h3>144. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/create-react-app\"><strong>📖docs/quick-reference/create-react-app🌍</strong></a></h3>\n<h3>145. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/git-bash\"><strong>📖docs/quick-reference/git-bash🌍</strong></a></h3>\n<h3>146. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/git-tricks\"><strong>📖docs/quick-reference/git-tricks🌍</strong></a></h3>\n<h3>147. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/google-firebase\"><strong>📖docs/quick-reference/google-firebase🌍</strong></a></h3>\n<h3>148. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/heroku-error-codes\"><strong>📖docs/quick-reference/heroku-error-codes🌍</strong></a></h3>\n<h3>149. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/installation\"><strong>📖docs/quick-reference/installation🌍</strong></a></h3>\n<h3>150. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/markdown-dropdowns\"><strong>📖docs/quick-reference/markdown-dropdowns🌍</strong></a></h3>\n<h3>151. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/minifiction\"><strong>📖docs/quick-reference/minifiction🌍</strong></a></h3>\n<h3>152. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions\"><strong>📖docs/quick-reference/new-repo-instructions🌍</strong></a></h3>\n<h3>153. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/psql-setup\"><strong>📖docs/quick-reference/psql-setup🌍</strong></a></h3>\n<h3>154. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/pull-request-rubric\"><strong>📖docs/quick-reference/pull-request-rubric🌍</strong></a></h3>\n<h3>155. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/quick-links\"><strong>📖docs/quick-reference/quick-links🌍</strong></a></h3>\n<h3>156. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/topRepos\"><strong>📖docs/quick-reference/topRepos🌍</strong></a></h3>\n<h3>157. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/understanding-path\"><strong>📖docs/quick-reference/understanding-path🌍</strong></a></h3>\n<h3>158. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/vscode-themes\"><strong>📖docs/quick-reference/vscode-themes🌍</strong></a></h3>\n<h3>159. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference\"><strong>📖docs/quick-reference🌍</strong></a></h3>\n<h3>160. <a href=\"https://bgoonz-blog.netlify.app/docs/react/ajax-n-apis\"><strong>📖docs/react/ajax-n-apis🌍</strong></a></h3>\n<h3>161. <a href=\"https://bgoonz-blog.netlify.app/docs/react/cheatsheet\"><strong>📖docs/react/cheatsheet🌍</strong></a></h3>\n<h3>162. <a href=\"https://bgoonz-blog.netlify.app/docs/react/createReactApp\"><strong>📖docs/react/createReactApp🌍</strong></a></h3>\n<h3>163. <a href=\"https://bgoonz-blog.netlify.app/docs/react/demo\"><strong>📖docs/react/demo🌍</strong></a></h3>\n<h3>164. <a href=\"https://bgoonz-blog.netlify.app/docs/react/dont-use-index-as-keys\"><strong>📖docs/react/dont-use-index-as-keys🌍</strong></a></h3>\n<h3>165. <a href=\"https://bgoonz-blog.netlify.app/docs/react/jsx\"><strong>📖docs/react/jsx🌍</strong></a></h3>\n<h3>166. <a href=\"https://bgoonz-blog.netlify.app/docs/react/react-docs\"><strong>📖docs/react/react-docs🌍</strong></a></h3>\n<h3>167. <a href=\"https://bgoonz-blog.netlify.app/docs/react/react-in-depth\"><strong>📖docs/react/react-in-depth🌍</strong></a></h3>\n<h3>168. <a href=\"https://bgoonz-blog.netlify.app/docs/react/react2\"><strong>📖docs/react/react2🌍</strong></a></h3>\n<h3>169. <a href=\"https://bgoonz-blog.netlify.app/docs/react/render-elements\"><strong>📖docs/react/render-elements🌍</strong></a></h3>\n<h3>170. <a href=\"https://bgoonz-blog.netlify.app/docs/react\"><strong>📖docs/react🌍</strong></a></h3>\n<h3>171. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/awesome-lists\"><strong>📖docs/reference/awesome-lists🌍</strong></a></h3>\n<h3>172. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/awesome-nodejs\"><strong>📖docs/reference/awesome-nodejs🌍</strong></a></h3>\n<h3>173. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/awesome-static\"><strong>📖docs/reference/awesome-static🌍</strong></a></h3>\n<h3>174. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/bash-commands\"><strong>📖docs/reference/bash-commands🌍</strong></a></h3>\n<h3>175. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/bookmarks\"><strong>📖docs/reference/bookmarks🌍</strong></a></h3>\n<h3>176. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/embed-the-web\"><strong>📖docs/reference/embed-the-web🌍</strong></a></h3>\n<h3>177. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/github-search\"><strong>📖docs/reference/github-search🌍</strong></a></h3>\n<h3>178. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/google-cloud\"><strong>📖docs/reference/google-cloud🌍</strong></a></h3>\n<h3>179. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/how-2-reinstall-npm\"><strong>📖docs/reference/how-2-reinstall-npm🌍</strong></a></h3>\n<h3>180. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/how-to-kill-a-process\"><strong>📖docs/reference/how-to-kill-a-process🌍</strong></a></h3>\n<h3>181. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/installing-node\"><strong>📖docs/reference/installing-node🌍</strong></a></h3>\n<h3>182. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/intro-to-nodejs\"><strong>📖docs/reference/intro-to-nodejs🌍</strong></a></h3>\n<h3>183. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/markdown-styleguide\"><strong>📖docs/reference/markdown-styleguide🌍</strong></a></h3>\n<h3>184. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/notes-template\"><strong>📖docs/reference/notes-template🌍</strong></a></h3>\n<h3>185. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/psql\"><strong>📖docs/reference/psql🌍</strong></a></h3>\n<h3>186. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/resources\"><strong>📖docs/reference/resources🌍</strong></a></h3>\n<h3>187. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/vscode\"><strong>📖docs/reference/vscode🌍</strong></a></h3>\n<h3>188. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/web-api&#x27;s\"><strong>📖docs/reference/web-api's🌍</strong></a></h3>\n<h3>189. <a href=\"https://bgoonz-blog.netlify.app/docs/reference\"><strong>📖docs/reference🌍</strong></a></h3>\n<h3>190. <a href=\"https://bgoonz-blog.netlify.app/docs/search\"><strong>📖docs/search🌍</strong></a></h3>\n<h3>191. <a href=\"https://bgoonz-blog.netlify.app/docs/sitemap\"><strong>📖docs/sitemap🌍</strong></a></h3>\n<h3>192. <a href=\"https://bgoonz-blog.netlify.app/docs/tips/array-methods\"><strong>📖docs/tips/array-methods🌍</strong></a></h3>\n<h3>193. <a href=\"https://bgoonz-blog.netlify.app/docs/tips/insert-into-array\"><strong>📖docs/tips/insert-into-array🌍</strong></a></h3>\n<h3>194. <a href=\"https://bgoonz-blog.netlify.app/docs/tips/sorting-strings\"><strong>📖docs/tips/sorting-strings🌍</strong></a></h3>\n<h3>195. <a href=\"https://bgoonz-blog.netlify.app/docs/tips\"><strong>📖docs/tips🌍</strong></a></h3>\n<h3>196. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/Archive\"><strong>📖docs/tools/Archive🌍</strong></a></h3>\n<h3>197. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/data-structures\"><strong>📖docs/tools/data-structures🌍</strong></a></h3>\n<h3>198. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/dev-utilities\"><strong>📖docs/tools/dev-utilities🌍</strong></a></h3>\n<h3>199. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/markdown-html\"><strong>📖docs/tools/markdown-html🌍</strong></a></h3>\n<h3>200. <a href=\"https://bgoonz-blog.netlify.app/docs/tools\"><strong>📖docs/tools🌍</strong></a></h3>\n<h3>201. <a href=\"https://bgoonz-blog.netlify.app/docs/tutorials/enviorment-setup\"><strong>📖docs/tutorials/enviorment-setup🌍</strong></a></h3>\n<h3>202. <a href=\"https://bgoonz-blog.netlify.app/docs/tutorials\"><strong>📖docs/tutorials🌍</strong></a></h3>\n<h3>203. <a href=\"https://bgoonz-blog.netlify.app/docs\"><strong>🖥️docs🌍</strong></a></h3>"},{"url":"/docs/about/resume/","relativePath":"docs/about/resume.md","relativeDir":"docs/about","base":"resume.md","name":"resume","frontmatter":{"title":"Resume","weight":0,"seo":{"title":"Resume","description":"Successfully completed and delivered a platform to digitize a guitar signal and perform filtering before executing frequency & time domain analysis to track a current performance against prerecorded performance.","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Resume","keyName":"property"},{"name":"og:description","value":"This is the Resume page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Resume"},{"name":"twitter:description","value":"This is the Resume page"}]},"template":"docs"},"html":"<h1><em><strong>Resume</strong></em></h1>\n<div align=\"center\">\n<h1><strong>Bryan</strong> <strong>Guner</strong></h1>\n<h2><em>551-254-5505 | <a href=\"mailto:bryan.guner@gmail.com\">bryan.guner@gmail.com</a></em></h2>\n</div>\n<h2>➤Skills</h2>\n<table>\n<thead>\n<tr>\n<th>Languages:</th>\n<th>JavaScript ES-6, NodeJS, HTML5, CSS3, SCSS, Bash Shell, SQL, MATLAB, Python, C++, Mathematica, JSON</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Frameworks / Libraries:</td>\n<td>React, Redux, ExpressJS, Gatsby, NextJS, Ant-Design, Loadash, Sequelize, GraphQL, AJAX, Jest, Mocha, jQuery, Electron</td>\n</tr>\n<tr>\n<td>Databases:</td>\n<td>PostgreSQL, MongoDB, SQlite3</td>\n</tr>\n<tr>\n<td>Tools:</td>\n<td>Figma, Adobe XD, GitHub, GitLab, Excel, VSCode, Sublime Text, Atom, Google Analytics, Bootstrap, Tailwind, FontAwesome</td>\n</tr>\n<tr>\n<td>Tools (continued):</td>\n<td>Docker, Firebase, Postman, Wordpress, Chrome Dev Tools, Jira, Trello, Confluence, Firebase, AWS S3, Okta, Algolia, Loadash</td>\n</tr>\n<tr>\n<td>Hosting:</td>\n<td>Heroku, Netlify, Vercel, Wordpress, Cloudfare, AWS, Firebase, Digital Ocean</td>\n</tr>\n<tr>\n<td>Operating Systems:</td>\n<td>Linux, Windows (WSL), IOS</td>\n</tr>\n</tbody>\n</table>\n<h2>➤Projects</h2>\n<p><strong>Gatsby</strong> <strong>GraphQL-Blog</strong> <strong><a href=\"https://bgoonz-blog.netlify.app/\">Live Site |</a><a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\">GitHub</a></strong></p>\n<p><strong>Stack:</strong> <em>JavaScript, React / Gatsby | GraphQL | SCSS | Lodash | Jamstack | Facebook Comments API | jQuery | Firebase</em></p>\n<p><em><strong>A</strong></em><a href=\"https://bgoonz-blog.netlify.app/\"><em><strong>web development blog</strong></em></a><em><strong>featuring convenient web development tools and interactive content</strong></em></p>\n<ul>\n<li>Implemented 4 Gatsby page models and GraphQL schema to fetch markdown content and feed it into react components.</li>\n<li>Designed and integrated a set of convenient web-hosted <a href=\"https://bgoonz-blog.netlify.app/docs/tools/\">developer tools</a> and GUI interfaces.</li>\n<li>Added interactive content including comments, <a href=\"https://bgoonz-blog.netlify.app/docs/interact/video-chat/\">video conferencing</a>, <a href=\"https://bgoonz-blog.netlify.app/docs/interact/other-sites/\">data-structure visualization</a>, <a href=\"https://bgoonz-blog.netlify.app/docs/interact/\">games</a> and full text search.</li>\n</ul>\n<p><strong>Autonomously Triggered Guitar Effects Platform**</strong> <a href=\"https://bgoonz.github.io/Revamped-Automatic-Guitar-Effect-Triggering/\">Live Site</a>| <a href=\"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering/tree/master/Triggered-Guitar-Effects-Platform\">GitHub</a>**</p>\n<p><strong>Stack:</strong> <em>C++ | Python | MATLAB | PureData</em></p>\n<p><a href=\"https://bgoonz.github.io/Revamped-Automatic-Guitar-Effect-Triggering/SR%20Project%20II%20Presentation.pdf\"><em><strong>Platform</strong></em></a><em><strong>designed to analyze a time sequence of notes and autonomously trigger guitar effects at</strong></em><a href=\"https://youtu.be/pRKjaprdWx4\"><em><strong>a predetermined point in the song</strong></em></a></p>\n<ul>\n<li>Used pure data to filter a guitar signal before executing frequency domain analysis and implementing <a href=\"https://youtu.be/krRVGoK9NcA\">custom built guitar effects.</a></li>\n<li>Implemented the Dynamic Time Warping algorithm in C++ and Python to generate a time agnostic measure of similarity between performances.</li>\n<li>Autonomously activated or adjusted guitar effects at multiple pre-designated sections of performance.</li>\n</ul>\n<hr>\n<p><strong>Data Structures</strong> <a href=\"https://ds-algo-official.netlify.app/\"><strong>Interactive Teaching Tool</strong></a><a href=\"https://ds-algo-official.netlify.app/\"><strong>Live Site</strong></a> <strong>|**</strong> <a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\">GitHub</a>**</p>\n<p><strong>Stack:</strong> <em>jQuery | ExpressJS | Google Analytics |Algolia Full Text Search | Amazon S3</em></p>\n<p><em><strong>A</strong></em><a href=\"https://youtu.be/onquAh1Bl0g\"><em><strong>website</strong></em></a><em><strong>for visualizing and practicing data structures and algorithms in JavaScript &#x26; Python</strong></em></p>\n<ul>\n<li>Implemented an repl.it backend to enable commenting using express and the fs <strong>module</strong> to write user comments to a storage.json file.</li>\n<li>Developed proprietary npm package to recursively walk the project directory structure and generate a <a href=\"https://ds-algo-official.netlify.app/sitemap.html\">site navigation page</a>.</li>\n<li>Created multiple embedded data structure visualizations that interact with user input.</li>\n<li>Automated the generation and submission of a <a href=\"https://ds-algo-official.netlify.app/sitemap.xml\">sitemap</a>to (Google, Bing, and Yandex) on every build.</li>\n</ul>\n<hr>\n<br>\n<h2>➤ Experience</h2>\n<p><strong>Product Development Engineer |</strong> <a href=\"https://www.cembre.com/\"><em><strong>Cembre</strong></em></a><em><strong>, Edison, NJ</strong>\\</em>_|_<strong>Oct 2019 - Mar 2020</strong></p>\n<ul>\n<li>Converted client's product needs into <a href=\"https://www.cembre.com/family/details/5202\">technical specs</a> to be sent to the development team in Italy.</li>\n<li>Reorganized internal file server structure and conducted system integration and product demonstrations.</li>\n<li>Presided over internal and end user software trainings in addition to producing customer facing documentation.</li>\n<li>Conducted <a href=\"https://drive.google.com/drive/folders/1USAQtiQ3jLm3fiRCxIm4TEkWGlq4fO6j?usp=sharing\">electrical conductivity &#x26; tensile testing of electrical components</a> and presided over troubleshooting railroad hardware and software in North America.</li>\n</ul>\n<p><a href=\"https://familypromise.org/\"><strong>Family Promise</strong></a> <strong>Service Tracker</strong></p>\n<p><strong>Full Stack Web Development Intern | Remote | Sept 2021 - Present</strong> <strong><a href=\"https://a.familypromiseservicetracker.dev/\">Live Site |</a><a href=\"https://github.com/Lambda-School-Labs/family-promise-service-tracker-fe-a\">GitHub</a></strong></p>\n<p><strong>Stack:</strong> <em>React | Redux | ExpressJS | Figma | Okta | AWS</em></p>\n<p><em><strong>An</strong></em><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/roadmap\"><em><strong>app</strong></em></a><em><strong>built to helps local communities provide services to address the root causes of family homelessness</strong></em></p>\n<ul>\n<li>Collaborated on state management using Redux to handle application state and middleware using redux-promise &#x26; redux-thunk.</li>\n<li>Built two graphic visuals of the user hierarchy and the scope of their permissions as well as maintained the team's <a href=\"https://bryan-guner.gitbook.io/my-docs/v/lambda-labs/\">docs</a>.</li>\n<li>Created Figma UI mockups for possible future developments, such as displaying metrics data and map pinpoint functionality.</li>\n</ul>\n<br>\n<hr>\n<h2>➤ Education</h2>\n<h4><a href=\"https://www.credly.com/badges/bd145ba3-0f09-42fc-8d1f-a3bc4e0a46b4/public_url\"><strong>Lambda School</strong></a> , <em><strong>Full Stack Web Development</strong></em></h4>\n<blockquote>\n<p><em><strong>May 2020 - Nov 2021</strong></em></p>\n</blockquote>\n<p>Six-month immersive software development course with a focus on <a href=\"https://gist.github.com/bgoonz/17494dab0042a6f70eda7929c08c878f\">full stack web development</a>. Over 2000 hours of work invested including class time, homework, and projects.</p>\n<p><strong>B.S.</strong> <a href=\"https://electrical-computerengineering.tcnj.edu/\"><strong>Electrical Engineering</strong></a> <strong>, TCNJ, Ewing NJ</strong> <strong>2014 - 2019</strong></p>\n<p><a href=\"https://github.com/bgoonz/random-static-html-page-deploy/blob/master/ElectricalEngineeringCurriculum.pdf\">2 <strong>Curriculum link</strong></a></p>\n<blockquote>\n<p><a href=\"https://bryan-guner.gitbook.io/my-docs/v/electrical-engineering/\">Knowledge of</a> circuit boards, processors, chips, electronic equipment, and computer hardware and software, including applications and programming.</p>\n</blockquote>\n<div align=\"center\">\n<p><em><strong>References &#x26; further work experience available upon request.</strong></em></p>\n</div>"},{"url":"/docs/about/youtube/","relativePath":"docs/about/youtube.md","relativeDir":"docs/about","base":"youtube.md","name":"youtube","frontmatter":{"title":"Youtube","weight":0,"excerpt":"youtube","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/xGZSWvFess8\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/krRVGoK9NcA\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/QJDBiTxNWO0\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"},{"url":"/docs/articles/buffers/","relativePath":"docs/articles/buffers.md","relativeDir":"docs/articles","base":"buffers.md","name":"buffers","frontmatter":{"title":"Node Buffers","sections":[],"seo":{"title":"","description":"A buffer is an area of memory. JavaScript developers are not familiar with this concept, much less than C, C++ or Go developers","robots":[],"extra":[{"name":"og:description","value":"A buffer is an area of memory. JavaScript developers are not familiar with this concept, much less than C, C++ or Go developers","keyName":"property","relativeUrl":false},{"name":"og:title","value":"Buffer","keyName":"property","relativeUrl":false},{"name":"og:image","value":"images/javascript-4ced5a19.gif","keyName":"property","relativeUrl":true}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>What is a buffer?</h2>\n<p>A buffer is an area of memory. JavaScript developers are not familiar with this concept, much less than C, C++ or Go developers (or any programmer that uses a system programming language), which interact with memory every day.</p>\n<p>It represents a fixed-size chunk of memory (can't be resized) allocated outside of the V8 JavaScript engine.</p>\n<p>You can think of a buffer like an array of integers, which each represent a byte of data.</p>\n<p>It is implemented by the Node.js <a href=\"https://nodejs.org/api/buffer.html\">Buffer class</a>.</p>\n<h2>Why do we need a buffer?</h2>\n<p>Buffers were introduced to help developers deal with binary data, in an ecosystem that traditionally only dealt with strings rather than binaries.</p>\n<p>Buffers are deeply linked with streams. When a stream processor receives data faster than it can digest, it puts the data in a buffer.</p>\n<p>A simple visualization of a buffer is when you are watching a YouTube video and the red line goes beyond your visualization point: you are downloading data faster than you're viewing it, and your browser buffers it.</p>\n<h2>How to create a buffer</h2>\n<p>A buffer is created using the <a href=\"https://nodejs.org/api/buffer.html#buffer_buffer_from_buffer_alloc_and_buffer_allocunsafe\"><code>Buffer.from()</code></a>, <a href=\"https://nodejs.org/api/buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding\"><code>Buffer.alloc()</code></a>, and <a href=\"https://nodejs.org/api/buffer.html#buffer_class_method_buffer_allocunsafe_size\"><code>Buffer.allocUnsafe()</code></a> methods.</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n</code></pre>\n<ul>\n<li><a href=\"https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_array\"><code>Buffer.from(array)</code></a></li>\n<li><a href=\"https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a></li>\n<li><a href=\"https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_buffer\"><code>Buffer.from(buffer)</code></a></li>\n<li><a href=\"https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding\"><code>Buffer.from(string[, encoding])</code></a></li>\n</ul>\n<p>You can also just initialize the buffer passing the size. This creates a 1KB buffer:</p>\n<pre><code class=\"language-js\">const buf = Buffer.alloc(1024);\n//or\nconst buf = Buffer.allocUnsafe(1024);\n</code></pre>\n<p>While both <code>alloc</code> and <code>allocUnsafe</code> allocate a <code>Buffer</code> of the specified size in bytes, the <code>Buffer</code> created by <code>alloc</code> will be <em>initialized</em> with zeroes and the one created by <code>allocUnsafe</code> will be <em>uninitialized</em>. This means that while <code>allocUnsafe</code> would be quite fast in comparison to <code>alloc</code>, the allocated segment of memory may contain old data which could potentially be sensitive.</p>\n<p>Older data, if present in the memory, can be accessed or leaked when the <code>Buffer</code> memory is read. This is what really makes <code>allocUnsafe</code> unsafe and extra care must be taken while using it.</p>\n<h2>Using a buffer</h2>\n<h3>Access the content of a buffer</h3>\n<p>A buffer, being an array of bytes, can be accessed like an array:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nconsole.log(buf[0]); //72\nconsole.log(buf[1]); //101\nconsole.log(buf[2]); //121\n</code></pre>\n<p>Those numbers are the Unicode Code that identifies the character in the buffer position (H => 72, e => 101, y => 121)</p>\n<p>You can print the full content of the buffer using the <code>toString()</code> method:</p>\n<pre><code class=\"language-js\">console.log(buf.toString());\n</code></pre>\n<blockquote>\n<p>Notice that if you initialize a buffer with a number that sets its size, you'll get access to pre-initialized memory that will contain random data, not an empty buffer!</p>\n</blockquote>\n<h3>Get the length of a buffer</h3>\n<p>Use the <code>length</code> property:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nconsole.log(buf.length);\n</code></pre>\n<h3>Iterate over the contents of a buffer</h3>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nfor (const item of buf) {\n    console.log(item); //72 101 121 33\n}\n</code></pre>\n<h3>Changing the content of a buffer</h3>\n<p>You can write to a buffer a whole string of data by using the <code>write()</code> method:</p>\n<pre><code class=\"language-js\">const buf = Buffer.alloc(4);\nbuf.write('Hey!');\n</code></pre>\n<p>Just like you can access a buffer with an array syntax, you can also set the contents of the buffer in the same way:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nbuf[1] = 111; //o\nconsole.log(buf.toString()); //Hoy!\n</code></pre>\n<h3>Copy a buffer</h3>\n<p>Copying a buffer is possible using the <code>copy()</code> method:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nlet bufcopy = Buffer.alloc(4); //allocate 4 bytes\nbuf.copy(bufcopy);\n</code></pre>\n<p>By default you copy the whole buffer. 3 more parameters let you define the starting position, the ending position, and the new buffer length:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nlet bufcopy = Buffer.alloc(2); //allocate 2 bytes\nbuf.copy(bufcopy, 0, 0, 2);\nbufcopy.toString(); //'He'\n</code></pre>\n<h3>Slice a buffer</h3>\n<p>If you want to create a partial visualization of a buffer, you can create a slice. A slice is not a copy: the original buffer is still the source of truth. If that changes, your slice changes.</p>\n<p>Use the <code>slice()</code> method to create it. The first parameter is the starting position, and you can specify an optional second parameter with the end position:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\nbuf.slice(0).toString(); //Hey!\nconst slice = buf.slice(0, 2);\nconsole.log(slice.toString()); //He\nbuf[1] = 111; //o\nconsole.log(slice.toString()); //Ho\n</code></pre>"},{"url":"/docs/about/","relativePath":"docs/about/index.md","relativeDir":"docs/about","base":"index.md","name":"index","frontmatter":{"title":"About","excerpt":"Web-Dev-Hub is my personal blogand documentation site","seo":{"title":"About","description":"Bryan Guner personal blog about page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"About","keyName":"property"},{"name":"og:description","value":"This is the About page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"About"},{"name":"twitter:description","value":"This is the About page"}]},"template":"docs","thumb_img":"images/chrome_z7gswAaLMg.png","date":"2022-01-21"},"html":"<div align=\"center\">\n<h1>Hi 👋, I'm Bryan</h1>\n  \n<img align=\"center\"  src=\"https://github.com/bgoonz/bgoonz/blob/master/circle-small-sharp.png?raw=true?raw=true\" ></img>\n<blockquote>\n<p>Netlify Research Program Participant!</p>\n</blockquote>\n<h4><a href=\"https://master--bgoonz-blog.netlify.app/\">WEBSITE</a> ⇄ <a href=\"https://bg-portfolio.netlify.app/\">Portfolio</a> ⇄ <a href=\"https://webdevhub.jetbrains.space/oauth/auth/invite/419dd305ba717a392a02aa5b4e41e09c\">Collaborate</a> ⇄ <a href=\"https://unruffled-curran-b8a076.netlify.app/my-websites.html\">Other-Websites</a></h4>\n<p><img src=\"https://views.whatilearened.today/views/github/bgoonz/views.svg\" alt=\"Profile views\"><a href=\"https://gitter.im/bgoonz/community?utm_source=badge&#x26;utm_medium=badge&#x26;utm_campaign=pr-badge\"><img src=\"https://badges.gitter.im/bgoonz/community.svg\" alt=\"Gitter\"></a><a href=\"https://hackmd.io/5DeYj2oXTvGJ1-Xvp1Jo2Q\"><img src=\"https://hackmd.io/5DeYj2oXTvGJ1-Xvp1Jo2Q/badge\" alt=\"hackmd-github-sync-badge\"></a><a href=\"https://github.com/bgoonz?tab=followers\"><img src=\"https://img.shields.io/github/followers/bgoonz.svg?style=social&#x26;label=Follow&#x26;maxAge=2592000\" alt=\"GitHub followers\"></a></p>\n<h3>➤ <em>Email</em> <a href=\"#\">bryan.guner@gmail.com</a> <em>Phone</em> <a href=\"551-254-5505\">551-254-5505</a></h3>\n<h4 align=\"center\">A passionate Web Developer, Electrical Engineer, Musician & Producer</h4>\n<details>\n<summary>  See More </summary>   \n<img align=\"center\" src=\"https://readme-jokes.vercel.app/api\" stye=\"width:570; height:420;\">\n<p><a href=\"https://bg-portfolio.netlify.app/\"><img src=\"https://img.shields.io/badge/-%E2%9D%A4_Portfolio-f58?style=flat-square&#x26;logo=a&#x26;logoColor=white&#x26;link=https://bg-portfolio.netlify.app/\" alt=\"Portfolio\"></a>\n<a href=\"https://github.com/bgoonz/resume-cv-portfolio-samples/blob/master/2021-resume/bryan-guner-resume-2021.pdf\" download><img src=\"https://img.shields.io/badge/-Resume-f00?style=flat-square&#x26;logo=adobe-acrobat-reader&#x26;logoColor=white\" alt=\"Resume PDF\"></a>\n<a href=\"mailto:bryan.guner@gmail.com\"><img src=\"https://img.shields.io/badge/bryan.guner@gmail.com-f4b400?style=flat-square&#x26;logo=gmail&#x26;logoColor=black&#x26;link=mailto:bryan.guner@gmail.com\" alt=\"Bryan&#x27;s email\"></a>\n<a href=\"https://web-dev-hub.com/\"><img src=\"https://img.shields.io/badge/-Blog-21759b?style=flat-square&#x26;logo=WordPress&#x26;logoColor=white&#x26;link=https://web-dev-hub.com/\" alt=\"Blog\"></a>\n<a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\"><img src=\"https://img.shields.io/badge/-LinkedIn-0077b5?style=flat-square&#x26;logo=Linkedin&#x26;logoColor=white&#x26;link=https://www.linkedin.com/in/bryan-guner-046199128/\" alt=\"Linkedin\"></a>\n<a href=\"https://angel.co/u/bryan-guner\"><img src=\"https://img.shields.io/badge/-AngelList-black?style=flat-square&#x26;logo=AngelList&#x26;logoColor=white&#x26;link=https://angel.co/u/bryan-guner\" alt=\"AngelList\"></a>\n<a href=\"https://github.com/bgoonz\"><img src=\"https://img.shields.io/github/followers/bgoonz?label=follow&#x26;style=social\" alt=\"GitHub bgoonz\"></a></p>\n<p align=\"center\">\n  <a href=\"mailto:bryan.guner@gmail.com\"><img src=\"https://img.icons8.com/color/96/000000/gmail.png\" alt=\"email\"/></a><a href=\"https://www.facebook.com/bryan.guner/\"><img src=\"https://img.icons8.com/color/96/000000/facebook.png\" alt=\"facebook\"/></a><a href=\"https://twitter.com/bgooonz\"><img src=\"https://img.icons8.com/color/96/000000/twitter-squared.png\" alt=\"twitter\"/></a><a href=\"https://www.youtube.com/channel/UC9-rYyUMsnEBK8G8fCyrXXA/videos\"><img src=\"https://img.icons8.com/color/96/000000/youtube.png\" alt=\"youtube\"/></a><a href=\"https://www.instagram.com/bgoonz/?hl=en\"><img src=\"https://img.icons8.com/color/96/000000/instagram-new.png\" alt=\"instagram\"/></a><a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\"><img src=\"https://img.icons8.com/color/96/000000/linkedin.png\" alt=\"linkedin\"/></a>\n  <a href=\"https://bryanguner.medium.com/\"><img src=\"https://img.icons8.com/color/96/000000/medium-logo.png\" alt=\"medium\"/></a><a href=\"https://open.spotify.com/user/bgoonz?si=ShH9wYbIQWab5Jz_30BKFw\"><img src=\"https://img.icons8.com/color/96/000000/spotify--v1.png\" alt=\"spotify\"/></a>\n  </p>\n  \n  \n  \n[![Bryans github activity graph](https://activity-graph.herokuapp.com/graph?username=bgoonz&custom_title=This%20is%20Bryans%20Activity&hide_border=true&theme=chartreuse-dark)](https://github.com/bgoonz/github-readme-activity-graph)\n<div align=\"center\">\n<h3 align=\"center\">Languages and Tools:</h3>\n<p align=\"left\"> <a href=\"https://www.arduino.cc/\" target=\"_blank\"> <img src=\"https://cdn.worldvectorlogo.com/logos/arduino-1.svg\" alt=\"arduino\" width=\"40\" height=\"40\"/> </a> <a href=\"https://aws.amazon.com\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/amazonwebservices/amazonwebservices-original-wordmark.svg\" alt=\"aws\" width=\"40\" height=\"40\"/> </a> <a href=\"https://azure.microsoft.com/en-in/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/microsoft_azure/microsoft_azure-icon.svg\" alt=\"azure\" width=\"40\" height=\"40\"/> </a> <a href=\"https://babeljs.io/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/babeljs/babeljs-icon.svg\" alt=\"babel\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.gnu.org/software/bash/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/gnu_bash/gnu_bash-icon.svg\" alt=\"bash\" width=\"40\" height=\"40\"/> </a> <a href=\"https://getbootstrap.com\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/bootstrap/bootstrap-plain-wordmark.svg\" alt=\"bootstrap\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.w3schools.com/cpp/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/cplusplus/cplusplus-original.svg\" alt=\"cplusplus\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.w3schools.com/css/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/css3/css3-original-wordmark.svg\" alt=\"css3\" width=\"40\" height=\"40\"/> </a> <a href=\"https://d3js.org/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/d3js/d3js-original.svg\" alt=\"d3js\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.docker.com/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/docker/docker-original-wordmark.svg\" alt=\"docker\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.elastic.co\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/elastic/elastic-icon.svg\" alt=\"elasticsearch\" width=\"40\" height=\"40\"/> </a> <a href=\"https://emberjs.com/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/ember/ember-original-wordmark.svg\" alt=\"ember\" width=\"40\" height=\"40\"/> </a> <a href=\"https://expressjs.com\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/express/express-original-wordmark.svg\" alt=\"express\" width=\"40\" height=\"40\"/> </a> <a href=\"https://firebase.google.com/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/firebase/firebase-icon.svg\" alt=\"firebase\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.gatsbyjs.com/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/gatsbyjs/gatsbyjs-icon.svg\" alt=\"gatsby\" width=\"40\" height=\"40\"/> </a> <a href=\"https://cloud.google.com\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/google_cloud/google_cloud-icon.svg\" alt=\"gcp\" width=\"40\" height=\"40\"/> </a> <a href=\"https://git-scm.com/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/git-scm/git-scm-icon.svg\" alt=\"git\" width=\"40\" height=\"40\"/> </a> <a href=\"https://heroku.com\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/heroku/heroku-icon.svg\" alt=\"heroku\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.w3.org/html/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-original-wordmark.svg\" alt=\"html5\" width=\"40\" height=\"40\"/> </a> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg\" alt=\"javascript\" width=\"40\" height=\"40\"/> </a> <a href=\"https://jekyllrb.com/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/jekyllrb/jekyllrb-icon.svg\" alt=\"jekyll\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.linux.org/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/linux/linux-original.svg\" alt=\"linux\" width=\"40\" height=\"40\"/> </a> <a href=\"https://mochajs.org\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/mochajs/mochajs-icon.svg\" alt=\"mocha\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.mongodb.com/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/mongodb/mongodb-original-wordmark.svg\" alt=\"mongodb\" width=\"40\" height=\"40\"/> </a> <a href=\"https://nextjs.org/\" target=\"_blank\"> <img src=\"https://cdn.worldvectorlogo.com/logos/nextjs-3.svg\" alt=\"nextjs\" width=\"40\" height=\"40\"/> </a> <a href=\"https://nodejs.org\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/nodejs/nodejs-original-wordmark.svg\" alt=\"nodejs\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.photoshop.com/en\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/photoshop/photoshop-line.svg\" alt=\"photoshop\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.postgresql.org\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/postgresql/postgresql-original-wordmark.svg\" alt=\"postgresql\" width=\"40\" height=\"40\"/> </a> <a href=\"https://postman.com\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/getpostman/getpostman-icon.svg\" alt=\"postman\" width=\"40\" height=\"40\"/> </a> <a href=\"https://pugjs.org\" target=\"_blank\"> <img src=\"https://cdn.worldvectorlogo.com/logos/pug.svg\" alt=\"pug\" width=\"40\" height=\"40\"/> </a> <a href=\"https://github.com/puppeteer/puppeteer\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/pptrdev/pptrdev-official.svg\" alt=\"puppeteer\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.python.org\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg\" alt=\"python\" width=\"40\" height=\"40\"/> </a> <a href=\"https://reactjs.org/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/react/react-original-wordmark.svg\" alt=\"react\" width=\"40\" height=\"40\"/> </a> <a href=\"https://reactnative.dev/\" target=\"_blank\"> <img src=\"https://reactnative.dev/img/header_logo.svg\" alt=\"reactnative\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.typescriptlang.org/\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/typescript/typescript-original.svg\" alt=\"typescript\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.vagrantup.com/\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/vagrantup/vagrantup-icon.svg\" alt=\"vagrant\" width=\"40\" height=\"40\"/> </a> <a href=\"https://webpack.js.org\" target=\"_blank\"> <img src=\"https://raw.githubusercontent.com/devicons/devicon/d00d0969292a6569d45b06d3f350f463a0107b0d/icons/webpack/webpack-original-wordmark.svg\" alt=\"webpack\" width=\"40\" height=\"40\"/> </a> <a href=\"https://www.adobe.com/products/xd.html\" target=\"_blank\"> <img src=\"https://cdn.worldvectorlogo.com/logos/adobe-xd.svg\" alt=\"xd\" width=\"40\" height=\"40\"/> </a> <a href=\"https://zapier.com\" target=\"_blank\"> <img src=\"https://www.vectorlogo.zone/logos/zapier/zapier-icon.svg\" alt=\"zapier\" width=\"40\" height=\"40\"/> </a> </p>  \n  \n  </div>\n<div align=\"center\">\n  \n<p><img align=\"center\" src=\"https://github-readme-streak-stats.herokuapp.com/?user=bgoonz&\" alt=\"bgoonz\" /><img align=\"center\" src=\"https://github-readme-stats.vercel.app/api?username=bgoonz&show_icons=true&locale=en\" alt=\"bgoonz\" /></p>\n<p><a href=\"https://github.com/bgoonz/Lambda\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Lambda\" alt=\"ReadMe Card\"></a>\n<a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=DS-ALGO-OFFICIAL\" alt=\"ReadMe Card\"></a></p>\n<p><a href=\"https://github.com/bgoonz/github-profile-trophy\"><img src=\"https://github-profile-trophy.vercel.app/?username=bgoonz&#x26;row=1\" alt=\"trophy\"></a></p>\n<p><a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=BGOONZ_BLOG_2.0\" alt=\"ReadMe Card\"></a></p>\n<p><a href=\"https://github.com/bgoonz/github-readme-stats\"><img src=\"https://github-readme-stats.vercel.app/api/top-langs/?username=bgoonz&#x26;layout=compact&#x26;hide=html,mathematica&#x26;langs_count=16\" alt=\"Top Langs\"></a></p>\n</div>\n</div>\n<center>\n<details>\n<summary>About Me</summary>\n<ul>\n<li>🔭 Contract Web Development <strong>Relational Concepts</strong></li>\n<li>🌱 I'm currently learning <strong>React/Redux, Python, Java, Express, jQuery</strong></li>\n<li>👯 I'm looking to collaborate on <a href=\"https://goofy-euclid-1cd736.netlify.app/core-site/index.html\">Any web audio or open source educational tools.</a></li>\n<li>🤝 I'm looking for help with <a href=\"https://github.com/bgoonz/React-Practice\">Learning React</a></li>\n<li>👨‍💻 All of my projects are available at <a href=\"https://bgoonz.github.io/\">https://bgoonz.github.io/</a></li>\n<li>📝 I regularly write articles on <a href=\"https://bryanguner.medium.com/\">medium</a> &#x26;&#x26; <a href=\"https://web-dev-resource-hub.netlify.app/\">Web-Dev-Resource-Hub</a></li>\n<li>💬 Ask me about <strong>Anything:</strong></li>\n<li>📫 How to reach me <strong>bryan.guner@gmail.com</strong></li>\n<li>⚡ Fun fact <strong>I played Bamboozle Music Festival at the Meadowlands Stadium Complex when I was 14.</strong></li>\n</ul>\n<h3>i really like music :headphones:</h3>\n<h4>What's the most useful business-related book you've ever read?</h4>\n<blockquote>\n<p>A Random Walk Down Wall Street</p>\n</blockquote>\n<h4>What's your favorite non-business book?</h4>\n<blockquote>\n<p>Hitchhiker's Guide To The Galaxy</p>\n</blockquote>\n<h4>If money were not an issue, what would you be doing right now?</h4>\n<blockquote>\n<p>Designing recording software/hardware and using it</p>\n</blockquote>\n<h4>What words of advice would you give your younger self?</h4>\n<blockquote>\n<p>Try harder and listen to your parents more (the latter bit of advice would be almost certain to fall on deaf ears lol)</p>\n</blockquote>\n<h4>What's the most creative thing you've ever done?</h4>\n<blockquote>\n<p>I built a platform that listens to a guitarist's performance and automatically triggers guitar effects at the appropriate time in the song.</p>\n</blockquote>\n<h4>Which founders or startups do you most admire?</h4>\n<blockquote>\n<p>Is it to basic to say Tesla... I know they're prevalent now but I've been an avid fan since as early as 2012.</p>\n</blockquote>\n<h4>What's your super power?</h4>\n<blockquote>\n<p>Having really good ideas and forgetting them moments later.</p>\n</blockquote>\n<h4>What's the best way for people to get in touch with you?</h4>\n<blockquote>\n<p>A text</p>\n</blockquote>\n<h4>What aspects of your work are you most passionate about?</h4>\n<p>Creating things that change my every day life.</p>\n<h4>What was the most impactful class you took in school?</h4>\n<blockquote>\n<p>Modern Physics... almost changed my major after that class... but at the end of the day engineering was a much more fiscally secure avenue.</p>\n</blockquote>\n<h4>What's something you wish you had done years earlier?</h4>\n<blockquote>\n<p>Learned to code ... and sing</p>\n</blockquote>\n<h4>What words of wisdom do you live by?</h4>\n<blockquote>\n<p>*Disclaimer: The following wisdom is very cliche ... but... \"Be the change that you wish to see in the world.\"</p>\n</blockquote>\n<blockquote>\n<p>Mahatma Gandhi</p>\n</blockquote>\n<p>| | ## Portfolio:</p>\n<h1><a href=\"https://portfolio42.netlify.app/\">netlify</a> |</h1>\n<p>| :------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <strong>Languages</strong> | <img src=\"https://img.shields.io/badge/Lang-HTML5-informational?style=flat&#x26;logo=HTML5&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Lang-CSS-informational?style=flat&#x26;logo=CSS%20Wizardry&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Lang-JavaScript-informational?style=flat&#x26;logo=JavaScript&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Lang-SQL-informational?style=flat&#x26;logo=SQL&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Lang-Java-informational?style=flat&#x26;logo=Java&#x26;logoColor=white&#x26;color=00FF00\"> <br /><img src=\"https://img.shields.io/badge/Lang-Python-informational?style=flat&#x26;logo=Python&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Lang-TypeScript-informational?style=flat&#x26;logo=TypeScript&#x26;logoColor=white&#x26;color=00FF00\"> |\n| <strong>Libraries</strong> | <img src=\"https://img.shields.io/badge/Lib-Bootstrap-informational?style=flat&#x26;logo=Bootstrap&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Lib-React-informational?style=flat&#x26;logo=React&#x26;logoColor=white&#x26;color=00FF00\"> |\n| <strong>Frameworks</strong> | <img src=\"https://img.shields.io/badge/FW-Redux-informational?style=flat&#x26;logo=Redux&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/FW-Node.js-informational?style=flat&#x26;logo=Node.js&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/FW-Express-informational?style=flat&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/FW-PowerShell-informational?style=flat&#x26;logo=PowerShell&#x26;logoColor=white&#x26;color=00FF00\"> |\n| <strong>Databases</strong> | <img src=\"https://img.shields.io/badge/DB-PostgreSQL-informational?style=flat&#x26;logo=PostgreSQL&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/DB-MySQL-informational?style=flat&#x26;logo=MySQL&#x26;logoColor=white&#x26;color=00FF00\"> |\n| <strong>Testing</strong> | <img src=\"https://img.shields.io/badge/Test-Jest-informational?style=flat&#x26;logo=Jest&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Test-Cypress-informational?style=flat&#x26;logo=Cypress&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Test-JUnit-informational?style=flat&#x26;logo=JUnit&#x26;logoColor=white&#x26;color=00FF00\"> |\n| <strong>Other</strong> | <img src=\"https://img.shields.io/badge/Editor-VS%20Code-informational?style=flat&#x26;logo=visualstudiocode&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Editor-IntelliJ%20IDEA-informational?style=flat&#x26;logo=intellijidea&#x26;logoColor=white&#x26;color=00FF00\"> <br /><img src=\"https://img.shields.io/badge/Tools-ESLint-informational?style=flat&#x26;logo=ESLint&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Tools-Postman-informational?style=flat&#x26;logo=Postman&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Tools-Git-informational?style=flat&#x26;logo=Git&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Tools-GitHub-informational?style=flat&#x26;logo=GitHub&#x26;logoColor=white&#x26;color=00FF00\"> <br /><img src=\"https://img.shields.io/badge/OS-Windows%2010-informational?style=flat&#x26;logo=Windows&#x26;logoColor=white&#x26;color=00FF00\"> <br /><img src=\"https://img.shields.io/badge/Code-LESS-informational?style=flat&#x26;logoColor=white&#x26;color=00FF00\"> <img src=\"https://img.shields.io/badge/Code-Emmet-informational?style=flat&#x26;logoColor=white&#x26;color=00FF00\"> |</p>\n  </div>\n</details>\n<!-- start work experience section -->\n<details>\n<summary> Resume </summary>\n<h1>➤ Technical Skills­­­</h1>\n<table>\n<thead>\n<tr>\n<th><strong>Programming**</strong> Languages:**</th>\n<th>JavaScript ES-6, NodeJS, React, HTML5, CSS3, SCSS, Bash Shell, Excel, SQL, NoSQL, MATLAB, Python, C++</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Databases:</strong></td>\n<td>PostgreSQL, MongoDB</td>\n</tr>\n<tr>\n<td><strong>Cloud:</strong></td>\n<td>Docker, AWS, Google App Engine, Netlify, Digital Ocean, Heroku, Azure Cloud Services</td>\n</tr>\n<tr>\n<td><strong>OS:</strong></td>\n<td>Linux, Windows (WSL), IOS</td>\n</tr>\n<tr>\n<td><strong>Agile:</strong></td>\n<td>GitHub, BitBucket, Jira, Confluence</td>\n</tr>\n<tr>\n<td><strong>IDEs:</strong></td>\n<td>VSCode, Visual Studio, Atom, Code Blocks, Sublime Text 3, Brackets</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<p><a href=\"#experience\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h1>➤ Experience</h1>\n<table>\n<thead>\n<tr>\n<th><strong>Relational Concepts:</strong> Hallandale Beach, FL</th>\n<th>March 2020 - Present</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Front End Web Developer</strong></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>Responsible for front-end development for a custom real estate application which provides sophisticated and fully customizable filtering to allow investors and real estate professionals to narrow in on exact search targets.</li>\n<li>Designed mock-up screens, wireframes, and workflows for intuitive user experience.</li>\n<li>Migrated existing multi-page user experience into singular page interfaces using React components.</li>\n<li>Participated in every stage of the design from conception through development and iterative improvement.</li>\n<li>Produced user stories and internal documentation for future site development and maintenance.</li>\n<li>Implemented modern frameworks including Bootstrap and Font-Awesome to give the site an aesthetic overhaul.</li>\n<li>Managed all test deployments using a combination of Digital Ocean and Netlify.</li>\n<li>Produced unit tests using a combination of Mocha and Chai.</li>\n<li>Injected Google Analytics to capture pertinent usage data to produce an insightful dashboard experience.</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th><strong>Environment:</strong></th>\n<th><strong>JavaScript, JQuery, React, HTML5 &#x26; CSS, Bootstrap, DOJO, Google Cloud, Bash Script</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th><strong>Cembre:</strong> Edison, NJ</th>\n<th>Nov 2019 - Mar 2020</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Product Development Engineer</strong></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>Converted client's product needs into technical specs to be sent to the development team in Italy.</li>\n<li>Reorganized internal file server structure.</li>\n<li>Conducted remote / in person system integration and product demonstrations.</li>\n<li>Presided over internal and end user software trainings in addition to producing the corresponding documentation.</li>\n<li>Served as the primary point of contact for troubleshooting railroad hardware and software in the North America.</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th><strong>Environment:</strong></th>\n<th><strong>Excel, AutoCAD, PowerPoint, Word</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n<hr>\n<p><a href=\"#education\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h1>➤ Education</h1>\n<table>\n<thead>\n<tr>\n<th>**B.S. Electrical Engineering, TCNJ, ** Ewing NJ</th>\n<th>2014 - 2019</th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n<p><strong>Capstone Project - Team Lead</strong></p>\n<ul>\n<li>Successfully completed and delivered a platform to digitize a guitar signal and perform filtering before executing frequency &#x26; time domain analysis to track a current performance against prerecorded performance.</li>\n<li>Implemented the Dynamic Time Warping algorithm in C++ and Python to autonomously activate or adjust guitar effect at multiple pre-designated section of performance.</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th><strong>Environment:</strong></th>\n<th><strong>C++, Python, MATLAB, PureData</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</details>\n<details>\n<summary> My Projects</summary>\n<table>\n  <thead>\n    <tr>\n      <th>Project Name</th>\n      <th>Skills used</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><a href='https://web-dev-resource-hub.netlify.app/'>Web-Dev-Resource-Hub (blog)</a></td>\n      <td>Html, Css, javascript, Python, jQuery,  React,  FireBase,  AWS S3,  Netlify,  Heroku,  NodeJS,  PostgreSQL,  C++,  Web Audio API</td>\n      <td>My blog site contains my resource sharing and blog site ... centered mostly on web development and just a bit of audio production / generally nerdy things I find interesting.</td>\n    </tr>\n       <tr>\n      <td><a href='https://project-showcase-bgoonz.netlify.app/'>Dynamic Guitar Effects Triggering Using A Modified Dynamic Time Warping Algorithm</a></td>\n      <td>C, C++, Python, Java, Pure Data, Matlab</td>\n      <td>Successfully completed and delivered a platform to digitize a guitar signal and perform filtering before executing frequency & time domain analysis to track a current performance against prerecorded performance.Implemented the Dynamic Time Warping algorithm in C++ and Python to autonomously activate or adjust guitar effect at multiple pre-designated section of performance.</td>\n    </tr>\n    <tr>\n      <td><a href=\"https://trusting-dijkstra-4d3b17.netlify.app/\">Data Structures & Algorithms Interactive Learning Site</a></td>\n      <td>HTML, CSS, Javascript,  Python,  Java,  jQuery,  Repl.it-Database API</td>\n      <td>A interactive and comprehensive guide and learning tool for DataStructures and Algorithms ... concentrated on JS but with some examples in Python,  C++ and Java as well</td>\n    </tr>\n    <tr>\n      <td><a href='https://mihirbegmusic.netlify.app/'>MihirBeg.com</a></td>\n      <td>Html, Css, Javascript,  Bootstrap,  FontAwesome,  jQuery</td>\n      <td>A responsive and mobile friendly content promotion site for an Audio Engineer to engage with fans and potential clients</td>\n    </tr>\n    <tr>\n      <td><a href='https://tetris42.netlify.app/'>Tetris-JS</a></td>\n      <td>Html, Css, Javascript</td>\n      <td>The classic game of tetris implemented in plain javascipt and styled with a retro-futureistic theme</td>\n    </tr>\n    <tr>\n      <td><a href=\"https://githtmlpreview.netlify.app/\">Git Html Preview Tool</a></td>\n      <td>Git,  Javascript,  CSS3,  HTML5,  Bootstrap,  BitBucket</td>\n      <td>Loads HTML using CORS proxy,  then process all links,  frames,  scripts and styles,  and load each of them using CORS proxy,  so they can be evaluated by the browser.</td>\n    </tr>\n    <tr>\n      <td><a href='https://project-showcase-bgoonz.netlify.app/'>Mini Project Showcase</a></td>\n      <td>HTML, HTML5, CSS, CSS3, Javascript, jQuery</td>\n      <td>add songs and play music, it also uses to store data in  INDEXEDB Database by which we can play songs, if we not clear the catch then song will remain stored in database.</td>\n    </tr>\n    \n  </tbody>\n<p align=\"center\">\n<hr>\n<hr>\n<hr>\n<hr>\n<div style=\" border: 1px solid black\">\n<img src=\"https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/23b9b236-746e-409c-8e86-30b4385e3b72/hr1-raypham.gif\" alt=\"hr-line\" width=\"100%\" height=\"22\">\n</div>\n<hr>\n<hr>\n<h1><a href=\"https://ecstatic-jang-593fd1.netlify.app/readme\">Learning React Blog</a></h1>\n<h4>React Repo:</h4>\n<p><a href=\"https://github.com/bgoonz/React-Practice\">React Repo</a></p>\n<hr>\n<h2><a href=\"https://codesandbox.io/embed/zealous-microservice-ti7em?autoresize=1&expanddevtools=1&fontsize=14&hidenavigation=1&moduleview=1&theme=dark\"   style=\"width:100%; height:20px; border:0; border-radius: 4px; overflow:hidden;\" rel=\"React Todo\"><img src=\"https://codesandbox.io/static/img/play-codesandbox.svg\" alt=\"Foo\"></a></h2>\n<div style=\" border: 1px solid black\">\n<img src=\"https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/23b9b236-746e-409c-8e86-30b4385e3b72/hr1-raypham.gif\" alt=\"hr-line\" width=\"100%\" height=\"22\">\n</div>\n<h1><a href=\"https://documentation-site-react2-peitff669-bgoonz.vercel.app/\">react-documentation-site</a></h1>\n<p><a href=\"https://codesandbox.io/s/magical-stallman-ov0d1?autoresize=1&#x26;expanddevtools=1&#x26;fontsize=12&#x26;hidenavigation=1&#x26;moduleview=1&#x26;theme=dark\"><img src=\"https://codesandbox.io/static/img/play-codesandbox.svg\" alt=\"Edit magical-stallman-ov0d1\"></a></p>\n<div style=\" border: 1px solid black\">\n<img src=\"https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/23b9b236-746e-409c-8e86-30b4385e3b72/hr1-raypham.gif\" alt=\"hr-line\" width=\"100%\" height=\"22\">\n</div>\n<hr>\n<h2>➤ Codepens (mostly embeded animations)</h2>\n<h1><a href=\"https://embedable-content.netlify.app/\">code-pens-embedded</a></h1>\n<p><a href=\"#weekly-quick-snips\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ Weekly-Quick-Snips:</h2>\n<hr>\n<h4>Snippet of the Day:</h4>\n<h3>replaceAll</h3>\n<p>the method string.replaceAll(search, replaceWith) replaces all appearances of search string with replaceWith.</p>\n<pre><code class=\"language-javascript\">const str = 'this is a JSsnippets example';\n\nconst updatedStr = str.replace('example', 'snippet'); // 'this is a  JSsnippets snippet'\n\n\nThe tricky part is that replace method replaces only the very first match of the substring we have passed:\n\n\nconst str = 'this is a JSsnippets example and examples are great';\n\nconst updatedStr = str.replace('example', 'snippet'); //'this is a JSsnippets snippet and examples are great'\n\nIn order to go through this, we need to use a global regexp instead:\n\n\nconst str = 'this is a JSsnippets example and examples are great';\n\nconst updatedStr = str.replace(/example/g, 'snippet'); //'this is a JSsnippets snippet and snippets are greatr'\n\nbut now we have new friend in town, replaceAll\n\nconst str = 'this is a JSsnippets example and examples are great';\n\nconst updatedStr = str.replaceAll('example', 'snippet'); //'this is a JSsnippets snippet and snippets are greatr'\n</code></pre>\n<hr>\n<h3>Fibonacci in Python:</h3>\n<pre><code class=\"language-py\">def fib_iter(n):\n    if n == 0:\n        return 0\n    if n == 1:\n        return 1\n    p0 = 0\n    p1 = 1\n    for i in range(n-1):\n        next_val = p0 + p1\n        p0 = p1\n        p1 = next_val\n    return next_val\nfor i in range(10):\n    print(f'{i}: {fib_iter(i)}')\n</code></pre>\n<hr>\n<h4>Yesterday's Snippet of the day:</h4>\n<hr>\n<pre><code class=\"language-py\">def quicksort(l):\n    # One of our base cases is an empty list or list with one element\n    if len(l) == 0 or len(l) == 1:\n        return l\n    # If we have a left list, a pivot point and a right list...\n    # assigns the return values of the partition() function\n    left, pivot, right = partition(l)\n    # Our sorted list looks like left + pivot + right, but sorted.\n    # Pivot has to be in brackets to be a list, so python can concatenate all the elements to a single list\n    return quicksort(left) + [pivot] + quicksort(right)\n\n\n\nprint(quicksort([]))\n\n\n\nprint(quicksort([1]))\n\n\n\nprint(quicksort([1,2]))\n\nprint(quicksort([2,1]))\n\n\nprint(quicksort([2,2]))\n\n\nprint(quicksort([5,3,9,4,8,1,7]))\n\n\nprint(quicksort([1,2,3,4,5,6,7]))\n\n\nprint(quicksort([9,8,7,6,5,4,3,2,1]))\n</code></pre>\n<hr>\n<details>\n  \n  <summary>See Older Snippets!</summary>\n  \n  \n  #### This Week's snippets: \n  \n  ---\n  \n  \n   >will replace any spaces in file names with an underscore!\n```bash\n for file in *; do mv \"$file\" `echo $file | tr ' ' '_'` ; done\n  ## TAKING IT A STEP FURTHER:\n # Let's do it recursivley:\n  function RecurseDirs ()\n{\n    oldIFS=$IFS\n    IFS=$'\\n'\n    for f in \"$@\"\n    do\n  # YOUR CODE HERE!\n<p>[<img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\">]</p>\n<p>for file in *; do mv \"$file\" <code>echo $file | tr ' ' '_'</code> ; done\nif [[ -d \"${f}\" ]]; then\ncd \"${f}\"\nRecurseDirs $(ls -1 \".\")\ncd ..\nfi\ndone\nIFS=$oldIFS\n}\nRecurseDirs \"./\"</p>\n<pre><code> ---\n ### Copy to clipboard jQuerry\n > Language: Javascript/Jquery\n\n\n>In combination with the script tag :  &#x3C;script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\">&#x3C;/script> , this snippet will add a copy to clipboard button to all of your embedded &#x3C;code> blocks.\n\n\n```js\n$(document).ready(function() {\n  $('code, pre').append('&#x3C;span class=\"command-copy\" >&#x3C;i class=\"fa fa-clipboard\" aria-hidden=\"true\">&#x3C;/i>&#x3C;/span>');\n\n  $('code span.command-copy').click(function(e) {\n    var text = $(this).parent().text().trim(); //.text();\n    var copyHex = document.createElement('input');\n    copyHex.value = text\n    document.body.appendChild(copyHex);\n    copyHex.select();\n    document.execCommand('copy');\n    console.log(copyHex.value)\n    document.body.removeChild(copyHex);\n  });\n\n\n  $('pre span.command-copy').click(function(e) {\n    var text = $(this).parent().text().trim();\n    var copyHex = document.createElement('input');\n    copyHex.value = text\n    document.body.appendChild(copyHex);\n    copyHex.select();\n    document.execCommand('copy');\n    console.log(copyHex.value)\n    document.body.removeChild(copyHex);\n  });\n})\n</code></pre>\n<hr>\n<h3>Append Files in PWD</h3>\n<pre><code class=\"language-js\">//APPEND-DIR.js\nconst fs = require('fs');\nlet cat = require('child_process').execSync('cat *').toString('UTF-8');\nfs.writeFile('output.md', cat, (err) => {\n    if (err) throw err;\n});\n</code></pre>\n<hr>\n<h3>doesUserFrequentStarbucks.js</h3>\n<pre><code class=\"language-js\">const isAppleDevice = /Mac|iPod|iPhone|iPad/.test(navigator.platform);\nconsole.log(isAppleDevice);\n// Result: will return true if user is on an Apple device\n</code></pre>\n<hr>\n<h3>arr-intersection.js</h3>\n<pre><code class=\"language-js\">/*\n function named intersection(firstArr) that takes in an array and\nreturns a function. \nWhen the function returned by intersection is invoked\npassing in an array (secondArr) it returns a new array containing the elements\ncommon to both firstArr and secondArr.\n*/\nfunction intersection(firstArr) {\n    return (secondArr) => {\n        let common = [];\n        for (let i = 0; i &#x3C; firstArr.length; i++) {\n            let el = firstArr[i];\n            if (secondArr.indexOf(el) > -1) {\n                common.push(el);\n            }\n        }\n        return common;\n    };\n}\nlet abc = intersection(['a', 'b', 'c']); // returns a function\nconsole.log(abc(['b', 'd', 'c'])); // returns [ 'b', 'c' ]\n\nlet fame = intersection(['f', 'a', 'm', 'e']); // returns a function\nconsole.log(fame(['a', 'f', 'z', 'b'])); // returns [ 'f', 'a' ]\n</code></pre>\n<hr>\n<h3>arr-of-cum-partial-sums.js</h3>\n<pre><code class=\"language-js\">/*\nFirst is recurSum(arr, start) which returns the sum of the elements of arr from the index start till the very end.\nSecond is partrecurSum() that recursively concatenates the required sum into an array and when we reach the end of the array, it returns the concatenated array.\n*/\n//arr.length -1 = 5\n//                   arr   [    1,    7,    12,   6,    5,    10   ]\n//                   ind   [    0     1     2     3     4      5   ]\n//                              ↟                              ↟\n//                            start                           end\n\nfunction recurSum(arr, start = 0, sum = 0) {\n    if (start &#x3C; arr.length) {\n        return recurSum(arr, start + 1, sum + arr[start]);\n    }\n\n    return sum;\n}\n\nfunction rPartSumsArr(arr, partSum = [], start = 0, end = arr.length - 1) {\n    if (start &#x3C;= end) {\n        return rPartSumsArr(arr, partSum.concat(recurSum(arr, start)), ++start, end);\n    }\n    return partSum.reverse();\n}\n\nconsole.log('------------------------------------------------rPartSumArr------------------------------------------------');\nconsole.log('rPartSumsArr(arr)=[ 1, 1, 5, 2, 6, 10 ]: ', rPartSumsArr(arr));\nconsole.log('rPartSumsArr(arr1)=[ 1, 7, 12, 6, 5, 10 ]: ', rPartSumsArr(arr1));\nconsole.log('------------------------------------------------rPartSumArr------------------------------------------------');\n/*\n------------------------------------------------rPartSumArr------------------------------------------------\nrPartSumsArr(arr)=[ 1, 1, 5, 2, 6, 10 ]:  [ 10, 16, 18, 23, 24, 25 ]\nrPartSumsArr(arr1)=[ 1, 7, 12, 6, 5, 10 ]:  [ 10, 15, 21, 33, 40, 41 ]\n------------------------------------------------rPartSumArr------------------------------------------------\n*/\n</code></pre>\n<hr>\n<h3>camel2Kabab.js</h3>\n<pre><code class=\"language-js\">function camelToKebab(value) {\n    return value.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n</code></pre>\n<hr>\n<h3>camelCase.js</h3>\n<pre><code class=\"language-js\">function camel(str) {\n    return str.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function (match, index) {\n        if (+match === 0) return ''; // or if (/\\s+/.test(match)) for white spaces\n        return index === 0 ? match.toLowerCase() : match.toUpperCase();\n    });\n}\n</code></pre>\n<hr>\n<h3>concatLinkedLists.js</h3>\n<pre><code class=\"language-js\">function addTwoNumbers(l1, l2) {\n    let result = new ListNode(0);\n    let currentNode = result;\n    let carryOver = 0;\n    while (l1 != null || l2 != null) {\n        let v1 = 0;\n        let v2 = 0;\n        if (l1 != null) v1 = l1.val;\n        if (l2 != null) v2 = l2.val;\n\n        let sum = v1 + v2 + carryOver;\n        carryOver = Math.floor(sum / 10);\n        sum = sum % 10;\n        currentNode.next = new ListNode(sum);\n\n        currentNode = currentNode.next;\n        if (l1 != null) l1 = l1.next;\n        if (l2 != null) l2 = l2.next;\n    }\n\n    if (carryOver > 0) {\n        currentNode.next = new ListNode(carryOver);\n    }\n\n    return result.next;\n}\n</code></pre>\n<hr>\n<h3>fast-is-alpha-numeric.js</h3>\n<pre><code class=\"language-js\">//Function to test if a character is alpha numeric that is faster than a regular\n//expression in JavaScript\n\nlet isAlphaNumeric = (char) => {\n    char = char.toString();\n    let id = char.charCodeAt(0);\n    if (\n        !(id > 47 &#x26;&#x26; id &#x3C; 58) &#x26;&#x26; // if not numeric(0-9)\n        !(id > 64 &#x26;&#x26; id &#x3C; 91) &#x26;&#x26; // if not letter(A-Z)\n        !(id > 96 &#x26;&#x26; id &#x3C; 123) // if not letter(a-z)\n    ) {\n        return false;\n    }\n    return true;\n};\n\nconsole.log(isAlphaNumeric('A')); //true\nconsole.log(isAlphaNumeric(2)); //true\nconsole.log(isAlphaNumeric('z')); //true\nconsole.log(isAlphaNumeric(' ')); //false\nconsole.log(isAlphaNumeric('!')); //false\n</code></pre>\n<hr>\n<h3>find-n-replace.js</h3>\n<pre><code class=\"language-js\">function replaceWords(str, before, after) {\n    if (/^[A-Z]/.test(before)) {\n        after = after[0].toUpperCase() + after.substring(1);\n    } else {\n        after = after[0].toLowerCase() + after.substring(1);\n    }\n    return str.replace(before, after);\n}\nconsole.log(replaceWords('Let us go to the store', 'store', 'mall')); //\"Let us go to the mall\"\nconsole.log(replaceWords('He is Sleeping on the couch', 'Sleeping', 'sitting')); //\"He is Sitting on the couch\"\nconsole.log(replaceWords('His name is Tom', 'Tom', 'john'));\n//\"His name is John\"\n</code></pre>\n<hr>\n<h3>flatten-arr.js</h3>\n<pre><code class=\"language-js\">/*Simple Function to flatten an array into a single layer */\nconst flatten = (array) => array.reduce((accum, ele) => accum.concat(Array.isArray(ele) ? flatten(ele) : ele), []);\n</code></pre>\n<hr>\n<h3>isWeekDay.js</h3>\n<pre><code class=\"language-js\">const isWeekday = (date) => date.getDay() % 6 !== 0;\nconsole.log(isWeekday(new Date(2021, 0, 11)));\n// Result: true (Monday)\nconsole.log(isWeekday(new Date(2021, 0, 10)));\n// Result: false (Sunday)\n</code></pre>\n<hr>\n<h3>longest-common-prefix.js</h3>\n<pre><code class=\"language-js\">function longestCommonPrefix(strs) {\n    let prefix = '';\n    if (strs.length === 0) return prefix;\n    for (let i = 0; i &#x3C; strs[0].length; i++) {\n        const character = strs[0][i];\n        for (let j = 0; j &#x3C; strs.length; j++) {\n            if (strs[j][i] !== character) return prefix;\n        }\n        prefix = prefix + character;\n    }\n    return prefix;\n}\n</code></pre>\n<p><a href=\"https://wakatime.com\"><img src=\"https://wakatime.com/share/@bgoonz42/e088a908-1c73-434f-9eab-b73ea4f17d3c.png\" /></a></p>\n</details>\n<hr>\n<p><a href=\"#github-gists\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h1>➤ Github Gists</h1>\n<h2><a href=\"https://bgoonzgist.netlify.app/\">Github Gists</a></h2>\n<p><a href=\"https://gist.github.com/bgoonz/659a9b81ac45453bedc0a1a36275b580\">list-of-my-websites</a></p>\n<p><a href=\"https://github.com/sindresorhus/awesome\"><img src=\"https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\" alt=\"Awesome\"></a> <a href=\"https://github.com/chetanraj/awesome-github-badges\"><img src=\"https://img.shields.io/badge/Made%20With-Love-orange.svg\" alt=\"Made With Love\"></a></p>\n<p><a href=\"https://forthebadge.com\"><img src=\"https://forthebadge.com/images/badges/certified-snoop-lion.svg\" alt=\"forthebadge\"></a><a href=\"https://forthebadge.com\"><img src=\"https://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg\" alt=\"forthebadge\"></a></p>\n<p><a href=\"https://github.com/bgoonz/blog-w-comments\"><img src=\"https://img.shields.io/website-up-down-green-red/http/shields.io.svg\" alt=\"Website shields.io\"></a><a href=\"https://GitHub.com/bgoonz/ask-me-anything\"><img src=\"https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg\" alt=\"Ask Me Anything !\"></a><a href=\"https://gitter.im/bgoonz/community?utm_source=badge&#x26;utm_medium=badge&#x26;utm_campaign=pr-badge\"><img src=\"https://badges.gitter.im/bgoonz/community.svg\" alt=\"Gitter\"></a><a href=\"https://pypi.python.org/pypi/ansicolortags/\"><img src=\"https://img.shields.io/pypi/l/ansicolortags.svg\" alt=\"PyPI license\"></a></p>\n<p><a href=\"https://GitHub.com/bgoonz/bgoonz/graphs/commit-activity\"><img src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" alt=\"Maintenance\"></a><a href=\"https://github.com/ellerbrock/open-source-badges/\"><img src=\"https://badges.frapsoft.com/os/v1/open-source.png?v=103\" alt=\"Open Source Love\"></a> <a href=\"https://github.com/ellerbrock/open-source-badges/\"><img src=\"https://badges.frapsoft.com/bash/v1/bash.png?v=103\" alt=\"Bash Shell\"></a></p>\n<p><img src=\"https://img.shields.io/badge/-React-black?style=flat&#x26;logo=react\" alt=\"React\"> <img src=\"https://img.shields.io/badge/-Redux-lightblue?style=flat&#x26;logo=redux\" alt=\"Redux\">\n<img src=\"https://img.shields.io/badge/-HTML5-E34F26?style=flat&#x26;logo=html5&#x26;logoColor=white\" alt=\"HTML5\"> <img src=\"https://img.shields.io/badge/-CSS3-1572B6?style=flat&#x26;logo=css3\" alt=\"CSS3\"> <img src=\"https://img.shields.io/badge/-Sass-black?style=flat&#x26;logo=sass\" alt=\"Sass\"><img src=\"https://img.shields.io/badge/-Docker-black?style=flat&#x26;logo=docker\" alt=\"Docker\"> <img src=\"https://img.shields.io/badge/-MySQL-black?style=flat&#x26;logo=mysql\" alt=\"MySQL\"> <img src=\"https://img.shields.io/badge/-PostgreSQL-blue?style=flat&#x26;logo=postgresql\" alt=\"PostgresQL\"> <img src=\"https://img.shields.io/badge/-Git-black?style=flat&#x26;logo=git\" alt=\"Git\"> <img src=\"https://img.shields.io/badge/-Ruby-darkred?style=flat&#x26;logo=ruby\" alt=\"Ruby\"> <img src=\"https://img.shields.io/badge/-MaterialUI-0081CB?style=flat&#x26;logo=Material-UI&#x26;logoColor=white\" alt=\"Material-UI\"></p>\n<p><img src=\"https://img.shields.io/badge/-Express-blue?style=flat&#x26;logo=express\" alt=\"Express\"> <img src=\"https://img.shields.io/badge/-Nodejs-green?style=flat&#x26;logo=Node.js\" alt=\"Nodejs\"><img src=\"https://img.shields.io/badge/-Python-lightyellow?style=flat&#x26;logo=python&#x26;logoColor=blue\" alt=\"Python\"> <img src=\"https://img.shields.io/badge/-Bootstrap-7952B3?style=flat&#x26;logo=bootstrap&#x26;logoColor=white\" alt=\"Bootstrap\"> <img src=\"https://img.shields.io/badge/-JavaScript-black?style=flat&#x26;logo=javascript\" alt=\"JavaScript\"></p>\n</details>\n</center>\n</details>"},{"url":"/docs/about/job-search/","relativePath":"docs/about/job-search.md","relativeDir":"docs/about","base":"job-search.md","name":"job-search","frontmatter":{"title":"Job Search","weight":0,"excerpt":"the hunt for a webdev position","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Job Boards and The Hunt</h1>\n<p>I can't imagine the kind of masochism it would take to enjoy the act of posting and daily maintenance on a job board…It's part of the…</p>\n<hr>\n<h3>Job Boards and The Hunt</h3>\n<h4>I can't imagine the kind of masochism it would take to enjoy the act of posting and daily maintenance on a job board…It's part of the process that you've already invested so much of yourself in, so you should take pride in it; do a good job the first time around and you'll get where your going in the blink of an eye!</h4>\n<p><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\"><strong>A list of all of my articles to link to future posts</strong><br />\n<em>You should probably skip this one… seriously it's just for internal use!</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<hr>\n<h3>Update(After The Interview):</h3>\n<p>As a candidate, there are key next steps that you can and should after every interview to help you stand out.</p>\n<p><strong>Send a thank you email within 24 business hours</strong></p>\n<p><strong>Do not miss this step!</strong> It takes less than five minutes and can make the difference between you and another candidate. It also keeps you fresh in your interviewers' memories. For example:</p>\n<p>‍</p>\n<p><em>Hi (name),</em></p>\n<blockquote>\n<p><em>Thank you so much for taking the time to meet with me yesterday to discuss my candidacy for (role title). After learning more about (share one or two takeaways from the interview about the company/team's priorities), I'm even more excited to bring my skills in (1-3 relevant skills) to the team.</em></p>\n</blockquote>\n<blockquote>\n<p><em>I look forward to hearing from you about next steps, and if there is anything that I can clarify about my experience or qualifications for the (role title) position, please don't hesitate to reach out.</em></p>\n</blockquote>\n<blockquote>\n<p><em>Thank you for your consideration,</em></p>\n</blockquote>\n<blockquote>\n<p><em>(your name)</em></p>\n</blockquote>\n<p><strong>Follow up</strong></p>\n<p>Don't wait for the company to reach out to you! Be proactive in showing your interest by checking in to see where you stand in the process. If a company indicates a deadline by which you will hear back, and the deadline has passed, follow-up!</p>\n<p><strong>Check your email and phone regularly<br>\n‍*</strong><br>\n*Don't ghost on a company at any stage in the process; make sure you add their domain to your safe senders list and respond to any messages within 24 hours.</p>\n<p>‍</p>\n<p><strong>Be prepared<br>\n‍*</strong><br>\n*You might be invited for another interview on short notice; review the description regularly so it doesn't slip from your memory, and keep brushing up on skills you may need for an interview (chances are, this won't be the only job you'll need them for anyway!)</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*H4pwwuDEjkYTWKpJ.gif\" class=\"graf-image\" /></figure>\n<hr>\n<blockquote>\n<p>Here I will maintain a running list of applicable job boards and below I will go into detail about the niches they occupy and whatever I resource I have found to use them to your maximum advantage. !</p>\n</blockquote>\n<h3>Update (remote work edition):</h3>\n<ol>\n<li><span id=\"3063\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#arc\" class=\"markup--anchor markup--li-anchor\">Arc</a></span></li>\n<li><span id=\"7639\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#we-work-remotely\" class=\"markup--anchor markup--li-anchor\">We Work Remotely</a></span></li>\n<li><span id=\"e21f\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#skip-the-drive\" class=\"markup--anchor markup--li-anchor\">Skip The Drive</a></span></li>\n<li><span id=\"e1df\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#power-to-fly\" class=\"markup--anchor markup--li-anchor\">Power to Fly</a></span></li>\n<li><span id=\"ecb8\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#remote-ok\" class=\"markup--anchor markup--li-anchor\">Remote OK</a></span></li>\n<li><span id=\"c08c\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#remotive\" class=\"markup--anchor markup--li-anchor\">Remotive</a></span></li>\n<li><span id=\"b4f2\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#flexjobs\" class=\"markup--anchor markup--li-anchor\">FlexJobs</a></span></li>\n<li><span id=\"e670\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#dribble\" class=\"markup--anchor markup--li-anchor\">Dribble</a></span></li>\n<li><span id=\"3b01\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#angellist\" class=\"markup--anchor markup--li-anchor\">AngelList</a></span></li>\n<li><span id=\"4e54\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#remote-co\" class=\"markup--anchor markup--li-anchor\">Remote.co</a></span></li>\n<li><span id=\"043a\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#justremote\" class=\"markup--anchor markup--li-anchor\">JustRemote</a></span></li>\n<li><span id=\"7190\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#virtual-vocations\" class=\"markup--anchor markup--li-anchor\">Virtual Vocations</a></span></li>\n<li><span id=\"8128\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#pangian\" class=\"markup--anchor markup--li-anchor\">Pangian</a></span></li>\n<li><span id=\"f142\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#working-nomads\" class=\"markup--anchor markup--li-anchor\">Working Nomads</a></span></li>\n<li><span id=\"6d89\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#jobspresso\" class=\"markup--anchor markup--li-anchor\">Jobspresso</a></span></li>\n<li><span id=\"8732\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#outsourcely\" class=\"markup--anchor markup--li-anchor\">Outsourcely</a></span></li>\n<li><span id=\"4f25\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#landing-jobs\" class=\"markup--anchor markup--li-anchor\">Landing.Jobs</a></span></li>\n<li><span id=\"f994\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#authentic-jobs\" class=\"markup--anchor markup--li-anchor\">Authentic Jobs</a></span></li>\n<li><span id=\"4b77\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#stack-overflow\" class=\"markup--anchor markup--li-anchor\">Stack Overflow</a></span></li>\n<li><span id=\"bb76\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#gun-io\" class=\"markup--anchor markup--li-anchor\">Gun.io</a></span></li>\n<li><span id=\"114e\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#idealist\" class=\"markup--anchor markup--li-anchor\">Idealist</a></span></li>\n<li><span id=\"5da2\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#fiverr\" class=\"markup--anchor markup--li-anchor\">Fiverr</a></span></li>\n<li><span id=\"fa5e\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#upwork\" class=\"markup--anchor markup--li-anchor\">Upwork</a></span></li>\n<li><span id=\"f209\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#freelancer\" class=\"markup--anchor markup--li-anchor\">Freelancer</a></span></li>\n<li><span id=\"5ec4\"><a href=\"https://www.freecodecamp.org/news/how-to-find-remote-jobs/#freelancermap\" class=\"markup--anchor markup--li-anchor\">freelancermap</a></span></li>\n</ol>\n<hr>\n<h3>List:</h3>\n<h4>General Boards</h4>\n<ul>\n<li><span id=\"a076\"><a href=\"https://builtin.com/jobs\" class=\"markup--anchor markup--li-anchor\">Built In</a></span></li>\n<li><span id=\"c522\"><a href=\"https://stackoverflow.com/jobs\" class=\"markup--anchor markup--li-anchor\">Stack Overflow</a></span></li>\n<li><span id=\"8235\"><a href=\"http://angel.co/jobs\" class=\"markup--anchor markup--li-anchor\">angel.co</a></span></li>\n<li><span id=\"ae9e\"><a href=\"https://www.theladders.com/jobs/search-jobs\" class=\"markup--anchor markup--li-anchor\">The Ladders</a></span></li>\n<li><span id=\"aceb\"><a href=\"http://www.crunchboard.com/jobs\" class=\"markup--anchor markup--li-anchor\">CrunchBoard</a></span></li>\n<li><span id=\"7e5f\"><a href=\"https://uncubed.com/\" class=\"markup--anchor markup--li-anchor\">Uncubed</a></span></li>\n<li><span id=\"8678\"><a href=\"https://technical.ly/jobs/\" class=\"markup--anchor markup--li-anchor\">Technical.ly</a></span></li>\n<li><span id=\"c7fe\"><a href=\"https://www.dice.com/\" class=\"markup--anchor markup--li-anchor\">Dice</a></span></li>\n<li><span id=\"23f7\"><a href=\"https://www.techcareers.com/\" class=\"markup--anchor markup--li-anchor\">Tech Careers</a></span></li>\n<li><span id=\"20cf\"><a href=\"http://jobs.mashable.com/jobs/search/results\" class=\"markup--anchor markup--li-anchor\">Mashable</a></span></li>\n</ul>\n<h4>Remote or Relocation Boards:</h4>\n<ul>\n<li><span id=\"1e47\"><a href=\"https://weworkremotely.com/\" class=\"markup--anchor markup--li-anchor\">We Work Remotely</a></span></li>\n<li><span id=\"37d2\"><a href=\"https://relocate.me/\" class=\"markup--anchor markup--li-anchor\">Relocate</a><a href=\"https://workfromhomejobs.me/\" class=\"markup--anchor markup--li-anchor\">‍</a></span></li>\n<li><span id=\"aad7\"><a href=\"https://workfromhomejobs.me/\" class=\"markup--anchor markup--li-anchor\">Work From Home Jobs</a></span></li>\n<li><span id=\"d1fc\"><a href=\"https://docs.google.com/spreadsheets/d/16V7hG7l24hBAnlcmaSG3mrusDx1uj_ZsLwnTu7L_wsQ/edit?usp=sharing\" class=\"markup--anchor markup--li-anchor\">Remote Boards &#x26; Companies Spreadsheet</a></span></li>\n<li><span id=\"5267\"><a href=\"https://careervault.io/\" class=\"markup--anchor markup--li-anchor\">Career Vault</a></span></li>\n</ul>\n<h4>DS Boards:</h4>\n<ul>\n<li><span id=\"a50a\"><a href=\"https://www.bigdatajobs.com/\" class=\"markup--anchor markup--li-anchor\">BigDataJobs</a></span></li>\n<li><span id=\"e7ce\"><a href=\"https://icrunchdata.com/data-science-jobs/\" class=\"markup--anchor markup--li-anchor\">Icrunchdata</a></span></li>\n<li><span id=\"d66f\"><a href=\"https://www.analyticsjobs.co.uk/\" class=\"markup--anchor markup--li-anchor\">Analyticsjobs.co.uk</a></span></li>\n</ul>\n<h4>Design Boards</h4>\n<ul>\n<li><span id=\"0a09\"><a href=\"https://www.behance.net/joblist\" class=\"markup--anchor markup--li-anchor\">Behance</a></span></li>\n<li><span id=\"0174\"><a href=\"https://www.uxjobsboard.com/\" class=\"markup--anchor markup--li-anchor\">UX Jobs Board</a></span></li>\n<li><span id=\"ef44\"><a href=\"https://www.krop.com/creative-jobs/ux-ui-designer/\" class=\"markup--anchor markup--li-anchor\">Krop</a></span></li>\n</ul>\n<h4>Software Development</h4>\n<ul>\n<li><span id=\"4702\"><a href=\"https://www.honeypot.io/pages/for_employers\" class=\"markup--anchor markup--li-anchor\">Honeypot.io</a></span></li>\n<li><span id=\"d025\"><a href=\"https://jobs.github.com/\" class=\"markup--anchor markup--li-anchor\">GitHub</a></span></li>\n<li><span id=\"ed46\"><a href=\"https://blabladev.eu/\" class=\"markup--anchor markup--li-anchor\">BlablaDev</a></span></li>\n<li><span id=\"c23f\"><a href=\"http://jobs.smashingmagazine.com/\" class=\"markup--anchor markup--li-anchor\">Smashing <strong>Magazine</strong></a></span></li>\n<li><span id=\"61fd\"><a href=\"http://jobs.arstechnica.com/\" class=\"markup--anchor markup--li-anchor\">arstechnica</a></span></li>\n<li><span id=\"c526\"><a href=\"http://jobs.37signals.com/\" class=\"markup--anchor markup--li-anchor\">obs.37signals</a></span></li>\n<li><span id=\"1ec6\"><a href=\"http://news.ycombinator.com/submitted?id=whoishiring\" class=\"markup--anchor markup--li-anchor\">ycombinator</a></span></li>\n<li><span id=\"fa87\"><a href=\"http://jobs.slashdot.org/jobboard.php\" class=\"markup--anchor markup--li-anchor\">jobs.slashdot.org</a></span></li>\n<li><span id=\"3dfc\"><a href=\"http://angel.co/talent\" class=\"markup--anchor markup--li-anchor\">http://angel.co/talent</a></span></li>\n<li><span id=\"319e\"><a href=\"https://www.whitetruffle.com/\" class=\"markup--anchor markup--li-anchor\">whitetruffle</a></span></li>\n<li><span id=\"428a\"><a href=\"http://www.crunchboard.com/jobs/\" class=\"markup--anchor markup--li-anchor\">crunchboard</a></span></li>\n</ul>\n<p><strong>I am intentionally not linking glassdoor because they have irritated me for the last time by insisting I provide a job review every time I want to access their content… (To the makers of glassdoor… HOW MANY TIMES A MONTH DO YOU THINK I CHANGE JOBS!!!!) I don't have 15 minutes to make up a job experience every time I want to read a review.</strong></p>\n<hr>\n<blockquote>\n<p>Also here is a repo of compiled job search and interviewing resources:</p>\n</blockquote>\n<p><a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\"><strong>bgoonz/INTERVIEW-PREP-COMPLETE</strong><br />\n<em>Your resume is your personal summary sheet. Your resume is the thing that gets your foot in the door. So, there's a few…</em>github.com</a><a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/1*3_3Cb73SQM_YazWGpZWtIw.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/600/1*aI1PfkSpsUks598LAJvKoQ.png\" class=\"graf-image\" /></figure>\n<h4>First off I am going to introduce a few different categories for those of you who are completely overwhelmed by the prospect of even selecting a job board let alone establishing a competitive presence on one. Here's a few catorizations I think are worth distinguishing for one and other.</h4>\n<h3>1. Interpersonal Connections</h3>\n<p>Seek to leverage the connections you have with people you know and companies you want to work with. I know that that's a violation of the premise of this article but without even feeling the need to provide quantitative proof; I can confidently assume that this is the most <a href=\"https://www.investopedia.com/terms/r/returnoninvestment.asp\" class=\"markup--anchor markup--p-anchor\">RO</a>I efficient way to produce a desirable result. (Sorry introverts… 2020 may have been your year but this is our world. 😘)</p>\n<p><strong>If personal connections don't come through, the next best thing is cold outreach (<em>best in terms of results…. personally I hate cold calling strangers and I am an extrovert</em>.)</strong></p>\n<ol>\n<li><span id=\"2139\">Before or after submitting an application, <strong>identify 1-3 professionals to reach out to</strong> at the company to express interest in opportunities.</span></li>\n<li><span id=\"fb8b\"><strong>Send a message to express interest and request an informational interview</strong> with the individual via LinkedIn, email, Twitter, or other available communication methods.</span></li>\n<li><span id=\"840d\"><strong>If you hear back</strong> and the individual is willing to connect, <strong>confirm a day and time to conduct a preliminary interview.</strong> <em>OR</em> <strong>If you have yet to hear back after 3 business days, follow-up.</strong></span></li>\n</ol>\n<p>Once you send off a message in step two, there are a variety of responses you may receive. Sometimes an individual will forward you along to someone who may be of better assistance, other times your message may be overlooked with no reply, and its possible (best case scenario) your request for a chat becomes an invitation to interview.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/1*3_3Cb73SQM_YazWGpZWtIw.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/600/1*aI1PfkSpsUks598LAJvKoQ.png\" class=\"graf-image\" /></figure>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/1*5eObFD9fV2fe5DztitZfsA.png\" class=\"graf-image\" /></figure>### ***2. LinkedIn***.\n<p>I am going to devote a lot of time to this one because it is the largest and most active of all the job board ecosystems… period… full stop regardless of your industry.</p>\n<p>LinkedIn now has <a href=\"https://news.linkedin.com/about-us#Statistics\" class=\"markup--anchor markup--p-anchor\">almost 740 million members</a> with over 55 million registered companies. (for comparison 12.3 million people visited Indeed in October, up 19.6 percent. <a href=\"http://www.monster.com/\" class=\"markup--anchor markup--p-anchor\">Monster.com</a> attracted 12.1 million people, and <a href=\"http://www.careerbuilder.com/\" class=\"markup--anchor markup--p-anchor\">CareerBuilder.com</a>attractedd 11.3 million in that same time) and LinkedIn is the most-used social media platform amongst Fortune 500 companies as it provides far more networking capabilities than pure recruitment.</p>\n<p>If you put your resume and skills on LinkedIn.com as a software Engineer, and state that you are open to new opportunities, you <em>will</em> be contacted by multiple recruiters, and if your skills are desirable possibly also directly by companies seeking to hire you. It's a developer's market; there's not enough people out there, especially in America.</p>\n<p>Here's my profile… feel free to connect… the larger your network the greater your exposure is to someone who works at your potential dream job.</p>\n<p><a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://www.linkedin.com/in/bryan-guner-046199128/\"><strong>Bryan Guner - Web Developer - Freelance | LinkedIn</strong><br />\n<em>View Bryan Guner's profile on LinkedIn, the world's largest professional community. Bryan has 5 jobs listed on their…</em>www.linkedin.com</a><a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Here's A Linkedin Checklist I will be using before I return to the job hunt!</p>\n<p><a href=\"https://www.notion.so/LinkedIn-d8b35e25ff0c451dbb5506ffa1179a8d\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://www.notion.so/LinkedIn-d8b35e25ff0c451dbb5506ffa1179a8d\"><strong>LinkedIn</strong><br />\n<em>Personal and Contact Information:</em>www.notion.so</a><a href=\"https://www.notion.so/LinkedIn-d8b35e25ff0c451dbb5506ffa1179a8d\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<blockquote>\n<p>excerpt:</p>\n</blockquote>\n<h4>Experience Section</h4>\n<ul>\n<li><span id=\"a517\">[ ] I <strong>have</strong> listed all professional roles included on my resume in this section and any that I had to cut from my resume for space</span></li>\n<li><span id=\"eca7\">[ ] I <strong>have</strong> written 2-4 power statements for each experience listed (okay to copy and paste from resume)</span></li>\n<li><span id=\"d298\">[ ] My power statements for each experience <a href=\"https://www.linkedin.com/pulse/update-how-add-bullet-points-your-linkedin-profile-erin-dore-miller/\" class=\"markup--anchor markup--li-anchor\">are bulleted</a>, not in paragraph form.</span></li>\n<li><span id=\"ec6c\">[ ] I <strong>did</strong> list responsibilities in bullet point format (I <strong>did not</strong> leave in paragraph format)</span></li>\n<li><span id=\"f472\">[ ] I <strong>did</strong> start each bullet point with <a href=\"https://docs.google.com/document/d/1wZkDPBWtQZDGGdvStD61iRx_jOWVlIyyQl9UOYHtZgA/edit?usp=sharing\" class=\"markup--anchor markup--li-anchor\">an action verb</a> and I <strong>did not</strong> use phrases such as: <code>Assisted with...</code> <code>Worked on...</code> <code>Helped with...</code> (<code>Solely responsible for...</code> ok)</span></li>\n<li><span id=\"9a26\">[ ] I <strong>did</strong> describe past projects in past tense and current projects in present tense</span></li>\n<li><span id=\"0f5a\">[ ] I <strong>did not</strong> use pronouns such as: “I,” “we,” “they, “you,” “me,” “us”</span></li>\n<li><span id=\"3616\">[ ] <strong>Optional:</strong> Bootcamp student experience and projects can be listed under your experience section if you have no (or almost no) prior work experience.</span></li>\n<li><span id=\"7fa1\">[ ] If I listed my Bootcamp student experience, my title is [name of program] Student (example: Data Science Student)</span></li>\n<li><span id=\"c928\">[ ] I copied and pasted my Lambda projects in my student description and also included them in the Accomplishments section</span></li>\n</ul>\n<h3>Do's:</h3>\n<p><strong>Spend a good portion of your time learning and reading. Your jobs teach you so much about an organization and the business.</strong></p>\n<p><strong>Follow business owners and senior managers, successful team leaders in large organizations, startup owners. You would be surprised how willing some otherwise busy executives are to rub elbows with veritable newcomers. They're not just doing this out of the kindness of their hearts, just like you… they have an ulterior motive. They are hoping to build goodwill with the incoming workforce in a bid to make their company more attractive to high quality candidates. If they give you any of their time…treat it like an interview.</strong></p>\n<blockquote>\n<p><em>To leverage this information, (the trick is to constantly remind yourself to be on your game with speaking with them.) I do not care what your teacher's past have said… mark my words…</em> <strong>*THERE IS MOST CERTAINLY SUCH A THING AS A STUPID QUESTION**</strong>…Anyone who tells you otherwise is either stupid themselves or just overcome with their own compassion (an admirable trait but ultimately a disservice to you the competitive job seeker).*</p>\n</blockquote>\n<p><a href=\"https://hbr.org/2018/05/the-surprising-power-of-questions\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://hbr.org/2018/05/the-surprising-power-of-questions\"><strong>How to Ask Great Questions</strong><br />\n<em>In Brief The Problem Some professionals such as litigators, journalists and even doctors, are taught to ask questions…</em>hbr.org</a><a href=\"https://hbr.org/2018/05/the-surprising-power-of-questions\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<blockquote>\n<p>Engage in networking. I would recommend <strong>finding and connecting with current attendee of any software development bootcamp</strong>. They're all (for the most part) programatically encouraged to connect network and engage in peer skill promotion (even if they have no idea of you skill level). If that weren't enough reason, all of them come from a cohort of other individuals being instructed to do the same. Once you have a few in your network other's will seek you out through Linkedin recommendations algorithm.</p>\n</blockquote>\n<blockquote>\n<p><strong>Note to prospective employers please just skip the next few sentences and don't ask why…😅</strong></p>\n</blockquote>\n<blockquote>\n<p><strong>Of the 214 people that vouched for me… I guestimate about only 80 actually know me in any respectable capacity, and of those, only probably 30 or so are familiar with my competency in the skills they endorsed. It all boils down to the strategies that bootcamps instill in their students. It's the polar opposite of a zero sum game and they're more than happy to exchange personal recommendations with you. They're also far more driven to consistently engage with other members of the linkedin ecosystem because they need to a network to help compensate for their lack of a four year degree and the connections you make in that time.</strong></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/400/1*E519LWHx8W3CXw6c5FXgqg.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/1000/1*AUDMmyZrugM3SSy_0axgfQ.jpeg\" class=\"graf-image\" /></figure>\n<blockquote>\n<p>Build your personal brand. Developing your brand will not only help you attract clients or recruits if you decide to start a business, but will also help you find great job opportunities. You can post anything you take pride in so long as it's fairly professional. Definitely make use of the featured section to showcase your work.</p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*DlqWg94B670bgin5STdJNg.png\" class=\"graf-image\" /></figure>### Don't:\n<h4>Don't Use LinkedIn's Default Headline</h4>\n<p>LinkedIn automatically populates your headline with your current job title and company name. I hope it goes without saying… but as a rule avoid signaling to prospective employers the depths of your laziness by using any stock responses LinkedIn provides you.</p>\n<h4>Don't Go Ham On Keyword Placment</h4>\n<p>Placing keywords strategically into your LinkedIn profile is virtually the only way to ensure being flagged by search algorithms as a potential candidate.You could be forgiven for being tempted to heed the advice of your inner lizard brain, and just stuffing your profile with buzzwords but this will likely trigger a spam account checker and result in worse outcomes than the absence of said keywords.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/1*3_3Cb73SQM_YazWGpZWtIw.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/600/1*aI1PfkSpsUks598LAJvKoQ.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Why it matters<em>¿</em></h3>\n<h4>Are We Really All Connected by Just Six Degrees of Separation?</h4>\n<p>Most of us are familiar with the concept of six degrees of separation — the idea is that anyone in the planet can be connected to anyone else in just six steps. So through just five other people, you're effectively connected to the Queen of England, Jim Belushi or even yo mamma.</p>\n<hr>\n<h3>Back to the other Job Board Niches:</h3>\n<p><strong><em>3. Traditional job boards</em></strong>. Dice.com, Monster.com, etc. They will not find you great jobs at technology companies; they may find you openings as a software engineer at other types of more traditional companies (for example, banks, retail chains, etc though.</p>\n<p><strong><em>4. Local-focused sites</em></strong>. The biggest is Craigslist, but there are others. Often great for contract work and opportunities you wouldn't have otherwise come across.</p>\n<p><strong><em>5. Freelancer websites</em></strong>. oDesk.com, Elance.com, etc. Lower pay, but 100% contract work, and has a lot of flexible opportunities if you're not looking for traditional full-time employment or remote work.</p>\n<ul>\n<li><span id=\"1350\"><a href=\"https://www.quora.com/What-are-the-best-job-boards-for-software-engineers\" class=\"markup--anchor markup--li-anchor\">Source</a></span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/1*3_3Cb73SQM_YazWGpZWtIw.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/600/1*aI1PfkSpsUks598LAJvKoQ.png\" class=\"graf-image\" /></figure>\n<h3>Lastly Here's A Github Profile Guide:</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*0nYkgla6oc0uImSZJElpdw.jpeg\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*wIhqnhU5zoyIr1GwZ2UTNA.jpeg\" class=\"graf-image\" /></figure>Medium is causing strange formatting… they normally form a grid!\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*-ypWlmloBF6kz9UnVG2kOA.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*Y9SdKz9cS3FtjlKaRge3jg.png\" class=\"graf-image\" /></figure>### Rubric:\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*5-FYxWj0q8sUvpDoAR3ZLA.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Discover More:</h3>\n<p><a href=\"https://bgoonz-blog.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bgoonz-blog.netlify.app/\"><strong>Web-Dev-Hub</strong><br />\n<em>Memoization, Tabulation, and Sorting Algorithms by Example Why is looking at runtime not a reliable method of…</em>bgoonz-blog.netlify.app</a><a href=\"https://bgoonz-blog.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h1><strong>General</strong></h1>\n<ul>\n<li><strong><a href=\"https://haseebq.com/how-to-break-into-tech-job-hunting-and-interviews/\">How To Break Into Tech - Job Hunting and Interviews by Haseeb Qureshi</a></strong></li>\n<li><strong><a href=\"https://mintbean.io/\">Mintbean.io - Hackathons and Workshops</a></strong></li>\n<li><strong><a href=\"https://talent.works/category/science-of-the-job-search/\">Data on the job search and how to do it!</a></strong></li>\n<li><strong><a href=\"https://www.linkedin.com/post-inspector/inspect/\">LinkedIn Post Inspector</a></strong></li>\n<li><strong><a href=\"https://medium.com/@jamesyhiggs/how-to-add-thumbnail-images-to-the-featured-section-of-your-linkedin-profile-for-web-apps-sites-917346235932\">LinkedIn Featured Images</a></strong></li>\n<li><strong><a href=\"https://frontendmasters.com/\">Frontend Masters</a></strong> - Expensive, but worth every penny</li>\n</ul>\n<hr>\n<h1><strong>Resume</strong></h1>\n<ul>\n<li><strong><a href=\"http://blog.alinelerner.com/lessons-from-a-years-worth-of-hiring-data/\">Spelling/Grammar mistakes on Resume costs jobs</a></strong></li>\n</ul>\n<h1><strong>Cover Letter</strong></h1>\n<ul>\n<li><strong><a href=\"http://www.fsb.miamioh.edu/fsb/content/programs/howe-writing-initiative/HWI-handout-CsofBusComm.html\">Six C's of Business Communication</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Heroku</strong> - <em>Use at your own risk</em></h1>\n<ul>\n<li><strong><a href=\"https://medium.com/@pandachain/keep-free-heroku-app-awake-during-a-specific-period-using-google-app-script-in-2017-63fe37ee9e9f\">Keep Heroku App Awake For Free Using Google App Script</a></strong></li>\n<li><strong><a href=\"https://uptimerobot.com/\">UptimeRobot</a></strong></li>\n<li><strong><a href=\"https://kaffeine.herokuapp.com/\">Kaffeine</a></strong></li>\n<li><strong><a href=\"https://docs.google.com/document/d/1_BZswbvmcEtVul9gD59Lk4IUk2mHp1Wbe2ucaHTY7A0/edit\">UptimeRobot and Dyno Lecture</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Trivia</strong></h1>\n<ul>\n<li>\n<h2><strong>JavaScript Trivia</strong></h2>\n<ul>\n<li><strong><a href=\"https://www.fullstack.cafe/\">Fullstack Cafe - EVERYTHING</a></strong></li>\n<li><strong><a href=\"https://www.thatjsdude.com/interview/\">Front-end trivia</a></strong></li>\n</ul>\n</li>\n<li>\n<h2><strong>Python Trivia</strong></h2>\n</li>\n<li>\n<h2><strong>Frontend Trivia</strong></h2>\n<ul>\n<li><a href=\"https://www.toptal.com/designers/web/interview-questions\"><strong>12 Essential Web Design Interview Questions</strong></a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h1><strong>Language Resources</strong></h1>\n<ul>\n<li>\n<h2><strong>JavaScript Resources</strong></h2>\n<ul>\n<li><strong><a href=\"https://github.com/antonjb/TypeScript-Learning-Plan\">TypeScript Learning Plan</a></strong></li>\n<li>\n<p><strong>React Native</strong></p>\n<ul>\n<li>\n<p><strong><a href=\"https://codewithmosh.com/courses/enrolled\">Code With Mosh Enrolled</a></strong></p>\n<ul>\n<li><em>satagonia@gmail.com / qqqq1111</em></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<h2><strong>Python Resources</strong></h2>\n<p>-</p>\n</li>\n<li>\n<h2><strong>HTML5 Resources</strong></h2>\n<ul>\n<li><a href=\"https://digital.com/tools/html-cheatsheet/\"><strong>HTML5 Cheat Sheet</strong></a></li>\n<li><a href=\"https://www.html5rocks.com/en/resources.html\"><strong>HTML5 Rocks</strong></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML\"><strong>MDN - HTML</strong></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML\"><strong>MDN - HTML5</strong></a></li>\n<li><a href=\"http://html5doctor.com/\"><strong>HTML5 Doctor</strong></a></li>\n<li>-</li>\n</ul>\n</li>\n<li>\n<h2><strong>CSS3 Resources</strong></h2>\n<ul>\n<li><a href=\"https://www.w3schools.com/css/\"><strong>W3 Schools CSS3 Tutorial</strong></a></li>\n<li><a href=\"https://www.tutorialrepublic.com/css-tutorial/\"><strong>Tutorial Republic - Ultimate Tutorial for Beginners</strong></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS\"><strong>MDN - CSS</strong></a></li>\n<li><a href=\"https://www.css3.info/\"><strong>CSS3.info</strong></a></li>\n<li>\n<p><a href=\"https://css-tricks.com/\"><strong>CSS Tricks</strong></a></p>\n<ul>\n<li><a href=\"https://css-tricks.com/snippets/css/a-guide-to-flexbox/\">Complete Guide to Flexbox</a></li>\n<li><a href=\"https://css-tricks.com/snippets/css/complete-guide-grid/\">Complete Guide to Grid</a></li>\n</ul>\n</li>\n<li><a href=\"https://grid.layoutit.com/\"><strong>Interactive CSS Grid Generator</strong></a></li>\n<li><a href=\"http://csszengarden.com/\"><strong>CSS Zen Garden</strong></a></li>\n<li><a href=\"http://flexboxgrid.com/\"><strong>Flexbox Grid (Package)</strong></a></li>\n<li><a href=\"http://www.specifishity.com/\"><strong>Specifishity</strong></a></li>\n<li><a href=\"https://www.onblastblog.com/css3-cheat-sheet/\"><strong>CSS3 Cheat Sheet</strong></a></li>\n<li><a href=\"https://labs.jensimmons.com/\"><strong>Jen Simmons Labs</strong></a></li>\n</ul>\n</li>\n<li>\n<h2><strong>Miscellaneous Resources</strong></h2>\n<ul>\n<li>\n<p><a href=\"https://codepen.io/\"><strong>CodePen</strong></a></p>\n<ul>\n<li><a href=\"https://codepen.io/202/popular/pens/\">2020 Most Popular Pens (replace year for more)</a></li>\n</ul>\n</li>\n<li><a href=\"https://web-design-weekly.com/\"><strong>Web Design Weekly</strong></a></li>\n<li><a href=\"https://responsivedesign.is/\"><strong>Responsive Design Weekly</strong></a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h1><strong>DS&#x26;A</strong></h1>\n<ul>\n<li><strong><a href=\"https://leetcode.com/explore\">Leetcode</a></strong></li>\n<li><strong><a href=\"https://www.algoexpert.io/\">AlgoExpert</a></strong></li>\n</ul>\n<h2><strong>Hash Tables:</strong></h2>\n<ul>\n<li>\n<p><strong><a href=\"https://www.youtube.com/watch?v=shs0KM3wKv8\">What is a Hash Table</a></strong></p>\n<ul>\n<li>O(1) for a \"good\" table</li>\n<li>O(n) for a terrible table (lots of collisions, etc.)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h1><strong>System Design</strong></h1>\n<ul>\n<li><strong><a href=\"https://www.educative.io/courses/grokking-the-system-design-interview/m2yDVZnQ8lG\">The Basics</a></strong></li>\n<li><strong><a href=\"https://levelup.gitconnected.com/everything-you-need-to-know-about-caching-system-design-932a6bdf3334\">Caching</a></strong></li>\n<li><strong><a href=\"https://codeburst.io/system-design-basics-load-balancer-101-adc4f602d08f\">Load Balancing</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Interviewing</strong></h1>\n<ul>\n<li>\n<h3><strong>Mock Interviewing</strong></h3>\n<ul>\n<li><strong><a href=\"https://interviewing.io/\">Interviewing.io</a></strong></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h1><strong>Networking</strong></h1>\n<ul>\n<li><strong><a href=\"https://www.meetup.com/\">MeetUp</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Managing and Organizing Job Search</strong></h1>\n<ul>\n<li>\n<p><strong><a href=\"notion.so\">Notion</a></strong></p>\n<ul>\n<li>Trillo clone but with added features that make it really great! Consider creating a template for new job seekers!</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h1><strong>Negotiations</strong></h1>\n<ul>\n<li><strong><a href=\"https://haseebq.com/my-ten-rules-for-negotiating-a-job-offer/\">Haseeb's 10 Rules - Part 1</a></strong></li>\n<li><strong><a href=\"https://haseebq.com/how-not-to-bomb-your-offer-negotiation/\">Haseeb's 10 Rules - Part 2</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Portfolio Sites</strong></h1>\n<p>Take 25 minutes to choose a template, download it, rename it githubusername.github.io , git init, and push it to a github repo of the same name:</p>\n<h2><strong>Template Sources</strong></h2>\n<ul>\n<li><a href=\"http://www.free-css.com/template-categories/portfolio\"><strong>Free CSS Templates</strong></a></li>\n<li><a href=\"http://html5up.net/\"><strong>HTML5 UP</strong></a></li>\n<li><a href=\"http://startbootstrap.com/\"><strong>Start Bootstrap</strong></a></li>\n<li><a href=\"https://themewagon.com/top-html-landing-page-templates/\"><strong>Theme Wagon</strong></a></li>\n<li><a href=\"https://templatemo.com/tag/portfolio\"><strong>Templatemo</strong></a></li>\n<li><a href=\"https://onepagelove.com/templates/free-templates\"><strong>One Page Love</strong></a></li>\n<li>Once you've decided on a template, download it to your machine.</li>\n<li>Rename the folder <code>{$yourGitHubUserName}.github.io</code>, (e.g. if my GitHub\nusername were QueenOfTheBeyhive, I would name my repo\n<code>QueenOfTheBeyhive.github.io</code>). This will be important for deployment to GitHub\npages later.</li>\n<li>Make sure to <code>git init</code> and set up your remote repository.</li>\n<li>As always, make sure to read through any provided README for any potentially\nuseful information.</li>\n<li>Take some time to explore the structure, included elements, and default assets\nincluded in the template. Take special note of style sheets and the main HTML\nfile. The main HTML must be called <code>index.html</code> and it must be located in the root\nof the directory. If the file is located elsewhere, relocate it to the root and adjust\nany relative paths for any imported scripts or style sheets.</li>\n</ul>\n<hr>\n<h1><strong>QA Engineering</strong></h1>\n<ul>\n<li><strong><a href=\"https://teamtreehouse.com/library/introduction-to-qa-engineering\">Full course in 7 day trial</a></strong></li>\n<li><strong><a href=\"https://docs.google.com/document/d/1REtlnM0j88iGgIkPmOyeuwf-VdhOSV6U0QkcPEz81Oc/edit\">Prep Notes</a></strong></li>\n</ul>\n<h1><strong>Alternative Roles</strong></h1>\n<pre><code>Data Analyst\nSales Engineer\nTechnical Support Engineer\nCustomer Success Engineer\nData Engineer\nDev Ops Engineer\nQA Engineer\nSolutions Engineer\nSupport Engineer\nTechnical Product Manager\nScrum Master\nImplementation Specialist\nTechnical Account Manager\n</code></pre>\n<hr>\n<h1><strong>Externship</strong></h1>\n<ul>\n<li><strong><a href=\"https://www.insidesherpa.com/\">insidesherpa</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Open Source</strong></h1>\n<ul>\n<li><strong><a href=\"https://opensource.guide/\">GitHub's open source guides</a></strong></li>\n<li><strong><a href=\"https://opensource.com/resources/getting-started-open-source\">Getting started with open source</a></strong></li>\n<li><strong><a href=\"https://www.firsttimersonly.com/\">First timers only</a></strong></li>\n<li><strong><a href=\"https://opensourceunderdogs.com/episodes/\">Open Source Underdogs</a></strong></li>\n<li><strong><a href=\"https://www.codetriage.com/\">Code Triage</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Volunteer</strong></h1>\n<ul>\n<li><strong><a href=\"https://www.codeforamerica.org/\">Code For America</a></strong></li>\n<li><strong><a href=\"https://www.donatecode.com/\">Donate Code</a></strong></li>\n<li><strong><a href=\"https://socialcoder.org/Home/Index\">Social Coder</a></strong></li>\n<li><strong><a href=\"https://www.catchafire.org/\">Catch A Fire</a></strong></li>\n<li><strong><a href=\"https://www.hackersforcharity.org/\">Hackers For Charity</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Imposter Syndrome</strong></h1>\n<ul>\n<li><strong><a href=\"https://www.zainrizvi.io/blog/the-impostors-advantage/\">The Imposter's Advantage - Zain Rizvi</a></strong></li>\n<li><strong><a href=\"https://www.techrepublic.com/article/why-58-of-tech-employees-suffer-from-imposter-syndrome/\">Stats on the tech giants</a></strong></li>\n<li><strong><a href=\"http://blog.alinelerner.com/how-different-is-a-b-s-in-computer-science-from-a-m-s-in-computer-science-when-it-comes-to-recruiting/\">Why MS degrees are shit</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Podcasts</strong></h1>\n<ul>\n<li><strong><a href=\"https://freecodecamp.libsyn.com/\">FreeCodeCamp Podcast</a></strong></li>\n<li><strong><a href=\"https://www.heroku.com/podcasts/codeish/85-the-new-definition-of-frontend-development\">Codish Podcast</a></strong></li>\n</ul>\n<hr>\n<h1><strong>Books</strong></h1>\n<ul>\n<li>\n<p><strong>Grokking the Coding Interview</strong></p>\n<ul>\n<li><a href=\"https://github.com/cl2333/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions\">GitHub Coding Questions</a></li>\n<li><a href=\"https://www.educative.io/courses/grokking-the-coding-interview\">Purchase Course</a></li>\n</ul>\n</li>\n<li>\n<p><strong>Grokking the System Design Interview</strong></p>\n<ul>\n<li><a href=\"https://github.com/ema2159/Grokking-System-Design-Interview-Quizzes\">Quizzes</a></li>\n<li><a href=\"https://www.educative.io/courses/grokking-the-system-design-interview\">Purchase Course</a></li>\n</ul>\n</li>\n<li>\n<p><strong>Elements of Programming Interviews (EPI) in Python</strong></p>\n<ul>\n<li><a href=\"https://www.amazon.com/Elements-Programming-Interviews-Python-Insiders/dp/1537713949\">Amazon</a></li>\n</ul>\n</li>\n<li>\n<p><strong>Skienna Algorithm Design Manual</strong></p>\n<ul>\n<li><a href=\"https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena-ebook-dp-B00B8139Z8/dp/B00B8139Z8/ref=mt_other?_encoding=UTF8&#x26;me=&#x26;qid=\">Amazon</a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h1><strong>QA Questions</strong></h1>\n<p><strong>10:22:12 From Alexis Kozak to Everyone : Scenario 1</strong></p>\n<ul>\n<li>It's 7:00 pm on a Friday, and you receive a message from Dev Ops that they haven't been able to upgrade a live Production environment as planned. There were feature updates in this release that customers have planned marketing campaigns around. It also included a bug fix for one customer that's currently having to maintain a very manual workaround. What do you do?</li>\n</ul>\n<p><strong>10:24:40 From Alexis Kozak to Everyone : Scenario 2</strong></p>\n<ul>\n<li>An application has been configured to send an email every time a patient requests a changed email. The automated email sends something to the old email, acknowledging that they changed their email, and if that isn't right, to please contact Secular Health Network. When you come into the office one morning, you see that thousands of emails have been generated in the space of two hours. What do you do? How do you find the number of emails sent?</li>\n</ul>\n<p><strong>10:28:11 From Alexis Kozak to Everyone : Scenario 3</strong></p>\n<ul>\n<li>A customer has requested a change to SSO logic such that only users from a certain region can access SmartExam. You've implemented the rule on their demo environments and given them a testing plan that is simple and straightforward. During testing, you're included in multiple email chains with different parties, as well as some one-off calls and texts messages. Resources seem scattered, but the testing happens. After receiving confirmation from the customer that testing was successful, you're told the code is good to go into production. However, upon doing some quick checks, you discover that the rule you wrote doesn't work and would actually prevent any user from logging into SmartExam. The fix is quite simple. What do you do?</li>\n</ul>"},{"url":"/docs/articles/dev-dep/","relativePath":"docs/articles/dev-dep.md","relativeDir":"docs/articles","base":"dev-dep.md","name":"dev-dep","frontmatter":{"title":"Dev Dependencies","sections":[],"seo":{"title":"Dependencies","description":"install an npm package using npm install you are installing it as a dependency. (npm install --production) to avoid installing those development dependencies.\n","robots":[],"extra":[{"name":"og:image","value":"images/react2.jpg","keyName":"property","relativeUrl":true},{"name":"og:description","value":"install an npm package using npm install you are installing it as a dependency. (npm install --production) to avoid installing those development dependencies.\n","keyName":"property","relativeUrl":false},{"name":"og:type","value":"website","keyName":"property","relativeUrl":false},{"name":"twitter:image","value":"images/browserify-25532eef.png","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image","keyName":"name","relativeUrl":false},{"name":"og:title","value":"Dev Dependencies","keyName":"property","relativeUrl":false}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>When you install an npm package using <code>npm install &#x3C;package-name></code>, you are installing it as a <strong>dependency</strong>.</p>\n<p>The package is automatically listed in the package.json file, under the <code>dependencies</code> list (as of npm 5: before you had to manually specify <code>--save</code>).</p>\n<p>When you add the <code>-D</code> flag, or <code>--save-dev</code>, you are installing it as a development dependency, which adds it to the <code>devDependencies</code> list.</p>\n<p>Development dependencies are intended as development-only packages, that are unneeded in production. For example testing packages, webpack or Babel.</p>\n<p>When you go in production, if you type <code>npm install</code> and the folder contains a <code>package.json</code> file, they are installed, as npm assumes this is a development deploy.</p>\n<p>You need to set the <code>--production</code> flag (<code>npm install --production</code>) to avoid installing those development dependencies.</p>"},{"url":"/docs/articles/fs-module/","relativePath":"docs/articles/fs-module.md","relativeDir":"docs/articles","base":"fs-module.md","name":"fs-module","frontmatter":{"title":"Fs-Module","sections":[],"seo":{"title":"","description":"Fs-Module","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>The <code>fs</code> module provides a lot of very useful functionality to access and interact with the file system.</p>\n<p>There is no need to install it. Being part of the Node.js core, it can be used by simply requiring it:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n</code></pre>\n<p>Once you do so, you have access to all its methods, which include:</p>\n<ul>\n<li><code>fs.access()</code>: check if the file exists and Node.js can access it with its permissions</li>\n<li><code>fs.appendFile()</code>: append data to a file. If the file does not exist, it's created</li>\n<li><code>fs.chmod()</code>: change the permissions of a file specified by the filename passed. Related: <code>fs.lchmod()</code>, <code>fs.fchmod()</code></li>\n<li><code>fs.chown()</code>: change the owner and group of a file specified by the filename passed. Related: <code>fs.fchown()</code>, <code>fs.lchown()</code></li>\n<li><code>fs.close()</code>: close a file descriptor</li>\n<li><code>fs.copyFile()</code>: copies a file</li>\n<li><code>fs.createReadStream()</code>: create a readable file stream</li>\n<li><code>fs.createWriteStream()</code>: create a writable file stream</li>\n<li><code>fs.link()</code>: create a new hard link to a file</li>\n<li><code>fs.mkdir()</code>: create a new folder</li>\n<li><code>fs.mkdtemp()</code>: create a temporary directory</li>\n<li><code>fs.open()</code>: set the file mode</li>\n<li><code>fs.readdir()</code>: read the contents of a directory</li>\n<li><code>fs.readFile()</code>: read the content of a file. Related: <code>fs.read()</code></li>\n<li><code>fs.readlink()</code>: read the value of a symbolic link</li>\n<li><code>fs.realpath()</code>: resolve relative file path pointers (<code>.</code>, <code>..</code>) to the full path</li>\n<li><code>fs.rename()</code>: rename a file or folder</li>\n<li><code>fs.rmdir()</code>: remove a folder</li>\n<li><code>fs.stat()</code>: returns the status of the file identified by the filename passed. Related: <code>fs.fstat()</code>, <code>fs.lstat()</code></li>\n<li><code>fs.symlink()</code>: create a new symbolic link to a file</li>\n<li><code>fs.truncate()</code>: truncate to the specified length the file identified by the filename passed. Related: <code>fs.ftruncate()</code></li>\n<li><code>fs.unlink()</code>: remove a file or a symbolic link</li>\n<li><code>fs.unwatchFile()</code>: stop watching for changes on a file</li>\n<li><code>fs.utimes()</code>: change the timestamp of the file identified by the filename passed. Related: <code>fs.futimes()</code></li>\n<li><code>fs.watchFile()</code>: start watching for changes on a file. Related: <code>fs.watch()</code></li>\n<li><code>fs.writeFile()</code>: write data to a file. Related: <code>fs.write()</code></li>\n</ul>\n<p>One peculiar thing about the <code>fs</code> module is that all the methods are asynchronous by default, but they can also work synchronously by appending <code>Sync</code>.</p>\n<p>For example:</p>\n<ul>\n<li><code>fs.rename()</code></li>\n<li><code>fs.renameSync()</code></li>\n<li><code>fs.write()</code></li>\n<li><code>fs.writeSync()</code></li>\n</ul>\n<p>This makes a huge difference in your application flow.</p>\n<blockquote>\n<p>Node.js 10 includes <a href=\"https://nodejs.org/api/fs.html#fs_fs_promises_api\">experimental support</a> for a promise based API</p>\n</blockquote>\n<p>For example let's examine the <code>fs.rename()</code> method. The asynchronous API is used with a callback:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.rename('before.json', 'after.json', (err) => {\n    if (err) {\n        return console.error(err);\n    }\n\n    //done\n});\n</code></pre>\n<p>A synchronous API can be used like this, with a try/catch block to handle errors:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    fs.renameSync('before.json', 'after.json');\n    //done\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>The key difference here is that the execution of your script will block in the second example, until the file operation succeeded.</p>"},{"url":"/docs/articles/event-loop/","relativePath":"docs/articles/event-loop.md","relativeDir":"docs/articles","base":"event-loop.md","name":"event-loop","frontmatter":{"title":"The Node.js Event Loop","sections":[],"seo":{"title":"","description":"The Event Loop is one of the most important aspects to understand about Node.js","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Introduction</h2>\n<p>The <strong>Event Loop</strong> is one of the most important aspects to understand about Node.js.</p>\n<p>Why is this so important? Because it explains how Node.js can be asynchronous and have non-blocking I/O, and so it explains basically the \"killer app\" of Node.js, the thing that made it this successful.</p>\n<p>The Node.js JavaScript code runs on a single thread. There is just one thing happening at a time.</p>\n<p>This is a limitation that's actually very helpful, as it simplifies a lot how you program without worrying about concurrency issues.</p>\n<p>You just need to pay attention to how you write your code and avoid anything that could block the thread, like synchronous network calls or infinite loops.</p>\n<p>In general, in most browsers there is an event loop for every browser tab, to make every process isolated and avoid a web page with infinite loops or heavy processing to block your entire browser.</p>\n<p>The environment manages multiple concurrent event loops, to handle API calls for example. Web Workers run in their own event loop as well.</p>\n<p>You mainly need to be concerned that <em>your code</em> will run on a single event loop, and write code with this thing in mind to avoid blocking it.</p>\n<h2>Blocking the event loop</h2>\n<p>Any JavaScript code that takes too long to return back control to the event loop will block the execution of any JavaScript code in the page, even block the UI thread, and the user cannot click around, scroll the page, and so on.</p>\n<p>Almost all the I/O primitives in JavaScript are non-blocking. Network requests, filesystem operations, and so on. Being blocking is the exception, and this is why JavaScript is based so much on callbacks, and more recently on promises and async/await.</p>\n<h2>The call stack</h2>\n<p>The call stack is a LIFO queue (Last In, First Out).</p>\n<p>The event loop continuously checks the <strong>call stack</strong> to see if there's any function that needs to run.</p>\n<p>While doing so, it adds any function call it finds to the call stack and executes each one in order.</p>\n<p>You know the error stack trace you might be familiar with, in the debugger or in the browser console? The browser looks up the function names in the call stack to inform you which function originates the current call:</p>\n<p><img src=\"exception-call-stack.png\" alt=\"Exception call stack\"></p>\n<h2>A simple event loop explanation</h2>\n<p>Let's pick an example:</p>\n<iframe\n  title=\"A simple event loop explanation\"\n  src=\"https://glitch.com/embed/#!/embed/nodejs-dev-0029-01?path=server.js&previewSize=20&attributionHidden=true&sidebarCollapsed=true\"\n  alt=\"nodejs-dev-0029-01 on Glitch\"\n  style=\"height: 400px; width: 100%; border: 0;\">\n</iframe>\n<!--```js\nconst bar = () => console.log('bar')\n\nconst baz = () => console.log('baz')\n\nconst foo = () => {\n  console.log('foo')\n  bar()\n  baz()\n}\n\nfoo()\n```\n\nThis code prints\n\n```txt\nfoo\nbar\nbaz\n```\n\nas expected.-->\n<p>When this code runs, first <code>foo()</code> is called. Inside <code>foo()</code> we first call <code>bar()</code>, then we call <code>baz()</code>.</p>\n<p>At this point the call stack looks like this:</p>\n<p><img src=\"call-stack-first-example.png\" alt=\"Call stack first example\"></p>\n<p>The event loop on every iteration looks if there's something in the call stack, and executes it:</p>\n<p><img src=\"execution-order-first-example.png\" alt=\"Execution order first example\"></p>\n<p>until the call stack is empty.</p>\n<h2>Queuing function execution</h2>\n<p>The above example looks normal, there's nothing special about it: JavaScript finds things to execute, runs them in order.</p>\n<p>Let's see how to defer a function until the stack is clear.</p>\n<p>The use case of <code>setTimeout(() => {}, 0)</code> is to call a function, but execute it once every other function in the code has executed.</p>\n<p>Take this example:</p>\n<iframe\n  title=\"Queuing function execution\"\n  src=\"https://glitch.com/embed/#!/embed/nodejs-dev-0029-02?path=server.js&previewSize=20&attributionHidden=true&sidebarCollapsed=true\"\n  alt=\"nodejs-dev-0029-02 on Glitch\"\n  style=\"height: 400px; width: 100%; border: 0;\">\n</iframe>\n<!--```js\nconst bar = () => console.log('bar')\n\nconst baz = () => console.log('baz')\n\nconst foo = () => {\n  console.log('foo')\n  setTimeout(bar, 0)\n  baz()\n}\n\nfoo()\n```-->\n<p>This code prints, maybe surprisingly:</p>\n<pre><code class=\"language-bash\">foo\nbaz\nbar\n</code></pre>\n<p>When this code runs, first foo() is called. Inside foo() we first call setTimeout, passing <code>bar</code> as an argument, and we instruct it to run immediately as fast as it can, passing 0 as the timer. Then we call baz().</p>\n<p>At this point the call stack looks like this:</p>\n<p><img src=\"call-stack-second-example.png\" alt=\"Call stack second example\"></p>\n<p>Here is the execution order for all the functions in our program:</p>\n<p><img src=\"execution-order-second-example.png\" alt=\"Execution order second example\"></p>\n<p>Why is this happening?</p>\n<h2>The Message Queue</h2>\n<p>When setTimeout() is called, the Browser or Node.js starts the timer. Once the timer expires, in this case immediately as we put 0 as the timeout, the callback function is put in the <strong>Message Queue</strong>.</p>\n<p>The Message Queue is also where user-initiated events like click or keyboard events, or fetch responses are queued before your code has the opportunity to react to them. Or also DOM events like <code>onLoad</code>.</p>\n<p><strong>The loop gives priority to the call stack, and it first processes everything it finds in the call stack, and once there's nothing in there, it goes to pick up things in the message queue.</strong></p>\n<p>We don't have to wait for functions like <code>setTimeout</code>, fetch or other things to do their own work, because they are provided by the browser, and they live on their own threads. For example, if you set the <code>setTimeout</code> timeout to 2 seconds, you don't have to wait 2 seconds - the wait happens elsewhere.</p>\n<h2>ES6 Job Queue</h2>\n<p>ECMAScript 2015 introduced the concept of the Job Queue, which is used by Promises (also introduced in ES6/ES2015). It's a way to execute the result of an async function as soon as possible, rather than being put at the end of the call stack.</p>\n<p>Promises that resolve before the current function ends will be executed right after the current function.</p>\n<p>I find nice the analogy of a rollercoaster ride at an amusement park: the message queue puts you at the back of the queue, behind all the other people, where you will have to wait for your turn, while the job queue is the fastpass ticket that lets you take another ride right after you finished the previous one.</p>\n<p>Example:</p>\n<iframe\n  title=\"ECMAScript 2015 Job Queue\"\n  src=\"https://glitch.com/embed/#!/embed/nodejs-dev-0029-03?path=server.js&previewSize=35&attributionHidden=true&sidebarCollapsed=true\"\n  alt=\"nodejs-dev-0029-03 on Glitch\"\n  style=\"height: 400px; width: 100%; border: 0;\">\n</iframe>\n<!--```js\nconst bar = () => console.log('bar')\n\nconst baz = () => console.log('baz')\n\nconst foo = () => {\n  console.log('foo')\n  setTimeout(bar, 0)\n  new Promise((resolve, reject) =>\n    resolve('should be right after baz, before bar')\n  ).then(resolve => console.log(resolve))\n  baz()\n}\n\nfoo()\n```\n\nThis prints\n\n```txt\nfoo\nbaz\nshould be right after baz, before bar\nbar\n```-->\n<p>That's a big difference between Promises (and Async/await, which is built on promises) and plain old asynchronous functions through <code>setTimeout()</code> or other platform APIs.</p>"},{"url":"/docs/articles/basic-web-dev/","relativePath":"docs/articles/basic-web-dev.md","relativeDir":"docs/articles","base":"basic-web-dev.md","name":"basic-web-dev","frontmatter":{"title":"Web Dev Review","sections":[],"seo":{"title":"","description":"Review-Of-Previous-Concepts","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<hr>\n<h2>description: Review</h2>\n<h1>Review-Of-Previous-Concepts</h1>\n<h3>Review of Concepts</h3>\n<h3>Running JS Locally Concepts</h3>\n<ul>\n<li>\n<p>Match the commands <code>ls</code>, <code>cd</code>, <code>pwd</code> to their descriptions</p>\n<ul>\n<li><code>ls</code> lists contents of current directory</li>\n<li>\n<p><code>cd</code> changes current directory</p>\n<ul>\n<li><code>cd ..</code> takes you up one level</li>\n<li><code>cd</code> alone takes you back home</li>\n</ul>\n</li>\n<li><code>pwd</code> returns current directory</li>\n</ul>\n</li>\n<li>Given a folder structure diagram, a list of 'cd (path)' commands and target files, match the paths to the target files.</li>\n<li>Use VSCode to create a folder. Within the folder create a .js file containing <code>console.log('hello new world');</code> and save it.</li>\n<li>Use node to execute a JavaScript file in the terminal</li>\n</ul>\n<h3>Plain Old JS Object Lesson Concepts</h3>\n<ul>\n<li>\n<p>Label variables as either Primitive vs. Reference</p>\n<ul>\n<li>\n<p>primitives: strings, booleans, numbers, null and undefined</p>\n<ul>\n<li>primitives are immutable</li>\n</ul>\n</li>\n<li>\n<p>refereces: objects (including arrays)</p>\n<ul>\n<li>references are mutable</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p>Identify when to use <code>.</code> vs <code>[]</code> when accessing values of an object</p>\n<ul>\n<li>\n<p>dot syntax <code>object.key</code></p>\n<ul>\n<li>easier to read</li>\n<li>easier to write</li>\n<li>cannot use variables as keys</li>\n<li>keys cannot begin with a number</li>\n</ul>\n</li>\n<li>\n<p>bracket notation <code>object[\"key]</code></p>\n<ul>\n<li>allows variables as keys</li>\n<li>strings that start with numbers can be use as keys</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p>Write an object literal with a variable key using interpolation</p>\n<ul>\n<li>\n<p>put it in brackets to access the value of the variable, rather than just make the value that string</p>\n<pre><code class=\"language-javascript\">let a = 'b';\nlet obj = { a: 'letter_a', [a]: 'letter b' };\n</code></pre>\n</li>\n</ul>\n</li>\n<li>\n<p>Use the <code>obj[key] !== undefined</code> pattern to check if a given variable that contains a key exists in an object</p>\n<ul>\n<li>can also use <code>(key in object)</code> syntax interchangeably (returns a boolean)</li>\n</ul>\n</li>\n<li>\n<p>Utilize Object.keys and Object.values in a function</p>\n<ul>\n<li><code>Object.keys(obj)</code> returns an array of all the keys in <code>obj</code></li>\n<li><code>Object.values(obj)</code> returns an array of the values in <code>obj</code></li>\n</ul>\n</li>\n<li>\n<p>Iterate through an object using a <code>for in</code> loop</p>\n<pre><code class=\"language-javascript\">let printValues = function (obj) {\n    for (let key in obj) {\n        let value = obj[key];\n        console.log(value);\n    }\n};\n</code></pre>\n</li>\n<li>\n<p>Define a function that utilizes <code>...rest</code> syntax to accept an arbitrary number of arguments</p>\n<ul>\n<li><code>...rest</code> syntax will store all additional arguments in an array</li>\n<li>\n<p>array will be empty if there are no additional arguments</p>\n<pre><code class=\"language-javascript\">let myFunction = function (str, ...strs) {\n    console.log('The first string is ' + str);\n    console.log('The rest of the strings are:');\n    strs.forEach(function (str) {\n        console.log(str);\n    });\n};\n</code></pre>\n</li>\n</ul>\n</li>\n</ul>\n<h3></h3>\n<ul>\n<li>\n<p>Use <code>...spread</code> syntax for Object literals and Array literals</p>\n<pre><code class=\"language-javascript\">let arr1 = ['a', 'b', 'c'];\nlet longer = [...arr1, 'd', 'e']; // [\"a\", \"b\", \"c\", \"d\", \"e\"]\n// without spread syntax, this would give you a nested array\nlet withoutRest = [arr1, 'd', 'e']; // [[\"a\", \"b\", \"c\"], \"d\", \"e\"]\n</code></pre>\n</li>\n<li>\n<p>Destructure an array to reference specific elements</p>\n<p>```javascript</p>\n<p>let array = [35,9];</p>\n<p>let [firstEl, secondEl] = array;</p>\n<p>console.log(firstEl); // => 35</p>\n<p>console.log(secondEl); // => 9</p>\n</li>\n</ul>\n<p>// can also destructure using ... syntax let array = [35,9,14]; let [head, ...tail] = array; console.log(head); // => 35 console.log(tail); // => [9, 14]</p>\n<pre><code class=\"language-javascript\">- Destructure an object to reference specific values\n   - if you want to use variable names that don't match the keys, you can use aliasing\n      - `let { oldkeyname: newkeyname } = object`\n   - rule of thumb—only destructure values from objects that are two levels deep\n```javascript\nlet obj = {\n   name: \"Wilfred\",\n   appearance: [\"short\", \"mustache\"],\n   favorites: {\n      color: \"mauve\",\n      food: \"spaghetti squash\",\n      number: 3\n   }\n}\n// with variable names that match keys\nlet { name, appearance } = obj;\nconsole.log(name); // \"Wilfred\"\nconsole.log(appearance); // [\"short\", \"mustache\"]\n\n// with new variable names (aliasing)\nlet {name: myName, appearance: myAppearance} = obj;\n\nconsole.log(myName); // \"Wilfred\"\nconsole.log(myAppearance); // [\"short\", \"mustache\"]\n\n// in a function call\nlet sayHello = function({name}) {\nconsole.log(\"Hello, \" + name); // \"Hello Wilfred\"\n}\n\n// nested objects + aliasing\nlet { favorites: {color, food: vegetable} } = obj;\nconsole.log(color, vegetable); //=> mauve spaghetti squash\n</code></pre>\n<ul>\n<li>\n<p>Write a function that accepts a array as an argument and returns an object representing the count of each character in the array</p>\n<pre><code class=\"language-javascript\">//\nlet elementCounts = function (array) {\n    let obj = {};\n    array.forEach(function (el) {\n        if (el in obj) obj[el] += 1;\n        else obj[el] = 1;\n    });\n    return obj;\n};\nconsole.log(elementCounts(['e', 'f', 'g', 'f'])); // => Object {e: 1, f: 2, g: 1}\n</code></pre>\n</li>\n</ul>\n<h3>Callbacks Lesson Concepts</h3>\n<ul>\n<li>\n<p>Given multiple plausible reasons, identify why functions are called \"First Class Objects\" in JavaScript.</p>\n<ul>\n<li>they can be stored in variables, passed as arguments to other functions, and serve as return value for a function</li>\n<li>supports same basic operations as other types (strings, bools, numbers)</li>\n<li>higher-order functions take functions as arguments or return functions as values</li>\n</ul>\n</li>\n<li>\n<p>Given a code snippet containing an anonymous callback, a named callback, and multiple <code>console.log</code>s, predict what will be printed</p>\n<ul>\n<li>what is this referring to?</li>\n</ul>\n</li>\n<li>Write a function that takes in a value and two callbacks. The function should return the result of the callback that is greater.</li>\n</ul>\n<pre><code class=\"language-javascript\">let greaterCB = function (val, callback1, callback2) {\n    if (callback1(val) > callback2(val)) {\n        return callback1(val);\n    }\n    return callback2(val);\n};\n\nlet greaterCB = function (val, callback1, callback2) {\n    if (callback1(val) > callback2(val)) {\n        return callback1(val);\n    }\n    return callback2(val);\n};\n</code></pre>\n<p>// shorter version let greaterCB = function(val, callback1, callback2) { return Math.max(callback1(val), callback2(val)); } // even shorter, cause why not let greaterCB = (val, cb1, cb2) => Math.max(cb1(val), cb2(val));</p>\n<pre><code class=\"language-javascript\">- Write a function, myMap, that takes in an array and a callback as arguments. The function should mimic the behavior of `Array#map`.\n```javascript\nlet myMap = function(array, callback) {\n   let newArr = [];\n   for (let i = 0; i &#x3C; array.length; i ++) {\n      mapped = callback(array[i], i, array);\n      newArr.push(mapped);\n   }\n   return newArr;\n}\nconsole.log( myMap([16,25,36], Math.sqrt)); // => [4, 5, 6];\n\nlet myMapArrow = (array, callback) => {\n   let newArr = [];\n   array.forEach( (ele, ind, array) => {\n      newArr.push(callback(ele, ind, array));\n   })\n   return newArr;\n}\nconsole.log(myMapArrow([16,25,36], Math.sqrt)); // => [4, 5, 6];\n</code></pre>\n<ul>\n<li>\n<p>Write a function, myFilter, that takes in an array and a callback as arguments. The function should mimic the behavior of <code>Array#filter</code>.</p>\n<pre><code class=\"language-javascript\">let myFilter = function (array, callback) {\n    let filtered = [];\n    for (let i = 0; i &#x3C; array.length; i++) {\n        if (callback(array[i])) {\n            filtered.push(array[i], i, array);\n        }\n    }\n};\n</code></pre>\n</li>\n<li>\n<p>Write a function, myEvery, that takes in an array and a callback as arguments. The function should mimic the behavior of <code>Array#every</code>.</p>\n<pre><code class=\"language-javascript\">let myEvery = function (array, callback) {\n    for (let i = 0; i &#x3C; array.length; i++) {\n        if (!callback(array[i], i, array)) {\n            return false;\n        }\n    }\n    return true;\n};\n// with arrow function syntax\nlet myEvery = (array, callback) => {\n    for (let i = 0; i &#x3C; array.length; i++) {\n        if (!callback(array[i])) {\n            return false;\n        }\n    }\n    return true;\n};\n</code></pre>\n</li>\n</ul>\n<h3>Scope Lesson Concepts</h3>\n<ul>\n<li>\n<p>Identify the difference between <code>const</code>, <code>let</code>, and <code>var</code> declarations</p>\n<ul>\n<li><code>const</code> - cannot reassign variable, scoped to block</li>\n<li><code>let</code> - can reassign variable, scoped to block</li>\n<li><code>var</code> - outdated, may or may not be reassigned, scoped to function. can be not just reassigned, but also redeclared!</li>\n<li>a variable will always evaluate to the value it contains regardless of how it was declared</li>\n</ul>\n</li>\n<li>\n<p>Explain the difference between <code>const</code>, <code>let</code>, and <code>var</code> declarations</p>\n<ul>\n<li>\n<p><code>var</code> is function scoped—so if you declare it anywhere in a function, the declaration (but not assignment) is \"hoisted\"</p>\n<ul>\n<li>so it will exist in memory as \"undefined\" which is bad and unpredictable</li>\n</ul>\n</li>\n<li><code>var</code> will also allow you to redeclare a variable, while <code>let</code> or <code>const</code> will raise a syntax error. you shouldn't be able to do that!</li>\n<li><code>const</code> won't let you reassign a variable, but if it points to a mutable object, you will still be able to change the value by mutating the object</li>\n<li>block-scoped variables allow new variables with the same name in new scopes</li>\n<li>block-scoped still performs hoisting of all variables within the block, but it doesn't initialize to the value of <code>undefined</code> like <code>var</code> does, so it throws a specific reference error if you try to access the value before it has been declared</li>\n<li>\n<p>if you do not use <code>var</code> or <code>let</code> or <code>const</code> when initializing, it will be declared as global—THIS IS BAD</p>\n<ul>\n<li>if you assign a value without a declaration, it exists in the global scope (so then it would be accessible by all outer scopes, so bad). however, there's no hoisting, so it doesn't exist in the scope until after the line is run</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p>Predict the evaluation of code that utilizes function scope, block scope, lexical scope, and scope chaining</p>\n<ul>\n<li>scope of a program means the set of variables that are available for use within the program</li>\n<li>\n<p>global scope is represented by the <code>window</code> object in the browser and the <code>global</code> object in Node.js</p>\n<ul>\n<li>global variables are available everywhere, and so increase the risk of name collisions</li>\n</ul>\n</li>\n<li>\n<p>local scope is the set of variables available for use within the function</p>\n<ul>\n<li>when we enter a function, we enter a new scope</li>\n<li>includes functions arguments, local variables declared inside function, and any variables that were already declared when the function is defined (hmm about that last one)</li>\n</ul>\n</li>\n<li>for blocks (denoted by curly braces <code>{}</code>, as in conditionals or <code>for</code> loops), variables can be block scoped</li>\n<li>\n<p>inner scope does not have access to variables in the outer scope</p>\n<ul>\n<li>scope chaining—if a given variable is not found in immediate scope, javascript will search all accessible outer scopes until variable is found</li>\n<li>so an inner scope can access outer scope variables</li>\n<li>but an outer scope can never access inner scope variables</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p>Define an arrow function</p>\n<p>```javascript</p>\n<p>let arrowFunction = (param1, param2) => {</p>\n<p>let sum = param1 + param2;</p>\n<p>return sum;</p>\n<p>}</p>\n</li>\n</ul>\n<p>// with 1 param you can remove parens around parameters let arrowFunction = param => { param += 1; return param; }</p>\n<p>// if your return statement is one line, you can use implied return let arrowFunction = param => param + 1;</p>\n<p>// you don't have to assign to variable, can be anonymous // if you never need to use it again param => param + 1;</p>\n<p>```</p>\n<ul>\n<li>\n<p>Given an arrow function, deduce the value of <code>this</code> without executing the code</p>\n<ul>\n<li>arrow functions are automatically bound to the context they were declared in</li>\n<li>unlike regular function which use the context they are invoked in (unless they have been bound using <code>Function#bind</code>)</li>\n<li>if you implement an arrow function as a method in an object the context it will be bound to is NOT the object itself, but the global context</li>\n<li>\n<p>so you can't use an arrow function to define a method directly</p>\n<p>```javascript</p>\n<p>let obj = {</p>\n<p>name: \"my object\",</p>\n<p>unboundFunc: function () {</p>\n<p>return this.name;</p>\n<p>// this function will be able to be called on different objects</p>\n<p>},</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3></h3>\n<p>boundToGlobal: () => { return this.name; // this function, no matter how you call it, will be called // on the global object, and it cannot be rebound // this is because it was defined using arrow syntax },</p>\n<pre><code class=\"language-javascript\">makeFuncBoundToObj: function () {\n    return () => {\n        return this.name;\n    }\n    // this function will return a function that will be bound\n    // to the object where we call the outer method\n    // because the arrow syntax is nested inside one of this\n    // function's methods, it cannot be rebound\n},\n\nmakeUnboundFunc: function () {\n    return function () {\n        return this.name;\n    }\n    //this function will return a function that will still be unbound\n},\n\nimmediatelyInvokedFunc: function () {\n    return this.name;\n}(), // this property will be set to the return value of this anonymous function,\n// which is invoked during the object definition;\n// basically, it's a way to check the context inside of an object, at this moment\n\ninnerObj: {\n    name: \"inner object\",\n    innerArrowFunc: () =>  {\n        return this.name;\n    } // the context inside a nested object is not the parent, it's still\n    // the global object. entering an object definition doesn't change the context\n},\n\n\nlet otherObj = { name: \"my other object\" }\n// call unboundFunc on obj, we get \"my object\" console.log(\"unboundFunc: \", obj.unboundFunc()); // => \"my object\" // assign unboundFunc to a variable and call it let newFunc = obj.unboundFunc; // this newFunc will default to being called on global object console.log(\"newFunc: \",newFunc()); // => undefined // but you could bind it directly to a different object if you wanted console.log(\"newFunc: \", newFunc.bind(otherObj)()); // \"my other object\"\n// meanwhile, obj.boundToGlobal will only ever be called on global object console.log(\"boundToGlobal: \", obj.boundToGlobal()); //=> undefined let newBoundFunc = obj.boundToGlobal; console.log(\"newBoundFunc: \", newBoundFunc()); // => undefined // even if you try to directly bind to another object, it won't work! console.log(\"newBoundFunc: \", newBoundFunc.bind(otherObj)()); // => undefined\n// let's make a new function that will always be bound to the context // where we call our function maker let boundFunc = obj.makeFuncBoundToObj();// note that we're invoking, not just assigning console.log(\"boundFunc: \", boundFunc()); // => \"my object\" // we can't rebind this function console.log(\"boundFunc: \", boundFunc.bind(otherObj)()) // =>\"my object\"\n// but if I call makeFuncBoundToObj on another context // the new bound function is stuck with that other context let boundToOther = obj.makeFuncBoundToObj.bind(otherObj)(); console.log(\"boundToOther: \", boundToOther()); // => \"my other object\" console.log(\"boundToOther: \", boundToOther.bind(obj)()) // \"my other object\"\n// the return value of my immediately invoked function // shows that the context inside of the object is the // global object, not the object itself // context only changes inside a function that is called // on an object console.log(\"immediatelyInvokedFunc: \", obj.immediatelyInvokedFunc); // => undefined\n// even though we're inside a nested object, the context is // still the same as it was outside the outer object // in this case, the global object console.log(\"innerArrowFunc: \", obj.innerObj.innerArrowFunc()); // => undefined\n</code></pre>\n<p>}</p>\n<pre><code class=\"language-javascript\">- Implement a closure and explain how the closure effects scope\n   - a closure is \"the combination of a function and the lexical environment within which that function was declared\"\n      - alternatively, \"when an inner function uses or changes variables in an outer function\"\n   - closures have access to any variables within their own scope + scope of outer functions + global scope — the set of all these available variables is \"lexical environemnt\"\n   - closure keeps reference to all variables **even if the outer function has returned**\n      - each function has a private mutable state that cannot be accessed externally\n      - the inner function will maintain a reference to the scope in which it was declared. so it has access to variables that were initialized in any outer scope—even if that scope\n      - if a variable exists in the scope of what could have been accessed by a function (e.g. global scope, outer function, etc), does that variable wind up in the closure even if it never got accessed?\n      - if you change the value of a variable (e.g. i++) you will change the value of that variable in the scope that it was declared in\n\n\n```javascript\nfunction createCounter() {\n   // this function starts a counter at 0, then returns a\n   // new function that can access and change that counter\n   //\n   // each new counter you create will have a single internal\n   // state, that can be changed only by calling the function.\n   // you can't access that state from outside of the function,\n   // even though the count variable in question is initialized\n   // by the outer function, and it remains accessible to the\n   // inner function after the outer function returns.\n   let count = 0;\n   return function() {\n      count ++;\n      return count;\n   }\n}\n\nlet counter = createCounter();\nconsole.log(counter()); //=> 1\nconsole.log(counter()); //=> 2\n// so the closure here comes into play because\n// an inner function is accessing and changing\n// a variable from an outer function\n\n// the closure is the combination of the counter\n// function and the all the variables that existed\n// in the scope that it was declared in. because\n// inner blocks/functions have access to outer\n// scopes, that includes the scope of the outer\n// function.\n\n// so counter variable is a closure, in that\n// it contains the inner count value that was\n// initialized by the outer createCounter() function\n// count has been captured or closed over\n\n// this state is private, so if i run createCounter again\n// i get a totally separate count that doesn't interact\n// with the previous one and each of the new functions\n// will have their own internal state based on the\n// initial declaration in the now-closed outer function\n\nlet counter2 = createCounter();\nconsole.log(counter2()); // => 1\n\n// if i set a new function equal to my existing counter\n// the internal state is shared with the new function\nlet counter3 = counter2;\nconsole.log(counter3());\n</code></pre>\n<ul>\n<li>\n<p>Define a method that references <code>this</code> on an object literal</p>\n<ul>\n<li>\n<p>when we use <code>this</code> in a method it refers to the object that the method is invoked on</p>\n<ul>\n<li>it will let you access other pieces of information from within that object, or even other methods</li>\n<li>method style invocation - <code>object.method(args)</code> (e.g. built in examples like <code>Array#push</code>, or <code>String#toUpperCase</code>)</li>\n</ul>\n</li>\n<li>context is set every time we invoke a function</li>\n<li>function style invocation sets the context to the global object no matter what</li>\n<li>being inside an object does not make the context that object! you still have to use method-style invocation</li>\n</ul>\n</li>\n<li>\n<p>Utilize the built in <code>Function#bind</code> on a callback to maintain the context of this</p>\n<ul>\n<li>when we call bind on a function, we get an exotic function back—so the context will always be the same for that new function</li>\n</ul>\n<pre><code class=\"language-text\">let cat = {\npurr: function () {\nconsole.log(\"meow\");\n},\npurrMore: function () {\nthis.purr();\n},\n};\nlet sayMeow = cat.purrMore; console.log(sayMeow()); // TypeError: this.purr is not a function\n\n\n// we can use the built in Function.bind to ensure our context, our this, // is the cat object let boundCat = sayMeow.bind(cat);\nboundCat(); // prints \"meow\"\n</code></pre>\n<p>``</p>\n</li>\n</ul>\n<h3></h3>\n<h3></h3>\n<pre><code class=\"language-javascript\">   - `bind` can also work with arguments, so you can have a version of a function with particular arguments and a particular context. the first arg will be the context aka the `this` you want it to use. the next arguments will be the functions arguments that you are binding\n      - if you just want to bind it to those arguments in particular, you can use `null` as the first argument, so the context won't be bound, just the arguments\n- Given a code snippet, identify what `this` refers to\n   - important to recognize the difference between scope and context\n      - scope works like a dictionary that has all the variables that are available within a given block, plus a pointer back the next outer scope (which itself has pointers to new scopes until you reach the global scope. so you can think about a whole given block's scope as a kind of linked list of dictionaries) (also, this is not to say that scope is actually implemented in this way, that is just the schema that i can use to understand it)\n      - context refers to the value of the `this` keyword\n   - the keyword `this` exists in every function and it evaluates to the object that is currently invoking that function\n   - so the context is fairly straightforward when we talk about methods being called on specific objects\n   - you could, however, call an object's method on something other than that object, and then this would refer to the context where/how it was called, e.g.\n```javascript\nlet dog = {\n   name: \"Bowser\",\n   changeName: function () {\n      this.name = \"Layla\";\n  },\n};\n\n// note this is **not invoked** - we are assigning the function itself\nlet change = dog.changeName;\nconsole.log(change()); // undefined\n\n// our dog still has the same name\nconsole.log(dog); // { name: 'Bowser', changeName: [Function: changeName] }\n\n// instead of changing the dog we changed the global name!!!\nconsole.log(this); // Object [global] {etc, etc, etc,  name: 'Layla'}\n</code></pre>\n<ul>\n<li>\n<p>CALLING SOMETHING IN THE WRONG CONTEXT CAN MESS YOU UP!</p>\n<ul>\n<li>could throw an error if it expects this to have some other method or whatever that doesn't exist</li>\n<li>you could also overwrite values or assign values to exist in a space where they should not exist</li>\n</ul>\n</li>\n<li>\n<p>if you call a function as a callback, it will set <code>this</code> to be the outer function itself, even if the function you were calling is a method that was called on a particular object</p>\n<pre><code class=\"language-text\">let cat = {\npurr: function () {\nconsole.log(\"meow\");\n},\npurrMore: function () {\nthis.purr();\n},\n};\nglobal.setTimeout(cat.purrMore, 5000); // 5 seconds later: TypeError: this.purr is not a function\n</code></pre>\n</li>\n</ul>\n<p>we can use strict mode with <code>\"use strict\";</code> this will prevent you from accessing the global object with <code>this</code> in functions, so if you try to call <code>this</code> in the global context and change a value, you will get a type error, and the things you try to access will be undefined</p>\n<h3></h3>\n<p>let sayMeow = cat.purrMore; console.log(sayMeow()); // TypeError: this.purr is not a function</p>\n<p>// we can use the built in Function.bind to ensure our context, our <code>this</code>, // is the cat object let boundCat = sayMeow.bind(cat);</p>\n<p>boundCat(); // prints \"meow\"</p>\n<pre><code class=\"language-text\">   - `bind` can also work with arguments, so you can have a version of a function with particular arguments and a particular context. the first arg will be the context aka the `this` you want it to use. the next arguments will be the functions arguments that you are binding\n      - if you just want to bind it to those arguments in particular, you can use `null` as the first argument, so the context won't be bound, just the arguments\n- Given a code snippet, identify what `this` refers to\n   - important to recognize the difference between scope and context\n      - scope works like a dictionary that has all the variables that are available within a given block, plus a pointer back the next outer scope (which itself has pointers to new scopes until you reach the global scope. so you can think about a whole given block's scope as a kind of linked list of dictionaries) (also, this is not to say that scope is actually implemented in this way, that is just the schema that i can use to understand it)\n      - context refers to the value of the `this` keyword\n   - the keyword `this` exists in every function and it evaluates to the object that is currently invoking that function\n   - so the context is fairly straightforward when we talk about methods being called on specific objects\n   - you could, however, call an object's method on something other than that object, and then this would refer to the context where/how it was called, e.g.\n```javascript\nlet dog = {\n   name: \"Bowser\",\n   changeName: function () {\n      this.name = \"Layla\";\n  },\n};\n\n// note this is **not invoked** - we are assigning the function itself\nlet change = dog.changeName;\nconsole.log(change()); // undefined\n\n// our dog still has the same name\nconsole.log(dog); // { name: 'Bowser', changeName: [Function: changeName] }\n\n// instead of changing the dog we changed the global name!!!\nconsole.log(this); // Object [global] {etc, etc, etc,  name: 'Layla'}\n</code></pre>\n<ul>\n<li>\n<p>CALLING SOMETHING IN THE WRONG CONTEXT CAN MESS YOU UP!</p>\n<ul>\n<li>could throw an error if it expects this to have some other method or whatever that doesn't exist</li>\n<li>you could also overwrite values or assign values to exist in a space where they should not exist</li>\n</ul>\n</li>\n<li>\n<p>if you call a function as a callback, it will set <code>this</code> to be the outer function itself, even if the function you were calling is a method that was called on a particular object</p>\n<p>```javascript</p>\n<p>let cat = {</p>\n<p>purr: function () {</p>\n<p>console.log(\"meow\");</p>\n<p>},</p>\n<p>purrMore: function () {</p>\n<p>this.purr();</p>\n<p>},</p>\n<p>};</p>\n</li>\n</ul>\n<p>global.setTimeout(cat.purrMore, 5000); // 5 seconds later: TypeError: this.purr is not a function</p>\n<p>```</p>\n<ul>\n<li>we can use strict mode with <code>\"use strict\";</code> this will prevent you from accessing the global object with <code>this</code> in functions, so if you try to call <code>this</code> in the global context and change a value, you will get a type error, and the things you try to access will be undefined</li>\n</ul>\n<h3>POJOs</h3>\n<h4>1. Label variables as either Primitive vs. Reference</h4>\n<p>Javascript considers most data types to be 'primitive', these data types are immutable, and are passed by value. The more complex data types: Array and Object are mutable, are considered 'reference' data types, and are passed by reference.</p>\n<ul>\n<li>Boolean - Primitive</li>\n<li>Null - Primitive</li>\n<li>Undefined - Primitive</li>\n<li>Number - Primitive</li>\n<li>String - Primitive</li>\n<li>Array - Reference</li>\n<li>Object - Reference</li>\n<li>Function - Reference</li>\n</ul>\n<h4>2. Identify when to use . vs [] when accessing values of an object</h4>\n<pre><code class=\"language-javascript\">let obj = { one: 1, two: 2 };\n\n// Choose the square brackets property accessor when the property name is determined at\n// runtime, or if the property name is not a valid identifier\nlet myKey = 'one';\nconsole.log(obj[myKey]);\n\n// Choose the dot property accessor when the property name is known ahead of time.\nconsole.log(obj.two);\n</code></pre>\n<h4>3. Write an object literal with a variable key using interpolation</h4>\n<pre><code class=\"language-javascript\">let keyName = 'two';\n\n// If the key is not known, you can use an alternative `[]` syntax for\n// object initialization only\nlet obj2 = { [keyName]: 2 };\nconsole.log(obj2);\n</code></pre>\n<h4>4. Use the obj[key] !== undefined pattern to check if a given variable that contains a key exists in an object</h4>\n<pre><code class=\"language-javascript\">function doesKeyExist(obj, key) {\n    // obj[key] !== undefined\n    // or:\n    return key in obj;\n}\n\nlet course = { bootcamp: 'Lambda', course: 'Bootcamp Prep' };\nconsole.log(doesKeyExist(course, 'course')); // => true\nconsole.log(doesKeyExist(course, 'name')); // => false\n</code></pre>\n<h4>5. Utilize Object.keys and Object.values in a function</h4>\n<pre><code class=\"language-javascript\">function printKeys(object) {\n    return Object.keys(object);\n}\n\nfunction printValues(object) {\n    return Object.values(object);\n}\n\nconsole.log(printKeys({ dog: 'Strelka', dog2: 'Belka' }));\nconsole.log(printValues({ dog: 'Strelka', dog2: 'Belka' }));\n</code></pre>\n<h4>6. Iterate through an object using a for in loop</h4>\n<pre><code class=\"language-javascript\">let player = { name: 'Sergey', skill: 'hockey' };\n\nfor (let key in player) {\n    console.log(key, player[key]);\n}\n\nconsole.log(Object.entries(player));\n</code></pre>\n<h4>7. Define a function that utilizes ...rest syntax to accept an arbitrary number of arguments</h4>\n<pre><code class=\"language-javascript\">function restSum(...otherNums) {\n    let sum = 0;\n    console.log(otherNums);\n    otherNums.forEach(function (num) {\n        sum += num;\n    });\n\n    return sum;\n}\n\nconsole.log(restSum(3, 5, 6)); // => 14\nconsole.log(restSum(1, 2, 3, 4, 5, 6, 7, 8, 9)); // => 45\nconsole.log(restSum(0)); // => 0\n</code></pre>\n<h4>8. Use ...spread syntax for Object literals and Array literals</h4>\n<pre><code class=\"language-javascript\">let numArray = [1, 2, 3];\nlet moreNums = [...numArray, 4, 5, 6];\n\nconsole.log(moreNums);\n\nlet shoe = { color: 'red', size: 10 };\nlet newShoe = { ...shoe, brand: 'Nike', size: 12 };\nconsole.log(newShoe);\nnewShoe.color = 'black';\nconsole.log(newShoe);\n\nconsole.log(shoe);\n</code></pre>\n<h4>9. Destructure an array to reference specific elements</h4>\n<pre><code class=\"language-javascript\">let arr = ['one', 'two', 'three'];\n\nlet [first] = arr;\nconsole.log(first);\n</code></pre>\n<h4>10. Destructure an object to reference specific values</h4>\n<pre><code class=\"language-javascript\">let me = {\n    name: 'Ian',\n    instruments: ['bass', 'synth', 'guitar'],\n    siblings: {\n        brothers: ['Alistair'],\n        sisters: ['Meghan']\n    }\n};\n\nlet {\n    name,\n    instruments: musical_instruments,\n    siblings: { sisters }\n} = me;\n\nconsole.log(name);\nconsole.log(musical_instruments);\nconsole.log(sisters);\n</code></pre>\n<h4>11. Write a function that accepts a string as an argument and returns an object representing the count of each character in the array</h4>\n<pre><code class=\"language-javascript\">function charCount(inputString) {\n    let res = inputString.split('').reduce(function (accum, el) {\n        if (el in accum) {\n            accum[el] = accum[el] + 1;\n        } else {\n            accum[el] = 1;\n        }\n        return accum;\n    }, {});\n    return res;\n}\n\nconsole.log(charCount('aaabbbeebbcdkjfalksdfjlkasdfasdfiiidkkdingds'));\n</code></pre>\n<h3></h3>\n<h3>Review of Concepts</h3>\n<h4>1. Identify the difference between const, let, and var declarations</h4>\n<h4>2. Explain the difference between const, let, and var declarations</h4>\n<pre><code class=\"language-javascript\">var a = 'a';\n</code></pre>\n<ul>\n<li><code>var</code> is the historical keyword used for variable declaration.</li>\n<li><code>var</code> declares variables in function scope, or global scope if not inside a function.</li>\n<li>We consider <code>var</code> to be <em>deprecated</em> and it is never used in this course.</li>\n</ul>\n<pre><code class=\"language-javascript\">let b = 'b';\n</code></pre>\n<ul>\n<li><code>let</code> is the keyword we use most often for variable declaration.</li>\n<li><code>let</code> declares variables in block scope.</li>\n<li>variables declared with <code>let</code> are re-assignable.</li>\n</ul>\n<pre><code class=\"language-javascript\">const c = 'c';\n</code></pre>\n<ul>\n<li><code>const</code> is a specialized form of <code>let</code> that can only be used to <strong>initialize</strong> a variable.</li>\n<li>Except when it is declared, you cannot assign to a <code>const</code> variable.</li>\n<li><code>const</code> scopes variables the same way that <code>let</code> does.</li>\n</ul>\n<h4>3. Predict the evaluation of code that utilizes function scope, block scope, lexical scope, and scope chaining</h4>\n<p>Consider this <code>run</code> function, inside which <code>foo</code> and <code>bar</code> have <code>function scope</code>. <code>i</code> and <code>baz</code> are scoped to the block expression.</p>\n<pre><code class=\"language-javascript\">// function and block scope in this example\nfunction run() {\n    var foo = 'Foo';\n    let bar = 'Bar';\n\n    console.log(foo, bar);\n\n    {\n        console.log(foo);\n        let baz = 'Bazz';\n        console.log(baz);\n    }\n\n    console.log(baz); // ReferenceError\n}\n\nrun();\n</code></pre>\n<p>Notice that referencing <code>baz</code> from outside it's block results in JavaScript throwing a ReferenceError.</p>\n<p>Consider this <code>run</code> function, inside of which <code>foo</code> has <code>function scope</code>.</p>\n<pre><code class=\"language-javascript\">function run() {\n    console.log(foo); // undefined\n    var foo = 'Foo';\n    console.log(foo); // Foo\n}\n\nrun();\n</code></pre>\n<p>Consider this <code>func1</code> function and it's nested scopes.</p>\n<pre><code class=\"language-javascript\">// global scope\nfunction func1(arg1) {\n    // func1 scope\n\n    return function func2(arg2) {\n        // func2 scope\n\n        return function func3(arg3) {\n            // func3 scope\n\n            console.log(arg1, arg2, arg3);\n        };\n    };\n}\n</code></pre>\n<h4>6. Implement a closure and explain how the closure effects scope</h4>\n<pre><code class=\"language-javascript\">const adder = (arg1) => {\n    return (arg2) => {\n        return arg1 + arg2;\n    };\n};\n\nconst func2 = adder(2);\nconst result = func2(2);\nconsole.log(result); // => 4;\n</code></pre>\n<h4>4. Define an arrow function</h4>\n<pre><code class=\"language-javascript\">const returnValue = (val) => val;\n</code></pre>\n<p>This simple construct will create a function that accepts <code>val</code> as a parameter, and returns <code>val</code> immediately. We do not need to type <code>return val</code>, because this is a single-line function.</p>\n<p>Identically, we could write</p>\n<pre><code class=\"language-javascript\">const returnValue = (val) => {\n    return val;\n};\n</code></pre>\n<h4>5. Given an arrow function, deduce the value of <code>this</code> without executing the code</h4>\n<pre><code class=\"language-javascript\">function fDAdder(arr) {\n    console.log(this);\n\n    return arr.reduce((acc, ele) => {\n        return acc + ele;\n    });\n}\n\nfDAdder([1, 2, 4, 6]);\n</code></pre>\n<p>If we use a <em>function declaration</em> style function, the <code>this</code> variable is set to the <code>global</code> object (i.e. <code>Object [global]</code> in Node.JS and <code>Window</code> in your browser).</p>\n<pre><code class=\"language-javascript\">const adder = (arr) => {\n    console.log(this);\n    arr.reduce((acc, ele) => (sum += ele));\n};\nadder([1, 2, 4, 6]);\n</code></pre>\n<p>In this example, we use a <em>fat arrow</em> style function. Note that when we declare a funciton like this <code>this</code> becomes</p>\n<h4>7. Define a method that references this on an object literal</h4>\n<pre><code class=\"language-javascript\">const pokemon = {\n    firstname: 'Pika',\n    lastname: 'Chu',\n    getPokeName: function () {\n        const fullname = `${this.firstname} ${this.lastname}`;\n        return fullname;\n    }\n};\n\nconsole.log(pokemon.getPokeName());\n</code></pre>\n<h4>8. Utilize the built in Function#bind on a callback to maintain the context of <code>this</code></h4>\n<pre><code class=\"language-javascript\">const pokemon = {\n    firstname: 'Pika',\n    lastname: 'Chu',\n    getPokeName: function () {\n        const fullname = `${this.firstname} ${this.lastname}`;\n        return fullname;\n    }\n};\n\nconst logPokemon = pokemon.getPokename.bind(pokemon);\n\nlogPokemon('sushi', 'algorithms'); // Pika Chu loves sushi and algorithms\n</code></pre>\n<h4>9. Given a code snippet, identify what <code>this</code> refers to</h4>\n<pre><code class=\"language-javascript\">function Person(name) {\n    // this.name = name;\n    // let that = this;\n\n    setTimeout(function () {\n        // console.log(this); // => Window\n        // console.log(that); // => [Function] => Person\n        // this.sayName(); // => no method error\n        that.sayName();\n    }, 1000);\n}\n\nPerson.prototype.sayName = function () {\n    console.log(this.name);\n};\n\nconst jane = new Person('Jane');\n</code></pre>"},{"url":"/docs/articles/http/","relativePath":"docs/articles/http.md","relativeDir":"docs/articles","base":"http.md","name":"http","frontmatter":{"title":"The HTTP Protocol","weight":0,"excerpt":"The HTTP Protocol","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>The HTTP Protocol\n\n</h2>\n<ul>\n<li>Requires: a connection between client and server</li>\n<li>Stateless: no login process, each request is independent</li>\n<li>Simple format: request header, blank line, possible payload</li>\n<li>Symmetrical: allows data to be sent and recieved</li>\n<li>Very easy to implement but scales very well</li>\n</ul>\n<h2>Example HTTP Request</h2>\n<p>Note lines folded for display.</p>\n<p>What do each of these headers mean? Which are required? Many are defined in the <a href=\"ftp://ftp.isi.edu/in-notes/rfc2616.txt\">HTTP standard</a> but others can be defined via the HTTP extension framework.</p>\n<h2>Example HTTP Response</h2>\n<h2>Example HTTP POST Request</h2>\n<p>Note lines folded for display.</p>\n<p>This is a POST request, note how the data is encoded in the request body.</p>\n<h2>Example HTTP GET Request</h2>\n<p>Note lines folded for display.</p>\n<p>This is the same form submitted via a GET request, here the data is encoded in request URL. Note also the If-Modified-Since header in this request, sent because my browser has just asked for the same resource.</p>\n<h2>HTTP Redirect</h2>\n<p>Alternately</p>\n<p>The HTTP redirect is a server response that can be used to indicate that a resource has moved to a new location. An alternate is to include the above meta tag in a page header to force a redirect from the current page.</p>\n<h2>HTTP Verbs</h2>\n<ul>\n<li>GET - get a resource, <em>Idempotent</em></li>\n<li>POST - send some data to a resource</li>\n<li>HEAD - get headers for a resource</li>\n<li>PUT - create a new resource</li>\n<li>DELETE - delete a resource</li>\n</ul>\n<h2>Common HTTP Response Status Codes</h2>\n<p>Some notable response codes:</p>\n<ul>\n<li><a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success\">200 OK</a> - Request succeeded and everything went well</li>\n<li><a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection\">301 Moved Permanently</a> - Requested resource has moved and all future requests should be made to new location</li>\n<li><a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error\">403 Forbidden</a> - Response refused by server (even if request is valid)</li>\n<li><a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error\">404 Not Found</a> - Server could not find requested resource (though it may be available in the future)</li>\n<li><a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error\">500 Internal Server Error</a> - Generic error message response when server encountered an error</li>\n</ul>\n<p>See also: <a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes\">full list of HTTP status codes</a></p>\n<h2>Resources</h2>\n<ul>\n<li>Use <a href=\"https://addons.mozilla.org/en-US/firefox/addon/3829\">Live HTTP Headers</a> in Firefox to view headers of requests that you make. Also available as a <a href=\"https://chrome.google.com/webstore/detail/live-http-headers/iaiioopjkcekapmldfgbebdclcnpgnlo\">Chrome Extension</a>.</li>\n<li>Similarly, in Google Chrome, the <a href=\"http://www.chromium.org/devtools/google-chrome-developer-tools-tutorial#resources\">Resources panel</a> in the Developer tools allows you to view the request headers and content for each request that was made when you're looking at a page.</li>\n<li>Wikipedia's <a href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol\">entry on HTTP</a> gives a good overview of the protocol.</li>\n</ul>"},{"url":"/docs/articles/","relativePath":"docs/articles/index.md","relativeDir":"docs/articles","base":"index.md","name":"index","frontmatter":{"title":"Articles","weight":0,"excerpt":"my web development articles","seo":{"title":"","description":"This section is similar to a blog but is more technical in nature and time invariant with regard to content.","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Articles</h2>\n<iframe src=\"https://codesandbox.io/embed/boring-antonelli-vdxzf?fontsize=14&hidenavigation=1&theme=dark&view=preview\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"medium-articles\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>"},{"url":"/docs/articles/how-the-web-works/","relativePath":"docs/articles/how-the-web-works.md","relativeDir":"docs/articles","base":"how-the-web-works.md","name":"how-the-web-works","frontmatter":{"title":"How The Web Works","weight":0,"excerpt":"We can start by differentiating the Internet and the World Wide Web. These are often confused because the Web is the main use that most people have for the Internet and a common web browser is called \"Internet Explorer\". However, we can properly distinguish between them. The Internet is a collection of inter-connected computers using the TCP/IP protocol to exchange information.","seo":{"title":"","description":"Perhaps the first thing to establish in our discussion of the web is what exactly it is. This chapter will look in brief overview at the core technologies that go together to make the World Wide Web.","robots":[],"extra":[]},"template":"docs"},"html":"<h2>What is the World Wide Web?\n\n</h2>\n<p>Perhaps the first thing to establish in our discussion of the web is what exactly it is. This chapter will look in brief overview at the core technologies that go together to make the World Wide Web.</p>\n<p>We can start by differentiating the Internet and the World Wide Web. These are often confused because the Web is the main use that most people have for the Internet and a common web browser is called \"Internet Explorer\". However, we can properly distinguish between them. The Internet is a collection of inter-connected computers using the TCP/IP protocol to exchange information. The World Wide Web is a particular use of the Internet to exchange HTML web pages (and other documents) using the Hypertext Transfer Protocol (HTTP).</p>\n<p>Let's look briefly at the four basic ingredients of the Web:</p>\n<ul>\n<li>TCP/IP - is a low level message protocol that is used to transfer messages between computers on the Internet.</li>\n<li>HTTP - is used by a Web Client to make a request to a Web Server and for the server to return the response.</li>\n<li>URL - is a way of writing down the address of something on the Web so that a browser can work out where to get it from.</li>\n<li>HTML - is a language for writing web pages containing text, images and other content.</li>\n</ul>\n<p>Together, these four technologies allow a web client - the web browser on your computer - to fetch pages from a web server anywhere in the world that might contain links to other documents and so on. It's the links between documents that make this a <em>Web</em> and the Internet that allows it to be the <em>World Wide Web</em>.</p>\n<p>Let's look at each of these technologies in a little more detail; although we'll explore most of them a lot more throughout the rest of this book.</p>\n<h2>TCP/IP and DNS</h2>\n<p>TCP/IP, the Transmission Control Protocol/Internet Protocol, is the standard way of exchanging messages on the Internet - in fact it effectively defines what the Internet is: a network of computers communicating via TCP/IP. For our purposes, there's no need to have a deep understanding of the low level details of TCP/IP, though many of you will learn more about it if you study any networking topics. However there are a few higher level things that touch on how we use the Internet in the context of the World Wide Web.</p>\n<p>A <em>Protocol</em> in this sense is a formal standard for how two machines will talk to each other over a communications channel. It describes what messages are allowed and what they mean and how data is transferred over the network. Later, we'll look at HTTP which is a higher level protocol for web requests. TCP/IP deals with the low level exchange of data and doesn't really care what the content of that data is.</p>\n<p>The Internet is a collection of computer networks joined by physical network channels. Within an organisation, there may be a physical network based on the Ethernet standard (wired or wireless) which effectively connects all computers on the network to each other. Organisations connect to each other via DSL or cable connections. These <em>inter</em>-connected <em>net</em>works make up the Internet. The role of TCP/IP is to allow a computer within one organisation (your laptop) to establish a connection to a computer in another (a web server). Importantly, this connection is a <em>point-to-point</em> connection - like a private channel between the two computers, even though the data is carried by this shared network of networks.</p>\n<p>TCP/IP is a <em>packet oriented</em> protocol. To send a message, it is broken up into small chunks (packets) which are each addressed and sent over the network. The receiving computer intercepts these packets, notices that they are addressed to them, and re-assembles the original message. Packets can arrive out of order (or not at all) and TCP/IP defines what the two communicating computers should do in this case.</p>\n<p>Each computer on the network is assigned a unique <em>IP address</em> which is a 32 bit number usually expressed as four 8 bit digits separated by dots. For example 192.168.1.2 or 137.111.158.22. These numbers are used as the addresses of the packets sent around the Internet. Within an organisation, all computers will share the first part of their address; for example, all Macquarie University computers will have addresses starting with 137.111. This means that any packet sent from within Macquarie to an address in the range 137.111.x.x will find it's destination somewhere inside the organisation. However, if we send a packet to 143.119.160.16 (the NSW Government website) the network protocols need to know that this packet should be forwarded to the NSW Government network before it can be delivered. We can pretend that this all happens by magic (this isn't a networking course) and rest assured that a clever <em>network routing</em> algorithm will get the packets to where they need to go. As long as we know the IP address of the destination computer, we can establish a point-to-point channel and send data back and forth.</p>\n<p>Within your home you might have your own private network, often established by a wireless router that connects to your ADSL or cable service. While this router will have a proper IP address, the network it establishes in your home is a <em>private network</em> and will use one of two address ranges: 192.168.x.x or 10.10.x.x. Both of these are reserved for private use, so that my laptop and your printer might have the same IP address of 192.168.100.13. A trick called Network Address Translation (NAT) carried out by your router allows each of these devices to connect to the Internet through the router, even though they don't have a full IP address. Again, we don't need to worry about the details but sometimes it's useful to know how to communicate directly with devices on your own network, in which case you might start finding out about these private IP addresses.</p>\n<p>A significant issue with the success and ubiquity of the Internet is that we might run out of unique addresses. Since an IP address is a 32 bit number, that means there are only 4,294,967,296 unique addresses. If every computer, mobile phone, printer and electricity meter is to be connected to the Internet, the it's clear that more addresses will be needed. There are two responses to this. The first is that many of these devices share a single IP address (using NAT) which multiplies the number available significantly. THe second is a new standard called IPv6 (rather than IPv4 which I've described here) where addresses are 128 bits long. Most modern devices are able to use IPv6 addressing so the crisis is unlikely to hit us catastrophically.</p>\n<p>IP addresses give a unique identifier for each device but they aren't very easy to remember. We're used to giving the names of web-sites via names like www.nsw.gov.au or sales.example.com. These names are translated into numerical IP addresses via the Domain Name System (DNS) which works using a clever hierarchical algorithm. For example, to work out what sales.example.com means our local DNS server would look at the last part of the address and forward the query to a server that it knows is authoritative for all addresses ending in .com. The .com server may not know which IP address corresponds to sales.example.com so it sends the query on to the DNS server for example.com which will respond with the answer. As the result is passed back to the original DNS server, it is cached (remembered) so that it can be returned more quickly the next time it is requested.</p>\n<p>DNS allows an organisation to set up whatever names it needs and link those names to its servers. It's common to have the main web server called www.example.com but the same server could also be referred to as example.com, sales.example.com or test.example.com. We'll see later how this arrangement can be used to provide a lot of flexibility when setting up web servers.</p>\n<h2>HTTP</h2>\n<p>In 1991 Tim Berners-Lee invented the World Wide Web. He was building on the existing technology of the Internet that allowed computers to exchange information around the world. His invention consisted essentially of three things: the Hypertext Transfer Protocol (HTTP), the Universal Resource Locator (URL) and the Hypertext Markup Language (HTML). HTTP is the language that a web client (your browser) talks to a web server to ask for a page and get the response back. It's a protocol, just like TCP/IP, but it's a much higher level protocol and it's one that we need to understand very well as web programmers.</p>\n<p>HTTP requires that we first establish a point-to-point connection between a client (who is sending a request) and a server (who will fulfil the request if possible). This connection is usually via TCP/IP over the Internet but could also be over any other communication medium such as <a href=\"http://code.google.com/p/bt-http-server/\">bluetooth</a>. Once the connection is established, the conversation can begin.</p>\n<p>One of the important features of HTTP is that it is a simple, text based protocol. The request and response consist of a number of lines of text in a well defined format. Here is an example request that might be sent to a server:</p>\n<p>The first word in the request is always one of the defined <em>HTTP verbs</em> (most frequently GET, HEAD or POST, we'll explore these in more detail later). A GET request asks the server to return the given resource, in this case '/storefront.html' which is probably an HTML file stored somewhere on the server. The last part of the first line (HTTP/1.1) defines the version of the standard that we are using; there was a version 1.0 but most modern browsers will use 1.1. The remaining lines of the request include other <em>headers</em> that qualify the request in some way. The <em>Host</em> header is required and denotes the server that the request is being sent to. The Accept header defines what kinds of document we'd like in return; in this case, any kind of text document is ok. The request ends with a blank line, which is how the server knows that all headers have been received.</p>\n<p>The request is received and processed by the server and a response is sent back to the client containing the web page that was asked for. Again the format of the response is easy to understand:</p>\n<p>The first word of the response must be HTTP/1.1, the remainder of the first line contains a response code (200) and explanation (OK) in this case saying everything is fine, here's the page you asked for. The second header here defines the type of document being returned (it's an HTML page). There is then a blank line which ends the headers (as with the request) and the HTML content is then sent.</p>\n<p>A real request and response pair will have many more headers than this but their format follows this basic pattern: header lines followed by a blank line and an optional body. The point here is that HTTP is a very simple conversation between web client and server.</p>\n<p>One important feature of HTTP is that each request/response pair is independent of every other. This means that all the information about your request must be included in the request headers; the server doesn't remember anything you told it last time. This is one reason that HTTP and the web have been so successful. It is very easy to implement an HTTP server and it can be done on very small devices. This might be one of the reasons why the Web succeeded where other similar systems failed. Since the protocol is so simple, it was easy to write a web server and many people did. This meant that the web was used by many small groups to publish content, forming the groundswell that led to institutional and corporate adoption.</p>\n<p>We'll look at HTTP in more detail later, for now the take home message is:</p>\n<ul>\n<li>HTTP is a simple text based protocol</li>\n<li>The client (browser) sends a request to the server</li>\n<li>The server receives the request and returns a response</li>\n<li>The server doesn't need to remember the client - every request is independant.</li>\n<li>The simple nature of HTTP makes it easy to understand and makes writing web servers relatively easy.</li>\n</ul>\n<h2>Uniform Resource Locators: URL</h2>\n<p>Another part of Tim Berners-Lee's invention is the Uniform Resource Locator, URL. These days, URLs are ubiquitous. We see them on advertisments, on the TV, we send them to each other in email, even reference them in books and reports. Most organisations today will have at least one top-level URL for their website and often have many connected to particular services, departments or advertising campaigns.</p>\n<p>See <a href=\"https://pwp.stevecassidy.net/web/urls.html\">the URL chapter</a> for a detaile discussion.</p>\n<h2>Hypertext Markup Language: HTML</h2>\n<p>HTML is the last link in the chain that makes the Web. It is a language that allows authors to write Hypertext documents that include structure and formatting instructions. <em>Hypertext</em> describes the idea of linking one document to another via <em>hyperlinks</em> so that when you activate a link, you jump to a new document. There were hypertext systems before the birth of the web (<a href=\"http://www.xanadu.com/\">Project Xanadu</a>, <a href=\"http://en.wikipedia.org/wiki/HyperCard\">Hypercard</a>) but HTML has been much more successful than any other standard in this space.</p>\n<p>HTML is a <em>Markup Language</em> which means that it provides a way of adding additional information or markup to plain text. In this case, the markup defines the structure of the document - headers, paragraphs, lists, tables - as well as the hypertext features - links and anchors. There are other markup languages, for example LaTeX is used to write scientific papers by adding markup to text (e.g. \\textbf{bold text} or \\section{A heading}). All markup languages have some way of differentiating the text in a document from the markup instructions. In HTML this is via the angle brackets which surround tag names: &#x3C;tag>.</p>\n<p>HTML was invented by Tim Berners-Lee but it derives from an earlier standard called SGML (Standard Generalised Markup Language) that had been in use for some years as a language for writing technical documentation. It came out of work by IBM on their technical documentation and became an industry standard ratified by the ISO. SGML is in fact a meta-standard in that it defines a way of defining a markup language. HTML is one such markup language and can strictly be treated as such; however, since HTML is so much more common than any other SGML language, it is usually treated as a special case. So, for example, while we could use general purpose SGML authoring tools to write HTML, we generally use applications tailored to writing web pages that only understand HTML.</p>\n<p>Another related markup language is <a href=\"http://www.w3.org/XML/\">XML</a>, the eXtensible Markup Language. XML began as an attempt to streamline the SGML standard to make it more suitable for the web. Like SGML, XML is a meta-standard that defines how markup languages can be written. There is a version of HTML defined as an XML language called <a href=\"http://www.w3.org/MarkUp/\">XHTML</a> but this never really took off and the standardisation work around it was stopped in 2010. Instead, XML has become widely used to describe <em>data</em> rather than <em>documents</em> and we'll look at how it is used today on the web later in this book.</p>"},{"url":"/docs/articles/install/","relativePath":"docs/articles/install.md","relativeDir":"docs/articles","base":"install.md","name":"install","frontmatter":{"title":"Install","excerpt":"Web-Dev-Hubis a Unibit theme created for project documentations. You can use it for your project.","seo":{"title":"Install","description":"This is the Install page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Install","keyName":"property"},{"name":"og:description","value":"This is the Install page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Install"},{"name":"twitter:description","value":"This is the Install page"}]},"template":"docs"},"html":"<p>Node.js can be installed in different ways. This post highlights the most common and convenient ones.</p>\n<p>Official packages for all the major platforms are available at <a href=\"https://nodejs.org/en/download/\">https://nodejs.org/en/download/</a>.</p>\n<p>One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own.</p>\n<p>On macOS, <a href=\"https://brew.sh/\">Homebrew</a> is the de-facto standard, and - once installed - allows you to install Node.js very easily, by running this command in the CLI:</p>\n<pre><code class=\"language-bash\">brew install node\n</code></pre>\n<p>Other package managers for Linux and Windows are listed in <a href=\"https://nodejs.org/en/download/package-manager/\">https://nodejs.org/en/download/package-manager/</a></p>\n<p><code>nvm</code> is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks, for example.</p>\n<p>It is also very useful to test your code with old Node.js versions.</p>\n<p>See <a href=\"https://github.com/creationix/nvm\">https://github.com/creationix/nvm</a> for more information about this option.</p>\n<p>My suggestion is to use the official installer if you are just starting out and you don't use Homebrew already, otherwise, Homebrew is my favorite solution.</p>\n<p>In any case, when Node.js is installed you'll have access to the <code>node</code> executable program in the command line.</p>"},{"url":"/docs/articles/intro/","relativePath":"docs/articles/intro.md","relativeDir":"docs/articles","base":"intro.md","name":"intro","frontmatter":{"title":"Intro To Node","excerpt":"Web-Dev-Hubis a Unibit theme created for project documentations. You can use it for your project.","seo":{"title":"Intro To Node","description":"This is the Intro To Node page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Intro To Node","keyName":"property"},{"name":"og:description","value":"This is the Intro To Node page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Intro To Node"},{"name":"twitter:description","value":"This is the Intro To Node page"}]},"template":"docs"},"html":"<p>Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project!</p>\n<p>Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant.</p>\n<p>A Node.js app is run in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.</p>\n<p>When Node.js performs an I/O operation, like reading from the network, accessing a database or the filesystem, instead of blocking the thread and wasting CPU cycles waiting, Node.js will resume the operations when the response comes back.</p>\n<p>This allows Node.js to handle thousands of concurrent connections with a single server without introducing the burden of managing thread concurrency, which could be a significant source of bugs.</p>\n<p>Node.js has a unique advantage because millions of frontend developers that write JavaScript for the browser are now able to write the server-side code in addition to the client-side code without the need to learn a completely different language.</p>\n<p>In Node.js the new ECMAScript standards can be used without problems, as you don't have to wait for all your users to update their browsers - you are in charge of deciding which ECMAScript version to use by changing the Node.js version, and you can also enable specific experimental features by running Node.js with flags.</p>\n<h2>A Vast Number of Libraries</h2>\n<p>npm with its simple structure helped the ecosystem of Node.js proliferate, and now the npm registry hosts over 1,000,000 open source packages you can freely use.</p>\n<h2>An Example Node.js Application</h2>\n<p>The most common example Hello World of Node.js is a web server:</p>\n<iframe\n  title=\"Hello world web server\"\n  src=\"https://glitch.com/embed/#!/embed/nodejs-dev-0001-01?path=server.js&previewSize=30&attributionHidden=true&sidebarCollapsed=true\"\n  alt=\"nodejs-dev-0001-01 on Glitch\"\n  style=\"height: 400px; width: 100%; border: 0;\">\n</iframe>\n<!--```js\nconst http = require('http')\n\nconst hostname = '127.0.0.1'\nconst port = 3000\n\nconst server = http.createServer((req, res) => {\n  res.statusCode = 200\n  res.setHeader('Content-Type', 'text/plain')\n  res.end('Hello World\\n')\n})\n\nserver.listen(port, hostname, () => {\n  console.log(`Server running at http://${hostname}:${port}/`)\n})\n```\n\nTo run this snippet, save it as a `server.js` file and run `node server.js` in your terminal.-->\n<p>This code first includes the Node.js <a href=\"https://nodejs.org/api/http.html\"><code>http</code> module</a>.</p>\n<p>Node.js has a fantastic <a href=\"https://nodejs.org/api/\">standard library</a>, including first-class support for networking.</p>\n<p>The <code>createServer()</code> method of <code>http</code> creates a new HTTP server and returns it.</p>\n<p>The server is set to listen on the specified port and host name. When the server is ready, the callback function is called, in this case informing us that the server is running.</p>\n<p>Whenever a new request is received, the <a href=\"https://nodejs.org/api/http.html#http_event_request\"><code>request</code> event</a> is called, providing two objects: a request (an <a href=\"https://nodejs.org/api/http.html#http_class_http_incomingmessage\"><code>http.IncomingMessage</code></a> object) and a response (an <a href=\"https://nodejs.org/api/http.html#http_class_http_serverresponse\"><code>http.ServerResponse</code></a> object).</p>\n<p>Those 2 objects are essential to handle the HTTP call.</p>\n<p>The first provides the request details. In this simple example, this is not used, but you could access the request headers and request data.</p>\n<p>The second is used to return data to the caller.</p>\n<p>In this case with:</p>\n<pre><code class=\"language-js\">res.statusCode = 200;\n</code></pre>\n<p>we set the statusCode property to 200, to indicate a successful response.</p>\n<p>We set the Content-Type header:</p>\n<pre><code class=\"language-js\">res.setHeader('Content-Type', 'text/plain');\n</code></pre>\n<p>and we close the response, adding the content as an argument to <code>end()</code>:</p>\n<pre><code class=\"language-js\">res.end('Hello World\\n');\n</code></pre>\n<h2>Node.js Frameworks and Tools</h2>\n<p>Node.js is a low-level platform. In order to make things easy and exciting for developers, thousands of libraries were built upon Node.js by the community.</p>\n<p>Many of those established over time as popular options. Here is a non-comprehensive list of the ones worth learning:</p>\n<ul>\n<li><a href=\"https://adonisjs.com/\"><strong>AdonisJs</strong></a>: A full-stack framework highly focused on developer ergonomics, stability, and confidence. Adonis is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"https://expressjs.com/\"><strong>Express</strong></a>: It provides one of the most simple yet powerful ways to create a web server. Its minimalist approach, unopinionated, focused on the core features of a server, is key to its success.</li>\n<li><a href=\"https://fastify.io/\"><strong>Fastify</strong></a>: A web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. Fastify is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"https://www.gatsbyjs.com/\"><strong>Gatsby</strong></a>: A <a href=\"https://reactjs.org/\">React</a>-based, <a href=\"https://graphql.org/\">GraphQL</a> powered, static site generator with a very rich ecosystem of plugins and starters.</li>\n<li><a href=\"https://hapijs.com\"><strong>hapi</strong></a>: A rich framework for building applications and services that enables developers to focus on writing reusable application logic instead of spending time building infrastructure.</li>\n<li><a href=\"http://koajs.com/\"><strong>koa</strong></a>: It is built by the same team behind Express, aims to be even simpler and smaller, building on top of years of knowledge. The new project born out of the need to create incompatible changes without disrupting the existing community.</li>\n<li><a href=\"https://loopback.io/\"><strong>Loopback.io</strong></a>: Makes it easy to build modern applications that require complex integrations.</li>\n<li><a href=\"https://meteor.com\"><strong>Meteor</strong></a>: An incredibly powerful full-stack framework, powering you with an isomorphic approach to building apps with JavaScript, sharing code on the client and the server. Once an off-the-shelf tool that provided everything, now integrates with frontend libs <a href=\"https://reactjs.org/\">React</a>, <a href=\"https://vuejs.org/\">Vue</a>, and <a href=\"https://angular.io\">Angular</a>. Can be used to create mobile apps as well.</li>\n<li><a href=\"https://github.com/zeit/micro\"><strong>Micro</strong></a>: It provides a very lightweight server to create asynchronous HTTP microservices.</li>\n<li><a href=\"https://nestjs.com/\"><strong>NestJS</strong></a>: A TypeScript based progressive Node.js framework for building enterprise-grade efficient, reliable and scalable server-side applications.</li>\n<li><a href=\"https://nextjs.org/\"><strong>Next.js</strong></a>: <a href=\"https://reactjs.org\">React</a> framework that gives you the best developer experience with all the features you need for production: hybrid static &#x26; server rendering, TypeScript support, smart bundling, route pre-fetching, and more.</li>\n<li><a href=\"https://nx.dev/\"><strong>Nx</strong></a>: A toolkit for full-stack monorepo development using NestJS, Express, <a href=\"https://reactjs.org/\">React</a>, <a href=\"https://angular.io\">Angular</a>, and more! Nx helps scale your development from one team building one application to many teams collaborating on multiple applications!</li>\n<li><a href=\"https://sapper.svelte.dev/\"><strong>Sapper</strong></a>: Sapper is a framework for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing. Offers SSR and more!</li>\n<li><a href=\"https://socket.io/\"><strong>Socket.io</strong></a>: A real-time communication engine to build network applications.</li>\n<li><a href=\"https://strapi.io/\"><strong>Strapi</strong></a>: Strapi is a flexible, open-source Headless CMS that gives developers the freedom to choose their favorite tools and frameworks while also allowing editors to easily manage and distribute their content. By making the admin panel and API extensible through a plugin system, Strapi enables the world's largest companies to accelerate content delivery while building beautiful digital experiences.</li>\n</ul>"},{"url":"/docs/articles/nextjs/","relativePath":"docs/articles/nextjs.md","relativeDir":"docs/articles","base":"nextjs.md","name":"nextjs","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"With some basic React and JavaScript knowledge, you’ll be on your wayNext.js is a JavaScript framework created by Zeit. It lets you build server-side rendering and static web applications using React. It’s a great tool to build your next website. It has many great features and advantages.","seo":{"title":"","description":"NextJS is a JavaScript framework. It lets you build server-side rendering and static web applications using React. It’s a great tool to build your next website. It has many great features and advantages, which can make Nextjs your first option for building your next web application.","robots":[],"extra":[]},"template":"docs"},"html":"<h2># Nextjs for everyone — with some basic knowledge of React</h2>\n<blockquote>\n<h2>Excerpt</h2>\n<p>With some basic React and JavaScript knowledge, you’ll be on your wayNext.js is a JavaScript framework created by Zeit. It lets you build server-side rendering and static web applications using React. It’s a great tool to build your next website. It has many great features and advantages,</p>\n</blockquote>\n<hr>\n<h4>With some basic React and JavaScript knowledge, you’ll be on your way</h4>\n<p><strong>Next.js</strong> is a JavaScript framework created by <a href=\"https://zeit.co/\">Zeit</a>. It lets you build server-side rendering and static web applications using React. It’s a great tool to build your next website. It has many great features and advantages, which can make Nextjs your first option for building your next web application.</p>\n<p>You don’t need any configuration of webpack or similar to start using Next.js. It comes with its configuration. All you need is to run <code>npm run dev</code> and start building your application ?.</p>\n<p>In this article, we are going to explore the great features and tricks of Next.js, and how to start building your next website with it.</p>\n<p><strong>This post assumes that you have some basic knowledge of React and JavaScript.</strong></p>\n<p>Here are some great websites built with Next.js:</p>\n<ul>\n<li><a href=\"https://syntax.fm/\">Syntaxt.fm</a></li>\n<li><a href=\"https://www.npmjs.com/\">npmjs</a></li>\n<li><a href=\"https://material-ui.com/\">material-ui.io</a></li>\n<li><a href=\"https://expo.io/\">expo.io</a></li>\n<li><a href=\"https://www.codementor.io/\">codemenitor.io</a></li>\n</ul>\n<p>I even used Nextjs to build my personal website <a href=\"https://www.saidhayani.me/\">saidhayani.me</a> — you can get the source code on GitHub <a href=\"https://github.com/hayanisaid/said-hayani-nextjs\">here</a>.</p>\n<h3>Getting starting with Next.js</h3>\n<p>To start with Next.js you need to have node.js installed in your machine and that’s all. Next.js is like any other node.js application — you need npm or Yarn to install dependencies.</p>\n<p>Let’s get started and create a Next.js project.</p>\n<p>First, we need to create a folder and give it a name of our choice. I’m gonna name it <code>nextjs-app</code>.</p>\n<p>You can easily do that with this command line:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*k8DzCXqZwRaY64Bhli5-yQ.png\"></p>\n<pre><code>mkdir nextjs-app\n</code></pre>\n<p>After creating the nextjs-app folder, open it on the terminal. Run <code>npm init</code> to create the <code>package.json</code> file.</p>\n<p>Next, we have to install our dependencies.</p>\n<p>Installing Next.js</p>\n<ul>\n<li>using Yarn, type</li>\n</ul>\n<pre><code>yarn add next\n</code></pre>\n<ul>\n<li>using npm, type:</li>\n</ul>\n<pre><code>npm i next --save\n</code></pre>\n<p>Then we have to install React because Next.js uses React. The first line below uses Yarn for the installation.</p>\n<pre><code>yarn add react react-dom\n</code></pre>\n<pre><code>// with npm\n</code></pre>\n<pre><code>npm i react react-dom --save\n</code></pre>\n<p>After that you have to create two necessary folders: <code>pages</code> and <code>static</code> . Next.js won’t work without them!!</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*s3N5eZcSSSgRdBiaMQeCRA.png\"></p>\n<pre><code>mkdir pages static\n</code></pre>\n<p>You <strong>must</strong> have this structure after running these commands :</p>\n<pre><code>nextjs-app  -pages  -static  -package.json\n</code></pre>\n<p>And then simply you can run <code>npm next dev</code> and then open <code>[http://localhost:3000/](http://localhost:3000/)</code> in your browser.</p>\n<p>The <code>NotFound</code> page will show up because we don't have any page yet!</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*Hv_4BaqTnrlriZ8Q3zk5ZQ.png\"></p>\n<p>So let’s create a <code>home</code> page and an entry point <code>index.js</code>.</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*IwZ5Ahr9egJ8KHF5HnLfHQ.png\"></p>\n<pre><code>touch index.js home.js\n</code></pre>\n<p>And then you can write a normal React component. As I said above, Next.js is for building React applications.</p>\n<p>Here is what our <code>home.js</code> looks like:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*He5fQw-VgeY5Gjo2RFGckw.png\"></p>\n<p>And here is our <code>index.js</code> file:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*AgGKp-WdRTwb3bOuqljcug.png\"></p>\n<p>Next.js has a live reload feature. All you need to do is just change and save, and Next.js will compile and reload the app automatically for you.</p>\n<p><strong>Note</strong>: Next.js is like any other server-side rendering tool we need to define the default page of our application, in our case is <code>index.js</code>.</p>\n<p>You will see this change in the browser after running <code>npm next dev</code>:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*QuQK1J5P0Rc4S-0BhllNmg.png\"></p>\n<p>Congratulations! We just created a Next.js app with a few simple steps. These instructions to create a Next.js app are described in the <a href=\"https://nextjs.org/learn/basics/getting-started/first-page\">official docs of Next.js</a> .</p>\n<h4>My alternative</h4>\n<p>I usually don’t use this way. I use the <a href=\"http://import%20react%20from/\">create-next-app</a> CLI instead that will do all this stuff for me in one single line.</p>\n<pre><code>npx create-next-app my-app\n</code></pre>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*W5KCIFWP7yMHI-zaeVcmPA.png\"></p>\n<p>You can check out the documentation <a href=\"https://github.com/segmentio/create-next-app\">here</a> to explore more features.</p>\n<h3>Create custom configs for Next.js</h3>\n<p>Sometimes you might want to add some additional dependencies or packages to your Next.js app.</p>\n<p>Next.js gives you the option to customize your configuration using a <code>next-config.js</code> file.</p>\n<p>For example, you might want to add sass support to your app. In this case you have to use the <a href=\"https://github.com/zeit/next-plugins/tree/master/packages/next-sass\">next-sass</a> package <strong>and</strong> you have to add it to the <code>next-config.js</code> file as in the example below:</p>\n<p>First, install <code>next-sass</code>:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*5XSEx8DH0851FNzMxDx5LQ.png\"></p>\n<pre><code>yarn add @zeit/next-sass\n</code></pre>\n<p>Then include it inside the <code>next-config.js</code> file:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*YN_aoR5dzlnMyG2xVHJcww.png\"></p>\n<p>And then you can create write your sass code and import it in your component:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*kde4wjR-EpoNHc1c4JTb8g.png\"></p>\n<p>Importing the sass file in our component:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*yv1cTBXPeONqaV-CS1OZ2A.png\"></p>\n<p>And here is the result:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*VYfSkK1fIZKu75-2P8s4Bw.png\"></p>\n<p>Wow, wasn’t that <strong>super easy</strong> to add sass support to out Next.js app?</p>\n<p>At this point, we just covered the installation and configuration part. Now let’s talk about the features of Next.js!</p>\n<h3>The features</h3>\n<p>Next.js comes with a bunch of great features like server-side rendering, routers, and lazy loading.</p>\n<h4>Server-side rendering</h4>\n<p>Next.js performs server-side rendering by default. This makes your application optimized for search engines. Also, you can integrate any middleware such as <a href=\"https://expressjs.com/\">express.js</a> or <a href=\"https://hapijs.com/\">Hapi.js</a>, and you can run any database such as MongoDB or MySQL.</p>\n<p>Speaking of search engine optimization, Next.js comes with a <code>Head</code> component that allows you to add and make dynamic meta tags. It’s my favorite feature — you can make custom and dynamic meta tags. These make your website able to be indexed by search engines like Google. Here is an example of a <code>Head</code> component :</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*mnIJGBgF59r1YjX5jXu8IA.png\"></p>\n<p>And you can import and use the<code>Head</code> component in any other page:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*liF5bNPAQ_j7gA9funSGTg.png\"></p>\n<p>Awesome!</p>\n<p><strong>Note</strong>: With Next.js you <strong>don’t</strong> need to import React because Next.js does this for you.</p>\n<h4>Generating a static website with Next.js</h4>\n<p>As well as server-side rendering, you still can compile and export your application as an HTML static website and deploy it on a static website hosting like a GitHub page or <a href=\"https://www.netlify.com/\">netlify</a>. You can learn more how to make a static website with Next.js <a href=\"https://nextjs.org/learn/excel/static-html-export/setup\">here in the official docs</a>.</p>\n<h4>Routers</h4>\n<p>This is another one of the great features of Next.js. When you use the <a href=\"https://github.com/facebook/create-react-app\">create-react-app</a>, you usually need to install <a href=\"https://github.com/ReactTraining/react-router\">react-router</a> and create its custom configuration.</p>\n<p>Next.js comes with its own routers with zero configs. You don’t need any extra configuration of your routers. Just create your page inside the <code>pages</code> folder and Next.js will take care of all routing configuration.</p>\n<p>Let’s go ahead and create a custom navigation to make everything clear!</p>\n<p>To navigate between pages, Next.js has the <code>Link</code> method to manage the navigation.</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*D54h6wnKX9fCS0AU34tVLA.png\"></p>\n<p>Let’s create <code>blog.js</code> and <code>contact.js</code> pages:</p>\n<p><code>blog.js</code></p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*f6_vaaPs1Okfj8vZ9Fhk8g.png\"></p>\n<p>And here is the <code>contact.js</code> page:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*5lWCDzAUWed2NlsGpTC5EQ.png\"></p>\n<p>And now we must be able to navigate between those pages ?</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*7WYZeRb92PAwqthLo0xqHg.gif\"></p>\n<p>Wow that so easy and super awesome.</p>\n<h4>Lazy loading</h4>\n<p>Lazy loading makes your application deliver a better user experience. Sometimes the page might take time to load. The user may abandon your app if the loading takes more than 30 seconds.</p>\n<p>The way to avoid this is to use some trick to indicate to the user that the page is loading, for example by displaying a spinner. Lazy loading or code splitting is one of the features that allow you to deal with, and control, slow loading so you only load the necessary code in your page.</p>\n<p>Next.js comes with its own code splitting method. It provides us a method, called <code>dynamic</code>, to load our component, as in the example below:</p>\n<p><img src=\"https://cdn-media-1.freecodecamp.org/images/1*Ib835M7Ih-RY1kRBOUnXFA.png\"></p>\n<p>You can find the source code of these examples on <a href=\"https://github.com/hayanisaid/nextjs-intro-example\">GitHub</a></p>"},{"url":"/docs/articles/node-cli-args/","relativePath":"docs/articles/node-cli-args.md","relativeDir":"docs/articles","base":"node-cli-args.md","name":"node-cli-args","frontmatter":{"title":"where-is-npm-pack","weight":0,"excerpt":"How to find out where npm installs the packages","seo":{"title":"npm packages","description":"When you install a package using npm you can perform 2 types of installation:\na local install\na global install\n\nBy default, when you type an npm install command, like:\nthe package is installed in the current file tree, under the node_modules subfolder.\n","robots":[],"extra":[{"name":"og:description","value":"When you install a package using npm you can perform 2 types of installation:\na local install\na global install\n\nBy default, when you type an npm install command, like:\nthe package is installed in the current file tree, under the node_modules subfolder.\n","keyName":"property","relativeUrl":false}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>When you install a package using npm you can perform 2 types of installation:</p>\n<ul>\n<li>a local install</li>\n<li>a global install</li>\n</ul>\n<p>By default, when you type an npm install command, like:</p>\n<p>the package is installed in the current file tree, under the node_modules subfolder.</p>\n<p>As this happens, npm also adds the lodash entry in the dependencies property of the package.json file present in the current folder.</p>\n<p>A global installation is performed using the -g flag:</p>\n<p>When this happens, npm won't install the package under the local folder, but instead, it will use a global location.</p>\n<p>Where, exactly?</p>\n<p>The npm root -g command will tell you where that exact location is on your machine.</p>\n<p>On macOS or Linux this location could be /usr/local/lib/node<em>modules. On Windows it could be C:\\Users\\YOU\\AppData\\Roaming\\npm\\node</em>modules</p>\n<p>If you use nvm to manage Node.js versions, however, that location would differ.</p>\n<p>I for example use nvm and my packages location was shown as /Users/joe/.nvm/versions/node/v8.9.0/lib/node_modules.</p>"},{"url":"/docs/articles/how-search-engines-work/","relativePath":"docs/articles/how-search-engines-work.md","relativeDir":"docs/articles","base":"how-search-engines-work.md","name":"how-search-engines-work","frontmatter":{"title":"The Anatomy of a Search Engine","sections":[],"seo":{"title":"","description":"hardware performance and cost have improved dramatically to partially offset the difficulty. There are, however, several notable exceptions to this progress such as disk seek time and operating system robustness. In designing Google, we have considered both the rate of growth of the Web and technological changes. Google is designed to scale well to extremely large data sets. It makes efficient use of storage space to store the index. Its data structures are optimized for fast and efficient access (see section 4.2). Further, we expect that the cost to index and store text or HTML will eventually decline relative to the amount that will be available (see Appendix B). This will result in favorable scaling properties for centralized systems like Google.","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>The Anatomy of a Search Engine</h1>\n<blockquote>\n<h2>Excerpt</h2>\n<p>These tasks are becoming increasingly difficult as the Web grows. However,\nhardware performance and cost have improved dramatically to partially offset\nthe difficulty. There are, however, several notable exceptions to this\nprogress such as disk seek time and operating system robustness. In designing\nGoogle, we have considered both the rate of growth of the Web and technological\nchanges. Google is designed to scale well to extremely large data sets.\nIt makes efficient use of storage space to store the index. Its data structures\nare optimized for fast and efficient access (see section 4.2).\nFurther, we expect that the cost to index and store text or HTML will eventually\ndecline relative to the amount that will be available (see Appendix\nB). This will result in favorable scaling properties for centralized\nsystems like Google.</p>\n</blockquote>\n<hr>\n<p><strong>Sergey Brin and Lawrence Page</strong></p>\n<p>{sergey, page}@cs.stanford.edu</p>\n<p>Computer Science Department, Stanford University, Stanford, CA 94305</p>\n<h3>Abstract</h3>\n<blockquote>\n<pre><code>   In this paper, we present Google, a prototype of a large-scale search engine which makes heavy use of the structure present in hypertext. Google is designed to crawl and index the Web efficiently and produce much more satisfying search results than existing systems. The prototype with a full text and hyperlink database of at least 24 million pages is available at [http://google.stanford.edu/](http://google.stanford.edu/)  \n   To engineer a search engine is a challenging task. Search engines index tens to hundreds of millions of web pages involving a comparable number of distinct terms. They answer tens of millions of queries every day. Despite the importance of large-scale search engines on the web, very little academic research has been done on them. Furthermore, due to rapid advance in technology and web proliferation, creating a web search engine today is very different from three years ago. This paper provides an in-depth description of our large-scale web search engine -- the first such detailed public description we know of to date.  \n   Apart from the problems of scaling traditional search techniques to data of this magnitude, there are new technical challenges involved with using the additional information present in hypertext to produce better search results. This paper addresses this question of how to build a practical large-scale system which can exploit the additional information present in hypertext. Also we look at the problem of how to effectively deal with uncontrolled hypertext collections where anyone can publish anything they want.\n</code></pre>\n<p> <strong>Keywords</strong>: World Wide Web, Search Engines, Information Retrieval, PageRank, Google</p>\n</blockquote>\n<h2>1. Introduction</h2>\n<p><em>(Note: There are two versions of this paper -- a longer full version and a shorter printed version. The full version is available on the web and the conference CD-ROM.)</em><br>\nThe web creates new challenges for information retrieval. The amount of information on the web is growing rapidly, as well as the number of new users inexperienced in the art of web research. People are likely to surf the web using its link graph, often starting with high quality human maintained indices such as <a href=\"http://www.yahoo.com/\">Yahoo!</a> or with search engines. Human maintained lists cover popular topics effectively but are subjective, expensive to build and maintain, slow to improve, and cannot cover all esoteric topics. Automated search engines that rely on keyword matching usually return too many low quality matches. To make matters worse, some advertisers attempt to gain people's attention by taking measures meant to mislead automated search engines. We have built a large-scale search engine which addresses many of the problems of existing systems. It makes especially heavy use of the additional structure present in hypertext to provide much higher quality search results. We chose our system name, Google, because it is a common spelling of googol, or 10100 and fits well with our goal of building very large-scale search engines.</p>\n<h3>1.1 Web Search Engines -- Scaling Up: 1994 - 2000</h3>\n<p>Search engine technology has had to scale dramatically to keep up with the growth of the web. In 1994, one of the first web search engines, the World Wide Web Worm (WWWW) <a href=\"http://www.cs.colorado.edu/home/mcbryan/mypapers/www94.ps\">[McBryan 94]</a> had an index of 110,000 web pages and web accessible documents. As of November, 1997, the top search engines claim to index from 2 million (WebCrawler) to 100 million web documents (from <a href=\"http://www.searchenginewatch.com/\">Search Engine Watch)</a>. It is foreseeable that by the year 2000, a comprehensive index of the Web will contain over a billion documents. At the same time, the number of queries search engines handle has grown incredibly too. In March and April 1994, the World Wide Web Worm received an average of about 1500 queries per day. In November 1997, Altavista claimed it handled roughly 20 million queries per day. With the increasing number of users on the web, and automated systems which query search engines, it is likely that top search engines will handle hundreds of millions of queries per day by the year 2000. The goal of our system is to address many of the problems, both in quality and scalability, introduced by scaling search engine technology to such extraordinary numbers.</p>\n<h3>1.2. Google: Scaling with the Web</h3>\n<p>Creating a search engine which scales even to today's web presents many challenges. Fast crawling technology is needed to gather the web documents and keep them up to date. Storage space must be used efficiently to store indices and, optionally, the documents themselves. The indexing system must process hundreds of gigabytes of data efficiently. Queries must be handled quickly, at a rate of hundreds to thousands per second.</p>\n<p>These tasks are becoming increasingly difficult as the Web grows. However, hardware performance and cost have improved dramatically to partially offset the difficulty. There are, however, several notable exceptions to this progress such as disk seek time and operating system robustness. In designing Google, we have considered both the rate of growth of the Web and technological changes. Google is designed to scale well to extremely large data sets. It makes efficient use of storage space to store the index. Its data structures are optimized for fast and efficient access (see section <a href=\"http://infolab.stanford.edu/~backrub/google.html#data\">4.2</a>). Further, we expect that the cost to index and store text or HTML will eventually decline relative to the amount that will be available (see <a href=\"http://infolab.stanford.edu/~backrub/google.html#b\">Appendix B</a>). This will result in favorable scaling properties for centralized systems like Google.</p>\n<h3>1.3 Design Goals</h3>\n<h4>1.3.1 Improved Search Quality</h4>\n<p>Our main goal is to improve the quality of web search engines. In 1994, some people believed that a complete search index would make it possible to find anything easily. According to <a href=\"http://botw.org/1994/awards/navigators.html\">Best of the Web 1994 -- Navigators,</a>  \"The best navigation service should make it easy to find almost anything on the Web (once all the data is entered).\"  However, the Web of 1997 is quite different. Anyone who has used a search engine recently, can readily testify that the completeness of the index is not the only factor in the quality of search results. \"Junk results\" often wash out any results that a user is interested in. In fact, as of November 1997, only one of the top four commercial search engines finds itself (returns its own search page in response to its name in the top ten results). One of the main causes of this problem is that the number of documents in the indices has been increasing by many orders of magnitude, but the user's ability to look at documents has not. People are still only willing to look at the first few tens of results. Because of this, as the collection size grows, we need tools that have very high precision (number of relevant documents returned, say in the top tens of results). Indeed, we want our notion of \"relevant\" to only include the very best documents since there may be tens of thousands of slightly relevant documents. This very high precision is important even at the expense of recall (the total number of relevant documents the system is able to return). There is quite a bit of recent optimism that the use of more hypertextual information can help improve search and other applications [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Marchiori 97</a>] [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Spertus 97</a>] [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Weiss 96</a>] [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Kleinberg 98</a>]. In particular, link structure [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Page 98</a>] and link text provide a lot of information for making relevance judgments and quality filtering. Google makes use of both link structure and anchor text (see Sections <a href=\"http://infolab.stanford.edu/~backrub/google.html#pr\">2.1</a> and <a href=\"http://infolab.stanford.edu/~backrub/google.html#anchor\">2.2</a>).</p>\n<h4>1.3.2 Academic Search Engine Research</h4>\n<p>Aside from tremendous growth, the Web has also become increasingly commercial over time. In 1993, 1.5% of web servers were on .com domains. This number grew to over 60% in 1997. At the same time, search engines have migrated from the academic domain to the commercial. Up until now most search engine development has gone on at companies with little publication of technical details. This causes search engine technology to remain largely a black art and to be advertising oriented (see <a href=\"http://infolab.stanford.edu/~backrub/google.html#a\">Appendix A</a>). With Google, we have a strong goal to push more development and understanding into the academic realm.</p>\n<p>Another important design goal was to build systems that reasonable numbers of people can actually use. Usage was important to us because we think some of the most interesting research will involve leveraging the vast amount of usage data that is available from modern web systems. For example, there are many tens of millions of searches performed every day. However, it is very difficult to get this data, mainly because it is considered commercially valuable.</p>\n<p>Our final design goal was to build an architecture that can support novel research activities on large-scale web data. To support novel research uses, Google stores all of the actual documents it crawls in compressed form. One of our main goals in designing Google was to set up an environment where other researchers can come in quickly, process large chunks of the web, and produce interesting results that would have been very difficult to produce otherwise. In the short time the system has been up, there have already been several papers using databases generated by Google, and many others are underway. Another goal we have is to set up a Spacelab-like environment where researchers or even students can propose and do interesting experiments on our large-scale web data.</p>\n<h2>2. System Features</h2>\n<p>The Google search engine has two important features that help it produce high precision results. First, it makes use of the link structure of the Web to calculate a quality ranking for each web page. This ranking is called PageRank and is described in detail in [Page 98]. Second, Google utilizes link to improve search results.</p>\n<h3>2.1 PageRank: Bringing Order to the Web</h3>\n<p>The citation (link) graph of the web is an important resource that has largely gone unused in existing web search engines. We have created maps containing as many as 518 million of these hyperlinks, a significant sample of the total. These maps allow rapid calculation of a web page's \"PageRank\", an objective measure of its citation importance that corresponds well with people's subjective idea of importance. Because of this correspondence, PageRank is an excellent way to prioritize the results of web keyword searches. For most popular subjects, a simple text matching search that is restricted to web page titles performs admirably when PageRank prioritizes the results (demo available at <a href=\"http://google.stanford.edu/\">google.stanford.edu</a>). For the type of full text searches in the main Google system, PageRank also helps a great deal.</p>\n<h4>2.1.1 Description of PageRank Calculation</h4>\n<p>Academic citation literature has been applied to the web, largely by counting citations or backlinks to a given page. This gives some approximation of a page's importance or quality. PageRank extends this idea by not counting links from all pages equally, and by normalizing by the number of links on a page. PageRank is defined as follows:</p>\n<blockquote>\n<p><em>We assume page A has pages T1...Tn which point to it (i.e., are citations). The parameter d is a damping factor which can be set between 0 and 1. We usually set d to 0.85. There are more details about d in the next section. Also C(A) is defined as the number of links going out of page A. The PageRank of a page A is given as follows:</em></p>\n<p><em>PR(A) = (1-d) + d (PR(T1)/C(T1) + ... + PR(Tn)/C(Tn))</em></p>\n<p><em>Note that the PageRanks form a probability distribution over web pages, so the sum of all web pages' PageRanks will be one.</em></p>\n</blockquote>\n<p>PageRank or <em>PR(A)</em> can be calculated using a simple iterative algorithm, and corresponds to the principal eigenvector of the normalized link matrix of the web. Also, a PageRank for 26 million web pages can be computed in a few hours on a medium size workstation. There are many other details which are beyond the scope of this paper.</p>\n<h4>2.1.2 Intuitive Justification</h4>\n<p>PageRank can be thought of as a model of user behavior. We assume there is a \"random surfer\" who is given a web page at random and keeps clicking on links, never hitting \"back\" but eventually gets bored and starts on another random page. The probability that the random surfer visits a page is its PageRank. And, the <em>d</em> damping factor is the probability at each page the \"random surfer\" will get bored and request another random page. One important variation is to only add the damping factor <em>d</em> to a single page, or a group of pages. This allows for personalization and can make it nearly impossible to deliberately mislead the system in order to get a higher ranking. We have several other extensions to PageRank, again see [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Page 98</a>].</p>\n<p>Another intuitive justification is that a page can have a high PageRank if there are many pages that point to it, or if there are some pages that point to it and have a high PageRank. Intuitively, pages that are well cited from many places around the web are worth looking at. Also, pages that have perhaps only one citation from something like the <a href=\"http://www.yahoo.com/\">Yahoo!</a> homepage are also generally worth looking at. If a page was not high quality, or was a broken link, it is quite likely that Yahoo's homepage would not link to it. PageRank handles both these cases and everything in between by recursively propagating weights through the link structure of the web.</p>\n<h3>2.2 Anchor Text</h3>\n<p>The text of links is treated in a special way in our search engine. Most search engines associate the text of a link with the page that the link is on. In addition, we associate it with the page the link points to. This has several advantages. First, anchors often provide more accurate descriptions of web pages than the pages themselves. Second, anchors may exist for documents which cannot be indexed by a text-based search engine, such as images, programs, and databases. This makes it possible to return web pages which have not actually been crawled. Note that pages that have not been crawled can cause problems, since they are never checked for validity before being returned to the user. In this case, the search engine can even return a page that never actually existed, but had hyperlinks pointing to it. However, it is possible to sort the results, so that this particular problem rarely happens.</p>\n<p>This idea of propagating anchor text to the page it refers to was implemented in the World Wide Web Worm [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">McBryan 94</a>] especially because it helps search non-text information, and expands the search coverage with fewer downloaded documents. We use anchor propagation mostly because anchor text can help provide better quality results. Using anchor text efficiently is technically difficult because of the large amounts of data which must be processed. In our current crawl of 24 million pages, we had over 259 million anchors which we indexed.</p>\n<h3>2.3 Other Features</h3>\n<p>Aside from PageRank and the use of anchor text, Google has several other features. First, it has location information for all hits and so it makes extensive use of proximity in search. Second, Google keeps track of some visual presentation details such as font size of words. Words in a larger or bolder font are weighted higher than other words. Third, full raw HTML of pages is available in a repository.</p>\n<h2>3 Related Work</h2>\n<p>Search research on the web has a short and concise history. The World Wide Web Worm (WWWW) <a href=\"http://www.cs.colorado.edu/home/mcbryan/mypapers/www94.ps\">[McBryan 94]</a> was one of the first web search engines. It was subsequently followed by several other academic search engines, many of which are now public companies. Compared to the growth of the Web and the importance of search engines there are precious few documents about recent search engines [<a href=\"http://info.webcrawler.com/bp/WWW94.html\">Pinkerton 94</a>]. According to Michael Mauldin (chief scientist, Lycos Inc) <a href=\"http://www.computer.org/pubs/expert/1997/trends/x1008/mauldin.htm\">[Mauldin]</a>, \"the various services (including Lycos) closely guard the details of these databases\". However, there has been a fair amount of work on specific features of search engines. Especially well represented is work which can get results by post-processing the results of existing commercial search engines, or produce small scale \"individualized\" search engines. Finally, there has been a lot of research on information retrieval systems, especially on well controlled collections. In the next two sections, we discuss some areas where this research needs to be extended to work better on the web.</p>\n<h3>3.1 Information Retrieval</h3>\n<p>Work in information retrieval systems goes back many years and is well developed [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Witten 94</a>]. However, most of the research on information retrieval systems is on small well controlled homogeneous collections such as collections of scientific papers or news stories on a related topic. Indeed, the primary benchmark for information retrieval, the Text Retrieval Conference [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">TREC 96</a>], uses a fairly small, well controlled collection for their benchmarks. The \"Very Large Corpus\" benchmark is only 20GB compared to the 147GB from our crawl of 24 million web pages. Things that work well on TREC often do not produce good results on the web. For example, the standard vector space model tries to return the document that most closely approximates the query, given that both query and document are vectors defined by their word occurrence. On the web, this strategy often returns very short documents that are the query plus a few words. For example, we have seen a major search engine return a page containing only \"Bill Clinton Sucks\" and picture from a \"Bill Clinton\" query. Some argue that on the web, users should specify more accurately what they want and add more words to their query. We disagree vehemently with this position. If a user issues a query like \"Bill Clinton\" they should get reasonable results since there is a enormous amount of high quality information available on this topic. Given examples like these, we believe that the standard information retrieval work needs to be extended to deal effectively with the web.</p>\n<h3>3.2 Differences Between the Web and Well Controlled Collections</h3>\n<p>The web is a vast collection of completely uncontrolled heterogeneous documents. Documents on the web have extreme variation internal to the documents, and also in the external meta information that might be available. For example, documents differ internally in their language (both human and programming), vocabulary (email addresses, links, zip codes, phone numbers, product numbers), type or format (text, HTML, PDF, images, sounds), and may even be machine generated (log files or output from a database). On the other hand, we define external meta information as information that can be inferred about a document, but is not contained within it. Examples of external meta information include things like reputation of the source, update frequency, quality, popularity or usage, and citations. Not only are the possible sources of external meta information varied, but the things that are being measured vary many orders of magnitude as well. For example, compare the usage information from a major homepage, like Yahoo's which currently receives millions of page views every day with an obscure historical article which might receive one view every ten years. Clearly, these two items must be treated very differently by a search engine.</p>\n<p>Another big difference between the web and traditional well controlled collections is that there is virtually no control over what people can put on the web. Couple this flexibility to publish anything with the enormous influence of search engines to route traffic and companies which deliberately manipulating search engines for profit become a serious problem. This problem that has not been addressed in traditional closed information retrieval systems. Also, it is interesting to note that metadata efforts have largely failed with web search engines, because any text on the page which is not directly represented to the user is abused to manipulate search engines. There are even numerous companies which specialize in manipulating search engines for profit.</p>\n<h2>4 System Anatomy</h2>\n<p>First, we will provide a high level discussion of the architecture. Then, there is some in-depth descriptions of important data structures. Finally, the major applications: crawling, indexing, and searching will be examined in depth.</p>\n<p><img src=\"http://infolab.stanford.edu/~backrub/over.gif\"></p>\n<p>Figure 1. High Level Google Architecture</p>\n<h3>4.1 Google Architecture Overview</h3>\n<p>In this section, we will give a high level overview of how the whole system works as pictured in Figure 1. Further sections will discuss the applications and data structures not mentioned in this section. Most of Google is implemented in C or C++ for efficiency and can run in either Solaris or Linux.</p>\n<p>In Google, the web crawling (downloading of web pages) is done by several distributed crawlers. There is a URLserver that sends lists of URLs to be fetched to the crawlers. The web pages that are fetched are then sent to the storeserver. The storeserver then compresses and stores the web pages into a repository. Every web page has an associated ID number called a docID which is assigned whenever a new URL is parsed out of a web page. The indexing function is performed by the indexer and the sorter. The indexer performs a number of functions. It reads the repository, uncompresses the documents, and parses them. Each document is converted into a set of word occurrences called hits. The hits record the word, position in document, an approximation of font size, and capitalization. The indexer distributes these hits into a set of \"barrels\", creating a partially sorted forward index. The indexer performs another important function. It parses out all the links in every web page and stores important information about them in an anchors file. This file contains enough information to determine where each link points from and to, and the text of the link.</p>\n<p>The URLresolver reads the anchors file and converts relative URLs into absolute URLs and in turn into docIDs. It puts the anchor text into the forward index, associated with the docID that the anchor points to. It also generates a database of links which are pairs of docIDs. The links database is used to compute PageRanks for all the documents.</p>\n<p>The sorter takes the barrels, which are sorted by docID (this is a simplification, see <a href=\"http://infolab.stanford.edu/~backrub/google.html#hits\">Section 4.2.5</a>), and resorts them by wordID to generate the inverted index. This is done in place so that little temporary space is needed for this operation. The sorter also produces a list of wordIDs and offsets into the inverted index. A program called DumpLexicon takes this list together with the lexicon produced by the indexer and generates a new lexicon to be used by the searcher. The searcher is run by a web server and uses the lexicon built by DumpLexicon together with the inverted index and the PageRanks to answer queries.</p>\n<h3>4.2 Major Data Structures</h3>\n<p>Google's data structures are optimized so that a large document collection can be crawled, indexed, and searched with little cost. Although, CPUs and bulk input output rates have improved dramatically over the years, a disk seek still requires about 10 ms to complete. Google is designed to avoid disk seeks whenever possible, and this has had a considerable influence on the design of the data structures.</p>\n<h4>4.2.1 BigFiles</h4>\n<p>BigFiles are virtual files spanning multiple file systems and are addressable by 64 bit integers. The allocation among multiple file systems is handled automatically. The BigFiles package also handles allocation and deallocation of file descriptors, since the operating systems do not provide enough for our needs. BigFiles also support rudimentary compression options.</p>\n<h4>4.2.2 Repository</h4>\n<p><img src=\"http://infolab.stanford.edu/~backrub/repos.gif\"></p>\n<p>Figure 2. Repository Data Structure</p>\n<p>The repository contains the full HTML of every web page. Each page is compressed using zlib (see <a href=\"ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html\">RFC1950</a>). The choice of compression technique is a tradeoff between speed and compression ratio. We chose zlib's speed over a significant improvement in compression offered by <a href=\"http://www.muraroa.demon.co.uk/\">bzip</a>. The compression rate of bzip was approximately 4 to 1 on the repository as compared to zlib's 3 to 1 compression. In the repository, the documents are stored one after the other and are prefixed by docID, length, and URL as can be seen in Figure 2. The repository requires no other data structures to be used in order to access it. This helps with data consistency and makes development much easier; we can rebuild all the other data structures from only the repository and a file which lists crawler errors.</p>\n<h4>4.2.3 Document Index</h4>\n<p>The document index keeps information about each document. It is a fixed width ISAM (Index sequential access mode) index, ordered by docID. The information stored in each entry includes the current document status, a pointer into the repository, a document checksum, and various statistics. If the document has been crawled, it also contains a pointer into a variable width file called docinfo which contains its URL and title. Otherwise the pointer points into the URLlist which contains just the URL. This design decision was driven by the desire to have a reasonably compact data structure, and the ability to fetch a record in one disk seek during a search</p>\n<p>Additionally, there is a file which is used to convert URLs into docIDs. It is a list of URL checksums with their corresponding docIDs and is sorted by checksum. In order to find the docID of a particular URL, the URL's checksum is computed and a binary search is performed on the checksums file to find its docID. URLs may be converted into docIDs in batch by doing a merge with this file. This is the technique the URLresolver uses to turn URLs into docIDs. This batch mode of update is crucial because otherwise we must perform one seek for every link which assuming one disk would take more than a month for our 322 million link dataset.</p>\n<h4>4.2.4 Lexicon</h4>\n<p>The lexicon has several different forms. One important change from earlier systems is that the lexicon can fit in memory for a reasonable price. In the current implementation we can keep the lexicon in memory on a machine with 256 MB of main memory. The current lexicon contains 14 million words (though some rare words were not added to the lexicon). It is implemented in two parts -- a list of the words (concatenated together but separated by nulls) and a hash table of pointers. For various functions, the list of words has some auxiliary information which is beyond the scope of this paper to explain fully.</p>\n<h4>4.2.5 Hit Lists</h4>\n<p>A hit list corresponds to a list of occurrences of a particular word in a particular document including position, font, and capitalization information. Hit lists account for most of the space used in both the forward and the inverted indices. Because of this, it is important to represent them as efficiently as possible. We considered several alternatives for encoding position, font, and capitalization -- simple encoding (a triple of integers), a compact encoding (a hand optimized allocation of bits), and Huffman coding. In the end we chose a hand optimized compact encoding since it required far less space than the simple encoding and far less bit manipulation than Huffman coding. The details of the hits are shown in Figure 3.</p>\n<p>Our compact encoding uses two bytes for every hit. There are two types of hits: fancy hits and plain hits. Fancy hits include hits occurring in a URL, title, anchor text, or meta tag. Plain hits include everything else. A plain hit consists of a capitalization bit, font size, and 12 bits of word position in a document (all positions higher than 4095 are labeled 4096). Font size is represented relative to the rest of the document using three bits (only 7 values are actually used because 111 is the flag that signals a fancy hit). A fancy hit consists of a capitalization bit, the font size set to 7 to indicate it is a fancy hit, 4 bits to encode the type of fancy hit, and 8 bits of position. For anchor hits, the 8 bits of position are split into 4 bits for position in anchor and 4 bits for a hash of the docID the anchor occurs in. This gives us some limited phrase searching as long as there are not that many anchors for a particular word. We expect to update the way that anchor hits are stored to allow for greater resolution in the position and docIDhash fields. We use font size relative to the rest of the document because when searching, you do not want to rank otherwise identical documents differently just because one of the documents is in a larger font.</p>\n<p><img src=\"http://infolab.stanford.edu/~backrub/barrels.gif\"></p>\n<p>Figure 3. Forward and Reverse Indexes and the Lexicon</p>\n<p>The length of a hit list is stored before the hits themselves. To save space, the length of the hit list is combined with the wordID in the forward index and the docID in the inverted index. This limits it to 8 and 5 bits respectively (there are some tricks which allow 8 bits to be borrowed from the wordID). If the length is longer than would fit in that many bits, an escape code is used in those bits, and the next two bytes contain the actual length.</p>\n<h4>4.2.6 Forward Index</h4>\n<p>The forward index is actually already partially sorted. It is stored in a number of barrels (we used 64). Each barrel holds a range of wordID's. If a document contains words that fall into a particular barrel, the docID is recorded into the barrel, followed by a list of wordID's with hitlists which correspond to those words. This scheme requires slightly more storage because of duplicated docIDs but the difference is very small for a reasonable number of buckets and saves considerable time and coding complexity in the final indexing phase done by the sorter. Furthermore, instead of storing actual wordID's, we store each wordID as a relative difference from the minimum wordID that falls into the barrel the wordID is in. This way, we can use just 24 bits for the wordID's in the unsorted barrels, leaving 8 bits for the hit list length.</p>\n<h4>4.2.7 Inverted Index</h4>\n<p>The inverted index consists of the same barrels as the forward index, except that they have been processed by the sorter. For every valid wordID, the lexicon contains a pointer into the barrel that wordID falls into. It points to a doclist of docID's together with their corresponding hit lists. This doclist represents all the occurrences of that word in all documents.</p>\n<p>An important issue is in what order the docID's should appear in the doclist. One simple solution is to store them sorted by docID. This allows for quick merging of different doclists for multiple word queries. Another option is to store them sorted by a ranking of the occurrence of the word in each document. This makes answering one word queries trivial and makes it likely that the answers to multiple word queries are near the start. However, merging is much more difficult. Also, this makes development much more difficult in that a change to the ranking function requires a rebuild of the index. We chose a compromise between these options, keeping two sets of inverted barrels -- one set for hit lists which include title or anchor hits and another set for all hit lists. This way, we check the first set of barrels first and if there are not enough matches within those barrels we check the larger ones.</p>\n<h3>4.3 Crawling the Web</h3>\n<p>Running a web crawler is a challenging task. There are tricky performance and reliability issues and even more importantly, there are social issues. Crawling is the most fragile application since it involves interacting with hundreds of thousands of web servers and various name servers which are all beyond the control of the system.</p>\n<p>In order to scale to hundreds of millions of web pages, Google has a fast distributed crawling system. A single URLserver serves lists of URLs to a number of crawlers (we typically ran about 3). Both the URLserver and the crawlers are implemented in Python. Each crawler keeps roughly 300 connections open at once. This is necessary to retrieve web pages at a fast enough pace. At peak speeds, the system can crawl over 100 web pages per second using four crawlers. This amounts to roughly 600K per second of data. A major performance stress is DNS lookup. Each crawler maintains a its own DNS cache so it does not need to do a DNS lookup before crawling each document. Each of the hundreds of connections can be in a number of different states: looking up DNS, connecting to host, sending request, and receiving response. These factors make the crawler a complex component of the system. It uses asynchronous IO to manage events, and a number of queues to move page fetches from state to state.</p>\n<p>It turns out that running a crawler which connects to more than half a million servers, and generates tens of millions of log entries generates a fair amount of email and phone calls. Because of the vast number of people coming on line, there are always those who do not know what a crawler is, because this is the first one they have seen. Almost daily, we receive an email something like, \"Wow, you looked at a lot of pages from my web site. How did you like it?\" There are also some people who do not know about the <a href=\"http://info.webcrawler.com/mak/projects/robots/norobots.html\">robots exclusion protocol</a>, and think their page should be protected from indexing by a statement like, \"This page is copyrighted and should not be indexed\", which needless to say is difficult for web crawlers to understand. Also, because of the huge amount of data involved, unexpected things will happen. For example, our system tried to crawl an online game. This resulted in lots of garbage messages in the middle of their game! It turns out this was an easy problem to fix. But this problem had not come up until we had downloaded tens of millions of pages. Because of the immense variation in web pages and servers, it is virtually impossible to test a crawler without running it on large part of the Internet. Invariably, there are hundreds of obscure problems which may only occur on one page out of the whole web and cause the crawler to crash, or worse, cause unpredictable or incorrect behavior. Systems which access large parts of the Internet need to be designed to be very robust and carefully tested. Since large complex systems such as crawlers will invariably cause problems, there needs to be significant resources devoted to reading the email and solving these problems as they come up.</p>\n<h3>4.4 Indexing the Web</h3>\n<ul>\n<li><strong>Parsing --</strong> Any parser which is designed to run on the entire Web must handle a huge array of possible errors. These range from typos in HTML tags to kilobytes of zeros in the middle of a tag, non-ASCII characters, HTML tags nested hundreds deep, and a great variety of other errors that challenge anyone's imagination to come up with equally creative ones. For maximum speed, instead of using YACC to generate a CFG parser, we use flex to generate a lexical analyzer which we outfit with its own stack. Developing this parser which runs at a reasonable speed and is very robust involved a fair amount of work.</li>\n<li><strong>Indexing</strong> <strong>Documents into Barrels --</strong> After each document is parsed, it is encoded into a number of barrels. Every word is converted into a wordID by using an in-memory hash table -- the lexicon. New additions to the lexicon hash table are logged to a file. Once the words are converted into wordID's, their occurrences in the current document are translated into hit lists and are written into the forward barrels. The main difficulty with parallelization of the indexing phase is that the lexicon needs to be shared. Instead of sharing the lexicon, we took the approach of writing a log of all the extra words that were not in a base lexicon, which we fixed at 14 million words. That way multiple indexers can run in parallel and then the small log file of extra words can be processed by one final indexer.</li>\n<li><strong>Sorting</strong> -- In order to generate the inverted index, the sorter takes each of the forward barrels and sorts it by wordID to produce an inverted barrel for title and anchor hits and a full text inverted barrel. This process happens one barrel at a time, thus requiring little temporary storage. Also, we parallelize the sorting phase to use as many machines as we have simply by running multiple sorters, which can process different buckets at the same time. Since the barrels don't fit into main memory, the sorter further subdivides them into baskets which do fit into memory based on wordID and docID. Then the sorter, loads each basket into memory, sorts it and writes its contents into the short inverted barrel and the full inverted barrel.</li>\n</ul>\n<h3>4.5 Searching</h3>\n<p>The goal of searching is to provide quality search results efficiently. Many of the large commercial search engines seemed to have made great progress in terms of efficiency. Therefore, we have focused more on quality of search in our research, although we believe our solutions are scalable to commercial volumes with a bit more effort. The google query evaluation process is show in Figure 4.</p>\n<ol>\n<li>Parse the query.</li>\n<li>Convert words into wordIDs.</li>\n<li>Seek to the start of the doclist in the short barrel for every word.</li>\n<li>Scan through the doclists until there is a document that matches all the search terms.</li>\n<li>Compute the rank of that document for the query.</li>\n<li>If we are in the short barrels and at the end of any doclist, seek to the start of the doclist in the full barrel for every word and go to step 4.</li>\n<li>If we are not at the end of any doclist go to step 4.</li>\n</ol>\n<p>Sort the documents that have matched by rank and return the top k.</p>\n<p>Figure 4. Google Query Evaluation</p>\n<p>To put a limit on response time, once a certain number (currently 40,000) of matching documents are found, the searcher automatically goes to step 8 in Figure 4. This means that it is possible that sub-optimal results would be returned. We are currently investigating other ways to solve this problem. In the past, we sorted the hits according to PageRank, which seemed to improve the situation.</p>\n<h4>4.5.1 The Ranking System</h4>\n<p>Google maintains much more information about web documents than typical search engines. Every hitlist includes position, font, and capitalization information. Additionally, we factor in hits from anchor text and the PageRank of the document. Combining all of this information into a rank is difficult. We designed our ranking function so that no particular factor can have too much influence. First, consider the simplest case -- a single word query. In order to rank a document with a single word query, Google looks at that document's hit list for that word. Google considers each hit to be one of several different types (title, anchor, URL, plain text large font, plain text small font, ...), each of which has its own type-weight. The type-weights make up a vector indexed by type. Google counts the number of hits of each type in the hit list. Then every count is converted into a count-weight. Count-weights increase linearly with counts at first but quickly taper off so that more than a certain count will not help. We take the dot product of the vector of count-weights with the vector of type-weights to compute an IR score for the document. Finally, the IR score is combined with PageRank to give a final rank to the document.</p>\n<p>For a multi-word search, the situation is more complicated. Now multiple hit lists must be scanned through at once so that hits occurring close together in a document are weighted higher than hits occurring far apart. The hits from the multiple hit lists are matched up so that nearby hits are matched together. For every matched set of hits, a proximity is computed. The proximity is based on how far apart the hits are in the document (or anchor) but is classified into 10 different value \"bins\" ranging from a phrase match to \"not even close\". Counts are computed not only for every type of hit but for every type and proximity. Every type and proximity pair has a type-prox-weight. The counts are converted into count-weights and we take the dot product of the count-weights and the type-prox-weights to compute an IR score. All of these numbers and matrices can all be displayed with the search results using a special debug mode. These displays have been very helpful in developing the ranking system.</p>\n<h4>4.5.2 Feedback</h4>\n<p>The ranking function has many parameters like the type-weights and the type-prox-weights. Figuring out the right values for these parameters is something of a black art. In order to do this, we have a user feedback mechanism in the search engine. A trusted user may optionally evaluate all of the results that are returned. This feedback is saved. Then when we modify the ranking function, we can see the impact of this change on all previous searches which were ranked. Although far from perfect, this gives us some idea of how a change in the ranking function affects the search results.</p>\n<h2>5 Results and Performance</h2>\n<p>   The most important measure of a search engine is the quality of its search results. While a complete user evaluation is beyond the scope of this paper, our own experience with Google has shown it to produce better results than the major commercial search engines for most searches. As an example which illustrates the use of PageRank, anchor text, and proximity, Figure 4 shows Google's results for a search on \"bill clinton\". These results demonstrates some of Google's features. The results are clustered by server. This helps considerably when sifting through result sets. A number of results are from the whitehouse.gov domain which is what one may reasonably expect from such a search. Currently, most major commercial search engines do not return any results from whitehouse.gov, much less the right ones. Notice that there is no title for the first result. This is because it was not crawled. Instead, Google relied on anchor text to determine this was a good answer to the query. Similarly, the fifth result is an email address which, of course, is not crawlable. It is also a result of anchor text.</p>\n<p>All of the results are reasonably high quality pages and, at last check, none were broken links. This is largely because they all have high PageRank. The PageRanks are the percentages in red along with bar graphs. Finally, there are no results about a Bill other than Clinton or about a Clinton other than Bill. This is because we place heavy importance on the proximity of word occurrences. Of course a true test of the quality of a search engine would involve an extensive user study or results analysis which we do not have room for here. Instead, we invite the reader to try Google for themselves at <a href=\"http://google.stanford.edu/\">http://google.stanford.edu</a>.</p>\n<h3>5.1 Storage Requirements</h3>\n<p>Aside from search quality, Google is designed to scale cost effectively to the size of the Web as it grows. One aspect of this is to use storage efficiently. Table 1 has a breakdown of some statistics and storage requirements of Google. Due to compression the total size of the repository is about 53 GB, just over one third of the total data it stores. At current disk prices this makes the repository a relatively cheap source of useful data. More importantly, the total of all the data used by the search engine requires a comparable amount of storage, about 55 GB. Furthermore, most queries can be answered using just the short inverted index. With better encoding and compression of the Document Index, a high quality web search engine may fit onto a 7GB drive of a new PC.  </p>\n<p>Storage Statistics</p>\n<p>Total Size of Fetched Pages</p>\n<p>147.8 GB</p>\n<p>Compressed Repository</p>\n<p>53.5 GB</p>\n<p>Short Inverted Index</p>\n<p>4.1 GB</p>\n<p>Full Inverted Index</p>\n<p>37.2 GB</p>\n<p>Lexicon</p>\n<p>293 MB</p>\n<p>Temporary Anchor Data<br>\n(not in total)</p>\n<p>6.6 GB</p>\n<p>Document Index Incl.<br>\nVariable Width Data</p>\n<p>9.7 GB</p>\n<p>Links Database</p>\n<p>3.9 GB</p>\n<p>Total Without Repository</p>\n<p>55.2 GB</p>\n<p>Total With Repository</p>\n<p>108.7 GB</p>\n<p>Web Page Statistics</p>\n<p>Number of Web Pages Fetched</p>\n<p>24 million</p>\n<p>Number of Urls Seen</p>\n<p>76.5 million</p>\n<p>Number of Email Addresses</p>\n<p>1.7 million</p>\n<p>Number of 404's</p>\n<p>1.6 million</p>\n<p>Table 1. Statistics</p>\n<h3>5.2 System Performance</h3>\n<p>It is important for a search engine to crawl and index efficiently. This way information can be kept up to date and major changes to the system can be tested relatively quickly. For Google, the major operations are Crawling, Indexing, and Sorting. It is difficult to measure how long crawling took overall because disks filled up, name servers crashed, or any number of other problems which stopped the system. In total it took roughly 9 days to download the 26 million pages (including errors). However, once the system was running smoothly, it ran much faster, downloading the last 11 million pages in just 63 hours, averaging just over 4 million pages per day or 48.5 pages per second. We ran the indexer and the crawler simultaneously. The indexer ran just faster than the crawlers. This is largely because we spent just enough time optimizing the indexer so that it would not be a bottleneck. These optimizations included bulk updates to the document index and placement of critical data structures on the local disk. The indexer runs at roughly 54 pages per second. The sorters can be run completely in parallel; using four machines, the whole process of sorting takes about 24 hours.</p>\n<h3>5.3 Search Performance</h3>\n<p>Improving the performance of search was not the major focus of our research up to this point. The current version of Google answers most queries in between 1 and 10 seconds. This time is mostly dominated by disk IO over NFS (since disks are spread over a number of machines). Furthermore, Google does not have any optimizations such as query caching, subindices on common terms, and other common optimizations. We intend to speed up Google considerably through distribution and hardware, software, and algorithmic improvements. Our target is to be able to handle several hundred queries per second. Table 2 has some sample query times from the current version of Google. They are repeated to show the speedups resulting from cached IO.</p>\n<p><strong>Initial Query</strong></p>\n<p><strong>Same Query Repeated (IO mostly cached)</strong> </p>\n<p><strong>Query</strong></p>\n<p><strong>CPU Time(s)</strong></p>\n<p><strong>Total Time(s)</strong></p>\n<p><strong>CPU Time(s)</strong></p>\n<p><strong>Total Time(s)</strong></p>\n<p>al gore</p>\n<p>0.09</p>\n<p>2.13</p>\n<p>0.06</p>\n<p>0.06</p>\n<p>vice president</p>\n<p>1.77</p>\n<p>3.84</p>\n<p>1.66</p>\n<p>1.80</p>\n<p>hard disks</p>\n<p>0.25</p>\n<p>4.86</p>\n<p>0.20</p>\n<p>0.24</p>\n<p>search engines</p>\n<p>1.31</p>\n<p>9.63</p>\n<p>1.16</p>\n<p>1.16</p>\n<p>Table 2. Search Times</p>\n<h2>6 Conclusions</h2>\n<p>Google is designed to be a scalable search engine. The primary goal is to provide high quality search results over a rapidly growing World Wide Web. Google employs a number of techniques to improve search quality including page rank, anchor text, and proximity information. Furthermore, Google is a complete architecture for gathering web pages, indexing them, and performing search queries over them.</p>\n<h3>6.1 Future Work</h3>\n<p>A large-scale web search engine is a complex system and much remains to be done. Our immediate goals are to improve search efficiency and to scale to approximately 100 million web pages. Some simple improvements to efficiency include query caching, smart disk allocation, and subindices. Another area which requires much research is updates. We must have smart algorithms to decide what old web pages should be recrawled and what new ones should be crawled. Work toward this goal has been done in [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Cho 98</a>]. One promising area of research is using proxy caches to build search databases, since they are demand driven. We are planning to add simple features supported by commercial search engines like boolean operators, negation, and stemming. However, other features are just starting to be explored such as relevance feedback and clustering (Google currently supports a simple hostname based clustering). We also plan to support user context (like the user's location), and result summarization. We are also working to extend the use of link structure and link text. Simple experiments indicate PageRank can be personalized by increasing the weight of a user's home page or bookmarks. As for link text, we are experimenting with using text surrounding links in addition to the link text itself. A Web search engine is a very rich environment for research ideas. We have far too many to list here so we do not expect this Future Work section to become much shorter in the near future.</p>\n<h3>6.2 High Quality Search</h3>\n<p>The biggest problem facing users of web search engines today is the quality of the results they get back. While the results are often amusing and expand users' horizons, they are often frustrating and consume precious time. For example, the top result for a search for \"Bill Clinton\" on one of the most popular commercial search engines was the <a href=\"http://www.io.com/~cjburke/clinton/970414.html\">Bill Clinton Joke of the Day: April 14, 1997</a>. Google is designed to provide higher quality search so as the Web continues to grow rapidly, information can be found easily. In order to accomplish this Google makes heavy use of hypertextual information consisting of link structure and link (anchor) text. Google also uses proximity and font information. While evaluation of a search engine is difficult, we have subjectively found that Google returns higher quality search results than current commercial search engines. The analysis of link structure via PageRank allows Google to evaluate the quality of web pages. The use of link text as a description of what the link points to helps the search engine return relevant (and to some degree high quality) results. Finally, the use of proximity information helps increase relevance a great deal for many queries.</p>\n<h3>6.3 Scalable Architecture</h3>\n<p>Aside from the quality of search, Google is designed to scale. It must be efficient in both space and time, and constant factors are very important when dealing with the entire Web. In implementing Google, we have seen bottlenecks in CPU, memory access, memory capacity, disk seeks, disk throughput, disk capacity, and network IO. Google has evolved to overcome a number of these bottlenecks during various operations. Google's major data structures make efficient use of available storage space. Furthermore, the crawling, indexing, and sorting operations are efficient enough to be able to build an index of a substantial portion of the web -- 24 million pages, in less than one week. We expect to be able to build an index of 100 million pages in less than a month.</p>\n<h3>6.4 A Research Tool</h3>\n<p>In addition to being a high quality search engine, Google is a research tool. The data Google has collected has already resulted in many other papers submitted to conferences and many more on the way. Recent research such as [<a href=\"http://infolab.stanford.edu/~backrub/google.html#ref\">Abiteboul 97</a>] has shown a number of limitations to queries about the Web that may be answered without having the Web available locally. This means that Google (or a similar system) is not only a valuable research tool but a necessary one for a wide range of applications. We hope Google will be a resource for searchers and researchers all around the world and will spark the next generation of search engine technology.</p>"},{"url":"/docs/articles/node-env-variables/","relativePath":"docs/articles/node-env-variables.md","relativeDir":"docs/articles","base":"node-env-variables.md","name":"node-env-variables","frontmatter":{"title":"Node Export Module","weight":0,"excerpt":"How to use the module.exports API to expose data to other files in your application, or to other applications as well","seo":{"title":"module.exports API ","description":"When you want to import something you use\n\nconst library = require('./library');","robots":[],"extra":[{"name":"og:image","value":"images/cool-comet.png","keyName":"property","relativeUrl":true}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>Node.js has a built-in module system.</p>\n<p>A Node.js file can import functionality exposed by other Node.js files.</p>\n<p>When you want to import something you use</p>\n<p>to import the functionality exposed in the library.js file that resides in the current file folder.</p>\n<p>In this file, functionality must be exposed before it can be imported by other files.</p>\n<p>Any other object or variable defined in the file by default is private and not exposed to the outer world.</p>\n<p>This is what the module.exports API offered by the <a href=\"https://nodejs.org/api/modules.html\">module system</a> allows us to do.</p>\n<p>When you assign an object or a function as a new exports property, that is the thing that's being exposed, and as such, it can be imported in other parts of your app, or in other apps as well.</p>\n<p>You can do so in 2 ways.</p>\n<p>The first is to assign an object to module.exports, which is an object provided out of the box by the module system, and this will make your file export <em>just that object</em>:</p>\n<p>The second way is to add the exported object as a property of exports. This way allows you to export multiple objects, functions or data:</p>\n<p>or directly</p>\n<p>And in the other file, you'll use it by referencing a property of your import:</p>\n<p>or</p>\n<p>What's the difference between module.exports and exports?</p>\n<p>The first exposes the object it points to. The latter exposes <em>the properties</em> of the object it points to.</p>"},{"url":"/docs/articles/node-package-manager/","relativePath":"docs/articles/node-package-manager.md","relativeDir":"docs/articles","base":"node-package-manager.md","name":"node-package-manager","frontmatter":{"title":"Sorting Algorithms","weight":0,"excerpt":"Sorting Algorithms","seo":{"title":"","description":"","robots":[],"extra":[{"name":"og:title","value":"Sorting Algorithms","keyName":"property","relativeUrl":false},{"name":"og:description","value":"We are creating the same number of variables with an exact size, independent of our input. No new arrays are created.","keyName":"property","relativeUrl":false},{"name":"og:type","value":"website","keyName":"property","relativeUrl":false},{"name":"twitter:image","value":"images/Classical-2D-floorplanning-data-structures-left-and-their-3D.png","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"sorting algos","keyName":"name","relativeUrl":false},{"name":"og:image","value":"images/image (9).png","keyName":"property","relativeUrl":true}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Sorting Algorithms</h2>\n<h3>Sorting Algorithms</h3>\n<ol>\n<li>Explain the complexity of and write a function that performs bubble sort on an array of numbers.</li>\n<li>\n<p>Time Complexity: O(n^2)</p>\n<ul>\n<li>In our worst case, our input is in the opposite order. We have to perform n swaps and loop through our input n times because a swap is made each time.</li>\n</ul>\n</li>\n<li>\n<p>Space Complexity: O(1)</p>\n<ul>\n<li>We are creating the same number of variables with an exact size, independent of our input. No new arrays are created.</li>\n</ul>\n</li>\n<li>Code example for bubbleSort:</li>\n</ol>\n<pre><code class=\"language-javascript\">function bubbleSort(array) {\n    // We could have also had a 'sorted = false' flag and flipped our logic below\n    let swapped = true;\n\n    while (swapped) {\n        swapped = false;\n\n        for (let i = 0; i &#x3C; array.length - 1; i++) {\n            if (array[i] > array[i + 1]) {\n                let temp = array[i];\n                array[i] = array[i + 1];\n                array[i + 1] = temp;\n                // The above three lines could also be in a helper swap function\n                // swap(array, i, i+1);\n                swapped = true;\n            }\n        }\n    }\n\n    return array;\n}\n</code></pre>\n<ol start=\"2\">\n<li>Explain the complexity of and write a function that performs selection sort on an array of numbers.</li>\n<li>\n<p>Time Complexity: O(n^2)</p>\n<ul>\n<li>Our nested loop structure is dependent on the size of our input.</li>\n<li>The outer loop always occurs n times.</li>\n<li>For each of those iterations, we have another loop that runs (n - i) times. This just means that the inner loop runs one less time each iteration, but this averages out to (n/2).</li>\n<li>Our nested structure is then T(n * n/2) = O(n^2)</li>\n</ul>\n</li>\n<li>\n<p>Space Complexity: O(1)</p>\n<ul>\n<li>We are creating the same number of variables with an exact size, independent of our input. No new arrays are created.</li>\n</ul>\n</li>\n<li>Code example for selectSort:</li>\n</ol>\n<pre><code class=\"language-javascript\">function selectionSort(arr) {\n    for (let i = 0; i &#x3C; arr.length; i++) {\n        let minIndex = i;\n\n        for (let j = i + 1; j &#x3C; arr.length; j++) {\n            if (arr[minIndex] > arr[j]) {\n                minIndex = j;\n            }\n        }\n\n        let temp = arr[i];\n        arr[i] = arr[minIndex];\n        arr[minIndex] = temp;\n        // The above three lines could also be in a helper swap function\n        // swap(arr, i, minIndex);\n    }\n    return arr;\n}\n</code></pre>\n<ol start=\"3\">\n<li>Explain the complexity of and write a function that performs insertion sort on an array of numbers.</li>\n<li>\n<p>Time Complexity: O(n^2)</p>\n<ul>\n<li>Our nested loop structure is dependent on the size of our input.</li>\n<li>The outer loop always occurs n times.</li>\n<li>For each of those iterations, we have another loop that runs a maximum of (i - 1) times. This just means that the inner loop runs one more time each iteration, but this averages out to (n/2).</li>\n<li>Our nested structure is then T(n * n/2) = O(n^2)</li>\n</ul>\n</li>\n<li>\n<p>Space Complexity: O(1)</p>\n<ul>\n<li>We are creating the same number of variables with an exact size, independent of our input. No new arrays are created.</li>\n</ul>\n</li>\n<li>Code example for insertionSort:</li>\n</ol>\n<pre><code class=\"language-javascript\">function insertionSort(arr) {\n    for (let i = 1; i &#x3C; arr.length; i++) {\n        let currElement = arr[i];\n        for (var j = i - 1; j >= 0 &#x26;&#x26; currElement &#x3C; arr[j]; j--) {\n            arr[j + 1] = arr[j];\n        }\n        arr[j + 1] = currElement;\n    }\n    return arr;\n}\n</code></pre>\n<ol start=\"4\">\n<li>Explain the complexity of and write a function that performs merge sort on an array of numbers.</li>\n<li>\n<p>Time Complexity: O(n log n)</p>\n<ul>\n<li>Our mergeSort function divides our input in half at each step, recursively calling itself with smaller and smaller input. This results in log n stack frames.</li>\n<li>On each stack frame, our worst case scenario is having to make n comparisons in our merge function in order to determine which element should come next in our sorted array.</li>\n<li>Since we have log n stack frames and n operations on each frame, we end up with an O(n log n) time complexity</li>\n</ul>\n</li>\n<li>\n<p>Space Complexity: O(n)</p>\n<ul>\n<li>We are ultimately creating n subarrays, making our space complexity linear to our input size.</li>\n</ul>\n</li>\n<li>Code example for mergeSort:</li>\n</ol>\n<pre><code class=\"language-javascript\">// The merge function is what is combining our sorted sub-arrays\nfunction merge(array1, array2) {\n    let merged = [];\n\n    // keep running while either array still contains elements\n    while (array1.length || array2.length) {\n        // if array1 is nonempty, take its the first element as ele1\n        // otherwise array1 is empty, so take Infinity as ele1\n        let ele1 = array1.length ? array1[0] : Infinity;\n\n        // do the same for array2, ele2\n        let ele2 = array2.length ? array2[0] : Infinity;\n\n        let next;\n        // remove the smaller of the eles from it's array\n        if (ele1 &#x3C; ele2) {\n            next = array1.shift();\n        } else {\n            next = array2.shift();\n        }\n\n        // and add that ele to the new array\n        merged.push(next);\n    }\n\n    return merged;\n}\n\n// The mergeSort function breaks apart our input into smaller sub-arrays until we have an input of length &#x3C;= 1, which is inherently sorted.\n// Once we have a left and right subarray that's sorted, we can merge them together to get our sorted result of this sub-problem, passing the sorted version back up the call stack.\nfunction mergeSort(array) {\n    if (array.length &#x3C;= 1) {\n        return array;\n    }\n\n    let midIdx = Math.floor(array.length / 2);\n    let leftHalf = array.slice(0, midIdx);\n    let rightHalf = array.slice(midIdx);\n\n    let sortedLeft = mergeSort(leftHalf);\n    let sortedRight = mergeSort(rightHalf);\n\n    return merge(sortedLeft, sortedRight);\n}\n</code></pre>\n<ol start=\"5\">\n<li>Explain the complexity of and write a function that performs quick sort on an array of numbers.</li>\n<li>\n<p>Time Complexity: Average O(n log n), Worst O(n^2)</p>\n<ul>\n<li>In our worst case, the pivot that we select results in every element going into either the left or right array. If this happens we end up making n recursive calls to quickSort, with n comparisons at each call.</li>\n<li>In our average case, we pick something that more evenly splits the arrays, resulting in approximately log n recursive calls and an overall complexity of O(n log n).</li>\n<li>Quick sort is unique in that the worst case is so exceedingly rare that it is often considered an O(n log n) complexity, even though this is not technically accurate.</li>\n</ul>\n</li>\n<li>\n<p>Space Complexity: Our implementation O(n), Possible implementation O(log n)</p>\n<ul>\n<li>The partition arrays that we create are directly proportional to the size of the input, resulting in O(n) space complexity.</li>\n<li>With some tweaking, we could implement an in-place quick sort, which would eliminate the creation of new arrays. In this case, the log n stack frames from the recursion are the only proportional amount of space that is used, resulting in O(log n) space complexity.</li>\n</ul>\n</li>\n<li>Code example for quickSort:</li>\n</ol>\n<pre><code class=\"language-javascript\">function quickSort(array) {\n    if (array.length &#x3C;= 1) {\n        return array;\n    }\n\n    let pivot = array.shift();\n    // This implementation uses filter, which returns a new array with any element that passes the criteria (ie the callback returns true).\n    // We also could have iterated over the array (array.forEach(el => ...)) and pushed each value into the appropriate left/right subarray as we encountered it.\n    let left = array.filter((el) => el &#x3C; pivot);\n    let right = array.filter((el) => el >= pivot);\n\n    let leftSorted = quickSort(left);\n    let rightSorted = quickSort(right);\n\n    return [...leftSorted, pivot, ...rightSorted];\n    // We also could have concatenated the arrays instead of spreading their contents\n    // return leftSorted.concat([pivot]).concat(rightSorted);\n}\n</code></pre>\n<ol start=\"6\">\n<li>Explain the complexity of and write a function that performs a binary search on a sorted array of numbers.</li>\n<li>\n<p>Time Complexity: O(log n)</p>\n<ul>\n<li>With each recursive call, we split our input in half. This means we have to make at most log n checks to know if the element is in our array.</li>\n</ul>\n</li>\n<li>\n<p>Space Complexity: Our implementation O(n), Possible implementation O(1)</p>\n<ul>\n<li>We have to make a subarray for each recursive call. In the worst case (we don't find the element), the total length of these arrays is approximately equal to the length of the original (n).</li>\n<li>If we kept references to the beginning and end index of the portion of the array that we are searching, we could eliminate the need for creating new subarrays. We could also use a while loop to perform this functionality until we either found our target or our beginning and end indices crossed. This would eliminate the space required for recursive calls (adding stack frames). Ultimately we would be using the same number of variables independent of input size, resulting in O(1).</li>\n</ul>\n</li>\n<li>Code example for binarySearch and binarySearchIndex:</li>\n</ol>\n<pre><code class=\"language-javascript\">// Returns simply true/false for presence\nfunction binarySearch(array, target) {\n    if (array.length === 0) {\n        return false;\n    }\n\n    let midIdx = Math.floor(array.length / 2);\n    let leftHalf = array.slice(0, midIdx);\n    let rightHalf = array.slice(midIdx + 1);\n\n    if (target &#x3C; array[midIdx]) {\n        return binarySearch(leftHalf, target);\n    } else if (target > array[midIdx]) {\n        return binarySearch(rightHalf, target);\n    } else {\n        return true;\n    }\n}\n\n// Returns the index or -1 if not found\nfunction binarySearchIndex(array, target) {\n    if (!array.length) return -1;\n\n    const midIdx = Math.floor(array.length / 2);\n    const midEl = array[midIdx];\n\n    if (target &#x3C; midEl) {\n        return binarySearchIndex(array.slice(0, midIdx), target);\n    } else if (target > midEl) {\n        // Since our recursive call will have new indices for the subarray, we have to adjust the return value to align it with the indices of our original array.\n        // If the recursive call returns -1, it was not found and we can immediately return -1\n        // If it was found in the subarray, we have to add on the number of elements that were removed from the beginning of our larger original array.\n        // For example, if we try to find 15 in an array of [5, 10, 15]:\n        // - Our first call to binarySearchIndex will check our middle element of 10\n        // - Since our target is greater, we will recursively call our search on elements to the right, being the subarray [15]\n        // - On our recursive call we found our target! It's index in this call is 0.\n        // - When we return 0 to where binarySearchIndex was called, we need to adjust it to line up with this larger array (the 0th element of this larger array is 5, but our target was at the 0th index of the subarray)\n        // - Since we sliced off 2 elements from the beginning before making our recursive call, we add 2 to the return value to adjust it back to line up with our original array.\n        const idxShift = binarySearchIndex(array.slice(midIdx + 1), target);\n        return idxShift === -1 ? -1 : idxShift + midIdx + 1;\n    } else {\n        return midIdx;\n    }\n}\n</code></pre>"},{"url":"/docs/articles/node-repl/","relativePath":"docs/articles/node-repl.md","relativeDir":"docs/articles","base":"node-repl.md","name":"node-repl","frontmatter":{"title":"The-package-lock.json-file","weight":0,"seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs","excerpt":"The package-lock.json file is automatically generated when installing node packages"},"html":"<p>The <code>node</code> command is the one we use to run our Node.js scripts:</p>\n<pre><code class=\"language-bash\">node script.js\n</code></pre>\n<p>If we omit the filename, we use it in REPL mode:</p>\n<pre><code class=\"language-bash\">node\n</code></pre>\n<blockquote>\n<p>Note: REPL also known as Read Evaluate Print Loop is a programming language environment(Basically a console window) that takes single expression as user input and returns the result back to the console after execution.</p>\n</blockquote>\n<p>If you try it now in your terminal, this is what happens:</p>\n<pre><code class=\"language-bash\">❯ node\n>\n</code></pre>\n<p>the command stays in idle mode and waits for us to enter something.</p>\n<blockquote>\n<p>Tip: if you are unsure how to open your terminal, google \"How to open terminal on &#x3C;your-operating-system>\".</p>\n</blockquote>\n<p>The REPL is waiting for us to enter some JavaScript code, to be more precise.</p>\n<p>Start simple and enter</p>\n<pre><code class=\"language-console\">> console.log('test')\ntest\nundefined\n>\n</code></pre>\n<p>The first value, <code>test</code>, is the output we told the console to print, then we get undefined which is the return value of running <code>console.log()</code>.</p>\n<p>We can now enter a new line of JavaScript.</p>\n<h2>Use the tab to autocomplete</h2>\n<p>The cool thing about the REPL is that it's interactive.</p>\n<p>As you write your code, if you press the <code>tab</code> key the REPL will try to autocomplete what you wrote to match a variable you already defined or a predefined one.</p>\n<h2>Exploring JavaScript objects</h2>\n<p>Try entering the name of a JavaScript class, like <code>Number</code>, add a dot and press <code>tab</code>.</p>\n<p>The REPL will print all the properties and methods you can access on that class:</p>\n<p><img src=\"tab.png\" alt=\"Pressing tab reveals object properties\"></p>\n<h2>Explore global objects</h2>\n<p>You can inspect the globals you have access to by typing <code>global.</code> and pressing <code>tab</code>:</p>\n<p><img src=\"globals.png\" alt=\"Globals\"></p>\n<h2>The _ special variable</h2>\n<p>If after some code you type <code>_</code>, that is going to print the result of the last operation.</p>\n<h2>Dot commands</h2>\n<p>The REPL has some special commands, all starting with a dot <code>.</code>. They are</p>\n<ul>\n<li><code>.help</code>: shows the dot commands help</li>\n<li><code>.editor</code>: enables editor mode, to write multiline JavaScript code with ease. Once you are in this mode, enter ctrl-D to run the code you wrote.</li>\n<li><code>.break</code>: when inputting a multi-line expression, entering the .break command will abort further input. Same as pressing ctrl-C.</li>\n<li><code>.clear</code>: resets the REPL context to an empty object and clears any multi-line expression currently being input.</li>\n<li><code>.load</code>: loads a JavaScript file, relative to the current working directory</li>\n<li><code>.save</code>: saves all you entered in the REPL session to a file (specify the filename)</li>\n<li><code>.exit</code>: exits the repl (same as pressing ctrl-C two times)</li>\n</ul>\n<p>The REPL knows when you are typing a multi-line statement without the need to invoke <code>.editor</code>.</p>\n<p>For example if you start typing an iteration like this:</p>\n<pre><code class=\"language-js\">[1, 2, 3].forEach(num => {\n</code></pre>\n<p>and you press <code>enter</code>, the REPL will go to a new line that starts with 3 dots, indicating you can now continue to work on that block.</p>\n<pre><code class=\"language-js\">... console.log(num)\n... })\n</code></pre>\n<p>If you type <code>.break</code> at the end of a line, the multiline mode will stop and the statement will not be executed.</p>"},{"url":"/docs/articles/node-run-cli/","relativePath":"docs/articles/node-run-cli.md","relativeDir":"docs/articles","base":"node-run-cli.md","name":"node-run-cli","frontmatter":{"title":"node-cli-args","weight":0,"excerpt":"How to accept arguments in a Node.js program passed from the command line","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>You can pass any number of arguments when invoking a Node.js application using</p>\n<p>Arguments can be standalone or have a key and a value.</p>\n<p>For example:</p>\n<p>or</p>\n<p>This changes how you will retrieve this value in the Node.js code.</p>\n<p>The way you retrieve it is using the process object built into Node.js.</p>\n<p>It exposes an argv property, which is an array that contains all the command line invocation arguments.</p>\n<p>The first element is the full path of the node command.</p>\n<p>The second element is the full path of the file being executed.</p>\n<p>All the additional arguments are present from the third position going forward.</p>\n<p>You can iterate over all the arguments (including the node path and the file path) using a loop:</p>\n<p>You can get only the additional arguments by creating a new array that excludes the first 2 params:</p>\n<p>If you have one argument without an index name, like this:</p>\n<p>you can access it using</p>\n<p>In this case:</p>\n<p>args[0] is name=joe, and you need to parse it. The best way to do so is by using the <a href=\"https://www.npmjs.com/package/minimist\">minimist</a> library, which helps dealing with arguments:</p>\n<p>This time you need to use double dashes before each argument name:</p>"},{"url":"/docs/articles/nodejs/","relativePath":"docs/articles/nodejs.md","relativeDir":"docs/articles","base":"nodejs.md","name":"nodejs","frontmatter":{"title":"Javascript and Node","excerpt":"Web-Dev-Hubis a Unibit theme created for project documentations. You can use it for your project.","seo":{"title":"Javascript and Node","description":"This is the Javascript and Node page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Javascript and Node","keyName":"property"},{"name":"og:description","value":"This is the Javascript and Node page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Javascript and Node"},{"name":"twitter:description","value":"This is the Javascript and Node page"}]},"template":"docs"},"html":"<p>As a beginner, it's hard to get to a point where you are confident enough in your programming abilities.</p>\n<p>While learning to code, you might also be confused at where does JavaScript end, and where Node.js begins, and vice versa.</p>\n<p>I would recommend you to have a good grasp of the main JavaScript concepts before diving into Node.js:</p>\n<ul>\n<li>Lexical Structure</li>\n<li>Expressions</li>\n<li>Types</li>\n<li>Variables</li>\n<li>Functions</li>\n<li>this</li>\n<li>Arrow Functions</li>\n<li>Loops</li>\n<li>Scopes</li>\n<li>Arrays</li>\n<li>Template Literals</li>\n<li>Semicolons</li>\n<li>Strict Mode</li>\n<li>ECMAScript 6, 2016, 2017</li>\n</ul>\n<p>With those concepts in mind, you are well on your road to become a proficient JavaScript developer, in both the browser and in Node.js.</p>\n<p>The following concepts are also key to understand asynchronous programming, which is one fundamental part of Node.js:</p>\n<ul>\n<li>Asynchronous programming and callbacks</li>\n<li>Timers</li>\n<li>Promises</li>\n<li>Async and Await</li>\n<li>Closures</li>\n<li>The Event Loop</li>\n</ul>"},{"url":"/docs/articles/nodevsbrowser/","relativePath":"docs/articles/nodevsbrowser.md","relativeDir":"docs/articles","base":"nodevsbrowser.md","name":"nodevsbrowser","frontmatter":{"title":"Node vs Browser","excerpt":"Web-Dev-Hubis a Unibit theme created for project documentations. You can use it for your project.","seo":{"title":"Node vs Browser","description":"Both the browser and Node.js use JavaScript as their programming language.You can pass any number of arguments when invoking a Node.js application using\n\n","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Node vs Browser","keyName":"property"},{"name":"og:description","value":"Both the browser and Node.js use JavaScript as their programming language.\nBuilding apps that run in the browser","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Node vs Browser"},{"name":"twitter:description","value":"This is the Node vs Browser page"},{"name":"og:image","value":"images/node.jpg","keyName":"property","relativeUrl":true}]},"template":"docs"},"html":"<p>Both the browser and Node.js use JavaScript as their programming language.</p>\n<p>Building apps that run in the browser is a completely different thing than building a Node.js application.</p>\n<p>Despite the fact that it's always JavaScript, there are some key differences that make the experience radically different.</p>\n<p>From the perspective of a frontend developer who extensively uses JavaScript, Node.js apps bring with them a huge advantage: the comfort of programming everything - the frontend and the backend - in a single language.</p>\n<p>You have a huge opportunity because we know how hard it is to fully, deeply learn a programming language, and by using the same language to perform all your work on the web - both on the client and on the server, you're in a unique position of advantage.</p>\n<p>What changes is the ecosystem.</p>\n<p>In the browser, most of the time what you are doing is interacting with the DOM, or other Web Platform APIs like Cookies. Those do not exist in Node.js, of course. You don't have the <code>document</code>, <code>window</code> and all the other objects that are provided by the browser.</p>\n<p>And in the browser, we don't have all the nice APIs that Node.js provides through its modules, like the filesystem access functionality.</p>\n<p>Another big difference is that in Node.js you control the environment. Unless you are building an open source application that anyone can deploy anywhere, you know which version of Node.js you will run the application on. Compared to the browser environment, where you don't get the luxury to choose what browser your visitors will use, this is very convenient.</p>\n<p>This means that you can write all the modern ES6-7-8-9 JavaScript that your Node.js version supports.</p>\n<p>Since JavaScript moves so fast, but browsers can be a bit slow and users a bit slow to upgrade, sometimes on the web, you are stuck with using older JavaScript / ECMAScript releases.</p>\n<p>You can use Babel to transform your code to be ES5-compatible before shipping it to the browser, but in Node.js, you won't need that.</p>\n<p>Another difference is that Node.js uses the CommonJS module system, while in the browser we are starting to see the ES Modules standard being implemented.</p>\n<p>In practice, this means that for the time being you use <code>require()</code> in Node.js and <code>import</code> in the browser.</p>"},{"url":"/docs/articles/node-common-modules/","relativePath":"docs/articles/node-common-modules.md","relativeDir":"docs/articles","base":"node-common-modules.md","name":"node-common-modules","frontmatter":{"title":"Common Modules","weight":0,"excerpt":"resources","seo":{"title":"","description":"This section is similar to a blog but is more technical in nature and time invariant with regard to content.","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Modules: CommonJS modules<a href=\"https://nodejs.org/api/modules.html#modules_modules_commonjs_modules\">#</a></h2>\n<p><a href=\"https://nodejs.org/api/documentation.html#documentation_stability_index\">Stability: 2</a> - Stable</p>\n<p>In the Node.js module system, each file is treated as a separate module. For example, consider a file named <code>foo.js</code>:</p>\n<pre><code>const circle = require('./circle.js');\nconsole.log(`The area of a circle of radius 4 is ${circle.area(4)}`);\n</code></pre>\n<p>On the first line, <code>foo.js</code> loads the module <code>circle.js</code> that is in the same directory as <code>foo.js</code>.</p>\n<p>Here are the contents of <code>circle.js</code>:</p>\n<pre><code>const { PI } = Math;\n\nexports.area = (r) => PI * r ** 2;\n\nexports.circumference = (r) => 2 * PI * r;\n</code></pre>\n<p>The module <code>circle.js</code> has exported the functions <code>area()</code> and <code>circumference()</code>. Functions and objects are added to the root of a module by specifying additional properties on the special <code>exports</code> object.</p>\n<p>Variables local to the module will be private, because the module is wrapped in a function by Node.js (see <a href=\"https://nodejs.org/api/modules.html#modules_the_module_wrapper\">module wrapper</a>). In this example, the variable <code>PI</code> is private to <code>circle.js</code>.</p>\n<p>The <code>module.exports</code> property can be assigned a new value (such as a function or object).</p>\n<p>Below, <code>bar.js</code> makes use of the <code>square</code> module, which exports a Square class:</p>\n<pre><code>const Square = require('./square.js');\nconst mySquare = new Square(2);\nconsole.log(`The area of mySquare is ${mySquare.area()}`);\n</code></pre>\n<p>The <code>square</code> module is defined in <code>square.js</code>:</p>\n<pre><code>// Assigning to exports will not modify module, must use module.exports\nmodule.exports = class Square {\n  constructor(width) {\n    this.width = width;\n  }\n\n  area() {\n    return this.width ** 2;\n  }\n};\n</code></pre>\n<p>The module system is implemented in the <code>require('module')</code> module.</p>\n<h3>Accessing the main module<a href=\"https://nodejs.org/api/modules.html#modules_accessing_the_main_module\">#</a></h3>\n<p>When a file is run directly from Node.js, <code>require.main</code> is set to its <code>module</code>. That means that it is possible to determine whether a file has been run directly by testing <code>require.main === module</code>.</p>\n<p>For a file <code>foo.js</code>, this will be <code>true</code> if run via <code>node foo.js</code>, but <code>false</code> if run by <code>require('./foo')</code>.</p>\n<p>Because <code>module</code> provides a <code>filename</code> property (normally equivalent to <code>__filename</code>), the entry point of the current application can be obtained by checking <code>require.main.filename</code>.</p>\n<h3>Package manager tips<a href=\"https://nodejs.org/api/modules.html#modules_package_manager_tips\">#</a></h3>\n<p>The semantics of the Node.js <code>require()</code> function were designed to be general enough to support reasonable directory structures. Package manager programs such as <code>dpkg</code>, <code>rpm</code>, and <code>npm</code> will hopefully find it possible to build native packages from Node.js modules without modification.</p>\n<p>Below we give a suggested directory structure that could work:</p>\n<p>Let's say that we wanted to have the folder at <code>/usr/lib/node/&#x3C;some-package>/&#x3C;some-version></code> hold the contents of a specific version of a package.</p>\n<p>Packages can depend on one another. In order to install package <code>foo</code>, it may be necessary to install a specific version of package <code>bar</code>. The <code>bar</code> package may itself have dependencies, and in some cases, these may even collide or form cyclic dependencies.</p>\n<p>Because Node.js looks up the <code>realpath</code> of any modules it loads (that is, it resolves symlinks) and then <a href=\"https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders\">looks for their dependencies in <code>node_modules</code> folders</a>, this situation can be resolved with the following architecture:</p>\n<ul>\n<li><code>/usr/lib/node/foo/1.2.3/</code>: Contents of the <code>foo</code> package, version 1.2.3.</li>\n<li><code>/usr/lib/node/bar/4.3.2/</code>: Contents of the <code>bar</code> package that <code>foo</code> depends on.</li>\n<li><code>/usr/lib/node/foo/1.2.3/node_modules/bar</code>: Symbolic link to <code>/usr/lib/node/bar/4.3.2/</code>.</li>\n<li><code>/usr/lib/node/bar/4.3.2/node_modules/*</code>: Symbolic links to the packages that <code>bar</code> depends on.</li>\n</ul>\n<p>Thus, even if a cycle is encountered, or if there are dependency conflicts, every module will be able to get a version of its dependency that it can use.</p>\n<p>When the code in the <code>foo</code> package does <code>require('bar')</code>, it will get the version that is symlinked into <code>/usr/lib/node/foo/1.2.3/node_modules/bar</code>. Then, when the code in the <code>bar</code> package calls <code>require('quux')</code>, it'll get the version that is symlinked into <code>/usr/lib/node/bar/4.3.2/node_modules/quux</code>.</p>\n<p>Furthermore, to make the module lookup process even more optimal, rather than putting packages directly in <code>/usr/lib/node</code>, we could put them in <code>/usr/lib/node_modules/&#x3C;name>/&#x3C;version></code>. Then Node.js will not bother looking for missing dependencies in <code>/usr/node_modules</code> or <code>/node_modules</code>.</p>\n<p>In order to make modules available to the Node.js REPL, it might be useful to also add the <code>/usr/lib/node_modules</code> folder to the <code>$NODE_PATH</code> environment variable. Since the module lookups using <code>node_modules</code> folders are all relative, and based on the real path of the files making the calls to <code>require()</code>, the packages themselves can be anywhere.</p>\n<h3>The <code>.mjs</code> extension<a href=\"https://nodejs.org/api/modules.html#modules_the_mjs_extension\">#</a></h3>\n<p>It is not possible to <code>require()</code> files that have the <code>.mjs</code> extension. Attempting to do so will throw <a href=\"https://nodejs.org/api/errors.html#errors_err_require_esm\">an error</a>. The <code>.mjs</code> extension is reserved for <a href=\"https://nodejs.org/api/esm.html\">ECMAScript Modules</a> which cannot be loaded via <code>require()</code>. See <a href=\"https://nodejs.org/api/esm.html\">ECMAScript Modules</a> for more details.</p>\n<h3>All together...<a href=\"https://nodejs.org/api/modules.html#modules_all_together\">#</a></h3>\n<p>To get the exact filename that will be loaded when <code>require()</code> is called, use the <code>require.resolve()</code> function.</p>\n<p>Putting together all of the above, here is the high-level algorithm in pseudocode of what <code>require()</code> does:</p>\n<p>require(X) from module at path Y</p>\n<ol>\n<li>If X is a core module,\na. return the core module\nb. STOP</li>\n<li>If X begins with '/'\na. set Y to be the filesystem root</li>\n<li>If X begins with './' or '/' or '../'\na. LOAD<em>AS</em>FILE(Y + X)\nb. LOAD<em>AS</em>DIRECTORY(Y + X)\nc. THROW \"not found\"</li>\n<li>If X begins with '#'\na. LOAD<em>PACKAGE</em>IMPORTS(X, dirname(Y))</li>\n<li>LOAD<em>PACKAGE</em>SELF(X, dirname(Y))</li>\n<li>LOAD<em>NODE</em>MODULES(X, dirname(Y))</li>\n<li>THROW \"not found\"</li>\n</ol>\n<p>LOAD<em>AS</em>FILE(X)</p>\n<ol>\n<li>If X is a file, load X as its file extension format. STOP</li>\n<li>If X.js is a file, load X.js as JavaScript text. STOP</li>\n<li>If X.json is a file, parse X.json to a JavaScript Object. STOP</li>\n<li>If X.node is a file, load X.node as binary addon. STOP</li>\n</ol>\n<p>LOAD_INDEX(X)</p>\n<ol>\n<li>If X/index.js is a file, load X/index.js as JavaScript text. STOP</li>\n<li>If X/index.json is a file, parse X/index.json to a JavaScript object. STOP</li>\n<li>If X/index.node is a file, load X/index.node as binary addon. STOP</li>\n</ol>\n<p>LOAD<em>AS</em>DIRECTORY(X)</p>\n<ol>\n<li>If X/package.json is a file,\na. Parse X/package.json, and look for \"main\" field.\nb. If \"main\" is a falsy value, GOTO 2.\nc. let M = X + (json main field)\nd. LOAD<em>AS</em>FILE(M)\ne. LOAD<em>INDEX(M)\nf. LOAD</em>INDEX(X) DEPRECATED\ng. THROW \"not found\"</li>\n<li>LOAD_INDEX(X)</li>\n</ol>\n<p>LOAD<em>NODE</em>MODULES(X, START)</p>\n<ol>\n<li>let DIRS = NODE<em>MODULES</em>PATHS(START)</li>\n<li>for each DIR in DIRS:\na. LOAD<em>PACKAGE</em>EXPORTS(X, DIR)\nb. LOAD<em>AS</em>FILE(DIR/X)\nc. LOAD<em>AS</em>DIRECTORY(DIR/X)</li>\n</ol>\n<p>NODE<em>MODULES</em>PATHS(START)</p>\n<ol>\n<li>let PARTS = path split(START)</li>\n<li>let I = count of PARTS - 1</li>\n<li>let DIRS = [GLOBAL_FOLDERS]</li>\n<li>while I >= 0,\na. if PARTS[I] = \"node<em>modules\" CONTINUE\nb. DIR = path join(PARTS[0 .. I] + \"node</em>modules\")\nc. DIRS = DIRS + DIR\nd. let I = I - 1</li>\n<li>return DIRS</li>\n</ol>\n<p>LOAD<em>PACKAGE</em>IMPORTS(X, DIR)</p>\n<ol>\n<li>Find the closest package scope SCOPE to DIR.</li>\n<li>If no scope was found, return.</li>\n<li>If the SCOPE/package.json \"imports\" is null or undefined, return.</li>\n<li>let MATCH = PACKAGE<em>IMPORTS</em>RESOLVE(X, pathToFileURL(SCOPE),\n[\"node\", \"require\"]) <a href=\"https://nodejs.org/api/esm.md#resolver-algorithm-specification\">defined in the ESM resolver</a>.</li>\n<li>RESOLVE<em>ESM</em>MATCH(MATCH).</li>\n</ol>\n<p>LOAD<em>PACKAGE</em>EXPORTS(X, DIR)</p>\n<ol>\n<li>Try to interpret X as a combination of NAME and SUBPATH where the name\nmay have a @scope/ prefix and the subpath begins with a slash (<code>/</code>).</li>\n<li>If X does not match this pattern or DIR/NAME/package.json is not a file,\nreturn.</li>\n<li>Parse DIR/NAME/package.json, and look for \"exports\" field.</li>\n<li>If \"exports\" is null or undefined, return.</li>\n<li>let MATCH = PACKAGE<em>EXPORTS</em>RESOLVE(pathToFileURL(DIR/NAME), \".\" + SUBPATH,\n<code>package.json</code> \"exports\", [\"node\", \"require\"]) <a href=\"https://nodejs.org/api/esm.md#resolver-algorithm-specification\">defined in the ESM resolver</a>.</li>\n<li>RESOLVE<em>ESM</em>MATCH(MATCH)</li>\n</ol>\n<p>LOAD<em>PACKAGE</em>SELF(X, DIR)</p>\n<ol>\n<li>Find the closest package scope SCOPE to DIR.</li>\n<li>If no scope was found, return.</li>\n<li>If the SCOPE/package.json \"exports\" is null or undefined, return.</li>\n<li>If the SCOPE/package.json \"name\" is not the first segment of X, return.</li>\n<li>let MATCH = PACKAGE<em>EXPORTS</em>RESOLVE(pathToFileURL(SCOPE),\n\".\" + X.slice(\"name\".length), <code>package.json</code> \"exports\", [\"node\", \"require\"])\n<a href=\"https://nodejs.org/api/esm.md#resolver-algorithm-specification\">defined in the ESM resolver</a>.</li>\n<li>RESOLVE<em>ESM</em>MATCH(MATCH)</li>\n</ol>\n<p>RESOLVE<em>ESM</em>MATCH(MATCH)</p>\n<ol>\n<li>let { RESOLVED, EXACT } = MATCH</li>\n<li>let RESOLVED_PATH = fileURLToPath(RESOLVED)</li>\n<li>If EXACT is true,\na. If the file at RESOLVED<em>PATH exists, load RESOLVED</em>PATH as its extension\nformat. STOP</li>\n<li>Otherwise, if EXACT is false,\na. LOAD<em>AS</em>FILE(RESOLVED<em>PATH)\nb. LOAD</em>AS<em>DIRECTORY(RESOLVED</em>PATH)</li>\n<li>THROW \"not found\"</li>\n</ol>\n<h3>Caching<a href=\"https://nodejs.org/api/modules.html#modules_caching\">#</a></h3>\n<p>Modules are cached after the first time they are loaded. This means (among other things) that every call to <code>require('foo')</code> will get exactly the same object returned, if it would resolve to the same file.</p>\n<p>Provided <code>require.cache</code> is not modified, multiple calls to <code>require('foo')</code> will not cause the module code to be executed multiple times. This is an important feature. With it, \"partially done\" objects can be returned, thus allowing transitive dependencies to be loaded even when they would cause cycles.</p>\n<p>To have a module execute code multiple times, export a function, and call that function.</p>\n<h4>Module caching caveats<a href=\"https://nodejs.org/api/modules.html#modules_module_caching_caveats\">#</a></h4>\n<p>Modules are cached based on their resolved filename. Since modules may resolve to a different filename based on the location of the calling module (loading from <code>node_modules</code> folders), it is not a <em>guarantee</em> that <code>require('foo')</code> will always return the exact same object, if it would resolve to different files.</p>\n<p>Additionally, on case-insensitive file systems or operating systems, different resolved filenames can point to the same file, but the cache will still treat them as different modules and will reload the file multiple times. For example, <code>require('./foo')</code> and <code>require('./FOO')</code> return two different objects, irrespective of whether or not <code>./foo</code> and <code>./FOO</code> are the same file.</p>\n<h3>Core modules<a href=\"https://nodejs.org/api/modules.html#modules_core_modules\">#</a></h3>\n<p>History</p>\n<p>Node.js has several modules compiled into the binary. These modules are described in greater detail elsewhere in this documentation.</p>\n<p>The core modules are defined within the Node.js source and are located in the <code>lib/</code> folder.</p>\n<p>Core modules are always preferentially loaded if their identifier is passed to <code>require()</code>. For instance, <code>require('http')</code> will always return the built in HTTP module, even if there is a file by that name.</p>\n<p>Core modules can also be identified using the <code>node:</code> prefix, in which case it bypasses the <code>require</code> cache. For instance, <code>require('node:http')</code> will always return the built in HTTP module, even if there is <code>require.cache</code> entry by that name.</p>\n<h3>Cycles<a href=\"https://nodejs.org/api/modules.html#modules_cycles\">#</a></h3>\n<p>When there are circular <code>require()</code> calls, a module might not have finished executing when it is returned.</p>\n<p>Consider this situation:</p>\n<p><code>a.js</code>:</p>\n<pre><code>console.log('a starting');\nexports.done = false;\nconst b = require('./b.js');\nconsole.log('in a, b.done = %j', b.done);\nexports.done = true;\nconsole.log('a done');\n</code></pre>\n<p><code>b.js</code>:</p>\n<pre><code>console.log('b starting');\nexports.done = false;\nconst a = require('./a.js');\nconsole.log('in b, a.done = %j', a.done);\nexports.done = true;\nconsole.log('b done');\n</code></pre>\n<p><code>main.js</code>:</p>\n<pre><code>console.log('main starting');\nconst a = require('./a.js');\nconst b = require('./b.js');\nconsole.log('in main, a.done = %j, b.done = %j', a.done, b.done);\n</code></pre>\n<p>When <code>main.js</code> loads <code>a.js</code>, then <code>a.js</code> in turn loads <code>b.js</code>. At that point, <code>b.js</code> tries to load <code>a.js</code>. In order to prevent an infinite loop, an unfinished copy of the <code>a.js</code> exports object is returned to the <code>b.js</code> module. <code>b.js</code> then finishes loading, and its <code>exports</code> object is provided to the <code>a.js</code> module.</p>\n<p>By the time <code>main.js</code> has loaded both modules, they're both finished. The output of this program would thus be:</p>\n<pre><code>$ node main.js\nmain starting\na starting\nb starting\nin b, a.done = false\nb done\nin a, b.done = true\na done\nin main, a.done = true, b.done = true\n</code></pre>\n<p>Careful planning is required to allow cyclic module dependencies to work correctly within an application.</p>\n<h3>File modules<a href=\"https://nodejs.org/api/modules.html#modules_file_modules\">#</a></h3>\n<p>If the exact filename is not found, then Node.js will attempt to load the required filename with the added extensions: <code>.js</code>, <code>.json</code>, and finally <code>.node</code>.</p>\n<p><code>.js</code> files are interpreted as JavaScript text files, and <code>.json</code> files are parsed as JSON text files. <code>.node</code> files are interpreted as compiled addon modules loaded with <code>process.dlopen()</code>.</p>\n<p>A required module prefixed with <code>'/'</code> is an absolute path to the file. For example, <code>require('/home/marco/foo.js')</code> will load the file at <code>/home/marco/foo.js</code>.</p>\n<p>A required module prefixed with <code>'./'</code> is relative to the file calling <code>require()</code>. That is, <code>circle.js</code> must be in the same directory as <code>foo.js</code> for <code>require('./circle')</code> to find it.</p>\n<p>Without a leading <code>'/'</code>, <code>'./'</code>, or <code>'../'</code> to indicate a file, the module must either be a core module or is loaded from a <code>node_modules</code> folder.</p>\n<p>If the given path does not exist, <code>require()</code> will throw an <a href=\"https://nodejs.org/api/errors.html#errors_class_error\"><code>Error</code></a> with its <code>code</code> property set to <code>'MODULE_NOT_FOUND'</code>.</p>\n<h3>Folders as modules<a href=\"https://nodejs.org/api/modules.html#modules_folders_as_modules\">#</a></h3>\n<p>It is convenient to organize programs and libraries into self-contained directories, and then provide a single entry point to those directories. There are three ways in which a folder may be passed to <code>require()</code> as an argument.</p>\n<p>The first is to create a <a href=\"https://nodejs.org/api/packages.html#packages_node_js_package_json_field_definitions\"><code>package.json</code></a> file in the root of the folder, which specifies a <code>main</code> module. An example <a href=\"https://nodejs.org/api/packages.html#packages_node_js_package_json_field_definitions\"><code>package.json</code></a> file might look like this:</p>\n<pre><code>{ \"name\" : \"some-library\",\n  \"main\" : \"./lib/some-library.js\" }\n</code></pre>\n<p>If this was in a folder at <code>./some-library</code>, then <code>require('./some-library')</code> would attempt to load <code>./some-library/lib/some-library.js</code>.</p>\n<p>This is the extent of the awareness of <code>package.json</code> files within Node.js.</p>\n<p>If there is no <a href=\"https://nodejs.org/api/packages.html#packages_node_js_package_json_field_definitions\"><code>package.json</code></a> file present in the directory, or if the <a href=\"https://nodejs.org/api/packages.html#packages_main\"><code>\"main\"</code></a> entry is missing or cannot be resolved, then Node.js will attempt to load an <code>index.js</code> or <code>index.node</code> file out of that directory. For example, if there was no <a href=\"https://nodejs.org/api/packages.html#packages_node_js_package_json_field_definitions\"><code>package.json</code></a> file in the previous example, then <code>require('./some-library')</code> would attempt to load:</p>\n<ul>\n<li><code>./some-library/index.js</code></li>\n<li><code>./some-library/index.node</code></li>\n</ul>\n<p>If these attempts fail, then Node.js will report the entire module as missing with the default error:</p>\n<pre><code>Error: Cannot find module 'some-library'\n</code></pre>\n<h3>Loading from <code>node_modules</code> folders<a href=\"https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders\">#</a></h3>\n<p>If the module identifier passed to <code>require()</code> is not a <a href=\"https://nodejs.org/api/modules.html#modules_core_modules\">core</a> module, and does not begin with <code>'/'</code>, <code>'../'</code>, or <code>'./'</code>, then Node.js starts at the parent directory of the current module, and adds <code>/node_modules</code>, and attempts to load the module from that location. Node.js will not append <code>node_modules</code> to a path already ending in <code>node_modules</code>.</p>\n<p>If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached.</p>\n<p>For example, if the file at <code>'/home/ry/projects/foo.js'</code> called <code>require('bar.js')</code>, then Node.js would look in the following locations, in this order:</p>\n<ul>\n<li><code>/home/ry/projects/node_modules/bar.js</code></li>\n<li><code>/home/ry/node_modules/bar.js</code></li>\n<li><code>/home/node_modules/bar.js</code></li>\n<li><code>/node_modules/bar.js</code></li>\n</ul>\n<p>This allows programs to localize their dependencies, so that they do not clash.</p>\n<p>It is possible to require specific files or sub modules distributed with a module by including a path suffix after the module name. For instance <code>require('example-module/path/to/file')</code> would resolve <code>path/to/file</code> relative to where <code>example-module</code> is located. The suffixed path follows the same module resolution semantics.</p>\n<h3>Loading from the global folders<a href=\"https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders\">#</a></h3>\n<p>If the <code>NODE_PATH</code> environment variable is set to a colon-delimited list of absolute paths, then Node.js will search those paths for modules if they are not found elsewhere.</p>\n<p>On Windows, <code>NODE_PATH</code> is delimited by semicolons (<code>;</code>) instead of colons.</p>\n<p><code>NODE_PATH</code> was originally created to support loading modules from varying paths before the current <a href=\"https://nodejs.org/api/modules.html#modules_all_together\">module resolution</a> algorithm was defined.</p>\n<p><code>NODE_PATH</code> is still supported, but is less necessary now that the Node.js ecosystem has settled on a convention for locating dependent modules. Sometimes deployments that rely on <code>NODE_PATH</code> show surprising behavior when people are unaware that <code>NODE_PATH</code> must be set. Sometimes a module's dependencies change, causing a different version (or even a different module) to be loaded as the <code>NODE_PATH</code> is searched.</p>\n<p>Additionally, Node.js will search in the following list of GLOBAL_FOLDERS:</p>\n<ul>\n<li>1: <code>$HOME/.node_modules</code></li>\n<li>2: <code>$HOME/.node_libraries</code></li>\n<li>3: <code>$PREFIX/lib/node</code></li>\n</ul>\n<p>Where <code>$HOME</code> is the user's home directory, and <code>$PREFIX</code> is the Node.js configured <code>node_prefix</code>.</p>\n<p>These are mostly for historic reasons.</p>\n<p>It is strongly encouraged to place dependencies in the local <code>node_modules</code> folder. These will be loaded faster, and more reliably.</p>\n<h3>The module wrapper<a href=\"https://nodejs.org/api/modules.html#modules_the_module_wrapper\">#</a></h3>\n<p>Before a module's code is executed, Node.js will wrap it with a function wrapper that looks like the following:</p>\n<pre><code>(function(exports, require, module, __filename, __dirname) {\n// Module code actually lives in here\n});\n</code></pre>\n<p>By doing this, Node.js achieves a few things:</p>\n<ul>\n<li>It keeps top-level variables (defined with <code>var</code>, <code>const</code> or <code>let</code>) scoped to the module rather than the global object.</li>\n<li>\n<p>It helps to provide some global-looking variables that are actually specific to the module, such as:</p>\n<ul>\n<li>The <code>module</code> and <code>exports</code> objects that the implementor can use to export values from the module.</li>\n<li>The convenience variables <code>__filename</code> and <code>__dirname</code>, containing the module's absolute filename and directory path.</li>\n</ul>\n</li>\n</ul>\n<h3>The module scope<a href=\"https://nodejs.org/api/modules.html#modules_the_module_scope\">#</a></h3>\n<h4><code>__dirname</code><a href=\"https://nodejs.org/api/modules.html#modules_dirname\">#</a></h4>\n<p>Added in: v0.1.27</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n</ul>\n<p>The directory name of the current module. This is the same as the <a href=\"https://nodejs.org/api/path.html#path_path_dirname_path\"><code>path.dirname()</code></a> of the <a href=\"https://nodejs.org/api/modules.html#modules_filename\"><code>__filename</code></a>.</p>\n<p>Example: running <code>node example.js</code> from <code>/Users/mjr</code></p>\n<pre><code>console.log(__dirname);\n// Prints: /Users/mjr\nconsole.log(path.dirname(__filename));\n// Prints: /Users/mjr\n</code></pre>\n<h4><code>__filename</code><a href=\"https://nodejs.org/api/modules.html#modules_filename\">#</a></h4>\n<p>Added in: v0.0.1</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n</ul>\n<p>The file name of the current module. This is the current module file's absolute path with symlinks resolved.</p>\n<p>For a main program this is not necessarily the same as the file name used in the command line.</p>\n<p>See <a href=\"https://nodejs.org/api/modules.html#modules_dirname\"><code>__dirname</code></a> for the directory name of the current module.</p>\n<p>Examples:</p>\n<p>Running <code>node example.js</code> from <code>/Users/mjr</code></p>\n<pre><code>console.log(__filename);\n// Prints: /Users/mjr/example.js\nconsole.log(__dirname);\n// Prints: /Users/mjr\n</code></pre>\n<p>Given two modules: <code>a</code> and <code>b</code>, where <code>b</code> is a dependency of <code>a</code> and there is a directory structure of:</p>\n<ul>\n<li><code>/Users/mjr/app/a.js</code></li>\n<li><code>/Users/mjr/app/node_modules/b/b.js</code></li>\n</ul>\n<p>References to <code>__filename</code> within <code>b.js</code> will return <code>/Users/mjr/app/node_modules/b/b.js</code> while references to <code>__filename</code> within <code>a.js</code> will return <code>/Users/mjr/app/a.js</code>.</p>\n<h4><code>exports</code><a href=\"https://nodejs.org/api/modules.html#modules_exports\">#</a></h4>\n<p>Added in: v0.1.12</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\"><Object></a></li>\n</ul>\n<p>A reference to the <code>module.exports</code> that is shorter to type. See the section about the <a href=\"https://nodejs.org/api/modules.html#modules_exports_shortcut\">exports shortcut</a> for details on when to use <code>exports</code> and when to use <code>module.exports</code>.</p>\n<h4><code>module</code><a href=\"https://nodejs.org/api/modules.html#modules_module\">#</a></h4>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://nodejs.org/api/modules.html#modules_the_module_object\"><module></a></li>\n</ul>\n<p>A reference to the current module, see the section about the <a href=\"https://nodejs.org/api/modules.html#modules_the_module_object\"><code>module</code> object</a>. In particular, <code>module.exports</code> is used for defining what a module exports and makes available through <code>require()</code>.</p>\n<h4><code>require(id)</code><a href=\"https://nodejs.org/api/modules.html#modules_require_id\">#</a></h4>\n<p>Added in: v0.1.13</p>\n<ul>\n<li><code>id</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a> module name or path</li>\n<li>Returns: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types\"><any></a> exported module content</li>\n</ul>\n<p>Used to import modules, <code>JSON</code>, and local files. Modules can be imported from <code>node_modules</code>. Local modules and JSON files can be imported using a relative path (e.g. <code>./</code>, <code>./foo</code>, <code>./bar/baz</code>, <code>../foo</code>) that will be resolved against the directory named by <a href=\"https://nodejs.org/api/modules.html#modules_dirname\"><code>__dirname</code></a> (if defined) or the current working directory. The relative paths of POSIX style are resolved in an OS independent fashion, meaning that the examples above will work on Windows in the same way they would on Unix systems.</p>\n<pre><code>// Importing a local module with a path relative to the `__dirname` or current\n// working directory. (On Windows, this would resolve to .\\path\\myLocalModule.)\nconst myLocalModule = require('./path/myLocalModule');\n\n// Importing a JSON file:\nconst jsonData = require('./path/filename.json');\n\n// Importing a module from node_modules or Node.js built-in module:\nconst crypto = require('crypto');\n</code></pre>\n<h5><code>require.cache</code><a href=\"https://nodejs.org/api/modules.html#modules_require_cache\">#</a></h5>\n<p>Added in: v0.3.0</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\"><Object></a></li>\n</ul>\n<p>Modules are cached in this object when they are required. By deleting a key value from this object, the next <code>require</code> will reload the module. This does not apply to <a href=\"https://nodejs.org/api/addons.html\">native addons</a>, for which reloading will result in an error.</p>\n<p>Adding or replacing entries is also possible. This cache is checked before native modules and if a name matching a native module is added to the cache, only <code>node:</code>-prefixed require calls are going to receive the native module. Use with care!</p>\n<pre><code>const assert = require('assert');\nconst realFs = require('fs');\n\nconst fakeFs = {};\nrequire.cache.fs = { exports: fakeFs };\n\nassert.strictEqual(require('fs'), fakeFs);\nassert.strictEqual(require('node:fs'), realFs);\n</code></pre>\n<h5><code>require.extensions</code><a href=\"https://nodejs.org/api/modules.html#modules_require_extensions\">#</a></h5>\n<p>Added in: v0.3.0Deprecated since: v0.10.6</p>\n<p><a href=\"https://nodejs.org/api/documentation.html#documentation_stability_index\">Stability: 0</a> - Deprecated</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\"><Object></a></li>\n</ul>\n<p>Instruct <code>require</code> on how to handle certain file extensions.</p>\n<p>Process files with the extension <code>.sjs</code> as <code>.js</code>:</p>\n<pre><code>require.extensions['.sjs'] = require.extensions['.js'];\n</code></pre>\n<p>Deprecated. In the past, this list has been used to load non-JavaScript modules into Node.js by compiling them on-demand. However, in practice, there are much better ways to do this, such as loading modules via some other Node.js program, or compiling them to JavaScript ahead of time.</p>\n<p>Avoid using <code>require.extensions</code>. Use could cause subtle bugs and resolving the extensions gets slower with each registered extension.</p>\n<h5><code>require.main</code><a href=\"https://nodejs.org/api/modules.html#modules_require_main\">#</a></h5>\n<p>Added in: v0.1.17</p>\n<ul>\n<li><a href=\"https://nodejs.org/api/modules.html#modules_the_module_object\"><module></a></li>\n</ul>\n<p>The <code>Module</code> object representing the entry script loaded when the Node.js process launched. See <a href=\"https://nodejs.org/api/modules.html#modules_accessing_the_main_module\">\"Accessing the main module\"</a>.</p>\n<p>In <code>entry.js</code> script:</p>\n<pre><code>console.log(require.main);\n</code></pre>\n<pre><code>node entry.js\n</code></pre>\n<pre><code>Module {\n  id: '.',\n  path: '/absolute/path/to',\n  exports: {},\n  filename: '/absolute/path/to/entry.js',\n  loaded: false,\n  children: [],\n  paths:\n   [ '/absolute/path/to/node_modules',\n     '/absolute/path/node_modules',\n     '/absolute/node_modules',\n     '/node_modules' ] }\n</code></pre>\n<h5><code>require.resolve(request[, options])</code><a href=\"https://nodejs.org/api/modules.html#modules_require_resolve_request_options\">#</a></h5>\n<p>History</p>\n<ul>\n<li><code>request</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a> The module path to resolve.</li>\n<li>\n<p><code>options</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\"><Object></a></p>\n<ul>\n<li><code>paths</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\">&#x3C;string[]></a> Paths to resolve module location from. If present, these paths are used instead of the default resolution paths, with the exception of <a href=\"https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders\">GLOBAL_FOLDERS</a> like <code>$HOME/.node_modules</code>, which are always included. Each of these paths is used as a starting point for the module resolution algorithm, meaning that the <code>node_modules</code> hierarchy is checked from this location.</li>\n</ul>\n</li>\n<li>Returns: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n</ul>\n<p>Use the internal <code>require()</code> machinery to look up the location of a module, but rather than loading the module, just return the resolved filename.</p>\n<p>If the module can not be found, a <code>MODULE_NOT_FOUND</code> error is thrown.</p>\n<h6><code>require.resolve.paths(request)</code><a href=\"https://nodejs.org/api/modules.html#modules_require_resolve_paths_request\">#</a></h6>\n<p>Added in: v8.9.0</p>\n<ul>\n<li><code>request</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a> The module path whose lookup paths are being retrieved.</li>\n<li>Returns: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\">&#x3C;string[]></a> | <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type\"><null></a></li>\n</ul>\n<p>Returns an array containing the paths searched during resolution of <code>request</code> or <code>null</code> if the <code>request</code> string references a core module, for example <code>http</code> or <code>fs</code>.</p>\n<h3>The <code>module</code> object<a href=\"https://nodejs.org/api/modules.html#modules_the_module_object\">#</a></h3>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\"><Object></a></li>\n</ul>\n<p>In each module, the <code>module</code> free variable is a reference to the object representing the current module. For convenience, <code>module.exports</code> is also accessible via the <code>exports</code> module-global. <code>module</code> is not actually a global but rather local to each module.</p>\n<h4><code>module.children</code><a href=\"https://nodejs.org/api/modules.html#modules_module_children\">#</a></h4>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://nodejs.org/api/modules.html#modules_the_module_object\">&#x3C;module[]></a></li>\n</ul>\n<p>The module objects required for the first time by this one.</p>\n<h4><code>module.exports</code><a href=\"https://nodejs.org/api/modules.html#modules_module_exports\">#</a></h4>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\"><Object></a></li>\n</ul>\n<p>The <code>module.exports</code> object is created by the <code>Module</code> system. Sometimes this is not acceptable; many want their module to be an instance of some class. To do this, assign the desired export object to <code>module.exports</code>. Assigning the desired object to <code>exports</code> will simply rebind the local <code>exports</code> variable, which is probably not what is desired.</p>\n<p>For example, suppose we were making a module called <code>a.js</code>:</p>\n<pre><code>const EventEmitter = require('events');\n\nmodule.exports = new EventEmitter();\n\n// Do some work, and after some time emit\n// the 'ready' event from the module itself.\nsetTimeout(() => {\n  module.exports.emit('ready');\n}, 1000);\n</code></pre>\n<p>Then in another file we could do:</p>\n<pre><code>const a = require('./a');\na.on('ready', () => {\n  console.log('module \"a\" is ready');\n});\n</code></pre>\n<p>Assignment to <code>module.exports</code> must be done immediately. It cannot be done in any callbacks. This does not work:</p>\n<p><code>x.js</code>:</p>\n<pre><code>setTimeout(() => {\n  module.exports = { a: 'hello' };\n}, 0);\n</code></pre>\n<p><code>y.js</code>:</p>\n<pre><code>const x = require('./x');\nconsole.log(x.a);\n</code></pre>\n<h5><code>exports</code> shortcut<a href=\"https://nodejs.org/api/modules.html#modules_exports_shortcut\">#</a></h5>\n<p>Added in: v0.1.16</p>\n<p>The <code>exports</code> variable is available within a module's file-level scope, and is assigned the value of <code>module.exports</code> before the module is evaluated.</p>\n<p>It allows a shortcut, so that <code>module.exports.f = ...</code> can be written more succinctly as <code>exports.f = ...</code>. However, be aware that like any variable, if a new value is assigned to <code>exports</code>, it is no longer bound to <code>module.exports</code>:</p>\n<pre><code>module.exports.hello = true; // Exported from require of module\nexports = { hello: false };  // Not exported, only available in the module\n</code></pre>\n<p>When the <code>module.exports</code> property is being completely replaced by a new object, it is common to also reassign <code>exports</code>:</p>\n<pre><code>module.exports = exports = function Constructor() {\n  // ... etc.\n};\n</code></pre>\n<p>To illustrate the behavior, imagine this hypothetical implementation of <code>require()</code>, which is quite similar to what is actually done by <code>require()</code>:</p>\n<pre><code>function require(/* ... */) {\n  const module = { exports: {} };\n  ((module, exports) => {\n    // Module code here. In this example, define a function.\n    function someFunc() {}\n    exports = someFunc;\n    // At this point, exports is no longer a shortcut to module.exports, and\n    // this module will still export an empty default object.\n    module.exports = someFunc;\n    // At this point, the module will now export someFunc, instead of the\n    // default object.\n  })(module, module.exports);\n  return module.exports;\n}\n</code></pre>\n<h4><code>module.filename</code><a href=\"https://nodejs.org/api/modules.html#modules_module_filename\">#</a></h4>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n</ul>\n<p>The fully resolved filename of the module.</p>\n<h4><code>module.id</code><a href=\"https://nodejs.org/api/modules.html#modules_module_id\">#</a></h4>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n</ul>\n<p>The identifier for the module. Typically this is the fully resolved filename.</p>\n<h4><code>module.isPreloading</code><a href=\"https://nodejs.org/api/modules.html#modules_module_ispreloading\">#</a></h4>\n<p>Added in: v15.4.0</p>\n<ul>\n<li>Type: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type\"><boolean></a> <code>true</code> if the module is running during the Node.js preload phase.</li>\n</ul>\n<h4><code>module.loaded</code><a href=\"https://nodejs.org/api/modules.html#modules_module_loaded\">#</a></h4>\n<p>Added in: v0.1.16</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type\"><boolean></a></li>\n</ul>\n<p>Whether or not the module is done loading, or is in the process of loading.</p>\n<h4><code>module.parent</code><a href=\"https://nodejs.org/api/modules.html#modules_module_parent\">#</a></h4>\n<p>Added in: v0.1.16Deprecated since: v14.6.0, v12.19.0</p>\n<p><a href=\"https://nodejs.org/api/documentation.html#documentation_stability_index\">Stability: 0</a> - Deprecated: Please use <a href=\"https://nodejs.org/api/modules.html#modules_require_main\"><code>require.main</code></a> and <a href=\"https://nodejs.org/api/modules.html#modules_module_children\"><code>module.children</code></a> instead.</p>\n<ul>\n<li><a href=\"https://nodejs.org/api/modules.html#modules_the_module_object\"><module></a> | <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type\"><null></a> | <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type\"><undefined></a></li>\n</ul>\n<p>The module that first required this one, or <code>null</code> if the current module is the entry point of the current process, or <code>undefined</code> if the module was loaded by something that is not a CommonJS module (E.G.: REPL or <code>import</code>).</p>\n<h4><code>module.path</code><a href=\"https://nodejs.org/api/modules.html#modules_module_path\">#</a></h4>\n<p>Added in: v11.14.0</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n</ul>\n<p>The directory name of the module. This is usually the same as the <a href=\"https://nodejs.org/api/path.html#path_path_dirname_path\"><code>path.dirname()</code></a> of the <a href=\"https://nodejs.org/api/modules.html#modules_module_id\"><code>module.id</code></a>.</p>\n<h4><code>module.paths</code><a href=\"https://nodejs.org/api/modules.html#modules_module_paths\">#</a></h4>\n<p>Added in: v0.4.0</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\">&#x3C;string[]></a></li>\n</ul>\n<p>The search paths for the module.</p>\n<h4><code>module.require(id)</code><a href=\"https://nodejs.org/api/modules.html#modules_module_require_id\">#</a></h4>\n<p>Added in: v0.5.1</p>\n<ul>\n<li><code>id</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\"><string></a></li>\n<li>Returns: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types\"><any></a> exported module content</li>\n</ul>\n<p>The <code>module.require()</code> method provides a way to load a module as if <code>require()</code> was called from the original module.</p>\n<p>In order to do this, it is necessary to get a reference to the <code>module</code> object. Since <code>require()</code> returns the <code>module.exports</code>, and the <code>module</code> is typically <em>only</em> available within a specific module's code, it must be explicitly exported in order to be used.</p>\n<h3>The <code>Module</code> object<a href=\"https://nodejs.org/api/modules.html#modules_the_module_object_1\">#</a></h3>\n<p>This section was moved to <a href=\"https://nodejs.org/api/module.html#module_the_module_object\">Modules: <code>module</code> core module</a>.</p>\n<ul>\n<li><a href=\"https://nodejs.org/api/module.html#module_module_builtinmodules\"><code>module.builtinModules</code></a></li>\n<li><a href=\"https://nodejs.org/api/module.html#module_module_createrequire_filename\"><code>module.createRequire(filename)</code></a></li>\n<li><a href=\"https://nodejs.org/api/module.html#module_module_syncbuiltinesmexports\"></a></li>\n</ul>"},{"url":"/docs/articles/npm/","relativePath":"docs/articles/npm.md","relativeDir":"docs/articles","base":"npm.md","name":"npm","frontmatter":{"title":"Introduction to npm","weight":0,"excerpt":"npm is the standard package manager for nodejs","seo":{"title":"npm","description":"npm is the standard package manager for Node.js.\nIn January 2017 over 350000 packages were reported being listed in the npm registry.\n","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Introduction to npm</h2>\n<p><code>npm</code> is the standard package manager for Node.js.</p>\n<p>In January 2017 over 350000 packages were reported being listed in the npm registry, making it the biggest single language code repository on Earth, and you can be sure there is a package for (almost!) everything.</p>\n<p>It started as a way to download and manage dependencies of Node.js packages, but it has since become a tool used also in frontend JavaScript.</p>\n<p>There are many things that <code>npm</code> does.</p>\n<blockquote>\n<p><a href=\"https://yarnpkg.com/en/\"><strong>Yarn</strong></a> is an alternative to npm. Make sure you check it out as well.</p>\n</blockquote>\n<h2>Downloads</h2>\n<p><code>npm</code> manages downloads of dependencies of your project.</p>\n<h3>Installing all dependencies</h3>\n<p>If a project has a <code>package.json</code> file, by running</p>\n<pre><code class=\"language-bash\">npm install\n</code></pre>\n<p>it will install everything the project needs, in the <code>node_modules</code> folder, creating it if it's not existing already.</p>\n<h3>Installing a single package</h3>\n<p>You can also install a specific package by running</p>\n<pre><code class=\"language-bash\">npm install &#x3C;package-name>\n</code></pre>\n<p>Often you'll see more flags added to this command:</p>\n<ul>\n<li><code>--save</code> installs and adds the entry to the <code>package.json</code> file <em>dependencies</em></li>\n<li><code>--save-dev</code> installs and adds the entry to the <code>package.json</code> file <em>devDependencies</em></li>\n</ul>\n<p>The difference is mainly that devDependencies are usually development tools, like a testing library, while <code>dependencies</code> are bundled with the app in production.</p>\n<h3>Updating packages</h3>\n<p>Updating is also made easy, by running</p>\n<pre><code class=\"language-console\">npm update\n</code></pre>\n<p><code>npm</code> will check all packages for a newer version that satisfies your versioning constraints.</p>\n<p>You can specify a single package to update as well:</p>\n<pre><code class=\"language-console\">npm update &#x3C;package-name>\n</code></pre>\n<h2>Versioning</h2>\n<p>In addition to plain downloads, <code>npm</code> also manages <strong>versioning</strong>, so you can specify any specific version of a package, or require a version higher or lower than what you need.</p>\n<p>Many times you'll find that a library is only compatible with a major release of another library.</p>\n<p>Or a bug in the latest release of a lib, still unfixed, is causing an issue.</p>\n<p>Specifying an explicit version of a library also helps to keep everyone on the same exact version of a package, so that the whole team runs the same version until the <code>package.json</code> file is updated.</p>\n<p>In all those cases, versioning helps a lot, and <code>npm</code> follows the semantic versioning (semver) standard.</p>\n<h2>Running Tasks</h2>\n<p>The package.json file supports a format for specifying command line tasks that can be run by using</p>\n<pre><code class=\"language-console\">npm run &#x3C;task-name>\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"language-json\">{\n    \"scripts\": {\n        \"start-dev\": \"node lib/server-development\",\n        \"start\": \"node lib/server-production\"\n    }\n}\n</code></pre>\n<p>It's very common to use this feature to run Webpack:</p>\n<pre><code class=\"language-json\">{\n    \"scripts\": {\n        \"watch\": \"webpack --watch --progress --colors --config webpack.conf.js\",\n        \"dev\": \"webpack --progress --colors --config webpack.conf.js\",\n        \"prod\": \"NODE_ENV=production webpack -p --config webpack.conf.js\"\n    }\n}\n</code></pre>\n<p>So instead of typing those long commands, which are easy to forget or mistype, you can run</p>\n<pre><code class=\"language-console\">$ npm run watch\n$ npm run dev\n$ npm run prod\n</code></pre>"},{"url":"/docs/articles/npx/","relativePath":"docs/articles/npx.md","relativeDir":"docs/articles","base":"npx.md","name":"npx","frontmatter":{"title":"The npx Node.js Package Runner","sections":[],"seo":{"title":"","description":"npx is a very cool way to run Node.js code, and provides many useful features","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>NPX:</h1>\n<p><code>npx</code> is a very powerful command that's been available in <strong>npm</strong> starting version 5.2, released in July 2017.</p>\n<blockquote>\n<p>If you don't want to install npm, you can <a href=\"https://www.npmjs.com/package/npx\">install npx as a standalone package</a></p>\n</blockquote>\n<p><code>npx</code> lets you run code built with Node.js and published through the npm registry.</p>\n<h2>Easily run local commands</h2>\n<p>Node.js developers used to publish most of the executable commands as global packages, in order for them to be in the path and executable immediately.</p>\n<p>This was a pain because you could not really install different versions of the same command.</p>\n<p>Running <code>npx commandname</code> automatically finds the correct reference of the command inside the <code>node_modules</code> folder of a project, without needing to know the exact path, and without requiring the package to be installed globally and in the user's path.</p>\n<h2>Installation-less command execution</h2>\n<p>There is another great feature of <code>npx</code>, which is allowing to run commands without first installing them.</p>\n<p>This is pretty useful, mostly because:</p>\n<ol>\n<li>you don't need to install anything</li>\n<li>you can run different versions of the same command, using the syntax @version</li>\n</ol>\n<p>A typical demonstration of using <code>npx</code> is through the <code>cowsay</code> command. <code>cowsay</code> will print a cow saying what you wrote in the command. For example:</p>\n<p><code>cowsay \"Hello\"</code> will print</p>\n<pre><code> _______\n&#x3C; Hello >\n -------\n        \\   ^__^\n         \\  (oo)\\_______\n            (__)\\       )\\/\\\n                ||----w |\n                ||     ||\n</code></pre>\n<p>This only works if you have the <code>cowsay</code> command globally installed from npm previously. Otherwise you'll get an error when you try to run the command.</p>\n<p><code>npx</code> allows you to run that npm command without having it installed locally:</p>\n<pre><code class=\"language-bash\">npx cowsay \"Hello\"\n</code></pre>\n<p>will do the job.</p>\n<p>Now, this is a funny useless command.\nOther scenarios include:</p>\n<ul>\n<li>running the <code>vue</code> CLI tool to create new applications and run them: <code>npx @vue/cli create my-vue-app</code></li>\n<li>creating a new React app using <code>create-react-app</code>: <code>npx create-react-app my-react-app</code></li>\n</ul>\n<p>and many more.</p>\n<p>Once downloaded, the downloaded code will be wiped.</p>\n<h2>Run some code using a different Node.js version</h2>\n<p>Use the <code>@</code> to specify the version, and combine that with the <a href=\"https://www.npmjs.com/package/node\"><code>node</code> npm package</a>:</p>\n<pre><code class=\"language-bash\">npx node@10 -v #v10.18.1\nnpx node@12 -v #v12.14.1\n</code></pre>\n<p>This helps to avoid tools like <code>nvm</code> or the other Node.js version management tools.</p>\n<h2>Run arbitrary code snippets directly from a URL</h2>\n<p><code>npx</code> does not limit you to the packages published on the npm registry.</p>\n<p>You can run code that sits in a GitHub gist, for example:</p>\n<pre><code class=\"language-bash\">npx https://gist.github.com/zkat/4bc19503fe9e9309e2bfaa2c58074d32\n</code></pre>\n<p>Of course, you need to be careful when running code that you do not control, as with great power comes great responsibility.</p>"},{"url":"/docs/articles/os-module/","relativePath":"docs/articles/os-module.md","relativeDir":"docs/articles","base":"os-module.md","name":"os-module","frontmatter":{"title":"OS-Module","sections":[],"seo":{"title":"","description":"OS-Module","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>This module provides many functions that you can use to retrieve information from the underlying operating system and the computer the program runs on, and interact with it.</h1>\n<pre><code class=\"language-js\">const os = require('os');\n</code></pre>\n<p>There are a few useful properties that tell us some key things related to handling files:</p>\n<p><code>os.EOL</code> gives the line delimiter sequence. It's <code>\\n</code> on Linux and macOS, and <code>\\r\\n</code> on Windows.</p>\n<p><code>os.constants.signals</code> tells us all the constants related to handling process signals, like SIGHUP, SIGKILL and so on.</p>\n<p><code>os.constants.errno</code> sets the constants for error reporting, like EADDRINUSE, EOVERFLOW and more.</p>\n<p>You can read them all on <a href=\"https://nodejs.org/api/os.html#os_signal_constants\">https://nodejs.org/api/os.html#os_signal_constants</a>.</p>\n<p>Let's now see the main methods that <code>os</code> provides:</p>\n<h2><code>os.arch()</code></h2>\n<p>Return the string that identifies the underlying architecture, like <code>arm</code>, <code>x64</code>, <code>arm64</code>.</p>\n<h2><code>os.cpus()</code></h2>\n<p>Return information on the CPUs available on your system.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">[\n    {\n        model: 'Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz',\n        speed: 2400,\n        times: {\n            user: 281685380,\n            nice: 0,\n            sys: 187986530,\n            idle: 685833750,\n            irq: 0\n        }\n    },\n    {\n        model: 'Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz',\n        speed: 2400,\n        times: {\n            user: 282348700,\n            nice: 0,\n            sys: 161800480,\n            idle: 703509470,\n            irq: 0\n        }\n    }\n];\n</code></pre>\n<h2><code>os.endianness()</code></h2>\n<p>Return <code>BE</code> or <code>LE</code> depending if Node.js was compiled with <a href=\"https://en.wikipedia.org/wiki/Endianness\">Big Endian or Little Endian</a>.</p>\n<h2><code>os.freemem()</code></h2>\n<p>Return the number of bytes that represent the free memory in the system.</p>\n<h2><code>os.homedir()</code></h2>\n<p>Return the path to the home directory of the current user.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">'/Users/joe';\n</code></pre>\n<h2><code>os.hostname()</code></h2>\n<p>Return the host name.</p>\n<h2><code>os.loadavg()</code></h2>\n<p>Return the calculation made by the operating system on the load average.</p>\n<p>It only returns a meaningful value on Linux and macOS.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">[3.68798828125, 4.00244140625, 11.1181640625];\n</code></pre>\n<h2><code>os.networkInterfaces()</code></h2>\n<p>Returns the details of the network interfaces available on your system.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">{ lo0:\n   [ { address: '127.0.0.1',\n       netmask: '255.0.0.0',\n       family: 'IPv4',\n       mac: 'fe:82:00:00:00:00',\n       internal: true },\n     { address: '::1',\n       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',\n       family: 'IPv6',\n       mac: 'fe:82:00:00:00:00',\n       scopeid: 0,\n       internal: true },\n     { address: 'fe80::1',\n       netmask: 'ffff:ffff:ffff:ffff::',\n       family: 'IPv6',\n       mac: 'fe:82:00:00:00:00',\n       scopeid: 1,\n       internal: true } ],\n  en1:\n   [ { address: 'fe82::9b:8282:d7e6:496e',\n       netmask: 'ffff:ffff:ffff:ffff::',\n       family: 'IPv6',\n       mac: '06:00:00:02:0e:00',\n       scopeid: 5,\n       internal: false },\n     { address: '192.168.1.38',\n       netmask: '255.255.255.0',\n       family: 'IPv4',\n       mac: '06:00:00:02:0e:00',\n       internal: false } ],\n  utun0:\n   [ { address: 'fe80::2513:72bc:f405:61d0',\n       netmask: 'ffff:ffff:ffff:ffff::',\n       family: 'IPv6',\n       mac: 'fe:80:00:20:00:00',\n       scopeid: 8,\n       internal: false } ] }\n</code></pre>\n<h2><code>os.platform()</code></h2>\n<p>Return the platform that Node.js was compiled for:</p>\n<ul>\n<li><code>darwin</code></li>\n<li><code>freebsd</code></li>\n<li><code>linux</code></li>\n<li><code>openbsd</code></li>\n<li><code>win32</code></li>\n<li>...more</li>\n</ul>\n<h2><code>os.release()</code></h2>\n<p>Returns a string that identifies the operating system release number</p>\n<h2><code>os.tmpdir()</code></h2>\n<p>Returns the path to the assigned temp folder.</p>\n<h2><code>os.totalmem()</code></h2>\n<p>Returns the number of bytes that represent the total memory available in the system.</p>\n<h2><code>os.type()</code></h2>\n<p>Identifies the operating system:</p>\n<ul>\n<li><code>Linux</code></li>\n<li><code>Darwin</code> on macOS</li>\n<li><code>Windows_NT</code> on Windows</li>\n</ul>\n<h2><code>os.uptime()</code></h2>\n<p>Returns the number of seconds the computer has been running since it was last rebooted.</p>\n<h2><code>os.userInfo()</code></h2>\n<p>Returns an object that contains the current <code>username</code>, <code>uid</code>, <code>gid</code>, <code>shell</code>, and <code>homedir</code></p>"},{"url":"/docs/articles/reading-files/","relativePath":"docs/articles/reading-files.md","relativeDir":"docs/articles","base":"reading-files.md","name":"reading-files","frontmatter":{"title":"Reading Files","excerpt":"Web-Dev-Hubis a Unibit theme created for project documentations. You can use it for your project.","seo":{"title":"Reading files","description":"The simplest way to read a file in Node.js is to use the fs.readFile() method, passing it the file path, encoding and a callback function that will be called","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Reading files","keyName":"property"},{"name":"og:description","value":"This is the Reading files page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Reading files"},{"name":"twitter:description","value":"This is the Reading files page"}]},"template":"docs"},"html":"<p>The simplest way to read a file in Node.js is to use the <code>fs.readFile()</code> method, passing it the file path, encoding and a callback function that will be called with the file data (and the error):</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.readFile('/Users/joe/test.txt', 'utf8', (err, data) => {\n    if (err) {\n        console.error(err);\n        return;\n    }\n    console.log(data);\n});\n</code></pre>\n<p>Alternatively, you can use the synchronous version <code>fs.readFileSync()</code>:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    const data = fs.readFileSync('/Users/joe/test.txt', 'utf8');\n    console.log(data);\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>Both <code>fs.readFile()</code> and <code>fs.readFileSync()</code> read the full content of the file in memory before returning the data.</p>\n<p>This means that big files are going to have a major impact on your memory consumption and speed of execution of the program.</p>\n<p>In this case, a better option is to read the file content using streams.</p>"},{"url":"/docs/articles/semantic/","relativePath":"docs/articles/semantic.md","relativeDir":"docs/articles","base":"semantic.md","name":"semantic","frontmatter":{"title":"Semantic Versioning","sections":[],"seo":{"title":"","description":"Semantic Versioning using npm","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>If there's one great thing in Node.js packages, it's that they all agreed on using Semantic Versioning for their version numbering.</p>\n<p>The Semantic Versioning concept is simple: all versions have 3 digits: <code>x.y.z</code>.</p>\n<ul>\n<li>the first digit is the major version</li>\n<li>the second digit is the minor version</li>\n<li>the third digit is the patch version</li>\n</ul>\n<p>When you make a new release, you don't just up a number as you please, but you have rules:</p>\n<ul>\n<li>you up the major version when you make incompatible API changes</li>\n<li>you up the minor version when you add functionality in a backward-compatible manner</li>\n<li>you up the patch version when you make backward-compatible bug fixes</li>\n</ul>\n<p>The convention is adopted all across programming languages, and it is very important that every <code>npm</code> package adheres to it, because the whole system depends on that.</p>\n<p>Why is that so important?</p>\n<p>Because <code>npm</code> set some rules we can use in the <code>package.json</code> file to choose which versions it can update our packages to, when we run <code>npm update</code>.</p>\n<p>The rules use those symbols:</p>\n<ul>\n<li><code>^</code></li>\n<li><code>~</code></li>\n<li><code>></code></li>\n<li><code>>=</code></li>\n<li><code>&#x3C;</code></li>\n<li><code>&#x3C;=</code></li>\n<li><code>=</code></li>\n<li><code>-</code></li>\n<li><code>||</code></li>\n</ul>\n<p>Let's see those rules in detail:</p>\n<ul>\n<li><code>^</code>: It will only do updates that do not change the leftmost non-zero number. If you write <code>^0.13.0</code>, when running <code>npm update</code>, it can update to <code>0.13.1</code>, <code>0.13.2</code>, and so on, but not to <code>0.14.0</code> or above. If you write <code>^1.13.0</code>, when running <code>npm update</code>, it can update to <code>1.13.1</code>, <code>1.14.0</code> and so on, but will not update to <code>2.0.0</code> or above.</li>\n<li><code>~</code>: if you write <code>~0.13.0</code>, when running <code>npm update</code> it can update to patch releases: <code>0.13.1</code> is ok, but <code>0.14.0</code> is not.</li>\n<li><code>></code>: you accept any version higher than the one you specify</li>\n<li><code>>=</code>: you accept any version equal to or higher than the one you specify</li>\n<li><code>&#x3C;=</code>: you accept any version equal or lower to the one you specify</li>\n<li><code>&#x3C;</code>: you accept any version lower to the one you specify</li>\n<li><code>=</code>: you accept that exact version</li>\n<li><code>-</code>: you accept a range of versions. Example: <code>2.1.0 - 2.6.2</code></li>\n<li><code>||</code>: you combine sets. Example: <code>&#x3C; 2.1 || > 2.6</code></li>\n</ul>\n<p>You can combine some of those notations, for example use <code>1.0.0 || >=1.1.0 &#x3C;1.2.0</code> to either use 1.0.0 or one release from 1.1.0 up, but lower than 1.2.0.</p>\n<p>There are other rules, too:</p>\n<ul>\n<li>no symbol: you accept only that specific version you specify (<code>1.2.1</code>)</li>\n<li><code>latest</code>: you want to use the latest version available</li>\n</ul>"},{"url":"/docs/articles/node-js-language/","relativePath":"docs/articles/node-js-language.md","relativeDir":"docs/articles","base":"node-js-language.md","name":"node-js-language","frontmatter":{"title":"packagejson","weight":0,"excerpt":"The package.json file is a key element in lots of app codebases based on the Node.js ecosystem.","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>If you work with JavaScript, or you've ever interacted with a JavaScript project, Node.js or a frontend project, you surely met the package.json file.</p>\n<p>What's that for? What should you know about it, and what are some of the cool things you can do with it?</p>\n<p>The package.json file is kind of a manifest for your project. It can do a lot of things, completely unrelated. It's a central repository of configuration for tools, for example. It's also where npm and yarn store the names and versions for all the installed packages.</p>\n<h2>The file structure</h2>\n<p>Here's an example package.json file:</p>\n<p>It's empty! There are no fixed requirements of what should be in a package.json file, for an application. The only requirement is that it respects the JSON format, otherwise it cannot be read by programs that try to access its properties programmatically.</p>\n<p>If you're building a Node.js package that you want to distribute over npm things change radically, and you must have a set of properties that will help other people use it. We'll see more about this later on.</p>\n<p>This is another package.json:</p>\n<p>It defines a name property, which tells the name of the app, or package, that's contained in the same folder where this file lives.</p>\n<p>Here's a much more complex example, which was extracted from a sample Vue.js application:</p>\n<p>there are <em>lots</em> of things going on here:</p>\n<ul>\n<li>version indicates the current version</li>\n<li>name sets the application/package name</li>\n<li>description is a brief description of the app/package</li>\n<li>main set the entry point for the application</li>\n<li>private if set to true prevents the app/package to be accidentally published on npm</li>\n<li>scripts defines a set of node scripts you can run</li>\n<li>dependencies sets a list of npm packages installed as dependencies</li>\n<li>devDependencies sets a list of npm packages installed as development dependencies</li>\n<li>engines sets which versions of Node.js this package/app works on</li>\n<li>browserslist is used to tell which browsers (and their versions) you want to support</li>\n</ul>\n<p>All those properties are used by either npm or other tools that we can use.</p>\n<h2>Properties breakdown</h2>\n<p>This section describes the properties you can use in detail. We refer to \"package\" but the same thing applies to local applications which you do not use as packages.</p>\n<p>Most of those properties are only used on <a href=\"https://www.npmjs.com/\">https://www.npmjs.com/</a>, others by scripts that interact with your code, like npm or others.</p>\n<h3>name</h3>\n<p>Sets the package name.</p>\n<p>Example:</p>\n<p>The name must be less than 214 characters, must not have spaces, it can only contain lowercase letters, hyphens (-) or underscores (_).</p>\n<p>This is because when a package is published on npm, it gets its own URL based on this property.</p>\n<p>If you published this package publicly on GitHub, a good value for this property is the GitHub repository name.</p>\n<h3>author</h3>\n<p>Lists the package author name</p>\n<p>Example:</p>\n<p>Can also be used with this format:</p>\n<h3>contributors</h3>\n<p>As well as the author, the project can have one or more contributors. This property is an array that lists them.</p>\n<p>Example:</p>\n<p>Can also be used with this format:</p>\n<h3>bugs</h3>\n<p>Links to the package issue tracker, most likely a GitHub issues page</p>\n<p>Example:</p>\n<h3>homepage</h3>\n<p>Sets the package homepage</p>\n<p>Example:</p>\n<h3>version</h3>\n<p>Indicates the current version of the package.</p>\n<p>Example:</p>\n<p>This property follows the semantic versioning (semver) notation for versions, which means the version is always expressed with 3 numbers: x.x.x.</p>\n<p>The first number is the major version, the second the minor version and the third is the patch version.</p>\n<p>There is a meaning in these numbers: a release that only fixes bugs is a patch release, a release that introduces backward-compatible changes is a minor release, a major release can have breaking changes.</p>\n<h3>license</h3>\n<p>Indicates the license of the package.</p>\n<p>Example:</p>\n<h3>keywords</h3>\n<p>This property contains an array of keywords that associate with what your package does.</p>\n<p>Example:</p>\n<p>This helps people find your package when navigating similar packages, or when browsing the <a href=\"https://www.npmjs.com/\">https://www.npmjs.com/</a> website.</p>\n<h3>description</h3>\n<p>This property contains a brief description of the package</p>\n<p>Example:</p>\n<p>This is especially useful if you decide to publish your package to npm so that people can find out what the package is about.</p>\n<h3>repository</h3>\n<p>This property specifies where this package repository is located.</p>\n<p>Example:</p>\n<p>Notice the github prefix. There are other popular services baked in:</p>\n<p>You can explicitly set the version control system:</p>\n<p>You can use different version control systems:</p>\n<h3>main</h3>\n<p>Sets the entry point for the package.</p>\n<p>When you import this package in an application, that's where the application will search for the module exports.</p>\n<p>Example:</p>\n<h3>private</h3>\n<p>if set to true prevents the app/package to be accidentally published on npm</p>\n<p>Example:</p>\n<h3>scripts</h3>\n<p>Defines a set of node scripts you can run</p>\n<p>Example:</p>\n<p>These scripts are command line applications. You can run them by calling npm run XXXX or yarn XXXX, where XXXX is the command name. Example: npm run dev.</p>\n<p>You can use any name you want for a command, and scripts can do literally anything you want.</p>\n<h3>dependencies</h3>\n<p>Sets a list of npm packages installed as dependencies.</p>\n<p>When you install a package using npm or yarn:</p>\n<p>that package is automatically inserted in this list.</p>\n<p>Example:</p>\n<h3>devDependencies</h3>\n<p>Sets a list of npm packages installed as development dependencies.</p>\n<p>They differ from dependencies because they are meant to be installed only on a development machine, not needed to run the code in production.</p>\n<p>When you install a package using npm or yarn:</p>\n<p>that package is automatically inserted in this list.</p>\n<p>Example:</p>\n<h3>engines</h3>\n<p>Sets which versions of Node.js and other commands this package/app work on</p>\n<p>Example:</p>\n<h3>browserslist</h3>\n<p>Is used to tell which browsers (and their versions) you want to support. It's referenced by Babel, Autoprefixer, and other tools, to only add the polyfills and fallbacks needed to the browsers you target.</p>\n<p>Example:</p>\n<p>This configuration means you want to support the last 2 major versions of all browsers with at least 1% of usage (from the <a href=\"https://caniuse.com/\">CanIUse.com</a> stats), except IE8 and lower.</p>\n<p>(<a href=\"https://www.npmjs.com/package/browserslist\">see more</a>)</p>\n<h3>Command-specific properties</h3>\n<p>The package.json file can also host command-specific configuration, for example for Babel, ESLint, and more.</p>\n<p>Each has a specific property, like eslintConfig, babel and others. Those are command-specific, and you can find how to use those in the respective command/project documentation.</p>\n<h2>Package versions</h2>\n<p>You have seen in the description above version numbers like these: ~3.0.0 or ^0.13.0. What do they mean, and which other version specifiers can you use?</p>\n<p>That symbol specifies which updates your package accepts, from that dependency.</p>\n<p>Given that using semver (semantic versioning) all versions have 3 digits, the first being the major release, the second the minor release and the third is the patch release, you have these \"<a href=\"https://nodejs.dev/learn/semantic-versioning-using-npm/\">Rules</a>\".</p>\n<p>You can combine most of the versions in ranges, like this: 1.0.0 || >=1.1.0 &#x3C;1.2.0, to either use 1.0.0 or one release from 1.1.0 up, but lower than 1.2.0.</p>\n<h1>Cheat Sheet:</h1>\n<pre><code class=\"language-js\">/* *******************************************************************************************\n * SYNOPSIS\n * http://nodejs.org/api/synopsis.html\n * ******************************************************************************************* */\n\n\nvar http = require('http');\n\n// An example of a web server written with Node which responds with 'Hello World'.\n// To run the server, put the code into a file called example.js and execute it with the node program.\nhttp.createServer(function (request, response) {\n  response.writeHead(200, {'Content-Type': 'text/plain'});\n  response.end('Hello World\\n');\n}).listen(8124);\n\nconsole.log('Server running at http://127.0.0.1:8124/');\n\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS\n * http://nodejs.org/api/globals.html\n * ******************************************************************************************* */\n\n\n// In browsers, the top-level scope is the global scope.\n// That means that in browsers if you're in the global scope var something will define a global variable.\n// In Node this is different. The top-level scope is not the global scope; var something inside a Node module will be local to that module.\n\n__filename;  // The filename of the code being executed. (absolute path)\n__dirname;   // The name of the directory that the currently executing script resides in. (absolute path)\nmodule;      // A reference to the current module. In particular module.exports is used for defining what a module exports and makes available through require().\nexports;     // A reference to the module.exports that is shorter to type.\nprocess;     // The process object is a global object and can be accessed from anywhere. It is an instance of EventEmitter.\nBuffer;      // The Buffer class is a global type for dealing with binary data directly.\n\n\n/* *******************************************************************************************\n * CONSOLE\n * http://nodejs.org/api/console.html\n * ******************************************************************************************* */\n\n\nconsole.log([data], [...]);             // Prints to stdout with newline.\nconsole.info([data], [...]);            // Same as console.log.\nconsole.error([data], [...]);           // Same as console.log but prints to stderr.\nconsole.warn([data], [...]);            // Same as console.error.\nconsole.dir(obj);                       // Uses util.inspect on obj and prints resulting string to stdout.\nconsole.time(label);                    // Mark a time.\nconsole.timeEnd(label);                 // Finish timer, record output.\nconsole.trace(label);                   // Print a stack trace to stderr of the current position.\nconsole.assert(expression, [message]);  // Same as assert.ok() where if the expression evaluates as false throw an AssertionError with message.\n\n\n/* *******************************************************************************************\n * TIMERS\n * http://nodejs.org/api/timers.html\n * ******************************************************************************************* */\n\n\nsetTimeout(callback, delay, [arg], [...]);   // To schedule execution of a one-time callback after delay milliseconds. Optionally you can also pass arguments to the callback.\nclearTimeout(t);                             // Stop a timer that was previously created with setTimeout().\nsetInterval(callback, delay, [arg], [...]);  // To schedule the repeated execution of callback every delay milliseconds. Optionally you can also pass arguments to the callback.\nclearInterval(t);                            // Stop a timer that was previously created with setInterval().\nsetImmediate(callback, [arg], [...]);        // To schedule the \"immediate\" execution of callback after I/O events callbacks and before setTimeout and setInterval.\nclearImmediate(immediateObject);             // Stop a timer that was previously created with setImmediate().\n\nunref();  // Allow you to create a timer that is active but if it is the only item left in the event loop, node won't keep the program running.\nref();    // If you had previously unref()d a timer you can call ref() to explicitly request the timer hold the program open.\n\n\n/* *******************************************************************************************\n * MODULES\n * http://nodejs.org/api/modules.html\n * ******************************************************************************************* */\n\n\nvar module = require('./module.js');    // Loads the module module.js in the same directory.\nmodule.require('./another_module.js');  // load another_module as if require() was called from the module itself.\n\nmodule.id;        // The identifier for the module. Typically this is the fully resolved filename.\nmodule.filename;  // The fully resolved filename to the module.\nmodule.loaded;    // Whether or not the module is done loading, or is in the process of loading.\nmodule.parent;    // The module that required this one.\nmodule.children;  // The module objects required by this one.\n\nexports.area = function (r) {\n  return Math.PI * r * r;\n};\n\n// If you want the root of your module's export to be a function (such as a constructor)\n// or if you want to export a complete object in one assignment instead of building it one property at a time,\n// assign it to module.exports instead of exports.\nmodule.exports = function(width) {\n  return {\n    area: function() {\n      return width * width;\n    }\n  };\n}\n\n\n/* *******************************************************************************************\n * PROCESS\n * http://nodejs.org/api/process.html\n * ******************************************************************************************* */\n\n\nprocess.on('exit', function(code) {});              // Emitted when the process is about to exit\nprocess.on('uncaughtException', function(err) {});  // Emitted when an exception bubbles all the way back to the event loop. (should not be used)\n\nprocess.stdout;           // A writable stream to stdout.\nprocess.stderr;           // A writable stream to stderr.\nprocess.stdin;            // A readable stream for stdin.\n\nprocess.argv;             // An array containing the command line arguments.\nprocess.env;              // An object containing the user environment.\nprocess.execPath;         // This is the absolute pathname of the executable that started the process.\nprocess.execArgv;         // This is the set of node-specific command line options from the executable that started the process.\n\nprocess.arch;             // What processor architecture you're running on: 'arm', 'ia32', or 'x64'.\nprocess.config;           // An Object containing the JavaScript representation of the configure options that were used to compile the current node executable.\nprocess.pid;              // The PID of the process.\nprocess.platform;         // What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'.\nprocess.title;            // Getter/setter to set what is displayed in 'ps'.\nprocess.version;          // A compiled-in property that exposes NODE_VERSION.\nprocess.versions;         // A property exposing version strings of node and its dependencies.\n\nprocess.abort();          // This causes node to emit an abort. This will cause node to exit and generate a core file.\nprocess.chdir(dir);       // Changes the current working directory of the process or throws an exception if that fails.\nprocess.cwd();            // Returns the current working directory of the process.\nprocess.exit([code]);     // Ends the process with the specified code. If omitted, exit uses the 'success' code 0.\nprocess.getgid();         // Gets the group identity of the process.\nprocess.setgid(id);       // Sets the group identity of the process.\nprocess.getuid();         // Gets the user identity of the process.\nprocess.setuid(id);       // Sets the user identity of the process.\nprocess.getgroups();      // Returns an array with the supplementary group IDs.\nprocess.setgroups(grps);  // Sets the supplementary group IDs.\n\nprocess.initgroups(user, extra_grp);  // Reads /etc/group and initializes the group access list, using all groups of which the user is a member.\nprocess.kill(pid, [signal]);          // Send a signal to a process. pid is the process id and signal is the string describing the signal to send.\nprocess.memoryUsage();                // Returns an object describing the memory usage of the Node process measured in bytes.\nprocess.nextTick(callback);           // On the next loop around the event loop call this callback.\nprocess.maxTickDepth;                 // Callbacks passed to process.nextTick will usually be called at the end of the current flow of execution, and are thus approximately as fast as calling a function synchronously.\nprocess.umask([mask]);                // Sets or reads the process's file mode creation mask.\nprocess.uptime();                     // Number of seconds Node has been running.\nprocess.hrtime();                     // Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array.\n\n\n/* *******************************************************************************************\n * CHILD PROCESS\n * http://nodejs.org/api/child_process.html\n * ******************************************************************************************* */\n\n\n// Node provides a tri-directional popen facility through the child_process module.\n// It is possible to stream data through a child's stdin, stdout, and stderr in a fully non-blocking way.\n\nChildProcess;                                                 // Class. ChildProcess is an EventEmitter.\n\nchild.stdin;                                                  // A Writable Stream that represents the child process's stdin\nchild.stdout;                                                 // A Readable Stream that represents the child process's stdout\nchild.stderr;                                                 // A Readable Stream that represents the child process's stderr.\nchild.pid;                                                    // The PID of the child process\nchild.connected;                                              // If .connected is false, it is no longer possible to send messages\nchild.kill([signal]);                                         // Send a signal to the child process\nchild.send(message, [sendHandle]);                            // When using child_process.fork() you can write to the child using child.send(message, [sendHandle]) and messages are received by a 'message' event on the child.\nchild.disconnect();                                           // Close the IPC channel between parent and child, allowing the child to exit gracefully once there are no other connections keeping it alive.\nchild_process.spawn(command, [args], [options]);              // Launches a new process with the given command, with command line arguments in args. If omitted, args defaults to an empty Array.\nchild_process.exec(command, [options], callback);             // Runs a command in a shell and buffers the output.\nchild_process.execFile(file, [args], [options], [callback]);  // Runs a command in a shell and buffers the output.\nchild_process.fork(modulePath, [args], [options]);            // This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in.\n\n\n/* *******************************************************************************************\n * UTIL\n * http://nodejs.org/api/util.html\n * ******************************************************************************************* */\n\n\n// These functions are in the module 'util'. Use require('util') to access them.\n\nutil.format(format, [...]);    // Returns a formatted string using the first argument as a printf-like format. (%s, %d, %j)\nutil.debug(string);            // A synchronous output function. Will block the process and output string immediately to stderr.\nutil.error([...]);             // Same as util.debug() except this will output all arguments immediately to stderr.\nutil.puts([...]);              // A synchronous output function. Will block the process and output all arguments to stdout with newlines after each argument.\nutil.print([...]);             // A synchronous output function. Will block the process, cast each argument to a string then output to stdout. (no newlines)\nutil.log(string);              // Output with timestamp on stdout.\nutil.inspect(object, [opts]);  // Return a string representation of object, which is useful for debugging. (options: showHidden, depth, colors, customInspect)\nutil.isArray(object);          // Returns true if the given \"object\" is an Array. false otherwise.\nutil.isRegExp(object);         // Returns true if the given \"object\" is a RegExp. false otherwise.\nutil.isDate(object);           // Returns true if the given \"object\" is a Date. false otherwise.\nutil.isError(object);          // Returns true if the given \"object\" is an Error. false otherwise.\nutil.promisify(fn)             // Takes a function whose last argument is a callback and returns a version that returns promises.\n\nutil.inherits(constructor, superConstructor);  // Inherit the prototype methods from one constructor into another.\n\n\n/* *******************************************************************************************\n * EVENTS\n * http://nodejs.org/api/events.html\n * ******************************************************************************************* */\n\n\n// All objects which emit events are instances of events.EventEmitter. You can access this module by doing: require(\"events\");\n// To access the EventEmitter class, require('events').EventEmitter.\n// All EventEmitters emit the event 'newListener' when new listeners are added and 'removeListener' when a listener is removed.\n\nemitter.addListener(event, listener);        // Adds a listener to the end of the listeners array for the specified event.\nemitter.on(event, listener);                 // Same as emitter.addListener().\nemitter.once(event, listener);               // Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.\nemitter.removeListener(event, listener);     // Remove a listener from the listener array for the specified event.\nemitter.removeAllListeners([event]);         // Removes all listeners, or those of the specified event.\nemitter.setMaxListeners(n);                  // By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.\nemitter.listeners(event);                    // Returns an array of listeners for the specified event.\nemitter.emit(event, [arg1], [arg2], [...]);  // Execute each of the listeners in order with the supplied arguments. Returns true if event had listeners, false otherwise.\n\nEventEmitter.listenerCount(emitter, event);  // Return the number of listeners for a given event.\n\n\n/* *******************************************************************************************\n * STREAM\n * http://nodejs.org/api/stream.html\n * ******************************************************************************************* */\n\n\n// A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout.\n// Streams are readable, writable, or both. All streams are instances of EventEmitter.\n\n// The Readable stream interface is the abstraction for a source of data that you are reading from.\n// In other words, data comes out of a Readable stream.\n// A Readable stream will not start emitting data until you indicate that you are ready to receive it.\n// Examples of readable streams include: http responses on the client, http requests on the server, fs read streams\n// zlib streams, crypto streams, tcp sockets, child process stdout and stderr, process.stdin.\n\nvar readable = getReadableStreamSomehow();\n\nreadable.on('readable', function() {});   // When a chunk of data can be read from the stream, it will emit a 'readable' event.\nreadable.on('data', function(chunk) {});  // If you attach a data event listener, then it will switch the stream into flowing mode, and data will be passed to your handler as soon as it is available.\nreadable.on('end', function() {});        // This event fires when there will be no more data to read.\nreadable.on('close', function() {});      // Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this.\nreadable.on('error', function() {});      // Emitted if there was an error receiving data.\n\n// The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.\n// This method should only be called in non-flowing mode. In flowing-mode, this method is called automatically until the internal buffer is drained.\nreadable.read([size]);\n\nreadable.setEncoding(encoding);           // Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.\nreadable.resume();                        // This method will cause the readable stream to resume emitting data events.\nreadable.pause();                         // This method will cause a stream in flowing-mode to stop emitting data events.\nreadable.pipe(destination, [options]);    // This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.\nreadable.unpipe([destination]);           // This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed.\nreadable.unshift(chunk);                  // This is useful in certain cases where a stream is being consumed by a parser, which needs to \"un-consume\" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.\n\n\n// The Writable stream interface is an abstraction for a destination that you are writing data to.\n// Examples of writable streams include: http requests on the client, http responses on the server, fs write streams,\n// zlib streams, crypto streams, tcp sockets, child process stdin, process.stdout, process.stderr.\n\nvar writer = getWritableStreamSomehow();\n\nwritable.write(chunk, [encoding], [callback]);  // This method writes some data to the underlying system, and calls the supplied callback once the data has been fully handled.\nwriter.once('drain', write);                    // If a writable.write(chunk) call returns false, then the drain event will indicate when it is appropriate to begin writing more data to the stream.\n\nwritable.end([chunk], [encoding], [callback]);  // Call this method when no more data will be written to the stream.\nwriter.on('finish', function() {});             // When the end() method has been called, and all data has been flushed to the underlying system, this event is emitted.\nwriter.on('pipe', function(src) {});            // This is emitted whenever the pipe() method is called on a readable stream, adding this writable to its set of destinations.\nwriter.on('unpipe', function(src) {});          // This is emitted whenever the unpipe() method is called on a readable stream, removing this writable from its set of destinations.\nwriter.on('error', function(src) {});           // Emitted if there was an error when writing or piping data.\n\n\n// Duplex streams are streams that implement both the Readable and Writable interfaces. See above for usage.\n// Examples of Duplex streams include: tcp sockets, zlib streams, crypto streams.\n\n// Transform streams are Duplex streams where the output is in some way computed from the input. They implement both the Readable and Writable interfaces. See above for usage.\n// Examples of Transform streams include: zlib streams, crypto streams.\n\n\n/* *******************************************************************************************\n * FILE SYSTEM\n * http://nodejs.org/api/fs.html\n * ******************************************************************************************* */\n\n\n// To use this module do require('fs').\n// All the methods have asynchronous and synchronous forms.\n\nfs.rename(oldPath, newPath, callback);  // Asynchronous rename. No arguments other than a possible exception are given to the completion callback.Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.\nfs.renameSync(oldPath, newPath);        // Synchronous rename.\n\nfs.ftruncate(fd, len, callback);        // Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.\nfs.ftruncateSync(fd, len);              // Synchronous ftruncate.\nfs.truncate(path, len, callback);       // Asynchronous truncate. No arguments other than a possible exception are given to the completion callback.\nfs.truncateSync(path, len);             // Synchronous truncate.\n\nfs.chown(path, uid, gid, callback);     // Asynchronous chown. No arguments other than a possible exception are given to the completion callback.\nfs.chownSync(path, uid, gid);           // Synchronous chown.\nfs.fchown(fd, uid, gid, callback);      // Asynchronous fchown. No arguments other than a possible exception are given to the completion callback.\nfs.fchownSync(fd, uid, gid);            // Synchronous fchown.\nfs.lchown(path, uid, gid, callback);    // Asynchronous lchown. No arguments other than a possible exception are given to the completion callback.\nfs.lchownSync(path, uid, gid);          // Synchronous lchown.\n\nfs.chmod(path, mode, callback);         // Asynchronous chmod. No arguments other than a possible exception are given to the completion callback.\nfs.chmodSync(path, mode);               // Synchronous chmod.\nfs.fchmod(fd, mode, callback);          // Asynchronous fchmod. No arguments other than a possible exception are given to the completion callback.\nfs.fchmodSync(fd, mode);                // Synchronous fchmod.\nfs.lchmod(path, mode, callback);        // Asynchronous lchmod. No arguments other than a possible exception are given to the completion callback.\nfs.lchmodSync(path, mode);              // Synchronous lchmod.\n\nfs.stat(path, callback);                // Asynchronous stat. The callback gets two arguments (err, stats) where stats is a fs.Stats object.\nfs.statSync(path);                      // Synchronous stat. Returns an instance of fs.Stats.\nfs.lstat(path, callback);               // Asynchronous lstat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to.\nfs.lstatSync(path);                     // Synchronous lstat. Returns an instance of fs.Stats.\nfs.fstat(fd, callback);                 // Asynchronous fstat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd.\nfs.fstatSync(fd);                       // Synchronous fstat. Returns an instance of fs.Stats.\n\nfs.link(srcpath, dstpath, callback);             // Asynchronous link. No arguments other than a possible exception are given to the completion callback.\nfs.linkSync(srcpath, dstpath);                   // Synchronous link.\nfs.symlink(srcpath, dstpath, [type], callback);  // Asynchronous symlink. No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms)\nfs.symlinkSync(srcpath, dstpath, [type]);        // Synchronous symlink.\nfs.readlink(path, callback);                     // Asynchronous readlink. The callback gets two arguments (err, linkString).\nfs.readlinkSync(path);                           // Synchronous readlink. Returns the symbolic link's string value.\nfs.unlink(path, callback);                       // Asynchronous unlink. No arguments other than a possible exception are given to the completion callback.\nfs.unlinkSync(path);                             // Synchronous unlink.\n\nfs.realpath(path, [cache], callback);     // Asynchronous realpath. The callback gets two arguments (err, resolvedPath).\nfs.realpathSync(path, [cache]);           // Synchronous realpath. Returns the resolved path.\n\nfs.rmdir(path, callback);                 // Asynchronous rmdir. No arguments other than a possible exception are given to the completion callback.\nfs.rmdirSync(path);                       // Synchronous rmdir.\nfs.mkdir(path, [mode], callback);         // Asynchronous mkdir. No arguments other than a possible exception are given to the completion callback. mode defaults to 0777.\nfs.mkdirSync(path, [mode]);               // Synchronous mkdir.\nfs.readdir(path, callback);               // Asynchronous readdir. Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.\nfs.readdirSync(path);                     // Synchronous readdir. Returns an array of filenames excluding '.' and '..'.\nfs.close(fd, callback);                   // Asynchronous close. No arguments other than a possible exception are given to the completion callback.\nfs.closeSync(fd);                         // Synchronous close.\nfs.open(path, flags, [mode], callback);   // Asynchronous file open.\nfs.openSync(path, flags, [mode]);         // Synchronous version of fs.open().\nfs.utimes(path, atime, mtime, callback);  // Change file timestamps of the file referenced by the supplied path.\nfs.utimesSync(path, atime, mtime);        // Synchronous version of fs.utimes().\nfs.futimes(fd, atime, mtime, callback);   // Change the file timestamps of a file referenced by the supplied file descriptor.\nfs.futimesSync(fd, atime, mtime);         // Synchronous version of fs.futimes().\nfs.fsync(fd, callback);                   // Asynchronous fsync. No arguments other than a possible exception are given to the completion callback.\nfs.fsyncSync(fd);                         // Synchronous fsync.\n\nfs.write(fd, buffer, offset, length, position, callback);  // Write buffer to the file specified by fd.\nfs.writeSync(fd, buffer, offset, length, position);        // Synchronous version of fs.write(). Returns the number of bytes written.\nfs.read(fd, buffer, offset, length, position, callback);   // Read data from the file specified by fd.\nfs.readSync(fd, buffer, offset, length, position);         // Synchronous version of fs.read. Returns the number of bytesRead.\nfs.readFile(filename, [options], callback);                // Asynchronously reads the entire contents of a file.\nfs.readFileSync(filename, [options]);                      // Synchronous version of fs.readFile. Returns the contents of the filename. If the encoding option is specified then this function returns a string. Otherwise it returns a buffer.\n\nfs.writeFile(filename, data, [options], callback);   // Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer.\nfs.writeFileSync(filename, data, [options]);         // The synchronous version of fs.writeFile.\nfs.appendFile(filename, data, [options], callback);  // Asynchronously append data to a file, creating the file if it not yet exists. data can be a string or a buffer.\nfs.appendFileSync(filename, data, [options]);        // The synchronous version of fs.appendFile.\nfs.watch(filename, [options], [listener]);           // Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher. The listener callback gets two arguments (event, filename). event is either 'rename' or 'change', and filename is the name of the file which triggered the event.\nfs.exists(path, callback);                           // Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false. (should not be used)\nfs.existsSync(path);                                 // Synchronous version of fs.exists. (should not be used)\n\n// fs.Stats: objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type.\nstats.isFile();\nstats.isDirectory()\nstats.isBlockDevice()\nstats.isCharacterDevice()\nstats.isSymbolicLink()  // (only valid with fs.lstat())\nstats.isFIFO()\nstats.isSocket()\n\nfs.createReadStream(path, [options]);   // Returns a new ReadStream object.\nfs.createWriteStream(path, [options]);  // Returns a new WriteStream object.\n\n\n/* *******************************************************************************************\n * PATH\n * http://nodejs.org/api/fs.html\n * ******************************************************************************************* */\n\n\n// Use require('path') to use this module.\n// This module contains utilities for handling and transforming file paths.\n// Almost all these methods perform only string transformations.\n// The file system is not consulted to check whether paths are valid.\n\npath.normalize(p);                    // Normalize a string path, taking care of '..' and '.' parts.\npath.join([path1], [path2], [...]);   // Join all arguments together and normalize the resulting path.\npath.resolve([from ...], to);         // Resolves 'to' to an absolute path.\npath.relative(from, to);              // Solve the relative path from 'from' to 'to'.\npath.dirname(p);                      // Return the directory name of a path. Similar to the Unix dirname command.\npath.basename(p, [ext]);              // Return the last portion of a path. Similar to the Unix basename command.\npath.extname(p);                      // Return the extension of the path, from the last '.' to end of string in the last portion of the path.\n\npath.sep;                             // The platform-specific file separator. '\\\\' or '/'.\npath.delimiter;                       // The platform-specific path delimiter, ';' or ':'.\n\n\n/* *******************************************************************************************\n * HTTP\n * http://nodejs.org/api/http.html\n * ******************************************************************************************* */\n\n\n// To use the HTTP server and client one must require('http').\n\nhttp.STATUS_CODES;                                             // A collection of all the standard HTTP response status codes, and the short description of each.\nhttp.request(options, [callback]);                             // This function allows one to transparently issue requests.\nhttp.get(options, [callback]);                                 // Set the method to GET and calls req.end() automatically.\n\nserver = http.createServer([requestListener]);                 // Returns a new web server object. The requestListener is a function which is automatically added to the 'request' event.\nserver.listen(port, [hostname], [backlog], [callback]);        // Begin accepting connections on the specified port and hostname.\nserver.listen(path, [callback]);                               // Start a UNIX socket server listening for connections on the given path.\nserver.listen(handle, [callback]);                             // The handle object can be set to either a server or socket (anything with an underlying _handle member), or a {fd: &#x3C;n>} object.\nserver.close([callback]);                                      // Stops the server from accepting new connections.\nserver.setTimeout(msecs, callback);                            // Sets the timeout value for sockets, and emits a 'timeout' event on the Server object, passing the socket as an argument, if a timeout occurs.\n\nserver.maxHeadersCount;  // Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied.\nserver.timeout;          // The number of milliseconds of inactivity before a socket is presumed to have timed out.\n\nserver.on('request', function (request, response) { });        // Emitted each time there is a request.\nserver.on('connection', function (socket) { });                // When a new TCP stream is established.\nserver.on('close', function () { });                           // Emitted when the server closes.\nserver.on('checkContinue', function (request, response) { });  // Emitted each time a request with an http Expect: 100-continue is received.\nserver.on('connect', function (request, socket, head) { });    // Emitted each time a client requests a http CONNECT method.\nserver.on('upgrade', function (request, socket, head) { });    // Emitted each time a client requests a http upgrade.\nserver.on('clientError', function (exception, socket) { });    // If a client connection emits an 'error' event - it will forwarded here.\n\nrequest.write(chunk, [encoding]);                              // Sends a chunk of the body.\nrequest.end([data], [encoding]);                               // Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream.\nrequest.abort();                                               // Aborts a request.\nrequest.setTimeout(timeout, [callback]);                       // Once a socket is assigned to this request and is connected socket.setTimeout() will be called.\nrequest.setNoDelay([noDelay]);                                 // Once a socket is assigned to this request and is connected socket.setNoDelay() will be called.\nrequest.setSocketKeepAlive([enable], [initialDelay]);          // Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called.\n\nrequest.on('response', function(response) { });                // Emitted when a response is received to this request. This event is emitted only once.\nrequest.on('socket', function(socket) { });                    // Emitted after a socket is assigned to this request.\nrequest.on('connect', function(response, socket, head) { });   // Emitted each time a server responds to a request with a CONNECT method. If this event isn't being listened for, clients receiving a CONNECT method will have their connections closed.\nrequest.on('upgrade', function(response, socket, head) { });   // Emitted each time a server responds to a request with an upgrade. If this event isn't being listened for, clients receiving an upgrade header will have their connections closed.\nrequest.on('continue', function() { });                        // Emitted when the server sends a '100 Continue' HTTP response, usually because the request contained 'Expect: 100-continue'. This is an instruction that the client should send the request body.\n\nresponse.write(chunk, [encoding]);                             // This sends a chunk of the response body. If this merthod is called and response.writeHead() has not been called, it will switch to implicit header mode and flush the implicit headers.\nresponse.writeContinue();                                      // Sends a HTTP/1.1 100 Continue message to the client, indicating that the request body should be sent.\nresponse.writeHead(statusCode, [reasonPhrase], [headers]);     // Sends a response header to the request.\nresponse.setTimeout(msecs, callback);                          // Sets the Socket's timeout value to msecs. If a callback is provided, then it is added as a listener on the 'timeout' event on the response object.\nresponse.setHeader(name, value);                               // Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name.\nresponse.getHeader(name);                                      // Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive.\nresponse.removeHeader(name);                                   // Removes a header that's queued for implicit sending.\nresponse.addTrailers(headers);                                 // This method adds HTTP trailing headers (a header but at the end of the message) to the response.\nresponse.end([data], [encoding]);                              // This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.\n\nresponse.statusCode;                                           // When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed.\nresponse.headersSent;                                          // Boolean (read-only). True if headers were sent, false otherwise.\nresponse.sendDate;                                             // When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true.\n\nresponse.on('close', function () { });  // Indicates that the underlying connection was terminated before response.end() was called or able to flush.\nresponse.on('finish', function() { });  // Emitted when the response has been sent.\n\nmessage.httpVersion;                    // In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server.\nmessage.headers;                        // The request/response headers object.\nmessage.trailers;                       // The request/response trailers object. Only populated after the 'end' event.\nmessage.method;                         // The request method as a string. Read only. Example: 'GET', 'DELETE'.\nmessage.url;                            // Request URL string. This contains only the URL that is present in the actual HTTP request.\nmessage.statusCode;                     // The 3-digit HTTP response status code. E.G. 404.\nmessage.socket;                         // The net.Socket object associated with the connection.\n\nmessage.setTimeout(msecs, callback);    // Calls message.connection.setTimeout(msecs, callback).\n\n\n/* *******************************************************************************************\n * URL\n * http://nodejs.org/api/url.html\n * ******************************************************************************************* */\n\n\n// This module has utilities for URL resolution and parsing. Call require('url') to use it.\n\nurl.parse(urlStr, [parseQueryString], [slashesDenoteHost]);  // Take a URL string, and return an object.\nurl.format(urlObj);                                          // Take a parsed URL object, and return a formatted URL string.\nurl.resolve(from, to);                                       // Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.\n\n\n/* *******************************************************************************************\n * QUERY STRING\n * http://nodejs.org/api/querystring.html\n * ******************************************************************************************* */\n\n\n// This module provides utilities for dealing with query strings. Call require('querystring') to use it.\n\nquerystring.stringify(obj, [sep], [eq]);         // Serialize an object to a query string. Optionally override the default separator ('&#x26;') and assignment ('=') characters.\nquerystring.parse(str, [sep], [eq], [options]);  // Deserialize a query string to an object. Optionally override the default separator ('&#x26;') and assignment ('=') characters.\n\n\n/* *******************************************************************************************\n * ASSERT\n * http://nodejs.org/api/assert.html\n * ******************************************************************************************* */\n\n\n// This module is used for writing unit tests for your applications, you can access it with require('assert').\n\nassert.fail(actual, expected, message, operator);     // Throws an exception that displays the values for actual and expected separated by the provided operator.\nassert(value, message); assert.ok(value, [message]);  // Tests if value is truthy, it is equivalent to assert.equal(true, !!value, message);\nassert.equal(actual, expected, [message]);            // Tests shallow, coercive equality with the equal comparison operator ( == ).\nassert.notEqual(actual, expected, [message]);         // Tests shallow, coercive non-equality with the not equal comparison operator ( != ).\nassert.deepEqual(actual, expected, [message]);        // Tests for deep equality.\nassert.notDeepEqual(actual, expected, [message]);     // Tests for any deep inequality.\nassert.strictEqual(actual, expected, [message]);      // Tests strict equality, as determined by the strict equality operator ( === )\nassert.notStrictEqual(actual, expected, [message]);   // Tests strict non-equality, as determined by the strict not equal operator ( !== )\nassert.throws(block, [error], [message]);             // Expects block to throw an error. error can be constructor, RegExp or validation function.\nassert.doesNotThrow(block, [message]);                // Expects block not to throw an error, see assert.throws for details.\nassert.ifError(value);                                // Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks.\n\n\n/* *******************************************************************************************\n * OS\n * http://nodejs.org/api/os.html\n * ******************************************************************************************* */\n\n\n// Provides a few basic operating-system related utility functions.\n// Use require('os') to access this module.\n\nos.tmpdir();             // Returns the operating system's default directory for temp files.\nos.endianness();         // Returns the endianness of the CPU. Possible values are \"BE\" or \"LE\".\nos.hostname();           // Returns the hostname of the operating system.\nos.type();               // Returns the operating system name.\nos.platform();           // Returns the operating system platform.\nos.arch();               // Returns the operating system CPU architecture.\nos.release();            // Returns the operating system release.\nos.uptime();             // Returns the system uptime in seconds.\nos.loadavg();            // Returns an array containing the 1, 5, and 15 minute load averages.\nos.totalmem();           // Returns the total amount of system memory in bytes.\nos.freemem();            // Returns the amount of free system memory in bytes.\nos.cpus();               // Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).\nos.networkInterfaces();  // Get a list of network interfaces.\nos.EOL;                  // A constant defining the appropriate End-of-line marker for the operating system.\n\n\n/* *******************************************************************************************\n * BUFFER\n * http://nodejs.org/api/buffer.html\n * ******************************************************************************************* */\n\n\n// Buffer is used to dealing with binary data\n// Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap\n\nBuffer.from(size);                                                  // Allocates a new buffer of size octets.\nBuffer.from(array);                                                 // Allocates a new buffer using an array of octets.\nBuffer.from(str, [encoding]);                                       // Allocates a new buffer containing the given str. encoding defaults to 'utf8'.\n\nBuffer.isEncoding(encoding);                                        // Returns true if the encoding is a valid encoding argument, or false otherwise.\nBuffer.isBuffer(obj);                                               // Tests if obj is a Buffer\nBuffer.concat(list, [totalLength]);                                 // Returns a buffer which is the result of concatenating all the buffers in the list together.\nBuffer.byteLength(string, [encoding]);                              // Gives the actual byte length of a string.\n\nbuf.write(string, [offset], [length], [encoding]);                  // Writes string to the buffer at offset using the given encoding\nbuf.toString([encoding], [start], [end]);                           // Decodes and returns a string from buffer data encoded with encoding (defaults to 'utf8') beginning at start (defaults to 0) and ending at end (defaults to buffer.length).\nbuf.toJSON();                                                       // Returns a JSON-representation of the Buffer instance, which is identical to the output for JSON Arrays\nbuf.copy(targetBuffer, [targetStart], [sourceStart], [sourceEnd]);  // Does copy between buffers. The source and target regions can be overlapped\nbuf.slice([start], [end]);                                          // Returns a new buffer which references the same memory as the old, but offset and cropped by the start (defaults to 0) and end (defaults to buffer.length) indexes. Negative indexes start from the end of the buffer.\nbuf.fill(value, [offset], [end]);                                   // Fills the buffer with the specified value\nbuf[index];                                                         // Get and set the octet at index\nbuf.length;                                                         // The size of the buffer in bytes, Note that this is not necessarily the size of the contents\n\nbuffer.INSPECT_MAX_BYTES;                                           // How many bytes will be returned when buffer.inspect() is called. This can be overridden by user modules.\n</code></pre>"},{"url":"/docs/articles/the-uniform-resource-locator-(url)/","relativePath":"docs/articles/the-uniform-resource-locator-(url).md","relativeDir":"docs/articles","base":"the-uniform-resource-locator-(url).md","name":"the-uniform-resource-locator-(url)","frontmatter":{"title":"The Uniform Resource Locator (URL)","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h3>Let's look at the anatomy of a URL:\n\n</h3>\n<p>The first part of the URL is http://, this is often left out when URLs are written, so we might see the above as www.mq.edu.au/about/profile/history.html. This will work when you type it into your web browser because the browser will assume you meant this as an HTTP URL. However, if we are being pedantic, the prefix is required as it tells us something about the web address - that we should use the HTTP protocol to access it.</p>\n<p>URLs are not only useful for HTTP addresses. Other <em>schemes</em> are allowed and they tell the client how to get access to the content that the URL describes. The most common you will see is https:// which is the secure variant of HTTP (we'll find out about that later). HTTPS uses the same protocol as HTTP but over a secure connection so that information that is exchanged can't be intercepted. Another scheme is ftp:// which tells the browser to use the older FTP protocol to access the content. Finally, you might see a mailto URL which allows us to write a link that triggers the browser to start composing an email message. This has a slightly different form: <a href=\"mailto:Steve.Cassidy@mq.edu.au\">Steve.Cassidy@mq.edu.au</a> but it's still a URL. In fact, the pattern looks like this:</p>\n<p>For the HTTP scheme the pattern is:</p>\n<p>The first part &#x3C;net_loc> is the network location of the resource: the domain name of the web server that holds the web page we want. This is preceded by two forward slashes and followed by a single forward slash. Then follows the &#x3C;path> which the server will use to identify which page we want. The ;&#x3C;params>?&#x3C;query>#&#x3C;fragment> are used to further qualify the resource that we want; we'll see some examples of how they are used later in the book.</p>\n<p>The URL is a unique form of identifier in that it has two roles. First, it identifies a document, video or music file that's out on the web (we call these things <em>resources</em>). Each resource has a unique URL and you can refer to them via the URL. If we two people refer to the same URL, then they know they have read the same document. Secondly, the URL contains enough information for a web client to retrieve a copy of the resource. The client can use the scheme defined (HTTP) to connect to the server and send an HTTP request for the path part of the URL.</p>\n<p>There are other kinds of formal identifier that don't have this second property. For example, every book has an ISBN (International Standard Book Number) which uniquely identifies it. However, the ISBN contains no information about how to get a copy of the book. To do so, you'd need to look up the ISBN in a catalogue which might tell you who the publisher was and then contact them for a copy. Alternately you could go to a book-shop or library and use their catalogue to find the book. With a URL, there's no need for a catalogue or third party service to decode the identifier. The information on how to retrieve the resource is right there in the Uniform Resource Locator.</p>\n<p>The <a href=\"http://www.ietf.org/\">Internet Engineering Task Force (IETF)</a> is as close as we get to a governing body for the Internet and it's home to many of the standards that define how the Internet and the Web work. The standards documents are called <em>Request for Comments</em> or RFC, a name which reflects the democratic nature of the early Internet. <a href=\"http://datatracker.ietf.org/doc/rfc2068/\">RFC2068</a> defines HTTP version 1.1 and <a href=\"http://datatracker.ietf.org/doc/rfc1738/\">RFC1738</a> defines the URL. Look out also for <a href=\"http://datatracker.ietf.org/doc/rfc2324/\">RFC2324</a> which can be relevant after a long coding session.</p>\n<h2>Uniform Resource Identifiers</h2>\n<p>There's another similar term that is sometimes used instead of URL: Uniform Resource Identifier (URI). URI is actually a more general term that includes URLs and Universal Resource Names (URNs). URNs are identifiers that don't contain any locator information such as the ISBN. They have a formal syntax so I can cite a particular ISBN as a URN as URN:ISBN:978-0-395-36341-6 (an example from the <a href=\"http://tools.ietf.org/html/draft-ietf-urnbis-rfc3187bis-isbn-urn-01\">IETF RFC3187</a> document that defines the standard). As explained above, we need a third party service to resolve a URN into a real location (a URL). You might see the term URI used in discussions of web technologies; it is often used instead of URL but generally means the same thing if we're talking about HTTP based services.</p>\n<p>Since URLs are both names and addresses it becomes important that once you put a resource on the web, it stays there. This is discussed in Tim Berners-Lee's paper called \"<a href=\"http://www.w3.org/Provider/Style/URI\">Cool URIs don't change</a>\". It's a principle that all web designers should bear in mind as it is easy to violate as we re-build old web-sites.</p>\n<h2>Absolute and relative URLs</h2>\n<p>When we include a URL in a web page there are a number of choices about how it can be written. The first option is to include the full URL:</p>\n<p>This is clearly a link to a resource on the server at <em>example.org</em> using the http protocol. However, if this page is being served by the server at <em>example.org</em> then we could also write this link as:</p>\n<p>This is known as a <em>relative URL</em> and is interpreted relative to the URL of the page that is currently being viewed. Let's assume that this page is at the URL <a href=\"http://example.org/about/info.html\">http://example.org/about/info.html</a>. Note that the URL above starts with a / character, in this case, the browser will interpret this URL by adding the protocol (http) and domain (example.org) parts of the page URL to this one to get <a href=\"http://example.org/static/style.css\">http://example.org/static/style.css</a>.</p>\n<p>Another way to write a URL is:</p>\n<p>In this case there is no / at the start of the URL and so this is interpreted relative to the page URL by removing everything but the last part of the URL <a href=\"http://example.org/about/\">http://example.org/about/</a> and then adding the new URL text to get <a href=\"http://example.org/about/static/style.css\">http://example.org/about/static/style.css</a>. Note that this is different to the previous example. If the intention was to reference the same URL as before, you could use the URL:</p>\n<p>Here the .. path refers to the parent directory (thinking of these paths as filenames) so the path becomes /about/../static/style.css which can be shortened to /static/style.css.</p>\n<p>The different URL styles have different uses. If you are writing a static HTML page that you will view on your local computer and perhaps host on the web somewhere (but you're not sure where) then you might put all of your files in one directory and use a relative URL like static/style.css to refer to linked resources. This ensures that your directory of files could be dropped anywhere into a web server file system and it would be self-contained and the links would work.</p>\n<p>However, if you are writing a web application that will be hosted on some domain (like example.org) you know that you have control of all URLs on that site and so would more likely use a relative URL starting with a / (like /static/style.css). This is important if your web application has complex routes (eg. pages like /users/steve/profile/edit) and you want to ensure that whatever the page URL being served, the links to stylesheets and other resources will work. The application can be deployed on different servers (like example.org and example.com) and the links will still work because they don't mention the domain name at all.</p>\n<p>Finally, absolute URLs (like <a href=\"http://example.org/static/style.css\">http://example.org/static/style.css</a>) will be used when we know that this URL is fixed at this location. It may be something external to our own site, or something that we know will be hosted at this URL on our site. There is an argument from a Search Engine Optimisation (SEO) viewpoint that all URLs in a website should be absolute urls even when they refer to assets on the same site. The reasons relate to the way that search engines crawl sites and the possible duplication of content if two URLs point to the same page (eg. <a href=\"https://example.org/\">https://example.org/</a> and <a href=\"http://example.org\">http://example.org</a>).</p>\n<p>One final form of relative URL looks like this:</p>\n<p>This URL is only missing the protocol part and is turned into an absolute URL by adding the protocol part of the current page URL. So if the current page was requested over http or https, this URL will use the same protocol. This is often useful if a site can be served over both protocols although it is increasingly the case that https is being used everywhere so this may become less common as time progresses.</p>\n<p><a href=\"https://www.facebook.com/sharer/sharer.php?u=https://bgoonz-blog.netlify.app/\">Share To Facebook:</a></p>"},{"url":"/docs/articles/v8/","relativePath":"docs/articles/v8.md","relativeDir":"docs/articles","base":"v8.md","name":"v8","frontmatter":{"title":"npm global or local packages","weight":0,"excerpt":"npm packages","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>The main difference between local and global packages is this:</p>\n<ul>\n<li><strong>local packages</strong> are installed in the directory where you run npm install &#x3C;package-name>, and they are put in the node_modules folder under this directory</li>\n<li><strong>global packages</strong> are all put in a single place in your system (exactly where depends on your setup), regardless of where you run npm install -g &#x3C;package-name></li>\n</ul>\n<p>In your code you can only require local packages:</p>\n<p>so when should you install in one way or another?</p>\n<p>In general, <strong>all packages should be installed locally</strong>.</p>\n<p>This makes sure you can have dozens of applications in your computer, all running a different version of each package if needed.</p>\n<p>Updating a global package would make all your projects use the new release, and as you can imagine this might cause nightmares in terms of maintenance, as some packages might break compatibility with further dependencies, and so on.</p>\n<p>All projects have their own local version of a package, even if this might appear like a waste of resources, it's minimal compared to the possible negative consequences.</p>\n<p>A package <strong>should be installed globally</strong> when it provides an executable command that you run from the shell (CLI), and it's reused across projects.</p>\n<p>You can also install executable commands locally and run them using npx, but some packages are just better installed globally.</p>\n<p>Great examples of popular global packages which you might know are</p>\n<ul>\n<li>npm</li>\n<li>create-react-app</li>\n<li>vue-cli</li>\n<li>grunt-cli</li>\n<li>mocha</li>\n<li>react-native-cli</li>\n<li>gatsby-cli</li>\n<li>forever</li>\n<li>nodemon</li>\n</ul>\n<p>You probably have some packages installed globally already on your system. You can see them by running</p>\n<p>on your command line.</p>"},{"url":"/docs/articles/writing-files/","relativePath":"docs/articles/writing-files.md","relativeDir":"docs/articles","base":"writing-files.md","name":"writing-files","frontmatter":{"title":"Writing Files","excerpt":"Web-Dev-Hubis a Unibit theme created for project documentations. You can use it for your project.","seo":{"title":"Writing Files","description":"This is the Writing Files page. The easiest way to write to files in Node.js is to use the fs.writeFile() API. const fs = require('fs');","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Writing Files","keyName":"property"},{"name":"og:description","value":"This is the Writing Files page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Writing Files"},{"name":"twitter:description","value":"This is the Writing Files page"}]},"template":"docs"},"html":"<p>The easiest way to write to files in Node.js is to use the <code>fs.writeFile()</code> API.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst content = 'Some content!';\n\nfs.writeFile('/Users/joe/test.txt', content, (err) => {\n    if (err) {\n        console.error(err);\n        return;\n    }\n    //file written successfully\n});\n</code></pre>\n<p>Alternatively, you can use the synchronous version <code>fs.writeFileSync()</code>:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst content = 'Some content!';\n\ntry {\n    const data = fs.writeFileSync('/Users/joe/test.txt', content);\n    //file written successfully\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>By default, this API will <strong>replace the contents of the file</strong> if it does already exist.</p>\n<p>You can modify the default by specifying a flag:</p>\n<pre><code class=\"language-js\">fs.writeFile('/Users/joe/test.txt', content, { flag: 'a+' }, (err) => {});\n</code></pre>\n<p>The flags you'll likely use are</p>\n<ul>\n<li><code>r+</code> open the file for reading and writing</li>\n<li><code>w+</code> open the file for reading and writing, positioning the stream at the beginning of the file. The file is created if not existing</li>\n<li><code>a</code> open the file for writing, positioning the stream at the end of the file. The file is created if not existing</li>\n<li><code>a+</code> open the file for reading and writing, positioning the stream at the end of the file. The file is created if not existing</li>\n</ul>\n<p>(you can find more flags at <a href=\"https://nodejs.org/api/fs.html#fs_file_system_flags\">https://nodejs.org/api/fs.html#fs_file_system_flags</a>)</p>\n<h2>Append to a file</h2>\n<p>A handy method to append content to the end of a file is <code>fs.appendFile()</code> (and its <code>fs.appendFileSync()</code> counterpart):</p>\n<pre><code class=\"language-js\">const content = 'Some content!';\n\nfs.appendFile('file.log', content, (err) => {\n    if (err) {\n        console.error(err);\n        return;\n    }\n    //done!\n});\n</code></pre>\n<h2>Using streams</h2>\n<p>All those methods write the full content to the file before returning the control back to your program (in the async version, this means executing the callback)</p>\n<p>In this case, a better option is to write the file content using streams.</p>\n<p>72</p>\n<p><a href=\"https://stackoverflow.com/posts/11194896/timeline\"></a></p>\n<p>Here's a sketch. Error handling is left as an exercise for the reader.</p>\n<pre><code class=\"language-js\">let fs = require('fs'),\n    path = require('path');\n\nfunction dirTree(filename) {\n    let stats = fs.lstatSync(filename),\n        info = {\n            path: filename,\n            name: path.basename(filename)\n        };\n\n    if (stats.isDirectory()) {\n        info.type = 'folder';\n        info.children = fs.readdirSync(filename).map(function (child) {\n            return dirTree(filename + '/' + child);\n        });\n    } else {\n        // Assuming it's a file. In real life it could be a symlink or\n        // something else!\n        info.type = 'file';\n    }\n\n    return info;\n}\n\nif (module.parent == undefined) {\n    // node dirTree.js ~/foo/bar\n    let util = require('util');\n    console.log(util.inspect(dirTree(process.argv[2]), false, null));\n}\n</code></pre>"},{"url":"/docs/articles/understanding-firebase/","relativePath":"docs/articles/understanding-firebase.md","relativeDir":"docs/articles","base":"understanding-firebase.md","name":"understanding-firebase","frontmatter":{"title":"Firebase","weight":0,"excerpt":"Firebasics","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Understand Firebase projects</h1>\n<p><strong>Note:</strong> If you're using the <a href=\"https://firebase.google.com/docs/projects/api/reference/rest?authuser=0\">Firebase Management REST API</a> to programmatically create a Firebase project, you must first <a href=\"https://cloud.google.com/resource-manager/reference/rest/v1/projects?authuser=0\">create a Google Cloud project</a>, then <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects/addFirebase?authuser=0\">add Firebase services</a> to the existing project.<strong>Note:</strong> The <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-number\">project number</a> and the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-id\">project ID</a> are the truly <em>unique identifiers</em> for a project across all of Firebase and Google Cloud.<strong>After Firebase provisions resources for a Firebase project, you cannot change its project ID.</strong> To use a specific identifier for Firebase resources, you must edit the project ID during the initial creation of the project.<strong>Caution:</strong> We do not recommend manually modifying an app's Firebase config file or object. If you initialize an app with invalid or missing values for any of these required \"Firebase options\", then your end users may experience serious issues.<strong>Note:</strong> For each Android app, if you provide a SHA-1 key for the app, you need to provide a package name and SHA-1 key combination that is globally unique across all of Google Cloud.</p>\n<p>This page offers brief overviews of several important concepts about Firebase projects. When available, follow the links to find more detailed information about features, services, and even other platforms. At the bottom of this page, find a listing of <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#best-practices\">general best practices</a> for Firebase projects.</p>\n<h2>Relationship between Firebase projects, apps, and products</h2>\n<p>A Firebase project is the top-level entity for Firebase. In a project, you create Firebase apps by registering your iOS, Android, or web apps. After you register your apps with Firebase, you can add the Firebase SDKs for any number of <a href=\"https://firebase.google.com/products/?authuser=0\">Firebase products</a>, like Analytics, Cloud Firestore, Performance Monitoring, or Remote Config.</p>\n<p>Learn more detailed information about this process in the Getting Started guides (<a href=\"https://firebase.google.com/docs/ios/setup?authuser=0\">iOS</a> | <a href=\"https://firebase.google.com/docs/android/setup?authuser=0\">Android</a> | <a href=\"https://firebase.google.com/docs/web/setup?authuser=0\">web</a> | <a href=\"https://firebase.google.com/docs/unity/setup?authuser=0\">Unity</a> | <a href=\"https://firebase.google.com/docs/cpp/setup?authuser=0\">C++</a>).</p>\n<h2>Relationship between Firebase projects and Google Cloud</h2>\n<p>When you create a new Firebase project in the Firebase console, you're actually creating a <a href=\"https://cloud.google.com/docs/overview/?authuser=0#projects\">Google Cloud project</a> behind the scenes. You can think of a Google Cloud project as a virtual container for data, code, configuration, and services. <strong>A Firebase project is a Google Cloud project that has additional Firebase-specific configurations and services.</strong> You can even create a Google Cloud project first, then add Firebase to the project later.</p>\n<p>Since a Firebase project <strong><em>is</em></strong> a Google Cloud project:</p>\n<ul>\n<li>Projects that appear in the <a href=\"https://console.firebase.google.com/?authuser=0\">Firebase console</a> also appear in the <a href=\"https://cloud.google.com/docs/overview/?authuser=0#google-cloud-console\">Google Cloud Console</a> and <a href=\"https://console.cloud.google.com/apis/?authuser=0\">Google APIs console</a>.</li>\n<li><a href=\"https://firebase.google.com/pricing/?authuser=0\">Billing</a> and <a href=\"https://firebase.google.com/docs/projects/iam/overview?authuser=0\">permissions</a> for projects are shared across Firebase and Google Cloud.</li>\n<li>Unique identifiers for a project (like the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-number\">project number</a> and the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-id\">project ID</a>) are shared across Firebase and Google Cloud.</li>\n<li>You can use products and APIs from both Firebase and Google Cloud in a project.</li>\n<li>Deleting a project deletes it across Firebase and Google Cloud.</li>\n</ul>\n<h2>Setting up a Firebase project and registering apps</h2>\n<p>You can set up a Firebase project and register apps in the <a href=\"https://console.firebase.google.com/?authuser=0\">Firebase console</a> (or, for advanced use cases, via the <a href=\"https://firebase.google.com/docs/projects/api/reference/rest?authuser=0\">Firebase Management REST API</a> or the <a href=\"https://firebase.google.com/docs/cli?authuser=0#management-commands\">Firebase CLI</a>). When you set up a project and register apps, you need to make some organizational decisions and add Firebase-specific configuration information to your local projects.</p>\n<p>Make sure to review some <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#best-practices\">general project-level best practices</a> (at the bottom of this page) before setting up a project and registering apps.</p>\n<h3>The project name</h3>\n<p>When you create a project, you provide a <strong>project name</strong>. This identifier is the <em>internal-only name</em> for a project in the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#manage-console\">Firebase console</a>, the <a href=\"https://cloud.google.com/docs/overview/?authuser=0#google-cloud-console\">Google Cloud Console</a>, and the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#manage-cli\">Firebase CLI</a>. The project name is not exposed in any publicly visible Firebase or Google Cloud product, service, or resource; it simply serves to help you more easily distinguish among multiple projects.</p>\n<p>You can edit a project name at any time in the settings <a href=\"https://console.firebase.google.com/project/_/settings/general/?authuser=0\"><strong>Project settings</strong></a> of the Firebase console. The project name is displayed in the top pane.</p>\n<h3>The project number</h3>\n<p>A Firebase project (and its <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#firebase-cloud-relationship\">associated Google Cloud project</a>) has a <strong>project number</strong>. This is the Google-assigned globally unique canonical identifier for the project. Use this identifier when configuring integrations and/or making API calls to Firebase, Google, or third-party services.</p>\n<h4>API calls and the project number</h4>\n<p>For many API calls, you need to include a unique identifier for a project. Although many APIs accept the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-id\">project ID</a>, it's recommended that you use the <strong>project number</strong> for making API calls to Firebase, Google, or third-party services.</p>\n<p>Learn more about using project identifiers, especially the project number, in Google's <a href=\"https://google.aip.dev/cloud/2510\">AIP 2510 standard</a>.</p>\n<h4>Find the project number</h4>\n<ul>\n<li>Firebase console: Click settings <a href=\"https://console.firebase.google.com/project/_/settings/general/?authuser=0\"><strong>Project settings</strong></a>. The project number is displayed in the top pane.</li>\n<li>Firebase CLI: Run firebase projects:list. The project number is displayed along with all the Firebase projects associated with your account.</li>\n<li>Firebase Management REST API: Call <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects/list?authuser=0\">projects.list</a>. The response body contains the project number in the <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects?authuser=0#FirebaseProject\">FirebaseProject</a> object.</li>\n</ul>\n<h3>The project ID</h3>\n<p>A Firebase project (and its <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#firebase-cloud-relationship\">associated Google Cloud project</a>) has a <strong>project ID</strong>. This is a user-defined unique identifier for the project across all of Firebase and Google Cloud. When you create a Firebase project, Firebase automatically assigns a unique ID to the project, but you can edit it during project setup. This identifier should generally be treated as a convenience alias to reference the project.</p>\n<p>If you delete a project, the project ID is also deleted and can never be used again by any other project.</p>\n<h4>Firebase resources and the project ID</h4>\n<p>The project ID displays in publicly visible Firebase resources, for example:</p>\n<ul>\n<li>Default Hosting subdomain — <strong>PROJECT_ID</strong>.web.app and <strong>PROJECT_ID</strong>.firebaseapp.com</li>\n<li>Default Realtime Database URL — <strong>PROJECT_ID</strong>-default-rtdb.firebaseio.com or <strong>PROJECT_ID</strong>-default-rtdb.<strong>REGION_CODE</strong>.firebasedatabase.app</li>\n<li>Default Cloud Storage bucket name — <strong>PROJECT_ID</strong>.appspot.com</li>\n</ul>\n<p>For all of the aforementioned resources, you can create non-default instances. The publicly visible names of non-defaults are fully-customizable. You can <a href=\"https://firebase.google.com/docs/hosting/custom-domain?authuser=0\">connect custom domains</a> to a Firebase-hosted site, <a href=\"https://firebase.google.com/docs/database/usage/sharding?authuser=0\">shard the Realtime Database</a>, and <a href=\"https://firebase.google.com/docs/storage?authuser=0\">create multiple Cloud Storage buckets</a> (visit the platform-specific Get Started page).</p>\n<h4>The Firebase CLI and the project ID</h4>\n<p>For some use cases, you might have multiple Firebase projects associated with the same local app directory. In these situations, when you use the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#manage-cli\">Firebase CLI</a>, you need to pass the --project flag with the firebase commands to communicate which Firebase project you want to interact with.</p>\n<p>You can also set up a <a href=\"https://firebase.google.com/docs/cli?authuser=0#project_aliases\">project alias</a> for each Firebase project so that you don't have to remember project IDs.</p>\n<h4>API calls and the project ID</h4>\n<p>For many API calls, you need to include a unique identifier for a project. Although many APIs accept the project ID, it's recommended that you use the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-number\"><strong>project number</strong></a> for making API calls to Firebase, Google, or third-party services.</p>\n<p>Learn more about using project identifiers, especially the project number, in Google's <a href=\"https://google.aip.dev/cloud/2510\">AIP 2510 standard</a>.</p>\n<h4>Find the project ID</h4>\n<ul>\n<li>Firebase console: Click settings <a href=\"https://console.firebase.google.com/project/_/settings/general/?authuser=0\"><strong>Project settings</strong></a>. The project ID is displayed in the top pane.</li>\n<li>Firebase CLI: Run firebase projects:list. The project ID is displayed along with all the Firebase projects associated with your account.</li>\n<li>Firebase Management REST API: Call <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects/list?authuser=0\">projects.list</a>. The response body contains the project ID in the <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects?authuser=0#FirebaseProject\">FirebaseProject</a> object.</li>\n</ul>\n<h3>Firebase config files and objects</h3>\n<p>When you register an app with a Firebase project, the Firebase console provides a Firebase configuration file (iOS/Android apps) or a configuration object (web apps) that you add directly to your local app directory.</p>\n<ul>\n<li>For iOS apps, you add a GoogleService-Info.plist configuration file.</li>\n<li>For Android apps, you add a google-services.json configuration file.</li>\n<li>For web apps, you add a Firebase configuration object.</li>\n</ul>\n<p>At any time, you can <a href=\"https://support.google.com/firebase/answer/7015592?authuser=0\">obtain an app's Firebase config file or object</a>.</p>\n<p>A Firebase config file or object associates an app with a specific Firebase project and its resources (databases, storage buckets, etc.). The configuration includes \"Firebase options\", which are parameters required by Firebase and Google services to communicate with Firebase server APIs and to associate client data with the Firebase project and Firebase app. Here are the required, minimum \"Firebase options\":</p>\n<ul>\n<li><a href=\"https://cloud.google.com/docs/authentication/api-keys?authuser=0\"><strong>API key</strong></a>: a simple encrypted string used when calling certain APIs that don't need to access private user data (example value: AIzaSyDOCAbC123dEf456GhI789jKl012-MnO)</li>\n<li><a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#project-id\"><strong>Project ID</strong></a>: a user-defined unique identifier for the project across all of Firebase and Google Cloud. This identifier may appear in URLs or names for some Firebase resources, but it should generally be treated as a convenience alias to reference the project. (example value: myapp-project-123)</li>\n<li>\n<p><strong>Application ID (\"AppID\")</strong>: the unique identifier for the Firebase app across all of Firebase with a platform-specific format:</p>\n<ul>\n<li>Firebase iOS apps: GOOGLE<em>APP</em>ID (example value: 1:1234567890:ios:321abc456def7890)\nThis is <em>not</em> an Apple bundle ID.</li>\n<li>Firebase Android apps: mobilesdk<em>app</em>id (example value: 1:1234567890:android:321abc456def7890)\nThis is <em>not</em> an Android package name or Android application ID.</li>\n<li>Firebase Web apps: appId (example value: 1:65211879909:web:3ae38ef1cdcb2e01fe5f0c)</li>\n</ul>\n</li>\n</ul>\n<p>The content of the Firebase config file or object is considered public, including the app's platform-specific ID (iOS bundle ID or Android package name) and the Firebase project-specific values, like the API Key, project ID, Realtime Database URL, and Cloud Storage bucket name. Given this, <strong>use Firebase Security Rules</strong> to protect your data and files in <a href=\"https://firebase.google.com/docs/database/security?authuser=0\">Realtime Database</a>, <a href=\"https://firebase.google.com/docs/firestore/security/get-started?authuser=0\">Cloud Firestore</a>, and <a href=\"https://firebase.google.com/docs/storage/security?authuser=0\">Cloud Storage</a>.</p>\n<p>For open source projects, we generally do not recommend including the app's Firebase config file or object in source control because, in most cases, your users should create their own Firebase projects and point their apps to their own Firebase resources (via their own Firebase config file or object).</p>\n<h2>Managing a Firebase project</h2>\n<p>Make sure to review the <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#best-practices\">general project-level best practices</a> (at the bottom of this page) for considerations that might affect how you manage a Firebase project.</p>\n<h3>Tools to manage a project</h3>\n<h4>Firebase console</h4>\n<p>The <a href=\"https://console.firebase.google.com/?authuser=0\">Firebase console</a> offers the richest environment for managing Firebase products, apps, and project-level settings.</p>\n<p><img src=\"https://firebase.google.com/docs/projects/images/firebase_console_overview.png?authuser=0\"></p>\n<p>The left-side panel of the console lists the Firebase products, organized by top-level categories. At the top of the left-side panel, access a project's settings by clicking settings. A project's settings include <a href=\"https://firebase.google.com/integrations?authuser=0\">integrations</a>, <a href=\"https://firebase.google.com/docs/projects/iam/overview?authuser=0\">access permissions</a>, and <a href=\"https://firebase.google.com/pricing?authuser=0\">billing</a>.</p>\n<p>The middle of the console displays buttons that launch setup workflows to register various types of apps. After you start using Firebase, the main area of the console changes into a dashboard that displays stats on the products you use.</p>\n<h4>Firebase CLI (a command line tool)</h4>\n<p>Firebase also offers the <a href=\"https://firebase.google.com/docs/cli?authuser=0\">Firebase CLI</a> for configuring and managing specific Firebase products, like Firebase Hosting and Cloud Functions for Firebase.</p>\n<p>After installing the CLI, you have access to the <a href=\"https://firebase.google.com/docs/cli?authuser=0#command_reference\">global firebase command</a>. Use the CLI to <a href=\"https://firebase.google.com/docs/cli?authuser=0#initialize_a_firebase_project\">link your local app directory to a Firebase project</a>, then <a href=\"https://firebase.google.com/docs/cli?authuser=0#deployment\">deploy</a> new versions of Firebase-hosted content or updates to functions.</p>\n<h4>Firebase Management REST API</h4>\n<p>Using the <a href=\"https://firebase.google.com/docs/projects/api/reference/rest?authuser=0\">Firebase Management REST API</a>, you can programmatically manage a Firebase project. For example, you can programmatically register an app with a project or list the apps that are already registered (<a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.iosApps?authuser=0#methods\">iOS</a> | <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.androidApps?authuser=0#methods\">Android</a> | <a href=\"https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.webApps?authuser=0#methods\">web</a>).</p>\n<h2>General best practices</h2>\n<h3>Adding apps to a project</h3>\n<p><strong>Ensure that all apps within a project are platform variants of the same application</strong> from an end-user perspective. It's advisable to register the iOS, Android, and web versions of the same app or game with the same Firebase project. All the apps in a project generally share the same Firebase resources (database, storage buckets, etc.).</p>\n<p>If you have <strong><em>multiple build variants</em></strong> with different iOS bundle IDs or Android package names defined, you can register each variant with a separate Firebase project. However, if you have variants that share the <em>same</em> Firebase resources, register them with the <em>same</em> Firebase project.</p>\n<p>Here are some general limits for Firebase projects, apps, and sites:</p>\n<ul>\n<li>\n<p><strong>Number of projects per account</strong></p>\n<ul>\n<li>Spark pricing plan — Project-creation quota is limited to a lower count of projects (usually around 5-10).</li>\n<li>Blaze pricing plan — Project-creation quota per account increases substantially as long as the associated Cloud Billing account is in good standing.</li>\n</ul>\n<p>The limit on project-creation quota is rarely a concern for most developers, but if needed, you can <a href=\"https://support.google.com/cloud/answer/6330231?authuser=0\">request an increase in project quota</a>.</p>\n<p>Be aware that the complete deletion of a project requires 30 days and counts toward project quota until the project is fully deleted.</p>\n</li>\n<li>\n<p><strong>Number of apps per project</strong></p>\n<p>Firebase restricts the total number of Firebase Apps within a Firebase project to 30.</p>\n<p>You should ensure that all Firebase Apps within a single Firebase project are platform variants of the same application from an end-user perspective. Read more about best practices for <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0#multi-tenancy\">multi-tenancy</a> below.</p>\n<p>Learn more about the <a href=\"https://firebase.google.com/support/faq?authuser=0#apps-per-project\">limit on apps per project</a> in the FAQ.</p>\n</li>\n<li>\n<p><strong>Number of Hosting sites per project</strong></p>\n<p>The <a href=\"https://firebase.google.com/docs/hosting/multisites?authuser=0\">Firebase Hosting multisite feature</a> supports a maximum of 36 sites per project.</p>\n</li>\n</ul>\n<h3>Multi-tenancy</h3>\n<p>Connecting several different logically independent apps and/or web sites to a single Firebase project (often called \"multi-tenancy\") is not recommended. Multi-tenancy can lead to serious configuration and data privacy concerns problems, including unintended issues with analytics aggregation, shared authentication, overly-complex database structures, and difficulties with security rules.</p>\n<p>Generally, <strong>if a set of apps don't share the same data and configurations, strongly consider registering each app with a different Firebase project.</strong></p>\n<p>For example, if you develop a white label application, each independently labelled app should have its own Firebase project, but the iOS and Android versions of that label can be in the same project. Each independently labeled app shouldn't (for privacy reasons) share data with the others.</p>\n<h2>Launching your app</h2>\n<ul>\n<li>Set up <a href=\"https://firebase.google.com/docs/projects/billing/avoid-surprise-bills?authuser=0#set-up-budget-alert-emails\">budget alerts</a> for your project in the Google Cloud Console.</li>\n<li>Monitor the <a href=\"https://console.firebase.google.com/project/_/usage?authuser=0\"><em>Usage and billing</em> dashboard</a> in the Firebase console to get an overall picture of your project's usage across multiple Firebase services.</li>\n<li>Review the <a href=\"https://firebase.google.com/support/guides/launch-checklist?authuser=0\">Firebase launch checklist</a>.</li>\n</ul>"},{"url":"/docs/articles/semantic-html/","relativePath":"docs/articles/semantic-html.md","relativeDir":"docs/articles","base":"semantic-html.md","name":"semantic-html","frontmatter":{"title":"Web Design","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>Three different aspects of web site production:</p>\n<ul>\n<li>Content -- the text, images, etc. What the user wants to read.</li>\n<li>Style -- how the content is arranged on the page, fonts, colours, page style.</li>\n<li>Behaviour -- how users interact with the site, data processing, dynamic page elements.</li>\n</ul>\n<p>Since each requires different skills, a good (software) design would seperate them.</p>\n<p>Each of these areas has a different associated technology in the web world: HTML, Cascading Style Sheets (CSS) and Javascript.</p>\n<p>Note that it hasn't always been this way, HTML can do a bunch of Style things (eg. the &#x3C;font> tag) but now that we have good standards compliant browser we don't need to use them.</p>\n<h2>Document Production</h2>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Metal_movable_type.jpg/640px-Metal_movable_type.jpg\"></p>\n<p>Moveable type, source <a href=\"http://commons.wikimedia.org/wiki/File:Metal_movable_type.jpg\">Wikimedia Commons</a></p>\n<p>Many years ago, when printed pages were made with moveable type, the printer who assembled the page of type was responsible for all aspects of the page design. They would choose the typeface, and in the early days even make the matrix and cast the type themselves. They would lay out the lines of text, choosing suitable spacing in each line, deciding where to break the line and adding hyphens to improve the overall look of the page while maintaining readability. The page was then set in the press and pages were printed.</p>\n<p>Even before that, the monks who copied manuscripts did everything themselves, copying the text and adding beautiful illuminations to each page to add to the value of the book.</p>\n<p>As the industry developed though, the task of type-setter became more mechanical. Other people became expert in how to best lay out pages, what visual design elements would best communicate the desired message etc. The type-setter still made the technical choices to achieve the desired goals, but didn't have to be an expert in design. The production of a printed document would involve a number of people who were expert in their given area, from author to visual designer to type-setter.</p>\n<p>This team based approach to document production means that each person can develop their own expertise and to a certain extent, doesn't need to worry about what the people later in the chain will do. The author doesn't worry about how to place figures or images in the page, just that they will be there; the designer doesn't need to be concerned about kerning and the use of em-spaces in type-setting; the type-setter isn't an expert in the content of the text. All can work together to produce a superior printed document.</p>\n<p>The world of document production worked like this for a long time until the invention of the personal computer and <em>Desktop Publishing</em> software. Suddenly, authors became designers and type-setters through easy to use computer software. They could choose fonts, set margins, force hyphenation and make minute decisions about the layout and look and feel of each page. Not surprisingly, this becomes a significant distraction from the task of creating content, but it also means that the expertise of the specialist designer or type-setter isn't used any more. This might lead to more productivity as the production process is compressed, but it doesn't usually lead to more readable, better presented documents; many of the early self-produced documents were an unsightly mix of fonts, colours and sizes.</p>\n<p>If we fast-forward to the software tools we have today for document production, it's interesting to note that the expertise of the designer and typesetter has crept back in to the process. Rather than being involved in the production of every document, these people are now able to write stylesheets and templates as well as contribute to the algorithms used in the software to lay out the text on a page. Most companies will have a standard document template that is used for reports or letters, this has usually been designed by a professional and all the author needs to do is enter the text in the right place. Stylesheets in word processors mean that there will be a consistency of font use throughout the document and importantly, that the decisions on which fonts and how they are used doesn't need to be made by the author.</p>\n<p>So, to summarise this little discussion of history, there have always been people who's expertise is the way that a text is rendered on the page. With the onset of desktop publishing software, there has been a tendency for the author to spend time in document design, meaning that the relevant expertise was not being applied. However, modern software now allows for the designer's voice to be heard again through the use of stylesheets and document templates. This leaves the author to concentrate on the text meaning they will be more productive and should produce better looking documents as well.</p>\n<h2>Web Document Production</h2>\n<p>Fundamentally, the web is a technology for delivering content to readers through a document based interface (the web browser). So, producing web content is a document production process and as such, should parallel the ideas discussed above. It's interesting to look at the development of HTML and see how it parallels the developments described above.</p>\n<p>Early HTML was a language for encoding content. It included tags for headings, paragraphs, lists etc. but didn't provide any way to change the way these things were rendered by the browser. The browser made sensible decisions and web documents all looked about the same. The focus was on the content. Soon, <a href=\"http://www.ncsa.illinois.edu/Projects/mosaic.html\">graphical browsers</a> started to appear that allowed images to be included in pages and people started to want to have some control over the appearance of their pages.</p>\n<p>The growth of the web into the commercial arena and the wider range of documents being published led to the 'browser wars' between Netscape and Microsoft. One of the features of this war was the arms race of features in each browser designed to make web pages look better. Each vendor would introduce new ways to control the look and feel of pages, for example the &#x3C;FONT> tag was introduced by Netscape to allow control of the font used to display text while Microsoft included the &#x3C;MARQUEE> tag that displayed text scrolling across the page. Eventually, some of these tags were standardised into a later version of HTML and were implemented by most of the browsers. These tags encouraged authors to get involved in page design, in fact they had to since the only way to control the appearance of a page was to insert codes into the text.</p>\n<p>While the &#x3C;FONT> tag allowed some control over the appearance of text, there was still a problem of laying out a page as a whole. The solution that became standard practice was to mis-use the &#x3C;TABLE> tag and construct the whole page as a table with rows and columns for the different page elements such as header, menu, content and footer. This worked really well, but again meant that the HTML code that an author was writing had to contain a lot of information about the layout of the page. In addition, it was common for people to mis-use tags just for the sake of appearance, for example to have more control over the appearance of headings, one might just encode them using &#x3C;B> or &#x3C;FONT> tags rather than header tags.</p>\n<p>All of these additions to HTML and the mis-use of existing tags meant that a language that was originally designed to allow authors to concentrate on content had turned into a page layout language. Luckily, sense has prevailed and we have now developed ways to control page layout without adding special instructions into the HTML code - that is, we have the Cascading Stylesheet language (CSS). Once again, we can let the author concentrate on content in HTML while all (or most) design decisions are encoded in the stylesheet.</p>\n<p>The current suite of web languages understood by your browser (HTML, CSS and Javascript) each serve different roles in the web development process:</p>\n<ul>\n<li>HTML - Content</li>\n<li>CSS - Style</li>\n<li>Javascript - Behaviour</li>\n</ul>\n<p>The third of these - Javascript and Behaviour - refer to the way that Javascript can be used to change the way that the user interacts with the page. This doesn't really have an analogue in the print document production world but it's an important aspect of modern web content production. It fits into this framework because the behavioural changes that Javascript can introduce should not be the concern of the content author or the visual designer (though both might have opinions on what they'd like to see).</p>\n<p>It is useful to think of these three aspects of web design as independent things. The same web content could be presented using alternate stylesheets and have a completely different impact. Similarly, Javascript can be used to change the way that a user interacts with content, making it more usable. We can see the Style and Behaviour aspects as layers that are applied to the core Content to enhance it for the user.</p>\n<h2>The Separation of Concerns</h2>\n<p>From a Computer Science/Software Engineering point of view there is a very important principle called the <a href=\"http://en.wikipedia.org/wiki/Separation_of_concerns\">Separation of Concerns</a> (SoC) that is illustrated perfectly by the way that the various web languages have evolved. The SoC principle is about partitioning the work that we do in software development into parts that can be considered separately. This is achieved by <em>modularisation</em> within a software project and is helped by things like classes and interface descriptions between modules</p>\n<ul>\n<li>in fact these things have been developed to support SoC.</li>\n</ul>\n<p>The SoC principle allows us to develop large complex software by allowing us to concentrate on different aspects of the solution. It could be that we do that alone, spending time on one aspect and then another, or as a team with different people assigned to different aspects. Either way, being able to work on part of the problem makes it manageable and improves the overall quality of the solution.</p>\n<p>In web development, the separation of concerns is supported by the different languages that work together to build a modern web application. It is important to recognise this and make sure that we use each of these tools in such a way as to respect their roles and capabilities. So, while it is possible to use HTML structures to make text large and bold for a heading, we don't, we use one of the header tags and rely on the stylesheet to apply the appropriate settings. Having the author respect good HTML usage means that the designer can make assumptions about the page structure in the stylesheet and ensure that the document appearance is consistent for the user.</p>\n<h2>Semantic HTML Markup</h2>\n<p>One corollary of this kind of thinking is that each component that we use should be used as it was designed and according to it's role in the overall picture. In particular for HTML this implies that the markup we use should encode only the <em>structure</em> of the document rather than aspects of the <em>appearance</em> which is properly dealt with using CSS. Further, this means that we should use markup in a way that imparts useful <em>meaning</em> to the document structure. This is generally known as using <em>Semantic HTML</em> (<a href=\"http://en.wikipedia.org/wiki/Semantic_HTML\">Wikipedia</a>, <a href=\"http://microformats.org/wiki/posh\">POSH</a> on Microformats.org) and is the current best practice in HTML authoring.</p>\n<p>To clarify this point we can look at some examples. Writing semantic HTML means using the HTML tags as they were designed to be used - to convey the meaning of a particular document structure or textual element. So a good example is when we want to encode the main heading in a page I would use the H1 tag:</p>\n<p>This seems obvious, but in some cases, an author might decide that the default rendering of the H1 tag is too big, so rather than using CSS to define an alternate style, they use the H2 tag instead.</p>\n<p>This may seem harmless, after all we've still marked up this text as a heading. The problem is that we've lost the information that this is the main heading in the page that was conveyed by the H1 tag.</p>\n<p>Even worse, I could use the B (bold) tag and the now deprecated FONT tag to make my text look like a heading:</p>\n<p>In this case the appearance might be ok but the markup is not appropriate for the task. The author's focus has been on the appearance rather than the meaning of the markup; we could say that the author is overstepping their responsibilities a little - the appearance of the text should be the domain of the designer. If the heading is encoded as in this example, the designer will not be able to re-style the headings in a robust way (we could apply a style to bold paragraphs but that would also apply to any other use of this markup in the text).</p>\n<p>The example illustrates the importance of using an appropriate markup tag where one exists. In the case of a heading, this is pretty clear but other parts of the document might need a bit of thought to see what markup is appropriate. One common issue is whether to use a TABLE for some information that you want to appear as a list or array. TABLE is meant for data that has columns and rows, for example, the results of a survey or test scores for a class of students.</p>\n<p>While it is less common these days, the most frequent mis-use of tables is as a means of laying out all or part of a page as a rectangular grid. You may still see this in the navigation links on a page which the designer might want to appear in a row near the top of the page or a column down the side. Semantically this is a list and should really be marked up as such. If a table-like appearance is needed then CSS rules can be used to acheive this (eg. display: table-row).</p>\n<p>TABLE is sometimes used for things that might be more appropriately marked up as lists, eg. using UL (unordered list), OL (ordered list) or DL (description list) tags. An example might be the list of ingredients for a recipe; you might be tempted to encode it as a table because you want the quantities to be lined up in a column on the left. It might be appropriate to use TABLE here but a bit of reflection might tell you that it's really an unordered list - for example you might note that while there's usually a quantity for each ingredient it's not always the case ('salt to taste') so this isn't really columns of data, just list items that might have a distinguished field.</p>\n<p>A final example might be the description of a staff member in an online directory, the commonly contains entries for name, office, phone number, email address etc and it might seem natural to encode this as a table if you want a nice neat layout. However, in this case there is more appropriate markup in the DL (description list) tag. Each entry in a description list contains two parts DT (description title) and DD (description data) which are used to mark up the property name and value:</p>\n<p>Some authors are put off the description list because of the default style that is associated with it which puts the DT and DD parts on different lines. However, changing this is very easy with CSS so it really should be used for information that is structured in this way.</p>\n<p>Using the right semantic markup <em>adds</em> information to the text that can be used by the designer to enhance the communicative power of the web page. Using a consistent style for headings makes it easier for a reader to see the structure of a page and understand it. Similarly, I can use inline tags for things like <em>emphasis</em> (EM), Abbrv. (abbreviations, ABBR), “a quotation” (Q) or <strong>a strongly emphasised point</strong> (STRONG). Each of these has a default style (or in some cases like ABBR, is just the same as the default text style) but can be re-styled by the designer to achieve a particular look and feel. If these elements are used consistently throughout a text, the overall readability of the text can be greatly improved.</p>\n<p>Another motivation for using semantic markup is for users who cannot read via a normal web browser. Blind people make use software that reads out the content of a web page; if the page uses the appropriate semantic markup then the software can make use of this to present the content more appropriately to the user. This might include using the headings to provide a summary of the page or the emphasis tags to generate an appropriate intonation pattern. You might also think about the difference in reading out a list vs. a table of data - that might be a useful way of choosing between the two for a particular part of your page.</p>\n<h3>Exercises</h3>\n<ol>\n<li>\n<p>Find an appropriate HTML tag to mark up the following items:</p>\n<ul>\n<li>the name of a book that you are citing in an essay</li>\n<li>a fragment of computer code, eg. a bit of Python</li>\n<li>an abbreviation or acronym and it's expansion (e.g. HTML - Hypertext Markup language)</li>\n</ul>\n</li>\n</ol>\n<h2>Extending the Semantics of HTML</h2>\n<p>The tag set defined by the HTML standard supports a wide range of content and was designed to cover the most common document structures and entities that appear on the web. However, the designers of HTML couldn't forsee everything that you might want to mark in your documents and so an extension mechanism is included such that you can effectively add new semantics to existing tags. This is the HTML class attribute which allows you to enter a user defined class for any tag. It is effectively a specialisation of any tag that can be used to encode special meanings for your documents.</p>\n<p>The class attribute is meant to contain one or more class identifiers which are single words that mean something to your application. They can be applied to any HTML tag. An example might be the use of the class important to mark something as important in some way. I can add this to a paragraph or a list item:</p>\n<p>In this example, the class attribute is specialising the meaning of the main HTML tag so that we can differentiate important paragraphs and list items from others. We might want to do this so that we can highlight them in some way in the final presentation of the text. In this way, the designer can make the decision about how to emphasise this text (maybe differently on desktop and mobile devices) and the author is free just to decide which things are important. The alternative in this case might have been to use an emphasis EM tag around the text we wanted to emphasise. The advantage of the class attribute is that we identify the whole paragraph or list item as important and we are able to differentiate different kinds of emphasis. This might be useful where, for example, there are some things that are 'important' and others that are 'critical' in a set of instructions. The use of class attributes means that we can transfer the concepts that mean something in the domain of the document directly into the HTML code and then allow the designer to make decisions about how the different ideas are expressed visually.</p>\n<p>Sometimes there isn't an HTML tag that really fits what you are trying to express; in these cases you can use the generic DIV and SPAN tags along with a class attribute. For example, it has been common to use a series of DIV tags to denote the overall structure of a web page:</p>\n<p>This pattern allows the designer to write a stylesheet that places each section at the right place on the page with the right fonts, colours etc. This pattern has become so common that the new HTML5 standard has included new tags named after some of these classes, so you can now write:</p>\n<p>This is part of the evolution of the HTML language; the observation that some kinds of structure are being used very widely leading to the introduction of new elements that properly convey the semantics that are required.</p>\n<p>One final note about the use of classes to convey new semantics. It is possible to use more than one class name where that is appropriate to convey more specialisations. For example, all of the code examples in this text are marked up as PRE tags with the class code and another class to denote the language the code is written in, so on this page I have examples like:</p>\n<p>Note that I have to encode the HTML markup as entity references using the &#x26; notation so that they appear correctly when you view them in the web browser (view source to check this out). Having more than one class name means that I can apply standard styling to code examples and special style for different languages. It also means that I could write a script to pull out all of the examples in a given language if I wanted to check their syntax etc.</p>\n<h1>A View of HTML\n\n</h1>\n<p>Rather than being a chapter that will teach you the HTML language this will be a chapter about the language, how it works, why it has the structures it does and what you should and shouldn't do with it.</p>\n<p>Most people will know some HTML by now (assuming you've been studying computing for a while or have a general interest in the web). My task here is not to teach you HTML or act as a reference for the language, there are plenty of resources around that will do this. Some examples are:</p>\n<ul>\n<li><a href=\"http://www.w3schools.com/html/default.asp\">w3schools HTML tutorial</a> w3schools is one of the most widely used tutorial and reference sites on the web for HTML and other web technologies.</li>\n<li><a href=\"https://developer.mozilla.org/en-US/learn/html\">Learn HTML</a> from the Mozilla Developer Network, the organisation that produces the Firefox browser. This page has pointers to a number of HTML tutorials and resources.</li>\n</ul>\n<h2>About HTML</h2>\n<p>HTML is a <em>markup language</em>, which is a formal language used to add encode structured documents, often by mixing formal elements and plain text. Another example is the LaTeX language used to typeset scientific and technical documents. Here's a fragment of LaTeX that shows the use of commands preceded by a backslash character and curly braces to enclose text:</p>\n<p>These commands are interpreted by the LaTeX system which uses then to produce nicely typeset PDF output. Markup can also be used to identify regions of text for analysis. Here's an example from a language corpus used to study human interaction:</p>\n<p>In this example, special character sequences are used to mark things like speaker turns, pauses, phrases and overlapping speech. This markup can be used to help analyse the language and find examples of certain linguistic phenomena (for example, find me examples of <em>'you know'</em> and show me what the next person says in response).</p>\n<p>HTML is the <em>Hypertext</em> Markup Language, meaning that it is designed to encode hypertext documents - that is, documents containing links to other documents on the World Wide Web. In fact, the hyperlink is just a small part of HTML and much more interesting are all the other parts of the language that allows us to produce useful documents for the web.</p>\n<p>HTML is based on an earlier standard called SGML (Standard Generalised Markup language) which had a successor called XML (eXtensible Markup Language). SGML and XML are both languages for defining markup languages, that is they define the syntax of a markup language but allow you to develop your own language for a specific purpose. The syntax is the angle brackets containing start and end tags &#x3C;p> and &#x3C;/p> that you will be familiar with (and a number of other rules). SGML and XML based languages all use this same syntax but allow the language designer to make up their own tags and define how they should be used together. HTML was designed originally by Tim Berners-Lee and later by the W3C as a language to encode pages of content for the web.</p>\n<p>Importantly, HTML is a <em>markup language</em> not a <em>programming language</em>. The job of a markup language is to record the structure of a document; that structure can then be interpreted by a program to generate some output. A programming language contains instructions that will be executed (or interpreted) to carry out some action or compute some result.</p>\n<h2>Versions of HTML</h2>\n<p>The first version of HTML was developed by Tim Berners-Lee as part of his World Wide Web project along with the HTTP protocol and the URL syntax. At first it was a very simple language for encoding articles and so had tags for headings, paragraphs, lists etc. Later, the language evolved to encompas new features in the browser such as the ability to display images, tables and modify the font that text was displayed in. The evolution of HTML has been quite gradual and at times part of intense competition between browser vendors (look up the <a href=\"http://en.wikipedia.org/wiki/Browser_wars\">Browser Wars</a> to get the full story). The Internet Engineering Task Force (IETF) and later the World Wide Web Consortium (W3C) tried to standardise the language but it took some time for industry practice to align with the W3C standards. Luckily now we are in a period of relative stability where the standards process aligns well with what the major browsers are able to understand.</p>\n<p>A version of HTML is defined by a Document Type Definintion (DTD) - a formal definition of the allowed tags and attributes and the allowed structure of an HTML document. The DTD says that you can have a &#x3C;p> tag and that it can contain a &#x3C;strong> tag but that a &#x3C;li> has to be inside a &#x3C;ul> or &#x3C;ol> tag and so on. If a document conforms to the DTD (follows the rules) we say that it is <em>valid</em>, if it contains errors such as having an unknown tag or a tag in the wrong place it is invalid.</p>\n<p>Early versions of HTML were subject to a lot of change and it wasn't until HTML version 4.0.1, released in 1999 that there was a bit of stability in the language and consensus about what should be included and what should be left out. Before then, HTML had grown to contain a lot of <em>visual</em> markup that had been developed by the browser vendors (Netscape and Microsoft) to try to make their browser look better than the competition. An example is the &#x3C;font> tag introduced by Microsoft (and copied by Netscape) which could change the font used to render some text. By the time HTML 4.01 was published, Cascading Style Sheets (CSS) were becoming more widely adopted and the use of markup that explicitly referred to the visual appearance of the content was discouraged.</p>\n<p>HTML 4.0.1 is still the latest version of the official W3C standard although there have been a large number of changes implemented by the browser vendors since the time it was released.</p>\n<p>In 1997 the XML standard was introduced. XML was intended to generalise the use of markup on the web and allow developers to design thier own markup languages for specific purposes. XML is an evolution of the earlier SGML standard on which HTML had been based; it simplified the syntax rules a lot and made it easier to write parsers for XML. One of the early applications of XML was to develop XHTML - a version of HTML converted to adhere to the XML standard. XHTML 1.0 retained almost all of the tags in HTML 4.0.1 but introduced the constraints of XML. For example in an XML document every opening tag must have a corresponding close tag; in HTML, many close tags are optional (e.g. you can leave out the closing &#x3C;p> tag for a paragraph since it is implied by the next opening &#x3C;p> tag) and many tags never have a close tag because they never contain any text (e.g. &#x3C;img> or &#x3C;br>). In XHTML then, paragraphs always require a close tag and empty tags are written with the new XML syntax: &#x3C;br />.</p>\n<p>One of the motivations for introducing XHTML was to try to encourage web developers to adhere more closely to the published standards. The web had grown up with a culture of view-source where people would learn how to encode web pages by looking at the source HTML of other web pages rather than by reading the standard. They would then write their own pages and if they looked ok in the browser, they would publish them. To cope with the amount of badly formed HTML content on the web, the browser vendors built thier HTML parsers to be very forgiving. If you put a paragraph inside an image tag or a header inside a paragraph it would have a go at rendering the content. As a consequence, very few web publishers cared about generating proper HTML and anyone who wanted to parse web content had to make very few assumptions about HTML structure.</p>\n<p>Around this time there was a move towards having more automated clients consuming web content. One group was the search engine developers who were just interested in the textual content of pages but other groups were trying to glean real data from the web. For example, price comparison services were starting up which tried to extract pricing information from store listings. Other services might try to find event information from web pages. All of these services needed to parse the HTML structure and had problems when the HTML was badly structured; this became known as <a href=\"http://essaysfromexodus.scripting.com/whatIsTagSoup\">Tag Soup</a> since one could not rely on proper HTML structure it was just treated as an unstructured collection of tagged text. Permissive parsers such as <a href=\"http://www.crummy.com/software/BeautifulSoup/\">Beautiful Soup</a> (Python) and <a href=\"http://home.ccil.org/~cowan/XML/tagsoup/\">Tagsoup</a> (Java) were developed to cope with the messy markup and give the developer as much detail as possible from the page.</p>\n<h1>HTML5</h1>\n<p>The most recent version of HTML is HTML5 - note the name with no spaces which is quite different to earlier versions. HTML5 was a big change in the way that the standard was put together and followed a long break in the development of standards for HTML: HTML 4.0.1 was last updated in 2000, HTML5 was finally released in 2012. The goal of HTML5 was to standardise current practice in browsers, rather than to define new structures or limit what was possible. The W3C worked with the browser developers to agree on standards for new technologies that they had introduced. For example, being able to include audio and video elements in HTML had been possible in some browsers; HTML5 defined a standard for these that all browser vendors could agree on and implement.</p>"},{"url":"/docs/audio/audio-feature-extraction/","relativePath":"docs/audio/audio-feature-extraction.md","relativeDir":"docs/audio","base":"audio-feature-extraction.md","name":"audio-feature-extraction","frontmatter":{"title":"Audio Feature Extraction","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Lorem ipsum</h2>\n<p>Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n<ul>\n<li>Lorem ipsum</li>\n<li>dolor sit amet</li>\n</ul>"},{"url":"/docs/audio/audio/","relativePath":"docs/audio/audio.md","relativeDir":"docs/audio","base":"audio.md","name":"audio","frontmatter":{"title":"Audio","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Lorem ipsum</h2>\n<p>Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n<ul>\n<li>Lorem ipsum</li>\n<li>dolor sit amet</li>\n</ul>"},{"url":"/docs/audio/discrete-fft/","relativePath":"docs/audio/discrete-fft.md","relativeDir":"docs/audio","base":"discrete-fft.md","name":"discrete-fft","frontmatter":{"title":"Fast Fourier Transform","weight":0,"excerpt":"Visualizing the Discrete Fourier Transform","seo":{"title":"Fast Fourier Transform","description":"Visualizing the Discrete Fourier Transform","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Visualizing the Discrete Fourier Transform</h2>\n<p>A couple of years ago I suggested a way of thinking about <a href=\"https://blog.revolutionanalytics.com/2014/01/the-fourier-transform-explained-in-one-sentence.html\">how the Discrete Fourier Transform works</a>, based on Stuart Riffle's elegant colour-coding of the equation:</p>\n<p><a href=\"http://revolution-computing.typepad.com/.a/6a010534b1db25970b019b0172129c970c-pi\"><img src=\"https://revolution-computing.typepad.com/.a/6a010534b1db25970b019b0172129c970c-800wi\" alt=\"The fourier transform, explained in one color-coded sentence\" title=\"The fourier transform, explained in one color-coded sentence\"></a></p>\n<p>(Sadly, Stuart's <a href=\"http://www.altdevblogaday.com/2011/05/17/understanding-the-fourier-transform/\">original post</a> describing the equation has been lost to bitrot, and can't even be found in the Wayback Machine.) My contribution was the following analogy:</p>\n<blockquote>\n<p>Imagine an enormous speaker, mounted on a pole, playing a repeating sound. The speaker is so large, you can see the cone move back and forth with the sound. Mark a point on the cone, and now rotate the pole. Trace the point from an above-ground view, if the resulting squiggly curve is off-center, then there is frequency corresponding the pole's rotational frequency represented in the sound.</p>\n</blockquote>\n<p>Dr Bill Connelly from Australia National University has created an interactive simulation of the analogy. Here, the sound from the speaker is a chord of two tones: just enter their frequency and amplitude, and see how the DFT is calculated from the analysis of the rotation:</p>\n<p><a href=\"http://www.billconnelly.net/?p=276\"><img src=\"https://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb08743789970d-800wi\" alt=\"DFT\" title=\"DFT\"></a></p>"},{"url":"/docs/audio/dynamic-time-warping/","relativePath":"docs/audio/dynamic-time-warping.md","relativeDir":"docs/audio","base":"dynamic-time-warping.md","name":"dynamic-time-warping","frontmatter":{"title":"dynamic-time-warping","weight":0,"excerpt":"dynamic-time-warping","seo":{"title":"dynamic-time-warping","description":"dynamic-time-warping","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Dynamic Time Warping Triggered Guitar Effects Project:</h1>\n<h1>DTW Algorithm:</h1>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&amp;resid=D21009FDD967A241%21634692&amp;authkey=AHfsGpj1Un3UNuE&amp;em=2&amp;wdAr=1.7777777777777777\" width=\"962px\" height=\"565px\" frameborder=\"0\">This is an embedded <a target=\"_blank\" href=\"https://office.com\">Microsoft Office</a> presentation, powered by <a target=\"_blank\" href=\"https://office.com/webapps\">Office</a>.</iframe>\n<hr>\n<h1>Project:</h1>\n<iframe src=\"https://onedrive.live.com/embed?resid=D21009FDD967A241%21608188&amp;authkey=%21AL1vMFzOuqvFbUY&amp;em=2&amp;wdAr=1.7777777777777777\" width=\"962px\" height=\"565px\" frameborder=\"0\">This is an embedded <a target=\"_blank\" href=\"https://office.com\">Microsoft Office</a> presentation, powered by <a target=\"_blank\" href=\"https://office.com/webapps\">Office</a>.</iframe>"},{"url":"/docs/audio/","relativePath":"docs/audio/index.md","relativeDir":"docs/audio","base":"index.md","name":"index","frontmatter":{"title":"Audio","weight":0,"excerpt":"Audio Projects and tools / web audio daw","seo":{"title":"Audio Projects","description":"A collection of web audio projects","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<br>\n<br>\n<br>\n<iframe width=\"100%\" height=\"500\" frameborder=\"0\"\nsrc=\"https://bgoonz.github.io/extracting-features-from-audio/\"></iframe>\n<hr>\n<br>\n<iframe width=\"100%\" height=\"500\" frameborder=\"0\"\nsrc=\"https://observablehq.com/embed/@bgoonz/mode-lighting/2?cell=*\"></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n    <iframe\n      width=\"100%\"\n      height=\"1000\"\n      frameborder=\"0\"\n      src=\"https://observablehq.com/embed/@bgoonz/determining-the-key-of-bwv1001-1st-movement-adagio?cell=*\"\n    ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n    <iframe\n      width=\"100%\"\n      height=\"784\"\n      frameborder=\"0\"\n      src=\"https://observablehq.com/embed/@bgoonz/can-sound-add-value-to-data-visualizations?cells=viewof+chart\"\n    ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>"},{"url":"/docs/articles/web-standards-checklist/","relativePath":"docs/articles/web-standards-checklist.md","relativeDir":"docs/articles","base":"web-standards-checklist.md","name":"web-standards-checklist","frontmatter":{"title":"Web Standards Checklist","weight":0,"excerpt":"(HTML, XHTML, XML, CSS, XSLT, DOM, MathML, SVG etc) and *pursue best practices* (valid code, accessible code, semantically correct code, user-friendly URLs etc).","seo":{"title":"Web Standards Checklist","description":"as an aid for developers who are interested in moving towards web standards","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Web Standards Checklist</h2>\n<p>The term web standards can mean different things to different people. For some, it is '<em>table-free sites</em>', for others it is '<em>using valid code</em>'. However, web standards are much broader than that. A site built to web standards should <em>adhere to standards</em> (HTML, XHTML, XML, CSS, XSLT, DOM, MathML, SVG etc) and <em>pursue best practices</em> (valid code, accessible code, semantically correct code, user-friendly URLs etc).</p>\n<p>In other words, a site built to web standards should ideally be <em>lean, clean, CSS-based, accessible, usable and search engine friendly</em>.</p>\n<h3>About the checklist</h3>\n<p>This is a guide that can be used:</p>\n<ul>\n<li>to show the breadth of web standards</li>\n<li>as a handy tool for developers during the production phase of websites</li>\n<li>as an aid for developers who are interested in moving towards web standards</li>\n</ul>\n<h3>The checklist</h3>\n<ol>\n<li>\n<p><a href=\"http://maxdesign.com.au/news/checklist/#quality\">Quality of code</a></p>\n<ol>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-1\">Does the site use a correct Doctype?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-2\">Does the site use a Character set?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-3\">Does the site use Valid (X)HTML?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-4\">Does the site use Valid CSS?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-5\">Does the site use any CSS hacks?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-6\">Does the site use unnecessary classes or ids?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-7\">Is the code well structured?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-8\">Does the site have any broken links?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-9\">How does the site perform in terms of speed/page size?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section1-10\">Does the site have JavaScript errors?</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"http://maxdesign.com.au/news/checklist/#degree\">Degree of separation between content and presentation</a></p>\n<ol>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section2-1\">Does the site use CSS for all presentation aspects (fonts, colour, padding, borders etc)?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section2-2\">Are all decorative images in the CSS, or do they appear in the (X)HTML?</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"http://maxdesign.com.au/news/checklist/#users\">Accessibility for users</a></p>\n<ol>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-1\">Are \"alt\" attributes used for all descriptive images?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-2\">Does the site use relative units rather than absolute units for text size?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-3\">Do any aspects of the layout break if font size is increased?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-4\">Does the site use visible skip menus?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-5\">Does the site use accessible forms?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-6\">Does the site use accessible tables?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-7\">Is there sufficient colour brightness/contrasts?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-8\">Is colour alone used for critical information?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-9\">Is there delayed responsiveness for dropdown menus (for users with reduced motor skills)?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section3-10\">Are all links descriptive (for blind users)?</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"http://maxdesign.com.au/news/checklist/#devices\">Accessibility for devices</a></p>\n<ol>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-1\">Does the site work acceptably across modern and older browsers?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-2\">Is the content accessible with CSS switched off or not supported?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-3\">Is the content accessible with images switched off or not supported?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-4\">Does the site work in text browsers such as Lynx?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-5\">Does the site work well when printed?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-6\">Does the site work well in Hand Held devices?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-7\">Does the site include detailed metadata?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section4-8\">Does the site work well in a range of browser window sizes?</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"http://maxdesign.com.au/news/checklist/#usability\">Basic Usability</a></p>\n<ol>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-1\">Is there a clear visual hierarchy?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-2\">Are heading levels easy to distinguish?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-3\">Is the site's navigation easy to understand?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-4\">Is the site's navigation consistent?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-5\">Does the site use consistent and appropriate language?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-6\">Does the site have a sitemap page and contact page? Are they easy to find?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-7\">For large sites, is there a search tool?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-8\">Is there a link to the home page on every page in the site?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-9\">Are links underlined?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section5-10\">Are visited links clearly defined?</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"http://maxdesign.com.au/news/checklist/#site\">Site management</a></p>\n<ol>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section6-1\">Does the site have a meaningful and helpful 404 error page that works from any depth in the site?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section6-2\">Does the site use friendly URLs?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section6-3\">Do your URLs work without \"www\"?</a></li>\n<li><a href=\"http://maxdesign.com.au/news/checklist/#section6-4\">Does the site have a favicon?</a></li>\n</ol>\n</li>\n</ol>\n<h3>1. Quality of code</h3>\n<h4>1.1 Does the site use a correct Doctype?</h4>\n<blockquote>\n<p>A doctype (short for 'document type declaration') informs the validator which version of (X)HTML you're using, and must appear at the very top of every web page. Doctypes are a key component of compliant web pages: your markup and CSS won't validate without them.</p>\n<p><em><a href=\"http://www.alistapart.com/articles/doctype/\">Fix your site with the right doctype</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.w3.org/QA/2002/04/valid-dtd-list.html\">http://www.w3.org/QA/2002/04/valid-dtd-list.html</a></li>\n<li><a href=\"http://css.maxdesign.com.au/listamatic/about-boxmodel.htm\">http://css.maxdesign.com.au/listamatic/about-boxmodel.htm</a></li>\n<li><a href=\"http://gutfeldt.ch/matthias/articles/doctypeswitch.html\">http://gutfeldt.ch/matthias/articles/doctypeswitch.html</a></li>\n</ul>\n<h4>1.2 Does the site use a Character set?</h4>\n<blockquote>\n<p>If a user agent (eg. a browser) is unable to detect the character encoding used in a Web document, the user may be presented with unreadable text. This information is particularly important for those maintaining and extending a multilingual site, but  declaring the character encoding of the document is important for anyone producing XHTML/HTML or CSS.</p>\n<p><em><a href=\"http://www.w3.org/International/tutorials/tutorial-char-enc/\">Tutorial: Character sets &#x26; encodings in XHTML, HTML and CSS</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.w3.org/International/O-charset.html\">Character encodings</a></li>\n</ul>\n<h4>1.3 Does the site use Valid (X)HTML?</h4>\n<blockquote>\n<p>Valid code will render faster than code with errors. Valid code will render better than invalid code. Browsers are becoming more standards compliant, and it is becoming increasingly necessary to write valid and standards compliant HTML</p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://validator.w3.org/\">W3C Markup Validation Service</a></li>\n</ul>\n<h4>1.4 Does the site use Valid CSS?</h4>\n<blockquote>\n<p>You need to make sure that there aren't any errors in either your HTML or your CSS, since mistakes in either place can result in botched document appearance.</p>\n<p><em><a href=\"http://www.meyerweb.com/eric/articles/webrev/199904.html\">Help! My CSS Isn't Working!</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://jigsaw.w3.org/css-validator/\">W3C CSS Validation Service</a></li>\n</ul>\n<h4>1.5 Does the site use any CSS hacks?</h4>\n<blockquote>\n<p>Basically, hacks come down to personal choice, the amount of knowledge you have of workarounds, the specific design you are trying to achieve.</p>\n<p><em><a href=\"http://www.mail-archive.com/wsg@webstandardsgroup.org/msg05823.html\">Standard Hacks?</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://css-discuss.incutio.com/?page=CssHack\">CSS Hacks</a></li>\n<li><a href=\"http://css-discuss.incutio.com/?page=ToHackOrNotToHack\">To hack or not to hack</a></li>\n<li><a href=\"http://centricle.com/ref/css/filters/\">CSS filters</a></li>\n</ul>\n<h4>1.6 Does the site use unnecessary classes or ids?</h4>\n<blockquote>\n<p>I've noticed that developers learning new skills often end up with good CSS but poor XHTML. Specifically, the HTML code tends to be full of unnecessary divs and ids. This results in fairly meaningless HTML and bloated style sheets.</p>\n<p><em><a href=\"http://www.clagnut.com/blog/228/\">Markup tactics</a></em></p>\n</blockquote>\n<h4>1.7 Is the code well structured?</h4>\n<blockquote>\n<p>Semantically correct markup uses html elements for their given purpose. Well structured HTML has semantic meaning for a wide range of user agents (browsers without style sheets, text browsers, PDAs, search engines etc.)</p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.w3.org/2003/12/semantic-extractor.html\">Semantic data extractor</a></li>\n</ul>\n<h4>1.8 Does the site have any broken links?</h4>\n<p>Broken links can frustrate users and potentially drive customers away. Broken links can also keep search engines from properly indexing your site.</p>\n<p>More:</p>\n<ul>\n<li><a href=\"http://validator.w3.org/checklink\">W3C Link checker</a></li>\n</ul>\n<h4>1.9 How does the site perform in terms of speed/page size?</h4>\n<blockquote>\n<p>Don't make me wait... That's the message users give us in survey after survey. Even broadband users can suffer the slow-loading blues.</p>\n<p><em><a href=\"http://www.websiteoptimization.com/speed/\">Speed Up Your Site: Web Site Optimization</a></em></p>\n</blockquote>\n<h4>1.10 Does the site have JavaScript errors?</h4>\n<p>Internet Explore for Windows allows you to turn on a debugger that will pop up a new window and let you know there are javascript errors on your site. This is available under 'Internet Options' on the Advanced tab. Uncheck 'Disable script debugging'.</p>\n<h3>2. Degree of separation between content and presentation</h3>\n<h4>2.1 Does the site use CSS for all presentation aspects (fonts, colour, padding, borders etc)?</h4>\n<blockquote>\n<p>Use style sheets to control layout and presentation</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-style-sheets\">Web Content Accessibility Guidelines 1.0 -- checkpoint 3.3</a></em></p>\n</blockquote>\n<h4>2.2 Are all decorative images in the CSS, or do they appear in the (X)HTML?</h4>\n<blockquote>\n<p>The aim for web developers is to remove all presentation from the html code, leaving it clean and semantically correct.</p>\n</blockquote>\n<h3>3. Accessibility for users</h3>\n<h4>3.1 Are \"alt\" attributes used for all descriptive images?</h4>\n<blockquote>\n<p>Provide a text equivalent for every non-text element</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-text-equivalent\">Web Content Accessibility Guidelines -- checkpoint 1.1</a></em></p>\n</blockquote>\n<h4>3.2 Does the site use relative units rather than absolute units for text size?</h4>\n<blockquote>\n<p>Use relative rather than absolute units in markup language attribute values and style sheet property values'</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-relative-units\">Web Content Accessibility Guidelines -- checkpoint 3.4</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-relative-units\">Web Content Accessibility Guidelines -- checkpoint 3.4</a></li>\n<li><a href=\"http://www.clagnut.com/blog/348/\">How to size text using ems</a></li>\n</ul>\n<h4>3.3 Do any aspects of the layout break if font size is increased?</h4>\n<p>Try this simple test. Look at your website in a browser that supports easy incrementation of font size. Now increase your browser's font size. And again. And again... Look at your site. Does the page layout still hold together? It is dangerous for developers to assume that everyone browses using default font sizes.</p>\n<h4>3.4 Does the site use visible skip menus?</h4>\n<blockquote>\n<p>A method shall be provided that permits users to skip repetitive navigation links.</p>\n<p><em><a href=\"http://www.section508.gov/index.cfm?FuseAction=Content&#x26;ID=12\">Section 508</a></em></p>\n</blockquote>\n<blockquote>\n<p>Group related links, identify the group (for user agents), and, until user agents do so, provide a way to bypass the group</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10-TECHS/#tech-group-links\">Web Content Accessibility Guidelines -- checkpoint 13.6</a></em></p>\n</blockquote>\n<blockquote>\n<p>...blind visitors are not the only ones inconvenienced by too many links in a navigation area. Recall that a mobility-impaired person with poor adaptive technology might be stuck tabbing through that morass.</p>\n<p><em><a href=\"http://joeclark.org/book/sashay/serialization/Chapter08.html#h4-2020\">Keep them visible!</a></em></p>\n</blockquote>\n<h4>3.5 Does the site use accessible forms?</h4>\n<blockquote>\n<p>Forms aren't the easiest of things to use for people with disabilities. Navigating around a page with written content is one thing, hopping between form fields and inputting information is another</p>\n<p><em><a href=\"http://www.htmldog.com/guides/htmladvanced/forms/\">Accessible forms</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.webstandards.org/learn/tutorials/accessible-forms/01-accessible-forms.html\">Accessible html/xhtml forms</a></li>\n<li><a href=\"http://www.accessify.com/tools-and-wizards/accessible-form-builder.asp\">Accessible form builder</a></li>\n</ul>\n<h4>3.6 Does the site use accessible tables?</h4>\n<blockquote>\n<p>For data tables, identify row and column headers... For data tables that have two or more logical levels of row or column headers, use markup to associate data cells and header cells.</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-table-headers\">Web Content Accessiblity Guidelines -- checkpoint 5.1</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://bellevuecollege.edu/webpublishing/tips/accessibility/tables.asp\">How to create accessible tables</a></li>\n<li><a href=\"http://www.accessify.com/tools-and-wizards/accessibility-tools/table-builder/\">Accessible table builder</a></li>\n<li><a href=\"http://www.webaim.org/techniques/tables/\">Creating accessible tables</a></li>\n</ul>\n<h4>3.7 Is there sufficient colour brightness/contrasts?</h4>\n<blockquote>\n<p>Ensure that foreground and background colour combinations provide sufficient contrast when viewed by someone having colour deficits</p>\n<p><em><a href=\"http://www.w3.org/TR/WAI-WEBCONTENT-TECHS/#tech-color-contrast\">Web Content Accessibilty Guidelines -- checkpoint 2.2</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.juicystudio.com/services/colourcontrast.asp\">Colour Contrast Analyser</a></li>\n</ul>\n<h4>3.8 Is colour alone used for critical information?</h4>\n<blockquote>\n<p>Ensure that all information conveyed with colour is also available without colour, for example from context or markup</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-color-convey\">Web Content Accessibilty Guidelines -- checkpoint 2.1</a></em></p>\n</blockquote>\n<p>There are basically three types of colour deficiency; Deuteranope (a form of red/green colour deficit), Protanope (another form of red/green colour deficit) and Tritanope (a blue/yellow deficit- very rare).</p>\n<p>More:</p>\n<ul>\n<li><a href=\"http://colorfilter.wickline.org/\">Colourblind Webpage filter</a></li>\n<li><a href=\"http://www.vischeck.com/vischeck/vischeckURL.php\">Vischeck</a></li>\n</ul>\n<h4>3.9 Is there delayed responsiveness for dropdown menus?</h4>\n<p>Users with reduced motor skills may find dropdown menus hard to use if responsiveness is set too fast.</p>\n<h4>3.10 Are all links descriptive?</h4>\n<blockquote>\n<p>Link text should be meaningful enough to make sense when read out of context -- either on its own or as part of a sequence of links. Link text should also be terse.</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-meaningful-links\">Web Content Accessibility Guidelines 1.0 -- checkpoint 13.1</a></em></p>\n</blockquote>\n<h3>4. Accessibility for devices</h3>\n<h4>4.1 Does the site work acceptably across modern and older browsers?</h4>\n<blockquote>\n<p>Before starting to build a CSS-based layout, you should decide which browsers to support and to what level you intend to support them.</p>\n</blockquote>\n<h4>4.2 Is the content accessible with CSS switched off or not supported?</h4>\n<p>Some people may visit your site with either a browser that does not support CSS or a browser with CSS switched off. In content is structured well, this will not be an issue.</p>\n<h4>4.3 Is the content accessible with images switched off or not supported?</h4>\n<p>Some people browse websites with images switched off -- especially people on very slow connections. Content should still be accessible for these people.</p>\n<h4>4.4 Does the site work in text browsers such as Lynx?</h4>\n<p>This is like a combination of images and CSS switched off. A text-based browser will rely on well structured content to provide meaning.</p>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.delorie.com/web/lynxview\">Lynx Viewer</a></li>\n</ul>\n<h4>4.5 Does the site work well when printed?</h4>\n<blockquote>\n<p>You can take any (X)HTML document and simply style it for print, without having to touch the markup.</p>\n<p><em><a href=\"http://www.alistapart.com/articles/goingtoprint/\">Going to print</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.d.umn.edu/itss/support/Training/Online/webdesign/css.html#print\">Web Design References -- Print</a></li>\n</ul>\n<h4>4.6 Does the site work well in Hand Held devices?</h4>\n<p>This is a hard one to deal with until hand held devices consistently support their correct media type. However, some layouts work better in current hand-held devices. The importance of supporting hand held devices will depend on target audiences.</p>\n<h4>4.7 Does the site include detailed metadata?</h4>\n<blockquote>\n<p>Metadata is machine understandable information for the web</p>\n<p><em><a href=\"http://www.w3.org/Metadata/\">W3C -- Metadata and Resource Description</a></em></p>\n</blockquote>\n<p>Metadata is structured information that is created specifically to describe another resource. In other words, metadata is 'data about data'.</p>\n<h4>4.8 Does the site work well in a range of browser window sizes?</h4>\n<p>It is a common assumption amongst developers that average screen sizes are increasing. Some developers assume that the average screen size is now 1024px wide. But what about users with smaller screens and users with hand held devices? Are they part of your target audience and are they being disadvantaged?</p>\n<h3>5. Basic Usability</h3>\n<h4>5.1 Is there a clear visual hierarchy?</h4>\n<blockquote>\n<p>Organise and prioritise the contents of a page by using size, prominence and content relationships</p>\n<p><em><a href=\"http://www.great-web-design-tips.com/web-site-design/165.html\">Create a Clear Visual Hierarchy</a></em></p>\n</blockquote>\n<h4>5.2 Are heading levels easy to distinguish?</h4>\n<blockquote>\n<p>Use header elements to convey document structure and use them according to specification</p>\n<p><em><a href=\"http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-logical-headings\">Web Content Accessibility Guidelines 1.0 -- checkpoint 3.5</a></em></p>\n</blockquote>\n<h4>5.3 Is the site's navigation easy to understand?</h4>\n<blockquote>\n<p>Your navigation system should give your visitor a clue as to what page of the site they are currently on and where they can go next.</p>\n<p><em>[Design Tutorial -- Navigation](<a href=\"http://www.1stsitefree.com/design\">http://www.1stsitefree.com/design</a></em>nav.htm)_</p>\n</blockquote>\n<h4>5.4 Is the site's navigation consistent?</h4>\n<blockquote>\n<p>If each page on your site has a consistent style of presentation, visitors will find it easier to navigate between pages and find information</p>\n<p><em><a href=\"http://www.juicystudio.com/tutorial/accessibility/navigation.asp\">Juicy studios -- Navigation</a></em></p>\n</blockquote>\n<h4>5.5 Does the site use consistent and appropriate language?</h4>\n<blockquote>\n<p>The use of clear and simple language promotes effective communication. Trying to come across as articulate can be as difficult to read as poorly written grammar, especially if the language used isn't the visitor's primary language.</p>\n<p><em><a href=\"http://www.juicystudio.com/tutorial/accessibility/clear.asp\">Clear language</a></em></p>\n</blockquote>\n<h4>5.6 Does the site have a sitemap page and contact page? Are they  easy to find?</h4>\n<blockquote>\n<p>Most site maps fail to convey multiple levels of the site's information architecture. In usability tests, users often overlook site maps or can't find them. Complexity is also a problem: a map should be a map, not a navigational challenge of its own.</p>\n<p><em><a href=\"http://www.useit.com/alertbox/20020106.html\">Site Map Usability</a></em></p>\n</blockquote>\n<h4>5.7 For large sites, is there a search tool?</h4>\n<p>While search tools are not needed on smaller sites, and some people will not ever use them, site-specific search tools allow users a choice of navigation options.</p>\n<h4>5.8 Is there a link to the home page on every page in the site?</h4>\n<p>Some users like to go back to a site's home page after navigating to content within a site. The home page becomes a base camp for these users, allowing them to regroup before exploring new content.</p>\n<h4>5.9 Are links underlined?</h4>\n<blockquote>\n<p>To maximise the <a href=\"http://www.jnd.org/dn.mss/affordances-and-design.html\">perceived affordance</a> of clickability, colour and underline the link text. Users shouldn't have to guess or scrub the page to find out where they can click.</p>\n<p><em><a href=\"http://www.useit.com/alertbox/20040510.html\">Guidelines for Visualizing Links</a></em></p>\n</blockquote>\n<h4>5.10 Are visited links clearly defined?</h4>\n<blockquote>\n<p>Most important, knowing which pages they've already visited frees users from unintentionally revisiting the same pages over and over again.</p>\n<p><em><a href=\"http://www.useit.com/alertbox/20040503.html\">Change the Color of Visited Links</a></em></p>\n</blockquote>\n<h3>6. Site management</h3>\n<h4>6.1 Does the site have a meaningful and helpful 404 error page that works from any depth in the site?</h4>\n<blockquote>\n<p>You've requested a page -- either by typing a URL directly into the address bar or clicking on an out-of-date link and you've found yourself in the middle of cyberspace nowhere. A user-friendly website will give you a helping hand while many others will simply do nothing, relying on the browser's built-in ability to explain what the problem is.</p>\n<p><em><a href=\"http://www.alistapart.com/articles/perfect404/\">The perfect 404</a></em></p>\n</blockquote>\n<h4>6.2 Does the site use friendly URLs?</h4>\n<blockquote>\n<p>Most search engines (with a few exceptions -- namely Google) will not index any pages that have a question mark or other character (like an ampersand or equals sign) in the URL... what good is a site if no one can find it?</p>\n<p><em><a href=\"http://www.sitepoint.com/article/search-engine-friendly-urls\">Search Engine-Friendly URLs</a></em></p>\n</blockquote>\n<blockquote>\n<p>One of the worst elements of the web from a user interface standpoint is the URL. However, if they're short, logical, and self-correcting, URLs can be acceptably usable</p>\n<p><em><a href=\"http://www.merges.net/theory/20010305.html\">How to make URLs user-friendly</a></em></p>\n</blockquote>\n<p>More:</p>\n<ul>\n<li><a href=\"http://www.websitegoodies.com/article/32\">Creating Search Engine Friendly URLs</a></li>\n<li><a href=\"http://www.merges.net/theory/20010305.html\">How to make URLs user-friendly</a></li>\n</ul>\n<h4>6.3 Does the site's URL work without \"www\"?</h4>\n<p>While this is not critical, and in some cases is not even possible, it is always good to give people the choice of both options. If a user types your domain name without the www and gets no site, this could disadvantage both the user and you.</p>\n<h4>6.4 Does the site have a favicon?</h4>\n<blockquote>\n<p>A Favicon is a multi-resolution image included on nearly all professionally developed sites. The Favicon allows the webmaster to further promote their site, and to create a more customized appearance within a visitor's browser</p>\n<p><em><a href=\"http://www.favicon.com/\">Favicon.com</a></em></p>\n</blockquote>\n<p>Favicons are definitely not critical. However, if they are not present, they can cause 404 errors in your logs (site statistics). Browsers like IE will request them from the server when a site is bookmarked. If a favicon isn't available, a 404 error may be generated. Therefore, having a favicon could cut down on favicon specific 404 errors. The same is true of a 'robots.txt' file.</p>"},{"url":"/docs/articles/webdev-tools/","relativePath":"docs/articles/webdev-tools.md","relativeDir":"docs/articles","base":"webdev-tools.md","name":"webdev-tools","frontmatter":{"title":"Web Developer Tools","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<ol>\n<li>What Are Web Development Tools?</li>\n</ol>\n<h5><strong>Client-side</strong>Otherwise known as front-end web development, this refers to anything a user can see or engage with—an app or website are good examples. This is about providing a top-notch user experience and smooth interface (usually with a combination of HTML, CSS and various JavaScript libraries.<strong>Server-side</strong>Otherwise known as back-end web development, this refers to the stuff behind the scenes of apps and websites that users can't see. It's the frameworks, servers and databases that keep things running.Image Source: Paperform\n\n</h5>\n<p>When people speak about web development tools (or devtools in the biz), they're usually referring to the apps and software that allows web developers to test and debug the code and interface of a website or web application.</p>\n<p>Technically, the term doesn't refer to tools that *actually help you <em>build a webpage or app</em>. *But that distinction isn't helpful. Web developers require a range of tools that go beyond debugging and testing—whether it be a remote collaboration tool like Slack, a design tool like Figma, or even just an online forum like <a href=\"https://stackoverflow.com/\">StackOverflow</a>.</p>\n<p>For that reason, we've gone beyond the traditional definition of devtools with the aim of giving a  realistic view of the kind of apps and software devs use in their day to day workflows. We think you'll find some familiar favourites, as well as some useful tools to add to your tech stack.</p>\n<h2>What To Consider When Choosing Web Development Tools</h2>\n<p>Whether you're <a href=\"https://www.templatemonster.com/bootstrap-website-templates/\">bootstrapping a website</a> from scratch or developing a simple web application, there are few things to keep in mind. Foremost is something that applies to any tool: pick the <em>right option for your specific needs.</em></p>\n<blockquote>\n<p><em>What works for one project might not work for the next. As a web developer, you constantly need to investigate new tools and ways of doing things. Of course, we all have our favourites, but as a general rule, your tech stack should never be stagnant.</em></p>\n</blockquote>\n<p>There's one other general principle to keep in mind. Tech should simplify your workflow—not complicate it. We know how easy it is to get bogged down in the nerdy details, but when in doubt, ask yourself: <em>does this tool actually make my job easier?</em></p>\n<p>Here are a few things to think about beyond these broader considerations:</p>\n<p><strong>Functionality:</strong> Simply, what does each tool help achieve? Does it have a single purpose and can it be replaced by a more feature-rich option?</p>\n<p><strong>Ease of use:</strong> Ensure that the tools that you have control over balance comprehensive features with actually being useable.</p>\n<p><strong>Scalability:</strong> At least some of the tools that you use should be scalable to both small and large projects.</p>\n<p><strong>Portability:</strong> This may not be a gamechanger in the age of remote work, but often web devs travel between clients, the office, home and the local cafe.</p>\n<p><strong>Customisation:</strong> Whether it's a theme on Google Chrome or an add-on for your development environment, we all like to make tools feel unique to us.</p>\n<p><strong>Security:</strong> The security of users, your employer and the sites or apps you are working on always has to be looked after.</p>\n<p><strong>Cost:</strong> If you work for a fancy startup with cash to splash this may not be an issue, but most folks will have to shell out for their own web development tools. Make sure you are getting bang for your buck.</p>\n<h3>A Note On Web Dev Tech Stacks</h3>\n<p>Web development is an all-encompassing term that refers to a bunch of roles. You can split web development into two parts: client-side and server-side.</p>\n<p>Most of the time, web developers specialise in one of the two. However, there are a few show-offs that can do both—they're referred to as full-stack developers.</p>\n<blockquote>\n<p>The term stack is used because the tools that websites and apps use  'stack' on top of each other to build the final product.</p>\n</blockquote>\n<p>Check out this example of Paperform's tech stack for example.</p>\n<h2>The 50 Best Web Development Tools In 2021</h2>\n<p>Alright, as we Antipodeans say, no more beating around the bush. Let's get into the list of the best web development tools we recommend using in 2021.</p>\n<p><strong>📚 Read our guide on **[</strong>how to get web design clients fast<strong>](<a href=\"https://paperform.co/blog/how-to-get-web-design-clients/\">https://paperform.co/blog/how-to-get-web-design-clients/</a>)</strong>.**</p>\n<h2>Code and Text Editors</h2>\n<p>Web developers wouldn't be able to do their jobs fast and efficiently without text editors. A dev's text editor of choice is kind of a holy thing—once devs find a text editor they love, they tend to stick with it for the long haul.</p>\n<p>Which is why it's such an important decision. It's like a carpenter choosing his hammer, or a Jedi Knight choosing his lightsaber. The good news is you can't go wrong with any listed below:</p>\n<h3>1. Atom</h3>\n<p>The creators of <a href=\"https://atom.io/\">Atom</a> describe it as a \"hackable text editor for the 21st Century\". This is in reference to the insane levels of customisation it offers that allow you to make it uniquely yours.</p>\n<p>Choose from thousands of open-source packages that add new functionality, tweak the look and feel with CSS, or even add your own major features with HTML and JavaScript.</p>\n<p>Using Atom really is a smooth experience. It works with Mac, Windows or Linux and has all the features you would expect. Plus, there is a nice suite of real-time collaboration tools to help you work with a team.</p>\n<h3>2. Sublime Text</h3>\n<p><a href=\"https://www.sublimetext.com/\">Sublime Text</a> is going to be at the top of any list of the best text editors. It doesn't have all the advanced features other solutions do, but what it lacks in power, it more than makes up for with its beautiful appearance and overall ease of use.</p>\n<blockquote>\n<p>With handy keyboard shortcuts, a Command Palette that you won't be able to live without once you use it and a UX to die for, it's an absolute pleasure to use.</p>\n</blockquote>\n<p>The context-aware auto-completion feature is particularly useful. It suggests code based on your text, meaning you can cut down on repetitive typing. Add to that an updated Python API, syntax definitions and hyper-fast load times, Sublime Text is hard to go past.</p>\n<h3>3. Notepad++</h3>\n<p><a href=\"https://notepad-plus-plus.org/\">Notepad++</a> is for those of you who don't care about themes and minimalist design and all that fancy stuff. From an aesthetic viewpoint, it's not going to win any awards, but it's still a powerful open-source text editor that has most of your needs covered.</p>\n<p>Created by a talented software engineer web dev named Don Ho, Notepad++ is a user friendly text editing solution for Windows users. It supports 27 programming languages, synchronised edits and views, and uses Win32 API to produce a tiny program size and faster execution speed.</p>\n<p><strong>💡Pro Tip:</strong> This is also a good option for energy conscious users. By optimising as much as possible, Ho aims to use less CPU power and reduce power consumption, leading to a greener environment.</p>\n<h3>4. Vim</h3>\n<p>If you're after a highly configurable text editor to build your perfect programming environment, then <a href=\"https://www.vim.org/\">Vim</a> is the way to go. While it does work out of the box, for the most part, it's a tool that you have to learn to conquer.</p>\n<p>The cool thing about Vim is that it can be used for any type of text editing—from writing an email to posting blogs in Markup, or of course, editing HTML code. It comes with 200+ syntax files, a comprehensive tag system and integrations with Perl, TCL and Python, and can even act as an OLE automation server in Windows.</p>\n<h3>5. Visual Code Studio</h3>\n<p><a href=\"https://code.visualstudio.com/\">Visual Studio Code</a> (or VS Code) is an open-source code editing program built by Microsoft. It runs everywhere and allows you to do anything from debugging code to inputting Git commands or creating Sass code.</p>\n<p>There is a bevy of appearance options, including the ability to customise fonts, icons, layout and colour scheme. But the remote development features are what set it apart—you can use a container or a remote machine as a full-featured dev environment.</p>\n<p>VS Code is the text editor of choice for Dean McPherson, Paperform's co-founder and resident code-geek. He uses the remote plugins for version control and to keep our global dev team working in the same virtual environment.</p>\n<h2>Web Application Frameworks</h2>\n<p>Web application frameworks (or just web frameworks) are software libraries that are designed to help you build web services, resources and APIs.</p>\n<p>Choosing the right framework for your project is super important. Why? Because it's difficult, time-consuming and expensive to switch to a different solution. It's much easier to stick with one.</p>\n<p>Below we've curated a list of the <a href=\"https://www.appypie.com/top-web-development-frameworks\">best web frameworks</a> in 2021—both front-end and back-end to cover all the bases. This is a big decision and this is only meant as an overview of options, so be sure to do further research before deciding on one.</p>\n<h3>6. Django</h3>\n<p><a href=\"https://www.djangoproject.com/\">Django</a> is a high-level <a href=\"https://www.educba.com/python-frameworks/\">Python framework</a> built by expert developers and used by giant web apps like Reddit, Instagram and Uber. It's secure and scalable, which means it's suitable for a small side hustle or enterprise-scale projects.</p>\n<p>In a nutshell, Django makes it easier to build great web apps. Fast. The focus here is on enabling devs to create sites and apps with less code (to get nerdy, Django's server-side processing speed is super fast and the file structure is feather-light).</p>\n<blockquote>\n<p>Django's goal is to support devs to go from concept to completion as quickly as possible. They achieve this by encouraging clean design and swift development.</p>\n</blockquote>\n<p>One of the greatest strengths of Django is its community. They contribute a tonne of useful packages and utilities—a search on PyPI brings up 4,000+ packages free and ready to use.</p>\n<h3>7. Ruby On Rails</h3>\n<p><a href=\"https://rubyonrails.org/\">Ruby on Rails</a> is a favourite in the dev community. While it requires a certain quality of code, as a general rule it's easy to read, write, monkey patch, test, maintain and deploy, making it any web developer's dream.</p>\n<p>Rails, as it's called in the biz, is used in a bunch of server-side web apps, including big names like Square, Hulu, Twitch and Shopify. It's a popular framework because straight out of the box you get structures for web services, pages and a database, requiring far less groundwork than other options.</p>\n<p>So why choose Rails? Well, it's an excellent choice if you're after a robust tool that's simple to use. It has a clean design language, an intuitive workflow, and seamlessly integrates with third-party applications.</p>\n<p><strong>💡Pro Tip:</strong> If you are starting to build your product, Ruby on Rails is an ideal solution to get your MVP up and running. It allows solo web developers to swiftly get projects off the ground and make changes on the fly.</p>\n<h3>8. Angular</h3>\n<p><a href=\"https://angular.io/\">Angular</a> (or Angularjs) is a popular Javascript framework created and maintained by Google. It's a cross-platform solution with a cohesive ecosystem of third-party components, meaning you can add a bunch of your own unique functionality improvements.</p>\n<p>You'll find all the relevant features you'd expect for each stage of the development process, from code generation and splitting to complex animation timelines.</p>\n<p>The Command-line Interface (CLI) is probably the most notable feature though. it allows you to initialise, develop, scaffold and maintain Angular apps right from the command shell.</p>\n<p><strong>💡Pro Tip:</strong> A JavaScript library is a collection or “library” of prewritten code snippets that can be used to repeat common JavaScript functions. It's also important to note, that which JavaScript framework you use often depends on your client's/business' stack.</p>\n<h3>9. React</h3>\n<p>React (<a href=\"https://reactjs.org/\">React.js</a>) is another great Javascript library built by another ultra-powerful tech company: in this case, Facebook. Made specifically for building user interfaces, it makes it painless to create interactive UIs in a visual way.</p>\n<p>A component-based system means that individual components manage their own state, and can then be composed to build complex UIs. React can also render on a server using Node, and with <a href=\"https://facebook.github.io/react-native/\">React Native</a> you can power mobile apps as well.</p>\n<p>React is one of the most popular of the many JavaScript frameworks available. Used by WordPress for their backend and Block Editor, it's a platform to consider for any web developer working with user interfaces.</p>\n<h3>10. Vue</h3>\n<p>Yet another JavaScript library, like React, <a href=\"https://vuejs.org/\">Vue</a> (or Vue.js) is built for working with user interfaces. Labelling itself as a more “approachable, versatile and performant” alternative, it helps you create a more maintainable and testable codebase.</p>\n<p>As with other leading frameworks, Vue allows you to take a webpage and split it up into reusable components. Each component then has its own HTML, CSS and JS needed to render that piece of the page—making it faster to make granular changes.</p>\n<p>Vue offers a more “batteries-included” approach to web application development. It's simple to use and comes with <a href=\"https://vuejs.org/v2/guide/\">comprehensive documentation</a> and templates to guide you along.</p>\n<h3>11. Meteor</h3>\n<p><a href=\"https://www.meteor.com/\">Meteor.js</a> is a free and open-source full-stack isomorphic framework (meaning you can run it both on the client and server side). It might not be as popular as React or Vue, but it's still considered one of the best solutions to enable devs to swiftly build and deploy web, mobile or desktop apps.</p>\n<p>One of Meteor's biggest selling points is that it seamlessly integrates with the rest of your tech stack—allowing you to focus on building rather than configuring tools to work together. Meteor APM also provides real-time metrics so you can monitor how your app is running.</p>\n<p>Boasting almost 14,000 packages, over half a million unique installs and used by companies like Ikea, Qualcomm and Honeywell, Meteor is a strong option.</p>\n<h3>12. ASP.NET</h3>\n<p>Alright, by now this is a familiar story. Prepare for the buzzwords and giant tech companies. <a href=\"https://dotnet.microsoft.com/apps/aspnet\">ASP.NET</a> is a free, cross-platform framework for <a href=\"https://www.techcronus.com/asp-net-application-development/\">building web apps</a> and services developed by Microsoft.</p>\n<p>What sets it apart from other frameworks is that it uses C# instead of JavaScript. C# supports reference-type (class) and value-type (struct) user-defined types, which can unlock significant performance benefits over JavaScript if you're a more advanced web developer.</p>\n<p>If you're looking to learn NET then there are plenty of resources. Microsoft has plenty of <a href=\"https://dotnet.microsoft.com/learn/aspnet\">learning materials</a> and there's an active <a href=\"https://github.com/dotnet?WT.mc_id=dotnet-35129-website\">community on GitHub</a> with over 100,000 people and 3,700 companies contributing.</p>\n<h2>Front-End Frameworks</h2>\n<p>Front-end frameworks (or “CSS frameworks”) are packages containing pre-written, standardised code for easy application. It's kind of like a coding dictionary to help you quickly complete actions without having to come up with code yourself.</p>\n<p>Keep in mind that there is some crossover with tools we've previously covered. For example, according to the <a href=\"https://2020.stateofjs.com/en-US/technologies/javascript-flavors/\">State of JavaScript 2020</a>*, in the US, React, Angular and Vue *are the three most popular front-end frameworks.</p>\n<p>Here are some other viable options:</p>\n<h3>13. Bootstrap</h3>\n<p><a href=\"http://getbootstrap.com/\">Bootstrap</a> is a leading open-source CSS framework created by a bunch of the developers behind Twitter (ever heard of it?). Released back in 2011, it's a full-scale tool designed to help you quickly create and customise responsive mobile-first sites.</p>\n<p>It features Sass variables and mixins (so you can assign variables to a name and refer to it rather than the value itself), extensive prebuilt components and comprehensive JavaScript plugins. In a first for front-end frameworks, it also comes with its own SVG icon library designed to work with your Bootstrap sites.</p>\n<h3>14. Semantic UI</h3>\n<p><a href=\"https://semantic-ui.com/\">Semantic UI</a> is a component framework for theming websites using what they call “human-friendly HTML” (sorry dogs). What they mean by this is that the tool uses words and classes as exchangeable concepts, giving you the same benefits as BEM without the headache.</p>\n<p>But the real strength here is the breadth of Semantic UI's components. Whether it's elements, collections, views, modules of behaviours, the whole gamut of interface design is covered.</p>\n<h3>15. Foundation</h3>\n<p>The folks at <a href=\"https://foundation.zurb.com/\">Foundation</a> refer to their tool as \"the most advanced responsive front-end framework in the world\", which is certainly setting the bar high. Though it really is suitable for any device, medium and level of accessibility.</p>\n<p>Foundation is packed with features to help build content-focused websites, even providing users with HTML, CSS &#x26; Javascript templates to speed up the process. You can also use Foundation For Emails to craft HTML emails that look a million bucks on any platform.</p>\n<h3><strong>16. Materialize</strong></h3>\n<p><a href=\"https://materializecss.com/\">Materialize</a> is a modern framework based on Google's Material Design language, combining the classic <a href=\"https://paperform.co/blog/principles-of-design/\">principles of design</a> with innovation and tech. As a language its goal is to help unify user experience across any platform, which is fitting, as this is a focus at Materialize as well.</p>\n<p>From the animations to UI elements and everything between, there's a real focus on <a href=\"https://paperform.co/blog/ux-design-portfolio/\">user experience</a> above all else. That's not to say the technical tools aren't there. They are. It's fast, robust and has a low learning curve.</p>\n<h3>17. ChromeDevTools</h3>\n<p><a href=\"https://developer.chrome.com/docs/devtools/\">Chrome DevTools</a> is the name for the web development tools built into the Google Chrome web browser. No need to download any programs or check if it's got MacOS compatibility—just right click in the browser, choose “Inspect” and get stuck in.</p>\n<p>It doesn't have as many features as the other options on this list, but it does let you edit pages and diagnose problems with your sites. View and manipulate the DOM, change a page's style sheets (CSS) or use it as a JavaScript debugger.</p>\n<h3>18. Svelte</h3>\n<p>We love <a href=\"https://svelte.dev/\">Svelte</a> for two reasons. One, it just sounds awesome and two, it's all about empowering folks to build their projects with *way less code, *which is something we're passionate about here at Paperform.</p>\n<p>Technically, Svelte isn't a framework or a library. It's a “compiler”, and it's gained quite a reputation in the web dev community for being one of the best frontend frameworks on the market. It's lightweight, SEO-optimised and unlike tools like React or Vue, doesn't require heavy browser processing.</p>\n<p>Svelte's “killer app” is that is has no virtual Dom. This means there's considerably less re-renders of the UI, leading to a lightning fast experience. Some devs will be put off by this, but it makes it an ideal option for beginners or smaller projects.</p>\n<h3>19. Ember</h3>\n<p><a href=\"https://emberjs.com/\">Ember.js</a> is an open-source JavaScript web framework released back in 2011. Since then it's been adopted by a large chunk of the web dev community and it's easy to see why—using it's simple and, whether you're creating feature-rich apps or client-side websites, the user experience is seamless.</p>\n<p>Working with Ember is a “batteries included” experience. Out of the box you have all the tools to start building UIs that work on any device. The built-in development environment comes with fast rebuilds, auto-reload and a test runner. Ember Data also lets you set up asynchronous relationships and keep models up to date across your app, which is perfect for remote work.</p>\n<p>Not sold? Some of the biggest and best development teams in the world use Ember to iterate on their products, including Netflix, Intercom and Apple. Convinced?</p>\n<h2>Package Managers</h2>\n<p>If you've ever installed a bunch of programs on your computer you'll know it's a tedious process. You've got to visit each individual website, download the installer, then set each one up individually.</p>\n<p>This is fine if all you're doing is downloading Spotify. But back- and front-end developers work with hundreds of programs. Which is why package managers exist. These tools automate the process of installing, upgrading, configuring and removing programs from a computer's operating system.</p>\n<h3>20. Yarn</h3>\n<p><a href=\"https://yarnpkg.com/lang/en/\">Yarn</a> is a relatively new package manager built by Facebook. It's known for its speed and stability—about the only two things you need from a package manager. But what sets it apart from similar tools is that it doubles as a project management tool.</p>\n<p>Installation is a breeze, and if you get stuck, the documentation is comprehensive. The Workspace feature allows you to split your project into sub-components, which is handy for keeping multiple versions of your project live. There is also a (small) plugin library to extend functionality.</p>\n<h3>21. Node Package Manager (npm)</h3>\n<p><a href=\"https://www.npmjs.com/\">Node Package Manager</a> is a package manager for NodeJS, created in 2009 as an open-source project to give JavaScript devs an easy way to share code modules. The npm Registry consists of more than a million packages—making it the largest software registry in the world.</p>\n<p>With a quick search you'll find everything from front-end web apps to robots and routers. There is hardly a working web developer out there that wouldn't have used npm at some point. And, now that it's moved to GitHub, npm's already vibrant community is only going to grow.</p>\n<h3>22. DPKG - Package Manager for Debian</h3>\n<p>Debian is a stable and secure Linux-based operating system extremely popular with web devs. <a href=\"https://man7.org/linux/man-pages/man1/dpkg.1.html\">Dpkg</a> is a tool built specifically to manage Debian packages. While dpkg does have a more user-friendly front-end alternative called <a href=\"https://wiki.debian.org/Aptitude\">aptitude</a>, dpkg itself runs entirely via the command line.</p>\n<p>In terms of functionality, it's definitely a more low-level solution. But if you're trying to handle the installation and removal of Debian software, it's the place to start. For a more advanced tool try <a href=\"https://wiki.archlinux.org/title/pacman\">Pacman</a> or <a href=\"https://wiki.debian.org/Apt\">APT</a> (literally, Advanced Package Tool). Both fetch packages from remote locations and deal with more complex functions.</p>\n<h2>Git Clients</h2>\n<p>In Britain, 'Git' is slang for someone you think is a bit stupid. But in the world of web development, Git is the name for the software used to track changes in file sets. Most of the time it's used to help devs collaborate during software development.</p>\n<p>A Git *client *is the software you use to work with Git repositories, which can be either remote or locally stored. These allow you to make changes to your Git project (e.g. pushing changes and staging). There are a bunch of different Git clients available across various operating systems.</p>\n<p><strong>💡Pro Tip:</strong> Git is a command line interface and Git clients aren't strictly necessary. It's kind of like using a translator versus learning a language natively. GUIs don't have all the same functionality that a command line client offers, which is why many web devs go that route instead.</p>\n<h3><strong>23. Github Desktop</strong></h3>\n<p>Built by GitHub, the authority when it comes to all things Git, <a href=\"https://desktop.github.com/\">Github Desktop</a> is a tool that allows you to interact with GitHub from your desktop. It's all about giving you a beautiful interface to cut down on distraction and let you focus on what matters.</p>\n<p>Whether you're a seasoned veteran or a Git newbie, GitHub Desktop has you covered. Quickly add commits with collaborators, see all open pull requests from your repositories, and easily see before and after shots of your work in progress with expanded image diff support.</p>\n<p>On top of that there's a heap of automated testing tools to play with. Open-source and available on MacOS and Windows, GitHub is pretty much the default option.</p>\n<h3>24. GitKraken</h3>\n<p><a href=\"https://www.gitkraken.com/\">GitKraken</a> bills itself as the “easiest, safest and most powerful” way to use Git. They understand that Git can be difficult to learn, which is why they offer exhaustive docs, as well as integrations with GitHub, GitLab and Azure DevOps to make adding remotes easy.</p>\n<p>The UI is equal parts gorgeous and intuitive. One particularly helpful feature is the ability to map complicated commands to a single button or click of the keyboard. If you're working with a team, the visual commit graph also assists you to quickly view who made code changes and when.</p>\n<p>Other notable features include syntax highlighting, a nifty built-in code editor, interactive rebase and light and dark mode for those late-night coding sessions.</p>\n<h3>25. SourceTree</h3>\n<p><a href=\"https://www.sourcetreeapp.com/\">Sourcetree</a> is a Graphical User Interface (GUI for the cool kids) used to manage Git repository hosts. Built by Atlassian (go Aussies!) it allows you to visualise and manage your repos so you can focus purely on coding.</p>\n<p>Whether you're just starting out as a web developer or  are an old pro, Sourcetree has all the tools you need. Leave the command line behind, or delve deeper to review change-sets, stash or cherry-pick between branches—built-in smart branching keeps development clean and efficient.</p>\n<p>Sourcetree is available to download for free on both MacOS and Windows. They've got a huge range of <a href=\"https://support.atlassian.com/bitbucket-cloud/docs/tutorial-learn-bitbucket-with-sourcetree/\">tutorials</a> that'll have you up and running in no time. After some initial hiccups, it's now more powerful and reliable than almost any other Git client.</p>\n<h2>API and Testing Cloud Tools</h2>\n<p>Web APIs are a crucial part of web development these days. APIs allow devs to access specific features or data within an application, service or other system.</p>\n<p>For example, the tech world recently went nuts when Notion announced the beta for their API. By accessing the API devs can now connect other apps with Notion pages and databases.</p>\n<p><strong>📚 Learn more about **[</strong>Paperform's Notion integration<strong>](<a href=\"https://paperform.co/integrations/notion/\">https://paperform.co/integrations/notion/</a>)</strong>.**</p>\n<p>When testing and building with web APIs it's crucial to have reliable tools. Here are some of the best:</p>\n<h3>26. Postman</h3>\n<p><a href=\"https://www.postman.com/\">Postman</a> is an API platform for building using APIs (duh) with features centred around simplifying the process and streamlining team collaboration. <a href=\"https://www.postman.com/api-platform/\">They promise</a> 5x faster development, 4x faster bug fixes and a whopping 10x more effective team collaboration.</p>\n<p>Do they back it up? The *15 million *developers that use Postman would say so. There are integrated tools for every stage of the API lifecycle, from design, mocking, testing and deploying all the way through to maintenance and deprecation.</p>\n<h3>27. REST Assured</h3>\n<p><a href=\"https://rest-assured.io/\">REST Assured</a> is the tool of choice for most web devs working with Java. Made so you don't have to be a HTTP expert to use it, REST Assured enables you to test and validate REST services with the simplicity of more dynamic languages like Ruby.</p>\n<p>It saves you time and effort through automating part of the boilerplate code required to set up HTTP connections, send and receive requests and parse responses. There are also Given/When/Then test notations to help make tests easily comprehensible.</p>\n<h3>28. HoppScotch</h3>\n<p><a href=\"https://hoppscotch.io/\">HoppScotch</a> is a lightweight open source API development tool that runs smoothly and looks beautiful. Over the last few months it's gained popularity with the dev community, largely thanks to its balance of advanced functionality and gorgeous design.</p>\n<p>Whether you need to establish full-duplex communication channels or execute queries with GraphQL, Hoppscotch can handle just about anything you throw at it. You can even add your own translations if English isn't your preferred language.</p>\n<p>Other features include collections to keep API requests organised, the ability to sync and restore request entries with a click, and real-time connections with WebSocket, MQTT and more.</p>\n<h3><strong>29. LambdaTest</strong></h3>\n<p>It's crucial that web applications and services work the same way no matter what browser folks use to access them. But you can't check how your HTML, CSS and JavaScript looks on every web browser and operating system on the planet.</p>\n<p><a href=\"https://www.lambdatest.com/\">LambaTest</a> can. This tool performs automated and live interactive testing on 2,000+ real browsers and operating systems to help ensure your web apps look spiffy wherever they appear.</p>\n<p>It also has the ability to auto-generate full page screenshots across any browser, OS, device or resolution. And with integrated debugging, geolocation testing and seamless collaboration via Asana, Slack and Trello integrations, Lambdatest is a must-have.</p>\n<h2>Web Design and Prototyping Tools</h2>\n<p>It's not enough just to know how to code. Part of being a web designer is understanding what goes into good UI and <a href=\"https://paperform.co/blog/in-conversation-kyro-samaan/\">UX design</a>—from prototyping and wire-framing to creating a visual language for your app. These <a href=\"https://paperform.co/blog/ux-design-tools/\">design tools</a> are vital.</p>\n<h3>30. Figma</h3>\n<p>Only a few years ago, if you wanted a professional design tool you'd need to spend a whole lot of cash and download complex software. Not anymore.</p>\n<p>With <a href=\"https://www.figma.com/ui-design-tool/\">Figma</a>, you get everything you need to design for the web, completely free and accessible from any browser. From UI, UX and <a href=\"https://paperform.co/blog/graphic-design-tools/\">graphic design</a> to wire-framing and diagramming, Figma truly is the all-in-one platform for your design needs.</p>\n<p>It's like LEGO for web devs. Need to mock up a mobile app? Design an entire UI? Build your client's dream website from scratch? Just use the drag-and-drop editor and away you go. With version history you can even collaborate in real-time and not worry about breaking things.</p>\n<p>There's a reason the whole internet is raving about it—Figma's a rare tool that you will find yourself actively looking for reasons to use. It's not hyperbole when we say that it's seriously the only design tool you'll need.</p>\n<h3>31. Adobe XD</h3>\n<p><a href=\"https://www.adobe.com/products/xd.html\">Adobe XD</a> is just the latest in a long range of excellent design tools from Adobe. With XD you can sketch wireframes and mockups, build interactive prototypes and create high-fidelity designs for any screen, thanks to their vector-based system.</p>\n<p>Flat images not enough? 3D transform allows you to turn static objects into dynamic, three dimensional designs in a click. Move or rotate objects, add the appearance of depth, or even build unique immersive AR/VR experiences.</p>\n<p>Above all, Adobe XD succeeds at making your prototypes feel like the real thing—with no coding required. Add user flows, interactions and motion, and save time by using reusable buttons and components.</p>\n<p>Of course, Adobe XD works seamlessly with the rest of the Adobe suite (editing .PSD files from Photoshop is a particularly handy feature). There are a range of co-editing tools to aid real-time collaboration and 200+ plugins to extend functionality.</p>\n<h3>32. Sketch</h3>\n<p><a href=\"https://www.sketch.com/\">Sketch</a> vs Figma is kind of like Apple vs Android: both offer very similar tools, and which one you prefer comes down to preference and your individual workflow.</p>\n<p>Sketch happens to be the app of choice for companies like Google, Facebook and Xbox. It's easy to use, offers a host of useful keyboard shortcuts, and is lightning fast no matter what you throw at it, from <a href=\"https://paperform.co/blog/social-media-design/\">social media designs</a> to working prototypes or fancy new icon sets.</p>\n<p>Having said that, most web developers agree that Figma's prototyping capabilities are superior to Sketch. They also cite the built-in version history, collaboration features and the way Figma handles colour and text styling. The Auto-Layout is also preferred over Sketch's Smart layout.</p>\n<p>But. That's not the whole story. Sketch is regarded as being more stable (Figma can be on the buggy side sometimes), having clearer layer organisation, and being faster to load large files. There's also a dark mode, which we all know, is music to any web developer's ear.</p>\n<p><strong>💡Pro Tip:</strong> The Figma vs Sketch battle isn't going to be decided in this blog post. Luckily, Figma is free to use and Sketch has a generous free trial. If you're unsure which is the right choice for you, just try them both.</p>\n<h3>33. ProtoPie</h3>\n<p><a href=\"https://www.protopie.io/\">ProtoPie</a> bill themselves as the \"easiest way to turn your interaction design ideas into realistic prototypes\". It's a no-code creation tool used to create interactive prototypes for mobile, web, desktop or the 'Internet of Things' (IoT).</p>\n<p>What sets ProtoPie apart is one thing: simplicity. Their goal isn't to be the most complex tool on the market—they want to take the pain out of building workable prototypes, fast. As with any no-code tool, the emphasis is on replacing code with simple buttons and keyboard commands to simplify your workflow.</p>\n<p>There's a gradual learning curve which makes it great for beginners. Prototypes also interact with each other, meaning you can make interactions across devices. It's not as popular as the big players, but it's certainly a powerful tool.</p>\n<h3>34. Framer</h3>\n<p>If you're comfortable with code, then <a href=\"https://framer.com/\">Framer</a> is an awesome tool to empower you to create interactive, highly-customisable prototypes. Web devs around the world use it to build apps, websites, design systems and even slick new video game interfaces.</p>\n<p>What sets it apart from something like Figma? Well, with Framer the idea is that you can work with designs that can *realistically be implemented *with code. It's a bridge for UX designers and developers to collaborate and rapidly experiment in a shared workspace.</p>\n<p>📚 **Related reading: **<a href=\"https://paperform.co/blog/in-conversation-kyro-samaan/\"><strong>How to stand out as a UX Designer</strong></a></p>\n<p>Even if code isn't your thing, Framer is great. The GUI and design elements are on part with Sketch (or at least in the same ballpark) and the built-in prototyping is a breeze to use. There are also plenty of third-party packages to add new elements.</p>\n<h3>35. Toolset</h3>\n<p>Sick of doing everything with code? <a href=\"https://toolset.com/\">Toolset</a> is a WordPress page builder which lets you build custom sites without any code. This is a great option for web developers and designers looking to complete complex projects quickly.</p>\n<p>Use Toolset to design from within WordPress. Create rich sites that look great on any device and load quickly for the SEO gods. It's got everything you could require to set up custom post types, fields, templates, searches, front-end forms and more.</p>\n<p>The biggest benefit of Toolset is that it saves you from having to use a bunch of different tools to build WordPress sites—all for a reasonable price of $69.</p>\n<h3>36. Animator By Haiku</h3>\n<p>Animation is difficult but <a href=\"https://www.haikuforteams.com/animator/\">Animator by Haiku</a> makes it a little bit more palatable. It lets you bring motion design to production, from your initial design tools like Figma to your final codebase.</p>\n<p>Animator uses an interface called Timeline to choreograph animations in a visual way. You can sequence and animate elements using the built-in curves library, or delve deeper with the custom editor. If you're more comfortable with code, use any code editor of your choice to animate directly from your code.</p>\n<h3>37. Affinity Designer</h3>\n<p>Adobe Illustrator has long been the industry standard when it comes to creating vector graphics. However, the new kid on the block, <a href=\"https://affinity.serif.com/en-gb/designer/\">Affinity Designer</a>, is certainly giving Adobe a run for its money.</p>\n<p>You'll find Affinity evangelists all over the net—and for good reason. It offers a silky-smooth experience at a much more affordable price, custom-built with professional illustrators, web designers, game devs and other creatives in mind.</p>\n<p>Affinity offers many of the same tools as Adobe Illustrator in a beautifully designed (and not bloated) package. Work with vectors and rasters to create concept art, print projects, logos, icons, UIs or just about anything else you can imagine.</p>\n<p>The biggest drawcard? There's no monthly fee. You can own Affinity Designer for a one-off payment of $84.99 on Windows or Mac or $34.99 on iPad.</p>\n<h2>Collaboration Tools</h2>\n<p>We've covered just about all the technical tools you could possibly need to be a web developer. But whether you're working in-house, at an agency or going it alone as a freelancer, <a href=\"https://unito.io/features/\">collaboration tools</a> are equally as important as your text editor of choice.</p>\n<p>Often the success of a project isn't simply down to technical brilliance—it relies on clear and efficient communication. The tools below will help you achieve it.</p>\n<h3>38. ClickUp</h3>\n<p>Product management tools should do two things: simplify your processes and help you ship products faster. <a href=\"https://clickup.com/\">ClickUp</a> does both. With an expansive suite of tools, it is truly “one app to replace them all”, covering tasks, docs, chat, goals and more.</p>\n<p>Whether you're working solo or in a team, ClickUp lets you map out tasks, better plan your work and see your overall product vision. The major benefit here is the dizzying versatility of the platform. From building mind maps to planning tasks on a Kanban board, you can build out your own custom product management setup.</p>\n<h3>39. Asana</h3>\n<p><a href=\"https://asana.com/\">Asana</a> is probably the single most well-known and popular project management and collaboration tool on the market. It's a tool built to stop you shuffling between emails, spreadsheets and other apps to keep organised—from brainstorming to meeting that deadline, you can manage everything with Asana.</p>\n<p>At Paperform we use Asana to assign tasks to team members, create projects split among our Product, Marketing and Content teams, and monitor deadlines to ensure we're hitting our goals. It's simple and visual, and is particularly excellent for keeping remote teams on the same page.</p>\n<h3>40. JIRA</h3>\n<p><a href=\"https://www.atlassian.com/software/jira\">JIRA</a> is the go-to project management platform for software teams to plan, track and release their products. From creating user stories and planning sprints to the final stages of shipping and data analysis, JIRA is *the *way to take any product to launch and beyond.</p>\n<p>One big advantage JIRA has over other similar tools is that it's so customisable. It is possible to build the perfect workflow for your specific product or team—this is also a slight drawback, as it results in a slightly steeper learning curve upfront.</p>\n<p>As you'd expect, it's built with trademark Atlassian polish. And with the Atlassian Marketplace you can connect with over 3,000 first and third-party apps like Slack, Google Drive and GitHub, to extend functionality.</p>\n<h3>41. Slack</h3>\n<p>If you work online in any capacity and haven't heard of <a href=\"https://slack.com/intl/en-au/\">Slack</a>, you must be living under a rock, at the bottom of the ocean, next to a starfish named Patrick. In the last few years, Slack has become synonymous with remote team communication.</p>\n<p>At its core Slack is a team messaging platform. It cuts down on the need for email by separating conversations into distinct Channels, so you can track topics, ideas and projects without long email threads. This makes it the virtual headquarters for your business.</p>\n<p>Of course, there's much more to it than simple text chat. Jump on video calls, add integrations with your favourite tools, and even communicate with external clients or folks in other companies</p>\n<p>Slack isn't just for teams, either. Communities allow you to connect with people in your niche—<a href=\"https://http//www.javaspecialists.eu/slack/\">Java Specialists</a>, <a href=\"https://rubydevs.herokuapp.com/\">Ruby Developers</a> and <a href=\"https://pyslackers.com/web\">Python Developers</a> are just a few of the most active.</p>\n<h3>42. Zoom</h3>\n<p>Occasionally an app or program hits levels of popularity so high that it becomes the noun for what it's used for. This happened to Google long ago (“I'll Google it”) and it happened to video chat tool <a href=\"https://zoom.us/\">Zoom</a> in the last year and a half (RIP Skype).</p>\n<p>This happened for a reason: Zoom is awesome. While nothing replaces the feeling of face-to-face communication, it's the next best thing. Whether you want to chat to your family across the country or liaise with web design clients, it makes video calls ridiculously easy.</p>\n<p>Zoom is free for 40-minute calls, meaning your meetings come with a convenient end timer. Plus you can record any calls (with your companion's permission), which has become a popular way to record <a href=\"https://paperform.co/blog/how-to-record-a-webinar/\">webinars</a> and podcasts.</p>\n<p>**📚 Related reading: **<a href=\"https://paperform.co/blog/how-to-be-a-good-interviewer/\"><strong>How to be a good interviewer</strong></a></p>\n<h2>Miscellaneous Web Development Tools</h2>\n<h3>43. TypeScript</h3>\n<p>TypeScript is an insanely popular open-source language that builds extra features on top of JavaScript. Essentially, think of regular Java as Clark Kent and TypeScript as Superman—bigger, better, faster and all-round more capable.</p>\n<p>Devs love Typescript because it makes their job easier. It catches both code and type errors, as well as bugs that can easily be missed. This reduces troubleshooting time, while also saving you the effort of having to track down mistakes manually.</p>\n<p>The only real downside is that once you try TypeScript you'll find it hard to return to vanilla Java. The good thing is that you don't need to make a binary choice—all valid JavaScript code is also TypeScript code, and TypeScript can be transformed into Java too.</p>\n<p>If you want clean, simple code with excellent documentation and tools that save you hours of time, TypeScript might be worth a try. Just don't think you can master it in a few minutes, as most devs find there's a steep (albeit worthwhile) learning curve.</p>\n<h3>44. Sass</h3>\n<p>You might've seen the term <a href=\"https://sass-lang.com/guide\">Sass</a> mentioned in web dev circles. But what is it? Well, Sass is a CSS preprocessor that extends what you can do with regular CSS, adding special features like variables, nested rules, inheritance (not the monetary type) and mixins.</p>\n<p>The benefit is that it speeds up your workflow and modularises your code, making edits easier and more efficient to make. It allows you to achieve the same end result as regular CSS, with a fraction of the effort.</p>\n<p>For example, let's say you're working with a theme colour that you keep having to reuse in your CSS code. Rather than having to retype it every time, you can specify the colour once and save the variable. Then, every time you want to use that colour you just refer to the variable instead of hard-coding it.</p>\n<p><strong>💡Pro Tip:</strong> Sass is compatible with any version of CSS, the only requirement being you need Ruby installed for it to work. Just make sure you don't start using Sass before you have CSS mastered—it's important to get a firm grip of the basics first.</p>\n<h3>45. Stack Overflow</h3>\n<p>Okay, so this isn't technically a tool. However, it's not hyperbole on the <a href=\"https://stackoverflow.com/\">Stack Overflow</a> website when it says, “every developer has a tab open to Stack Overflow”. Ask around—they do. It's the most popular and comprehensive web development community on the internet.</p>\n<p>Stack Overflow is a public platform that aims to build the single most definitive collection of coding questions and answers. Developers, system admins and data scientists of every shape and size rely on it for accurate information to difficult technical challenges.</p>\n<p>We're talking the real nitty gritty. If you want to know why InvokeAsync shows an an error in a Blazor component, how to undo the most recent local commits in Git, or why HTML thinks the tag “chucknorris” is a colour, this is the place for you.</p>\n<p>While it's undoubtedly a gold mine of useful resources, it's important to note that the community can be a bit toxic when it comes to welcoming new web developers. Stack Overflow mods are aware of this (and have added new guidelines in response) but do be wary—and look for existing answers before asking a query of your own.</p>\n<p><strong>💡Pro Tip:</strong> More broadly it would be remiss not to mention your other best friend: Google! Not even the most seasoned web developer knows how to fix everything and you can almost guarantee that you'll find someone out there who's had the same problem as you at some point.</p>\n<h3>46. Squoosh Image Optimiser\n</h3>\n<p>Assets. Content. Media. Even the simplest web design project will need basic images and icons. Image optimisation apps allow you to compress image file sizes without affecting quality, which means your sites will stay as fast and responsive as possible.</p>\n<p>Now, there's no shortage of great image optimisation apps but we love <a href=\"https://squoosh.app/\">Squoosh</a>. It's a no-frills experience that does exactly what you need it to. Just drag and drop your image into the editor and Squoosh does its thing.</p>\n<p>You aren't limited to compression either. With the simple interface you can resize, compress or change the image format. The changes are almost instant and the finished product can be downloaded with a click.</p>\n<p>One drawback is that you can only work with one image at a time. So, if you're working on a large project requiring lots of images, <a href=\"https://shortpixel.com/\">ShortPixel</a> may better suit your needs.</p>\n<h3>47. ColorPick Eyedropper Chrome Extension</h3>\n<p>Whether you're designing a website, putting together a UI or creating a <a href=\"https://paperform.co/blog/canva-alternatives/\">Canva design</a>, colour is serious business for web developers and designers. Colours are crucial for brand awareness, evoking certain emotions and, most importantly, accessibility.</p>\n<p>Colour picking tools allow you to identify the Hex codes of elements on the web to gain inspiration or keep designs consistent. There are thousands of tools in this space, but you won't find one easier than <a href=\"https://chrome.google.com/webstore/detail/colorpick-eyedropper/ohcpnigalekghcmgcdcenkpelffpdolg?hl=en\">ColorPick Eyedropper for Chrome</a>.</p>\n<p>Just click the extension and hover over <em>any</em> element on *any *webpage. A small box appears with the Hex code and RGB model. These are automatically copied to the clipboard for you to use. If your only experience working with colours was using crayons in kindergarten, Material.io has a great to the <a href=\"https://material.io/design/color/the-color-system.html#color-usage-and-palettes\">Material Design system</a>.</p>\n<h3>48. Google Lighthouse</h3>\n<p>Technically a part of Chrome Developer Tools, <a href=\"https://developers.google.com/web/tools/lighthouse/\">Google Lighthouse</a> deserves its own dedicated entry. It's an open-source, automated tool for improving the quality of web pages. You can run it on any existing web page to audit overall performance, accessibility, best practices and SEO.</p>\n<p>While you can run it from the command line, or as a Node module, the visual interface within Chrome DevTools is useful for getting actionable insight into what's working (and what is not working) about any given site.</p>\n<p>There are two new features that extend the functionality somewhat too. Stack Packs allow Lighthouse to detect what platform your site is built on and display more specific guidance based on your unique tools.</p>\n<p><strong>💡Pro Tip:</strong> New Lighthouse plugins also allow you to use the data you've collected to create new audits and reports. Used in tandem with PageSpeed Insights, it's a surefire way to make sure your website is in good shape.</p>\n<h3>49. A Second Monitor</h3>\n<p>No guide to web development tools would be complete without recommending you treat yourself to a second monitor. The extra screen real estate makes life <em>so much easier</em> and development <em>so much faster.</em></p>\n<p>Just think of a world where you can have IDE and terminal open on one screen, and the app that you're debugging on the other. Or Slack on the first, your browser and Stack Overflow on the second, maybe Spotify in the corner for some Lo-Fi beats.</p>\n<p>With one screen you're constantly cycling through open applications. Half the time you lose a tab, or forget what you're looking for altogether. This takes time, and as we all know, time is money. Treat yourself to a second monitor—it's a whole new world.</p>\n<h3>50. Paperform</h3>\n<p>For all the advances we've made in the world—sending billionaires to the moon, having the power of a supercomputer in our pockets—it's still weirdly difficult to code beautiful online forms (seriously, PHP is a pain.) That's where <a href=\"https://paperform.co/\">Paperform</a> comes in.</p>\n<p>Paperform empowers you to create beautiful <a href=\"https://paperform.co/blog/best-online-form-builders/\">online forms</a> and landing pages without any code. Just use our free-text editor to build anything from basic <a href=\"https://paperform.co/templates/contact-us-form/\">contact forms</a> to complex <a href=\"https://paperform.co/templates/apparel-order-form/\">eCommerce pages</a> that can be embedded anywhere on the internet.</p>\n<p>Use our theme tools to get started, then add your own unique tweaks with support for custom HTML and CSS. Developing on WordPress? We've even got a plugin that makes <a href=\"https://paperform.co/blog/wordpress-form-builder-plugins/\">embedding forms on WordPress</a> a breeze—and makes life way easier for you and your clients.</p>\n<p>But that's not all you can do. Want to collect feedback from <a href=\"https://paperform.co/blog/customer-satisfaction-survey/\">satisfied customers</a>? Send a <a href=\"https://paperform.co/templates/new-client-onboarding-form/\">client questionnaire</a> for each new project? Or maybe you want to set up a <a href=\"https://paperform.co/blog/one-page-website/\">landing page</a> where you can sell <a href=\"https://paperform.co/blog/online-course-ideas/\">online courses</a>, schedule appointments and <a href=\"https://paperform.co/blog/email-list-sign-ups/\">grow a mailing list</a>?</p>\n<p>With Paperform you can do all that and more. And with our 3,000+ Direct and Zapier integrations, connecting with the rest of your tech stack to streamline your web development workflow is so easy your grandma could do it</p>\n<p><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/PF-STACK.jpg\"><img src=\"https://lh4.googleusercontent.com/TGU36vvkMGBvyuV-3moKfrSXGILBOwxz43E7jYdef4p2Vqeb2P90yFchj_RYj3OpvgAZxYQ9MRYpNwuSLFo3NIYD6p96Rb8uw4QXOsribEx_JjDoxTUWE1dSBMTJ17aC4ZH70E25\">Image Source: <a href=\"https://atom.io/\">Atom</a><img src=\"https://lh5.googleusercontent.com/me7eP6zI6TqSg-oyEJyqTAoveecqRgW9NNFHRIfuAVvbIJzl9af3yArn0QMuVXH51E-MeZv6BFNk3P1qKl4eJlsaMFWAIT0z2jUWFaVCvD_GDfro_GJbe9srCT299c8Aa2yg2oO9\">Image Source: <a href=\"https://www.sublimetext.com/\">Sublime Text</a><img src=\"https://lh6.googleusercontent.com/D44i98NM_KaAxB0vloVdqpkW3QQrOeh-gahRhYT_FT1wGaN9o4BOkV4bDecBTXQRqgSmXNf8emg5FEDMjvievgGr4_UADd6xGReiBqKVEi0FvfauKVDmYOOlEA4XSqmL9ND8EMk9\">Image Source: <a href=\"https://notepad-plus-plus.org/\">Notepad++</a><img src=\"https://lh5.googleusercontent.com/D-ZILznlMZ64gUXl3ODwXyyLvJOOV6Tgem2e7Nzt8p02Yz3v4JCA5tmyFKlz7JczYh_CpJcUAN0wHxf_Z5rzVxCX50EHbctJQ2iyaMAhtARmoJqYF3Ikl-G0g_4XILXJaF62b60S\">Source: <a href=\"https://commons.wikimedia.org/wiki/File:Vim-(logiciel)-console.png\">Wikipedia Commons</a><img src=\"https://lh6.googleusercontent.com/252gQ1IpAEUNr3lCHi-MvLrULiBMFo56aGsb47nNy6W6ZshOFQgk4FFYaKRn8Fyy4fOBJrcVBIDBEHQU9zg59G8XbmNxkcot4zMf28sJDQWNwxBCjv-UaH8weY6BKQU6ErDlmzu5\">Image Source: <a href=\"https://www.google.com/imgres?imgurl=https%3A%2F%2Fcode.visualstudio.com%2Fassets%2Fupdates%2F1_37%2Ficons.gif&#x26;imgrefurl=https%3A%2F%2Fcode.visualstudio.com%2Fupdates%2Fv1_37&#x26;tbnid=FK_-tkfGX0bzmM&#x26;vet=12ahUKEwjznbKQ2YfyAhXUnUsFHULwDJQQMygAegUIARDOAQ..i&#x26;docid=xSPl9orBLj6FKM&#x26;w=1930&#x26;h=1282&#x26;q=vs%20code&#x26;ved=2ahUKEwjznbKQ2YfyAhXUnUsFHULwDJQQMygAegUIARDOAQ\">Visual Studio</a><img src=\"https://lh5.googleusercontent.com/sMHy-q3-qu13ZaFwDwrHy6sKhDnR_K5GdFtsL3J7Wknw9lUFNDOLx8LtRq7owH4GJIQ2bsxePWLN-CrMAdmE0TmsK71mrvaF-7pBlFqwXNMKzNhpdLYre9YmSuqpCP_URy7NxUJx\">Image Source: <a href=\"https://www.djangoproject.com/\">Django</a><img src=\"https://lh5.googleusercontent.com/mxpPHMijc7hvVz5LGZYx-QA9knoI7o3F4inDBERqyXqT7sFOqXky2R2WoyponK1WcZXMc6K5-5s3LYc1iedDCjOpu67Go6uEaTUKMc_CHfzMxFOFr_yN1TbnyTcfg7DhiKUirO9S\">Image Source: <a href=\"https://rubyonrails.org/\">Ruby on Rails</a><img src=\"https://lh4.googleusercontent.com/Xddm--wmths99nAn-_6kEFm_nwZxr1LHX-e585zbH9DVsCUMeMNYnfp2zSNVk7AZ7FvjZ4FTA_Qt23_cL4_HD6pqq5EqiVTjziFQAHgU9fbnFp0d42au3FA-LqLTRe7vORIbR8oB\">Image Source: <a href=\"https://angular.io/\">Angular</a><img src=\"https://lh5.googleusercontent.com/SF8F6NLYMhdsbjPY8lYimBA1R-A39nC2JEmDQIQAxQP0zjcVM5Cn-VBFxlKx2mNCFZY0R6E61BmeKuT6_MN5OZ5EKgIqQ6hRLkFi5pQIy0yeiNmJ_z861aE8txtAnFix2stdDPXf\">Image Source: <a href=\"https://reactjs.org/\">React</a><img src=\"https://lh4.googleusercontent.com/pdrGHJeVHJujGzs9PFtJY7E1s0aiDruAGdUquFd0iHKTIXhUaxnECP9GMwYpzmWgsejhmj0TGi6h9ej6FqI-ogSuNcYFDZqiTiGFy13PAFxVXJHKeT2PCD1lIQabE4uaLRFeeCX6\">Image Source: <a href=\"https://vuejs.org/\">Vue</a> <img src=\"https://lh6.googleusercontent.com/Vwun5FAge-Hh-IB-O2tJ9qMPuoLaSos0GRH1GxS-FD_F_EDuKJZNZk0hlOpB4Xv2gauE1vjC4sY38Ik19s0KtqgeR4IHivFcPCnDFMlAJ8EgfbGdA6fg9K8zOuiFF1GNR4mAwnes\">Image Source: <a href=\"https://www.meteor.com/\">Meteor</a><img src=\"https://lh3.googleusercontent.com/Zi7hE50XUZBiBZf9G9Jd8-gdp5GMeQ8ymf5XvkPX0wHKdC60ZlKf_uNeqcDoZo9iOaXFRMsFszhHl3Gy4N1XB7d7U1bfwCtlKXu4TJRYzh_206wQRBSK4eeAs_jatl2qyp4Rjv-m\">Image Source: <a href=\"https://dotnet.microsoft.com/apps/aspnet\">ASP.NET</a><img src=\"https://lh6.googleusercontent.com/NXYMRFbspS4M_OKEtx4AywW_r5xJdkgfIvGNYUcQhp5D5ocZYMdWKLzjMFGyVVENpsaK66j77qX8PhKXV2D1xFEPhUClwppQml00ehBAWCkt6Pzimu4EqS8A37QmxzzEKrAGznqD\">Image Source: <a href=\"http://getbootstrap.com/\">Bootstrap</a><img src=\"https://lh6.googleusercontent.com/yxo-yyVy5TmurN540Ka207_sQbyGKBqd00nvilE-fqtqYZv33OkE8jWRpBjNWO3tIxKtoi7ujMYfNS6Mbc9MCI3Fw18tjIRLo0kWosD9FRMd7t99nHbKcE_p1ArhMWppx65u0A9U\">Image Source: <a href=\"https://semantic-ui.com/\">Semantic UI</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628736193378.png\">Image Source: <a href=\"https://foundation.zurb.com/\">Foundation</a><img src=\"https://lh4.googleusercontent.com/_-hHtXVr3_H96K1TcXksh7ZrmhMucG7eIZ97alh5H-2z7ZDiWVnD6XKOAbOE-jOsgxPubVhcHNvfNPfVZq9SVbeB134GJom3h5HWbLikVv5i3SxQObohCtfqPq71JoSG1YfkUNA_\">Image Source: <a href=\"https://materializecss.com/\">Materialize</a><img src=\"https://lh5.googleusercontent.com/Xh6Lar3pQSSFHp6yhyU2ZLzuw77eVd-kqYgluxW0qLZ3KpO5_J3OTINaHVta53n5rOrcl3vjwUIupb6YaFcalhXxV0eFSpANCcczX5wjefmRMsHv6YmRzg3Xo3mUvW_WzN-lmX-B\">Image Source: <a href=\"https://developer.chrome.com/docs/devtools/\">ChromeDevTools</a><img src=\"https://lh3.googleusercontent.com/pEMKE5gpTl7SHgXBCl1r6gyGDHBeIyuoerr5dsSETZqyavGRu1VOghqgu-ZPodrZJ1QS1pBDwBHHcxDLczWZg6303oektGn-ttIjmnr_2RzXbsKwYwRbJ-nQ7NvvXOvoU7Bs-HgD\">Image Source: <a href=\"https://svelte.dev/\">Svelte</a><img src=\"https://lh6.googleusercontent.com/FdOwMdbWSLMXcnJ2gyj2NtGs5l5ShVxOPxRdw1Qj6OEeDiEXw-JPxYoN7Sbi8QLR_EquaOxyT_jey2R6JQXaqhDC_zbpMwy45PoMLjNZrk_QI6IJ3gCjBvCbA_rQl1Dabf0kX2nD\">Image Source: <a href=\"https://emberjs.com/\">Ember</a><img src=\"https://lh3.googleusercontent.com/7scAnAsMX-TlzJ6PLimPYY2Tb6aH6p1EtjLbBdz5M8SX3bIk78Q6sr1-mdc9LUgttgj2Ks_EVPP9XD6fb5LyMHK6-A8A1O-dFnVXW52AG5ZGurdFDe3AvIzO0ddGZ5DGWdE1k2mA\">Image Source: <a href=\"https://yarnpkg.com/lang/en/\">Yarn</a><img src=\"https://lh5.googleusercontent.com/6kCFq5M0LzWPsqts2sa5HMCU7NVeAG2HfaqQKmbe_sAuwH4fh_reNO1lkqn2Aq_FQO9BMNrXPv-8lTsTBhgaNIVPBy-l-hXqaHURRvhTlXdRChL6f0n2j0J0ZvnvjzUrtzubpK4D\">Image Source: <a href=\"https://www.npmjs.com/\">npm</a><img src=\"https://lh6.googleusercontent.com/sihMGTxUb8BieGKwjsMZSHtErIikM2B3ioRYAQ-U8RnRYkN9xdfYjLCA_dTbVuSxFoXFgjZsd7ljFMeBzZOcs5lSih1SJO1SLR5mTtcVGioSvOdjrUJCF20a6so4aNxnbQobt0hv\">Image Source: <a href=\"https://man7.org/linux/man-pages/man1/dpkg.1.html\">DPKG</a><img src=\"https://lh3.googleusercontent.com/9huTvL7gtUbXzzwMaYxE8GwC5Nh6RBD1984zLAbB3sx2ES98MqooBO9EN1UyTXr8uyANfcKfdWdGP2hwe3JdmdbjyK-XWkeJxymmpJd7HTKqU3QFPBXm3siMkEC9pB5sIw1RWiCi\">Image Source: <a href=\"https://desktop.github.com/\">Github Desktop</a><img src=\"https://lh4.googleusercontent.com/vEhY-y601AhXiD9FedJhwwwkd66UeRQQeyaHw9SL7LsyqUJCm7Vc4n5p0dLgQrCPJWUhiZmbFRugcKOfIlJYT3ah9W0lHjcMd3B4Pdh5kHx4yKdTOrmx709i4SYRuosO3L40_y0Y\">Image Source: <a href=\"https://www.gitkraken.com/\">GitKraken</a><img src=\"https://lh6.googleusercontent.com/IhG5Y6dLenofqcIvTY5sOrZoy7rf3f1CagwBeit_m0QZU_QZ5eoMpsWENAU2y4DB93nHq25dgX3WnTVKNNWnnYmoFaEIyT4WYE_JAi5OsjG1przlD9KLSX5-ar1CpXu1_wEhq2SY\">Image Source: <a href=\"https://www.sourcetreeapp.com/\">Sourcetree</a><img src=\"https://lh6.googleusercontent.com/1hWg3CPX-XkaeJXPECAninfnozi2o3p3RSk57Y7B8WdvZKsMODbZi3rxR5gyLORQyxbARj2-VoESeqwtWthttAZAItVnheneivMIG0ZTbPludRnzq6rMtzN2eTlEHeODaxrqmRIa\">Image Source: <a href=\"https://www.postman.com/\">Postman</a><img src=\"https://lh4.googleusercontent.com/Qg-U_I4ZNgtaun616Nlky0T5ram5v_kZ3h-F33Zmai5t9QoNqutJruPxl2yybA1elIk7J_Qs21_G4wpUR32-TYVP6bx7wCmtOIvIZaTZ3BxI1EqoIVklH-6KRRtnQT8deRXOWSZl\"><img src=\"https://lh5.googleusercontent.com/XROFNSk7cll32bNRftZzEeL9VDSS3IiLRIgZ4QRhMfadnJ_LLnohR_SMSGQW_CPbiqklUkOutHhK3yRICKp4b9OMb6nLn1M1i76COiDIv_9CTTm0XgxCRt7ZH_VKIgIawnWXskPm\">Image Source: <a href=\"https://hoppscotch.io/\">HoppScotch</a><img src=\"https://lh5.googleusercontent.com/cUod2uM6ebt50jQq4JtQ7SPMfAy8Xp8Ad05fe7bSREmHxh-kiJT5el1czMEqBfjEUiPiPTUQCqOZU8Ylw386MW3G0E2jQ35T_FKsksw_cieFbsmY8ubbmMNqwWwTLwXI1z8qtfvo\">Image Source: <a href=\"https://www.lambdatest.com/\">LambdaTest</a><img src=\"https://lh5.googleusercontent.com/qlIEiSqu53w7iAu9a6DbOtf6Mhpw1PFBKQHDhr1Fpoyq5Z8md6ctRU-mZcltNt3L6o1NZw29ibT7PvOmGMj4G0t0VbU_2y5Qvs0Nd3dykkA7fyVZkYij-qcHqveR-jMrwemNP4JQ\">Image Source: <a href=\"https://www.figma.com/ui-design-tool/\">Figma</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628742272023.png\">Image Source: <a href=\"https://www.adobe.com/products/xd.html\">Adobe XD</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628743157849.png\">Image Source: <a href=\"https://www.sketch.com/\">Sketch</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628752045112.png\">Image Source: <a href=\"https://www.protopie.io/\">ProtoPie</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628749998307.png\">Image Source: <a href=\"https://framer.com/\">Framer</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628747997257.png\">Image Source: <a href=\"https://toolset.com/\">Toolset</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628748611285.png\">Image Source: <a href=\"https://www.haikuforteams.com/animator/\">Animator by Haiku</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628751023068.png\">Image Source: <a href=\"https://affinity.serif.com/en-gb/designer/\">Affinity Designer</a><img src=\"https://lh6.googleusercontent.com/zSjT3K_KLXPwq32-5oA8RLQMAXmjNSBfTUXgxxJir7KQ6fOdd1yRYd0jzBxo7O42N3mNv5UQgIzgGmCvFb_Cc18h17DAED2ShKiPvl6qpn2LFWVogn9QcEMIX6DgHCvopX0pFB_1\">Image Source: <a href=\"https://clickup.com/\">ClickUp</a><img src=\"https://lh6.googleusercontent.com/8gm_048J2wEJ_WD_9vXB7esjB0bzTnj7hNPyhIewLbQSyEeqtuRhsYzUz7jE_n0E3GylWvamewgWYkbWSawAkAo3t5ZD-bM10TT-ZkSRSrEc3Fmib7Y7L_XTWe-OGOfdIT5zAOn1\">Image Source: <a href=\"https://asana.com/\">Asana</a><img src=\"https://lh4.googleusercontent.com/DOfqKLR_ON8XzgdLDjTuVMSa_bTKVSm9tZ3lbx3CW03AX8Q3Y9qYbP17d1EhH4F7KGNFbYRciB-NUFM775UhBHWkJbfPuhahhroh9P4EDUf714Zc-zBrXtKK644je6G8n589jewp\">Image Source: <a href=\"https://www.atlassian.com/software/jira\">JIRA</a><img src=\"https://lh4.googleusercontent.com/ES8WaJ_R9ZY9kYtfAlc-Wt28uUDmTMoRvA1zQLp2ijGfTvhVEuBYFYAS7FHSspYMokpuIv9VLqwhtxYxlnrImdxTLwFqnS_k6AqvXhPWSwqpNGc5lpfcHcbglV-I3Imcz1yOI2c_\">Image Source: <a href=\"https://slack.com/intl/en-au/\">Slack</a><img src=\"https://lh3.googleusercontent.com/9MTbGgNToiS4BrnLGuDkrIykZFtGbDE9g6khzKy7w52VnFQqnXwi2mlYjRFA9EI_49dmEyD53M3WFOxuR49RcAu_yQi3qxGI3NGs79qVKM4HJyDsQF6-5YH-hUDHrqvxnG_b_EUI\">Image Source: <a href=\"https://zoom.us/\">Zoom</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628831608408.png\">Image Source: <a href=\"https://www.typescriptlang.org/\">TypeScript</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628828564183-1.png\">Image Source: <a href=\"https://sass-lang.com/guide\">Sass</a><img src=\"https://lh6.googleusercontent.com/GVUZo-jhQxvyTfdhcC0SIpT7yTjtXiVUFDzhtxc-NuVtF5AXqQcgpCSEIZyWdLZs7rPtUYvu-lIHvY-eKymaFAT5sprEffolutJJ1gGAWJB9s37ZmGUlH6UIqleVpfciapcMvAR7\">Image Source: <a href=\"https://stackoverflow.com/\">Stack Overflow</a><img src=\"https://lh4.googleusercontent.com/VkP8y5mQdyGHN36GWELx53tup1fhCQiOPMmce1-wCGTBF18UTLrXnEa2KmDy6Op9QfwU00frx_xQBnRLIYJx7TERs0SwTNeufbMnM3RTIRS2ZDcrynUlQSEaEzoPTO7jD94kvtzr\">Image Source: <a href=\"https://squoosh.app/\">Squoosh</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/screely-1628823617932.png\">Image Source: Paperform<img src=\"https://lh6.googleusercontent.com/ALDwwi8tDvEmnWjsFJlyzFwWQ4p4V4uuS7egg1DNcbRWG0B02BeYbXO2o7aiRIHuSzTdStodCMJh7dSyT-L6XoyGhQArSNJam0_6HqDiEEkx4H7YkJ5fvOHy0sU3dUEE9UzqdPEa\">Image Source: <a href=\"https://developers.google.com/web/tools/lighthouse/\">Google Lighthouse</a><img src=\"https://img.paperform.co/fetch/f_webp,w_1500/https://s3.amazonaws.com/paperform-blog/2021/08/Facebook-post---5--2-.png\">Image Source: Stack Overflow<img src=\"https://lh3.googleusercontent.com/-B-6-8bBUycMywsPV65wJs1vKrkW3QCCo_Bd4eXovfkHh3uMkLyGdvBTYNDOj05o97iTVm7M4B9rLjINH8PZ9NLsIzJ7peSOcf3T2yJ9_8Efz5Rn5jMUv4xLpetCt3zF1PDs8iiU\"></p>"},{"url":"/docs/audio/dtw-python-explained/","relativePath":"docs/audio/dtw-python-explained.md","relativeDir":"docs/audio","base":"dtw-python-explained.md","name":"dtw-python-explained","frontmatter":{"title":"Dynamic Time Warping Algorithm Explained (Python)","weight":0,"excerpt":"Dynamic Time Warping Algorithm Explained (Python)","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Dynamic Time Warping Algorithm Explained (Python)</h1>\n<p>In this world which is getting dominated by Internet of Things (IoT), there is an increasing need to understand signals from devices installed in households, shopping malls, factories and offices. For example, any voice assistant detects, authenticates and interprets commands from humans even if it is slow or fast. Our voice tone tends to be different during different times of the day. In the early morning after we get up from bed, we interact with a slower, heavier and lazier tone compared to other times of the day. These devices treat the signals as time series and compare the peaks, troughs and slopes by taking into account the varying lags and phases in the signals to come up with a similarity score. One of the most common algorithms used to accomplish this is <em>Dynamic Time Warping (DTW)</em>. It is a very robust technique to compare two or more Time Series by ignoring any shifts and speed.</p>\n<p>As part of Walmart Real Estate team, I am working on understanding the energy consumption pattern of different assets like refrigeration units, dehumidifiers, lighting, etc. installed in the retail stores.This will help in improving quality of data collected from IoT sensors, detect and prevent faults in the systems and improve energy consumption forecasting and planning. This analysis involves time series of energy consumption during different times of a day i.e. different days of a week, weeks of a month and months of a year. Time series forecasting often gives bad predictions when there is sudden shift in phase of the energy consumption due to unknown factors. For example if the defrost schedule, items refresh routine for a refrigeration unit, or weather changes suddenly and are not captured to explain the phase shifts of energy consumption, it is important to detect these change points.</p>\n<p>In the example below, the items refresh routine of a store has shifted by 2 hours on Tuesday leading the shift in peak energy consumption of refrigeration units and this information was not available to us for many such stores.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*WEe7LQivzU4YOvDCe0_P_A.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*WEe7LQivzU4YOvDCe0_P_A.png\"></p>\n<p>The peak at 2 am got shifted to 4 am. DTW when run recursively for consecutive days can identify the cases for which phase shift occurred without much change in shape of signals.</p>\n<p><img src=\"https://miro.medium.com/max/52/1*jDuu7XE8XitCTBSythQICw.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*jDuu7XE8XitCTBSythQICw.png\"></p>\n<p>The training data can be restricted to Tuesday onwards to improve the prediction of energy consumption in future in this case as phase shift was detected on Tuesday. The setup improved the predictions substantially ( > 50%) for the stores for which the reason of shift was not known. This was not possible by traditional ways of one to one comparison of signals.</p>\n<p>In this blog, I will explain how DTW algorithm works and throw some light on the calculation of the similarity score between two time series and its implementation in python. Most of the contents in this blog have been sourced from this <a href=\"https://ieeexplore.ieee.org/document/1163055\">paper</a>, also mentioned in the references section below.</p>\n<p>2. Why do we need DTW ?</p>\n<p>Any two time series can be compared using euclidean distance or other similar distances on a one to one basis on time axis. The amplitude of first time series at time T will be compared with amplitude of second time series at time T. This will result into a very poor comparison and similarity score even if the two time series are very similar in shape but out of phase in time.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*HQleh0-1HlGsLkVlcaFRLw.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*HQleh0-1HlGsLkVlcaFRLw.png\"></p>\n<p>DTW compares amplitude of first signal at time T with amplitude of second signal at time T+1 and T-1 or T+2 and T-2. This makes sure it does not give low similarity score for signals with similar shape and different phase.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*6Yzt8SiQ-kTRx8pFqDZXkw.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*6Yzt8SiQ-kTRx8pFqDZXkw.png\"></p>\n<ol start=\"3\">\n<li>How it works?</li>\n</ol>\n<p>Let us take two time series signals P and Q</p>\n<p>Series 1 (P) : 1,4,5,10,9,3,2,6,8,4</p>\n<p>Series 2 (Q): 1,7,3,4,1,10,5,4,7,4</p>\n<p><img src=\"https://miro.medium.com/max/60/1*x8-vv9W3cfmdd0mW_1MLTg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*x8-vv9W3cfmdd0mW_1MLTg.png\"></p>\n<p><em>Step 1 :</em> Empty Cost Matrix Creation</p>\n<p>Create an empty cost matrix M with x and y labels as amplitudes of the two series to be compared.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*MrjHYFHyeeE3aiBEA-E5cw.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*MrjHYFHyeeE3aiBEA-E5cw.png\"></p>\n<p><em>Step 2: Cost Calculation</em></p>\n<p>Fill the cost matrix using the formula mentioned below starting from left and bottom corner.</p>\n<p>M(i, j) = |P(i) --- Q(j)| + min ( M(i-1,j-1), M(i, j-1), M(i-1,j) )</p>\n<p>where</p>\n<p>M is the matrix</p>\n<p>i is the iterator for series P</p>\n<p>j is the iterator for series Q</p>\n<p><img src=\"https://miro.medium.com/max/60/1*hhpagt7BEeFU22X83Q76yQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*hhpagt7BEeFU22X83Q76yQ.png\"></p>\n<p>Let us take few examples (11,3 and 8 ) to illustrate the calculation as highlighted in the below table.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*bHaMHM9eBfLc6q166iiI9g.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*bHaMHM9eBfLc6q166iiI9g.png\"></p>\n<p>for 11,</p>\n<p><img src=\"https://miro.medium.com/max/60/1*dzBbhICP6wqwtmW-GGwGmg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*dzBbhICP6wqwtmW-GGwGmg.png\"></p>\n<p>|10 --4| + min( 5, 12, 5 )</p>\n<p>= 6 + 5</p>\n<p>= 11</p>\n<p>Similarly for 3,</p>\n<p>|4 --1| + min( 0 )</p>\n<p>= 3+ 0</p>\n<p>= 3</p>\n<p>and for 8,</p>\n<p>|1 --3| + min( 6)</p>\n<p>= 2 + 6</p>\n<p>= 8</p>\n<p>The full table will look like this:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*7pphf0WWYElhtohnQPFPNA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*7pphf0WWYElhtohnQPFPNA.png\"></p>\n<p><em>Step 3:</em> Warping Path Identification</p>\n<p>Identify the warping path starting from top right corner of the matrix and traversing to bottom left. The traversal path is identified based on the neighbour with minimum value.</p>\n<p>In our example it starts with 15 and looks for minimum value i.e. 15 among its neighbours 18, 15 and 18.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*p6hJxIcUjOzgpTINBHLdmQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*p6hJxIcUjOzgpTINBHLdmQ.png\"></p>\n<p><img src=\"https://miro.medium.com/max/60/1*RnqvEKdMmWklx5m59YiP3g.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*RnqvEKdMmWklx5m59YiP3g.png\"></p>\n<p>The next number in the warping traversal path is 14. This process continues till we reach the bottom or the left axis of the table.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*mjtlGiB44Zz2pALmMiYNLQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*mjtlGiB44Zz2pALmMiYNLQ.png\"></p>\n<p>The final path will look like this:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*WaC_xFSpJi-2GlF7OG37CA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*WaC_xFSpJi-2GlF7OG37CA.png\"></p>\n<p>Let this warping path series be called as d.</p>\n<p>d = [15,15,14,13,11,9,8,8,4,4,3,0]</p>\n<p><em>Step 4:</em> Final Distance Calculation</p>\n<p>Time normalised distance , D</p>\n<p><img src=\"https://miro.medium.com/max/60/1*6M_cotyKNao7xo03zsMLZQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/385/1*6M_cotyKNao7xo03zsMLZQ.png\"></p>\n<p>where k is the length of the series d.</p>\n<p>k = 12 in our case.</p>\n<p>D = ( 15 + 15 + 14 + 13 + 11 + 9 + 8 + 8 + 4 + 4 + 3 + 0 ) /12</p>\n<p>= 104/12</p>\n<p>= 8.63</p>\n<p>Let us take another example with two very similar time series with unit time shift difference.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*CLSlk3qD0Hil2H4XBBeE3Q.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*CLSlk3qD0Hil2H4XBBeE3Q.png\"></p>\n<p>Cost matrix and warping path will look like this.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*Wx823zTAqUkrSbX1ivMAlg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*Wx823zTAqUkrSbX1ivMAlg.png\"></p>\n<p>DTW distance ,D =</p>\n<p>( 0 + 0 + 0 + 0 + 0 +0 +0 +0 +0 +0 +0 ) /11</p>\n<p>= 0</p>\n<p>Zero DTW distance implies that the time series are very similar and that is indeed the case as observed in the plot.</p>\n<h1>Resummation (Spaced Repitition)</h1>\n<p>Dynamic Time Warping (DTW) is a way to compare two -usually temporal- sequences that do not sync up perfectly. It is a method to calculate the optimal matching between two sequences. DTW is useful in many domains such as speech recognition, data mining, financial markets, etc. It's commonly used in data mining to measure the distance between two time-series.</p>\n<p>In this post, we will go over the mathematics behind DTW. Then, two illustrative examples are provided to better understand the concept. If you are not interested in the math behind it, please jump to examples.</p>\n<h1>Formulation</h1>\n<p>Let's assume we have two sequences like the following:</p>\n<p><em>𝑋=𝑥[1], 𝑥[2], ..., x[i], ..., x[n]</em></p>\n<p><em>Y=y[1], y[2], ..., y[j], ..., y[m]</em></p>\n<p>The sequences 𝑋 and 𝑌 can be arranged to form an 𝑛-by-𝑚 grid, where each point (𝑖, j) is the alignment between 𝑥[𝑖] and 𝑦[𝑗].</p>\n<p>A warping path 𝑊 maps the elements of 𝑋 and 𝑌 to minimize the <em>distance</em> between them. 𝑊 is a sequence of grid points (𝑖, 𝑗). We will see an example of the warping path later.</p>\n<h2>Warping Path and DTW distance</h2>\n<p>The Optimal path to (𝑖<em>𝑘, 𝑗</em>𝑘) can be computed by:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*8hJEJWuxrccwCMuUG_aPbQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*8hJEJWuxrccwCMuUG_aPbQ.png\"></p>\n<p>where 𝑑 is the Euclidean distance. Then, the overall path cost can be calculated as</p>\n<p><img src=\"https://miro.medium.com/max/60/1*2OGDOJ-a0zTO_9T1FIGejQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/272/1*2OGDOJ-a0zTO_9T1FIGejQ.png\"></p>\n<h1>Restrictions on the Warping function</h1>\n<p>The warping path is found using a dynamic programming approach to align two sequences. Going through all possible paths is \"combinatorically explosive\" [1]. Therefore, for efficiency purposes, it's important to limit the number of possible warping paths, and hence the following constraints are outlined:</p>\n<ul>\n<li>Boundary Condition: This constraint ensures that the warping path begins with the start points of both signals and terminates with their endpoints.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*SHsmQu2TqpaDyIArn2snzg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/452/1*SHsmQu2TqpaDyIArn2snzg.png\"></p>\n<ul>\n<li>Monotonicity condition: This constraint preserves the time-order of points (not going back in time).</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*RNg2VENGaWoyvGrvyeg61A.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/311/1*RNg2VENGaWoyvGrvyeg61A.png\"></p>\n<ul>\n<li>Continuity (step size) condition: This constraint limits the path transitions to adjacent points in time (not jumping in time).</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*lU99pFyomdPeaHuR26bDyA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/418/1*lU99pFyomdPeaHuR26bDyA.png\"></p>\n<p>In addition to the above three constraints, there are other less frequent conditions for an allowable warping path:</p>\n<ul>\n<li>Warping window condition: Allowable points can be restricted to fall within a given warping window of width 𝜔 (a positive integer).</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*9apgwkXeU3gOHLudFsIosA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/168/1*9apgwkXeU3gOHLudFsIosA.png\"></p>\n<ul>\n<li>Slope condition: The warping path can be constrained by restricting the slope, and consequently avoiding extreme movements in one direction.</li>\n</ul>\n<p>An acceptable warping path has combinations of chess king moves that are:</p>\n<ul>\n<li>Horizontal moves: (𝑖, 𝑗) → (𝑖, 𝑗+1)</li>\n<li>Vertical moves: (𝑖, 𝑗) → (𝑖+1, 𝑗)</li>\n<li>Diagonal moves: (𝑖, 𝑗) → (𝑖+1, 𝑗+1)</li>\n</ul>\n<h1>Implementation</h1>\n<p>Let's import all python packages we need.</p>\n<p>import pandas as pd<br>\nimport numpy as np# Plotting Packages<br>\nimport matplotlib.pyplot as plt<br>\nimport seaborn as sbn# Configuring Matplotlib<br>\nimport matplotlib as mpl<br>\nmpl.rcParams['figure.dpi'] = 300<br>\nsavefig<em>options = dict(format=\"png\", dpi=300, bbox</em>inches=\"tight\")# Computation packages<br>\nfrom scipy.spatial.distance import euclidean<br>\nfrom fastdtw import fastdtw</p>\n<p>Let's define a method to compute the accumulated cost matrix <em>D</em> for the warp path. The cost matrix uses the Euclidean distance to calculate the distance between every two points. The methods to compute the Euclidean distance matrix and accumulated cost matrix are defined below:</p>\n<h1>Example 1</h1>\n<p>In this example, we have two sequences <em>x</em> and <em>y</em> with different lengths.</p>\n<h1>Create two sequences\\</h1>\n<p>x = [3, 1, 2, 2, 1]<br>\ny = [2, 0, 0, 3, 3, 1, 0]</p>\n<p>We cannot calculate the Euclidean distance between <em>x</em> and <em>y</em> since they don't have equal lengths.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*ADzLGLGGq13onO72EO_ZpQ.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*ADzLGLGGq13onO72EO_ZpQ.png\"></p>\n<p>Example 1: Euclidean distance between x and y (is it possible? 🤔) (Image by Author)</p>\n<h1>Compute DTW distance and warp path</h1>\n<p>Many Python packages calculate the DTW by just providing the sequences and the type of distance (usually Euclidean). Here, we use a popular Python implementation of DTW that is <a href=\"https://github.com/slaypni/fastdtw\">FastDTW</a> which is an approximate DTW algorithm with lower time and memory complexities [2].</p>\n<p>dtw<em>distance, warp</em>path = fastdtw(x, y, dist=euclidean)</p>\n<p>Note that we are using <a href=\"https://pypi.org/project/scipy/\">SciPy</a>'s distance function <em>Euclidean</em> that we imported earlier. For a better understanding of the warp path, let's first compute the accumulated cost matrix and then visualize the path on a grid. The following code will plot a heatmap of the accumulated cost matrix.</p>\n<p>cost<em>matrix = compute</em>accumulated<em>cost</em>matrix(x, y)</p>\n<p>Example 1: Python code to plot (and save) the heatmap of the accumulated cost matrix</p>\n<p><img src=\"https://miro.medium.com/max/54/1*PIKZAwsV15NBvqkh9N1KMg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/375/1*PIKZAwsV15NBvqkh9N1KMg.png\"></p>\n<p>Example 1: Accumulated cost matrix and warping path (Image by Author)</p>\n<p>The color bar shows the cost of each point in the grid. As can be seen, the warp path (blue line) is going through the lowest cost on the grid. Let's see the DTW distance and the warping path by printing these two variables.</p>\n<blockquote>\n<blockquote>\n<blockquote>\n<p>DTW distance: 6.0<br>\nWarp path: [(0, 0), (1, 1), (1, 2), (2, 3), (3, 4), (4, 5), (4, 6)]</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<p>The warping path starts at point (0, 0) and ends at (4, 6) by 6 moves. Let's also calculate the accumulated cost most using the functions we defined earlier and compare the values with the heatmap.</p>\n<p>cost<em>matrix = compute</em>accumulated<em>cost</em>matrix(x, y)<br>\nprint(np.flipud(cost_matrix)) # Flipping the cost matrix for easier comparison with heatmap values!>>> [[32. 12. 10. 10.  6.]<br>\n[23. 11.  6.  6.  5.]<br>\n[19. 11.  5.  5.  9.]<br>\n[19.  7.  4.  5.  8.]<br>\n[19.  3.  6. 10.  4.]<br>\n[10.  2.  6.  6.  3.]<br>\n[ 1.  2.  2.  2.  3.]]</p>\n<p>The cost matrix is printed above has similar values to the heatmap.</p>\n<p>Now let's plot the two sequences and connect the mapping points. The code to plot the DTW distance between <em>x</em> and <em>y</em> is given below.</p>\n<p>Example 1: Python code to plot (and save) the DTW distance between x and y</p>\n<p><img src=\"https://miro.medium.com/max/60/1*bF9I-49iVW9b2MvDbRBZxA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*bF9I-49iVW9b2MvDbRBZxA.png\"></p>\n<p>Example 1: DTW distance between x and y (Image by Author)</p>\n<h1>Example 2</h1>\n<p>In this example, we will use two sinusoidal signals and see how they will be matched by calculating the DTW distance between them.</p>\n<p>Example 2: Generate two sinusoidal signals (x1 and x2) with different lengths</p>\n<p>Just like Example 1, let's calculate the DTW distance and the warp path for *x1 *and *x2 *signals using FastDTW package.</p>\n<p>distance, warp_path = fastdtw(x1, x2, dist=euclidean)</p>\n<p>Example 2: Python code to plot (and save) the DTW distance between x1 and x2</p>\n<p><img src=\"https://miro.medium.com/max/60/1*Bzubc5uGFXd_-Sj7W_QFjg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*Bzubc5uGFXd_-Sj7W_QFjg.png\"></p>\n<p>Example 2: DTW distance between x1 and x2 (Image by Author)</p>\n<p>As can be seen in above figure, the DTW distance between the two signals is particularly powerful when the signals have similar patterns. The extrema (maximum and minimum points) between the two signals are correctly mapped. Moreover, unlike Euclidean distance, we may see many-to-one mapping when DTW distance is used, particularly if the two signals have different lengths.</p>\n<p>You may spot an issue with dynamic time warping from the figure above. Can you guess what it is?</p>\n<p>The issue is around the head and tail of time-series that do not properly match. This is because the DTW algorithm cannot afford the warping invariance for at the endpoints. In short, the effect of this is that a small difference at the sequence endpoints will tend to contribute disproportionately to the estimated similarity[3].</p>\n<h1>Conclusion</h1>\n<p>DTW is an algorithm to find an optimal alignment between two sequences and a useful distance metric to have in our toolbox. This technique is useful when we are working with two non-linear sequences, particularly if one sequence is a non-linear stretched/shrunk version of the other. The warping path is a combination of \"chess king\" moves that starts from the head of two sequences and ends with their tails.</p>\n<p>You can find the Jupyter notebook for this blog post <a href=\"https://github.com/e-alizadeh/medium/blob/master/notebooks/intro_to_dtw.ipynb\">here</a>. Thanks for reading!</p>\n<h1>References</h1>\n<p>[1] Donald J. Berndt and James Clifford, <a href=\"https://www.aaai.org/Papers/Workshops/1994/WS-94-03/WS94-03-031.pdf\">Using Dynamic Time Warping to Find Patterns in Time Series</a>, 3rd International Conference on Knowledge Discovery and Data Mining</p>\n<p>[2] Salvador, S. and P. Chan, <a href=\"https://cs.fit.edu/~pkc/papers/tdm04.pdf\">FastDTW: Toward accurate dynamic time warping in linear time and space</a>(2007), Intelligent Data Analysis</p>\n<p>[3] Diego Furtado Silva, <em>et al.</em>, <a href=\"https://core.ac.uk/display/147806669\">On the effect of endpoints on dynamic time warping</a> (2016), SIGKDD Workshop on Mining and Learning from Time Series</p>\n<h1>Useful Links</h1>\n<p>[1] <a href=\"https://nipunbatra.github.io/blog/ml/2014/05/01/dtw.html\">https://nipunbatra.github.io/blog/ml/2014/05/01/dtw.html</a></p>\n<p>[2] <a href=\"https://databricks.com/blog/2019/04/30/understanding-dynamic-time-warping.html\">https://databricks.com/blog/2019/04/30/understanding-dynamic-time-warping.html</a></p>\n<p>Sounds like time traveling or some kind of future technic, however, it is not. Dynamic Time Warping is used to compare the similarity or calculate the distance between two arrays or time series with different length.</p>\n<p>Suppose we want to calculate the distance of two equal-length arrays:</p>\n<p>a = [1, 2, 3]<br>\nb = [3, 2, 2]</p>\n<p>How to do that? One obvious way is to match up <code>a</code> and <code>b</code> in 1-to-1 fashion and sum up the total distance of each component. This sounds easy, but what if <code>a</code> and <code>b</code> have different lengths?</p>\n<p>a = [1, 2, 3]<br>\nb = [2, 2, 2, 3, 4]</p>\n<p>How to match them up? Which should map to which? To solve the problem, there comes dynamic time warping. Just as its name indicates, to warp the series so that they can match up.</p>\n<h1>Use Cases</h1>\n<p>Before digging into the algorithm, you might have the question that is it useful? Do we really need to compare the distance between two unequal-length time series?</p>\n<p>Yes, in a lot of scenarios DTW is playing a key role.</p>\n<h2>Sound Pattern Recognition</h2>\n<p>One use case is to detect the sound pattern of the same kind. Suppose we want to recognise the voice of a person by analysing his sound track, and we are able to collect his sound track of saying <code>Hello</code> in one scenario. However, people speak in the same word in different ways, what if he speaks hello in a much slower pace like <code>Heeeeeeelloooooo</code> , we will need an algorithm to match up the sound track of different lengths and be able to identify they come from the same person.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*gi1TtOqFCsb2M_U7iAUAag.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*gi1TtOqFCsb2M_U7iAUAag.png\"></p>\n<h2>Stock Market</h2>\n<p>In a stock market, people always hope to be able to predict the future, however using general machine learning algorithms can be exhaustive, as most prediction task requires test and training set to have the same dimension of features. However, if you ever speculate in the stock market, you will know that even the same pattern of a stock can have very different length reflection on klines and indicators.</p>\n<p><img src=\"https://miro.medium.com/max/60/1*4QUO4Tqm_z-8ydMBGgqmPg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*4QUO4Tqm_z-8ydMBGgqmPg.png\"></p>\n<h1>Definition &#x26; Idea</h1>\n<p>A concise explanation of DTW from wiki,</p>\n<blockquote>\n<p>In time series analysis, dynamic time warping (DTW) is one of the algorithms for measuring similarity between two temporal sequences, which may vary in speed. DTW has been applied to temporal sequences of video, audio, and graphics data --- indeed, any data that can be turned into a linear sequence can be analysed with DTW.</p>\n</blockquote>\n<p><em>The idea to compare arrays with different length is to build one-to-many and many-to-one matches so that the total distance can be minimised between the two.</em></p>\n<p>Suppose we have two different arrays red and blue with different length:</p>\n<p><img src=\"https://miro.medium.com/max/42/1*uFicSZjqkNBfsyrsJw7J9g.jpeg?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/612/1*uFicSZjqkNBfsyrsJw7J9g.jpeg\"></p>\n<p>Clearly these two series follow the same pattern, but the blue curve is longer than the red. If we apply the one-to-one match, shown in the top, the mapping is not perfectly synced up and the tail of the blue curve is being left out.</p>\n<p>DTW overcomes the issue by developing a one-to-many match so that the troughs and peaks with the same pattern are perfectly matched, and there is no left out for both curves(shown in the bottom top).</p>\n<h1>Rules</h1>\n<p>In general, DTW is a method that calculates an optimal match between two given sequences (e.g. time series) with certain restriction and rules(comes from wiki):</p>\n<ul>\n<li>Every index from the first sequence must be matched with one or more indices from the other sequence and vice versa</li>\n<li>The first index from the first sequence must be matched with the first index from the other sequence (but it does not have to be its only match)</li>\n<li>The last index from the first sequence must be matched with the last index from the other sequence (but it does not have to be its only match)</li>\n<li>The mapping of the indices from the first sequence to indices from the other sequence must be monotonically increasing, and vice versa, i.e. if <code>j > i</code> are indices from the first sequence, then there must not be two indices <code>l > k</code> in the other sequence, such that index <code>i</code> is matched with index <code>l</code> and index <code>j</code> is matched with index <code>k</code> , and vice versa</li>\n</ul>\n<p>The optimal match is denoted by the match that satisfies all the restrictions and the rules and that has the minimal cost, where the cost is computed as the sum of absolute differences, for each matched pair of indices, between their values.</p>\n<p>To summarise is that <em>head and tail must be positionally matched, no cross-match and no left out.</em></p>\n<h1>Implementation</h1>\n<p>The implementation of the algorithm looks extremely concise:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*fGr2Mj7fEB7tEyqAzcp2LA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*fGr2Mj7fEB7tEyqAzcp2LA.png\"></p>\n<p>where <code>DTW[i, j]</code> is the distance between <code>s[1:i]</code> and <code>t[1:j]</code> with the best alignment.</p>\n<p>The key lies in:</p>\n<p>DTW[i, j] := cost + minimum(DTW[i-1, j ],<br>\nDTW[i , j-1],<br>\nDTW[i-1, j-1])</p>\n<p>Which is saying that the cost of between two arrays with length <code>i and j</code> equals <em>the distance between the tails + the minimum of cost in arrays with length *`</em>i-1, j<em><code>_ , _</code></em>i, j-1<em><code>_ , and _</code></em>i-1, j-1*`_ ._</p>\n<p>Put it in python would be:</p>\n<p>Example:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*eogOkXkOUzi6Cq7U9BgiLg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*eogOkXkOUzi6Cq7U9BgiLg.png\"></p>\n<p>The distance between <code>a and b</code> would be the last element of the matrix, which is 2.</p>\n<h2>Add Window Constraint</h2>\n<p>One issue of the above algorithm is that we allow one element in an array to match an unlimited number of elements in the other array(as long as the tail can match in the end), this would cause the mapping to bent over a lot, for example, the following array:</p>\n<p>a = [1, 2, 3]<br>\nb = [1, 2, 2, 2, 2, 2, 2, 2, ..., 5]</p>\n<p>To minimise the distance, the element 2 in array <code>a</code> would match all the 2 in array <code>b</code> , which causes an array <code>b</code> to bent severely. To avoid this, we can add a window constraint to limit the number of elements one can match:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*0_xypte7FHDWJuuBexEvHg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*0_xypte7FHDWJuuBexEvHg.png\"></p>\n<p>The key difference is that now each element is confined to match elements in range <code>i --- w</code> and <code>i + w</code> . The <code>w := max(w, abs(n-m))</code> guarantees all indices can be matched up.</p>\n<p>The implementation and example would be:</p>\n<p><img src=\"https://miro.medium.com/max/60/1*2K6C-3QrRmbbhpe-jt9UQA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*2K6C-3QrRmbbhpe-jt9UQA.png\"></p>\n<h1>Apply a Package</h1>\n<p>There is also contributed packages available on Pypi to use directly. Here I demonstrate an example using <a href=\"https://pypi.org/project/fastdtw/\">fastdtw</a>:</p>\n<p>It gives you the distance of two lists and index mapping(the example can extend to a multi-dimension array).</p>"},{"url":"/docs/career/","relativePath":"docs/career/index.md","relativeDir":"docs/career","base":"index.md","name":"index","frontmatter":{"title":"Career","weight":0,"excerpt":"Reference materials and descriptions of fundamental concepts as well as visua","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Job Search Docs:</h1>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>   Job Search Gitbook Docs </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://web-dev-collaborative.github.io/gitpod-job-search-html-static/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>"},{"url":"/docs/audio/dfft/","relativePath":"docs/audio/dfft.md","relativeDir":"docs/audio","base":"dfft.md","name":"dfft","frontmatter":{"title":"Discrete Fast Fourier Transform","weight":0,"excerpt":"Fast Fourier Transform","seo":{"title":"fft","description":"The discrete Fourier transform operates on sampled data,\nin contrast to the standard Fourier transform which is\ndefined for continuous functions.","robots":[],"extra":[{"name":"og:description","value":"The discrete Fourier transform operates on sampled data,\nin contrast to the standard Fourier transform which is\ndefined for continuous functions.","keyName":"property","relativeUrl":false},{"name":"og:image","value":"images/fft.jpg","keyName":"property","relativeUrl":true},{"name":"og:title","value":"Fast Fourier Transform","keyName":"property","relativeUrl":false}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Frequency and the fast Fourier transform</h1>\n<blockquote>\n<p>If you want to find the secrets of the universe, think in terms of energy,\nfrequency and vibration.</p>\n<p>— Nikola Tesla</p>\n</blockquote>\n<p><em>This chapter was written in collaboration with SW's father, PW van der Walt.</em></p>\n<h2>Introducing frequency</h2>\n<p>We'll start by setting up some plotting styles and importing the usual\nsuspects:</p>\n<pre><code class=\"language-python\"># Make plots appear inline, set custom plotting style\n%matplotlib inline\nimport matplotlib.pyplot as plt\nplt.style.use('style/elegant.mplstyle')\n</code></pre>\n<pre><code class=\"language-python\">import numpy as np\n</code></pre>\n<p>The discrete<sup id=\"fnref-discrete\"><a href=\"#fn-discrete\" class=\"footnote-ref\">discrete</a></sup> Fourier transform (DFT) is a mathematical technique\nto convert temporal or spatial data into <em>frequency domain</em> data.\n<em>Frequency</em> is a familiar concept, due to its colloquial occurrence in\nthe English language: the lowest notes your headphones can rumble out\nare around 20 Hertz, whereas middle C on a piano lies around 261.6\nHertz. Hertz (Hz), or oscillations per second, in this case literally\nrefers to the number of times per second at which the membrane inside\nthe headphone moves to-and-fro. That, in turn, creates compressed\npulses of air which, upon arrival at your eardrum, induces a vibration\nat the same frequency. So, if you take a simple periodic function, $\\sin(10 \\times 2 \\pi t)$, you can view it as a wave:</p>\n<pre><code class=\"language-python\">f = 10  # Frequency, in cycles per second, or Hertz\nf_s = 100  # Sampling rate, or number of measurements per second\n\nt = np.linspace(0, 2, 2 * f_s, endpoint=False)\nx = np.sin(f * 2 * np.pi * t)\n\nfig, ax = plt.subplots()\nax.plot(t, x)\nax.set_xlabel('Time [s]')\nax.set_ylabel('Signal amplitude');\n</code></pre>\n<!-- caption text=\"A simple periodic function in time\" -->\n<p>Or you can equivalently think of it as a repeating signal of\n<em>frequency</em> 10 Hertz (it repeats once every $1/10$ seconds—a length of\ntime we call its <em>period</em>). Although we naturally associate frequency\nwith time, it can equally well be applied to space. E.g., a\nphoto of a textile patterns exhibits high <em>spatial frequency</em>, whereas\nthe sky or other smooth objects have low spatial frequency.</p>\n<p>Let us now examine our sinusoid through application of the discrete Fourier\ntransform:</p>\n<pre><code class=\"language-python\">from scipy import fftpack\n\nX = fftpack.fft(x)\nfreqs = fftpack.fftfreq(len(x)) * f_s\n\nfig, ax = plt.subplots()\n\nax.stem(freqs, np.abs(X))\nax.set_xlabel('Frequency in Hertz [Hz]')\nax.set_ylabel('Frequency Domain (Spectrum) Magnitude')\nax.set_xlim(-f_s / 2, f_s / 2)\nax.set_ylim(-5, 110)\n</code></pre>\n<!-- caption text=\"Frequencies that make up our periodic signal above\" -->\n<p>We see that the output of the FFT is a one-dimensional array of the\nsame shape as the input, containing complex values. All values are\nzero, except for two entries. Traditionally, we visualize the\nmagnitude of the result as a <em>stem plot</em>, in which the height of each\nstem corresponds to the underlying value.</p>\n<p>(We explain why you see positive and negative frequencies later on\nin the sidebox titled \"Discrete Fourier transforms\". You may also\nrefer to that section for a more in-depth overview of the underlying\nmathematics.)</p>\n<p>The Fourier transform takes us from the <em>time</em> to the <em>frequency</em>\ndomain, and this turns out to have a massive number of applications.\nThe <em>fast Fourier transform</em> is an algorithm for computing the\ndiscrete Fourier transform; it achieves its high speed by storing and\nre-using results of computations as it progresses.</p>\n<p>In this chapter, we examine a few applications of the discrete Fourier\ntransform to demonstrate that the FFT can be applied to\nmultidimensional data (not just 1D measurements) to achieve a variety\nof goals.</p>\n<h2>Illustration: a birdsong spectrogram</h2>\n<p>Let's start with one of the most common applications, converting a sound signal (consisting of variations of air pressure over time) to a <em>spectrogram</em>.\nYou might have seen spectrograms on your music player's equalizer view, or even on an old-school stereo.</p>\n<p><img src=\"../images/sergey_gerasimuk_numark-eq-2600-IMG_0236.JPG\" alt=\"The Numark EQ2600 Stereo Equalizer; image used with permission from the author, Sergey Gerasimuk. Source: http://sgerasimuk.blogspot.com/2014/06/numark-eq-2600-10-band-stereo-graphic.html\"></p>\n<p>Listen to the following snippet of nightingale birdsong (released under CC BY 4.0 at\n<a href=\"http://www.orangefreesounds.com/nightingale-sound/\">http://www.orangefreesounds.com/nightingale-sound/</a>):</p>\n<pre><code class=\"language-python\">from IPython.display import Audio\nAudio('data/nightingale.wav')\n</code></pre>\n<p>If you are reading the paper version of this book, you'll have to use\nyour imagination! It goes something like this:\nchee-chee-woorrrr-hee-hee cheet-wheet-hoorrr-chi\nrrr-whi-wheo-wheo-wheo-wheo-wheo-wheo.</p>\n<p>Since we realise that not everyone is fluent in bird-speak, perhaps\nit's best if we visualize the measurements—better known as \"the\nsignal\"—instead.</p>\n<p>We load the audio file, which gives us\nthe sampling rate (number of measurements per second) as well as audio\ndata as an <code>(N, 2)</code> array—two columns because this is a stereo\nrecording.</p>\n<pre><code class=\"language-python\">from scipy.io import wavfile\n\nrate, audio = wavfile.read('data/nightingale.wav')\n</code></pre>\n<p>We convert to mono by averaging the left and right channels.</p>\n<pre><code class=\"language-python\">audio = np.mean(audio, axis=1)\n</code></pre>\n<p>Then, calculate the length of the snippet and plot the audio.</p>\n<pre><code class=\"language-python\">N = audio.shape[0]\nL = N / rate\n\nprint(f'Audio length: {L:.2f} seconds')\n\nf, ax = plt.subplots()\nax.plot(np.arange(N) / rate, audio)\nax.set_xlabel('Time [s]')\nax.set_ylabel('Amplitude [unknown]');\n</code></pre>\n<!-- caption text=\"Audio waveform plot of birdsong\" -->\n<p>Well, that's not very satisfying, is it? If I sent this voltage to a\nspeaker, I might hear a bird chirping, but I can't very well imagine\nhow it would sound like in my head. Is there a better way of <em>seeing</em>\nwhat is going on?</p>\n<p>There is, and it is called the discrete Fourier transform, where\ndiscrete refers to the recording consisting of time-spaced sound\nmeasurements, in contrast to a continual recording as, e.g., on\nmagnetic tape (remember casettes?). The discrete Fourier\ntransform is often computed using the <em>fast Fourier transform</em> (FFT)\nalgorithm, a name informally used to refer to the DFT itself. The\nDFT tells us which frequencies or \"notes\" to expect in our signal.</p>\n<p>Of course, a bird sings many notes throughout the song, so we'd also\nlike to know <em>when</em> each note occurs. The Fourier transform takes a\nsignal in the time domain (i.e., a set of measurements over time) and\nturns it into a spectrum—a set of frequencies with corresponding\n(complex<sup id=\"fnref-complex\"><a href=\"#fn-complex\" class=\"footnote-ref\">complex</a></sup>) values. The spectrum does not contain any information about\ntime! <sup id=\"fnref-time\"><a href=\"#fn-time\" class=\"footnote-ref\">time</a></sup></p>\n<p>So, to find both the frequencies and the time at which they were sung,\nwe'll need to be somewhat clever. Our strategy is as follows:\ntake the audio signal, split it into small, overlapping slices, and\napply the Fourier transform to each (a technique known as the Short\nTime Fourier Transform).</p>\n<p>We'll split the signal into slices of 1024 samples—that's about 0.02\nseconds of audio. Why we choose 1024 and not 1000 we'll explain in a\nsecond when we examine performance. The slices will overlap by 100\nsamples as shown here:</p>\n<p><img src=\"../figures/generated/sliding_window.png\" alt=\"A sliding window operation\"></p>\n<p>Start by chopping up the signal into slices of 1024 samples, each\nslice overlapping the previous by 100 samples. The resulting <code>slices</code>\nobject contains one slice per row.</p>\n<pre><code class=\"language-python\">from skimage import util\n\nM = 1024\n\nslices = util.view_as_windows(audio, window_shape=(M,), step=100)\nprint(f'Audio shape: {audio.shape}, Sliced audio shape: {slices.shape}')\n</code></pre>\n<p>Generate a windowing function (see the section on windowing for a\ndiscussion of the underlying assumptions and interpretations of each)\nand multiply it with the signal:</p>\n<pre><code class=\"language-python\">win = np.hanning(M + 1)[:-1]\nslices = slices * win\n</code></pre>\n<p>It's more convenient to have one slice per column, so we take the transpose:</p>\n<pre><code class=\"language-python\">slices = slices.T\nprint('Shape of `slices`:', slices.shape)\n</code></pre>\n<p>For each slice, calculate the discrete Fourier transform. The DFT\nreturns both positive and negative frequencies (more on that in\n\"Frequencies and their ordering\"), so we slice out the positive M / 2\nfrequencies for now.</p>\n<pre><code class=\"language-python\">spectrum = np.fft.fft(slices, axis=0)[:M // 2 + 1:-1]\nspectrum = np.abs(spectrum)\n</code></pre>\n<p>(As a quick aside, you'll note that we use <code>scipy.fftpack.fft</code> and\n<code>np.fft</code> interchangeably. NumPy provides basic FFT functionality,\nwhich SciPy extends further, but both include an <code>fft</code> function, based\non the Fortran FFTPACK.)</p>\n<p>The spectrum can contain both very large and very small values.\nTaking the log compresses the range significantly.</p>\n<p>Here we do a log plot of the ratio of the signal divided by the maximum signal.\nThe specific unit used for the ratio is the decibel, $20\nlog_{10}\\left(\\mathrm{amplitude ratio}\\right)$.</p>\n<pre><code class=\"language-python\">f, ax = plt.subplots(figsize=(4.8, 2.4))\n\nS = np.abs(spectrum)\nS = 20 * np.log10(S / np.max(S))\n\nax.imshow(S, origin='lower', cmap='viridis',\n          extent=(0, L, 0, rate / 2 / 1000))\nax.axis('tight')\nax.set_ylabel('Frequency [kHz]')\nax.set_xlabel('Time [s]');\n</code></pre>\n<!-- caption text=\"Birdsong spectrogram\" -->\n<p>Much better! We can now see the frequencies vary over time, and it\ncorresponds to the way the audio sounds. See if you can match my\nearlier description: chee-chee-woorrrr-hee-hee cheet-wheet-hoorrr-chi\nrrr-whi-wheo-wheo-wheo-wheo-wheo-wheo (I didn't transcribe the section\nfrom 3 to 5 seconds—that's another bird).</p>\n<p>SciPy already includes an implementation of this\nprocedure as <code>scipy.signal.spectrogram</code>, which can be invoked as\nfollows:</p>\n<pre><code class=\"language-python\">from scipy import signal\n\nfreqs, times, Sx = signal.spectrogram(audio, fs=rate, window='hanning',\n                                      nperseg=1024, noverlap=M - 100,\n                                      detrend=False, scaling='spectrum')\n\nf, ax = plt.subplots(figsize=(4.8, 2.4))\nax.pcolormesh(times, freqs / 1000, 10 * np.log10(Sx), cmap='viridis')\nax.set_ylabel('Frequency [kHz]')\nax.set_xlabel('Time [s]');\n</code></pre>\n<!-- caption text=\"SciPy built-in rendition of birdsong spectrogram\" -->\n<p>The only differences are that SciPy returns the spectrum magnitude\nsquared (which turns measured voltage into measured energy), and\nmultiplies it by some normalization factors<sup id=\"fnref-scaling\"><a href=\"#fn-scaling\" class=\"footnote-ref\">scaling</a></sup>.</p>\n<h2>History</h2>\n<p>Tracing the exact origins of the Fourier transform is tricky. Some\nrelated procedures go as far back as Babylonian times, but it was the\nhot topics of calculating asteroid orbits and solving the heat (flow)\nequation that led to several breakthroughs in the early 1800s. Whom\nexactly among Clairaut, Lagrange, Euler, Gauss and D'Alembert we\nshould thank is not exactly clear, but Gauss was the first to describe\nthe fast Fourier transform (an algorithm for computing the discrete\nFourier transform, popularized by Cooley and Tukey in 1965). Joseph\nFourier, after whom the transform is named, first claimed that\n<em>arbitrary</em> periodic <sup id=\"fnref-periodic\"><a href=\"#fn-periodic\" class=\"footnote-ref\">periodic</a></sup> functions can be expressed as a sum of\ntrigonometric functions.</p>\n<h2>Implementation</h2>\n<p>The discrete Fourier transform functionality in SciPy lives in the\n`scipy.fftpack<code></code> module. Among other things, it provides the\nfollowing DFT-related functionality:</p>\n<ul>\n<li><code>fft</code>, <code>fft2</code>, <code>fftn</code>: Compute the discrete Fourier transform using\nthe Fast Fourier Transform algorithm in 1, 2, or <code>n</code> dimensions.</li>\n<li><code>ifft</code>, <code>ifft2</code>, <code>ifftn</code>: Compute the inverse of the DFT</li>\n<li><code>dct</code>, <code>idct</code>, <code>dst</code>, <code>idst</code>: Compute the cosine and sine transforms, and their inverses.</li>\n<li><code>fftshift</code>, <code>ifftshift</code>: Shift the zero-frequency component to the center of the spectrum and back, respectively (more about that soon).</li>\n<li><code>fftfreq</code>: Return the discrete Fourier transform sample frequencies.</li>\n<li><code>rfft</code>: Compute the DFT of a real sequence, exploiting the symmetry of the resulting spectrum for increased performance. Also used by <code>fft</code> internally when applicable.</li>\n</ul>\n<p>This is complemented by the following functions in NumPy:</p>\n<ul>\n<li><code>np.hanning</code>, <code>np.hamming</code>, <code>np.bartlett</code>, <code>np.blackman</code>,\n<code>np.kaiser</code>: Tapered windowing functions.</li>\n</ul>\n<p>It is also used to perform fast convolutions of large inputs by\n<code>scipy.signal.fftconvolve</code>.</p>\n<p>SciPy wraps the Fortran FFTPACK library—it is not the fastest out\nthere, but unlike packages such as FFTW, it has a permissive free\nsoftware license.</p>\n<h2>Choosing the length of the discrete Fourier transform (DFT)</h2>\n<p>A naive calculation of the DFT takes $\\mathcal{O}\\left(N^2\\right)$ operations <sup id=\"fnref-big_o\"><a href=\"#fn-big_o\" class=\"footnote-ref\">big_o</a></sup>.\nHow come? Well, you have $N$\n(complex) sinusoids of different frequencies ($2 \\pi f \\times 0, 2 \\pi f \\times\n1, 2 \\pi f \\times 3, ..., 2 \\pi f \\times (N - 1)$), and you want to see how\nstrongly your signal corresponds to each. Starting with the first,\nyou take the dot product with the signal (which, in itself, entails $N$\nmultiplication operations). Repeating this operation $N$ times, once\nfor each sinusoid, then gives $N^2$ operations.</p>\n<p>Now, contrast that with the fast Fourier transform, which is $\\mathcal{O}\\left(N \\log N\\right)$ in\nthe ideal case due to the clever re-use of\ncalculations—a great improvement! However, the classical Cooley-Tukey\nalgorithm implemented in FFTPACK (and used by SciPy) recursively breaks up the transform\ninto smaller (prime-sized) pieces and only shows this improvement for\n\"smooth\" input lengths (an input length is considered smooth when its\nlargest prime factor is small). For large prime-sized pieces, the\nBluestein or Rader algorithms can be used in conjunction with the\nCooley-Tukey algorithm, but this optimization is not implemented in\nFFTPACK.<sup id=\"fnref-fast\"><a href=\"#fn-fast\" class=\"footnote-ref\">fast</a></sup></p>\n<p>Let us illustrate:</p>\n<pre><code class=\"language-python\">import time\n\nfrom scipy import fftpack\nfrom sympy import factorint\n\nK = 1000\nlengths = range(250, 260)\n\n# Calculate the smoothness for all input lengths\nsmoothness = [max(factorint(i).keys()) for i in lengths]\n\n\nexec_times = []\nfor i in lengths:\n    z = np.random.random(i)\n\n    # For each input length i, execute the FFT K times\n    # and store the execution time\n\n    times = []\n    for k in range(K):\n        tic = time.monotonic()\n        fftpack.fft(z)\n        toc = time.monotonic()\n        times.append(toc - tic)\n\n    # For each input length, remember the *minimum* execution time\n    exec_times.append(min(times))\n\n\nf, (ax0, ax1) = plt.subplots(2, 1, sharex=True)\nax0.stem(lengths, np.array(exec_times) * 10**6)\nax0.set_ylabel('Execution time (µs)')\n\nax1.stem(lengths, smoothness)\nax1.set_ylabel('Smoothness of input length\\n(lower is better)')\nax1.set_xlabel('Length of input');\n</code></pre>\n<!-- caption text=\"FFT execution time vs smoothness for different input lengths\" -->\n<p>The intuition is that, for smooth input lengths, the FFT can be broken up\ninto many small pieces. After performing the FFT on the first piece,\nthose results can be reused in subsequent computations. This explains\nwhy we chose a length of 1024 for our audio slices earlier—it has a\nsmoothness of only 2, resulting in the optimal \"radix-2 Cooley-Tukey\"\nalgorithm, which computes the FFT using only $(N/2) \\log_2 N = 5120$ complex\nmultiplications, instead of $N^2 = 1048576$. Choosing $N = 2^m$\nalways ensures a maximally smooth $N$ (and, thus, the fastest FFT).</p>\n<h2>More discrete Fourier transform concepts</h2>\n<p>Next, we present a couple of common concepts worth knowing before\noperating heavy Fourier transform machinery, whereafter we tackle\nanother real-world problem: analyzing target detection in radar data.</p>\n<h3>Frequencies and their ordering</h3>\n<p>For historical reasons, most implementations return an array where\nfrequencies vary from low-to-high-to-low (see the box \"Discrete\nFourier transforms\" for further explanation of frequencies). E.g., when we do the real\nFourier transform of a signal of all ones, an input that has no\nvariation and therefore only has the slowest, constant Fourier\ncomponent (also known as the \"DC\" or Direct Current component—just\nelectronics jargon for \"mean of the signal\"), we see this DC component\nappearing as the first entry:</p>\n<pre><code class=\"language-python\">from scipy import fftpack\nN = 10\n\nfftpack.fft(np.ones(N))  # The first component is np.mean(x) * N\n</code></pre>\n<p>When we try the FFT on a rapidly changing signal, we see a high\nfrequency component appear:</p>\n<pre><code class=\"language-python\">z = np.ones(10)\nz[::2] = -1\n\nprint(f'Applying FFT to {z}')\nfftpack.fft(z)\n</code></pre>\n<p>Note that the FFT returns a complex spectrum which, in the case of\nreal inputs, is conjugate symmetrical (i.e., symmetric in the real\npart, and anti-symmetric in the imaginary part):</p>\n<pre><code class=\"language-python\">x = np.array([1, 5, 12, 7, 3, 0, 4, 3, 2, 8])\nX = fftpack.fft(x)\n\nwith np.printoptions(precision=2):\n    print(\"Real part:     \", X.real)\n    print(\"Imaginary part:\", X.imag)\n</code></pre>\n<p>(And, again, recall that the first component is <code>np.mean(x) * N</code>.)</p>\n<p>The <code>fftfreq</code> function tells us which frequencies we are looking at\nspecifically:</p>\n<pre><code class=\"language-python\">fftpack.fftfreq(10)\n</code></pre>\n<p>The result tells us that our maximum component occured at a frequency\nof 0.5 cycles per sample. This agrees with the input, where a\nminus-one-plus-one cycle repeated every second sample.</p>\n<p>Sometimes, it is convenient to view the spectrum organized slightly\ndifferently, from high-negative to low to-high-positive (for now, we\nwon't dive too deeply into the concept of negative frequency, other\nthan saying a real-world sine wave is produced by a combination of\npositive and negative frequencies). We re-shuffle the spectrum using\nthe <code>fftshift</code> function.</p>\n<blockquote>\n<p><strong>Discrete Fourier transforms {.callout}</strong></p>\n<p>The Discrete Fourier Transform (DFT) converts a sequence of $N$\nequally spaced real or complex samples $x<em>{0},x</em>{1},\\ldots, x<em>{N-1}$ of\na function $x(t)$ of time (or another variable, depending on the\napplication) into a sequence of $N$ complex numbers $X</em>{k}$ by the\nsummation</p>\n<p>$$\nX<em>{k}=\\sum</em>{n=0}^{N-1}x_{n}e^{-j2\\pi kn/N},;k=0,1,\\ldots,\nN-1.\n$$</p>\n<p>With the numbers $X<em>{k}$ known, the inverse DFT _exactly</em> recovers the\nsample values $x_{n}$ through the summation</p>\n<p>$$x<em>{n}=\\frac{1}{N}\\sum</em>{k=0}^{N-1}X_{k}e^{j2\\pi kn/N}.$$</p>\n<p>Keeping in mind that $e^{j\\theta}=\\cos\\theta+j\\sin\\theta,$ the last\nequation shows that the DFT has decomposed the sequence $x<em>{n}$ into a\ncomplex discrete Fourier series with coefficients $X</em>{k}$. Comparing\nthe DFT with a continuous complex Fourier series</p>\n<p>$$x(t)=\\sum<em>{n=-\\infty}^{\\infty}c</em>{n}e^{jn\\omega_{0}t},$$</p>\n<p>the DFT is a <em>finite</em> series with $N$ terms defined at the equally\nspaced discrete instances of the <em>angle</em> $(\\omega<em>{0}t</em>{n})=2\\pi\\frac{k}{N}$\nin the interval $[0,2\\pi)$,\ni.e. <em>including</em> $0$ and <em>excluding</em> $2\\pi$.\nThis automatically normalizes the DFT so that time does\nnot appear explicitly in the forward or inverse transform.</p>\n<p>If the original function $x(t)$ is limited in frequency to less than\nhalf of the sampling frequency (the so-called <em>Nyquist frequency</em>),\ninterpolation between sample values produced by the inverse DFT will\nusually give a faithful reconstruction of $x(t)$. If $x(t)$ is <em>not</em>\nlimited as such, the inverse DFT can, in general, not be used to\nreconstruct $x(t)$ by interpolation. Note that this limit does not\nimply that there are <em>no</em> methods that can do such a\nreconstruction—see, e.g., compressed sensing, or finite rate of\ninnovation sampling.</p>\n<p>The function $e^{j2\\pi k/N}=\\left(e^{j2\\pi/N}\\right)^{k}=w^{k}$ takes on\ndiscrete values between $0$ and $2\\pi\\frac{N-1}{N}$ on the unit circle in\nthe complex plane. The function $e^{j2\\pi kn/N}=w^{kn}$ encircles the\norigin $n\\frac{N-1}{N}$ times, thus generating harmonics of the fundamental\nsinusoid for which $n=1$.</p>\n<p>The way in which we defined the DFT leads to a few subtleties\nwhen $n>\\frac{N}{2}$, for even $N$ <sup id=\"fnref-odd_n\"><a href=\"#fn-odd_n\" class=\"footnote-ref\">odd_n</a></sup>. The function $e^{j2\\pi kn/N}$ is plotted\nfor increasing values of $k$ in the figure below,\nfor the cases $n=1$ to $n=N-1$ for $N=16$. When $k$ increases from $k$\nto $k+1$, the angle increases by $\\frac{2\\pi n}{N}$. When $n=1$,\nthe step is $\\frac{2\\pi}{N}$. When $n=N-1$, the angle\nincreases by $2\\pi\\frac{N-1}{N}=2\\pi-\\frac{2\\pi}{N}$. Since $2\\pi$\nis precisely once around the circle, the step equates to $-\\frac{2\\pi}{N}$,\ni.e. in the direction of a negative\nfrequency. The components up to $N/2$ represent <em>positive</em> frequency\ncomponents, those above $N/2$ up to $N-1$ represent <em>negative</em>\nfrequencies. The angle increment for the component $N/2$\nfor $N$ even advances precisely halfway around the circle for\neach increment in $k$ and can therefore be interpreted as either a\npositive or a negative frequency. This component of the DFT represents\nthe Nyquist Frequency, i.e. half of the sampling frequency, and is\nuseful to orientate oneself when looking at DFT graphics.</p>\n<p>The FFT in turn is simply a special and highly efficient algorithm for\ncalculating the DFT. Whereas a straightforward calculation of the DFT\ntakes of the order of $N^{2}$ calculations to compute, the FFT\nalgorithm requires of the order $N\\log N$ calculations. The FFT was\nthe key to the wide-spread use of the DFT in real-time applications\nand was included in a list of the top $10$ algorithms of the $20^{th}$\ncentury by the IEEE journal Computing in Science &#x26; Engineering in the\nyear $2000$.</p>\n<p><img src=\"../figures/unit_circle_samples.png\" alt=\"Unit circle samples\"></p>\n</blockquote>\n<p>Let's examine the frequency components in a noisy image. Note that,\nwhile a static image has no time-varying component, its values do vary\nacross <em>space</em>. The DFT applies equally to either case.</p>\n<p>First, load and display the image:</p>\n<pre><code class=\"language-python\">from skimage import io\nimage = io.imread('images/moonlanding.png')\nM, N = image.shape\n\nf, ax = plt.subplots(figsize=(4.8, 4.8))\nax.imshow(image)\n\nprint((M, N), image.dtype)\n</code></pre>\n<!-- caption text=\"A noisy image of the moon landing\" -->\n<p>Do not adjust your monitor! The image you are seeing is real,\nalthough clearly distorted by either the measurement or transmission\nequipment.</p>\n<p>To examine the spectrum of the image, we use <code>fftn</code> (instead of <code>fft</code>)\nto compute the DFT, since it has more than one dimension. The\ntwo-dimensional FFT is equivalent to taking the 1-D FFT across rows\nand then across columns (or vice versa).</p>\n<pre><code class=\"language-python\">F = fftpack.fftn(image)\n\nF_magnitude = np.abs(F)\nF_magnitude = fftpack.fftshift(F_magnitude)\n</code></pre>\n<p>Again, we take the log of the spectrum to compress the range of\nvalues, before displaying:</p>\n<pre><code class=\"language-python\">f, ax = plt.subplots(figsize=(4.8, 4.8))\n\nax.imshow(np.log(1 + F_magnitude), cmap='viridis',\n          extent=(-N // 2, N // 2, -M // 2, M // 2))\nax.set_title('Spectrum magnitude');\n</code></pre>\n<!-- caption text=\"Spectrum of the noisy moon landing image (magnitude)\" -->\n<p>Note the high values around the origin (middle) of the spectrum—these\ncoefficients describe the low frequencies or smooth parts of the\nimage; a vague canvas of the photo. Higher frequency components,\nspread throughout the spectrum, fill in the edges and detail. Peaks\naround higher frequencies correspond to the periodic noise.</p>\n<p>From the photo, we can see that the noise (measurement artifacts) is\nhighly periodic, so we hope to remove it by zeroing out the\ncorresponding parts of the spectrum.</p>\n<p>The image with those peaks suppressed indeed looks quite different!</p>\n<pre><code class=\"language-python\"># Set block around center of spectrum to zero\nK = 40\nF_magnitude[M // 2 - K: M // 2 + K, N // 2 - K: N // 2 + K] = 0\n\n# Find all peaks higher than the 98th percentile\npeaks = F_magnitude &#x3C; np.percentile(F_magnitude, 98)\n\n# Shift the peaks back to align with the original spectrum\npeaks = fftpack.ifftshift(peaks)\n\n# Make a copy of the original (complex) spectrum\nF_dim = F.copy()\n\n# Set those peak coefficients to zero\nF_dim = F_dim * peaks.astype(int)\n\n# Do the inverse Fourier transform to get back to an image\n# Since we started with a real image, we only look at the real part of\n# the output.\nimage_filtered = np.real(fftpack.ifft2(F_dim))\n\nf, (ax0, ax1) = plt.subplots(2, 1, figsize=(4.8, 7))\nax0.imshow(fftpack.fftshift(np.log10(1 + np.abs(F_dim))), cmap='viridis')\nax0.set_title('Spectrum after suppression')\n\nax1.imshow(image_filtered)\nax1.set_title('Reconstructed image');\n</code></pre>\n<!-- caption text=\"Filtered moon landing image and its spectrum\" -->\n<h3>Windowing</h3>\n<p>If we examine the Fourier transform of a rectangular pulse, we see\nsignificant sidelobes in the spectrum:</p>\n<pre><code class=\"language-python\">x = np.zeros(500)\nx[100:150] = 1\n\nX = fftpack.fft(x)\n\nf, (ax0, ax1) = plt.subplots(2, 1, sharex=True)\n\nax0.plot(x)\nax0.set_ylim(-0.1, 1.1)\n\nax1.plot(fftpack.fftshift(np.abs(X)))\nax1.set_ylim(-5, 55);\n</code></pre>\n<!-- caption text=\"Spectrum of a rectangular pulse (magnitude)\" -->\n<p>In theory, you would need a combination of infinitely many sinusoids\n(frequencies) to represent any abrupt transition; the coefficients would\ntypically have the same sidelobe structure as seen here for the pulse.</p>\n<p>Importantly, the discrete Fourier transform assumes that the input\nsignal is periodic. If the signal is not, the assumption is simply\nthat, right at the end of the signal, it jumps back to its beginning\nvalue. Consider the function, $x(t)$, shown here:</p>\n<img src=\"../figures/periodic.png\"/>\n<!-- caption text=\"Eight samples have been taken of a given\n function with effective length $T_{eff}$.  With the discrete Fourier\n transform assuming periodicity, it creates a step discontinuity\n between the first and last samples.\" -->\n<p>We only measure the signal for a short time, labeled $T_{eff}$. The\nFourier transform assumes that $x(8) = x(0)$, and that the signal is\ncontinued as the dashed, rather than the solid line. This introduces\na big jump at the edge, with the expected oscillation in the spectrum:</p>\n<pre><code class=\"language-python\">t = np.linspace(0, 1, 500)\nx = np.sin(49 * np.pi * t)\n\nX = fftpack.fft(x)\n\nf, (ax0, ax1) = plt.subplots(2, 1)\n\nax0.plot(x)\nax0.set_ylim(-1.1, 1.1)\n\nax1.plot(fftpack.fftfreq(len(t)), np.abs(X))\nax1.set_ylim(0, 190);\n</code></pre>\n<!-- caption text=\"Spectrum oscillation due to signal edge discontinuity\" -->\n<p>Instead of the expected two lines, the peaks are spread out in the\nspectrum.</p>\n<p>We can counter this effect by a process called <em>windowing</em>. The\noriginal function is multiplied with a window function such as the\nKaiser window $K(N,\\beta)$. Here we visualize it for $\\beta$ ranging\nfrom 0 to 100:</p>\n<pre><code class=\"language-python\">f, ax = plt.subplots()\n\nN = 10\nbeta_max = 5\ncolormap = plt.cm.plasma\n\nnorm = plt.Normalize(vmin=0, vmax=beta_max)\n\nlines = [\n    ax.plot(np.kaiser(100, beta), color=colormap(norm(beta)))\n    for beta in np.linspace(0, beta_max, N)\n    ]\n\nsm = plt.cm.ScalarMappable(cmap=colormap, norm=norm)\n\nsm._A = []\n\nplt.colorbar(sm).set_label(r'Kaiser $\\beta$');\n</code></pre>\n<!-- caption text=\"The Kaiser window for various values of $\\beta$\" -->\n<p>By changing the parameter $\\beta$, the shape of the window can be\nchanged from rectangular ($\\beta=0$, no windowing) to a window that\nproduces signals that smoothly increase from zero and decrease to zero\nat the endpoints of the sampled interval, producing very low side\nlobes ($\\beta$ typically between 5 and 10) <sup id=\"fnref-choosing_a_window\"><a href=\"#fn-choosing_a_window\" class=\"footnote-ref\">choosing_a_window</a></sup>.</p>\n<!--\n*For online notebook, use something like:*\n\n#```\n# @interact(beta=(0, 20.))\n# def window(beta):\n#    x = np.kaiser(1000, beta)\n#    f, axes = plt.subplots(1, 2, figsize=(4.8, 2.4))\n#    axes[0].plot(x)\n#    axes[1].plot(fftpack.fftshift(np.abs(np.fft.fft(x, 10000))))\n#    axes[1].set_xlim(2*2480, 2*2520)\n#    plt.show()\n#```\n-->\n<p>The effect of windowing our previous example is noticeable:</p>\n<pre><code class=\"language-python\">win = np.kaiser(len(t), 5)\nx_win = x * win\n\nX_win = fftpack.fft(x_win)\n\nf, (ax0, ax1) = plt.subplots(2, 1)\n\nax0.plot(x_win)\nax0.set_ylim(-1.1, 1.1)\n\nax1.plot(fftpack.fftfreq(len(t)), np.abs(X_win))\nax1.set_ylim(0, 190);\n</code></pre>\n<!-- caption text=\"Spectrum of a windowed signal (magnitude)\" -->\n<h2>Real-world Application: Analyzing Radar Data</h2>\n<p>Linearly modulated FMCW (Frequency-Modulated Continuous-Wave) radars\nmake extensive use of the FFT algorithm for signal processing and\nprovide examples of various applications of the FFT. We will use actual\ndata from an FMCW radar to demonstrate one such an application: target\ndetection.</p>\n<p>Roughly, an FMCW radar works like this (see box \"A\nsimple FMCW radar system\" for more detail):</p>\n<p>A signal with changing frequency is generated. This signal is\ntransmitted by an antenna, after which it travels outwards, away from the\nradar. When it hits an object, part of the signal is reflected back\nto the radar, where it is received, multiplied by a copy of the\ntransmitted signal, and sampled, turning it into\nnumbers that are packed into an array. Our challenge is to interpret\nthose numbers to form meaningful results.</p>\n<p>The multiplication step above is important. From school, recall the\ntrigonometric identity:</p>\n<p>$\n\\sin(xt) \\sin(yt) = \\frac{1}{2}\n\\left[ \\sin \\left( (x - y)t + \\frac{\\pi}{2} \\right) - \\sin \\left( (x + y)t + \\frac{\\pi}{2} \\right) \\right]\n$</p>\n<p>Thus, if we multiply the received signal by the transmitted signal, we\nexpect two frequency components to appear in the spectrum: one that is\nthe difference in frequencies between the received and transmitted\nsignal, and one that is the sum of their frequencies.</p>\n<p>We are particularly interested in the first, since that gives us some\nindication of how long it took the signal to reflect back to the radar\n(in other words, how far away the object is from us!). We discard the\nother by applying a low-pass filter to the signal (i.e., a filter that\ndiscards any high frequencies).</p>\n<blockquote>\n<p><strong>A simple FMCW radar system</strong> {.callout}</p>\n<p><img src=\"../figures/FMCW_Block.png\" alt=\"The block diagram of a simple FMCW radar system\"></p>\n<p>A block diagram of a simple FMCW radar that uses separate\ntransmit and receive antennas is shown above. The radar consists of a waveform generator\nthat generates a sinusoidal signal of which the frequency varies\nlinearly around the required transmit frequency. The generated signal\nis amplified to the required power level by the transmit amplifier\nand routed to the transmit antenna via a coupler circuit where a copy\nof the transmit signal is tapped off. The transmit antenna radiates\nthe transmit signal as an electromagnetic wave in a narrow beam\ntowards the target to be detected. When the wave encounters an object\nthat reflects electromagnetic waves, a fraction of of the energy\nirradiating the target is reflected back to the receiver as a second\nelectromagnetic wave that propagates in the direction of the radar\nsystem. When this wave encounters the receive antenna, the antenna\ncollects the energy in the wave energy impinging on it and converts\nit to a fluctuating voltage that is fed to the mixer. The mixer\nmultiplies the received signal with a replica of the transmit signal\nand produces a sinusoidal signal with a frequency equal to the\ndifference in frequency between the transmitted and received\nsignals. The low-pass filter ensures that the received signal is band\nlimited (i.e., does not contain frequencies that we don't care about)\nand the receive amplifier strengthens the signal to a suitable\namplitude for the analog to digital converter (ADC) that feeds data\nto the computer.</p>\n</blockquote>\n<p>To summarize, we should note that:</p>\n<ul>\n<li>The data that reaches the computer consists of $N$ samples sampled\n(from the multiplied, filtered signal) at a sample frequency of\n$f_{s}$.</li>\n<li>The <strong>amplitude</strong> of the returned signal varies depending on the\n<strong>strength of the reflection</strong> (i.e., is a property of the target\nobject and the distance between the target and the radar).</li>\n<li>The <strong>frequency measured</strong> is an indication of the <strong>distance</strong> of the\ntarget object from the radar.</li>\n</ul>\n<!--\n\n### Signal properties in the time domain\n\nThe transmit signal is a sinusoidal signal with an instantaneous\nfrequency that increases linearly with time, as shown in\nFig. [fig:FMCW waveform](a).\n\nStarting at $f_{min}$, the frequency increases at a rate $S$ Hz/s to $f_{max}.$\nThe frequency is then decreased rapidly back to $f_{min}$\nafter which a next frequency sweep occurs.\n\nThis signal is radiated by a directional transmit antenna. When the\nwave with propagation velocity $v\\approx300\\times10^{6}$ m/s (the\npropagation speed of electromagnetic waves in air is ever-so-slightly\nslower than the speed of light in a vacuum) hits a target at a range $R$,\nthe echo will reach the radar after a time\n\n$$t_{d}=\\frac{2R}{v}.$$\n\nHere it is collected by the receive antenna and converted to a\nsinusoidally fluctuating voltage. The received signal is a replica of\nthe transmitted signal, delayed by the transit time $t_{d}$ and is\nshown dashed in Fig. [fig:FMCW waveform](b).\n\nA radar is designed to detect targets up to a maximum range $R_{max}$.\nEchoes from maximum range reach the radar after a transit\ntime $t_{dm}$ as shown in Fig. [fig:FMCW waveform](c).\n\nWe note that there is a constant difference in frequency between the\ntransmitted and received signals and this will be true for all targets\nafter time $t_{s}$ until $t_{e}$. We conclude from\nFig. [fig:FMCW waveform] that the frequency difference is given by\n\n$$f_{d}=S\\times t_{d}=\\frac{2SR}{v},$$\n\nwhere $T_{eff}=t_{e}-t_{s}=\\frac{N}{f_{s}}$ is the effective sweep duration\nof the radar. The frequency excursion of the sweep during $T_{eff}$ is\nthe effective bandwidth of the radar, given by\n\n$$B_{eff}=f_{max}-f_{1}=ST_{eff}.$$\n\nWe will see that the range resolution of the radar is determined by\nthe effective bandwidth.\n\n\nReturning to Fig. [fig: block-diagram], the signal produced by the\nreceiver at the input to the Analog to Digital Converter (ADC) when\nthere is a single target is a sinusoid with constant amplitude,\nproportional to the amplitude of the echo, and constant frequency,\nproportional to the range to the target.\n\n-->\n<p><img src=\"../figures/FMCW_waveform.png\" alt=\"The frequency relationships in an FMCW radar with\n linear frequency modulation\"></p>\n<p>To start off, we'll generate some synthetic signals, after which we'll\nturn our focus to the output of an actual radar.</p>\n<p>Recall that the radar is increasing its frequency as it transmits at a\nrate of $S$ Hz/s. After a certain amount of time, $t$, has passed,\nthe frequency will now be $t S$ higher. In that same time span, the\nradar signal has traveled $d = t / v$ meters, where $v$ is the speed of\nthe transmitted wave through air (roughly the same as the speed of\nlight, $3 \\times 10^8$ m/s).</p>\n<p>Combining the above observations, we can calculate the amount of time\nit would take the signal to travel to, bounce off, and return from a\ntarget that is distance $R$ away:</p>\n<p>$$ t_R = 2R / v $$</p>\n<p>Therefore, the change in frequency for a target at range $R$ will be:</p>\n<p>$$ f_{d}= t_R S = \\frac{2RS}{v}$$</p>\n<pre><code class=\"language-python\">pi = np.pi\n\n# Radar parameters\nfs = 78125          # Sampling frequency in Hz, i.e. we sample 78125\n                    # times per second\n\nts = 1 / fs         # Sampling time, i.e. one sample is taken each\n                    # ts seconds\n\nTeff = 2048.0 * ts  # Total sampling time for 2048 samples\n                    # (AKA effective sweep duration) in seconds.\n\nBeff = 100e6        # Range of transmit signal frequency during the time the\n                    # radar samples, known as the \"effective bandwidth\"\n                    # (given in Hz)\n\nS = Beff / Teff     # Frequency sweep rate in Hz/s\n\n# Specification of targets.  We made these targets up, imagining they\n# are objects seen by the radar with the specified range and size\n\nR = np.array([100, 137, 154, 159,  180])  # Ranges (in meter)\nM = np.array([0.33, 0.2, 0.9, 0.02, 0.1])  # Target size\nP = np.array([0, pi / 2, pi / 3, pi / 5, pi / 6])  # Randomly chosen phase offsets\n\nt = np.arange(2048) * ts  # Sample times\n\nfd = 2 * S * R / 3E8      # Frequency differences for these targets\n\n# Generate five targets\nsignals = np.cos(2 * pi * fd * t[:, np.newaxis] + P)\n\n# Save the signal associated with the first target as an example for\n# later inspection\nv_single = signals[:, 0]\n\n# Weigh the signals, according to target size, and sum, to generate\n# the combined signal seen by the radar\nv_sim = np.sum(M * signals, axis=1)\n\n## The above code is equivalent to:\n#\n# v0 = np.cos(2 * pi * fd[0] * t)\n# v1 = np.cos(2 * pi * fd[1] * t + pi / 2)\n# v2 = np.cos(2 * pi * fd[2] * t + pi / 3)\n# v3 = np.cos(2 * pi * fd[3] * t + pi / 5)\n# v4 = np.cos(2 * pi * fd[4] * t + pi / 6)\n#\n## Blend them together\n# v_single = v0\n# v_sim = (0.33 * v0) + (0.2 * v1) + (0.9 * v2) + (0.02 * v3) + (0.1 * v4)\n</code></pre>\n<p>Above, we generate a synthetic signal, $v_\\mathrm{single}$, received when\nlooking at a single target (see figure below). By counting the number\nof cycles seen in a given time period, we can compute the frequency of\nthe signal and thus the distance to the target.</p>\n<p>A real radar will rarely receive only a single echo, though. The\nsimulated signal $v<em>\\mathrm{sim}$ shows what a radar signal will look\nlike with five targets at different ranges (including two close to one\nanother at 154 and 159 meters), and $v</em>\\mathrm{actual}(t)$ shows the\noutput signal obtained with an actual radar. When multiple echoes add\ntogether, the result makes little intuitive sense; until, that is, we\nlook at it more carefully through the lens of the discrete Fourier\ntransform.</p>\n<!--\nA synthetic radar signal is shown as $v_{1}(t)$ in Fig. [fig:radar time signals]\nfor a radar with parameters $B_{eff}=100$ MHz, sampling frequency\n28125 Hz and N=2048 samples. The effective sweep time is\n$T_{eff}=\\frac{2048}{28125}=26.214$ ms. We can interpret this signal\nby counting the number of cycles in the graph — about\n$66\\frac{1}{2}$. The difference frequency is approximately\n$\\frac{66.5}{26.214E-3}=6.35$ kHz. With\n$S=\\frac{B_{eff}}{T_{eff}}=\\frac{100E6}{26.214E-3}=3.815\\times10^{9}$\nHz/s, we can calculate the range to the target as\n$R=\\frac{vf_{d}}{2S}=\\frac{3\\times10^{8}\\times6.35\\times10^{3}}{2\\times3.815\\times10^{9}}=249.7$\nm.\n-->\n<p><img src=\"../figures/generated/radar_time_signals.png\" alt=\"Receiver output signals: (a) single simulated target\n (b) five simulated targets (c) actual radar data\"></p>\n<p>The real-world radar data is read from a NumPy-format <code>.npz</code> file (a\nlight-weight, cross-platform and cross-version compatible storage\nformat). These files can be saved with the <code>np.savez</code> or\n<code>np.savez_compressed</code> functions. Note that SciPy's <code>io</code> submodule\ncan also easily read other formats, such as MATLAB(R) and NetCDF\nfiles.</p>\n<pre><code class=\"language-python\">data = np.load('data/radar_scan_0.npz')\n\n# Load variable 'scan' from 'radar_scan_0.npz'\nscan = data['scan']\n\n# The dataset contains multiple measurements, each taken with the\n# radar pointing in a different direction.  Here we take one such as\n# measurement, at a specified azimuth (left-right position) and elevation\n# (up-down position).  The measurement has shape (2048,).\n\nv_actual = scan['samples'][5, 14, :]\n\n# The signal amplitude ranges from -2.5V to +2.5V.  The 14-bit\n# analogue-to-digital converter in the radar gives out integers\n# between -8192 to 8192.  We convert back to voltage by multiplying by\n# $(2.5 / 8192)$.\n\nv_actual = v_actual * (2.5 / 8192)\n</code></pre>\n<p>Since <code>.npz</code>-files can store multiple variables, we have to select\nthe one we want: <code>data['scan']</code>. That returns a\n<em>structured NumPy array</em> with the following fields:</p>\n<ul>\n<li><strong>time</strong> : unsigned 64-bit (8 byte) integer (<code>np.uint64</code>)</li>\n<li><strong>size</strong> : unsigned 32-bit (4 byte) integer (<code>np.uint32</code>)</li>\n<li>\n<p><strong>position</strong></p>\n<ul>\n<li><strong>az</strong> : 32-bit float (<code>np.float32</code>)</li>\n<li><strong>el</strong> : 32-bit float (<code>np.float32</code>)</li>\n<li><strong>region_type</strong> : unsigned 8-bit (1 byte) integer (<code>np.uint8</code>)</li>\n<li><strong>region_ID</strong> : unsigned 16-bit (2 byte) integer (<code>np.uint16</code>)</li>\n<li><strong>gain</strong> : unsigned 8-bit (1 byte) integer (<code>np.uin8</code>)</li>\n<li><strong>samples</strong> : 2048 unsigned 16-bit (2 byte) integers (<code>np.uint16</code>)</li>\n</ul>\n</li>\n</ul>\n<p>While it is true that NumPy arrays are <em>homogeneous</em> (i.e., all the\nelements inside are the same), it does not mean that those elements\ncannot be compound elements, as is the case here.</p>\n<p>An individual field is accessed using dictionary syntax:</p>\n<pre><code class=\"language-python\">azimuths = scan['position']['az']  # Get all azimuth measurements\n</code></pre>\n<p>To summarize what we've seen so far: the shown measurements\n($v<em>\\mathrm{sim}$ and $v</em>\\mathrm{actual}$) are the sum of sinusoidal\nsignals reflected by each of several objects. We need to determine\neach of the constituent components of these composite radar\nsignals. The FFT is the tool that will do this for us.</p>\n<h3>Signal properties in the frequency domain</h3>\n<p>First, we take the FFTs of our three signals (synthetic single target,\nsynthetic multi-target, and real) and then display the\npositive frequency components (i.e., components $0$ to $N/2$). These\nare called the <em>range traces</em> in radar terminology.</p>\n<pre><code class=\"language-python\">fig, axes = plt.subplots(3, 1, sharex=True, figsize=(4.8, 2.4))\n\n# Take FFTs of our signals.  Note the convention to name FFTs with a\n# capital letter.\n\nV_single = np.fft.fft(v_single)\nV_sim = np.fft.fft(v_sim)\nV_actual = np.fft.fft(v_actual)\n\nN = len(V_single)\n\nwith plt.style.context('style/thinner.mplstyle'):\n    axes[0].plot(np.abs(V_single[:N // 2]))\n    axes[0].set_ylabel(\"$|V_\\mathrm{single}|$\")\n    axes[0].set_xlim(0, N // 2)\n    axes[0].set_ylim(0, 1100)\n\n    axes[1].plot(np.abs(V_sim[:N // 2]))\n    axes[1].set_ylabel(\"$|V_\\mathrm{sim} |$\")\n    axes[1].set_ylim(0, 1000)\n\n    axes[2].plot(np.abs(V_actual[:N // 2]))\n    axes[2].set_ylim(0, 750)\n    axes[2].set_ylabel(\"$|V_\\mathrm{actual}|$\")\n\n    axes[2].set_xlabel(\"FFT component $n$\")\n\n    for ax in axes:\n        ax.grid()\n</code></pre>\n<!-- caption text=\"Range traces for: (a) single simulated target, (b) mutiple simulated targets, (c) real-world targets\" -->\n<p>Suddenly, the information makes sense!</p>\n<p>The plot for $|V<em>\\mathrm{single}|$ clearly shows a target at component 67, and\nfor $|V</em>\\mathrm{sim}|$ shows the targets that produced the signal that was\nuninterpretable in the time domain. The real radar\nsignal, $|V_\\mathrm{actual}|$ shows a large number of targets between\ncomponent 400 and 500 with a large peak in component 443. This happens\nto be an echo return from a radar illuminating the high wall of an\nopen-cast mine.</p>\n<p>To get useful information from the plot, we must determine the range!\nAgain, we use the formula:</p>\n<p>$$R<em>{n}=\\frac{nv}{2B</em>{eff}}$$</p>\n<p>In radar terminology, each DFT component is known as a <em>range bin</em>.</p>\n<!--\nThe sinusoid associated with the first component of the DFT has a\nperiod exactly equal to the duration $T_{eff}$ of the time domain\nsignal, so $f_{1}=\\frac{1}{T_{eff}}$. The other sinusoids in the\nFourier series are harmonics of this, $f_{n}=\\frac{n}{T_{eff}}$.\n\nThe ranges associated with the DFT components follow from\nEqs. ([eq:difference frequency]) and ([eq:Effective bandwidth]) as\n\n$$R_{n}=\\frac{nv}{2B_{eff}}$$\n\nand the associated DFT components are known as *range bins* in radar\nterminology.\n\n-->\n<p>This equation also defines the range resolution of the radar: targets\nwill only be distinguishable if they are separated by more than two\nrange bins, i.e.</p>\n<p>$$\\Delta R>\\frac{1}{B_{eff}}.$$</p>\n<p>This is a fundamental property of all types of radar.</p>\n<!--\nThe plot in Fig. ([fig:FFT range traces]) has a fundamental\nshortcoming. The observable dynamic range is the signal is very\nlimited! We could easily have missed one of the targets in the trace\nfor $V_{5}$!  To ameliorate the problem, we plot the same FFTs but\nthis time against a logarithmic y-axis.  The traces were all\nnormalized by dividing the amplitudes with the maximum value.\n-->\n<p>This result is quite satisfying—but the dynamic range is so large\nthat we could very easily miss some peaks. Let's take the $\\log$ as\nbefore with the spectrogram:</p>\n<pre><code class=\"language-python\">c = 3e8  # Approximately the speed of light and of\n         # electromagnetic waves in air\n\nfig, (ax0, ax1, ax2) = plt.subplots(3, 1)\n\n\ndef dB(y):\n    \"Calculate the log ratio of y / max(y) in decibel.\"\n\n    y = np.abs(y)\n    y /= y.max()\n\n    return 20 * np.log10(y)\n\n\ndef log_plot_normalized(x, y, ylabel, ax):\n    ax.plot(x, dB(y))\n    ax.set_ylabel(ylabel)\n    ax.grid()\n\n\nrng = np.arange(N // 2) * c / 2 / Beff\n\nwith plt.style.context('style/thinner.mplstyle'):\n    log_plot_normalized(rng, V_single[:N // 2], \"$|V_0|$ [dB]\", ax0)\n    log_plot_normalized(rng, V_sim[:N // 2], \"$|V_5|$ [dB]\", ax1)\n    log_plot_normalized(rng, V_actual[:N // 2], \"$|V_{\\mathrm{actual}}|$ [dB]\", ax2)\n\nax0.set_xlim(0, 300)  # Change x limits for these plots so that\nax1.set_xlim(0, 300)  # we are better able to see the shape of the peaks.\nax2.set_xlim(0, len(V_actual) // 2)\nax2.set_xlabel('range')\n</code></pre>\n<!-- caption text=\"Logarithm of range traces\" -->\n<p>The observable dynamic range is much improved in these plots. For\ninstance, in the real radar signal the <em>noise floor</em> of the radar has\nbecome visible (i.e., the level where electronic noise in the system\nstarts to limit the radar's ability to detect a target).</p>\n<!-- The noise floor is ultimately caused by a phenomenon\ncalled thermal noise that is produced by all conducting elements that\nhave resistance at temperatures above absolute zero, as well as by\nshot noise, a noise mechanism inherent in all the electronic devices\nthat are used for processing the radar signal. The noise floor of a\nradar limits its ability to detect weak echoes. -->\n<h3>Windowing, applied</h3>\n<p>We're getting there, but in the spectrum of the simulated signal, we\nstill cannot distinguish the peaks at 154 and 159 meters. Who knows\nwhat we're missing in the real-world signal! To sharpen the peaks,\nwe'll return to our toolbox and make use of <em>windowing</em>.</p>\n<!--\n\nThe range traces in Fig. ([fig:Log range traces]) display a further\nserious shortcoming. The signals $v_{1}$ and $v_{5}$ are composed of\npure sinusoids and we would ideally expect the FFT to produce line\nspectra for these signals. The logarithmic plots show steadily\nincreasing values as the peaks are approached from both sides, to such\nan extent that one of the targets in the plot for $|v_{5}|$ can hardly\nbe distinguished even though it is separated by several range bins\nfrom the large target. The broadening is caused by *side lobes* in the\nDFT. These are caused by an inherent clash between the properties of\nthe signal we analyzed and the signal produced by the inverse DFT.\n\n-->\n<p>Here are the signals used thus far in this example, windowed with a\nKaiser window with $\\beta=6.1$:</p>\n<pre><code class=\"language-python\">f, axes = plt.subplots(3, 1, sharex=True, figsize=(4.8, 2.8))\n\nt_ms = t * 1000  # Sample times in milli-second\n\nw = np.kaiser(N, 6.1)  # Kaiser window with beta = 6.1\n\nfor n, (signal, label) in enumerate([(v_single, r'$v_0 [V]$'),\n                                     (v_sim, r'$v_5 [V]$'),\n                                     (v_actual, r'$v_{\\mathrm{actual}} [V]$')]):\n    with plt.style.context('style/thinner.mplstyle'):\n        axes[n].plot(t_ms, w * signal)\n        axes[n].set_ylabel(label)\n        axes[n].grid()\n\naxes[2].set_xlim(0, t_ms[-1])\naxes[2].set_xlabel('Time [ms]');\n</code></pre>\n<!-- caption text=\"Windowed signals for: (a) single simulated target, (b) multiple simulated targets, (c) real targets\" -->\n<p>And the corresponding FFTs (or \"range traces\", in radar terms):</p>\n<pre><code class=\"language-python\">V_single_win = np.fft.fft(w * v_single)\nV_sim_win = np.fft.fft(w * v_sim)\nV_actual_win = np.fft.fft(w * v_actual)\n\nfig, (ax0, ax1,ax2) = plt.subplots(3, 1)\n\nwith plt.style.context('style/thinner.mplstyle'):\n    log_plot_normalized(rng, V_single_win[:N // 2],\n                        r\"$|V_{0,\\mathrm{win}}|$ [dB]\", ax0)\n    log_plot_normalized(rng, V_sim_win[:N // 2],\n                        r\"$|V_{5,\\mathrm{win}}|$ [dB]\", ax1)\n    log_plot_normalized(rng, V_actual_win[:N // 2],\n                        r\"$|V_\\mathrm{actual,win}|$ [dB]\", ax2)\n\nax0.set_xlim(0, 300)  # Change x limits for these plots so that\nax1.set_xlim(0, 300)  # we are better able to see the shape of the peaks.\n\nax1.annotate(\"New, previously unseen!\", (160, -35), xytext=(10, 15),\n             textcoords=\"offset points\", color='red', size='x-small',\n             arrowprops=dict(width=0.5, headwidth=3, headlength=4,\n                             fc='k', shrink=0.1));\n</code></pre>\n<!-- caption text=\"Range traces (spectrum) of windowed signals\" -->\n<p>Compare these with the earlier range traces. There is a dramatic\nlowering in side lobe level, but at a price: the peaks have changed in\nshape, widening and becoming less peaky, thus lowering the radar\nresolution, that is, the ability of the radar to distinguish between\ntwo closely space targets. The choice of window is a compromise\nbetween side lobe level and resolution. Even so, referring to the\ntrace for $V_\\mathrm{sim}$, windowing has dramatically increased our\nability to distinguish the small target from its large neighbor.</p>\n<p>In the real radar data range trace windowing has also reduced the side\nlobes. This is most visible in the depth of the notch between the two\ngroups of targets.</p>\n<h3>Radar Images</h3>\n<p>Knowing how to analyze a single trace, we can expand to looking at\nradar images.</p>\n<p>The data is produced by a radar with a parabolic reflector antenna. It\nproduces a highly directive round pencil beam with a $2^\\circ$\nspreading angle between half-power points. When directed with normal\nincidence at a plane, the radar will illuminate a spot of about $2$ meters in\ndiameter at a distance of 60 meters.\nOutside this spot, the power drops off quite rapidly, but strong\nechoes from outside the spot will nevertheless still be visible.</p>\n<p>By varying the pencil beam's azimuth (left-right position) and\nelevation (up-down position), we can sweep it across the target area\nof interest. When reflections are picked up, we can calculate the\ndistance to the reflector (the object hit by the radar signal).\nTogether with the current pencil beam azimuth and elevation, this\ndefines the reflector's position in 3D.</p>\n<p>A rock slope consists of thousands of reflectors. A range bin can be\nthought of as a large sphere with the radar at its center that\nintersects the slope along a ragged line. The scatterers on this line\nwill produce reflections in this range bin. The wavelength of the\nradar (distance the transmitted wave travels in one oscillation\nsecond) is about 30 mm. The reflections from scatterers separated by\nodd multiples of a quarter wavelength in range, about 7.5 mm, will\ntend to interfere destructively, while those from scatterers separated\nby multiples of a half wavelength will tend to interfere\nconstructively at the radar. The reflections combine to produce\napparent spots of strong reflections. This specific radar moves its\nantenna in order to scan small regions consisting of $20^\\circ$\nazimuth and $30^\\circ$ elevation bins scanned in steps of $0.5^\\circ$.</p>\n<p>We will now draw some contour plots of the resulting radar data.\nPlease refer to the diagram below to see how the different slices are\ntaken. A first slice at fixed range shows the strength of echoes\nagainst elevation and azimuth. Another two slices at fixed elevation\nand azimuth respectively shows the slope. The stepped construction of\nthe high wall in an opencast mine is visible in the azimuth plane.</p>\n<p><img src=\"../figures/axes_slices.png\"\n     alt=\"Diagram showing azimuth, elevation and range slices through data volume\"/></p>\n<pre><code class=\"language-python\">data = np.load('data/radar_scan_1.npz')\nscan = data['scan']\n\n# The signal amplitude ranges from -2.5V to +2.5V.  The 14-bit\n# analogue-to-digital converter in the radar gives out integers\n# between -8192 to 8192.  We convert back to voltage by multiplying by\n# $(2.5 / 8192)$.\n\nv = scan['samples'] * 2.5 / 8192\nwin = np.hanning(N + 1)[:-1]\n\n# Take FFT for each measurement\nV = np.fft.fft(v * win, axis=2)[::-1, :, :N // 2]\n\ncontours = np.arange(-40, 1, 2)\n\n# ignore MPL layout warnings\nimport warnings\nwarnings.filterwarnings('ignore', '.*Axes.*compatible.*tight_layout.*')\n\nf, axes = plt.subplots(2, 2, figsize=(4.8, 4.8), tight_layout=True)\n\nlabels = ('Range', 'Azimuth', 'Elevation')\n\ndef plot_slice(ax, radar_slice, title, xlabel, ylabel):\n    ax.contourf(dB(radar_slice), contours, cmap='magma_r')\n    ax.set_title(title)\n    ax.set_xlabel(xlabel)\n    ax.set_ylabel(ylabel)\n    ax.set_facecolor(plt.cm.magma_r(-40))\n\nwith plt.style.context('style/thinner.mplstyle'):\n    plot_slice(axes[0, 0], V[:, :, 250], 'Range=250', 'Azimuth', 'Elevation')\n    plot_slice(axes[0, 1], V[:, 3, :], 'Azimuth=3', 'Range', 'Elevation')\n    plot_slice(axes[1, 0], V[6, :, :].T, 'Elevation=6', 'Azimuth', 'Range')\n    axes[1, 1].axis('off')\n</code></pre>\n<!-- caption text=\"Contour plots of range traces along various axes (see diagram)\" -->\n<h4>3D visualization</h4>\n<p>We can also visualize the volume in three dimensions.</p>\n<p>We first compute the argmax (the index of the maximum value) in the\nrange direction. This should give an indication of the range at which\nthe radar beam hit the rock slope. Each argmax index is converted to\na three-dimensional (elevation-azimuth-range) coordinate:</p>\n<pre><code class=\"language-python\">r = np.argmax(V, axis=2)\n\nel, az = np.meshgrid(*[np.arange(s) for s in r.shape], indexing='ij')\n\naxis_labels = ['Elevation', 'Azimuth', 'Range']\ncoords = np.column_stack((el.flat, az.flat, r.flat))\n</code></pre>\n<p>Taking these coordinates, we project them onto the plane (by dropping\nthe range coordinate), and perform a Delaunay tesselation. The\ntesselation returns a set of indices into our coordinates that define\ntriangles (or simplices). While the triangles are strictly speaking\ndefined on the projected coordinates, we use our original coordinates\nfor the reconstruction, thereby adding back the range component:</p>\n<pre><code class=\"language-python\">from scipy import spatial\n\nd = spatial.Delaunay(coords[:, :2])\nsimplexes = coords[d.vertices]\n</code></pre>\n<p>For display purposes, we swap the range axis to be the first:</p>\n<pre><code class=\"language-python\">coords = np.roll(coords, shift=-1, axis=1)\naxis_labels = np.roll(axis_labels, shift=-1)\n</code></pre>\n<p>Now, Matplotlib's <code>trisurf</code> can be used to visualize the result:</p>\n<pre><code class=\"language-python\"># This import initializes Matplotlib's 3D machinery\nfrom mpl_toolkits.mplot3d import Axes3D\n\n# Set up the 3D axis\nf, ax = plt.subplots(1, 1, figsize=(4.8, 4.8),\n                     subplot_kw=dict(projection='3d'))\n\nwith plt.style.context('style/thinner.mplstyle'):\n    ax.plot_trisurf(*coords.T, triangles=d.vertices, cmap='magma_r')\n\n    ax.set_xlabel(axis_labels[0])\n    ax.set_ylabel(axis_labels[1])\n    ax.set_zlabel(axis_labels[2], labelpad=-3)\n    ax.set_xticks([0, 5, 10, 15])\n\n# Adjust the camera position to match our diagram above\nax.view_init(azim=-50);\n</code></pre>\n<!-- caption text=\"3-D visualization of estimated rock slope position\" -->\n<h3>Further applications of the FFT</h3>\n<p>The examples above show just one of the uses of the FFT in\nradar. There are many others, such as movement (Doppler) measurement\nand target recognition. The fast Fourier transform is pervasive, and is\nseen anywhere from Magnetic Resonance Imaging (MRI) to statistics.\nWith the basic techniques that this chapter outlines in hand, you\nshould be well equipped to use it!</p>\n<h3>Further reading</h3>\n<p>On the Fourier transform:</p>\n<ul>\n<li>A. Papoulis, <em>The Fourier Integral and Its Applications</em>,\nMcGraw-Hill, 1960.</li>\n<li>Ronald A. Bracewell, <em>The Fourier Transform and Its Applications</em>,\nMcGraw-Hill, 1986.</li>\n</ul>\n<p>On radar signal processing:</p>\n<ul>\n<li>Mark A. Richards, <em>Principles of Modern Radar: Basic Principles</em>,\nSciTech, 2010</li>\n<li>Mark A. Richards, <em>Fundamentals of Radar Signal Processing</em>,\nMcGraw-Hill, 2014.</li>\n</ul>\n<!-- exercise begin -->\n<p><strong>Exercise:</strong> The FFT is often used to speed up image convolution\n(convolution is the application of a moving filter mask). Convolve an\nimage with <code>np.ones((5, 5))</code>, using a) numpy's <code>np.convolve</code> and\nb) <code>np.fft.fft2</code>. Confirm that the results are identical.</p>\n<p>Hints:</p>\n<ul>\n<li>The convolution of <code>x</code> and <code>y</code> is equivalent to <code>ifft2(X * Y)</code>, where\n<code>X</code> and <code>Y</code> are the FFTs of x and y respectively.</li>\n<li>In order to multiply <code>X</code> and <code>Y</code>, they have to be the same size.\nUse <code>np.pad</code> to extend <code>x</code> and <code>y</code> with zeros (toward the right and\nbottom) <em>before</em> taking their FFT.</li>\n<li>You may see some edge effects. These can be removed by increasing\nthe padding size, so that both <code>x</code> and <code>y</code> have dimensions\n<code>shape(x) + shape(y) - 1</code>.</li>\n</ul>\n<!-- solution begin -->\n<p><strong>Solution:</strong></p>\n<pre><code class=\"language-python\">from scipy import signal\n\nx = np.random.random((50, 50))\ny = np.ones((5, 5))\n\nL = x.shape[0] + y.shape[0] - 1\nPx = L - x.shape[0]\nPy = L - y.shape[0]\n\nxx = np.pad(x, ((0, Px), (0, Px)), mode='constant')\nyy = np.pad(y, ((0, Py), (0, Py)), mode='constant')\n\nzz = np.fft.ifft2(np.fft.fft2(xx) * np.fft.fft2(yy)).real\nprint('Resulting shape:', zz.shape, ' &#x3C;-- Why?')\n\nz = signal.convolve2d(x, y)\n\nprint('Results are equal?', np.allclose(zz, z))\n</code></pre>\n<!-- solution end -->\n<!-- exercise end -->\n<div class=\"footnotes\">\n<hr>\n<ol>\n<li id=\"fn-discrete\">\n<p>The discrete Fourier transform operates on sampled data,\nin contrast to the standard Fourier transform which is\ndefined for continuous functions.</p>\n<a href=\"#fnref-discrete\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-complex\">\n<p>The Fourier transform essentially tells us how to combine\na set of sinusoids of varying frequency to form the input\nsignal. The spectrum consists of complex numbers—one for\neach sinusoid. A complex number encodes two things: a\nmagnitude and an angle. The magnitude is the strength of\nthe sinusoid in the signal, and the angle how much it is\nshifted in time. At this point, we only care about the\nmagnitude, which we calculate using <code>np.abs</code>.</p>\n<a href=\"#fnref-complex\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-time\">\n<p>For more on techniques for calculating both (approximate) frequencies\nand time of occurrence, read up on wavelet analysis.</p>\n<a href=\"#fnref-time\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-scaling\">\n<p>SciPy goes to some effort to preserve the energy in the\nspectrum. Therefore, when taking only half the components\n(for N even), it multiplies the remaining components,\napart from the first and last components, by two (those\ntwo components are \"shared\" by the two halves of the\nspectrum). It also normalizes the window by dividing it\nby its sum.</p>\n<a href=\"#fnref-scaling\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-periodic\">\n<p>The period can, in fact, also be infinite! The general\ncontinuous Fourier transform provides for this\npossibility. Discrete Fourier transforms are generally\ndefined over a finite interval, and this is implicitly\nthe period of the time domain function that is\ntransformed. In other words, if you do the inverse\ndiscrete Fourier transform, you <em>always</em> get a periodic\nsignal out.</p>\n<a href=\"#fnref-periodic\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-big_o\">\n<p>In computer science, the computational cost of an algorithm\nis often expressed in \"Big O\" notation. The notation gives\nus an indication of how an algorithm's execution time scales\nwith an increasing number of elements. If an algorithm is $\\mathcal{O}(N)$,\nit means its execution time increases linearly with\nthe number of input elements (for example, searching for a\ngiven value in an unsorted list is $\\mathcal{O}\\left(N\\right)$). Bubble sort is\nan example of an $O\\left(N^2\\right)$ algorithm; the exact number of\noperations performed may, hypothetically, be $N + \\frac{1}{2} N^2$,\nmeaning that the computational cost grows quadratically with\nthe number of input elements.</p>\n<a href=\"#fnref-big_o\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-fast\">\n<p>While ideally we don't want to reimplement existing\nalgorithms, sometimes it becomes necessary in order to obtain\nthe best execution speeds possible, and tools\nlike <a href=\"http://cython.org\">Cython</a>—which compiles Python to\nC—and <a href=\"http://numba.pydata.org\">Numba</a>—which does\njust-in-time compilation of Python code—make life a lot\neasier (and faster!). If you are able to use GPL-licenced\nsoftware, you may consider\nusing <a href=\"https://github.com/hgomersall/pyFFTW\">PyFFTW</a> for\nfaster FFTs.</p>\n<a href=\"#fnref-fast\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-odd_n\">\n<p>We leave it as an exercise for the reader to picture the\nsituation for $N$ odd. In this chapter, all examples use\neven-order DFTs.</p>\n<a href=\"#fnref-odd_n\" class=\"footnote-backref\">↩</a>\n</li>\n<li id=\"fn-choosing_a_window\">\n<p>The classical windowing functions include Hann,\nHamming, and Blackman. They differ in their\nsidelobe levels and in the broadening of the\nmain lobe (in the Fourier domain). A modern and\nflexible window function that is close to\noptimal for most applications is the Kaiser\nwindow—a good approximation to the optimal\nprolate spheroid window, which concentrates the\nmost energy into the main lobe. The Kaiser\nwindow can be tuned to suit the particular\napplication, as illustrated in the main text, by\nadjusting the parameter $\\beta$.</p>\n<a href=\"#fnref-choosing_a_window\" class=\"footnote-backref\">↩</a>\n</li>\n</ol>\n</div>"},{"url":"/docs/career/interview-dos-n-donts/","relativePath":"docs/career/interview-dos-n-donts.md","relativeDir":"docs/career","base":"interview-dos-n-donts.md","name":"interview-dos-n-donts","frontmatter":{"title":"Do & Don't of Interviewing!","weight":0,"excerpt":"Do & Don't of Interviewing!","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Do &#x26; Don't of Interviewing!</h2>\n<h4>Legend</h4>\n<ul>\n<li>✅ = Do</li>\n<li>❌ = Don't</li>\n<li>⚠️ = Situational</li>\n</ul>\n<h3>Before interview</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Prepare pen, paper and earphones/headphones.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Find a quiet environment with good Internet connection.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Ensure webcam and audio are working. There were times I had to restart Chrome to get Hangouts to work again.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Request for the option to interview over Hangouts/Skype instead of a phone call; it is easier to send links or text across.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Decide on and be familiar with a programming language.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Familiarize yourself with the coding environment (CoderPad/CodePen). Set up the coding shortcuts, turn on autocompletion, tab spacing, etc.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Prepare answers to the <a href=\"behavioral-questions.md\">frequently-asked behavioral questions</a> in an interview.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Prepare some <a href=\"questions-to-ask.md\">questions to ask</a> at the end of the interview.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Dress comfortably. Usually you do not need to wear smart clothes, casual should be fine. T-shirts and jeans are acceptable at most places.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Stay calm and composed.</td>\n</tr>\n<tr>\n<td>⚠️</td>\n<td>Turn off the webcam if possible. Most remote interviews will not require video chat and leaving it on only serves as a distraction.</td>\n</tr>\n</tbody>\n</table>\n<h3>Introduction</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Introduce yourself in a few sentences under a minute or two.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Mention interesting points that are relevant to the role you are applying for.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Sound enthusiastic! Speak with a smile and you will naturally sound more engaging.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Spend too long introducing yourself. The more time you spend talking the less time you have to code.</td>\n</tr>\n</tbody>\n</table>\n<h3>Upon receiving the question</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Repeat the question back at the interviewer.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Clarify any assumptions you made subconsciously. Many questions are under-specified on purpose. E.g. a tree-like diagram could very well be a graph that allows for cycles and a naive recursive solution would not work.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Clarify input format and range. Ask whether input can be assumed to be well-formed and non-null.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Work through a small example to ensure you understood the question.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Explain a high level approach even if it is a brute force one.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Improve upon the approach and optimize. Reduce duplicated work and cache repeated computations.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Think carefully, then state and explain the time and space complexity of your approaches.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>If stuck, think about related problems you have seen before and how they were solved. Check out the <a href=\"algorithms/introduction.md\">tips</a> in this section.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Ignore information given to you. Every piece is important.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Jump into coding straightaway.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Start coding without interviewer's green light.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Appear too unsure about your approach or analysis.</td>\n</tr>\n</tbody>\n</table>\n<h3>Code out your solution</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Explain what you are coding/typing to the interviewer, what you are trying to achieve.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Practice good coding style. Clear variable names, consistent operator spacing, proper indentation, etc.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Type/write at a reasonable speed. Too slow is no good.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>As much as possible, write actual compilable code, not pseudocode.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Write in a modular fashion. Extract out chunks of repeated code into functions.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Ask for permission to use trivial functions without having to implement them; saves you some time.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Use the hints given by the interviewer.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Demonstrate mastery of your chosen programming language.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Demonstrate technical knowledge in data structures and algorithms.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>If you are cutting corners in your code, state that out loud to your interviewer and say what you would do in a non-interview setting (no time constraints). E.g., \"Under non-interview settings, I would write a regex to parse this string rather than using <code>split()</code> which may not cover all cases.\"</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Practice whiteboard space-management skills.</td>\n</tr>\n<tr>\n<td>⚠️</td>\n<td>Reasonable defensive coding. Check for nulls, empty collections, etc. Can omit if input validity has been clarified with the interviewer.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Remain quiet the whole time while coding.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Spend too much time writing comments.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Use extremely verbose or single-character (unless they're common like <code>i</code>, <code>n</code>) variable names.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Copy and paste code without checking (e.g. variables need to be renamed).</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Interrupt your interviewer when they are talking. Usually if they speak, they are trying to give you hints or steer you in the right direction.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Write too big (takes up too much space) or too small (illegible) if on a whiteboard.</td>\n</tr>\n</tbody>\n</table>\n<h3>After coding</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Scan through your code for mistakes as if it was your first time seeing code written by someone else.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Check for off-by-one errors.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Come up with test cases. Try extreme test cases - empty sets, single item sets, negative numbers</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Step through your code with those test cases.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Look out for places where you can refactor.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Reiterate the time and space complexity of your code.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Explain trade-offs and how the code/approach can be improved if given more time.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Immediately announce that you are done coding. Do the above first!</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>Argue with the interviewer. They may be wrong but that is very unlikely given that they are familiar with the question.</td>\n</tr>\n</tbody>\n</table>\n<h3>Wrap up</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Ask questions. More importantly, ask good and engaging questions that are tailored to the company! Pick some questions from <a href=\"questions-to-ask.md\">this list</a>.</td>\n</tr>\n<tr>\n<td>✅</td>\n<td>Thank the interviewer.</td>\n</tr>\n<tr>\n<td>⚠️</td>\n<td>Ask about your interview performance. It can get awkward.</td>\n</tr>\n<tr>\n<td>❌</td>\n<td>End the interview without asking any questions.</td>\n</tr>\n</tbody>\n</table>\n<h3>Post interview</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Things</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅</td>\n<td>Record the interview questions and answers down as these can be useful for future reference.</td>\n</tr>\n<tr>\n<td>⚠️</td>\n<td>Send a follow up email to your interviewer(s) thanking them for their time and the opportunity to interview with them.</td>\n</tr>\n</tbody>\n</table>"},{"url":"/docs/career/job-boards/","relativePath":"docs/career/job-boards.md","relativeDir":"docs/career","base":"job-boards.md","name":"job-boards","frontmatter":{"title":"Job Board","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Job Boards</h1>\n<p><a href=\"https://github.com/sindresorhus/awesome\"><img src=\"https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\" alt=\"Awesome\"></a></p>\n<p>A curated list of awesome job boards.</p>\n<h2>Table of Contents</h2>\n<ul>\n<li><a href=\"#general\">General</a></li>\n<li><a href=\"#data-science\">Data Science</a></li>\n<li><a href=\"#blockchain\">Blockchain</a></li>\n<li><a href=\"#design\">Design</a></li>\n<li><a href=\"#infosec\">InfoSec</a></li>\n<li><a href=\"#programming\">Programming</a></li>\n<li><a href=\"#remote\">Remote</a></li>\n<li><a href=\"#freelancer\">Freelancer</a></li>\n<li><a href=\"#other\">Other</a></li>\n</ul>\n<h2>General</h2>\n<ul>\n<li><a href=\"https://www.linkedin.com/\">LinkedIn</a></li>\n<li><a href=\"https://www.indeed.com/\">Indeed</a></li>\n<li><a href=\"https://www.glassdoor.com/\">Glassdoor</a></li>\n<li><a href=\"https://angel.co\">Angel List</a></li>\n<li><a href=\"https://www.arbeitnow.com\">arbeitnow</a></li>\n<li><a href=\"https://4dayweek.io/\">4 day week</a></li>\n</ul>\n<h2>Data Science</h2>\n<ul>\n<li><a href=\"https://datajobs.com/\">DataJobs.com</a></li>\n<li><a href=\"https://jobs.dataelixir.com/\">Data Elixir</a></li>\n<li><a href=\"https://ai-jobs.net/\">AI Jobs</a></li>\n<li><a href=\"https://jobhunt.ai/\">Machine learning jobs</a></li>\n<li><a href=\"https://www.kaggle.com/jobs\">Kaggle jobs</a></li>\n<li><a href=\"https://icrunchdata.com/\">icrunchdata</a></li>\n<li><a href=\"https://www.kdnuggets.com/jobs/index.html\">KDnuggets</a></li>\n<li><a href=\"https://www.datayoshi.com/\">Data Yoshi</a></li>\n<li><a href=\"https://jobs.opendatascience.com/\">Opendatascience Jobs</a></li>\n<li><a href=\"https://jobsnew.analyticsvidhya.com/jobs/all\">AnalyticsVidhya Jobs</a></li>\n<li><a href=\"https://www.jobsfornewdatascientists.com/\">Jobs for New Data Scientists</a></li>\n<li><a href=\"https://www.bigdatajobs.com/\">BigDataJobs</a></li>\n<li><a href=\"https://www.statsjobs.com/\">StatsJobs</a></li>\n<li><a href=\"https://bigcloud.global/find-a-job/\">Big Cloud</a></li>\n<li><a href=\"https://www.microprediction.com/jobs\">Microprediction jobs</a></li>\n</ul>\n<h2>Blockchain</h2>\n<ul>\n<li><a href=\"https://blocktribe.com/\">Blocktribe</a></li>\n<li><a href=\"https://cryptojobslist.com/\">Crypto Jobs List</a></li>\n<li><a href=\"https://crypto.jobs/\">CryptoJobs</a></li>\n<li><a href=\"https://blockew.com/\">Blockew</a></li>\n<li><a href=\"https://cryptocurrencyjobs.co/\">Cryptocurrency Jobs</a></li>\n</ul>\n<h2>Design</h2>\n<ul>\n<li><a href=\"https://designjobs.aiga.org/\">AIGA</a></li>\n<li><a href=\"https://www.authenticjobs.com/\">Authentic Jobs</a></li>\n<li><a href=\"https://www.behance.net/joblist\">Behance</a></li>\n<li><a href=\"https://www.coroflot.com/design-jobs\">Coroflot</a></li>\n<li><a href=\"http://ixda.org/jobs/\">IXDA</a></li>\n<li><a href=\"https://dribbble.com/jobs\">Dribble</a></li>\n<li><a href=\"https://www.krop.com/creative-jobs/\">Krop</a></li>\n<li><a href=\"https://opensourcedesign.net/jobs/\">Open Source Design Jobs</a></li>\n<li><a href=\"https://www.uxjobsboard.com\">UX Jobs Board</a></li>\n<li><a href=\"https://designerjobs.co/jobs\">Designer Jobs</a></li>\n<li><a href=\"https://designmodo.com/jobs/\">designmodo</a></li>\n<li><a href=\"https://www.designjobsboard.com/\">Design Jobs Board</a></li>\n<li><a href=\"https://jobs.designweek.co.uk/\">Design Week Jobs</a></li>\n<li><a href=\"https://designjobs.aiga.org/\">AIGA Design Jobs</a></li>\n<li><a href=\"https://ifyoucouldjobs.com/jobs\">If You Could Jobs</a></li>\n<li><a href=\"https://creativemornings.com/jobs\">CreativeMornings</a></li>\n<li><a href=\"https://creativepool.com/jobs/\">Creativepool</a></li>\n<li><a href=\"https://www.theloop.com.au/jobs\">The Loop</a></li>\n</ul>\n<h2>InfoSec</h2>\n<ul>\n<li><a href=\"https://ninjajobs.org/\">NinjaJobs</a></li>\n<li><a href=\"https://infosec-jobs.com/\">infosec-jobs</a></li>\n<li><a href=\"https://www.cybersecurityjobsite.com/jobs/\">CyberSecurityJobsite</a></li>\n<li><a href=\"https://www.careersincyber.com/browse-jobs/\">CareersinCyber</a></li>\n<li><a href=\"https://www.careersinfosecurity.com/jobs/\">CareersInfoSecurity</a></li>\n<li><a href=\"https://www.cybersecurityjobs.net/\">CyberSecurityJobs</a></li>\n<li><a href=\"https://jobs.yeswehack.com/en/\">YesWeHack</a></li>\n</ul>\n<h2>Programming</h2>\n<ul>\n<li><a href=\"https://thecarrots.io/jobs\">Carrots</a></li>\n<li><a href=\"https://www.goopensource.dev/\">Goopensource.dev</a></li>\n<li><a href=\"https://iosdevjobs.com/\">iOS Dev Jobs</a></li>\n<li><a href=\"https://elixir.career/\">Elixir Jobs</a></li>\n<li><a href=\"http://frontenddeveloperjob.com/\">Front-End Developer Jobs</a></li>\n<li><a href=\"https://fullstackjob.com/\">Full-Stack Developer Jobs</a></li>\n<li><a href=\"https://functionaljobs.com/\">Functional Jobs</a></li>\n<li><a href=\"https://www.golangprojects.com/\">Golangprojects</a></li>\n<li><a href=\"https://www.welovegolang.com/\">we love golang</a></li>\n<li><a href=\"https://forum.golangbridge.org/c/jobs\">Golang Forum Jobs</a></li>\n<li><a href=\"https://golangjob.xyz/\">Golang Job Board</a></li>\n<li><a href=\"https://golang.cafe/\">Golang Cafe</a></li>\n<li><a href=\"https://angularjobs.com/\">Angular Jobs</a></li>\n<li><a href=\"https://angular.work/\">Angular Work</a></li>\n<li><a href=\"https://jobs.emberjs.com/\">Ember Job Board</a></li>\n<li><a href=\"https://vuejobs.com/\">Vue.js Jobs</a></li>\n<li><a href=\"https://madewithvuejs.com/jobs\">Made with Vue.js Jobs</a></li>\n<li><a href=\"https://www.react-jobs.com/\">React Jobs</a></li>\n<li><a href=\"https://www.reactjobboard.com/\">React Job Board</a></li>\n<li><a href=\"https://www.weloveangular.com/\">We Love Angular</a></li>\n<li><a href=\"https://www.weworkmeteor.com/\">We Work Meteor</a></li>\n<li><a href=\"https://jobs.drupal.org/\">Drupal Jobs</a></li>\n<li><a href=\"https://jobs.wordpress.net/\">WordPress Jobs</a></li>\n<li><a href=\"https://larajobs.com/\">LaraJobs</a></li>\n<li><a href=\"https://www.wphired.com/\">WPhired</a></li>\n<li><a href=\"https://www.python.org/jobs/\">Python Job Board</a></li>\n<li><a href=\"https://www.pythonjobshq.com/\">Pycoder's Jobs</a></li>\n<li><a href=\"https://djangogigs.com/\">django gigs</a></li>\n<li><a href=\"https://djangojobs.net/jobs/\">Django Jobs</a></li>\n<li><a href=\"https://jobs.rubynow.com/\">RubyNow</a></li>\n<li><a href=\"https://www.rorjobs.com/\">Ruby on Rails Jobs</a></li>\n<li><a href=\"http://rust-jobs.com/\">Rust Programming Language Jobs</a></li>\n<li><a href=\"https://webassemblyjobs.com/\">WebAssembly Jobs</a></li>\n<li><a href=\"https://jobs.date-fns.org/\">JavaScript Jobs</a></li>\n<li><a href=\"https://jobsinjs.com/\">Jobs in JS</a></li>\n<li><a href=\"https://www.r-users.com/\">R-users</a></li>\n</ul>\n<h2>Remote</h2>\n<ul>\n<li><a href=\"https://careervault.io/\">Career Vault</a></li>\n<li><a href=\"https://remotebond.com/\">Remotebond</a></li>\n<li><a href=\"https://jobspresso.co/remote-work/\">Jobspresso</a></li>\n<li><a href=\"https://weworkremotely.com/\">We Work Remotely</a></li>\n<li><a href=\"https://workaline.com/\">Workaline</a></li>\n<li><a href=\"https://remotive.io/\">Remotive</a></li>\n<li><a href=\"https://remote.com/remote-jobs\">Remote</a></li>\n<li><a href=\"https://remoteok.io/\">remote | OK</a></li>\n<li><a href=\"https://justremote.co/\">JustRemote</a></li>\n<li><a href=\"https://www.skipthedrive.com/\">SkipTheDrive</a></li>\n<li><a href=\"https://remote.co/remote-jobs/\">remote.co</a></li>\n<li><a href=\"https://remote4me.com/\">remote4me.com</a></li>\n<li><a href=\"https://www.workingnomads.co/jobs\">Working Nomads</a></li>\n<li><a href=\"https://europeremotely.com/\">EuropeRemotely</a></li>\n<li><a href=\"https://www.awesomejobs.io/\">AwesomeJobs</a></li>\n<li><a href=\"https://www.remotepython.com/\">Remote Python</a></li>\n<li><a href=\"https://rubyonremote.com/\">Ruby On Remote</a></li>\n<li><a href=\"https://remoteml.com/\">Remote ML</a></li>\n<li><a href=\"https://jsremotely.com/\">JS Remotely</a></li>\n<li><a href=\"https://remotearena.com/\">Remote Arena</a></li>\n<li><a href=\"https://www.letsworkremotely.com/remote-jobs/\">letsworkremotely</a></li>\n<li><a href=\"https://workew.com/remote-jobs/\">Workew</a></li>\n<li><a href=\"https://wellpaid.io/\">wellpaid.io</a></li>\n<li><a href=\"https://nodesk.co/remote-jobs/\">NODESK Remote Jobs</a></li>\n<li><a href=\"https://www.flexjobs.com/\">FlexJobs</a></li>\n<li><a href=\"https://rmtwrk.com/\">RMTWRK</a></li>\n<li><a href=\"https://remotify.me/\">remotify</a></li>\n<li><a href=\"https://remoters.net/jobs/\">Remoters</a></li>\n<li><a href=\"https://jobmote.com/\">Jobmote</a></li>\n<li><a href=\"https://www.remotelyawesomejobs.com/\">Remotely Awesome Jobs</a></li>\n<li><a href=\"https://dailyremote.com/\">DailyRemote</a></li>\n<li><a href=\"https://www.remote-developer-jobs.com/\">Remote Developer Jobs</a></li>\n<li><a href=\"https://remotees.com/\">Remotees</a></li>\n<li><a href=\"https://meerkad.com/\">Meerkad</a></li>\n<li><a href=\"https://workfromhomejobs.me/\">Work From Home Jobs</a></li>\n<li><a href=\"https://pangian.com/job-travel-remote/\">Pangian</a></li>\n<li><a href=\"https://www.outsourcely.com/remote-workers\">Outsourcely</a></li>\n<li><a href=\"https://www.prospercircle.org/\">ProsperCircle.org</a></li>\n<li><a href=\"https://www.dynamitejobs.com/\">DynamiteJobs</a></li>\n<li><a href=\"https://flatworld.co/jobs/\">FlatWorld</a></li>\n<li><a href=\"https://www.beefrii.com/\">beefrii</a></li>\n<li><a href=\"https://hireremote.io/\">Hire Remote</a></li>\n</ul>\n<h2>Freelancer</h2>\n<ul>\n<li><a href=\"https://www.upwork.com\">Upwork</a></li>\n<li><a href=\"https://www.toptal.com/\">Toptal</a></li>\n<li><a href=\"https://www.freelancer.com\">Freelancer</a></li>\n<li><a href=\"https://www.guru.com/\">Guru</a></li>\n<li><a href=\"https://www.peopleperhour.com\">People Per Hour</a></li>\n<li><a href=\"https://www.fiverr.com/\">Fiverr</a></li>\n<li><a href=\"https://talent.hubstaff.com/\">Hubstaff</a></li>\n<li><a href=\"https://outsource.com\">Outsource</a></li>\n<li><a href=\"https://www.giggrabbers.com\">GigGrabbers</a></li>\n<li><a href=\"https://www.cloudpeeps.com\">CloudPeeps</a></li>\n<li><a href=\"https://localsolo.com/\">Local Solo</a></li>\n<li><a href=\"https://www.yunojuno.com/\">YunoJuno</a></li>\n<li><a href=\"https://www.gun.io/\">Gun.io</a></li>\n</ul>\n<h2>Other</h2>\n<ul>\n<li><a href=\"https://www.monster.com/\">Monster</a></li>\n<li><a href=\"https://jobs.github.com/\">GitHub Jobs</a></li>\n<li><a href=\"https://www.amazon.jobs/en\">Amazon Jobs</a></li>\n<li><a href=\"https://news.ycombinator.com/jobs\">HackerNews Jobs</a></li>\n<li><a href=\"https://stackoverflow.com/jobs\">Stack Overflow Jobs</a></li>\n<li><a href=\"https://www.crunchboard.com/\">Crunchboard</a></li>\n<li><a href=\"https://jobs.hackernoon.com/\">Hacker Noon Jobs</a></li>\n<li><a href=\"https://jobbatical.com/jobs\">Jobbatical</a></li>\n<li><a href=\"https://powertofly.com/jobs/\">PowerToFly</a> (Women)</li>\n<li><a href=\"https://whoishiring.io/\">whoishiring.io</a></li>\n<li><a href=\"https://www.simplyhired.com/\">SimplyHired</a></li>\n<li><a href=\"https://www.careerbuilder.com\">CareerBuilder</a></li>\n<li><a href=\"https://www.careercast.com/jobs/search/\">CareerCast</a></li>\n<li><a href=\"https://www.dice.com/\">Dice</a></li>\n<li><a href=\"https://jobs.techstars.com/\">Techstars</a></li>\n<li><a href=\"https://www.producthunt.com/jobs/\">Product Hunt Jobs</a></li>\n<li><a href=\"https://www.ziprecruiter.com/\">ZipRecruiter</a></li>\n<li><a href=\"https://www.idealist.org/\">Idealist</a></li>\n<li><a href=\"https://aquent.com/find-work/\">Aquent</a></li>\n<li><a href=\"https://hackerx.org/jobs/\">HackerX</a></li>\n<li><a href=\"https://findwork.dev/\">findwork.dev</a></li>\n<li><a href=\"https://jobs.livecareer.com/\">Livecareer</a></li>\n<li><a href=\"https://www.themuse.com/jobs\">The Muse</a></li>\n<li><a href=\"https://linkup.com/\">LinkUp</a></li>\n<li><a href=\"https://authenticjobs.com/\">Authentic Jobs</a></li>\n<li><a href=\"https://devsnap.io/\">DevSnap</a></li>\n<li><a href=\"https://joblist.app/\">Joblist.app</a></li>\n<li><a href=\"https://www.jobs2careers.com/\">Jobs2Careers</a></li>\n<li><a href=\"https://www.jobisjob.com/\">JobisJob</a></li>\n<li><a href=\"https://joblift.com/\">Joblift</a></li>\n<li><a href=\"https://www.adzuna.com/\">Adzuna</a></li>\n<li><a href=\"https://techmeabroad.com/\">TechMeAbroad</a></li>\n<li><a href=\"https://www.hackerrank.com/jobs/search\">HackerRank Jobs</a></li>\n<li><a href=\"https://findbacon.com/\">Find Bacon</a></li>\n<li><a href=\"https://codersrank.io/find-a-job/\">Codersrank</a></li>\n<li><a href=\"https://www.reddit.com/r/forhire/search?q=%28title%3A%22%5Bhiring%5D%22+OR+flair%3AHiring%29+AND+%28subreddit%3Aforhire+OR+subreddit%3Ajobbit+OR+subreddit%3Ajobopenings%29&#x26;sort=new&#x26;t=all\">jobbit subreddit</a></li>\n<li><a href=\"https://www.jora.com/\">Jora</a></li>\n<li><a href=\"https://hnhiring.com/\">HNHIRING</a></li>\n<li><a href=\"https://nocsok.com/\">nocsok</a></li>\n<li><a href=\"https://ycombinator.monday.vc/\">Y Combinator Job Board</a></li>\n<li><a href=\"https://relocate.me/\">Relocate.me</a></li>\n<li><a href=\"https://producthire.net/\">PRODUCTHIRE.NET</a></li>\n<li><a href=\"https://sportekjobs.com\">Sports tech jobs</a></li>\n<li><a href=\"https://epicjobs.co/\">#epicjobs</a></li>\n<li><a href=\"https://able.bio/jobs\">Able</a></li>\n<li><a href=\"https://stackshare.io/match\">StackShare</a></li>\n<li><a href=\"https://neuvoo.com/\">Neuvoo</a></li>\n<li><a href=\"https://www.toplanguagejobs.com/\">Top Language Jobs</a></li>\n<li><a href=\"https://vanhack.com/platform/#/jobs\">Vanhack</a></li>\n<li><a href=\"http://calmjobs.io/jobs\">CalmJobs</a></li>\n<li><a href=\"https://peoplefirstjobs.com/\">PeopleFirstJobs</a></li>\n<li><a href=\"https://www.naukri.com/\">Naukri</a></li>\n<li><a href=\"https://jobs.digitaloxford.com/\">Digital Oxford Jobs</a></li>\n<li><a href=\"https://css-tricks.com/jobs/\">CSS-Tricks Jobs</a></li>\n<li><a href=\"https://www.smashingmagazine.com/jobs/\">Smashing Magazine</a></li>\n<li><a href=\"https://www.totaljobs.com/\">Totaljobs</a></li>\n<li><a href=\"https://www.xing.com/jobs\">XING</a></li>\n<li><a href=\"https://codepen.io/jobs/\">Codepen Jobs</a></li>\n<li><a href=\"https://jobs.theguardian.com/jobs/\">The Guardian Jobs</a></li>\n<li><a href=\"https://www.jobsinnetwork.com/\">Jobs in Network</a></li>\n<li><a href=\"https://www.snagajob.com/\">snagajob</a></li>\n<li><a href=\"https://www.roberthalf.com/jobs\">Robert Half</a></li>\n<li><a href=\"https://www.higheredjobs.com/\">HigherEdJobs</a></li>\n<li><a href=\"https://www.mediabistro.com/\">Mediabistro</a></li>\n<li><a href=\"https://www.joblist.com/\">Joblist</a></li>\n<li><a href=\"https://www.workatastartup.com/job_list\">Workatastartup</a></li>\n<li><a href=\"https://enviro.work/\">enviro</a></li>\n<li><a href=\"https://www.f6s.com/jobs\">f6s</a></li>\n<li><a href=\"https://www.theladders.com/jobs/search-jobs\">Ladders</a></li>\n<li><a href=\"https://www.cleverism.com/jobs\">Cleverism</a></li>\n<li><a href=\"https://www.virtualvocations.com/\">VirtualVocations</a></li>\n<li><a href=\"https://jobs.mashable.com/\">Mashable</a></li>\n<li><a href=\"http://www.jobvertise.com/\">Jobvertise</a></li>\n<li><a href=\"https://equalopportunity.work/\">EqualOpportunity</a></li>\n<li><a href=\"https://jobs.cncf.io/\">CNCF Job Board</a></li>\n<li><a href=\"https://www.kdrrecruitment.com/jobs/\">KDR Recruitment</a></li>\n<li><a href=\"https://www.diversifytech.co/job-board/\">Diversify Tech</a></li>\n<li><a href=\"https://www.womenwhocode.com/jobs\">Women Who Code</a></li>\n<li><a href=\"https://hitmarker.net/jobs\">Hitmarker</a></li>\n<li><a href=\"https://careers.greatercph.com/gamedev\">Open GameDev Jobs</a></li>\n<li><a href=\"https://www.heygamer.co/\">Hey Gamer</a></li>\n<li><a href=\"https://jobs.prsa.org/\">PRSA Job Center</a></li>\n<li><a href=\"https://www.efinancialcareers.com/\">eFinancialCareers</a></li>\n<li><a href=\"https://uncubed.com/jobs\">Uncubed</a></li>\n<li><a href=\"https://healthecareers.com/\">Health eCareers</a></li>\n<li><a href=\"https://www.techfetch.com/\">TechFetch</a></li>\n<li><a href=\"https://launchafrica.io/\">LaunchAfrica</a></li>\n<li><a href=\"https://www.diversityjobs.com/\">DiversityJobs</a></li>\n<li><a href=\"https://www.clearancejobs.com/\">ClearanceJobs</a></li>\n<li><a href=\"https://itjobpro.com/\">IT Job Pro</a></li>\n<li><a href=\"https://the-dots.com/jobs/search\">The-Dots</a></li>\n<li><a href=\"https://www.campaignlive.co.uk/jobs/all/\">CampaignJobs</a></li>\n<li><a href=\"https://goodjobs.careers/\">GoodJobs</a>(Climate change, food insecurity)</li>\n<li><a href=\"https://techjobsforgood.com/\">Tech Jobs for Good</a></li>\n</ul>\n<h3>Entry Level</h3>\n<ul>\n<li><a href=\"https://www.entryleveljobs.me/\">Entry Level Jobs</a></li>\n<li><a href=\"https://www.collegerecruiter.com/\">College Recruiter</a></li>\n<li><a href=\"https://www.internships.com/\">Internships</a></li>\n<li><a href=\"https://www.jrdevjobs.com/\">Jr.DevJobs</a></li>\n<li><a href=\"https://graduateland.com/jobs\">Graduateland</a></li>\n<li><a href=\"https://talentegg.ca/\">TalentEgg</a></li>\n<li><a href=\"https://entrylevel.io/\">entrylevel.io</a></li>\n<li><a href=\"https://erasmusintern.org/traineeships\">ErasmusIntern</a></li>\n<li><a href=\"https://www.careerrookie.com/\">CareerRookie</a></li>\n<li><a href=\"https://www.aftercollege.com/\">AfterCollege</a></li>\n</ul>\n<h3>Startups</h3>\n<ul>\n<li><a href=\"https://startup.jobs/\">Startup Jobs</a></li>\n<li><a href=\"https://www.startupers.com/\">StartUpers</a></li>\n<li><a href=\"https://workinstartups.com/\">WorkinStartups</a></li>\n<li><a href=\"https://thehub.io/\">The Hub</a></li>\n<li><a href=\"https://unicornhunt.io/\">Unicorn Hunt</a></li>\n<li><a href=\"https://www.startuphire.com/\">StartupHire</a></li>\n</ul>\n<h3>United States</h3>\n<ul>\n<li><a href=\"https://www.dallasjobs.io/\">DallasJobs</a></li>\n<li><a href=\"https://us.jobs/\">US Jobs</a></li>\n<li><a href=\"https://www.careerjet.com/\">Careerjet</a></li>\n<li><a href=\"https://www.nexxt.com/\">Nexxt</a></li>\n<li><a href=\"https://usnlx.com/\">National Labor Exchange</a></li>\n</ul>\n<h3>Free &#x26; Open Source</h3>\n<ul>\n<li><a href=\"https://www.fossjobs.net/\">Free &#x26; Open Source Jobs</a></li>\n<li><a href=\"https://oo.t9t.io/jobs\">Open Source Jobs</a></li>\n<li><a href=\"https://www.linuxjobs.io/\">LinuxJobs.io</a></li>\n</ul>\n<h3>DevOps</h3>\n<ul>\n<li><a href=\"https://jobsfordevops.com\">Jobs For DevOps</a></li>\n<li><a href=\"https://kube.careers\">Kube Careers</a></li>\n</ul>\n<h3>Growth Hacking</h3>\n<ul>\n<li><a href=\"https://growthhackers.com/jobs\">GrowthHackers</a></li>\n</ul>"},{"url":"/docs/community/an-open-letter-2-future-developers/","relativePath":"docs/community/an-open-letter-2-future-developers.md","relativeDir":"docs/community","base":"an-open-letter-2-future-developers.md","name":"an-open-letter-2-future-developers","frontmatter":{"title":"New Developers","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>1. Why are frameworks useful?</h2>\n<p>Essentially the allure of these is the amount of time that is saved and the resulting efficiency in getting a project rolled out faster because there's a lot less of the initial work to be done.</p>\n<p>Frameworks take care of tasks like default browser settings, file structures, and layout templates for your website. This automation generates a uniform design for page elements like text, tables, forms, and buttons, amongst other things. Even complex navigation menus become standardized with frameworks as it can be consistently applied across your website with ease.</p>\n<h2>2. Types of framework</h2>\n<p>There are many different kinds of this platform available for programmers. Typically, like a lot of things within this discipline can be split between <a href=\"https://careerfoundry.com/en/blog/web-development/whats-the-difference-between-frontend-and-backend/\">frontend and backend development</a>---first let's make the distinction between the two to help you understand the usefulness of these solutions.</p>\n<h3>Backend frameworks</h3>\n<p>These are designed to make the responsibility of interacting with the database an easier endeavor for the developer. It automates a lot of functions and processes that web developers use to record and retrieve user-inputted data.</p>\n<h3>Frontend frameworks</h3>\n<p>As the name suggests, these are very helpful on the presentation side of the website, creating a good foundation from which to build pages. These frameworks combine HTML, CSS, and <a href=\"https://careerfoundry.com/en/blog/web-development/how-long-does-it-take-to-learn-javascript/\">Javascript</a> to be really effective in creating conventions for various elements. Typically frontend web developers use them in conjunction with <a href=\"https://careerfoundry.com/en/blog/web-development/7-essential-tools-for-front-end-development/\">other effective tools</a>.</p>\n<p><a href=\"https://careerfoundry.com/en/blog/web-development/what-is-html-a-beginners-guide/\">HTML</a> conventions allow for standardization for elements like typography, while <a href=\"https://careerfoundry.com/en/blog/web-development/what-is-css/\">CSS</a> conventions can help standardize positioning of elements in a grid-like system on the pages. This makes it easier for the developer to arrange and organize elements into a simple and uniform design across multiple displays and browsers. Javascript conventions offer the ability to style more advanced components like image carousels, lightboxes, button behaviors, and pop-ups.</p>\n<p>On another note, there are Javascript frameworks that focus on full application support---like AngularJS and Reactjs. Libraries of Javascript code like <a href=\"https://careerfoundry.com/en/blog/web-development/javascript-vs-jquery-whats-the-difference/\">jQuery</a> are also helpful in developing conventions that can be readily implemented in websites.</p>\n<p>To recap, the use of these tools helps the developer get up and running quickly without having to get bogged down with the initial hurdles that come with setting up a website. It creates uniform code across all pages of your website and presents a clean look for users. This in turn solves common issues like typography consistency and positioning difficulties on different pages.</p>\n<p>Best of all, frontend frameworks resolve any issues with browser compatibility and are key to responsive web design, which we'll discuss further on.</p>\n<h4>Curious about a career in Web Development?</h4>\n<p>Start learning for free!</p>\n<p><a href=\"https://careerfoundry.com/en/short-courses/become-a-web-developer/?popup-tracking=blog-inline-DEV\"><img src=\"https://careerfoundry.com/en/wp-content/uploads/2021/07/web-image@3x.jpg\"></a></p>\n<h2>3. Popular frameworks</h2>\n<p>There are many of these tools that have become must-haves for beginner and expert web developers alike. As well as different languages, they focus on different directives and outcomes.</p>\n<p>One of the most popular frameworks is <a href=\"https://careerfoundry.com/en/blog/web-development/what-is-bootstrap-a-beginners-guide/\">Bootstrap, which was originally developed by Twitter</a> to maintain consistency in their interface development. It's very polished and efficient, and makes website development easier and faster. It has standardized conventions that are well recognized for HTML elements like buttons, alerts, forms, and typography.</p>\n<p>So popular that it's now known simply as \"Rails,\" <a href=\"https://careerfoundry.com/en/blog/web-development/should-i-learn-ruby-on-rails/\">Ruby on Rails </a>has revolutionised this language. As well as making it one of the <a href=\"https://careerfoundry.com/en/blog/web-development/easiest-programming-languages/\">easier programming languages to learn</a>, Rails is particularly popular with beginners looking to code full-stack early on in their careers.</p>\n<p>Foundation was created from the Zurb style guide and much like Bootstrap, offers a complete solution for front-end design. Many large companies like Facebook, Yahoo, and Ebay utilize Foundation in their layouts. The framework encourages web developers to expand on the conventions and personalize them for developers' websites.</p>\n<p>Skeleton is a lighter example that doesn't come with all the bells and whistles that accompany the heavy-lifters like Bootstrap and Foundation. This encourages greater customization by only providing styling on the most basic and necessary elements. Developers who only need specific components to be styled utilize light-weight frameworks like Skeleton to achieve their goals.</p>\n<p>A simple Google search will turn up a lot of results for top tools being used and recommended. It's definitely beneficial to check out the different options and see which suits your development needs and design goals.</p>\n<h2>4. How do I use frameworks?</h2>\n<p>Regardless of whether a developer uses a full frontend framework like Bootstrap or a lightweight option like Skeleton, these are efficient tools that should be seriously considered in every developer's process.</p>\n<p>Recognized frameworks offer more ease in collaboration as developers can access the same libraries for design conventions without having to resort to individual opinionated decisions. Additionally, there is support from the specific community with tutorials and articles on how to effectively use it.</p>\n<p>The ease of implementation and efficiency makes it almost a necessity to employ these tools in a web developer's process. Any time a programmer is finding themselves creating an ever-growing proprietary list of CSS rules, it's probably a good idea to look into using a framework to tidy things up.</p>\n<h2>5. What is a responsive framework?</h2>\n<p>One of the best features of these systems is that they help create websites that are easily accessible and are able to be viewed across different browsers on different devices. A lot of frameworks accomplish this with dynamic code---utilizing classes that can be reused and formatted to take into consideration the device and/or browser that is being used.</p>\n<p>In other words, the layouts of webpages will change---certain elements will disappear and text will be smaller on smaller screens, while certain Javascript elements might not take effect at all. On larger screens, the extra real estate can be used to showcase higher quality images and more sophisticated design elements, as well as allowing for the white space beloved by web designers.</p>\n<p>In this current age when users are <a href=\"https://www.statista.com/statistics/277125/share-of-website-traffic-coming-from-mobile-devices/\">more likely to view websites on their mobile devices</a> than their computers, it's important to have a mobile responsive website that creates an enriching user experience no matter what interface the user interacts with. In this video, our in-house web developer Abhi explains more about styling a mobile-responsive website with CSS:</p>\n<h2>6. Final thoughts</h2>\n<p>Critics of frontend frameworks cite them as the source of a lot of cookie-cutter websites that are identical in appearance and interaction. This however, is an oversimplification. Why? Let's go back to the cooking example: a spatula is just a spatula---a lot of people have one and use the tool in the kitchen. But the food that is created will vary wildly across the spectrum, depending on the cook.</p>\n<p>In the same light, frontend frameworks are simply a tool that can be employed to create diverse and distinctive websites. Yes they're efficient, but it's up to the developer to make sure they're effective.</p>\n<p>If you want to learn some more about web development right now, these articles may interest you:</p>\n<ul>\n<li><a href=\"https://careerfoundry.com/en/blog/web-development/best-coding-bootcamps/\">A Guide To The Best Web Development Bootcamps And How To Choose One</a></li>\n<li><a href=\"https://careerfoundry.com/en/blog/web-development/in-demand-web-developer-skills/\">The Most In-Demand Web Developer Skills in 2021</a></li>\n<li><a href=\"https://careerfoundry.com/en/blog/web-development/5-latest-trends-in-web-development/\">5 Web Development Trends To Watch This Year</a></li>\n</ul>"},{"url":"/docs/audio/web-audio-api/","relativePath":"docs/audio/web-audio-api.md","relativeDir":"docs/audio","base":"web-audio-api.md","name":"web-audio-api","frontmatter":{"title":"Web Apis","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Web Audio Api</h2>\n<h1>Basic concepts behind Web Audio API</h1>\n<p>This article explains some of the audio theory behind how the features of the Web Audio API work, to help you make informed decisions while designing how audio is routed through your app.</p>\n<p>It won't turn you into a master sound engineer, but it will give you enough background to understand why the Web Audio API works like it does.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#audio_graphs\" title=\"Permalink to Audio graphs\">Audio graphs</a></h2>\n<p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API\">Web Audio API</a> involves handling audio operations inside an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\">audio context</a>, and has been designed to allow <strong>modular routing</strong>. Basic audio operations are performed with <strong>audio nodes</strong>, which are linked together to form an <strong>audio routing graph</strong>. Several sources --- with different types of channel layout --- are supported even within a single context. This modular design provides the flexibility to create complex audio functions with dynamic effects.</p>\n<p>Audio nodes are linked via their inputs and outputs, forming a chain that starts with one or more sources, goes through one or more nodes, then ends up at a destination. Although, you don't have to provide a destination if you, say, just want to visualize some audio data. A simple, typical workflow for web audio would look something like this:</p>\n<ol>\n<li>Create the audio context.</li>\n<li>Inside the context, create sources --- such as <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio\"><code>&#x3C;audio></code></a>, oscillator, or stream.</li>\n<li>Create effects nodes, such as reverb, biquad filter, panner, or compressor.</li>\n<li>Choose the final destination for the audio, such as the user's computer speakers.</li>\n<li>Establish connections from the audio sources through zero or more effects, eventually ending at the chosen destination.</li>\n</ol>\n<p><strong>Note:</strong> The number of audio channels available on a signal is frequently presented in a numeric format, such as 2.0 or 5.1. This is called <a href=\"https://en.wikipedia.org/wiki/Surround_sound#Channel_notation\" title=\"channel notation\">channel notation</a>. The first number is the number of full frequency range audio channels that the signal includes. The number after the period indicates the number of those channels which are reserved for low-frequency effect (LFE) outputs; these are often referred to as <strong>subwoofers</strong>.</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API/webaudioapi_en.svg\" alt=\"A simple box diagram with an outer box labeled Audio context, and three inner boxes labeled Sources, Effects and Destination. The three inner boxes have arrow between them pointing from left to right, indicating the flow of audio information.\"></p>\n<p>Each input or output is composed of one or more audio <strong>channels,</strong> which together represent a specific audio layout. Any discrete channel structure is supported, including <em>mono</em>, <em>stereo</em>, <em>quad</em>, <em>5.1</em>, and so on.</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API/mdn.png\" alt=\"Show the ability of AudioNodes to connect via their inputs and outputs and the channels inside these inputs/outputs.\"></p>\n<p>Audio sources can be obtained in a number of ways:</p>\n<ul>\n<li>Sound can be generated directly in JavaScript by an audio node (such as an oscillator).</li>\n<li>Created from raw PCM data (the audio context has methods to decode supported audio formats).</li>\n<li>Taken from HTML media elements (such as <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\"><code>&#x3C;video></code></a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio\"><code>&#x3C;audio></code></a>).</li>\n<li>Taken directly from a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API\">WebRTC</a> <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream\"><code>MediaStream</code></a> (such as a webcam or microphone).</li>\n</ul>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#audio_data_whats_in_a_sample\" title=\"Permalink to Audio data: what&#x27;s in a sample\">Audio data: what's in a sample</a></h2>\n<p>When an audio signal is processed, <strong>sampling</strong> means the conversion of a <a href=\"https://en.wikipedia.org/wiki/Continuous_signal\" title=\"Continuous signal\">continuous signal</a> to a <a href=\"https://en.wikipedia.org/wiki/Discrete_signal\" title=\"Discrete signal\">discrete signal</a>; or put another way, a continuous sound wave, such as a band playing live, is converted to a sequence of samples (a discrete-time signal) that allow a computer to handle the audio in distinct blocks.</p>\n<p>A lot more information can be found on the Wikipedia page <a href=\"https://en.wikipedia.org/wiki/Sampling_%28signal_processing%29\">Sampling (signal processing)</a>.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#audio_buffers_frames_samples_and_channels\" title=\"Permalink to Audio buffers: frames, samples and channels\">Audio buffers: frames, samples and channels</a></h2>\n<p>An <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer\"><code>AudioBuffer</code></a> takes as its parameters a number of channels (1 for mono, 2 for stereo, etc), a length, meaning the number of sample frames inside the buffer, and a sample rate, which is the number of sample frames played per second.</p>\n<p>A sample is a single float32 value that represents the value of the audio stream at each specific point in time, in a specific channel (left or right, if in the case of stereo). A frame, or sample frame, is the set of all values for all channels that will play at a specific point in time: all the samples of all the channels that play at the same time (two for a stereo sound, six for 5.1, etc.)</p>\n<p>The sample rate is the number of those samples (or frames, since all samples of a frame play at the same time) that will play in one second, measured in Hz. The higher the sample rate, the better the sound quality.</p>\n<p>Let's look at a Mono and a Stereo audio buffer, each is one second long, and playing at 44100Hz:</p>\n<ul>\n<li>The Mono buffer will have 44100 samples, and 44100 frames. The <code>length</code> property will be 44100.</li>\n<li>The Stereo buffer will have 88200 samples, but still 44100 frames. The <code>length</code> property will still be 44100 since it's equal to the number of frames.</li>\n</ul>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API/sampleframe-english.png\" alt=\"A diagram showing several frames in an audio buffer in a long line, each one containing two samples, as the buffer has two channels, it is stereo.\"></p>\n<p>When a buffer plays, you will hear the left most sample frame, and then the one right next to it, etc. In the case of stereo, you will hear both channels at the same time. Sample frames are very useful, because they are independent of the number of channels, and represent time, in a useful way for doing precise audio manipulation.</p>\n<p><strong>Note:</strong> To get a time in seconds from a frame count, divide the number of frames by the sample rate. To get a number of frames from a number of samples, divide by the channel count.</p>\n<p>Here's a couple of simple examples:</p>\n<pre><code>var context = new AudioContext();\nvar buffer = context.createBuffer(2, 22050, 44100);\n</code></pre>\n<p><strong>Note:</strong> In <a href=\"https://en.wikipedia.org/wiki/Digital_audio\" title=\"Digital audio\">digital audio</a>, <strong>44,100 <a href=\"https://en.wikipedia.org/wiki/Hertz\">Hz</a></strong> (alternately represented as <strong>44.1 kHz</strong>) is a common <a href=\"https://en.wikipedia.org/wiki/Sampling_frequency\" title=\"Sampling frequency\">sampling frequency</a>. Why 44.1kHz?</p>\n<p>Firstly, because the <a href=\"https://en.wikipedia.org/wiki/Hearing_range\" title=\"Hearing range\">hearing range</a> of human ears is roughly 20 Hz to 20,000 Hz. Via the <a href=\"https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem\" title=\"Nyquist--Shannon sampling theorem\">Nyquist--Shannon sampling theorem</a>, the sampling frequency must be greater than twice the maximum frequency one wishes to reproduce. Therefore, the sampling rate has to be greater than 40 kHz.</p>\n<p>Secondly, signals must be <a href=\"https://en.wikipedia.org/wiki/Low-pass_filter\" title=\"Low-pass filter\">low-pass filtered</a> before sampling, otherwise <a href=\"https://en.wikipedia.org/wiki/Aliasing\">aliasing</a> occurs. While an ideal low-pass filter would perfectly pass frequencies below 20 kHz (without attenuating them) and perfectly cut off frequencies above 20 kHz, in practice a <a href=\"https://en.wikipedia.org/wiki/Transition_band\" title=\"Transition band\">transition band</a> is necessary, where frequencies are partly attenuated. The wider this transition band is, the easier and more economical it is to make an <a href=\"https://en.wikipedia.org/wiki/Anti-aliasing_filter\" title=\"Anti-aliasing filter\">anti-aliasing filter</a>. The 44.1 kHz sampling frequency allows for a 2.05 kHz transition band.</p>\n<p>If you use this call above, you will get a stereo buffer with two channels, that when played back on an AudioContext running at 44100Hz (very common, most normal sound cards run at this rate), will last for 0.5 seconds: 22050 frames/44100Hz = 0.5 seconds.</p>\n<pre><code>var context = new AudioContext();\nvar buffer = context.createBuffer(1, 22050, 22050);\n</code></pre>\n<p>If you use this call, you will get a mono buffer with just one channel), that when played back on an AudioContext running at 44100Hz, will be automatically <em>resampled</em> to 44100Hz (and therefore yield 44100 frames), and last for 1.0 second: 44100 frames/44100Hz = 1 second.</p>\n<p><strong>Note:</strong> Audio resampling is very similar to image resizing. Say you've got a 16 x 16 image, but you want it to fill a 32x32 area. You resize (or resample) it. The result has less quality (it can be blurry or edgy, depending on the resizing algorithm), but it works, with the resized image taking up less space. Resampled audio is exactly the same: you save space, but in practice you will be unable to properly reproduce high frequency content, or treble sound.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#planar_versus_interleaved_buffers\" title=\"Permalink to Planar versus interleaved buffers\">Planar versus interleaved buffers</a></h3>\n<p>The Web Audio API uses a planar buffer format. The left and right channels are stored like this:</p>\n<p>LLLLLLLLLLLLLLLLRRRRRRRRRRRRRRRR (for a buffer of 16 frames)</p>\n<p>This is very common in audio processing: it makes it easy to process each channel independently.</p>\n<p>The alternative is to use an interleaved buffer format:</p>\n<p>LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR (for a buffer of 16 frames)</p>\n<p>This format is very common for storing and playing back audio without much processing, for example a decoded MP3 stream.</p>\n<p>The Web Audio API exposes <strong>only</strong> planar buffers, because it's made for processing. It works with planar, but converts the audio to interleaved when it is sent to the sound card for playback. Conversely, when an MP3 is decoded, it starts off in interleaved format, but is converted to planar for processing.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#audio_channels\" title=\"Permalink to Audio channels\">Audio channels</a></h2>\n<p>Different audio buffers contain different numbers of channels: from the more basic mono (only one channel) and stereo (left and right channels), to more complex sets like quad and 5.1, which have different sound samples contained in each channel, leading to a richer sound experience. The channels are usually represented by standard abbreviations detailed in the table below:</p>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Channels</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><em>Mono</em></td>\n<td><code>0: M: mono</code></td>\n</tr>\n<tr>\n<td><em>Stereo</em></td>\n<td><code>0: L: left 1: R: right</code></td>\n</tr>\n<tr>\n<td><em>Quad</em></td>\n<td><code>0: L: left 1: R: right 2: SL: surround left 3: SR: surround right</code></td>\n</tr>\n<tr>\n<td><em>5.1</em></td>\n<td><code>0: L: left 1: R: right 2: C: center 3: LFE: subwoofer 4: SL: surround left 5: SR: surround right</code></td>\n</tr>\n</tbody>\n</table>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\" title=\"Permalink to Up-mixing and down-mixing\">Up-mixing and down-mixing</a></h3>\n<p>When the number of channels doesn't match between an input and an output, up- or down-mixing happens according the following rules. This can be somewhat controlled by setting the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelInterpretation\"><code>AudioNode.channelInterpretation</code></a> property to <code>speakers</code> or <code>discrete</code>:</p>\n<h1>Web Audio API</h1>\n<p>The Web Audio API provides a powerful and versatile system for controlling audio on the Web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#web_audio_concepts_and_usage\" title=\"Permalink to Web audio concepts and usage\">Web audio concepts and usage</a></h2>\n<p>The Web Audio API involves handling audio operations inside an <strong>audio context</strong>, and has been designed to allow <strong>modular routing</strong>. Basic audio operations are performed with <strong>audio nodes</strong>, which are linked together to form an <strong>audio routing graph</strong>. Several sources --- with different types of channel layout --- are supported even within a single context. This modular design provides the flexibility to create complex audio functions with dynamic effects.</p>\n<p>Audio nodes are linked into chains and simple webs by their inputs and outputs. They typically start with one or more sources. Sources provide arrays of sound intensities (samples) at very small timeslices, often tens of thousands of them per second. These could be either computed mathematically (such as <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode\"><code>OscillatorNode</code></a>), or they can be recordings from sound/video files (like <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode\"><code>AudioBufferSourceNode</code></a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaElementAudioSourceNode\"><code>MediaElementAudioSourceNode</code></a>) and audio streams (<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a>). In fact, sound files are just recordings of sound intensities themselves, which come in from microphones or electric instruments, and get mixed down into a single, complicated wave.</p>\n<p>Outputs of these nodes could be linked to inputs of others, which mix or modify these streams of sound samples into different streams. A common modification is multiplying the samples by a value to make them louder or quieter (as is the case with <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GainNode\"><code>GainNode</code></a>). Once the sound has been sufficiently processed for the intended effect, it can be linked to the input of a destination (<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/destination\"><code>BaseAudioContext.destination</code></a>), which sends the sound to the speakers or headphones. This last connection is only necessary if the user is supposed to hear the audio.</p>\n<p>A simple, typical workflow for web audio would look something like this:</p>\n<ol>\n<li>Create audio context</li>\n<li>Inside the context, create sources --- such as <code>&#x3C;audio></code>, oscillator, stream</li>\n<li>Create effects nodes, such as reverb, biquad filter, panner, compressor</li>\n<li>Choose final destination of audio, for example your system speakers</li>\n<li>Connect the sources up to the effects, and the effects to the destination.</li>\n</ol>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/audio-context_.png\" alt=\"A simple box diagram with an outer box labeled Audio context, and three inner boxes labeled Sources, Effects and Destination. The three inner boxes have arrows between them pointing from left to right, indicating the flow of audio information.\"></p>\n<p>Timing is controlled with high precision and low latency, allowing developers to write code that responds accurately to events and is able to target specific samples, even at a high sample rate. So applications such as drum machines and sequencers are well within reach.</p>\n<p>The Web Audio API also allows us to control how audio is <em>spatialized</em>. Using a system based on a <em>source-listener model</em>, it allows control of the <em>panning model</em> and deals with <em>distance-induced attenuation</em> induced by a moving source (or moving listener).</p>\n<p><strong>Note:</strong> You can read about the theory of the Web Audio API in a lot more detail in our article <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API\">Basic concepts behind Web Audio API</a>.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#web_audio_api_target_audience\" title=\"Permalink to Web Audio API target audience\">Web Audio API target audience</a></h2>\n<p>The Web Audio API can seem intimidating to those that aren't familiar with audio or music terms, and as it incorporates a great deal of functionality it can prove difficult to get started if you are a developer.</p>\n<p>It can be used to incorporate audio into your website or application, by <a href=\"https://www.futurelibrary.no/\">providing atmosphere like futurelibrary.no</a>, or <a href=\"https://css-tricks.com/form-validation-web-audio/\">auditory feedback on forms</a>. However, it can also be used to create <em>advanced</em> interactive instruments. With that in mind, it is suitable for both developers and musicians alike.</p>\n<p>We have a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API\">simple introductory tutorial</a> for those that are familiar with programming but need a good introduction to some of the terms and structure of the API.</p>\n<p>There's also a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API\">Basic Concepts Behind Web Audio API</a> article, to help you understand the way digital audio works, specifically in the realm of the API. This also includes a good introduction to some of the concepts the API is built upon.</p>\n<p>Learning coding is like playing cards --- you learn the rules, then you play, then you go back and learn the rules again, then you play again. So if some of the theory doesn't quite fit after the first tutorial and article, there's an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Advanced_techniques\">advanced tutorial</a> which extends the first one to help you practice what you've learnt, and apply some more advanced techniques to build up a step sequencer.</p>\n<p>We also have other tutorials and comprehensive reference material available that covers all features of the API. See the sidebar on this page for more.</p>\n<p>If you are more familiar with the musical side of things, are familiar with music theory concepts, want to start building instruments, then you can go ahead and start building things with the advanced tutorial and others as a guide (the above-linked tutorial covers scheduling notes, creating bespoke oscillators and envelopes, as well as an LFO among other things.)</p>\n<p>If you aren't familiar with the programming basics, you might want to consult some beginner's JavaScript tutorials first and then come back here --- see our <a href=\"https://developer.mozilla.org/en-US/docs/Learn/JavaScript\">Beginner's JavaScript learning module</a> for a great place to begin.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#web_audio_api_interfaces\" title=\"Permalink to Web Audio API interfaces\">Web Audio API interfaces</a></h2>\n<p>The Web Audio API has a number of interfaces and associated events, which we have split up into nine categories of functionality.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#general_audio_graph_definition\" title=\"Permalink to General audio graph definition\">General audio graph definition</a></h3>\n<p>General containers and definitions that shape audio graphs in Web Audio API usage.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\"><code>AudioContext</code></a></p>\n<p>The <strong><code>AudioContext</code></strong> interface represents an audio-processing graph built from audio modules linked together, each represented by an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a>. An audio context controls the creation of the nodes it contains and the execution of the audio processing, or decoding. You need to create an <code>AudioContext</code> before you do anything else, as everything happens inside a context.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a></p>\n<p>The <strong><code>AudioNode</code></strong> interface represents an audio-processing module like an <em>audio source</em> (e.g. an HTML <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio\"><code>&#x3C;audio></code></a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\"><code>&#x3C;video></code></a> element), <em>audio destination</em>, <em>intermediate processing module</em> (e.g. a filter like <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\"><code>BiquadFilterNode</code></a>, or <em>volume control</em> like <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GainNode\"><code>GainNode</code></a>).</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioParam\"><code>AudioParam</code></a></p>\n<p>The <strong><code>AudioParam</code></strong> interface represents an audio-related parameter, like one of an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a>. It can be set to a specific value or a change in value, and can be scheduled to happen at a specific time and following a specific pattern.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioParamMap\"><code>AudioParamMap</code></a></p>\n<p>Provides a maplike interface to a group of <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioParam\"><code>AudioParam</code></a> interfaces, which means it provides the methods <code>forEach()</code>, <code>get()</code>, <code>has()</code>, <code>keys()</code>, and <code>values()</code>, as well as a <code>size</code> property.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext\"><code>BaseAudioContext</code></a></p>\n<p>The <strong><code>BaseAudioContext</code></strong> interface acts as a base definition for online and offline audio-processing graphs, as represented by <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\"><code>AudioContext</code></a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> respectively. You wouldn't use <code>BaseAudioContext</code> directly --- you'd use its features via one of these two inheriting interfaces.</p>\n<p>The <code>[ended](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event \"/en-US/docs/Web/Events/ended\")</code> event</p>\n<p>The <code>ended</code> event is fired when playback has stopped because the end of the media was reached.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#defining_audio_sources\" title=\"Permalink to Defining audio sources\">Defining audio sources</a></h3>\n<p>Interfaces that define audio sources for use in the Web Audio API.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode\"><code>AudioScheduledSourceNode</code></a></p>\n<p>The <strong><code>AudioScheduledSourceNode</code></strong> is a parent interface for several types of audio source node interfaces. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode\"><code>OscillatorNode</code></a></p>\n<p>The <strong><code>OscillatorNode</code></strong> interface represents a periodic waveform, such as a sine or triangle wave. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> audio-processing module that causes a given <em>frequency</em> of wave to be created.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer\"><code>AudioBuffer</code></a></p>\n<p>The <strong><code>AudioBuffer</code></strong> interface represents a short audio asset residing in memory, created from an audio file using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/decodeAudioData\"><code>BaseAudioContext.decodeAudioData</code></a> method, or created with raw data using <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBuffer\"><code>BaseAudioContext.createBuffer</code></a>. Once decoded into this form, the audio can then be put into an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode\"><code>AudioBufferSourceNode</code></a>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode\"><code>AudioBufferSourceNode</code></a></p>\n<p>The <strong><code>AudioBufferSourceNode</code></strong> interface represents an audio source consisting of in-memory audio data, stored in an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer\"><code>AudioBuffer</code></a>. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that acts as an audio source.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaElementAudioSourceNode\"><code>MediaElementAudioSourceNode</code></a></p>\n<p>The <strong><code>MediaElementAudioSourceNode</code></strong> interface represents an audio source consisting of an HTML5 <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio\"><code>&#x3C;audio></code></a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\"><code>&#x3C;video></code></a> element. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that acts as an audio source.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a></p>\n<p>The <strong><code>MediaStreamAudioSourceNode</code></strong> interface represents an audio source consisting of a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream\"><code>MediaStream</code></a> (such as a webcam, microphone, or a stream being sent from a remote computer). If multiple audio tracks are present on the stream, the track whose <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/id\" title=\"id\"><code>id</code></a> comes first lexicographically (alphabetically) is used. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that acts as an audio source.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackAudioSourceNode\"><code>MediaStreamTrackAudioSourceNode</code></a></p>\n<p>A node of type <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackAudioSourceNode\"><code>MediaStreamTrackAudioSourceNode</code></a> represents an audio source whose data comes from a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>. When creating the node using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamTrackSource\" title=\"createMediaStreamTrackSource()\"><code>createMediaStreamTrackSource()</code></a> method to create the node, you specify which track to use. This provides more control than <code>MediaStreamAudioSourceNode</code>.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#defining_audio_effects_filters\" title=\"Permalink to Defining audio effects filters\">Defining audio effects filters</a></h3>\n<p>Interfaces for defining effects that you want to apply to your audio sources.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\"><code>BiquadFilterNode</code></a></p>\n<p>The <strong><code>BiquadFilterNode</code></strong> interface represents a simple low-order filter. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that can represent different kinds of filters, tone control devices, or graphic equalizers. A <code>BiquadFilterNode</code> always has exactly one input and one output.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode\"><code>ConvolverNode</code></a></p>\n<p>The <strong><code>ConvolverNode</code></strong> interface is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that performs a Linear Convolution on a given <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer\"><code>AudioBuffer</code></a>, and is often used to achieve a reverb effect.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DelayNode\"><code>DelayNode</code></a></p>\n<p>The <strong><code>DelayNode</code></strong> interface represents a <a href=\"https://en.wikipedia.org/wiki/Digital_delay_line\">delay-line</a>; an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> audio-processing module that causes a delay between the arrival of an input data and its propagation to the output.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode\"><code>DynamicsCompressorNode</code></a></p>\n<p>The <strong><code>DynamicsCompressorNode</code></strong> interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GainNode\"><code>GainNode</code></a></p>\n<p>The <strong><code>GainNode</code></strong> interface represents a change in volume. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> audio-processing module that causes a given <em>gain</em> to be applied to the input data before its propagation to the output.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode\"><code>WaveShaperNode</code></a></p>\n<p>The <strong><code>WaveShaperNode</code></strong> interface represents a non-linear distorter. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that use a curve to apply a waveshaping distortion to the signal. Beside obvious distortion effects, it is often used to add a warm feeling to the signal.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PeriodicWave\"><code>PeriodicWave</code></a></p>\n<p>Describes a periodic waveform that can be used to shape the output of an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode\"><code>OscillatorNode</code></a>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IIRFilterNode\"><code>IIRFilterNode</code></a></p>\n<p>Implements a general <strong><a href=\"https://en.wikipedia.org/wiki/infinite%20impulse%20response\" title=\"infinite impulse response\">infinite impulse response</a></strong> (IIR)  filter; this type of filter can be used to implement tone control devices and graphic equalizers as well.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#defining_audio_destinations\" title=\"Permalink to Defining audio destinations\">Defining audio destinations</a></h3>\n<p>Once you are done processing your audio, these interfaces define where to output it.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode\"><code>AudioDestinationNode</code></a></p>\n<p>The <strong><code>AudioDestinationNode</code></strong> interface represents the end destination of an audio source in a given context --- usually the speakers of your device.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioDestinationNode\"><code>MediaStreamAudioDestinationNode</code></a></p>\n<p>The <strong><code>MediaStreamAudioDestinationNode</code></strong> interface represents an audio destination consisting of a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API\">WebRTC</a> <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream\"><code>MediaStream</code></a> with a single <code>AudioMediaStreamTrack</code>, which can be used in a similar way to a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream\"><code>MediaStream</code></a> obtained from <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\" title=\"getUserMedia()\"><code>getUserMedia()</code></a>. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that acts as an audio destination.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#data_analysis_and_visualization\" title=\"Permalink to Data analysis and visualization\">Data analysis and visualization</a></h3>\n<p>If you want to extract time, frequency, and other data from your audio, the <code>AnalyserNode</code> is what you need.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode\"><code>AnalyserNode</code></a></p>\n<p>The <strong><code>AnalyserNode</code></strong> interface represents a node able to provide real-time frequency and time-domain analysis information, for the purposes of data analysis and visualization.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#splitting_and_merging_audio_channels\" title=\"Permalink to Splitting and merging audio channels\">Splitting and merging audio channels</a></h3>\n<p>To split and merge audio channels, you'll use these interfaces.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ChannelSplitterNode\"><code>ChannelSplitterNode</code></a></p>\n<p>The <strong><code>ChannelSplitterNode</code></strong> interface separates the different channels of an audio source out into a set of <em>mono</em> outputs.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ChannelMergerNode\"><code>ChannelMergerNode</code></a></p>\n<p>The <strong><code>ChannelMergerNode</code></strong> interface reunites different mono inputs into a single output. Each input will be used to fill a channel of the output.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#audio_spatialization\" title=\"Permalink to Audio spatialization\">Audio spatialization</a></h3>\n<p>These interfaces allow you to add audio spatialization panning effects to your audio sources.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioListener\"><code>AudioListener</code></a></p>\n<p>The <strong><code>AudioListener</code></strong> interface represents the position and orientation of the unique person listening to the audio scene used in audio spatialization.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PannerNode\"><code>PannerNode</code></a></p>\n<p>The <strong><code>PannerNode</code></strong> interface represents the position and behavior of an audio source signal in 3D space, allowing you to create complex panning effects.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StereoPannerNode\"><code>StereoPannerNode</code></a></p>\n<p>The <strong><code>StereoPannerNode</code></strong> interface represents a simple stereo panner node that can be used to pan an audio stream left or right.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#audio_processing_in_javascript\" title=\"Permalink to Audio processing in JavaScript\">Audio processing in JavaScript</a></h3>\n<p>Using audio worklets, you can define custom audio nodes written in JavaScript or <a href=\"https://developer.mozilla.org/en-US/docs/WebAssembly\">WebAssembly</a>. Audio worklets implement the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Worklet\"><code>Worklet</code></a> interface, a lightweight version of the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Worker\"><code>Worker</code></a> interface.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet\"><code>AudioWorklet</code></a></p>\n<p>The <code>AudioWorklet</code> interface is available through the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\"><code>AudioContext</code></a> object's <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/audioWorklet\" title=\"audioWorklet\"><code>audioWorklet</code></a>, and lets you add modules to the audio worklet to be executed off the main thread.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode\"><code>AudioWorkletNode</code></a></p>\n<p>The <code>AudioWorkletNode</code> interface represents an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> that is embedded into an audio graph and can pass messages to the corresponding <code>AudioWorkletProcessor</code>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor\"><code>AudioWorkletProcessor</code></a></p>\n<p>The <code>AudioWorkletProcessor</code> interface represents audio processing code running in a <code>AudioWorkletGlobalScope</code> that generates, processes, or analyses audio directly, and can pass messages to the corresponding <code>AudioWorkletNode</code>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope\"><code>AudioWorkletGlobalScope</code></a></p>\n<p>The <code>AudioWorkletGlobalScope</code> interface is a <code>WorkletGlobalScope</code>-derived object representing a worker context in which an audio processing script is run; it is designed to enable the generation, processing, and analysis of audio data directly using JavaScript in a worklet thread rather than on the main thread.</p>\n<h4>Obsolete: script processor nodes</h4>\n<p>Before audio worklets were defined, the Web Audio API used the <code>ScriptProcessorNode</code>  for JavaScript-based audio processing. Because the code runs in the main thread, they have bad performance. The <code>ScriptProcessorNode</code> is kept for historic reasons but is marked as deprecated.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode\"><code>ScriptProcessorNode</code></a></p>\n<p>The <strong><code>ScriptProcessorNode</code></strong> interface allows the generation, processing, or analyzing of audio using JavaScript. It is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a> audio-processing module that is linked to two buffers, one containing the current input, one containing the output. An event, implementing the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent\"><code>AudioProcessingEvent</code></a> interface, is sent to the object each time the input buffer contains new data, and the event handler terminates when it has filled the output buffer with data.</p>\n<p><code>[audioprocess](https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode/audioprocess_event \"/en-US/docs/Web/Events/audioprocess\")</code> (event)</p>\n<p>The <code>audioprocess</code> event is fired when an input buffer of a Web Audio API <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode\"><code>ScriptProcessorNode</code></a> is ready to be processed.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent\"><code>AudioProcessingEvent</code></a></p>\n<p>The <code>AudioProcessingEvent</code> represents events that occur when a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode\"><code>ScriptProcessorNode</code></a> input buffer is ready to be processed.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#offlinebackground_audio_processing\" title=\"Permalink to Offline/background audio processing\">Offline/background audio processing</a></h3>\n<p>It is possible to process/render an audio graph very quickly in the background --- rendering it to an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer\"><code>AudioBuffer</code></a> rather than to the device's speakers --- with the following.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a></p>\n<p>The <strong><code>OfflineAudioContext</code></strong> interface is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\"><code>AudioContext</code></a> interface representing an audio-processing graph built from linked together <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a>s. In contrast with a standard <code>AudioContext</code>, an <code>OfflineAudioContext</code> doesn't really render the audio but rather generates it, <em>as fast as it can</em>, in a buffer.</p>\n<p><code>[complete](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/complete_event \"/en-US/docs/Web/Events/complete\")</code> (event)</p>\n<p>The <code>complete</code> event is fired when the rendering of an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> is terminated.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioCompletionEvent\"><code>OfflineAudioCompletionEvent</code></a></p>\n<p>The <code>OfflineAudioCompletionEvent</code> represents events that occur when the processing of an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> is terminated. The <code>[complete](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/complete_event \"/en-US/docs/Web/Events/complete\")</code> event uses this interface.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#guides_and_tutorials\" title=\"Permalink to Guides and tutorials\">Guides and tutorials</a></h2>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Advanced_techniques\">Advanced techniques: Creating and sequencing audio</a></p>\n<p>In this tutorial, we're going to cover sound creation and modification, as well as timing and scheduling. We're going to introduce sample loading, envelopes, filters, wavetables, and frequency modulation. If you're familiar with these terms and you're looking for an introduction to their application within with the Web Audio API, you've come to the right place.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_AudioWorklet\">Background audio processing using AudioWorklet</a></p>\n<p>This article explains how to create an audio worklet processor and use it in a Web Audio application.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API\">Basic concepts behind Web Audio API</a></p>\n<p>This article explains some of the audio theory behind how the features of the Web Audio API work, to help you make informed decisions while designing how audio is routed through your app.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Controlling_multiple_parameters_with_ConstantSourceNode\">Controlling multiple parameters with ConstantSourceNode</a></p>\n<p>This article demonstrates how to use a <code>ConstantSourceNode</code> to link multiple parameters together so they share the same value, which can be changed by setting the value of the <code>ConstantSourceNode.offset</code> parameter.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Simple_synth\">Example and tutorial: Simple synth keyboard</a></p>\n<p>This article presents the code and working demo of a video keyboard you can play using the mouse. The keyboard allows you to switch among the standard waveforms as well as one custom waveform, and you can control the main gain using a volume slider beneath the keyboard. This example makes use of the following Web API interfaces: <code>AudioContext</code>, <code>OscillatorNode</code>, <code>PeriodicWave</code>, and <code>GainNode</code>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Migrating_from_webkitAudioContext\">Migrating from webkitAudioContext</a></p>\n<p>In this article, we cover the differences in Web Audio API since it was first implemented in WebKit and how to update your code to use the modern Web Audio API.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Tools\">Tools for analyzing Web Audio usage</a></p>\n<p>While working on your Web Audio API code, you may find that you need tools to analyze the graph of nodes you create or to otherwise debug your work. This article discusses tools available to help you do that.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_IIR_filters\">Using IIR filters</a></p>\n<p>The <strong><code>IIRFilterNode</code></strong> interface of the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API\">Web Audio API</a> is an <code>AudioNode</code> processor that implements a general <a href=\"https://en.wikipedia.org/wiki/infinite%20impulse%20response\">infinite impulse response</a> (IIR) filter; this type of filter can be used to implement tone control devices and graphic equalizers, and the filter response parameters can be specified, so that it can be tuned as needed. This article looks at how to implement one, and use it in a simple example.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API\">Using the Web Audio API</a></p>\n<p>Let's take a look at getting started with the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API\">Web Audio API</a>. We'll briefly look at some concepts, then study a simple boombox example that allows us to load an audio track, play and pause it, and change its volume and stereo panning.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Visualizations_with_Web_Audio_API\">Visualizations with Web Audio API</a></p>\n<p>One of the most interesting features of the Web Audio API is the ability to extract frequency, waveform, and other data from your audio source, which can then be used to create visualizations. This article explains how, and provides a couple of basic use cases.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Best_practices\">Web Audio API best practices</a></p>\n<p>There's no strict right or wrong way when writing creative code. As long as you consider security, performance, and accessibility, you can adapt to your own style. In this article, we'll share a number of <em>best practices</em> --- guidelines, tips, and tricks for working with the Web Audio API.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics\">Web audio spatialization basics</a></p>\n<p>As if its extensive variety of sound processing (and other) options wasn't enough, the Web Audio API also includes facilities to allow you to emulate the difference in sound as a listener moves around a sound source, for example panning as you move around a sound source inside a 3D game. The official term for this is <strong>spatialization</strong>, and this article will cover the basics of how to implement such a system.</p>"},{"url":"/docs/community/","relativePath":"docs/community/index.md","relativeDir":"docs/community","base":"index.md","name":"index","frontmatter":{"title":"Community","excerpt":"We'd love it if you participate in the Libris community. Find out how to get connected.","seo":{"title":"Connect ","description":"This is the community page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Where To Get Support","keyName":"property"},{"name":"og:description","value":"This is the community page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Where To Get Support"},{"name":"twitter:description","value":"This is the community page"}]},"template":"docs"},"html":"<div align=\"center\">\n<iframe\n                                                src=\"https://bgoonz.github.io/fb-and-twitter-api-embeds/\"\n                                                frameborder=\"0\"\n                                                id=\"social-embed\"\n                                                width=\"100%!important\"\n                                            ></iframe>\n## ➤ Connect with me:\n<p align=\"center\">\n  <a href=\"mailto:bryan.guner@gmail.com\"><img src=\"https://img.icons8.com/color/96/000000/gmail.png\" alt=\"email\"/></a><a href=\"https://www.facebook.com/bryan.guner/\"><img src=\"https://img.icons8.com/color/96/000000/facebook.png\" alt=\"facebook\"/></a><a href=\"https://twitter.com/bgooonz\"><img src=\"https://img.icons8.com/color/96/000000/twitter-squared.png\" alt=\"twitter\"/></a><a href=\"https://www.youtube.com/channel/UC9-rYyUMsnEBK8G8fCyrXXA/videos\"><img src=\"https://img.icons8.com/color/96/000000/youtube.png\" alt=\"youtube\"/></a><a href=\"https://www.instagram.com/bgoonz/?hl=en\"><img src=\"https://img.icons8.com/color/96/000000/instagram-new.png\" alt=\"instagram\"/></a><a href=\"https://www.pinterest.com/bryanguner/_saved/\"><img src=\"https://img.icons8.com/color/96/000000/pinterest--v1.png\" alt=\"pinterest\"/></a><a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\"><img src=\"https://img.icons8.com/color/96/000000/linkedin.png\" alt=\"linkedin\"/></a>\n  <a href=\"https://bryanguner.medium.com/\"><img src=\"https://img.icons8.com/color/96/000000/medium-logo.png\" alt=\"medium\"/></a><a href=\"https://open.spotify.com/user/bgoonz?si=ShH9wYbIQWab5Jz_30BKFw\"><img src=\"https://img.icons8.com/color/96/000000/spotify--v1.png\" alt=\"spotify\"/></a>\n  </p>\n</div>\n<div align=\"center\">\n<table>\n<thead>\n<tr>\n<th><a href=\"https://github.com/bgoonz\">GitHub</a></th>\n<th><a href=\"https://gitlab.com/bryan.guner.dev\">Gitlab</a></th>\n<th><a href=\"https://bitbucket.org/bgoonz/\">Bitbucket</a></th>\n<th><a href=\"https://bryanguner.medium.com/\">Medium</a></th>\n<th><a href=\"https://codepen.io/bgoonz\">code pen</a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"https://repl.it/@bgoonz/\">Replit</a></td>\n<td><a href=\"https://www.quora.com/q/webdevresourcehub?invite_code=qwZOqbpAhgQ6hjjGl8NN\">Quora</a></td>\n<td><a href=\"https://www.reddit.com/user/bgoonz1\">Redit</a></td>\n<td><a href=\"https://webcomponents.dev/user/bgoonz\">webcomponents.dev</a></td>\n<td><a href=\"https://dev.to/bgoonz\">dev.to</a></td>\n</tr>\n<tr>\n<td><a href=\"https://runkit.com/bgoonz\">runkit</a></td>\n<td><a href=\"https://observablehq.com/@bgoonz?tab=profile\">Observable Notebooks</a></td>\n<td><a href=\"https://www.npmjs.com/~bgoonz11\">npm</a></td>\n<td><a href=\"https://meta.stackexchange.com/users/936785/bryan-guner\">stack-exchange</a></td>\n<td><a href=\"https://observablehq.com/@bgoonz?tab=profile\">Observable Notebooks</a></td>\n</tr>\n<tr>\n<td><a href=\"https://www.upwork.com/freelancers/~01bb1a3627e1e9c630?viewMode=1&#x26;s=1110580755057594368\">Upwork</a></td>\n<td><a href=\"https://www.notion.so/Overview-Of-Css-5d88b0bc9a73422a9be1481d599a56ba\">Notion</a></td>\n<td><a href=\"https://angel.co/u/bryan-guner\">AngelList</a></td>\n<td><a href=\"https://stackshare.io/bryanguner\">StackShare</a></td>\n<td><a href=\"http://plnkr.co/account/plunks\">Plunk</a></td>\n</tr>\n<tr>\n<td><a href=\"https://giphy.com/channel/bryanguner\">giphy</a></td>\n<td><a href=\"https://ko-fi.com/bgoonz\">kofi</a></td>\n<td><a href=\"https://www.codewars.com/users/bgoonz\">Codewars</a></td>\n<td><a href=\"https://dribbble.com/bgoonz4242?onboarding=true\">Dribble</a></td>\n<td><a href=\"https://glitch.com/@bgoonz\">Glitch</a></td>\n</tr>\n<tr>\n<td><a href=\"https://app.contentful.com/spaces/lelpu0ihaz11/assets?id=MocOPmmNliLn6PPv\">contentful</a></td>\n<td><a href=\"https://app.netlify.com/user/settings#profile\">Netlify</a></td>\n<td><a href=\"https://stackblitz.com/@bgoonz\">Stackblitz</a></td>\n<td><a href=\"https://vercel.com/bgoonz\">Vercel</a></td>\n<td><a href=\"https://www.youtube.com/channel/UC9-rYyUMsnEBK8G8fCyrXXA/featured\">Youtube</a></td>\n</tr>\n<tr>\n<td><a href=\"https://web-dev-hub.com/\">wordpress</a></td>\n<td><a href=\"https://edabit.com/user/dsRcx6yCwAgYwZbRB\">Edabit</a></td>\n<td><a href=\"https://vimeo.com/user128661018\">Vinmeo</a></td>\n<td><a href=\"https://jsfiddle.net/user/bgoonz/\">js fiddle</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://developers.google.com/profile/u/100803355943326309646?utm_source=developers.google.com\">Google Developer Profile</a></td>\n<td><a href=\"https://gitee.com/bgoonz\">Gittee</a></td>\n<td><a href=\"https://wakatime.com/@bgoonz42\">Wakatime</a></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<hr>\n<br>\n<a class=\"twitter-timeline\" href=\"https://twitter.com/bgooonz?ref_src=twsrc%5Etfw\">Tweets by bgooonz</a> <script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n<iframe src=\"https://discord.com/widget?id=739632674276245685&theme=dark\" width=\"350\" height=\"500\" allowtransparency=\"true\" frameborder=\"0\" sandbox=\"allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts\"></iframe>    "},{"url":"/docs/career/dev-interview/","relativePath":"docs/career/dev-interview.md","relativeDir":"docs/career","base":"dev-interview.md","name":"dev-interview","frontmatter":{"title":"Developer Interview Questions","weight":0,"excerpt":"Developer Interview Questions","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<iframe src=\"https://replit.com/@bgoonz/interview-2#index.js\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"medium-articles\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n   \n<h3>Table of Contents</h3>\n<ul>\n<li>\n<p><a href=\"#programming-languagesframeworksplatforms\">Programming Languages/Frameworks/Platforms</a></p>\n<ul>\n<li><a href=\"#android\">Android</a></li>\n<li><a href=\"#angularjs\">AngularJS</a></li>\n<li><a href=\"#angular\">Angular</a></li>\n<li><a href=\"#backbonejs\">BackboneJS</a></li>\n<li><a href=\"#c\">C++</a></li>\n<li><a href=\"#c-1\">C</a></li>\n<li><a href=\"#c-2\">C♯</a></li>\n<li><a href=\"#net\">.NET</a></li>\n<li><a href=\"#clojure\">Clojure</a></li>\n<li><a href=\"#css\">CSS</a></li>\n<li><a href=\"#cucumber\">Cucumber</a></li>\n<li><a href=\"#django\">Django</a></li>\n<li><a href=\"#docker\">Docker</a></li>\n<li><a href=\"#emberjs\">EmberJS</a></li>\n<li><a href=\"#erlang\">Erlang</a></li>\n<li><a href=\"#golang\">Golang</a></li>\n<li><a href=\"#graphql\">GraphQl</a></li>\n<li><a href=\"#html\">HTML</a></li>\n<li><a href=\"#ionic\">Ionic</a></li>\n<li><a href=\"#ios\">iOS</a></li>\n<li><a href=\"#java\">Java</a></li>\n<li><a href=\"#javascript\">JavaScript</a></li>\n<li><a href=\"#jquery\">jQuery</a></li>\n<li><a href=\"#front-end-build-tools\">Front-end build tools</a></li>\n<li><a href=\"#knockoutjs\">KnockoutJS</a></li>\n<li><a href=\"#less\">Less</a></li>\n<li><a href=\"#lisp\">Lisp</a></li>\n<li><a href=\"#nodejs\">NodeJS</a></li>\n<li><a href=\"#objective-c\">Objective-C</a></li>\n<li><a href=\"#php\">PHP</a></li>\n<li><a href=\"#python\">Python</a></li>\n<li><a href=\"#reactjs\">ReactJS</a></li>\n<li><a href=\"#ruby-on-rails\">Rails</a></li>\n<li><a href=\"#ruby\">Ruby</a></li>\n<li><a href=\"#rust\">Rust</a></li>\n<li><a href=\"#sass\">Sass</a></li>\n<li><a href=\"#scala\">Scala</a></li>\n<li><a href=\"#shell\">Shell</a></li>\n<li><a href=\"#spark\">Spark</a></li>\n<li><a href=\"#swift\">Swift</a></li>\n<li><a href=\"#vuejs\">Vue.js</a></li>\n<li><a href=\"#wordpress\">Wordpress</a></li>\n<li><a href=\"#typescript\">TypeScript</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#database-technologies\">Database technologies</a></p>\n<ul>\n<li><a href=\"#cassandra\">Cassandra</a></li>\n<li><a href=\"#microsoft-access\">Microsoft Access</a></li>\n<li><a href=\"#mongodb\">MongoDB</a></li>\n<li><a href=\"#mysql\">MySQL</a></li>\n<li><a href=\"#neo4j\">Neo4j</a></li>\n<li><a href=\"#oracle\">Oracle</a></li>\n<li><a href=\"#postgres\">Postgres</a></li>\n<li><a href=\"#sql\">SQL</a></li>\n<li><a href=\"#sql-lite\">SQL Lite</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#caching-technologies\">Caching technologies</a></p>\n<ul>\n<li><a href=\"#memcached\">Memcached</a></li>\n<li><a href=\"#redis\">Redis</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#os\">OS</a></p>\n<ul>\n<li><a href=\"#linux\">Linux</a></li>\n<li><a href=\"#windows\">Windows</a></li>\n</ul>\n</li>\n<li><a href=\"#algorithms\">Algorithms</a></li>\n<li><a href=\"#blockchain\">Blockchain</a></li>\n<li><a href=\"#coding-exercises\">Coding exercises</a></li>\n<li><a href=\"#comprehensive-lists\">Comprehensive lists</a></li>\n<li><a href=\"#design-patterns\">Design patterns</a></li>\n<li><a href=\"#data-structures\">Data structures</a></li>\n<li><a href=\"#networks\">Networks</a></li>\n<li><a href=\"#security\">Security</a></li>\n<li><a href=\"#data-science\">Data Science</a></li>\n</ul>\n<h2>Programming Languages/Frameworks/Platforms</h2>\n<h3>Android</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/android-interview-questions.aspx\">10 Android interview question answers for Freshers</a></li>\n<li><a href=\"http://www.toptal.com/android/interview-questions\">20 Essential Android Interview Questions from Toptal</a></li>\n<li><a href=\"https://adevait.com/android/interview-questions\">25 Essential Android Interview Questions from Adeva</a></li>\n<li><a href=\"https://www.quora.com/What-are-good-job-interview-questions-for-an-Android-developer\">A couple of Android questions posted by Quora users</a></li>\n<li><a href=\"http://www.tutorialspoint.com/android/android_interview_questions.htm\">A great list of Android interview questions covering all the aspects of this career</a></li>\n<li><a href=\"https://github.com/derekargueta/Android-Interview-Questions\">Collection of Android and Java related questions and topics, including general developer questions, Java core, Data structures, Build Tools, Programming Paradigms, Core Android, Databases and etc</a></li>\n<li><a href=\"https://medium.com/@neteinstein/not-another-android-interviews-article-the-questions-3dedafa30bec\">Collection of Android and Java questions divided by experience</a></li>\n<li><a href=\"https://pangara.com/blog/android-interview-questions\">Android Interview Questions &#x26; How to Interview Candidates</a></li>\n<li><a href=\"https://github.com/mindash/android-structured-interview\">RocketSkill App Android Interview Questions</a></li>\n<li><a href=\"https://github.com/anitaa1990/Android-Cheat-sheet\">Android cheat sheet: Coding program, Data structure, Android and Java interview questions with answers and categorized by topics</a></li>\n<li><a href=\"https://www.andreasschrade.com/2017/02/23/android-interview-questions/\">Android Interview Questions And Answers From Beginner To Advanced</a></li>\n<li><a href=\"https://github.com/mohsenoid/Android-Interview-Questions\">Interview Questions for Senior Android Developers</a></li>\n<li><a href=\"https://www.interviewbit.com/android-interview-questions/\">35+ Android Interview Questions</a></li>\n</ul>\n<h3>AngularJS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/angular-js/interview-questions\">12 Essential AngularJS Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/gdi2290/ngExam\">An AngularJS exam with questions from beginner to expert by @gdi2290 from @AngularClass</a></li>\n<li><a href=\"https://www.codementor.io/angularjs/tutorial/angularjs-interview-questions-sample-answers\">29 AngularJS Interview Questions - Can You Answer Them All? Great Article from Codementor</a></li>\n<li><a href=\"http://www.web-technology-experts-notes.in/2014/11/angularjs-interview-questions-and-answers-for-experienced.html\">AngularJS interview questions and answers for experienced developers</a></li>\n<li><a href=\"http://www.tutorialspoint.com/angularjs/angularjs_interview_questions.htm\">AngularJS Interview Questions which have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of AngularJS</a></li>\n<li><a href=\"http://www.codeproject.com/Articles/891718/AngularJS-Interview-Questions-and-Answers\">This article discusses the top 50 Most occurred AngularJS interview question with answers</a></li>\n<li><a href=\"http://career.guru99.com/top-25-angular-js-interview-questions/\">Top 25 Angularjs Interview Questions and Quiz</a></li>\n<li><a href=\"https://www.techbeamers.com/latest-angularjs-interview-questions-answers/\">100 AngularJS Interview Questions - Quick Refresher</a></li>\n</ul>\n<h3>Angular</h3>\n<ul>\n<li><a href=\"https://github.com/Yonet/Angular-Interview-Questions\">A list of helpful Angular related questions you can use to interview potential candidates, test yourself or completely ignore</a></li>\n<li><a href=\"https://www.onlineinterviewquestions.com/angular2-interview-questions/\">Angular 2 Interview Questions</a></li>\n<li><a href=\"https://github.com/sudheerj/angular-interview-questions\">List of 300 Angular Interview Questions and Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/angular-interview-questions/\">Angular Interview Questions (2020)</a></li>\n</ul>\n<h3>BackboneJS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/backbone-js/interview-questions\">8 Essential Backbonejs Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.web-technology-experts-notes.in/2015/01/backbone-js-interview-questions-and-answers.html\">Backbonejs Interview Questions And Answers from web technology experts notes</a></li>\n<li><a href=\"http://career.guru99.com/top-25-backbone-js-interview-questions/\">Top 25 Backbone.js interview questions</a></li>\n</ul>\n<h3>C++</h3>\n<ul>\n<li><a href=\"http://www.sanfoundry.com/cplusplus-interview-questions-answers/\">1000+ Multiple Choice Questions &#x26; Answers in C++ with explanations</a></li>\n<li><a href=\"http://www.careerride.com/C++-Interview-questions-Answer.aspx\">200 C++ interview questions and answers</a></li>\n<li><a href=\"http://www.toptal.com/c-plus-plus/interview-questions\">24 Essential C++ Interview Questions from Toptal</a></li>\n<li><a href=\"http://a4academics.com/interview-questions/57-c-plus-plus/419-cpp-interview-questions-answers\">C++ Interview Questions and Answers for Freshers and Experienced developers</a></li>\n<li><a href=\"http://www.geekinterview.com/Interview-Questions/Languages/C-Plus-Plus\">C++ Interview Questions from GeekInterview</a></li>\n<li><a href=\"http://www.geeksforgeeks.org/c-plus-plus/\">C++ Programming Q&#x26;A and quizzes from computer science portal for geeks</a></li>\n<li><a href=\"http://www.indiabix.com/cpp-programming/questions-and-answers/\">C++ Programming Questions and Answers related to such topics as OOPs concepts, Object and Classes, Functions, Constructors and Destructors, Inheritance and etc</a></li>\n<li><a href=\"https://github.com/haoel/leetcode\">LeetCode Problems' Solutions written in C++</a></li>\n<li><a href=\"https://pangara.com/blog/blogcplusplus-interview-questions/\">25 Fundamental C++ Interview Questions</a></li>\n</ul>\n<h3>C</h3>\n<ul>\n<li><a href=\"http://www.cquestions.com/2010/10/c-interview-questions-and-answers.html\">Basic C language technical frequently asked interview questions and answers It includes data structures, pointers interview questions and answers for experienced</a></li>\n<li><a href=\"http://www.indiabix.com/technical/c/\">C Programming Interview Questions and Answers for such topics as Bits and Bytes, Preprocessors, Functions, Strings, Language basics and etc</a></li>\n<li><a href=\"http://www.tutorialspoint.com/cprogramming/cprogramming_interview_questions.htm\">C Programming Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C Programming</a></li>\n<li><a href=\"http://geeksquiz.com/commonly-asked-c-programming-interview-questions-set-1/\">First set of commonly asked C programming interview questions from computer science portal for geeks</a></li>\n<li><a href=\"http://geeksquiz.com/commonly-asked-c-programming-interview-questions-set-2/\">Second set of commonly asked C programming interview questions from computer science portal for geeks</a></li>\n<li><a href=\"https://www.toptal.com/c/interview-questions\">9 Essential C Interview Questions with answers</a></li>\n<li><a href=\"https://www.interviewbit.com/c-interview-questions/\">Top C Interview Questions and Answers</a></li>\n</ul>\n<h3>C</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/c-sharp/interview-questions\">15 Essential C# Interview Question from Toptal</a></li>\n<li><a href=\"http://www.dotnetfunda.com/interviews/cat/6/csharp\">C# interview questions from dotnetfunda.com</a></li>\n<li><a href=\"http://a4academics.com/interview-questions/52-dot-net-interview-questions/417-c-oops-interview-questions-and-answers\">Top 100 C# Interview Questions and Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-50-c-sharp-interview-questions-answers/\">Top 50 C# Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/csharp-coding-interview-questions-developers/\">50 C# Coding Interview Questions and Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/csharp-oops-interview-questions-answers/\">20 C# OOPS Interview Questions and Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/c-sharp-interview-questions/\">30+ C# Interview Questions</a></li>\n</ul>\n<h3>.NET</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/ASPNet-Questions.aspx\">300 ASPNET interview questions and answers</a></li>\n<li><a href=\"https://www.talkingdotnet.com/asp-net-core-interview-questions/\">ASP.NET Core Interview Questions</a></li>\n<li><a href=\"http://www.indiabix.com/technical/dotnet/\">Great list of NET interview questions covering all the NET platform topics</a></li>\n<li><a href=\"http://www.dotnetcurry.com/dotnetinterview/70/dotnet-interview-questions-answers-beginners\">NET Interview Questions and Answers for Beginners which consists of the most frequently asked questions in NET This list of 100+ questions and answers gauge your familiarity with the NET platform</a></li>\n<li><a href=\"http://stackoverflow.com/questions/365489/questions-every-good-net-developer-should-be-able-to-answer\">Questions gathered by community of the StackOverflow</a></li>\n<li><a href=\"http://www.hanselman.com/blog/WhatGreatNETDevelopersOughtToKnowMoreNETInterviewQuestions.aspx\">What Great NET Developers Ought To Know (More NET Interview Questions)</a></li>\n</ul>\n<h3>Clojure</h3>\n<ul>\n<li><a href=\"http://www.learningclojure.com/2014/05/fizz-buzz-interview-question.html\">Classic 'Fizz Buzz' interview question for Clojure developers</a></li>\n<li><a href=\"http://ita2zguide.blogspot.com.by/p/cc.html\">Clojure Interview Questions for experienced devs</a></li>\n<li><a href=\"https://github.com/dpetrovics/coding-exercises\">Coding exercises in Clojure, handy practice for technical interview questions</a></li>\n<li><a href=\"https://www.reddit.com/r/Clojure/comments/34qhha/clojure_coding_job_interview_experience/\">Experience and questions from Clojure developer interview collected by Reddit users</a></li>\n<li><a href=\"https://github.com/DerekCuevas/interview-cake-clj\">Interview cake Clojure solutions</a></li>\n</ul>\n<h3>CSS</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/Interview-Questions-CSS.aspx\">CSS interview questions and answers for freshers and experienced candidates Also there you can find CSS online practice tests to fight written tests and certification exams on CSS</a></li>\n<li><a href=\"http://www.techrepublic.com/blog/software-engineer/css-interview-questions-and-answers/\">Development hiring managers and potential interviewees may find there sample CSS proficiency interview Q&#x26;As and code snippets useful</a></li>\n<li><a href=\"https://css-tricks.com/interview-questions-css/\">Interview Questions and Exercises About CSS</a></li>\n<li><a href=\"http://career.guru99.com/top-50-csscascading-style-sheet-interview-questions/\">Top 50 CSS(Cascading Style Sheet) Interview Questions covering the most of tricky CSS moments</a></li>\n<li><a href=\"https://github.com/yangshun/front-end-interview-handbook/blob/master/questions/css-questions.md\">CSS Questions and Answers</a></li>\n</ul>\n<h3>Cucumber</h3>\n<ul>\n<li><a href=\"https://ratedr05.wordpress.com/2017/09/22/cucumber-interview-questions/\">Cucumber Web Application BDD Sample Interview Questions</a></li>\n<li><a href=\"http://watir.com/simple-cucumber-watir-page-object-pattern-framework/\">Guide to building a simple Cucumber + Watir page object pattern framework</a></li>\n</ul>\n<h3>Django</h3>\n<ul>\n<li><a href=\"http://insights.dice.com/2014/04/30/interview-questions-pythondjango-developers/\">Some abstract interview questions for Python/Django developers</a></li>\n<li><a href=\"http://www.ilian.io/django-interview-questions/\">Some Django basic interview questions to establish the basic level of the candidates</a></li>\n<li><a href=\"http://career.guru99.com/top-16-django-interview-questions/\">Top 16 Django Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>Docker</h3>\n<ul>\n<li><a href=\"https://mindmajix.com/docker-interview-questions\">Docker Interview Questions</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/docker-interview-questions/\">Top Docker Interview Questions You Must Prepare In 2019</a></li>\n<li><a href=\"https://intellipaat.com/interview-question/docker-interview-questions/\">Top Docker Interview Questions And Answers</a></li>\n<li><a href=\"https://www.wisdomjobs.com/e-university/docker-software-interview-questions.html\">DOCKER (SOFTWARE) INTERVIEW QUESTIONS &#x26; ANSWERS</a></li>\n<li><a href=\"https://www.fullstack.cafe/blog/docker-interview-questions-and-answers\">30 Docker Interview Questions and Answers in 2019</a></li>\n<li><a href=\"https://www.interviewbit.com/docker-interview-questions/\">Docker Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.wissenhive.com/blogs/top-50-docker-interview-questions-and-answers\">Top 50 Docker Interview Questions &#x26; Answers</a></li>\n</ul>\n<h3>EmberJS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/emberjs/interview-questions\">8 Essential Emberjs Interview Questions from Toptal</a></li>\n<li><a href=\"http://career.guru99.com/top-25-ember-js-interview-questions/\">Top 25 Emberjs Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>Erlang</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-22-erlang-interview-questions/\">Top 22 Erlang Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>Golang</h3>\n<ul>\n<li><a href=\"https://github.com/mrekucci/epi\">Solutions for Elements of Programming Interviews problems written in Golang</a></li>\n<li><a href=\"https://github.com/efischer19/golang_ctci\">Solutions for some basic coding interview tasks written in Go</a></li>\n<li><a href=\"http://career.guru99.com/top-20-go-programming-interview-questions/\">Top 20 GO Programming Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>GraphQl</h3>\n<ul>\n<li><a href=\"https://www.fullstack.cafe/blog/5-graphql-interview-questions-you-should-know\">8 GraphQl Interview Questions To Know</a></li>\n<li><a href=\"https://www.howtographql.com/advanced/5-common-questions/\">How to GraphQl - Common Questions</a></li>\n</ul>\n<h3>HTML</h3>\n<ul>\n<li><a href=\"http://www.sitepoint.com/10-typical-html-interview-exercises/\">10 Typical HTML Interview Exercises from SitePoint.com</a></li>\n<li><a href=\"http://www.toptal.com/html5/interview-questions\">16 Essential HTML5 Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.codeproject.com/Articles/702051/important-HTML-Interview-questions-with-answe\">40 important HTML 5 Interview questions with answers</a></li>\n<li><a href=\"http://www.careerride.com/Interview-Questions-HTML.aspx\">HTML interview questions and answers for freshers and experienced candidates Also find HTML online practice tests to fight written tests and certification exams on HTML</a></li>\n<li><a href=\"http://career.guru99.com/top-50-html-interview-questions/\">Top 50 HTML Interview Questions for both freshers and experienced developers</a></li>\n<li><a href=\"http://www.javatpoint.com/html-interview-questions\">Common HTML interview questions for freshers</a></li>\n<li><a href=\"https://github.com/yangshun/front-end-interview-handbook/blob/master/questions/html-questions.md\">HTML Questions and Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/latest-html-interview-questions/\">30 HTML Interview Questions and Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/html-interview-questions/\">30+ HTML Interview Questions (2021)</a></li>\n</ul>\n<h3>Ionic</h3>\n<ul>\n<li><a href=\"http://www.codeandyou.com/p/ionic-interview-questions.html\">23 Beginner Level Ionic Framework Questions</a></li>\n<li><a href=\"https://www.toptal.com/ionic/interview-questions\">12 Essential Ionic Interview Questions</a></li>\n<li><a href=\"https://www.javatpoint.com/ionic-interview-questions\">45 Ionic Interview Questions</a></li>\n<li><a href=\"https://www.maheshbhusanoor.com/article/ionic-interview-questions-answers.html\">Most Asked Ionic Interview Questions</a></li>\n</ul>\n<h3>iOS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/ios/interview-questions\">14 Essential iOS Interview Questions from Toptal</a></li>\n<li><a href=\"https://www.codementor.io/ios/tutorial/ios-interview-tips-questions-answers-objective-c\">20 iOS Developer Interview Questions and Answers for getting you ready for your interview</a></li>\n<li><a href=\"https://adevait.com/ios/interview-questions\">25 Essential iOS Interview Questions from Adeva</a></li>\n<li><a href=\"https://github.com/CameronBanga/iOS-Developer-and-Designer-Interview-Questions\">A small guide to help those looking to hire a developer or designer for iOS work While tailored for iOS, many questions could be used for Android developers or designers as well A great self-test if you're looking to keep current or practice for your own interview</a></li>\n<li><a href=\"http://www.raywenderlich.com/53962/ios-interview-questions\">All you need to know about iOS technical interview including some tips for preparing, questions and some coding exercises</a></li>\n<li><a href=\"https://blackpixel.com/writing/2013/04/interview-questions-for-ios-and-mac-developers-1.html\">Interview Questions for iOS and Mac Developers from the CEO of Black Pixel</a></li>\n<li><a href=\"http://www.geekinterview.com/Interview-Questions/iOS\">iOS Interview Questions and Answers including such topics as Development Basics, App states and multitasking, App states, Core app objects</a></li>\n<li><a href=\"https://m.smartcloud.io/ios-interview-questions-for-senior-developers-in-2017-a94cc81c8205\">iOS Interview Questions For Senior Developers</a></li>\n<li><a href=\"https://medium.com/ios-os-x-development/ios-interview-questions-13840247a57a\">50 iOS Interview Questions And Answers 1</a></li>\n<li><a href=\"https://medium.com/ios-os-x-development/50-ios-interview-questions-and-answers-part-2-45f952230b9f\">50 iOS Interview Questions And Answers Part 2</a></li>\n<li><a href=\"https://medium.com/ios-os-x-development/50-ios-interview-questions-and-answers-part-3-3fad146b6c3d\">50 iOS Interview Questions And Answers Part 3</a></li>\n<li><a href=\"https://medium.com/@duruldalkanat/50-ios-interview-questions-and-answers-part-4-6f26b26341a\">50 iOS Interview Questions And Answers Part 4</a></li>\n<li><a href=\"https://medium.com/@duruldalkanat/50-ios-interview-questions-and-answers-part-5-de6241374a8f\">50 iOS Interview Questions And Answers Part 5</a></li>\n<li><a href=\"https://www.upwork.com/i/interview-questions/ios/\">10 iOS interview questions and answers</a></li>\n<li><a href=\"https://github.com/9magnets/iOS-Developer-and-Designer-Interview-Questions#tech\">iOS Developer and Designer Interview Questions</a></li>\n<li><a href=\"http://www.thecrazyprogrammer.com/2015/11/ios-interview-questions-and-answers.html\">IOS Interview Questions and Answers</a></li>\n<li><a href=\"http://ichuiphonedev.blogspot.com/2014/05/iphone-latest-interview-questions-and.html\">iOS Interview Questions For Beginners</a></li>\n<li><a href=\"https://github.com/Babylonpartners/ios-playbook/blob/master/Interview/questions.md\">Babylon iOS Interview Questions</a></li>\n<li><a href=\"https://github.com/mindash/iOS-structured-interview\">RocketSkill App iOS Interview Questions</a></li>\n<li><a href=\"https://medium.com/flawless-app-stories/static-vs-dynamic-dispatch-in-swift-a-decisive-choice-cece1e872d\">iOS Static vs Dynamic Dispatch</a></li>\n</ul>\n<h3>Java</h3>\n<ul>\n<li><a href=\"https://onurdesk.com/category/interview/interview-program-java/\">List of Java programs for interview Categoriwise</a></li>\n<li><a href=\"http://www.javacodegeeks.com/2014/04/java-interview-questions-and-answers.html\">115 Java Interview Questions and Answers - The ULTIMATE List</a></li>\n<li><a href=\"https://www.codementor.io/java/tutorial/java-interview-sample-questions-answers\">37 Java Interview Questions to Practice With from Codementor</a></li>\n<li><a href=\"http://www.toptal.com/java/interview-questions\">21 Essential Java Interview Questions</a></li>\n<li><a href=\"https://www.janbasktraining.com/blog/core-java-interview-questions-answers/\">Top 30 Core Java Interview Questions</a></li>\n<li><a href=\"https://adevait.com/java/interview-questions\">29 Essential Java Interview Questions from Adeva</a></li>\n<li><a href=\"https://github.com/svozniuk/java-interviews\">A collection of Java interview questions and answers to them</a></li>\n<li><a href=\"https://github.com/donbeave/interview\">Data Structures and Algorithms in Java which can be useful in interview process</a></li>\n<li><a href=\"https://blog.udemy.com/java-interview-questions/\">Java Interview Questions: How to crack the TOP 15 questions</a></li>\n<li><a href=\"http://www.javatpoint.com/corejava-interview-questions\">300 Core Java Interview Questions</a></li>\n<li><a href=\"http://java67.blogspot.com.by/2012/09/top-10-tricky-java-interview-questions-answers.html\">Top 10 Tricky Java interview questions and Answers</a></li>\n<li><a href=\"http://javahungry.blogspot.com/2013/06/top-25-most-frequently-asked-core-java.html\">Top 25 Most Frequently Asked Interview Core Java Interview Questions And Answers</a></li>\n<li><a href=\"http://java67.blogspot.sg/2015/03/top-40-core-java-interview-questions-answers-telephonic-round.html\">Top 40 Core Java Interview Questions Answers from Telephonic Round</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/spring-interview-questions/\">Top 50 Spring Interview Questions You Must Prepare For In 2020</a></li>\n<li><a href=\"https://www.journaldev.com/2696/spring-interview-questions-and-answers\">Spring Interview Questions And Answers</a></li>\n<li><a href=\"https://www.interviewcake.com/java-interview-questions\">Interview Cake Java Interview Questions</a></li>\n<li><a href=\"https://www.techbeamers.com/java-interview-questions/\">Java Interview Questions &#x26; Quizzes</a></li>\n<li><a href=\"https://fdk.codes/some-java-interview-questions/\">Essetial Java Interview Questions</a></li>\n<li><a href=\"https://www.interviewbit.com/java-interview-questions/\">Fundamental Java Interview Questions</a></li>\n</ul>\n<h3>JavaScript</h3>\n<ul>\n<li><a href=\"https://github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript\">Practice common algorithms using JavaScript</a></li>\n<li><a href=\"https://medium.com/javascript-scene/10-interview-questions-every-javascript-developer-should-know-6fa6bdf5ad95\">10 Interview Questions Every JavaScript Developer Should Know</a></li>\n<li><a href=\"https://www.codementor.io/javascript/tutorial/21-essential-javascript-tech-interview-practice-questions-answers\">21 Essential JavaScript Interview Questions from best mentors all over the world</a></li>\n<li><a href=\"https://adevait.com/javascript-developers/interview-questions\">20 Essential JavaScript Interview Questions from Adeva</a></li>\n<li><a href=\"http://www.toptal.com/javascript/interview-questions\">37 Essential JavaScript Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.sitepoint.com/5-javascript-interview-exercises/\">5 More JavaScript Interview Exercises</a></li>\n<li><a href=\"http://www.sitepoint.com/5-typical-javascript-interview-exercises/\">5 Typical JavaScript Interview Exercises</a></li>\n<li><a href=\"http://www.techrepublic.com/blog/software-engineer/javascript-interview-questions-and-answers/\">Development hiring managers and potential interviewees may find these sample JavaScript proficiency interview Q&#x26;As and code snippets useful</a></li>\n<li><a href=\"https://github.com/nishant8BITS/123-Essential-JavaScript-Interview-Question\">123 Essential JavaScript Interview Question</a></li>\n<li><a href=\"http://www.tutorialspoint.com/javascript/javascript_interview_questions.htm\">JavaScript Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of JavaScript</a></li>\n<li><a href=\"http://www.thatjsdude.com/interview/js2.html\">JS: Basics and Tricky Questions</a></li>\n<li><a href=\"http://thatjsdude.com/interview/js1.html\">JS: Interview Algorithm</a></li>\n<li><a href=\"https://github.com/kolodny/exercises\">Some basic javascript coding challenges and interview questions</a></li>\n<li><a href=\"https://github.com/csvenja/javascript-exercises\">Some JavaScript interview exercises</a></li>\n<li><a href=\"https://www.reddit.com/r/javascript/comments/3rb88w/ten_questions_ive_been_asked_most_more_than_once\">Ten Questions I've Been Asked, Most More Than Once, Over Six Technical JavaScript / Front-End Engineer Job Interviews.</a></li>\n<li><a href=\"http://career.guru99.com/top-85-javascript-interview-questions/\">Top 85 JavaScript Interview Questions</a></li>\n<li><a href=\"https://www.interviewcake.com/javascript-interview-questions\">Interview Cake JavaScript Interview Questions</a></li>\n<li><a href=\"https://performancejs.com/post/hde6d32/The-Best-Frontend-JavaScript-Interview-Questions-(written-by-a-Frontend-Engineer)\">The Best Frontend JavaScript Interview Questions (written by a Frontend Engineer)</a></li>\n<li><a href=\"https://dev.to/arnavaggarwal/10-javascript-concepts-you-need-to-know-for-interviews\">10 JavaScript Concepts You Need to Know for Interviews</a></li>\n<li><a href=\"https://github.com/yangshun/front-end-interview-handbook\">Front end interview handbook</a></li>\n<li><a href=\"https://www.techbeamers.com/javascript-interview-questions-answers/\">JavaScript Interview Questions - Quick Refresher</a></li>\n<li><a href=\"https://github.com/danieldelcore/mega-interview-guide\">The MEGA Interview Guide</a></li>\n<li><a href=\"https://www.interviewbit.com/javascript-interview-questions/\">Javascript Interview Questions and Answers (2020)</a></li>\n<li><a href=\"https://github.com/sadanandpai/javascript-code-challenges\">JavaScript Modern Interview Code Challenges 2021</a></li>\n<li><a href=\"https://dev.to/macmacky/70-javascript-interview-questions-5gfi\">70 JavaScript Interview Questions</a></li>\n</ul>\n<h3>jQuery</h3>\n<ul>\n<li><a href=\"https://career.guru99.com/top-50-jquery-interview-questions/\">Top 50 jquery interview questions</a></li>\n<li><a href=\"https://www.toptal.com/jquery/interview-questions\">17 Essential jQuery Interview Questions From Toptal</a></li>\n</ul>\n<h3>Front-end build tools</h3>\n<ul>\n<li><a href=\"https://github.com/styopdev/webpack-interview-questions\">Webpack interview questions &#x26; answers</a></li>\n<li><a href=\"https://www.codeproject.com/Articles/1065184/Latest-Gulp-js-interview-questions\">Gulp js interview questions</a></li>\n<li><a href=\"http://www.talkingdotnet.com/grunt-js-interview-questions/\">Grunt js interview questions for beginners</a></li>\n<li><a href=\"https://mindmajix.com/grunt-interview-questions\">Grunt js interview questions</a></li>\n</ul>\n<h3>KnockoutJS</h3>\n<ul>\n<li><a href=\"http://www.code-sample.com/2014/01/knockout-js-interview-questions-and.html\">15 interview questions from CodeSample.com</a></li>\n<li><a href=\"http://www.codeproject.com/Articles/987899/KnockoutJS-interview-questions\">20 questions you might be asked about KnockoutJS in an interview for both freshers and experienced developers</a></li>\n</ul>\n<h3>Less</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-25-less-interview-questions/\">Top 25 LESS Interview Questions</a></li>\n</ul>\n<h3>Lisp</h3>\n<ul>\n<li><a href=\"http://www.sanfoundry.com/lisp-mcqs-class/\">10 LISP Questions &#x26; Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-18-lisp-interview-questions/\">Top 18 Lisp Interview Questions from Career Guru</a></li>\n</ul>\n<h3>NodeJS</h3>\n<ul>\n<li><a href=\"https://adevait.com/nodejs/interview-questions\">25 Essential Node.js Interview Questions from Adeva</a></li>\n<li><a href=\"http://www.toptal.com/nodejs/interview-questions\">8 Essential Nodejs Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.tutorialspoint.com/nodejs/nodejs_interview_questions.htm\">Node.JS Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Node.JS</a></li>\n<li><a href=\"https://blog.risingstack.com/node-js-interview-questions/\">Node.js Interview Questions and Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-25-interview-questions-on-node-js/\">Top 25 Nodejs Interview Questions &#x26; Answers from Career Guru</a></li>\n<li><a href=\"https://www.techbeamers.com/top-30-node-js-interview-questions-answers/\">Top 30 Node.Js Interview Questions With Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/node-js-interview-questions/\">Top Nodejs Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://github.com/haizlin/fe-interview/blob/master/category/nodejs.md\">Node.js Interview Questions in Chinese</a></li>\n</ul>\n<h3>Objective-C</h3>\n<ul>\n<li><a href=\"http://insights.dice.com/2015/07/21/interview-qs-objective-c-swift/\">Interview Qs for Objective-C and Swift</a></li>\n<li><a href=\"http://ichuiphonedev.blogspot.com/2014/05/iphone-latest-interview-questions-and.html\">iOS Interview Questions For Beginners</a></li>\n</ul>\n<h3>PHP</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/PHP-Interview-Questions.aspx\">100 PHP interview questions and answers from CareerRide.com</a></li>\n<li><a href=\"http://www.toptal.com/php/interview-questions\">21 Essential PHP Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.woodstitch.com/resources/php-interview-questions.php\">20 Common PHP Job Interview Questions and Answers</a></li>\n<li><a href=\"https://adevait.com/php/interview-questions\">25 Essential PHP Interview Questions from Adeva</a></li>\n<li><a href=\"http://phpinterviewquestions.co.in/\">PHP interview questions and answers for freshers</a></li>\n<li><a href=\"http://career.guru99.com/top-100-php-interview-questions-answers/\">Top 100 PHP Interview Questions &#x26; Answers from CareerGuru</a></li>\n<li><a href=\"https://www.codementor.io/php/tutorial/php-interview-questions-sample-answers\">25 PHP Interview Questions</a></li>\n<li><a href=\"https://pangara.com/blog/php-interview-questions\">26 Essential PHP Interview Questions for 2018</a></li>\n<li><a href=\"https://bootsity.com/books\">Cracking PHP Interviews Questions ebook 300+ Q&#x26;A</a></li>\n<li><a href=\"https://www.techbeamers.com/latest-php-interview-questions-answers/\">PHP Interview Questions - Quick Refresher</a></li>\n<li><a href=\"https://www.interviewbit.com/php-interview-questions/\">30+ PHP Interview Questions</a></li>\n</ul>\n<h3>Python</h3>\n<ul>\n<li><a href=\"https://adevait.com/python/interview-questions\">26 Essential Python Interview Questions from Adeva</a></li>\n<li><a href=\"http://www.careerride.com/python-interview-questions.aspx\">20 Python interview questions and answers</a></li>\n<li><a href=\"http://www.toptal.com/python/interview-questions\">11 Essential Python Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/sigmavirus24/python-interview-questions\">A listing of questions that could potentially be asked for a python job listing</a></li>\n<li><a href=\"http://www.bogotobogo.com/python/python_interview_questions.php\">Interview Questions for both beginners and experts</a></li>\n<li><a href=\"https://www.interviewcake.com/python-interview-questions\">Interview Cake Python Interview Questions</a></li>\n<li><a href=\"https://docs.python.org/2/faq/programming.html\">Python Frequently Asked Questions (Programming)</a></li>\n<li><a href=\"https://www.reddit.com/r/Python/comments/1knw7z/python_interview_questions\">Python interview questions collected by Reddit users</a></li>\n<li><a href=\"http://career.guru99.com/top-25-python-interview-questions/\">Top 25 Python Interview Questions from Career Guru</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=DEwgZNC-KyE\">Python Interview 10 questions from Corey Schafer</a></li>\n<li><a href=\"https://luminousmen.com/post/6\">Python interview questions. Part I. Junior</a></li>\n<li><a href=\"https://luminousmen.com/post/7\">Python interview questions. Part II. Middle</a></li>\n<li><a href=\"https://luminousmen.com/post/8\">Python interview questions. Part III. Senior</a></li>\n<li><a href=\"https://www.interviewbit.com/python-interview-questions/\">Python Interview Questions and Answers (2019)</a></li>\n<li><a href=\"https://www.techbeamers.com/python-interview-questions-programmers/\">100 Python Interview Questions - Quick Refresher</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/python-interview-questions/\">Top 100 Python Interview Questions from Edureka (2021)</a></li>\n</ul>\n<h3>Ruby on Rails</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/ruby-on-rails-interview-questions.aspx\">20 Ruby on Rails interview questions and answers from CareerRide.com</a></li>\n<li><a href=\"http://www.toptal.com/ruby-on-rails/interview-questions\">9 Essential Ruby on Rails Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/rishiip/ruby-on-rails-interview-questions\">High-level Ruby on Rails Interview Questions</a></li>\n<li><a href=\"http://anilpunjabi.tumblr.com/post/25948339235/ruby-and-rails-interview-questions-and-answers\">Ruby And Ruby On Rails interview Q&#x26;A</a></li>\n<li><a href=\"https://srikantmahapatra.wordpress.com/2013/11/07/ruby-on-rails-interview-questions-and-answers/\">Some of the most frequently asked Ruby on Rails questions and how to answer them confidently</a></li>\n<li><a href=\"https://www.codementor.io/ruby-on-rails/tutorial/ruby-on-rails-interview-questions\">11 Ruby on Rails Interview Practice Questions</a></li>\n<li><a href=\"https://career.guru99.com/top-34-ruby-on-rail-interview-questions/\">Top 53 Ruby on Rails Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.upwork.com/i/interview-questions/ruby-on-rails/\">10 Ruby on Rails interview questions and answers</a></li>\n</ul>\n<h3>ReactJS</h3>\n<ul>\n<li><a href=\"https://www.reddit.com/r/reactjs/comments/3m5equ/react_what_interview_questions_to_expect/\">Reddit users share their expectations from ReactJS interview</a></li>\n<li><a href=\"http://interview-questions-247.appspot.com/reactjs-interview-questions-set-1\">This is a first in the series of interview questions related to ReactJS</a></li>\n<li><a href=\"http://interview-questions-247.appspot.com/reactjs-interview-questions-set-3\">This quiz intends to test your understanding of ReactJS fundamentals (Set 3)</a></li>\n<li><a href=\"http://interview-questions-247.appspot.com/reactjs-interview-questions-set-2\">This quiz intends to test your understanding of ReactJS fundamentals</a></li>\n<li><a href=\"https://www.codementor.io/reactjs/tutorial/5-essential-reactjs-interview-questions\">5 Essential React.js Interview Questions</a></li>\n<li><a href=\"https://tylermcginnis.com/react-interview-questions/\">React Interview Questions</a></li>\n<li><a href=\"https://www.toptal.com/react/interview-questions\">Toptal's 21 Essential React.js Interview Questions</a></li>\n<li><a href=\"https://www.educba.com/reactjs-interview-questions/\">19 Essential ReactJs Interview Questions</a></li>\n</ul>\n<h3>Ruby</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/ruby/interview-questions\">21 Essential Ruby Interview Questions from Toptal</a></li>\n<li><a href=\"https://gist.github.com/ryansobol/5252653\">15 Questions to Ask During a Ruby Interview</a></li>\n<li><a href=\"https://github.com/undr/ruby-trivia\">A list of questions about Ruby programming you can use to quiz yourself</a></li>\n<li><a href=\"http://technology.customink.com/blog/2015/11/23/the-art-of-ruby-technical-interviews/\">The Art of Ruby Technical Interview</a></li>\n<li><a href=\"https://www.interviewcake.com/ruby-interview-questions\">Interview Cake Ruby Interview Questions</a></li>\n<li><a href=\"https://www.javatpoint.com/ruby-interview-questions\">Frequently Asked Ruby Interview Questions</a></li>\n</ul>\n<h3>Rust</h3>\n<ul>\n<li><a href=\"https://www.wisdomjobs.com/e-university/rust-programming-language-interview-questions.html\">Top 250+ Rust Programming Language Interview Questions</a></li>\n<li><a href=\"https://www.code-sample.com/2018/02/rust-programming-interview-questions.html\">Rust Programming Interview Questions and Answers</a></li>\n<li><a href=\"https://github.com/jean553/rust-exam\">rust-exam: A set of questions about the Rust programming language</a></li>\n<li><a href=\"https://www.bestinterviewquestion.com/rust-programming-language-interview-questions\">Best Rust Programming Language Interview Questions and answers</a></li>\n</ul>\n<h3>Sass</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-17-sass-interview-questions/\">Top 17 Sass Interview Questions from Career Guru</a></li>\n<li><a href=\"https://www.educba.com/sass-interview-questions/\">Top 10 Sass Interview Questions from educba</a></li>\n</ul>\n<h3>Scala</h3>\n<ul>\n<li><a href=\"http://insights.dice.com/2014/09/12/4-interview-questions-scala-developers/\">4 Interview Questions for Scala Developers</a></li>\n<li><a href=\"http://www.scala-lang.org/old/faq\">A list of Frequently Asked Questions and their answers, sorted by category</a></li>\n<li><a href=\"https://github.com/Jarlakxen/Scala-Interview-Questions\">A list of helpful Scala related questions you can use to interview potential candidates</a></li>\n<li><a href=\"http://programmers.stackexchange.com/questions/58145/how-scala-developers-are-being-interviewed\">How Scala Developers Are Being Interviewed</a></li>\n<li><a href=\"http://career.guru99.com/top-25-interview-questions-on-scala/\">Top 25 Scala Interview Questions &#x26; Answers from Toptal</a></li>\n</ul>\n<h3>SharePoint</h3>\n<ul>\n<li><a href=\"http://www.rajeshg.me/2013/05/sharepoint-developer-2010-interview.html\">Sharepoint Interview Question For Developer</a></li>\n<li><a href=\"https://intellipaat.com/blog/interview-question/sharepoint-interview-questions/\">Top SharePoint Interview Questions and Answers</a></li>\n</ul>\n<h3>Shell</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/shell-scripting-interview-questions/\">Top 50 Shell Scripting Interview Questions from Career Guru</a></li>\n</ul>\n<h3>Spark</h3>\n<ul>\n<li><a href=\"https://github.com/ankurchavda/SparkLearning#spark-learning-guide\">Carefully Curated 70 Spark Questions with Additional Optimization Guides (First in the series)</a></li>\n</ul>\n<h3>Swift</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/swift/interview-questions\">10 Essential Swift Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/diwu/LeetCode-Solutions-in-Swift\">Get prepared for your next iOS job interview by studying high quality LeetCode solutions in Swift 5</a></li>\n<li><a href=\"https://www.raywenderlich.com/762435-swift-interview-questions-and-answers\">Swift Interview Questions and Answers</a></li>\n<li><a href=\"http://mycodetips.com/swift-ios/swift-programming-language-interview-questions-answers-987.html\">Swift Programming Language Interview Questions And Answers from mycodetips.com</a></li>\n<li><a href=\"http://blog.udacity.com/2014/11/your-top-10-swift-questions-answered.html\">Your top 10 Swift questions answered</a></li>\n<li><a href=\"https://www.raywenderlich.com/762435-swift-interview-questions-and-answers\">Swift interview questions and answers on Swift 5 by Raywenderlich</a></li>\n<li><a href=\"https://cocoacasts.com/what-does-the-dynamic-keyword-mean-in-swift-3\">Dynamic keyword in Swift</a></li>\n</ul>\n<h3>Vue.js</h3>\n<ul>\n<li><a href=\"https://github.com/sudheerj/vuejs-interview-questions\">List of 300 VueJS Interview Questions</a></li>\n</ul>\n<h3>WordPress</h3>\n<ul>\n<li><a href=\"https://pangara.com/blog/blog45-wordpress-interview-questions-and-answers/\">Top 45 WordPress interview questions</a></li>\n<li><a href=\"https://www.toptal.com/wordpress/interview-questions\">10 Essential WordPress Interview Questions</a></li>\n</ul>\n<h3>TypeScript</h3>\n<ul>\n<li><a href=\"https://www.onlineinterviewquestions.com/typescript-interview-questions\">Typescript Interview Questions</a></li>\n<li><a href=\"https://www.positronx.io/typescript-interview-questions-answers-2109/\">Top 10 TypeScript Interview Questions and Answers for Beginner Web Developers 2019</a></li>\n</ul>\n<h2>Database technologies</h2>\n<h3>Cassandra</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-23-cassandra-interview-questions/\">Top 23 Cassandra Interview Questions from Career Guru</a></li>\n</ul>\n<h3>Microsoft Access</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-16-ms-access-database-interview-questions/\">Top 16 Microsoft Access Database Interview Questions from Career Guru</a></li>\n</ul>\n<h3>MongoDB</h3>\n<ul>\n<li><a href=\"http://theprofessionalspoint.blogspot.com.by/2014/01/28-mongodb-nosql-database-interview.html\">28 MongoDB NoSQL Database Interview Questions and Answers</a></li>\n<li><a href=\"http://www.globalguideline.com/interview_questions/Questions.php?sc=MongoDB\">MongoDB frequently Asked Questions by expert members with experience in MongoDB These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts</a></li>\n<li><a href=\"http://www.javatpoint.com/mongodb-interview-questions\">MongoDB Interview Questions from JavaTPointcom</a></li>\n<li><a href=\"http://www.tutorialspoint.com/mongodb/mongodb_interview_questions.htm\">MongoDB Interview Questions that have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of MongoDB</a></li>\n<li><a href=\"http://career.guru99.com/top-20-mongodb-interview-questions/\">Top 20 MongoDB interview questions from Career Guru</a></li>\n</ul>\n<h3>MySQL</h3>\n<ul>\n<li><a href=\"http://www.tecmint.com/10-mysql-database-interview-questions-for-beginners-and-intermediates/\">10 MySQL Database Interview Questions for Beginners and Intermediates</a></li>\n<li><a href=\"http://www.careerride.com/MySQL-Interview-Questions.aspx\">100 MySQL interview questions</a></li>\n<li><a href=\"http://www.tecmint.com/basic-mysql-interview-questions-for-database-administrators/\">15 Basic MySQL Interview Questions for Database Administrators</a></li>\n<li><a href=\"http://www.javatpoint.com/mysql-interview-questions\">28 MySQL interview questions from JavaTPoint.com</a></li>\n<li><a href=\"http://www.testingbrain.com/interview/mysql-interview-questions.html\">40 Basic MySQL Interview Questions with Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-50-mysql-interview-questions-answers/\">Top 50 MySQL Interview Questions &#x26; Answers from Career Guru</a></li>\n</ul>\n<h3>Neo4j</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-20-ne04j-interview-questions/\">Top 20 Neo4j Interview Questions from Career Guru</a></li>\n</ul>\n<h3>Oracle</h3>\n<ul>\n<li><a href=\"http://www.coolinterview.com/type.asp?iType=57\">General Oracle Interview Questions &#x26; Answers</a></li>\n</ul>\n<h3>Postgres</h3>\n<ul>\n<li><a href=\"http://www.dotnetfunda.com/interviews/cat/208/postgresql\">13 PostgreSQL Interview Q&#x26;A</a></li>\n<li><a href=\"http://nazafbtemplate.blogspot.com.by/2014/06/frequently-asked-basic-postgresql.html\">Frequently Asked Basic PostgreSQL Interview Questions and Answers</a></li>\n<li><a href=\"http://www.globalguideline.com/interview_questions/Questions.php?sc=postgresqk_database_\">PostgreSQL Interview Preparation Guide</a></li>\n<li><a href=\"http://www.coolinterview.com/type.asp?iType=411\">PostgreSQL Interview Q&#x26;A from CoolInterview.com</a></li>\n</ul>\n<h3>SQL</h3>\n<ul>\n<li><a href=\"http://java67.blogspot.com.by/2013/04/10-frequently-asked-sql-query-interview-questions-answers-database.html\">10 Frequently asked SQL Query Interview Questions</a></li>\n<li><a href=\"http://www.toptal.com/sql/interview-questions\">45 Essential SQL Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.indiabix.com/technical/sql-server-common-questions/\">Common Interview Questions and Answers</a></li>\n<li><a href=\"http://www.indiabix.com/technical/sql-server-general-questions/\">General Interview Questions and Answers</a></li>\n<li><a href=\"https://github.com/XD-DENG/SQL-exercise\">Schema, Questions &#x26; Solutions for SQL Exercising</a></li>\n<li><a href=\"http://www.tutorialspoint.com/sql/sql_interview_questions.htm\">SQL Interview Questions that have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of SQL</a></li>\n<li><a href=\"https://www.interviewbit.com/sql-interview-questions/\">SQL Interview Questions CHEAT SHEET</a></li>\n</ul>\n<h3>SQLite</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-20-sql-lite-interview-questions/\">Top 20 SQLITE Interview Questions from Career Guru</a></li>\n</ul>\n<h2>Caching technologies</h2>\n<h3>Memcached</h3>\n<ul>\n<li><a href=\"https://www.javatpoint.com/memcached-interview-questions-and-answers\">Memcached Interview Questions from Javapoint</a></li>\n<li><a href=\"https://www.wisdomjobs.com/e-university/memcached-interview-questions.html\">Memcached Interview Questions from Wisdomjobs</a></li>\n</ul>\n<h3>Redis</h3>\n<ul>\n<li><a href=\"https://www.javatpoint.com/redis-interview-questions-and-answers\">Redis Interview Questions from Javapoint</a></li>\n<li><a href=\"https://www.wisdomjobs.com/e-university/redis-interview-questions-answers.html\">Redis Interview Questions from Wisdomjobs</a></li>\n<li><a href=\"https://career.guru99.com/top-10-redis-interview-questions/\">Redis Interview Questions from Career Guru</a></li>\n</ul>\n<h2>OS</h2>\n<h3>Linux</h3>\n<ul>\n<li><a href=\"https://www.linuxfoundation.org/blog/2015/07/10-job-interview-questions-for-linux-system-administrators/\">10 Job Interview Questions for Linux System Administrators from Linux.com</a></li>\n<li><a href=\"http://www.tecmint.com/useful-random-linux-interview-questions-and-answers/\">10 Useful Random Linux Interview Questions and Answers</a></li>\n<li><a href=\"http://www.tecmint.com/basic-linux-interview-questions-and-answers/\">11 Basic Linux Interview Questions and Answers</a></li>\n<li><a href=\"http://www.toptal.com/linux/interview-questions\">11 Essential Linux Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.linuxtechi.com/experience-linux-admin-interview-questions/\">Top 30 Linux System Admin Interview Questions &#x26; Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-50-linux-interview-questions/\">Top 50 Linux Interview Questions from Career Guru</a></li>\n<li><a href=\"https://github.com/trimstray/test-your-sysadmin-skills\">278 Test Questions and Answers for *nix System Administrators</a></li>\n<li><a href=\"https://www.techbeamers.com/essential-linux-questions-answers/\">Linux Interview Questions - Quick Refresher</a></li>\n</ul>\n<h3>Windows</h3>\n<ul>\n<li><a href=\"http://www.brentozar.com/archive/2009/07/top-10-interview-questions-for-windows-sysadmins/\">Top 10 Interview Questions for Windows Administrators</a></li>\n<li><a href=\"http://career.guru99.com/top-22-windows-server-interview-questions/\">Top 22 Windows Server Interview Questions from Career Guru</a></li>\n<li><a href=\"http://www.01world.in/p/windows.html\">Windows Admin Interview Questions &#x26; Answers</a></li>\n</ul>\n<h2>DevOps</h2>\n<ul>\n<li><a href=\"https://github.com/chassing/linux-sysadmin-interview-questions\">Linux System Administrator/DevOps Interview Questions</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/top-devops-interview-questions-2016/\">Top DevOps Interview Questions You Must Prepare In 2021</a></li>\n<li><a href=\"https://intellipaat.com/interview-question/devops-interview-questions/\">Top 60+ DevOps Interview Questions &#x26; Answers in 2021</a></li>\n<li><a href=\"https://www.interviewbit.com/devops-interview-questions/\">DevOps Interview Questions &#x26; Answers</a></li>\n</ul>\n<h2>Algorithms</h2>\n<ul>\n<li><a href=\"https://github.com/rishabh115/Interview-Questions\">Comprehensive list of interview questions of top tech companies</a></li>\n<li><a href=\"http://java2novice.com/java-interview-programs/\">A great list of Java interview questions</a></li>\n<li><a href=\"https://github.com/sagivo/algorithms\">Algorithms playground for common interview questions written in Ruby</a></li>\n<li><a href=\"https://github.com/EvgenyKarkan/EKAlgorithms\">EKAlgorithms contains some well known CS algorithms &#x26; data structures</a></li>\n<li><a href=\"http://www.programcreek.com/2012/11/top-10-algorithms-for-coding-interview/\">Top 10 Algorithms for Coding Interview</a></li>\n<li><a href=\"http://javarevisited.blogspot.com.by/2013/03/top-15-data-structures-algorithm-interview-questions-answers-java-programming.html\">Top 15 Data Structures and Algorithm Interview Questions for Java programmer</a></li>\n<li><a href=\"https://github.com/yangshun/tech-interview-handbook/blob/master/algorithms/README.md\">Top Algorithms Questions by Topics</a></li>\n<li><a href=\"https://www.techseries.dev/daily\">Daily Coding Interview Practice</a></li>\n</ul>\n<h2>Blockchain</h2>\n<ul>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/blockchain-interview-questions/\">Top 55 Blockchain Interview Questions You Must Prepare In 2018</a></li>\n<li><a href=\"https://mindmajix.com/blockchain-interview-questions\">Blockchain Interview Questions</a></li>\n<li><a href=\"https://intellipaat.com/interview-question/blockchain-interview-questions/\">Top Blockchain Interview Questions</a></li>\n<li><a href=\"https://applicature.com/blog/blockchain-interview-questions\">Blockchain Developer Interview Questions and Answers</a></li>\n<li><a href=\"https://www.toptal.com/blockchain/interview-questions\">10 Essential Blockchain Interview Questions </a></li>\n<li><a href=\"https://data-flair.training/blogs/blockchain-interview-questions/\">Top 30 Blockchain Interview Questions - For Freshers to Experienced</a></li>\n<li><a href=\"https://www.digitalvidya.com/blog/blockchain-interview-questions/\">Most Frequently Asked Blockchain Interview Questions</a></li>\n</ul>\n<h2>Coding exercises</h2>\n<ul>\n<li><a href=\"https://github.com/mre/the-coding-interview\">Common interview questions and puzzles solved in several languages</a></li>\n<li><a href=\"https://github.com/donnemartin/interactive-coding-challenges\">Interactive, test-driven Python coding challenges (algorithms and data structures) typically found in coding interviews or coding competitions</a></li>\n<li><a href=\"https://github.com/roseperrone/interview-questions\">Interview questions solved in python</a></li>\n<li><a href=\"https://www.makeuseof.com/tag/swift-coding-challenges/\">7 Swift Coding Challenges to Practice Your Skills</a></li>\n</ul>\n<h2>Comprehensive lists</h2>\n<ul>\n<li><a href=\"https://github.com/h5bp/Front-end-Developer-Interview-Questions\">A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore</a></li>\n<li><a href=\"http://www.aperfectmix.com/free_web_design/front-end-interview-questions.html\">Front End Developer Interview Questions</a></li>\n<li><a href=\"https://github.com/yangshun/front-end-interview-handbook/blob/master/README.md\">Answers to Front End Developer Interview Questions</a></li>\n<li><a href=\"https://github.com/starandtina/backend-interview-questions\">Some simple questions to interview potential backend candidates</a></li>\n</ul>\n<h2>Design Patterns</h2>\n<ul>\n<li><a href=\"http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm\">Design Pattern Interview Questions that have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Design Pattern</a></li>\n<li><a href=\"https://github.com/kamranahmedse/design-patterns-for-humans\">Design Patterns for Humans™ - An ultra-simplified explanation</a></li>\n<li><a href=\"https://github.com/iluwatar/java-design-patterns\">Design Patterns implemented in Java</a></li>\n<li><a href=\"https://www.dofactory.com/net/design-patterns\">Design Patterns implemented in DotNet</a></li>\n</ul>\n<h2>Data structures</h2>\n<ul>\n<li><a href=\"http://javarevisited.blogspot.com.by/2013/03/top-15-data-structures-algorithm-interview-questions-answers-java-programming.html\">Top 15 Data Structures and Algorithm Interview Questions for Java programmer</a></li>\n<li><a href=\"http://career.guru99.com/top-50-data-structure-interview-questions/\">Top 50 Data Structure Interview Questions from Career Guru</a></li>\n<li><a href=\"https://www.interviewbit.com/data-structure-interview-questions/\">What is Data Structure? | Top 40 Data Structure Interview Questions</a></li>\n</ul>\n<h2>Networks</h2>\n<ul>\n<li><a href=\"http://career.guru99.com/top-100-networking-interview-questions-answers/\">Top 100 Networking Interview Questions &#x26; Answers from Career Guru</a></li>\n<li><a href=\"https://www.interviewbit.com/networking-interview-questions/\">Networking Interview Questions</a></li>\n</ul>\n<h2>Security</h2>\n<ul>\n<li><a href=\"http://careers.simplicable.com/careers/new/101-IT-security-interview-questions\">101 IT Security Interview Questions</a></li>\n<li><a href=\"http://searchsecurity.techtarget.com/tip/How-to-prepare-for-an-information-security-job-interview\">How to prepare for an information security job interview?</a></li>\n<li><a href=\"https://danielmiessler.com/study/infosec_interview_questions/\">Information Security Interview Questions from Daniel Miessler</a></li>\n<li><a href=\"http://resources.infosecinstitute.com/top-50-information-security-interview-questions/\">Top 50 Information Security Interview Questions for freshers and experts</a></li>\n<li><a href=\"https://mkadeline.github.io/security/Security-Interview-Questions-Answers\">Security Interview Questions (and Answers) from Matthew Adeline</a></li>\n</ul>\n<h2>Data Science</h2>\n<ul>\n<li><a href=\"https://www.dezyre.com/article/-data-science-interview-questions-for-top-tech-companies/189\">Data Science Interview Questions for Top Tech Companies</a></li>\n<li><a href=\"http://www.datasciencecentral.com/profiles/blogs/66-job-interview-questions-for-data-scientists\">66 Job Interview Questions for Data Scientists</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/data-science-interview-questions/\">Top 45 Data Science Interview Questions You Must Prepare In 2021</a></li>\n<li><a href=\"https://towardsdatascience.com/top-30-data-science-interview-questions-7dd9a96d3f5c\">Top 30 data science interview questions</a></li>\n<li><a href=\"https://www.datacamp.com/community/news/top-100-data-science-interview-questions-cc3lts7gj5j\">Top 100 Data science interview questions</a></li>\n<li><a href=\"https://hackr.io/blog/data-science-interview-questions\">Data Science Interview Questions</a></li>\n<li><a href=\"https://hackernoon.com/160-data-science-interview-questions-415s3y2a\">160+ Data Science Interview Questions</a></li>\n</ul>"},{"url":"/docs/community/video-chat/","relativePath":"docs/community/video-chat.md","relativeDir":"docs/community","base":"video-chat.md","name":"video-chat","frontmatter":{"title":"Video Chat","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Zumzi Instant Messenger</h1>\n<iframe src=\"https://zumzi-chat-messenger.vercel.app/web/login.html\" height=\"1000px\" width=\"1400px\"></iframe>\n<p><a class=\"github-corner\" href=\"https://github.com/bgoonz/zumzi-chat-messenger\" aria-label=\"View source on Github\"><svg aria-hidden=\"true\" width=\"40\" height=\"40\" viewBox=\"0 0 250 250\" style=\"z-index: 100000; fill: black; color: rgb(255, 255, 255); position: fixed; top: 0px; border: 0px; left: 0px; transform: scale(-1.5, 1.5);\"><path d=\"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z\"></path><path class=\"octo-arm\" 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;\"></path><path class=\"octo-body\" 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\"></path></svg></a></p>"},{"url":"/docs/content/bash-intro/","relativePath":"docs/content/bash-intro.md","relativeDir":"docs/content","base":"bash-intro.md","name":"bash-intro","frontmatter":{"title":"Tuning Command Line History in Bash - ShellHacks","weight":0,"seo":{"title":" Tuning Command Line History in Bash - ShellHacks","description":" Tips that can help you to improve you Bash history file. You will learn how to add date and time to bash history file, increase history size, ignore specific commands and much more … Every command that you enter, is stored in the file ~/.bash_history. Run history to see your last commands.","robots":[],"extra":[]},"template":"docs"},"html":"<h1>7 Tips - Tuning Command Line History in Bash - ShellHacks</h1>\n<blockquote>\n<p>7 Tips that can help you to improve you Bash history file. You will learn how to add date and time to bash history file, increase history size, ignore specific commands and much more … Every command that you enter, is stored in the file ~/.bash_history. Run history to see your last commands. You can […]</p>\n</blockquote>\n<p>7 Tips that can help you to improve you Bash history file.</p>\n<p>You will learn how to add date and time to bash history file, increase history size, ignore specific commands and much more …</p>\n<p>Every command that you enter, is stored in the file <strong>~/.bash_history</strong>. Run <strong>history</strong> to see your last commands.</p>\n<p>You can improve your Bash history, appending different environment variables to your <code>~/.bashrc</code> file.</p>\n<p>After modifying <code>~/.bashrc</code> file, execute the following command to apply changes:</p>\n<p>source ~/.bashrc</p>\n<h2>1. Add Date and Time to Bash History</h2>\n<p>Sometimes it would be very nice to know when some command got executed.</p>\n<p>Set <code>HISTTIMEFORMAT</code> to print the time stamps associated with each history entry.</p>\n<p>Append the following line to <code>~/.bashrc</code> file:</p>\n<p>export HISTTIMEFORMAT=\"%h %d %H:%M:%S \"</p>\n<p>Now, when you type <strong>history</strong>, it will show something like:</p>\n<p>113 Jun 08 16:31:06 sudo ifconfig\n114 Jun 08 16:31:10 top\n115 Jun 08 16:31:19 ping 8.8.8.8\n116 Jun 08 16:31:22 history</p>\n<h2>2. Increase Bash History Size</h2>\n<p>Increase <code>HISTSIZE</code> - the number of commands to remember in the command history (the default value is 500).</p>\n<p>export HISTSIZE=10000</p>\n<p>Increase <code>HISTFILESIZE</code> - the maximum number of lines contained in the history file (the default value is 500).</p>\n<p>export HISTFILESIZE=10000</p>\n<h2>3. Append Bash Commands to History File</h2>\n<p>Bash overwrites <code>.bash_history</code> file?</p>\n<p>To append commands to the history file, rather than overwrite it, add the following line to <code>~/.bashrc</code>:</p>\n<p>shopt -s histappend</p>\n<h2>4. Store Bash History Immediately</h2>\n<p>By default, Bash only records a session to the <code>.bash_history</code> file when the session terminates.</p>\n<p>This means that if you crash or your session terminates improperly, you lose the history up to that point.</p>\n<p>Use <code>$PROMPT_COMMAND</code> variable to save each command right after it has been executed.</p>\n<p>Append the following line to <code>~/.bashrc</code> file, if the variable <code>$PROMPT_COMMAND</code> hasn't been set yet:</p>\n<p>PROMPT_COMMAND='history -a'</p>\n<p>Append the following line, if the variable <code>$PROMPT_COMMAND</code> has already been set:</p>\n<p>PROMPT<em>COMMAND='$PROMPT</em>COMMAND; history -a'</p>\n<h2>5. Control Bash History</h2>\n<p><code>HISTCONTROL</code> is a colon-separated list of values controlling how commands are saved in the history file.</p>\n<table>\n<thead>\n<tr>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ignorespace</td>\n<td>don't save lines which begin with a <space> character</td>\n</tr>\n<tr>\n<td>ignoredups</td>\n<td>don't save lines matching the previous history entry</td>\n</tr>\n<tr>\n<td>ignoreboth</td>\n<td>use both 'ignorespace' and 'ignoredups'</td>\n</tr>\n<tr>\n<td>erasedups</td>\n<td>eliminate duplicates across the whole history</td>\n</tr>\n</tbody>\n</table>\n<p>Example:</p>\n<p>export HISTCONTROL=ignorespace:erasedups</p>\n<h2>6. Ignore Specific Commands</h2>\n<p><code>HISTIGNORE</code> is a colon-separated list of patterns used to decide which command lines should be saved in the history file.</p>\n<p>Don't save <code>ls</code>, <code>ps</code> and <code>history</code> commands:</p>\n<p>export HISTIGNORE=\"ls:ps:history\"</p>\n<p>Don't save commands with <code>s</code> in the beginig:</p>\n<p>export HISTIGNORE=\"s*\"</p>\n<h2>7. Use one command per line</h2>\n<p>Store multi-line commands in one history entry:</p>\n<p>shopt -s cmdhist</p>\n<h2>Change the History File Name</h2>\n<p>Use <code>HISTFILE</code> to change the name of the file in which Bash history is saved. The default value is <code>~/.bash_history</code>.</p>\n<p>export HISTFILE=~/.custom_file</p>\n<p><a href=\"https://www.shellhacks.com/tune-command-line-history-bash/\">Source</a></p>"},{"url":"/docs/content/algo/","relativePath":"docs/content/algo.md","relativeDir":"docs/content","base":"algo.md","name":"algo","frontmatter":{"title":"Algorithms & Data Structures","subtitle":"The Algorithms & Data Structures provides you with a blueprint of default post and page styles.","image":"images/5.jpg","seo":{"title":"Algorithms & Data Structures","description":"A reference for suggested typographic treatment and styles for your content","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Algorithms & Data Structures","keyName":"property"},{"name":"og:description","value":"A reference for suggested typographic treatment and styles for your content","keyName":"property"},{"name":"og:image","value":"images/5.jpg","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_large_image"},{"name":"twitter:title","value":"Algorithms & Data Structures"},{"name":"twitter:description","value":"A reference for suggested typographic treatment and styles for your content"},{"name":"twitter:image","value":"images/5.jpg","relativeUrl":true}]},"template":"docs"},"html":"<h1>Fundamental Data Structures In JavaScript</h1>\n<br>\n<br>\n<br>\n<h1>   Algorithms </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz-branch-the-algos.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>  The Algos Bgoonz Branch </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://thealgorithms.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" height=\"1400\" src=\"https://ds-algo-official.netlify.app/\" frameborder=\"0\" allowfullscreen style=\"zoom:0.7;\"></iframe>\n<p>Fundamental Data Structures In JavaScript</p>\n<h2>Data structures in JavaScript</h2>\n<p>Here's a website I created to practice data structures!\n<a href=\"https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/\"><strong>directory</strong>\n<em>Edit description</em>ds-algo-official-c3dw6uapg-bgoonz.vercel.app</a></p>\n<p>Here's the repo that the website is built on:\n<a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><strong>bgoonz/DS-ALGO-OFFICIAL</strong>\n<em>Navigation ####Author:Bryan Guner Big O notation is the language we use for talking about how long an algorithm takes…</em>github.com</a></p>\n<h2>Resources (article content below):</h2>\n<h3>Videos</h3>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=0IAPZzGSbME&#x26;list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O&#x26;index=2&#x26;t=0s\">Abdul Bari: YouTubeChannel for Algorithms</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/0IAPZzGSbME\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=lxja8wBwN0k&#x26;list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s\">Data Structures and algorithms</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/lxja8wBwN0k\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/playlist?list=PLmGElG-9wxc9Us6IK6Qy-KHlG_F3IS6Q9\">Data Structures and algorithms Course</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/videoseries?list=PLmGElG-9wxc9Us6IK6Qy-KHlG_F3IS6Q9\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.khanacademy.org/computing/computer-science/algorithms\">Khan Academy</a></li>\n</ul>\n<iframe width=\"714\" height=\"401\" src=\"https://www.youtube.com/embed/CvSOaYi89B4\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/playlist?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P\">Data structures by mycodeschool</a>Pre-requisite for this lesson is good understanding of pointers in C.</li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/videoseries?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=HtSuA80QTyo&#x26;list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb\">MIT 6.006: Intro to Algorithms(2011)</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/HtSuA80QTyo\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=5_5oE5lgrhw&#x26;list=PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi\">Data Structures and Algorithms by Codewithharry</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/5_5oE5lgrhw\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<h3>Books</h3>\n<ul>\n<li><a href=\"https://edutechlearners.com/download/Introduction_to_algorithms-3rd%20Edition.pdf\">Introduction to Algorithms</a> by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein</li>\n<li><a href=\"http://www.sso.sy/sites/default/files/competitive%20programming%203_1.pdf\">Competitive Programming 3</a> by Steven Halim and Felix Halim</li>\n<li><a href=\"https://cses.fi/book/book.pdf\">Competitive Programmers Hand Book</a> Beginner friendly hand book for competitive programmers.</li>\n<li><a href=\"https://github.com/Amchuz/My-Data-Structures-and-Algorithms-Resources/raw/master/Books/Data%20Structures%20and%20Algorithms%20-%20Narasimha%20Karumanchi.pdf\">Data Structures and Algorithms Made Easy</a> by Narasimha Karumanchi</li>\n<li><a href=\"https://github.com/Amchuz/My-Data-Structures-and-Algorithms-Resources/raw/master/Books/Learning%20Algorithms%20Through%20Programming%20and%20Puzzle%20Solving.pdf\">Learning Algorithms Through Programming and Puzzle Solving</a> by Alexander Kulikov and Pavel Pevzner</li>\n</ul>\n<h3>Coding practice</h3>\n<ul>\n<li><a href=\"https://leetcode.com/\">LeetCode</a></li>\n<li><a href=\"https://www.interviewbit.com/\">InterviewBit</a></li>\n<li><a href=\"https://codility.com/\">Codility</a></li>\n<li><a href=\"https://www.hackerrank.com/\">HackerRank</a></li>\n<li><a href=\"https://projecteuler.net/\">Project Euler</a></li>\n<li><a href=\"https://spoj.com/\">Spoj</a></li>\n<li><a href=\"https://code.google.com/codejam/contests.html\">Google Code Jam practice problems</a></li>\n<li><a href=\"https://www.hackerearth.com/\">HackerEarth</a></li>\n<li><a href=\"https://www.topcoder.com/\">Top Coder</a></li>\n<li><a href=\"https://www.codechef.com/\">CodeChef</a></li>\n<li><a href=\"https://www.codewars.com/\">Codewars</a></li>\n<li><a href=\"https://codesignal.com/\">CodeSignal</a></li>\n<li><a href=\"http://codekata.com/\">CodeKata</a></li>\n<li><a href=\"https://www.firecode.io/\">Firecode</a></li>\n</ul>\n<h3>Courses</h3>\n<ul>\n<li><a href=\"https://academy.zerotomastery.io/p/master-the-coding-interview-faang-interview-prep\">Master the Coding Interview: Big Tech (FAANG) Interviews</a> Course by Andrei and his team.</li>\n<li><a href=\"https://realpython.com/python-data-structures\">Common Python Data Structures</a> Data structures are the fundamental constructs around which you build your programs. Each data structure provides a particular way of organizing data so it can be accessed efficiently, depending on your use case. Python ships with an extensive set of data structures in its standard library.</li>\n<li><a href=\"https://www.geeksforgeeks.org/fork-cpp-course-structure\">Fork CPP</a> A good course for beginners.</li>\n<li><a href=\"https://codeforces.com/edu/course/2\">EDU</a> Advanced course.</li>\n<li><a href=\"https://www.udacity.com/course/c-for-programmers--ud210\">C++ For Programmers</a> Learn features and constructs for C++.</li>\n</ul>\n<h3>Guides</h3>\n<ul>\n<li><a href=\"http://www.geeksforgeeks.org/\">GeeksForGeeks — A CS portal for geeks</a></li>\n<li><a href=\"https://www.learneroo.com/subjects/8\">Learneroo — Algorithms</a></li>\n<li><a href=\"http://www.topcoder.com/tc?d1=tutorials&#x26;d2=alg_index&#x26;module=Static\">Top Coder tutorials</a></li>\n<li><a href=\"http://www.infoarena.ro/training-path\">Infoarena training path</a> (RO)</li>\n<li>Steven &#x26; Felix Halim — <a href=\"https://uva.onlinejudge.org/index.php?option=com_onlinejudge&#x26;Itemid=8&#x26;category=118\">Increasing the Lower Bound of Programming Contests</a> (UVA Online Judge)</li>\n</ul>\n<h2><strong><em>space</em></strong></h2>\n<blockquote>\n<p><em>The space complexity represents the memory consumption of a data structure. As for most of the things in life, you can't have it all, so it is with the data structures. You will generally need to trade some time for space or the other way around.</em></p>\n</blockquote>\n<h2><em>time</em></h2>\n<blockquote>\n<p><em>The time complexity for a data structure is in general more diverse than its space complexity.</em></p>\n</blockquote>\n<h2><em>Several operations</em></h2>\n<blockquote>\n<p><em>In contrary to algorithms, when you look at the time complexity for data structures you need to express it for several operations that you can do with data structures. It can be adding elements, deleting elements, accessing an element or even searching for an element.</em></p>\n</blockquote>\n<h2><em>Dependent on data</em></h2>\n<blockquote>\n<p><em>Something that data structure and algorithms have in common when talking about time complexity is that they are both dealing with data. When you deal with data you become dependent on them and as a result the time complexity is also dependent of the data that you received. To solve this problem we talk about 3 different time complexity.</em></p>\n</blockquote>\n<ul>\n<li><strong>The best-case complexity: when the data looks the best</strong></li>\n<li><strong>The worst-case complexity: when the data looks the worst</strong></li>\n<li><strong>The average-case complexity: when the data looks average</strong></li>\n</ul>\n<h2>Big O notation</h2>\n<p>The complexity is usually expressed with the Big O notation. The wikipedia page about this subject is pretty complex but you can find here a good summary of the different complexity for the most famous data structures and sorting algorithms.</p>\n<h2>The Array data structure</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*Qk3UYgeqXamRrFLR.gif\"></p>\n<h2>Definition</h2>\n<p>An Array data structure, or simply an Array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. The simplest type of data structure is a linear array, also called one-dimensional array. From Wikipedia</p>\n<p>Arrays are among the oldest and most important data structures and are used by every program. They are also used to implement many other data structures.</p>\n<p><em>Complexity</em>\n<em>Average</em>\n<em>Access Search Insertion Deletion</em></p>\n<p>O(1) O(n) O(1) O(n)</p>\n<pre><code class=\"language-js\">class ArrayADT {\n    constructor() {\n        this.array = [];\n    }\n\n    add(data) {\n        this.array.push(data);\n    }\n\n    remove(data) {\n        this.array = this.array.filter((current) => current !== data);\n    }\n\n    search(data) {\n        const foundIndex = this.array.indexOf(data);\n        if (foundIndex === -1) {\n            return foundIndex;\n        }\n\n        return null;\n    }\n\n    getAtIndex(index) {\n        return this.array[index];\n    }\n\n    length() {\n        return this.array.length;\n    }\n\n    print() {\n        console.log(this.array.join(' '));\n    }\n}\n\nconst array = new ArrayADT();\nconsole.log('const array = new ArrayADT();: ', array);\nconsole.log('-------------------------------');\n\nconsole.log('array.add(1): ', array.add(1));\narray.add(3);\narray.add(4);\nconsole.log('array.add(2);: ', array.add(2), 'array.add(3);', array.add(3), 'array.add(4); ', array.add(4));\n\nconsole.log('-------------------------------');\narray.print();\nconsole.log('-------------------------------');\n\nconsole.log('search 3 gives index 2:', array.search(3));\nconsole.log('-------------------------------');\n\nconsole.log('getAtIndex 2 gives 3:', array.getAtIndex(2));\nconsole.log('-------------------------------');\n\nconsole.log('length is 4:', array.length());\nconsole.log('-------------------------------');\n\narray.remove(3);\narray.print();\nconsole.log('-------------------------------');\n\narray.add(5);\narray.add(5);\narray.print();\nconsole.log('-------------------------------');\n\narray.remove(5);\narray.print();\nconsole.log('-------------------------------');\n/*\n     ~ final : (master) node 01-array.js \n    const array = new ArrayADT();:  ArrayADT { array: [] }\n    -------------------------------\n    array.add(1):  undefined\n    array.add(2);:  undefined array.add(3); undefined array.add(4);  undefined\n    -------------------------------\n    1 3 4 2 3 4\n    -------------------------------\n    search 3 gives index 2: null\n    -------------------------------\n    getAtIndex 2 gives 3: 4\n    -------------------------------\n    length is 4: 6\n    -------------------------------\n    1 4 2 4\n    -------------------------------\n    1 4 2 4 5 5\n    -------------------------------\n    1 4 2 4\n    -------------------------------\n     ~ final : (master) \n     */\n</code></pre>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/1*-BJ2hU-CZO2kuzu4x5a53g.png\"></p>\n<p>indexvalue0 … this is the first value, stored at zero position</p>\n<ol>\n<li>The index of an array <strong>runs in sequence</strong></li>\n<li>This could be useful for storing data that are required to be ordered, such as rankings or queues</li>\n<li>In JavaScript, array's value could be mixed; meaning value of each index could be of different data, be it String, Number or even Objects</li>\n</ol>\n<pre><code class=\"language-js\">    // 1. Creating Arrays\n    let firstArray = [\"a\",\"b\",\"c\"];\n    let secondArray = [\"d\",\"e\",\"f\"];\n\n    // 2. Access an Array Item\n    console.log(firstArray[0]); // Results: \"a\"\n\n    // 3. Loop over an Array\n    firstArray.forEach(function(item, index, array){\n        console.log(item, index);\n    });\n    // Results:\n    // a 0\n    // b 1\n    // c 2\n\n    // 4. Add new item to END of array\n    secondArray.push('g');\n    console.log(secondArray);\n    // Results: [\"d\",\"e\",\"f\", \"g\"]\n\n    // 5. Remove item from END of array\n    secondArray.pop();\n    console.log(secondArray);\n    // Results: [\"d\",\"e\",\"f\"]\n\n    // 6. Remove item from FRONT of array\n    secondArray.shift();\n    console.log(secondArray);\n    // Results: [\"e\",\"f\"]\n\n    // 7. Add item to FRONT of array\n    secondArray.unshift(\"d\");\n    console.log(secondArray);\n    // Results: [\"d\",\"e\",\"f\"]\n\n    // 8. Find INDEX of an item in array\n    let position = secondArray.indexOf('f');\n    // Results: 2\n\n    // 9. Remove Item by Index Position\n    secondArray.splice(position, 1);\n    console.log(secondArray);\n    // Note, the second argument, in this case \"1\",\n    // represent the number of array elements to be removed\n    // Results:  [\"d\",\"e\"]\n\n    // 10. Copy an Array\n    let shallowCopy = secondArray.slice();\n    console.log(secondArray);\n    console.log(shallowCopy);\n    // Results: ShallowCopy === [\"d\",\"e\"]\n\n    // 11. JavaScript properties that BEGIN with a digit MUST be accessed using bracket notation\n    renderer.3d.setTexture(model, 'character.png');     // a syntax error\n    renderer['3d'].setTexture(model, 'character.png');  // works properly\n\n\n    // 12. Combine two Arrays\n    let thirdArray = firstArray.concat(secondArray);\n    console.log(thirdArray);\n    // [\"a\",\"b\",\"c\", \"d\", \"e\"];\n\n    // 13. Combine all Array elements into a string\n    console.log(thirdArray.join()); // Results: a,b,c,d,e\n    console.log(thirdArray.join('')); // Results: abcde\n    console.log(thirdArray.join('-')); // Results: a-b-c-d-e\n\n    // 14. Reversing an Array (in place, i.e. destructive)\n    console.log(thirdArray.reverse()); // [\"e\", \"d\", \"c\", \"b\", \"a\"]\n\n    // 15. sort\n    let unsortedArray = [\"Alphabet\", \"Zoo\", \"Products\", \"Computer Science\", \"Computer\"];\n    console.log(unsortedArray.sort());\n    // Results: [\"Alphabet\", \"Computer\", \"Computer Science\", \"Products\", \"Zoo\" ]\n</code></pre>\n<h2>2. Objects</h2>\n<p>Think of objects as a logical grouping of a bunch of properties.</p>\n<p>Properties could be some variable that it's storing or some methods that it's using.</p>\n<p>I also visualize an object as a table.</p>\n<p>The main difference is that object's \"index\" need not be numbers and is not necessarily sequenced.</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/2572/1*KVZkD2zrgEa_47igW8Hq8g.png\"></p>\n<pre><code class=\"language-js\">// 16. Creating an Object\n\nlet newObj = {\n    name: \"I'm an object\",\n    values: [1, 10, 11, 20],\n    others: '',\n    '1property': 'example of property name starting with digit'\n};\n\n// 17. Figure out what keys/properties are in an object\nconsole.log(Object.keys(newObj));\n// Results: [ 'name', 'values', 'others', '1property' ]\n\n// 18. Show all values stored in the object\nconsole.log(Object.values(newObj));\n\n// Results:\n// [ 'I\\'m an object',\n//   [ 1, 10, 11, 20 ],\n//   '',\n//   'example of property name starting with digit' ]\n\n// 19. Show all key and values of the object\nfor (let [key, value] of Object.entries(newObj)) {\n    console.log(`${key}: ${value}`);\n}\n// Results:\n// name: I'm an object\n// values: 1,10,11,20\n// others:\n// 1property: example of property name starting with digit\n\n// 20. Accessing Object's Properties\n// Two different ways to access properties, both produce same results\nconsole.log(newObj.name);\nconsole.log(newObj['name']);\n\n// But if the property name starts with a digit,\n// we CANNOT use dot notation\nconsole.log(newObj['1property']);\n\n// 21. Adding a Method to an Object\nnewObj.helloWorld = function () {\n    console.log('Hello World from inside an object!');\n};\n\n// 22. Invoking an Object's Method\nnewObj.helloWorld();\n</code></pre>\n<h2>The Hash Table</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*avbxLAFocSV6vsl5.gif\"></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/2048/0*3GJiRoLyEoZ_aIlO\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Hash Table (Hash Map) is a data structure used to implement an associative array, a structure that can map keys to values. A Hash Table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found. From Wikipedia</em></p>\n</blockquote>\n<p>Hash Tables are considered the more efficient data structure for lookup and for this reason, they are widely used.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion</p>\n<ul>\n<li>\n<p>O(1) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n</li>\n</ul>\n<p>Note, here I am storing another object for every hash in my Hash Table.</p>\n<pre><code class=\"language-js\">class HashTable {\n    constructor(size) {\n        this.values = {};\n        this.numberOfValues = 0;\n        this.size = size;\n    }\n    add(key, value) {\n        let hash = this.calculateHash(key);\n        if (!this.values.hasOwnProperty(hash)) {\n            this.values[hash] = {};\n        }\n        if (!this.values[hash].hasOwnProperty(key)) {\n            this.numberOfValues++;\n        }\n        this.values[hash][key] = value;\n    }\n    remove(key) {\n        let hash = this.calculateHash(key);\n        if (this.values.hasOwnProperty(hash) &#x26;&#x26; this.values[hash].hasOwnProperty(key)) {\n            delete this.values[hash][key];\n            this.numberOfValues--;\n        }\n    }\n    calculateHash(key) {\n        return key.toString().length % this.size;\n    }\n    search(key) {\n        let hash = this.calculateHash(key);\n        if (this.values.hasOwnProperty(hash) &#x26;&#x26; this.values[hash].hasOwnProperty(key)) {\n            return this.values[hash][key];\n        } else {\n            return null;\n        }\n    }\n    length() {\n        return this.numberOfValues;\n    }\n    print() {\n        let string = '';\n        for (let value in this.values) {\n            for (let key in this.values[value]) {\n                string += this.values[value][key] + ' ';\n            }\n        }\n        console.log(string.trim());\n    }\n}\nlet hashTable = new HashTable(3);\nhashTable.add('first', 1);\nhashTable.add('second', 2);\nhashTable.add('third', 3);\nhashTable.add('fourth', 4);\nhashTable.add('fifth', 5);\nhashTable.print(); // => 2 4 1 3 5\nconsole.log('length gives 5:', hashTable.length()); // => 5\nconsole.log('search second gives 2:', hashTable.search('second')); // => 2\nhashTable.remove('fourth');\nhashTable.remove('first');\nhashTable.print(); // => 2 3 5\nconsole.log('length gives 3:', hashTable.length()); // => 3\n/*\n       ~ js-files : (master) node hash.js \n    2 4 1 3 5\n    length gives 5: 5\n    search second gives 2: 2\n    2 3 5\n    length gives 3: 3\n    */\n</code></pre>\n<h2>The Set</h2>\n<h2>Sets</h2>\n<p>Sets are pretty much what it sounds like. It's the same intuition as Set in Mathematics. I visualize Sets as Venn Diagrams.</p>\n<pre><code class=\"language-js\">// 23. Creating a new Set\nlet newSet = new Set();\n\n// 24. Adding new elements to a set\nnewSet.add(1); // Set[1]\nnewSet.add('text'); // Set[1, \"text\"]\n\n// 25. Check if element is in set\nnewSet.has(1); // true\n\n// 24. Check size of set\nconsole.log(newSet.size); // Results: 2\n\n// 26. Delete element from set\nnewSet.delete(1); // Set[\"text\"]\n\n// 27. Set Operations: isSuperSet\nfunction isSuperset(set, subset) {\n    for (let elem of subset) {\n        if (!set.has(elem)) {\n            return false;\n        }\n    }\n    return true;\n}\n// 28. Set Operations: union\nfunction union(setA, setB) {\n    let _union = new Set(setA);\n    for (let elem of setB) {\n        _union.add(elem);\n    }\n    return _union;\n}\n\n// 29. Set Operations: intersection\nfunction intersection(setA, setB) {\n    let _intersection = new Set();\n    for (let elem of setB) {\n        if (setA.has(elem)) {\n            _intersection.add(elem);\n        }\n    }\n    return _intersection;\n}\n// 30. Set Operations: symmetricDifference\nfunction symmetricDifference(setA, setB) {\n    let _difference = new Set(setA);\n    for (let elem of setB) {\n        if (_difference.has(elem)) {\n            _difference.delete(elem);\n        } else {\n            _difference.add(elem);\n        }\n    }\n    return _difference;\n}\n// 31. Set Operations: difference\nfunction difference(setA, setB) {\n    let _difference = new Set(setA);\n    for (let elem of setB) {\n        _difference.delete(elem);\n    }\n    return _difference;\n}\n\n// Examples\nlet setA = new Set([1, 2, 3, 4]);\nlet setB = new Set([2, 3]);\nlet setC = new Set([3, 4, 5, 6]);\n\nconsole.log(isSuperset(setA, setB)); // => true\nconsole.log(union(setA, setC)); // => Set [1, 2, 3, 4, 5, 6]\nconsole.log(intersection(setA, setC)); // => Set [3, 4]\nconsole.log(symmetricDifference(setA, setC)); // => Set [1, 2, 5, 6]\nconsole.log(difference(setA, setC)); // => Set [1, 2]\n</code></pre>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*gOE33ANZP2ujbjIG\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Set is an abstract data type that can store certain values, without any particular order, and no repeated values. It is a computer implementation of the mathematical concept of a finite Set. From Wikipedia</em></p>\n</blockquote>\n<p>The Set data structure is usually used to test whether elements belong to set of values. Rather then only containing elements, Sets are more used to perform operations on multiple values at once with methods such as union, intersect, etc…</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion</p>\n<ul>\n<li>\n<p>O(n) O(n) O(n)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n</li>\n</ul>\n<pre><code class=\"language-js\">function Set() {\n    this.values = [];\n    this.numberOfValues = 0;\n}\n\nSet.prototype.add = function (value) {\n    if (!~this.values.indexOf(value)) {\n        this.values.push(value);\n        this.numberOfValues++;\n    }\n};\nSet.prototype.remove = function (value) {\n    let index = this.values.indexOf(value);\n    if (~index) {\n        this.values.splice(index, 1);\n        this.numberOfValues--;\n    }\n};\nSet.prototype.contains = function (value) {\n    return this.values.indexOf(value) !== -1;\n};\nSet.prototype.union = function (set) {\n    let newSet = new Set();\n    set.values.forEach(function (value) {\n        newSet.add(value);\n    });\n    this.values.forEach(function (value) {\n        newSet.add(value);\n    });\n    return newSet;\n};\nSet.prototype.intersect = function (set) {\n    let newSet = new Set();\n    this.values.forEach(function (value) {\n        if (set.contains(value)) {\n            newSet.add(value);\n        }\n    });\n    return newSet;\n};\nSet.prototype.difference = function (set) {\n    let newSet = new Set();\n    this.values.forEach(function (value) {\n        if (!set.contains(value)) {\n            newSet.add(value);\n        }\n    });\n    return newSet;\n};\nSet.prototype.isSubset = function (set) {\n    return set.values.every(function (value) {\n        return this.contains(value);\n    }, this);\n};\nSet.prototype.length = function () {\n    return this.numberOfValues;\n};\nSet.prototype.print = function () {\n    console.log(this.values.join(' '));\n};\n\nlet set = new Set();\nset.add(1);\nset.add(2);\nset.add(3);\nset.add(4);\nset.print(); // => 1 2 3 4\nset.remove(3);\nset.print(); // => 1 2 4\nconsole.log('contains 4 is true:', set.contains(4)); // => true\nconsole.log('contains 3 is false:', set.contains(3)); // => false\nconsole.log('---');\nlet set1 = new Set();\nset1.add(1);\nset1.add(2);\nlet set2 = new Set();\nset2.add(2);\nset2.add(3);\nlet set3 = set2.union(set1);\nset3.print(); // => 1 2 3\nlet set4 = set2.intersect(set1);\nset4.print(); // => 2\nlet set5 = set.difference(set3); // 1 2 4 diff 1 2 3\nset5.print(); // => 4\nlet set6 = set3.difference(set); // 1 2 3 diff 1 2 4\nset6.print(); // => 3\nconsole.log('set1 subset of set is true:', set.isSubset(set1)); // => true\nconsole.log('set2 subset of set is false:', set.isSubset(set2)); // => false\nconsole.log('set1 length gives 2:', set1.length()); // => 2\nconsole.log('set3 length gives 3:', set3.length()); // => 3\n</code></pre>\n<h2>The Singly Linked List</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2048/0*fLs64rV-Xq19aVCA.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Singly Linked List is a linear collection of data elements, called nodes pointing to the next node by means of pointer. It is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of data and a reference (in other words, a link) to the next node in the sequence.</em></p>\n</blockquote>\n<p>Linked Lists are among the simplest and most common data structures because it allows for efficient insertion or removal of elements from any position in the sequence.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code class=\"language-js\">function Node(data) {\n    this.data = data;\n    this.next = null;\n}\n\nfunction SinglyLinkedList() {\n    this.head = null;\n    this.tail = null;\n    this.numberOfValues = 0;\n}\n\nSinglyLinkedList.prototype.add = function (data) {\n    let node = new Node(data);\n    if (!this.head) {\n        this.head = node;\n        this.tail = node;\n    } else {\n        this.tail.next = node;\n        this.tail = node;\n    }\n    this.numberOfValues++;\n};\nSinglyLinkedList.prototype.remove = function (data) {\n    let previous = this.head;\n    let current = this.head;\n    while (current) {\n        if (current.data === data) {\n            if (current === this.head) {\n                this.head = this.head.next;\n            }\n            if (current === this.tail) {\n                this.tail = previous;\n            }\n            previous.next = current.next;\n            this.numberOfValues--;\n        } else {\n            previous = current;\n        }\n        current = current.next;\n    }\n};\nSinglyLinkedList.prototype.insertAfter = function (data, toNodeData) {\n    let current = this.head;\n    while (current) {\n        if (current.data === toNodeData) {\n            let node = new Node(data);\n            if (current === this.tail) {\n                this.tail.next = node;\n                this.tail = node;\n            } else {\n                node.next = current.next;\n                current.next = node;\n            }\n            this.numberOfValues++;\n        }\n        current = current.next;\n    }\n};\nSinglyLinkedList.prototype.traverse = function (fn) {\n    let current = this.head;\n    while (current) {\n        if (fn) {\n            fn(current);\n        }\n        current = current.next;\n    }\n};\nSinglyLinkedList.prototype.length = function () {\n    return this.numberOfValues;\n};\nSinglyLinkedList.prototype.print = function () {\n    let string = '';\n    let current = this.head;\n    while (current) {\n        string += current.data + ' ';\n        current = current.next;\n    }\n    console.log(string.trim());\n};\n\nlet singlyLinkedList = new SinglyLinkedList();\nsinglyLinkedList.print(); // => ''\nsinglyLinkedList.add(1);\nsinglyLinkedList.add(2);\nsinglyLinkedList.add(3);\nsinglyLinkedList.add(4);\nsinglyLinkedList.print(); // => 1 2 3 4\nconsole.log('length is 4:', singlyLinkedList.length()); // => 4\nsinglyLinkedList.remove(3); // remove value\nsinglyLinkedList.print(); // => 1 2 4\nsinglyLinkedList.remove(9); // remove non existing value\nsinglyLinkedList.print(); // => 1 2 4\nsinglyLinkedList.remove(1); // remove head\nsinglyLinkedList.print(); // => 2 4\nsinglyLinkedList.remove(4); // remove tail\nsinglyLinkedList.print(); // => 2\nconsole.log('length is 1:', singlyLinkedList.length()); // => 1\nsinglyLinkedList.add(6);\nsinglyLinkedList.print(); // => 2 6\nsinglyLinkedList.insertAfter(3, 2);\nsinglyLinkedList.print(); // => 2 3 6\nsinglyLinkedList.insertAfter(4, 3);\nsinglyLinkedList.print(); // => 2 3 4 6\nsinglyLinkedList.insertAfter(5, 9); // insertAfter a non existing node\nsinglyLinkedList.print(); // => 2 3 4 6\nsinglyLinkedList.insertAfter(5, 4);\nsinglyLinkedList.insertAfter(7, 6); // insertAfter the tail\nsinglyLinkedList.print(); // => 2 3 4 5 6 7\nsinglyLinkedList.add(8); // add node with normal method\nsinglyLinkedList.print(); // => 2 3 4 5 6 7 8\nconsole.log('length is 7:', singlyLinkedList.length()); // => 7\nsinglyLinkedList.traverse(function (node) {\n    node.data = node.data + 10;\n});\nsinglyLinkedList.print(); // => 12 13 14 15 16 17 18\nsinglyLinkedList.traverse(function (node) {\n    console.log(node.data);\n}); // => 12 13 14 15 16 17 18\nconsole.log('length is 7:', singlyLinkedList.length()); // => 7\n</code></pre>\n<h2>The Doubly Linked List</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*TQXiR-L_itiG3WP-.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Doubly Linked List is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. From Wikipedia</em></p>\n</blockquote>\n<p>Having two node links allow traversal in either direction but adding or removing a node in a doubly linked list requires changing more links than the same operations on a Singly Linked List.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>class Node {\n    constructor(data) {\n        this.data = data;\n        this.previous = null;\n        this.next = null;\n    }\n}\nclass DoublyLinkedList {\n    constructor() {\n        this.head = null;\n        this.tail = null;\n        this.numberOfValues = 0;\n    }\n\n    add(data) {\n        let node = new Node(data);\n        if (!this.head) {\n            this.head = node;\n            this.tail = node;\n        } else {\n            node.previous = this.tail;\n            this.tail.next = node;\n            this.tail = node;\n        }\n        this.numberOfValues++;\n    }\n    remove(data) {\n        let current = this.head;\n        while (current) {\n            if (current.data === data) {\n                if (current === this.head &#x26;&#x26; current === this.tail) {\n                    this.head = null;\n                    this.tail = null;\n                } else if (current === this.head) {\n                    this.head = this.head.next;\n                    this.head.previous = null;\n                } else if (current === this.tail) {\n                    this.tail = this.tail.previous;\n                    this.tail.next = null;\n                } else {\n                    current.previous.next = current.next;\n                    current.next.previous = current.previous;\n                }\n                this.numberOfValues--;\n            }\n            current = current.next;\n        }\n    }\n    insertAfter(data, toNodeData) {\n        let current = this.head;\n        while (current) {\n            if (current.data === toNodeData) {\n                let node = new Node(data);\n                if (current === this.tail) {\n                    this.add(data);\n                } else {\n                    current.next.previous = node;\n                    node.previous = current;\n                    node.next = current.next;\n                    current.next = node;\n                    this.numberOfValues++;\n                }\n            }\n            current = current.next;\n        }\n    }\n    traverse(fn) {\n        let current = this.head;\n        while (current) {\n            if (fn) {\n                fn(current);\n            }\n            current = current.next;\n        }\n    }\n    traverseReverse(fn) {\n        let current = this.tail;\n        while (current) {\n            if (fn) {\n                fn(current);\n            }\n            current = current.previous;\n        }\n    }\n    length() {\n        return this.numberOfValues;\n    }\n    print() {\n        let string = \"\";\n        let current = this.head;\n        while (current) {\n            string += current.data + \" \";\n            current = current.next;\n        }\n        console.log(string.trim());\n    }\n}\n\nlet doublyLinkedList = new DoublyLinkedList();\ndoublyLinkedList.print(); // => ''\ndoublyLinkedList.add(1);\ndoublyLinkedList.add(2);\ndoublyLinkedList.add(3);\ndoublyLinkedList.add(4);\ndoublyLinkedList.print(); // => 1 2 3 4\nconsole.log(\"length is 4:\", doublyLinkedList.length()); // => 4\ndoublyLinkedList.remove(3); // remove value\ndoublyLinkedList.print(); // => 1 2 4\ndoublyLinkedList.remove(9); // remove non existing value\ndoublyLinkedList.print(); // => 1 2 4\ndoublyLinkedList.remove(1); // remove head\ndoublyLinkedList.print(); // => 2 4\ndoublyLinkedList.remove(4); // remove tail\ndoublyLinkedList.print(); // => 2\nconsole.log(\"length is 1:\", doublyLinkedList.length()); // => 1\ndoublyLinkedList.remove(2); // remove tail, the list should be empty\ndoublyLinkedList.print(); // => ''\nconsole.log(\"length is 0:\", doublyLinkedList.length()); // => 0\ndoublyLinkedList.add(2);\ndoublyLinkedList.add(6);\ndoublyLinkedList.print(); // => 2 6\ndoublyLinkedList.insertAfter(3, 2);\ndoublyLinkedList.print(); // => 2 3 6\ndoublyLinkedList.traverseReverse(function (node) {\n    console.log(node.data);\n});\ndoublyLinkedList.insertAfter(4, 3);\ndoublyLinkedList.print(); // => 2 3 4 6\ndoublyLinkedList.insertAfter(5, 9); // insertAfter a non existing node\ndoublyLinkedList.print(); // => 2 3 4 6\ndoublyLinkedList.insertAfter(5, 4);\ndoublyLinkedList.insertAfter(7, 6); // insertAfter the tail\ndoublyLinkedList.print(); // => 2 3 4 5 6 7\ndoublyLinkedList.add(8); // add node with normal method\ndoublyLinkedList.print(); // => 2 3 4 5 6 7 8\nconsole.log(\"length is 7:\", doublyLinkedList.length()); // => 7\ndoublyLinkedList.traverse(function (node) {\n    node.data = node.data + 10;\n});\ndoublyLinkedList.print(); // => 12 13 14 15 16 17 18\ndoublyLinkedList.traverse(function (node) {\n    console.log(node.data);\n}); // => 12 13 14 15 16 17 18\nconsole.log(\"length is 7:\", doublyLinkedList.length()); // => 7\ndoublyLinkedList.traverseReverse(function (node) {\n    console.log(node.data);\n}); // => 18 17 16 15 14 13 12\ndoublyLinkedList.print(); // => 12 13 14 15 16 17 18\nconsole.log(\"length is 7:\", doublyLinkedList.length()); // => 7\n/*\n   ~ js-files : (master) node double-linked-list.js\n\n1 2 3 4\nlength is 4: 4\n1 2 4\n1 2 4\n2 4\n2\nlength is 1: 1\n\nlength is 0: 0\n2 6\n2 3 6\n6\n3\n2\n2 3 4 6\n2 3 4 6\n2 3 4 5 6 7\n2 3 4 5 6 7 8\nlength is 7: 7\n12 13 14 15 16 17 18\n12\n13\n14\n15\n16\n17\n18\nlength is 7: 7\n18\n17\n16\n15\n14\n13\n12\n12 13 14 15 16 17 18\nlength is 7: 7\n ~ js-files : (master)\n*/\n</code></pre>\n<h2>The Stack</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/4050/0*qsjYW-Lvfo22ecLE.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. The order in which elements come off a Stack gives rise to its alternative name, LIFO (for last in, first out). From Wikipedia</em></p>\n</blockquote>\n<p>A Stack often has a third method peek which allows to check the last pushed element without popping it.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>function Stack() {\n  this.stack = [];\n}\n\nStack.prototype.push = function(value) {\n  this.stack.push(value);\n};\nStack.prototype.pop = function() {\n  return this.stack.pop();\n};\nStack.prototype.peek = function() {\n  return this.stack[this.stack.length - 1];\n};\nStack.prototype.length = function() {\n  return this.stack.length;\n};\nStack.prototype.print = function() {\n  console.log(this.stack.join(' '));\n};\n\nlet stack = new Stack();\nstack.push(1);\nstack.push(2);\nstack.push(3);\nstack.print(); // => 1 2 3\nconsole.log('length is 3:', stack.length()); // => 3\nconsole.log('peek is 3:', stack.peek()); // => 3\nconsole.log('pop is 3:', stack.pop()); // => 3\nstack.print(); // => 1 2\nconsole.log('pop is 2:', stack.pop());  // => 2\nconsole.log('length is 1:', stack.length()); // => 1\nconsole.log('pop is 1:', stack.pop()); // => 1\nstack.print(); // => ''\nconsole.log('peek is undefined:', stack.peek()); // => undefined\nconsole.log('pop is undefined:', stack.pop()); // => undefined\n</code></pre>\n<h2>The Queue</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/4050/0*YvfuX5tKP7-V0p7v.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal operations are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. This makes the Queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the Queue will be the first one to be removed.</em></p>\n</blockquote>\n<p>As for the Stack data structure, a peek operation is often added to the Queue data structure. It returns the value of the front element without dequeuing it.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(n)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>function Queue() {\n  this.queue = [];\n}\n\nQueue.prototype.enqueue = function(value) {\n  this.queue.push(value);\n};\nQueue.prototype.dequeue = function() {\n  return this.queue.shift();\n};\nQueue.prototype.peek = function() {\n  return this.queue[0];\n};\nQueue.prototype.length = function() {\n  return this.queue.length;\n};\nQueue.prototype.print = function() {\n  console.log(this.queue.join(' '));\n};\n\nlet queue = new Queue();\nqueue.enqueue(1);\nqueue.enqueue(2);\nqueue.enqueue(3);\nqueue.print(); // => 1 2 3\nconsole.log('length is 3:', queue.length()); // => 3\nconsole.log('peek is 1:', queue.peek()); // => 3\nconsole.log('dequeue is 1:', queue.dequeue()); // => 1\nqueue.print(); // => 2 3\nconsole.log('dequeue is 2:', queue.dequeue());  // => 2\nconsole.log('length is 1:', queue.length()); // => 1\nconsole.log('dequeue is 3:', queue.dequeue()); // => 3\nqueue.print(); // => ''\nconsole.log('peek is undefined:', queue.peek()); // => undefined\nconsole.log('dequeue is undefined:', queue.dequeue()); // => undefined\n</code></pre>\n<h2>The Tree</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*yUiQ-NaPKeLQnN7n\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Tree is a widely used data structure that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node. A tree data structure can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the \"children\"), with the constraints that no reference is duplicated, and none points to the root node. From Wikipedia</em></p>\n</blockquote>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(n) O(n)\nTo get a full overview of the time and space complexity of the Tree data structure, have a look to this excellent Big O cheat sheet.</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/1*DCdQiB6XqBJCrFRz12BwqA.png\"></p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>function Node(data) {\n  this.data = data;\n  this.children = [];\n}\n\nfunction Tree() {\n  this.root = null;\n}\n\nTree.prototype.add = function(data, toNodeData) {\n  let node = new Node(data);\n  let parent = toNodeData ? this.findBFS(toNodeData) : null;\n  if(parent) {\n    parent.children.push(node);\n  } else {\n    if(!this.root) {\n      this.root = node;\n    } else {\n      return 'Root node is already assigned';\n    }\n  }\n};\nTree.prototype.remove = function(data) {\n  if(this.root.data === data) {\n    this.root = null;\n  }\n\n  let queue = [this.root];\n  while(queue.length) {\n    let node = queue.shift();\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      if(node.children[i].data === data) {\n        node.children.splice(i, 1);\n      } else {\n        queue.push(node.children[i]);\n      }\n    }\n  }\n};\nTree.prototype.contains = function(data) {\n  return this.findBFS(data) ? true : false;\n};\nTree.prototype.findBFS = function(data) {\n  let queue = [this.root];\n  while(queue.length) {\n    let node = queue.shift();\n    if(node.data === data) {\n      return node;\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n  return null;\n};\nTree.prototype._preOrder = function(node, fn) {\n  if(node) {\n    if(fn) {\n      fn(node);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      this._preOrder(node.children[i], fn);\n    }\n  }\n};\nTree.prototype._postOrder = function(node, fn) {\n  if(node) {\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      this._postOrder(node.children[i], fn);\n    }\n    if(fn) {\n      fn(node);\n    }\n  }\n};\nTree.prototype.traverseDFS = function(fn, method) {\n  let current = this.root;\n  if(method) {\n    this['_' + method](current, fn);\n  } else {\n    this._preOrder(current, fn);\n  }\n};\nTree.prototype.traverseBFS = function(fn) {\n  let queue = [this.root];\n  while(queue.length) {\n    let node = queue.shift();\n    if(fn) {\n      fn(node);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n};\nTree.prototype.print = function() {\n  if(!this.root) {\n    return console.log('No root node found');\n  }\n  let newline = new Node('|');\n  let queue = [this.root, newline];\n  let string = '';\n  while(queue.length) {\n    let node = queue.shift();\n    string += node.data.toString() + ' ';\n    if(node === newline &#x26;&#x26; queue.length) {\n      queue.push(newline);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n  console.log(string.slice(0, -2).trim());\n};\nTree.prototype.printByLevel = function() {\n  if(!this.root) {\n    return console.log('No root node found');\n  }\n  let newline = new Node('\\n');\n  let queue = [this.root, newline];\n  let string = '';\n  while(queue.length) {\n    let node = queue.shift();\n    string += node.data.toString() + (node.data !== '\\n' ? ' ' : '');\n    if(node === newline &#x26;&#x26; queue.length) {\n      queue.push(newline);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n  console.log(string.trim());\n};\n\nlet tree = new Tree();\ntree.add('ceo');\ntree.add('cto', 'ceo');\ntree.add('dev1', 'cto');\ntree.add('dev2', 'cto');\ntree.add('dev3', 'cto');\ntree.add('cfo', 'ceo');\ntree.add('accountant', 'cfo');\ntree.add('cmo', 'ceo');\ntree.print(); // => ceo | cto cfo cmo | dev1 dev2 dev3 accountant\ntree.printByLevel();  // => ceo \\n cto cfo cmo \\n dev1 dev2 dev3 accountant\nconsole.log('tree contains dev1 is true:', tree.contains('dev1')); // => true\nconsole.log('tree contains dev4 is false:', tree.contains('dev4')); // => false\nconsole.log('--- BFS');\ntree.traverseBFS(function(node) { console.log(node.data); }); // => ceo cto cfo cmo dev1 dev2 dev3 accountant\nconsole.log('--- DFS preOrder');\ntree.traverseDFS(function(node) { console.log(node.data); }, 'preOrder'); // => ceo cto dev1 dev2 dev3 cfo accountant cmo\nconsole.log('--- DFS postOrder');\ntree.traverseDFS(function(node) { console.log(node.data); }, 'postOrder'); // => dev1 dev2 dev3 cto accountant cfo cmo ceo\ntree.remove('cmo');\ntree.print(); // => ceo | cto cfo | dev1 dev2 dev3 accountant\ntree.remove('cfo');\ntree.print(); // => ceo | cto | dev1 dev2 dev3\n</code></pre>\n<h2>The Graph</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*q31mL1kjFWlIzw3l.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Graph data structure consists of a finite (and possibly mutable) set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected Graph or a set of ordered pairs for a directed Graph. These pairs are known as edges, arcs, or lines for an undirected Graph and as arrows, directed edges, directed arcs, or directed lines for a directed Graph. The vertices may be part of the Graph structure, or may be external entities represented by integer indices or references. From Wikipedia</em></p>\n</blockquote>\n<p>A Graph data structure may also associate to each edge some edge value, such as a symbolic label or a numeric attribute (cost, capacity, length, etc.).</p>\n<p>Representation\nThere are different ways of representing a graph, each of them with its own advantages and disadvantages. Here are the main 2:</p>\n<p>Adjacency list: For every vertex a list of adjacent vertices is stored. This can be viewed as storing the list of edges. This data structure allows the storage of additional data on the vertices and edges.\nAdjacency matrix: Data are stored in a two-dimensional matrix, in which the rows represent source vertices and columns represent destination vertices. The data on the edges and vertices must be stored externally.\nComplexity\nAdjacency list\nStorage Add Vertex Add Edge Query\nO( V + E\nAdjacency matrix\nStorage Add Vertex Add Edge Query\nO( V ^2) O(</p>\n<p>Graph</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>//below uses the adjacency list representation.\n</code></pre>\n<pre><code class=\"language-js\">        function Graph() {\n          this.vertices = [];\n          this.edges = [];\n          this.numberOfEdges = 0;\n        }\n\n        Graph.prototype.addVertex = function(vertex) {\n          this.vertices.push(vertex);\n          this.edges[vertex] = [];\n        };\n        Graph.prototype.removeVertex = function(vertex) {\n          let index = this.vertices.indexOf(vertex);\n          if(~index) {\n            this.vertices.splice(index, 1);\n          }\n          while(this.edges[vertex].length) {\n            let adjacentVertex = this.edges[vertex].pop();\n            this.removeEdge(adjacentVertex, vertex);\n          }\n        };\n        Graph.prototype.addEdge = function(vertex1, vertex2) {\n          this.edges[vertex1].push(vertex2);\n          this.edges[vertex2].push(vertex1);\n          this.numberOfEdges++;\n        };\n        Graph.prototype.removeEdge = function(vertex1, vertex2) {\n          let index1 = this.edges[vertex1] ? this.edges[vertex1].indexOf(vertex2) : -1;\n          let index2 = this.edges[vertex2] ? this.edges[vertex2].indexOf(vertex1) : -1;\n          if(~index1) {\n            this.edges[vertex1].splice(index1, 1);\n            this.numberOfEdges--;\n          }\n          if(~index2) {\n            this.edges[vertex2].splice(index2, 1);\n          }\n        };\n        Graph.prototype.size = function() {\n          return this.vertices.length;\n        };\n        Graph.prototype.relations = function() {\n          return this.numberOfEdges;\n        };\n        Graph.prototype.traverseDFS = function(vertex, fn) {\n          if(!~this.vertices.indexOf(vertex)) {\n            return console.log('Vertex not found');\n          }\n          let visited = [];\n          this._traverseDFS(vertex, visited, fn);\n        };\n        Graph.prototype._traverseDFS = function(vertex, visited, fn) {\n          visited[vertex] = true;\n          if(this.edges[vertex] !== undefined) {\n            fn(vertex);\n          }\n          for(let i = 0; i &#x3C; this.edges[vertex].length; i++) {\n            if(!visited[this.edges[vertex][i]]) {\n              this._traverseDFS(this.edges[vertex][i], visited, fn);\n            }\n          }\n        };\n        Graph.prototype.traverseBFS = function(vertex, fn) {\n          if(!~this.vertices.indexOf(vertex)) {\n            return console.log('Vertex not found');\n          }\n          let queue = [];\n          queue.push(vertex);\n          let visited = [];\n          visited[vertex] = true;\n\n          while(queue.length) {\n            vertex = queue.shift();\n            fn(vertex);\n            for(let i = 0; i &#x3C; this.edges[vertex].length; i++) {\n              if(!visited[this.edges[vertex][i]]) {\n                visited[this.edges[vertex][i]] = true;\n                queue.push(this.edges[vertex][i]);\n              }\n            }\n          }\n        };\n        Graph.prototype.pathFromTo = function(vertexSource, vertexDestination) {\n          if(!~this.vertices.indexOf(vertexSource)) {\n            return console.log('Vertex not found');\n          }\n          let queue = [];\n          queue.push(vertexSource);\n          let visited = [];\n          visited[vertexSource] = true;\n          let paths = [];\n\n          while(queue.length) {\n            let vertex = queue.shift();\n            for(let i = 0; i &#x3C; this.edges[vertex].length; i++) {\n              if(!visited[this.edges[vertex][i]]) {\n                visited[this.edges[vertex][i]] = true;\n                queue.push(this.edges[vertex][i]);\n                // save paths between vertices\n                paths[this.edges[vertex][i]] = vertex;\n              }\n            }\n          }\n          if(!visited[vertexDestination]) {\n            return undefined;\n          }\n\n          let path = [];\n          for(let j = vertexDestination; j != vertexSource; j = paths[j]) {\n            path.push(j);\n          }\n          path.push(j);\n          return path.reverse().join('-');\n        };\n        Graph.prototype.print = function() {\n          console.log(this.vertices.map(function(vertex) {\n            return (vertex + ' -> ' + this.edges[vertex].join(', ')).trim();\n          }, this).join(' | '));\n        };\n        ```\n        let graph = new Graph();\n        graph.addVertex(1);\n        graph.addVertex(2);\n        graph.addVertex(3);\n        graph.addVertex(4);\n        graph.addVertex(5);\n        graph.addVertex(6);\n        graph.print(); // 1 -> | 2 -> | 3 -> | 4 -> | 5 -> | 6 ->\n        graph.addEdge(1, 2);\n        graph.addEdge(1, 5);\n        graph.addEdge(2, 3);\n        graph.addEdge(2, 5);\n        graph.addEdge(3, 4);\n        graph.addEdge(4, 5);\n        graph.addEdge(4, 6);\n        graph.print(); // 1 -> 2, 5 | 2 -> 1, 3, 5 | 3 -> 2, 4 | 4 -> 3, 5, 6 | 5 -> 1, 2, 4 | 6 -> 4\n        console.log('graph size (number of vertices):', graph.size()); // => 6\n        console.log('graph relations (number of edges):', graph.relations()); // => 7\n        graph.traverseDFS(1, function(vertex) { console.log(vertex); }); // => 1 2 3 4 5 6\n        console.log('---');\n        graph.traverseBFS(1, function(vertex) { console.log(vertex); }); // => 1 2 5 3 4 6\n        graph.traverseDFS(0, function(vertex) { console.log(vertex); }); // => 'Vertex not found'\n        graph.traverseBFS(0, function(vertex) { console.log(vertex); }); // => 'Vertex not found'\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-5-1\n        console.log('path from 3 to 5:', graph.pathFromTo(3, 5)); // => 3-2-5\n        graph.removeEdge(1, 2);\n        graph.removeEdge(4, 5);\n        graph.removeEdge(10, 11);\n        console.log('graph relations (number of edges):', graph.relations()); // => 5\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-3-2-5-1\n        graph.addEdge(1, 2);\n        graph.addEdge(4, 5);\n        console.log('graph relations (number of edges):', graph.relations()); // => 7\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-5-1\n        graph.removeVertex(5);\n        console.log('graph size (number of vertices):', graph.size()); // => 5\n        console.log('graph relations (number of edges):', graph.relations()); // => 4\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-3-2-1\n</code></pre>"},{"url":"/docs/content/gatsby-Queries-Mutations/","relativePath":"docs/content/gatsby-Queries-Mutations.md","relativeDir":"docs/content","base":"gatsby-Queries-Mutations.md","name":"gatsby-Queries-Mutations","frontmatter":{"title":"Queries and Mutations (Gatsby)","weight":0,"excerpt":"Queries and Mutations","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Querying Data in Components using StaticQuery</h1>\n<h2>TABLE OF CONTENTS</h2>\n<ul>\n<li>\n<p><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#how-to-use-staticquery-in-components\">How to use StaticQuery in components</a></p>\n<ul>\n<li><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#basic-example\">Basic example</a></li>\n<li><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#usestaticquery\">useStaticQuery</a></li>\n<li><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#typechecking\">Typechecking</a></li>\n</ul>\n</li>\n<li><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#how-staticquery-differs-from-page-query\">How StaticQuery differs from page query</a></li>\n</ul>\n<p>Gatsby v2 introduces <code>StaticQuery</code>, a new API that allows components to retrieve data via a GraphQL query.</p>\n<p>In this guide, you'll see an example using <code>StaticQuery</code>, and learn about <a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#how-staticquery-differs-from-page-query\">the difference between a StaticQuery and a page query</a>.</p>\n<h2><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#how-to-use-staticquery-in-components\"></a>How to use <code>StaticQuery</code> in components</h2>\n<p><em>Video hosted on <a href=\"https://egghead.io/lessons/gatsby-load-data-using-graphql-queries-directly-in-a-gatsby-v2-component-with-staticquery\">egghead.io</a></em>.</p>\n<h3><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#basic-example\"></a>Basic example</h3>\n<p>Here is an example of a <code>Header</code> component using <code>StaticQuery</code>:</p>\n<p>src/components/header.js</p>\n<p>Copysrc/components/header.js: copy code to clipboard`</p>\n<p>import React from \"react\"</p>\n<p>import { StaticQuery, graphql } from \"gatsby\"</p>\n<p>export default function Header() {</p>\n<p>return (</p>\n<p>&#x3C;StaticQuery</p>\n<p>query={graphql`</p>\n<p>query HeadingQuery {</p>\n<p>site {</p>\n<p>siteMetadata {</p>\n<p>title</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>`}</p>\n<p>render={data => (</p>\n  <header>\n  <h1>{data.site.siteMetadata.title}</h1>\n  </header>\n<p>)}</p>\n<p>/></p>\n<p>)</p>\n<p>}</p>\n<p>`</p>\n<p>By using <code>StaticQuery</code>, you can colocate a component with its data. It is no longer required to, say, pass data down from <code>Layout</code> to <code>Header</code>.</p>\n<h3><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#usestaticquery\"></a>useStaticQuery</h3>\n<p>There's also a React hooks version of StaticQuery: check out the documentation on <a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/use-static-query/\"><code>useStaticQuery</code></a></p>\n<h3><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#typechecking\"></a>Typechecking</h3>\n<p>With the above pattern, you lose the ability to typecheck with PropTypes. To regain typechecking while achieving the same result, you can change the component to:</p>\n<p>src/components/header.js</p>\n<p>Copysrc/components/header.js: copy code to clipboard`</p>\n<p>import React from \"react\"</p>\n<p>import { StaticQuery, graphql } from \"gatsby\"</p>\n<p>import PropTypes from \"prop-types\"</p>\n<p>const Header = ({ data }) => (</p>\n  <header>\n  <h1>{data.site.siteMetadata.title}</h1>\n  </header>\n<p>)</p>\n<p>export default function MyHeader(props) {</p>\n<p>return (</p>\n<p>&#x3C;StaticQuery</p>\n<p>query={graphql`</p>\n<p>query {</p>\n<p>site {</p>\n<p>siteMetadata {</p>\n<p>title</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>`}</p>\n<p>render={data => &#x3C;Header data={data} {...props} />}</p>\n<p>/></p>\n<p>)</p>\n<p>}</p>\n<p>Header.propTypes = {</p>\n<p>data: PropTypes.shape({</p>\n<p>site: PropTypes.shape({</p>\n<p>siteMetadata: PropTypes.shape({</p>\n<p>title: PropTypes.string.isRequired,</p>\n<p>}).isRequired,</p>\n<p>}).isRequired,</p>\n<p>}).isRequired,</p>\n<p>}</p>\n<p>`</p>\n<h2><a href=\"https://www.gatsbyjs.com/docs/how-to/querying-data/static-query/#how-staticquery-differs-from-page-query\"></a>How StaticQuery differs from page query</h2>\n<p>StaticQuery can do most of the things that page query can, including fragments. The main differences are:</p>\n<ul>\n<li>page queries can accept variables (via <code>pageContext</code>) but can only be added to <em>page</em> components</li>\n<li>StaticQuery does not accept variables (hence the name \"static\"), but can be used in <em>any</em> component, including pages</li>\n<li>StaticQuery does not work with raw React.createElement calls; please use JSX, e.g. <code>&#x3C;StaticQuery /></code></li>\n</ul>\n<h1>GraphQL</h1>\n<h1>Queries and Mutations</h1>\n<p>On this page, you'll learn in detail about how to query a GraphQL server.</p>\n<h2>Fields<a href=\"https://graphql.org/learn/queries/#fields\"></a></h2>\n<p>At its simplest, GraphQL is about asking for specific fields on objects. Let's start by looking at a very simple query and the result we get when we run it:</p>\n<p>{</p>\n<p>hero {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"hero\": {</p>\n<p>\"name\": \"R2-D2\"</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>You can see immediately that the query has exactly the same shape as the result. This is essential to GraphQL, because you always get back what you expect, and the server knows exactly what fields the client is asking for.</p>\n<p>The field <code>name</code> returns a <code>String</code> type, in this case the name of the main hero of Star Wars, <code>\"R2-D2\"</code>.</p>\n<blockquote>\n<p>Oh, one more thing - the query above is <em>interactive</em>. That means you can change it as you like and see the new result. Try adding an <code>appearsIn</code> field to the <code>hero</code> object in the query, and see the new result.</p>\n</blockquote>\n<p>In the previous example, we just asked for the name of our hero which returned a String, but fields can also refer to Objects. In that case, you can make a <em>sub-selection</em> of fields for that object. GraphQL queries can traverse related objects and their fields, letting clients fetch lots of related data in one request, instead of making several roundtrips as one would need in a classic REST architecture.</p>\n<p>{</p>\n<p>hero {</p>\n<p>name</p>\n<h1>Queries can have comments!</h1>\n<p>friends {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"hero\": {</p>\n<p>\"name\": \"R2-D2\",</p>\n<p>\"friends\": [</p>\n<p>{</p>\n<p>\"name\": \"Luke Skywalker\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Han Solo\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Leia Organa\"</p>\n<p>}</p>\n<p>]</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>Note that in this example, the <code>friends</code> field returns an array of items. GraphQL queries look the same for both single items or lists of items, however we know which one to expect based on what is indicated in the schema.</p>\n<h2>Arguments<a href=\"https://graphql.org/learn/queries/#arguments\"></a></h2>\n<p>If the only thing we could do was traverse objects and their fields, GraphQL would already be a very useful language for data fetching. But when you add the ability to pass arguments to fields, things get much more interesting.</p>\n<p>{</p>\n<p>human(id: \"1000\") {</p>\n<p>name</p>\n<p>height</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"human\": {</p>\n<p>\"name\": \"Luke Skywalker\",</p>\n<p>\"height\": 1.72</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>In a system like REST, you can only pass a single set of arguments - the query parameters and URL segments in your request. But in GraphQL, every field and nested object can get its own set of arguments, making GraphQL a complete replacement for making multiple API fetches. You can even pass arguments into scalar fields, to implement data transformations once on the server, instead of on every client separately.</p>\n<p>{</p>\n<p>human(id: \"1000\") {</p>\n<p>name</p>\n<p>height(unit: FOOT)</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"human\": {</p>\n<p>\"name\": \"Luke Skywalker\",</p>\n<p>\"height\": 5.6430448</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>Arguments can be of many different types. In the above example, we have used an Enumeration type, which represents one of a finite set of options (in this case, units of length, either <code>METER</code> or <code>FOOT</code>). GraphQL comes with a default set of types, but a GraphQL server can also declare its own custom types, as long as they can be serialized into your transport format.</p>\n<p><a href=\"https://graphql.org/learn/schema\">Read more about the GraphQL type system here.</a></p>\n<h2>Aliases<a href=\"https://graphql.org/learn/queries/#aliases\"></a></h2>\n<p>If you have a sharp eye, you may have noticed that, since the result object fields match the name of the field in the query but don't include arguments, you can't directly query for the same field with different arguments. That's why you need <em>aliases</em> - they let you rename the result of a field to anything you want.</p>\n<p>{</p>\n<p>empireHero: hero(episode: EMPIRE) {</p>\n<p>name</p>\n<p>}</p>\n<p>jediHero: hero(episode: JEDI) {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"empireHero\": {</p>\n<p>\"name\": \"Luke Skywalker\"</p>\n<p>},</p>\n<p>\"jediHero\": {</p>\n<p>\"name\": \"R2-D2\"</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>In the above example, the two <code>hero</code> fields would have conflicted, but since we can alias them to different names, we can get both results in one request.</p>\n<h2>Fragments<a href=\"https://graphql.org/learn/queries/#fragments\"></a></h2>\n<p>Let's say we had a relatively complicated page in our app, which lets us look at two heroes side by side, along with their friends. You can imagine that such a query could quickly get complicated, because we would need to repeat the fields at least once - one for each side of the comparison.</p>\n<p>That's why GraphQL includes reusable units called <em>fragments</em>. Fragments let you construct sets of fields, and then include them in queries where you need to. Here's an example of how you could solve the above situation using fragments:</p>\n<p>{</p>\n<p>leftComparison: hero(episode: EMPIRE) {</p>\n<p>...comparisonFields</p>\n<p>}</p>\n<p>rightComparison: hero(episode: JEDI) {</p>\n<p>...comparisonFields</p>\n<p>}</p>\n<p>}</p>\n<p>​</p>\n<p>fragment comparisonFields on Character {</p>\n<p>name</p>\n<p>appearsIn</p>\n<p>friends {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"leftComparison\": {</p>\n<p>\"name\": \"Luke Skywalker\",</p>\n<p>\"appearsIn\": [</p>\n<p>\"NEWHOPE\",</p>\n<p>\"EMPIRE\",</p>\n<p>\"JEDI\"</p>\n<p>],</p>\n<p>\"friends\": [</p>\n<p>{</p>\n<p>\"name\": \"Han Solo\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Leia Organa\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"C-3PO\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"R2-D2\"</p>\n<p>}</p>\n<p>]</p>\n<p>},</p>\n<p>\"rightComparison\": {</p>\n<p>\"name\": \"R2-D2\",</p>\n<p>\"appearsIn\": [</p>\n<p>\"NEWHOPE\",</p>\n<p>\"EMPIRE\",</p>\n<p>\"JEDI\"</p>\n<p>],</p>\n<p>\"friends\": [</p>\n<p>{</p>\n<p>\"name\": \"Luke Skywalker\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Han Solo\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Leia Organa\"</p>\n<p>}</p>\n<p>]</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>You can see how the above query would be pretty repetitive if the fields were repeated. The concept of fragments is frequently used to split complicated application data requirements into smaller chunks, especially when you need to combine lots of UI components with different fragments into one initial data fetch.</p>\n<h3>Using variables inside fragments<a href=\"https://graphql.org/learn/queries/#using-variables-inside-fragments\"></a></h3>\n<p>It is possible for fragments to access variables declared in the query or mutation. See <a href=\"https://graphql.org/learn/queries/#variables\">variables</a>.</p>\n<p>query HeroComparison($first: Int = 3) {</p>\n<p>leftComparison: hero(episode: EMPIRE) {</p>\n<p>...comparisonFields</p>\n<p>}</p>\n<p>rightComparison: hero(episode: JEDI) {</p>\n<p>...comparisonFields</p>\n<p>}</p>\n<p>}</p>\n<p>​</p>\n<p>fragment comparisonFields on Character {</p>\n<p>name</p>\n<p>friendsConnection(first: $first) {</p>\n<p>totalCount</p>\n<p>edges {</p>\n<p>node {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>​</p>\n<p>{</p>\n<p>\"errors\": [</p>\n<p>{</p>\n<p>\"message\": \"Buffer is not defined\",</p>\n<p>\"locations\": [</p>\n<p>{</p>\n<p>\"line\": 12,</p>\n<p>\"column\": 3</p>\n<p>}</p>\n<p>],</p>\n<p>\"path\": [</p>\n<p>\"leftComparison\",</p>\n<p>\"friendsConnection\"</p>\n<p>]</p>\n<p>},</p>\n<p>{</p>\n<p>\"message\": \"Buffer is not defined\",</p>\n<p>\"locations\": [</p>\n<p>{</p>\n<p>\"line\": 12,</p>\n<p>\"column\": 3</p>\n<p>}</p>\n<p>],</p>\n<p>\"path\": [</p>\n<p>\"rightComparison\",</p>\n<p>\"friendsConnection\"</p>\n<p>]</p>\n<p>}</p>\n<p>],</p>\n<p>\"data\": {</p>\n<p>\"leftComparison\": null,</p>\n<p>\"rightComparison\": null</p>\n<p>}</p>\n<p>}</p>\n<h2>Operation name<a href=\"https://graphql.org/learn/queries/#operation-name\"></a></h2>\n<p>Up until now, we have been using a shorthand syntax where we omit both the <code>query</code> keyword and the query name, but in production apps it's useful to use these to make our code less ambiguous.</p>\n<p>Here's an example that includes the keyword <code>query</code> as <em>operation type</em> and <code>HeroNameAndFriends</code> as <em>operation name</em> :</p>\n<p>query HeroNameAndFriends {</p>\n<p>hero {</p>\n<p>name</p>\n<p>friends {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"hero\": {</p>\n<p>\"name\": \"R2-D2\",</p>\n<p>\"friends\": [</p>\n<p>{</p>\n<p>\"name\": \"Luke Skywalker\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Han Solo\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Leia Organa\"</p>\n<p>}</p>\n<p>]</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>The <em>operation type</em> is either <em>query</em>, <em>mutation</em>, or <em>subscription</em> and describes what type of operation you're intending to do. The operation type is required unless you're using the query shorthand syntax, in which case you can't supply a name or variable definitions for your operation.</p>\n<p>The <em>operation name</em> is a meaningful and explicit name for your operation. It is only required in multi-operation documents, but its use is encouraged because it is very helpful for debugging and server-side logging. When something goes wrong (you see errors either in your network logs, or in the logs of your GraphQL server) it is easier to identify a query in your codebase by name instead of trying to decipher the contents. Think of this just like a function name in your favorite programming language. For example, in JavaScript we can easily work only with anonymous functions, but when we give a function a name, it's easier to track it down, debug our code, and log when it's called. In the same way, GraphQL query and mutation names, along with fragment names, can be a useful debugging tool on the server side to identify different GraphQL requests.</p>\n<h2>Variables<a href=\"https://graphql.org/learn/queries/#variables\"></a></h2>\n<p>So far, we have been writing all of our arguments inside the query string. But in most applications, the arguments to fields will be dynamic: For example, there might be a dropdown that lets you select which Star Wars episode you are interested in, or a search field, or a set of filters.</p>\n<p>It wouldn't be a good idea to pass these dynamic arguments directly in the query string, because then our client-side code would need to dynamically manipulate the query string at runtime, and serialize it into a GraphQL-specific format. Instead, GraphQL has a first-class way to factor dynamic values out of the query, and pass them as a separate dictionary. These values are called <em>variables</em>.</p>\n<p>When we start working with variables, we need to do three things:</p>\n<ol>\n<li>Replace the static value in the query with <code>$variableName</code></li>\n<li>Declare <code>$variableName</code> as one of the variables accepted by the query</li>\n<li>Pass <code>variableName: value</code> in the separate, transport-specific (usually JSON) variables dictionary</li>\n</ol>\n<p>Here's what it looks like all together:</p>\n<p>query HeroNameAndFriends($episode: Episode) {</p>\n<p>hero(episode: $episode) {</p>\n<p>name</p>\n<p>friends {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"episode\": \"JEDI\"</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"hero\": {</p>\n<p>\"name\": \"R2-D2\",</p>\n<p>\"friends\": [</p>\n<p>{</p>\n<p>\"name\": \"Luke Skywalker\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Han Solo\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"name\": \"Leia Organa\"</p>\n<p>}</p>\n<p>]</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>Now, in our client code, we can simply pass a different variable rather than needing to construct an entirely new query. This is also in general a good practice for denoting which arguments in our query are expected to be dynamic - we should never be doing string interpolation to construct queries from user-supplied values.</p>\n<h3>Variable definitions<a href=\"https://graphql.org/learn/queries/#variable-definitions\"></a></h3>\n<p>The variable definitions are the part that looks like <code>($episode: Episode)</code> in the query above. It works just like the argument definitions for a function in a typed language. It lists all of the variables, prefixed by <code>$</code>, followed by their type, in this case <code>Episode</code>.</p>\n<p>All declared variables must be either scalars, enums, or input object types. So if you want to pass a complex object into a field, you need to know what input type that matches on the server. Learn more about input object types on the Schema page.</p>\n<p>Variable definitions can be optional or required. In the case above, since there isn't an <code>!</code> next to the <code>Episode</code> type, it's optional. But if the field you are passing the variable into requires a non-null argument, then the variable has to be required as well.</p>\n<p>To learn more about the syntax for these variable definitions, it's useful to learn the GraphQL schema language. The schema language is explained in detail on the Schema page.</p>\n<h3>Default variables<a href=\"https://graphql.org/learn/queries/#default-variables\"></a></h3>\n<p>Default values can also be assigned to the variables in the query by adding the default value after the type declaration.</p>\n<p>query HeroNameAndFriends($episode: Episode = JEDI) {</p>\n<p>hero(episode: $episode) {</p>\n<p>name</p>\n<p>friends {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>When default values are provided for all variables, you can call the query without passing any variables. If any variables are passed as part of the variables dictionary, they will override the defaults.</p>\n<h2>Directives<a href=\"https://graphql.org/learn/queries/#directives\"></a></h2>\n<p>We discussed above how variables enable us to avoid doing manual string interpolation to construct dynamic queries. Passing variables in arguments solves a pretty big class of these problems, but we might also need a way to dynamically change the structure and shape of our queries using variables. For example, we can imagine a UI component that has a summarized and detailed view, where one includes more fields than the other.</p>\n<p>Let's construct a query for such a component:</p>\n<p>query Hero($episode: Episode, $withFriends: Boolean!) {</p>\n<p>hero(episode: $episode) {</p>\n<p>name</p>\n<p>friends @include(if: $withFriends) {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"episode\": \"JEDI\",</p>\n<p>\"withFriends\": false</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"hero\": {</p>\n<p>\"name\": \"R2-D2\"</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>Try editing the variables above to instead pass <code>true</code> for <code>withFriends</code>, and see how the result changes.</p>\n<p>We needed to use a new feature in GraphQL called a <em>directive</em>. A directive can be attached to a field or fragment inclusion, and can affect execution of the query in any way the server desires. The core GraphQL specification includes exactly two directives, which must be supported by any spec-compliant GraphQL server implementation:</p>\n<ul>\n<li><code>@include(if: Boolean)</code> Only include this field in the result if the argument is <code>true</code>.</li>\n<li><code>@skip(if: Boolean)</code> Skip this field if the argument is <code>true</code>.</li>\n</ul>\n<p>Directives can be useful to get out of situations where you otherwise would need to do string manipulation to add and remove fields in your query. Server implementations may also add experimental features by defining completely new directives.</p>\n<h2>Mutations<a href=\"https://graphql.org/learn/queries/#mutations\"></a></h2>\n<p>Most discussions of GraphQL focus on data fetching, but any complete data platform needs a way to modify server-side data as well.</p>\n<p>In REST, any request might end up causing some side-effects on the server, but by convention it's suggested that one doesn't use <code>GET</code> requests to modify data. GraphQL is similar - technically any query could be implemented to cause a data write. However, it's useful to establish a convention that any operations that cause writes should be sent explicitly via a mutation.</p>\n<p>Just like in queries, if the mutation field returns an object type, you can ask for nested fields. This can be useful for fetching the new state of an object after an update. Let's look at a simple example mutation:</p>\n<p>mutation CreateReviewForEpisode($ep: Episode!, $review: ReviewInput!) {</p>\n<p>createReview(episode: $ep, review: $review) {</p>\n<p>stars</p>\n<p>commentary</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"ep\": \"JEDI\",</p>\n<p>\"review\": {</p>\n<p>\"stars\": 5,</p>\n<p>\"commentary\": \"This is a great movie!\"</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"createReview\": {</p>\n<p>\"stars\": 5,</p>\n<p>\"commentary\": \"This is a great movie!\"</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>Note how <code>createReview</code> field returns the <code>stars</code> and <code>commentary</code> fields of the newly created review. This is especially useful when mutating existing data, for example, when incrementing a field, since we can mutate and query the new value of the field with one request.</p>\n<p>You might also notice that, in this example, the <code>review</code> variable we passed in is not a scalar. It's an <em>input object type</em>, a special kind of object type that can be passed in as an argument. Learn more about input types on the Schema page.</p>\n<h3>Multiple fields in mutations<a href=\"https://graphql.org/learn/queries/#multiple-fields-in-mutations\"></a></h3>\n<p>A mutation can contain multiple fields, just like a query. There's one important distinction between queries and mutations, other than the name:</p>\n<p><strong>While query fields are executed in parallel, mutation fields run in series, one after the other.</strong></p>\n<p>This means that if we send two <code>incrementCredits</code> mutations in one request, the first is guaranteed to finish before the second begins, ensuring that we don't end up with a race condition with ourselves.</p>\n<h2>Inline Fragments<a href=\"https://graphql.org/learn/queries/#inline-fragments\"></a></h2>\n<p>Like many other type systems, GraphQL schemas include the ability to define interfaces and union types. <a href=\"https://graphql.org/learn/schema/#interfaces\">Learn about them in the schema guide.</a></p>\n<p>If you are querying a field that returns an interface or a union type, you will need to use <em>inline fragments</em> to access data on the underlying concrete type. It's easiest to see with an example:</p>\n<p>query HeroForEpisode($ep: Episode!) {</p>\n<p>hero(episode: $ep) {</p>\n<p>name</p>\n<p>... on Droid {</p>\n<p>primaryFunction</p>\n<p>}</p>\n<p>... on Human {</p>\n<p>height</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"ep\": \"JEDI\"</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"hero\": {</p>\n<p>\"name\": \"R2-D2\",</p>\n<p>\"primaryFunction\": \"Astromech\"</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>In this query, the <code>hero</code> field returns the type <code>Character</code>, which might be either a <code>Human</code> or a <code>Droid</code> depending on the <code>episode</code> argument. In the direct selection, you can only ask for fields that exist on the <code>Character</code> interface, such as <code>name</code>.</p>\n<p>To ask for a field on the concrete type, you need to use an <em>inline fragment</em> with a type condition. Because the first fragment is labeled as <code>... on Droid</code>, the <code>primaryFunction</code> field will only be executed if the <code>Character</code> returned from <code>hero</code> is of the <code>Droid</code> type. Similarly for the <code>height</code> field for the <code>Human</code> type.</p>\n<p>Named fragments can also be used in the same way, since a named fragment always has a type attached.</p>\n<h3>Meta fields<a href=\"https://graphql.org/learn/queries/#meta-fields\"></a></h3>\n<p>Given that there are some situations where you don't know what type you'll get back from the GraphQL service, you need some way to determine how to handle that data on the client. GraphQL allows you to request <code>__typename</code>, a meta field, at any point in a query to get the name of the object type at that point.</p>\n<p>{</p>\n<p>search(text: \"an\") {</p>\n<p>__typename</p>\n<p>... on Human {</p>\n<p>name</p>\n<p>}</p>\n<p>... on Droid {</p>\n<p>name</p>\n<p>}</p>\n<p>... on Starship {</p>\n<p>name</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>{</p>\n<p>\"data\": {</p>\n<p>\"search\": [</p>\n<p>{</p>\n<p>\"__typename\": \"Human\",</p>\n<p>\"name\": \"Han Solo\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"__typename\": \"Human\",</p>\n<p>\"name\": \"Leia Organa\"</p>\n<p>},</p>\n<p>{</p>\n<p>\"__typename\": \"Starship\",</p>\n<p>\"name\": \"TIE Advanced x1\"</p>\n<p>}</p>\n<p>]</p>\n<p>}</p>\n<p>}</p>\n<p>In the above query, <code>search</code> returns a union type that can be one of three options. It would be impossible to tell apart the different types from the client without the <code>__typename</code> field.</p>\n<p>GraphQL services provide a few meta fields, the rest of which are used to expose the <a href=\"https://graphql.org/learn/introspection/\">Introspection</a> system.****</p>"},{"url":"/docs/content/github-api/","relativePath":"docs/content/github-api.md","relativeDir":"docs/content","base":"github-api.md","name":"github-api","frontmatter":{"title":"All the Things You Can Do With GitHub API and Python","weight":0,"excerpt":"Most of us use GitHub every day either using CLI or its website. Sometimes however, you need to automate these same tasks like, for example creating Gist, querying repository analytics or just pulling, modifying and pushing new file.","seo":{"title":"All the Things You Can Do With GitHub API and Python","description":"Most of us use GitHub every day either using CLI or its website. Sometimes however, you need to automate these same tasks like, for example creating Gist, querying repository analytics or just pulling, modifying and pushing new file. All these things and more can be done easily using GitHub API, and Python is here to help with that and make it even easier.","robots":[],"extra":[]},"template":"docs"},"html":"<h1>All the Things You Can Do With GitHub API and Python</h1>\n<blockquote>\n<p>All the Things You Can Do With GitHub API and Python</p>\n</blockquote>\n<p>Most of us use GitHub every day either using CLI or its website. Sometimes however, you need to automate these same tasks like, for example creating Gist, querying repository analytics or just pulling, modifying and pushing new file. All these things and more can be done easily using <a href=\"https://developer.github.com/v3/\">GitHub API</a>, and Python is here to help with that and make it even easier.</p>\n<h2>What We Will Need</h2>\n<p>Before we start using GitHub API, we first need to generate personal access token that will allow us to authenticate against the API. We can get one at <a href=\"https://github.com/settings/tokens\">https://github.com/settings/tokens</a> by clicking on <em>Generate new token</em>. You will be asked to select scopes for the token. Which scopes you choose will determine what information and actions you will be able to perform against the API. You should be careful with the ones prefixed with <code>write:</code>, <code>delete:</code> and <code>admin:</code> as these might be quite destructive. You can find description of each scope in <a href=\"https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/\">docs here</a>.</p>\n<p>Now that we have the token, let's test whether it actually works:</p>\n<pre><code>~ $ GITHUB_TOKEN=\"...\"\n~ $ curl -H \"Authorization: token $GITHUB_TOKEN\" https://api.github.com/gists\n</code></pre>\n<p>And here is the expected (trimmed) response showing list of my public <em>Gists</em>:</p>\n<pre><code>[\n  {\n    \"url\": \"https://api.github.com/gists/f3da4b0e3493b4bba4fb957fba1eaa02\",\n    \"forks_url\": \"https://api.github.com/gists/f3da4b0e3493b4bba4fb957fba1eaa02/forks\",\n    \"commits_url\": \"https://api.github.com/gists/f3da4b0e3493b4bba4fb957fba1eaa02/commits\",\n    \"id\": \"f3da4b0e3493b4bba4fb957fba1eaa02\",\n    \"node_id\": \"MDQ6R2lzdGYzZGE0YjBlMzQ5M2I0YmJhNGZiOTU3ZmJhMWVhYTAy\",\n    \"git_pull_url\": \"https://gist.github.com/f3da4b0e3493b4bba4fb957fba1eaa02.git\",\n    \"git_push_url\": \"https://gist.github.com/f3da4b0e3493b4bba4fb957fba1eaa02.git\",\n    \"html_url\": \"https://gist.github.com/f3da4b0e3493b4bba4fb957fba1eaa02\",\n    \"files\": {\n      \"Test\": {\n        \"filename\": \"Test\",\n        \"type\": \"text/plain\",\n        \"language\": null,\n        \"raw_url\": \"https://gist.githubusercontent.com/MartinHeinz/f3da4b0e3493b4bba4fb957fba1eaa02/raw/cebefee5794b12a1772c97673647678f057a6854/Test\",\n        \"size\": 32\n      }\n    },\n    \"truncated\": false\n  }\n]\n</code></pre>\n<h2>Doing It With Python</h2>\n<p>We have the personal token and we tested it with <code>cURL</code>, so now we can switch to doing the same thing in Python. We have two options here though. We can use raw requests or we can use <a href=\"https://github.com/PyGithub/PyGithub\"><em>PyGitHub</em></a>.</p>\n<p><em>PyGitHub</em> exposes some of the GitHub API endpoints for most common operations like repository, issue or branch management. It can't be used for every single feature exposed through the GitHub API, so in the following sections, I will show mixture of <em>PyGitHub</em> and <em>Requests</em> calls depending on whether it can be done with <em>PyGitHub</em> or not.</p>\n<p>First things first though - let's install both libraries (<em>PyGitHub</em> and <em>Requests</em>) and see a simple example for both:</p>\n<pre><code>~ $ pip install PyGithub requests\n</code></pre>\n<p>Example using <em>PyGitHub</em>:</p>\n<pre><code>from github import Github\nimport os\nfrom pprint import pprint\n\ntoken = os.getenv('GITHUB_TOKEN', '...')\ng = Github(token)\nrepo = g.get_repo(\"MartinHeinz/python-project-blueprint\")\nissues = repo.get_issues(state=\"open\")\npprint(issues.get_page(0))\n</code></pre>\n<p>Example using <em>Requests</em>:</p>\n<pre><code>import requests\nimport os\nfrom pprint import pprint\n\ntoken = os.getenv('GITHUB_TOKEN', '...')\nowner = \"MartinHeinz\"\nrepo = \"python-project-blueprint\"\nquery_url = f\"https://api.github.com/repos/{owner}/{repo}/issues\"\nparams = {\n    \"state\": \"open\",\n}\nheaders = {'Authorization': f'token {token}'}\nr = requests.get(query_url, headers=headers, params=params)\npprint(r.json())\n</code></pre>\n<p>Both snippets above use the same API endpoint to retrieve all open issues for specified repository.</p>\n<p>In both cases we start by taking GitHub token from environment variable. Next, in the example with using <em>PyGitHub</em> we use the token to create instance of <code>GitHub</code> class, which is then used to get repository and query its issues in <em>open state</em>. The result is paginated list of issues, of which we print the first page.</p>\n<p>In the example that uses raw HTTP request, we achieve the same result by building API URL from username and repository name and sending GET request to it containing <code>state</code> as body parameter and token as <code>Authorization</code> header. Only difference is that result is not paginated. Here is the result for both examples:</p>\n<p>First one being <em>PyGitHub</em> output:</p>\n<pre><code>[Issue(title=\"configure_project script not working\", number=10),\n Issue(title=\"Consider Flask-Rest\", number=9),\n Issue(title=\"Add newline to match dev.Dockerfile\", number=7),\n Issue(title=\"Consider using wemake-python-styleguide\", number=5),\n Issue(title=\"Consider versioneer\", number=4),\n Issue(title=\"Adding isort and black\", number=3),\n Issue(title=\"Consider src directory\", number=2)]\n</code></pre>\n<p>Second, raw Python list of dictionaries (JSON):</p>\n<pre><code>[{'assignee': None,\n  'body': 'Some Markdown text...',\n  'comments': 0,\n  'comments_url': 'https://api.github.com/repos/MartinHeinz/python-project-blueprint/issues/10/comments',\n  'created_at': '2020-04-20T22:16:33Z',\n  'html_url': 'https://github.com/MartinHeinz/python-project-blueprint/issues/10',\n  'id': 603571386,\n  'labels': [],\n  'labels_url': 'https://api.github.com/repos/MartinHeinz/python-project-blueprint/issues/10/labels{/name}',\n  'milestone': None,\n  'node_id': 'MDU6SXNzdWU2MDM1NzEzODY=',\n  'repository_url': 'https://api.github.com/repos/MartinHeinz/python-project-blueprint',\n  'state': 'open',\n  'title': 'configure_project script not working',\n  'url': 'https://api.github.com/repos/MartinHeinz/python-project-blueprint/issues/10',\n  'user': {...}},\n  ...\n]\n</code></pre>\n<h2>Create an Issue</h2>\n<p>While on topic of issues, let's create one too, shall we?</p>\n<pre><code>g = Github(token)\nrepo = g.get_repo(\"MartinHeinz/python-project-blueprint\")\ni = repo.create_issue(\n    title=\"Issue Title\",\n    body=\"Text of the body.\",\n    assignee=\"MartinHeinz\",\n    labels=[\n        repo.get_label(\"good first issue\")\n    ]\n)\npprint(i)\n</code></pre>\n<p>This is one of the use cases, where <em>PyGitHub</em> is very handy. We just need to get the repository, create issues against it and specify bunch of parameters. In the snippet above we use <code>title</code>, <code>body</code>, <code>assignee</code> and <code>labels</code> parameters, but you could also add milestone or more labels which are queried using their name.</p>\n<h2>Create a Gist</h2>\n<p>Another things we can create is GitHub <em>Gist</em>, this time using <em>Requests</em>:</p>\n<pre><code>query_url = \"https://api.github.com/gists\"\ndata = {\n    \"public\": True,\n    \"files\": {\n        \"code.py\": {\n            \"content\": \"print('some code')\"\n        },\n    }\n}\nheaders = {'Authorization': f'token {token}'}\nr = requests.post(query_url, headers=headers, data=json.dumps(data))\npprint(r.json())\n</code></pre>\n<p>The request for creating <em>Gists</em> is pretty simple. In the POST request you need to specify whether the <em>Gist</em> should be <code>public</code> or not, next you need to populate list of <code>files</code> that will be part of said <em>Gist</em>, where each <em>key</em> is a file name and its <code>content</code> contains actual string content of the file. The code above uses <code>json.dumps()</code> to convert Python dictionary to JSON string to create request body and the usual <em>Authorization</em> header.</p>\n<p>Below you can see the relevant parts of the expected response:</p>\n<pre><code>{\"comments\": 0,\n \"description\": null,\n \"files\": {\"code.py\": {\"content\": \"print('some code')\",\n                       \"filename\": \"code.py\",\n                       \"language\": \"Python\",\n                       \"raw_url\": \"https://gist.githubusercontent.com/MartinHeinz/383c6b450f892e169074a642a372e459/raw/8d53df5862f8b687fc09d0b3c1b3c49afe441cbe/code.py\",\n                       \"size\": 18,\n                       \"truncated\": null,\n                       \"type\": \"application/x-python\"}},\n \"forks\": [],\n \"html_url\": \"https://gist.github.com/383c6b450f892e169074a642a372e459\",\n \"id\": \"383c6b450f892e169074a642a372e459\",\n \"node_id\": \"MDQ6R2lzdDM4M2M2YjQ1MGY4OTJlMTY5MDc0YTY0MmEzNzJlNDU5\",\n \"public\": true,\n \"url\": \"https://api.github.com/gists/383c6b450f892e169074a642a372e459\"\n}\n</code></pre>\n<p>After creating a <em>Gist</em> you might want to do other things with it like update it, list commits, fork it or just fetch it. For all these operations there's a API endpoint listed in these <a href=\"https://developer.github.com/v3/gists/\">docs</a>.</p>\n<h2>Programmatically Update File</h2>\n<p>One very practical, but quite complicated use case for using GitHub API, is programmatically fetching, modifying, committing and finally pushing some file to repository. Let's break this down and see an example:</p>\n<pre><code>file_path = \"requirements.txt\"\ng = Github(token)\nrepo = g.get_repo(\"MartinHeinz/python-project-blueprint\")\n\nfile = repo.get_contents(file_path, ref=\"master\")\ndata = file.decoded_content.decode(\"utf-8\")\ndata += \"\\npytest==5.3.2\"\n\ndef push(path, message, content, branch, update=False):\n    author = InputGitAuthor(\n        \"MartinHeinz\",\n        \"martin7.heinz@gmail.com\"\n    )\n    source = repo.get_branch(\"master\")\n    repo.create_git_ref(ref=f\"refs/heads/{branch}\", sha=source.commit.sha)\n    if update:\n        contents = repo.get_contents(path, ref=branch)\n        repo.update_file(contents.path, message, content, contents.sha, branch=branch, author=author)\n    else:\n        repo.create_file(path, message, content, branch=branch, author=author)\n\npush(file_path, \"Add pytest to dependencies.\", data, \"update-dependencies\", update=True)\n</code></pre>\n<p>Starting from the top, we get contents of a file using the usual repository reference, decode it to plain string and modify it. Next, in the <code>push</code> function, we create new branch originating from commit specified using <code>source.commit.sha</code>. Based on the <code>if</code> statement, we have 2 options update existing file or create new one. In case we're doing update, we first retrieve existing file to get its hash and path and then we perform the update using previously modified data (<code>content</code>), supplied <code>message</code>, <code>branch</code> and <code>author</code> object. If on the other hand we want to create a new file in the repository, then we just omit passing in the SHA of existing file and we're done.</p>\n<h2>Analyzing Traffic</h2>\n<p>If you are more into data science and analytics you might find useful possibility of querying views/clones statistics from your repositories:</p>\n<pre><code>g = Github(token)\nrepo = g.get_repo(\"MartinHeinz/python-project-blueprint\")\nclones = repo.get_clones_traffic(per=\"day\")\nviews = repo.get_views_traffic(per=\"day\")\n\nprint(f\"Repository has {clones['count']} clones out of which {clones['uniques']} are unique.\")\nprint(f\"Repository has {views['count']} views out of which {views['uniques']} are unique.\")\n\nbest_day = max(*list((day.count, day.timestamp) for day in views[\"views\"]), key=itemgetter(0))\n\npprint(views)\nprint(f\"Repository had most views on {best_day[1]} with {best_day[0]} views\")\n</code></pre>\n<p>The code needed to retrieve the data from GiHub is really just one line for <em>clones</em> and one line for <em>views</em>. Both the <code>clones</code> and <code>views</code> object contains <code>count</code>, <code>uniques</code> and <code>views</code> attributes. We use the first 2 in the print statements to show actual and unique clones and views respectively.</p>\n<p>The disgusting (beautiful) one liner after that iterates over list of <code>View</code> objects that contain view <code>count</code> for each day and respective <code>timestamp</code> which we extract into list of tuples. We then find tuple with maximum <code>count</code> and print its date and actual view count on last line. This gives us output shown below:</p>\n<pre><code>Repository has 31 clones out of which 23 are unique.\nRepository has 1672 views out of which 297 are unique.\n{'count': 1672,\n 'uniques': 297,\n 'views': [View(uniques=6, timestamp=2020-04-28 00:00:00, count=29),\n           View(uniques=30, timestamp=2020-04-29 00:00:00, count=141),\n           View(uniques=37, timestamp=2020-04-30 00:00:00, count=184),\n           View(uniques=25, timestamp=2020-05-01 00:00:00, count=93),\n           View(uniques=24, timestamp=2020-05-02 00:00:00, count=131),\n           View(uniques=20, timestamp=2020-05-03 00:00:00, count=41),\n           View(uniques=26, timestamp=2020-05-04 00:00:00, count=121),\n           View(uniques=41, timestamp=2020-05-05 00:00:00, count=250),\n           View(uniques=47, timestamp=2020-05-06 00:00:00, count=184),\n           View(uniques=33, timestamp=2020-05-07 00:00:00, count=216),\n           View(uniques=15, timestamp=2020-05-08 00:00:00, count=48),\n           View(uniques=20, timestamp=2020-05-09 00:00:00, count=71),\n           View(uniques=22, timestamp=2020-05-10 00:00:00, count=51),\n           View(uniques=7, timestamp=2020-05-11 00:00:00, count=16),\n           View(uniques=14, timestamp=2020-05-12 00:00:00, count=96)]}\nRepository had most views on 2020-05-05 00:00:00 with 250 views\n</code></pre>\n<h2>Rendering Markdown</h2>\n<p>This example uses GitHub API, but can be used for non-GitHub purposes. I'm talking about GitHub APIs ability to generate HTML from markdown text. This could be useful if you have website that can't render markdown directly, but rather you could use GitHub API to create HTML for you.</p>\n<pre><code>query_url = \"https://api.github.com/markdown\"\ndata = {\n  \"text\": \"`code`, _italics_, **bold**\",\n  \"mode\": \"markdown\",\n}\nheaders = {'Authorization': f'token {token}'}\nr = requests.post(query_url, headers=headers, data=json.dumps(data))\npprint(r)\npprint(r.text)\n</code></pre>\n<p>Once again the query is quite simple. All we need to do is send the text to be rendered in <code>text</code> body parameter together with mode set to <code>markdown</code>. The example <code>text</code> above includes, <code>code</code> snippet, <em>italics</em> and *bold* text and that's exactly what we get back in form of HTML:</p>\n<p>Response:</p>\n<pre><code>&#x3C;Response [200]>\n'&#x3C;p>&#x3C;code>code&#x3C;/code>, &#x3C;em>italics&#x3C;/em>, &#x3C;strong>bold&#x3C;/strong>&#x3C;/p>\\n'\n</code></pre>\n<h2>Update Commit Status</h2>\n<p>You know these nice green check marks, yellow circles and ugly red crosses next to your commits that are added by CI tools? Do you want to change them (maybe just for fun, maybe as part of your own CI solution)? Of course you do. And there is API for that:</p>\n<pre><code>g = Github(token)\nrepo = g.get_repo(\"MartinHeinz/python-project-blueprint\")\nbranch = repo.get_branch(branch=\"master\")\nstatus = repo.get_commit(sha=branch.commit.sha).create_status(\n    state=\"success\",\n    target_url=\"https://some-ci-url.com\",\n    description=\"CI in Progress\",\n    context=\"Just testing...\"\n)\nprint(status)\n</code></pre>\n<p>Surprisingly (for me) this obscure API endpoint is part of <em>PyGitHub</em> library. To use it, we retrieve repo and its commit using commit hash. After that we create status for said commit, by describing its current state using parameters.</p>\n<p>There are 4 states we can specify, namely - <code>error</code>, <code>failure</code>, <code>pending</code>, or <code>success</code> - in this example I chose <code>success</code>. Next, the <code>target_url</code> is the URL to which the <em>Details</em> link points. And as you probably noticed, the <code>description</code> and <code>context</code> are the other values shown in dialog box shown below.</p>\n<p><img src=\"https://dev-to-uploads.s3.amazonaws.com/i/cichfnimv8dmy0xtfyq0.png\" alt=\"GitHub Status Check\"></p>\n<p>To be able to verify that status change actually went through, we receive <code>CommitStatus</code> response which is representation of current status of commit. In this case looks like this:</p>\n<pre><code>CommitStatus(state=\"success\", id=9617694889, context=\"Just testing...\")\n</code></pre>\n<h2>Adding Reactions to Issue Comments</h2>\n<p>GitHub issue comments allow you to add various <a href=\"https://developer.github.com/v3/reactions/#reaction-types\">reactions</a> to them. So, maybe you want to add <code>+1</code>/<code>-1</code> to somebodies comment. Maybe just throw in some celebratory <code>hooray</code> emoji. If that's the case, then here's how you could do that in Python:</p>\n<pre><code>owner = \"MartinHeinz\"\nrepo = \"python-project-blueprint\"\ncomment_id = \"593154350\"\nquery_url = f\"https://api.github.com/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\ndata = {\n  \"content\": \"hooray\"\n}\nheaders = {\n    'Authorization': f'token {token}',\n    'Accept': 'application/vnd.github.squirrel-girl-preview',\n}\nr = requests.post(query_url, headers=headers, data=json.dumps(data))\npprint(r)\npprint(r.json())\n</code></pre>\n<p>To be able to create response, we will need the comment ID. It can be retrieved from API shown <a href=\"https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue\">here in docs</a> or by clicking on the <em>three dots</em> icon in upper right corner of issue comment and clicking <em>Copy Link</em>:</p>\n<p><img src=\"https://dev-to-uploads.s3.amazonaws.com/i/5yyiatip56qs1md0vx7l.png\" alt=\"Comment ID\"></p>\n<p>With that we can insert <code>owner</code> username, <code>repo</code> name and this <code>comment_id</code> in the URL and emoji name (e.g. <code>hooray</code>) in the <code>content</code> body parameter. Additionally we need to also include <code>Accept</code> header, as this endpoint is part of developer preview.</p>\n<p>The expected response here is either <code>201</code> which means that reaction was created or <code>200</code> in which case the reaction was already added previously.</p>\n<pre><code>&#x3C;Response [201]>  # First pprint from snippet above.\n</code></pre>\n<p>And here is (trimmed) JSON response body, that we get back:</p>\n<pre><code>{\"content\": \"hooray\",\n \"created_at\": \"2020-05-12T15:43:53Z\",\n \"id\": 71256913,\n \"node_id\": \"MDg6UmVhY3Rpb243MTI1NjkxMw==\",\n \"user\": {...}}\n</code></pre>\n<h2>Conclusion</h2>\n<p>Playing with public APIs is great way to start a new project (e.g. CI tools, Repository traffic analytics, GitHub Bots) and GitHub API has a lot of data/content for such a thing. What I showed here is just a small sample. To explore full API see <a href=\"https://developer.github.com/v3/\">docs here</a> or if you don't feel like messing with the REST API, then check out <a href=\"https://pygithub.readthedocs.io/en/latest/examples.html\"><em>PyGitHub</em> Examples</a>.</p>\n<p><a href=\"https://martinheinz.dev/blog/25\">Source</a></p>"},{"url":"/docs/content/history-api/","relativePath":"docs/content/history-api.md","relativeDir":"docs/content","base":"history-api.md","name":"history-api","frontmatter":{"title":"History API","weight":0,"excerpt":"history API explained","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>History Api</h1>\n<h1>\n\n</h1>\n<p>The DOM <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window\">Window</a> object provides access to the browser's session history (not to be confused for <a href=\"https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/history\">WebExtensions history</a>) through the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/history\">history</a> object. It exposes useful methods and properties that let you navigate back and forth through the user's history, and manipulate the contents of the history stack.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API#concepts_and_usage\">Concepts and usage</a></h2>\n<p>Moving backward and forward through the user's history is done using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/back\">back()</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/forward\">forward()</a>, and <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/go\">go()</a> methods.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API#moving_forward_and_backward\">Moving forward and backward</a></h3>\n<p>To move backward through history:</p>\n<p>This acts exactly as if the user clicked on the <strong>Back</strong> button in their browser toolbar.</p>\n<p>Similarly, you can move forward (as if the user clicked the <strong>Forward</strong> button), like this:</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API#moving_to_a_specific_point_in_history\">Moving to a specific point in history</a></h3>\n<p>You can use the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/go\">go()</a> method to load a specific page from session history, identified by its relative position to the current page. (The current page's relative position is 0.)</p>\n<p>To move back one page (the equivalent of calling <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/back\">back()</a>):</p>\n<p>To move forward a page, just like calling <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/forward\">forward()</a>:</p>\n<p>Similarly, you can move forward 2 pages by passing 2, and so forth.</p>\n<p>Another use for the go() method is to refresh the current page by either passing 0, or by invoking it without an argument:</p>\n<p>You can determine the number of pages in the history stack by looking at the value of the length property:</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API#interfaces\">Interfaces</a></h2>\n<p>Allows manipulation of the browser <em>session history</em> (that is, the pages visited in the tab or frame that the current page is loaded in).</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API#examples\">Examples</a></h2>\n<p>The following example assigns a listener to the onpopstate property. And then illustrates some of the methods of the history object to add, replace, and move within the browser history for the current tab.</p>\n<h1>Working with the History API\n</h1>\n<p>HTML5 introduced the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/pushState\">pushState()</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\">replaceState()</a> methods for add and modifying history entries, respectively. These methods work in conjunction with the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate\">onpopstate</a> event.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#adding_and_modifying_history_entries\">Adding and modifying history entries</a></h2>\n<p>Using <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/pushState\">pushState()</a> changes the referrer that gets used in the HTTP header for <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\">XMLHttpRequest</a> objects created after you change the state. The referrer will be the URL of the document whose window is this at the time of creation of the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\">XMLHttpRequest</a> object.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#example_of_pushstate_method\">Example of pushState() method</a></h3>\n<p>Suppose <a href=\"https://mozilla.org/foo.html\">https://mozilla.org/foo.html</a> executes the following JavaScript:</p>\n<p>This will cause the URL bar to display <a href=\"https://mozilla.org/bar.html\">https://mozilla.org/bar.html</a>, but won't cause the browser to load bar.html or even check that bar.html exists.</p>\n<p>Suppose now that the user navigates to <a href=\"https://google.com\">https://google.com</a>, then clicks the <strong>Back</strong> button. At this point, the URL bar will display <a href=\"https://mozilla.org/bar.html\">https://mozilla.org/bar.html</a> and history.state will contain the stateObj. The popstate event won't be fired because the page has been reloaded. The page itself will look like bar.html.</p>\n<p>If the user clicks <strong>Back</strong> once again, the URL will change to <a href=\"https://mozilla.org/foo.html\">https://mozilla.org/foo.html</a>, and the document will get a popstate event, this time with a null state object. Here too, going back doesn't change the document's contents from what they were in the previous step, although the document might update its contents manually upon receiving the popstate event.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#the_pushstate_method\">The pushState() method</a></h3>\n<p>pushState() takes three parameters: a <strong>state object</strong>; a <strong>title</strong> (currently ignored); and (optionally), a <strong>URL</strong>.</p>\n<p>Let's examine each of these three parameters in more detail.</p>\n<p>The state object is a JavaScript object which is associated with the new history entry created by pushState(). Whenever the user navigates to the new state, a popstate event is fired, and the state property of the event contains a copy of the history entry's state object. The state object can be anything that can be serialized. Because Firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object. If you pass a state object whose serialized representation is larger than this to pushState(), the method will throw an exception. If you need more space than this, you're encouraged to use sessionStorage and/or localStorage.</p>\n<p><a href=\"https://github.com/whatwg/html/issues/2174\">All browsers but Safari currently ignore this parameter</a>, although they may use it in the future. Passing the empty string here should be safe against future changes to the method. Alternatively, you could pass a short title for the state to which you're moving.</p>\n<p>The new history entry's URL is given by this parameter. Note that the browser won't attempt to load this URL after a call to pushState(), but it might attempt to load the URL later, for instance after the user restarts the browser. The new URL does not need to be absolute; if it's relative, it's resolved relative to the current URL. The new URL must be of the same origin as the current URL; otherwise, pushState() will throw an exception. This parameter is optional; if it isn't specified, it's set to the document's current URL.</p>\n<p><strong>Note:</strong> In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) through Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), the passed object is serialized using JSON. Starting in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the object is serialized using <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\">the structured clone algorithm</a>. This allows a wider variety of objects to be safely passed.</p>\n<p>In a sense, calling pushState() is similar to setting window.location = \"#foo\", in that both will also create and activate another history entry associated with the current document.</p>\n<p>But pushState() has a few advantages:</p>\n<ul>\n<li>The new URL can be any URL in the same origin as the current URL. In contrast, setting window.location keeps you at the same <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document\">document</a> only if you modify only the hash.</li>\n<li>You don't have to change the URL if you don't want to. In contrast, setting window.location = \"#foo\"; creates a new history entry only if the current hash isn't #foo.</li>\n<li>You can associate arbitrary data with your new history entry. With the hash-based approach, you need to encode all of the relevant data into a short string.</li>\n<li>If title is subsequently used by browsers, this data can be utilized (independent of, say, the hash).</li>\n</ul>\n<p>Note that pushState() never causes a hashchange event to be fired, even if the new URL differs from the old URL only in its hash.</p>\n<p>In other documents, it creates an element with a null namespace URI.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#the_replacestate_method\">The replaceState() method</a></h3>\n<p>history.replaceState() operates exactly like history.pushState(), except that replaceState() modifies the current history entry instead of creating a new one. Note that this doesn't prevent the creation of a new entry in the global browser history.</p>\n<p>replaceState() is particularly useful when you want to update the state object or URL of the current history entry in response to some user action.</p>\n<p><strong>Note:</strong> In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) through Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), the passed object is serialized using JSON. Starting in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the object is serialized using <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\">the structured clone algorithm</a>. This allows a wider variety of objects to be safely passed.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#example_of_replacestate_method\">Example of replaceState() method</a></h3>\n<p>Suppose <a href=\"https://mozilla.org/foo.html\">https://mozilla.org/foo.html</a> executes the following JavaScript:</p>\n<p>The explanation of these two lines above can be found at the above section <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#example_of_pushstate_method\"><em>Example of pushState() method</em></a> section.</p>\n<p>Next, suppose <a href=\"https://mozilla.org/bar.html\">https://mozilla.org/bar.html</a> executes the following JavaScript:</p>\n<p>This will cause the URL bar to display <a href=\"https://mozilla.org/bar2.html\">https://mozilla.org/bar2.html</a>, but won't cause the browser to load bar2.html or even check that bar2.html exists.</p>\n<p>Suppose now that the user navigates to <a href=\"https://www.microsoft.com\">https://www.microsoft.com</a>, then clicks the <strong>Back</strong> button. At this point, the URL bar will display <a href=\"https://mozilla.org/bar2.html\">https://mozilla.org/bar2.html</a>. If the user now clicks <strong>Back</strong> again, the URL bar will display <a href=\"https://mozilla.org/foo.html\">https://mozilla.org/foo.html</a>, and totally bypass bar.html.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#the_popstate_event\">The popstate event</a></h3>\n<p>A popstate event is dispatched to the window every time the active history entry changes. If the history entry being activated was created by a call to <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/pushState\">pushState</a> or affected by a call to <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\">replaceState</a>, the popstate event's state property contains a copy of the history entry's state object.</p>\n<p>See <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate\">WindowEventHandlers.onpopstate</a> for sample usage.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#reading_the_current_state\">Reading the current state</a></h3>\n<p>When your page loads, it might have a non-null state object.  This can happen, for example, if the page sets a state object (using <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/pushState\">pushState()</a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\">replaceState()</a>) and then the user restarts their browser. When the page reloads, the page will receive an onload event, but no popstate event. However, if you read the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/state\">history.state</a> property, you'll get back the state object you would have gotten if a popstate had fired.</p>\n<p>You can read the state of the current history entry without waiting for a popstate event using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/state\">history.state</a> property like this:</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API#see_also\">See also</a></h2>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API\">History API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API/Example\">Ajax navigation example</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/history\">window.history</a></li>\n</ul>\n<h1>Window.historyCopy to Clipboard\n\n</h1>\n<p>The Window.history read-only property returns a reference to the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History\">History</a> object, which provides an interface for manipulating the browser <em>session history</em> (pages visited in the tab or frame that the current page is loaded in).</p>\n<p>See <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API\">Manipulating the browser history</a> for examples and details. In particular, that article explains security features of the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/pushState\">pushState()</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\">replaceState()</a> methods that you should be aware of before using them.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/history#example\">Example</a></h2>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/history#notes\">Notes</a></h2>\n<p>For top-level pages you can see the list of pages in the session history, accessible via the History object, in the browser's dropdowns next to the back and forward buttons.</p>\n<p>For security reasons the History object doesn't allow the non-privileged code to access the <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/URL\">URLs</a> of other pages in the session history, but it does allow it to navigate the session history.</p>\n<p>There is no way to clear the session history or to disable the back/forward navigation from unprivileged code. The closest available solution is the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Location/replace\">location.replace()</a> method, which replaces the current item of the session history with the provided URL.</p>"},{"url":"/docs/content/archive/","relativePath":"docs/content/archive.md","relativeDir":"docs/content","base":"archive.md","name":"archive","frontmatter":{"title":"Archive","weight":0,"seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Archives:</h1>\n<br>\n<br>\n<br>\n<br>\n<h1> Text Tools     </h1>\n<br>\n<iframe src=\"https://devtools42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Ternary Converter   </h1>\n<br>\n<iframe src=\"https://ternary42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<table>\n<thead>\n<tr>\n<th>****</th>\n<th>****</th>\n<th>****</th>\n<th>****</th>\n<th>****</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>2</td>\n<td>3</td>\n<td>4</td>\n<td>5</td>\n</tr>\n<tr>\n<td>leonardomso/33-js-concepts<em>This repository was created with the intention of helping developers master their concepts in JavaScript. It is not a…</em>github.com</td>\n<td>Call stack - MDN Web Docs Glossary: Definitions of Web-related terms MDN<em>A call stack is a mechanism for an interpreter (like the JavaScript interpreter in a web browser) to keep track of its…</em>developer.mozilla.org</td>\n<td>Understanding Javascript Function Executions — Call Stack, Event Loop , Tasks &#x26; more<em>Web developers or Front end engineers, as that's what we like to be called, nowadays do everything right from acting as…</em>medium.com</td>\n<td>Understanding the JavaScript call stack<em>The JavaScript engine (which is found in a hosting environment like the browser), is a single-threaded interpreter…</em>medium.freecodecamp.org Javascript: What Is The Execution Context? What Is The Call Stack?<em>What is the Execution Context in Javascript? I bet you don't know the answer. What are the most basic components of a…</em>web.archive.org</td>\n<td>Understanding Execution Context and Execution Stack in Javascript<em>Understanding execution context and stack to become a better Javascript developer.</em>blog.bitsrc.io</td>\n</tr>\n<tr>\n<td>JavaScript data types and data structures - JavaScript MDN<em>Programming languages all have built-in data structures, but these often differ from one language to another. This…</em>developer.mozilla.org</td>\n<td>How numbers are encoded in JavaScript<em>Edit description</em>2ality.com</td>\n<td>Here is what you need to know about JavaScript's Number type<em>Why 0.1+0.2 IS NOT equal to 0.3 and 9007199254740992 IS equal to 9007199254740993</em>medium.com</td>\n<td>What Every JavaScript Developer Should Know About Floating Point Numbers<em>After I gave my talk on JavaScript (really, I was there trying to shamelessly plug my book - Underhanded JavaScript and…</em>blog.chewxy.com</td>\n<td>The Secret Life of JavaScript Primitives<em>You may not know it but, in JavaScript, whenever you interact with string, number or boolean primitives you enter a…</em>javascriptweblog.wordpress.com</td>\n</tr>\n<tr>\n<td>JavaScript Reference and Copy Variables Hacker Noon<em>Each programming language has its own peculiarities (and JavaScript has a lot), and today I'm going to talk about…</em>hackernoon.com</td>\n<td>JavaScript Primitive vs. Reference Values<em>Summary: in this tutorial, you will learn the differences between primitive and reference values. In JavaScript, a…</em>www.javascripttutorial.net</td>\n<td>JavaScript by reference vs. by value<em>I'm looking for some good comprehensive reading material on when JavaScript passes something by value and when by…</em>stackoverflow.com</td>\n<td>JavaScript Interview Prep: Primitive vs. Reference Types<em>original article In a JavaScript interview, they might ask if you understand the difference between primitive and…</em>dev.to</td>\n<td>What you need to know about Javascript's Implicit Coercion<em>Javascript's implicit coercion simply refers to Javascript attempting to coerce an unexpected value type to the…</em>dev.to</td>\n</tr>\n<tr>\n<td>Javascript Coercion Explained<em>Along with some practical examples</em>hackernoon.com</td>\n<td>What exactly is Type Coercion in Javascript?<em>Let's start with a short intro to type systems which I think will help you understand the general idea of type…</em>stackoverflow.com</td>\n<td><a href=\"https://thedevs.network/*Weak\">https://thedevs.network/*Weak</a> dynamic typing is arguably one of those things everybody likes to pick at about JavaScript. For an elegant dynamic…*thedevs.network</td>\n<td>getify/You-Dont-Know-JS<em>A book series on JavaScript. @YDKJS on twitter. Contribute to getify/You-Dont-Know-JS development by creating an…</em>github.com</td>\n<td>JavaScript — Double Equals vs. Triple Equals<em>Learn equality in JavaScript in 3 minutes</em>codeburst.io</td>\n</tr>\n<tr>\n<td>Why Use the Triple-Equals Operator in JavaScript? - Impressive Webs<em>“Determining whether two variables are equivalent is one of the most important operations in programming.” That's…</em>www.impressivewebs.com</td>\n<td>What is the difference between == and === in JavaScript?_On the surface == and === appear to be functionally the same, so why bother typing an extra character? In this video…_www.oreilly.com</td>\n<td>Why javascript's typeof always return “object”?<em>To add in with the others, typeof returns both objects and primitives. There are 5 primitive types in javascript…</em>stackoverflow.com</td>\n<td>Checking Types in Javascript<em>Have you ever wondered: what is the correct way to check if a Javascript variable is an Array? Do a Google search and…</em>tobyho.com</td>\n<td>How to better check data types in javascript - Webbjocke<em>To check what data type something has in javascript is not always the easiest. The language itself provides an operator…</em>webbjocke.com</td>\n</tr>\n<tr>\n<td>A JavaScript Fundamentals Cheat Sheet: Scope, Context, and “this”<em>Scope Scope refers to where a variable can be accessed within a program. Some variables can be accessed from anywhere…</em>dev.to</td>\n<td>Quick Tip: Function Expressions vs Function Declarations - SitePoint<em>This article was peer reviewed by Jeff Mott. Thanks to all of SitePoint's peer reviewers for making SitePoint content…</em>www.sitepoint.com</td>\n<td>JavaScript Function — Declaration vs Expression<em>Functions are considered as First Class citizen in JavaScript and it is really important to be clear with the concept…</em>medium.com</td>\n<td>Function Declarations vs. Function Expressions<em>What is Function Statement/Declarations in JavaScript?</em>medium.com</td>\n<td>Function Declarations vs. Function Expressions<em>Lets start with a short quiz. What is alerted in each case?: Question 1: Question 2: Question 3: Question 4: If you…</em>javascriptweblog.wordpress.com</td>\n</tr>\n<tr>\n<td>16. Modules<em>Edit description</em>exploringjs.com</td>\n<td>ES modules: A cartoon deep-dive - Mozilla Hacks - the Web developer blog<em>ES modules bring an official, standardized module system to JavaScript. With the release of Firefox 60 in May, all…</em>hacks.mozilla.org</td>\n<td>Understanding ES6 Modules - SitePoint<em>Almost every language has a concept of modules - a way to include functionality declared in one file within another…</em>www.sitepoint.com</td>\n<td>An overview of ES6 Modules in JavaScript<em>Introduction Until recently if you wanted to take full advantage of modules in JavaScript you needed to make use of…</em>blog.cloud66.com</td>\n<td>ES6 Modules in Depth<em>Welcome back to ES6 - “Oh, good. It's not another article about Unicode” - in Depth series. If you've never been around…</em>ponyfoo.com</td>\n</tr>\n<tr>\n<td>How JavaScript works: Event loop and the rise of Async programming + 5 ways to better coding with…<em>Welcome to post # 4 of the series dedicated to exploring JavaScript and its building components. In the process of…</em>blog.sessionstack.com</td>\n<td>Tasks, microtasks, queues and schedules<em>Edit description</em>jakearchibald.com</td>\n<td>Visualising the JavaScript Event Loop with a Pizza Restaurant analogy<em>Consider a pizza restaurant. There are two types of orders that we currently have from a single customer - one is an…</em>dev.to</td>\n<td>✨♻️ JavaScript Visualized: Event Loop<em>Oh boi the event loop. It's one of those things that every JavaScript developer has to deal with in one way or another…</em>dev.to</td>\n<td>Scheduling: setTimeout and setInterval<em>Edit description</em>javascript.info</td>\n</tr>\n<tr>\n<td>Understanding How the Chrome V8 Engine Translates JavaScript into Machine Code<em>Before diving deep into the core of Chrome's V8, first, let's get our fundamentals down. All of our systems consist of…</em>medium.freecodecamp.org</td>\n<td>Understanding V8's Bytecode<em>V8 is Google's open source JavaScript engine. Chrome, Node.js, and many other applications use V8. This article…</em>medium.com</td>\n<td>A Brief History of Google's V8 JavaScript Engine<em>Javascript has a reputation in developer circles as a terrible language. It's classless, loosely typed, and plagued by…</em>www.mediacurrent.com</td>\n<td>JavaScript essentials: why you should know how the engine works<em>This article is also available in Spanish.</em>medium.freecodecamp.org</td>\n<td>JavaScript engine fundamentals: Shapes and Inline Caches<em>This article describes some key fundamentals that are common to all JavaScript engines - and not just V8, the engine…</em>mathiasbynens.be</td>\n</tr>\n<tr>\n<td>JavaScript engine fundamentals: optimizing prototypes<em>This article describes some key fundamentals that are common to all JavaScript engines - and not just V8, the engine…</em>mathiasbynens.be</td>\n<td>Elements kinds in V8<em>Note: If you prefer watching a presentation over reading articles, then enjoy the video below! JavaScript objects can…</em>v8.dev</td>\n<td>Programming with JS: Bitwise Operations<em>In this series of articles we take a look at different Computer Science topics from the prism of JavaScript. We've…</em>hackernoon.com</td>\n<td>Using JavaScript's Bitwise Operators in Real Life<em>Let's pretend we're machine code programmers!</em>codeburst.io</td>\n<td>JavaScript Bitwise Operators - w3resource<em>Bitwise operators perform an operation on the bitwise (0,1) representation of their arguments, rather than as decimal…</em>www.w3resource.com</td>\n</tr>\n<tr>\n<td>JavaScript DOM Tutorial with Example<em>Details JavaScript can access all the elements in a webpage making use of Document Object Model (DOM). In fact, the web…</em>www.guru99.com</td>\n<td>What is the DOM?<em>A reader recently wrote in asking me what the DOM was. They said they've heard it mentioned and alluded to, but aren't…</em>css-tricks.com</td>\n<td>Traversing the DOM with JavaScript<em>A good JavaScript developer needs to know how to traverse the DOM-it's the act of selecting an element from another…</em>zellwk.com</td>\n<td>DOM tree<em>The backbone of an HTML document is tags. According to the Document Object Model (DOM), every HTML tag is an object…</em>javascript.info</td>\n<td>How to traverse the DOM in JavaScript<em>Learn how to navigate your way through the DOM tree.</em>javascript.plainenglish.io</td>\n</tr>\n<tr>\n<td>A Vanilla JS Guide On Mastering the DOM<em>Note: The contents of this post are intended to be introductory and does not include use of any libraries like jQuery…</em>dev.to</td>\n<td>How To Use Classes in JavaScript DigitalOcean<em>JavaScript is a prototype-based language, and every object in JavaScript has a hidden internal property called…</em>www.digitalocean.com</td>\n<td>Javascript Classes — Under The Hood<em>Javascript classes are nothing but a syntactic sugar over existing prototype based inheritance and constructor…</em>medium.com</td>\n<td>ES6 Classes - JavaScript January<em>Object-Oriented Programming (OOP) can be a great way to organize your projects. Introduced with ES6, the javascript…</em>www.javascriptjanuary.com</td>\n<td>Practical Ways to Write Better JavaScript<em>Solid methods of improving your JS. Tagged with javascript, webdev, beginners, react.</em>dev.to</td>\n</tr>\n<tr>\n<td>Better JavaScript with ES6, Pt. II: A Deep Dive into Classes<em>Out with the Old, In with the new Let's be clear about one thing from the start: Under the hood, ES6 classes are not…</em>scotch.io</td>\n<td>Understand the Factory Design Pattern in plain javascript<em>The simplest way to understand Factory Design Pattern</em>medium.com</td>\n<td>Factory Functions in JavaScript Aten Design Group<em>As we move from an age of jQuery plugins and script drop-ins to a world of CommonJS and modular architectures it's…</em>atendesigngroup.com</td>\n<td>The Factory Pattern in JS ES6<em>I'm trying to get the most out of all the new things in ES6 (ES2015). And I'm writing a new library where I need a…</em>medium.com</td>\n<td>Class vs Factory function: exploring the way forward<em>ECMAScript 2015 (aka ES6) comes with the class syntax, so now we have two competing patterns for creating objects. In…</em>medium.freecodecamp.org</td>\n</tr>\n<tr>\n<td>Prototype in Javascript Codementor<em>By default every function has a property name as prototype which is EMPTY ( by default). We can add properties and…</em>www.codementor.io</td>\n<td>Prototypes in JavaScript<em>In this post, we will discuss what are prototypes in JavaScript, how they help JavaScript in achieving the concepts of…</em>betterprogramming.pub</td>\n<td>Prototype in JavaScript: it's quirky, but here's how it works<em>The following four lines are enough to confuse most JavaScript developers:</em>medium.freecodecamp.org</td>\n<td>Understanding JavaScript: Prototype and Inheritance<em>Due to the amazing quantity of libraries, tools and all kinds of things that make your development easier, a lot of…</em>hackernoon.com</td>\n<td>Understanding Classes (ES5) and Prototypal Inheritance in JavaScript<em>In a nutshell the above snippet creates a Person class that can have multiple instances. By convention functional…</em>dev.to</td>\n</tr>\n<tr>\n<td>_Master JavaScript Prototypes &#x26; _Inheritance__\\ Inheritancecodeburst.io</td>\n<td>JavaScript's Prototypal Inheritance Explained Using CSS<em>Prototypal inheritance is arguably the least understood aspect of JavaScript. Well the good news is that if you…</em>medium.freecodecamp.org</td>\n<td>Demystifying ES6 Classes And Prototypal Inheritance<em>In the early history of the JavaScript language, a cloud of animosity formed over the lack of a proper syntax for…</em>scotch.io</td>\n<td>Intro To Prototypal Inheritance - JS<em>In this article I will try to give an introduction to protypal inheritance. As an “optional” pre-requisite, you can…</em>dev.to</td>\n<td>Let's Build Prototypal Inheritance in JS<em>The idea for this post is pretty simple. I want to some extent build and with that, illustrate how prototypes work in…</em>dev.to</td>\n</tr>\n<tr>\n<td>Understanding Prototypal Inheritance In JavaScript<em>What Is Object-oriented Programming (OOP) Classical vs Prototypal Inheritance The Prototype Object And The Prototype…</em>dev.to</td>\n<td>Object.create() - JavaScript MDN<em>The Object.create() method creates a new object, using an existing object as the prototype of the newly created object…</em>developer.mozilla.org</td>\n<td>Object.assign() - JavaScript MDN<em>The Object.assign() method copies all enumerable own properties from one or more source objects to a target object. It…</em>developer.mozilla.org</td>\n<td>Object.create in JavaScript<em>The Object.create method is one of the methods to create a new object in JavaScript.</em>medium.com</td>\n<td>Javascript Objects A New Way to Create Objects HTML Goodies<em>There are a lot of ways to create Objects in JavaScript, perhaps even more to integrate inheritance into them. Just…</em>www.htmlgoodies.com</td>\n</tr>\n<tr>\n<td>JavaScript Object Creation: Patterns and Best Practices - SitePoint<em>Jeff Mott guides you through a step-by-step approach to JavaScript object creation - from object literals to factory…</em>www.sitepoint.com</td>\n<td>Dealing With Objects in JavaScript With Object.assign, Object.keys and hasOwnProperty …<em>This post is a sort of grab bag to help you explore a few very useful methods to help you manage your objects in…</em>alligator.io</td>\n<td>Copying Objects in JavaScript DigitalOcean<em>Objects are the fundamental blocks of JavaScript. An object is a collection of properties, and a property is an…</em>scotch.io</td>\n<td>JavaScript: Object.assign()<em>Veja nesse artigo como utilizar o Object.assign() do ECMAScript 6</em>codeburst.io</td>\n<td>How to deep clone a JavaScript object<em>Copying objects in JavaScript can be tricky. Some ways perform a shallow copy, which is the default behavior in most of…</em>flaviocopes.com</td>\n</tr>\n<tr>\n<td>How to Use Map, Filter, and Reduce in JavaScript<em>Functional programming has been making quite a splash in the development world these days. And for good reason…</em>code.tutsplus.com</td>\n<td>JavaScript — Learn to Chain Map, Filter, and Reduce<em>Learn how to chain map, filter, and reduce in JavaScript</em>codeburst.io</td>\n<td>Understanding map, filter and reduce in Javascript<em>When working on Javascript projects you inevitably come across situations where you have to do some data manipulation…</em>hackernoon.com</td>\n<td>Functional Programming in JS: map, filter, reduce (Pt. 5)<em>Note: This is part of the “Javascript and Functional Programming” series on learning functional programming techniques…</em>hackernoon.com</td>\n<td>JavaScript: Map, Filter, Reduce<em>JavaScript's built-in map, filter, and reduce array methods are invaluable to a modern JavaScript developer. First…</em>wsvincent.com</td>\n</tr>\n<tr>\n<td>A simple guide to help you understand closures in JavaScript<em>Closures in JavaScript are one of those concepts that many struggle to get their heads around. In the following…</em>medium.freecodecamp.org</td>\n<td>Understanding JavaScript Closures: A Practical Approach<em>Learning a new language involves a series of steps, whereas its mastery is a product of patience, practice, mistakes…</em>scotch.io</td>\n<td>Understanding JavaScript: Closures<em>Why learn JavaScript in depth?</em>hackernoon.com</td>\n<td>How to use JavaScript closures with confidence<em>Using closures will be a piece of (chocolate) cake</em>hackernoon.com</td>\n<td>JavaScript Closures by Example<em>At some point you may have run into a problem when executing functions from within a for loop. The first time it…</em>howchoo.com</td>\n</tr>\n<tr>\n<td>Higher-Order Functions :: Eloquent JavaScript<em>Tzu-li and Tzu-ssu were boasting about the size of their latest programs. 'Two-hundred thousand lines,' said Tzu-li…</em>eloquentjavascript.net</td>\n<td>Higher-Order Functions in JavaScript - SitePoint<em>Continuing his look at functional programming in JavaScript, M. David Green examines higher-order functions and how…</em>www.sitepoint.com</td>\n<td>Higher Order Functions: Using Filter, Map and Reduce for More Maintainable Code<em>Higher order functions can help you to step up your JavaScript game by making your code more declarative. That is…</em>medium.freecodecamp.org</td>\n<td>First-class and Higher Order Functions: Effective Functional JavaScript<em>Functions: the killer JavaScript feature we never talk about.</em>hackernoon.com</td>\n<td>Higher Order Functions in JavaScript<em>Higher-order functions can be intimidating at first, but they're not that hard to learn. A higher-order function is…</em>www.lullabot.com</td>\n</tr>\n<tr>\n<td>ES6 Promises: Patterns and Anti-Patterns<em>When I first got started with NodeJS a few years ago, I was mortified by what is now affectionately known as \"callback…</em>medium.com</td>\n<td>A Simple Guide to ES6 Promises<em>The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep. — Robert Frost</em>codeburst.io</td>\n<td>The ES6 Promises<em>A very helpful feature in ES6</em>codeburst.io</td>\n<td>ES6 Promises in Depth<em>Promises are a very involved paradigm, so we'll take it slow. Here's a table of contents with the topics we'll cover in…</em>ponyfoo.com</td>\n<td>Javascript Promises: An In-Depth Approach<em>“Write down the syntax for promises on this sheet of paper”, is enough to give nightmares to a lot of junior and even…</em>codeburst.io</td>\n</tr>\n<tr>\n<td>Promises - JavaScript concepts<em>This is part of a series where I try to explain through each of 33 JS Concepts. This part corresponds to Promises…</em>dev.to</td>\n<td>Javascript Promise 101<em>Knowing how Promise works in javascript will boost your development skill exponentially. Here I will share: I promise…</em>dev.to</td>\n<td>Simplify JavaScript Promises<em>I love promises. Not from people, but from JavaScript. Tweet Quote I love promises. Not from people, but from…</em>dev.to</td>\n<td>The Lowdown on Promises<em>A quick and concise guide on how Promises work in JavaScript</em>medium.com</td>\n<td>⭐️🎀 JavaScript Visualized: Promises &#x26; Async/Await<em>Ever had to deal with JS code that just… didn't run the way you expected it to? Maybe it seemed like functions got…</em>dev.to</td>\n</tr>\n<tr>\n<td>How to escape async/await hell<em>async/await freed us from callback hell, but people have started abusing it — leading to the birth of async/await hell.</em>medium.freecodecamp.org</td>\n<td>Understanding JavaScript's async await<em>Let's suppose we had code like the following. Here I'm wrapping an HTTP request in a Promise. The promise fulfills with…</em>ponyfoo.com</td>\n<td>JavaScript Async/Await: Serial, Parallel and Complex Flow - TechBrij<em>If you have experience on ASP.NET MVC then probably you are familiar with async/await keywords in C#. The same thing is…</em>techbrij.com</td>\n<td>From JavaScript Promises to Async/Await: why bother?<em>In this tutorial, we will cover why we need async/await when we could achieve the same fit with JavaScript Promises, to…</em>blog.pusher.com</td>\n<td>Flow Control in Modern JS: Callbacks to Promises to Async/Await - SitePoint<em>JavaScript is regularly claimed to be asynchronous. What does that mean? How does it affect development? How has the…</em>www.sitepoint.com</td>\n</tr>\n<tr>\n<td>Time Complexity Analysis in JavaScript<em>An algorithm is a self-contained step-by-step set of instructions to solve a problem. It takes time for these steps to…</em>www.jenniferbland.com</td>\n<td>Algorithms in plain English: time complexity and Big-O notation<em>Every good developer has time on their mind. They want to give their users more of it, so they can do all those things…</em>medium.freecodecamp.org</td>\n<td>An Introduction to Big O Notation<em>Big O notation is a big topic, and its universal importance stems from the fact that it describes the efficiency of…</em>dev.to</td>\n<td>[Crizstian/data-structure-and-algorithms-with-ES6<em>Num Type Exercises Description 10.- Graph Data Structure 2 A graph consists of a set of vertices and a set of edges. A…</em>github.com](<a href=\"https://github.com/Crizstian/data-structure-and-algorithms-with-ES6\">https://github.com/Crizstian/data-structure-and-algorithms-with-ES6</a> \"<a href=\"https://github.com/Crizs\">https://github.com/Crizs</a></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th><a href=\"https://github.com/bgoonz/03-fetch-data\">https://github.com/bgoonz/03-fetch-data</a></th>\n<th><a href=\"https://github.com/bgoonz/gatsby-netlify-cms-norwex\">https://github.com/bgoonz/gatsby-netlify-cms-norwex</a></th>\n<th></th>\n<th><a href=\"https://hub.com/bgoonz/React-movie-app\">https://hub.com/bgoonz/React-movie-app</a></th>\n<th><a href=\"https://github.com/bgoonz/Exploring-Promises\">https://github.com/bgoonz/Exploring-Promises</a></th>\n<th><a href=\"https://hub.com/bgoonz/vscode-customized-config\">https://hub.com/bgoonz/vscode-customized-config</a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"https://github.com/bgoonz/a-whole-bunch-o-gatsby-templates\">https://github.com/bgoonz/a-whole-bunch-o-gatsby-templates</a></td>\n<td><a href=\"https://github.com/bgoonz/gatsby-react-portfolio\">https://github.com/bgoonz/gatsby-react-portfolio</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/react-redux-medium-clone\">https://hub.com/bgoonz/react-redux-medium-clone</a></td>\n<td><a href=\"https://github.com/bgoonz/express-API-template\">https://github.com/bgoonz/express-API-template</a></td>\n<td><a href=\"https://hub.com/bgoonz/vscode-Extension-readmes\">https://hub.com/bgoonz/vscode-Extension-readmes</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/activity-box\">https://github.com/bgoonz/activity-box</a></td>\n<td><a href=\"https://github.com/bgoonz/GIT-CDN-FILES\">https://github.com/bgoonz/GIT-CDN-FILES</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/react-redux-notes-v5\">https://hub.com/bgoonz/react-redux-notes-v5</a></td>\n<td><a href=\"https://github.com/bgoonz/Express-basic-server-template\">https://github.com/bgoonz/Express-basic-server-template</a></td>\n<td><a href=\"https://hub.com/bgoonz/web-crawler-node\">https://hub.com/bgoonz/web-crawler-node</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/All-Undergrad-Archive\">https://github.com/bgoonz/All-Undergrad-Archive</a></td>\n<td><a href=\"https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL\">https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/react-redux-registration-login-example\">https://hub.com/bgoonz/react-redux-registration-login-example</a></td>\n<td><a href=\"https://github.com/bgoonz/express-knex-postgres-boilerplate\">https://github.com/bgoonz/express-knex-postgres-boilerplate</a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-interview-prep-quiz-website\">https://hub.com/bgoonz/web-dev-interview-prep-quiz-website</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/alternate-blog-theme\">https://github.com/bgoonz/alternate-blog-theme</a></td>\n<td><a href=\"https://github.com/bgoonz/gitbook\">https://github.com/bgoonz/gitbook</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/React_Notes_V3\">https://hub.com/bgoonz/React<em>Notes</em>V3</a></td>\n<td><a href=\"https://github.com/bgoonz/EXPRESS-NOTES\">https://github.com/bgoonz/EXPRESS-NOTES</a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-notes-resource-site\">https://hub.com/bgoonz/web-dev-notes-resource-site</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/anki-cards\">https://github.com/bgoonz/anki-cards</a></td>\n<td><a href=\"https://github.com/bgoonz/github-readme-stats\">https://github.com/bgoonz/github-readme-stats</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Recursion-Practice-Website\">https://hub.com/bgoonz/Recursion-Practice-Website</a></td>\n<td><a href=\"https://github.com/bgoonz/fast-fourier-transform-\">https://github.com/bgoonz/fast-fourier-transform-</a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-setup-checker\">https://hub.com/bgoonz/web-dev-setup-checker</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/ask-me-anything\">https://github.com/bgoonz/ask-me-anything</a></td>\n<td><a href=\"https://github.com/bgoonz/github-reference-repo\">https://github.com/bgoonz/github-reference-repo</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Regex-and-Express-JS\">https://hub.com/bgoonz/Regex-and-Express-JS</a></td>\n<td><a href=\"https://github.com/bgoonz/form-builder-vanilla-js\">https://github.com/bgoonz/form-builder-vanilla-js</a></td>\n<td><a href=\"https://hub.com/bgoonz/WEB-DEV-TOOLS-HUB\">https://hub.com/bgoonz/WEB-DEV-TOOLS-HUB</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/atlassian-templates\">https://github.com/bgoonz/atlassian-templates</a></td>\n<td><a href=\"https://github.com/bgoonz/GoalsTracker\">https://github.com/bgoonz/GoalsTracker</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/repo-utils\">https://hub.com/bgoonz/repo-utils</a></td>\n<td><a href=\"https://github.com/bgoonz/Front-End-Frameworks-Practice\">https://github.com/bgoonz/Front-End-Frameworks-Practice</a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-utils-package\">https://hub.com/bgoonz/web-dev-utils-package</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Authentication-Notes\">https://github.com/bgoonz/Authentication-Notes</a></td>\n<td><a href=\"https://github.com/bgoonz/graphql-experimentation\">https://github.com/bgoonz/graphql-experimentation</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/resume-cv-portfolio-samples\">https://hub.com/bgoonz/resume-cv-portfolio-samples</a></td>\n<td><a href=\"https://github.com/bgoonz/full-stack-react-redux\">https://github.com/bgoonz/full-stack-react-redux</a></td>\n<td><a href=\"https://hub.com/bgoonz/WebAudioDaw\">https://hub.com/bgoonz/WebAudioDaw</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\">https://github.com/bgoonz/bash-commands-walkthrough</a></td>\n<td><a href=\"https://github.com/bgoonz/https___mihirbeg.com_\">https://github.com/bgoonz/https<em>__mihirbeg.com</em></a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering\">https://hub.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering</a></td>\n<td><a href=\"https://github.com/bgoonz/Full-Text-Search\">https://github.com/bgoonz/Full-Text-Search</a></td>\n<td><a href=\"https://hub.com/bgoonz/website\">https://hub.com/bgoonz/website</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bash-config-backup\">https://github.com/bgoonz/bash-config-backup</a></td>\n<td><a href=\"https://github.com/bgoonz/iframe-showcase\">https://github.com/bgoonz/iframe-showcase</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/scope-closure-context\">https://hub.com/bgoonz/scope-closure-context</a></td>\n<td><a href=\"https://github.com/bgoonz/Games\">https://github.com/bgoonz/Games</a></td>\n<td><a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\">https://github.com/bgoonz/Data-Structures-Algos-Codebase</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bash-shell-utility-functions\">https://github.com/bgoonz/bash-shell-utility-functions</a></td>\n<td><a href=\"https://github.com/bgoonz/Image-Archive-Traning-Data\">https://github.com/bgoonz/Image-Archive-Traning-Data</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Shell-Script-Practice\">https://hub.com/bgoonz/Shell-Script-Practice</a></td>\n<td><a href=\"https://github.com/bgoonz/MihirBegMusicV3\">https://github.com/bgoonz/MihirBegMusicV3</a></td>\n<td><a href=\"https://github.com/bgoonz/DATA_STRUC_PYTHON_NOTES\">https://github.com/bgoonz/DATA<em>STRUC</em>PYTHON_NOTES</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bass-station\">https://github.com/bgoonz/bass-station</a></td>\n<td><a href=\"https://github.com/bgoonz/Independent-Blog-Entries\">https://github.com/bgoonz/Independent-Blog-Entries</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/site-analysis\">https://hub.com/bgoonz/site-analysis</a></td>\n<td><a href=\"https://github.com/bgoonz/Mihir_Beg_Final\">https://github.com/bgoonz/Mihir<em>Beg</em>Final</a></td>\n<td><a href=\"https://github.com/bgoonz/design-home-page-with-routes-bq5v7k\">https://github.com/bgoonz/design-home-page-with-routes-bq5v7k</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bgoonz\">https://github.com/bgoonz/bgoonz</a></td>\n<td><a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\">https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/sorting-algorithms\">https://hub.com/bgoonz/sorting-algorithms</a></td>\n<td><a href=\"https://github.com/bgoonz/mini-project-showcase\">https://github.com/bgoonz/mini-project-showcase</a></td>\n<td><a href=\"https://github.com/bgoonz/docs-collection\">https://github.com/bgoonz/docs-collection</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/BGOONZBLOG2.0STABLE\">https://github.com/bgoonz/BGOONZBLOG2.0STABLE</a></td>\n<td><a href=\"https://github.com/bgoonz/JAMSTACK-TEMPLATES\">https://github.com/bgoonz/JAMSTACK-TEMPLATES</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/sorting-algos\">https://hub.com/bgoonz/sorting-algos</a></td>\n<td><a href=\"https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard\">https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard</a></td>\n<td><a href=\"https://github.com/bgoonz/Documentation-site-react\">https://github.com/bgoonz/Documentation-site-react</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\">https://github.com/bgoonz/BGOONZ<em>BLOG</em>2.0</a></td>\n<td><a href=\"https://github.com/bgoonz/Javascript-Best-Practices_--Tools\">https://github.com/bgoonz/Javascript-Best-Practices_--Tools</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/sqlite3-nodejs-demo\">https://hub.com/bgoonz/sqlite3-nodejs-demo</a></td>\n<td><a href=\"https://github.com/bgoonz/my-gists\">https://github.com/bgoonz/my-gists</a></td>\n<td><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\">https://github.com/bgoonz/DS-ALGO-OFFICIAL</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Binary-Search\">https://github.com/bgoonz/Binary-Search</a></td>\n<td><a href=\"https://github.com/bgoonz/jsanimate\">https://github.com/bgoonz/jsanimate</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/stalk-photos-web-assets\">https://hub.com/bgoonz/stalk-photos-web-assets</a></td>\n<td><a href=\"https://github.com/bgoonz/My-Medium-Blog\">https://github.com/bgoonz/My-Medium-Blog</a></td>\n<td><a href=\"https://github.com/bgoonz/DS-AND-ALGO-Notes-P2\">https://github.com/bgoonz/DS-AND-ALGO-Notes-P2</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/blog-2.o-versions\">https://github.com/bgoonz/blog-2.o-versions</a></td>\n<td><a href=\"https://github.com/bgoonz/Jupyter-Notebooks\">https://github.com/bgoonz/Jupyter-Notebooks</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Standalone-Metranome\">https://hub.com/bgoonz/Standalone-Metranome</a></td>\n<td><a href=\"https://github.com/bgoonz/nextjs-netlify-blog-template\">https://github.com/bgoonz/nextjs-netlify-blog-template</a></td>\n<td><a href=\"https://github.com/bgoonz/ecommerce-interactive\">https://github.com/bgoonz/ecommerce-interactive</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/blog-templates\">https://github.com/bgoonz/blog-templates</a></td>\n<td><a href=\"https://github.com/bgoonz/Lambda\">https://github.com/bgoonz/Lambda</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Star-wars-API-Promise-take2\">https://hub.com/bgoonz/Star-wars-API-Promise-take2</a></td>\n<td><a href=\"https://github.com/bgoonz/norwex-coff-ecom\">https://github.com/bgoonz/norwex-coff-ecom</a></td>\n<td><a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground\">https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/blog-w-comments\">https://github.com/bgoonz/blog-w-comments</a></td>\n<td><a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\">https://github.com/bgoonz/Lambda-Resource-Static-Assets</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Static-Study-Site\">https://hub.com/bgoonz/Static-Study-Site</a></td>\n<td><a href=\"https://github.com/bgoonz/old-c-and-cpp-repos-from-undergrad\">https://github.com/bgoonz/old-c-and-cpp-repos-from-undergrad</a></td>\n<td><a href=\"https://github.com/bgoonz/excel2html-table\">https://github.com/bgoonz/excel2html-table</a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Blog2.0-August-Super-Stable\">https://github.com/bgoonz/Blog2.0-August-Super-Stable</a></td>\n<td><a href=\"https://github.com/bgoonz/learning-nextjs\">https://github.com/bgoonz/learning-nextjs</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/styling-templates\">https://hub.com/bgoonz/styling-templates</a></td>\n<td><a href=\"https://github.com/bgoonz/old-code-from-undergrad\">https://github.com/bgoonz/old-code-from-undergrad</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bootstrap-sidebar-template\">https://github.com/bgoonz/bootstrap-sidebar-template</a></td>\n<td><a href=\"https://github.com/bgoonz/Learning-Redux\">https://github.com/bgoonz/Learning-Redux</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/supertemp\">https://hub.com/bgoonz/supertemp</a></td>\n<td><a href=\"https://github.com/bgoonz/picture-man-bob-v2\">https://github.com/bgoonz/picture-man-bob-v2</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/callbacks\">https://github.com/bgoonz/callbacks</a></td>\n<td><a href=\"https://github.com/bgoonz/Links-Shortcut-Site\">https://github.com/bgoonz/Links-Shortcut-Site</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Ternary-converter\">https://hub.com/bgoonz/Ternary-converter</a></td>\n<td><a href=\"https://github.com/bgoonz/Project-Showcase\">https://github.com/bgoonz/Project-Showcase</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Comments\">https://github.com/bgoonz/Comments</a></td>\n<td><a href=\"https://github.com/bgoonz/live-examples\">https://github.com/bgoonz/live-examples</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/TetrisJS\">https://hub.com/bgoonz/TetrisJS</a></td>\n<td><a href=\"https://github.com/bgoonz/promises-with-async-and-await\">https://github.com/bgoonz/promises-with-async-and-await</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/commercejs-nextjs-demo-store\">https://github.com/bgoonz/commercejs-nextjs-demo-store</a></td>\n<td><a href=\"https://github.com/bgoonz/live-form\">https://github.com/bgoonz/live-form</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/TexTools\">https://hub.com/bgoonz/TexTools</a></td>\n<td><a href=\"https://github.com/bgoonz/psql-practice\">https://github.com/bgoonz/psql-practice</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Common-npm-Readme-Compilation\">https://github.com/bgoonz/Common-npm-Readme-Compilation</a></td>\n<td><a href=\"https://github.com/bgoonz/loadash-es6-refactor\">https://github.com/bgoonz/loadash-es6-refactor</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/The-Algorithms\">https://hub.com/bgoonz/The-Algorithms</a></td>\n<td><a href=\"https://github.com/bgoonz/python-playground-embed\">https://github.com/bgoonz/python-playground-embed</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Comparing-Web-Development-Bootcamps-2021\">https://github.com/bgoonz/Comparing-Web-Development-Bootcamps-2021</a></td>\n<td><a href=\"https://github.com/bgoonz/markdown-css\">https://github.com/bgoonz/markdown-css</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/TRASH\">https://hub.com/bgoonz/TRASH</a></td>\n<td><a href=\"https://github.com/bgoonz/python-practice-notes\">https://github.com/bgoonz/python-practice-notes</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Connect-Four-Final-Version\">https://github.com/bgoonz/Connect-Four-Final-Version</a></td>\n<td><a href=\"https://github.com/bgoonz/Markdown-Templates\">https://github.com/bgoonz/Markdown-Templates</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Triggered-Guitar-Effects-Platform\">https://hub.com/bgoonz/Triggered-Guitar-Effects-Platform</a></td>\n<td><a href=\"https://github.com/bgoonz/python-scripts\">https://github.com/bgoonz/python-scripts</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/convert-folder-contents-2-website\">https://github.com/bgoonz/convert-folder-contents-2-website</a></td>\n<td><a href=\"https://github.com/bgoonz/meditation-app\">https://github.com/bgoonz/meditation-app</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/Useful-Snippets-js\">https://hub.com/bgoonz/Useful-Snippets-js</a></td>\n<td><a href=\"https://github.com/bgoonz/PYTHON_PRAC\">https://github.com/bgoonz/PYTHON_PRAC</a></td>\n<td></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Copy-2-Clipboard-jQuery\">https://github.com/bgoonz/Copy-2-Clipboard-jQuery</a></td>\n<td><a href=\"https://github.com/bgoonz/MihirBegMusicLab\">https://github.com/bgoonz/MihirBegMusicLab</a></td>\n<td></td>\n<td><a href=\"https://hub.com/bgoonz/UsefulResourceRepo2.0\">https://hub.com/bgoonz/UsefulResourceRepo2.0</a></td>\n<td><a href=\"https://github.com/bgoonz/random-list-of-embedable-content\">https://github.com/bgoonz/random-list-of-embedable-content</a></td>\n<td></td>\n</tr>\n</tbody>\n</table>"},{"url":"/docs/content/trouble-shooting/","relativePath":"docs/content/trouble-shooting.md","relativeDir":"docs/content","base":"trouble-shooting.md","name":"trouble-shooting","frontmatter":{"title":"Trouble Shooting","weight":0,"excerpt":"Here I will save details of problems I have been troubleshooting.","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<br>\n<h1>  Trouble Shooting Log </h1>\n<br>\n<iframe width=\"900\" height=\"1400\" frameborder=\"0\" scrolling=\"no\" src=\"https://onedrive.live.com/embed?resid=D21009FDD967A241%21538628&authkey=%21AB8fPL3wSKz3AxU&em=2&AllowTyping=True&wdHideGridlines=True&wdHideHeaders=True&wdDownloadButton=True&wdInConfigurator=True\"></iframe>\n<br>\n<hr>\n<br>"},{"url":"/docs/css/","relativePath":"docs/css/index.md","relativeDir":"docs/css","base":"index.md","name":"index","frontmatter":{"title":"Css","weight":0,"excerpt":"Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.","seo":{"title":"Cascading Style Sheets","description":"Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>CSS is among the core languages of the <strong>open web</strong> and is standardized across Web browsers according to <a href=\"https://w3.org/Style/CSS/#specs\">W3C specifications</a>. Previously, development of various parts of CSS specification was done synchronously, which allowed versioning of the latest recommendations. You might have heard about CSS1, CSS2.1, CSS3. However, CSS4 has never become an official version.</p>\n<p>From CSS3, the scope of the specification increased significantly and the progress on different CSS modules started to differ so much, that it became more effective to <a href=\"https://www.w3.org/Style/CSS/current-work\">develop and release recommendations separately per module</a>. Instead of versioning the CSS specification, W3C now periodically takes a snapshot of <a href=\"https://www.w3.org/TR/css/\">the latest stable state of the CSS specification</a>.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS#key_resources\" title=\"Permalink to Key resources\">Key resources</a></h2>\n<p>CSS Introduction</p>\n<p>If you're new to web development, be sure to read our <a href=\"https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics\">CSS basics</a> article to learn what CSS is and how to use it.</p>\n<p>CSS Tutorials</p>\n<p>Our <a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS\">CSS learning area</a> contains a wealth of tutorials to take you from beginner level to proficiency, covering all the fundamentals.</p>\n<p>CSS Reference</p>\n<p>Our <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Reference\">exhaustive CSS reference</a> for seasoned Web developers describes every property and concept of CSS.</p>\n<h4>Looking to become a front-end web developer?</h4>\n<p>We have put together a course that includes all the essential information you need to work towards your goal.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Learn/Front-end_web_developer\"><strong>Get started</strong></a></p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS#tutorials\" title=\"Permalink to Tutorials\">Tutorials</a></h2>\n<p>Our <a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS\">CSS Learning Area</a> features multiple modules that teach CSS from the ground up — no previous knowledge required.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps\">CSS first steps</a></p>\n<p>CSS (Cascading Style Sheets) is used to style and layout web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features. This module provides a gentle beginning to your path towards CSS mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to HTML.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks\">CSS building blocks</a></p>\n<p>This module carries on where <a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps\">CSS first steps</a> left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, it's time to dive a bit deeper. This module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more.</p>\n<p>The aim here is to provide you with a toolkit for writing competent CSS and help you understand all the essential theory, before moving on to more specific disciplines like <a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text\">text styling</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout\">CSS layout</a>.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text\">Styling text</a></p>\n<p>With the basics of the CSS language covered, the next CSS topic for you to concentrate on is styling text — one of the most common things you'll do with CSS. Here we look at text styling fundamentals, including setting font, boldness, italics, line and letter spacing, drop shadows, and other text features. We round off the module by looking at applying custom fonts to your page, and styling lists and links.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout\">CSS layout</a></p>\n<p>At this point we've already looked at CSS fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside. Now it's time to look at how to place your boxes in the right place in relation to the viewport, and to each other. We have covered the necessary prerequisites so we can now dive deep into CSS layout, looking at different display settings, modern layout tools like flexbox, CSS grid, and positioning, and some of the legacy techniques you might still want to know about.</p>\n<ul>\n<li>The <strong>property</strong> which is an identifier, that is a human-readable <em>name</em>, that defines which feature is considered.</li>\n<li>The <strong>value</strong> which describe how the feature must be handled by the engine. Each property has a set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the browser engine.</li>\n</ul>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations\" title=\"Permalink to CSS declarations\">CSS declarations</a></h2>\n<p>Setting CSS properties to specific values is the core function of the CSS language. A property and value pair is called a <strong>declaration</strong>, and any CSS engine calculates which declarations apply to every single element of a page in order to appropriately lay it out, and to style it.</p>\n<p>Both properties and values are case-insensitive by default in CSS. The pair is separated by a colon, '<code>:</code>' (<code>U+003A COLON</code>), and white spaces before, between, and after properties and values, but not necessarily inside, are ignored.</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax/css_syntax_-_declaration.png\" alt=\"css syntax - declaration.png\"></p>\n<p>There are more than <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Reference\">100 different properties</a> in CSS and a nearly infinite number of different values. Not all pairs of properties and values are allowed and each property defines what are the valid values. When a value is not valid for a given property, the declaration is deemed <em>invalid</em> and is wholly ignored by the CSS engine.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declaration_blocks\" title=\"Permalink to CSS declaration blocks\">CSS declaration blocks</a></h2>\n<p>Declarations are grouped in <strong>blocks</strong>, that is in a structure delimited by an opening brace, '<code>{</code>' (<code>U+007B LEFT CURLY BRACKET</code>), and a closing one, '<code>}</code>' (<code>U+007D RIGHT CURLY BRACKET</code>). Blocks sometimes can be nested, so opening and closing braces must be matched.</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax/css_syntax_-_block.png\" alt=\"css syntax - block.png\"></p>\n<p>Such blocks are naturally called <strong>declaration blocks</strong> and declarations inside them are separated by a semi-colon, '<code>;</code>' (<code>U+003B SEMICOLON</code>). A declaration block may be empty, that is containing null declaration. White spaces around declarations are ignored. The last declaration of a block doesn't need to be terminated by a semi-colon, though it is often considered <em>good style</em> to do it as it prevents forgetting to add it when extending the block with another declaration.</p>\n<p>A CSS declaration block is visualized in the diagram below.</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax/declaration-block.png\" alt=\"css syntax - declarations block.png\"></p>\n<p><strong>Note:</strong> The content of a CSS declaration block, that is a list of semi-colon-separated declarations, without the initial and closing braces, can be put inside an HTML <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-style\"><code>style</code></a> attribute.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_rulesets\" title=\"Permalink to CSS rulesets\">CSS rulesets</a></h2>\n<p>If style sheets could only apply a declaration to each element of a Web page, they would be pretty useless. The real goal is to apply different declarations to different parts of the document.</p>\n<p>CSS allows this by associating conditions with declarations blocks. Each (valid) declaration block is preceded by one or more comma-separated <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors\"><strong>selectors</strong></a>, which are conditions selecting some elements of the page. A <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Selector_list\">selector group</a> and an associated declarations block, together, are called a <strong>ruleset</strong>, or often a <strong>rule</strong>.</p>\n<p>A CSS ruleset (or rule) is visualized in the diagram below.</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax/ruleset.png\" alt=\"css syntax - ruleset.png\"></p>\n<p>As an element of the page may be matched by several selectors, and therefore by several rules potentially containing a given property several times, with different values, the CSS standard defines which one has precedence over the other and must be applied: this is called the <a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance\">cascade</a> algorithm.</p>\n<p><strong>Note:</strong> It is important to note that even if a ruleset characterized by a group of selectors is a kind of shorthand replacing rulesets with a single selector each, this doesn't apply to the validity of the ruleset itself.</p>\n<p>This leads to an important consequence: if one single basic selector is invalid, like when using an unknown pseudo-element or pseudo-class, the whole <em>selector</em> is invalid and therefore the entire rule is ignored (as invalid too).</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_statements\" title=\"Permalink to CSS statements\">CSS statements</a></h2>\n<p>Rulesets are the main building blocks of a style sheet, which often consists of only a big list of them. But there is other information that a Web author wants to convey in the style sheet, like the character set, other external style sheets to import, font face or list counter descriptions and many more. It will use other and specific kinds of statements to do that.</p>\n<p>A <strong>statement</strong> is a building block that begins with any non-space characters and ends at the first closing brace or semi-colon (outside a string, non-escaped and not included into another {}, () or [] pair).</p>\n<p><img src=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax/css_syntax_-_statements_venn_diag.png\" alt=\"css syntax - statements Venn diag.png\"></p>\n<p>There are two kinds of statements:</p>\n<ul>\n<li><strong>Rulesets</strong> (or <em>rules</em>) that, as seen, associate a collection of CSS declarations to a condition described by a <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors\">selector</a>.</li>\n<li><strong>At-rules</strong> that start with an at sign, '<code>@</code>' (<code>U+0040 COMMERCIAL AT</code>), followed by an identifier and then continuing up to the end of the statement, that is up to the next semi-colon (;) outside of a block, or the end of the next block. Each type of <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule\">at-rules</a>, defined by the identifier, may have its own internal syntax, and semantics of course. They are used to convey meta-data information (like <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@charset\"><code>@charset</code></a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@import\"><code>@import</code></a>), conditional information (like <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@media\"><code>@media</code></a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@document\"><code>@document</code></a>), or descriptive information (like <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face\"><code>@font-face</code></a>).</li>\n</ul>\n<p>Any statement which isn't a ruleset or an at-rule is invalid and ignored.</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#nested_statements\" title=\"Permalink to Nested statements\">Nested statements</a></h3>\n<p>There is another group of statements - the <strong>nested statements</strong>. These are statements that can be used in a specific subset of at-rules - the <em>conditional group rules</em>. These statements only apply if a specific condition is matched: the <code>@media</code> at-rule content is applied only if the device on which the browser runs matches the expressed condition; the <code>@document</code> at-rule content is applied only if the current page matches some conditions, and so on. In CSS1 and CSS2.1, only <em>rulesets</em> could be used inside conditional group rules. That was very restrictive and this restriction was lifted in <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS3#Conditionals\" title=\"This is a link to an unwritten page\"><em>CSS Conditionals Level 3</em></a>. Now, though still experimental and not supported by every browser, conditional group rules can contain a wider range of content: rulesets but also some, but not all, at-rules.</p>"},{"url":"/docs/css/css-positioning/","relativePath":"docs/css/css-positioning.md","relativeDir":"docs/css","base":"css-positioning.md","name":"css-positioning","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>CSS POSITION:\n</h2>\n<p>To start we are going to cover the easiest position value which you probably have never heard of but use all the time and that is the static position. static is the default value for the position property and essentially just means that an element will follow the normal document flow and will position itself based on the standard positioning rules.</p>\n<p>Any element that you do not apply a position property to will be static which means most elements you work with are statically positioned. static positioned elements cannot have the z-index, top, left, right, or bottom properties applied to them.</p>\n<h2>Relative Position</h2>\n<p>The next simplest position type is relative position. A relative position element works exactly the same as static position, but you can now add z-index, top, left, right, and bottom properties to it. If you make an element relative positioned without setting any of these extra properties you will notice it looks exactly the same as a static positioned element. This is because relative positioned elements also follow the normal document flow, but you can offset them using the top, left, right, and bottom properties.</p>\n<p>From the above example you can see that the one element works just like static when there is no extra properties defined. Once you add a property like left, or top, though, you can see that the element offsets itself relative to its normal position by these top, left, right, and bottom properties. You will notice, however, that the other elements do not move to account for the offset position of the relative positioned element. This is because all the other elements assume that the relative positioned element has no offsets and they determine their position based on where the relative positioned element would have been if it was static.</p>\n<p>Now on its own relative position is not that useful as you do not usually want to offset an element without also moving all the elements around it. The main use cases for position relative are to either set the z-index of the element, or to be used as a container for absolute positioned elements which we will talk about next.</p>\n<h2>Absolute Position</h2>\n<p>The absolute position is the first position that completely removes the element from the normal document flow. If you give an element position absolute all other elements will act as if the absolute positioned element doesn't even exist.</p>\n<p>As you can see elements two and three are laid out as if element one never even existed. You will also notice that element one no longer fills the full width. This is because absolute positioned elements have their width defaulted to auto instead of being full width like a div. Also, by default an absolute positioned element will place itself in the document where it normally would have rendered if it was a static element, but we can change that with the top, left, right, and bottom properties.</p>\n<p>Now you can see our element has moved to the top left corner of our dashed border. I am using this dashed border to represent the entire screen since by default a position absolute element will position itself relative to the body so a top and left of 0 means the element will appear in the top left corner of the body. You can change the element that the absolute positioned element is positioned off of by setting the position of one of its parent elements to anything other than static. This is one of the most common places relative position is used.</p>\n<p>By setting the purple parent element to a position of relative I am now forcing the absolute positioned child one element to be in the top left corner of the parent instead of the body. This combination of relative and absolute positions is incredibly common.</p>\n<h2>Fixed Position</h2>\n<p>Now we come to one of the lesser used positions which is the fixed position. fixed position is a bit like absolute position in that it removes the element from the document flow, but fixed position elements are always positioned relative to the screen no matter what position its parent elements are.</p>\n<p>As you can see our one element is fixed in the top left corner of our page. You will also notice when you scroll the page that it stays stuck in the top left corner of the page no matter where you scroll to. This is the main difference between fixed and absolute.</p>\n<h2>Sticky Position</h2>\n<p>The final position value is sticky. This position is a combination of both fixed and static position and combines the best of them both. An element with position sticky will act like a static positioned element until the page scrolls to a point where the element hits the top, left, right, or bottom value specified. It will then act like a fixed position element and scroll with the page until the element gets to the end of its container.</p>\n<p>At first you will notice that the one element is in its normal position in the document flow as if it were static. Once you scroll the page to the point that the top of the one element is 10px from the top of the page it will then stick to the top of the page as if it were position fixed. This will last this way all the way until the element gets to the bottom of the purple parent container in which case it will stop scrolling with the page.</p>\n<p>sticky position is the perfect position for navbars that scroll with the page, headings in long lists, and many other use cases.</p>\n<h2>Absolute/Fixed Position Advanced</h2>\n<p>Now there is one things about fixed and absolute position elements that you need to know since it could cause some weird, hard to find bugs. An element that is absolute positioned will use the first parent element that has a non-static position as its container to offset itself from and it will default to the body if no parent has a position value other than static. This we already know, but this is not the only way to define a parent container. absolute positioned elements will also check for a parent that has either the transform, filter, or perspective properties set. If any of those are found on a parent it will use that parent as the container.</p>\n<p>In the above example our purple parent element has a static position, but since it has a transform set it acts as the container for our absolute positioned child.</p>\n<p>The same thing works for fixed position elements. This also makes the scrolling behavior of the fixed position element not really work anymore.</p>\n<p>You will notice even as we scroll our page the fixed position element is stuck inside the purple parent container because it has a transform property set. This is generally not what you want which is why it is best to always define fixed position elements at the top level to avoid this potential bug.</p>"},{"url":"/docs/content/netlify/","relativePath":"docs/content/netlify.md","relativeDir":"docs/content","base":"netlify.md","name":"netlify","frontmatter":{"title":"Netlify Docs","weight":0,"excerpt":"For repositories stored on GitHub, the `github` backend allows CMS users to log in directly with their GitHub account. Note that all users must have push access to your content repository for this to work.","seo":{"title":"Netlify Docs","description":"netlify CMS docs","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Add to Your Site | Netlify CMS</h1>\n<blockquote>\n<p>Open source content management for your Git workflow</p>\n</blockquote>\n<p>You can adapt Netlify CMS to a wide variety of projects. It works with any content written in markdown, JSON, YAML, or TOML files, stored in a repo on <a href=\"https://github.com/\">GitHub</a>, <a href=\"https://about.gitlab.com/\">GitLab</a>, or <a href=\"https://bitbucket.org/\">Bitbucket</a>. You can also create your own custom backend.</p>\n<p>This tutorial guides you through the steps for adding Netlify CMS to a site that's built with a common <a href=\"https://www.staticgen.com/\">static site generator</a>, like Jekyll, Hugo, Hexo, or Gatsby. Alternatively, you can <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/start-with-a-template\">start from a template</a> or dive right into <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/configuration-options\">configuration options</a>.</p>\n<h2><a href=\"#app-file-structure\"></a>App File Structure</h2>\n<p>A static <code>admin</code> folder contains all Netlify CMS files, stored at the root of your published site. Where you store this folder in the source files depends on your static site generator. Here's the static file location for a few of the most popular static site generators:</p>\n<table>\n<thead>\n<tr>\n<th>These generators</th>\n<th>store static files in</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Jekyll, GitBook</td>\n<td><code>/</code> (project root)</td>\n</tr>\n<tr>\n<td>Hugo, Gatsby, Nuxt, Gridsome, Zola, Sapper</td>\n<td><code>/static</code></td>\n</tr>\n<tr>\n<td>Next</td>\n<td><code>/public</code></td>\n</tr>\n<tr>\n<td>Hexo, Middleman, Jigsaw</td>\n<td><code>/source</code></td>\n</tr>\n<tr>\n<td>Spike</td>\n<td><code>/views</code></td>\n</tr>\n<tr>\n<td>Wyam</td>\n<td><code>/input</code></td>\n</tr>\n<tr>\n<td>Pelican</td>\n<td><code>/content</code></td>\n</tr>\n<tr>\n<td>VuePress</td>\n<td><code>/.vuepress/public</code></td>\n</tr>\n<tr>\n<td>Elmstatic</td>\n<td><code>/_site</code></td>\n</tr>\n<tr>\n<td>11ty</td>\n<td><code>/_site</code></td>\n</tr>\n<tr>\n<td>preact-cli</td>\n<td><code>/src/static</code></td>\n</tr>\n</tbody>\n</table>\n<p>If your generator isn't listed here, you can check its documentation, or as a shortcut, look in your project for a <code>css</code> or <code>images</code> folder. The contents of folders like that are usually processed as static files, so it's likely you can store your <code>admin</code> folder next to those. (When you've found the location, feel free to add it to these docs by <a href=\"https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md#pull-requests\">filing a pull request</a>!)</p>\n<p>Inside the <code>admin</code> folder, you'll create two files:</p>\n<pre><code>admin\n ├ index.html\n └ config.yml\n</code></pre>\n<p>The first file, <code>admin/index.html</code>, is the entry point for the Netlify CMS admin interface. This means that users navigate to <code>yoursite.com/admin/</code> to access it. On the code side, it's a basic HTML starter page that loads the Netlify CMS JavaScript file. In this example, we pull the file from a public CDN:</p>\n<pre><code>&#x3C;!doctype html>\n&#x3C;html>\n&#x3C;head>\n  &#x3C;meta charset=\"utf-8\" />\n  &#x3C;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  &#x3C;title>Content Manager&#x3C;/title>\n&#x3C;/head>\n&#x3C;body>\n\n  &#x3C;script src=\"https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js\">&#x3C;/script>\n&#x3C;/body>\n&#x3C;/html>\n</code></pre>\n<p>In the code above the <code>script</code> is loaded from the <code>unpkg</code> CDN. Should there be any issue, <code>jsDelivr</code> can be used as an alternative source. Simply set the <code>src</code> to <code>https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js</code></p>\n<p>The second file, <code>admin/config.yml</code>, is the heart of your Netlify CMS installation, and a bit more complex. The <a href=\"#configuration\">Configuration</a> section covers the details.</p>\n<h3><a href=\"#installing-with-npm\"></a>Installing with npm</h3>\n<p>You can also use Netlify CMS as an npm module. Wherever you import Netlify CMS, it automatically runs, taking over the current page. Make sure the script that imports it only runs on your CMS page. First install the package and save it to your project:</p>\n<pre><code>npm install netlify-cms-app --save\n</code></pre>\n<p>Then import it (assuming your project has tooling for imports):</p>\n<pre><code>import CMS from 'netlify-cms-app'\n\nCMS.init()\n\nCMS.registerPreviewTemplate('my-template', MyTemplate)\n</code></pre>\n<h2><a href=\"#configuration\"></a>Configuration</h2>\n<p>Configuration is different for every site, so we'll break it down into parts. Add all the code snippets in this section to your <code>admin/config.yml</code> file.</p>\n<h3><a href=\"#backend\"></a>Backend</h3>\n<p>We're using <a href=\"https://www.netlify.com/\">Netlify</a> for our hosting and authentication in this tutorial, so backend configuration is fairly straightforward.</p>\n<p>For GitHub and GitLab repositories, you can start your Netlify CMS <code>config.yml</code> file with these lines:</p>\n<pre><code>backend:\n  name: git-gateway\n  branch: master\n</code></pre>\n<p><em>(For Bitbucket repositories, use the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/bitbucket-backend\">Bitbucket backend</a> instructions instead.)</em></p>\n<p>The configuration above specifies your backend protocol and your publication branch. Git Gateway is an open source API that acts as a proxy between authenticated users of your site and your site repo. (We'll get to the details of that in the <a href=\"#authentication\">Authentication section</a> below.) If you leave out the <code>branch</code> declaration, it defaults to <code>master</code>.</p>\n<h3><a href=\"#editorial-workflow\"></a>Editorial Workflow</h3>\n<p><strong>Note:</strong> Editorial workflow works with GitHub repositories, and support for GitLab and Bitbucket is <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/beta-features/#gitlab-and-bitbucket-editorial-workflow-support\">in beta</a>.</p>\n<p>By default, saving a post in the CMS interface pushes a commit directly to the publication branch specified in <code>backend</code>. However, you also have the option to enable the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/configuration-options/#publish-mode\">Editorial Workflow</a>, which adds an interface for drafting, reviewing, and approving posts. To do this, add the following line to your Netlify CMS <code>config.yml</code>:</p>\n<pre><code>publish_mode: editorial_workflow\n</code></pre>\n<h3><a href=\"#media-and-public-folders\"></a>Media and Public Folders</h3>\n<p>Netlify CMS allows users to upload images directly within the editor. For this to work, the CMS needs to know where to save them. If you already have an <code>images</code> folder in your project, you could use its path, possibly creating an <code>uploads</code> sub-folder, for example:</p>\n<pre><code>media_folder: \"images/uploads\"\n</code></pre>\n<p>If you're creating a new folder for uploaded media, you'll need to know where your static site generator expects static files. You can refer to the paths outlined above in <a href=\"#app-file-structure\">App File Structure</a>, and put your media folder in the same location where you put the <code>admin</code> folder.</p>\n<p>Note that the<code>media_folder</code> file path is relative to the project root, so the example above would work for Jekyll, GitBook, or any other generator that stores static files at the project root. However, it would not work for Hugo, Hexo, Middleman or others that store static files in a subfolder. Here's an example that could work for a Hugo site:</p>\n<pre><code>media_folder: \"static/images/uploads\"\npublic_folder: \"/images/uploads\"\n</code></pre>\n<p>The configuration above adds a new setting, <code>public_folder</code>. While <code>media_folder</code> specifies where uploaded files are saved in the repo, <code>public_folder</code> indicates where they are found in the published site. Image <code>src</code> attributes use this path, which is relative to the file where it's called. For this reason, we usually start the path at the site root, using the opening <code>/</code>.</p>\n<p><em>If `public</em>folder<code>is not set, Netlify CMS defaults to the same value as</code>media<em>folder<code>, adding an opening</code>/` if one is not included.</em></p>\n<h3><a href=\"#collections\"></a>Collections</h3>\n<p>Collections define the structure for the different content types on your static site. Since every site is different, the <code>collections</code> settings differ greatly from one site to the next.</p>\n<p>Let's say your site has a blog, with the posts stored in <code>_posts/blog</code>, and files saved in a date-title format, like <code>1999-12-31-lets-party.md</code>. Each post begins with settings in yaml-formatted front matter, like so:</p>\n<pre><code>---\nlayout: blog\ntitle: \"Let's Party\"\ndate: 1999-12-31 11:59:59 -0800\nthumbnail: \"/images/prince.jpg\"\nrating: 5\n---\n\nThis is the post body, where I write about our last chance to party before the Y2K bug destroys us all.\n</code></pre>\n<p>Given this example, our <code>collections</code> settings would look like this in your NetlifyCMS <code>config.yml</code> file:</p>\n<pre><code>collections:\n  - name: \"blog\"\n    label: \"Blog\"\n    folder: \"_posts/blog\"\n    create: true\n    slug: \"{{year}}-{{month}}-{{day}}-{{slug}}\"\n    fields:\n      - {label: \"Layout\", name: \"layout\", widget: \"hidden\", default: \"blog\"}\n      - {label: \"Title\", name: \"title\", widget: \"string\"}\n      - {label: \"Publish Date\", name: \"date\", widget: \"datetime\"}\n      - {label: \"Featured Image\", name: \"thumbnail\", widget: \"image\"}\n      - {label: \"Rating (scale of 1-5)\", name: \"rating\", widget: \"number\"}\n      - {label: \"Body\", name: \"body\", widget: \"markdown\"}\n</code></pre>\n<p>Let's break that down:</p>\n<table><tbody><tr><td><code>name</code></td><td>Post type identifier, used in routes. Must be unique.</td></tr><tr><td><code>label</code></td><td>What the admin UI calls the post type.</td></tr><tr><td><code>folder</code></td><td>Where files of this type are stored, relative to the repo root.</td></tr><tr><td><code>create</code></td><td>Set to <code>true</code> to allow users to create new files in this collection.</td></tr><tr><td><code>slug</code></td><td>Template for filenames. <code>{{year}}</code>, <code>{{month}}</code>, and <code>{{day}}</code> pulls from the post's <code>date</code> field or save date. <code>{{slug}}</code> is a url-safe version of the post's <code>title</code>. Default is simply <code>{{slug}}</code>.</td></tr><tr><td><code>fields</code></td><td>Fields listed here are shown as fields in the content editor, then saved as front matter at the beginning of the document (except for <code>body</code>, which follows the front matter). Each field contains the following properties:<ul><li><code>label</code>: Field label in the editor UI.</li><li><code>name</code>: Field name in the document front matter.</li><li><code>widget</code>: Determines UI style and value data type (details below).</li><li><code>default</code> (optional): Sets a default value for the field.</li></ul></td></tr></tbody></table>\n<p>As described above, the <code>widget</code> property specifies a built-in or custom UI widget for a given field. When a content editor enters a value into a widget, that value is saved in the document front matter as the value for the <code>name</code> specified for that field. A full listing of available widgets can be found in the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/widgets\">Widgets doc</a>.</p>\n<p>Based on this example, you can go through the post types in your site and add the appropriate settings to your Netlify CMS <code>config.yml</code> file. Each post type should be listed as a separate node under the <code>collections</code> field. See the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/configuration-options/#collections\">Collections reference doc</a> for more configuration options.</p>\n<h3><a href=\"#filter\"></a>Filter</h3>\n<p>The entries for any collection can be filtered based on the value of a single field. The example collection below only shows post entries with the value <code>en</code> in the <code>language</code> field.</p>\n<pre><code>collections:\n  - name: \"posts\"\n    label: \"Post\"\n    folder: \"_posts\"\n    filter:\n      field: language\n      value: en\n    fields:\n      - {label: \"Language\", name: \"language\"}\n</code></pre>\n<h2><a href=\"#authentication\"></a>Authentication</h2>\n<p>Now that you have your Netlify CMS files in place and configured, all that's left is to enable authentication. We're using the <a href=\"https://www.netlify.com/\">Netlify</a> platform here because it's one of the quickest ways to get started, but you can learn about other authentication options in the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/backends-overview\">Backends</a> doc.</p>\n<h3><a href=\"#setup-on-netlify\"></a>Setup on Netlify</h3>\n<p>Netlify offers a built-in authentication service called Identity. In order to use it, connect your site repo with Netlify. Netlify has published a general <a href=\"https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/\">Step-by-Step Guide</a> for this, along with detailed guides for many popular static site generators, including <a href=\"https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/\">Jekyll</a>, <a href=\"https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-victor-hugo-on-netlify/\">Hugo</a>, <a href=\"https://www.netlify.com/blog/2015/10/26/a-step-by-step-guide-hexo-on-netlify/\">Hexo</a>, <a href=\"https://www.netlify.com/blog/2015/10/01/a-step-by-step-guide-middleman-on-netlify/\">Middleman</a>, <a href=\"https://www.netlify.com/blog/2016/02/24/a-step-by-step-guide-gatsby-on-netlify/\">Gatsby</a>, and more.</p>\n<h3><a href=\"#enable-identity-and-git-gateway\"></a>Enable Identity and Git Gateway</h3>\n<p>Netlify's Identity and Git Gateway services allow you to manage CMS admin users for your site without requiring them to have an account with your Git host or commit access on your repo. From your site dashboard on Netlify:</p>\n<ol>\n<li>Go to <strong>Settings > Identity</strong>, and select <strong>Enable Identity service</strong>.</li>\n<li>Under <strong>Registration preferences</strong>, select <strong>Open</strong> or <strong>Invite only</strong>. In most cases, you want only invited users to access your CMS, but if you're just experimenting, you can leave it open for convenience.</li>\n<li>If you'd like to allow one-click login with services like Google and GitHub, check the boxes next to the services you'd like to use, under <strong>External providers</strong>.</li>\n<li>Scroll down to <strong>Services > Git Gateway</strong>, and click <strong>Enable Git Gateway</strong>. This authenticates with your Git host and generates an API access token. In this case, we're leaving the <strong>Roles</strong> field blank, which means any logged in user may access the CMS. For information on changing this, check the <a href=\"https://www.netlify.com/docs/identity/\">Netlify Identity documentation</a>.</li>\n</ol>\n<h3><a href=\"#add-the-netlify-identity-widget\"></a>Add the Netlify Identity Widget</h3>\n<p>With the backend set to handle authentication, now you need a frontend interface to connect to it. The open source Netlify Identity Widget is a drop-in widget made for just this purpose. To include the widget in your site, add the following script tag in two places:</p>\n<pre><code>&#x3C;script src=\"https://identity.netlify.com/v1/netlify-identity-widget.js\">&#x3C;/script>\n</code></pre>\n<p>Add this to the <code>&#x3C;head></code> of your CMS index page at <code>/admin/index.html</code>, as well as the <code>&#x3C;head></code> of your site's main index page. Depending on how your site generator is set up, this may mean you need to add it to the default template, or to a \"partial\" or \"include\" template. If you can find where the site stylesheet is linked, that's probably the right place. Alternatively, you can include the script in your site using Netlify's <a href=\"https://www.netlify.com/docs/inject-analytics-snippets/\">Script Injection</a> feature.</p>\n<p>When a user logs in with the Netlify Identity widget, an access token directs to the site homepage. In order to complete the login and get back to the CMS, redirect the user back to the <code>/admin/</code> path. To do this, add the following script before the closing <code>body</code> tag of your site's main index page:</p>\n<pre><code>&#x3C;script>\n  if (window.netlifyIdentity) {\n    window.netlifyIdentity.on(\"init\", user => {\n      if (!user) {\n        window.netlifyIdentity.on(\"login\", () => {\n          document.location.href = \"/admin/\";\n        });\n      }\n    });\n  }\n&#x3C;/script>\n</code></pre>\n<p>Note: This example script requires modern JavaScript and does not work on IE11. For legacy browser support, use function expressions (<code>function () {}</code>) in place of the arrow functions (<code>() => {}</code>), or use a transpiler such as <a href=\"https://babeljs.io/\">Babel</a>.</p>\n<h2><a href=\"#accessing-the-cms\"></a>Accessing the CMS</h2>\n<p>Your site CMS is now fully configured and ready for login!</p>\n<p>If you set your registration preference to \"Invite only,\" invite yourself (and anyone else you choose) as a site user. To do this, select the <strong>Identity</strong> tab from your site dashboard, and then select the <strong>Invite users</strong> button. Invited users receive an email invitation with a confirmation link. Clicking the link will take you to your site with a login prompt.</p>\n<p>If you left your site registration open, or for return visits after confirming an email invitation, access your site's CMS at <code>yoursite.com/admin/</code>.</p>\n<p><strong>Note:</strong> No matter where you access Netlify CMS — whether running locally, in a staging environment, or in your published site — it always fetches and commits files in your hosted repository (for example, on GitHub), on the branch you configured in your Netlify CMS config.yml file. This means that content fetched in the admin UI matches the content in the repository, which may be different from your locally running site. It also means that content saved using the admin UI saves directly to the hosted repository, even if you're running the UI locally or in staging.</p>\n<p>Happy posting!</p>\n<p><a href=\"https://www.netlifycms.org/docs/add-to-your-site/\">Source</a></p>\n<h1>GitHub | Netlify CMS | Open-Source Content Management System</h1>\n<blockquote>\n<p>Open source content management for your Git workflow</p>\n</blockquote>\n<p>For repositories stored on GitHub, the <code>github</code> backend allows CMS users to log in directly with their GitHub account. Note that all users must have push access to your content repository for this to work.</p>\n<p>Because Github <a href=\"https://github.com/netlify/netlify-cms/issues/663#issuecomment-335023723\">requires a server</a> for authentication, Netlify facilitates basic GitHub authentication.</p>\n<p>To enable basic GitHub authentication:</p>\n<ol>\n<li>Follow the authentication provider setup steps in the <a href=\"https://www.netlify.com/docs/authentication-providers/#using-an-authentication-provider\">Netlify docs</a>.</li>\n<li>\n<p>Add the following lines to your Netlify CMS <code>config.yml</code> file:</p>\n<p>backend:\nname: github\nrepo: owner-name/repo-name</p>\n</li>\n</ol>\n<h2><a href=\"#specifying-a-status-for-deploy-previews\"></a>Specifying a status for deploy previews</h2>\n<p>The GitHub backend supports <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/deploy-preview-links\">deploy preview links</a>. Netlify CMS checks the <code>context</code> of a commit's <a href=\"https://help.github.com/articles/about-status-checks/\">statuses</a> and infers one that seems to represent a deploy preview. If you need to customize this behavior, you can specify which context to look for using <code>preview_context</code>:</p>\n<pre><code>backend:\n  name: github\n  repo: my/repo\n  preview_context: my-provider/deployment\n</code></pre>\n<p>The above configuration would look for the status who's <code>\"context\"</code> is <code>\"my-provider/deployment\"</code>.</p>\n<p><a href=\"https://www.netlifycms.org/docs/github-backend/\">Source</a></p>\n<h1>Netlify CMS Open Authoring</h1>\n<blockquote>\n<p>I like the term \"Git-backed CMS.\" That term works for an emerging style of CMS that looks and behaves much like any other CMS, with a fascinating twist:</p>\n</blockquote>\n<p>I like the term \"Git-backed CMS.\" That term works for an emerging style of CMS that looks and behaves much like any other CMS, with a fascinating twist: it doesn't actually store any data for you. These CMSs are connected to a Git repo where the data lives in flat files (e.g. Markdown). You teach the CMS where those files are and how they are structured. Then, as you use the CMS to create, edit, and delete things, <strong>those changes happen as commits</strong> (or pull/merge requests) are made against that repo. So cool.</p>\n<p>For example, <a href=\"https://docs.cloudcannon.com/files/source-syncing/github/\">CloudCannon</a> can do it specifically for hosted Jekyll sites.</p>\n<p>But more in the Indie Web / JAMstack spirit, there are players like <a href=\"https://forestry.io/\">Forestry</a> and the one I have the most experience with: <a href=\"https://www.netlifycms.org/\">Netlify CMS.</a></p>\n<p>Lemme do a series of screenshots with captions to make the point very clear.</p>\n<p><img src=\"https://i1.wp.com/css-tricks.com/wp-content/uploads/2019/11/serverless.png?ssl=1\"></p>\n<p>The site in question is our <a href=\"https://serverless.css-tricks.com/\">Serverless</a> site. It happens to be <a href=\"https://www.gatsbyjs.org/\">Gatsby</a>, but the important part is that that the content comes from Markdown files in <a href=\"https://github.com/CSS-Tricks/serverless\">a Git repo</a>.</p>\n<p><img src=\"https://i1.wp.com/css-tricks.com/wp-content/uploads/2019/11/Markdown-files.png?ssl=1\"></p>\n<p>Here's an example Markdown file (with Frontmatter) in the repo. I like Markdown fine, but I'd prefer to work with content in a GUI CMS honestly. The reason I went this way is so the data is in a repo, meaning I can take content-based pull requests.</p>\n<p><img src=\"https://i2.wp.com/css-tricks.com/wp-content/uploads/2019/11/pull-request.png?ssl=1\"></p>\n<p>I really do get content-based pull requests. That's the magic right there. That's exactly what I want.</p>\n<p><img src=\"https://i0.wp.com/css-tricks.com/wp-content/uploads/2019/11/netlify-cms.png?ssl=1\"></p>\n<p>Netlify CMS is basically two files. An <code>index.html</code> that loads up a SPA interface that literally does everything. And a configuration file to teach it about your content.</p>\n<p><img src=\"https://i2.wp.com/css-tricks.com/wp-content/uploads/2019/11/netlify-cms-ui.png?ssl=1\"></p>\n<p>With Netlify CMS in place, I have my GUI CMS happy place. Any changes in here turn up as commits on the repo.</p>\n<h3>OK OK OK. What's this \"Open Authoring\" thing?</h3>\n<p>As I write, it's <a href=\"https://www.netlifycms.org/docs/open-authoring/\">a beta feature</a>.</p>\n<p>Here's the main thing: I can use Netlify CMS for my site. My team can also use it, because I can invite them specifically to the repo. But you, random person on the internet, cannot. If you wrote to me and told me you wanted to be a volunteer content manager on the site, then maybe, OK, I'll invite you to the repo. (You being a member of the repo will allow you to auth into Netlify CMS, assuming you are using the GitHub back end, which is the only connection Open Authoring works with right now.)</p>\n<p>But that's a bummer that random internet people can't submit pull requests on content via Netlify CMS. That would be way easier than the manual process of forking the repo and all that jazz — although to be fair, click the little pencil icon while looking at a Markdown file on GitHub and editing it makes the process pretty simple by opening a pull request automatically (but it doesn't help you add new content or upload images or anything).</p>\n<p>This is where Open Authoring comes in. In my Netlify CMS config I can basically flip it on with one line of config. They explain it well:</p>\n<blockquote>\n<p>you can use Netlify CMS to accept contributions from GitHub users <strong>without giving them access to your repository</strong>. When they make changes in the CMS, the CMS forks your repository for them behind the scenes, and all the changes are made to the fork. When the contributor is ready to submit their changes, they can set their draft as ready for review in the CMS. This triggers a pull request to your repository, which you can merge using the GitHub UI.</p>\n</blockquote>\n<p>Emphasis mine.</p>\n<p>Wanna see the real beauty of this? Now we can put <strong>\"Edit this\"</strong> buttons on all the content, and if you click it, you'll head straight into Netlify CMS to do the editing. It works if you are me, my team member, or you, random person from the internet.</p>\n<p><img src=\"https://i2.wp.com/css-tricks.com/wp-content/uploads/2019/11/edit-this.png?ssl=1\"></p>\n<p>That's what I've always wanted. It makes the site into a wiki! But there is enough public accountability (they have to use a real GitHub account) that I wouldn't worry about much spam or obnoxious behavior.</p>\n<p><a href=\"https://css-tricks.com/netlify-cms-open-authoring/\">Source</a></p>\n<h1>Open Authoring | Netlify CMS</h1>\n<blockquote>\n<p>Open source content management for your Git workflow</p>\n</blockquote>\n<p><strong>This is a <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/beta-features#open-authoring\">beta feature</a>.</strong></p>\n<p>When using the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/github-backend\">GitHub backend</a>, you can use Netlify CMS to accept contributions from GitHub users without giving them access to your repository. When they make changes in the CMS, the CMS forks your repository for them behind the scenes, and all the changes are made to the fork. When the contributor is ready to submit their changes, they can set their draft as ready for review in the CMS. This triggers a pull request to your repository, which you can merge using the GitHub UI.</p>\n<p>At the same time, any contributors who <em>do</em> have write access to the repository can continue to use Netlify CMS normally.</p>\n<h2><a href=\"#requirements\"></a>Requirements</h2>\n<ul>\n<li>\n<p>You must use <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/github-backend\">the GitHub backend</a>.</p>\n<p><strong>Note that the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/git-gateway-backend/#git-gateway-with-netlify-identity\">Git Gateway backend</a> does <em>not</em> support Open Authoring, even when the underlying repo is on GitHub.</strong></p>\n</li>\n<li>\n<p>For private GitHub repos the user must have <code>read</code> access on the repo, and you must explicitly set the auth_scope to <code>repo</code>, for example:</p>\n<p>backend:\nname: github\nrepo: owner-name/private-repo-name\nauth<em>scope: repo\nopen</em>authoring: true</p>\n</li>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/configuration-options/#publish-mode\">Enable the editorial workflow</a> by setting <code>publish_mode</code> to <code>editorial_workflow</code> in your <code>config.yml</code>.</li>\n<li>\n<p>Set <code>open_authoring</code> to <code>true</code> in the <code>backend</code> section of your <code>config.yml</code>, as follows:</p>\n<pre><code>backend:\n  name: github\n  repo: owner-name/repo-name\n  open_authoring: true\n</code></pre>\n</li>\n</ul>\n<h2><a href=\"#usage\"></a>Usage</h2>\n<p>When a user logs into Netlify CMS who doesn't have write access to your repo, the CMS asks for permission to create a fork of your repo (or uses their existing fork, if they already have one). They are then presented with the normal CMS interface. The published content shown is from the original repo, so it stays up-to-date as changes are made.</p>\n<p>On the editorial workflow screen, the normal three columns are replaced by two columns instead — \"Draft\" and \"Ready to Review\".</p>\n<p>When they make changes to content in the CMS, the changes are made to a branch on their fork. In the editorial workflow screen, they see only their own pending changes. Once they're ready to submit their changes, they can move the card into the \"Ready To Review\" column to create a pull request. When the pull request is merged (by a repository maintainer via the GitHub UI), Netlify CMS deletes the branch and removes the card from the user's editorial workflow screen. Open Authoring users cannot publish entries through the CMS.</p>\n<p>Users who <em>do</em> have write access to the original repository continue to use the CMS normally. Unpublished changes made by users via Open Authoring are not visible on the editorial workflow screen, and their unpublished changes must be merged through the GitHub UI.</p>\n<h2><a href=\"#alternative-for-external-contributors-with-git-gateway\"></a>Alternative for external contributors with Git Gateway</h2>\n<p><a href=\"#requirements\">As noted above</a>, Open Authoring does not work with the Git Gateway backend. However, you can use Git Gateway on a site with Netlify Identity that has <a href=\"https://www.netlify.com/docs/identity/#adding-identity-users\">open registration</a>. This lets users create accounts on your site and log into the CMS. There are a few differences, including the following:</p>\n<ul>\n<li>Users don't need to know about GitHub or create a GitHub account. Instead, they use Netlify Identity accounts that are created on your site and managed by you.</li>\n<li>The CMS applies users' changes directly to your repo, not to a fork. (If you use the editorial workflow, you can use features like <a href=\"https://help.github.com/en/articles/about-protected-branches\">GitHub's protected branches</a> or <a href=\"https://www.netlify.com/docs/locked-deploys/\">Netlify's locked deploys</a> to prevent users from publishing directly to your site from the CMS.)</li>\n<li>There is no distinction between users with write access to the repo and users without — all editorial workflow entries are visible from within the CMS and can be published with the CMS. (Unpublished Open Authoring entries, on the other hand, are visible only to the author in the CMS UI or publicly as GitHub PRs.)</li>\n</ul>\n<h2><a href=\"#linking-to-specific-entries-in-the-cms\"></a>Linking to specific entries in the CMS</h2>\n<p>Open authoring often includes some sort of \"Edit this page\" link on the live site. Netlify CMS supports this via the <strong>edit</strong> path:</p>\n<pre><code>/#/edit/{collectionName}/{entryName}\n</code></pre>\n<p>For the entry named \"general\" in the \"settings\" file collection</p>\n<pre><code>https://www.example.com/path-to-cms/#/edit/settings/general\n</code></pre>\n<p>For blog post \"test.md\" in the \"posts\" folder collection</p>\n<pre><code>https://www.example.com/path-to-cms/#/edit/posts/test\n</code></pre>\n<ul>\n<li><strong><code>collectionName</code></strong>: the name of the collection as entered in the CMS config.</li>\n<li><strong><code>entryName</code></strong> <em>(for <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/collection-types/#file-collections\">file collections</a></em>: the <code>name</code> of the entry from the CMS config.</li>\n<li><strong><code>entryName</code></strong> <em>(for <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/docs/collection-types/#folder-collections\">folder collections</a></em>: the filename, sans extension (the slug).</li>\n</ul>\n<p><a href=\"https://www.netlifycms.org/docs/open-authoring/\">Source</a></p>"},{"url":"/docs/content/","relativePath":"docs/content/index.md","relativeDir":"docs/content","base":"index.md","name":"index","frontmatter":{"title":"Content","excerpt":"In this section you'll learn how to add syntax highlighting, examples, callouts and much more.","seo":{"title":"Manage Content","description":"This is the manage content page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Manage Content","keyName":"property"},{"name":"og:description","value":"This is the manage content page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Manage Content"},{"name":"twitter:description","value":"This is the manage content page"}]},"template":"docs","weight":0},"html":"<div class=\"note\">\n \n # My Repos:\n<table>\n<thead>\n<tr>\n<th><a href=\"https://github.com/bgoonz/a-whole-bunch-o-gatsby-templates\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=a-whole-bunch-o-gatsby-templates\" alt=\"ReadMe Card\"></a></th>\n<th><a href=\"https://github.com/bgoonz/Comments\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Comments\" alt=\"ReadMe Card\"></a></th>\n<th><a href=\"https://github.com/bgoonz/EXPRESS-NOTES\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=EXPRESS-NOTES\" alt=\"ReadMe Card\"></a></th>\n<th><a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=INTERVIEW-PREP-COMPLETE\" alt=\"ReadMe Card\"></a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"https://github.com/bgoonz/alternate-blog-theme\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=alternate-blog-theme\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/commercejs-nextjs-demo-store\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=commercejs-nextjs-demo-store\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/fast-fourier-transform-\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=fast-fourier-transform-\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/JAMSTACK-TEMPLATES\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=JAMSTACK-TEMPLATES\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/anki-cards\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=anki-cards\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Common-npm-Readme-Compilation\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Common-npm-Readme-Compilation\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/form-builder-vanilla-js\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=form-builder-vanilla-js\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Javascript-Best-Practices_--Tools\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Javascript-Best-Practices_--Tools\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/ask-me-anything\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=ask-me-anything\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Connect-Four-Final-Version\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Connect-Four-Final-Version\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Front-End-Frameworks-Practice\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Front-End-Frameworks-Practice\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/jsanimate\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=jsanimate\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/atlassian-templates\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=atlassian-templates\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/convert-folder-contents-2-website\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=convert-folder-contents-2-website\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/full-stack-react-redux\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=full-stack-react-redux\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Jupyter-Notebooks\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Jupyter-Notebooks\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Authentication-Notes\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Authentication-Notes\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Copy-2-Clipboard-jQuery\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Copy-2-Clipboard-jQuery\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Full-Text-Search\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Full-Text-Search\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Lambda\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Lambda\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=bash-commands-walkthrough\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Data-Structures-Algos-Codebase\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Games\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Games\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Lambda-Resource-Static-Assets\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bash-config-backup\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=bash-config-backup\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/DATA_STRUC_PYTHON_NOTES\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=DATA_STRUC_PYTHON_NOTES\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/gatsby-netlify-cms-norwex\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=gatsby-netlify-cms-norwex\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/learning-nextjs\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=learning-nextjs\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bash-shell-utility-functions\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=bash-shell-utility-functions\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/design-home-page-with-routes-bq5v7k\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=design-home-page-with-routes-bq5v7k\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/gatsby-react-portfolio\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=gatsby-react-portfolio\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Learning-Redux\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Learning-Redux\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bass-station\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=bass-station\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/docs-collection\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=docs-collection\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/GIT-CDN-FILES\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=GIT-CDN-FILES\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Links-Shortcut-Site\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Links-Shortcut-Site\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bgoonz\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=bgoonz\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Documentation-site-react\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Documentation-site-react\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=GIT-HTML-PREVIEW-TOOL\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/live-examples\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=live-examples\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/BGOONZBLOG2.0STABLE\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=BGOONZBLOG2.0STABLE\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=DS-ALGO-OFFICIAL\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/gitbook\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=gitbook\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/live-form\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=live-form\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=BGOONZ_BLOG_2.0\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/DS-AND-ALGO-Notes-P2\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=DS-AND-ALGO-Notes-P2\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/github-readme-stats\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=github-readme-stats\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/loadash-es6-refactor\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=loadash-es6-refactor\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Binary-Search\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Binary-Search\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/ecommerce-interactive\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=ecommerce-interactive\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/github-reference-repo\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=github-reference-repo\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/markdown-css\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=markdown-css\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/blog-2.o-versions\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=blog-2.o-versions\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=embedable-repl-and-integrated-code-space-playground\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/GoalsTracker\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=GoalsTracker\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Markdown-Templates\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Markdown-Templates\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/blog-templates\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=blog-templates\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/excel2html-table\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=excel2html-table\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/graphql-experimentation\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=graphql-experimentation\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/meditation-app\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=meditation-app\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/blog-w-comments\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=blog-w-comments\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Exploring-Promises\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Exploring-Promises\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/https___mihirbeg.com_\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=https___mihirbeg.com_\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/MihirBegMusicLab\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=MihirBegMusicLab\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/Blog2.0-August-Super-Stable\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Blog2.0-August-Super-Stable\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/express-API-template\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=express-API-template\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/iframe-showcase\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=iframe-showcase\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/MihirBegMusicV3\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=MihirBegMusicV3\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/bootstrap-sidebar-template\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=bootstrap-sidebar-template\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Express-basic-server-template\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Express-basic-server-template\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Image-Archive-Traning-Data\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Image-Archive-Traning-Data\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Mihir_Beg_Final\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Mihir_Beg_Final\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://github.com/bgoonz/callbacks\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=callbacks\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/express-knex-postgres-boilerplate\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=express-knex-postgres-boilerplate\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Independent-Blog-Entries\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Independent-Blog-Entries\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Project-Showcase\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Project-Showcase\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/Shell-Script-Practice\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Shell-Script-Practice\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/promises-with-async-and-await\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=promises-with-async-and-await\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/react-redux-notes-v5\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=react-redux-notes-v5\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/mini-project-showcase\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=mini-project-showcase\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/site-analysis\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=site-analysis\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/psql-practice\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=psql-practice\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/react-redux-registration-login-example\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=react-redux-registration-login-example\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Music-Theory-n-Web-Synth-Keyboard\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/sorting-algorithms\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=sorting-algorithms\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/python-playground-embed\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=python-playground-embed\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/React_Notes_V3\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=React_Notes_V3\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/my-gists\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=my-gists\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/sorting-algos\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=sorting-algos\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/python-practice-notes\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=python-practice-notes\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/Recursion-Practice-Website\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Recursion-Practice-Website\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/My-Medium-Blog\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=My-Medium-Blog\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/sqlite3-nodejs-demo\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=sqlite3-nodejs-demo\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/python-scripts\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=python-scripts\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/Regex-and-Express-JS\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Regex-and-Express-JS\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/nextjs-netlify-blog-template\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=nextjs-netlify-blog-template\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/stalk-photos-web-assets\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=stalk-photos-web-assets\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/PYTHON_PRAC\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=PYTHON_PRAC\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/repo-utils\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=repo-utils\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/norwex-coff-ecom\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=norwex-coff-ecom\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/Standalone-Metranome\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Standalone-Metranome\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/random-list-of-embedable-content\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=random-list-of-embedable-content\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/resume-cv-portfolio-samples\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=resume-cv-portfolio-samples\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/old-c-and-cpp-repos-from-undergrad\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=old-c-and-cpp-repos-from-undergrad\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/Star-wars-API-Promise-take2\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Star-wars-API-Promise-take2\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/random-static-html-page-deploy\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=random-static-html-page-deploy\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Revamped-Automatic-Guitar-Effect-Triggering\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/old-code-from-undergrad\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=old-code-from-undergrad\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/Static-Study-Site\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Static-Study-Site\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/React-movie-app\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=React-movie-app\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/supertemp\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=supertemp\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://github.com/bgoonz/picture-man-bob-v2\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=picture-man-bob-v2\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/styling-templates\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=styling-templates\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/react-redux-medium-clone\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=react-redux-medium-clone\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/Ternary-converter\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Ternary-converter\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/scope-closure-context\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=scope-closure-context\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/TetrisJS\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=TetrisJS\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/The-Algorithms\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=The-Algorithms\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/Triggered-Guitar-Effects-Platform\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Triggered-Guitar-Effects-Platform\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/UsefulResourceRepo2.0\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=UsefulResourceRepo2.0\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/TexTools\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=TexTools\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/TRASH\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=TRASH\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/Useful-Snippets-js\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=Useful-Snippets-js\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/vscode-customized-config\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=vscode-customized-config\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/vscode-Extension-readmes\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=vscode-Extension-readmes\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-interview-prep-quiz-website\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=web-dev-interview-prep-quiz-website\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-setup-checker\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=web-dev-setup-checker\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-utils-package\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=web-dev-utils-package\" alt=\"ReadMe Card\"></a></td>\n</tr>\n<tr>\n<td><a href=\"https://hub.com/bgoonz/web-crawler-node\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=web-crawler-node\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/web-dev-notes-resource-site\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=web-dev-notes-resource-site\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/WEB-DEV-TOOLS-HUB\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=WEB-DEV-TOOLS-HUB\" alt=\"ReadMe Card\"></a></td>\n<td><a href=\"https://hub.com/bgoonz/WebAudioDaw\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=bgoonz&#x26;repo=WebAudioDaw\" alt=\"ReadMe Card\"></a></td>\n</tr>\n</tbody>\n</table>"},{"url":"/docs/docs/appendix/","relativePath":"docs/docs/appendix.md","relativeDir":"docs/docs","base":"appendix.md","name":"appendix","frontmatter":{"title":"Apendix","weight":0,"excerpt":"resources","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>index</h1>\n<p>This appendix is a non-exhaustive list of new syntactic features and methods that were added to JavaScript in ES6. These features are the most commonly used and most helpful.</p>\n<p>While this appendix doesn't cover ES6 classes, we go over the basics while learning about components in the book. In addition, this appendix doesn't include descriptions of some larger new features like promises and generators. If you'd like more info on those or on any topic below, we encourage you to reference the <a href=\"https://developer.mozilla.org/\">Mozilla Developer Network's website</a> (MDN).</p>\n<h2>Prefer <code>const</code> and <code>let</code> over <code>var</code></h2>\n<p>If you've worked with ES5 JavaScript before, you're likely used to seeing variables declared with <code>var</code>:</p>\n<pre><code class=\"language-text\">ar myVariable = 5;\n</code></pre>\n<p>Both the <code>const</code> and <code>let</code> statements also declare variables. They were introduced in ES6.</p>\n<p>Use <code>const</code> in cases where a variable is never re-assigned. Using <code>const</code> makes this clear to whoever is reading your code. It refers to the \"constant\" state of the variable in the context it is defined within.</p>\n<p>If the variable will be re-assigned, use <code>let</code>.</p>\n<p>We encourage the use of <code>const</code> and <code>let</code> instead of <code>var</code>. In addition to the restriction introduced by <code>const</code>, both <code>const</code> and <code>let</code> are <em>block scoped</em> as opposed to <em>function scoped</em>. This scoping can help avoid unexpected bugs.</p>\n<h2>Arrow functions</h2>\n<p>There are three ways to write arrow function bodies. For the examples below, let's say we have an array of city objects:</p>\n<pre><code class=\"language-text\">onst cities = [\n  { name: 'Cairo', pop: 7764700 },\n  { name: 'Lagos', pop: 8029200 },\n];\n</code></pre>\n<p>If we write an arrow function that spans multiple lines, we must use braces to delimit the function body like this:</p>\n<pre><code class=\"language-text\">const formattedPopulations = cities.map((city) => {\n  const popMM = (city.pop / 1000000).toFixed(2);\n  return popMM + ' million';\n});\nconsole.log(formattedPopulations);\n</code></pre>\n<p>Note that we must also explicitly specify a <code>return</code> for the function.</p>\n<p>However, if we write a function body that is only a single line (or single expression) we can use parentheses to delimit it:</p>\n<pre><code class=\"language-text\">const formattedPopulations2 = cities.map((city) => (\n  (city.pop / 1000000).toFixed(2) + ' million'\n));\n</code></pre>\n<p>Notably, we don't use <code>return</code> as it's implied.</p>\n<p>Furthermore, if your function body is terse you can write it like so:</p>\n<pre><code class=\"language-text\">const pops = cities.map(city => city.pop);\nconsole.log(pops);\n</code></pre>\n<p>The terseness of arrow functions is one of two reasons that we use them. Compare the one-liner above to this:</p>\n<pre><code class=\"language-text\">const popsNoArrow = cities.map(function(city) { return city.pop });\n</code></pre>\n<p>Of greater benefit, though, is how arrow functions bind the <code>this</code> object.</p>\n<p>The traditional JavaScript function declaration syntax (<code>function () {}</code>) will bind <code>this</code> in anonymous functions to the global object. To illustrate the confusion this causes, consider the following example:</p>\n<pre><code class=\"language-text\">unction printSong() {\n  console.log(\"Oops - The Global Object\");\n}\n\nconst jukebox = {\n  songs: [\n    {\n      title: \"Wanna Be Startin' Somethin'\",\n      artist: \"Michael Jackson\",\n    },\n    {\n      title: \"Superstar\",\n      artist: \"Madonna\",\n    },\n  ],\n  printSong: function (song) {\n    console.log(song.title + \" - \" + song.artist);\n  },\n  printSongs: function () {\n\n    this.songs.forEach(function(song) {\n\n      this.printSong(song);\n    });\n  },\n}\n\njukebox.printSongs();\n</code></pre>\n<p>The method <code>printSongs()</code> iterates over <code>this.songs</code> with <code>forEach()</code>. In this context, <code>this</code> is bound to the object (<code>jukebox</code>) as expected. However, the anonymous function passed to <code>forEach()</code> binds its internal <code>this</code> to the global object. As such, <code>this.printSong(song)</code> calls the function declared at the top of the example, <em>not</em> the method on <code>jukebox</code>.</p>\n<p>JavaScript developers have traditionally used workarounds for this behavior, but arrow functions solve the problem by <strong>capturing the <code>this</code> value of the enclosing context</strong>. Using an arrow function for <code>printSongs()</code> has the expected result:</p>\n<pre><code class=\"language-text\">  printSongs: function () {\n    this.songs.forEach((song) => {\n\n      this.printSong(song);\n    });\n  },\n}\n\njukebox.printSongs();\n</code></pre>\n<p>For this reason, throughout the book we use arrow functions for all anonymous functions.</p>\n<h2>Modules</h2>\n<p>ES6 formally supports modules using the <code>import</code>/<code>export</code> syntax.</p>\n<p><strong>Named exports</strong></p>\n<p>Inside any file, you can use <code>export</code> to specify a variable the module should expose. Here's an example of a file that exports two functions:</p>\n<pre><code class=\"language-text\">export const sayHi = () => (console.log('Hi!'));\nexport const sayBye = () => (console.log('Bye!'));\n\nconst saySomething = () => (console.log('Something!'));\n</code></pre>\n<p>Now, anywhere we wanted to use these functions we could use <code>import</code>. We need to specify which functions we want to import. A common way of doing this is using ES6's destructuring assignment syntax to list them out like this:</p>\n<pre><code class=\"language-text\">import { sayHi, sayBye } from './greetings';\n\nsayHi();\nsayBye();\n</code></pre>\n<p>Importantly, the function that was <em>not</em> exported (<code>saySomething</code>) is unavailable outside of the module.</p>\n<p>Also note that we supply a <strong>relative path</strong> to <code>from</code>, indicating that the ES6 module is a local file as opposed to an npm package.</p>\n<p>Instead of inserting an <code>export</code> before each variable you'd like to export, you can use this syntax to list off all the exposed variables in one area:</p>\n<pre><code class=\"language-text\">const sayHi = () => (console.log('Hi!'));\nconst sayBye = () => (console.log('Bye!'));\n\nconst saySomething = () => (console.log('Something!'));\n\nexport { sayHi, sayBye };\n</code></pre>\n<p>We can also specify that we'd like to import all of a module's functionality underneath a given namespace with the <code>import * as &#x3C;Namespace></code> syntax:</p>\n<pre><code class=\"language-text\">import * as Greetings from './greetings';\n\nGreetings.sayHi();\n\nGreetings.sayBye();\n\nGreetings.saySomething();\n</code></pre>\n<p><strong>Default export</strong></p>\n<p>The other type of export is a default export. A module can only contain one default export:</p>\n<pre><code class=\"language-text\">const sayHi = () => (console.log('Hi!'));\nconst sayBye = () => (console.log('Bye!'));\n\nconst saySomething = () => (console.log('Something!'));\n\nconst Greetings = { sayHi, sayBye };\n\nexport default Greetings;\n</code></pre>\n<p>This is a common pattern for libraries. It means you can easily import the library wholesale without specifying what individual functions you want:</p>\n<pre><code class=\"language-text\">import Greetings from './greetings';\n\nGreetings.sayHi();\nGreetings.sayBye();\n</code></pre>\n<p>It's not uncommon for a module to use a mix of both named exports and default exports. For instance, with <code>react-dom</code>, you can import <code>ReactDOM</code> (a default export) like this:</p>\n<pre><code class=\"language-text\">import ReactDOM from 'react-dom';\n\nReactDOM.render(\n\n);\n</code></pre>\n<p>Or, if you're only going to use the <code>render()</code> function, you can import the named <code>render()</code> function like this:</p>\n<pre><code class=\"language-text\">import { render } from 'react-dom';\n\nrender(\n\n);\n</code></pre>\n<p>To achieve this flexibility, the export implementation for <code>react-dom</code> looks something like this:</p>\n<pre><code class=\"language-text\">export const render = (component, target) => {\n\n};\n\nconst ReactDOM = {\n  render,\n\n};\n\nexport default ReactDOM;\n</code></pre>\n<p>If you want to play around with the module syntax, check out the folder <code>code/webpack/es6-modules</code>.</p>\n<p>For more reading on ES6 modules, see this article from Mozilla: \"<a href=\"https://hacks.mozilla.org/2015/08/es6-in-depth-modules/\">ES6 in Depth: Modules</a>\".</p>\n<h2><code>Object.assign()</code></h2>\n<p>We use <code>Object.assign()</code> often throughout the book. We use it in areas where we want to create a modified version of an existing object.</p>\n<p><code>Object.assign()</code> accepts any number of objects as arguments. When the function receives two arguments, it <em>copies</em> the properties of the second object onto the first, like so:</p>\n<pre><code class=\"language-text\">onst coffee = { };\nconst noCream = { cream: false };\nconst noMilk = { milk: false };\nObject.assign(coffee, noCream);\n</code></pre>\n<p>It is idiomatic to pass in three arguments to <code>Object.assign()</code>. The first argument is a new JavaScript object, the one that <code>Object.assign()</code> will ultimately return. The second is the object whose properties we'd like to build off of. The last is the changes we'd like to apply:</p>\n<pre><code class=\"language-text\">const coffeeWithMilk = Object.assign({}, coffee, { milk: true });\n</code></pre>\n<p><code>Object.assign()</code> is a handy method for working with \"immutable\" JavaScript objects.</p>\n<h2>Template literals</h2>\n<p>In ES5 JavaScript, you'd interpolate variables into strings like this:</p>\n<pre><code class=\"language-text\">var greeting = 'Hello, ' + user + '! It is ' + degF + ' degrees outside.';\n</code></pre>\n<p>With ES6 template literals, we can create the same string like this:</p>\n<pre><code class=\"language-text\">const greeting = `Hello, ${user}! It is ${degF} degrees outside.`;\n</code></pre>\n<h2>The spread operator (<code>...</code>)</h2>\n<p>In arrays, the ellipsis <code>...</code> operator will <em>expand</em> the array that follows into the parent array. The spread operator enables us to succinctly construct new arrays as a composite of existing arrays.</p>\n<p>Here is an example:</p>\n<pre><code class=\"language-text\">onst a = [ 1, 2, 3 ];\nconst b = [ 4, 5, 6 ];\nconst c = [ ...a, ...b, 7, 8, 9 ];\n\nconsole.log(c);\n</code></pre>\n<p>Notice how this is different than if we wrote:</p>\n<pre><code class=\"language-text\">const d = [ a, b, 7, 8, 9 ];\nconsole.log(d);\n</code></pre>\n<h2>Enhanced object literals</h2>\n<p>In ES5, all objects were required to have explicit key and value declarations:</p>\n<pre><code class=\"language-text\">const explicit = {\n  getState: getState,\n  dispatch: dispatch,\n};\n</code></pre>\n<p>In ES6, you can use this terser syntax whenever the property name and variable name are the same:</p>\n<pre><code class=\"language-text\">const implicit = {\n  getState,\n  dispatch,\n};\n</code></pre>\n<p>Lots of open source libraries use this syntax, so it's good to be familiar with it. But whether you use it in your own code is a matter of stylistic preference.</p>\n<h2>Default arguments</h2>\n<p>With ES6, you can specify a default value for an argument in the case that it is <code>undefined</code> when the function is called.</p>\n<p>This:</p>\n<pre><code class=\"language-text\">unction divide(a, b) {\n\n  const divisor = typeof b === 'undefined' ? 1 : b;\n\n  return a / divisor;\n}\n</code></pre>\n<p>Can be written as this:</p>\n<pre><code class=\"language-text\">function divide(a, b = 1) {\n  return a / b;\n}\n</code></pre>\n<p>In both cases, using the function looks like this:</p>\n<pre><code class=\"language-text\">divide(14, 2);\n\ndivide(14, undefined);\n\ndivide(14);\n</code></pre>\n<p>Whenever the argument <code>b</code> in the example above is <code>undefined</code>, the default argument is used. Note that <code>null</code> will not use the default argument:</p>\n<pre><code class=\"language-text\">divide(14, null);\n</code></pre>\n<h2>Destructuring assignments</h2>\n<h3>For arrays</h3>\n<p>In ES5, extracting and assigning multiple elements from an array looked like this:</p>\n<pre><code class=\"language-text\">ar fruits = [ 'apples', 'bananas', 'oranges' ];\nvar fruit1 = fruits[0];\nvar fruit2 = fruits[1];\n</code></pre>\n<p>In ES6, we can use the destructuring syntax to accomplish the same task like this:</p>\n<pre><code class=\"language-text\">const [ veg1, veg2 ] = [ 'asparagus', 'broccoli', 'onion' ];\nconsole.log(veg1);\nconsole.log(veg2);\n</code></pre>\n<p>The variables in the array on the left are \"matched\" and assigned to the corresponding elements in the array on the right. Note that <code>'onion'</code> is ignored and has no variable bound to it.</p>\n<h3>For objects</h3>\n<p>We can do something similar for extracting object properties into variables:</p>\n<pre><code class=\"language-text\">const smoothie = {\n  fats: [ 'avocado', 'peanut butter', 'greek yogurt' ],\n  liquids: [ 'almond milk' ],\n  greens: [ 'spinach' ],\n  fruits: [ 'blueberry', 'banana' ],\n};\n\nconst { liquids, fruits } = smoothie;\n\nconsole.log(liquids);\nconsole.log(fruits);\n</code></pre>\n<h3>Parameter context matching</h3>\n<p>We can use these same principles to bind arguments inside a function to properties of an object supplied as an argument:</p>\n<pre><code class=\"language-text\">const containsSpinach = ({ greens }) => {\n  if (greens.find(g => g === 'spinach')) {\n    return true;\n  } else {\n    return false;\n  }\n};\n\ncontainsSpinach(smoothie);\n</code></pre>\n<p>We do this often with functional React components:</p>\n<pre><code class=\"language-text\">const IngredientList = ({ ingredients, onClick }) => (\n  &#x3C;ul className='IngredientList'>\n    {\n      ingredients.map(i => (\n        &#x3C;li\n          key={i.id}\n          onClick={() => onClick(i.id)}\n          className='item'\n        >\n          {i.name}\n        &#x3C;/li>\n      ))\n    }\n  &#x3C;/ul>\n)\n</code></pre>\n<p>Here, we use destructuring to extract the props into variables (<code>ingredients</code> and <code>onClick</code>) that we then use inside the component's function body.</p>"},{"url":"/docs/data-structures/data-structures-in-depth/","relativePath":"docs/data-structures/data-structures-in-depth.md","relativeDir":"docs/data-structures","base":"data-structures-in-depth.md","name":"data-structures-in-depth","frontmatter":{"title":"Data Structures","weight":0,"excerpt":"Asymptotic Notation is the hardware independent notation used to tell the time and space complexity of an algorithm. Meaning it's a standardized way of measuring how much memory an algorithm uses or how long it runs for given an input.","seo":{"title":"Data Structures ","description":"In Javascript","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Fundamental Data Structures In JavaScript</h1>\n<br>\n<br>\n<br>\n<h1>   Algorithms </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz-branch-the-algos.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>  The Algos Bgoonz Branch </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://thealgorithms.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" height=\"1400\" src=\"https://ds-algo-official.netlify.app/\" frameborder=\"0\" allowfullscreen style=\"zoom:0.7;\"></iframe>\n<p>Fundamental Data Structures In JavaScript</p>\n<h2>Data structures in JavaScript</h2>\n<p>Here's a website I created to practice data structures!\n<a href=\"https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/\"><strong>directory</strong>\n<em>Edit description</em>ds-algo-official-c3dw6uapg-bgoonz.vercel.app</a></p>\n<p>Here's the repo that the website is built on:\n<a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><strong>bgoonz/DS-ALGO-OFFICIAL</strong>\n<em>Navigation ####Author:Bryan Guner Big O notation is the language we use for talking about how long an algorithm takes…</em>github.com</a></p>\n<h2>Resources (article content below):</h2>\n<h3>Videos</h3>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=0IAPZzGSbME&#x26;list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O&#x26;index=2&#x26;t=0s\">Abdul Bari: YouTubeChannel for Algorithms</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/0IAPZzGSbME\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=lxja8wBwN0k&#x26;list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s\">Data Structures and algorithms</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/lxja8wBwN0k\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/playlist?list=PLmGElG-9wxc9Us6IK6Qy-KHlG_F3IS6Q9\">Data Structures and algorithms Course</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/videoseries?list=PLmGElG-9wxc9Us6IK6Qy-KHlG_F3IS6Q9\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.khanacademy.org/computing/computer-science/algorithms\">Khan Academy</a></li>\n</ul>\n<iframe width=\"714\" height=\"401\" src=\"https://www.youtube.com/embed/CvSOaYi89B4\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/playlist?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P\">Data structures by mycodeschool</a>Pre-requisite for this lesson is good understanding of pointers in C.</li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/videoseries?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=HtSuA80QTyo&#x26;list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb\">MIT 6.006: Intro to Algorithms(2011)</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/HtSuA80QTyo\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=5_5oE5lgrhw&#x26;list=PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi\">Data Structures and Algorithms by Codewithharry</a></li>\n</ul>\n<iframe width=\"700\" height=\"515\" src=\"https://www.youtube.com/embed/5_5oE5lgrhw\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<h3>Books</h3>\n<ul>\n<li><a href=\"https://edutechlearners.com/download/Introduction_to_algorithms-3rd%20Edition.pdf\">Introduction to Algorithms</a> by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein</li>\n<li><a href=\"http://www.sso.sy/sites/default/files/competitive%20programming%203_1.pdf\">Competitive Programming 3</a> by Steven Halim and Felix Halim</li>\n<li><a href=\"https://cses.fi/book/book.pdf\">Competitive Programmers Hand Book</a> Beginner friendly hand book for competitive programmers.</li>\n<li><a href=\"https://github.com/Amchuz/My-Data-Structures-and-Algorithms-Resources/raw/master/Books/Data%20Structures%20and%20Algorithms%20-%20Narasimha%20Karumanchi.pdf\">Data Structures and Algorithms Made Easy</a> by Narasimha Karumanchi</li>\n<li><a href=\"https://github.com/Amchuz/My-Data-Structures-and-Algorithms-Resources/raw/master/Books/Learning%20Algorithms%20Through%20Programming%20and%20Puzzle%20Solving.pdf\">Learning Algorithms Through Programming and Puzzle Solving</a> by Alexander Kulikov and Pavel Pevzner</li>\n</ul>\n<h3>Coding practice</h3>\n<ul>\n<li><a href=\"https://leetcode.com/\">LeetCode</a></li>\n<li><a href=\"https://www.interviewbit.com/\">InterviewBit</a></li>\n<li><a href=\"https://codility.com/\">Codility</a></li>\n<li><a href=\"https://www.hackerrank.com/\">HackerRank</a></li>\n<li><a href=\"https://projecteuler.net/\">Project Euler</a></li>\n<li><a href=\"https://spoj.com/\">Spoj</a></li>\n<li><a href=\"https://code.google.com/codejam/contests.html\">Google Code Jam practice problems</a></li>\n<li><a href=\"https://www.hackerearth.com/\">HackerEarth</a></li>\n<li><a href=\"https://www.topcoder.com/\">Top Coder</a></li>\n<li><a href=\"https://www.codechef.com/\">CodeChef</a></li>\n<li><a href=\"https://www.codewars.com/\">Codewars</a></li>\n<li><a href=\"https://codesignal.com/\">CodeSignal</a></li>\n<li><a href=\"http://codekata.com/\">CodeKata</a></li>\n<li><a href=\"https://www.firecode.io/\">Firecode</a></li>\n</ul>\n<h3>Courses</h3>\n<ul>\n<li><a href=\"https://academy.zerotomastery.io/p/master-the-coding-interview-faang-interview-prep\">Master the Coding Interview: Big Tech (FAANG) Interviews</a> Course by Andrei and his team.</li>\n<li><a href=\"https://realpython.com/python-data-structures\">Common Python Data Structures</a> Data structures are the fundamental constructs around which you build your programs. Each data structure provides a particular way of organizing data so it can be accessed efficiently, depending on your use case. Python ships with an extensive set of data structures in its standard library.</li>\n<li><a href=\"https://www.geeksforgeeks.org/fork-cpp-course-structure\">Fork CPP</a> A good course for beginners.</li>\n<li><a href=\"https://codeforces.com/edu/course/2\">EDU</a> Advanced course.</li>\n<li><a href=\"https://www.udacity.com/course/c-for-programmers--ud210\">C++ For Programmers</a> Learn features and constructs for C++.</li>\n</ul>\n<h3>Guides</h3>\n<ul>\n<li><a href=\"http://www.geeksforgeeks.org/\">GeeksForGeeks — A CS portal for geeks</a></li>\n<li><a href=\"https://www.learneroo.com/subjects/8\">Learneroo — Algorithms</a></li>\n<li><a href=\"http://www.topcoder.com/tc?d1=tutorials&#x26;d2=alg_index&#x26;module=Static\">Top Coder tutorials</a></li>\n<li><a href=\"http://www.infoarena.ro/training-path\">Infoarena training path</a> (RO)</li>\n<li>Steven &#x26; Felix Halim — <a href=\"https://uva.onlinejudge.org/index.php?option=com_onlinejudge&#x26;Itemid=8&#x26;category=118\">Increasing the Lower Bound of Programming Contests</a> (UVA Online Judge)</li>\n</ul>\n<h2><strong><em>space</em></strong></h2>\n<blockquote>\n<p><em>The space complexity represents the memory consumption of a data structure. As for most of the things in life, you can't have it all, so it is with the data structures. You will generally need to trade some time for space or the other way around.</em></p>\n</blockquote>\n<h2><em>time</em></h2>\n<blockquote>\n<p><em>The time complexity for a data structure is in general more diverse than its space complexity.</em></p>\n</blockquote>\n<h2><em>Several operations</em></h2>\n<blockquote>\n<p><em>In contrary to algorithms, when you look at the time complexity for data structures you need to express it for several operations that you can do with data structures. It can be adding elements, deleting elements, accessing an element or even searching for an element.</em></p>\n</blockquote>\n<h2><em>Dependent on data</em></h2>\n<blockquote>\n<p><em>Something that data structure and algorithms have in common when talking about time complexity is that they are both dealing with data. When you deal with data you become dependent on them and as a result the time complexity is also dependent of the data that you received. To solve this problem we talk about 3 different time complexity.</em></p>\n</blockquote>\n<ul>\n<li><strong>The best-case complexity: when the data looks the best</strong></li>\n<li><strong>The worst-case complexity: when the data looks the worst</strong></li>\n<li><strong>The average-case complexity: when the data looks average</strong></li>\n</ul>\n<h2>Big O notation</h2>\n<p>The complexity is usually expressed with the Big O notation. The wikipedia page about this subject is pretty complex but you can find here a good summary of the different complexity for the most famous data structures and sorting algorithms.</p>\n<h2>The Array data structure</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*Qk3UYgeqXamRrFLR.gif\"></p>\n<h2>Definition</h2>\n<p>An Array data structure, or simply an Array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. The simplest type of data structure is a linear array, also called one-dimensional array. From Wikipedia</p>\n<p>Arrays are among the oldest and most important data structures and are used by every program. They are also used to implement many other data structures.</p>\n<p><em>Complexity</em>\n<em>Average</em>\n<em>Access Search Insertion Deletion</em></p>\n<p>O(1) O(n) O(1) O(n)</p>\n<pre><code class=\"language-js\">class ArrayADT {\n    constructor() {\n        this.array = [];\n    }\n\n    add(data) {\n        this.array.push(data);\n    }\n\n    remove(data) {\n        this.array = this.array.filter((current) => current !== data);\n    }\n\n    search(data) {\n        const foundIndex = this.array.indexOf(data);\n        if (foundIndex === -1) {\n            return foundIndex;\n        }\n\n        return null;\n    }\n\n    getAtIndex(index) {\n        return this.array[index];\n    }\n\n    length() {\n        return this.array.length;\n    }\n\n    print() {\n        console.log(this.array.join(' '));\n    }\n}\n\nconst array = new ArrayADT();\nconsole.log('const array = new ArrayADT();: ', array);\nconsole.log('-------------------------------');\n\nconsole.log('array.add(1): ', array.add(1));\narray.add(3);\narray.add(4);\nconsole.log('array.add(2);: ', array.add(2), 'array.add(3);', array.add(3), 'array.add(4); ', array.add(4));\n\nconsole.log('-------------------------------');\narray.print();\nconsole.log('-------------------------------');\n\nconsole.log('search 3 gives index 2:', array.search(3));\nconsole.log('-------------------------------');\n\nconsole.log('getAtIndex 2 gives 3:', array.getAtIndex(2));\nconsole.log('-------------------------------');\n\nconsole.log('length is 4:', array.length());\nconsole.log('-------------------------------');\n\narray.remove(3);\narray.print();\nconsole.log('-------------------------------');\n\narray.add(5);\narray.add(5);\narray.print();\nconsole.log('-------------------------------');\n\narray.remove(5);\narray.print();\nconsole.log('-------------------------------');\n/*\n     ~ final : (master) node 01-array.js \n    const array = new ArrayADT();:  ArrayADT { array: [] }\n    -------------------------------\n    array.add(1):  undefined\n    array.add(2);:  undefined array.add(3); undefined array.add(4);  undefined\n    -------------------------------\n    1 3 4 2 3 4\n    -------------------------------\n    search 3 gives index 2: null\n    -------------------------------\n    getAtIndex 2 gives 3: 4\n    -------------------------------\n    length is 4: 6\n    -------------------------------\n    1 4 2 4\n    -------------------------------\n    1 4 2 4 5 5\n    -------------------------------\n    1 4 2 4\n    -------------------------------\n     ~ final : (master) \n     */\n</code></pre>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/1*-BJ2hU-CZO2kuzu4x5a53g.png\"></p>\n<p>indexvalue0 … this is the first value, stored at zero position</p>\n<ol>\n<li>The index of an array <strong>runs in sequence</strong></li>\n<li>This could be useful for storing data that are required to be ordered, such as rankings or queues</li>\n<li>In JavaScript, array's value could be mixed; meaning value of each index could be of different data, be it String, Number or even Objects</li>\n</ol>\n<pre><code class=\"language-js\">    // 1. Creating Arrays\n    let firstArray = [\"a\",\"b\",\"c\"];\n    let secondArray = [\"d\",\"e\",\"f\"];\n\n    // 2. Access an Array Item\n    console.log(firstArray[0]); // Results: \"a\"\n\n    // 3. Loop over an Array\n    firstArray.forEach(function(item, index, array){\n        console.log(item, index);\n    });\n    // Results:\n    // a 0\n    // b 1\n    // c 2\n\n    // 4. Add new item to END of array\n    secondArray.push('g');\n    console.log(secondArray);\n    // Results: [\"d\",\"e\",\"f\", \"g\"]\n\n    // 5. Remove item from END of array\n    secondArray.pop();\n    console.log(secondArray);\n    // Results: [\"d\",\"e\",\"f\"]\n\n    // 6. Remove item from FRONT of array\n    secondArray.shift();\n    console.log(secondArray);\n    // Results: [\"e\",\"f\"]\n\n    // 7. Add item to FRONT of array\n    secondArray.unshift(\"d\");\n    console.log(secondArray);\n    // Results: [\"d\",\"e\",\"f\"]\n\n    // 8. Find INDEX of an item in array\n    let position = secondArray.indexOf('f');\n    // Results: 2\n\n    // 9. Remove Item by Index Position\n    secondArray.splice(position, 1);\n    console.log(secondArray);\n    // Note, the second argument, in this case \"1\",\n    // represent the number of array elements to be removed\n    // Results:  [\"d\",\"e\"]\n\n    // 10. Copy an Array\n    let shallowCopy = secondArray.slice();\n    console.log(secondArray);\n    console.log(shallowCopy);\n    // Results: ShallowCopy === [\"d\",\"e\"]\n\n    // 11. JavaScript properties that BEGIN with a digit MUST be accessed using bracket notation\n    renderer.3d.setTexture(model, 'character.png');     // a syntax error\n    renderer['3d'].setTexture(model, 'character.png');  // works properly\n\n\n    // 12. Combine two Arrays\n    let thirdArray = firstArray.concat(secondArray);\n    console.log(thirdArray);\n    // [\"a\",\"b\",\"c\", \"d\", \"e\"];\n\n    // 13. Combine all Array elements into a string\n    console.log(thirdArray.join()); // Results: a,b,c,d,e\n    console.log(thirdArray.join('')); // Results: abcde\n    console.log(thirdArray.join('-')); // Results: a-b-c-d-e\n\n    // 14. Reversing an Array (in place, i.e. destructive)\n    console.log(thirdArray.reverse()); // [\"e\", \"d\", \"c\", \"b\", \"a\"]\n\n    // 15. sort\n    let unsortedArray = [\"Alphabet\", \"Zoo\", \"Products\", \"Computer Science\", \"Computer\"];\n    console.log(unsortedArray.sort());\n    // Results: [\"Alphabet\", \"Computer\", \"Computer Science\", \"Products\", \"Zoo\" ]\n</code></pre>\n<details>\n<summary>  See More </summary>   \n<h2>2. Objects</h2>\n<p>Think of objects as a logical grouping of a bunch of properties.</p>\n<p>Properties could be some variable that it's storing or some methods that it's using.</p>\n<p>I also visualize an object as a table.</p>\n<p>The main difference is that object's \"index\" need not be numbers and is not necessarily sequenced.</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/2572/1*KVZkD2zrgEa_47igW8Hq8g.png\"></p>\n<pre><code class=\"language-js\">// 16. Creating an Object\n\nlet newObj = {\n    name: \"I'm an object\",\n    values: [1, 10, 11, 20],\n    others: '',\n    '1property': 'example of property name starting with digit'\n};\n\n// 17. Figure out what keys/properties are in an object\nconsole.log(Object.keys(newObj));\n// Results: [ 'name', 'values', 'others', '1property' ]\n\n// 18. Show all values stored in the object\nconsole.log(Object.values(newObj));\n\n// Results:\n// [ 'I\\'m an object',\n//   [ 1, 10, 11, 20 ],\n//   '',\n//   'example of property name starting with digit' ]\n\n// 19. Show all key and values of the object\nfor (let [key, value] of Object.entries(newObj)) {\n    console.log(`${key}: ${value}`);\n}\n// Results:\n// name: I'm an object\n// values: 1,10,11,20\n// others:\n// 1property: example of property name starting with digit\n\n// 20. Accessing Object's Properties\n// Two different ways to access properties, both produce same results\nconsole.log(newObj.name);\nconsole.log(newObj['name']);\n\n// But if the property name starts with a digit,\n// we CANNOT use dot notation\nconsole.log(newObj['1property']);\n\n// 21. Adding a Method to an Object\nnewObj.helloWorld = function () {\n    console.log('Hello World from inside an object!');\n};\n\n// 22. Invoking an Object's Method\nnewObj.helloWorld();\n</code></pre>\n<h2>The Hash Table</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*avbxLAFocSV6vsl5.gif\"></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/2048/0*3GJiRoLyEoZ_aIlO\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Hash Table (Hash Map) is a data structure used to implement an associative array, a structure that can map keys to values. A Hash Table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found. From Wikipedia</em></p>\n</blockquote>\n<p>Hash Tables are considered the more efficient data structure for lookup and for this reason, they are widely used.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion</p>\n<ul>\n<li>\n<p>O(1) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n</li>\n</ul>\n<p>Note, here I am storing another object for every hash in my Hash Table.</p>\n<pre><code class=\"language-js\">class HashTable {\n    constructor(size) {\n        this.values = {};\n        this.numberOfValues = 0;\n        this.size = size;\n    }\n    add(key, value) {\n        let hash = this.calculateHash(key);\n        if (!this.values.hasOwnProperty(hash)) {\n            this.values[hash] = {};\n        }\n        if (!this.values[hash].hasOwnProperty(key)) {\n            this.numberOfValues++;\n        }\n        this.values[hash][key] = value;\n    }\n    remove(key) {\n        let hash = this.calculateHash(key);\n        if (this.values.hasOwnProperty(hash) &#x26;&#x26; this.values[hash].hasOwnProperty(key)) {\n            delete this.values[hash][key];\n            this.numberOfValues--;\n        }\n    }\n    calculateHash(key) {\n        return key.toString().length % this.size;\n    }\n    search(key) {\n        let hash = this.calculateHash(key);\n        if (this.values.hasOwnProperty(hash) &#x26;&#x26; this.values[hash].hasOwnProperty(key)) {\n            return this.values[hash][key];\n        } else {\n            return null;\n        }\n    }\n    length() {\n        return this.numberOfValues;\n    }\n    print() {\n        let string = '';\n        for (let value in this.values) {\n            for (let key in this.values[value]) {\n                string += this.values[value][key] + ' ';\n            }\n        }\n        console.log(string.trim());\n    }\n}\nlet hashTable = new HashTable(3);\nhashTable.add('first', 1);\nhashTable.add('second', 2);\nhashTable.add('third', 3);\nhashTable.add('fourth', 4);\nhashTable.add('fifth', 5);\nhashTable.print(); // => 2 4 1 3 5\nconsole.log('length gives 5:', hashTable.length()); // => 5\nconsole.log('search second gives 2:', hashTable.search('second')); // => 2\nhashTable.remove('fourth');\nhashTable.remove('first');\nhashTable.print(); // => 2 3 5\nconsole.log('length gives 3:', hashTable.length()); // => 3\n/*\n       ~ js-files : (master) node hash.js \n    2 4 1 3 5\n    length gives 5: 5\n    search second gives 2: 2\n    2 3 5\n    length gives 3: 3\n    */\n</code></pre>\n<h2>The Set</h2>\n<h2>Sets</h2>\n<p>Sets are pretty much what it sounds like. It's the same intuition as Set in Mathematics. I visualize Sets as Venn Diagrams.</p>\n<pre><code class=\"language-js\">// 23. Creating a new Set\nlet newSet = new Set();\n\n// 24. Adding new elements to a set\nnewSet.add(1); // Set[1]\nnewSet.add('text'); // Set[1, \"text\"]\n\n// 25. Check if element is in set\nnewSet.has(1); // true\n\n// 24. Check size of set\nconsole.log(newSet.size); // Results: 2\n\n// 26. Delete element from set\nnewSet.delete(1); // Set[\"text\"]\n\n// 27. Set Operations: isSuperSet\nfunction isSuperset(set, subset) {\n    for (let elem of subset) {\n        if (!set.has(elem)) {\n            return false;\n        }\n    }\n    return true;\n}\n// 28. Set Operations: union\nfunction union(setA, setB) {\n    let _union = new Set(setA);\n    for (let elem of setB) {\n        _union.add(elem);\n    }\n    return _union;\n}\n\n// 29. Set Operations: intersection\nfunction intersection(setA, setB) {\n    let _intersection = new Set();\n    for (let elem of setB) {\n        if (setA.has(elem)) {\n            _intersection.add(elem);\n        }\n    }\n    return _intersection;\n}\n// 30. Set Operations: symmetricDifference\nfunction symmetricDifference(setA, setB) {\n    let _difference = new Set(setA);\n    for (let elem of setB) {\n        if (_difference.has(elem)) {\n            _difference.delete(elem);\n        } else {\n            _difference.add(elem);\n        }\n    }\n    return _difference;\n}\n// 31. Set Operations: difference\nfunction difference(setA, setB) {\n    let _difference = new Set(setA);\n    for (let elem of setB) {\n        _difference.delete(elem);\n    }\n    return _difference;\n}\n\n// Examples\nlet setA = new Set([1, 2, 3, 4]);\nlet setB = new Set([2, 3]);\nlet setC = new Set([3, 4, 5, 6]);\n\nconsole.log(isSuperset(setA, setB)); // => true\nconsole.log(union(setA, setC)); // => Set [1, 2, 3, 4, 5, 6]\nconsole.log(intersection(setA, setC)); // => Set [3, 4]\nconsole.log(symmetricDifference(setA, setC)); // => Set [1, 2, 5, 6]\nconsole.log(difference(setA, setC)); // => Set [1, 2]\n</code></pre>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*gOE33ANZP2ujbjIG\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Set is an abstract data type that can store certain values, without any particular order, and no repeated values. It is a computer implementation of the mathematical concept of a finite Set. From Wikipedia</em></p>\n</blockquote>\n<p>The Set data structure is usually used to test whether elements belong to set of values. Rather then only containing elements, Sets are more used to perform operations on multiple values at once with methods such as union, intersect, etc…</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion</p>\n<ul>\n<li>\n<p>O(n) O(n) O(n)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n</li>\n</ul>\n<pre><code class=\"language-js\">function Set() {\n    this.values = [];\n    this.numberOfValues = 0;\n}\n\nSet.prototype.add = function (value) {\n    if (!~this.values.indexOf(value)) {\n        this.values.push(value);\n        this.numberOfValues++;\n    }\n};\nSet.prototype.remove = function (value) {\n    let index = this.values.indexOf(value);\n    if (~index) {\n        this.values.splice(index, 1);\n        this.numberOfValues--;\n    }\n};\nSet.prototype.contains = function (value) {\n    return this.values.indexOf(value) !== -1;\n};\nSet.prototype.union = function (set) {\n    let newSet = new Set();\n    set.values.forEach(function (value) {\n        newSet.add(value);\n    });\n    this.values.forEach(function (value) {\n        newSet.add(value);\n    });\n    return newSet;\n};\nSet.prototype.intersect = function (set) {\n    let newSet = new Set();\n    this.values.forEach(function (value) {\n        if (set.contains(value)) {\n            newSet.add(value);\n        }\n    });\n    return newSet;\n};\nSet.prototype.difference = function (set) {\n    let newSet = new Set();\n    this.values.forEach(function (value) {\n        if (!set.contains(value)) {\n            newSet.add(value);\n        }\n    });\n    return newSet;\n};\nSet.prototype.isSubset = function (set) {\n    return set.values.every(function (value) {\n        return this.contains(value);\n    }, this);\n};\nSet.prototype.length = function () {\n    return this.numberOfValues;\n};\nSet.prototype.print = function () {\n    console.log(this.values.join(' '));\n};\n\nlet set = new Set();\nset.add(1);\nset.add(2);\nset.add(3);\nset.add(4);\nset.print(); // => 1 2 3 4\nset.remove(3);\nset.print(); // => 1 2 4\nconsole.log('contains 4 is true:', set.contains(4)); // => true\nconsole.log('contains 3 is false:', set.contains(3)); // => false\nconsole.log('---');\nlet set1 = new Set();\nset1.add(1);\nset1.add(2);\nlet set2 = new Set();\nset2.add(2);\nset2.add(3);\nlet set3 = set2.union(set1);\nset3.print(); // => 1 2 3\nlet set4 = set2.intersect(set1);\nset4.print(); // => 2\nlet set5 = set.difference(set3); // 1 2 4 diff 1 2 3\nset5.print(); // => 4\nlet set6 = set3.difference(set); // 1 2 3 diff 1 2 4\nset6.print(); // => 3\nconsole.log('set1 subset of set is true:', set.isSubset(set1)); // => true\nconsole.log('set2 subset of set is false:', set.isSubset(set2)); // => false\nconsole.log('set1 length gives 2:', set1.length()); // => 2\nconsole.log('set3 length gives 3:', set3.length()); // => 3\n</code></pre>\n<h2>The Singly Linked List</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2048/0*fLs64rV-Xq19aVCA.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Singly Linked List is a linear collection of data elements, called nodes pointing to the next node by means of pointer. It is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of data and a reference (in other words, a link) to the next node in the sequence.</em></p>\n</blockquote>\n<p>Linked Lists are among the simplest and most common data structures because it allows for efficient insertion or removal of elements from any position in the sequence.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code class=\"language-js\">function Node(data) {\n    this.data = data;\n    this.next = null;\n}\n\nfunction SinglyLinkedList() {\n    this.head = null;\n    this.tail = null;\n    this.numberOfValues = 0;\n}\n\nSinglyLinkedList.prototype.add = function (data) {\n    let node = new Node(data);\n    if (!this.head) {\n        this.head = node;\n        this.tail = node;\n    } else {\n        this.tail.next = node;\n        this.tail = node;\n    }\n    this.numberOfValues++;\n};\nSinglyLinkedList.prototype.remove = function (data) {\n    let previous = this.head;\n    let current = this.head;\n    while (current) {\n        if (current.data === data) {\n            if (current === this.head) {\n                this.head = this.head.next;\n            }\n            if (current === this.tail) {\n                this.tail = previous;\n            }\n            previous.next = current.next;\n            this.numberOfValues--;\n        } else {\n            previous = current;\n        }\n        current = current.next;\n    }\n};\nSinglyLinkedList.prototype.insertAfter = function (data, toNodeData) {\n    let current = this.head;\n    while (current) {\n        if (current.data === toNodeData) {\n            let node = new Node(data);\n            if (current === this.tail) {\n                this.tail.next = node;\n                this.tail = node;\n            } else {\n                node.next = current.next;\n                current.next = node;\n            }\n            this.numberOfValues++;\n        }\n        current = current.next;\n    }\n};\nSinglyLinkedList.prototype.traverse = function (fn) {\n    let current = this.head;\n    while (current) {\n        if (fn) {\n            fn(current);\n        }\n        current = current.next;\n    }\n};\nSinglyLinkedList.prototype.length = function () {\n    return this.numberOfValues;\n};\nSinglyLinkedList.prototype.print = function () {\n    let string = '';\n    let current = this.head;\n    while (current) {\n        string += current.data + ' ';\n        current = current.next;\n    }\n    console.log(string.trim());\n};\n\nlet singlyLinkedList = new SinglyLinkedList();\nsinglyLinkedList.print(); // => ''\nsinglyLinkedList.add(1);\nsinglyLinkedList.add(2);\nsinglyLinkedList.add(3);\nsinglyLinkedList.add(4);\nsinglyLinkedList.print(); // => 1 2 3 4\nconsole.log('length is 4:', singlyLinkedList.length()); // => 4\nsinglyLinkedList.remove(3); // remove value\nsinglyLinkedList.print(); // => 1 2 4\nsinglyLinkedList.remove(9); // remove non existing value\nsinglyLinkedList.print(); // => 1 2 4\nsinglyLinkedList.remove(1); // remove head\nsinglyLinkedList.print(); // => 2 4\nsinglyLinkedList.remove(4); // remove tail\nsinglyLinkedList.print(); // => 2\nconsole.log('length is 1:', singlyLinkedList.length()); // => 1\nsinglyLinkedList.add(6);\nsinglyLinkedList.print(); // => 2 6\nsinglyLinkedList.insertAfter(3, 2);\nsinglyLinkedList.print(); // => 2 3 6\nsinglyLinkedList.insertAfter(4, 3);\nsinglyLinkedList.print(); // => 2 3 4 6\nsinglyLinkedList.insertAfter(5, 9); // insertAfter a non existing node\nsinglyLinkedList.print(); // => 2 3 4 6\nsinglyLinkedList.insertAfter(5, 4);\nsinglyLinkedList.insertAfter(7, 6); // insertAfter the tail\nsinglyLinkedList.print(); // => 2 3 4 5 6 7\nsinglyLinkedList.add(8); // add node with normal method\nsinglyLinkedList.print(); // => 2 3 4 5 6 7 8\nconsole.log('length is 7:', singlyLinkedList.length()); // => 7\nsinglyLinkedList.traverse(function (node) {\n    node.data = node.data + 10;\n});\nsinglyLinkedList.print(); // => 12 13 14 15 16 17 18\nsinglyLinkedList.traverse(function (node) {\n    console.log(node.data);\n}); // => 12 13 14 15 16 17 18\nconsole.log('length is 7:', singlyLinkedList.length()); // => 7\n</code></pre>\n<h2>The Doubly Linked List</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*TQXiR-L_itiG3WP-.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Doubly Linked List is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. From Wikipedia</em></p>\n</blockquote>\n<p>Having two node links allow traversal in either direction but adding or removing a node in a doubly linked list requires changing more links than the same operations on a Singly Linked List.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>class Node {\n    constructor(data) {\n        this.data = data;\n        this.previous = null;\n        this.next = null;\n    }\n}\nclass DoublyLinkedList {\n    constructor() {\n        this.head = null;\n        this.tail = null;\n        this.numberOfValues = 0;\n    }\n\n    add(data) {\n        let node = new Node(data);\n        if (!this.head) {\n            this.head = node;\n            this.tail = node;\n        } else {\n            node.previous = this.tail;\n            this.tail.next = node;\n            this.tail = node;\n        }\n        this.numberOfValues++;\n    }\n    remove(data) {\n        let current = this.head;\n        while (current) {\n            if (current.data === data) {\n                if (current === this.head &#x26;&#x26; current === this.tail) {\n                    this.head = null;\n                    this.tail = null;\n                } else if (current === this.head) {\n                    this.head = this.head.next;\n                    this.head.previous = null;\n                } else if (current === this.tail) {\n                    this.tail = this.tail.previous;\n                    this.tail.next = null;\n                } else {\n                    current.previous.next = current.next;\n                    current.next.previous = current.previous;\n                }\n                this.numberOfValues--;\n            }\n            current = current.next;\n        }\n    }\n    insertAfter(data, toNodeData) {\n        let current = this.head;\n        while (current) {\n            if (current.data === toNodeData) {\n                let node = new Node(data);\n                if (current === this.tail) {\n                    this.add(data);\n                } else {\n                    current.next.previous = node;\n                    node.previous = current;\n                    node.next = current.next;\n                    current.next = node;\n                    this.numberOfValues++;\n                }\n            }\n            current = current.next;\n        }\n    }\n    traverse(fn) {\n        let current = this.head;\n        while (current) {\n            if (fn) {\n                fn(current);\n            }\n            current = current.next;\n        }\n    }\n    traverseReverse(fn) {\n        let current = this.tail;\n        while (current) {\n            if (fn) {\n                fn(current);\n            }\n            current = current.previous;\n        }\n    }\n    length() {\n        return this.numberOfValues;\n    }\n    print() {\n        let string = \"\";\n        let current = this.head;\n        while (current) {\n            string += current.data + \" \";\n            current = current.next;\n        }\n        console.log(string.trim());\n    }\n}\n\nlet doublyLinkedList = new DoublyLinkedList();\ndoublyLinkedList.print(); // => ''\ndoublyLinkedList.add(1);\ndoublyLinkedList.add(2);\ndoublyLinkedList.add(3);\ndoublyLinkedList.add(4);\ndoublyLinkedList.print(); // => 1 2 3 4\nconsole.log(\"length is 4:\", doublyLinkedList.length()); // => 4\ndoublyLinkedList.remove(3); // remove value\ndoublyLinkedList.print(); // => 1 2 4\ndoublyLinkedList.remove(9); // remove non existing value\ndoublyLinkedList.print(); // => 1 2 4\ndoublyLinkedList.remove(1); // remove head\ndoublyLinkedList.print(); // => 2 4\ndoublyLinkedList.remove(4); // remove tail\ndoublyLinkedList.print(); // => 2\nconsole.log(\"length is 1:\", doublyLinkedList.length()); // => 1\ndoublyLinkedList.remove(2); // remove tail, the list should be empty\ndoublyLinkedList.print(); // => ''\nconsole.log(\"length is 0:\", doublyLinkedList.length()); // => 0\ndoublyLinkedList.add(2);\ndoublyLinkedList.add(6);\ndoublyLinkedList.print(); // => 2 6\ndoublyLinkedList.insertAfter(3, 2);\ndoublyLinkedList.print(); // => 2 3 6\ndoublyLinkedList.traverseReverse(function (node) {\n    console.log(node.data);\n});\ndoublyLinkedList.insertAfter(4, 3);\ndoublyLinkedList.print(); // => 2 3 4 6\ndoublyLinkedList.insertAfter(5, 9); // insertAfter a non existing node\ndoublyLinkedList.print(); // => 2 3 4 6\ndoublyLinkedList.insertAfter(5, 4);\ndoublyLinkedList.insertAfter(7, 6); // insertAfter the tail\ndoublyLinkedList.print(); // => 2 3 4 5 6 7\ndoublyLinkedList.add(8); // add node with normal method\ndoublyLinkedList.print(); // => 2 3 4 5 6 7 8\nconsole.log(\"length is 7:\", doublyLinkedList.length()); // => 7\ndoublyLinkedList.traverse(function (node) {\n    node.data = node.data + 10;\n});\ndoublyLinkedList.print(); // => 12 13 14 15 16 17 18\ndoublyLinkedList.traverse(function (node) {\n    console.log(node.data);\n}); // => 12 13 14 15 16 17 18\nconsole.log(\"length is 7:\", doublyLinkedList.length()); // => 7\ndoublyLinkedList.traverseReverse(function (node) {\n    console.log(node.data);\n}); // => 18 17 16 15 14 13 12\ndoublyLinkedList.print(); // => 12 13 14 15 16 17 18\nconsole.log(\"length is 7:\", doublyLinkedList.length()); // => 7\n/*\n   ~ js-files : (master) node double-linked-list.js\n\n1 2 3 4\nlength is 4: 4\n1 2 4\n1 2 4\n2 4\n2\nlength is 1: 1\n\nlength is 0: 0\n2 6\n2 3 6\n6\n3\n2\n2 3 4 6\n2 3 4 6\n2 3 4 5 6 7\n2 3 4 5 6 7 8\nlength is 7: 7\n12 13 14 15 16 17 18\n12\n13\n14\n15\n16\n17\n18\nlength is 7: 7\n18\n17\n16\n15\n14\n13\n12\n12 13 14 15 16 17 18\nlength is 7: 7\n ~ js-files : (master)\n*/\n</code></pre>\n<h2>The Stack</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/4050/0*qsjYW-Lvfo22ecLE.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. The order in which elements come off a Stack gives rise to its alternative name, LIFO (for last in, first out). From Wikipedia</em></p>\n</blockquote>\n<p>A Stack often has a third method peek which allows to check the last pushed element without popping it.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>function Stack() {\n  this.stack = [];\n}\n\nStack.prototype.push = function(value) {\n  this.stack.push(value);\n};\nStack.prototype.pop = function() {\n  return this.stack.pop();\n};\nStack.prototype.peek = function() {\n  return this.stack[this.stack.length - 1];\n};\nStack.prototype.length = function() {\n  return this.stack.length;\n};\nStack.prototype.print = function() {\n  console.log(this.stack.join(' '));\n};\n\nlet stack = new Stack();\nstack.push(1);\nstack.push(2);\nstack.push(3);\nstack.print(); // => 1 2 3\nconsole.log('length is 3:', stack.length()); // => 3\nconsole.log('peek is 3:', stack.peek()); // => 3\nconsole.log('pop is 3:', stack.pop()); // => 3\nstack.print(); // => 1 2\nconsole.log('pop is 2:', stack.pop());  // => 2\nconsole.log('length is 1:', stack.length()); // => 1\nconsole.log('pop is 1:', stack.pop()); // => 1\nstack.print(); // => ''\nconsole.log('peek is undefined:', stack.peek()); // => undefined\nconsole.log('pop is undefined:', stack.pop()); // => undefined\n</code></pre>\n<h2>The Queue</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/4050/0*YvfuX5tKP7-V0p7v.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal operations are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. This makes the Queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the Queue will be the first one to be removed.</em></p>\n</blockquote>\n<p>As for the Stack data structure, a peek operation is often added to the Queue data structure. It returns the value of the front element without dequeuing it.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(n)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>function Queue() {\n  this.queue = [];\n}\n\nQueue.prototype.enqueue = function(value) {\n  this.queue.push(value);\n};\nQueue.prototype.dequeue = function() {\n  return this.queue.shift();\n};\nQueue.prototype.peek = function() {\n  return this.queue[0];\n};\nQueue.prototype.length = function() {\n  return this.queue.length;\n};\nQueue.prototype.print = function() {\n  console.log(this.queue.join(' '));\n};\n\nlet queue = new Queue();\nqueue.enqueue(1);\nqueue.enqueue(2);\nqueue.enqueue(3);\nqueue.print(); // => 1 2 3\nconsole.log('length is 3:', queue.length()); // => 3\nconsole.log('peek is 1:', queue.peek()); // => 3\nconsole.log('dequeue is 1:', queue.dequeue()); // => 1\nqueue.print(); // => 2 3\nconsole.log('dequeue is 2:', queue.dequeue());  // => 2\nconsole.log('length is 1:', queue.length()); // => 1\nconsole.log('dequeue is 3:', queue.dequeue()); // => 3\nqueue.print(); // => ''\nconsole.log('peek is undefined:', queue.peek()); // => undefined\nconsole.log('dequeue is undefined:', queue.dequeue()); // => undefined\n</code></pre>\n<h2>The Tree</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*yUiQ-NaPKeLQnN7n\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Tree is a widely used data structure that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node. A tree data structure can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the \"children\"), with the constraints that no reference is duplicated, and none points to the root node. From Wikipedia</em></p>\n</blockquote>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(n) O(n)\nTo get a full overview of the time and space complexity of the Tree data structure, have a look to this excellent Big O cheat sheet.</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/1*DCdQiB6XqBJCrFRz12BwqA.png\"></p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>function Node(data) {\n  this.data = data;\n  this.children = [];\n}\n\nfunction Tree() {\n  this.root = null;\n}\n\nTree.prototype.add = function(data, toNodeData) {\n  let node = new Node(data);\n  let parent = toNodeData ? this.findBFS(toNodeData) : null;\n  if(parent) {\n    parent.children.push(node);\n  } else {\n    if(!this.root) {\n      this.root = node;\n    } else {\n      return 'Root node is already assigned';\n    }\n  }\n};\nTree.prototype.remove = function(data) {\n  if(this.root.data === data) {\n    this.root = null;\n  }\n\n  let queue = [this.root];\n  while(queue.length) {\n    let node = queue.shift();\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      if(node.children[i].data === data) {\n        node.children.splice(i, 1);\n      } else {\n        queue.push(node.children[i]);\n      }\n    }\n  }\n};\nTree.prototype.contains = function(data) {\n  return this.findBFS(data) ? true : false;\n};\nTree.prototype.findBFS = function(data) {\n  let queue = [this.root];\n  while(queue.length) {\n    let node = queue.shift();\n    if(node.data === data) {\n      return node;\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n  return null;\n};\nTree.prototype._preOrder = function(node, fn) {\n  if(node) {\n    if(fn) {\n      fn(node);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      this._preOrder(node.children[i], fn);\n    }\n  }\n};\nTree.prototype._postOrder = function(node, fn) {\n  if(node) {\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      this._postOrder(node.children[i], fn);\n    }\n    if(fn) {\n      fn(node);\n    }\n  }\n};\nTree.prototype.traverseDFS = function(fn, method) {\n  let current = this.root;\n  if(method) {\n    this['_' + method](current, fn);\n  } else {\n    this._preOrder(current, fn);\n  }\n};\nTree.prototype.traverseBFS = function(fn) {\n  let queue = [this.root];\n  while(queue.length) {\n    let node = queue.shift();\n    if(fn) {\n      fn(node);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n};\nTree.prototype.print = function() {\n  if(!this.root) {\n    return console.log('No root node found');\n  }\n  let newline = new Node('|');\n  let queue = [this.root, newline];\n  let string = '';\n  while(queue.length) {\n    let node = queue.shift();\n    string += node.data.toString() + ' ';\n    if(node === newline &#x26;&#x26; queue.length) {\n      queue.push(newline);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n  console.log(string.slice(0, -2).trim());\n};\nTree.prototype.printByLevel = function() {\n  if(!this.root) {\n    return console.log('No root node found');\n  }\n  let newline = new Node('\\n');\n  let queue = [this.root, newline];\n  let string = '';\n  while(queue.length) {\n    let node = queue.shift();\n    string += node.data.toString() + (node.data !== '\\n' ? ' ' : '');\n    if(node === newline &#x26;&#x26; queue.length) {\n      queue.push(newline);\n    }\n    for(let i = 0; i &#x3C; node.children.length; i++) {\n      queue.push(node.children[i]);\n    }\n  }\n  console.log(string.trim());\n};\n\nlet tree = new Tree();\ntree.add('ceo');\ntree.add('cto', 'ceo');\ntree.add('dev1', 'cto');\ntree.add('dev2', 'cto');\ntree.add('dev3', 'cto');\ntree.add('cfo', 'ceo');\ntree.add('accountant', 'cfo');\ntree.add('cmo', 'ceo');\ntree.print(); // => ceo | cto cfo cmo | dev1 dev2 dev3 accountant\ntree.printByLevel();  // => ceo \\n cto cfo cmo \\n dev1 dev2 dev3 accountant\nconsole.log('tree contains dev1 is true:', tree.contains('dev1')); // => true\nconsole.log('tree contains dev4 is false:', tree.contains('dev4')); // => false\nconsole.log('--- BFS');\ntree.traverseBFS(function(node) { console.log(node.data); }); // => ceo cto cfo cmo dev1 dev2 dev3 accountant\nconsole.log('--- DFS preOrder');\ntree.traverseDFS(function(node) { console.log(node.data); }, 'preOrder'); // => ceo cto dev1 dev2 dev3 cfo accountant cmo\nconsole.log('--- DFS postOrder');\ntree.traverseDFS(function(node) { console.log(node.data); }, 'postOrder'); // => dev1 dev2 dev3 cto accountant cfo cmo ceo\ntree.remove('cmo');\ntree.print(); // => ceo | cto cfo | dev1 dev2 dev3 accountant\ntree.remove('cfo');\ntree.print(); // => ceo | cto | dev1 dev2 dev3\n</code></pre>\n<h2>The Graph</h2>\n<p><img src=\"https://cdn-images-1.medium.com/max/2000/0*q31mL1kjFWlIzw3l.gif\"></p>\n<h2><em>Definition</em></h2>\n<blockquote>\n<p><em>A Graph data structure consists of a finite (and possibly mutable) set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected Graph or a set of ordered pairs for a directed Graph. These pairs are known as edges, arcs, or lines for an undirected Graph and as arrows, directed edges, directed arcs, or directed lines for a directed Graph. The vertices may be part of the Graph structure, or may be external entities represented by integer indices or references. From Wikipedia</em></p>\n</blockquote>\n<p>A Graph data structure may also associate to each edge some edge value, such as a symbolic label or a numeric attribute (cost, capacity, length, etc.).</p>\n<p>Representation\nThere are different ways of representing a graph, each of them with its own advantages and disadvantages. Here are the main 2:</p>\n<p>Adjacency list: For every vertex a list of adjacent vertices is stored. This can be viewed as storing the list of edges. This data structure allows the storage of additional data on the vertices and edges.\nAdjacency matrix: Data are stored in a two-dimensional matrix, in which the rows represent source vertices and columns represent destination vertices. The data on the edges and vertices must be stored externally.\nComplexity\nAdjacency list\nStorage Add Vertex Add Edge Query\nO( V + E\nAdjacency matrix\nStorage Add Vertex Add Edge Query\nO( V ^2) O(</p>\n<p>Graph</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<pre><code>//below uses the adjacency list representation.\n</code></pre>\n<pre><code class=\"language-js\">        function Graph() {\n          this.vertices = [];\n          this.edges = [];\n          this.numberOfEdges = 0;\n        }\n\n        Graph.prototype.addVertex = function(vertex) {\n          this.vertices.push(vertex);\n          this.edges[vertex] = [];\n        };\n        Graph.prototype.removeVertex = function(vertex) {\n          let index = this.vertices.indexOf(vertex);\n          if(~index) {\n            this.vertices.splice(index, 1);\n          }\n          while(this.edges[vertex].length) {\n            let adjacentVertex = this.edges[vertex].pop();\n            this.removeEdge(adjacentVertex, vertex);\n          }\n        };\n        Graph.prototype.addEdge = function(vertex1, vertex2) {\n          this.edges[vertex1].push(vertex2);\n          this.edges[vertex2].push(vertex1);\n          this.numberOfEdges++;\n        };\n        Graph.prototype.removeEdge = function(vertex1, vertex2) {\n          let index1 = this.edges[vertex1] ? this.edges[vertex1].indexOf(vertex2) : -1;\n          let index2 = this.edges[vertex2] ? this.edges[vertex2].indexOf(vertex1) : -1;\n          if(~index1) {\n            this.edges[vertex1].splice(index1, 1);\n            this.numberOfEdges--;\n          }\n          if(~index2) {\n            this.edges[vertex2].splice(index2, 1);\n          }\n        };\n        Graph.prototype.size = function() {\n          return this.vertices.length;\n        };\n        Graph.prototype.relations = function() {\n          return this.numberOfEdges;\n        };\n        Graph.prototype.traverseDFS = function(vertex, fn) {\n          if(!~this.vertices.indexOf(vertex)) {\n            return console.log('Vertex not found');\n          }\n          let visited = [];\n          this._traverseDFS(vertex, visited, fn);\n        };\n        Graph.prototype._traverseDFS = function(vertex, visited, fn) {\n          visited[vertex] = true;\n          if(this.edges[vertex] !== undefined) {\n            fn(vertex);\n          }\n          for(let i = 0; i &#x3C; this.edges[vertex].length; i++) {\n            if(!visited[this.edges[vertex][i]]) {\n              this._traverseDFS(this.edges[vertex][i], visited, fn);\n            }\n          }\n        };\n        Graph.prototype.traverseBFS = function(vertex, fn) {\n          if(!~this.vertices.indexOf(vertex)) {\n            return console.log('Vertex not found');\n          }\n          let queue = [];\n          queue.push(vertex);\n          let visited = [];\n          visited[vertex] = true;\n\n          while(queue.length) {\n            vertex = queue.shift();\n            fn(vertex);\n            for(let i = 0; i &#x3C; this.edges[vertex].length; i++) {\n              if(!visited[this.edges[vertex][i]]) {\n                visited[this.edges[vertex][i]] = true;\n                queue.push(this.edges[vertex][i]);\n              }\n            }\n          }\n        };\n        Graph.prototype.pathFromTo = function(vertexSource, vertexDestination) {\n          if(!~this.vertices.indexOf(vertexSource)) {\n            return console.log('Vertex not found');\n          }\n          let queue = [];\n          queue.push(vertexSource);\n          let visited = [];\n          visited[vertexSource] = true;\n          let paths = [];\n\n          while(queue.length) {\n            let vertex = queue.shift();\n            for(let i = 0; i &#x3C; this.edges[vertex].length; i++) {\n              if(!visited[this.edges[vertex][i]]) {\n                visited[this.edges[vertex][i]] = true;\n                queue.push(this.edges[vertex][i]);\n                // save paths between vertices\n                paths[this.edges[vertex][i]] = vertex;\n              }\n            }\n          }\n          if(!visited[vertexDestination]) {\n            return undefined;\n          }\n\n          let path = [];\n          for(let j = vertexDestination; j != vertexSource; j = paths[j]) {\n            path.push(j);\n          }\n          path.push(j);\n          return path.reverse().join('-');\n        };\n        Graph.prototype.print = function() {\n          console.log(this.vertices.map(function(vertex) {\n            return (vertex + ' -> ' + this.edges[vertex].join(', ')).trim();\n          }, this).join(' | '));\n        };\n        ```\n        let graph = new Graph();\n        graph.addVertex(1);\n        graph.addVertex(2);\n        graph.addVertex(3);\n        graph.addVertex(4);\n        graph.addVertex(5);\n        graph.addVertex(6);\n        graph.print(); // 1 -> | 2 -> | 3 -> | 4 -> | 5 -> | 6 ->\n        graph.addEdge(1, 2);\n        graph.addEdge(1, 5);\n        graph.addEdge(2, 3);\n        graph.addEdge(2, 5);\n        graph.addEdge(3, 4);\n        graph.addEdge(4, 5);\n        graph.addEdge(4, 6);\n        graph.print(); // 1 -> 2, 5 | 2 -> 1, 3, 5 | 3 -> 2, 4 | 4 -> 3, 5, 6 | 5 -> 1, 2, 4 | 6 -> 4\n        console.log('graph size (number of vertices):', graph.size()); // => 6\n        console.log('graph relations (number of edges):', graph.relations()); // => 7\n        graph.traverseDFS(1, function(vertex) { console.log(vertex); }); // => 1 2 3 4 5 6\n        console.log('---');\n        graph.traverseBFS(1, function(vertex) { console.log(vertex); }); // => 1 2 5 3 4 6\n        graph.traverseDFS(0, function(vertex) { console.log(vertex); }); // => 'Vertex not found'\n        graph.traverseBFS(0, function(vertex) { console.log(vertex); }); // => 'Vertex not found'\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-5-1\n        console.log('path from 3 to 5:', graph.pathFromTo(3, 5)); // => 3-2-5\n        graph.removeEdge(1, 2);\n        graph.removeEdge(4, 5);\n        graph.removeEdge(10, 11);\n        console.log('graph relations (number of edges):', graph.relations()); // => 5\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-3-2-5-1\n        graph.addEdge(1, 2);\n        graph.addEdge(4, 5);\n        console.log('graph relations (number of edges):', graph.relations()); // => 7\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-5-1\n        graph.removeVertex(5);\n        console.log('graph size (number of vertices):', graph.size()); // => 5\n        console.log('graph relations (number of edges):', graph.relations()); // => 4\n        console.log('path from 6 to 1:', graph.pathFromTo(6, 1)); // => 6-4-3-2-1\n</code></pre>\n</details>"},{"url":"/docs/docs/art-of-command-line/","relativePath":"docs/docs/art-of-command-line.md","relativeDir":"docs/docs","base":"art-of-command-line.md","name":"art-of-command-line","frontmatter":{"title":"Command Line Basics","weight":0,"excerpt":"Learn basic Bash. Actually, type man bash and at least skim the whole thing; it's pretty easy to follow and not that long. Alternate shells can be nice, but Bash is powerful and always available (learning *only* zsh, fish, etc., while tempting on your own laptop, restricts you in many situations, such as using existing servers).","seo":{"title":"Command Line Basics","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Meta</h2>\n<p>Scope:</p>\n<ul>\n<li>This guide is for both beginners and experienced users. The goals are <em>breadth</em> (everything important), <em>specificity</em> (give concrete examples of the most common case), and <em>brevity</em> (avoid things that aren't essential or digressions you can easily look up elsewhere). Every tip is essential in some situation or significantly saves time over alternatives.</li>\n<li>This is written for Linux, with the exception of the \"<a href=\"#macos-only\">macOS only</a>\" and \"<a href=\"#windows-only\">Windows only</a>\" sections. Many of the other items apply or can be installed on other Unices or macOS (or even Cygwin).</li>\n<li>The focus is on interactive Bash, though many tips apply to other shells and to general Bash scripting.</li>\n<li>It includes both \"standard\" Unix commands as well as ones that require special package installs -- so long as they are important enough to merit inclusion.</li>\n</ul>\n<p>Notes:</p>\n<ul>\n<li>To keep this to one page, content is implicitly included by reference. You're smart enough to look up more detail elsewhere once you know the idea or command to Google. Use <code>apt</code>, <code>yum</code>, <code>dnf</code>, <code>pacman</code>, <code>pip</code> or <code>brew</code> (as appropriate) to install new programs.</li>\n<li>Use <a href=\"http://explainshell.com/\">Explainshell</a> to get a helpful breakdown of what commands, options, pipes etc. do.</li>\n</ul>\n<h2>Basics</h2>\n<ul>\n<li>Learn basic Bash. Actually, type <code>man bash</code> and at least skim the whole thing; it's pretty easy to follow and not that long. Alternate shells can be nice, but Bash is powerful and always available (learning <em>only</em> zsh, fish, etc., while tempting on your own laptop, restricts you in many situations, such as using existing servers).</li>\n<li>Learn at least one text-based editor well. The <code>nano</code> editor is one of the simplest for basic editing (opening, editing, saving, searching). However, for the power user in a text terminal, there is no substitute for Vim (<code>vi</code>), the hard-to-learn but venerable, fast, and full-featured editor. Many people also use the classic Emacs, particularly for larger editing tasks. (Of course, any modern software developer working on an extensive project is unlikely to use only a pure text-based editor and should also be familiar with modern graphical IDEs and tools.)</li>\n<li>\n<p>Finding documentation:</p>\n<ul>\n<li>Know how to read official documentation with <code>man</code> (for the inquisitive, <code>man man</code> lists the section numbers, e.g. 1 is \"regular\" commands, 5 is files/conventions, and 8 are for administration). Find man pages with <code>apropos</code>.</li>\n<li>Know that some commands are not executables, but Bash builtins, and that you can get help on them with <code>help</code> and <code>help -d</code>. You can find out whether a command is an executable, shell builtin or an alias by using <code>type command</code>.</li>\n<li><code>curl cheat.sh/command</code> will give a brief \"cheat sheet\" with common examples of how to use a shell command.</li>\n</ul>\n</li>\n<li>Learn about redirection of output and input using <code>></code> and <code>&#x3C;</code> and pipes using <code>|</code>. Know <code>></code> overwrites the output file and <code>>></code> appends. Learn about stdout and stderr.</li>\n<li>Learn about file glob expansion with <code>*</code> (and perhaps <code>?</code> and <code>[</code>...<code>]</code>) and quoting and the difference between double <code>\"</code> and single <code>'</code> quotes. (See more on variable expansion below.)</li>\n<li>Be familiar with Bash job management: <code>&#x26;</code>, <strong>ctrl-z</strong>, <strong>ctrl-c</strong>, <code>jobs</code>, <code>fg</code>, <code>bg</code>, <code>kill</code>, etc.</li>\n<li>Know <code>ssh</code>, and the basics of passwordless authentication, via <code>ssh-agent</code>, <code>ssh-add</code>, etc.</li>\n<li>Basic file management: <code>ls</code> and <code>ls -l</code> (in particular, learn what every column in <code>ls -l</code> means), <code>less</code>, <code>head</code>, <code>tail</code> and <code>tail -f</code> (or even better, <code>less +F</code>), <code>ln</code> and <code>ln -s</code> (learn the differences and advantages of hard versus soft links), <code>chown</code>, <code>chmod</code>, <code>du</code> (for a quick summary of disk usage: <code>du -hs *</code>). For filesystem management, <code>df</code>, <code>mount</code>, <code>fdisk</code>, <code>mkfs</code>, <code>lsblk</code>. Learn what an inode is (<code>ls -i</code> or <code>df -i</code>).</li>\n<li>Basic network management: <code>ip</code> or <code>ifconfig</code>, <code>dig</code>, <code>traceroute</code>, <code>route</code>.</li>\n<li>Learn and use a version control management system, such as <code>git</code>.</li>\n<li>Know regular expressions well, and the various flags to <code>grep</code>/<code>egrep</code>. The <code>-i</code>, <code>-o</code>, <code>-v</code>, <code>-A</code>, <code>-B</code>, and <code>-C</code> options are worth knowing.</li>\n<li>Learn to use <code>apt-get</code>, <code>yum</code>, <code>dnf</code> or <code>pacman</code> (depending on distro) to find and install packages. And make sure you have <code>pip</code> to install Python-based command-line tools (a few below are easiest to install via <code>pip</code>).</li>\n</ul>\n<h2>Everyday use</h2>\n<ul>\n<li>In Bash, use <strong>Tab</strong> to complete arguments or list all available commands and <strong>ctrl-r</strong> to search through command history (after pressing, type to search, press <strong>ctrl-r</strong> repeatedly to cycle through more matches, press <strong>Enter</strong> to execute the found command, or hit the right arrow to put the result in the current line to allow editing).</li>\n<li>In Bash, use <strong>ctrl-w</strong> to delete the last word, and <strong>ctrl-u</strong> to delete the content from current cursor back to the start of the line. Use <strong>alt-b</strong> and <strong>alt-f</strong> to move by word, <strong>ctrl-a</strong> to move cursor to beginning of line,  <strong>ctrl-e</strong> to move cursor to end of line, <strong>ctrl-k</strong> to kill to the end of the line, <strong>ctrl-l</strong> to clear the screen. See <code>man readline</code> for all the default keybindings in Bash. There are a lot. For example <strong>alt-.</strong> cycles through previous arguments, and <strong>alt-*</strong> expands a glob.</li>\n<li>Alternatively, if you love vi-style key-bindings, use <code>set -o vi</code> (and <code>set -o emacs</code> to put it back).</li>\n<li>For editing long commands, after setting your editor (for example <code>export EDITOR=vim</code>), <strong>ctrl-x</strong> <strong>ctrl-e</strong> will open the current command in an editor for multi-line editing. Or in vi style, <strong>escape-v</strong>.</li>\n<li>To see recent commands, use <code>history</code>. Follow with <code>!n</code> (where <code>n</code> is the command number) to execute again. There are also many abbreviations you can use, the most useful probably being <code>!$</code> for last argument and <code>!!</code> for last command (see \"HISTORY EXPANSION\" in the man page). However, these are often easily replaced with <strong>ctrl-r</strong> and <strong>alt-.</strong>.</li>\n<li>Go to your home directory with <code>cd</code>. Access files relative to your home directory with the <code>~</code> prefix (e.g. <code>~/.bashrc</code>). In <code>sh</code> scripts refer to the home directory as <code>$HOME</code>.</li>\n<li>To go back to the previous working directory: <code>cd -</code>.</li>\n<li>If you are halfway through typing a command but change your mind, hit <strong>alt-#</strong> to add a <code>#</code> at the beginning and enter it as a comment (or use <strong>ctrl-a</strong>, <strong>#</strong>, <strong>enter</strong>). You can then return to it later via command history.</li>\n<li>\n<p>Use <code>xargs</code> (or <code>parallel</code>). It's very powerful. Note you can control how many items execute per line (<code>-L</code>) as well as parallelism (<code>-P</code>). If you're not sure if it'll do the right thing, use <code>xargs echo</code> first. Also, <code>-I{}</code> is handy. Examples:</p>\n<pre><code class=\"language-bash\">  find . -name '*.py' | xargs grep some_function\n  cat hosts | xargs -I{} ssh root@{} hostname\n</code></pre>\n</li>\n<li><code>pstree -p</code> is a helpful display of the process tree.</li>\n<li>Use <code>pgrep</code> and <code>pkill</code> to find or signal processes by name (<code>-f</code> is helpful).</li>\n<li>Know the various signals you can send processes. For example, to suspend a process, use <code>kill -STOP [pid]</code>. For the full list, see <code>man 7 signal</code></li>\n<li>Use <code>nohup</code> or <code>disown</code> if you want a background process to keep running forever.</li>\n<li>Check what processes are listening via <code>netstat -lntp</code> or <code>ss -plat</code> (for TCP; add <code>-u</code> for UDP) or <code>lsof -iTCP -sTCP:LISTEN -P -n</code> (which also works on macOS).</li>\n<li>See also <code>lsof</code> and <code>fuser</code> for open sockets and files.</li>\n<li>See <code>uptime</code> or <code>w</code> to know how long the system has been running.</li>\n<li>Use <code>alias</code> to create shortcuts for commonly used commands. For example, <code>alias ll='ls -latr'</code> creates a new alias <code>ll</code>.</li>\n<li>Save aliases, shell settings, and functions you commonly use in <code>~/.bashrc</code>, and <a href=\"http://superuser.com/a/183980/7106\">arrange for login shells to source it</a>. This will make your setup available in all your shell sessions.</li>\n<li>Put the settings of environment variables as well as commands that should be executed when you login in <code>~/.bash_profile</code>. Separate configuration will be needed for shells you launch from graphical environment logins and <code>cron</code> jobs.</li>\n<li>Synchronize your configuration files (e.g. <code>.bashrc</code> and <code>.bash_profile</code>) among various computers with Git.</li>\n<li>Understand that care is needed when variables and filenames include whitespace. Surround your Bash variables with quotes, e.g. <code>\"$FOO\"</code>. Prefer the <code>-0</code> or <code>-print0</code> options to enable null characters to delimit filenames, e.g. <code>locate -0 pattern | xargs -0 ls -al</code> or <code>find / -print0 -type d | xargs -0 ls -al</code>. To iterate on filenames containing whitespace in a for loop, set your IFS to be a newline only using <code>IFS=$'\\n'</code>.</li>\n<li>\n<p>In Bash scripts, use <code>set -x</code> (or the variant <code>set -v</code>, which logs raw input, including unexpanded variables and comments) for debugging output. Use strict modes unless you have a good reason not to: Use <code>set -e</code> to abort on errors (nonzero exit code). Use <code>set -u</code> to detect unset variable usages. Consider <code>set -o pipefail</code> too, to abort on errors within pipes (though read up on it more if you do, as this topic is a bit subtle). For more involved scripts, also use <code>trap</code> on EXIT or ERR. A useful habit is to start a script like this, which will make it detect and abort on common errors and print a message:</p>\n<pre><code class=\"language-bash\">  set -euo pipefail\n  trap \"echo 'error: Script failed: see failed command above'\" ERR\n</code></pre>\n</li>\n<li>\n<p>In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory, e.g.</p>\n<pre><code class=\"language-bash\">  # do something in current dir\n  (cd /some/other/dir &#x26;&#x26; other-command)\n  # continue in original dir\n</code></pre>\n</li>\n<li>In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: <code>${name:?error message}</code>. For example, if a Bash script requires a single argument, just write <code>input_file=${1:?usage: $0 input_file}</code>. Using a default value if a variable is empty: <code>${name:-default}</code>. If you want to have an additional (optional) parameter added to the previous example, you can use something like <code>output_file=${2:-logfile}</code>. If <code>$2</code> is omitted and thus empty, <code>output_file</code> will be set to <code>logfile</code>. Arithmetic expansion: <code>i=$(( (i + 1) % 5 ))</code>. Sequences: <code>{1..10}</code>. Trimming of strings: <code>${var%suffix}</code> and <code>${var#prefix}</code>. For example if <code>var=foo.pdf</code>, then <code>echo ${var%.pdf}.txt</code> prints <code>foo.txt</code>.</li>\n<li>Brace expansion using <code>{</code>...<code>}</code> can reduce having to re-type similar text and automate combinations of items.  This is helpful in examples like <code>mv foo.{txt,pdf} some-dir</code> (which moves both files), <code>cp somefile{,.bak}</code> (which expands to <code>cp somefile somefile.bak</code>) or <code>mkdir -p test-{a,b,c}/subtest-{1,2,3}</code> (which expands all possible combinations and creates a directory tree). Brace expansion is performed before any other expansion.</li>\n<li>The order of expansions is: brace expansion; tilde expansion, parameter and variable expansion, arithmetic expansion, and command substitution (done in a left-to-right fashion); word splitting; and filename expansion. (For example, a range like <code>{1..20}</code> cannot be expressed with variables using <code>{$a..$b}</code>. Use <code>seq</code> or a <code>for</code> loop instead, e.g., <code>seq $a $b</code> or <code>for((i=a; i&#x3C;=b; i++)); do ... ; done</code>.)</li>\n<li>\n<p>The output of a command can be treated like a file via <code>&#x3C;(some command)</code> (known as process substitution). For example, compare local <code>/etc/hosts</code> with a remote one:</p>\n<pre><code class=\"language-sh\">  diff /etc/hosts &#x3C;(ssh somehost cat /etc/hosts)\n</code></pre>\n</li>\n<li>\n<p>When writing scripts you may want to put all of your code in curly braces. If the closing brace is missing, your script will be prevented from executing due to a syntax error. This makes sense when your script is going to be downloaded from the web, since it prevents partially downloaded scripts from executing:</p>\n<pre><code class=\"language-bash\">{\n  # Your code here\n}\n</code></pre>\n</li>\n<li>\n<p>A \"here document\" allows <a href=\"https://www.tldp.org/LDP/abs/html/here-docs.html\">redirection of multiple lines of input</a> as if from a file:</p>\n<pre><code>cat &#x3C;&#x3C;EOF\ninput\non multiple lines\nEOF\n</code></pre>\n</li>\n<li>In Bash, redirect both standard output and standard error via: <code>some-command >logfile 2>&#x26;1</code> or <code>some-command &#x26;>logfile</code>. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add <code>&#x3C;/dev/null</code>.</li>\n<li>Use <code>man ascii</code> for a good ASCII table, with hex and decimal values. For general encoding info, <code>man unicode</code>, <code>man utf-8</code>, and <code>man latin1</code> are helpful.</li>\n<li>Use <code>screen</code> or <a href=\"https://tmux.github.io/\"><code>tmux</code></a> to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. <code>byobu</code> can enhance screen or tmux by providing more information and easier management. A more minimal alternative for session persistence only is <a href=\"https://github.com/bogner/dtach\"><code>dtach</code></a>.</li>\n<li>In ssh, knowing how to port tunnel with <code>-L</code> or <code>-D</code> (and occasionally <code>-R</code>) is useful, e.g. to access web sites from a remote server.</li>\n<li>\n<p>It can be useful to make a few optimizations to your ssh configuration; for example, this <code>~/.ssh/config</code> contains settings to avoid dropped connections in certain network environments, uses compression (which is helpful with scp over low-bandwidth connections), and multiplex channels to the same server with a local control file:</p>\n<pre><code>  TCPKeepAlive=yes\n  ServerAliveInterval=15\n  ServerAliveCountMax=6\n  Compression=yes\n  ControlMaster auto\n  ControlPath /tmp/%r@%h:%p\n  ControlPersist yes\n</code></pre>\n</li>\n<li>A few other options relevant to ssh are security sensitive and should be enabled with care, e.g. per subnet or host or in trusted networks: <code>StrictHostKeyChecking=no</code>, <code>ForwardAgent=yes</code></li>\n<li>Consider <a href=\"https://mosh.mit.edu/\"><code>mosh</code></a> an alternative to ssh that uses UDP, avoiding dropped connections and adding convenience on the road (requires server-side setup).</li>\n<li>\n<p>To get the permissions on a file in octal form, which is useful for system configuration but not available in <code>ls</code> and easy to bungle, use something like</p>\n<pre><code class=\"language-sh\">  stat -c '%A %a %n' /etc/timezone\n</code></pre>\n</li>\n<li>For interactive selection of values from the output of another command, use <a href=\"https://github.com/mooz/percol\"><code>percol</code></a> or <a href=\"https://github.com/junegunn/fzf\"><code>fzf</code></a>.</li>\n<li>For interaction with files based on the output of another command (like <code>git</code>), use <code>fpp</code> (<a href=\"https://github.com/facebook/PathPicker\">PathPicker</a>).</li>\n<li>For a simple web server for all files in the current directory (and subdirs), available to anyone on your network, use:\n<code>python -m SimpleHTTPServer 7777</code> (for port 7777 and Python 2) and <code>python -m http.server 7777</code> (for port 7777 and Python 3).</li>\n<li>For running a command as another user, use <code>sudo</code>. Defaults to running as root; use <code>-u</code> to specify another user. Use <code>-i</code> to login as that user (you will be asked for <em>your</em> password).</li>\n<li>For switching the shell to another user, use <code>su username</code> or <code>su - username</code>. The latter with \"-\" gets an environment as if another user just logged in. Omitting the username defaults to root. You will be asked for the password <em>of the user you are switching to</em>.</li>\n<li>Know about the <a href=\"https://wiki.debian.org/CommonErrorMessages/ArgumentListTooLong\">128K limit</a> on command lines. This \"Argument list too long\" error is common when wildcard matching large numbers of files. (When this happens alternatives like <code>find</code> and <code>xargs</code> may help.)</li>\n<li>\n<p>For a basic calculator (and of course access to Python in general), use the <code>python</code> interpreter. For example,</p>\n<pre><code>>>> 2+3\n5\n</code></pre>\n</li>\n</ul>\n<h2>Processing files and data</h2>\n<ul>\n<li>To locate a file by name in the current directory, <code>find . -iname '*something*'</code> (or similar). To find a file anywhere by name, use <code>locate something</code> (but bear in mind <code>updatedb</code> may not have indexed recently created files).</li>\n<li>For general searching through source or data files, there are several options more advanced or faster than <code>grep -r</code>, including (in rough order from older to newer) <a href=\"https://github.com/beyondgrep/ack2\"><code>ack</code></a>, <a href=\"https://github.com/ggreer/the_silver_searcher\"><code>ag</code></a> (\"the silver searcher\"), and <a href=\"https://github.com/BurntSushi/ripgrep\"><code>rg</code></a> (ripgrep).</li>\n<li>To convert HTML to text: <code>lynx -dump -stdin</code></li>\n<li>For Markdown, HTML, and all kinds of document conversion, try <a href=\"http://pandoc.org/\"><code>pandoc</code></a>. For example, to convert a Markdown document to Word format: <code>pandoc README.md --from markdown --to docx -o temp.docx</code></li>\n<li>If you must handle XML, <code>xmlstarlet</code> is old but good.</li>\n<li>For JSON, use <a href=\"http://stedolan.github.io/jq/\"><code>jq</code></a>. For interactive use, also see <a href=\"https://github.com/simeji/jid\"><code>jid</code></a> and <a href=\"https://github.com/fiatjaf/jiq\"><code>jiq</code></a>.</li>\n<li>For YAML, use <a href=\"https://github.com/0k/shyaml\"><code>shyaml</code></a>.</li>\n<li>For Excel or CSV files, <a href=\"https://github.com/onyxfish/csvkit\">csvkit</a> provides <code>in2csv</code>, <code>csvcut</code>, <code>csvjoin</code>, <code>csvgrep</code>, etc.</li>\n<li>For Amazon S3, <a href=\"https://github.com/s3tools/s3cmd\"><code>s3cmd</code></a> is convenient and <a href=\"https://github.com/bloomreach/s4cmd\"><code>s4cmd</code></a> is faster. Amazon's <a href=\"https://github.com/aws/aws-cli\"><code>aws</code></a> and the improved <a href=\"https://github.com/donnemartin/saws\"><code>saws</code></a> are essential for other AWS-related tasks.</li>\n<li>Know about <code>sort</code> and <code>uniq</code>, including uniq's <code>-u</code> and <code>-d</code> options -- see one-liners below. See also <code>comm</code>.</li>\n<li>Know about <code>cut</code>, <code>paste</code>, and <code>join</code> to manipulate text files. Many people use <code>cut</code> but forget about <code>join</code>.</li>\n<li>Know about <code>wc</code> to count newlines (<code>-l</code>), characters (<code>-m</code>), words (<code>-w</code>) and bytes (<code>-c</code>).</li>\n<li>Know about <code>tee</code> to copy from stdin to a file and also to stdout, as in <code>ls -al | tee file.txt</code>.</li>\n<li>For more complex calculations, including grouping, reversing fields, and statistical calculations, consider <a href=\"https://www.gnu.org/software/datamash/\"><code>datamash</code></a>.</li>\n<li>Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set <code>LANG</code> or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run <em>many times</em> slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using <code>export LC_ALL=C</code>.</li>\n<li>You can set a specific command's environment by prefixing its invocation with the environment variable settings, as in <code>TZ=Pacific/Fiji date</code>.</li>\n<li>Know basic <code>awk</code> and <code>sed</code> for simple data munging. See <a href=\"#one-liners\">One-liners</a> for examples.</li>\n<li>\n<p>To replace all occurrences of a string in place, in one or more files:</p>\n<pre><code class=\"language-sh\">  perl -pi.bak -e 's/old-string/new-string/g' my-files-*.txt\n</code></pre>\n</li>\n<li>\n<p>To rename multiple files and/or search and replace within files, try <a href=\"https://github.com/jlevy/repren\"><code>repren</code></a>. (In some cases the <code>rename</code> command also allows multiple renames, but be careful as its functionality is not the same on all Linux distributions.)</p>\n<pre><code class=\"language-sh\">  # Full rename of filenames, directories, and contents foo -> bar:\n  repren --full --preserve-case --from foo --to bar .\n  # Recover backup files whatever.bak -> whatever:\n  repren --renames --from '(.*)\\.bak' --to '\\1' *.bak\n  # Same as above, using rename, if available:\n  rename 's/\\.bak$//' *.bak\n</code></pre>\n</li>\n<li>\n<p>As the man page says, <code>rsync</code> really is a fast and extraordinarily versatile file copying tool. It's known for synchronizing between machines but is equally useful locally. When security restrictions allow, using <code>rsync</code> instead of <code>scp</code> allows recovery of a transfer without restarting from scratch. It also is among the <a href=\"https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html\">fastest ways</a> to delete large numbers of files:</p>\n<pre><code class=\"language-sh\">mkdir empty &#x26;&#x26; rsync -r --delete empty/ some-dir &#x26;&#x26; rmdir some-dir\n</code></pre>\n</li>\n<li>For monitoring progress when processing files, use <a href=\"http://www.ivarch.com/programs/pv.shtml\"><code>pv</code></a>, <a href=\"https://github.com/dmerejkowsky/pycp\"><code>pycp</code></a>, <a href=\"https://github.com/dspinellis/pmonitor\"><code>pmonitor</code></a>, <a href=\"https://github.com/Xfennec/progress\"><code>progress</code></a>, <code>rsync --progress</code>, or, for block-level copying, <code>dd status=progress</code>.</li>\n<li>Use <code>shuf</code> to shuffle or select random lines from a file.</li>\n<li>Know <code>sort</code>'s options. For numbers, use <code>-n</code>, or <code>-h</code> for handling human-readable numbers (e.g. from <code>du -h</code>). Know how keys work (<code>-t</code> and <code>-k</code>). In particular, watch out that you need to write <code>-k1,1</code> to sort by only the first field; <code>-k1</code> means sort according to the whole line. Stable sort (<code>sort -s</code>) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use <code>sort -k1,1 | sort -s -k2,2</code>.</li>\n<li>If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press <strong>ctrl-v</strong> <strong>[Tab]</strong> or write <code>$'\\t'</code> (the latter is better as you can copy/paste it).</li>\n<li>The standard tools for patching source code are <code>diff</code> and <code>patch</code>. See also <code>diffstat</code> for summary statistics of a diff and <code>sdiff</code> for a side-by-side diff. Note <code>diff -r</code> works for entire directories. Use <code>diff -r tree1 tree2 | diffstat</code> for a summary of changes. Use <code>vimdiff</code> to compare and edit files.</li>\n<li>For binary files, use <code>hd</code>, <code>hexdump</code> or <code>xxd</code> for simple hex dumps and <code>bvi</code>, <code>hexedit</code> or <code>biew</code> for binary editing.</li>\n<li>Also for binary files, <code>strings</code> (plus <code>grep</code>, etc.) lets you find bits of text.</li>\n<li>For binary diffs (delta compression), use <code>xdelta3</code>.</li>\n<li>\n<p>To convert text encodings, try <code>iconv</code>. Or <code>uconv</code> for more advanced use; it supports some advanced Unicode things. For example:</p>\n<pre><code class=\"language-sh\">  # Displays hex codes or actual names of characters (useful for debugging):\n  uconv -f utf-8 -t utf-8 -x '::Any-Hex;' &#x3C; input.txt\n  uconv -f utf-8 -t utf-8 -x '::Any-Name;' &#x3C; input.txt\n  # Lowercase and removes all accents (by expanding and dropping them):\n  uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC;' &#x3C; input.txt > output.txt\n</code></pre>\n</li>\n<li>To split files into pieces, see <code>split</code> (to split by size) and <code>csplit</code> (to split by a pattern).</li>\n<li>Date and time: To get the current date and time in the helpful <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format, use <code>date -u +\"%Y-%m-%dT%H:%M:%SZ\"</code> (other options <a href=\"https://stackoverflow.com/questions/7216358/date-command-on-os-x-doesnt-have-iso-8601-i-option\">are</a> <a href=\"https://unix.stackexchange.com/questions/164826/date-command-iso-8601-option\">problematic</a>). To manipulate date and time expressions, use <code>dateadd</code>, <code>datediff</code>, <code>strptime</code> etc. from <a href=\"http://www.fresse.org/dateutils/\"><code>dateutils</code></a>.</li>\n<li>Use <code>zless</code>, <code>zmore</code>, <code>zcat</code>, and <code>zgrep</code> to operate on compressed files.</li>\n<li>File attributes are settable via <code>chattr</code> and offer a lower-level alternative to file permissions. For example, to protect against accidental file deletion the immutable flag:  <code>sudo chattr +i /critical/directory/or/file</code></li>\n<li>\n<p>Use <code>getfacl</code> and <code>setfacl</code> to save and restore file permissions. For example:</p>\n<pre><code class=\"language-sh\">getfacl -R /some/path > permissions.txt\nsetfacl --restore=permissions.txt\n</code></pre>\n</li>\n<li>To create empty files quickly, use <code>truncate</code> (creates <a href=\"https://en.wikipedia.org/wiki/Sparse_file\">sparse file</a>), <code>fallocate</code> (ext4, xfs, btrfs and ocfs2 filesystems), <code>xfs_mkfile</code> (almost any filesystems, comes in xfsprogs package), <code>mkfile</code> (for Unix-like systems like Solaris, Mac OS).</li>\n</ul>\n<h2>System debugging</h2>\n<ul>\n<li>For web debugging, <code>curl</code> and <code>curl -I</code> are handy, or their <code>wget</code> equivalents, or the more modern <a href=\"https://github.com/jkbrzt/httpie\"><code>httpie</code></a>.</li>\n<li>To know current cpu/disk status, the classic tools are <code>top</code> (or the better <code>htop</code>), <code>iostat</code>, and <code>iotop</code>. Use <code>iostat -mxz 15</code> for basic CPU and detailed per-partition disk stats and performance insight.</li>\n<li>For network connection details, use <code>netstat</code> and <code>ss</code>.</li>\n<li>For a quick overview of what's happening on a system, <code>dstat</code> is especially useful. For broadest overview with details, use <a href=\"https://github.com/nicolargo/glances\"><code>glances</code></a>.</li>\n<li>To know memory status, run and understand the output of <code>free</code> and <code>vmstat</code>. In particular, be aware the \"cached\" value is memory held by the Linux kernel as file cache, so effectively counts toward the \"free\" value.</li>\n<li>Java system debugging is a different kettle of fish, but a simple trick on Oracle's and some other JVMs is that you can run <code>kill -3 &#x3C;pid></code> and a full stack trace and heap summary (including generational garbage collection details, which can be highly informative) will be dumped to stderr/logs. The JDK's <code>jps</code>, <code>jstat</code>, <code>jstack</code>, <code>jmap</code> are useful. <a href=\"https://github.com/aragozin/jvm-tools\">SJK tools</a> are more advanced.</li>\n<li>Use <a href=\"http://www.bitwizard.nl/mtr/\"><code>mtr</code></a> as a better traceroute, to identify network issues.</li>\n<li>For looking at why a disk is full, <a href=\"https://dev.yorhel.nl/ncdu\"><code>ncdu</code></a> saves time over the usual commands like <code>du -sh *</code>.</li>\n<li>To find which socket or process is using bandwidth, try <a href=\"http://www.ex-parrot.com/~pdw/iftop/\"><code>iftop</code></a> or <a href=\"https://github.com/raboof/nethogs\"><code>nethogs</code></a>.</li>\n<li>The <code>ab</code> tool (comes with Apache) is helpful for quick-and-dirty checking of web server performance. For more complex load testing, try <code>siege</code>.</li>\n<li>For more serious network debugging, <a href=\"https://wireshark.org/\"><code>wireshark</code></a>, <a href=\"https://www.wireshark.org/docs/wsug_html_chunked/AppToolstshark.html\"><code>tshark</code></a>, or <a href=\"http://ngrep.sourceforge.net/\"><code>ngrep</code></a>.</li>\n<li>Know about <code>strace</code> and <code>ltrace</code>. These can be helpful if a program is failing, hanging, or crashing, and you don't know why, or if you want to get a general idea of performance. Note the profiling option (<code>-c</code>), and the ability to attach to a running process (<code>-p</code>). Use trace child option (<code>-f</code>) to avoid missing important calls.</li>\n<li>Know about <code>ldd</code> to check shared libraries etc — but <a href=\"http://www.catonmat.net/blog/ldd-arbitrary-code-execution/\">never run it on untrusted files</a>.</li>\n<li>Know how to connect to a running process with <code>gdb</code> and get its stack traces.</li>\n<li>Use <code>/proc</code>. It's amazingly helpful sometimes when debugging live problems. Examples: <code>/proc/cpuinfo</code>, <code>/proc/meminfo</code>, <code>/proc/cmdline</code>, <code>/proc/xxx/cwd</code>, <code>/proc/xxx/exe</code>, <code>/proc/xxx/fd/</code>, <code>/proc/xxx/smaps</code> (where <code>xxx</code> is the process id or pid).</li>\n<li>When debugging why something went wrong in the past, <a href=\"http://sebastien.godard.pagesperso-orange.fr/\"><code>sar</code></a> can be very helpful. It shows historic statistics on CPU, memory, network, etc.</li>\n<li>For deeper systems and performance analyses, look at <code>stap</code> (<a href=\"https://sourceware.org/systemtap/wiki\">SystemTap</a>), <a href=\"https://en.wikipedia.org/wiki/Perf_%28Linux%29\"><code>perf</code></a>, and <a href=\"https://github.com/draios/sysdig\"><code>sysdig</code></a>.</li>\n<li>Check what OS you're on with <code>uname</code> or <code>uname -a</code> (general Unix/kernel info) or <code>lsb_release -a</code> (Linux distro info).</li>\n<li>Use <code>dmesg</code> whenever something's acting really funny (it could be hardware or driver issues).</li>\n<li>If you delete a file and it doesn't free up expected disk space as reported by <code>du</code>, check whether the file is in use by a process:\n<code>lsof | grep deleted | grep \"filename-of-my-big-file\"</code></li>\n</ul>\n<h2>One-liners</h2>\n<p>A few examples of piecing together commands:</p>\n<ul>\n<li>\n<p>It is remarkably helpful sometimes that you can do set intersection, union, and difference of text files via <code>sort</code>/<code>uniq</code>. Suppose <code>a</code> and <code>b</code> are text files that are already uniqued. This is fast, and works on files of arbitrary size, up to many gigabytes. (Sort is not limited by memory, though you may need to use the <code>-T</code> option if <code>/tmp</code> is on a small root partition.) See also the note about <code>LC_ALL</code> above and <code>sort</code>'s <code>-u</code> option (left out for clarity below).</p>\n<pre><code class=\"language-sh\">  sort a b | uniq > c   # c is a union b\n  sort a b | uniq -d > c   # c is a intersect b\n  sort a b b | uniq -u > c   # c is set difference a - b\n</code></pre>\n</li>\n<li>\n<p>Pretty-print two JSON files, normalizing their syntax, then coloring and paginating the result:</p>\n<pre><code>  diff &#x3C;(jq --sort-keys . &#x3C; file1.json) &#x3C;(jq --sort-keys . &#x3C; file2.json) | colordiff | less -R\n</code></pre>\n</li>\n<li>Use <code>grep . *</code> to quickly examine the contents of all files in a directory (so each line is paired with the filename), or <code>head -100 *</code> (so each file has a heading). This can be useful for directories filled with config settings like those in <code>/sys</code>, <code>/proc</code>, <code>/etc</code>.</li>\n<li>\n<p>Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python):</p>\n<pre><code class=\"language-sh\">  awk '{ x += $3 } END { print x }' myfile\n</code></pre>\n</li>\n<li>\n<p>To see sizes/dates on a tree of files, this is like a recursive <code>ls -l</code> but is easier to read than <code>ls -lR</code>:</p>\n<pre><code class=\"language-sh\">  find . -type f -ls\n</code></pre>\n</li>\n<li>\n<p>Say you have a text file, like a web server log, and a certain value that appears on some lines, such as an <code>acct_id</code> parameter that is present in the URL. If you want a tally of how many requests for each <code>acct_id</code>:</p>\n<pre><code class=\"language-sh\">  egrep -o 'acct_id=[0-9]+' access.log | cut -d= -f2 | sort | uniq -c | sort -rn\n</code></pre>\n</li>\n<li>To continuously monitor changes, use <code>watch</code>, e.g. check changes to files in a directory with <code>watch -d -n 2 'ls -rtlh | tail'</code> or to network settings while troubleshooting your wifi settings with <code>watch -d -n 2 ifconfig</code>.</li>\n<li>\n<p>Run this function to get a random tip from this document (parses Markdown and extracts an item):</p>\n<pre><code class=\"language-sh\">  function taocl() {\n    curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md |\n      sed '/cowsay[.]png/d' |\n      pandoc -f markdown -t html |\n      xmlstarlet fo --html --dropdtd |\n      xmlstarlet sel -t -v \"(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]\" |\n      xmlstarlet unesc | fmt -80 | iconv -t US\n  }\n</code></pre>\n</li>\n</ul>\n<h2>Obscure but useful</h2>\n<ul>\n<li><code>expr</code>: perform arithmetic or boolean operations or evaluate regular expressions</li>\n<li><code>m4</code>: simple macro processor</li>\n<li><code>yes</code>: print a string a lot</li>\n<li><code>cal</code>: nice calendar</li>\n<li><code>env</code>: run a command (useful in scripts)</li>\n<li><code>printenv</code>: print out environment variables (useful in debugging and scripts)</li>\n<li><code>look</code>: find English words (or lines in a file) beginning with a string</li>\n<li><code>cut</code>, <code>paste</code> and <code>join</code>: data manipulation</li>\n<li><code>fmt</code>: format text paragraphs</li>\n<li><code>pr</code>: format text into pages/columns</li>\n<li><code>fold</code>: wrap lines of text</li>\n<li><code>column</code>: format text fields into aligned, fixed-width columns or tables</li>\n<li><code>expand</code> and <code>unexpand</code>: convert between tabs and spaces</li>\n<li><code>nl</code>: add line numbers</li>\n<li><code>seq</code>: print numbers</li>\n<li><code>bc</code>: calculator</li>\n<li><code>factor</code>: factor integers</li>\n<li><a href=\"https://gnupg.org/\"><code>gpg</code></a>: encrypt and sign files</li>\n<li><code>toe</code>: table of terminfo entries</li>\n<li><code>nc</code>: network debugging and data transfer</li>\n<li><code>socat</code>: socket relay and tcp port forwarder (similar to <code>netcat</code>)</li>\n<li><a href=\"https://github.com/mattthias/slurm\"><code>slurm</code></a>: network traffic visualization</li>\n<li><code>dd</code>: moving data between files or devices</li>\n<li><code>file</code>: identify type of a file</li>\n<li><code>tree</code>: display directories and subdirectories as a nesting tree; like <code>ls</code> but recursive</li>\n<li><code>stat</code>: file info</li>\n<li><code>time</code>: execute and time a command</li>\n<li><code>timeout</code>: execute a command for specified amount of time and stop the process when the specified amount of time completes.</li>\n<li><code>lockfile</code>: create semaphore file that can only be removed by <code>rm -f</code></li>\n<li><code>logrotate</code>: rotate, compress and mail logs.</li>\n<li><code>watch</code>: run a command repeatedly, showing results and/or highlighting changes</li>\n<li><a href=\"https://github.com/joh/when-changed\"><code>when-changed</code></a>: runs any command you specify whenever it sees file changed. See <code>inotifywait</code> and <code>entr</code> as well.</li>\n<li><code>tac</code>: print files in reverse</li>\n<li><code>comm</code>: compare sorted files line by line</li>\n<li><code>strings</code>: extract text from binary files</li>\n<li><code>tr</code>: character translation or manipulation</li>\n<li><code>iconv</code> or <code>uconv</code>: conversion for text encodings</li>\n<li><code>split</code> and <code>csplit</code>: splitting files</li>\n<li><code>sponge</code>: read all input before writing it, useful for reading from then writing to the same file, e.g., <code>grep -v something some-file | sponge some-file</code></li>\n<li><code>units</code>: unit conversions and calculations; converts furlongs per fortnight to twips per blink (see also <code>/usr/share/units/definitions.units</code>)</li>\n<li><code>apg</code>: generates random passwords</li>\n<li><code>xz</code>: high-ratio file compression</li>\n<li><code>ldd</code>: dynamic library info</li>\n<li><code>nm</code>: symbols from object files</li>\n<li><code>ab</code> or <a href=\"https://github.com/wg/wrk\"><code>wrk</code></a>: benchmarking web servers</li>\n<li><code>strace</code>: system call debugging</li>\n<li><a href=\"http://www.bitwizard.nl/mtr/\"><code>mtr</code></a>: better traceroute for network debugging</li>\n<li><code>cssh</code>: visual concurrent shell</li>\n<li><code>rsync</code>: sync files and folders over SSH or in local file system</li>\n<li><a href=\"https://wireshark.org/\"><code>wireshark</code></a> and <a href=\"https://www.wireshark.org/docs/wsug_html_chunked/AppToolstshark.html\"><code>tshark</code></a>: packet capture and network debugging</li>\n<li><a href=\"http://ngrep.sourceforge.net/\"><code>ngrep</code></a>: grep for the network layer</li>\n<li><code>host</code> and <code>dig</code>: DNS lookups</li>\n<li><code>lsof</code>: process file descriptor and socket info</li>\n<li><code>dstat</code>: useful system stats</li>\n<li><a href=\"https://github.com/nicolargo/glances\"><code>glances</code></a>: high level, multi-subsystem overview</li>\n<li><code>iostat</code>: Disk usage stats</li>\n<li><code>mpstat</code>: CPU usage stats</li>\n<li><code>vmstat</code>: Memory usage stats</li>\n<li><code>htop</code>: improved version of top</li>\n<li><code>last</code>: login history</li>\n<li><code>w</code>: who's logged on</li>\n<li><code>id</code>: user/group identity info</li>\n<li><a href=\"http://sebastien.godard.pagesperso-orange.fr/\"><code>sar</code></a>: historic system stats</li>\n<li><a href=\"http://www.ex-parrot.com/~pdw/iftop/\"><code>iftop</code></a> or <a href=\"https://github.com/raboof/nethogs\"><code>nethogs</code></a>: network utilization by socket or process</li>\n<li><code>ss</code>: socket statistics</li>\n<li><code>dmesg</code>: boot and system error messages</li>\n<li><code>sysctl</code>: view and configure Linux kernel parameters at run time</li>\n<li><code>hdparm</code>: SATA/ATA disk manipulation/performance</li>\n<li><code>lsblk</code>: list block devices: a tree view of your disks and disk partitions</li>\n<li><code>lshw</code>, <code>lscpu</code>, <code>lspci</code>, <code>lsusb</code>, <code>dmidecode</code>: hardware information, including CPU, BIOS, RAID, graphics, devices, etc.</li>\n<li><code>lsmod</code> and <code>modinfo</code>: List and show details of kernel modules.</li>\n<li><code>fortune</code>, <code>ddate</code>, and <code>sl</code>: um, well, it depends on whether you consider steam locomotives and Zippy quotations \"useful\"</li>\n</ul>\n<h2>macOS only</h2>\n<p>These are items relevant <em>only</em> on macOS.</p>\n<ul>\n<li>Package management with <code>brew</code> (Homebrew) and/or <code>port</code> (MacPorts). These can be used to install on macOS many of the above commands.</li>\n<li>Copy output of any command to a desktop app with <code>pbcopy</code> and paste input from one with <code>pbpaste</code>.</li>\n<li>To enable the Option key in macOS Terminal as an alt key (such as used in the commands above like <strong>alt-b</strong>, <strong>alt-f</strong>, etc.), open Preferences -> Profiles -> Keyboard and select \"Use Option as Meta key\".</li>\n<li>To open a file with a desktop app, use <code>open</code> or <code>open -a /Applications/Whatever.app</code>.</li>\n<li>Spotlight: Search files with <code>mdfind</code> and list metadata (such as photo EXIF info) with <code>mdls</code>.</li>\n<li>Be aware macOS is based on BSD Unix, and many commands (for example <code>ps</code>, <code>ls</code>, <code>tail</code>, <code>awk</code>, <code>sed</code>) have many subtle variations from Linux, which is largely influenced by System V-style Unix and GNU tools. You can often tell the difference by noting a man page has the heading \"BSD General Commands Manual.\" In some cases GNU versions can be installed, too (such as <code>gawk</code> and <code>gsed</code> for GNU awk and sed). If writing cross-platform Bash scripts, avoid such commands (for example, consider Python or <code>perl</code>) or test carefully.</li>\n<li>To get macOS release information, use <code>sw_vers</code>.</li>\n</ul>\n<h2>Windows only</h2>\n<p>These items are relevant <em>only</em> on Windows.</p>\n<h3>Ways to obtain Unix tools under Windows</h3>\n<ul>\n<li>Access the power of the Unix shell under Microsoft Windows by installing <a href=\"https://cygwin.com/\">Cygwin</a>. Most of the things described in this document will work out of the box.</li>\n<li>On Windows 10, you can use <a href=\"https://msdn.microsoft.com/commandline/wsl/about\">Windows Subsystem for Linux (WSL)</a>, which provides a familiar Bash environment with Unix command line utilities.</li>\n<li>If you mainly want to use GNU developer tools (such as GCC) on Windows, consider <a href=\"http://www.mingw.org/\">MinGW</a> and its <a href=\"http://www.mingw.org/wiki/msys\">MSYS</a> package, which provides utilities such as bash, gawk, make and grep. MSYS doesn't have all the features compared to Cygwin. MinGW is particularly useful for creating native Windows ports of Unix tools.</li>\n<li>Another option to get Unix look and feel under Windows is <a href=\"https://github.com/dthree/cash\">Cash</a>. Note that only very few Unix commands and command-line options are available in this environment.</li>\n</ul>\n<h3>Useful Windows command-line tools</h3>\n<ul>\n<li>You can perform and script most Windows system administration tasks from the command line by learning and using <code>wmic</code>.</li>\n<li>Native command-line Windows networking tools you may find useful include <code>ping</code>, <code>ipconfig</code>, <code>tracert</code>, and <code>netstat</code>.</li>\n<li>You can perform <a href=\"http://www.thewindowsclub.com/rundll32-shortcut-commands-windows\">many useful Windows tasks</a> by invoking the <code>Rundll32</code> command.</li>\n</ul>\n<h3>Cygwin tips and tricks</h3>\n<ul>\n<li>Install additional Unix programs with the Cygwin's package manager.</li>\n<li>Use <code>mintty</code> as your command-line window.</li>\n<li>Access the Windows clipboard through <code>/dev/clipboard</code>.</li>\n<li>Run <code>cygstart</code> to open an arbitrary file through its registered application.</li>\n<li>Access the Windows registry with <code>regtool</code>.</li>\n<li>Note that a <code>C:\\</code> Windows drive path becomes <code>/cygdrive/c</code> under Cygwin, and that Cygwin's <code>/</code> appears under <code>C:\\cygwin</code> on Windows. Convert between Cygwin and Windows-style file paths with <code>cygpath</code>. This is most useful in scripts that invoke Windows programs.</li>\n</ul>\n<h2>More resources</h2>\n<ul>\n<li><a href=\"https://github.com/alebcay/awesome-shell\">awesome-shell</a>: A curated list of shell tools and resources.</li>\n<li><a href=\"https://github.com/herrbischoff/awesome-osx-command-line\">awesome-osx-command-line</a>: A more in-depth guide for the macOS command line.</li>\n<li><a href=\"http://redsymbol.net/articles/unofficial-bash-strict-mode/\">Strict mode</a> for writing better shell scripts.</li>\n<li><a href=\"https://github.com/koalaman/shellcheck\">shellcheck</a>: A shell script static analysis tool. Essentially, lint for bash/sh/zsh.</li>\n<li><a href=\"http://www.dwheeler.com/essays/filenames-in-shell.html\">Filenames and Pathnames in Shell</a>: The sadly complex minutiae on how to handle filenames correctly in shell scripts.</li>\n<li><a href=\"http://datascienceatthecommandline.com/#tools\">Data Science at the Command Line</a>: More commands and tools helpful for doing data science, from the book of the same name</li>\n</ul>"},{"url":"/docs/docs/data-structures-docs/","relativePath":"docs/docs/data-structures-docs.md","relativeDir":"docs/docs","base":"data-structures-docs.md","name":"data-structures-docs","frontmatter":{"title":"Data Structures Docs","weight":0,"excerpt":"Data Structures Docs","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1><strong>Data Structures</strong> are a specialized means of organizing and storing data in computers in such a way that we can perform operations on the stored data more efficiently. Data structures have a wide and diverse scope of usage across the fields of Computer Science and Software Engineering.Image by author</h1>\n<p><img src=\"https://miro.medium.com/max/473/1*KpDOKMFAgDWaGTQHL0r70g.png\"></p>\n<p>Data structures are being used in almost every program or software system that has been developed. Moreover, data structures come under the fundamentals of Computer Science and Software Engineering. It is a key topic when it comes to Software Engineering interview questions. Hence as developers, we must have good knowledge about data structures.</p>\n<p>In this article, I will be briefly explaining 8 commonly used data structures every programmer must know.</p>\n<p>{% embed url=\"<a href=\"https://replit.com/@bgoonz/DATASTRUCTURES-NOTES%5C#sorting/insertion%5C_sort/insertion.py\">https://replit.com/@bgoonz/DATASTRUCTURES-NOTES\\#sorting/insertion\\_sort/insertion.py</a>\" %}</p>\n<h2>1. Arrays <a id=\"31ab\"></a></h2>\n<p>An <strong>array</strong> is a structure of fixed-size, which can hold items of the same data type. It can be an array of integers, an array of floating-point numbers, an array of strings or even an array of arrays (such as <em>2-dimensional arrays</em>). Arrays are indexed, meaning that random access is possible.<img src=\"https://miro.medium.com/max/60/1*pYIKtQYbX8vgCWrwe1YOyg.png?q=20\">Fig 1. Visualization of basic Terminology of Arrays (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*pYIKtQYbX8vgCWrwe1YOyg.png\"></p>\n<h3>Array operations <a id=\"6504\"></a></h3>\n<ul>\n<li><strong>Traverse</strong>: Go through the elements and print them.</li>\n<li><strong>Search</strong>: Search for an element in the array. You can search the element by its value or its index</li>\n<li><strong>Update</strong>: Update the value of an existing element at a given index</li>\n</ul>\n<p><strong>Inserting</strong> elements to an array and <strong>deleting</strong> elements from an array cannot be done straight away as arrays are fixed in size. If you want to insert an element to an array, first you will have to create a new array with increased size (current size + 1), copy the existing elements and add the new element. The same goes for the deletion with a new array of reduced size.</p>\n<h3><strong>Applications of arrays</strong> <a id=\"edcd\"></a></h3>\n<ul>\n<li>Used as the building blocks to build other data structures such as array lists, heaps, hash tables, vectors and matrices.</li>\n<li>Used for different sorting algorithms such as insertion sort, quick sort, bubble sort and merge sort.</li>\n</ul>\n<h2>2. Linked Lists <a id=\"d965\"></a></h2>\n<p>A <strong>linked list</strong> is a sequential structure that consists of a sequence of items in linear order which are linked to each other. Hence, you have to access data sequentially and random access is not possible. Linked lists provide a simple and flexible representation of dynamic sets.</p>\n<p>Let's consider the following terms regarding linked lists. You can get a clear idea by referring to Figure 2.</p>\n<ul>\n<li>Elements in a linked list are known as <strong>nodes</strong>.</li>\n<li>Each node contains a <strong>key</strong> and a pointer to its successor node, known as <strong>next</strong>.</li>\n<li>The attribute named <strong>head</strong> points to the first element of the linked list.</li>\n<li>The last element of the linked list is known as the <strong>tail</strong>.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*4fuF6lHXOSmoVNcOV8aaJA.png?q=20\">Fig 2. Visualization of basic Terminology of Linked Lists (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*4fuF6lHXOSmoVNcOV8aaJA.png\"></p>\n<p>Following are the various types of linked lists available.</p>\n<ul>\n<li><strong>Singly linked list</strong> — Traversal of items can be done in the forward direction only.</li>\n<li><strong>Doubly linked list</strong> — Traversal of items can be done in both forward and backward directions. Nodes consist of an additional pointer known as <strong>prev</strong>, pointing to the previous node.</li>\n<li><strong>Circular linked lists</strong> — Linked lists where the prev pointer of the head points to the tail and the next pointer of the tail points to the head.</li>\n</ul>\n<h3>Linked list operations <a id=\"d683\"></a></h3>\n<ul>\n<li><strong>Search</strong>: Find the first element with the key <strong>k</strong> in the given linked list by a simple linear search and returns a pointer to this element</li>\n<li><strong>Insert</strong>: Insert a key to the linked list. An insertion can be done in 3 different ways; insert at the beginning of the list, insert at the end of the list and insert in the middle of the list.</li>\n<li><strong>Delete</strong>: Removes an element <strong>x</strong> from a given linked list. You cannot delete a node by a single step. A deletion can be done in 3 different ways; delete from the beginning of the list, delete from the end of the list and delete from the middle of the list.</li>\n</ul>\n<h3><strong>Applications of linked lists</strong> <a id=\"1da5\"></a></h3>\n<ul>\n<li>Used for <em>symbol table management</em> in compiler design.</li>\n<li>Used in switching between programs using Alt + Tab (implemented using Circular Linked List).</li>\n</ul>\n<h2>3. Stacks <a id=\"ca20\"></a></h2>\n<p>A <strong>stack</strong> is a <strong>LIFO</strong> (Last In First Out — the element placed at last can be accessed at first) structure which can be commonly found in many programming languages. This structure is named as “stack” because it resembles a real-world stack — a stack of plates.Image by <a href=\"https://pixabay.com/users/congerdesign-509903/?utm_source=link-attribution&#x26;utm_medium=referral&#x26;utm_campaign=image&#x26;utm_content=629987\">congerdesign</a> from <a href=\"https://pixabay.com/?utm_source=link-attribution&#x26;utm_medium=referral&#x26;utm_campaign=image&#x26;utm_content=629987\">Pixabay</a></p>\n<p><img src=\"https://miro.medium.com/max/473/1*e4XWkyzxdOreblbPlbOCyw.jpeg\"></p>\n<h3>Stack operations <a id=\"4b54\"></a></h3>\n<p>Given below are the 2 basic operations that can be performed on a stack. Please refer to Figure 3 to get a better understanding of the stack operations.</p>\n<ul>\n<li><strong>Push</strong>: Insert an element on to the top of the stack.</li>\n<li><strong>Pop</strong>: Delete the topmost element and return it.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*QMifqahZm4DGQ91GkOhu4g.png?q=20\">Fig 3. Visualization of basic Operations of Stacks (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*QMifqahZm4DGQ91GkOhu4g.png\"></p>\n<p>Furthermore, the following additional functions are provided for a stack in order to check its status.</p>\n<ul>\n<li><strong>Peek</strong>: Return the top element of the stack without deleting it.</li>\n<li><strong>isEmpty</strong>: Check if the stack is empty.</li>\n<li><strong>isFull</strong>: Check if the stack is full.</li>\n</ul>\n<h3>Applications of stacks <a id=\"f7fc\"></a></h3>\n<ul>\n<li>Used for expression evaluation (e.g.: <em>shunting-yard algorithm</em> for parsing and evaluating mathematical expressions).</li>\n<li>Used to implement function calls in recursion programming.</li>\n</ul>\n<h2>4. Queues <a id=\"0e94\"></a></h2>\n<p>A <strong>queue</strong> is a <strong>FIFO</strong> (First In First Out — the element placed at first can be accessed at first) structure which can be commonly found in many programming languages. This structure is named as “queue” because it resembles a real-world queue — people waiting in a queue.<img src=\"https://miro.medium.com/max/60/1*GbtPRh9OWh1jtCtCa9czIg.jpeg?q=20\">Image by <a href=\"https://pixabay.com/users/sheadquarters-5187/?utm_source=link-attribution&#x26;utm_medium=referral&#x26;utm_campaign=image&#x26;utm_content=50119\">Sabine Felidae</a> from <a href=\"https://pixabay.com/?utm_source=link-attribution&#x26;utm_medium=referral&#x26;utm_campaign=image&#x26;utm_content=50119\">Pixabay</a></p>\n<p><img src=\"https://miro.medium.com/max/473/1*GbtPRh9OWh1jtCtCa9czIg.jpeg\"></p>\n<h3>Queue operations <a id=\"9bcd\"></a></h3>\n<p>Given below are the 2 basic operations that can be performed on a queue. Please refer to Figure 4 to get a better understanding of the queue operations.</p>\n<ul>\n<li><strong>Enqueue</strong>: Insert an element to the end of the queue.</li>\n<li><strong>Dequeue</strong>: Delete the element from the beginning of the queue.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*K4-7c0lyUcSGRPmv3_9uqw.png?q=20\">Fig 4. Visualization of Basic Operations of Queues (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*K4-7c0lyUcSGRPmv3_9uqw.png\" alt=\"Fig 4. Visualization of Basic Operations of Queues (Image by author)\"></p>\n<h3>Applications of queues <a id=\"07fd\"></a></h3>\n<ul>\n<li>Used to manage threads in multithreading.</li>\n<li>Used to implement queuing systems (e.g.: priority queues).</li>\n</ul>\n<h2>5. Hash Tables <a id=\"4690\"></a></h2>\n<p>A <strong>Hash Table</strong> is a data structure that stores values which have keys associated with each of them. Furthermore, it supports lookup efficiently if we know the key associated with the value. Hence it is very efficient in inserting and searching, irrespective of the size of the data.</p>\n<p><strong>Direct Addressing</strong> uses the one-to-one mapping between the values and keys when storing in a table. However, there is a problem with this approach when there is a large number of key-value pairs. The table will be huge with so many records and may be impractical or even impossible to be stored, given the memory available on a typical computer. To avoid this issue we use <strong>hash tables</strong>.</p>\n<h3>Hash Function <a id=\"9052\"></a></h3>\n<p>A special function named as the <strong>hash function</strong> (<strong>h</strong>) is used to overcome the aforementioned problem in direct addressing.</p>\n<p>In direct accessing, a value with key <strong>k</strong> is stored in the slot <strong>k</strong>. Using the hash function, we calculate the index of the table (slot) to which each value goes. The value calculated using the hash function for a given key is called the <strong>hash value</strong> which indicates the index of the table to which the value is mapped.</p>\n<blockquote>\n<p><strong>h(k) = k % m</strong></p>\n</blockquote>\n<ul>\n<li><strong>h:</strong> Hash function</li>\n<li><strong>k:</strong> Key of which the hash value should be determined</li>\n<li><strong>m:</strong> Size of the hash table (number of slots available). A prime value that is not close to an exact power of 2 is a good choice for <strong>m</strong>.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*xOmBfzMxLLldy1ll4w7esg.png?q=20\">Fig 5. Representation of a Hash Function (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*xOmBfzMxLLldy1ll4w7esg.png\"></p>\n<p>Consider the hash function <strong>h(k) = k % 20</strong>, where the size of the hash table is 20. Given a set of keys, we want to calculate the hash value of each to determine the index where it should go in the hash table. Consider we have the following keys, the hash and the hash table index.</p>\n<ul>\n<li>1 → 1%20 → 1</li>\n<li>5 → 5%20 → 5</li>\n<li>23 → 23%20 → 3</li>\n<li>63 → 63%20 → 3</li>\n</ul>\n<p>From the last two examples given above, we can see that <strong>collision</strong> can arise when the hash function generates the same index for more than one key. We can resolve collisions by selecting a suitable hash function h and use techniques such as <strong>chaining</strong> and <strong>open addressing</strong>.</p>\n<h3>Applications of hash tables <a id=\"0328\"></a></h3>\n<ul>\n<li>Used to implement database indexes.</li>\n<li>Used to implement associative arrays.</li>\n<li>Used to implement the “set” data structure.</li>\n</ul>\n<h2>6. Trees <a id=\"1c0f\"></a></h2>\n<p>A <strong>tree</strong> is a hierarchical structure where data is organized hierarchically and are linked together. This structure is different from a linked list whereas, in a linked list, items are linked in a linear order.</p>\n<p>Various types of trees have been developed throughout the past decades, in order to suit certain applications and meet certain constraints. Some examples are binary search tree, B tree, treap, red-black tree, splay tree, AVL tree and n-ary tree.</p>\n<h3>Binary Search Trees <a id=\"ba6b\"></a></h3>\n<p>A <strong>binary search tree (BST)</strong>, as the name suggests, is a binary tree where data is organized in a hierarchical structure. This data structure stores values in sorted order.</p>\n<p>Every node in a binary search tree comprises the following attributes.</p>\n<ol>\n<li><strong>key</strong>: The value stored in the node.</li>\n<li><strong>left</strong>: The pointer to the left child.</li>\n<li><strong>right</strong>: The pointer to the right child.</li>\n<li><strong>p</strong>: The pointer to the parent node.</li>\n</ol>\n<p>A binary search tree exhibits a unique property that distinguishes it from other trees. This property is known as the <strong>binary-search-tree property</strong>.</p>\n<p>Let <strong>x</strong> be a node in a binary search tree.</p>\n<ul>\n<li>If <strong>y</strong> is a node in the <strong>left</strong> subtree of x, then <strong>y.key ≤ x.key</strong></li>\n<li>If <strong>y</strong> is a node in the <strong>right</strong> subtree of x, then <strong>y.key ≥ x.key</strong></li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*TMn800emvMuqwY3AZpfwCg.png?q=20\">Fig 6. Visualization of Basic Terminology of Trees (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*TMn800emvMuqwY3AZpfwCg.png\"></p>\n<h3>Applications of trees <a id=\"3ea1\"></a></h3>\n<ul>\n<li><strong>Binary Trees</strong>: Used to implement expression parsers and expression solvers.</li>\n<li><strong>Binary Search Tree</strong>: used in many search applications where data are constantly entering and leaving.</li>\n<li><strong>Heaps</strong>: used by JVM (Java Virtual Machine) to store Java objects.</li>\n<li><strong>Treaps</strong>: used in wireless networking.</li>\n</ul>\n<p>Check my articles below on 8 useful tree data structures and self-balancing binary search trees.<a href=\"https://towardsdatascience.com/8-useful-tree-data-structures-worth-knowing-8532c7231e8c\">8 Useful Tree Data Structures Worth KnowingAn overview of 8 different tree data structurestowardsdatascience.com</a><a href=\"https://towardsdatascience.com/self-balancing-binary-search-trees-101-fc4f51199e1d\">Self-Balancing Binary Search Trees 101Introduction to Self-Balancing Binary Search Treestowardsdatascience.com</a></p>\n<h2>7. Heaps <a id=\"9e26\"></a></h2>\n<p>A <strong>Heap</strong> is a special case of a binary tree where the parent nodes are compared to their children with their values and are arranged accordingly.</p>\n<p>Let us see how we can represent heaps. Heaps can be represented using trees as well as arrays. Figures 7 and 8 show how we can represent a binary heap using a binary tree and an array.<img src=\"https://miro.medium.com/max/60/1*BEq4aj8K7u4LbIaIEtHNmQ.png?q=20\">Fig 7. Binary Tree Representation of a Heap (Image by author)<img src=\"https://miro.medium.com/max/60/1*N7R4banKc1NG5KqdXmJnkA.png?q=20\">Fig 8. Array Representation of a Heap (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*N7R4banKc1NG5KqdXmJnkA.png\"></p>\n<p><img src=\"https://miro.medium.com/max/473/1*BEq4aj8K7u4LbIaIEtHNmQ.png\"></p>\n<p>Heaps can be of 2 types.</p>\n<ol>\n<li><strong>Min Heap</strong> — the key of the parent is less than or equal to those of its children. This is called the <strong>min-heap property</strong>. The root will contain the minimum value of the heap.</li>\n<li><strong>Max Heap</strong> — the key of the parent is greater than or equal to those of its children. This is called the <strong>max-heap property</strong>. The root will contain the maximum value of the heap.</li>\n</ol>\n<h3>Applications of heaps <a id=\"6986\"></a></h3>\n<ul>\n<li>Used in <strong>heapsort algorithm</strong>.</li>\n<li>Used to implement priority queues as the priority values can be ordered according to the heap property where the heap can be implemented using an array.</li>\n<li>Queue functions can be implemented using heaps within <strong>O(log n)</strong> time.</li>\n<li>Used to find the kᵗʰ smallest (or largest) value in a given array.</li>\n</ul>\n<p>Check my article below on implementing a heap using the python heapq module.<a href=\"https://towardsdatascience.com/introduction-to-python-heapq-module-53534feda625\">Introduction to Python Heapq ModuleA simple introduction on how to use Python's heapq moduletowardsdatascience.com</a></p>\n<h2>8. Graphs <a id=\"e0c7\"></a></h2>\n<p>A <strong>graph</strong> consists of a finite set of <strong>vertices</strong> or nodes and a set of <strong>edges</strong> connecting these vertices.</p>\n<p>The <strong>order</strong> of a graph is the number of vertices in the graph. The <strong>size</strong> of a graph is the number of edges in the graph.</p>\n<p>Two nodes are said to be <strong>adjacent</strong> if they are connected to each other by the same edge.</p>\n<h3>Directed Graphs <a id=\"3763\"></a></h3>\n<p>A graph <strong>G</strong> is said to be a <strong>directed graph</strong> if all its edges have a direction indicating what is the start vertex and what is the end vertex.</p>\n<p>We say that <strong>(u, v)</strong> is <strong>incident from</strong> or <strong>leaves</strong> vertex <strong>u</strong> and is <strong>incident to</strong> or <strong>enters</strong> vertex <strong>v</strong>.</p>\n<p><strong>Self-loops</strong>: Edges from a vertex to itself.</p>\n<h3>Undirected Graphs <a id=\"9fe9\"></a></h3>\n<p>A graph <strong>G</strong> is said to be an <strong>undirected graph</strong> if all its edges have no direction. It can go in both ways between the two vertices.</p>\n<p>If a vertex is not connected to any other node in the graph, it is said to be <strong>isolated</strong>.<img src=\"https://miro.medium.com/max/60/1*bgRmFfnYXHYXSv1pbNea0A.png?q=20\">Fig 9. Visualization of Terminology of Graphs (Image by author)</p>\n<p><img src=\"https://miro.medium.com/max/473/1*bgRmFfnYXHYXSv1pbNea0A.png\"></p>\n<p>You can read more about graph algorithms from my article <a href=\"https://medium.com/@vijinimallawaarachchi/10-graph-algorithms-visually-explained-e57faa1336f3\">10 Graph Algorithms Visually Explained</a>.<a href=\"https://medium.com/@vijinimallawaarachchi/10-graph-algorithms-visually-explained-e57faa1336f3\">10 Graph Algorithms Visually ExplainedA quick introduction to 10 basic graph algorithms with examples and visualisationsmedium.com</a></p>\n<h3>Applications of graphs <a id=\"888d\"></a></h3>\n<ul>\n<li>Used to represent social media networks. Each user is a vertex, and when users connect they create an edge.</li>\n<li>Used to represent web pages and links by search engines. Web pages on the internet are linked to each other by hyperlinks. Each page is a vertex and the hyperlink between two pages is an edge. Used for Page Ranking in Google.</li>\n<li>Used to represent locations and routes in GPS. Locations are vertices and the routes connecting locations are edges. Used to calculate the shortest route between two locations.</li>\n</ul>"},{"url":"/docs/docs/css/","relativePath":"docs/docs/css.md","relativeDir":"docs/docs","base":"css.md","name":"css","frontmatter":{"title":"Learn Css","weight":0,"excerpt":"Learn Css","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Learn CSS</h1>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&amp;resid=D21009FDD967A241%21634693&amp;authkey=AAQrdzlmcaPgMGA&amp;em=2&amp;wdAr=1.7777777777777777\" width=\"1186px\" height=\"691px\" frameborder=\"0\">This is an embedded <a target=\"_blank\" href=\"https://office.com\">Microsoft Office</a> presentation, powered by <a target=\"_blank\" href=\"https://office.com/webapps\">Office</a>.</iframe>\n<p>CSS Selectors</p>\n<hr>\n<h3>Learn CSS So That Your Site Doesn't Look Like Garbage</h3>\n<h3>CSS Selectors</h3>\n<ul>\n<li><span id=\"62c3\"><code>CSS Selector</code> : Applies styles to a specific DOM element(s), there are various types:</span></li>\n<li><span id=\"d60d\"><code>Type Selectors</code> : Matches by node name.</span></li>\n<li><span id=\"9826\"><code>Class Selectors</code> : Matches by class name.</span></li>\n<li><span id=\"10a7\"><code>ID Selectors</code> : Matches by ID name.</span></li>\n<li><span id=\"64c0\"><code>Universal Selectors</code> : Selects all HTML elements on a page.</span></li>\n<li><span id=\"9c6b\"><code>Attribute Selectors</code> : Matches elements based on the prescence or value of a given attribute. (i.e. a[title] will match all a elements with a title attribute)</span></li>\n</ul>\n<!-- -->\n<pre><code>/* Type selector */\ndiv {\n  background-color: #000000;\n}/* Class selector */\n.active {\n  color: #ffffff;\n}/* ID selector */\n#list-1 {\n  border: 1px solid gray;\n}/* Universal selector */\n* {\n  padding: 10px;\n}/* Attribute selector */\na[title] {\n  font-size: 2em;\n}\n</code></pre>\n<p><strong>Class Selectors</strong></p>\n<ul>\n<li><span id=\"fddf\">Used to select all elements of a certain class denoted with a <code>.[class name]</code></span></li>\n<li><span id=\"72af\">You can assign multiple classes to a DOM element by separating them with a space.</span></li>\n</ul>\n<p><strong>Compound Class Selectors</strong></p>\n<ul>\n<li><span id=\"befd\">To get around accidentally selecting elements with multiple classes beyond what we want to grab we can chain dots.</span></li>\n<li><span id=\"e2c8\">TO use a compound class selector just append the classes together when referencing them in the CSS.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;div class=\"box yellow\">&#x3C;/div>\n&#x3C;div class=\"box orange\">&#x3C;/div>\n&#x3C;div class=\"circle orange\">&#x3C;/div>\n</code></pre>\n<ul>\n<li><span id=\"7dd3\">i.e. .box.yellow will select only the first element.</span></li>\n<li><span id=\"8904\">KEEP IN MIND that if you do include a space it will make the selector into a <em>descendant selector</em>.</span></li>\n</ul>\n<!-- -->\n<pre><code>h1#heading,\nh2.subheading {\n  font-style: italic;\n}\n</code></pre>\n<ul>\n<li><span id=\"a8bc\">When we want to target all <code>h1</code> tags with the id of <code>heading</code>.</span></li>\n</ul>\n<p><strong>CSS Combinators</strong></p>\n<ul>\n<li><span id=\"c196\">CSS Combinators are used to combine other selectors into more complex or targeted selectors — they are very powerful!</span></li>\n<li><span id=\"71a6\">Be careful not to use too many of them as they will make your CSS far too complex.</span></li>\n<li><span id=\"6032\"><code>Descendant Selectors</code></span></li>\n<li><span id=\"6f41\">Separated by a space.</span></li>\n<li><span id=\"3829\">Selects all descendants of a parent container.</span></li>\n<li><span id=\"e90c\"><code>Direct Child Selectors</code></span></li>\n<li><span id=\"52b5\">Indicated with a <code>></code>.</span></li>\n<li><span id=\"ea8e\">Different from descendants because it only affects the direct children of an element.</span></li>\n<li><span id=\"486f\"><code>.menu > .is-active { background-color: #ffe0b2; }</code></span></li>\n<li><span id=\"96f9\"><code>&#x3C;body> &#x3C;div class=\"menu\"> &#x3C;div class=\"is-active\">Belka&#x3C;/div> &#x3C;div> &#x3C;div class=\"is-active\">Strelka&#x3C;/div> &#x3C;/div> &#x3C;/div> &#x3C;/body> &#x3C;div class=\"is-active\"> Laika &#x3C;/div> &#x3C;/body></code></span></li>\n<li><span id=\"59ca\">Belka would be the only element selected.</span></li>\n<li><span id=\"0266\"><code>Adjacent Sibling Selectors</code></span></li>\n<li><span id=\"a648\">Uses the <code>+</code> symbol.</span></li>\n<li><span id=\"9d79\">Used for elements that directly follow one another and who both have the same parent.</span></li>\n<li><span id=\"4865\"><code>h1 + h2 { font-style: italic; } &#x3C;h1>Big header&#x3C;/h1> &#x3C;h2>This one is styled because it is directly adjacent to the H1&#x3C;/h2> &#x3C;h2>This one is NOT styled because there is no H1 right before it&#x3C;/h2></code></span></li>\n</ul>\n<p><strong>Pseudo-Classes</strong></p>\n<ul>\n<li><span id=\"b638\"><code>Pseudo-Class</code> : Specifies a special state of the seleted element(s) and does not refer to any elements or attributes contained in the DOM.</span></li>\n<li><span id=\"0360\">Format is a <code>Selector:Pseudo-Class Name</code> or <code>A:B</code></span></li>\n<li><span id=\"91ee\"><code>a:hover { font-family: \"Roboto Condensed\", sans-serif; color: #4fc3f7; text-decoration: none; border-bottom: 2px solid #4fc3f7; }</code></span></li>\n<li><span id=\"27ac\">Some common pseudo-classes that are frequently used are:</span></li>\n<li><span id=\"9b2b\"><code>active</code> : 'push down', when ele are activated.</span></li>\n<li><span id=\"5b2f\"><code>checked</code> : applies to things like radio buttons or checkbox inputs.</span></li>\n<li><span id=\"58da\"><code>disabled</code> : any disabled element.</span></li>\n<li><span id=\"d3bd\"><code>first-child</code> : first element in a group of children/siblings.</span></li>\n<li><span id=\"40fc\"><code>focus</code> : elements that have current focus.</span></li>\n<li><span id=\"ed43\"><code>hover</code> : elements that have cursor hovering over it.</span></li>\n<li><span id=\"6fa2\"><code>invalid</code> : any form elements in an invalid state from client-side form validation.</span></li>\n<li><span id=\"7811\"><code>last-child</code> : last element in a group of children/siblings.</span></li>\n<li><span id=\"1bdf\"><code>not(selector)</code> : elements that do not match the provided selector.</span></li>\n<li><span id=\"be5c\"><code>required</code> : form elements that are required.</span></li>\n<li><span id=\"43ed\"><code>valid</code> : form elements in a valid state.</span></li>\n<li><span id=\"6460\"><code>visited</code> : anchor tags of whih the user has already been to the URL that the href points to.</span></li>\n</ul>\n<p><code>Pseudo-Selectors</code></p>\n<ul>\n<li><span id=\"89e7\">Used to create pseudo-elements as children of the elements to which the property applies.</span></li>\n<li><span id=\"0bef\"><code>::after</code></span></li>\n<li><span id=\"52f9\"><code>::before</code></span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;style>\n  p::before {\n    background-color: lightblue;\n    border-right: 4px solid violet;\n    content: \":-) \";\n    margin-right: 4px;\n    padding-left: 4px;\n  }\n&#x3C;/style>\n&#x3C;p>This is the first paragraph&#x3C;/p>\n&#x3C;p>This is the second paragraph&#x3C;/p>\n&#x3C;p>This is the third paragraph&#x3C;/p>\n</code></pre>\n<ul>\n<li><span id=\"a843\">Will add some blue smiley faces before the p tag elements.</span></li>\n</ul>\n<p><strong>CSS Rules</strong></p>\n<ul>\n<li><span id=\"919a\"><code>CSS Rule</code> : Collection of single or compound selectors, a curly brace, zero or more properties</span></li>\n<li><span id=\"555f\"><code>CSS Rule Specificity</code> : Sometimes CSS rules will contain multiple elements and may have overlapping properties rules for those same elements - there is an algorithm in CSS that calculates which rule takes precedence.</span></li>\n<li><span id=\"a1db\"><code>The Four Number Calculation</code> : listed in increasing order of importance.</span></li>\n</ul>\n<p>Who has the most IDs? If no one, continue.</p>\n<p>Who has the most classes? If no one, continue.</p>\n<p>Who has the most tags? If no one, continue.</p>\n<p>Last Read in the browser wins.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Ub47AaMXuT1m8_T-\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*t0oXzsLPxpMwNbKo.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*2xr0vyHwf6UN905l\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*oq83hQ5qvtT6gDd9.png\" class=\"graf-image\" /></figure><style>\n      .box {\n        width: 50px;\n        height: 50px;\n        border: 1px solid black;\n      }\n      .orange {\n        background-color: orange;\n      }\n      .yellow {\n        background-color: yellow;\n        border: 1px solid purple;\n      }\n    </style>\n    <div class=\"box yellow\"></div>\n    <div class=\"box orange\"></div>\n<ul>\n<li><span id=\"1939\">Coming back to our example where all the CSS Rules have tied, the last step 4 wins out so our element will have a <code>purple border</code>.</span></li>\n</ul>\n<hr>\n<h3>CSS: Type, Properties, and Imports</h3>\n<p><strong>Typography</strong></p>\n<ul>\n<li><span id=\"d6fc\"><code>font-family</code> : change the font.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ssVcT1Bd9Edfo6KF\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*WmqUyKiumM8RCJQo.png\" class=\"graf-image\" /></figure>-   <span id=\"daba\">Remember that not all computers have the same fonts on them.</span>\n-   <span id=\"0aa8\">You can import web fonts via an api by using</span>\n-   <span id=\"0c5d\">`@import url('https://fonts.googleapis.com/css2?family=Liu+Jian+Mao+Cao&display=swap');` and pasting it st the top of your CSS file.</span>\n-   <span id=\"d8ff\">And then reference it in your font-family.</span>\n-   <span id=\"ee9f\">`font-size` : Changes the size of your font.</span>\n-   <span id=\"782e\">Keep in mind the two kind of units CSS uses:</span>\n-   <span id=\"c4f7\">`Absolute` : `Pixels`, Points, Inches, Centimeters.</span>\n-   <span id=\"2884\">`Relative` : Em, Rem.</span>\n-   <span id=\"f9b5\">Em: Calulating the size relative to the previous div (bubbles down)</span>\n-   <span id=\"5a5d\">Rem: Calulates relative to the parent element always.</span>\n-   <span id=\"79b0\">`font-style` : Used to set a font to italics.</span>\n-   <span id=\"f464\">`font-weight` : Used to make a font bold.</span>\n-   <span id=\"3d56\">`text-align` : Used to align your text to the left, center, or right.</span>\n-   <span id=\"4cbc\">`text-decoration` : Use to put lines above, through, or under text. Lines can be solid, dashed, or wavy!</span>\n-   <span id=\"1c96\">`text-transform` : Used to set text to all lowercase, uppercase, or capitalize all words.</span>\n<p><strong>Background-Images</strong></p>\n<ul>\n<li><span id=\"13eb\">You can use the background-image property to set a background image for an element.</span></li>\n</ul>\n<hr>\n<h3>CSS: Colors, Borders, and Shadows</h3>\n<p><strong>Colors</strong></p>\n<ul>\n<li><span id=\"6bed\">You can set colors in CSS in three popular ways: by name, by hexadecimal RGB value, and by their decimal RGB value.</span></li>\n<li><span id=\"38fb\">rgba() is used to make an rbg value more transparent, the <code>a</code> is used to specify the <code>alpha channel</code>.</span></li>\n<li><span id=\"cb05\"><strong>Color</strong> : Property used to change the color of text.</span></li>\n<li><span id=\"6f05\"><strong>Background-Color</strong> : Property to change the backgrounf color of an element.</span></li>\n</ul>\n<p><strong>Borders</strong></p>\n<ul>\n<li><span id=\"d922\">Borders take three values: The width of the border, the style (i.e. solid, dotted, dashed), color of the border.</span></li>\n</ul>\n<p><strong>Shadows</strong></p>\n<ul>\n<li><span id=\"bccb\">There are two kinds of shadows in CSS: <code>box shadows</code> and <code>text shadows</code>.</span></li>\n<li><span id=\"7fd2\">Box refers to HTML elements.</span></li>\n<li><span id=\"f3a7\">Text refers to text.</span></li>\n<li><span id=\"2a53\">Shadows take values such as, the horizontal &#x26; vertical offsets of the shadow, the blur radius of the shadow, the spread radius, and of course the colors.</span></li>\n</ul>\n<hr>\n<h3>The Box Model</h3>\n<p><strong>Box Model</strong> : A concept that basically boils down that every DOM element has a box around it.</p>\n<p>Imagine a gift, inside is the gift, wrapped in foam all around (padding), and the giftbox outside of it (border) and then a wrapping paper on the giftbox (margin).- For items that are using <code>block</code> as it's display, the browser will follow these rules to layout the element: - The box fills 100% of the available container space. - Every new box takes on a new line/row. - Width and Height properties are respected. - Padding, Margin, and Border will push other elements away from the box. - Certain elements have <code>block</code> as their default display, such as: divs, headers, and paragraphs.- For items that are using <code>inline</code> as it's display, the browser will follow these rules to layout the element: - Each box appears in a single line until it fills up the space. - Width and height are <strong>not</strong> respected. - Padding, Margin, and Border are applied but they <strong>do not</strong> push other elements away from the box. - Certain elements have <code>inline</code> as their default display, such as: span tags, anchors, and images.</p>\n<p><strong>Standard Box Model vs Border-Box</strong>- As per the standard Box Model, the width and height pertains to the content of the box and excludes any additional padding, borders, and margins.</p>\n<p>This bothered many programmers so they created the <strong>border box</strong> to include the calculation of the entire box's height and width.</p>\n<p><strong>Inline-Block</strong>- Inline-block uses the best features of both <code>block</code> and <code>inline</code>. - Elements still get laid out left to right. - Layout takes into account specified width and height.</p>\n<p><strong>Padding</strong>- Padding applies padding to every side of a box. It is shorthand for four padding properties in this order: <code>padding-top</code>, <code>padding-right</code>, <code>padding-bottom</code>, <code>padding-left</code> (clockwise!)</p>\n<p><strong>Border</strong>- Border applies a border on all sides of an element. It takes three values in this order: <code>border-width</code>, <code>border-style</code>, <code>border-color</code>. - All three properties can be broken down in the four sides clockwise: top, right, bottom, left.</p>\n<p><strong>Margin</strong>- Margin sets margins on every side of an element. It takes four values in this order: <code>margin-top</code>, <code>margin-right</code>, <code>margin-bottom</code>, <code>margin-left</code>. - You can use <code>margin: 0 auto</code> to center an element.</p>\n<h3>Positioning</h3>\n<ul>\n<li><span id=\"d380\">The <code>position</code> property allows us to set the position of elements on a page and is an integral part of creatnig a Web page layout.</span></li>\n<li><span id=\"1bd6\">It accepts five values: <code>static</code>, <code>relative</code>, <code>absolute</code>, <code>fixed</code>, <code>sticky</code>.</span></li>\n<li><span id=\"0b53\">Every property (minus <code>static</code>) is used with: <code>top</code>, <code>right</code>, <code>bottom</code>, and <code>left</code> to position an element on a page.</span></li>\n</ul>\n<p><strong>Static Positioning</strong></p>\n<ul>\n<li><span id=\"7aa9\">The default position value of page elements.</span></li>\n<li><span id=\"700a\">Most likely will not use static that much.</span></li>\n</ul>\n<p><strong>Relative Positioning</strong></p>\n<ul>\n<li><span id=\"adc3\">Remains in it's original position in the page flow.</span></li>\n<li><span id=\"9533\">It is positioned <em>RELATIVE</em> to the it's <em>ORIGINAL PLACE</em> on the page flow.</span></li>\n<li><span id=\"8c0b\">Creates a <strong>stacking context</strong> : overlapping elements whose order can be set by the z-index property.</span></li>\n</ul>\n<!-- -->\n<pre><code>#pink-box {\n  background-color: #ff69b4;\n  bottom: 0;\n  left: -20px;\n  position: relative;\n  right: 0;\n  top: 0;\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*mMCUEQ94L4_zxwNc\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*TgjpfTmdczESRAfU.png\" class=\"graf-image\" /></figure>**Absolute Positioning**\n<ul>\n<li><span id=\"d597\">Absolute elements are removed from the normal page flow and other elements around it act like it's not there. (how we can easily achieve some layering)</span></li>\n<li><span id=\"eb5b\">Here are some examples to illustration absolute positioning:</span></li>\n</ul>\n<!-- -->\n<pre><code>.container {\n  background-color: #2b2d2f;\n  position: relative;\n}#pink-box {\n  position: absolute;\n  top: 60px;\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Mu1E5D10RQaBpzms\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*6jvV-NnX5HS5PuVT.png\" class=\"graf-image\" /></figure>-   <span id=\"adb4\">Note that the container ele has a relative positioning — this is so that any changes made to the absolute positioned children will be positioned from it's top-left corner.</span>\n-   <span id=\"be4f\">Note that because we removed the pink from the normal page flow, the container has now shifted the blue box to where the pink box should have been — which is why it is now layered beneath the pink.</span>\n<!-- -->\n<pre><code>.container {\n  background-color: #2b2d2f;\n  position: relative;\n}#pink-box {\n  position: absolute;\n  top: 60px;\n}#blue-box {\n  position: absolute;\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*phWx-191VVQ5pRF9\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*o_T8meZgQSu7kxfs.png\" class=\"graf-image\" /></figure>-   <span id=\"9e42\">As you can see here, since we have also taken the blue box out of the normal page flow by declaring it as absoutely positioned it now overlaps over the pink box.</span>\n<!-- -->\n<pre><code>.container {\n  background-color: #2b2d2f;\n  position: relative;\n}#pink-box {\n  background-color: #ff69b4;\n  bottom: 60px;\n  position: absolute;\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*HJbtARqC1qmeWTHS\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*rRNttTlXfnhqERYU.png\" class=\"graf-image\" /></figure>-   <span id=\"528a\">Example where the absolute element has it's bottom property modified.</span>\n<!-- -->\n<pre><code>.container {\n  background-color: #2b2d2f;\n}#pink-box {\n  background-color: #ff69b4;\n  bottom: 60px;\n  position: absolute;\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*e7H6ImFUmcPGMaoa\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Al6ILt84EC0bhjnK.png\" class=\"graf-image\" /></figure>-   <span id=\"f676\">If we removed the container's relative position. Our absolute unit would look for the nearest parent which would be the document itself.</span>\n<p><strong>Fixed Positioning</strong></p>\n<ul>\n<li><span id=\"fe31\">Another positioning that removes it's element from the page flow, and automatically positions it's parent as the HTML doc itself.</span></li>\n<li><span id=\"2388\">Fixed also uses top, right, bottom, and left.</span></li>\n<li><span id=\"3903\">Useful for things like nav bars or other features we want to keep visible as the user scrolls.</span></li>\n</ul>\n<p><strong>Sticky Positioning</strong></p>\n<ul>\n<li><span id=\"8ae2\">Remains in it's original position in the page flow, and it is positioned relative to it's closest block-level ancestor and any <em>scrolling</em> ancestors.</span></li>\n<li><span id=\"abe8\">Behaves like a relatively positioned element until the point at which you would normally scroll past it's viewport — then it sticks!</span></li>\n<li><span id=\"7ac0\">It is positioned with top, right, bottom, and left.</span></li>\n<li><span id=\"9080\">A good example are headers in a scrollable list.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*BRVlqobKK0IZtnXq\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*jQQJYWVoQY2eNANS.gif\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Flexible Box Model</h3>\n<ul>\n<li><span id=\"46aa\">Flexbox is a <strong>CSS module</strong> that provides a convenient way for us to display items inside a flexible container so that the layout is responsive.</span></li>\n<li><span id=\"ebb3\">Float was used back in the day to display position of elements in a container.</span></li>\n<li><span id=\"2a8e\">A very inconvenient aspect of float is the need to <em>clear</em> the float.</span></li>\n<li><span id=\"ba98\">To 'clear' a float we need to set up a ghost div to properly align — this is already sounds so inefficient.</span></li>\n</ul>\n<p><strong>Using Flexbox</strong></p>\n<ul>\n<li><span id=\"e23b\">Flexbox automatically resizes a container element to fit the viewport size without needing to use breakpoints.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*_SXOQpq3yrywWCcL\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*IBJIWQ7Z_23eERWn.png\" class=\"graf-image\" /></figure>-   <span id=\"b505\">Flexbox layout applies styles to the parent element, and it's children.</span>\n<!-- -->\n<pre><code>.container {\n  display: flex; /*sets display to use flex*/\n  flex-wrap: wrap; /*bc flex tries to fit everything into one line, use wrap to have the elements wrap to the next line*/\n  flex-direction: row; /*lets us create either rows or columns*/\n}\n</code></pre>\n<ul>\n<li><span id=\"4898\"><code>flex-flow</code> can be used to combine wrap and direction.</span></li>\n<li><span id=\"acdb\"><code>justify-content</code> used to define the alignment of flex items along the main axis.</span></li>\n<li><span id=\"68d6\"><code>align-items</code> used to define the alignment on the Y-axis.</span></li>\n<li><span id=\"f0d8\"><code>align-content</code> redistributes extra space on the cross axis.</span></li>\n<li><span id=\"531c\">By default, flex items will appear in the order they are added to the DOM, but we can use the <code>order</code> property to change that.</span></li>\n<li><span id=\"39b0\">Some other properties we can use on flex items are:</span></li>\n<li><span id=\"ec38\"><code>flex-grow</code> : dictates amount of avail. space the item should take up.</span></li>\n<li><span id=\"0916\"><code>flex-shrink</code> : defines the ability for a flex item to shrink.</span></li>\n<li><span id=\"4dda\"><code>flex-basis</code> : Default size of an element before the remaining space is distributed.</span></li>\n<li><span id=\"d9f2\"><code>flex</code> : shorthand for grow, shrink and basis.</span></li>\n<li><span id=\"f127\"><code>align-self</code> : Overrides default alignment in the container.</span></li>\n</ul>\n<hr>\n<h3>Grid Layout</h3>\n<ul>\n<li><span id=\"cc4f\">CSS Grid is a 2d layout system that let's use create a grid with columns and rows purely using Vanilla CSS. (flex is one dimensional)</span></li>\n</ul>\n<p><strong>Bootstrap vs CSS Grid</strong></p>\n<ul>\n<li><span id=\"4af2\">Bootstrap was a front-end library commonly used to create grid layouts but now CSS grid provides greater flexibility and control.</span></li>\n<li><span id=\"e404\">Grid applies style to a parent container and it's child elements.</span></li>\n</ul>\n<!-- -->\n<pre><code>.grid-container {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  grid-template-rows: auto;\n  grid-template-areas:\n    \"header header header\"\n    \"main . sidebar\"\n    \"footer footer footer\";  grid-column-gap: 20px;\n  grid-row-gap: 30px;\n  justify-items: stretch;\n  align-items: stretch;\n  justify-content: stretch;\n  align-content: stretch;\n}.item-1 {\n  grid-area: header;\n}\n.item-2 {\n  grid-area: main;\n}\n.item-3 {\n  grid-area: sidebar;\n}\n.item-4 {\n  grid-area: footer;\n}\n</code></pre>\n<ul>\n<li><span id=\"26c3\">Columns and Rows can be defined with: pixels, percentages, auto, named grid lines, using <code>repeat</code>, fractions.</span></li>\n<li><span id=\"a117\"><code>Grid Template Areas</code> gives us a handy way to map out and visualize areas of the grid layout.</span></li>\n<li><span id=\"17ae\">Combine areas with templates to define how much space an area should take up.</span></li>\n<li><span id=\"f90a\"><code>Grid Gaps</code> can be used to create 'gutters' between grid item.s</span></li>\n<li><span id=\"d7c0\">The way we have defined our grid with <code>grid-templates</code> and <code>areas</code> are considered <strong>explicit</strong>.</span></li>\n<li><span id=\"cef6\">We can also <code>implicitly</code> define grids.</span></li>\n</ul>\n<!-- -->\n<pre><code>.grid-container {\n  display: grid;\n  grid-template-columns: 100px 100px 100px 100px;\n  grid-template-rows: 50px 50px 50px;\n  grid-auto-columns: 100px;\n  grid-auto-rows: 50px;\n}\n</code></pre>\n<ul>\n<li><span id=\"e6d3\">Any grid items that aren't explicity placed are automatically placed or <em>re-flowed</em></span></li>\n</ul>\n<p><strong>Spanning Columns &#x26; Rows</strong></p>\n<ul>\n<li><span id=\"98c8\">We can use the following properties to take up a specified num of cols and rows.</span></li>\n<li><span id=\"0208\"><code>grid-column-start</code></span></li>\n<li><span id=\"437a\"><code>grid-column-end</code></span></li>\n<li><span id=\"7d03\"><code>grid-row-start</code></span></li>\n<li><span id=\"0a8e\"><code>grid-row-end</code></span></li>\n<li><span id=\"c62b\">All four properties can take any of the following values: the line number, span #, span name, auto.</span></li>\n</ul>\n<!-- -->\n<pre><code>.item-1 {\n  grid-row-start: row2-start; /* Item starts at row line named \"row2-start\" */\n  grid-row-end: 5; /* Item ends at row line 5 */\n  grid-column-start: 1; /* Item starts at column line 1 */\n  grid-column-end: three; /* Item ends at column line named \"three\" */\n}.item-2 {\n  grid-row-start: 1; /* Item starts at row line 1 */\n  grid-row-end: span 2; /* Item spans two rows and ends at row line 3 */\n  grid-column-start: 3; /* Item starts at column line 3 */\n  grid-column-end: span col5-start; /* Item spans and ends at line named \"col5-start\" */\n}\n</code></pre>\n<p><strong>Grid Areas</strong></p>\n<ul>\n<li><span id=\"9dd0\">We use the grid areas in conjunction with grid-container property to <strong>define sections of the layout</strong>.</span></li>\n<li><span id=\"5ec2\">We can then assign named sections to individual element's css rules.</span></li>\n</ul>\n<p><strong>Justify &#x26; Align Self</strong></p>\n<ul>\n<li><span id=\"06b0\">Justify items and Align Items can be used to align all grid items at once.</span></li>\n<li><span id=\"53f5\"><strong>Justify Self</strong> is used to align self on the row.</span></li>\n<li><span id=\"f6b1\">It can take four values: start, end, center, stretch.</span></li>\n<li><span id=\"72bb\"><strong>Align Self</strong> is used to align self on the column.</span></li>\n<li><span id=\"d5d4\">It can take four values: start, end, center, stretch.</span></li>\n</ul>\n<hr>\n<p><strong>CSS Hover Effect and Handling</strong></p>\n<p><strong>Overflow</strong></p>\n<p><code>css .btn { background-color: #00bfff; color: #ffffff; border-radius: 10px; padding: 1.5rem; }</code></p>\n<p><code>.btn--active:hover { cursor: pointer; transform: translateY(-0.25rem);</code></p>\n<p><code>/* Moves our button up/down on the Y axis */ }</code></p>\n<p>The Pseudo Class Selector <code>hover</code> activates when the cursor goes over the selected element.</p>\n<p><strong>Content Overflow</strong>- You can apply an <code>overflow</code> content property to an element if it's inner contents are spilling over.</p>\n<p>There are three members in the overflow family: — <code>overflow-x</code> : Apply horizontally. - <code>overflow-y</code> : Apply vertically. - <code>overflow</code> : Apply both directions.</p>\n<h3>Transitions</h3>\n<ul>\n<li><span id=\"b5a7\">Transitions provide a way to control animation speed when changing CSS properties.</span></li>\n<li><span id=\"2e1b\"><strong>Implicit Transitions</strong> : Animations that involve transitioning between two states.</span></li>\n</ul>\n<p><strong>Defining Transitions</strong></p>\n<ul>\n<li><span id=\"bbd6\"><code>transition-property</code> : specifies the name of the CSS property to apply the transition.</span></li>\n<li><span id=\"6340\"><code>transition-duration</code> : during of the transition.</span></li>\n<li><span id=\"7463\"><code>transition-delay</code> : time before the transition should start.</span></li>\n</ul>\n<p><strong>Examples</strong> :</p>\n<pre><code>#delay {\n  font-size: 14px;\n  transition-property: font-size;\n  transition-duration: 4s;\n  transition-delay: 2s;\n}#delay:hover {\n  font-size: 36px;\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Z6AbWnbmbFfu-tSM\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*_6nSuCOR34-6ET7n.gif\" class=\"graf-image\" /></figure>-   <span id=\"e6c9\">After a delay of two seconds, a four second transition begins where the font size goes from 36px to 14px.</span>\n<!-- -->\n<pre><code>.box {\n  border-style: solid;\n  border-width: 1px;\n  display: block;\n  width: 100px;\n  height: 100px;\n  background-color: #0000ff;\n  transition: width 2s, height 2s, background-color 2s, transform 2s;\n}.box:hover {\n  background-color: #ffcccc;\n  width: 200px;\n  height: 200px;\n  transform: rotate(180deg);\n}\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*PH5_YmVDFVGqWGjO\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Ya7xiy0AqJaJ9RPq.gif\" class=\"graf-image\" /></figure>-   <span id=\"c336\">When the mouse hovers over a box, it spins due to the rotate transform. Width and height change and also the bg color.</span>\n<hr>\n<h3>BEM Guidelines</h3>\n<ul>\n<li><span id=\"6474\">BEM was created as a guideline to solve the issue of loose standards around CSS naming conventions.</span></li>\n<li><span id=\"6d0c\"><strong>BEM</strong> stands for <code>block</code>, <code>element</code>, <code>modifier</code>.</span></li>\n<li><span id=\"3eb9\"><strong>Block</strong></span></li>\n<li><span id=\"f6b4\">A standalone entity that is meaningful on it's own.</span></li>\n<li><span id=\"7e86\">Can be nested and interact with one another.</span></li>\n<li><span id=\"338e\">Holistic entities without DOM rep can be blocks.</span></li>\n<li><span id=\"f2f0\">May consist latin letters, digits, and dashes.</span></li>\n<li><span id=\"3bfb\">Any DOM node can be a block if it accepts a class name.</span></li>\n<li><span id=\"5c9b\"><strong>Element</strong></span></li>\n<li><span id=\"1b95\">Part of a block and has no standalone meaning.</span></li>\n<li><span id=\"b5cf\">Any element that is semantically tied to a block.</span></li>\n<li><span id=\"10e2\">May consist latin letters, digits, and dashes.</span></li>\n<li><span id=\"9b79\">Formed by using two underscores after it's block name.</span></li>\n<li><span id=\"e282\">Any DOM node within a block can be an element.</span></li>\n<li><span id=\"a0dc\">Element classes should be used independently.</span></li>\n<li><span id=\"26f1\"><strong>Modifier</strong></span></li>\n<li><span id=\"6642\">A flag on blocks or elements. Use them to change appearance, behavior or state.</span></li>\n<li><span id=\"6cca\">Extra class name to add onto blocks or elements.</span></li>\n<li><span id=\"745f\">Add mods only to the elements they modify.</span></li>\n<li><span id=\"6416\">Modifier names may consist of Latin letters, digits, dashes and underscores.</span></li>\n<li><span id=\"f940\">Written with two dashes.</span></li>\n</ul>\n<p><strong>BEM Example</strong></p>\n<pre><code>&#x3C;form class=\"form form--theme-xmas form--simple\">\n  &#x3C;input class=\"form__input\" type=\"text\" />\n  &#x3C;input class=\"form__submit form__submit--disabled\" type=\"submit\" />\n&#x3C;/form>/* block selector */\n.form {\n}/* block modifier selector */\n.form--theme-xmas {\n}/* block modifier selector */\n.form--simple {\n}/* element selector */\n.form__input {\n}/* element selector */\n.form__submit {\n}/* element modifier selector */\n.form__submit--disabled {\n}\n</code></pre>\n<h4>If you found this guide helpful feel free to checkout my github/gists where I host similar content:</h4>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--p-anchor\">bgoonz's gists · GitHub</a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://goofy-euclid-1cd736.netlify.app/\"><strong>a/A-Student-Resources</strong><br />\n<em>Edit description</em>goofy-euclid-1cd736.netlify.app</a><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/938871b4521a\">March 6, 2021</a>.</p>"},{"url":"/docs/articles/modules/","relativePath":"docs/articles/modules.md","relativeDir":"docs/articles","base":"modules.md","name":"modules","frontmatter":{"title":"Node Modules System","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"page","image":"images/theme.png","subtitle":"how we introduce modularity into our code in the node ecosystem"},"html":"<p>Node.js has a built-in module system.</p>\n<p>A Node.js file can import functionality exposed by other Node.js files.</p>\n<p>When you want to import something you use</p>\n<p>to import the functionality exposed in the library.js file that resides in the current file folder.</p>\n<p>In this file, functionality must be exposed before it can be imported by other files.</p>\n<p>Any other object or variable defined in the file by default is private and not exposed to the outer world.</p>\n<p>This is what the module.exports API offered by the <a href=\"https://nodejs.org/api/modules.html\">module system</a> allows us to do.</p>\n<p>When you assign an object or a function as a new exports property, that is the thing that's being exposed, and as such, it can be imported in other parts of your app, or in other apps as well.</p>\n<p>You can do so in 2 ways.</p>\n<p>The first is to assign an object to module.exports, which is an object provided out of the box by the module system, and this will make your file export <em>just that object</em>:</p>\n<p>The second way is to add the exported object as a property of exports. This way allows you to export multiple objects, functions or data:</p>\n<p>or directly</p>\n<p>And in the other file, you'll use it by referencing a property of your import:</p>\n<p>or</p>\n<p>What's the difference between module.exports and exports?</p>\n<p>The first exposes the object it points to. The latter exposes <em>the properties</em> of the object it points to.</p>\n<h1>Modules in Javascript</h1>\n<p>Differences between Node.js and browsers</p>\n<hr>\n<h3>Modules in Javascript</h3>\n<h4><strong>Differences between Node.js and browsers</strong></h4>\n<p>There are many differences between Node.js and browser environments, but many of them are small and inconsequential in practice. For example, in our <em>Asynchronous</em> lesson, we noted how <a href=\"https://nodejs.org/api/timers.html#timers_settimeout_callback_delay_args\" class=\"markup--anchor markup--p-anchor\">Node’s setTimeout</a> has a slightly different return value from <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout\" class=\"markup--anchor markup--p-anchor\">a browser’s setTimeout</a>. Let’s go over a few notable differences between the two environments.</p>\n<p><strong>Global vs Window</strong></p>\n<p>In the Node.js runtime, the <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Global_object\" class=\"markup--anchor markup--p-anchor\">global object</a> is the object where global variables are stored. In browsers, the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window\" class=\"markup--anchor markup--p-anchor\">window object</a> is where global variables are stored. The window also includes properties and methods that deal with drawing things on the screen like images, links, and buttons. Node doesn’t need to draw anything, and so it does not come with such properties. This means that you can’t reference window in Node.</p>\n<p><em>Most browsers allow you to reference global but it is really the same object as window.</em></p>\n<p><strong>Document</strong></p>\n<p>Browsers have access to a document object that contains the HTML of a page that will be rendered to the browser window. There is no document in Node.</p>\n<p><strong>Location</strong></p>\n<p>Browsers have access to a location that contains information about the web address being visited in the browser. There is no location in Node, since it is not on the web.</p>\n<p><strong>Require and module.exports</strong></p>\n<p>Node has a predefined require function that we can use to import installed modules like readline. We can also import and export across our own files using require and module.exports. For example, say we had two different files, animals.js and cat.js, that existed in the same directory:</p>\n<p>If we execute animals.js in Node, the program would print ‘Sennacy is a great pet!’.</p>\n<p>Browsers don’t have a notion of a file system so we cannot use require or module.exports in the same way.</p>\n<h3>The fs module</h3>\n<p>Node comes with an <a href=\"https://nodejs.org/api/fs.html\" class=\"markup--anchor markup--p-anchor\">fs module</a> that contains methods that allow us to interact with our computer’s <strong>F</strong>ile <strong>S</strong>ystem through JavaScript. No additional installations are required; to access this module we can simply <code>require</code> it. We recommend that you code along with this reading. Let's begin with a <code>change-some-files.js</code> script that imports the module:</p>\n<pre><code>// change-some-files.js\n\nconst fs = require(\"fs\");\n</code></pre>\n<p>Similar to what we saw in the <code>readline</code> lesson, <code>require</code> will return to us a object with many properties that will enable us to do file I/O.</p>\n<p><strong><em>Did you know?</em></strong> <em>I/O is short for input/output. It’s usage is widespread and all the hip tech companies are using it, like.io.</em></p>\n<p>The <code>fs</code> module contains tons of functionality! Chances are that if there is some operation you need to perform regarding files, the <code>fs</code> module supports it. The module also offers both synchronous and asynchronous implementations of these methods. We prefer to not block the thread and so we'll opt for the asynchronous flavors of these methods.</p>\n<h3>Creating a new file</h3>\n<p>To create a file, we can use the <code>writeFile</code> method. According to the documentation, there are a few ways to use it. The most straight forward way is:</p>\n<p>The code a<a href=\"https://gist.github.com/bgoonz/8898ad673bd2ecee9d93f8ec267cf213\" class=\"markup--anchor markup--p-anchor\">create-a-nnew-file.js (github.com)</a>bove will create a new file called <code>foo.txt</code> in the same directory as our <code>change-some-file.js</code> script. It will write the string <code>'Hello world!'</code> into that newly created file. The third argument specifies the encoding of the characters. There are different ways to encode characters; <a href=\"https://en.wikipedia.org/wiki/UTF-8\" class=\"markup--anchor markup--p-anchor\">UTF-8</a> is the most common and you'll use this in most scenarios. The fourth argument to <code>writeFile</code> is a callback that will be invoked when the write operation is complete. The docs indicate that if there is an error during the operation (such as an invalid encoding argument), an error object will be passed into the callback. This type of error handling is quite common for asynchronous functions. Like we are used to, since <code>writeFile</code> is asynchronous, we need to utilize <em>callback chaining</em> if we want to guarantee that commands occur <em>after</em> the write is complete or fails.</p>\n<p><em>Beware! If the file name specified to</em> <code>writeFile</code> <em>already exists, it will completely overwrite the contents of that file.</em></p>\n<p>We won’t be using the <code>foo.txt</code> file in the rest of this reading.</p>\n<h3>Reading existing files</h3>\n<p>To explore how to read a file, we’ll use VSCode to manually create a <code>poetry.txt</code> file within the same directory as our <code>change-some-file.js</code> script. Be sure to create this if you are following along.</p>\n<p>Our <code>poetry.txt</code> file will contain the following lines:</p>\n<pre><code>My code fails\n\nI do not know why\n\nMy code works\n\nI do not know why\n</code></pre>\n<p>We can use the <code>readFile</code> method to read the contents of this file. The method accepts very similar arguments to <code>writeFile</code>, except that the callback may be passed an error object and string containing the file contents. In the snippet below, we have replaced our previous <code>writeFile</code> code with <code>readFile</code>:</p>\n<blockquote>\n<p>Running the code above would print the following in the terminal:</p>\n</blockquote>\n<pre><code>THE CONTENTS ARE:\n\nMy code fails\n\nI do not know why\n\nMy code works\n\nI do not know why\n</code></pre>\n<p>Success! From here, you can do anything you please with the data read from the file. For example, since <code>data</code> is a string, we could split the string on the newline character <code>\\n</code> to obtain an array of the file's lines:</p>\n<pre><code>THE CONTENTS ARE:\n\n[ 'My code fails',\n\n'I do not know why',\n\n'My code works',\n\n'I do not know why' ]\n\nThe third line is My code works\n</code></pre>\n<h3>File I/O</h3>\n<p><em>Using the same</em> <code>poetry.txt</code> <em>file from before:</em></p>\n<pre><code>My code fails\n\nI do not know why\n\nMy code works\n\nI do not know why\n</code></pre>\n<p>Let’s replace occurrences of the phrase ‘do not’ with the word ‘should’.</p>\n<p>We can read the contents of the file as a string, manipulate this string, then write this new string back into the file.</p>\n<p>We’ll need to utilize callback chaining in order for this to work since our file I/O is asynchronous:</p>\n<p>Executing the script above will edit the <code>poetry.txt</code> file to contain:</p>\n<pre><code>My code fails\n\nI should know why\n\nMy code works\n\nI should know why\n</code></pre>\n<h4>Refactor:</h4>\n<h4>If you found this guide helpful feel free to checkout my github/gists where I host similar content:</h4>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--p-anchor\">bgoonz’s gists · GitHub</a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>"},{"url":"/docs/docs/es-6-features/","relativePath":"docs/docs/es-6-features.md","relativeDir":"docs/docs","base":"es-6-features.md","name":"es-6-features","frontmatter":{"title":"ECMAScript 6","weight":0,"excerpt":"is the latest version of the ECMAScript standard","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Introduction</h2>\n<p>ECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard.  ES6 is a significant update to the language, and the first update to the language since ES5 was standardized in 2009. Implementation of these features in major JavaScript engines is <a href=\"http://kangax.github.io/es5-compat-table/es6/\">underway now</a>.</p>\n<p>See the <a href=\"http://www.ecma-international.org/ecma-262/6.0/\">ES6 standard</a> for full specification of the ECMAScript 6 language.</p>\n<p>ES6 includes the following new features:</p>\n<ul>\n<li><a href=\"#arrows\">arrows</a></li>\n<li><a href=\"#classes\">classes</a></li>\n<li><a href=\"#enhanced-object-literals\">enhanced object literals</a></li>\n<li><a href=\"#template-strings\">template strings</a></li>\n<li><a href=\"#destructuring\">destructuring</a></li>\n<li><a href=\"#default--rest--spread\">default + rest + spread</a></li>\n<li><a href=\"#let--const\">let + const</a></li>\n<li><a href=\"#iterators--forof\">iterators + for..of</a></li>\n<li><a href=\"#generators\">generators</a></li>\n<li><a href=\"#unicode\">unicode</a></li>\n<li><a href=\"#modules\">modules</a></li>\n<li><a href=\"#module-loaders\">module loaders</a></li>\n<li><a href=\"#map--set--weakmap--weakset\">map + set + weakmap + weakset</a></li>\n<li><a href=\"#proxies\">proxies</a></li>\n<li><a href=\"#symbols\">symbols</a></li>\n<li><a href=\"#subclassable-built-ins\">subclassable built-ins</a></li>\n<li><a href=\"#promises\">promises</a></li>\n<li><a href=\"#math--number--string--array--object-apis\">math + number + string + array + object APIs</a></li>\n<li><a href=\"#binary-and-octal-literals\">binary and octal literals</a></li>\n<li><a href=\"#reflect-api\">reflect api</a></li>\n<li><a href=\"#tail-calls\">tail calls</a></li>\n</ul>\n<h2>ECMAScript 6 Features</h2>\n<h3>Arrows</h3>\n<p>Arrows are a function shorthand using the <code>=></code> syntax.  They are syntactically similar to the related feature in C#, Java 8 and CoffeeScript.  They support both statement block bodies as well as expression bodies which return the value of the expression.  Unlike functions, arrows share the same lexical <code>this</code> as their surrounding code.</p>\n<pre><code class=\"language-JavaScript\">// Expression bodies\nvar odds = evens.map(v => v + 1);\nvar nums = evens.map((v, i) => v + i);\nvar pairs = evens.map(v => ({even: v, odd: v + 1}));\n\n// Statement bodies\nnums.forEach(v => {\n  if (v % 5 === 0)\n    fives.push(v);\n});\n\n// Lexical this\nvar bob = {\n  _name: \"Bob\",\n  _friends: [],\n  printFriends() {\n    this._friends.forEach(f =>\n      console.log(this._name + \" knows \" + f));\n  }\n}\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">MDN Arrow Functions</a></p>\n<h3>Classes</h3>\n<p>ES6 classes are a simple sugar over the prototype-based OO pattern.  Having a single convenient declarative form makes class patterns easier to use, and encourages interoperability.  Classes support prototype-based inheritance, super calls, instance and static methods and constructors.</p>\n<pre><code class=\"language-JavaScript\">class SkinnedMesh extends THREE.Mesh {\n  constructor(geometry, materials) {\n    super(geometry, materials);\n\n    this.idMatrix = SkinnedMesh.defaultMatrix();\n    this.bones = [];\n    this.boneMatrices = [];\n    //...\n  }\n  update(camera) {\n    //...\n    super.update();\n  }\n  get boneCount() {\n    return this.bones.length;\n  }\n  set matrixType(matrixType) {\n    this.idMatrix = SkinnedMesh[matrixType]();\n  }\n  static defaultMatrix() {\n    return new THREE.Matrix4();\n  }\n}\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes\">MDN Classes</a></p>\n<h3>Enhanced Object Literals</h3>\n<p>Object literals are extended to support setting the prototype at construction, shorthand for <code>foo: foo</code> assignments, defining methods, making super calls, and computing property names with expressions.  Together, these also bring object literals and class declarations closer together, and let object-based design benefit from some of the same conveniences.</p>\n<pre><code class=\"language-JavaScript\">var obj = {\n    // __proto__\n    __proto__: theProtoObj,\n    // Shorthand for 'handler: handler'\n    handler,\n    // Methods\n    toString() {\n     // Super calls\n     return \"d \" + super.toString();\n    },\n    // Computed (dynamic) property names\n    [ 'prop_' + (() => 42)() ]: 42\n};\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Object_literals\">MDN Grammar and types: Object literals</a></p>\n<h3>Template Strings</h3>\n<p>Template strings provide syntactic sugar for constructing strings.  This is similar to string interpolation features in Perl, Python and more.  Optionally, a tag can be added to allow the string construction to be customized, avoiding injection attacks or constructing higher level data structures from string contents.</p>\n<pre><code class=\"language-JavaScript\">// Basic literal string creation\n`In JavaScript '\\n' is a line-feed.`\n\n// Multiline strings\n`In JavaScript this is\n not legal.`\n\n// String interpolation\nvar name = \"Bob\", time = \"today\";\n`Hello ${name}, how are you ${time}?`\n\n// Construct an HTTP request prefix is used to interpret the replacements and construction\nPOST`http://foo.org/bar?a=${a}&#x26;b=${b}\n     Content-Type: application/json\n     X-Credentials: ${credentials}\n     { \"foo\": ${foo},\n       \"bar\": ${bar}}`(myOnReadyStateChangeHandler);\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings\">MDN Template Strings</a></p>\n<h3>Destructuring</h3>\n<p>Destructuring allows binding using pattern matching, with support for matching arrays and objects.  Destructuring is fail-soft, similar to standard object lookup <code>foo[\"bar\"]</code>, producing <code>undefined</code> values when not found.</p>\n<pre><code class=\"language-JavaScript\">// list matching\nvar [a, , b] = [1,2,3];\n\n// object matching\nvar { op: a, lhs: { op: b }, rhs: c }\n       = getASTNode()\n\n// object matching shorthand\n// binds `op`, `lhs` and `rhs` in scope\nvar {op, lhs, rhs} = getASTNode()\n\n// Can be used in parameter position\nfunction g({name: x}) {\n  console.log(x);\n}\ng({name: 5})\n\n// Fail-soft destructuring\nvar [a] = [];\na === undefined;\n\n// Fail-soft destructuring with defaults\nvar [a = 1] = [];\na === 1;\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment\">MDN Destructuring assignment</a></p>\n<h3>Default + Rest + Spread</h3>\n<p>Callee-evaluated default parameter values.  Turn an array into consecutive arguments in a function call.  Bind trailing parameters to an array.  Rest replaces the need for <code>arguments</code> and addresses common cases more directly.</p>\n<pre><code class=\"language-JavaScript\">function f(x, y=12) {\n  // y is 12 if not passed (or passed as undefined)\n  return x + y;\n}\nf(3) == 15\n</code></pre>\n<pre><code class=\"language-JavaScript\">function f(x, ...y) {\n  // y is an Array\n  return x * y.length;\n}\nf(3, \"hello\", true) == 6\n</code></pre>\n<pre><code class=\"language-JavaScript\">function f(x, y, z) {\n  return x + y + z;\n}\n// Pass each elem of array as argument\nf(...[1,2,3]) == 6\n</code></pre>\n<p>More MDN info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters\">Default parameters</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters\">Rest parameters</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator\">Spread Operator</a></p>\n<h3>Let + Const</h3>\n<p>Block-scoped binding constructs.  <code>let</code> is the new <code>var</code>.  <code>const</code> is single-assignment.  Static restrictions prevent use before assignment.</p>\n<pre><code class=\"language-JavaScript\">function f() {\n  {\n    let x;\n    {\n      // okay, block scoped name\n      const x = \"sneaky\";\n      // error, const\n      x = \"foo\";\n    }\n    // error, already declared in block\n    let x = \"inner\";\n  }\n}\n</code></pre>\n<p>More MDN info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let\">let statement</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const\">const statement</a></p>\n<h3>Iterators + For..Of</h3>\n<p>Iterator objects enable custom iteration like CLR IEnumerable or Java Iterable.  Generalize <code>for..in</code> to custom iterator-based iteration with <code>for..of</code>.  Don't require realizing an array, enabling lazy design patterns like LINQ.</p>\n<pre><code class=\"language-JavaScript\">let fibonacci = {\n  [Symbol.iterator]() {\n    let pre = 0, cur = 1;\n    return {\n      next() {\n        [pre, cur] = [cur, pre + cur];\n        return { done: false, value: cur }\n      }\n    }\n  }\n}\n\nfor (var n of fibonacci) {\n  // truncate the sequence at 1000\n  if (n > 1000)\n    break;\n  console.log(n);\n}\n</code></pre>\n<p>Iteration is based on these duck-typed interfaces (using <a href=\"http://typescriptlang.org\">TypeScript</a> type syntax for exposition only):</p>\n<pre><code class=\"language-TypeScript\">interface IteratorResult {\n  done: boolean;\n  value: any;\n}\ninterface Iterator {\n  next(): IteratorResult;\n}\ninterface Iterable {\n  [Symbol.iterator](): Iterator\n}\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of\">MDN for...of</a></p>\n<h3>Generators</h3>\n<p>Generators simplify iterator-authoring using <code>function*</code> and <code>yield</code>.  A function declared as function* returns a Generator instance.  Generators are subtypes of iterators which include additional  <code>next</code> and <code>throw</code>.  These enable values to flow back into the generator, so <code>yield</code> is an expression form which returns a value (or throws).</p>\n<p>Note: Can also be used to enable 'await'-like async programming, see also ES7 <code>await</code> proposal.</p>\n<pre><code class=\"language-JavaScript\">var fibonacci = {\n  [Symbol.iterator]: function*() {\n    var pre = 0, cur = 1;\n    for (;;) {\n      var temp = pre;\n      pre = cur;\n      cur += temp;\n      yield cur;\n    }\n  }\n}\n\nfor (var n of fibonacci) {\n  // truncate the sequence at 1000\n  if (n > 1000)\n    break;\n  console.log(n);\n}\n</code></pre>\n<p>The generator interface is (using <a href=\"http://typescriptlang.org\">TypeScript</a> type syntax for exposition only):</p>\n<pre><code class=\"language-TypeScript\">interface Generator extends Iterator {\n    next(value?: any): IteratorResult;\n    throw(exception: any);\n}\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols\">MDN Iteration protocols</a></p>\n<h3>Unicode</h3>\n<p>Non-breaking additions to support full Unicode, including new Unicode literal form in strings and new RegExp <code>u</code> mode to handle code points, as well as new APIs to process strings at the 21bit code points level.  These additions support building global apps in JavaScript.</p>\n<pre><code class=\"language-JavaScript\">// same as ES5.1\n\"𠮷\".length == 2\n\n// new RegExp behaviour, opt-in 'u'\n\"𠮷\".match(/./u)[0].length == 2\n\n// new form\n\"\\u{20BB7}\"==\"𠮷\"==\"\\uD842\\uDFB7\"\n\n// new String ops\n\"𠮷\".codePointAt(0) == 0x20BB7\n\n// for-of iterates code points\nfor(var c of \"𠮷\") {\n  console.log(c);\n}\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode\">MDN RegExp.prototype.unicode</a></p>\n<h3>Modules</h3>\n<p>Language-level support for modules for component definition.  Codifies patterns from popular JavaScript module loaders (AMD, CommonJS). Runtime behaviour defined by a host-defined default loader.  Implicitly async model - no code executes until requested modules are available and processed.</p>\n<pre><code class=\"language-JavaScript\">// lib/math.js\nexport function sum(x, y) {\n  return x + y;\n}\nexport var pi = 3.141593;\n</code></pre>\n<pre><code class=\"language-JavaScript\">// app.js\nimport * as math from \"lib/math\";\nalert(\"2π = \" + math.sum(math.pi, math.pi));\n</code></pre>\n<pre><code class=\"language-JavaScript\">// otherApp.js\nimport {sum, pi} from \"lib/math\";\nalert(\"2π = \" + sum(pi, pi));\n</code></pre>\n<p>Some additional features include <code>export default</code> and <code>export *</code>:</p>\n<pre><code class=\"language-JavaScript\">// lib/mathplusplus.js\nexport * from \"lib/math\";\nexport var e = 2.71828182846;\nexport default function(x) {\n    return Math.log(x);\n}\n</code></pre>\n<pre><code class=\"language-JavaScript\">// app.js\nimport ln, {pi, e} from \"lib/mathplusplus\";\nalert(\"2π = \" + ln(e)*pi*2);\n</code></pre>\n<p>More MDN info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import\">import statement</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export\">export statement</a></p>\n<h3>Module Loaders</h3>\n<p>Module loaders support:</p>\n<ul>\n<li>Dynamic loading</li>\n<li>State isolation</li>\n<li>Global namespace isolation</li>\n<li>Compilation hooks</li>\n<li>Nested virtualization</li>\n</ul>\n<p>The default module loader can be configured, and new loaders can be constructed to evaluate and load code in isolated or constrained contexts.</p>\n<pre><code class=\"language-JavaScript\">// Dynamic loading - 'System' is default loader\nSystem.import('lib/math').then(function(m) {\n  alert(\"2π = \" + m.sum(m.pi, m.pi));\n});\n\n// Create execution sandboxes - new Loaders\nvar loader = new Loader({\n  global: fixup(window) // replace 'console.log'\n});\nloader.eval(\"console.log('hello world!');\");\n\n// Directly manipulate module cache\nSystem.get('jquery');\nSystem.set('jquery', Module({$: $})); // WARNING: not yet finalized\n</code></pre>\n<h3>Map + Set + WeakMap + WeakSet</h3>\n<p>Efficient data structures for common algorithms.  WeakMaps provides leak-free object-key'd side tables.</p>\n<pre><code class=\"language-JavaScript\">// Sets\nvar s = new Set();\ns.add(\"hello\").add(\"goodbye\").add(\"hello\");\ns.size === 2;\ns.has(\"hello\") === true;\n\n// Maps\nvar m = new Map();\nm.set(\"hello\", 42);\nm.set(s, 34);\nm.get(s) == 34;\n\n// Weak Maps\nvar wm = new WeakMap();\nwm.set(s, { extra: 42 });\nwm.size === undefined\n\n// Weak Sets\nvar ws = new WeakSet();\nws.add({ data: 42 });\n// Because the added object has no other references, it will not be held in the set\n</code></pre>\n<p>More MDN info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\">Map</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\">Set</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\">WeakMap</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\">WeakSet</a></p>\n<h3>Proxies</h3>\n<p>Proxies enable creation of objects with the full range of behaviors available to host objects.  Can be used for interception, object virtualization, logging/profiling, etc.</p>\n<pre><code class=\"language-JavaScript\">// Proxying a normal object\nvar target = {};\nvar handler = {\n  get: function (receiver, name) {\n    return `Hello, ${name}!`;\n  }\n};\n\nvar p = new Proxy(target, handler);\np.world === 'Hello, world!';\n</code></pre>\n<pre><code class=\"language-JavaScript\">// Proxying a function object\nvar target = function () { return 'I am the target'; };\nvar handler = {\n  apply: function (receiver, ...args) {\n    return 'I am the proxy';\n  }\n};\n\nvar p = new Proxy(target, handler);\np() === 'I am the proxy';\n</code></pre>\n<p>There are traps available for all of the runtime-level meta-operations:</p>\n<pre><code class=\"language-JavaScript\">var handler =\n{\n  get:...,\n  set:...,\n  has:...,\n  deleteProperty:...,\n  apply:...,\n  construct:...,\n  getOwnPropertyDescriptor:...,\n  defineProperty:...,\n  getPrototypeOf:...,\n  setPrototypeOf:...,\n  enumerate:...,\n  ownKeys:...,\n  preventExtensions:...,\n  isExtensible:...\n}\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\">MDN Proxy</a></p>\n<h3>Symbols</h3>\n<p>Symbols enable access control for object state.  Symbols allow properties to be keyed by either <code>string</code> (as in ES5) or <code>symbol</code>.  Symbols are a new primitive type. Optional <code>description</code> parameter used in debugging - but is not part of identity.  Symbols are unique (like gensym), but not private since they are exposed via reflection features like <code>Object.getOwnPropertySymbols</code>.</p>\n<pre><code class=\"language-JavaScript\">var MyClass = (function() {\n\n  // module scoped symbol\n  var key = Symbol(\"key\");\n\n  function MyClass(privateData) {\n    this[key] = privateData;\n  }\n\n  MyClass.prototype = {\n    doStuff: function() {\n      ... this[key] ...\n    }\n  };\n\n  return MyClass;\n})();\n\nvar c = new MyClass(\"hello\")\nc[\"key\"] === undefined\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\">MDN Symbol</a></p>\n<h3>Subclassable Built-ins</h3>\n<p>In ES6, built-ins like <code>Array</code>, <code>Date</code> and DOM <code>Element</code>s can be subclassed.</p>\n<p>Object construction for a function named <code>Ctor</code> now uses two-phases (both virtually dispatched):</p>\n<ul>\n<li>Call <code>Ctor[@@create]</code> to allocate the object, installing any special behavior</li>\n<li>Invoke constructor on new instance to initialize</li>\n</ul>\n<p>The known <code>@@create</code> symbol is available via <code>Symbol.create</code>.  Built-ins now expose their <code>@@create</code> explicitly.</p>\n<pre><code class=\"language-JavaScript\">// Pseudo-code of Array\nclass Array {\n    constructor(...args) { /* ... */ }\n    static [Symbol.create]() {\n        // Install special [[DefineOwnProperty]]\n        // to magically update 'length'\n    }\n}\n\n// User code of Array subclass\nclass MyArray extends Array {\n    constructor(...args) { super(...args); }\n}\n\n// Two-phase 'new':\n// 1) Call @@create to allocate object\n// 2) Invoke constructor on new instance\nvar arr = new MyArray();\narr[1] = 12;\narr.length == 2\n</code></pre>\n<h3>Math + Number + String + Array + Object APIs</h3>\n<p>Many new library additions, including core Math libraries, Array conversion helpers, String helpers, and Object.assign for copying.</p>\n<pre><code class=\"language-JavaScript\">Number.EPSILON\nNumber.isInteger(Infinity) // false\nNumber.isNaN(\"NaN\") // false\n\nMath.acosh(3) // 1.762747174039086\nMath.hypot(3, 4) // 5\nMath.imul(Math.pow(2, 32) - 1, Math.pow(2, 32) - 2) // 2\n\n\"abcde\".includes(\"cd\") // true\n\"abc\".repeat(3) // \"abcabcabc\"\n\nArray.from(document.querySelectorAll('*')) // Returns a real Array\nArray.of(1, 2, 3) // Similar to new Array(...), but without special one-arg behavior\n[0, 0, 0].fill(7, 1) // [0,7,7]\n[1, 2, 3].find(x => x == 3) // 3\n[1, 2, 3].findIndex(x => x == 2) // 1\n[1, 2, 3, 4, 5].copyWithin(3, 0) // [1, 2, 3, 1, 2]\n[\"a\", \"b\", \"c\"].entries() // iterator [0, \"a\"], [1,\"b\"], [2,\"c\"]\n[\"a\", \"b\", \"c\"].keys() // iterator 0, 1, 2\n[\"a\", \"b\", \"c\"].values() // iterator \"a\", \"b\", \"c\"\n\nObject.assign(Point, { origin: new Point(0,0) })\n</code></pre>\n<p>More MDN info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\">Number</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math\">Math</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from\">Array.from</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of\">Array.of</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin\">Array.prototype.copyWithin</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\">Object.assign</a></p>\n<h3>Binary and Octal Literals</h3>\n<p>Two new numeric literal forms are added for binary (<code>b</code>) and octal (<code>o</code>).</p>\n<pre><code class=\"language-JavaScript\">0b111110111 === 503 // true\n0o767 === 503 // true\n</code></pre>\n<h3>Promises</h3>\n<p>Promises are a library for asynchronous programming.  Promises are a first class representation of a value that may be made available in the future.  Promises are used in many existing JavaScript libraries.</p>\n<pre><code class=\"language-JavaScript\">function timeout(duration = 0) {\n    return new Promise((resolve, reject) => {\n        setTimeout(resolve, duration);\n    })\n}\n\nvar p = timeout(1000).then(() => {\n    return timeout(2000);\n}).then(() => {\n    throw new Error(\"hmm\");\n}).catch(err => {\n    return Promise.all([timeout(100), timeout(200)]);\n})\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\">MDN Promise</a></p>\n<h3>Reflect API</h3>\n<p>Full reflection API exposing the runtime-level meta-operations on objects.  This is effectively the inverse of the Proxy API, and allows making calls corresponding to the same meta-operations as the proxy traps.  Especially useful for implementing proxies.</p>\n<pre><code class=\"language-JavaScript\">// No sample yet\n</code></pre>\n<p>More info: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\">MDN Reflect</a></p>\n<h3>Tail Calls</h3>\n<p>Calls in tail-position are guaranteed to not grow the stack unboundedly.  Makes recursive algorithms safe in the face of unbounded inputs.</p>\n<pre><code class=\"language-JavaScript\">function factorial(n, acc = 1) {\n    'use strict';\n    if (n &#x3C;= 1) return acc;\n    return factorial(n - 1, n * acc);\n}\n\n// Stack overflow in most implementations today,\n// but safe on arbitrary inputs in ES6\nfactorial(100000)\n</code></pre>"},{"url":"/docs/docs/git-repos/","relativePath":"docs/docs/git-repos.md","relativeDir":"docs/docs","base":"git-repos.md","name":"git-repos","frontmatter":{"title":"Git Repo List","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>My Repos:</h1>\n<ul>\n<li><a href=\"https://github.com/bgoonz/03-fetch-data\">https://github.com/bgoonz/03-fetch-data</a></li>\n<li><a href=\"https://github.com/bgoonz/a-whole-bunch-o-gatsby-templates\">https://github.com/bgoonz/a-whole-bunch-o-gatsby-templates</a></li>\n<li><a href=\"https://github.com/bgoonz/activity-box\">https://github.com/bgoonz/activity-box</a></li>\n<li><a href=\"https://github.com/bgoonz/All-Undergrad-Archive\">https://github.com/bgoonz/All-Undergrad-Archive</a></li>\n<li><a href=\"https://github.com/bgoonz/alternate-blog-theme\">https://github.com/bgoonz/alternate-blog-theme</a></li>\n<li><a href=\"https://github.com/bgoonz/anki-cards\">https://github.com/bgoonz/anki-cards</a></li>\n<li><a href=\"https://github.com/bgoonz/ask-me-anything\">https://github.com/bgoonz/ask-me-anything</a></li>\n<li><a href=\"https://github.com/bgoonz/atlassian-templates\">https://github.com/bgoonz/atlassian-templates</a></li>\n<li><a href=\"https://github.com/bgoonz/Authentication-Notes\">https://github.com/bgoonz/Authentication-Notes</a></li>\n<li><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\">https://github.com/bgoonz/bash-commands-walkthrough</a></li>\n<li><a href=\"https://github.com/bgoonz/bash-config-backup\">https://github.com/bgoonz/bash-config-backup</a></li>\n<li><a href=\"https://github.com/bgoonz/bash-shell-utility-functions\">https://github.com/bgoonz/bash-shell-utility-functions</a></li>\n<li><a href=\"https://github.com/bgoonz/bass-station\">https://github.com/bgoonz/bass-station</a></li>\n<li><a href=\"https://github.com/bgoonz/bgoonz\">https://github.com/bgoonz/bgoonz</a></li>\n<li><a href=\"https://github.com/bgoonz/BGOONZBLOG2.0STABLE\">https://github.com/bgoonz/BGOONZBLOG2.0STABLE</a></li>\n<li><a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\">https://github.com/bgoonz/BGOONZ<em>BLOG</em>2.0</a></li>\n<li><a href=\"https://github.com/bgoonz/Binary-Search\">https://github.com/bgoonz/Binary-Search</a></li>\n<li><a href=\"https://github.com/bgoonz/blog-2.o-versions\">https://github.com/bgoonz/blog-2.o-versions</a></li>\n<li><a href=\"https://github.com/bgoonz/blog-templates\">https://github.com/bgoonz/blog-templates</a></li>\n<li><a href=\"https://github.com/bgoonz/blog-w-comments\">https://github.com/bgoonz/blog-w-comments</a></li>\n<li><a href=\"https://github.com/bgoonz/Blog2.0-August-Super-Stable\">https://github.com/bgoonz/Blog2.0-August-Super-Stable</a></li>\n<li><a href=\"https://github.com/bgoonz/bootstrap-sidebar-template\">https://github.com/bgoonz/bootstrap-sidebar-template</a></li>\n<li><a href=\"https://github.com/bgoonz/callbacks\">https://github.com/bgoonz/callbacks</a></li>\n<li><a href=\"https://github.com/bgoonz/Comments\">https://github.com/bgoonz/Comments</a></li>\n<li><a href=\"https://github.com/bgoonz/commercejs-nextjs-demo-store\">https://github.com/bgoonz/commercejs-nextjs-demo-store</a></li>\n<li><a href=\"https://github.com/bgoonz/Common-npm-Readme-Compilation\">https://github.com/bgoonz/Common-npm-Readme-Compilation</a></li>\n<li><a href=\"https://github.com/bgoonz/Comparing-Web-Development-Bootcamps-2021\">https://github.com/bgoonz/Comparing-Web-Development-Bootcamps-2021</a></li>\n<li><a href=\"https://github.com/bgoonz/Connect-Four-Final-Version\">https://github.com/bgoonz/Connect-Four-Final-Version</a></li>\n<li><a href=\"https://github.com/bgoonz/convert-folder-contents-2-website\">https://github.com/bgoonz/convert-folder-contents-2-website</a></li>\n<li><a href=\"https://github.com/bgoonz/Copy-2-Clipboard-jQuery\">https://github.com/bgoonz/Copy-2-Clipboard-jQuery</a></li>\n<li><a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\">https://github.com/bgoonz/Data-Structures-Algos-Codebase</a></li>\n<li><a href=\"https://github.com/bgoonz/DATA_STRUC_PYTHON_NOTES\">https://github.com/bgoonz/DATA<em>STRUC</em>PYTHON_NOTES</a></li>\n<li><a href=\"https://github.com/bgoonz/design-home-page-with-routes-bq5v7k\">https://github.com/bgoonz/design-home-page-with-routes-bq5v7k</a></li>\n<li><a href=\"https://github.com/bgoonz/docs-collection\">https://github.com/bgoonz/docs-collection</a></li>\n<li><a href=\"https://github.com/bgoonz/Documentation-site-react\">https://github.com/bgoonz/Documentation-site-react</a></li>\n<li><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\">https://github.com/bgoonz/DS-ALGO-OFFICIAL</a></li>\n<li><a href=\"https://github.com/bgoonz/DS-AND-ALGO-Notes-P2\">https://github.com/bgoonz/DS-AND-ALGO-Notes-P2</a></li>\n<li><a href=\"https://github.com/bgoonz/ecommerce-interactive\">https://github.com/bgoonz/ecommerce-interactive</a></li>\n<li><a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground\">https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground</a></li>\n<li><a href=\"https://github.com/bgoonz/excel2html-table\">https://github.com/bgoonz/excel2html-table</a></li>\n<li><a href=\"https://github.com/bgoonz/Exploring-Promises\">https://github.com/bgoonz/Exploring-Promises</a></li>\n<li><a href=\"https://github.com/bgoonz/express-API-template\">https://github.com/bgoonz/express-API-template</a></li>\n<li><a href=\"https://github.com/bgoonz/Express-basic-server-template\">https://github.com/bgoonz/Express-basic-server-template</a></li>\n<li><a href=\"https://github.com/bgoonz/express-knex-postgres-boilerplate\">https://github.com/bgoonz/express-knex-postgres-boilerplate</a></li>\n<li><a href=\"https://github.com/bgoonz/EXPRESS-NOTES\">https://github.com/bgoonz/EXPRESS-NOTES</a></li>\n<li><a href=\"https://github.com/bgoonz/fast-fourier-transform-\">https://github.com/bgoonz/fast-fourier-transform-</a></li>\n<li><a href=\"https://github.com/bgoonz/form-builder-vanilla-js\">https://github.com/bgoonz/form-builder-vanilla-js</a></li>\n<li><a href=\"https://github.com/bgoonz/Front-End-Frameworks-Practice\">https://github.com/bgoonz/Front-End-Frameworks-Practice</a></li>\n<li><a href=\"https://github.com/bgoonz/full-stack-react-redux\">https://github.com/bgoonz/full-stack-react-redux</a></li>\n<li><a href=\"https://github.com/bgoonz/Full-Text-Search\">https://github.com/bgoonz/Full-Text-Search</a></li>\n<li><a href=\"https://github.com/bgoonz/Games\">https://github.com/bgoonz/Games</a></li>\n<li><a href=\"https://github.com/bgoonz/gatsby-netlify-cms-norwex\">https://github.com/bgoonz/gatsby-netlify-cms-norwex</a></li>\n<li><a href=\"https://github.com/bgoonz/gatsby-react-portfolio\">https://github.com/bgoonz/gatsby-react-portfolio</a></li>\n<li><a href=\"https://github.com/bgoonz/GIT-CDN-FILES\">https://github.com/bgoonz/GIT-CDN-FILES</a></li>\n<li><a href=\"https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL\">https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL</a></li>\n<li><a href=\"https://github.com/bgoonz/gitbook\">https://github.com/bgoonz/gitbook</a></li>\n<li><a href=\"https://github.com/bgoonz/github-readme-stats\">https://github.com/bgoonz/github-readme-stats</a></li>\n<li><a href=\"https://github.com/bgoonz/github-reference-repo\">https://github.com/bgoonz/github-reference-repo</a></li>\n<li><a href=\"https://github.com/bgoonz/GoalsTracker\">https://github.com/bgoonz/GoalsTracker</a></li>\n<li><a href=\"https://github.com/bgoonz/graphql-experimentation\">https://github.com/bgoonz/graphql-experimentation</a></li>\n<li><a href=\"https://github.com/bgoonz/https___mihirbeg.com_\">https://github.com/bgoonz/https<em>__mihirbeg.com</em></a></li>\n<li><a href=\"https://github.com/bgoonz/iframe-showcase\">https://github.com/bgoonz/iframe-showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/Image-Archive-Traning-Data\">https://github.com/bgoonz/Image-Archive-Traning-Data</a></li>\n<li><a href=\"https://github.com/bgoonz/Independent-Blog-Entries\">https://github.com/bgoonz/Independent-Blog-Entries</a></li>\n<li><a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\">https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE</a></li>\n<li><a href=\"https://github.com/bgoonz/JAMSTACK-TEMPLATES\">https://github.com/bgoonz/JAMSTACK-TEMPLATES</a></li>\n<li><a href=\"https://github.com/bgoonz/Javascript-Best-Practices_--Tools\">https://github.com/bgoonz/Javascript-Best-Practices_--Tools</a></li>\n<li><a href=\"https://github.com/bgoonz/jsanimate\">https://github.com/bgoonz/jsanimate</a></li>\n<li><a href=\"https://github.com/bgoonz/Jupyter-Notebooks\">https://github.com/bgoonz/Jupyter-Notebooks</a></li>\n<li><a href=\"https://github.com/bgoonz/Lambda\">https://github.com/bgoonz/Lambda</a></li>\n<li><a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\">https://github.com/bgoonz/Lambda-Resource-Static-Assets</a></li>\n<li><a href=\"https://github.com/bgoonz/learning-nextjs\">https://github.com/bgoonz/learning-nextjs</a></li>\n<li><a href=\"https://github.com/bgoonz/Learning-Redux\">https://github.com/bgoonz/Learning-Redux</a></li>\n<li><a href=\"https://github.com/bgoonz/Links-Shortcut-Site\">https://github.com/bgoonz/Links-Shortcut-Site</a></li>\n<li><a href=\"https://github.com/bgoonz/live-examples\">https://github.com/bgoonz/live-examples</a></li>\n<li><a href=\"https://github.com/bgoonz/live-form\">https://github.com/bgoonz/live-form</a></li>\n<li><a href=\"https://github.com/bgoonz/loadash-es6-refactor\">https://github.com/bgoonz/loadash-es6-refactor</a></li>\n<li><a href=\"https://github.com/bgoonz/markdown-css\">https://github.com/bgoonz/markdown-css</a></li>\n<li><a href=\"https://github.com/bgoonz/Markdown-Templates\">https://github.com/bgoonz/Markdown-Templates</a></li>\n<li><a href=\"https://github.com/bgoonz/meditation-app\">https://github.com/bgoonz/meditation-app</a></li>\n<li><a href=\"https://github.com/bgoonz/MihirBegMusicLab\">https://github.com/bgoonz/MihirBegMusicLab</a></li>\n<li><a href=\"https://github.com/bgoonz/MihirBegMusicV3\">https://github.com/bgoonz/MihirBegMusicV3</a></li>\n<li><a href=\"https://github.com/bgoonz/Mihir_Beg_Final\">https://github.com/bgoonz/Mihir<em>Beg</em>Final</a></li>\n<li><a href=\"https://github.com/bgoonz/mini-project-showcase\">https://github.com/bgoonz/mini-project-showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard\">https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard</a></li>\n<li><a href=\"https://github.com/bgoonz/my-gists\">https://github.com/bgoonz/my-gists</a></li>\n<li><a href=\"https://github.com/bgoonz/My-Medium-Blog\">https://github.com/bgoonz/My-Medium-Blog</a></li>\n<li><a href=\"https://github.com/bgoonz/nextjs-netlify-blog-template\">https://github.com/bgoonz/nextjs-netlify-blog-template</a></li>\n<li><a href=\"https://github.com/bgoonz/norwex-coff-ecom\">https://github.com/bgoonz/norwex-coff-ecom</a></li>\n<li><a href=\"https://github.com/bgoonz/old-c-and-cpp-repos-from-undergrad\">https://github.com/bgoonz/old-c-and-cpp-repos-from-undergrad</a></li>\n<li><a href=\"https://github.com/bgoonz/old-code-from-undergrad\">https://github.com/bgoonz/old-code-from-undergrad</a></li>\n<li><a href=\"https://github.com/bgoonz/picture-man-bob-v2\">https://github.com/bgoonz/picture-man-bob-v2</a></li>\n<li><a href=\"https://github.com/bgoonz/Project-Showcase\">https://github.com/bgoonz/Project-Showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/promises-with-async-and-await\">https://github.com/bgoonz/promises-with-async-and-await</a></li>\n<li><a href=\"https://github.com/bgoonz/psql-practice\">https://github.com/bgoonz/psql-practice</a></li>\n<li><a href=\"https://github.com/bgoonz/python-playground-embed\">https://github.com/bgoonz/python-playground-embed</a></li>\n<li><a href=\"https://github.com/bgoonz/python-practice-notes\">https://github.com/bgoonz/python-practice-notes</a></li>\n<li><a href=\"https://github.com/bgoonz/python-scripts\">https://github.com/bgoonz/python-scripts</a></li>\n<li><a href=\"https://github.com/bgoonz/PYTHON_PRAC\">https://github.com/bgoonz/PYTHON_PRAC</a></li>\n<li><a href=\"https://github.com/bgoonz/random-list-of-embedable-content\">https://github.com/bgoonz/random-list-of-embedable-content</a></li>\n<li><a href=\"https://hub.com/bgoonz/random-static-html-page-deploy\">https://hub.com/bgoonz/random-static-html-page-deploy</a></li>\n<li><a href=\"https://hub.com/bgoonz/React-movie-app\">https://hub.com/bgoonz/React-movie-app</a></li>\n<li><a href=\"https://hub.com/bgoonz/react-redux-medium-clone\">https://hub.com/bgoonz/react-redux-medium-clone</a></li>\n<li><a href=\"https://hub.com/bgoonz/react-redux-notes-v5\">https://hub.com/bgoonz/react-redux-notes-v5</a></li>\n<li><a href=\"https://hub.com/bgoonz/react-redux-registration-login-example\">https://hub.com/bgoonz/react-redux-registration-login-example</a></li>\n<li><a href=\"https://hub.com/bgoonz/React_Notes_V3\">https://hub.com/bgoonz/React<em>Notes</em>V3</a></li>\n<li><a href=\"https://hub.com/bgoonz/Recursion-Practice-Website\">https://hub.com/bgoonz/Recursion-Practice-Website</a></li>\n<li><a href=\"https://hub.com/bgoonz/Regex-and-Express-JS\">https://hub.com/bgoonz/Regex-and-Express-JS</a></li>\n<li><a href=\"https://hub.com/bgoonz/repo-utils\">https://hub.com/bgoonz/repo-utils</a></li>\n<li><a href=\"https://hub.com/bgoonz/resume-cv-portfolio-samples\">https://hub.com/bgoonz/resume-cv-portfolio-samples</a></li>\n<li><a href=\"https://hub.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering\">https://hub.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering</a></li>\n<li><a href=\"https://hub.com/bgoonz/scope-closure-context\">https://hub.com/bgoonz/scope-closure-context</a></li>\n<li><a href=\"https://hub.com/bgoonz/Shell-Script-Practice\">https://hub.com/bgoonz/Shell-Script-Practice</a></li>\n<li><a href=\"https://hub.com/bgoonz/site-analysis\">https://hub.com/bgoonz/site-analysis</a></li>\n<li><a href=\"https://hub.com/bgoonz/sorting-algorithms\">https://hub.com/bgoonz/sorting-algorithms</a></li>\n<li><a href=\"https://hub.com/bgoonz/sorting-algos\">https://hub.com/bgoonz/sorting-algos</a></li>\n<li><a href=\"https://hub.com/bgoonz/sqlite3-nodejs-demo\">https://hub.com/bgoonz/sqlite3-nodejs-demo</a></li>\n<li><a href=\"https://hub.com/bgoonz/stalk-photos-web-assets\">https://hub.com/bgoonz/stalk-photos-web-assets</a></li>\n<li><a href=\"https://hub.com/bgoonz/Standalone-Metranome\">https://hub.com/bgoonz/Standalone-Metranome</a></li>\n<li><a href=\"https://hub.com/bgoonz/Star-wars-API-Promise-take2\">https://hub.com/bgoonz/Star-wars-API-Promise-take2</a></li>\n<li><a href=\"https://hub.com/bgoonz/Static-Study-Site\">https://hub.com/bgoonz/Static-Study-Site</a></li>\n<li><a href=\"https://hub.com/bgoonz/styling-templates\">https://hub.com/bgoonz/styling-templates</a></li>\n<li><a href=\"https://hub.com/bgoonz/supertemp\">https://hub.com/bgoonz/supertemp</a></li>\n<li><a href=\"https://hub.com/bgoonz/Ternary-converter\">https://hub.com/bgoonz/Ternary-converter</a></li>\n<li><a href=\"https://hub.com/bgoonz/TetrisJS\">https://hub.com/bgoonz/TetrisJS</a></li>\n<li><a href=\"https://hub.com/bgoonz/TexTools\">https://hub.com/bgoonz/TexTools</a></li>\n<li><a href=\"https://hub.com/bgoonz/The-Algorithms\">https://hub.com/bgoonz/The-Algorithms</a></li>\n<li><a href=\"https://hub.com/bgoonz/TRASH\">https://hub.com/bgoonz/TRASH</a></li>\n<li><a href=\"https://hub.com/bgoonz/Triggered-Guitar-Effects-Platform\">https://hub.com/bgoonz/Triggered-Guitar-Effects-Platform</a></li>\n<li><a href=\"https://hub.com/bgoonz/Useful-Snippets-js\">https://hub.com/bgoonz/Useful-Snippets-js</a></li>\n<li><a href=\"https://hub.com/bgoonz/UsefulResourceRepo2.0\">https://hub.com/bgoonz/UsefulResourceRepo2.0</a></li>\n<li><a href=\"https://hub.com/bgoonz/vscode-customized-config\">https://hub.com/bgoonz/vscode-customized-config</a></li>\n<li><a href=\"https://hub.com/bgoonz/vscode-Extension-readmes\">https://hub.com/bgoonz/vscode-Extension-readmes</a></li>\n<li><a href=\"https://hub.com/bgoonz/web-crawler-node\">https://hub.com/bgoonz/web-crawler-node</a></li>\n<li><a href=\"https://hub.com/bgoonz/web-dev-interview-prep-quiz-website\">https://hub.com/bgoonz/web-dev-interview-prep-quiz-website</a></li>\n<li><a href=\"https://hub.com/bgoonz/web-dev-notes-resource-site\">https://hub.com/bgoonz/web-dev-notes-resource-site</a></li>\n<li><a href=\"https://hub.com/bgoonz/web-dev-setup-checker\">https://hub.com/bgoonz/web-dev-setup-checker</a></li>\n<li><a href=\"https://hub.com/bgoonz/WEB-DEV-TOOLS-HUB\">https://hub.com/bgoonz/WEB-DEV-TOOLS-HUB</a></li>\n<li><a href=\"https://hub.com/bgoonz/web-dev-utils-package\">https://hub.com/bgoonz/web-dev-utils-package</a></li>\n<li><a href=\"https://hub.com/bgoonz/WebAudioDaw\">https://hub.com/bgoonz/WebAudioDaw</a></li>\n<li><a href=\"https://hub.com/bgoonz/website\">https://hub.com/bgoonz/website</a></li>\n</ul>"},{"url":"/docs/docs/","relativePath":"docs/docs/index.md","relativeDir":"docs/docs","base":"index.md","name":"index","frontmatter":{"title":"Docs","weight":0,"excerpt":"Documentation","seo":{"title":"Documentation","description":"Documentation","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>\\</p>\n<br>\n<h1>My DevDocs Deploy</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://devdecs42.herokuapp.com/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<ul>\n<li><a href=\"https://bgoonz-blog.netlify.app/job-hunt/\">/job-hunt/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/notes-template/\">/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/\">/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/showcase/\">/showcase/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/\">/blog/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/review/\">/review/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/blog-archive/\">/blog/blog-archive/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/my-medium/\">/blog/my-medium/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/blogwcomments/\">/blog/blogwcomments/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/data-structures/\">/blog/data-structures/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/gallery/\">/docs/gallery/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python-for-js-dev/\">/blog/python-for-js-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/platform-docs/\">/blog/platform-docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/sitemap/\">/docs/sitemap/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/me/\">/docs/about/me/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python-resources/\">/blog/python-resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/resume/\">/docs/about/resume/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/\">/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/web-scraping/\">/blog/web-scraping/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/\">/docs/about/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/algo/\">/docs/articles/algo/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/install/\">/docs/articles/install/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/\">/docs/articles/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/gallery/\">/docs/articles/gallery/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/intro/\">/docs/articles/intro/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev/\">/docs/articles/basic-web-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/reading-files/\">/docs/articles/reading-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/writing-files/\">/docs/articles/writing-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/audio/\">/docs/audio/audio/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/projects/\">/docs/content/projects/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/terms/\">/docs/audio/terms/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/\">/docs/faq/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/community/\">/docs/community/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/resources/\">/docs/articles/resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/\">/docs/content/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-repos/\">/docs/docs/git-repos/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/trouble-shooting/\">/docs/content/trouble-shooting/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/python/\">/docs/articles/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/clock/\">/docs/interact/clock/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/python/\">/docs/docs/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/jupyter-notebooks/\">/docs/interact/jupyter-notebooks/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/\">/docs/interact/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/contact/\">/docs/faq/contact/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/docs/\">/docs/quick-reference/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/other-sites/\">/docs/interact/other-sites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions/\">/docs/quick-reference/new-repo-instructions/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet/\">/docs/quick-reference/Emmet/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/installation/\">/docs/quick-reference/installation/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/vscode-themes/\">/docs/quick-reference/vscode-themes/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/createReactApp/\">/docs/react/createReactApp/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/react2/\">/docs/react/react2/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/\">/docs/quick-reference/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/\">/docs/react/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/\">/docs/tools/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/notes-template/\">/docs/tools/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/more-tools/\">/docs/tools/more-tools/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/plug-ins/\">/docs/tools/plug-ins/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/install/\">/docs/articles/node/install/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/vscode/\">/docs/tools/vscode/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/intro/\">/docs/articles/node/intro/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/nodejs/\">/docs/articles/node/nodejs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/nodevsbrowser/\">/docs/articles/node/nodevsbrowser/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/npm/\">/docs/articles/node/npm/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/reading-files/\">/docs/articles/node/reading-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/writing-files/\">/docs/articles/node/writing-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react-in-depth/\">/docs/react-in-depth/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/article-compilation/\">/docs/articles/article-compilation/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/my-websites/\">/docs/medium/my-websites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/social/\">/docs/medium/social/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/medium-links/\">/docs/medium/medium-links/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/\">/docs/medium/</a></li>\n</ul>"},{"url":"/docs/docs/jamstack/","relativePath":"docs/docs/jamstack.md","relativeDir":"docs/docs","base":"jamstack.md","name":"jamstack","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>Etiam facilisis lacus nec pretium lobortis. Praesent dapibus justo non efficitur efficitur. Nullam viverra justo arcu, eget egestas tortor pretium id. Sed imperdiet mattis eleifend. Vivamus suscipit et neque imperdiet venenatis.</p>\n<blockquote>\n<p>Vestibulum ullamcorper risus auctor eleifend consequat.</p>\n</blockquote>\n<p><img src=\"https://assets.stackbit.com/components/images/default/post-4.jpeg\" alt=\"Placeholder Image\"></p>\n<p>In malesuada sed urna eget vehicula. Donec fermentum tortor sit amet nisl elementum fringilla. Pellentesque dapibus suscipit faucibus. Nullam malesuada sed urna quis rutrum. Donec facilisis lorem id maximus mattis. Vestibulum quis elit magna. Vestibulum accumsan blandit consequat. Phasellus quis posuere quam.</p>\n<p>Vivamus mollis in tellus ac ullamcorper. Vestibulum sit amet bibendum ipsum, vitae rutrum ex. Nullam cursus, urna et dapibus aliquam, urna leo euismod metus, eu luctus justo mi eget mauris. Proin felis leo, volutpat et purus in, lacinia luctus eros. Pellentesque lobortis massa scelerisque lorem ullamcorper, sit amet elementum nulla scelerisque. In volutpat efficitur nulla, aliquam ornare lectus ultricies ac. Mauris sagittis ornare dictum. Nulla vel felis ut purus fermentum pretium. Sed id lectus ac diam aliquet venenatis. Etiam ac auctor enim. Nunc velit mauris, viverra vel orci ut, egestas rhoncus diam. Morbi scelerisque nibh tellus, vel varius urna malesuada sed. Etiam ultricies sem consequat, posuere urna non, maximus ex. Mauris gravida diam sed augue condimentum pulvinar vel ac dui. Integer vel convallis justo.</p>"},{"url":"/docs/docs/git-reference/","relativePath":"docs/docs/git-reference.md","relativeDir":"docs/docs","base":"git-reference.md","name":"git-reference","frontmatter":{"title":"Git Reference","weight":0,"excerpt":"Git Reference","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Git Reference</h2>\n<iframe src=\"https://bgoonz.github.io/GIT_GUIDE_Bgoonz/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<p>Git is a distributed version control and source code management system.</p>\n<p>It does this through a series of snapshots of your project, and it works\nwith those snapshots to provide you with functionality to version and\nmanage your source code.</p>\n<h2>Versioning Concepts</h2>\n<h3>What is version control?</h3>\n<p>Version control is a system that records changes to a file(s), over time.</p>\n<h3>Centralized Versioning vs. Distributed Versioning</h3>\n<ul>\n<li>Centralized version control focuses on synchronizing, tracking, and backing\nup files.</li>\n<li>Distributed version control focuses on sharing changes. Every change has a\nunique id.</li>\n<li>Distributed systems have no defined structure. You could easily have a SVN\nstyle, centralized system, with git.</li>\n</ul>\n<p><a href=\"http://git-scm.com/book/en/Getting-Started-About-Version-Control\">Additional Information</a></p>\n<h3>Why Use Git?</h3>\n<ul>\n<li>Can work offline.</li>\n<li>Collaborating with others is easy!</li>\n<li>Branching is easy!</li>\n<li>Branching is fast!</li>\n<li>Merging is easy!</li>\n<li>Git is fast.</li>\n<li>Git is flexible.</li>\n</ul>\n<h2>Git Architecture</h2>\n<h3>Repository</h3>\n<p>A set of files, directories, historical records, commits, and heads. Imagine it\nas a source code data structure, with the attribute that each source code\n\"element\" gives you access to its revision history, among other things.</p>\n<p>A git repository is comprised of the .git directory &#x26; working tree.</p>\n<h3>.git Directory (component of repository)</h3>\n<p>The .git directory contains all the configurations, logs, branches, HEAD, and\nmore.\n<a href=\"http://gitready.com/advanced/2009/03/23/whats-inside-your-git-directory.html\">Detailed List.</a></p>\n<h3>Working Tree (component of repository)</h3>\n<p>This is basically the directories and files in your repository. It is often\nreferred to as your working directory.</p>\n<h3>Index (component of .git dir)</h3>\n<p>The Index is the staging area in git. It's basically a layer that separates\nyour working tree from the Git repository. This gives developers more power\nover what gets sent to the Git repository.</p>\n<h3>Commit</h3>\n<p>A git commit is a snapshot of a set of changes, or manipulations to your\nWorking Tree. For example, if you added 5 files, and removed 2 others, these\nchanges will be contained in a commit (or snapshot). This commit can then be\npushed to other repositories, or not!</p>\n<h3>Branch</h3>\n<p>A branch is essentially a pointer to the last commit you made. As you go on\ncommitting, this pointer will automatically update to point to the latest commit.</p>\n<h3>Tag</h3>\n<p>A tag is a mark on specific point in history. Typically people use this\nfunctionality to mark release points (v1.0, and so on).</p>\n<h3>HEAD and head (component of .git dir)</h3>\n<p>HEAD is a pointer that points to the current branch. A repository only has 1\n<em>active</em> HEAD.\nhead is a pointer that points to any commit. A repository can have any number\nof heads.</p>\n<h3>Stages of Git</h3>\n<ul>\n<li>Modified - Changes have been made to a file but file has not been committed\nto Git Database yet</li>\n<li>Staged - Marks a modified file to go into your next commit snapshot</li>\n<li>Committed - Files have been committed to the Git Database</li>\n</ul>\n<h3>Conceptual Resources</h3>\n<ul>\n<li><a href=\"http://eagain.net/articles/git-for-computer-scientists/\">Git For Computer Scientists</a></li>\n<li><a href=\"http://hoth.entp.com/output/git_for_designers.html\">Git For Designers</a></li>\n</ul>\n<h2>Commands</h2>\n<h3>init</h3>\n<p>Create an empty Git repository. The Git repository's settings, stored\ninformation, and more is stored in a directory (a folder) named \".git\".</p>\n<pre><code class=\"language-bash\">$ git init\n</code></pre>\n<h3>config</h3>\n<p>To configure settings. Whether it be for the repository, the system itself,\nor global configurations ( global config file is <code>~/.gitconfig</code> ).</p>\n<pre><code class=\"language-bash\"># Print &#x26; Set Some Basic Config Variables (Global)\n$ git config --global user.email \"MyEmail@Zoho.com\"\n$ git config --global user.name \"My Name\"\n</code></pre>\n<p><a href=\"http://git-scm.com/docs/git-config\">Learn More About git config.</a></p>\n<h3>help</h3>\n<p>To give you quick access to an extremely detailed guide of each command. Or to\njust give you a quick reminder of some semantics.</p>\n<pre><code class=\"language-bash\"># Quickly check available commands\n$ git help\n\n# Check all available commands\n$ git help -a\n\n# Command specific help - user manual\n# git help &#x3C;command_here>\n$ git help add\n$ git help commit\n$ git help init\n# or git &#x3C;command_here> --help\n$ git add --help\n$ git commit --help\n$ git init --help\n</code></pre>\n<h3>ignore files</h3>\n<p>To intentionally untrack file(s) &#x26; folder(s) from git. Typically meant for\nprivate &#x26; temp files which would otherwise be shared in the repository.</p>\n<pre><code class=\"language-bash\">$ echo \"temp/\" >> .gitignore\n$ echo \"private_key\" >> .gitignore\n</code></pre>\n<h3>status</h3>\n<p>To show differences between the index file (basically your working copy/repo)\nand the current HEAD commit.</p>\n<pre><code class=\"language-bash\"># Will display the branch, untracked files, changes and other differences\n$ git status\n\n# To learn other \"tid bits\" about git status\n$ git help status\n</code></pre>\n<h3>add</h3>\n<p>To add files to the staging area/index. If you do not <code>git add</code> new files to\nthe staging area/index, they will not be included in commits!</p>\n<pre><code class=\"language-bash\"># add a file in your current working directory\n$ git add HelloWorld.java\n\n# add a file in a nested dir\n$ git add /path/to/file/HelloWorld.c\n\n# Regular Expression support!\n$ git add ./*.java\n\n# You can also add everything in your working directory to the staging area.\n$ git add -A\n</code></pre>\n<p>This only adds a file to the staging area/index, it doesn't commit it to the\nworking directory/repo.</p>\n<h3>branch</h3>\n<p>Manage your branches. You can view, edit, create, delete branches using this\ncommand.</p>\n<pre><code class=\"language-bash\"># list existing branches &#x26; remotes\n$ git branch -a\n\n# create a new branch\n$ git branch myNewBranch\n\n# delete a branch\n$ git branch -d myBranch\n\n# rename a branch\n# git branch -m &#x3C;oldname> &#x3C;newname>\n$ git branch -m myBranchName myNewBranchName\n\n# edit a branch's description\n$ git branch myBranchName --edit-description\n</code></pre>\n<h3>tag</h3>\n<p>Manage your tags</p>\n<pre><code class=\"language-bash\"># List tags\n$ git tag\n\n# Create a annotated tag\n# The -m specifies a tagging message, which is stored with the tag.\n# If you don't specify a message for an annotated tag,\n# Git launches your editor so you can type it in.\n$ git tag -a v2.0 -m 'my version 2.0'\n\n# Show info about tag\n# That shows the tagger information, the date the commit was tagged,\n# and the annotation message before showing the commit information.\n$ git show v2.0\n\n# Push a single tag to remote\n$ git push origin v2.0\n\n# Push a lot of tags to remote\n$ git push origin --tags\n</code></pre>\n<h3>checkout</h3>\n<p>Updates all files in the working tree to match the version in the index, or\nspecified tree.</p>\n<pre><code class=\"language-bash\"># Checkout a repo - defaults to master branch\n$ git checkout\n\n# Checkout a specified branch\n$ git checkout branchName\n\n# Create a new branch &#x26; switch to it\n# equivalent to \"git branch &#x3C;name>; git checkout &#x3C;name>\"\n\n$ git checkout -b newBranch\n</code></pre>\n<h3>clone</h3>\n<p>Clones, or copies, an existing repository into a new directory. It also adds\nremote-tracking branches for each branch in the cloned repo, which allows you\nto push to a remote branch.</p>\n<pre><code class=\"language-bash\"># Clone learnxinyminutes-docs\n$ git clone https://github.com/adambard/learnxinyminutes-docs.git\n\n# shallow clone - faster cloning that pulls only latest snapshot\n$ git clone --depth 1 https://github.com/adambard/learnxinyminutes-docs.git\n\n# clone only a specific branch\n$ git clone -b master-cn https://github.com/adambard/learnxinyminutes-docs.git --single-branch\n</code></pre>\n<h3>commit</h3>\n<p>Stores the current contents of the index in a new \"commit.\" This commit\ncontains the changes made and a message created by the user.</p>\n<pre><code class=\"language-bash\"># commit with a message\n$ git commit -m \"Added multiplyNumbers() function to HelloWorld.c\"\n\n# signed commit with a message (user.signingkey must have been set\n# with your GPG key e.g. git config --global user.signingkey 5173AAD5)\n$ git commit -S -m \"signed commit message\"\n\n# automatically stage modified or deleted files, except new files, and then commit\n$ git commit -a -m \"Modified foo.php and removed bar.php\"\n\n# change last commit (this deletes previous commit with a fresh commit)\n$ git commit --amend -m \"Correct message\"\n</code></pre>\n<h3>diff</h3>\n<p>Shows differences between a file in the working directory, index and commits.</p>\n<pre><code class=\"language-bash\"># Show difference between your working dir and the index\n$ git diff\n\n# Show differences between the index and the most recent commit.\n$ git diff --cached\n\n# Show differences between your working dir and the most recent commit\n$ git diff HEAD\n</code></pre>\n<h3>grep</h3>\n<p>Allows you to quickly search a repository.</p>\n<p>Optional Configurations:</p>\n<pre><code class=\"language-bash\"># Thanks to Travis Jeffery for these\n# Set line numbers to be shown in grep search results\n$ git config --global grep.lineNumber true\n\n# Make search results more readable, including grouping\n$ git config --global alias.g \"grep --break --heading --line-number\"\n</code></pre>\n<pre><code class=\"language-bash\"># Search for \"variableName\" in all java files\n$ git grep 'variableName' -- '*.java'\n\n# Search for a line that contains \"arrayListName\" and, \"add\" or \"remove\"\n$ git grep -e 'arrayListName' --and \\( -e add -e remove \\)\n</code></pre>\n<p>Google is your friend; for more examples\n<a href=\"http://travisjeffery.com/b/2012/02/search-a-git-repo-like-a-ninja\">Git Grep Ninja</a></p>\n<h3>log</h3>\n<p>Display commits to the repository.</p>\n<pre><code class=\"language-bash\"># Show all commits\n$ git log\n\n# Show only commit message &#x26; ref\n$ git log --oneline\n\n# Show merge commits only\n$ git log --merges\n\n# Show all commits represented by an ASCII graph\n$ git log --graph\n</code></pre>\n<h3>merge</h3>\n<p>\"Merge\" in changes from external commits into the current branch.</p>\n<pre><code class=\"language-bash\"># Merge the specified branch into the current.\n$ git merge branchName\n\n# Always generate a merge commit when merging\n$ git merge --no-ff branchName\n</code></pre>\n<h3>mv</h3>\n<p>Rename or move a file</p>\n<pre><code class=\"language-bash\"># Renaming a file\n$ git mv HelloWorld.c HelloNewWorld.c\n\n# Moving a file\n$ git mv HelloWorld.c ./new/path/HelloWorld.c\n\n# Force rename or move\n# \"existingFile\" already exists in the directory, will be overwritten\n$ git mv -f myFile existingFile\n</code></pre>\n<h3>pull</h3>\n<p>Pulls from a repository and merges it with another branch.</p>\n<pre><code class=\"language-bash\"># Update your local repo, by merging in new changes\n# from the remote \"origin\" and \"master\" branch.\n# git pull &#x3C;remote> &#x3C;branch>\n$ git pull origin master\n\n# By default, git pull will update your current branch\n# by merging in new changes from its remote-tracking branch\n$ git pull\n\n# Merge in changes from remote branch and rebase\n# branch commits onto your local repo, like: \"git fetch &#x3C;remote> &#x3C;branch>, git\n# rebase &#x3C;remote>/&#x3C;branch>\"\n$ git pull origin master --rebase\n</code></pre>\n<h3>push</h3>\n<p>Push and merge changes from a branch to a remote &#x26; branch.</p>\n<pre><code class=\"language-bash\"># Push and merge changes from a local repo to a\n# remote named \"origin\" and \"master\" branch.\n# git push &#x3C;remote> &#x3C;branch>\n$ git push origin master\n\n# By default, git push will push and merge changes from\n# the current branch to its remote-tracking branch\n$ git push\n\n# To link up current local branch with a remote branch, add -u flag:\n$ git push -u origin master\n# Now, anytime you want to push from that same local branch, use shortcut:\n$ git push\n</code></pre>\n<h3>stash</h3>\n<p>Stashing takes the dirty state of your working directory and saves it on a\nstack of unfinished changes that you can reapply at any time.</p>\n<p>Let's say you've been doing some work in your git repo, but you want to pull\nfrom the remote. Since you have dirty (uncommitted) changes to some files, you\nare not able to run <code>git pull</code>. Instead, you can run <code>git stash</code> to save your\nchanges onto a stack!</p>\n<pre><code class=\"language-bash\">$ git stash\nSaved working directory and index state \\\n  \"WIP on master: 049d078 added the index file\"\n  HEAD is now at 049d078 added the index file\n  (To restore them type \"git stash apply\")\n</code></pre>\n<p>Now you can pull!</p>\n<pre><code class=\"language-bash\">git pull\n</code></pre>\n<p><code>...changes apply...</code></p>\n<p>Now check that everything is OK</p>\n<pre><code class=\"language-bash\">$ git status\n# On branch master\nnothing to commit, working directory clean\n</code></pre>\n<p>You can see what \"hunks\" you've stashed so far using <code>git stash list</code>.\nSince the \"hunks\" are stored in a Last-In-First-Out stack, our most recent\nchange will be at top.</p>\n<pre><code class=\"language-bash\">$ git stash list\nstash@{0}: WIP on master: 049d078 added the index file\nstash@{1}: WIP on master: c264051 Revert \"added file_size\"\nstash@{2}: WIP on master: 21d80a5 added number to log\n</code></pre>\n<p>Now let's apply our dirty changes back by popping them off the stack.</p>\n<pre><code class=\"language-bash\">$ git stash pop\n# On branch master\n# Changes not staged for commit:\n#   (use \"git add &#x3C;file>...\" to update what will be committed)\n#\n#      modified:   index.html\n#      modified:   lib/simplegit.rb\n#\n</code></pre>\n<p><code>git stash apply</code> does the same thing</p>\n<p>Now you're ready to get back to work on your stuff!</p>\n<p><a href=\"http://git-scm.com/book/en/v1/Git-Tools-Stashing\">Additional Reading.</a></p>\n<h3>rebase (caution)</h3>\n<p>Take all changes that were committed on one branch, and replay them onto\nanother branch.\n<em>Do not rebase commits that you have pushed to a public repo</em>.</p>\n<pre><code class=\"language-bash\"># Rebase experimentBranch onto master\n# git rebase &#x3C;basebranch> &#x3C;topicbranch>\n$ git rebase master experimentBranch\n</code></pre>\n<p><a href=\"http://git-scm.com/book/en/Git-Branching-Rebasing\">Additional Reading.</a></p>\n<h3>reset (caution)</h3>\n<p>Reset the current HEAD to the specified state. This allows you to undo merges,\npulls, commits, adds, and more. It's a great command but also dangerous if you\ndon't know what you are doing.</p>\n<pre><code class=\"language-bash\"># Reset the staging area, to match the latest commit (leaves dir unchanged)\n$ git reset\n\n# Reset the staging area, to match the latest commit, and overwrite working dir\n$ git reset --hard\n\n# Moves the current branch tip to the specified commit (leaves dir unchanged)\n# all changes still exist in the directory.\n$ git reset 31f2bb1\n\n# Moves the current branch tip backward to the specified commit\n# and makes the working dir match (deletes uncommitted changes and all commits\n# after the specified commit).\n$ git reset --hard 31f2bb1\n</code></pre>\n<h3>reflog (caution)</h3>\n<p>Reflog will list most of the git commands you have done for a given time period,\ndefault 90 days.</p>\n<p>This give you the chance to reverse any git commands that have gone wrong\n(for instance, if a rebase has broken your application).</p>\n<p>You can do this:</p>\n<ol>\n<li><code>git reflog</code> to list all of the git commands for the rebase</li>\n</ol>\n<pre><code>38b323f HEAD@{0}: rebase -i (finish): returning to refs/heads/feature/add_git_reflog\n38b323f HEAD@{1}: rebase -i (pick): Clarify inc/dec operators\n4fff859 HEAD@{2}: rebase -i (pick): Update java.html.markdown\n34ed963 HEAD@{3}: rebase -i (pick): [yaml/en] Add more resources (#1666)\ned8ddf2 HEAD@{4}: rebase -i (pick): pythonstatcomp spanish translation (#1748)\n2e6c386 HEAD@{5}: rebase -i (start): checkout 02fb96d\n</code></pre>\n<ol start=\"2\">\n<li>Select where to reset to, in our case its <code>2e6c386</code>, or <code>HEAD@{5}</code></li>\n<li>'git reset --hard HEAD@{5}' this will reset your repo to that head</li>\n<li>You can start the rebase again or leave it alone.</li>\n</ol>\n<p><a href=\"https://git-scm.com/docs/git-reflog\">Additional Reading.</a></p>\n<h3>revert</h3>\n<p>Revert can be used to undo a commit. It should not be confused with reset which\nrestores the state of a project to a previous point. Revert will add a new\ncommit which is the inverse of the specified commit, thus reverting it.</p>\n<pre><code class=\"language-bash\"># Revert a specified commit\n$ git revert &#x3C;commit>\n</code></pre>\n<h3>rm</h3>\n<p>The opposite of git add, git rm removes files from the current working tree.</p>\n<pre><code class=\"language-bash\"># remove HelloWorld.c\n$ git rm HelloWorld.c\n\n# Remove a file from a nested dir\n$ git rm /pather/to/the/file/HelloWorld.c\n</code></pre>\n<ul>\n<li><code>git checkout</code></li>\n<li><code>git reset</code></li>\n<li><code>git restore</code></li>\n<li><code>git switch</code></li>\n</ul>\n<p>I'll throw in one more, the misnamed <code>git revert</code>, as well.</p>\n<h3>From an end-user perspective</h3>\n<p>All you <em>need</em> are <code>git checkout</code>, <code>git reset</code>, and <code>git revert</code>. These commands have been in Git all along.</p>\n<p>But <code>git checkout</code> has, in effect, two <em>modes of operation</em>. One mode is \"safe\": it won't accidentally destroy any unsaved work. The other mode is \"unsafe\": if you use it, and it tells Git to wipe out some unsaved file, Git assumes that (a) you knew it meant that and (b) you really did mean to wipe out your unsaved file, so Git immediately wipes out your unsaved file.</p>\n<p>This is not very friendly, so the Git folks finally---after years of users griping---split <code>git checkout</code> into two new commands. This leads us to:</p>\n<h3>From a historical perspective</h3>\n<p><code>git restore</code> is <em>new</em>, having first come into existence in August 2019, in Git 2.23. <code>git reset</code> is very old, having been in Git all along, dating back to before 2005. Both commands have the ability to destroy unsaved work.</p>\n<p>The <code>git switch</code> command is also new, introduced along with <code>git restore</code> in Git 2.23. It implements the \"safe half\" of <code>git checkout</code>; <code>git restore</code> implements the \"unsafe half\".</p>\n<h3>When would you use which command?</h3>\n<p>This is the most complicated part, and to really understand it, we need to know the following items:</p>\n<ul>\n<li>Git is really all about <em>commits</em>. Commits get stored <em>in</em> the Git repository. The <code>git push</code> and <code>git fetch</code> commands transfer <em>commits</em>---whole commits, as an all-or-nothing deal^1^---to the other Git. You either have all of a commit, or you don't have it. Other commands, such as <code>git merge</code> or <code>git rebase</code>, all work with <em>local</em> commits. The <code>pull</code> command runs <code>fetch</code> (to get commits) followed by a second command to work with the commits once they're local.</li>\n<li>New commits <em>add to the repository</em>. You almost never <em>remove</em> a commit <em>from</em> the repository. Only one of the five commands listed here---checkout, reset, restore, revert, and switch---is capable of removing commits.^2^</li>\n<li>Each commit is numbered by its <em>hash ID</em>, which is unique to that one particular commit. It's actually computed from what's <em>in</em> the commit, which is how Git makes these numbers work across all Gits eveywhere. This means that what is in the commit is frozen for all time: if you change anything, what you get is a new commit with a new number, and the old commit is still there, with its same old number.</li>\n<li>Each commit stores two things: a snapshot, and metadata. The metadata include the hash ID(s) of some previous commit(s). This makes commits form backwards-looking chains.</li>\n<li>\n<p>A <em>branch name</em> holds the hash ID of one commit. This makes the branch name <em>find</em> that commit, which in turn means two things:</p>\n<ul>\n<li>that particular commit is the <em>tip commit</em> of that branch; and</li>\n<li>all commits leading up to and including that tip commit are <em>on</em> that branch.</li>\n</ul>\n</li>\n<li>We're also going to talk about Git's <em>index</em> in a moment, and your <em>working tree</em>. They're separate from these but worth mentioning early, especially since the index has three names: Git sometimes calls it the <em>index</em>, sometimes calls it the <em>staging area</em>, and sometimes---rarely these days---calls it the <em>cache</em>. All three names refer to the same thing.</li>\n</ul>\n<p>Everything up through the <em>branch name</em> is, I think, best understood via pictures (at least for most people). If we draw a series of commits, with newer commits towards the right, using <code>o</code> for each commit and omitting some commits for space or whatever, we get something like this:</p>\n<pre><code>        o--o---o   &#x3C;-- feature-top\n       /\\\no--o--o--o--...--o---o--o   &#x3C;-- main\n    \\               /\n     o--o--...--o--o   &#x3C;-- feature-hull\n</code></pre>\n<p>which, as you can see, is a boat repository. 😀 There are three branches. The mainline branch holds <em>every commit</em>, including all the commits on the top row and bottom (hull) row. The <code>feature-top</code> branch holds the top three commits and also the three commits along the main line to the left, but not any of the commits on the bottom row. All the connectors <em>between</em> commits are---well, <em>should be</em> but I don't have a good enough font---one-way arrows, pointing left, or down-and-left, or up-and-left.</p>\n<p>These \"arrows\", or one way connections from commit to commit, are technically <a href=\"https://math.stackexchange.com/a/31208\"><em>arcs</em>, or one-way edges</a>, in a <a href=\"https://en.wikipedia.org/wiki/Directed_graph\"><em>directed graph</em></a>. This directed graph is one without cycles, making it a Directed Acyclic Graph or <a href=\"https://en.wikipedia.org/wiki/Directed_acyclic_graph\">DAG</a>, which has a bunch of properties that are useful to Git.</p>\n<p>If you're just using Git to store files inside commits, all you really care about are the round <code>o</code> <a href=\"https://math.stackexchange.com/a/1441525\"><em>nodes</em> or <em>vertices</em> (again two words for the same thing)</a>, each of which acts to store your files, but you should at least be vaguely aware of how they are arranged. It matters, especially because of <em>merges</em>. Merge commits are those with two outgoing arcs, pointing backwards to two of what Git calls <em>parent commits</em>. The child commit is the one \"later\": just as human parents are always older than their children, Git parent commits are older than their children.</p>\n<p>We need one more thing, though: <strong>Where do new commits come from?</strong> We noted that what's in a commit---both the snapshot, holding all the files, and the metadata, holding the rest of the information Git keeps about a commit---is all read-only. Your files are not only frozen, they're also <em>transformed</em>, and the transformed data are then <em>de-duplicated</em>, so that even though every commit has a full snapshot of <em>every</em> file, the repository itself stays relatively slim. But this means that the files <em>in</em> a commit can only be <em>read</em> by Git, and <em>nothing</em>---not even Git itself---can <em>write</em> to them. They get saved once, and are de-duplicated from then on. The commits act as archives, almost like tar or rar or winzip or whatever.</p>\n<p>To work with a Git repository, then, we have to have Git <em>extract</em> the files. This takes the files <em>out</em> of some commit, turning those special archive-formatted things into regular, usable files. Note that Git may well be able to store files that your computer literally <em>can't</em> store: a classic example is a file named <code>aux.h</code>, for some C program, on a Windows machine. We won't go into all the details, but it is theoretically possible to still get work done with this repository, which was probably built on a Linux system, even if you're on a Windows system where you can't work with the <code>aux.h</code> file directly.</p>\n<p>Anyway, assuming there are no nasty little surprises like <code>aux.h</code>, you would just run <code>git checkout</code> or <code>git switch</code> to get some commit <em>out</em> of Git. This will fill in your <em>working tree</em>, populating it from the files stored in the <em>tip commit</em> of some branch. The <em>tip commit</em> is, again, the <em>last</em> commit on that branch, as found by the <em>branch name</em>. Your <code>git checkout</code> or <code>git switch</code> selected that commit to be the <em>current commit</em>, by selecting that branch name to be the <em>current branch</em>. You now have all the files <em>from</em> that commit, in an area where you can see them and work on them: your <em>working tree</em>.</p>\n<p>Note that the files in your working tree <em>are not actually in Git itself</em>. They were just <em>extracted from</em> Git. This matters a lot, because when <code>git checkout</code> extracts the files <em>from</em> Git, it actually puts each file in two places. One of those places is the ordinary everyday file you see and work on / with. The other place Git puts each file is into Git's <em>index</em>.</p>\n<p>As I mentioned a moment ago, the index has three names: index, staging area, and cache. All refer to the same thing: the place Git sticks these \"copies\" of each file. Each one is actually pre-de-duplicated, so the word \"copy\" is slightly wrong, but---unlike much of the rest of its innards---Git actually does a really good job of hiding the de-duplication aspect. Unless you start getting into internal commands like <code>git ls-files</code> and <code>git update-index</code>, you don't need to know about this part, and can just think of the index as holding a copy of the file, ready to go into the <em>next commit</em>.</p>\n<p>What this all means for you as someone just <em>using</em> Git is that the index / staging-area acts as your <em>proposed next commit</em>. When you run <code>git commit</code>, Git is going to package up <em>these</em> copies of the file as the ones to be archived in the snapshot. The copies you have in your working tree are <em>yours;</em> the <em>index / staging-area</em> copies are <em>Git's</em>, ready to go. So, if you <em>change</em> your copies and want the <em>changed</em> copy to be what goes in the next snapshot, you must tell Git: <em>Update the Git copy, in the Git index / staging-area.</em> You do this with <code>git add</code>.^3^ The <code>git add</code> command means <em>make the proposed-next-commit copy match the working-tree copy</em>. It's the <code>add</code> command that does the updating: this is when Git compresses and de-duplicates the file and makes it ready for archiving, not at <code>git commit</code> time.^4^</p>\n<p>Then, assuming you have some series of commits ending with the one with <em><code>hash-N</code>:</em></p>\n<pre><code>[hash1] &#x3C;-[hash2] ... &#x3C;-[hashN]   &#x3C;--branch\n</code></pre>\n<p>you run <code>git commit</code>, give it any metadata it needs (a commit log message), and you get an N+1'th commit:</p>\n<pre><code>[hash1] &#x3C;-[hash2] ... &#x3C;-[hashN] &#x3C;-[hashN+1]   &#x3C;--branch\n</code></pre>\n<p>Git automatically updates the <em>branch name</em> to point to the <em>new commit</em>, which has therefore been <em>added to the branch</em>.</p>\n<p>Let's look at each of the various commands now:</p>\n<ul>\n<li>\n<p><code>git checkout</code>: this is a large and complicated command.</p>\n<p>We already saw this one, or at least, <em>half</em> of this one. We used it to pick out a branch name, and therefore a particular commit. This kind of checkout first looks at our current commit, index, and working tree. It makes sure that we have committed all our modified files, or---this part gets a bit complicated---that if we <em>haven't</em> committed all our modified files, switching to that other branch is \"safe\". If it's <em>not</em> safe, <code>git checkout</code> tells you that you can't switch due to having modified files. If it <em>is</em> safe, <code>git checkout</code> will switch; if you didn't mean to switch, you can just switch back. (See also <a href=\"https://stackoverflow.com/q/22053757/1256452\">Checkout another branch when there are uncommitted changes on the current branch</a>)</p>\n<p>But <code>git checkout</code> has an <em>unsafe</em> half. Suppose you have modified some file in your working tree, such as <code>README.md</code> or <code>aux.h</code> or whatever. You now look back at what you changed and think: <em>No, that's a bad idea. I should get rid of this change. I'd like the file back exactly as it was before.</em></p>\n<p>To get this---to <em>wipe out</em> your changes to, say, <code>README.md</code>---you can run:</p>\n<pre><code>git checkout -- README.md\n</code></pre>\n<p>The <code>--</code> part here is optional. It's a good idea to use it, because it tells Git that the part that comes after <code>--</code> is a <em>file name</em>, not a <em>branch name</em>.</p>\n<p>Suppose you have a <em>branch</em> named <code>hello</code> <em>and</em> a <em>file</em> named <code>hello</code>. What does:</p>\n<pre><code>git checkout hello\n</code></pre>\n<p>mean? Are we asking Git to clobber the <em>file</em> <code>hello</code> to remove the changes we made, or are we asking Git to check out the <em>branch</em> <code>hello</code>? To make this unambiguous, you have to write either:</p>\n<pre><code>git checkout -- hello        (clobber the file)\n</code></pre>\n<p>or:</p>\n<pre><code>git checkout hello --        (get the branch)\n</code></pre>\n<p>This case, where there are branches and files or directories with the same name, is a particularly insidious one. It has bitten real users. It's <em>why</em> <code>git switch</code> exists now. The <code>git switch</code> command <em>never means clobber my files</em>. It only means <em>do the safe kind of <code>git checkout</code>.</em></p>\n<p>(The <code>git checkout</code> command has been smartened up too, so that if you have the new commands and you run the \"bad\" kind of ambiguous <code>git checkout</code>, Git will just complain at you and do nothing at all. Either use the smarter split-up commands, or add the <code>--</code> at the right place to pick which kind of operation you want.)</p>\n<p>More precisely, <em>this kind</em> of <code>git checkout</code>, ideally spelled <code>git checkout -- *paths*</code>, is a request for Git to copy files from Git's index to your working tree. This means <em>clobber my files</em>. You can also run <code>git checkout *tree-ish* -- *paths*</code>, where you add a commit hash ID^5^ to the command. This tells Git to copy the files from that commit, first to Git's index, and then on to your working tree. This, too, means <em>clobber my files:</em> the difference is where Git gets the copies of the files it's extracting.</p>\n<p>If you ran <code>git add</code> on some file and thus copied it into Git's index, you need <code>git checkout HEAD -- *file*</code> to get it back from the current commit. The copy that's in Git's <em>index</em> is the one you <code>git add</code>-ed. So these two forms of <code>git checkout</code>, with a commit hash ID (or the name <code>HEAD</code>), the optional <code>--</code>, and the file name, are the unsafe <em>clobber my files</em> forms.</p>\n</li>\n<li>\n<p><code>git reset</code>: this is also a large and complicated command.</p>\n<p>There are, depending on how you count, up to about five or six different forms of <code>git reset</code>. We'll concentrate on a smaller subset here.</p>\n<ul>\n<li>\n<p><code>git reset [ --hard | --mixed | --soft ] [ *commit* ]</code></p>\n<p>Here, we're asking Git to do several things. First, if we give a <em><code>commit</code></em> argument, such as <code>HEAD</code> or <code>HEAD~3</code> or some such, we've picked a particular <em>commit</em> that Git should <em>reset to</em>. This is the kind of command that will <em>remove commits</em> by ejecting them off the end of the branch. Of all the commands listed here, this is the only one that removes any commits. One other command---<code>git commit --amend</code>---has the effect of ejecting the <em>last</em> commit while putting on a new replacement, but that one is limited to ejecting <em>one</em> commit.</p>\n<p>Let's show this as a drawing. Suppose we have:</p>\n<pre><code>...--E--F--G--H   &#x3C;-- branch\n</code></pre>\n<p>That is, this branch, named <code>branch</code>, ends with four commits whose hash IDs we'll call <code>E</code>, <code>F</code>, <code>G</code>, and <code>H</code> in that order. The name <code>branch</code> currently stores the hash ID of the last of these commits, <code>H</code>. If we use <code>git reset --hard HEAD~3</code>, we're telling Git to eject the <em>last three commits</em>. The result is:</p>\n<pre><code>       F--G--H   ???\n      /\n...--E   &#x3C;-- branch\n</code></pre>\n<p>The name <code>branch</code> now selects commit <code>E</code>, not commit <code>H</code>. If we did not write down (on paper, on a whiteboard, in a file) the hash IDs of the last three commits, they've just become somewhat hard to find. Git does gives a way to find them again, for a while, but mostly they just seem to be <em>gone</em>.</p>\n<p>The <code>HEAD~3</code> part of this command is how we chose to drop the last three commits. It's part of a whole sub-topic in Git, documented in <a href=\"https://git-scm.com/docs/gitrevisions\">the gitrevisions manual</a>, on ways to name specific commits. The reset command just needs the hash ID of an actual commit, or anything equivalent, and <code>HEAD~3</code> means <em>go back three first-parent steps</em>, which in this case gets us from commit <code>H</code> back to commit <code>E</code>.</p>\n<p>The <code>--hard</code> part of the <code>git reset</code> is how we tell Git what to do with (a) its index and (b) our working tree files. We have three choices here:</p>\n<ul>\n<li><code>--soft</code> tells Git: <em>leave both alone</em>. Git will move the <em>branch name</em> without touching the index or our working tree. If you run <code>git commit</code> now, whatever is (still) in the index is what goes into the <em>new</em> commit. If the index matches the snapshot in commit <code>H</code>, this gets you a new commit whose <em>snapshot</em> is <code>H</code>, but whose <em>parent</em> is <code>E</code>, as if commits <code>F</code> through <code>H</code> had all been collapsed into a single new commit. People usually call this <em>squashing</em>.</li>\n<li><code>--mixed</code> tells Git: <em>reset your index, but leave my working tree alone</em>. Git will move the branch name, then <em>replace every file that is in the index with the one from the newly selected commit</em>. But Git will leave all your <em>working tree</em> files alone. This means that as far as Git is concerned, you can start <code>git add</code>ing files to make a new commit. Your new commit won't match <code>H</code> unless you <code>git add</code> <em>everything</em>, so this means you could, for instance, build a new intermediate commit, sort of like <code>E+F</code> or something, if you wanted.</li>\n<li><code>--hard</code> tells Git: *reset your index <strong>and</strong> my working tree.* Git will move the branch name, replace all the files in its index, and replace all the files in your working tree, all as one big thing. It's now as if you never made those three commits at all. You no longer have the files from <code>F</code>, or <code>G</code>, or <code>H</code>: you have the files from commit <code>E</code>.</li>\n</ul>\n<p>Note that if you leave out the <em><code>commit</code></em> part of this kind of (hard/soft/mixed) <code>reset</code>, Git will use <code>HEAD</code>. Since <code>HEAD</code> names the <em>current commit</em> (as selected by the current branch name), this leaves the branch name itself unchanged: it still selects the same commit as before. So this is only useful with <code>--mixed</code> or <code>--hard</code>, because <code>git reset --soft</code>, with no commit hash ID, means <em>don't move the branch name, don't change Git's index, and don't touch my working tree</em>. Those are the three things this kind of <code>git reset</code> can do---move the branch name, change what's in Git's index, and change what's in your working tree---and you just ruled all three out. Git is OK with doing nothing, but why bother?</p>\n</li>\n<li>\n<p><code>git reset [ *tree-ish* ] -- *path*</code></p>\n<p>This is the other kind of <code>git reset</code> we'll care about here. It's a bit like a mixed reset, in that it means <em>clobber some of the index copies of files</em>, but here you specify <em>which files to clobber</em>. It's also a bit <em>unlike</em> a mixed reset, because this kind of <code>git reset</code> will never move the branch name.</p>\n<p>Instead, you pick which files you want copied from somewhere. The <em>somewhere</em> is the <em><code>tree-ish</code></em> you give; if you don't give one, the <em>somewhere</em> is <code>HEAD</code>, i.e., the current commit. This can only restore files in the <em>proposed next commit</em> to the form they have in <em>some existing commit</em>. By defaulting to the <em>current</em> existing commit, this kind of <code>git reset -- *path*</code> has the effect of undoing a <code>git add -- *path*</code>.^6^</p>\n<p>There are several other forms of <code>git reset</code>. To see what they all mean, consult <a href=\"https://git-scm.com/docs/git-reset\">the documentation</a>.</p>\n</li>\n</ul>\n</li>\n<li>\n<p><code>git restore</code>: this got split off from <code>git checkout</code>.</p>\n<p>Basically, this does the same thing as the various forms of <code>git checkout</code> and <code>git reset</code> that clobber files (in your working tree and/or in Git's index). It's <em>smarter</em> than the old <code>git checkout</code>-and-clobber-my-work variant, in that you get to choose where the files come from <em>and</em> where they go, all in the one command line.</p>\n<p>To do what you used to do with <code>git checkout -- *file*</code>, you just run <code>git restore --staged --worktree -- *file*</code>. (You can leave out the <code>--</code> part, as with <code>git checkout</code>, in most cases, but it's just generally wise to get in the habit of using it. Like <code>git add</code>, this command is designed such that only files named <code>-whatever</code> are actually problematic.)</p>\n<p>To do what you used to do with <code>git reset -- *file*</code>, you just run <code>git restore --staged -- *file*</code>. That is, you tell <code>git restore</code> to copy from <code>HEAD</code> to staging area / index, which is how <code>git reset</code> operates.</p>\n<p>Note that you can copy a file from some existing commit, to Git's index, without touching your working tree copy of that file: <code>git restore --source *commit* --staged -- *file*</code> does that. You can't do that at all with the old <code>git checkout</code> but you <em>can</em> do that with the old <code>git reset</code>, as <code>git reset *commit* -- *file*</code>. And, you can copy a file from some existing commit, to your working tree, without touching the staged copy: <code>git restore --source *commit* --worktree -- *file*</code> does that. The overlapping part (restore and reset) exists <em>because</em> <code>git restore</code> is new, and this kind of restore makes sense; probably, ideally, we should always use <code>git restore</code> here, instead of using the old <code>git reset</code> way of doing things, but Git tries to maintain backwards compatibility.</p>\n<p>The new ability---to copy from any arbitrary source, to your working tree, without touching Git's index / staging-area copy---is just that: new. You couldn't do it before. (You could run <code>git show *commit*:*path* > *path*</code>, before, but that falls outside our five commands to examine.)</p>\n</li>\n<li><code>git switch</code>: this just does the \"safe half\" of <code>git checkout</code>. That's really all you need to know. Using <code>git switch</code>, without <code>--force</code>, Git won't overwrite your unsaved work, even if you make a typo or whatever. The old <code>git checkout</code> command could overwrite unsaved work: if your typo turns a branch name into a file name, for instance, well, oops.</li>\n<li>\n<p><code>git revert</code> (I added this for completeness): this makes a <em>new commit</em>. The point of the new commit is to <em>back out</em> what someone did in some existing commit. You therefore need to name the existing commit that revert should back out. This command probably should have been named <code>git backout</code>.</p>\n<p>If you back out the most recent commit, this does revert to the second-most-recent snapshot:</p>\n<pre><code>  ...--G--H   &#x3C;-- branch\n</code></pre>\n<p>becomes:</p>\n<pre><code>  ...--G--H--Ħ   &#x3C;-- branch\n</code></pre>\n<p>where commit <code>Ħ</code> (H-bar) \"undoes\" commit <code>H</code> and therefore leaves us with the same <em>files</em> as commit <code>G</code>. But we don't have to undo the <em>most recent</em> commit. We could take:</p>\n<pre><code>  ...--E--F--G--H   &#x3C;-- branch\n</code></pre>\n<p>and add a commit <code>Ǝ</code> that undoes <code>E</code> to get:</p>\n<pre><code>  ...--E--F--G--H--Ǝ   &#x3C;-- branch\n</code></pre>\n<p>which may not match the source snapshot of any previous commit!</p>\n</li>\n</ul>\n<h2>Further Information</h2>\n<ul>\n<li><a href=\"http://try.github.io/levels/1/challenges/1\">tryGit - A fun interactive way to learn Git.</a></li>\n<li><a href=\"http://learngitbranching.js.org/\">Learn Git Branching - the most visual and interactive way to learn Git on the web</a></li>\n<li><a href=\"https://blog.udemy.com/git-tutorial-a-comprehensive-guide/\">Udemy Git Tutorial: A Comprehensive Guide</a></li>\n<li><a href=\"http://gitimmersion.com/\">Git Immersion - A Guided tour that walks through the fundamentals of git</a></li>\n<li><a href=\"http://git-scm.com/videos\">git-scm - Video Tutorials</a></li>\n<li><a href=\"http://git-scm.com/docs\">git-scm - Documentation</a></li>\n<li><a href=\"https://www.atlassian.com/git/\">Atlassian Git - Tutorials &#x26; Workflows</a></li>\n<li><a href=\"http://res.cloudinary.com/hy4kyit2a/image/upload/SF_git_cheatsheet.pdf\">SalesForce Cheat Sheet</a></li>\n<li><a href=\"http://www.gitguys.com/\">GitGuys</a></li>\n<li><a href=\"http://rogerdudler.github.io/git-guide/index.html\">Git - the simple guide</a></li>\n<li><a href=\"http://www.git-scm.com/book/en/v2\">Pro Git</a></li>\n<li><a href=\"http://product.hubspot.com/blog/git-and-github-tutorial-for-beginners\">An introduction to Git and GitHub for Beginners (Tutorial)</a></li>\n<li><a href=\"https://www.youtube.com/playlist?list=PL6gx4Cwl9DGAKWClAD_iKpNC0bGHxGhcx\">The New Boston tutorial to Git covering basic commands and workflow</a></li>\n</ul>"},{"url":"/docs/docs/markdown/","relativePath":"docs/docs/markdown.md","relativeDir":"docs/docs","base":"markdown.md","name":"markdown","frontmatter":{"title":"Markdown","weight":0,"excerpt":"Markdown","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Markdown:</h2>\n<h2>Why markdown?</h2>\n<p>Markdown is a universal doc format that is easy to write and easy to add to a version control system.</p>\n<ul>\n<li><strong>Open</strong> - Anyone can submit content, fix typos &#x26; update anything via pull requests</li>\n<li><strong>Version control</strong> - Roll back &#x26; see the history of any given post</li>\n<li><strong>No CMS lock in</strong> - We can easily port to any static site generator</li>\n<li><strong>It's just simple</strong> - No user accounts to manage, no CMS software to upgrade, no plugins to install.</li>\n</ul>\n<hr>\n<h2>Markdown basics</h2>\n<p>The basics of markdown can be found <a href=\"https://guides.github.com/features/mastering-markdown/\">here</a> &#x26; <a href=\"https://daringfireball.net/projects/markdown/\">here</a>. Super easy!</p>\n<h2>Advanced Formatting tips</h2>\n<h3><code>left</code> alignment</h3>\n<img align=\"left\" width=\"100\" height=\"100\" src=\"http://www.fillmurray.com/100/100\">\n<p>This is the code you need to align images to the left:</p>\n<pre><code>&#x3C;img align=\"left\" width=\"100\" height=\"100\" src=\"http://www.fillmurray.com/100/100\">\n</code></pre>\n<hr>\n<h3><code>right</code> alignment</h3>\n<img align=\"right\" width=\"100\" height=\"100\" src=\"http://www.fillmurray.com/100/100\">\n<p>This is the code you need to align images to the right:</p>\n<pre><code>&#x3C;img align=\"right\" width=\"100\" height=\"100\" src=\"http://www.fillmurray.com/100/100\">\n</code></pre>\n<hr>\n<h3><code>center</code> alignment example</h3>\n<p align=\"center\">\n  <img width=\"460\" height=\"300\" src=\"http://www.fillmurray.com/460/300\">\n</p>\n<pre><code>&#x3C;p align=\"center\">\n  &#x3C;img width=\"460\" height=\"300\" src=\"http://www.fillmurray.com/460/300\">\n&#x3C;/p>\n</code></pre>\n<hr>\n<h3><code>collapse</code> Sections</h3>\n<p>Collapsing large blocks of text can make your markdown much easier to digest</p>\n<details>\n<summary>\"Click to expand\"</summary>\nthis is hidden block\n</details>\n<pre><code>&#x3C;details>\n&#x3C;summary>\"Click to expand\"&#x3C;/summary>\nthis is hidden\n&#x3C;/details>\n</code></pre>\n<p>Collapsing large blocks of Markdown text</p>\n<details>\n<summary>To make sure markdown is rendered correctly in the collapsed section...</summary>\n<ol>\n<li>Put an <strong>empty line</strong> after the <code>&#x3C;summary></code> block.</li>\n<li><em>Insert your markdown syntax</em></li>\n<li>Put an <strong>empty line</strong> before the <code>&#x3C;/details></code> tag</li>\n</ol>\n</details>\n<pre><code>&#x3C;details>\n&#x3C;summary>To make sure markdown is rendered correctly in the collapsed section...&#x3C;/summary>\n\n 1. Put an **empty line** after the `&#x3C;summary>` block.\n 2. *Insert your markdown syntax*\n 3. Put an **empty line** before the `&#x3C;/details>` tag\n\n&#x3C;/details>\n</code></pre>\n<hr>\n<h3><code>additional links</code></h3>\n<p><a href=\"http://www.serverless.com\">Website</a> • <a href=\"http://eepurl.com/b8dv4P\">Email Updates</a> • <a href=\"https://gitter.im/serverless/serverless\">Gitter</a> • <a href=\"http://forum.serverless.com\">Forum</a> • <a href=\"https://github.com/serverless-meetups/main\">Meetups</a> • <a href=\"https://twitter.com/goserverless\">Twitter</a> • <a href=\"https://www.facebook.com/serverless\">Facebook</a> • <a href=\"mailto:hello@serverless.com\">Contact Us</a></p>\n<pre><code>[Website](http://www.serverless.com) • [Email Updates](http://eepurl.com/b8dv4P) • [Gitter](https://gitter.im/serverless/serverless) • [Forum](http://forum.serverless.com) • [Meetups](https://github.com/serverless-meetups/main) • [Twitter](https://twitter.com/goserverless) • [Facebook](https://www.facebook.com/serverless) • [Contact Us](mailto:hello@serverless.com)\n</code></pre>\n<hr>\n<h3>Badges</h3>\n<p>I hate them so. Don't use badges.</p>\n<hr>\n<h3>Nice looking file tree</h3>\n<p>For whatever <a href=\"https://twitter.com/alexdotjs/status/1421015442286596100\">reason</a> the <code>graphql</code> syntax will nicely highlight file trees like below:</p>\n<pre><code class=\"language-graphql\"># Code &#x26; components for pages\n./src/*\n  ├─ src/assets - # Minified images, fonts, icon files\n  ├─ src/components - # Individual smaller components\n  ├─ src/fragments - # Larger chunks of a page composed of multiple components\n  ├─ src/layouts - # Page layouts used for different types of pages composed of components and fragments\n  ├─ src/page - # Custom pages or pages composed of layouts with hardcoded data components, fragments, &#x26; layouts\n  ├─ src/pages/* - # Next.js file based routing\n  │  ├─ _app.js - # next.js app entry point\n  │  ├─ _document.js - # next.js document wrapper\n  │  ├─ global.css - #  Global CSS styles\n  │  └─ Everything else... - # File based routing\n  └─ src/utils - # Utility functions used in various places\n</code></pre>\n<hr>\n<h2>Useful packages</h2>\n<ol>\n<li><a href=\"https://www.npmjs.com/package/gray-matter\">gray-matter</a></li>\n</ol>\n<p>YAML front-matter is your friend. You can keep metadata in markdown files</p>\n<pre><code>title: Serverless Framework Documentation\ndescription: \"Great F'in docs!\"\nmenuText: Docs\nlayout: Doc\n</code></pre>\n<ol start=\"2\">\n<li><a href=\"https://www.npmjs.com/package/remark\">Remark</a></li>\n</ol>\n<p>Useful for rendering markdown in HTML/React</p>\n<ol start=\"3\">\n<li><a href=\"https://github.com/DavidWells/markdown-magic\">Markdown Magic</a></li>\n<li><a href=\"https://github.com/DavidWells/markdown-magic\">Repo</a></li>\n<li><a href=\"https://github.com/DavidWells/markdown-magic#plugins\">Plugins</a></li>\n<li>Show automatic doc generation. <a href=\"https://github.com/DavidWells/markdown-magic/blob/master/examples/generate-readme.js#L15-L23\">Example 1</a> | <a href=\"https://github.com/serverless/examples/blob/master/generate-readme.js#L71-L87\">Example 2</a></li>\n</ol>\n<hr>\n<h2>Useful utilities</h2>\n<ol>\n<li><a href=\"https://github.com/serverless/post-scheduler\">Schedule Posts</a> - Post scheduler for static sites</li>\n</ol>\n<p>Show DEMO</p>\n<ol start=\"2\">\n<li><a href=\"https://jekyll-anon.surge.sh/gods/2015/02/18/vesta.html\">Zero friction inline content editing</a></li>\n</ol>\n<p>Show DEMO</p>\n<ol start=\"3\">\n<li><a href=\"https://bywordapp.com/\">Byword</a> &#x26; <a href=\"https://typora.io/\">Typora</a> - Good Editors</li>\n<li><a href=\"https://monodraw.helftone.com/\">Monodraw</a> - Flow charts for days</li>\n<li><a href=\"https://getkap.co/\">Kap</a> - Make gifs</li>\n<li><a href=\"https://atom.io/packages/markdown-preview\">IDE markdown preview</a></li>\n<li>Stuck on WordPress? Try <a href=\"https://github.com/DavidWells/easy-markdown\">easy-markdown plugin</a></li>\n</ol>\n<hr>\n<h2>How Serverless uses markdown</h2>\n<p>Serverless.com is comprised of 3 separate repositories</p>\n<ul>\n<li><a href=\"https://github.com/serverless/blog\">https://github.com/serverless/blog</a></li>\n<li><a href=\"https://github.com/serverless/serverless\">https://github.com/serverless/serverless</a> | Shoutout to <a href=\"https://phenomic.io/\">Phenomic.io</a></li>\n<li><a href=\"https://github.com/serverless/site\">https://github.com/serverless/site</a></li>\n</ul>\n<p><strong>Why multiple repos?</strong></p>\n<ol>\n<li>We wanted documentation about the framework to live in the serverless github repo for easy access</li>\n<li>We wanted our blog content to be easily portable to any static site generator separate from the implementation (site)</li>\n<li><code>prebuild</code> npm script pulls the content together &#x26; processes them for site build</li>\n</ol>\n<p>A single repo is easier to manage but harder for people to find/edit/PR content.</p>\n<hr>\n<h3>DEMO</h3>\n<ul>\n<li>Site structure</li>\n<li>Serverless build process</li>\n<li><a href=\"https://github.com/serverless/blog/blob/master/.travis.yml#L10\">Validation</a></li>\n<li><a href=\"https://serverless.com/framework/docs/providers/aws/cli-reference/deploy/\">Editing Flow</a></li>\n<li>\n<p>Github optimizations</p>\n<ul>\n<li><a href=\"https://github.com/serverless/serverless/blob/master/docs/providers/aws/events/schedule.md\">Link from top of each doc to live link on site</a></li>\n<li>use markdown magic =) to <a href=\"https://github.com/serverless/examples\">auto generate tables</a> etc</li>\n<li><a href=\"https://github.com/serverless/serverless/blame/master/docs/providers/aws/events/schedule.md#L1-L7\">Hide yaml frontmatter from github folks</a></li>\n<li>consider linking everything to site</li>\n</ul>\n</li>\n</ul>\n<h2>Other Markdown Resources</h2>\n<ul>\n<li><a href=\"https://www.npmjs.com/package/verb\">Verb</a> - Documentation generator for GitHub projects</li>\n<li><a href=\"http://asciidoctor.org/\">ACSII docs</a> - Markdown alternative</li>\n</ul>"},{"url":"/docs/faq/","relativePath":"docs/faq/index.md","relativeDir":"docs/faq","base":"index.md","name":"index","frontmatter":{"title":"FAQ","excerpt":"In this section you'll find commonly asked questions regarding the Libris theme. If you have questions, don't hesitate to ask us directly.","seo":{"title":"FAQ","description":"FAQ What's your favorite non-business book?\nHitchhiker's Guide To The Galaxy","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"FAQ","keyName":"property"},{"name":"og:description","value":"This is the faqpage","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"FAQ"},{"name":"twitter:description","value":"This is the faqpage"}]},"template":"docs","weight":900},"html":"<h4>What's the most useful business-related book you've ever read?</h4>\n<blockquote>\n<p>A Random Walk Down Wall Street</p>\n</blockquote>\n<h4>What's your favorite non-business book?</h4>\n<blockquote>\n<p>Hitchhiker's Guide To The Galaxy</p>\n</blockquote>\n<h4>If money were not an issue, what would you be doing right now?</h4>\n<blockquote>\n<p>Designing recording software/hardware and using it</p>\n</blockquote>\n<h4>What words of advice would you give your younger self?</h4>\n<blockquote>\n<p>Try harder and listen to your parents more (the latter bit of advice would be almost certain to fall on deaf ears lol)</p>\n</blockquote>\n<h4>What's the most creative thing you've ever done?</h4>\n<blockquote>\n<p>I built a platform that listens to a guitarist's performance and automatically triggers guitar effects at the appropriate time in the song.</p>\n</blockquote>\n<h4>Which founders or startups do you most admire?</h4>\n<blockquote>\n<p>Is it to basic to say Tesla... I know they're prevalent now but I've been an avid fan since as early as 2012.</p>\n</blockquote>\n<h4>What's your super power?</h4>\n<blockquote>\n<p>Having really good ideas and forgetting them moments later.</p>\n</blockquote>\n<h4>What's the best way for people to get in touch with you?</h4>\n<blockquote>\n<p>A text</p>\n</blockquote>\n<h4>What aspects of your work are you most passionate about?</h4>\n<p>Creating things that change my every day life.</p>\n<h4>What was the most impactful class you took in school?</h4>\n<blockquote>\n<p>Modern Physics... almost changed my major after that class... but at the end of the day engineering was a much more fiscally secure avenue.</p>\n</blockquote>\n<h4>What's something you wish you had done years earlier?</h4>\n<blockquote>\n<p>Learned to code ... and sing</p>\n</blockquote>\n<h4>What words of wisdom do you live by?</h4>\n<blockquote>\n<p>*Disclaimer: The following wisdom is very cliche ... but... \"Be the change that you wish to see in the world.\"</p>\n</blockquote>"},{"url":"/docs/faq/contact/","relativePath":"docs/faq/contact.md","relativeDir":"docs/faq","base":"contact.md","name":"contact","frontmatter":{"title":"Contact!","sections":[],"seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<br>\n<br>\n<iframe src=\"https://bgoonz-blog-v3-0.netlify.app/contact/\" height=\"900px\" width=\"100%\">\n</iframe>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<iframe src=\"https://comments-3.bgoonz.repl.co/\" height=\"900px\" width=\"100%\">\n</iframe>\n<h3>Calendar:</h3>\n<iframe src=\"https://calendar.google.com/calendar/embed?src=c_f16bvhnsdsp8epckcinsu4978g%40group.calendar.google.com&ctz=America%2FNew_York\" style=\"border: 0\" width=\"800\" height=\"600\" frameborder=\"0\" scrolling=\"no\"></iframe>"},{"url":"/docs/docs/regex-in-js/","relativePath":"docs/docs/regex-in-js.md","relativeDir":"docs/docs","base":"regex-in-js.md","name":"regex-in-js","frontmatter":{"title":"Regular Expressions","weight":0,"excerpt":"Regular Expressions","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Regular Expressions</h1>\n<p>description:</p>\n<hr>\n<h4><a href=\"http://medium.com/codex\" class=\"markup--anchor markup--h4-anchor\">CODEX</a></h4>\n<h3>Regular Expressions</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*VdDVM2Nzv6oGC5I0.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*D83R_a0SSgMR0hI4jP6Asw.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*vk5n412Bs-dx6UdgyUywdg.png\" class=\"graf-image\" /></figure>### description:\n<p><em>Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the</em> <code>exec()</code> <em>and</em> <code>test()</code> <em>methods of</em> <code>RegExp</code><em>, and with the</em> <code>match()</code><em>,</em> <code>matchAll()</code><em>,</em> <code>replace()</code><em>,</em> <code>replaceAll()</code><em>,</em> <code>search()</code><em>, and</em> <code>split()</code> <em>methods of</em> <code>String</code><em>. This chapter describes JavaScript regular expressions.</em></p>\n<h3>Creating a regular expression</h3>\n<p>You construct a regular expression in one of two ways:</p>\n<ol>\n<li><span id=\"8a7f\"><strong>Using a regular expression literal, which consists of a pattern enclosed between slashes, as follows:</strong></span></li>\n</ol>\n<p><code>let re = /ab+c/;</code></p>\n<ul>\n<li><span id=\"f4e2\">Regular expression literals provide compilation of the regular expression when the script is loaded. If the regular expression remains constant, using this can improve performance.</span></li>\n</ul>\n<p><strong>2. Or calling the constructor function of the</strong> <code>RegExp</code> <strong>object, as follows:</strong></p>\n<ul>\n<li><span id=\"2016\"><code>let re = new RegExp('ab+c');</code></span></li>\n</ul>\n<blockquote>\n<p><em>Using the constructor function provides runtime compilation of the regular expression</em>. Use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and are getting it from another source, such as user input.</p>\n</blockquote>\n<h3>Writing a regular expression pattern</h3>\n<p>A regular expression pattern is composed of simple characters, such as <code>/abc/</code>, or a combination of simple and special characters, such as <code>/ab*c/</code> or <code>/Chapter (\\d+)\\.\\d*/</code>.</p>\n<p>The last example includes <strong>parentheses, which are used as a memory device</strong>. <em>The match made with this part of the pattern is remembered for later use.</em></p>\n<h3>Using simple patterns</h3>\n<p>Simple patterns are constructed of characters for which you want to find a direct match.</p>\n<p>For example, the pattern <code>/abc/</code> matches character combinations in strings only when the exact sequence <code>\"abc\"</code> occurs (all characters together and in that order).</p>\n<p>Such a match would succeed in the strings <code>\"Hi, do you know your abc's?\"</code> and <code>\"The latest airplane designs evolved from slabcraft.\"</code></p>\n<p>In both cases the match is with the substring <code>\"abc\"</code>.</p>\n<p>There is no match in the string <code>\"Grab crab\"</code> because while it contains the substring <code>\"ab c\"</code>, it does not contain the exact substring <code>\"abc\"</code>.</p>\n<h3>Using special characters</h3>\n<p>When the search for a match requires something more than a direct match, such as finding one or more b's, or finding white space, you can include special characters in the pattern.</p>\n<p>For example, to match <em>a single</em> <code>\"a\"</code> <em>followed by zero or more</em> <code>\"b\"</code><em>s followed by</em> <code>\"c\"</code>, you'd use the pattern <code>/ab*c/</code>:</p>\n<blockquote>\n<p>the <code>*</code> after <code>\"b\"</code> means \"0 or more occurrences of the preceding item.\" In the string <code>\"cbbabbbbcdebc\"</code>, this pattern will match the substring <code>\"abbbbc\"</code>.</p>\n</blockquote>\n<p><a href=\"https://github.com/bgoonz/Cheat-Sheets/blob/master/Regular_Expressions/Assertions.html\" class=\"markup--anchor markup--p-anchor\"><strong>Assertions</strong></a>** : Assertions include boundaries, which indicate the beginnings and endings of lines and words, and other patterns indicating in some way that a match is possible (including look-ahead, look-behind, and conditional expressions).**</p>\n<p><a href=\"https://github.com/bgoonz/Cheat-Sheets/blob/master/Regular_Expressions/Character_Classes.html\" class=\"markup--anchor markup--p-anchor\"><strong>Character classes</strong></a>** : Distinguish different types of characters. For example, distinguishing between letters and digits.**</p>\n<p><a href=\"https://github.com/bgoonz/Cheat-Sheets/blob/master/Regular_Expressions/Groups_and_Ranges.html\" class=\"markup--anchor markup--p-anchor\"><strong>Groups and ranges</strong></a>** : Indicate groups and ranges of expression characters.**</p>\n<p><a href=\"https://github.com/bgoonz/Cheat-Sheets/blob/master/Regular_Expressions/Quantifiers.html\" class=\"markup--anchor markup--p-anchor\"><strong>Quantifiers</strong></a>** : Indicate numbers of characters or expressions to match.**</p>\n<p><a href=\"https://github.com/bgoonz/Cheat-Sheets/blob/master/Regular_Expressions/Unicode_Property_Escapes.html\" class=\"markup--anchor markup--p-anchor\"><strong>Unicode property escapes</strong></a>** : Distinguish based on unicode character properties, for example, upper- and lower-case letters, math symbols, and punctuation.**</p>\n<p>If you want to look at all the special characters that can be used in regular expressions in a single table, see the following:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*Wk5zFr1IHJxacq2a2zi5RQ.png\" class=\"graf-image\" /></figure>### Special characters in regular expressions.\n<h3>Escaping</h3>\n<p>If you need to use any of the special characters literally (actually searching for a <code>\"*\"</code>, for instance), you must escape it by putting a <strong>backslash</strong> in front of it.</p>\n<p>For instance, to search for <code>\"a\"</code> followed by <code>\"*\"</code> followed by <code>\"b\"</code>,</p>\n<blockquote>\n<p>you'd use <code>/a\\*b/</code> --- the backslash \"escapes\" the <code>\"*\"</code>, making it literal instead of special.</p>\n</blockquote>\n<p>Similarly, if you're writing a regular expression literal and need to match a slash (\"/\"), you need to escape that (otherwise, it terminates the pattern)</p>\n<p>For instance, to search for the string \"/example/\" followed by one or more alphabetic characters, you'd use <code>/\\/example\\/[a-z]+/i</code></p>\n<p><strong>--the backslashes before each slash make them literal.</strong></p>\n<p>To match a literal backslash, you need to escape the backslash.</p>\n<p>For instance, to match the string \"C:\\\" where \"C\" can be any letter,</p>\n<p>you'd use <code>/[A-Z]:\\\\/</code></p>\n<p>--- the first backslash escapes the one after it, so the expression searches for a single literal backslash.</p>\n<p>If using the <code>RegExp</code> constructor with a string literal, <strong>remember that the backslash is an escape in string literals, so to use it in the regular expression, you need to escape it at the string literal level</strong>.</p>\n<p><code>/a\\*b/</code> and <code>new RegExp(\"a\\\\*b\")</code> create the same expression,</p>\n<p>which searches for \"a\" followed by a literal \"*\" followed by \"b\".</p>\n<p>If escape strings are not already part of your pattern you can add them using <code>String.replace</code>:</p>\n<pre><code>function escapeRegExp(string) {\n  return string.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, '\\\\$&#x26;'); // $&#x26; means the whole matched string\n}\n</code></pre>\n<p><strong>The \"g\" after the regular expression is an option or flag that performs a global search, looking in the whole string and returning all matches.</strong></p>\n<h3>Using parentheses</h3>\n<p>Parentheses around any part of the regular expression pattern causes that part of the matched substring to be remembered.</p>\n<p>Once remembered, the substring can be recalled for other use.</p>\n<h3>Using regular expressions in JavaScript</h3>\n<p>Regular expressions are used with the <code>RegExp</code> <strong>methods</strong></p>\n<p><code>test()</code> <strong>and</strong> <code>exec()</code></p>\n<p>and with the <code>String</code> <strong>methods</strong> <code>match()</code><strong>,</strong> <code>replace()</code><strong>,</strong> <code>search()</code><strong>, and</strong> <code>split()</code><strong>.</strong></p>\n<hr>\n<h3>Method Descriptions</h3>\n<h4><code>exec()</code></h4>\n<p>Executes a search for a match in a string.</p>\n<p>It returns an array of information or <code>null</code> on a mismatch.</p>\n<h4><code>test()</code></h4>\n<p>Tests for a match in a string.</p>\n<p>It returns <code>true</code> or <code>false</code>.</p>\n<h4><code>match()</code></h4>\n<p>Returns an array containing all of the matches, including capturing groups, or <code>null</code> if no match is found.</p>\n<h4><code>matchAll()</code></h4>\n<p>Returns an iterator containing all of the matches, including capturing groups.</p>\n<h4><code>search()</code></h4>\n<p>Tests for a match in a string.</p>\n<p>It returns the index of the match, or <code>-1</code> if the search fails.</p>\n<h4><code>replace()</code></h4>\n<p>Executes a search for a match in a string, and replaces the matched substring with a replacement substring.</p>\n<h4><code>replaceAll()</code></h4>\n<p>Executes a search for all matches in a string, and replaces the matched substrings with a replacement substring.</p>\n<h4><code>split()</code></h4>\n<p>Uses a regular expression or a fixed string to break a string into an array of substrings.</p>\n<h3>Methods that use regular expressions</h3>\n<p>When you want to know whether a pattern is found in a string, use the <code>test()</code> or <code>search()</code> methods;</p>\n<p>for more information (but slower execution) use the <code>exec()</code> or <code>match()</code> methods.</p>\n<p>If you use <code>exec()</code> or <code>match()</code> and if the match succeeds, these methods return an array and update properties of the associated regular expression object and also of the predefined regular expression object, <code>RegExp</code>.</p>\n<p>If the <strong>match fails, the</strong> <code>exec()</code> <strong>method returns</strong> <code>null</code> (which coerces to <code>false</code>).</p>\n<p>In the following example, the script uses the <code>exec()</code> method to find a match in a string.</p>\n<pre><code>let myRe = /d(b+)d/g;\nlet myArray = myRe.exec('cdbbdbsbz');\n</code></pre>\n<p>If you do not need to access the properties of the regular expression, an alternative way of creating <code>myArray</code> is with this script:</p>\n<pre><code>let myArray = /d(b+)d/g.exec('cdbbdbsbz');\n    // similar to \"cdbbdbsbz\".match(/d(b+)d/g); however,\n    // \"cdbbdbsbz\".match(/d(b+)d/g) outputs Array [ \"dbbd\" ], while\n    // /d(b+)d/g.exec('cdbbdbsbz') outputs Array [ 'dbbd', 'bb', index: 1, input: 'cdbbdbsbz' ].\n</code></pre>\n<p>(See <a href=\"https://github.com/bgoonz/Cheat-Sheets/blob/master/Regular_Expressions.md#g-different-behaviors\" class=\"markup--anchor markup--p-anchor\">different behaviors</a> for further info about the different behaviors.)</p>\n<p>If you want to construct the regular expression from a string, yet another alternative is this script:</p>\n<pre><code>let myRe = new RegExp('d(b+)d', 'g');\nlet myArray = myRe.exec('cdbbdbsbz');\n</code></pre>\n<p>With these scripts, the match succeeds and returns the array and updates the properties shown in the following table.</p>\n<p>Results of regular expression execution.</p>\n<p>You can use a regular expression created with an object initializer without assigning it to a letiable.</p>\n<p>If you do, however, every occurrence is a new regular expression.</p>\n<p>For this reason, if you use this form without assigning it to a letiable, you cannot subsequently access the properties of that regular expression.</p>\n<p>For example, assume you have this script:</p>\n<pre><code>let myRe = /d(b+)d/g;\nlet myArray = myRe.exec('cdbbdbsbz');\nconsole.log('The value of lastIndex is ' + myRe.lastIndex);\n\n// \"The value of lastIndex is 5\"\n</code></pre>\n<p>However, if you have this script:</p>\n<pre><code>let myArray = /d(b+)d/g.exec('cdbbdbsbz');\nconsole.log('The value of lastIndex is ' + /d(b+)d/g.lastIndex);\n\n// \"The value of lastIndex is 0\"\n</code></pre>\n<p>The occurrences of <code>/d(b+)d/g</code> in the two statements are different regular expression objects and hence have different values for their <code>lastIndex</code> property.</p>\n<p>If you need to access the properties of a regular expression created with an object initializer, you should first assign it to a variable.</p>\n<h3>[Advanced searching with flags]</h3>\n<p>Regular expressions have <strong>six optional flags</strong> that allow for functionality like global and case insensitive searching.</p>\n<p>These flags can be used separately or together in any order, and are included as part of the regular expression.</p>\n<p>Flag Description Corresponding property</p>\n<hr>\n<p><code>g</code> Global search. <code>RegExp.prototype.global</code></p>\n<p><code>i</code> Case-insensitive search. <code>RegExp.prototype.ignoreCase</code></p>\n<p><code>m</code> Multi-line search. <code>RegExp.prototype.multiline</code></p>\n<p><code>s</code> Allows <code>.</code> to match newline characters. <code>RegExp.prototype.dotAll</code></p>\n<p><code>u</code> \"unicode\"; treat a pattern as a sequence of unicode code points. <code>RegExp.prototype.unicode</code></p>\n<p><code>y</code> Perform a \"sticky\" search that matches starting at the current position in the target string. <code>RegExp.prototype.sticky</code></p>\n<h4>Regular expression flags</h4>\n<p><em>To include a flag with the regular expression, use this syntax:</em></p>\n<pre><code>let re = /pattern/flags;\n</code></pre>\n<p>or</p>\n<pre><code>let re = new RegExp('pattern', 'flags');\n</code></pre>\n<p>Note that the flags are an integral part of a regular expression. They cannot be added or removed later.</p>\n<p>For example, <code>re = /\\w+\\s/g</code> creates a regular expression that looks for one or more characters followed by a space, and it looks for this combination throughout the string.</p>\n<pre><code>let re = /\\w+\\s/g;\nlet str = 'fee fi fo fum';\nlet myArray = str.match(re);\nconsole.log(myArray);\n\n// [\"fee \", \"fi \", \"fo \"]\n</code></pre>\n<p>You could replace the line:</p>\n<pre><code>let re = /\\w+\\s/g;\n</code></pre>\n<p>with:</p>\n<pre><code>let re = new RegExp('\\\\w+\\\\s', 'g');\n</code></pre>\n<p>and get the same result.</p>\n<p>The behavior associated with the <code>g</code> flag is different when the <code>.exec()</code> method is used.</p>\n<p>The roles of \"class\" and \"argument\" get reversed:</p>\n<p>In the case of <code>.match()</code>, the string class (or data type) owns the method and the regular expression is just an argument,</p>\n<p>while in the case of <code>.exec()</code>, it is the regular expression that owns the method, with the string being the argument.</p>\n<p>Contrast this <code>str.match(re)</code> versus <code>re.exec(str)</code>.</p>\n<p>The <code>g</code> flag is used with the <code>.exec()</code> method to get iterative progression.</p>\n<pre><code>let xArray; while(xArray = re.exec(str)) console.log(xArray);\n// produces:\n// [\"fee \", index: 0, input: \"fee fi fo fum\"]\n// [\"fi \", index: 4, input: \"fee fi fo fum\"]\n// [\"fo \", index: 7, input: \"fee fi fo fum\"]\n</code></pre>\n<p>The <code>m</code> flag is used to specify that a multiline input string should be treated as multiple lines.</p>\n<p>If the <code>m</code> flag is used, <code>^</code> and <code>$</code> match at the start or end of any line within the input string instead of the start or end of the entire string.</p>\n<h3>Using special characters to verify input</h3>\n<p>In the following example, the user is expected to enter a phone number. When the user presses the \"Check\" button, the script checks the validity of the number. If the number is valid (matches the character sequence specified by the regular expression), the script shows a message thanking the user and confirming the number. If the number is invalid, the script informs the user that the phone number is not valid.</p>\n<p>Within non-capturing parentheses <code>(?:</code> , the regular expression looks for three numeric characters <code>\\d{3}</code> OR <code>|</code> a left parenthesis <code>\\(</code> followed by three digits<code>\\d{3}</code>, followed by a close parenthesis <code>\\)</code>, (end non-capturing parenthesis <code>)</code>), followed by one dash, forward slash, or decimal point and when found, remember the character <code>([-\\/\\.])</code>, followed by three digits <code>\\d{3}</code>, followed by the remembered match of a dash, forward slash, or decimal point <code>\\1</code>, followed by four digits <code>\\d{4}</code>.</p>\n<p>The <code>Change</code> event activated when the user presses Enter sets the value of <code>RegExp.input</code>.</p>\n<h4>HTML</h4>\n<pre><code>&#x3C;p>\n  Enter your phone number (with area code) and then click \"Check\".\n  &#x3C;br>\n  The expected format is like ###-###-####.\n&#x3C;/p>\n&#x3C;form action=\"#\">\n  &#x3C;input id=\"phone\">\n    &#x3C;button onclick=\"testInfo(document.getElementById('phone'));\">Check&#x3C;/button>\n&#x3C;/form>\n</code></pre>\n<h4>JavaScript</h4>\n<pre><code>let re = /(?:\\d{3}|\\(\\d{3}\\))([-\\/\\.])\\d{3}\\1\\d{4}/;\nfunction testInfo(phoneInput) {\n  let OK = re.exec(phoneInput.value);\n  if (!OK) {\n    console.error(phoneInput.value + ' isn\\'t a phone number with area code!');\n  } else {\n    console.log('Thanks, your phone number is ' + OK[0]);}\n}\n</code></pre>\n<h3>Cheat Sheet</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*VmpGy_BYCekOncdyrgSrxw.png\" class=\"graf-image\" /></figure>#### If you found this guide helpful feel free to checkout my GitHub/gist's where I host similar content:\n<blockquote>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--blockquote-anchor\"><strong>bgoonz's</strong> gists · GitHub</a></p>\n</blockquote>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://goofy-euclid-1cd736.netlify.app/\"><strong>a/A-Student-Resources</strong><br />\n<em>Edit description</em>goofy-euclid-1cd736.netlify.app</a><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/4d8fb3eb146b\">March 6, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/regular-expressions-4d8fb3eb146b\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on August 17, 2021.</p>"},{"url":"/docs/interact/callstack-visual/","relativePath":"docs/interact/callstack-visual.md","relativeDir":"docs/interact","base":"callstack-visual.md","name":"callstack-visual","frontmatter":{"title":"Callstack Visualizer","weight":0,"excerpt":"Callstack Visualizer","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<script async src=\"//jsfiddle.net/bgoonz/tu3Lw57r/embed/result/dark/\"></script>\n<iframe height=\"1000px\" width=\"1400px\" scrolling=\"yes\" title=\"Linear vs Binary Search\" src=\"https://codepen.io/bgoonz/embed/MWbZoOa?default-tab=result&editable=true&theme-id=light\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n  See the Pen <a href=\"https://codepen.io/bgoonz/pen/MWbZoOa\">\n  Linear vs Binary Search</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n<p class=\"codepen\" data-height=\"300\" data-theme-id=\"light\" data-default-tab=\"result\" data-slug-hash=\"GRNPEdY\" data-editable=\"true\" data-user=\"bgoonz\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\">\n  <span>See the Pen <a href=\"https://codepen.io/bgoonz/pen/GRNPEdY\">\n  Data Structures Viz</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.</span>\n</p>\n<script async src=\"https://cpwebassets.codepen.io/assets/embed/ei.js\"></script>\n<h2>Callstack Visualizer</h2>\n<iframe src=\"https://visualize-callstack-qdvyu8oyc-visualize42.vercel.app/\" height=\"900px\" width=\"100%\">\n</iframe>\n<h6>About the Call Stack</h6>\n<p><strong>TL;DR</strong> *The <strong>Call Stack</strong> tracks function calls. It is a LIFO stack of frames. Each frame represents a function call.*</p>\n<hr>\n<p>The <strong>Call Stack</strong> is a fundamental part of the JavaScript language. It is a record-keeping structure that allows us to perform function calls. Each function call is represented as a frame on the <strong>Call Stack</strong>. This is how the JavaScript engine keeps track of which functions have been called and in what order. The JS engine uses this information to ensure execution picks back up in the right spot after a function returns.</p>\n<p>When a JavaScript program first starts executing, the <strong>Call Stack</strong> is empty. When the first function call is made, a new frame is pushed onto the top of the <strong>Call Stack</strong>. When that function returns, its frame is popped off of the <strong>Call Stack</strong>.</p>\n<h6>About the Event Loop</h6>\n<p><strong>TL;DR</strong> *The <strong>Event Loop</strong> processes Tasks and Microtasks. It places them into the Call Stack for execution one at a time. It also controls when rerendering occurs.*</p>\n<hr>\n<p>The Event Loop is a looping algorithm that processes the Tasks/Microtasks in the Task Queue and Microtask Queue. It handles selecting the next Task/Microtask to be run and placing it in the Call Stack for execution.</p>\n<p>The Event Loop algorithm consists of four key steps:</p>\n<ol>\n<li><strong>Evaluate Script:</strong> Synchronously execute the script as though it were a function body. Run until the Call Stack is empty.</li>\n<li><strong>Run a Task:</strong> Select the oldest Task from the Task Queue. Run it until the Call Stack is empty.</li>\n<li><strong>Run all Microtasks:</strong> Select the oldest Microtask from the Microtask Queue. Run it until the Call Stack is empty. Repeat until the Microtask Queue is empty.</li>\n<li><strong>Rerender the UI:</strong> Rerender the UI. Then, return to step 2. (This step only applies to browsers, not NodeJS).</li>\n</ol>\n<p>Let's model the Event Loop with some JavaScript psuedocode:</p>\n<pre><code>while (EventLoop.waitForTask()) {\n  const taskQueue = EventLoop.selectTaskQueue();\n  if (taskQueue.hasNextTask()) {\n    taskQueue.processNextTask();\n  }\n\n  const microtaskQueue = EventLoop.microTaskQueue;\n  while (microtaskQueue.hasNextMicrotask()) {\n    microtaskQueue.processNextMicrotask();\n  }\n\n  rerender();\n}\n</code></pre>"},{"url":"/docs/docs/sitemap/","relativePath":"docs/docs/sitemap.md","relativeDir":"docs/docs","base":"sitemap.md","name":"sitemap","frontmatter":{"title":"Sitemap","weight":0,"excerpt":"Sitemap","seo":{"title":"Sitemap","description":"Sitemap","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h3>204. <a href=\"https://bgoonz-blog.netlify.app/privacy-policy\"><strong>🖥️privacy-policy🌍</strong></a></h3>\n<h3>205. <a href=\"https://bgoonz-blog.netlify.app/readme\"><strong>🖥️readme🌍</strong></a></h3>\n<h3>206. <a href=\"https://bgoonz-blog.netlify.app/showcase\"><strong>🏆showcase🏆</strong></a></h3>\n<h3>207. <a href=\"https://bgoonz-blog.netlify.app/\"><strong>🏠Home🏠</strong></a></h3>\n<hr>\n<hr>\n<h3>0. <a href=\"https://bgoonz-blog.netlify.app/blog/300-react-questions\"><strong>🖥️blog/300-react-questions🌍</strong></a></h3>\n<h3>1. <a href=\"https://bgoonz-blog.netlify.app/blog/awesome-graphql\"><strong>🖥️blog/awesome-graphql🌍</strong></a></h3>\n<h3>2. <a href=\"https://bgoonz-blog.netlify.app/blog/big-o-complexity\"><strong>🖥️blog/big-o-complexity🌍</strong></a></h3>\n<h3>3. <a href=\"https://bgoonz-blog.netlify.app/blog/blog-archive\"><strong>🖥️blog/blog-archive🌍</strong></a></h3>\n<h3>4. <a href=\"https://bgoonz-blog.netlify.app/blog/blogwcomments\"><strong>🖥️blog/blogwcomments🌍</strong></a></h3>\n<h3>5. <a href=\"https://bgoonz-blog.netlify.app/blog/data-structures\"><strong>🖥️blog/data-structures🌍</strong></a></h3>\n<h3>6. <a href=\"https://bgoonz-blog.netlify.app/blog/flow-control-in-python\"><strong>🖥️blog/flow-control-in-python🌍</strong></a></h3>\n<h3>7. <a href=\"https://bgoonz-blog.netlify.app/blog/functions-in-python\"><strong>🖥️blog/functions-in-python🌍</strong></a></h3>\n<h3>8. <a href=\"https://bgoonz-blog.netlify.app/blog/git-gateway\"><strong>🖥️blog/git-gateway🌍</strong></a></h3>\n<h3>9. <a href=\"https://bgoonz-blog.netlify.app/blog/interview-questions-js\"><strong>🖥️blog/interview-questions-js🌍</strong></a></h3>\n<h3>10. <a href=\"https://bgoonz-blog.netlify.app/blog/netlify-cms\"><strong>🖥️blog/netlify-cms🌍</strong></a></h3>\n<h3>11. <a href=\"https://bgoonz-blog.netlify.app/blog/platform-docs\"><strong>🖥️blog/platform-docs🌍</strong></a></h3>\n<h3>12. <a href=\"https://bgoonz-blog.netlify.app/blog/python-for-js-dev\"><strong>🖥️blog/python-for-js-dev🌍</strong></a></h3>\n<h3>13. <a href=\"https://bgoonz-blog.netlify.app/blog/python-resources\"><strong>🖥️blog/python-resources🌍</strong></a></h3>\n<h3>14. <a href=\"https://bgoonz-blog.netlify.app/blog/web-dev-trends\"><strong>🖥️blog/web-dev-trends🌍</strong></a></h3>\n<h3>15. <a href=\"https://bgoonz-blog.netlify.app/blog/web-scraping\"><strong>🖥️blog/web-scraping🌍</strong></a></h3>\n<h3>16. <a href=\"https://bgoonz-blog.netlify.app/blog\"><strong>🖥️blog🌍</strong></a></h3>\n<hr>\n<hr>\n<h2>DOCS:</h2>\n<h3>17. <a href=\"https://bgoonz-blog.netlify.app/docs/about/README\"><strong>📖docs/about/README🌍</strong></a></h3>\n<h3>18. <a href=\"https://bgoonz-blog.netlify.app/docs/about/eng-portfolio\"><strong>📖docs/about/eng-portfolio🌍</strong></a></h3>\n<h3>19. <a href=\"https://bgoonz-blog.netlify.app/docs/about/intrests\"><strong>📖docs/about/intrests🌍</strong></a></h3>\n<h3>20. <a href=\"https://bgoonz-blog.netlify.app/docs/about/job-search\"><strong>📖docs/about/job-search🌍</strong></a></h3>\n<h3>21. <a href=\"https://bgoonz-blog.netlify.app/docs/about/resume\"><strong>📖docs/about/resume🌍</strong></a></h3>\n<h3>22. <a href=\"https://bgoonz-blog.netlify.app/docs/about\"><strong>📖docs/about🌍</strong></a></h3>\n<h3>23. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev\"><strong>📖docs/articles/basic-web-dev🌍</strong></a></h3>\n<h3>24. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/buffers\"><strong>📖docs/articles/buffers🌍</strong></a></h3>\n<h3>25. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/dev-dep\"><strong>📖docs/articles/dev-dep🌍</strong></a></h3>\n<h3>26. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/event-loop\"><strong>📖docs/articles/event-loop🌍</strong></a></h3>\n<h3>27. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/fs-module\"><strong>📖docs/articles/fs-module🌍</strong></a></h3>\n<h3>28. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/how-search-engines-work\"><strong>📖docs/articles/how-search-engines-work🌍</strong></a></h3>\n<h3>29. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/how-the-web-works\"><strong>📖docs/articles/how-the-web-works🌍</strong></a></h3>\n<h3>30. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/http\"><strong>📖docs/articles/http🌍</strong></a></h3>\n<h3>31. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/install\"><strong>📖docs/articles/install🌍</strong></a></h3>\n<h3>32. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/intro\"><strong>📖docs/articles/intro🌍</strong></a></h3>\n<h3>33. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/modules\"><strong>📖docs/articles/modules🌍</strong></a></h3>\n<h3>34. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/nextjs\"><strong>📖docs/articles/nextjs🌍</strong></a></h3>\n<h3>35. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-api-express\"><strong>📖docs/articles/node-api-express🌍</strong></a></h3>\n<h3>36. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-cli-args\"><strong>📖docs/articles/node-cli-args🌍</strong></a></h3>\n<h3>37. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-common-modules\"><strong>📖docs/articles/node-common-modules🌍</strong></a></h3>\n<h3>38. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-env-variables\"><strong>📖docs/articles/node-env-variables🌍</strong></a></h3>\n<h3>39. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-js-language\"><strong>📖docs/articles/node-js-language🌍</strong></a></h3>\n<h3>40. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-package-manager\"><strong>📖docs/articles/node-package-manager🌍</strong></a></h3>\n<h3>41. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-repl\"><strong>📖docs/articles/node-repl🌍</strong></a></h3>\n<h3>42. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-run-cli\"><strong>📖docs/articles/node-run-cli🌍</strong></a></h3>\n<h3>43. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/nodejs\"><strong>📖docs/articles/nodejs🌍</strong></a></h3>\n<h3>44. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/nodevsbrowser\"><strong>📖docs/articles/nodevsbrowser🌍</strong></a></h3>\n<h3>45. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/npm\"><strong>📖docs/articles/npm🌍</strong></a></h3>\n<h3>46. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/npx\"><strong>📖docs/articles/npx🌍</strong></a></h3>\n<h3>47. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/os-module\"><strong>📖docs/articles/os-module🌍</strong></a></h3>\n<h3>48. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/reading-files\"><strong>📖docs/articles/reading-files🌍</strong></a></h3>\n<h3>49. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/semantic-html\"><strong>📖docs/articles/semantic-html🌍</strong></a></h3>\n<h3>50. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/semantic\"><strong>📖docs/articles/semantic🌍</strong></a></h3>\n<h3>51. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/%20%5B**%F0%9F%96%A5%EF%B8%8Fthe-uniform-resource-locator-(url)\"><strong>📖docs/articles/the-uniform-resource-locator-(url)🌍</strong></a></h3>\n<h3>52. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/understanding-firebase\"><strong>📖docs/articles/understanding-firebase🌍</strong></a></h3>\n<h3>53. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/v8\"><strong>📖docs/articles/v8🌍</strong></a></h3>\n<h3>54. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/web-standards-checklist\"><strong>📖docs/articles/web-standards-checklist🌍</strong></a></h3>\n<h3>55. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/webdev-tools\"><strong>📖docs/articles/webdev-tools🌍</strong></a></h3>\n<h3>56. <a href=\"https://bgoonz-blog.netlify.app/docs/articles/writing-files\"><strong>📖docs/articles/writing-files🌍</strong></a></h3>\n<h3>57. <a href=\"https://bgoonz-blog.netlify.app/docs/articles\"><strong>📖docs/articles🌍</strong></a></h3>\n<h3>58. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/audio-feature-extraction\"><strong>📖docs/audio/audio-feature-extraction🌍</strong></a></h3>\n<h3>59. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/audio\"><strong>📖docs/audio/audio🌍</strong></a></h3>\n<h3>60. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/dfft\"><strong>📖docs/audio/dfft🌍</strong></a></h3>\n<h3>61. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/discrete-fft\"><strong>📖docs/audio/discrete-fft🌍</strong></a></h3>\n<h3>62. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/dtw-python-explained\"><strong>📖docs/audio/dtw-python-explained🌍</strong></a></h3>\n<h3>63. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/dynamic-time-warping\"><strong>📖docs/audio/dynamic-time-warping🌍</strong></a></h3>\n<h3>64. <a href=\"https://bgoonz-blog.netlify.app/docs/audio/web-audio-api\"><strong>📖docs/audio/web-audio-api🌍</strong></a></h3>\n<h3>65. <a href=\"https://bgoonz-blog.netlify.app/docs/audio\"><strong>📖docs/audio🌍</strong></a></h3>\n<h3>66. <a href=\"https://bgoonz-blog.netlify.app/docs/career/dev-interview\"><strong>📖docs/career/dev-interview🌍</strong></a></h3>\n<h3>67. <a href=\"https://bgoonz-blog.netlify.app/docs/career/interview-dos-n-donts\"><strong>📖docs/career/interview-dos-n-donts🌍</strong></a></h3>\n<h3>68. <a href=\"https://bgoonz-blog.netlify.app/docs/career/job-boards\"><strong>📖docs/career/job-boards🌍</strong></a></h3>\n<h3>69. <a href=\"https://bgoonz-blog.netlify.app/docs/career\"><strong>📖docs/career🌍</strong></a></h3>\n<h3>71. <a href=\"https://bgoonz-blog.netlify.app/docs/community/bookmarks\"><strong>📖docs/community/bookmarks🌍</strong></a></h3>\n<h3>72. <a href=\"https://bgoonz-blog.netlify.app/docs/community/video-chat\"><strong>📖docs/community/video-chat🌍</strong></a></h3>\n<h3>73. <a href=\"https://bgoonz-blog.netlify.app/docs/community\"><strong>📖docs/community🌍</strong></a></h3>\n<h3>74. <a href=\"https://bgoonz-blog.netlify.app/docs/content/algo\"><strong>📖docs/content/algo🌍</strong></a></h3>\n<h3>75. <a href=\"https://bgoonz-blog.netlify.app/docs/content/archive\"><strong>📖docs/content/archive🌍</strong></a></h3>\n<h3>76. <a href=\"https://bgoonz-blog.netlify.app/docs/content/gatsby-Queries-Mutations\"><strong>📖docs/content/gatsby-Queries-Mutations🌍</strong></a></h3>\n<h3>77. <a href=\"https://bgoonz-blog.netlify.app/docs/content/history-api\"><strong>📖docs/content/history-api🌍</strong></a></h3>\n<h3>78. <a href=\"https://bgoonz-blog.netlify.app/docs/content/main-projects\"><strong>📖docs/content/main-projects🌍</strong></a></h3>\n<h3>79. <a href=\"https://bgoonz-blog.netlify.app/docs/content/trouble-shooting\"><strong>📖docs/content/trouble-shooting🌍</strong></a></h3>\n<h3>80. <a href=\"https://bgoonz-blog.netlify.app/docs/content\"><strong>📖docs/content🌍</strong></a></h3>\n<h3>81. <a href=\"https://bgoonz-blog.netlify.app/docs/data-structures\"><strong>📖docs/data-structures🌍</strong></a></h3>\n<h3>82. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/appendix\"><strong>📖docs/docs/appendix🌍</strong></a></h3>\n<h3>83. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/art-of-command-line\"><strong>📖docs/docs/art-of-command-line🌍</strong></a></h3>\n<h3>84. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/bash\"><strong>📖docs/docs/bash🌍</strong></a></h3>\n<h3>85. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/content\"><strong>📖docs/docs/content🌍</strong></a></h3>\n<h3>86. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/css\"><strong>📖docs/docs/css🌍</strong></a></h3>\n<h3>87. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/data-structures-docs\"><strong>📖docs/docs/data-structures-docs🌍</strong></a></h3>\n<h3>88. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/es-6-features\"><strong>📖docs/docs/es-6-features🌍</strong></a></h3>\n<h3>89. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-reference\"><strong>📖docs/docs/git-reference🌍</strong></a></h3>\n<h3>90. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-repos\"><strong>📖docs/docs/git-repos🌍</strong></a></h3>\n<h3>91. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/html-spec\"><strong>📖docs/docs/html-spec🌍</strong></a></h3>\n<h3>92. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/markdown\"><strong>📖docs/docs/markdown🌍</strong></a></h3>\n<h3>93. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/no-whiteboarding\"><strong>📖docs/docs/no-whiteboarding🌍</strong></a></h3>\n<h3>94. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/node-docs-complete\"><strong>📖docs/docs/node-docs-complete🌍</strong></a></h3>\n<h3>95. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/node-docs-full\"><strong>📖docs/docs/node-docs-full🌍</strong></a></h3>\n<h3>96. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/regex-in-js\"><strong>📖docs/docs/regex-in-js🌍</strong></a></h3>\n<h3>97. <a href=\"https://bgoonz-blog.netlify.app/docs/docs/sitemap\"><strong>📖docs/docs/sitemap🌍</strong></a></h3>\n<h3>98. <a href=\"https://bgoonz-blog.netlify.app/docs/docs\"><strong>📖docs/docs🌍</strong></a></h3>\n<h3>99. <a href=\"https://bgoonz-blog.netlify.app/docs/faq/contact\"><strong>📖docs/faq/contact🌍</strong></a></h3>\n<h3>100. <a href=\"https://bgoonz-blog.netlify.app/docs/faq/plug-ins\"><strong>📖docs/faq/plug-ins🌍</strong></a></h3>\n<h3>101. <a href=\"https://bgoonz-blog.netlify.app/docs/faq\"><strong>📖docs/faq🌍</strong></a></h3>\n<h3>102. <a href=\"https://bgoonz-blog.netlify.app/docs/gists\"><strong>📖docs/gists🌍</strong></a></h3>\n<h3>103. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/callstack-visual\"><strong>📖docs/interact/callstack-visual🌍</strong></a></h3>\n<h3>104. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/clock\"><strong>📖docs/interact/clock🌍</strong></a></h3>\n<h3>105. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/jupyter-notebooks\"><strong>📖docs/interact/jupyter-notebooks🌍</strong></a></h3>\n<h3>106. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/other-sites\"><strong>📖docs/interact/other-sites🌍</strong></a></h3>\n<h3>107. <a href=\"https://bgoonz-blog.netlify.app/docs/interact/video-chat\"><strong>📖docs/interact/video-chat🌍</strong></a></h3>\n<h3>108. <a href=\"https://bgoonz-blog.netlify.app/docs/interact\"><strong>📖docs/interact🌍</strong></a></h3>\n<h3>109. <a href=\"https://bgoonz-blog.netlify.app/docs/interview/job-search-nav\"><strong>📖docs/interview/job-search-nav🌍</strong></a></h3>\n<h3>110. <a href=\"https://bgoonz-blog.netlify.app/docs/interview/review-concepts\"><strong>📖docs/interview/review-concepts🌍</strong></a></h3>\n<h3>111. <a href=\"https://bgoonz-blog.netlify.app/docs/interview\"><strong>📖docs/interview🌍</strong></a></h3>\n<h3>112. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/arrow-functions\"><strong>📖docs/javascript/arrow-functions🌍</strong></a></h3>\n<h3>113. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/asyncjs\"><strong>📖docs/javascript/asyncjs🌍</strong></a></h3>\n<h3>114. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/await-keyword\"><strong>📖docs/javascript/await-keyword🌍</strong></a></h3>\n<h3>115. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/bigo\"><strong>📖docs/javascript/bigo🌍</strong></a></h3>\n<h3>116. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/clean-code\"><strong>📖docs/javascript/clean-code🌍</strong></a></h3>\n<h3>117. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/constructor-functions\"><strong>📖docs/javascript/constructor-functions🌍</strong></a></h3>\n<h3>118. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/for-loops\"><strong>📖docs/javascript/for-loops🌍</strong></a></h3>\n<h3>119. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/promises\"><strong>📖docs/javascript/promises🌍</strong></a></h3>\n<h3>120. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/review\"><strong>📖docs/javascript/review🌍</strong></a></h3>\n<h3>121. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/this-is-about-this\"><strong>📖docs/javascript/this-is-about-this🌍</strong></a></h3>\n<h3>122. <a href=\"https://bgoonz-blog.netlify.app/docs/javascript\"><strong>📖docs/javascript🌍</strong></a></h3>\n<h3>123. <a href=\"https://bgoonz-blog.netlify.app/docs/leetcode\"><strong>📖docs/leetcode🌍</strong></a></h3>\n<h3>124. <a href=\"https://bgoonz-blog.netlify.app/docs/privacy-policy\"><strong>📖docs/privacy-policy🌍</strong></a></h3>\n<h3>125. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/embeded-websites\"><strong>📖docs/projects/embeded-websites🌍</strong></a></h3>\n<h3>126. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/list-of-projects\"><strong>📖docs/projects/list-of-projects🌍</strong></a></h3>\n<h3>127. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/mini-projects2\"><strong>📖docs/projects/mini-projects2🌍</strong></a></h3>\n<h3>128. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/mini-projects\"><strong>📖docs/projects/mini-projects🌍</strong></a></h3>\n<h3>129. <a href=\"https://bgoonz-blog.netlify.app/docs/projects/my-websites\"><strong>📖docs/projects/my-websites🌍</strong></a></h3>\n<h3>130. <a href=\"https://bgoonz-blog.netlify.app/docs/projects\"><strong>📖docs/projects🌍</strong></a></h3>\n<h3>131. <a href=\"https://bgoonz-blog.netlify.app/docs/python/at-length\"><strong>📖docs/python/at-length🌍</strong></a></h3>\n<h3>132. <a href=\"https://bgoonz-blog.netlify.app/docs/python/cheat-sheet\"><strong>📖docs/python/cheat-sheet🌍</strong></a></h3>\n<h3>133. <a href=\"https://bgoonz-blog.netlify.app/docs/python/comprehensive-guide\"><strong>📖docs/python/comprehensive-guide🌍</strong></a></h3>\n<h3>134. <a href=\"https://bgoonz-blog.netlify.app/docs/python/examples\"><strong>📖docs/python/examples🌍</strong></a></h3>\n<h3>135. <a href=\"https://bgoonz-blog.netlify.app/docs/python/flow-control\"><strong>📖docs/python/flow-control🌍</strong></a></h3>\n<h3>136. <a href=\"https://bgoonz-blog.netlify.app/docs/python/functions\"><strong>📖docs/python/functions🌍</strong></a></h3>\n<h3>137. <a href=\"https://bgoonz-blog.netlify.app/docs/python/google-sheets-api\"><strong>📖docs/python/google-sheets-api🌍</strong></a></h3>\n<h3>138. <a href=\"https://bgoonz-blog.netlify.app/docs/python/intro-for-js-devs\"><strong>📖docs/python/intro-for-js-devs🌍</strong></a></h3>\n<h3>139. <a href=\"https://bgoonz-blog.netlify.app/docs/python/python-ds\"><strong>📖docs/python/python-ds🌍</strong></a></h3>\n<h3>140. <a href=\"https://bgoonz-blog.netlify.app/docs/python/snippets\"><strong>📖docs/python/snippets🌍</strong></a></h3>\n<h3>141. <a href=\"https://bgoonz-blog.netlify.app/docs/python\"><strong>📖docs/python🌍</strong></a></h3>\n<h3>142. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet\"><strong>📖docs/quick-reference/Emmet🌍</strong></a></h3>\n<h3>143. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/all-emojis\"><strong>📖docs/quick-reference/all-emojis🌍</strong></a></h3>\n<h3>144. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/create-react-app\"><strong>📖docs/quick-reference/create-react-app🌍</strong></a></h3>\n<h3>145. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/git-bash\"><strong>📖docs/quick-reference/git-bash🌍</strong></a></h3>\n<h3>146. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/git-tricks\"><strong>📖docs/quick-reference/git-tricks🌍</strong></a></h3>\n<h3>147. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/google-firebase\"><strong>📖docs/quick-reference/google-firebase🌍</strong></a></h3>\n<h3>148. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/heroku-error-codes\"><strong>📖docs/quick-reference/heroku-error-codes🌍</strong></a></h3>\n<h3>149. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/installation\"><strong>📖docs/quick-reference/installation🌍</strong></a></h3>\n<h3>150. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/markdown-dropdowns\"><strong>📖docs/quick-reference/markdown-dropdowns🌍</strong></a></h3>\n<h3>151. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/minifiction\"><strong>📖docs/quick-reference/minifiction🌍</strong></a></h3>\n<h3>152. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions\"><strong>📖docs/quick-reference/new-repo-instructions🌍</strong></a></h3>\n<h3>153. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/psql-setup\"><strong>📖docs/quick-reference/psql-setup🌍</strong></a></h3>\n<h3>154. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/pull-request-rubric\"><strong>📖docs/quick-reference/pull-request-rubric🌍</strong></a></h3>\n<h3>155. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/quick-links\"><strong>📖docs/quick-reference/quick-links🌍</strong></a></h3>\n<h3>156. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/topRepos\"><strong>📖docs/quick-reference/topRepos🌍</strong></a></h3>\n<h3>157. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/understanding-path\"><strong>📖docs/quick-reference/understanding-path🌍</strong></a></h3>\n<h3>158. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/vscode-themes\"><strong>📖docs/quick-reference/vscode-themes🌍</strong></a></h3>\n<h3>159. <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference\"><strong>📖docs/quick-reference🌍</strong></a></h3>\n<h3>160. <a href=\"https://bgoonz-blog.netlify.app/docs/react/ajax-n-apis\"><strong>📖docs/react/ajax-n-apis🌍</strong></a></h3>\n<h3>161. <a href=\"https://bgoonz-blog.netlify.app/docs/react/cheatsheet\"><strong>📖docs/react/cheatsheet🌍</strong></a></h3>\n<h3>162. <a href=\"https://bgoonz-blog.netlify.app/docs/react/createReactApp\"><strong>📖docs/react/createReactApp🌍</strong></a></h3>\n<h3>163. <a href=\"https://bgoonz-blog.netlify.app/docs/react/demo\"><strong>📖docs/react/demo🌍</strong></a></h3>\n<h3>164. <a href=\"https://bgoonz-blog.netlify.app/docs/react/dont-use-index-as-keys\"><strong>📖docs/react/dont-use-index-as-keys🌍</strong></a></h3>\n<h3>165. <a href=\"https://bgoonz-blog.netlify.app/docs/react/jsx\"><strong>📖docs/react/jsx🌍</strong></a></h3>\n<h3>166. <a href=\"https://bgoonz-blog.netlify.app/docs/react/react-docs\"><strong>📖docs/react/react-docs🌍</strong></a></h3>\n<h3>167. <a href=\"https://bgoonz-blog.netlify.app/docs/react/react-in-depth\"><strong>📖docs/react/react-in-depth🌍</strong></a></h3>\n<h3>168. <a href=\"https://bgoonz-blog.netlify.app/docs/react/react2\"><strong>📖docs/react/react2🌍</strong></a></h3>\n<h3>169. <a href=\"https://bgoonz-blog.netlify.app/docs/react/render-elements\"><strong>📖docs/react/render-elements🌍</strong></a></h3>\n<h3>170. <a href=\"https://bgoonz-blog.netlify.app/docs/react\"><strong>📖docs/react🌍</strong></a></h3>\n<h3>171. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/awesome-lists\"><strong>📖docs/reference/awesome-lists🌍</strong></a></h3>\n<h3>172. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/awesome-nodejs\"><strong>📖docs/reference/awesome-nodejs🌍</strong></a></h3>\n<h3>173. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/awesome-static\"><strong>📖docs/reference/awesome-static🌍</strong></a></h3>\n<h3>174. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/bash-commands\"><strong>📖docs/reference/bash-commands🌍</strong></a></h3>\n<h3>175. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/bookmarks\"><strong>📖docs/reference/bookmarks🌍</strong></a></h3>\n<h3>176. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/embed-the-web\"><strong>📖docs/reference/embed-the-web🌍</strong></a></h3>\n<h3>177. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/github-search\"><strong>📖docs/reference/github-search🌍</strong></a></h3>\n<h3>178. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/google-cloud\"><strong>📖docs/reference/google-cloud🌍</strong></a></h3>\n<h3>179. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/how-2-reinstall-npm\"><strong>📖docs/reference/how-2-reinstall-npm🌍</strong></a></h3>\n<h3>180. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/how-to-kill-a-process\"><strong>📖docs/reference/how-to-kill-a-process🌍</strong></a></h3>\n<h3>181. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/installing-node\"><strong>📖docs/reference/installing-node🌍</strong></a></h3>\n<h3>182. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/intro-to-nodejs\"><strong>📖docs/reference/intro-to-nodejs🌍</strong></a></h3>\n<h3>183. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/markdown-styleguide\"><strong>📖docs/reference/markdown-styleguide🌍</strong></a></h3>\n<h3>184. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/notes-template\"><strong>📖docs/reference/notes-template🌍</strong></a></h3>\n<h3>185. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/psql\"><strong>📖docs/reference/psql🌍</strong></a></h3>\n<h3>186. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/resources\"><strong>📖docs/reference/resources🌍</strong></a></h3>\n<h3>187. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/vscode\"><strong>📖docs/reference/vscode🌍</strong></a></h3>\n<h3>188. <a href=\"https://bgoonz-blog.netlify.app/docs/reference/web-api&#x27;s\"><strong>📖docs/reference/web-api's🌍</strong></a></h3>\n<h3>189. <a href=\"https://bgoonz-blog.netlify.app/docs/reference\"><strong>📖docs/reference🌍</strong></a></h3>\n<h3>190. <a href=\"https://bgoonz-blog.netlify.app/docs/search\"><strong>📖docs/search🌍</strong></a></h3>\n<h3>191. <a href=\"https://bgoonz-blog.netlify.app/docs/sitemap\"><strong>📖docs/sitemap🌍</strong></a></h3>\n<h3>192. <a href=\"https://bgoonz-blog.netlify.app/docs/tips/array-methods\"><strong>📖docs/tips/array-methods🌍</strong></a></h3>\n<h3>193. <a href=\"https://bgoonz-blog.netlify.app/docs/tips/insert-into-array\"><strong>📖docs/tips/insert-into-array🌍</strong></a></h3>\n<h3>194. <a href=\"https://bgoonz-blog.netlify.app/docs/tips/sorting-strings\"><strong>📖docs/tips/sorting-strings🌍</strong></a></h3>\n<h3>195. <a href=\"https://bgoonz-blog.netlify.app/docs/tips\"><strong>📖docs/tips🌍</strong></a></h3>\n<h3>196. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/Archive\"><strong>📖docs/tools/Archive🌍</strong></a></h3>\n<h3>197. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/data-structures\"><strong>📖docs/tools/data-structures🌍</strong></a></h3>\n<h3>198. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/dev-utilities\"><strong>📖docs/tools/dev-utilities🌍</strong></a></h3>\n<h3>199. <a href=\"https://bgoonz-blog.netlify.app/docs/tools/markdown-html\"><strong>📖docs/tools/markdown-html🌍</strong></a></h3>\n<h3>200. <a href=\"https://bgoonz-blog.netlify.app/docs/tools\"><strong>📖docs/tools🌍</strong></a></h3>\n<h3>201. <a href=\"https://bgoonz-blog.netlify.app/docs/tutorials/enviorment-setup\"><strong>📖docs/tutorials/enviorment-setup🌍</strong></a></h3>\n<h3>202. <a href=\"https://bgoonz-blog.netlify.app/docs/tutorials\"><strong>📖docs/tutorials🌍</strong></a></h3>\n<h3>203. <a href=\"https://bgoonz-blog.netlify.app/docs\"><strong>🖥️docs🌍</strong></a></h3>"},{"url":"/docs/interact/clock/","relativePath":"docs/interact/clock.md","relativeDir":"docs/interact","base":"clock.md","name":"clock","frontmatter":{"title":"Clock","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<center>\n<h2 style=\" margin-bottom: 2em; align-self:center;\">World Clock(Click To See Localized Time)</h2>\n</center>\n<iframe src=\"https://observablehq.com/embed/1b6399182c98cd36@480?cells=chart%2Cviewof+date\" loading=\"lazy\"\nwidth=\"90%\" height=\"629\" frameborder=\"0\">\n<iframe src=\"https://codepen.io/bgoonz/full/QWgYoBp\" loading=\"lazy\"\nwidth=\"90%\" height=\"629\" frameborder=\"0\">"},{"url":"/docs/faq/plug-ins/","relativePath":"docs/faq/plug-ins.md","relativeDir":"docs/faq","base":"plug-ins.md","name":"plug-ins","frontmatter":{"title":"Plug-ins","weight":0,"seo":{"title":"Gatsby Plugins For This Sites Content Model","description":"This is the Gatsby Plugins For This Sites Content Model page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Gatsby Plugins For This Sites Content Model","keyName":"property"},{"name":"og:description","value":"This is the Gatsby Plugins For This Sites Content Model page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Gatsby Plugins For This Sites Content Model"},{"name":"twitter:description","value":"This is the Gatsby Plugins For This Sites Content Model page"}]},"template":"docs"},"html":"<div class=\"note\">\n  <strong>Note:</strong> These are the gatsby plugins that power the file system of this website! <strong>See more in the Docs</strong> section.\n</div>\n<h3>Code:</h3>\n<blockquote>\n<p>Gatsby Source File System</p>\n</blockquote>\n<pre><code>js\nconst path = require('path');\nconst fs = require('fs');\nconst { createFilePath } = require('gatsby-source-filesystem');\nconst _ = require('lodash');\n\nfunction findFileNode({ node, getNode }) {\n    let fileNode = node;\n    let ids = [fileNode.id];\n\n    while (fileNode &#x26;&#x26; fileNode.internal.type !== `File` &#x26;&#x26; fileNode.parent) {\n        fileNode = getNode(fileNode.parent);\n\n        if (!fileNode) {\n            break;\n        }\n\n        if (_.includes(ids, fileNode.id)) {\n            console.log(`found cyclic reference between nodes`);\n            break;\n        }\n\n        ids.push(fileNode.id);\n    }\n\n    if (!fileNode || fileNode.internal.type !== `File`) {\n        console.log('did not find ancestor File node');\n        return null;\n    }\n\n    return fileNode;\n}\n\nexports.onCreateNode = ({ node, getNode, actions }, options) => {\n    const { createNodeField } = actions;\n\n    if (node.internal.type === 'MarkdownRemark') {\n        let fileNode = findFileNode({ node, getNode });\n        if (!fileNode) {\n            throw new Error('could not find parent File node for MarkdownRemark node: ' + node);\n        }\n\n        let url;\n        if (node.frontmatter.url) {\n            url = node.frontmatter.url;\n        } else if (_.get(options, 'uglyUrls', false)) {\n            url = path.join(fileNode.relativeDirectory, fileNode.name + '.html');\n        } else {\n            url = createFilePath({ node, getNode });\n        }\n\n        createNodeField({ node, name: 'url', value: url });\n        createNodeField({\n            node,\n            name: 'absolutePath',\n            value: fileNode.absolutePath\n        });\n        createNodeField({\n            node,\n            name: 'relativePath',\n            value: fileNode.relativePath\n        });\n        createNodeField({ node, name: 'absoluteDir', value: fileNode.dir });\n        createNodeField({\n            node,\n            name: 'relativeDir',\n            value: fileNode.relativeDirectory\n        });\n        createNodeField({ node, name: 'base', value: fileNode.base });\n        createNodeField({ node, name: 'ext', value: fileNode.ext });\n        createNodeField({ node, name: 'name', value: fileNode.name });\n    }\n};\n\nexports.createPages = ({ graphql, getNode, actions, getNodesByType }) => {\n    const { createPage, deletePage } = actions;\n\n    // Use GraphQL to bring only the \"id\" and \"html\" (added by gatsby-transformer-remark)\n    // properties of the MarkdownRemark nodes. Don't bring additional fields\n    // such as \"relativePath\". Otherwise, Gatsby's GraphQL resolvers might infer\n    // types these fields as File and change their structure. For example, the\n    // \"html\" attribute exists only on a GraphQL node, but does not exist on the\n    // underlying node.\n    return graphql(`\n        {\n            allMarkdownRemark {\n                edges {\n                    node {\n                        id\n                        html\n                    }\n                }\n            }\n        }\n    `).then((result) => {\n        if (result.errors) {\n            return Promise.reject(result.errors);\n        }\n\n        const nodes = result.data.allMarkdownRemark.edges.map(({ node }) => node);\n        const siteNode = getNode('Site');\n        const siteDataNode = getNode('SiteData');\n        const sitePageNodes = getNodesByType('SitePage');\n        const sitePageNodesByPath = _.keyBy(sitePageNodes, 'path');\n        const siteData = _.get(siteDataNode, 'data', {});\n\n        const pages = nodes.map((graphQLNode) => {\n            // Use the node id to get the underlying node. It is not exactly the\n            // same node returned by GraphQL, because GraphQL resolvers might\n            // transform node fields.\n            const node = getNode(graphQLNode.id);\n            return {\n                url: node.fields.url,\n                relativePath: node.fields.relativePath,\n                relativeDir: node.fields.relativeDir,\n                base: node.fields.base,\n                name: node.fields.name,\n                frontmatter: node.frontmatter,\n                html: graphQLNode.html\n            };\n        });\n\n        nodes.forEach((graphQLNode) => {\n            const node = getNode(graphQLNode.id);\n            const url = node.fields.url;\n\n            const template = node.frontmatter.template;\n            if (!template) {\n                console.error(`Error: undefined template for ${url}`);\n                return;\n            }\n\n            const component = path.resolve(`./src/templates/${template}.js`);\n            if (!fs.existsSync(component)) {\n                console.error(`Error: component \"src/templates/${template}.js\" missing for ${url}`);\n                return;\n            }\n\n            const existingPageNode = _.get(sitePageNodesByPath, url);\n\n            const page = {\n                path: url,\n                component: component,\n                context: {\n                    url: url,\n                    relativePath: node.fields.relativePath,\n                    relativeDir: node.fields.relativeDir,\n                    base: node.fields.base,\n                    name: node.fields.name,\n                    frontmatter: node.frontmatter,\n                    html: graphQLNode.html,\n                    pages: pages,\n                    site: {\n                        siteMetadata: _.get(siteData, 'site-metadata', {}),\n                        pathPrefix: siteNode.pathPrefix,\n                        data: _.omit(siteData, 'site-metadata')\n                    }\n                }\n            };\n\n            if (existingPageNode &#x26;&#x26; !_.get(page, 'context.menus')) {\n                page.context.menus = _.get(existingPageNode, 'context.menus');\n            }\n\n            createPage(page);\n        });\n    });\n};\n\n```\n&#x3C;/pre>\n</code></pre>\n<h5>Gatsby Source Data</h5>\n<pre><code>&#x3C;pre>\n```javascript\n</code></pre>\n<pre><code class=\"language-javascript\">const path = require('path');\nconst yaml = require('js-yaml');\nconst fse = require('fs-extra');\nconst chokidar = require('chokidar');\nconst _ = require('lodash');\n\nconst metadataFileName = 'site-metadata.json';\n\nconst parsers = {\n    yaml: (data) => yaml.safeLoad(data, { schema: yaml.JSON_SCHEMA }),\n    json: (data) => JSON.parse(data)\n};\n\nconst supportedExtensions = {\n    yaml: parsers.yaml,\n    yml: parsers.yaml,\n    json: parsers.json\n};\n\nexports.sourceNodes = (props, pluginOptions = {}) => {\n    const createContentDigest = props.createContentDigest;\n    const { createNode } = props.actions;\n    const reporter = props.reporter;\n\n    if (!_.get(pluginOptions, 'path')) {\n        pluginOptions.path = 'src/data';\n    }\n\n    if (!path.isAbsolute(pluginOptions.path)) {\n        pluginOptions.path = path.resolve(process.cwd(), pluginOptions.path);\n    }\n\n    reporter.info(`[gatsby-source-data] setup file watcher and create site data`);\n\n    const dataPath = pluginOptions.path;\n    const createSiteDataFromFilesPartial = _.partial(createSiteDataFromFiles, {\n        dataPath,\n        createNode,\n        createContentDigest,\n        reporter\n    });\n    const watcher = chokidar.watch([dataPath, metadataFileName], {\n        cwd: '.',\n        ignoreInitial: true\n    });\n    watcher.on('add', createSiteDataFromFilesPartial);\n    watcher.on('change', createSiteDataFromFilesPartial);\n    watcher.on('unlink', createSiteDataFromFilesPartial);\n\n    return createSiteDataFromFiles({ dataPath, createNode, createContentDigest, reporter }, null);\n};\n\nasync function createSiteDataFromFiles({ dataPath, createNode, createContentDigest, reporter }, changedFile) {\n    reporter.info(`[gatsby-source-data] create site data from files, updated path: ${changedFile}`);\n    let dataFiles = [];\n\n    const dataPathExists = await fse.pathExists(dataPath);\n    if (dataPathExists) {\n        dataFiles = await readDirRecursively(dataPath);\n    }\n\n    const metadataPath = path.resolve(metadataFileName);\n    const metadataExists = await fse.pathExists(metadataPath);\n    if (metadataExists) {\n        dataFiles.push(metadataFileName);\n    }\n\n    const sortedDataFiles = dataFiles.slice().sort();\n    const data = await convertDataFilesToJSON(sortedDataFiles, dataPath, reporter);\n\n    createNode({\n        id: 'SiteData',\n        parent: null,\n        children: [],\n        data: data,\n        internal: {\n            type: 'SiteData',\n            contentDigest: createContentDigest(JSON.stringify(data)),\n            description: `Site data from ${path.relative(process.cwd(), dataPath)}`\n        }\n    });\n}\n\nasync function readDirRecursively(dir, options) {\n    const rootDir = _.get(options, 'rootDir', dir);\n    const files = await fse.readdir(dir);\n    const promises = _.map(files, async (file) => {\n        const filePath = path.join(dir, file);\n        const stats = await fse.stat(filePath);\n        if (stats.isDirectory()) {\n            return readDirRecursively(filePath, { rootDir });\n        } else if (stats.isFile()) {\n            return path.relative(rootDir, filePath);\n        } else {\n            return null;\n        }\n    });\n    const recFiles = await Promise.all(promises);\n    return _.chain(recFiles).compact().flatten().value();\n}\n\nfunction convertDataFilesToJSON(dataFiles, dataDirPath, reporter) {\n    let promises = _.map(dataFiles, (filePath) => {\n        const pathObject = path.parse(filePath);\n        const absFilePath = pathObject.base === metadataFileName ? metadataFileName : path.join(dataDirPath, filePath);\n        const relPath = pathObject.base === metadataFileName ? metadataFileName : filePath;\n        const relDir = pathObject.base === metadataFileName ? '' : pathObject.dir;\n        const ext = pathObject.ext.substring(1);\n        if (!_.has(supportedExtensions, ext)) {\n            return null;\n        }\n        return fse.readFile(absFilePath).then((data) => {\n            const propPath = _.compact(relDir.split(path.sep).concat(pathObject.name));\n            const res = {};\n            try {\n                const parsedData = supportedExtensions[ext](data);\n                _.set(res, propPath, parsedData);\n            } catch (err) {\n                reporter.warn(`[gatsby-source-data] could not parse file: ${relPath}`);\n            }\n            return res;\n        });\n    });\n    return Promise.all(promises).then((results) => {\n        return _.reduce(results, (data, res) => _.merge(data, res), {});\n    });\n}\n</code></pre>\n<pre><code class=\"language-javascript\">&#x3C;/pre>\n</code></pre>"},{"url":"/docs/interact/jupyter-notebooks/","relativePath":"docs/interact/jupyter-notebooks.md","relativeDir":"docs/interact","base":"jupyter-notebooks.md","name":"jupyter-notebooks","frontmatter":{"title":"Jupyter Notebooks","weight":0,"excerpt":"Jupyter Notebooks allow us to combine the power of a python script with the simplicity of a markdown file.","seo":{"title":"Jupyter Notebooks","description":" Jupyter Notebooks allow us to combine the power of a python script with the simplicity of a markdown file","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<ul>\n<li><a href=\"https://mybinder.org/v2/gh/bgoonz/Jupyter-Notebooks/439b0b3a1cae4bf7181996f1057221942c0c449f?filepath=00-Guide-to-Web-Scraping.ipynb\">Open Binder Jupyter Notebook</a></li>\n</ul>\n<iframe src=\"https://mybinder.org/v2/gh/bgoonz/Jupyter-Notebooks/439b0b3a1cae4bf7181996f1057221942c0c449f\" height=\"900px\" width=\"100%\">\n</iframe>"},{"url":"/docs/interact/","relativePath":"docs/interact/index.md","relativeDir":"docs/interact","base":"index.md","name":"index","frontmatter":{"title":"Interactive","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Interactive Examples","description":"here is content the user can interact with","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<ul>\n<li><a href=\"https://ds-algo-official.netlify.app/\">Data Structures Interactive</a></li>\n</ul>\n<iframe src=\"https://ds-algo-official.netlify.app/\" height=\"900px\" width=\"100%\">\n</iframe>\n<ul>\n<li><a href=\"https://bgoonz-games.netlify.app/\">Games</a></li>\n</ul>\n<iframe src=\"https://bgoonz-games.netlify.app/\" height=\"900px\" width=\"100%\">\n</iframe>\n<ul>\n<li><a href=\"https://webdevhub42.notion.site/Embeds-a3b7edb038b246a0adbfed9de9c2a9ac\">Embeds</a></li>\n</ul>\n<iframe src=\"https://random-static-html-deploys.netlify.app/embeds_notion\" height=\"900px\" width=\"100%\">\n</iframe>"},{"url":"/docs/interact/other-sites/","relativePath":"docs/interact/other-sites.md","relativeDir":"docs/interact","base":"other-sites.md","name":"other-sites","frontmatter":{"title":"Other Websites","weight":0,"seo":{"title":"Typography","description":"This is the typography page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Typography","keyName":"property"},{"name":"og:description","value":"This is the typography page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Typography"},{"name":"twitter:description","value":"This is the typography page"}]},"template":"docs"},"html":"<h1> Here are some other websites I have worked on since endeavoring to learn web development! </h1>\n<br>\n<h1>  Alternate Blog</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"  https://bgoonz-blog-v3-0.netlify.app/  \" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Games </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"  https://bgoonz-games.netlify.app/  \" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<h1>  Projects         </h1>\n<br>\n<iframe src=\" https://project-portfolio42.netlify.app/  \" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>   Wordpress Site </h1>\n<br>\n<iframe class=\"inner\" src=\"  https://web-dev-hub.com/  \" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>  Interview     </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"   \" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>   Speach Recognition api </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"   \" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<h1>  The Algos Bgoonz Branch </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz-branch-the-algos.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://thealgorithms.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>"},{"url":"/docs/interview/job-search-nav/","relativePath":"docs/interview/job-search-nav.md","relativeDir":"docs/interview","base":"job-search-nav.md","name":"job-search-nav","frontmatter":{"title":"Job Search Navigation","weight":0,"excerpt":"These are some of my active projects.","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Navigation</h1>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/README\">🏡 Home</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/navigation\">🗺 Navigation</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/useful-downloads\">📥 Useful Downloads</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/skills/README\">🛠 Skills</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/skills/my-stack\">My Stack</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/resources/README\">🙏 Resources</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/orientation\">Orientation:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/links\">Links</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/practice-problems\">Practice Problems:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/cold-outreach-generator\">❄ Cold Outreach Generator</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/running-list-of-misc-resources\">Running List Of MISC Resources:</a></li>\n</ul>\n</li>\n</ul>\n<h2>Resume</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/resume/resume/README\">📰 Resume</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resume/resume/examples\">Examples</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resume/resume/advice\">Advice</a></li>\n</ul>\n</li>\n</ul>\n<h2>Cover Letter</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/cover-letter/page-10\">📒 Cover Letter</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/cover-letter/example-of-developer-bio\">Example Of Developer Bio</a></li>\n</ul>\n<h2>Portfolio</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/portfolio/showcase\">💼 Showcase</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/portfolio/git-repo\">💾 Git Repo</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/portfolio/page-11\">🖼 Portfolio</a></li>\n</ul>\n<h2>📈 Slack&#x26;Lambda</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/pinned-items\">📍 Pinned Items:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/pinned-messages\">📌 Pinned Messages:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/slack-announcements\">❇ Slack Announcements</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/recordings\">📺 Recordings</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/people\">🧑🤝🧑 People</a></li>\n</ul>\n<h2>Aux-Resources</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/aux-resources/youtube\">Youtube</a></li>\n</ul>\n<h2>🖋 Interview Prep</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/interview-questions./README\">⁉ Interview Questions.</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/interview-questions./cheat-sheets\">Cheat Sheets</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/python-vs-js-cheat-sheet\">Python-VS-JS Cheat Sheet</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/common-knowledge-questions\">Common Knowledge Questions</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/types-of-data-structures\">Types Of Data Structures</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/ds_algo_prac/leetcode\">👨💻 Leetcode:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/hash-tables\">Hash Tables</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/ds_algo-practice/README\">DS_ALGO Practice:</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/ds_algo-practice/python-subpage\">Python Subpage</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/python\">🐍 Python</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/more-practice\">More Practice:</a></li>\n</ul>\n<h2>Tutorials</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/tutorials/untitled/README\">Job Search Guide</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/tutorials/untitled/page-2\">Common Questions</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/tutorials/untitled/page-2-1\">Self Introduction</a></li>\n</ul>\n</li>\n</ul>\n<!---->\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/page-3\">Getting Started</a></li>\n</ul>\n<h2>Applications &#x26; Job Postings</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/postings\">👔 Postings:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/my-applications\">My Applications</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/README\">😅 Jobs I Really Want</a></p>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/stackbit/README\">Stackbit</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/stackbit/developer-advocate-remote\">Developer Advocate (Remote)</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/stackbit/page-4\">Page 4</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/emails\">Emails</a></li>\n</ul>\n</li>\n</ul>\n<h2>Job Boards</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/job-boards/job-boards/README\">📋 Job Boards</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/job-boards/job-boards/less-promising-job-boards\">Less Promising Job Boards</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/job-boards/job-boards/list-of-boards\">LIST OF BOARDS</a></li>\n</ul>\n</li>\n</ul>\n<h2>Networking</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/networking/events\">🗓 Events</a></li>\n</ul>\n<h2>Lambda Guidance &#x26; Meetings</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/lambda-guidance-and-meetings/meetings\">📥 Meetings:</a></li>\n</ul>\n<h2>MISC</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/misc/articles-to-read\">🗞 Articles To Read</a></li>\n</ul>\n<h2>Notes</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/notes/notes/README\">📓 Notes</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/notes/notes/page-5\">Page 5</a></li>\n</ul>\n</li>\n</ul>\n<h2>🖨 Interviewing</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interviewing/general\">General</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interviewing/js\">🖥 JS</a></li>\n</ul>\n<h1></h1>"},{"url":"/docs/interact/video-chat/","relativePath":"docs/interact/video-chat.md","relativeDir":"docs/interact","base":"video-chat.md","name":"video-chat","frontmatter":{"title":"Zumzi Video Conferencing (Mesibo API Backend)","weight":0,"excerpt":"Video chat front end app","seo":{"title":"Zumzi Video Conference:","description":"Features:\nGroup Voice and Video Call with unlimited members\nLive Streaming\nScreen Sharing\nSupports video streaming at various resolutions.","robots":[],"extra":[{"name":"og:description","value":"Features:\nGroup Voice and Video Call with unlimited members\nLive Streaming\nScreen Sharing\nSupports video streaming at various resolutions.","keyName":"property","relativeUrl":false},{"name":"og:title","value":"Zumzi Video Conference:","keyName":"property","relativeUrl":false},{"name":"og:image","value":"images/zumzi-video-chat-0aba1c15.png","keyName":"property","relativeUrl":true}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Zumzi Video Conference:</h1>\n<iframe class=\"block-content\" width=\"100%  width=\"1000px\" height=\"1400px\"\n        src=\"https://zumzi-chat-messenger.vercel.app/web/login.html\"></iframe>\n<h2>Zumzi Live Demo</h2>\n<p><img src=\"https://zumzi-chat-messenger.vercel.app/web/login.html\" alt=\"demo\"></p>\n<h2>Features:</h2>\n<ul>\n<li>Group Voice and Video Call with unlimited members</li>\n<li>Live Streaming</li>\n<li>Screen Sharing</li>\n<li>Fine control over all video &#x26; audio parameters and user permissions</li>\n<li>Supports video streaming at various resolutions: Standard, HD, FHD and 4K</li>\n<li>Group Chat</li>\n<li>One-to-One chat</li>\n<li>Invite Participants</li>\n</ul>\n<p>There are two sub-folders:</p>\n<ul>\n<li><strong>backend</strong> contains the source code for hosting the backend APIs for the app</li>\n<li><strong>web</strong> contains the source code for the app which you can directly integrate into your website.</li>\n</ul>\n<h2>Apendix</h2>\n<ul>\n<li>\n<p>access token:</p>\n<blockquote>\n<p>An Access Token needs to be generated for every user who needs to access mesibo real-time messaging API. You can generate Access Token for every user of your application on demand and send it to the user. The user will then use this access token to initialize mesibo client-side API..</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>api key</p>\n<blockquote>\n<p>API key is a unique alphanumeric identifier associated with your Mesibo account. You can view, change or regenerate the API key from the Mesibo console.</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>Application Token</p>\n<blockquote>\n<p>is a unique alphanumeric identifier with one of your application. You can view and change the app token from the Mesibo Console.</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>Mesibo container</p>\n<blockquote>\n<p>A container is a runtime instance of mesibo in-premises docker image.</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>MAU</p>\n<blockquote>\n<p>MAU is counted when a user connects to mesibo server within monthly billing period. To further clarify, it will be only counted as one when a unique user connects to mesibo server multiple times within monthly billing period</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>High-availability clusters</p>\n<blockquote>\n<p>(also known as HA clusters or fail-over clusters) are\ngroups of computers that support server applications that can be reliably utilized with a minimum amount of down-time</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>namespace</p>\n<blockquote>\n<p>in mesibo is refer to a mesibo feature that isolates users and groups of an application from another application. Users can only interact with users and groups of the same application that are part of the same namespace. Namespaces are an important part of Mesibo's isolation model</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>node</p>\n<blockquote>\n<p>A [node]is a physical or virtual machine running an instance of the mesibo.</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>On premises deployment</p>\n<blockquote>\n<p>Mesibo On-premises deploment allows you to run Mesibo in your own data center or cloud.</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>1-1 Communication</p>\n<blockquote>\n<p>Communication is between two parties; for example, a chat or a call</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<ul>\n<li>\n<p>Peer-to-peer\n(P2P)</p>\n<blockquote>\n<p>It is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the application.They are said to form a peer-to-peer network of nodes.</p>\n</blockquote>\n</li>\n</ul>\n<hr>\n<p><img src=\"https://github.com/bgoonz/zumzi-chat-messenger/blob/master/zumzi.PNG?raw=true\" alt=\"zzumzi\"></p>\n<pre><code>[.](.)&#x3C;br>\n├── [./backend](./backend)\n│ ├── [./backend/activation.php](./backend/activation.php)\n│ ├── [./backend/api_functions.php](./backend/api_functions.php)\n│ ├── [./backend/api.php](./backend/api.php)\n│ ├── [./backend/captcha.php](./backend/captcha.php)\n│ ├── [./backend/config.php](./backend/config.php)\n│ ├── [./backend/consts.php](./backend/consts.php)\n│ ├── [./backend/db.sql](./backend/db.sql)\n│ ├── [./backend/errorhandler.php](./backend/errorhandler.php)\n│ ├── [./backend/httpheaders.php](./backend/httpheaders.php)\n│ ├── [./backend/image.php](./backend/image.php)\n│ ├── [./backend/json.php](./backend/json.php)\n│ ├── [./backend/mesiboapi.php](./backend/mesiboapi.php)\n│ ├── [./backend/mesibohelper.php](./backend/mesibohelper.php)\n│ ├── [./backend/mysqldb.php](./backend/mysqldb.php)\n│ ├── [./backend/mysql-wrapper.php](./backend/mysql-wrapper.php)\n│ ├── [./backend/README.md](./backend/README.md)\n│ ├── [./backend/upload.php](./backend/upload.php)\n│ └── [./backend/utility.php](./backend/utility.php)\n├── [./glossary_files](./glossary_files)\n│ ├── [./glossary_files/559862854355634.js](./glossary_files/559862854355634.js)\n│ ├── [./glossary_files/analytics.js](./glossary_files/analytics.js)\n│ ├── [./glossary_files/archive.js](./glossary_files/archive.js)\n│ ├── [./glossary_files/bootstrap.min.css](./glossary_files/bootstrap.min.css)\n│ ├── [./glossary_files/bootstrap.min.js](./glossary_files/bootstrap.min.js)\n│ ├── [./glossary_files/buttons.js](./glossary_files/buttons.js)\n│ ├── [./glossary_files/collections_tocs.js](./glossary_files/collections_tocs.js)\n│ ├── [./glossary_files/css.css](./glossary_files/css.css)\n│ ├── [./glossary_files/docs.js](./glossary_files/docs.js)\n│ ├── [./glossary_files/fbevents.js](./glossary_files/fbevents.js)\n│ ├── [./glossary_files/font-awesome.min.css](./glossary_files/font-awesome.min.css)\n│ ├── [./glossary_files/github.css](./glossary_files/github.css)\n│ ├── [./glossary_files/glossary.js](./glossary_files/glossary.js)\n│ ├── [./glossary_files/jquery.js](./glossary_files/jquery.js)\n│ ├── [./glossary_files/menu.js](./glossary_files/menu.js)\n│ ├── [./glossary_files/mesibo-logo.svg](./glossary_files/mesibo-logo.svg)\n│ ├── [./glossary_files/mesibo-logo-white.png](./glossary_files/mesibo-logo-white.png)\n│ ├── [./glossary_files/metadata.js](./glossary_files/metadata.js)\n│ ├── [./glossary_files/perldoc.css](./glossary_files/perldoc.css)\n│ ├── [./glossary_files/stickyfill.min.js](./glossary_files/stickyfill.min.js)\n│ ├── [./glossary_files/style.css](./glossary_files/style.css)\n│ └── [./glossary_files/toc.js](./glossary_files/toc.js)&#x3C;br>\n├── [./glossary.html](./glossary.html)&#x3C;br>\n├── [./index.html](./index.html)&#x3C;br>\n├── [./package-lock.json](./package-lock.json)&#x3C;br>\n├── [./README.md](./README.md)&#x3C;br>\n├── [./scrap.md](./scrap.md)&#x3C;br>\n├── [./tree.md](./tree.md)&#x3C;br>\n├── [./TREE.md](./TREE.md)&#x3C;br>\n├── [./web](./web)\n│ ├── [./web/assets](./web/assets)\n│ │ ├── [./web/assets/audio](./web/assets/audio)\n│ │ │ ├── [./web/assets/audio/join.mp3](./web/assets/audio/join.mp3)\n│ │ │ └── [./web/assets/audio/join.ogg](./web/assets/audio/join.ogg)\n│ │ ├── [./web/assets/fonts](./web/assets/fonts)\n│ │ │ └── [./web/assets/fonts/font-awesome](./web/assets/fonts/font-awesome)\n│ │ │ └── [./web/assets/fonts/font-awesome/css](./web/assets/fonts/font-awesome/css)\n│ │ │ └── [./web/assets/fonts/font-awesome/css/font-awesome.css](./web/assets/fonts/font-awesome/css/font-awesome.css)\n│ │ ├── [./web/assets/images](./web/assets/images)\n│ │ │ ├── [./web/assets/images/blank-white.jpg](./web/assets/images/blank-white.jpg)\n│ │ │ ├── [./web/assets/images/file](./web/assets/images/file)\n│ │ │ │ └── [./web/assets/images/file/default_file_icon.jpg](./web/assets/images/file/default_file_icon.jpg)\n│ │ │ ├── [./web/assets/images/mesibo-logo-m.png](./web/assets/images/mesibo-logo-m.png)\n│ │ │ ├── [./web/assets/images/mesibo-logo.png](./web/assets/images/mesibo-logo.png)\n│ │ │ ├── [./web/assets/images/profile](./web/assets/images/profile)\n│ │ │ │ ├── [./web/assets/images/profile/default-group-icon.jpg](./web/assets/images/profile/default-group-icon.jpg)\n│ │ │ │ └── [./web/assets/images/profile/default-profile-icon.jpg](./web/assets/images/profile/default-profile-icon.jpg)\n│ │ │ └── [./web/assets/images/social.png](./web/assets/images/social.png)\n│ │ └── [./web/assets/scripts](./web/assets/scripts)\n│ │ └── [./web/assets/scripts/platform.js](./web/assets/scripts/platform.js)\n│ ├── [./web/index.html](./web/index.html)\n│ ├── [./web/listing.md](./web/listing.md)\n│ ├── [./web/login.html](./web/login.html)\n│ ├── [./web/mesibo](./web/mesibo)\n│ │ ├── [./web/mesibo/app.js](./web/mesibo/app.js)\n│ │ ├── [./web/mesibo/calls.js](./web/mesibo/calls.js)\n│ │ ├── [./web/mesibo/config.js](./web/mesibo/config.js)\n│ │ ├── [./web/mesibo/files.js](./web/mesibo/files.js)\n│ │ ├── [./web/mesibo/notify.js](./web/mesibo/notify.js)\n│ │ └── [./web/mesibo/utils.js](./web/mesibo/utils.js)\n│ ├── [./web/README.md](./web/README.md)\n│ ├── [./web/scripts](./web/scripts)\n│ │ ├── [./web/scripts/app-utils.js](./web/scripts/app-utils.js)\n│ │ ├── [./web/scripts/controller.js](./web/scripts/controller.js)\n│ │ └── [./web/scripts/login.js](./web/scripts/login.js)\n│ ├── [./web/styles](./web/styles)\n│ │ ├── [./web/styles/live.css](./web/styles/live.css)\n│ │ ├── [./web/styles/mesibolive.css](./web/styles/mesibolive.css)\n│ │ ├── [./web/styles/popup.css](./web/styles/popup.css)\n│ │ └── [./web/styles/popupdesign.css](./web/styles/popupdesign.css)\n│ └── [./web/vendor](./web/vendor)\n│ ├── [./web/vendor/bootstrap.min.css](./web/vendor/bootstrap.min.css)\n│ └── [./web/vendor/bootstrap.min.js](./web/vendor/bootstrap.min.js)&#x3C;br>\n└── [./zumzi-video-chat.PNG](./zumzi-video-chat.PNG)&#x3C;br>\n</code></pre>\n<h2>Messenger</h2>\n<p>Edit <code>config.js</code> and provide the <code>AUTH TOKEN</code> &#x26; <code>APP ID</code>.</p>\n<p>You can obtain the <code>AUTH TOKEN</code> and <code>APP ID</code> for a user from <a href=\"https://mesibo.com/console/\">Mesibo Console</a>.</p>\n<p>Refer to the <a href=\"https://mesibo.com/documentation/tutorials/get-started\">Get-Started Guide</a> to learn about the basics of mesibo.</p>\n<p>To open messenger demo launch <code>messenger.html</code></p>\n<pre><code class=\"language-javascript\">const MESIBO_ACCESS_TOKEN = 'xxxxxxx';\nconst MESIBO_APP_ID = 'xxxx';\nconst MESIBO_API_URL = 'https://app.mesibo.com/api.php';\n</code></pre>\n<p>If you are hosting mesibo-backend on your own server, you need to change the API URL to point to your server.</p>\n<h3>Messenger Login</h3>\n<p>You can synchronize contacts, by using a phone number to login to mesibo messenger-javascript.</p>\n<p>To login to the mesibo messenger web app, in the login screen provide the phone number along with country code starting with <code>+</code> For Example, If your country code is <code>91</code> and your ten-digit phone number is <code>XXXXXXXXXX</code>, enter your phone number as <code>+91XXXXXXXXXX</code> (with out any spaces or special characters in between)</p>\n<p>Use OTP 123456 to login. Mesibo will generate and store <code>MESIBO_ACCESS_TOKEN</code> if login is successful.</p>\n<p>Please note that you only need to login once as for later sessions your token will be stored in local storage.</p>\n<p>If you DO NOT wish to login with your phone number, make sure you configure a valid <code>MESIBO_ACCESS_TOKEN</code> in <code>config.js</code> and set <code>isLoginEnabled = false</code></p>\n<h3>Synchronizing contacts on Messenger</h3>\n<p>To synchronize contacts set <code>isContactSync = true</code></p>\n<p>For the best experience using the messenger app, make sure you have some contacts who are using Mesibo Messenger. These contacts will be displayed as a list of available users to whom you can send messages or make calls. Optionally, you can also manually provide a list of phone numbers of contacts who are using mesibo in <code>MESIBO_LOCAL_CONTACTS</code> or by clicking on the <code>Add Contact</code> button.</p>\n<p>You can provide a list of local contacts that will be loaded as a list of available users. Set local contacts as follows in <code>config.js</code></p>\n<pre><code>var MESIBO_LOCAL_CONTACTS =[\n\n{\n        \"address\" : \"18885551001\",\n        \"groupid\" : 0,\n        \"picture\" : \"images/profile/default-profile-icon.jpg\",\n        \"name\"    : \"MesiboTest\",\n        \"status\": \"Let's Chat..\"\n},\n\n{\n        \"groupid\" : 104661,\n        \"picture\" : \"images/profile/default-group-icon.jpg\",\n        \"name\"    : \"Mesibo Group\",\n        \"members\" : \"1:123,456,789\"             //Members list. Add 1: to mark as admin\n},\n\n]\n</code></pre>\n<h2>Popup</h2>\n<p>To launch popup demo you can configure the following for setting the displayed user avatar and destination user(to which all messages will be sent) in <code>config.js</code> and launch <code>popup.html</code></p>\n<pre><code class=\"language-javascript\">const POPUP_DISPLAY_NAME = 'xxxx';\nconst POPUP_DISPLAY_PICTURE = 'images/profile/default-profile-icon.jpg';\nconst POPUP_DESTINATION_USER = 'xxxx';\n</code></pre>\n<h2>FAQ &#x26; Troubleshooting</h2>\n<h3>Getting <code>AUTHFAIL</code> with getcontacts API</h3>\n<p>This means the token you have provided in <code>MESIBO_ACCESS_TOKEN</code> is not generated or validated with your phone number which is required for synchronizing contacts.</p>\n<p>To generate a token by validating your phone number, make sure you have set <code>isLoginEnabled = true</code>. A login screen will then appear during app start, where you can enter your phone number(Example +91XXXXXXXXXX), get an OTP, and log in.</p>\n<p>If you do not wish to synchronize contacts, set <code>isContactSync = false</code> and provide a list of local contacts in <code>MESIBO_LOCAL_CONTACTS</code>.</p>\n<h3>I do not wish to use phone login, what should I do?</h3>\n<p>Set <code>isLoginEnabled = false</code> and make sure that you provide a valid <code>MESIBO_ACCESS_TOKEN</code></p>\n<h3>I do not want to synchronize with my phone contacts, how do I configure that?</h3>\n<p>If you do not wish to synchronize contacts, set <code>isContactSync = false</code> and provide a list of local contacts in <code>MESIBO_LOCAL_CONTACTS</code>.</p>\n<h3>Do I need to log in with my phone number every time I load the app?</h3>\n<p>No the first time you log in with your phone number with a valid OTP the token will be stored in localStorage. In future loading of the app, the token will be loaded from local storage. Or if you have provided a valid <code>MESIBO_ACCESS_TOKEN</code> in <code>config.js</code> that will be loaded.</p>\n<h3>Getting $scope.mesibo.X is not a function</h3>\n<p>Ensure that you perform a hard reload so that you have the latest Mesibo Javascript API</p>\n<h2>Install Mesibo Javascript SDK</h2>\n<p>The easiest way to install Mesibo Javascript SDK is to include following in <code>&#x3C;HEAD></code> section of your HTML file:</p>\n<pre><code>&#x3C;script type=\"text/javascript\" src=\"https://api.mesibo.com/mesibo.js\">&#x3C;/script>\n</code></pre>\n<p>You can also use <code>async</code> and <code>defer</code> attributes inside <code>script</code> tag if requires.</p>\n<p>Alternatively, you may also use DOM method to load the mesibo JS on demand when it is not possible to use the script tag.</p>\n<pre><code>const script = document.createElement(\"script\");\nscript.src = \"https://api.mesibo.com/mesibo.js\";\ndocument.body.appendChild(script);\n</code></pre>\n<blockquote>\n<p>You must use a secure website (https) to use mesibo javascript. It may NOT work from <code>http://</code> or <code>file://</code> sites due to browser security restrictions.</p>\n</blockquote>\n<h2>Notes when using it for Calls and Conferencing</h2>\n<p>Due to the browser security model, camera and microphone access require the following:</p>\n<ul>\n<li>You MUST use a secure URL (<code>https://</code>). The <code>http://</code> or <code>file://</code> URLs will NOT work.</li>\n<li>You MUST also use a valid certificate with recognized authority, the self-signed certificate will NOT work.</li>\n</ul>\n<p>The browser will not grant the camera and microphone permissions unless your app meets the above requirements. If permissions are not granted, calls and conferencing will not work.</p>\n<p>These restrictions are by the browsers and NOT by the mesibo. Refer Security section in the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#security\">Mozilla documentation</a> for more information.</p>\n<h3>That's All!</h3>\n<p>You can now begin developing features with mesibo.</p>\n<p><a href=\"https://mesibo.com/documentation/glossary/?term=javascript%20chat%20sdk\">javascript chat sdk</a>, <a href=\"https://mesibo.com/documentation/glossary/?term=messaging%20sdk%20for%20javascript\">messaging sdk for javascript</a>, <a href=\"https://mesibo.com/documentation/glossary/?term=javascript%20sdk%20for%20chat\">javascript sdk for chat</a>, <a href=\"https://mesibo.com/documentation/glossary/?term=install%20sdk%20through%20javascript\">install sdk through javascript</a></p>"},{"url":"/docs/javascript/arrow-functions/","relativePath":"docs/javascript/arrow-functions.md","relativeDir":"docs/javascript","base":"arrow-functions.md","name":"arrow-functions","frontmatter":{"title":"JS Fat Arrow Functions","weight":0,"excerpt":"JS Fat Arrow Functions","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>JS Fat Arrow Functions</h2>\n<p>Classical JavaScript function syntax doesn't provide for any flexibility, be that a 1 statement function or an unfortunate multi-page function. Every time you need a function you have to type out the dreaded <code>function () {}</code>. More concise function syntax was one of the many reasons why <a href=\"http://coffeescript.org/\">CoffeeScript</a> gained so much momentum back in the day. This is especially pronounced in the case of tiny callback functions. Lets look at a Promise chain:</p>\n<pre><code>function getVerifiedToken(selector) {\n  return getUsers(selector)\n    .then(function (users) { return users[0]; })\n    .then(verifyUser)\n    .then(function (user, verifiedToken) { return verifiedToken; })\n    .catch(function (err) { log(err.stack); });\n}\n</code></pre>\n<p>Above is more or less plausible piece of code written using classical JavaScript <code>function</code> syntax. Here is what the same code could look like rewritten using the arrow syntax:</p>\n<pre><code>function getVerifiedToken(selector) {\n  return getUsers(selector)\n    .then(users => users[0])\n    .then(verifyUser)\n    .then((user, verifiedToken) => verifiedToken)\n    .catch(err => log(err.stack));\n}\n</code></pre>\n<p>A few important things to notice here:</p>\n<ol>\n<li>We've lost <code>function</code> and <code>{}</code> because all of our callback functions are one liners.</li>\n<li>We've lost <code>()</code> around the argument list when there's just one argument (rest arguments are an exception, eg <code>(...args) => ...</code>)</li>\n<li>We've lost the <code>return</code> keyword because when omitting <code>{}</code>, single line arrow functions perform an implicit return (these functions are often referred to as lambda functions in other languages).</li>\n</ol>\n<p>It's important to reinforce the last point. Implicit return only happens for single statement arrow functions. When arrow function is declared with <code>{}</code>, even if it's a single statement, implicit return does not happen:</p>\n<pre><code>const getVerifiedToken = selector => {\n  return getUsers()\n    .then(users => users[0])\n    .then(verifyUser)\n    .then((user, verifiedToken) => verifiedToken)\n    .catch(err => log(err.stack));\n}\n</code></pre>\n<p>Here's the really fun bit. Because our function has only one statement, we can still get rid of the <code>{}</code> and it will look almost exactly like <a href=\"http://coffeescript.org/\">CoffeeScript</a> syntax:</p>\n<pre><code>const getVerifiedToken = selector =>\n  getUsers()\n    .then(users => users[0])\n    .then(verifyUser)\n    .then((user, verifiedToken) => verifiedToken)\n    .catch(err => log(err.stack));\n</code></pre>\n<p>Yep, the example above is completely valid ES2015 syntax (I was also surprised that it <a href=\"http://babeljs.io/repl/#?\">compiles fine</a>). When we talk about single statement arrow functions, it doesn't mean the statement can't be spread out to multiple lines for better comprehension.</p>\n<p>There's one caveat, however, with omitting <code>{}</code> from arrow functions -- how do you return an empty object, eg <code>{}</code>?</p>\n<pre><code>const emptyObject = () => {};\nemptyObject(); // ?\n</code></pre>\n<p>Unfortunately there's no way to distinguish between empty block <code>{}</code> and an object <code>{}</code>. Because of that <code>emptyObject()</code> evaluates to <code>undefined</code> and <code>{}</code> interpreted as empty block. To return an empty object from fat arrow functions you have to surround it with brackets like so <code>({})</code>:</p>\n<pre><code>const emptyObject = () => ({});\nemptyObject(); // {}\n</code></pre>\n<p>Here's all of the above together:</p>\n<pre><code>function () { return 1; }\n() => { return 1; }\n() => 1\n\nfunction (a) { return a * 2; }\n(a) => { return a * 2; }\n(a) => a * 2\na => a * 2\n\nfunction (a, b) { return a * b; }\n(a, b) => { return a * b; }\n(a, b) => a * b\n\nfunction () { return arguments[0]; }\n(...args) => args[0]\n\n() => {} // undefined\n() => ({}) // {}\n</code></pre>\n<h2>Lexical <code>this</code></h2>\n<p>The story of clobbering <code>this</code> in JavaScript is a really old one. Each <code>function</code> in JavaScript defines its own <code>this</code> context, which is as easy to get around as it is annoying. The example below tries to display a clock that updates every second using jQuery:</p>\n<pre><code>$('.current-time').each(function () {\n  setInterval(function () {\n    $(this).text(Date.now());\n  }, 1000);\n});\n</code></pre>\n<p>When attempting to reference the DOM element <code>this</code> set by <code>each</code> in the <code>setInterval</code> callback, we unfortunately get a brand new <code>this</code> that belongs to the callback itself. A common way around this is to declare <code>that</code> or <code>self</code> variable:</p>\n<pre><code>$('.current-time').each(function () {\n  var self = this;\n\n  setInterval(function () {\n    $(self).text(Date.now());\n  }, 1000);\n});\n</code></pre>\n<p>The fat arrow functions allow you to solve this problem because they don't introduce their own <code>this</code>:</p>\n<pre><code>$('.current-time').each(function () {\n  setInterval(() => $(this).text(Date.now()), 1000);\n});\n</code></pre>\n<h2>What about arguments?</h2>\n<p>One of the caveats with arrow functions is that they also don't have their own <code>arguments</code> variable like regular functions:</p>\n<pre><code>function log(msg) {\n  const print = () => console.log(arguments[0]);\n  print(`LOG: ${msg}`);\n}\n\nlog('hello'); // hello\n</code></pre>\n<p>To reiterate, fat arrow functions don't have their own <code>this</code> and <code>arguments</code>. Having said that, you can still get all arguments passed into the arrow functions using rest parameters (also known as spread operator):</p>\n<pre><code>function log(msg) {\n  const print = (...args) => console.log(args[0]);\n  print(`LOG: ${msg}`);\n}\n\nlog('hello'); // LOG: hello\n</code></pre>\n<h2>What about yield?</h2>\n<p>Fat arrow functions can't be used as generators. That's it -- no exceptions, no caveats and no workarounds.</p>\n<h2>Bottom Line</h2>\n<p>Fat arrow functions are one of my favorite additions to JavaScript. It might be very tempting to just start using <code>=></code> instead of <code>function</code> everywhere. I've seen whole libraries written just using <code>=></code> and I don't think it's the right thing to do because of the special features that <code>=></code> introduces. I recommend using arrow functions only in places where you explicitly want to use the new features:</p>\n<ul>\n<li>Single statement functions that immediately return (lambdas)</li>\n<li>Functions that need to work with parent scope <code>this</code></li>\n</ul>"},{"url":"/docs/javascript/bigo/","relativePath":"docs/javascript/bigo.md","relativeDir":"docs/javascript","base":"bigo.md","name":"bigo","frontmatter":{"title":"A Very Quick Guide To Calculating Big O Computational Complexity","weight":0,"excerpt":"A quick guide to big O","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>A Very Quick Guide To Calculating Big O Computational Complexity\n\n</h1>\n<p><strong>Big O</strong>: big picture, broad strokes, not details</p>\n<p><img src=\"https://miro.medium.com/max/630/0*lte81mEvgEPYXodB.png\"></p>\n<p><img src=\"https://miro.medium.com/max/304/1*5t2u8n1uKhioIzZIXX2zbg.png\"></p>\n<p><img src=\"https://miro.medium.com/max/563/1*HhXmG2cNdg8y4ZCCQGTyuQ.png\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*ULeXxVCDkF73GwhsxyM_2g.png\"><img src=\"https://miro.medium.com/max/900/1*hkZWlUgFyOSaLD5Uskv0tQ.png\"><img src=\"https://miro.medium.com/max/1115/1*COjzunj0-FsMJ0d7v7Z-6g.png\"></p>\n<p>For a more complete guide… checkout :</p>\n<ul>\n<li>way we analyze how efficient algorithms are without getting too mired in details</li>\n<li>can model how much time any function will take given n inputs</li>\n<li>interested in order of magnitude of number of the exact figure</li>\n<li>O absorbs all fluff and n = biggest term</li>\n<li>Big O of 3x^2 +x + 1 = O(n^2)</li>\n</ul>\n<h1>Time Complexity</h1>\n<p>no loops or exit &#x26; return = O(1)</p>\n<p>0 nested loops = O(n)\n1 nested loops = O(n^2)\n2 nested loops = O(n^3)\n3 nested loops = O(n^4)</p>\n<p><strong>recursive</strong>: as you add more terms, increase in time as you add input diminishes\n<strong>recursion</strong>: when you define something in terms of itself, a function that calls itself</p>\n<ul>\n<li>used because of ability to maintain state at diffferent levels of recursion</li>\n<li>inherently carries large footprint</li>\n<li>every time function called, you add call to stack</li>\n</ul>\n<p><strong>iterative</strong>: use loops instead of recursion (preferred)\n- favor readability over performance</p>\n<p>O(n log(n)) &#x26; O(log(n)): dividing/halving</p>\n<ul>\n<li>if code employs recursion/divide-and-conquer strategy</li>\n<li>what power do i need to power my base to get n</li>\n</ul>\n<h1>Time Definitions</h1>\n<ul>\n<li><strong>constant</strong>: does not scale with input, will take same amount of time</li>\n<li>for any input size n, constant time performs same number of operations every time</li>\n<li><strong>logarithmic</strong>: increases number of operations it performs as logarithmic function of input size n</li>\n<li>function log n grows very slowly, so as n gets longer, number of operations the algorithm needs to perform doesn't increase very much</li>\n<li>halving</li>\n<li><strong>linear</strong>: increases number of operations it performs as linear function of input size n</li>\n<li>number of additional operations needed to perform grows in direct proportion to increase in input size n</li>\n<li><strong>log-linear</strong>: increases number of operations it performs as log-linear function of input size n</li>\n<li>looking over every element and doing work on each one</li>\n<li><strong>quadratic</strong>: increases number of operations it performs as quadratic function of input size n</li>\n<li><strong>exponential</strong>: increases number of operations it performs as exponential function of input size n</li>\n<li>number of nested loops increases as function of n</li>\n<li><strong>polynomial</strong>: as size of input increases, runtime/space used will grow at a faster rate</li>\n<li><strong>factorial</strong>: as size of input increases, runtime/space used will grow astronomically even with relatively small inputs</li>\n<li><strong>rate of growth</strong>: how fast a function grows with input size</li>\n</ul>\n<h1>Space Complexity</h1>\n<ul>\n<li>How does the space usage scale/change as input gets very large?</li>\n<li>What auxiliary space does your algorithm use or is it in place (constant)?</li>\n<li>Runtime stack space counts as part of space complexity unless told otherwise.</li>\n</ul>\n<h1>Data Structures &#x26; Algos In JS</h1>\n<hr>"},{"url":"/docs/javascript/await-keyword/","relativePath":"docs/javascript/await-keyword.md","relativeDir":"docs/javascript","base":"await-keyword.md","name":"await-keyword","frontmatter":{"title":"Await ","weight":0,"excerpt":"Async and await","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>await</h1>\n<p>The <code>await</code> operator is used to wait for a <a href=\"../global_objects/promise\"><code>Promise</code></a>. It can only be used inside an <a href=\"../statements/async_function\"><code>async function</code></a> within regular JavaScript code; however it can be used on its own with <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\">JavaScript modules.</a></p>\n<h2>Syntax</h2>\n<pre><code>[rv] = await expression;\n</code></pre>\n<p><code>expression</code><br>\nA <a href=\"../global_objects/promise\"><code>Promise</code></a> or any value to wait for.</p>\n<p><code>rv</code><br>\nReturns the fulfilled value of the promise, or the value itself if it's not a <code>Promise</code>.</p>\n<h2>Description</h2>\n<p>The <code>await</code> expression causes <code>async</code> function execution to pause until a <code>Promise</code> is settled (that is, fulfilled or rejected), and to resume execution of the <code>async</code> function after fulfillment. When resumed, the value of the <code>await</code> expression is that of the fulfilled <code>Promise</code>.</p>\n<p>If the <code>Promise</code> is rejected, the <code>await</code> expression throws the rejected value.</p>\n<p>If the value of the <em>expression</em> following the <code>await</code> operator is not a <code>Promise</code>, it's converted to a <a href=\"../global_objects/promise/resolve\">resolved Promise</a>.</p>\n<p>An <code>await</code> splits execution flow, allowing the caller of the async function to resume execution. After the <code>await</code> defers the continuation of the async function, execution of subsequent statements ensues. If this <code>await</code> is the last expression executed by its function, execution continues by returning to the function's caller a pending <code>Promise</code> for completion of the <code>await</code>'s function and resuming execution of that caller.</p>\n<h2>Examples</h2>\n<h3>Awaiting a promise to be fulfilled</h3>\n<p>If a <code>Promise</code> is passed to an <code>await</code> expression, it waits for the <code>Promise</code> to be fulfilled and returns the fulfilled value.</p>\n<pre><code>function resolveAfter2Seconds(x) {\n  return new Promise(resolve => {\n    setTimeout(() => {\n      resolve(x);\n    }, 2000);\n  });\n}\n\nasync function f1() {\n  var x = await resolveAfter2Seconds(10);\n  console.log(x); // 10\n}\n\nf1();\n</code></pre>\n<h3>Thenable objects</h3>\n<p><a href=\"../global_objects/promise/then\"><code>Thenable objects</code></a> will be fulfilled just the same.</p>\n<pre><code>async function f2() {\n  const thenable = {\n    then: function(resolve, _reject) {\n      resolve('resolved!')\n    }\n  };\n  console.log(await thenable); // resolved!\n}\n\nf2();\n</code></pre>\n<h3>Conversion to promise</h3>\n<p>If the value is not a <code>Promise</code>, it converts the value to a resolved <code>Promise</code>, and waits for it.</p>\n<pre><code>async function f3() {\n  var y = await 20;\n  console.log(y); // 20\n}\n\nf3();\n</code></pre>\n<h3>Promise rejection</h3>\n<p>If the <code>Promise</code> is rejected, the rejected value is thrown.</p>\n<pre><code>async function f4() {\n  try {\n    var z = await Promise.reject(30);\n  } catch(e) {\n    console.error(e); // 30\n  }\n}\n\nf4();\n</code></pre>\n<h3>Handling rejected promises</h3>\n<p>Handle rejected <code>Promise</code> without try block.</p>\n<pre><code>var response = await promisedFunction().catch((err) => { console.error(err); });\n// response will be undefined if the promise is rejected\n</code></pre>\n<h3>Top level await</h3>\n<p>You can use the <code>await</code> keyword on its own (outside of an async function) within a <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\">JavaScript module</a>. This means modules, with child modules that use <code>await</code>, wait for the child module to execute before they themselves run. All while not blocking other child modules from loading.</p>\n<p>Here is an example of a simple module using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\">Fetch API</a> and specifying await within the <code>export statement</code>. Any modules that include this will wait for the fetch to resolve before running any code.</p>\n<pre><code>// fetch request\nconst colors = fetch('../data/colors.json')\n  .then(response => response.json());\n\nexport default await colors;\n</code></pre>"},{"url":"/docs/javascript/asyncjs/","relativePath":"docs/javascript/asyncjs.md","relativeDir":"docs/javascript","base":"asyncjs.md","name":"asyncjs","frontmatter":{"title":"Asynchronous-JS","weight":0,"excerpt":"Asynchronous-JS","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Asynchronous JavaScript</h2>\n<h1>Async functions:</h1>\n<p>Let's start with the <code>async</code> keyword. It can be placed before a function, like this:</p>\n<pre><code class=\"language-js\">async function f() {\n    return 1;\n}\n</code></pre>\n<p>The word \"async\" before a function means one simple thing: a function always returns a promise. Other values are wrapped in a resolved promise automatically.</p>\n<p>For instance, this function returns a resolved promise with the result of <code>1</code>; let's test it:</p>\n<pre><code class=\"language-js\">async function f() {\n    return 1;\n}\n\nf().then(alert); // 1\n</code></pre>\n<p>...We could explicitly return a promise, which would be the same:</p>\n<pre><code class=\"language-js\">async function f() {\n    return Promise.resolve(1);\n}\n\nf().then(alert); // 1\n</code></pre>\n<p>So, <code>async</code> ensures that the function returns a promise, and wraps non-promises in it. Simple enough, right? But not only that. There's another keyword, <code>await</code>, that works only inside <code>async</code> functions, and it's pretty cool.</p>\n<h2><a href=\"#await\">Await</a></h2>\n<p>The syntax:</p>\n<pre><code class=\"language-js\">// works only inside async functions\nlet value = await promise;\n</code></pre>\n<p>The keyword <code>await</code> makes JavaScript wait until that promise settles and returns its result.</p>\n<p>Here's an example with a promise that resolves in 1 second:</p>\n<pre><code class=\"language-js\">async function f() {\n    let promise = new Promise((resolve, reject) => {\n        setTimeout(() => resolve('done!'), 1000);\n    });\n\n    let result = await promise; // wait until the promise resolves (*)\n\n    alert(result); // \"done!\"\n}\n\nf();\n</code></pre>\n<p>The function execution \"pauses\" at the line <code>(*)</code> and resumes when the promise settles, with <code>result</code> becoming its result. So the code above shows \"done!\" in one second.</p>\n<p>Let's emphasize: <code>await</code> literally suspends the function execution until the promise settles, and then resumes it with the promise result. That doesn't cost any CPU resources, because the JavaScript engine can do other jobs in the meantime: execute other scripts, handle events, etc.</p>\n<p>It's just a more elegant syntax of getting the promise result than <code>promise.then</code>. And, it's easier to read and write.</p>\n<p>Can't use <code>await</code> in regular functions</p>\n<p>If we try to use <code>await</code> in a non-async function, there would be a syntax error:</p>\n<pre><code class=\"language-js\">function f() {\n    let promise = Promise.resolve(1);\n    let result = await promise; // Syntax error\n}\n</code></pre>\n<p>We may get this error if we forget to put <code>async</code> before a function. As stated earlier, <code>await</code> only works inside an <code>async</code> function.</p>\n<p>Let's take the <code>showAvatar()</code> example from the chapter <a href=\"promise-chaining\">Promises chaining</a> and rewrite it using <code>async/await</code>:</p>\n<ol>\n<li>We'll need to replace <code>.then</code> calls with <code>await</code>.</li>\n<li>Also we should make the function <code>async</code> for them to work.</li>\n</ol>\n<pre><code class=\"language-js\">async function showAvatar() {\n    // read our JSON\n    let response = await fetch('/article/promise-chaining/user.json');\n    let user = await response.json();\n\n    // read github user\n    let githubResponse = await fetch(`https://api.github.com/users/${user.name}`);\n    let githubUser = await githubResponse.json();\n\n    // show the avatar\n    let img = document.createElement('img');\n    img.src = githubUser.avatar_url;\n    img.className = 'promise-avatar-example';\n    document.body.append(img);\n\n    // wait 3 seconds\n    await new Promise((resolve, reject) => setTimeout(resolve, 3000));\n\n    img.remove();\n\n    return githubUser;\n}\n\nshowAvatar();\n</code></pre>\n<p>Pretty clean and easy to read, right? Much better than before.</p>\n<pre><code class=\"language-js\">await` won't work in the top-level code\n\nPeople who are just starting to use `await` tend to forget the fact that we can't use `await` in top-level code. For example, this will not work:\n\n\n```js\n// syntax error in top-level code\nlet response = await fetch('/article/promise-chaining/user.json');\nlet user = await response.json();\n</code></pre>\n<p>But we can wrap it into an anonymous async function, like this:</p>\n<pre><code class=\"language-js\">(async () => {\n  let response = await fetch('/article/promise-chaining/user.json');\n  let user = await response.json();\n  ...\n})();\n</code></pre>\n<p>P.S. New feature: starting from V8 engine version 8.9+, top-level await works in <a href=\"modules\">modules</a>.</p>\n<pre><code class=\"language-js\">await` accepts \"thenables\"\n\nLike `promise.then`, `await` allows us to use thenable objects (those with a callable `then` method). The idea is that a third-party object may not be a promise, but promise-compatible: if it supports `.then`, that's enough to use it with `await`.\n\nHere's a demo `Thenable` class; the `await` below accepts its instances:\n\n\n```js\nclass Thenable {\n  constructor(num) {\n    this.num = num;\n  }\n  then(resolve, reject) {\n    alert(resolve);\n    // resolve with this.num*2 after 1000ms\n    setTimeout(() => resolve(this.num * 2), 1000); // (*)\n  }\n}\n\nasync function f() {\n  // waits for 1 second, then result becomes 2\n  let result = await new Thenable(1);\n  alert(result);\n}\n\nf();\n</code></pre>\n<p>If <code>await</code> gets a non-promise object with <code>.then</code>, it calls that method providing the built-in functions <code>resolve</code> and <code>reject</code> as arguments (just as it does for a regular <code>Promise</code> executor). Then <code>await</code> waits until one of them is called (in the example above it happens in the line <code>(*)</code>) and then proceeds with the result.</p>\n<p>Async class methods</p>\n<p>To declare an async class method, just prepend it with <code>async</code>:</p>\n<pre><code class=\"language-js\">class Waiter {\n    async wait() {\n        return await Promise.resolve(1);\n    }\n}\n\nnew Waiter().wait().then(alert); // 1 (this is the same as (result => alert(result)))\n</code></pre>\n<p>The meaning is the same: it ensures that the returned value is a promise and enables <code>await</code>.</p>\n<h2>[Error handling]</h2>\n<p>If a promise resolves normally, then <code>await promise</code> returns the result. But in the case of a rejection, it throws the error, just as if there were a <code>throw</code> statement at that line.</p>\n<p>This code:</p>\n<pre><code class=\"language-js\">async function f() {\n    await Promise.reject(new Error('Whoops!'));\n}\n</code></pre>\n<p>...is the same as this:</p>\n<pre><code class=\"language-js\">async function f() {\n    throw new Error('Whoops!');\n}\n</code></pre>\n<p>In real situations, the promise may take some time before it rejects. In that case there will be a delay before <code>await</code> throws an error.</p>\n<p>We can catch that error using <code>try..catch</code>, the same way as a regular <code>throw</code>:</p>\n<pre><code class=\"language-js\">async function f() {\n    try {\n        let response = await fetch('http://no-such-url');\n    } catch (err) {\n        alert(err); // TypeError: failed to fetch\n    }\n}\n\nf();\n</code></pre>\n<p>In the case of an error, the control jumps to the <code>catch</code> block. We can also wrap multiple lines:</p>\n<pre><code class=\"language-js\">async function f() {\n    try {\n        let response = await fetch('/no-user-here');\n        let user = await response.json();\n    } catch (err) {\n        // catches errors both in fetch and response.json\n        alert(err);\n    }\n}\n\nf();\n</code></pre>\n<p>If we don't have <code>try..catch</code>, then the promise generated by the call of the async function <code>f()</code> becomes rejected. We can append <code>.catch</code> to handle it:</p>\n<pre><code class=\"language-js\">async function f() {\n    let response = await fetch('http://no-such-url');\n}\n\n// f() becomes a rejected promise\nf().catch(alert); // TypeError: failed to fetch // (*)\n</code></pre>\n<p>If we forget to add <code>.catch</code> there, then we get an unhandled promise error (viewable in the console). We can catch such errors using a global <code>unhandledrejection</code> event handler as described in the chapter <a href=\"promise-error-handling\">Error handling with promises</a>.</p>\n<pre><code class=\"language-js\">async/await` and `promise.then/catch\n</code></pre>\n<p>When we use <code>async/await</code>, we rarely need <code>.then</code>, because <code>await</code> handles the waiting for us. And we can use a regular <code>try..catch</code> instead of <code>.catch</code>. That's usually (but not always) more convenient.</p>\n<p>But at the top level of the code, when we're outside any <code>async</code> function, we're syntactically unable to use <code>await</code>, so it's a normal practice to add <code>.then/catch</code> to handle the final result or falling-through error, like in the line <code>(*)</code> of the example above.</p>\n<pre><code class=\"language-js\">async/await` works well with `Promise.all\n</code></pre>\n<p>When we need to wait for multiple promises, we can wrap them in <code>Promise.all</code> and then <code>await</code>:</p>\n<pre><code class=\"language-js\">// wait for the array of results\nlet results = await Promise.all([\n  fetch(url1),\n  fetch(url2),\n  ...\n]);\n</code></pre>\n<p>In the case of an error, it propagates as usual, from the failed promise to <code>Promise.all</code>, and then becomes an exception that we can catch using <code>try..catch</code> around the call.</p>\n<h2><a href=\"#summary\">Summary</a></h2>\n<p>The <code>async</code> keyword before a function has two effects:</p>\n<ol>\n<li>Makes it always return a promise.</li>\n<li>Allows <code>await</code> to be used in it.</li>\n</ol>\n<p>The <code>await</code> keyword before a promise makes JavaScript wait until that promise settles, and then:</p>\n<ol>\n<li>If it's an error, the exception is generated --- same as if <code>throw error</code> were called at that very place.</li>\n<li>Otherwise, it returns the result.</li>\n</ol>\n<p>Together they provide a great framework to write asynchronous code that is easy to both read and write.</p>\n<p>With <code>async/await</code> we rarely need to write <code>promise.then/catch</code>, but we still shouldn't forget that they are based on promises, because sometimes (e.g. in the outermost scope) we have to use these methods. Also <code>Promise.all</code> is nice when we are waiting for many tasks simultaneously.</p>\n<h2>Cleaning up your asynchronous code with <code>await</code></h2>\n<p>REPLs have traditionally had a difficult time allowing you to interact with asynchronous code since they encourage a coding style where you evaluate expressions and use those results in the next field. But if you are using promises or callbacks, this breaks down because these results exist only in the callback, not the next line:</p>\n<p>In RunKit, you can use top-level <code>await</code> to get the same behavior of synchronous code.</p>\n<p>Now we can treat this code as synchronous, despite the fact that the code is still executing asynchronously.</p>\n<p>Let's look how. It helps to have a more complex example, where we need to do a few asynchronous operations in sequence. You can see how <code>await</code>, promises and callbacks achieve the same results, but the <code>await</code> style works better in a REPL:</p>\n<ul>\n<li>await</li>\n<li>promises</li>\n<li>callbacks</li>\n</ul>\n<p>Here, we use <code>await</code> on lines 4 and 8, and the results from each request remain in scope.</p>\n<p>Remember, <code>await</code> expects a <code>promise</code> so you can either write your own or use one of the many libraries that natively supports promises, and npm is full of packages that add promise support to existing libraries. Here are a few of our favorites:</p>\n<ul>\n<li><a href=\"https://npm.runkit.com/fs-promise\">fs-promise</a> - promise based filesystem api</li>\n<li><a href=\"https://npm.runkit.com/request-promise\">request-promise</a> - a wrapper around \"request\" for http stuff</li>\n<li><a href=\"https://npm.runkit.com/glob-promise\">glob-promise</a> - glob style filesystem queries</li>\n<li><a href=\"https://npm.runkit.com/bluebird\">bluebird</a> - general promise library with lots of utilities</li>\n</ul>\n<h3>Further Reading</h3>\n<ul>\n<li><a href=\"http://rossboucher.com/await\">ES7 Async/Await presented at Brookyln.js</a></li>\n<li><a href=\"https://babeljs.io/\">Babel.js</a></li>\n<li><a href=\"https://github.com/lukehoban/ecmascript-asyncawait/\">ECMAScript's Proposal for async/await</a></li>\n<li><a href=\"https://esdiscuss.org/notes/2014-01-30#async-await\">ES Meeting Notes discussing on async/await</a></li>\n<li><a href=\"https://esdiscuss.org/topic/does-async-await-solve-a-real-problem\">Does async/await Solve a Real Problem?</a></li>\n<li><a href=\"https://thomashunter.name/blog/the-long-road-to-asyncawait-in-javascript/\">The Long Road to async/await in JavaScript</a></li>\n<li><a href=\"https://www.twilio.com/blog/2015/10/asyncawait-the-hero-javascript-deserved.html\">async/await: The Hero JavaScript Deserved</a></li>\n</ul>"},{"url":"/docs/interview/review-concepts/","relativePath":"docs/interview/review-concepts.md","relativeDir":"docs/interview","base":"review-concepts.md","name":"review-concepts","frontmatter":{"title":"Review Of Concepts","weight":0,"excerpt":"Basic Concepts review","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<div id=\"search\"></div>\n<h1>Review-Of-Previous-Concepts</h1>\n<h3>Review of Concepts</h3>\n<h3>Running JS Locally Concepts</h3>\n<ul>\n<li>\n<p>Match the commands <code>ls</code>, <code>cd</code>, <code>pwd</code> to their descriptions</p>\n<ul>\n<li><code>ls</code> lists contents of current directory</li>\n<li><code>cd</code> changes current directory</li>\n<li><code>cd ..</code> takes you up one level</li>\n<li><code>cd</code> alone takes you back home</li>\n<li><code>pwd</code> returns current directory</li>\n</ul>\n</li>\n<li>Given a folder structure diagram, a list of 'cd (path)' commands and target files, match the paths to the target files.</li>\n<li>Use VSCode to create a folder. Within the folder create a .js file containing <code>console.log('hello new world');</code> and save it.</li>\n<li>Use node to execute a JavaScript file in the terminal</li>\n</ul>\n<h3>Plain Old JS Object Lesson Concepts</h3>\n<ul>\n<li>\n<p>Label variables as either Primitive vs. Reference</p>\n<ul>\n<li>primitives: strings, booleans, numbers, null and undefined</li>\n<li>primitives are immutable</li>\n<li>refereces: objects (including arrays)</li>\n<li>references are mutable</li>\n</ul>\n</li>\n<li>\n<p>Identify when to use <code>.</code> vs <code>[]</code> when accessing values of an object</p>\n<ul>\n<li>dot syntax <code>object.key</code></li>\n<li>easier to read</li>\n<li>easier to write</li>\n<li>cannot use variables as keys</li>\n<li>keys cannot begin with a number</li>\n<li>bracket notation <code>object[\"key]</code></li>\n<li>allows variables as keys</li>\n<li>strings that start with numbers can be use as keys</li>\n</ul>\n</li>\n<li>\n<p>Write an object literal with a variable key using interpolation</p>\n<ul>\n<li>put it in brackets to access the value of the variable, rather than just make the value that string</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-js\">let a = \"b\";\nlet obj = { a: \"letter_a\", [a]: \"letter b\" };\n</code></pre>\n<ul>\n<li>\n<p>Use the <code>obj[key] !== undefined</code> pattern to check if a given variable that contains a key exists in an object</p>\n<ul>\n<li>can also use <code>(key in object)</code> syntax interchangeably (returns a boolean)</li>\n</ul>\n</li>\n<li>\n<p>Utilize Object.keys and Object.values in a function</p>\n<ul>\n<li><code>Object.keys(obj)</code> returns an array of all the keys in <code>obj</code></li>\n<li><code>Object.values(obj)</code> returns an array of the values in <code>obj</code></li>\n</ul>\n</li>\n<li>Iterate through an object using a <code>for in</code> loop</li>\n</ul>\n<pre><code class=\"language-js\">let printValues = function (obj) {\n  for (let key in obj) {\n    let value = obj[key];\n    console.log(value);\n  }\n};\n</code></pre>\n<ul>\n<li>\n<p>Define a function that utilizes <code>...rest</code> syntax to accept an arbitrary number of arguments</p>\n<ul>\n<li><code>...rest</code> syntax will store all additional arguments in an array</li>\n<li>array will be empty if there are no additional arguments</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-js\">let myFunction = function (str, ...strs) {\n  console.log(\"The first string is \" + str);\n  console.log(\"The rest of the strings are:\");\n  strs.forEach(function (str) {\n    console.log(str);\n  });\n};\n</code></pre>\n<h3></h3>\n<ul>\n<li>Use <code>...spread</code> syntax for Object literals and Array literals</li>\n</ul>\n<pre><code class=\"language-js\">let arr1 = [\"a\", \"b\", \"c\"];\nlet longer = [...arr1, \"d\", \"e\"]; // [\"a\", \"b\", \"c\", \"d\", \"e\"]\n// without spread syntax, this would give you a nested array\nlet withoutRest = [arr1, \"d\", \"e\"]; // [[\"a\", \"b\", \"c\"], \"d\", \"e\"]\n</code></pre>\n<ul>\n<li>Destructure an array to reference specific elements</li>\n</ul>\n<pre><code class=\"language-js\">    let array = \\[35,9\\];\n    let \\[firstEl, secondEl\\] = array;\n    console.log\\(firstEl\\); // =&#x26;gt; 35\n    console.log\\(secondEl\\); // =&#x26;gt; 9\n> can also destructure using ... syntax let array = \\[35,9,14\\]; let \\[head, ...tail\\] = array; console.log\\(head\\); // =&#x26;gt; 35 console.log\\(tail\\); // =&#x26;gt; \\[9, 14\\]\n\n\n\n```js\n\n\n- Destructure an object to reference specific values\n   - if you want to use variable names that don't match the keys, you can use aliasing\n      - `let { oldkeyname: newkeyname } = object`\n   - rule of thumb—only destructure values from objects that are two levels deep\n\n```js\n\nlet obj = {\n   name: \"Wilfred\",\n   appearance: [\"short\", \"mustache\"],\n   favorites: {\n      color: \"mauve\",\n      food: \"spaghetti squash\",\n      number: 3\n   }\n}\n//  with variable names that match keys\nlet { name, appearance } = obj;\nconsole.log(name); // \"Wilfred\"\nconsole.log(appearance); // [\"short\", \"mustache\"]\n> with new variable names (aliasing)\nlet {name: myName, appearance: myAppearance} = obj;\nconsole.log(myName); // \"Wilfred\"\nconsole.log(myAppearance); // [\"short\", \"mustache\"]\n> in a function call\nlet sayHello = function({name}) {\nconsole.log(\"Hello, \" + name); // \"Hello Wilfred\"\n}\n//  nested objects + aliasing\nlet { favorites: {color, food: vegetable} } = obj;\nconsole.log(color, vegetable); //=> mauve spaghetti squash\n</code></pre>\n<ul>\n<li>Write a function that accepts a array as an argument and returns an object representing the count of each character in the array</li>\n</ul>\n<pre><code class=\"language-js\">//\nlet elementCounts = function (array) {\n  let obj = {};\n  array.forEach(function (el) {\n    if (el in obj) obj[el] += 1;\n    else obj[el] = 1;\n  });\n  return obj;\n};\nconsole.log(elementCounts([\"e\", \"f\", \"g\", \"f\"])); // => Object {e: 1, f: 2, g: 1}\n</code></pre>\n<h3>Callbacks Lesson Concepts</h3>\n<ul>\n<li>\n<p>Given multiple plausible reasons, identify why functions are called \"First Class Objects\" in JavaScript.</p>\n<ul>\n<li>they can be stored in variables, passed as arguments to other functions, and serve as return value for a function</li>\n<li>supports same basic operations as other types (strings, bools, numbers)</li>\n<li>higher-order functions take functions as arguments or return functions as values</li>\n</ul>\n</li>\n<li>\n<p>Given a code snippet containing an anonymous callback, a named callback, and multiple <code>console.log</code>s, predict what will be printed</p>\n<ul>\n<li>what is this referring to?</li>\n</ul>\n</li>\n<li>Write a function that takes in a value and two callbacks. The function should return the result of the callback that is greater.</li>\n</ul>\n<pre><code class=\"language-js\">let greaterCB = function (val, callback1, callback2) {\n  if (callback1(val) > callback2(val)) {\n    return callback1(val);\n  }\n  return callback2(val);\n};\nlet greaterCB = function (val, callback1, callback2) {\n  if (callback1(val) > callback2(val)) {\n    return callback1(val);\n  }\n  return callback2(val);\n};\n</code></pre>\n<blockquote>\n<p>shorter version let greaterCB = function(val, callback1, callback2) { return Math.max(callback1(val), callback2(val)); } // even shorter, cause why not let greaterCB = (val, cb1, cb2) => Math.max(cb1(val), cb2(val));</p>\n</blockquote>\n<pre><code class=\"language-js\">- Write a function, myMap, that takes in an array and a callback as arguments. The function should mimic the behavior of `Array#map`.\n\n```js\n\nlet myMap = function(array, callback) {\n   let newArr = [];\n   for (let i = 0; i &#x3C; array.length; i ++) {\n      mapped = callback(array[i], i, array);\n      newArr.push(mapped);\n   }\n   return newArr;\n}\nconsole.log( myMap([16,25,36], Math.sqrt)); // => [4, 5, 6];\nlet myMapArrow = (array, callback) => {\n   let newArr = [];\n   array.forEach( (ele, ind, array) => {\n      newArr.push(callback(ele, ind, array));\n   })\n   return newArr;\n}\nconsole.log(myMapArrow([16,25,36], Math.sqrt)); // => [4, 5, 6];\n</code></pre>\n<ul>\n<li>Write a function, myFilter, that takes in an array and a callback as arguments. The function should mimic the behavior of <code>Array#filter</code>.</li>\n</ul>\n<pre><code class=\"language-js\">let myFilter = function (array, callback) {\n  let filtered = [];\n  for (let i = 0; i &#x3C; array.length; i++) {\n    if (callback(array[i])) {\n      filtered.push(array[i], i, array);\n    }\n  }\n};\n</code></pre>\n<ul>\n<li>Write a function, myEvery, that takes in an array and a callback as arguments. The function should mimic the behavior of <code>Array#every</code>.</li>\n</ul>\n<pre><code class=\"language-js\">let myEvery = function (array, callback) {\n  for (let i = 0; i &#x3C; array.length; i++) {\n    if (!callback(array[i], i, array)) {\n      return false;\n    }\n  }\n  return true;\n};\n// with arrow function syntax\nlet myEvery = (array, callback) => {\n  for (let i = 0; i &#x3C; array.length; i++) {\n    if (!callback(array[i])) {\n      return false;\n    }\n  }\n  return true;\n};\n</code></pre>\n<h3>Scope Lesson Concepts</h3>\n<ul>\n<li>\n<p>Identify the difference between <code>const</code>, <code>let</code>, and <code>var</code> declarations</p>\n<ul>\n<li><code>const</code> - cannot reassign variable, scoped to block</li>\n<li><code>let</code> - can reassign variable, scoped to block</li>\n<li><code>var</code> - outdated, may or may not be reassigned, scoped to function. can be not just reassigned, but also redeclared!</li>\n<li>a variable will always evaluate to the value it contains regardless of how it was declared</li>\n</ul>\n</li>\n<li>\n<p>Explain the difference between <code>const</code>, <code>let</code>, and <code>var</code> declarations</p>\n<ul>\n<li><code>var</code> is function scoped—so if you declare it anywhere in a function, the declaration (but not assignment) is \"hoisted\"</li>\n<li>so it will exist in memory as \"undefined\" which is bad and unpredictable</li>\n<li><code>var</code> will also allow you to redeclare a variable, while <code>let</code> or <code>const</code> will raise a syntax error. you shouldn't be able to do that!</li>\n<li><code>const</code> won't let you reassign a variable, but if it points to a mutable object, you will still be able to change the value by mutating the object</li>\n<li>block-scoped variables allow new variables with the same name in new scopes</li>\n<li>block-scoped still performs hoisting of all variables within the block, but it doesn't initialize to the value of <code>undefined</code> like <code>var</code> does, so it throws a specific reference error if you try to access the value before it has been declared</li>\n<li>if you do not use <code>var</code> or <code>let</code> or <code>const</code> when initializing, it will be declared as global—THIS IS BAD</li>\n<li>if you assign a value without a declaration, it exists in the global scope (so then it would be accessible by all outer scopes, so bad). however, there's no hoisting, so it doesn't exist in the scope until after the line is run</li>\n</ul>\n</li>\n<li>\n<p>Predict the evaluation of code that utilizes function scope, block scope, lexical scope, and scope chaining</p>\n<ul>\n<li>scope of a program means the set of variables that are available for use within the program</li>\n<li>global scope is represented by the <code>window</code> object in the browser and the <code>global</code> object in Node.js</li>\n<li>global variables are available everywhere, and so increase the risk of name collisions</li>\n<li>local scope is the set of variables available for use within the function</li>\n<li>when we enter a function, we enter a new scope</li>\n<li>includes functions arguments, local variables declared inside function, and any variables that were already declared when the function is defined (hmm about that last one)</li>\n<li>for blocks (denoted by curly braces <code>{}</code>, as in conditionals or <code>for</code> loops), variables can be block scoped</li>\n<li>inner scope does not have access to variables in the outer scope</li>\n<li>scope chaining—if a given variable is not found in immediate scope, javascript will search all accessible outer scopes until variable is found</li>\n<li>so an inner scope can access outer scope variables</li>\n<li>but an outer scope can never access inner scope variables</li>\n</ul>\n</li>\n<li>Define an arrow function</li>\n</ul>\n<pre><code class=\"language-js\">    let arrowFunction = \\(param1, param2\\) =&#x26;gt; {\n    let sum = param1 + param2;\n    return sum;\n    }\n//  with 1 param you can remove parens around parameters let arrowFunction = param =&#x26;gt; { param += 1; return param; }\n//  if your return statement is one line, you can use implied return let arrowFunction = param =&#x26;gt; param + 1;\n> you don't have to assign to variable, can be anonymous // if you never need to use it again param =&#x26;gt; param + 1;\n</code></pre>\n<ul>\n<li>\n<p>Given an arrow function, deduce the value of <code>this</code> without executing the code</p>\n<ul>\n<li>arrow functions are automatically bound to the context they were declared in</li>\n<li>unlike regular function which use the context they are invoked in (unless they have been bound using <code>Function#bind</code>)</li>\n<li>if you implement an arrow function as a method in an object the context it will be bound to is NOT the object itself, but the global context</li>\n<li>so you can't use an arrow function to define a method directly</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-js\">        let obj = {\n        name: \"my object\",\n        unboundFunc: function \\(\\) {\n        return this.name;\n        // this function will be able to be called on different objects\n        },\n###\nboundToGlobal: \\(\\) =&#x26;gt; { return this.name; // this function, no matter how you call it, will be called // on the global object, and it cannot be rebound // this is because it was defined using arrow syntax },\n\n```js\n\nmakeFuncBoundToObj: function () {\n    return () => {\n        return this.name;\n    }\n    // this function will return a function that will be bound\n    // to the object where we call the outer method\n    // because the arrow syntax is nested inside one of this\n    // function's methods, it cannot be rebound\n},\nmakeUnboundFunc: function () {\n    return function () {\n        return this.name;\n    }\n    //this function will return a function that will still be unbound\n},\nimmediatelyInvokedFunc: function () {\n    return this.name;\n}(), // this property will be set to the return value of this anonymous function,\n> which is invoked during the object definition;\n> basically, it's a way to check the context inside of an object, at this moment\ninnerObj: {\n    name: \"inner object\",\n    innerArrowFunc: () =>  {\n        return this.name;\n    } // the context inside a nested object is not the parent, it's still\n    // the global object. entering an object definition doesn't change the context\n},\nlet otherObj = { name: \"my other object\" }\n//  call unboundFunc on obj, we get \"my object\" console.log(\"unboundFunc: \", obj.unboundFunc()); // => \"my object\" // assign unboundFunc to a variable and call it let newFunc = obj.unboundFunc; // this newFunc will default to being called on global object console.log(\"newFunc: \",newFunc()); // => undefined // but you could bind it directly to a different object if you wanted console.log(\"newFunc: \", newFunc.bind(otherObj)()); // \"my other object\"\n> meanwhile, obj.boundToGlobal will only ever be called on global object console.log(\"boundToGlobal: \", obj.boundToGlobal()); //=> undefined let newBoundFunc = obj.boundToGlobal; console.log(\"newBoundFunc: \", newBoundFunc()); // => undefined // even if you try to directly bind to another object, it won't work! console.log(\"newBoundFunc: \", newBoundFunc.bind(otherObj)()); // => undefined\n> let's make a new function that will always be bound to the context // where we call our function maker let boundFunc = obj.makeFuncBoundToObj();// note that we're invoking, not just assigning console.log(\"boundFunc: \", boundFunc()); // => \"my object\" // we can't rebind this function console.log(\"boundFunc: \", boundFunc.bind(otherObj)()) // =>\"my object\"\n> but if I call makeFuncBoundToObj on another context // the new bound function is stuck with that other context let boundToOther = obj.makeFuncBoundToObj.bind(otherObj)(); console.log(\"boundToOther: \", boundToOther()); // => \"my other object\" console.log(\"boundToOther: \", boundToOther.bind(obj)()) // \"my other object\"\n> the return value of my immediately invoked function // shows that the context inside of the object is the // global object, not the object itself // context only changes inside a function that is called // on an object console.log(\"immediatelyInvokedFunc: \", obj.immediatelyInvokedFunc); // => undefined\n> even though we're inside a nested object, the context is // still the same as it was outside the outer object // in this case, the global object console.log(\"innerArrowFunc: \", obj.innerObj.innerArrowFunc()); // => undefined\n</code></pre>\n<p>}</p>\n<pre><code class=\"language-js\">- Implement a closure and explain how the closure effects scope\n   - a closure is \"the combination of a function and the lexical environment within which that function was declared\"\n      - alternatively, \"when an inner function uses or changes variables in an outer function\"\n   - closures have access to any variables within their own scope + scope of outer functions + global scope — the set of all these available variables is \"lexical environemnt\"\n   - closure keeps reference to all variables **even if the outer function has returned**\n      - each function has a private mutable state that cannot be accessed externally\n      - the inner function will maintain a reference to the scope in which it was declared. so it has access to variables that were initialized in any outer scope—even if that scope\n      - if a variable exists in the scope of what could have been accessed by a function (e.g. global scope, outer function, etc), does that variable wind up in the closure even if it never got accessed?\n      - if you change the value of a variable (e.g. i++) you will change the value of that variable in the scope that it was declared in\n\n```js\n\nfunction createCounter() {\n   // this function starts a counter at 0, then returns a\n   // new function that can access and change that counter\n   //\n   // each new counter you create will have a single internal\n   // state, that can be changed only by calling the function.\n   // you can't access that state from outside of the function,\n   // even though the count variable in question is initialized\n   // by the outer function, and it remains accessible to the\n   // inner function after the outer function returns.\n   let count = 0;\n   return function() {\n      count ++;\n      return count;\n   }\n}\nlet counter = createCounter();\nconsole.log(counter()); //=> 1\nconsole.log(counter()); //=> 2\n> so the closure here comes into play because\n> an inner function is accessing and changing\n> a variable from an outer function\n> the closure is the combination of the counter\n> function and the all the variables that existed\n> in the scope that it was declared in. because\n> inner blocks/functions have access to outer\n> scopes, that includes the scope of the outer\n> function.\n> so counter variable is a closure, in that\n> it contains the inner count value that was\n> initialized by the outer createCounter() function\n> count has been captured or closed over\n> this state is private, so if i run createCounter again\n> i get a totally separate count that doesn't interact\n> with the previous one and each of the new functions\n> will have their own internal state based on the\n> initial declaration in the now-closed outer function\nlet counter2 = createCounter();\nconsole.log(counter2()); // => 1\n> if i set a new function equal to my existing counter\n> the internal state is shared with the new function\nlet counter3 = counter2;\nconsole.log(counter3());\n</code></pre>\n<ul>\n<li>\n<p>Define a method that references <code>this</code> on an object literal</p>\n<ul>\n<li>when we use <code>this</code> in a method it refers to the object that the method is invoked on</li>\n<li>it will let you access other pieces of information from within that object, or even other methods</li>\n<li>method style invocation - <code>object.method(args)</code> (e.g. built in examples like <code>Array#push</code>, or <code>String#toUpperCase</code>)</li>\n<li>context is set every time we invoke a function</li>\n<li>function style invocation sets the context to the global object no matter what</li>\n<li>being inside an object does not make the context that object! you still have to use method-style invocation</li>\n</ul>\n</li>\n<li>\n<p>Utilize the built in <code>Function#bind</code> on a callback to maintain the context of this</p>\n<ul>\n<li>when we call bind on a function, we get an exotic function back—so the context will always be the same for that new function</li>\n</ul>\n</li>\n</ul>\n<pre><code>text\n    let cat = {\n    purr: function () {\n    console.log(\"meow\");\n    },\n    purrMore: function () {\n    this.purr();\n    },\n    };\n    let sayMeow = cat.purrMore; console.log(sayMeow()); // TypeError: this.purr is not a function\n    // we can use the built in Function.bind to ensure our context, our this, // is the cat object let boundCat = sayMeow.bind(cat);\n    boundCat(); // prints \"meow\"\n</code></pre>\n<pre><code>\\`\\`\n</code></pre>\n<h3></h3>\n<h3></h3>\n<pre><code class=\"language-js\">   - `bind` can also work with arguments, so you can have a version of a function with particular arguments and a particular context. the first arg will be the context aka the `this` you want it to use. the next arguments will be the functions arguments that you are binding\n      - if you just want to bind it to those arguments in particular, you can use `null` as the first argument, so the context won't be bound, just the arguments\n- Given a code snippet, identify what `this` refers to\n   - important to recognize the difference between scope and context\n      - scope works like a dictionary that has all the variables that are available within a given block, plus a pointer back the next outer scope (which itself has pointers to new scopes until you reach the global scope. so you can think about a whole given block's scope as a kind of linked list of dictionaries) (also, this is not to say that scope is actually implemented in this way, that is just the schema that i can use to understand it)\n      - context refers to the value of the `this` keyword\n   - the keyword `this` exists in every function and it evaluates to the object that is currently invoking that function\n   - so the context is fairly straightforward when we talk about methods being called on specific objects\n   - you could, however, call an object's method on something other than that object, and then this would refer to the context where/how it was called, e.g.\n\n```js\n\nlet dog = {\n   name: \"Bowser\",\n   changeName: function () {\n      this.name = \"Layla\";\n  },\n};\n> note this is **not invoked** - we are assigning the function itself\nlet change = dog.changeName;\nconsole.log(change()); // undefined\n> our dog still has the same name\nconsole.log(dog); // { name: 'Bowser', changeName: [Function: changeName] }\n//  instead of changing the dog we changed the global name!!!\nconsole.log(this); // Object [global] {etc, etc, etc,  name: 'Layla'}\n</code></pre>\n<ul>\n<li>\n<p>CALLING SOMETHING IN THE WRONG CONTEXT CAN MESS YOU UP!</p>\n<ul>\n<li>could throw an error if it expects this to have some other method or whatever that doesn't exist</li>\n<li>you could also overwrite values or assign values to exist in a space where they should not exist</li>\n</ul>\n</li>\n<li>if you call a function as a callback, it will set <code>this</code> to be the outer function itself, even if the function you were calling is a method that was called on a particular object</li>\n</ul>\n<pre><code>text\n    let cat = {\n    purr: function () {\n    console.log(\"meow\");\n    },\n    purrMore: function () {\n    this.purr();\n    },\n    };\n    global.setTimeout(cat.purrMore, 5000); // 5 seconds later: TypeError: this.purr is not a function\n</code></pre>\n<p>we can use strict mode with <code>\"use strict\";</code> this will prevent you from accessing the global object with <code>this</code> in functions, so if you try to call <code>this</code> in the global context and change a value, you will get a type error, and the things you try to access will be undefined</p>\n<h3></h3>\n<p>let sayMeow = cat.purrMore; console.log(sayMeow()); // TypeError: this.purr is not a function</p>\n<blockquote>\n<p>we can use the built in Function.bind to ensure our context, our <code>this</code>, // is the cat object let boundCat = sayMeow.bind(cat);\nboundCat(); // prints \"meow\"</p>\n</blockquote>\n<pre><code>text\n   - `bind` can also work with arguments, so you can have a version of a function with particular arguments and a particular context. the first arg will be the context aka the `this` you want it to use. the next arguments will be the functions arguments that you are binding\n      - if you just want to bind it to those arguments in particular, you can use `null` as the first argument, so the context won't be bound, just the arguments\n- Given a code snippet, identify what `this` refers to\n   - important to recognize the difference between scope and context\n      - scope works like a dictionary that has all the variables that are available within a given block, plus a pointer back the next outer scope (which itself has pointers to new scopes until you reach the global scope. so you can think about a whole given block's scope as a kind of linked list of dictionaries) (also, this is not to say that scope is actually implemented in this way, that is just the schema that i can use to understand it)\n      - context refers to the value of the `this` keyword\n   - the keyword `this` exists in every function and it evaluates to the object that is currently invoking that function\n   - so the context is fairly straightforward when we talk about methods being called on specific objects\n   - you could, however, call an object's method on something other than that object, and then this would refer to the context where/how it was called, e.g.\n\n```js\n\nlet dog = {\n   name: \"Bowser\",\n   changeName: function () {\n      this.name = \"Layla\";\n  },\n};\n> note this is **not invoked** - we are assigning the function itself\nlet change = dog.changeName;\nconsole.log(change()); // undefined\n> our dog still has the same name\nconsole.log(dog); // { name: 'Bowser', changeName: [Function: changeName] }\n//  instead of changing the dog we changed the global name!!!\nconsole.log(this); // Object [global] {etc, etc, etc,  name: 'Layla'}\n</code></pre>\n<ul>\n<li>\n<p>CALLING SOMETHING IN THE WRONG CONTEXT CAN MESS YOU UP!</p>\n<ul>\n<li>could throw an error if it expects this to have some other method or whatever that doesn't exist</li>\n<li>you could also overwrite values or assign values to exist in a space where they should not exist</li>\n</ul>\n</li>\n<li>if you call a function as a callback, it will set <code>this</code> to be the outer function itself, even if the function you were calling is a method that was called on a particular object</li>\n</ul>\n<pre><code class=\"language-js\">    let cat = {\n    purr: function \\(\\) {\n    console.log\\(\"meow\"\\);\n    },\n    purrMore: function \\(\\) {\n    this.purr\\(\\);\n    },\n    };\nglobal.setTimeout\\(cat.purrMore, 5000\\); // 5 seconds later: TypeError: this.purr is not a function\n</code></pre>\n<ul>\n<li>we can use strict mode with <code>\"use strict\";</code> this will prevent you from accessing the global object with <code>this</code> in functions, so if you try to call <code>this</code> in the global context and change a value, you will get a type error, and the things you try to access will be undefined</li>\n</ul>\n<h3>POJOs</h3>\n<h4>1. Label variables as either Primitive vs. Reference</h4>\n<p>Javascript considers most data types to be 'primitive', these data types are immutable, and are passed by value. The more complex data types: Array and Object are mutable, are considered 'reference' data types, and are passed by reference.</p>\n<ul>\n<li>Boolean - Primitive</li>\n<li>Null - Primitive</li>\n<li>Undefined - Primitive</li>\n<li>Number - Primitive</li>\n<li>String - Primitive</li>\n<li>Array - Reference</li>\n<li>Object - Reference</li>\n<li>Function - Reference</li>\n</ul>\n<h4>2. Identify when to use . vs [] when accessing values of an object</h4>\n<pre><code class=\"language-js\">let obj = { one: 1, two: 2 };\n> Choose the square brackets property accessor when the property name is determined at\n> runtime, or if the property name is not a valid identifier\nlet myKey = 'one';\nconsole.log(obj[myKey]);\n> Choose the dot property accessor when the property name is known ahead of time.\nconsole.log(obj.two);\n</code></pre>\n<h4>3. Write an object literal with a variable key using interpolation</h4>\n<pre><code class=\"language-js\">let keyName = 'two';\n> If the key is not known, you can use an alternative `[]` syntax for\n> object initialization only\nlet obj2 = { [keyName]: 2 };\nconsole.log(obj2);\n</code></pre>\n<h4>4. Use the obj[key] !== undefined pattern to check if a given variable that contains a key exists in an object</h4>\n<pre><code class=\"language-js\">function doesKeyExist(obj, key) {\n  // obj[key] !== undefined\n  // or:\n  return key in obj;\n}\nlet course = { bootcamp: \"Lambda\", course: \"Bootcamp Prep\" };\nconsole.log(doesKeyExist(course, \"course\")); // => true\nconsole.log(doesKeyExist(course, \"name\")); // => false\n</code></pre>\n<h4>5. Utilize Object.keys and Object.values in a function</h4>\n<pre><code class=\"language-js\">function printKeys(object) {\n  return Object.keys(object);\n}\nfunction printValues(object) {\n  return Object.values(object);\n}\nconsole.log(printKeys({ dog: \"Strelka\", dog2: \"Belka\" }));\nconsole.log(printValues({ dog: \"Strelka\", dog2: \"Belka\" }));\n</code></pre>\n<h4>6. Iterate through an object using a for in loop</h4>\n<pre><code class=\"language-js\">let player = { name: \"Sergey\", skill: \"hockey\" };\nfor (let key in player) {\n  console.log(key, player[key]);\n}\nconsole.log(Object.entries(player));\n</code></pre>\n<h4>7. Define a function that utilizes ...rest syntax to accept an arbitrary number of arguments</h4>\n<pre><code class=\"language-js\">function restSum(...otherNums) {\n  let sum = 0;\n  console.log(otherNums);\n  otherNums.forEach(function (num) {\n    sum += num;\n  });\n  return sum;\n}\nconsole.log(restSum(3, 5, 6)); // => 14\nconsole.log(restSum(1, 2, 3, 4, 5, 6, 7, 8, 9)); // => 45\nconsole.log(restSum(0)); // => 0\n</code></pre>\n<h4>8. Use ...spread syntax for Object literals and Array literals</h4>\n<pre><code class=\"language-js\">let numArray = [1, 2, 3];\nlet moreNums = [...numArray, 4, 5, 6];\nconsole.log(moreNums);\nlet shoe = { color: \"red\", size: 10 };\nlet newShoe = { ...shoe, brand: \"Nike\", size: 12 };\nconsole.log(newShoe);\nnewShoe.color = \"black\";\nconsole.log(newShoe);\nconsole.log(shoe);\n</code></pre>\n<h4>9. Destructure an array to reference specific elements</h4>\n<pre><code class=\"language-js\">let arr = [\"one\", \"two\", \"three\"];\nlet [first] = arr;\nconsole.log(first);\n</code></pre>\n<h4>10. Destructure an object to reference specific values</h4>\n<pre><code class=\"language-js\">let me = {\n  name: \"Ian\",\n  instruments: [\"bass\", \"synth\", \"guitar\"],\n  siblings: {\n    brothers: [\"Alistair\"],\n    sisters: [\"Meghan\"],\n  },\n};\nlet {\n  name,\n  instruments: musical_instruments,\n  siblings: { sisters },\n} = me;\nconsole.log(name);\nconsole.log(musical_instruments);\nconsole.log(sisters);\n</code></pre>\n<h4>11. Write a function that accepts a string as an argument and returns an object representing the count of each character in the array</h4>\n<pre><code class=\"language-js\">function charCount(inputString) {\n  let res = inputString.split(\"\").reduce(function (accum, el) {\n    if (el in accum) {\n      accum[el] = accum[el] + 1;\n    } else {\n      accum[el] = 1;\n    }\n    return accum;\n  }, {});\n  return res;\n}\nconsole.log(charCount(\"aaabbbeebbcdkjfalksdfjlkasdfasdfiiidkkdingds\"));\n</code></pre>\n<h3></h3>\n<h3>Review of Concepts</h3>\n<h4>1. Identify the difference between const, let, and var declarations</h4>\n<h4>2. Explain the difference between const, let, and var declarations</h4>\n<pre><code class=\"language-js\">var a = \"a\";\n</code></pre>\n<ul>\n<li><code>var</code> is the historical keyword used for variable declaration.</li>\n<li><code>var</code> declares variables in function scope, or global scope if not inside a function.</li>\n<li>We consider <code>var</code> to be <em>deprecated</em> and it is never used in this course.</li>\n</ul>\n<pre><code class=\"language-js\">let b = \"b\";\n</code></pre>\n<ul>\n<li><code>let</code> is the keyword we use most often for variable declaration.</li>\n<li><code>let</code> declares variables in block scope.</li>\n<li>variables declared with <code>let</code> are re-assignable.</li>\n</ul>\n<pre><code class=\"language-js\">const c = \"c\";\n</code></pre>\n<ul>\n<li><code>const</code> is a specialized form of <code>let</code> that can only be used to <strong>initialize</strong> a variable.</li>\n<li>Except when it is declared, you cannot assign to a <code>const</code> variable.</li>\n<li><code>const</code> scopes variables the same way that <code>let</code> does.</li>\n</ul>\n<h4>3. Predict the evaluation of code that utilizes function scope, block scope, lexical scope, and scope chaining</h4>\n<p>Consider this <code>run</code> function, inside which <code>foo</code> and <code>bar</code> have <code>function scope</code>. <code>i</code> and <code>baz</code> are scoped to the block expression.</p>\n<pre><code class=\"language-js\">> function and block scope in this example\nfunction run() {\n    var foo = 'Foo';\n    let bar = 'Bar';\n    console.log(foo, bar);\n    {\n        console.log(foo);\n        let baz = 'Bazz';\n        console.log(baz);\n    }\n    console.log(baz); // ReferenceError\n}\nrun();\n</code></pre>\n<p>Notice that referencing <code>baz</code> from outside it's block results in JavaScript throwing a ReferenceError.\nConsider this <code>run</code> function, inside of which <code>foo</code> has <code>function scope</code>.</p>\n<pre><code class=\"language-js\">function run() {\n  console.log(foo); // undefined\n  var foo = \"Foo\";\n  console.log(foo); // Foo\n}\nrun();\n</code></pre>\n<p>Consider this <code>func1</code> function and it's nested scopes.</p>\n<pre><code class=\"language-js\">> global scope\nfunction func1(arg1) {\n    // func1 scope\n    return function func2(arg2) {\n        // func2 scope\n        return function func3(arg3) {\n            // func3 scope\n            console.log(arg1, arg2, arg3);\n        };\n    };\n}\n</code></pre>\n<h4>6. Implement a closure and explain how the closure effects scope</h4>\n<pre><code class=\"language-js\">const adder = (arg1) => {\n  return (arg2) => {\n    return arg1 + arg2;\n  };\n};\nconst func2 = adder(2);\nconst result = func2(2);\nconsole.log(result); // => 4;\n</code></pre>\n<h4>4. Define an arrow function</h4>\n<pre><code class=\"language-js\">const returnValue = (val) => val;\n</code></pre>\n<p>This simple construct will create a function that accepts <code>val</code> as a parameter, and returns <code>val</code> immediately. We do not need to type <code>return val</code>, because this is a single-line function.\nIdentically, we could write</p>\n<pre><code class=\"language-js\">const returnValue = (val) => {\n  return val;\n};\n</code></pre>\n<h4>5. Given an arrow function, deduce the value of <code>this</code> without executing the code</h4>\n<pre><code class=\"language-js\">function fDAdder(arr) {\n  console.log(this);\n  return arr.reduce((acc, ele) => {\n    return acc + ele;\n  });\n}\nfDAdder([1, 2, 4, 6]);\n</code></pre>\n<p>If we use a <em>function declaration</em> style function, the <code>this</code> variable is set to the <code>global</code> object (i.e. <code>Object [global]</code> in Node.JS and <code>Window</code> in your browser).</p>\n<pre><code class=\"language-js\">const adder = (arr) => {\n  console.log(this);\n  arr.reduce((acc, ele) => (sum += ele));\n};\nadder([1, 2, 4, 6]);\n</code></pre>\n<p>In this example, we use a <em>fat arrow</em> style function. Note that when we declare a funciton like this <code>this</code> becomes</p>\n<h4>7. Define a method that references this on an object literal</h4>\n<pre><code class=\"language-js\">const pokemon = {\n  firstname: \"Pika\",\n  lastname: \"Chu\",\n  getPokeName: function () {\n    const fullname = `${this.firstname} ${this.lastname}`;\n    return fullname;\n  },\n};\nconsole.log(pokemon.getPokeName());\n</code></pre>\n<h4>8. Utilize the built in Function#bind on a callback to maintain the context of <code>this</code></h4>\n<pre><code class=\"language-js\">const pokemon = {\n  firstname: \"Pika\",\n  lastname: \"Chu\",\n  getPokeName: function () {\n    const fullname = `${this.firstname} ${this.lastname}`;\n    return fullname;\n  },\n};\nconst logPokemon = pokemon.getPokename.bind(pokemon);\nlogPokemon(\"sushi\", \"algorithms\"); // Pika Chu loves sushi and algorithms\n</code></pre>\n<h4>9. Given a code snippet, identify what <code>this</code> refers to</h4>\n<pre><code class=\"language-js\">function Person(name) {\n  // this.name = name;\n  // let that = this;\n  setTimeout(function () {\n    // console.log(this); // => Window\n    // console.log(that); // => [Function] => Person\n    // this.sayName(); // => no method error\n    that.sayName();\n  }, 1000);\n}\nPerson.prototype.sayName = function () {\n  console.log(this.name);\n};\nconst jane = new Person(\"Jane\");\n</code></pre>"},{"url":"/docs/interview/","relativePath":"docs/interview/index.md","relativeDir":"docs/interview","base":"index.md","name":"index","frontmatter":{"title":"Interviewing","weight":0,"excerpt":"These are some of my active projects.","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Navigation</h1>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/README\">🏡 Home</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/navigation\">🗺 Navigation</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/useful-downloads\">📥 Useful Downloads</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/skills/README\">🛠 Skills</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/skills/my-stack\">My Stack</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/resources/README\">🙏 Resources</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/orientation\">Orientation:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/links\">Links</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/practice-problems\">Practice Problems:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/cold-outreach-generator\">❄ Cold Outreach Generator</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resources/running-list-of-misc-resources\">Running List Of MISC Resources:</a></li>\n</ul>\n</li>\n</ul>\n<h2>Resume</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/resume/resume/README\">📰 Resume</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resume/resume/examples\">Examples</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/resume/resume/advice\">Advice</a></li>\n</ul>\n</li>\n</ul>\n<h2>Cover Letter</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/cover-letter/page-10\">📒 Cover Letter</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/cover-letter/example-of-developer-bio\">Example Of Developer Bio</a></li>\n</ul>\n<h2>Portfolio</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/portfolio/showcase\">💼 Showcase</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/portfolio/git-repo\">💾 Git Repo</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/portfolio/page-11\">🖼 Portfolio</a></li>\n</ul>\n<h2>📈 Slack&#x26;Lambda</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/pinned-items\">📍 Pinned Items:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/pinned-messages\">📌 Pinned Messages:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/slack-announcements\">❇ Slack Announcements</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/recordings\">📺 Recordings</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/slack-and-lambda/people\">🧑🤝🧑 People</a></li>\n</ul>\n<h2>Aux-Resources</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/aux-resources/youtube\">Youtube</a></li>\n</ul>\n<h2>🖋 Interview Prep</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/interview-questions./README\">⁉ Interview Questions.</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/interview-questions./cheat-sheets\">Cheat Sheets</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/python-vs-js-cheat-sheet\">Python-VS-JS Cheat Sheet</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/common-knowledge-questions\">Common Knowledge Questions</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/types-of-data-structures\">Types Of Data Structures</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/ds_algo_prac/leetcode\">👨💻 Leetcode:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/hash-tables\">Hash Tables</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/ds_algo-practice/README\">DS_ALGO Practice:</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/ds_algo-practice/python-subpage\">Python Subpage</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/python\">🐍 Python</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interview-prep/more-practice\">More Practice:</a></li>\n</ul>\n<h2>Tutorials</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/tutorials/untitled/README\">Job Search Guide</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/tutorials/untitled/page-2\">Common Questions</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/tutorials/untitled/page-2-1\">Self Introduction</a></li>\n</ul>\n</li>\n</ul>\n<!---->\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/page-3\">Getting Started</a></li>\n</ul>\n<h2>Applications &#x26; Job Postings</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/postings\">👔 Postings:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/my-applications\">My Applications</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/README\">😅 Jobs I Really Want</a></p>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/stackbit/README\">Stackbit</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/stackbit/developer-advocate-remote\">Developer Advocate (Remote)</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/stackbit/page-4\">Page 4</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/applications-and-job-postings/jobs-i-really-want/emails\">Emails</a></li>\n</ul>\n</li>\n</ul>\n<h2>Job Boards</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/job-boards/job-boards/README\">📋 Job Boards</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/job-boards/job-boards/less-promising-job-boards\">Less Promising Job Boards</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/job-boards/job-boards/list-of-boards\">LIST OF BOARDS</a></li>\n</ul>\n</li>\n</ul>\n<h2>Networking</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/networking/events\">🗓 Events</a></li>\n</ul>\n<h2>Lambda Guidance &#x26; Meetings</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/lambda-guidance-and-meetings/meetings\">📥 Meetings:</a></li>\n</ul>\n<h2>MISC</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/misc/articles-to-read\">🗞 Articles To Read</a></li>\n</ul>\n<h2>Notes</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/job-search/notes/notes/README\">📓 Notes</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/notes/notes/page-5\">Page 5</a></li>\n</ul>\n</li>\n</ul>\n<h2>🖨 Interviewing</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interviewing/general\">General</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/job-search/interviewing/js\">🖥 JS</a></li>\n</ul>\n<h2>Programming Languages/Frameworks/Platforms</h2>\n<h3>Android</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/android-interview-questions.aspx\">10 Android interview question answers for Freshers</a></li>\n<li><a href=\"http://www.toptal.com/android/interview-questions\">20 Essential Android Interview Questions from Toptal</a></li>\n<li><a href=\"https://adevait.com/android/interview-questions\">25 Essential Android Interview Questions from Adeva</a></li>\n<li><a href=\"https://www.quora.com/What-are-good-job-interview-questions-for-an-Android-developer\">A couple of Android questions posted by Quora users</a></li>\n<li><a href=\"http://www.tutorialspoint.com/android/android_interview_questions.htm\">A great list of Android interview questions covering all the aspects of this career</a></li>\n<li><a href=\"https://github.com/derekargueta/Android-Interview-Questions\">Collection of Android and Java related questions and topics, including general developer questions, Java core, Data structures, Build Tools, Programming Paradigms, Core Android, Databases and etc</a></li>\n<li><a href=\"https://medium.com/@neteinstein/not-another-android-interviews-article-the-questions-3dedafa30bec\">Collection of Android and Java questions divided by experience</a></li>\n<li><a href=\"https://github.com/mindash/android-structured-interview\">RocketSkill App Android Interview Questions</a></li>\n<li><a href=\"https://github.com/anitaa1990/Android-Cheat-sheet\">Android cheat sheet: Coding program, Data structure, Android and Java interview questions with answers and categorized by topics</a></li>\n<li><a href=\"https://www.andreasschrade.com/2017/02/23/android-interview-questions/\">Android Interview Questions And Answers From Beginner To Advanced</a></li>\n<li><a href=\"https://github.com/mohsenoid/Android-Interview-Questions\">Interview Questions for Senior Android Developers</a></li>\n<li><a href=\"https://www.interviewbit.com/android-interview-questions/\">35+ Android Interview Questions</a></li>\n</ul>\n<h3>AngularJS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/angular-js/interview-questions\">12 Essential AngularJS Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/gdi2290/ngExam\">An AngularJS exam with questions from beginner to expert by @gdi2290 from @AngularClass</a></li>\n<li><a href=\"https://www.codementor.io/angularjs/tutorial/angularjs-interview-questions-sample-answers\">29 AngularJS Interview Questions - Can You Answer Them All? Great Article from Codementor</a></li>\n<li><a href=\"http://www.web-technology-experts-notes.in/2014/11/angularjs-interview-questions-and-answers-for-experienced.html\">AngularJS interview questions and answers for experienced developers</a></li>\n<li><a href=\"http://www.tutorialspoint.com/angularjs/angularjs_interview_questions.htm\">AngularJS Interview Questions which have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of AngularJS</a></li>\n<li><a href=\"http://www.codeproject.com/Articles/891718/AngularJS-Interview-Questions-and-Answers\">This article discusses the top 50 Most occurred AngularJS interview question with answers</a></li>\n<li><a href=\"http://career.guru99.com/top-25-angular-js-interview-questions/\">Top 25 Angularjs Interview Questions and Quiz</a></li>\n<li><a href=\"https://www.techbeamers.com/latest-angularjs-interview-questions-answers/\">100 AngularJS Interview Questions - Quick Refresher</a></li>\n</ul>\n<h3>Angular</h3>\n<ul>\n<li><a href=\"https://github.com/Yonet/Angular-Interview-Questions\">A list of helpful Angular related questions you can use to interview potential candidates, test yourself or completely ignore</a></li>\n<li><a href=\"https://www.onlineinterviewquestions.com/angular2-interview-questions/\">Angular 2 Interview Questions</a></li>\n<li><a href=\"https://github.com/sudheerj/angular-interview-questions\">List of 300 Angular Interview Questions and Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/angular-interview-questions/\">Angular Interview Questions (2020)</a></li>\n<li><a href=\"https://hackr.io/blog/angular-interview-questions\">Top Angular Interview Questions and Answers in 2021</a></li>\n</ul>\n<h3>BackboneJS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/backbone-js/interview-questions\">8 Essential Backbonejs Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.web-technology-experts-notes.in/2015/01/backbone-js-interview-questions-and-answers.html\">Backbonejs Interview Questions And Answers from web technology experts notes</a></li>\n<li><a href=\"http://career.guru99.com/top-25-backbone-js-interview-questions/\">Top 25 Backbone.js interview questions</a></li>\n</ul>\n<h3>C++</h3>\n<ul>\n<li><a href=\"http://www.sanfoundry.com/cplusplus-interview-questions-answers/\">1000+ Multiple Choice Questions &#x26; Answers in C++ with explanations</a></li>\n<li><a href=\"http://www.careerride.com/C++-Interview-questions-Answer.aspx\">200 C++ interview questions and answers</a></li>\n<li><a href=\"http://www.toptal.com/c-plus-plus/interview-questions\">24 Essential C++ Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.geekinterview.com/Interview-Questions/Languages/C-Plus-Plus\">C++ Interview Questions from GeekInterview</a></li>\n<li><a href=\"http://www.geeksforgeeks.org/c-plus-plus/\">C++ Programming Q&#x26;A and quizzes from computer science portal for geeks</a></li>\n<li><a href=\"http://www.indiabix.com/cpp-programming/questions-and-answers/\">C++ Programming Questions and Answers related to such topics as OOPs concepts, Object and Classes, Functions, Constructors and Destructors, Inheritance and etc</a></li>\n<li><a href=\"https://github.com/haoel/leetcode\">LeetCode Problems' Solutions written in C++</a></li>\n</ul>\n<h3>C</h3>\n<ul>\n<li><a href=\"http://www.cquestions.com/2010/10/c-interview-questions-and-answers.html\">Basic C language technical frequently asked interview questions and answers It includes data structures, pointers interview questions and answers for experienced</a></li>\n<li><a href=\"http://www.indiabix.com/technical/c/\">C Programming Interview Questions and Answers for such topics as Bits and Bytes, Preprocessors, Functions, Strings, Language basics and etc</a></li>\n<li><a href=\"http://www.tutorialspoint.com/cprogramming/cprogramming_interview_questions.htm\">C Programming Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C Programming</a></li>\n<li><a href=\"http://geeksquiz.com/commonly-asked-c-programming-interview-questions-set-1/\">First set of commonly asked C programming interview questions from computer science portal for geeks</a></li>\n<li><a href=\"http://geeksquiz.com/commonly-asked-c-programming-interview-questions-set-2/\">Second set of commonly asked C programming interview questions from computer science portal for geeks</a></li>\n<li><a href=\"https://www.toptal.com/c/interview-questions\">9 Essential C Interview Questions with answers</a></li>\n<li><a href=\"https://www.interviewbit.com/c-interview-questions/\">Top C Interview Questions and Answers</a></li>\n</ul>\n<h3>C</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/c-sharp/interview-questions\">15 Essential C# Interview Question from Toptal</a></li>\n<li><a href=\"http://www.dotnetfunda.com/interviews/cat/6/csharp\">C# interview questions from dotnetfunda.com</a></li>\n<li><a href=\"http://career.guru99.com/top-50-c-sharp-interview-questions-answers/\">Top 50 C# Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/csharp-coding-interview-questions-developers/\">50 C# Coding Interview Questions and Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/csharp-oops-interview-questions-answers/\">20 C# OOPS Interview Questions and Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/c-sharp-interview-questions/\">30+ C# Interview Questions</a></li>\n</ul>\n<h3>.NET</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/ASPNet-Questions.aspx\">300 ASPNET interview questions and answers</a></li>\n<li><a href=\"https://www.talkingdotnet.com/asp-net-core-interview-questions/\">ASP.NET Core Interview Questions</a></li>\n<li><a href=\"http://www.indiabix.com/technical/dotnet/\">Great list of NET interview questions covering all the NET platform topics</a></li>\n<li><a href=\"http://www.dotnetcurry.com/dotnetinterview/70/dotnet-interview-questions-answers-beginners\">NET Interview Questions and Answers for Beginners which consists of the most frequently asked questions in NET This list of 100+ questions and answers gauge your familiarity with the NET platform</a></li>\n<li><a href=\"http://stackoverflow.com/questions/365489/questions-every-good-net-developer-should-be-able-to-answer\">Questions gathered by community of the StackOverflow</a></li>\n<li><a href=\"http://www.hanselman.com/blog/WhatGreatNETDevelopersOughtToKnowMoreNETInterviewQuestions.aspx\">What Great NET Developers Ought To Know (More NET Interview Questions)</a></li>\n</ul>\n<h3>Clojure</h3>\n<ul>\n<li><a href=\"http://www.learningclojure.com/2014/05/fizz-buzz-interview-question.html\">Classic 'Fizz Buzz' interview question for Clojure developers</a></li>\n<li><a href=\"http://ita2zguide.blogspot.com.by/p/cc.html\">Clojure Interview Questions for experienced devs</a></li>\n<li><a href=\"https://github.com/dpetrovics/coding-exercises\">Coding exercises in Clojure, handy practice for technical interview questions</a></li>\n<li><a href=\"https://www.reddit.com/r/Clojure/comments/34qhha/clojure_coding_job_interview_experience/\">Experience and questions from Clojure developer interview collected by Reddit users</a></li>\n<li><a href=\"https://github.com/DerekCuevas/interview-cake-clj\">Interview cake Clojure solutions</a></li>\n</ul>\n<h3>CSS</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/Interview-Questions-CSS.aspx\">CSS interview questions and answers for freshers and experienced candidates Also there you can find CSS online practice tests to fight written tests and certification exams on CSS</a></li>\n<li><a href=\"http://www.techrepublic.com/blog/software-engineer/css-interview-questions-and-answers/\">Development hiring managers and potential interviewees may find there sample CSS proficiency interview Q&#x26;As and code snippets useful</a></li>\n<li><a href=\"https://css-tricks.com/interview-questions-css/\">Interview Questions and Exercises About CSS</a></li>\n<li><a href=\"http://career.guru99.com/top-50-csscascading-style-sheet-interview-questions/\">Top 50 CSS(Cascading Style Sheet) Interview Questions covering the most of tricky CSS moments</a></li>\n<li><a href=\"https://frontendinterviewhandbook.com/css-questions/\">Front End Interview Handbook - CSS Questions and Answers</a></li>\n</ul>\n<h3>Cucumber</h3>\n<ul>\n<li><a href=\"https://ratedr05.wordpress.com/2017/09/22/cucumber-interview-questions/\">Cucumber Web Application BDD Sample Interview Questions</a></li>\n<li><a href=\"http://watir.com/simple-cucumber-watir-page-object-pattern-framework/\">Guide to building a simple Cucumber + Watir page object pattern framework</a></li>\n</ul>\n<h3>Django</h3>\n<ul>\n<li><a href=\"http://insights.dice.com/2014/04/30/interview-questions-pythondjango-developers/\">Some abstract interview questions for Python/Django developers</a></li>\n<li><a href=\"http://www.ilian.io/django-interview-questions/\">Some Django basic interview questions to establish the basic level of the candidates</a></li>\n<li><a href=\"http://career.guru99.com/top-16-django-interview-questions/\">Top 16 Django Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>Docker</h3>\n<ul>\n<li><a href=\"https://mindmajix.com/docker-interview-questions\">Docker Interview Questions</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/docker-interview-questions/\">Top Docker Interview Questions You Must Prepare In 2019</a></li>\n<li><a href=\"https://intellipaat.com/interview-question/docker-interview-questions/\">Top Docker Interview Questions And Answers</a></li>\n<li><a href=\"https://www.wisdomjobs.com/e-university/docker-software-interview-questions.html\">DOCKER (SOFTWARE) INTERVIEW QUESTIONS &#x26; ANSWERS</a></li>\n<li><a href=\"https://www.fullstack.cafe/blog/docker-interview-questions-and-answers\">30 Docker Interview Questions and Answers in 2019</a></li>\n<li><a href=\"https://www.interviewbit.com/docker-interview-questions/\">Docker Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.wissenhive.com/blogs/top-50-docker-interview-questions-and-answers\">Top 50 Docker Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.techgeekbuzz.com/top-docker-interview-questions/\">Top 50+ Docker Interview Questions and Answers in 2021</a></li>\n</ul>\n<h3>Elastic</h3>\n<ul>\n<li><a href=\"https://logit.io/blog/post/the-top-50-elk-stack-and-elasticsearch-interview-questions\">Top Elastic Stack Interview Questions</a></li>\n</ul>\n<h3>EmberJS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/emberjs/interview-questions\">8 Essential Emberjs Interview Questions from Toptal</a></li>\n<li><a href=\"http://career.guru99.com/top-25-ember-js-interview-questions/\">Top 25 Emberjs Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>Erlang</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-22-erlang-interview-questions/\">Top 22 Erlang Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>Golang</h3>\n<ul>\n<li><a href=\"https://github.com/mrekucci/epi\">Solutions for Elements of Programming Interviews problems written in Golang</a></li>\n<li><a href=\"https://github.com/efischer19/golang_ctci\">Solutions for some basic coding interview tasks written in Go</a></li>\n<li><a href=\"http://career.guru99.com/top-20-go-programming-interview-questions/\">Top 20 GO Programming Interview Questions for both freshers and experienced developers</a></li>\n</ul>\n<h3>GraphQl</h3>\n<ul>\n<li><a href=\"https://www.fullstack.cafe/blog/5-graphql-interview-questions-you-should-know\">8 GraphQl Interview Questions To Know</a></li>\n<li><a href=\"https://www.howtographql.com/advanced/5-common-questions/\">How to GraphQl - Common Questions</a></li>\n</ul>\n<h3>HTML</h3>\n<ul>\n<li><a href=\"http://www.sitepoint.com/10-typical-html-interview-exercises/\">10 Typical HTML Interview Exercises from SitePoint.com</a></li>\n<li><a href=\"http://www.toptal.com/html5/interview-questions\">16 Essential HTML5 Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.codeproject.com/Articles/702051/important-HTML-Interview-questions-with-answe\">40 important HTML 5 Interview questions with answers</a></li>\n<li><a href=\"http://www.careerride.com/Interview-Questions-HTML.aspx\">HTML interview questions and answers for freshers and experienced candidates Also find HTML online practice tests to fight written tests and certification exams on HTML</a></li>\n<li><a href=\"http://career.guru99.com/top-50-html-interview-questions/\">Top 50 HTML Interview Questions for both freshers and experienced developers</a></li>\n<li><a href=\"http://www.javatpoint.com/html-interview-questions\">Common HTML interview questions for freshers</a></li>\n<li><a href=\"https://frontendinterviewhandbook.com/html-questions/\">Front End Interview Handbook - HTML Questions and Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/latest-html-interview-questions/\">30 HTML Interview Questions and Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/html-interview-questions/\">30+ HTML Interview Questions (2021)</a></li>\n</ul>\n<h3>Ionic</h3>\n<ul>\n<li><a href=\"http://www.codeandyou.com/p/ionic-interview-questions.html\">23 Beginner Level Ionic Framework Questions</a></li>\n<li><a href=\"https://www.toptal.com/ionic/interview-questions\">12 Essential Ionic Interview Questions</a></li>\n<li><a href=\"https://www.javatpoint.com/ionic-interview-questions\">45 Ionic Interview Questions</a></li>\n<li><a href=\"https://www.maheshbhusanoor.com/article/ionic-interview-questions-answers.html\">Most Asked Ionic Interview Questions</a></li>\n</ul>\n<h3>iOS</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/ios/interview-questions\">14 Essential iOS Interview Questions from Toptal</a></li>\n<li><a href=\"https://www.codementor.io/ios/tutorial/ios-interview-tips-questions-answers-objective-c\">20 iOS Developer Interview Questions and Answers for getting you ready for your interview</a></li>\n<li><a href=\"https://adevait.com/ios/interview-questions\">25 Essential iOS Interview Questions from Adeva</a></li>\n<li><a href=\"https://github.com/CameronBanga/iOS-Developer-and-Designer-Interview-Questions\">A small guide to help those looking to hire a developer or designer for iOS work While tailored for iOS, many questions could be used for Android developers or designers as well A great self-test if you're looking to keep current or practice for your own interview</a></li>\n<li><a href=\"http://www.raywenderlich.com/53962/ios-interview-questions\">All you need to know about iOS technical interview including some tips for preparing, questions and some coding exercises</a></li>\n<li><a href=\"https://blackpixel.com/writing/2013/04/interview-questions-for-ios-and-mac-developers-1.html\">Interview Questions for iOS and Mac Developers from the CEO of Black Pixel</a></li>\n<li><a href=\"http://www.geekinterview.com/Interview-Questions/iOS\">iOS Interview Questions and Answers including such topics as Development Basics, App states and multitasking, App states, Core app objects</a></li>\n<li><a href=\"https://m.smartcloud.io/ios-interview-questions-for-senior-developers-in-2017-a94cc81c8205\">iOS Interview Questions For Senior Developers</a></li>\n<li><a href=\"https://medium.com/ios-os-x-development/ios-interview-questions-13840247a57a\">50 iOS Interview Questions And Answers 1</a></li>\n<li><a href=\"https://medium.com/ios-os-x-development/50-ios-interview-questions-and-answers-part-2-45f952230b9f\">50 iOS Interview Questions And Answers Part 2</a></li>\n<li><a href=\"https://medium.com/ios-os-x-development/50-ios-interview-questions-and-answers-part-3-3fad146b6c3d\">50 iOS Interview Questions And Answers Part 3</a></li>\n<li><a href=\"https://medium.com/@duruldalkanat/50-ios-interview-questions-and-answers-part-4-6f26b26341a\">50 iOS Interview Questions And Answers Part 4</a></li>\n<li><a href=\"https://medium.com/@duruldalkanat/50-ios-interview-questions-and-answers-part-5-de6241374a8f\">50 iOS Interview Questions And Answers Part 5</a></li>\n<li><a href=\"https://www.upwork.com/i/interview-questions/ios/\">10 iOS interview questions and answers</a></li>\n<li><a href=\"https://github.com/9magnets/iOS-Developer-and-Designer-Interview-Questions#tech\">iOS Developer and Designer Interview Questions</a></li>\n<li><a href=\"http://www.thecrazyprogrammer.com/2015/11/ios-interview-questions-and-answers.html\">IOS Interview Questions and Answers</a></li>\n<li><a href=\"http://ichuiphonedev.blogspot.com/2014/05/iphone-latest-interview-questions-and.html\">iOS Interview Questions For Beginners</a></li>\n<li><a href=\"https://github.com/Babylonpartners/ios-playbook/blob/master/Interview/questions.md\">Babylon iOS Interview Questions</a></li>\n<li><a href=\"https://github.com/mindash/iOS-structured-interview\">RocketSkill App iOS Interview Questions</a></li>\n<li><a href=\"https://medium.com/flawless-app-stories/static-vs-dynamic-dispatch-in-swift-a-decisive-choice-cece1e872d\">iOS Static vs Dynamic Dispatch</a></li>\n</ul>\n<h3>Java</h3>\n<ul>\n<li><a href=\"https://onurdesk.com/category/interview/interview-program-java/\">List of Java programs for interview Categoriwise</a></li>\n<li><a href=\"http://www.javacodegeeks.com/2014/04/java-interview-questions-and-answers.html\">115 Java Interview Questions and Answers - The ULTIMATE List</a></li>\n<li><a href=\"https://www.codementor.io/java/tutorial/java-interview-sample-questions-answers\">37 Java Interview Questions to Practice With from Codementor</a></li>\n<li><a href=\"http://www.toptal.com/java/interview-questions\">21 Essential Java Interview Questions</a></li>\n<li><a href=\"https://www.janbasktraining.com/blog/core-java-interview-questions-answers/\">Top 30 Core Java Interview Questions</a></li>\n<li><a href=\"https://adevait.com/java/interview-questions\">29 Essential Java Interview Questions from Adeva</a></li>\n<li><a href=\"https://github.com/svozniuk/java-interviews\">A collection of Java interview questions and answers to them</a></li>\n<li><a href=\"https://github.com/donbeave/interview\">Data Structures and Algorithms in Java which can be useful in interview process</a></li>\n<li><a href=\"https://blog.udemy.com/java-interview-questions/\">Java Interview Questions: How to crack the TOP 15 questions</a></li>\n<li><a href=\"http://www.javatpoint.com/corejava-interview-questions\">300 Core Java Interview Questions</a></li>\n<li><a href=\"http://java67.blogspot.com.by/2012/09/top-10-tricky-java-interview-questions-answers.html\">Top 10 Tricky Java interview questions and Answers</a></li>\n<li><a href=\"http://javahungry.blogspot.com/2013/06/top-25-most-frequently-asked-core-java.html\">Top 25 Most Frequently Asked Interview Core Java Interview Questions And Answers</a></li>\n<li><a href=\"http://java67.blogspot.sg/2015/03/top-40-core-java-interview-questions-answers-telephonic-round.html\">Top 40 Core Java Interview Questions Answers from Telephonic Round</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/spring-interview-questions/\">Top 50 Spring Interview Questions You Must Prepare For In 2020</a></li>\n<li><a href=\"https://www.journaldev.com/2696/spring-interview-questions-and-answers\">Spring Interview Questions And Answers</a></li>\n<li><a href=\"https://www.interviewcake.com/java-interview-questions\">Interview Cake Java Interview Questions</a></li>\n<li><a href=\"https://www.techbeamers.com/java-interview-questions/\">Java Interview Questions &#x26; Quizzes</a></li>\n<li><a href=\"https://fdk.codes/some-java-interview-questions/\">Essetial Java Interview Questions</a></li>\n<li><a href=\"https://www.interviewbit.com/java-interview-questions/\">Fundamental Java Interview Questions</a></li>\n</ul>\n<h3>JavaScript</h3>\n<ul>\n<li><a href=\"https://github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript\">Practice common algorithms using JavaScript</a></li>\n<li><a href=\"https://medium.com/javascript-scene/10-interview-questions-every-javascript-developer-should-know-6fa6bdf5ad95\">10 Interview Questions Every JavaScript Developer Should Know</a></li>\n<li><a href=\"https://www.codementor.io/javascript/tutorial/21-essential-javascript-tech-interview-practice-questions-answers\">21 Essential JavaScript Interview Questions from best mentors all over the world</a></li>\n<li><a href=\"https://adevait.com/javascript-developers/interview-questions\">20 Essential JavaScript Interview Questions from Adeva</a></li>\n<li><a href=\"http://www.toptal.com/javascript/interview-questions\">37 Essential JavaScript Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.sitepoint.com/5-javascript-interview-exercises/\">5 More JavaScript Interview Exercises</a></li>\n<li><a href=\"http://www.sitepoint.com/5-typical-javascript-interview-exercises/\">5 Typical JavaScript Interview Exercises</a></li>\n<li><a href=\"http://www.techrepublic.com/blog/software-engineer/javascript-interview-questions-and-answers/\">Development hiring managers and potential interviewees may find these sample JavaScript proficiency interview Q&#x26;As and code snippets useful</a></li>\n<li><a href=\"https://github.com/nishant8BITS/123-Essential-JavaScript-Interview-Question\">123 Essential JavaScript Interview Question</a></li>\n<li><a href=\"http://www.tutorialspoint.com/javascript/javascript_interview_questions.htm\">JavaScript Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of JavaScript</a></li>\n<li><a href=\"http://www.thatjsdude.com/interview/js2.html\">JS: Basics and Tricky Questions</a></li>\n<li><a href=\"http://thatjsdude.com/interview/js1.html\">JS: Interview Algorithm</a></li>\n<li><a href=\"https://github.com/kolodny/exercises\">Some basic javascript coding challenges and interview questions</a></li>\n<li><a href=\"https://github.com/csvenja/javascript-exercises\">Some JavaScript interview exercises</a></li>\n<li><a href=\"https://www.reddit.com/r/javascript/comments/3rb88w/ten_questions_ive_been_asked_most_more_than_once\">Ten Questions I've Been Asked, Most More Than Once, Over Six Technical JavaScript / Front-End Engineer Job Interviews.</a></li>\n<li><a href=\"http://career.guru99.com/top-85-javascript-interview-questions/\">Top 85 JavaScript Interview Questions</a></li>\n<li><a href=\"https://www.interviewcake.com/javascript-interview-questions\">Interview Cake JavaScript Interview Questions</a></li>\n<li><a href=\"https://performancejs.com/post/hde6d32/The-Best-Frontend-JavaScript-Interview-Questions-(written-by-a-Frontend-Engineer)\">The Best Frontend JavaScript Interview Questions (written by a Frontend Engineer)</a></li>\n<li><a href=\"https://dev.to/arnavaggarwal/10-javascript-concepts-you-need-to-know-for-interviews\">10 JavaScript Concepts You Need to Know for Interviews</a></li>\n<li><a href=\"https://frontendinterviewhandbook.com/javascript-questions/\">Front End Interview Handbook - JavaScript Questions and Answers</a></li>\n<li><a href=\"https://www.techbeamers.com/javascript-interview-questions-answers/\">JavaScript Interview Questions - Quick Refresher</a></li>\n<li><a href=\"https://github.com/danieldelcore/mega-interview-guide\">The MEGA Interview Guide</a></li>\n<li><a href=\"https://www.interviewbit.com/javascript-interview-questions/\">Javascript Interview Questions and Answers (2020)</a></li>\n<li><a href=\"https://github.com/sadanandpai/javascript-code-challenges\">JavaScript Modern Interview Code Challenges 2021</a></li>\n<li><a href=\"https://dev.to/macmacky/70-javascript-interview-questions-5gfi\">70 JavaScript Interview Questions</a></li>\n</ul>\n<h3>jQuery</h3>\n<ul>\n<li><a href=\"https://career.guru99.com/top-50-jquery-interview-questions/\">Top 50 jquery interview questions</a></li>\n<li><a href=\"https://www.toptal.com/jquery/interview-questions\">17 Essential jQuery Interview Questions From Toptal</a></li>\n<li><a href=\"https://www.techgeekbuzz.com/top-jquery-interview-questions/\">Top JQuery Interview Questions and Answers</a></li>\n</ul>\n<h3>Front-end build tools</h3>\n<ul>\n<li><a href=\"https://github.com/styopdev/webpack-interview-questions\">Webpack interview questions &#x26; answers</a></li>\n<li><a href=\"https://www.codeproject.com/Articles/1065184/Latest-Gulp-js-interview-questions\">Gulp js interview questions</a></li>\n<li><a href=\"http://www.talkingdotnet.com/grunt-js-interview-questions/\">Grunt js interview questions for beginners</a></li>\n<li><a href=\"https://mindmajix.com/grunt-interview-questions\">Grunt js interview questions</a></li>\n</ul>\n<h3>KnockoutJS</h3>\n<ul>\n<li><a href=\"http://www.code-sample.com/2014/01/knockout-js-interview-questions-and.html\">15 interview questions from CodeSample.com</a></li>\n<li><a href=\"http://www.codeproject.com/Articles/987899/KnockoutJS-interview-questions\">20 questions you might be asked about KnockoutJS in an interview for both freshers and experienced developers</a></li>\n</ul>\n<h3>Less</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-25-less-interview-questions/\">Top 25 LESS Interview Questions</a></li>\n</ul>\n<h3>Lisp</h3>\n<ul>\n<li><a href=\"http://www.sanfoundry.com/lisp-mcqs-class/\">10 LISP Questions &#x26; Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-18-lisp-interview-questions/\">Top 18 Lisp Interview Questions from Career Guru</a></li>\n</ul>\n<h3>NodeJS</h3>\n<ul>\n<li><a href=\"https://adevait.com/nodejs/interview-questions\">25 Essential Node.js Interview Questions from Adeva</a> </li>\n<li><a href=\"http://www.toptal.com/nodejs/interview-questions\">8 Essential Nodejs Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.tutorialspoint.com/nodejs/nodejs_interview_questions.htm\">Node.JS Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Node.JS</a></li>\n<li><a href=\"https://blog.risingstack.com/node-js-interview-questions/\">Node.js Interview Questions and Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-25-interview-questions-on-node-js/\">Top 25 Nodejs Interview Questions &#x26; Answers from Career Guru</a></li>\n<li><a href=\"https://www.techbeamers.com/top-30-node-js-interview-questions-answers/\">Top 30 Node.Js Interview Questions With Answers</a></li>\n<li><a href=\"https://www.interviewbit.com/node-js-interview-questions/\">Top Nodejs Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://github.com/haizlin/fe-interview/blob/master/category/nodejs.md\">Node.js Interview Questions in Chinese</a></li>\n<li><a href=\"https://github.com/learning-zone/nodejs-interview-questions\">Node.js Interview Questions by learning-zone</a></li>\n</ul>\n<h3>Objective-C</h3>\n<ul>\n<li><a href=\"http://insights.dice.com/2015/07/21/interview-qs-objective-c-swift/\">Interview Qs for Objective-C and Swift</a></li>\n<li><a href=\"http://ichuiphonedev.blogspot.com/2014/05/iphone-latest-interview-questions-and.html\">iOS Interview Questions For Beginners</a></li>\n</ul>\n<h3>PHP</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/PHP-Interview-Questions.aspx\">100 PHP interview questions and answers from CareerRide.com</a></li>\n<li><a href=\"http://www.toptal.com/php/interview-questions\">21 Essential PHP Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.woodstitch.com/resources/php-interview-questions.php\">20 Common PHP Job Interview Questions and Answers</a></li>\n<li><a href=\"https://adevait.com/php/interview-questions\">25 Essential PHP Interview Questions from Adeva</a></li>\n<li><a href=\"http://phpinterviewquestions.co.in/\">PHP interview questions and answers for freshers</a></li>\n<li><a href=\"http://career.guru99.com/top-100-php-interview-questions-answers/\">Top 100 PHP Interview Questions &#x26; Answers from CareerGuru</a></li>\n<li><a href=\"https://www.codementor.io/php/tutorial/php-interview-questions-sample-answers\">25 PHP Interview Questions</a></li>\n<li><a href=\"https://pangara.com/blog/php-interview-questions\">26 Essential PHP Interview Questions for 2018</a></li>\n<li><a href=\"https://bootsity.com/books\">Cracking PHP Interviews Questions ebook 300+ Q&#x26;A</a></li>\n<li><a href=\"https://www.techbeamers.com/latest-php-interview-questions-answers/\">PHP Interview Questions - Quick Refresher</a></li>\n<li><a href=\"https://www.interviewbit.com/php-interview-questions/\">30+ PHP Interview Questions</a></li>\n</ul>\n<h3>Python</h3>\n<ul>\n<li><a href=\"https://adevait.com/python/interview-questions\">26 Essential Python Interview Questions from Adeva</a></li>\n<li><a href=\"http://www.careerride.com/python-interview-questions.aspx\">20 Python interview questions and answers</a></li>\n<li><a href=\"http://www.toptal.com/python/interview-questions\">11 Essential Python Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/sigmavirus24/python-interview-questions\">A listing of questions that could potentially be asked for a python job listing</a></li>\n<li><a href=\"http://www.bogotobogo.com/python/python_interview_questions.php\">Interview Questions for both beginners and experts</a></li>\n<li><a href=\"https://www.interviewcake.com/python-interview-questions\">Interview Cake Python Interview Questions</a></li>\n<li><a href=\"https://docs.python.org/2/faq/programming.html\">Python Frequently Asked Questions (Programming)</a></li>\n<li><a href=\"https://www.reddit.com/r/Python/comments/1knw7z/python_interview_questions\">Python interview questions collected by Reddit users</a></li>\n<li><a href=\"http://career.guru99.com/top-25-python-interview-questions/\">Top 25 Python Interview Questions from Career Guru</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=DEwgZNC-KyE\">Python Interview 10 questions from Corey Schafer</a></li>\n<li><a href=\"https://luminousmen.com/post/6\">Python interview questions. Part I. Junior</a></li>\n<li><a href=\"https://luminousmen.com/post/7\">Python interview questions. Part II. Middle</a></li>\n<li><a href=\"https://luminousmen.com/post/8\">Python interview questions. Part III. Senior</a></li>\n<li><a href=\"https://www.interviewbit.com/python-interview-questions/\">Python Interview Questions and Answers (2019)</a></li>\n<li><a href=\"https://www.techbeamers.com/python-interview-questions-programmers/\">100 Python Interview Questions - Quick Refresher</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/python-interview-questions/\">Top 100 Python Interview Questions from Edureka (2021)</a></li>\n</ul>\n<h3>Ruby on Rails</h3>\n<ul>\n<li><a href=\"http://www.careerride.com/ruby-on-rails-interview-questions.aspx\">20 Ruby on Rails interview questions and answers from CareerRide.com</a></li>\n<li><a href=\"http://www.toptal.com/ruby-on-rails/interview-questions\">9 Essential Ruby on Rails Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/rishiip/ruby-on-rails-interview-questions\">High-level Ruby on Rails Interview Questions</a></li>\n<li><a href=\"http://anilpunjabi.tumblr.com/post/25948339235/ruby-and-rails-interview-questions-and-answers\">Ruby And Ruby On Rails interview Q&#x26;A</a></li>\n<li><a href=\"https://srikantmahapatra.wordpress.com/2013/11/07/ruby-on-rails-interview-questions-and-answers/\">Some of the most frequently asked Ruby on Rails questions and how to answer them confidently</a></li>\n<li><a href=\"https://www.codementor.io/ruby-on-rails/tutorial/ruby-on-rails-interview-questions\">11 Ruby on Rails Interview Practice Questions</a></li>\n<li><a href=\"https://career.guru99.com/top-34-ruby-on-rail-interview-questions/\">Top 53 Ruby on Rails Interview Questions &#x26; Answers</a></li>\n<li><a href=\"https://www.upwork.com/i/interview-questions/ruby-on-rails/\">10 Ruby on Rails interview questions and answers</a></li>\n</ul>\n<h3>ReactJS</h3>\n<ul>\n<li><a href=\"https://www.reddit.com/r/reactjs/comments/3m5equ/react_what_interview_questions_to_expect/\">Reddit users share their expectations from ReactJS interview</a></li>\n<li><a href=\"https://www.codementor.io/reactjs/tutorial/5-essential-reactjs-interview-questions\">5 Essential React.js Interview Questions</a></li>\n<li><a href=\"https://tylermcginnis.com/react-interview-questions/\">React Interview Questions</a></li>\n<li><a href=\"https://www.toptal.com/react/interview-questions\">Toptal's 21 Essential React.js Interview Questions</a></li>\n<li><a href=\"https://www.educba.com/reactjs-interview-questions/\">19 Essential ReactJs Interview Questions</a></li>\n<li><a href=\"https://github.com/sudheerj/reactjs-interview-questions\">React Interview Questions &#x26; Answers</a></li>\n</ul>\n<h3>Ruby</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/ruby/interview-questions\">21 Essential Ruby Interview Questions from Toptal</a></li>\n<li><a href=\"https://gist.github.com/ryansobol/5252653\">15 Questions to Ask During a Ruby Interview</a></li>\n<li><a href=\"https://github.com/undr/ruby-trivia\">A list of questions about Ruby programming you can use to quiz yourself</a></li>\n<li><a href=\"http://technology.customink.com/blog/2015/11/23/the-art-of-ruby-technical-interviews/\">The Art of Ruby Technical Interview</a></li>\n<li><a href=\"https://www.interviewcake.com/ruby-interview-questions\">Interview Cake Ruby Interview Questions</a></li>\n<li><a href=\"https://www.javatpoint.com/ruby-interview-questions\">Frequently Asked Ruby Interview Questions</a></li>\n</ul>\n<h3>Rust</h3>\n<ul>\n<li><a href=\"https://www.wisdomjobs.com/e-university/rust-programming-language-interview-questions.html\">Top 250+ Rust Programming Language Interview Questions</a></li>\n<li><a href=\"https://www.code-sample.com/2018/02/rust-programming-interview-questions.html\">Rust Programming Interview Questions and Answers</a></li>\n<li><a href=\"https://github.com/jean553/rust-exam\">rust-exam: A set of questions about the Rust programming language</a></li>\n<li><a href=\"https://www.bestinterviewquestion.com/rust-programming-language-interview-questions\">Best Rust Programming Language Interview Questions and answers</a></li>\n</ul>\n<h3>Sass</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-17-sass-interview-questions/\">Top 17 Sass Interview Questions from Career Guru</a></li>\n<li><a href=\"https://www.educba.com/sass-interview-questions/\">Top 10 Sass Interview Questions from educba</a></li>\n</ul>\n<h3>Scala</h3>\n<ul>\n<li><a href=\"http://insights.dice.com/2014/09/12/4-interview-questions-scala-developers/\">4 Interview Questions for Scala Developers</a></li>\n<li><a href=\"http://www.scala-lang.org/old/faq\">A list of Frequently Asked Questions and their answers, sorted by category</a></li>\n<li><a href=\"https://github.com/Jarlakxen/Scala-Interview-Questions\">A list of helpful Scala related questions you can use to interview potential candidates</a></li>\n<li><a href=\"http://programmers.stackexchange.com/questions/58145/how-scala-developers-are-being-interviewed\">How Scala Developers Are Being Interviewed</a></li>\n<li><a href=\"http://career.guru99.com/top-25-interview-questions-on-scala/\">Top 25 Scala Interview Questions &#x26; Answers from Toptal</a></li>\n</ul>\n<h3>SharePoint</h3>\n<ul>\n<li><a href=\"http://www.rajeshg.me/2013/05/sharepoint-developer-2010-interview.html\">Sharepoint Interview Question For Developer</a></li>\n<li><a href=\"https://intellipaat.com/blog/interview-question/sharepoint-interview-questions/\">Top SharePoint Interview Questions and Answers</a></li>\n</ul>\n<h3>Shell</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/shell-scripting-interview-questions/\">Top 50 Shell Scripting Interview Questions from Career Guru</a></li>\n</ul>\n<h3>Spark</h3>\n<ul>\n<li><a href=\"https://github.com/ankurchavda/SparkLearning#spark-learning-guide\">Carefully Curated 70 Spark Questions with Additional Optimization Guides (First in the series)</a></li>\n</ul>\n<h3>Swift</h3>\n<ul>\n<li><a href=\"http://www.toptal.com/swift/interview-questions\">10 Essential Swift Interview Questions from Toptal</a></li>\n<li><a href=\"https://github.com/diwu/LeetCode-Solutions-in-Swift\">Get prepared for your next iOS job interview by studying high quality LeetCode solutions in Swift 5</a></li>\n<li><a href=\"https://www.raywenderlich.com/762435-swift-interview-questions-and-answers\">Swift Interview Questions and Answers</a></li>\n<li><a href=\"http://mycodetips.com/swift-ios/swift-programming-language-interview-questions-answers-987.html\">Swift Programming Language Interview Questions And Answers from mycodetips.com</a></li>\n<li><a href=\"http://blog.udacity.com/2014/11/your-top-10-swift-questions-answered.html\">Your top 10 Swift questions answered</a></li>\n<li><a href=\"https://www.raywenderlich.com/762435-swift-interview-questions-and-answers\">Swift interview questions and answers on Swift 5 by Raywenderlich</a></li>\n<li><a href=\"https://cocoacasts.com/what-does-the-dynamic-keyword-mean-in-swift-3\">Dynamic keyword in Swift</a></li>\n</ul>\n<h3>Vue.js</h3>\n<ul>\n<li><a href=\"https://github.com/sudheerj/vuejs-interview-questions\">List of 300 VueJS Interview Questions</a></li>\n</ul>\n<h3>WordPress</h3>\n<ul>\n<li><a href=\"https://pangara.com/blog/blog45-wordpress-interview-questions-and-answers/\">Top 45 WordPress interview questions</a></li>\n<li><a href=\"https://www.toptal.com/wordpress/interview-questions\">10 Essential WordPress Interview Questions</a></li>\n</ul>\n<h3>TypeScript</h3>\n<ul>\n<li><a href=\"https://www.onlineinterviewquestions.com/typescript-interview-questions\">Typescript Interview Questions</a></li>\n<li><a href=\"https://www.positronx.io/typescript-interview-questions-answers-2109/\">Top 10 TypeScript Interview Questions and Answers for Beginner Web Developers 2019</a></li>\n</ul>\n<h2>Database technologies</h2>\n<h3>Cassandra</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-23-cassandra-interview-questions/\">Top 23 Cassandra Interview Questions from Career Guru</a></li>\n</ul>\n<h3>Microsoft Access</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-16-ms-access-database-interview-questions/\">Top 16 Microsoft Access Database Interview Questions from Career Guru</a></li>\n</ul>\n<h3>MongoDB</h3>\n<ul>\n<li><a href=\"http://theprofessionalspoint.blogspot.com.by/2014/01/28-mongodb-nosql-database-interview.html\">28 MongoDB NoSQL Database Interview Questions and Answers</a></li>\n<li><a href=\"http://www.globalguideline.com/interview_questions/Questions.php?sc=MongoDB\">MongoDB frequently Asked Questions by expert members with experience in MongoDB These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts</a></li>\n<li><a href=\"http://www.javatpoint.com/mongodb-interview-questions\">MongoDB Interview Questions from JavaTPointcom</a></li>\n<li><a href=\"http://www.tutorialspoint.com/mongodb/mongodb_interview_questions.htm\">MongoDB Interview Questions that have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of MongoDB</a></li>\n<li><a href=\"http://career.guru99.com/top-20-mongodb-interview-questions/\">Top 20 MongoDB interview questions from Career Guru</a></li>\n</ul>\n<h3>MySQL</h3>\n<ul>\n<li><a href=\"http://www.tecmint.com/10-mysql-database-interview-questions-for-beginners-and-intermediates/\">10 MySQL Database Interview Questions for Beginners and Intermediates</a></li>\n<li><a href=\"http://www.careerride.com/MySQL-Interview-Questions.aspx\">100 MySQL interview questions</a></li>\n<li><a href=\"http://www.tecmint.com/basic-mysql-interview-questions-for-database-administrators/\">15 Basic MySQL Interview Questions for Database Administrators</a></li>\n<li><a href=\"http://www.javatpoint.com/mysql-interview-questions\">28 MySQL interview questions from JavaTPoint.com</a></li>\n<li><a href=\"http://www.testingbrain.com/interview/mysql-interview-questions.html\">40 Basic MySQL Interview Questions with Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-50-mysql-interview-questions-answers/\">Top 50 MySQL Interview Questions &#x26; Answers from Career Guru</a></li>\n</ul>\n<h3>Neo4j</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-20-ne04j-interview-questions/\">Top 20 Neo4j Interview Questions from Career Guru</a></li>\n</ul>\n<h3>Oracle</h3>\n<ul>\n<li><a href=\"http://www.coolinterview.com/type.asp?iType=57\">General Oracle Interview Questions &#x26; Answers</a></li>\n</ul>\n<h3>Postgres</h3>\n<ul>\n<li><a href=\"http://www.dotnetfunda.com/interviews/cat/208/postgresql\">13 PostgreSQL Interview Q&#x26;A</a></li>\n<li><a href=\"http://nazafbtemplate.blogspot.com.by/2014/06/frequently-asked-basic-postgresql.html\">Frequently Asked Basic PostgreSQL Interview Questions and Answers</a></li>\n<li><a href=\"http://www.globalguideline.com/interview_questions/Questions.php?sc=postgresqk_database_\">PostgreSQL Interview Preparation Guide</a></li>\n<li><a href=\"http://www.coolinterview.com/type.asp?iType=411\">PostgreSQL Interview Q&#x26;A from CoolInterview.com</a></li>\n</ul>\n<h3>SQL</h3>\n<ul>\n<li><a href=\"http://java67.blogspot.com.by/2013/04/10-frequently-asked-sql-query-interview-questions-answers-database.html\">10 Frequently asked SQL Query Interview Questions</a></li>\n<li><a href=\"http://www.toptal.com/sql/interview-questions\">45 Essential SQL Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.indiabix.com/technical/sql-server-common-questions/\">Common Interview Questions and Answers</a></li>\n<li><a href=\"http://www.indiabix.com/technical/sql-server-general-questions/\">General Interview Questions and Answers</a></li>\n<li><a href=\"https://github.com/XD-DENG/SQL-exercise\">Schema, Questions &#x26; Solutions for SQL Exercising</a></li>\n<li><a href=\"http://www.tutorialspoint.com/sql/sql_interview_questions.htm\">SQL Interview Questions that have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of SQL</a></li>\n<li><a href=\"https://www.interviewbit.com/sql-interview-questions/\">SQL Interview Questions CHEAT SHEET</a></li>\n</ul>\n<h3>SQLite</h3>\n<ul>\n<li><a href=\"http://career.guru99.com/top-20-sql-lite-interview-questions/\">Top 20 SQLITE  Interview Questions from Career Guru</a></li>\n</ul>\n<h2>Caching technologies</h2>\n<h3>Memcached</h3>\n<ul>\n<li><a href=\"https://www.javatpoint.com/memcached-interview-questions-and-answers\">Memcached Interview Questions from Javapoint</a></li>\n<li><a href=\"https://www.wisdomjobs.com/e-university/memcached-interview-questions.html\">Memcached Interview Questions from Wisdomjobs</a></li>\n</ul>\n<h3>Redis</h3>\n<ul>\n<li><a href=\"https://www.javatpoint.com/redis-interview-questions-and-answers\">Redis Interview Questions from Javapoint</a></li>\n<li><a href=\"https://www.wisdomjobs.com/e-university/redis-interview-questions-answers.html\">Redis Interview Questions from Wisdomjobs</a></li>\n<li><a href=\"https://career.guru99.com/top-10-redis-interview-questions/\">Redis Interview Questions from Career Guru</a></li>\n</ul>\n<h2>OS</h2>\n<h3>Linux</h3>\n<ul>\n<li><a href=\"https://www.linuxfoundation.org/blog/2015/07/10-job-interview-questions-for-linux-system-administrators/\">10 Job Interview Questions for Linux System Administrators from Linux.com</a></li>\n<li><a href=\"http://www.tecmint.com/useful-random-linux-interview-questions-and-answers/\">10 Useful Random Linux Interview Questions and Answers</a></li>\n<li><a href=\"http://www.tecmint.com/basic-linux-interview-questions-and-answers/\">11 Basic Linux Interview Questions and Answers</a></li>\n<li><a href=\"http://www.toptal.com/linux/interview-questions\">11 Essential Linux Interview Questions from Toptal</a></li>\n<li><a href=\"http://www.linuxtechi.com/experience-linux-admin-interview-questions/\">Top 30 Linux System Admin Interview Questions &#x26; Answers</a></li>\n<li><a href=\"http://career.guru99.com/top-50-linux-interview-questions/\">Top 50 Linux Interview Questions from Career Guru</a></li>\n<li><a href=\"https://github.com/trimstray/test-your-sysadmin-skills\">278 Test Questions and Answers for *nix System Administrators</a></li>\n<li><a href=\"https://www.techbeamers.com/essential-linux-questions-answers/\">Linux Interview Questions - Quick Refresher</a></li>\n</ul>\n<h3>Windows</h3>\n<ul>\n<li><a href=\"http://www.brentozar.com/archive/2009/07/top-10-interview-questions-for-windows-sysadmins/\">Top 10 Interview Questions for Windows Administrators</a></li>\n<li><a href=\"http://career.guru99.com/top-22-windows-server-interview-questions/\">Top 22 Windows Server Interview Questions from Career Guru</a></li>\n<li><a href=\"http://www.01world.in/p/windows.html\">Windows Admin Interview Questions &#x26; Answers</a></li>\n</ul>\n<h2>DevOps</h2>\n<ul>\n<li><a href=\"https://github.com/chassing/linux-sysadmin-interview-questions\">Linux System Administrator/DevOps Interview Questions</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/top-devops-interview-questions-2016/\">Top DevOps Interview Questions You Must Prepare In 2021</a></li>\n<li><a href=\"https://intellipaat.com/interview-question/devops-interview-questions/\">Top 60+ DevOps Interview Questions &#x26; Answers in 2021</a></li>\n<li><a href=\"https://www.interviewbit.com/devops-interview-questions/\">DevOps Interview Questions &#x26; Answers</a></li>\n</ul>\n<h2>Algorithms</h2>\n<ul>\n<li><a href=\"https://github.com/rishabh115/Interview-Questions\">Comprehensive list of interview questions of top tech companies</a></li>\n<li><a href=\"http://java2novice.com/java-interview-programs/\">A great list of Java interview questions</a></li>\n<li><a href=\"https://github.com/sagivo/algorithms\">Algorithms playground for common interview questions written in Ruby</a></li>\n<li><a href=\"https://github.com/EvgenyKarkan/EKAlgorithms\">EKAlgorithms contains some well known CS algorithms &#x26; data structures</a></li>\n<li><a href=\"http://www.programcreek.com/2012/11/top-10-algorithms-for-coding-interview/\">Top 10 Algorithms for Coding Interview</a></li>\n<li><a href=\"http://javarevisited.blogspot.com.by/2013/03/top-15-data-structures-algorithm-interview-questions-answers-java-programming.html\">Top 15 Data Structures and Algorithm Interview Questions for Java programmer</a></li>\n<li><a href=\"https://techinterviewhandbook.org/best-practice-questions/\">Tech Interview Handbook Best Practice Questions</a></li>\n<li><a href=\"https://www.techseries.dev/daily\">Daily Coding Interview Practice</a></li>\n</ul>\n<h2>Blockchain</h2>\n<ul>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/blockchain-interview-questions/\">Top 55 Blockchain Interview Questions You Must Prepare In 2018</a></li>\n<li><a href=\"https://mindmajix.com/blockchain-interview-questions\">Blockchain Interview Questions</a></li>\n<li><a href=\"https://intellipaat.com/interview-question/blockchain-interview-questions/\">Top Blockchain Interview Questions</a></li>\n<li><a href=\"https://applicature.com/blog/blockchain-interview-questions\">Blockchain Developer Interview Questions and Answers</a></li>\n<li><a href=\"https://www.toptal.com/blockchain/interview-questions\">10 Essential Blockchain Interview Questions </a></li>\n<li><a href=\"https://data-flair.training/blogs/blockchain-interview-questions/\">Top 30 Blockchain Interview Questions - For Freshers to Experienced</a></li>\n<li><a href=\"https://www.digitalvidya.com/blog/blockchain-interview-questions/\">Most Frequently Asked Blockchain Interview Questions</a></li>\n</ul>\n<h2>Coding exercises</h2>\n<ul>\n<li><a href=\"https://github.com/mre/the-coding-interview\">Common interview questions and puzzles solved in several languages</a></li>\n<li><a href=\"https://github.com/donnemartin/interactive-coding-challenges\">Interactive, test-driven Python coding challenges (algorithms and data structures) typically found in coding interviews or coding competitions</a></li>\n<li><a href=\"https://github.com/roseperrone/interview-questions\">Interview questions solved in python</a></li>\n<li><a href=\"https://www.makeuseof.com/tag/swift-coding-challenges/\">7 Swift Coding Challenges to Practice Your Skills</a></li>\n</ul>\n<h2>Comprehensive lists</h2>\n<ul>\n<li><a href=\"https://github.com/h5bp/Front-end-Developer-Interview-Questions\">A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore</a></li>\n<li><a href=\"http://www.aperfectmix.com/free_web_design/front-end-interview-questions.html\">Front End Developer Interview Questions</a></li>\n<li><a href=\"https://frontendinterviewhandbook.com/\">Front End Interview Handbook</a></li>\n<li><a href=\"https://github.com/starandtina/backend-interview-questions\">Some simple questions to interview potential backend candidates</a></li>\n</ul>\n<h2>Design Patterns</h2>\n<ul>\n<li><a href=\"http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm\">Design Pattern Interview Questions that have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Design Pattern</a></li>\n<li><a href=\"https://github.com/kamranahmedse/design-patterns-for-humans\">Design Patterns for Humans™ - An ultra-simplified explanation</a></li>\n<li><a href=\"https://github.com/iluwatar/java-design-patterns\">Design Patterns implemented in Java</a></li>\n<li><a href=\"https://www.dofactory.com/net/design-patterns\">Design Patterns implemented in DotNet</a></li>\n</ul>\n<h2>Data structures</h2>\n<ul>\n<li><a href=\"http://javarevisited.blogspot.com.by/2013/03/top-15-data-structures-algorithm-interview-questions-answers-java-programming.html\">Top 15 Data Structures and Algorithm Interview Questions for Java programmer</a></li>\n<li><a href=\"http://career.guru99.com/top-50-data-structure-interview-questions/\">Top 50 Data Structure Interview Questions from Career Guru</a></li>\n<li><a href=\"https://www.interviewbit.com/data-structure-interview-questions/\">What is Data Structure? | Top 40 Data Structure Interview Questions</a></li>\n</ul>\n<h2>Networks</h2>\n<ul>\n<li><a href=\"http://career.guru99.com/top-100-networking-interview-questions-answers/\">Top 100 Networking Interview Questions &#x26; Answers from Career Guru</a></li>\n<li><a href=\"https://www.interviewbit.com/networking-interview-questions/\">Networking Interview Questions</a></li>\n</ul>\n<h2>Security</h2>\n<ul>\n<li><a href=\"http://careers.simplicable.com/careers/new/101-IT-security-interview-questions\">101 IT Security Interview Questions</a></li>\n<li><a href=\"http://searchsecurity.techtarget.com/tip/How-to-prepare-for-an-information-security-job-interview\">How to prepare for an information security job interview?</a></li>\n<li><a href=\"https://danielmiessler.com/study/infosec_interview_questions/\">Information Security Interview Questions from Daniel Miessler</a></li>\n<li><a href=\"http://resources.infosecinstitute.com/top-50-information-security-interview-questions/\">Top 50 Information Security Interview Questions for freshers and experts</a></li>\n</ul>\n<h2>Data Science</h2>\n<ul>\n<li><a href=\"https://www.dezyre.com/article/-data-science-interview-questions-for-top-tech-companies/189\">Data Science Interview Questions for Top Tech Companies</a></li>\n<li><a href=\"http://www.datasciencecentral.com/profiles/blogs/66-job-interview-questions-for-data-scientists\">66 Job Interview Questions for Data Scientists</a></li>\n<li><a href=\"https://www.edureka.co/blog/interview-questions/data-science-interview-questions/\">Top 45 Data Science Interview Questions You Must Prepare In 2021</a></li>\n<li><a href=\"https://towardsdatascience.com/top-30-data-science-interview-questions-7dd9a96d3f5c\">Top 30 data science interview questions</a></li>\n<li><a href=\"https://www.datacamp.com/community/news/top-100-data-science-interview-questions-cc3lts7gj5j\">Top 100 Data science interview questions</a></li>\n<li><a href=\"https://hackr.io/blog/data-science-interview-questions\">Data Science Interview Questions</a></li>\n<li><a href=\"https://hackernoon.com/160-data-science-interview-questions-415s3y2a\">160+ Data Science Interview Questions</a></li>\n<li><a href=\"https://www.interviewbit.com/data-science-interview-questions/\">Top Data Science Interview Questions</a> </li>\n</ul>"},{"url":"/docs/javascript/for-loops/","relativePath":"docs/javascript/for-loops.md","relativeDir":"docs/javascript","base":"for-loops.md","name":"for-loops","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>Etiam facilisis lacus nec pretium lobortis. Praesent dapibus justo non efficitur efficitur. Nullam viverra justo arcu, eget egestas tortor pretium id. Sed imperdiet mattis eleifend. Vivamus suscipit et neque imperdiet venenatis.</p>\n<blockquote>\n<p>Vestibulum ullamcorper risus auctor eleifend consequat.</p>\n</blockquote>\n<p><img src=\"https://assets.stackbit.com/components/images/default/post-4.jpeg\" alt=\"Placeholder Image\"></p>\n<p>In malesuada sed urna eget vehicula. Donec fermentum tortor sit amet nisl elementum fringilla. Pellentesque dapibus suscipit faucibus. Nullam malesuada sed urna quis rutrum. Donec facilisis lorem id maximus mattis. Vestibulum quis elit magna. Vestibulum accumsan blandit consequat. Phasellus quis posuere quam.</p>\n<p>Vivamus mollis in tellus ac ullamcorper. Vestibulum sit amet bibendum ipsum, vitae rutrum ex. Nullam cursus, urna et dapibus aliquam, urna leo euismod metus, eu luctus justo mi eget mauris. Proin felis leo, volutpat et purus in, lacinia luctus eros. Pellentesque lobortis massa scelerisque lorem ullamcorper, sit amet elementum nulla scelerisque. In volutpat efficitur nulla, aliquam ornare lectus ultricies ac. Mauris sagittis ornare dictum. Nulla vel felis ut purus fermentum pretium. Sed id lectus ac diam aliquet venenatis. Etiam ac auctor enim. Nunc velit mauris, viverra vel orci ut, egestas rhoncus diam. Morbi scelerisque nibh tellus, vel varius urna malesuada sed. Etiam ultricies sem consequat, posuere urna non, maximus ex. Mauris gravida diam sed augue condimentum pulvinar vel ac dui. Integer vel convallis justo.</p>"},{"url":"/docs/javascript/cs-basics-in-js/","relativePath":"docs/javascript/cs-basics-in-js.md","relativeDir":"docs/javascript","base":"cs-basics-in-js.md","name":"cs-basics-in-js","frontmatter":{"title":"CS Basics","weight":0,"excerpt":"Computer Science Basics In JavaScript","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h3>Anonymous Closures</h3>\n<p>This is the fundamental construct that makes it all possible, and really is the single <strong>best feature of JavaScript</strong>. We’ll simply create an anonymous function, and execute it immediately. All of the code that runs inside the function lives in a <strong>closure</strong>, which provides <strong>privacy</strong> and <strong>state</strong> throughout the lifetime of our application.</p>\n<pre><code class=\"language-js\">(function () {\n    // ... all vars and functions are in this scope only\n    // still maintains access to all globals\n})();\n</code></pre>\n<p>Notice the <code>()</code> around the anonymous function. This is required by the language, since statements that begin with the token <code>function</code> are always considered to be <strong>function declarations</strong>. Including <code>()</code> creates a <strong>function expression</strong> instead.</p>\n<h3>Global Import</h3>\n<p>JavaScript has a feature known as <strong>implied globals</strong>. Whenever a name is used, the interpreter walks the scope chain backwards looking for a <code>var</code> statement for that name. If none is found, that variable is assumed to be global. If it’s used in an assignment, the global is created if it doesn’t already exist. This means that using or creating global variables in an anonymous closure is easy. Unfortunately, this leads to hard-to-manage code, as it’s not obvious (to humans) which variables are global in a given file.</p>\n<h6>Luckily, our anonymous function provides an easy alternative. By passing globals as parameters to our anonymous function, we <strong>import</strong> them into our code, which is both <strong>clearer</strong> and <strong>faster</strong> than implied globals. Here’s an example:</h6>\n<pre><code>(function ($, YAHOO) {\n// now have access to globals jQuery (as $) and YAHOO in this code\n}(jQuery, YAHOO));\n</code></pre>\n<h3>Module Export</h3>\n<p>Sometimes you don’t just want to <em>use</em> globals, but you want to <em>declare</em> them. We can easily do this by exporting them, using the anonymous function’s <strong>return value</strong>. Doing so will complete the basic module pattern, so here’s a complete example:</p>\n<pre><code class=\"language-js\">let MODULE = (function () {\n    let my = {},\n        privateVariable = 1;\n\n    function privateMethod() {\n        // ...\n    }\n\n    my.moduleProperty = 1;\n    my.moduleMethod = function () {\n        // ...\n    };\n\n    return my;\n})();\n</code></pre>\n<p>Notice that we’ve declared a global module named <code>MODULE</code>, with two public properties: a method named <code>MODULE.moduleMethod</code> and a variable named <code>MODULE.moduleProperty</code>. In addition, it maintains <strong>private internal state</strong> using the closure of the anonymous function. Also, we can easily import needed globals, using the pattern we learned above.</p>\n<h6>## Advanced Patterns</h6>\n<p>While the above is enough for many uses, we can take this pattern farther and create some very powerful, extensible constructs. Lets work through them one-by-one, continuing with our module named <code>MODULE</code>.</p>\n<h3>Augmentation</h3>\n<p>One limitation of the module pattern so far is that the entire module must be in one file. Anyone who has worked in a large code-base understands the value of splitting among multiple files. Luckily, we have a nice solution to <strong>augment modules</strong>. First, we import the module, then we add properties, then we export it. Here’s an example, augmenting our <code>MODULE</code> from above:</p>\n<pre><code class=\"language-js\">let MODULE = (function (my) {\n    my.anotherMethod = function () {\n        // added method...\n    };\n\n    return my;\n})(MODULE);\n</code></pre>\n<p>We use the <code>var</code> keyword again for consistency, even though it’s not necessary. After this code has run, our module will have gained a new public method named <code>MODULE.anotherMethod</code>. This augmentation file will also maintain its own private internal state and imports.</p>\n<h3>Loose Augmentation</h3>\n<p>While our example above requires our initial module creation to be first, and the augmentation to happen second, that isn’t always necessary. One of the best things a JavaScript application can do for performance is to load scripts asynchronously. We can create flexible multi-part modules that can load themselves in any order with <strong>loose augmentation</strong>. Each file should have the following structure:</p>\n<pre><code>let MODULE = (function (my) {\n// add capabilities...\n\n###### return my;\n}(MODULE || {}));\n</code></pre>\n<p>In this pattern, the <code>var</code> statement is always necessary. Note that the import will create the module if it does not already exist. This means you can use a tool like <a href=\"http://labjs.com/\">LABjs</a> and load all of your module files in parallel, without needing to block.</p>\n<h3>Tight Augmentation</h3>\n<p>While loose augmentation is great, it does place some limitations on your module. Most importantly, you cannot override module properties safely. You also cannot use module properties from other files during initialization (but you can at run-time after intialization). <strong>Tight augmentation</strong> implies a set loading order, but allows <strong>overrides</strong>. Here is a simple example (augmenting our original <code>MODULE</code>):</p>\n<pre><code class=\"language-js\">let MODULE = (function (my) {\n    let old_moduleMethod = my.moduleMethod;\n\n    my.moduleMethod = function () {\n        // method override, has access to old through old_moduleMethod...\n    };\n\n    return my;\n})(MODULE);\n</code></pre>\n<p>Here we’ve overridden <code>MODULE.moduleMethod</code>, but maintain a reference to the original method, if needed.</p>\n<h3>Cloning and Inheritance</h3>\n<pre><code class=\"language-js\">let MODULE_TWO = (function (old) {\n    let my = {},\n        key;\n\n    for (key in old) {\n        if (old.hasOwnProperty(key)) {\n            my[key] = old[key];\n        }\n    }\n\n    let super_moduleMethod = old.moduleMethod;\n    my.moduleMethod = function () {\n        // override method on the clone, access to super through super_moduleMethod\n    };\n\n    return my;\n})(MODULE);\n</code></pre>\n<p>This pattern is perhaps the <strong>least flexible</strong> option. It does allow some neat compositions, but that comes at the expense of flexibility. As I’ve written it, properties which are objects or functions will <em>not</em> be duplicated, they will exist as one object with two references. Changing one will change the other. This could be fixed for objects with a recursive cloning process, but probably cannot be fixed for functions, except perhaps with <code>eval</code>. Nevertheless, I’ve included it for completeness.</p>\n<h3>Cross-File Private State</h3>\n<p>One severe limitation of splitting a module across multiple files is that each file maintains its own private state, and does not get access to the private state of the other files. This can be fixed. Here is an example of a loosely augmented module that will <strong>maintain private state</strong> across all augmentations:</p>\n<pre><code class=\"language-js\">let MODULE = (function (my) {\n    let _private = (my._private = my._private || {}),\n        _seal = (my._seal =\n            my._seal ||\n            function () {\n                delete my._private;\n                delete my._seal;\n                delete my._unseal;\n            }),\n        _unseal = (my._unseal =\n            my._unseal ||\n            function () {\n                my._private = _private;\n                my._seal = _seal;\n                my._unseal = _unseal;\n            });\n\n    // permanent access to _private, _seal, and _unseal\n\n    return my;\n})(MODULE || {});\n</code></pre>\n<p>Any file can set properties on their local variable <code>_private</code>, and it will be immediately available to the others. Once this module has loaded completely, the application should call <code>MODULE._seal()</code>, which will prevent external access to the internal <code>_private</code>. If this module were to be augmented again, further in the application’s lifetime, one of the internal methods, in any file, can call <code>_unseal()</code> before loading the new file, and call <code>_seal()</code> again after it has been executed. This pattern occurred to me today while I was at work, I have not seen this elsewhere. I think this is a very useful pattern, and would have been worth writing about all on its own.</p>\n<h3>Sub-modules</h3>\n<p>Our final advanced pattern is actually the simplest. There are many good cases for creating sub-modules. It is just like creating regular modules:</p>\n<pre><code class=\"language-js\">MODULE.sub = (function () {\n    let my = {};\n    // ...\n\n######     return my;\n})();\n</code></pre>\n<p>While this may have been obvious, I thought it worth including. Sub-modules have all the advanced capabilities of normal modules, including augmentation and private state.</p>\n<h6>## Conclusions</h6>\n<p>Most of the advanced patterns can be combined with each other to create more useful patterns. If I had to advocate a route to take in designing a complex application, I’d combine <strong>loose augmentation</strong>, <strong>private state</strong>, and <strong>sub-modules</strong>.</p>\n<h6>I haven’t touched on performance here at all, but I’d like to put in one quick note: The module pattern is <strong>good for performance</strong>. It minifies really well, which makes downloading the code faster. Using <strong>loose augmentation</strong> allows easy non-blocking parallel downloads, which also speeds up download speeds. Initialization time is probably a bit slower than other methods, but worth the trade-off. Run-time performance should suffer no penalties so long as globals are imported correctly, and will probably gain speed in sub-modules by shortening the reference chain with local variables.</h6>\n<h6>To close, here’s an example of a sub-module that loads itself dynamically to its parent (creating it if it does not exist). I’ve left out private state for brevity, but including it would be simple. This code pattern allows an entire complex heirarchical code-base to be loaded completely in parallel with itself, sub-modules and all.</h6>\n<pre><code class=\"language-js\">let UTIL = (function (parent, $) {\n    let my = (parent.ajax = parent.ajax || {});\n\n    my.get = function (url, params, callback) {\n        // ok, so I'm cheating a bit :)\n        return $.getJSON(url, params, callback);\n    };\n\n    // etc...\n\n######     return parent;\n})(UTIL || {}, jQuery);\n</code></pre>\n<h1>Summary:</h1>\n<details>\n<summary> recitation  </summary>   \n<h3>Anonymous Closures</h3>\n<pre><code class=\"language-javascript\">(function () {\n    // ... all vars and functions are in this scope only\n    // still maintains access to all globals\n})();\n</code></pre>\n<h3>Global Import</h3>\n<pre><code class=\"language-javascript\">(function ($, YAHOO) {\n    // now have access to globals jQuery (as $) and YAHOO in this code\n})(jQuery, YAHOO);\n</code></pre>\n<h3>Module Export</h3>\n<pre><code class=\"language-javascript\">let MODULE = (function () {\n    let my = {},\n        privateVariable = 1;\n\n    function privateMethod() {\n        // ...\n    }\n\n    my.moduleProperty = 1;\n    my.moduleMethod = function () {\n        // ...\n    };\n\n    return my;\n})();\n</code></pre>\n<h1>Advanced Patterns</h1>\n<h3>Augmentation</h3>\n<pre><code class=\"language-javascript\">let MODULE = (function (my) {\n    my.anotherMethod = function () {\n        // added method...\n    };\n\n    return my;\n})(MODULE);\n</code></pre>\n<h3>Loose Augmentation</h3>\n<p>In this pattern, the let statement is always necessary. Note that the import will create the module if it does not already exist. This means you can use a tool like LABjs and load all of your module files in parallel, without needing to block.</p>\n<h6>`<code></code>javascript</h6>\n<p>let MODULE = (function (my) {\n// add capabilities...</p>\n<h6>return my;</h6>\n<p>})(MODULE || {});</p>\n<pre><code>### Tight Augmentation\n\nHere we’ve overridden MODULE.moduleMethod, but maintain a reference to the original method, if needed.\n\n###### ```javascript\nlet MODULE = (function (my) {\n    let old_moduleMethod = my.moduleMethod;\n\n    my.moduleMethod = function () {\n        // method override, has access to old through old_moduleMethod...\n    };\n\n    return my;\n})(MODULE);\n</code></pre>\n<h3>Cloning and Inheritance</h3>\n<pre><code class=\"language-javascript\">let MODULE_TWO = (function (old) {\n    let my = {},\n        key;\n\n    for (key in old) {\n        if (old.hasOwnProperty(key)) {\n            my[key] = old[key];\n        }\n    }\n\n    let super_moduleMethod = old.moduleMethod;\n    my.moduleMethod = function () {\n        // override method on the clone, access to super through super_moduleMethod\n    };\n\n    return my;\n})(MODULE);\n</code></pre>\n<h3>Cross-File Private State</h3>\n<pre><code class=\"language-javascript\">let MODULE = (function (my) {\n    let _private = (my._private = my._private || {}),\n        _seal = (my._seal =\n            my._seal ||\n            function () {\n                delete my._private;\n                delete my._seal;\n                delete my._unseal;\n            }),\n        _unseal = (my._unseal =\n            my._unseal ||\n            function () {\n                my._private = _private;\n                my._seal = _seal;\n                my._unseal = _unseal;\n            });\n\n    // permanent access to _private, _seal, and _unseal\n\n    return my;\n})(MODULE || {});\n</code></pre>\n<h3>Sub-modules</h3>\n<pre><code class=\"language-javascript\">MODULE.sub = (function () {\n    let my = {};\n    // ...\n\n######     return my;\n})();\n</code></pre>\n</details>"},{"url":"/docs/javascript/constructor-functions/","relativePath":"docs/javascript/constructor-functions.md","relativeDir":"docs/javascript","base":"constructor-functions.md","name":"constructor-functions","frontmatter":{"title":"Constructor Functions","weight":0,"excerpt":"Constructor Functions","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><strong>Constructor Functions</strong></h2>\n<p><strong>Defining a constructor function</strong>\n<em>Example of an object using object initialiation</em></p>\n<pre><code class=\"language-js\">const fellowshipOfTheRing = {\n    title: 'The Fellowship of the Ring',\n    series: 'The Lord of the Rings',\n    author: 'J.R.R. Tolkien'\n};\n</code></pre>\n<ul>\n<li>The above literal is a \"Book\" object type.</li>\n<li>\n<p><strong><code>Object Type</code></strong> is defined by it's attributes and behaviors.</p>\n<ul>\n<li><strong><code>Behaviors</code></strong> are represented by methods.</li>\n</ul>\n</li>\n<li>\n<p><strong><code>Constructor Functions</code></strong> : Handle the creation of an object - it's a factory for creating objects of a specific type.</p>\n<ul>\n<li>\n<p>There are a few specific things to constructors worth noting:</p>\n<ul>\n<li><strong>The name of the constructor function is capitalized</strong></li>\n<li><strong>The Function does not explicityly return a value</strong></li>\n<li><strong>Within the body, the <em>this</em> keyword references the newly created object</strong></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-js\">function Book(title, series, author) {\n    this.title = title;\n    this.series = series;\n    this.author = author;\n}\n</code></pre>\n<h2><strong>Invoking a constructor function</strong></h2>\n<ul>\n<li>We can invoke a constructor function using the <strong><code>new</code></strong> keyword.</li>\n</ul>\n<pre><code class=\"language-js\">function Book(title, series, author) {\n    this.title = title;\n    this.series = series;\n    this.author = author;\n}\n\nconst fellowshipOfTheRing = new Book('The Fellowship of the Ring', 'The Lord of the Rings', 'J.R.R. Tolkien');\n\nconsole.log(fellowshipOfTheRing); // Book { title: 'The Fellowship of the Ring', ... }\n</code></pre>\n<ul>\n<li>\n<p><em>Four Things will happen when invoking a constructor function</em></p>\n<ol>\n<li>A new empty object is created {};</li>\n<li>The new obj's <strong><code>prototype</code></strong> is set to the object referenced by the constructors prototype property.</li>\n<li><strong><code>This</code></strong> is bound to the new object.</li>\n<li>The new object is returned after the constructor function has completed.</li>\n</ol>\n</li>\n</ul>\n<p><strong>Understanding New Object Instances</strong></p>\n<ul>\n<li><strong><code>Instance</code></strong> : term to describe an objected created from a constructor function.</li>\n<li>Every instance created is a unique object and therefore not equal to each other.</li>\n</ul>\n<p><strong>Using the instanceof operator to check an object's type</strong></p>\n<pre><code class=\"language-js\">console.log(fellowshipOfTheRing instanceof Book); // true\n</code></pre>\n<ul>\n<li>\n<p>By using the <code>instanceof</code> operator we can verify that an object was created from a certain object type.</p>\n<ul>\n<li><em>The instanceOf operator works by checking to see if the prototype object of the left side of the operator is the same as the prototype object of the right side of the operator.</em></li>\n</ul>\n</li>\n</ul>\n<p><strong>Invoking a constructor function without the new keyword</strong></p>\n<ul>\n<li>\n<p>If we invoke a constructor function without the <strong><code>new</code></strong> keyword, we may result in one of two unexpected outcomes:</p>\n<ol>\n<li>In <strong>non-strict</strong> mode, this will be bound to the <strong>global object</strong> instead.</li>\n<li>\n<p>In <strong><code>strict</code></strong> mode, this will become undefined.</p>\n<ul>\n<li>You can enable strict mode by typing <code>\"use strict\"</code> at the top of your file.</li>\n</ul>\n</li>\n</ol>\n</li>\n</ul>\n<p><strong>Defining Sharable Methods</strong></p>\n<ul>\n<li><em>Avoid the temptation to store an object method inside a constructor function, it is inefficient with computer memory usage b/c each object instance would have it's own method definition.</em></li>\n<li>\n<p><strong><code>Prototype</code></strong> : An object that is delegated to when a reference to an object property or method can't be resolved.</p>\n<ul>\n<li>Every instance created by a constructor function shares the same prototype.</li>\n</ul>\n</li>\n<li>\n<p><strong><code>Object.setPrototypeOf()</code></strong> and <strong><code>Object.getPrototypeOf()</code></strong> are just used to set a prototype of one object to another object; and also the verify a prototype.</p>\n<ul>\n<li><strong><code>proto</code></strong> : aka \"dunder proto\" is a property used to gain easy access to an object's prototype - it is widely supported by browsers but is considered deprecated.</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-js\">function Book(title, series, author) {\n    this.title = title;\n    this.series = series;\n    this.author = author;\n}\n\n// Any method defined on the `Book.prototype` property\n// will be shared across all `Book` instances.\nBook.prototype.getInformation = function () {\n    return `${this.title} by ${this.author}`;\n};\n\nconst fellowshipOfTheRing = new Book('The Fellowship of the Ring', 'The Lord of the Rings', 'J.R.R. Tolkien');\n\nconsole.log(fellowshipOfTheRing.getInformation());\n</code></pre>\n<ul>\n<li>Every method we define on a constructor function's prototype property will be shared across all instances of that object type.</li>\n</ul>\n<p><strong>The Problem with Arrow Functions</strong></p>\n<ul>\n<li>\n<p>We <strong>cannot</strong> use arrow functions when defining methods on a constructor function's prototype property.</p>\n<ul>\n<li>Arrow functions don't include their own <strong>this</strong> binding; therefore it will not reference the current instance - always stick with the function () keyword.</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2><strong>Putting the Class in Javascript Classes</strong></h2>\n<p>In ES2015, JS gained the <strong><code>class</code></strong> keyword - replacing the need to use only constructor functions &#x26; prototypes to mimic classes!</p>\n<ul>\n<li><strong><code>class</code></strong> : keyword that gives developers a formal way to create a class definition to specify an object type's attributes and behavior; also used to create objects of that specific type.</li>\n</ul>\n<p><strong>Defining a ES2015 class</strong></p>\n<pre><code class=\"language-js\">class Book {\n    constructor(title, series, author) {\n        this.title = title;\n        this.series = series;\n        this.author = author;\n    }\n}\n</code></pre>\n<ul>\n<li>Class names also begin only with capital letters.</li>\n<li>\n<p>Although not required, class definitions can include a <strong><code>class constructor function</code></strong> - these are similar to regular constructors in that:</p>\n<ul>\n<li>They don't explicitly return a value.</li>\n<li>The <strong>this</strong> keyword references the newly created object instance.</li>\n</ul>\n</li>\n</ul>\n<p><strong>Instantiating an instance of a class</strong></p>\n<ul>\n<li>\n<p>We can also use the <strong><code>new</code></strong>.</p>\n<ul>\n<li>Four things occur when instantiating an instance of a class:</li>\n<li>New empty object is created {};</li>\n<li>The new obj's prototype is set to the class prototype's property value.</li>\n<li><strong><code>This</code></strong> is bound to the new object.</li>\n<li>After the constructor method has completed, the new obj is returned.</li>\n</ul>\n</li>\n<li>Don't try to instatiate a class object without the <strong>new</strong> keyword.</li>\n</ul>\n<p><strong>Class Definitions are NOT hoisted</strong></p>\n<pre><code class=\"language-js\">test();\n\nfunction test() {\n    console.log('This works!');\n}\n</code></pre>\n<ul>\n<li>In JS you can call a function before it's declared - this is known as <strong><code>hoisting</code></strong>.</li>\n<li>Class defs are NOT hoisted, so just get in the habit of declaring them <strong>before</strong> you use them.</li>\n</ul>\n<p><strong>Defining Methods</strong></p>\n<ul>\n<li>A class can contain two types of methods:</li>\n<li>\n<p><strong><code>Instance Method</code></strong> : Methods that are invoked on an instance of the class - useful for performing an action on a specific instance.</p>\n<ul>\n<li>Instance methods are also sometimes referred to as <strong><code>prototype</code></strong> methods because they are defined on a shared prototype object.</li>\n</ul>\n</li>\n<li>\n<p><strong><code>Static Method</code></strong> : Methods that invoked directly on a class, not on an instance.</p>\n<ul>\n<li><code>Important</code>: Invoking a static method on an instance will result in a runtime error.</li>\n<li>Prepending the <strong><code>static</code></strong> keyword at the beginning on the method name will make it static.</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-js\">class Book {\n    constructor(title, series, author) {\n        this.title = title;\n        this.series = series;\n        this.author = author;\n    }\n\n    // Notice the use of a rest parameter (...books)\n    // to capture the passed parameters as an array of values.\n    static getTitles(...books) {\n        return books.map((book) => book.title);\n    }\n\n    getInformation() {\n        return `${this.title} by ${this.author}`;\n    }\n}\n\nconst fellowshipOfTheRing = new Book('The Fellowship of the Ring', 'The Lord of the Rings', 'J.R.R. Tolkien');\n\nconst theTwoTowers = new Book('The Two Towers', 'The Lord of the Rings', 'J.R.R. Tolkien');\n\nconst bookTitles = Book.getTitles(fellowshipOfTheRing, theTwoTowers);\n\nconsole.log(bookTitles.join(', ')); // The Fellowship of the Ring, The Two Towers\n</code></pre>\n<ul>\n<li>If we go back to an example of how constructor functions also use static methods - we see that static methods are <em>defined directly on the constructor function</em> - whereas instance methods need to be defined on the <em>prototype</em> object.</li>\n</ul>\n<pre><code class=\"language-js\">function Book(title, series, author) {\n    this.title = title;\n    this.series = series;\n    this.author = author;\n}\n\n// Static methods are defined\n// directly on the constructor function.\nBook.getTitles = function (...books) {\n    return books.map((book) => book.title);\n};\n\n// Instance methods are defined\n// on the constructor function's `prototype` property.\nBook.prototype.getInformation = function () {\n    return `${this.title} by ${this.author}`;\n};\n\nconst fellowshipOfTheRing = new Book('The Fellowship of the Ring', 'The Lord of the Rings', 'J.R.R. Tolkien');\n\nconst theTwoTowers = new Book('The Two Towers', 'The Lord of the Rings', 'J.R.R. Tolkien');\n\nconsole.log(fellowshipOfTheRing.getInformation()); // The Fellowship of the Ring by J.R.R. Tolkien\n\nconsole.log(theTwoTowers.getInformation()); // The Two Towers by J.R.R. Tolkien\n\n// Call the static `Book.getTitles()` method\n// to get an array of the book titles.\nconst bookTitles = Book.getTitles(fellowshipOfTheRing, theTwoTowers);\n\nconsole.log(bookTitles.join(', ')); // The Fellowship of the Ring, The Two Towers\n</code></pre>\n<p><strong>Comparing Classes to Constructor Functions</strong></p>\n<blockquote>\n<p>ES2015 Classes are essentially syntactic sugar over traditional constructor functions and prototypes.</p>\n</blockquote>\n<hr>\n<h2><strong>Javascript Inheritance</strong></h2>\n<ul>\n<li><strong><code>Child Class</code></strong> : Class that is based upon another class and inherits properties and methods from that other class.</li>\n<li><strong><code>Parent Class</code></strong> : Class that is being inherited downwards.</li>\n<li><strong><code>Inheritance</code></strong> : The process of basing a class upon another class.</li>\n</ul>\n<pre><code class=\"language-js\">class CatalogItem {\n    constructor(title, series) {\n        this.title = title;\n        this.series = series;\n    }\n\n    getInformation() {\n        if (this.series) {\n            return `${this.title} (${this.series})`;\n        } else {\n            return this.title;\n        }\n    }\n}\n\nclass Book extends CatalogItem {\n    constructor(title, series, author) {\n        super(title, series);\n        this.author = author;\n    }\n}\n\nclass Movie extends CatalogItem {\n    constructor(title, series, director) {\n        super(title, series);\n        this.director = director;\n    }\n}\n\nconst theGrapesOfWrath = new Book('The Grapes of Wrath', null, 'John Steinbeck');\nconst aNewHope = new Movie('Episode 4: A New Hope', 'Star Wars', 'George Lucas');\n\nconsole.log(theGrapesOfWrath.getInformation()); // The Grapes of Wrath\nconsole.log(aNewHope.getInformation()); // Episode 4: A New Hope (Star Wars)\nconsole.log(Catalogitem instanceof Function); // true\nconsole.log(Book instanceof Function); // true\n</code></pre>\n<ul>\n<li>\n<p>A <strong><code>prototype chain</code></strong> defines a series of prototype objects that are delegated to one by one, when a property or method can't be found on an instance object.</p>\n<pre><code class=\"language-js\">console.log(theGrapesOfWrath.getInformation()); // The Grapes of Wrath\n</code></pre>\n<p>When the <code>getInformation()</code> method is invoked:</p>\n<ul>\n<li>JS looks for get() on the current object.</li>\n<li>If it isn't found, the method call is delegated to the object's prototype.</li>\n<li>It continues up the prototype chain until the method is found.</li>\n</ul>\n</li>\n</ul>\n<p><strong>Overriding a method in a parent class</strong></p>\n<ul>\n<li><strong><code>Method Overriding</code></strong> : when a child class provides an implementation of a method that's already defined in a parent class.</li>\n</ul>\n<pre><code class=\"language-js\">class Movie extends CatalogItem {\n    constructor(title, series, director) {\n        super(title, series);\n        this.director = director;\n    }\n\n    getInformation() {\n        let result = super.getInformation();\n\n        if (this.director) {\n            result += ` [directed by ${this.director}]`;\n        }\n\n        return result;\n    }\n}\n</code></pre>\n<ul>\n<li>We can simply declare our own method of the same name in our child class to override our parent's version of <code>getInformation()</code></li>\n</ul>\n<hr>\n<h2><strong>Javascript Modules</strong></h2>\n<p><strong>Introducing Node.js modules</strong></p>\n<ul>\n<li>In Node.js, each JS file in a project defines a <strong><code>module</code></strong>.</li>\n<li>Module's contents are private by default.</li>\n<li><strong><code>Local Modules</code></strong> : Modules defined within your project.</li>\n<li><strong><code>Core Modules</code></strong> : Native modules contained within Node.js that you can use to perform tasks or to add functionality to your application.</li>\n<li><strong><code>CommonJS</code></strong> : A legacy module system.</li>\n<li><strong><code>ES Modules</code></strong> : Newer module sysem that will eventually replace CommonJS.</li>\n<li><strong><code>Entry Point</code></strong> : JS File that is passed to Node for access to the entire application.</li>\n<li>\n<p>Syntax for exporting modules:</p>\n<pre><code class=\"language-js\">module.exports.Book = Book;\nmodule.exports.Movie = Movie;\n</code></pre>\n<pre><code class=\"language-js\">module.exports = {\n    Book,\n    Movie\n};\n</code></pre>\n</li>\n<li>\n<p>Syntax for importing modules:</p>\n<pre><code class=\"language-js\">const classes = require('./classes');\n</code></pre>\n<pre><code class=\"language-js\">const { Book, Movie } = require('./classes');\n</code></pre>\n<p><strong>Using Single Item Modules</strong></p>\n<blockquote>\n<p>Following the convention of a single exported item per module helps to keep modules focused and less likely to become bloted with too much code.</p>\n</blockquote>\n<p><strong>Understanding Module Loading</strong></p>\n<ul>\n<li>\n<p>When loading a module, Node will examine the identifier passed to the require() function to determine if our module is local, core, or third-party:</p>\n<ul>\n<li><strong><code>Local Module</code></strong>: identifier starts with ./ ../ or /</li>\n<li><strong><code>Node.js Core</code></strong>: identifier matches name</li>\n<li><strong><code>Third-Party</code></strong>: identifier matches a module in the node modules folder (installed package)</li>\n</ul>\n</li>\n</ul>\n<hr>\n</li>\n</ul>"},{"url":"/docs/javascript/review/","relativePath":"docs/javascript/review.md","relativeDir":"docs/javascript","base":"review.md","name":"review","frontmatter":{"title":"Javascript Concepts Review","weight":0,"excerpt":"Javascript Concepts Review","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Core Concept Review</h2>\n<h1>Core Concepts</h1>\n<h1>index</h1>\n<p>This appendix is a non-exhaustive list of new syntactic features and methods that were added to JavaScript in ES6. These features are the most commonly used and most helpful.</p>\n<p>While this appendix doesn't cover ES6 classes, we go over the basics while learning about components in the book. In addition, this appendix doesn't include descriptions of some larger new features like promises and generators. If you'd like more info on those or on any topic below, we encourage you to reference the <a href=\"https://developer.mozilla.org/\">Mozilla Developer Network's website</a> (MDN).</p>\n<h2>Prefer <code>const</code> and <code>let</code> over <code>var</code></h2>\n<p>If you've worked with ES5 JavaScript before, you're likely used to seeing variables declared with <code>var</code>:</p>\n<pre><code class=\"language-js\">ar myVariable = 5;\n</code></pre>\n<p>Both the <code>const</code> and <code>let</code> statements also declare variables. They were introduced in ES6.</p>\n<p>Use <code>const</code> in cases where a variable is never re-assigned. Using <code>const</code> makes this clear to whoever is reading your code. It refers to the \"constant\" state of the variable in the context it is defined within.</p>\n<p>If the variable will be re-assigned, use <code>let</code>.</p>\n<p>We encourage the use of <code>const</code> and <code>let</code> instead of <code>var</code>. In addition to the restriction introduced by <code>const</code>, both <code>const</code> and <code>let</code> are <em>block scoped</em> as opposed to <em>function scoped</em>. This scoping can help avoid unexpected bugs.</p>\n<h2>Arrow functions</h2>\n<p>There are three ways to write arrow function bodies. For the examples below, let's say we have an array of city objects:</p>\n<pre><code class=\"language-js\">onst cities = [\n  { name: 'Cairo', pop: 7764700 },\n  { name: 'Lagos', pop: 8029200 },\n];\n</code></pre>\n<p>If we write an arrow function that spans multiple lines, we must use braces to delimit the function body like this:</p>\n<pre><code class=\"language-js\">const formattedPopulations = cities.map((city) => {\n    const popMM = (city.pop / 1000000).toFixed(2);\n    return popMM + ' million';\n});\nconsole.log(formattedPopulations);\n</code></pre>\n<p>Note that we must also explicitly specify a <code>return</code> for the function.</p>\n<p>However, if we write a function body that is only a single line (or single expression) we can use parentheses to delimit it:</p>\n<pre><code class=\"language-js\">const formattedPopulations2 = cities.map((city) => (city.pop / 1000000).toFixed(2) + ' million');\n</code></pre>\n<p>Notably, we don't use <code>return</code> as it's implied.</p>\n<p>Furthermore, if your function body is terse you can write it like so:</p>\n<pre><code class=\"language-js\">const pops = cities.map((city) => city.pop);\nconsole.log(pops);\n</code></pre>\n<p>The terseness of arrow functions is one of two reasons that we use them. Compare the one-liner above to this:</p>\n<pre><code class=\"language-js\">const popsNoArrow = cities.map(function (city) {\n    return city.pop;\n});\n</code></pre>\n<p>Of greater benefit, though, is how arrow functions bind the <code>this</code> object.</p>\n<p>The traditional JavaScript function declaration syntax (<code>function () {}</code>) will bind <code>this</code> in anonymous functions to the global object. To illustrate the confusion this causes, consider the following example:</p>\n<pre><code class=\"language-js\">unction printSong() {\n  console.log(\"Oops - The Global Object\");\n}\n\nconst jukebox = {\n  songs: [\n    {\n      title: \"Wanna Be Startin' Somethin'\",\n      artist: \"Michael Jackson\",\n    },\n    {\n      title: \"Superstar\",\n      artist: \"Madonna\",\n    },\n  ],\n  printSong: function (song) {\n    console.log(song.title + \" - \" + song.artist);\n  },\n  printSongs: function () {\n\n    this.songs.forEach(function(song) {\n\n      this.printSong(song);\n    });\n  },\n}\n\njukebox.printSongs();\n</code></pre>\n<p>The method <code>printSongs()</code> iterates over <code>this.songs</code> with <code>forEach()</code>. In this context, <code>this</code> is bound to the object (<code>jukebox</code>) as expected. However, the anonymous function passed to <code>forEach()</code> binds its internal <code>this</code> to the global object. As such, <code>this.printSong(song)</code> calls the function declared at the top of the example, <em>not</em> the method on <code>jukebox</code>.</p>\n<p>JavaScript developers have traditionally used workarounds for this behavior, but arrow functions solve the problem by <strong>capturing the <code>this</code> value of the enclosing context</strong>. Using an arrow function for <code>printSongs()</code> has the expected result:</p>\n<pre><code class=\"language-js\">  printSongs: function () {\n    this.songs.forEach((song) => {\n\n      this.printSong(song);\n    });\n  },\n}\n\njukebox.printSongs();\n</code></pre>\n<p>For this reason, throughout the book we use arrow functions for all anonymous functions.</p>\n<h2>Modules</h2>\n<p>ES6 formally supports modules using the <code>import</code>/<code>export</code> syntax.</p>\n<p><strong>Named exports</strong></p>\n<p>Inside any file, you can use <code>export</code> to specify a variable the module should expose. Here's an example of a file that exports two functions:</p>\n<pre><code class=\"language-js\">export const sayHi = () => console.log('Hi!');\nexport const sayBye = () => console.log('Bye!');\n\nconst saySomething = () => console.log('Something!');\n</code></pre>\n<p>Now, anywhere we wanted to use these functions we could use <code>import</code>. We need to specify which functions we want to import. A common way of doing this is using ES6's destructuring assignment syntax to list them out like this:</p>\n<pre><code class=\"language-js\">import { sayHi, sayBye } from './greetings';\n\nsayHi();\nsayBye();\n</code></pre>\n<p>Importantly, the function that was <em>not</em> exported (<code>saySomething</code>) is unavailable outside of the module.</p>\n<p>Also note that we supply a <strong>relative path</strong> to <code>from</code>, indicating that the ES6 module is a local file as opposed to an npm package.</p>\n<p>Instead of inserting an <code>export</code> before each variable you'd like to export, you can use this syntax to list off all the exposed variables in one area:</p>\n<pre><code class=\"language-js\">const sayHi = () => console.log('Hi!');\nconst sayBye = () => console.log('Bye!');\n\nconst saySomething = () => console.log('Something!');\n\nexport { sayHi, sayBye };\n</code></pre>\n<p>We can also specify that we'd like to import all of a module's functionality underneath a given namespace with the <code>import * as &#x3C;Namespace></code> syntax:</p>\n<pre><code class=\"language-js\">import * as Greetings from './greetings';\n\nGreetings.sayHi();\n\nGreetings.sayBye();\n\nGreetings.saySomething();\n</code></pre>\n<p><strong>Default export</strong></p>\n<p>The other type of export is a default export. A module can only contain one default export:</p>\n<pre><code class=\"language-js\">const sayHi = () => console.log('Hi!');\nconst sayBye = () => console.log('Bye!');\n\nconst saySomething = () => console.log('Something!');\n\nconst Greetings = { sayHi, sayBye };\n\nexport default Greetings;\n</code></pre>\n<p>This is a common pattern for libraries. It means you can easily import the library wholesale without specifying what individual functions you want:</p>\n<pre><code class=\"language-js\">import Greetings from './greetings';\n\nGreetings.sayHi();\nGreetings.sayBye();\n</code></pre>\n<p>It's not uncommon for a module to use a mix of both named exports and default exports. For instance, with <code>react-dom</code>, you can import <code>ReactDOM</code> (a default export) like this:</p>\n<pre><code class=\"language-js\">import ReactDOM from 'react-dom';\n\nReactDOM.render();\n</code></pre>\n<p>Or, if you're only going to use the <code>render()</code> function, you can import the named <code>render()</code> function like this:</p>\n<pre><code class=\"language-js\">import { render } from 'react-dom';\n\nrender();\n</code></pre>\n<p>To achieve this flexibility, the export implementation for <code>react-dom</code> looks something like this:</p>\n<pre><code class=\"language-js\">export const render = (component, target) => {};\n\nconst ReactDOM = {\n    render\n};\n\nexport default ReactDOM;\n</code></pre>\n<p>If you want to play around with the module syntax, check out the folder <code>code/webpack/es6-modules</code>.</p>\n<p>For more reading on ES6 modules, see this article from Mozilla: \"<a href=\"https://hacks.mozilla.org/2015/08/es6-in-depth-modules/\">ES6 in Depth: Modules</a>\".</p>\n<h2><code>Object.assign()</code></h2>\n<p>We use <code>Object.assign()</code> often throughout the book. We use it in areas where we want to create a modified version of an existing object.</p>\n<p><code>Object.assign()</code> accepts any number of objects as arguments. When the function receives two arguments, it <em>copies</em> the properties of the second object onto the first, like so:</p>\n<pre><code class=\"language-js\">onst coffee = { };\nconst noCream = { cream: false };\nconst noMilk = { milk: false };\nObject.assign(coffee, noCream);\n</code></pre>\n<p>It is idiomatic to pass in three arguments to <code>Object.assign()</code>. The first argument is a new JavaScript object, the one that <code>Object.assign()</code> will ultimately return. The second is the object whose properties we'd like to build off of. The last is the changes we'd like to apply:</p>\n<pre><code class=\"language-js\">const coffeeWithMilk = Object.assign({}, coffee, { milk: true });\n</code></pre>\n<p><code>Object.assign()</code> is a handy method for working with \"immutable\" JavaScript objects.</p>\n<h2>Template literals</h2>\n<p>In ES5 JavaScript, you'd interpolate variables into strings like this:</p>\n<pre><code class=\"language-js\">var greeting = 'Hello, ' + user + '! It is ' + degF + ' degrees outside.';\n</code></pre>\n<p>With ES6 template literals, we can create the same string like this:</p>\n<pre><code class=\"language-js\">const greeting = `Hello, ${user}! It is ${degF} degrees outside.`;\n</code></pre>\n<h2>The spread operator (<code>...</code>)</h2>\n<p>In arrays, the ellipsis <code>...</code> operator will <em>expand</em> the array that follows into the parent array. The spread operator enables us to succinctly construct new arrays as a composite of existing arrays.</p>\n<p>Here is an example:</p>\n<pre><code class=\"language-js\">onst a = [ 1, 2, 3 ];\nconst b = [ 4, 5, 6 ];\nconst c = [ ...a, ...b, 7, 8, 9 ];\n\nconsole.log(c);\n</code></pre>\n<p>Notice how this is different than if we wrote:</p>\n<pre><code class=\"language-js\">const d = [a, b, 7, 8, 9];\nconsole.log(d);\n</code></pre>\n<h2>Enhanced object literals</h2>\n<p>In ES5, all objects were required to have explicit key and value declarations:</p>\n<pre><code class=\"language-js\">const explicit = {\n    getState: getState,\n    dispatch: dispatch\n};\n</code></pre>\n<p>In ES6, you can use this terser syntax whenever the property name and variable name are the same:</p>\n<pre><code class=\"language-js\">const implicit = {\n    getState,\n    dispatch\n};\n</code></pre>\n<p>Lots of open source libraries use this syntax, so it's good to be familiar with it. But whether you use it in your own code is a matter of stylistic preference.</p>\n<h2>Default arguments</h2>\n<p>With ES6, you can specify a default value for an argument in the case that it is <code>undefined</code> when the function is called.</p>\n<p>This:</p>\n<pre><code class=\"language-js\">unction divide(a, b) {\n\n  const divisor = typeof b === 'undefined' ? 1 : b;\n\n  return a / divisor;\n}\n</code></pre>\n<p>Can be written as this:</p>\n<pre><code class=\"language-js\">function divide(a, b = 1) {\n    return a / b;\n}\n</code></pre>\n<p>In both cases, using the function looks like this:</p>\n<pre><code class=\"language-js\">divide(14, 2);\n\ndivide(14, undefined);\n\ndivide(14);\n</code></pre>\n<p>Whenever the argument <code>b</code> in the example above is <code>undefined</code>, the default argument is used. Note that <code>null</code> will not use the default argument:</p>\n<pre><code class=\"language-js\">divide(14, null);\n</code></pre>\n<h2>Destructuring assignments</h2>\n<h3>For arrays</h3>\n<p>In ES5, extracting and assigning multiple elements from an array looked like this:</p>\n<pre><code class=\"language-js\">ar fruits = [ 'apples', 'bananas', 'oranges' ];\nvar fruit1 = fruits[0];\nvar fruit2 = fruits[1];\n</code></pre>\n<p>In ES6, we can use the destructuring syntax to accomplish the same task like this:</p>\n<pre><code class=\"language-js\">const [veg1, veg2] = ['asparagus', 'broccoli', 'onion'];\nconsole.log(veg1);\nconsole.log(veg2);\n</code></pre>\n<p>The variables in the array on the left are \"matched\" and assigned to the corresponding elements in the array on the right. Note that <code>'onion'</code> is ignored and has no variable bound to it.</p>\n<h3>For objects</h3>\n<p>We can do something similar for extracting object properties into variables:</p>\n<pre><code class=\"language-js\">const smoothie = {\n    fats: ['avocado', 'peanut butter', 'greek yogurt'],\n    liquids: ['almond milk'],\n    greens: ['spinach'],\n    fruits: ['blueberry', 'banana']\n};\n\nconst { liquids, fruits } = smoothie;\n\nconsole.log(liquids);\nconsole.log(fruits);\n</code></pre>\n<h3>Parameter context matching</h3>\n<p>We can use these same principles to bind arguments inside a function to properties of an object supplied as an argument:</p>\n<pre><code class=\"language-js\">const containsSpinach = ({ greens }) => {\n    if (greens.find((g) => g === 'spinach')) {\n        return true;\n    } else {\n        return false;\n    }\n};\n\ncontainsSpinach(smoothie);\n</code></pre>\n<p>We do this often with functional React components:</p>\n<pre><code class=\"language-js\">const IngredientList = ({ ingredients, onClick }) => (\n    &#x3C;ul className=\"IngredientList\">\n        {ingredients.map((i) => (\n            &#x3C;li key={i.id} onClick={() => onClick(i.id)} className=\"item\">\n                {i.name}\n            &#x3C;/li>\n        ))}\n    &#x3C;/ul>\n);\n</code></pre>\n<p>Here, we use destructuring to extract the props into variables (<code>ingredients</code> and <code>onClick</code>) that we then use inside the component's function body.</p>\n<p>Share To Linkedin:</p>"},{"url":"/docs/javascript/clean-code/","relativePath":"docs/javascript/clean-code.md","relativeDir":"docs/javascript","base":"clean-code.md","name":"clean-code","frontmatter":{"title":"Clean Code","weight":0,"excerpt":"Clean Code","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>clean-code-javascript</h1>\n<h2>Table of Contents</h2>\n<ol>\n<li><a href=\"#introduction\">Introduction</a></li>\n<li><a href=\"#variables\">Variables</a></li>\n<li><a href=\"#functions\">Functions</a></li>\n<li><a href=\"#objects-and-data-structures\">Objects and Data Structures</a></li>\n<li><a href=\"#classes\">Classes</a></li>\n<li><a href=\"#solid\">SOLID</a></li>\n<li><a href=\"#testing\">Testing</a></li>\n<li><a href=\"#concurrency\">Concurrency</a></li>\n<li><a href=\"#error-handling\">Error Handling</a></li>\n<li><a href=\"#formatting\">Formatting</a></li>\n<li><a href=\"#comments\">Comments</a></li>\n<li><a href=\"#translation\">Translation</a></li>\n</ol>\n<h2>Introduction</h2>\n<p><img src=\"https://www.osnews.com/images/comics/wtfm.jpg\" alt=\"Humorous image of software quality estimation as a count of how many expletives\nyou shout when reading code\"></p>\n<p>Software engineering principles, from Robert C. Martin's book\n<a href=\"https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882\"><em>Clean Code</em></a>,\nadapted for JavaScript. This is not a style guide. It's a guide to producing\n<a href=\"https://github.com/ryanmcdermott/3rs-of-software-architecture\">readable, reusable, and refactorable</a> software in JavaScript.</p>\n<p>Not every principle herein has to be strictly followed, and even fewer will be\nuniversally agreed upon. These are guidelines and nothing more, but they are\nones codified over many years of collective experience by the authors of\n<em>Clean Code</em>.</p>\n<p>Our craft of software engineering is just a bit over 50 years old, and we are\nstill learning a lot. When software architecture is as old as architecture\nitself, maybe then we will have harder rules to follow. For now, let these\nguidelines serve as a touchstone by which to assess the quality of the\nJavaScript code that you and your team produce.</p>\n<p>One more thing: knowing these won't immediately make you a better software\ndeveloper, and working with them for many years doesn't mean you won't make\nmistakes. Every piece of code starts as a first draft, like wet clay getting\nshaped into its final form. Finally, we chisel away the imperfections when\nwe review it with our peers. Don't beat yourself up for first drafts that need\nimprovement. Beat up the code instead!</p>\n<h2><strong>Variables</strong></h2>\n<h3>Use meaningful and pronounceable variable names</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const yyyymmdstr = moment().format('YYYY/MM/DD');\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const currentDate = moment().format('YYYY/MM/DD');\n</code></pre>\n<h3>Use the same vocabulary for the same type of variable</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">getUserInfo();\ngetClientData();\ngetCustomerRecord();\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">getUser();\n</code></pre>\n<h3>Use searchable names</h3>\n<p>We will read more code than we will ever write. It's important that the code we\ndo write is readable and searchable. By <em>not</em> naming variables that end up\nbeing meaningful for understanding our program, we hurt our readers.\nMake your names searchable. Tools like\n<a href=\"https://github.com/danielstjules/buddy.js\">buddy.js</a> and\n<a href=\"https://github.com/eslint/eslint/blob/660e0918933e6e7fede26bc675a0763a6b357c94/docs/rules/no-magic-numbers.md\">ESLint</a>\ncan help identify unnamed constants.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">// What the heck is 86400000 for?\nsetTimeout(blastOff, 86400000);\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">// Declare them as capitalized named constants.\nconst MILLISECONDS_PER_DAY = 60 * 60 * 24 * 1000; //86400000;\n\nsetTimeout(blastOff, MILLISECONDS_PER_DAY);\n</code></pre>\n<h3>Use explanatory variables</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const address = 'One Infinite Loop, Cupertino 95014';\nconst cityZipCodeRegex = /^[^,\\\\]+[,\\\\\\s]+(.+?)\\s*(\\d{5})?$/;\nsaveCityZipCode(address.match(cityZipCodeRegex)[1], address.match(cityZipCodeRegex)[2]);\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const address = 'One Infinite Loop, Cupertino 95014';\nconst cityZipCodeRegex = /^[^,\\\\]+[,\\\\\\s]+(.+?)\\s*(\\d{5})?$/;\nconst [_, city, zipCode] = address.match(cityZipCodeRegex) || [];\nsaveCityZipCode(city, zipCode);\n</code></pre>\n<h3>Avoid Mental Mapping</h3>\n<p>Explicit is better than implicit.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const locations = ['Austin', 'New York', 'San Francisco'];\nlocations.forEach((l) => {\n    doStuff();\n    doSomeOtherStuff();\n    // ...\n    // ...\n    // ...\n    // Wait, what is `l` for again?\n    dispatch(l);\n});\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const locations = ['Austin', 'New York', 'San Francisco'];\nlocations.forEach((location) => {\n    doStuff();\n    doSomeOtherStuff();\n    // ...\n    // ...\n    // ...\n    dispatch(location);\n});\n</code></pre>\n<h3>Don't add unneeded context</h3>\n<p>If your class/object name tells you something, don't repeat that in your\nvariable name.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const Car = {\n    carMake: 'Honda',\n    carModel: 'Accord',\n    carColor: 'Blue'\n};\n\nfunction paintCar(car, color) {\n    car.carColor = color;\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const Car = {\n    make: 'Honda',\n    model: 'Accord',\n    color: 'Blue'\n};\n\nfunction paintCar(car, color) {\n    car.color = color;\n}\n</code></pre>\n<h3>Use default arguments instead of short circuiting or conditionals</h3>\n<p>Default arguments are often cleaner than short circuiting. Be aware that if you\nuse them, your function will only provide default values for <code>undefined</code>\narguments. Other \"falsy\" values such as <code>''</code>, <code>\"\"</code>, <code>false</code>, <code>null</code>, <code>0</code>, and\n<code>NaN</code>, will not be replaced by a default value.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function createMicrobrewery(name) {\n    const breweryName = name || 'Hipster Brew Co.';\n    // ...\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function createMicrobrewery(name = 'Hipster Brew Co.') {\n    // ...\n}\n</code></pre>\n<h2><strong>Functions</strong></h2>\n<h3>Function arguments (2 or fewer ideally)</h3>\n<p>Limiting the amount of function parameters is incredibly important because it\nmakes testing your function easier. Having more than three leads to a\ncombinatorial explosion where you have to test tons of different cases with\neach separate argument.</p>\n<p>One or two arguments is the ideal case, and three should be avoided if possible.\nAnything more than that should be consolidated. Usually, if you have\nmore than two arguments then your function is trying to do too much. In cases\nwhere it's not, most of the time a higher-level object will suffice as an\nargument.</p>\n<p>Since JavaScript allows you to make objects on the fly, without a lot of class\nboilerplate, you can use an object if you are finding yourself needing a\nlot of arguments.</p>\n<p>To make it obvious what properties the function expects, you can use the ES2015/ES6\ndestructuring syntax. This has a few advantages:</p>\n<ol>\n<li>When someone looks at the function signature, it's immediately clear what\nproperties are being used.</li>\n<li>It can be used to simulate named parameters.</li>\n<li>Destructuring also clones the specified primitive values of the argument\nobject passed into the function. This can help prevent side effects. Note:\nobjects and arrays that are destructured from the argument object are NOT\ncloned.</li>\n<li>Linters can warn you about unused properties, which would be impossible\nwithout destructuring.</li>\n</ol>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function createMenu(title, body, buttonText, cancellable) {\n    // ...\n}\n\ncreateMenu('Foo', 'Bar', 'Baz', true);\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function createMenu({ title, body, buttonText, cancellable }) {\n    // ...\n}\n\ncreateMenu({\n    title: 'Foo',\n    body: 'Bar',\n    buttonText: 'Baz',\n    cancellable: true\n});\n</code></pre>\n<h3>Functions should do one thing</h3>\n<p>This is by far the most important rule in software engineering. When functions\ndo more than one thing, they are harder to compose, test, and reason about.\nWhen you can isolate a function to just one action, it can be refactored\neasily and your code will read much cleaner. If you take nothing else away from\nthis guide other than this, you'll be ahead of many developers.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function emailClients(clients) {\n    clients.forEach((client) => {\n        const clientRecord = database.lookup(client);\n        if (clientRecord.isActive()) {\n            email(client);\n        }\n    });\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function emailActiveClients(clients) {\n    clients.filter(isActiveClient).forEach(email);\n}\n\nfunction isActiveClient(client) {\n    const clientRecord = database.lookup(client);\n    return clientRecord.isActive();\n}\n</code></pre>\n<h3>Function names should say what they do</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function addToDate(date, month) {\n    // ...\n}\n\nconst date = new Date();\n\n// It's hard to tell from the function name what is added\naddToDate(date, 1);\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function addMonthToDate(month, date) {\n    // ...\n}\n\nconst date = new Date();\naddMonthToDate(1, date);\n</code></pre>\n<h3>Functions should only be one level of abstraction</h3>\n<p>When you have more than one level of abstraction your function is usually\ndoing too much. Splitting up functions leads to reusability and easier\ntesting.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function parseBetterJSAlternative(code) {\n    const REGEXES = [\n        // ...\n    ];\n\n    const statements = code.split(' ');\n    const tokens = [];\n    REGEXES.forEach((REGEX) => {\n        statements.forEach((statement) => {\n            // ...\n        });\n    });\n\n    const ast = [];\n    tokens.forEach((token) => {\n        // lex...\n    });\n\n    ast.forEach((node) => {\n        // parse...\n    });\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function parseBetterJSAlternative(code) {\n    const tokens = tokenize(code);\n    const syntaxTree = parse(tokens);\n    syntaxTree.forEach((node) => {\n        // parse...\n    });\n}\n\nfunction tokenize(code) {\n    const REGEXES = [\n        // ...\n    ];\n\n    const statements = code.split(' ');\n    const tokens = [];\n    REGEXES.forEach((REGEX) => {\n        statements.forEach((statement) => {\n            tokens.push(/* ... */);\n        });\n    });\n\n    return tokens;\n}\n\nfunction parse(tokens) {\n    const syntaxTree = [];\n    tokens.forEach((token) => {\n        syntaxTree.push(/* ... */);\n    });\n\n    return syntaxTree;\n}\n</code></pre>\n<h3>Remove duplicate code</h3>\n<p>Do your absolute best to avoid duplicate code. Duplicate code is bad because it\nmeans that there's more than one place to alter something if you need to change\nsome logic.</p>\n<p>Imagine if you run a restaurant and you keep track of your inventory: all your\ntomatoes, onions, garlic, spices, etc. If you have multiple lists that\nyou keep this on, then all have to be updated when you serve a dish with\ntomatoes in them. If you only have one list, there's only one place to update!</p>\n<p>Oftentimes you have duplicate code because you have two or more slightly\ndifferent things, that share a lot in common, but their differences force you\nto have two or more separate functions that do much of the same things. Removing\nduplicate code means creating an abstraction that can handle this set of\ndifferent things with just one function/module/class.</p>\n<p>Getting the abstraction right is critical, that's why you should follow the\nSOLID principles laid out in the <em>Classes</em> section. Bad abstractions can be\nworse than duplicate code, so be careful! Having said this, if you can make\na good abstraction, do it! Don't repeat yourself, otherwise you'll find yourself\nupdating multiple places anytime you want to change one thing.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function showDeveloperList(developers) {\n    developers.forEach((developer) => {\n        const expectedSalary = developer.calculateExpectedSalary();\n        const experience = developer.getExperience();\n        const githubLink = developer.getGithubLink();\n        const data = {\n            expectedSalary,\n            experience,\n            githubLink\n        };\n\n        render(data);\n    });\n}\n\nfunction showManagerList(managers) {\n    managers.forEach((manager) => {\n        const expectedSalary = manager.calculateExpectedSalary();\n        const experience = manager.getExperience();\n        const portfolio = manager.getMBAProjects();\n        const data = {\n            expectedSalary,\n            experience,\n            portfolio\n        };\n\n        render(data);\n    });\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function showEmployeeList(employees) {\n    employees.forEach((employee) => {\n        const expectedSalary = employee.calculateExpectedSalary();\n        const experience = employee.getExperience();\n\n        const data = {\n            expectedSalary,\n            experience\n        };\n\n        switch (employee.type) {\n            case 'manager':\n                data.portfolio = employee.getMBAProjects();\n                break;\n            case 'developer':\n                data.githubLink = employee.getGithubLink();\n                break;\n        }\n\n        render(data);\n    });\n}\n</code></pre>\n<h3>Set default objects with Object.assign</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const menuConfig = {\n    title: null,\n    body: 'Bar',\n    buttonText: null,\n    cancellable: true\n};\n\nfunction createMenu(config) {\n    config.title = config.title || 'Foo';\n    config.body = config.body || 'Bar';\n    config.buttonText = config.buttonText || 'Baz';\n    config.cancellable = config.cancellable !== undefined ? config.cancellable : true;\n}\n\ncreateMenu(menuConfig);\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const menuConfig = {\n    title: 'Order',\n    // User did not include 'body' key\n    buttonText: 'Send',\n    cancellable: true\n};\n\nfunction createMenu(config) {\n    let finalConfig = Object.assign(\n        {\n            title: 'Foo',\n            body: 'Bar',\n            buttonText: 'Baz',\n            cancellable: true\n        },\n        config\n    );\n    return finalConfig;\n    // config now equals: {title: \"Order\", body: \"Bar\", buttonText: \"Send\", cancellable: true}\n    // ...\n}\n\ncreateMenu(menuConfig);\n</code></pre>\n<h3>Don't use flags as function parameters</h3>\n<p>Flags tell your user that this function does more than one thing. Functions should do one thing. Split out your functions if they are following different code paths based on a boolean.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function createFile(name, temp) {\n    if (temp) {\n        fs.create(`./temp/${name}`);\n    } else {\n        fs.create(name);\n    }\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function createFile(name) {\n    fs.create(name);\n}\n\nfunction createTempFile(name) {\n    createFile(`./temp/${name}`);\n}\n</code></pre>\n<h3>Avoid Side Effects (part 1)</h3>\n<p>A function produces a side effect if it does anything other than take a value in\nand return another value or values. A side effect could be writing to a file,\nmodifying some global variable, or accidentally wiring all your money to a\nstranger.</p>\n<p>Now, you do need to have side effects in a program on occasion. Like the previous\nexample, you might need to write to a file. What you want to do is to\ncentralize where you are doing this. Don't have several functions and classes\nthat write to a particular file. Have one service that does it. One and only one.</p>\n<p>The main point is to avoid common pitfalls like sharing state between objects\nwithout any structure, using mutable data types that can be written to by anything,\nand not centralizing where your side effects occur. If you can do this, you will\nbe happier than the vast majority of other programmers.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">// Global variable referenced by following function.\n// If we had another function that used this name, now it'd be an array and it could break it.\nlet name = 'Ryan McDermott';\n\nfunction splitIntoFirstAndLastName() {\n    name = name.split(' ');\n}\n\nsplitIntoFirstAndLastName();\n\nconsole.log(name); // ['Ryan', 'McDermott'];\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function splitIntoFirstAndLastName(name) {\n    return name.split(' ');\n}\n\nconst name = 'Ryan McDermott';\nconst newName = splitIntoFirstAndLastName(name);\n\nconsole.log(name); // 'Ryan McDermott';\nconsole.log(newName); // ['Ryan', 'McDermott'];\n</code></pre>\n<h3>Avoid Side Effects (part 2)</h3>\n<p>In JavaScript, some values are unchangeable (immutable) and some are changeable\n(mutable). Objects and arrays are two kinds of mutable values so it's important\nto handle them carefully when they're passed as parameters to a function. A\nJavaScript function can change an object's properties or alter the contents of\nan array which could easily cause bugs elsewhere.</p>\n<p>Suppose there's a function that accepts an array parameter representing a\nshopping cart. If the function makes a change in that shopping cart array -\nby adding an item to purchase, for example - then any other function that\nuses that same <code>cart</code> array will be affected by this addition. That may be\ngreat, however it could also be bad. Let's imagine a bad situation:</p>\n<p>The user clicks the \"Purchase\" button which calls a <code>purchase</code> function that\nspawns a network request and sends the <code>cart</code> array to the server. Because\nof a bad network connection, the <code>purchase</code> function has to keep retrying the\nrequest. Now, what if in the meantime the user accidentally clicks an \"Add to Cart\"\nbutton on an item they don't actually want before the network request begins?\nIf that happens and the network request begins, then that purchase function\nwill send the accidentally added item because the <code>cart</code> array was modified.</p>\n<p>A great solution would be for the <code>addItemToCart</code> function to always clone the\n<code>cart</code>, edit it, and return the clone. This would ensure that functions that are still\nusing the old shopping cart wouldn't be affected by the changes.</p>\n<p>Two caveats to mention to this approach:</p>\n<ol>\n<li>There might be cases where you actually want to modify the input object,\nbut when you adopt this programming practice you will find that those cases\nare pretty rare. Most things can be refactored to have no side effects!</li>\n<li>Cloning big objects can be very expensive in terms of performance. Luckily,\nthis isn't a big issue in practice because there are\n<a href=\"https://facebook.github.io/immutable-js/\">great libraries</a> that allow\nthis kind of programming approach to be fast and not as memory intensive as\nit would be for you to manually clone objects and arrays.</li>\n</ol>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const addItemToCart = (cart, item) => {\n    cart.push({ item, date: Date.now() });\n};\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const addItemToCart = (cart, item) => {\n    return [...cart, { item, date: Date.now() }];\n};\n</code></pre>\n<h3>Don't write to global functions</h3>\n<p>Polluting globals is a bad practice in JavaScript because you could clash with another\nlibrary and the user of your API would be none-the-wiser until they get an\nexception in production. Let's think about an example: what if you wanted to\nextend JavaScript's native Array method to have a <code>diff</code> method that could\nshow the difference between two arrays? You could write your new function\nto the <code>Array.prototype</code>, but it could clash with another library that tried\nto do the same thing. What if that other library was just using <code>diff</code> to find\nthe difference between the first and last elements of an array? This is why it\nwould be much better to just use ES2015/ES6 classes and simply extend the <code>Array</code> global.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">Array.prototype.diff = function diff(comparisonArray) {\n    const hash = new Set(comparisonArray);\n    return this.filter((elem) => !hash.has(elem));\n};\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class SuperArray extends Array {\n    diff(comparisonArray) {\n        const hash = new Set(comparisonArray);\n        return this.filter((elem) => !hash.has(elem));\n    }\n}\n</code></pre>\n<h3>Favor functional programming over imperative programming</h3>\n<p>JavaScript isn't a functional language in the way that Haskell is, but it has\na functional flavor to it. Functional languages can be cleaner and easier to test.\nFavor this style of programming when you can.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const programmerOutput = [\n    {\n        name: 'Uncle Bobby',\n        linesOfCode: 500\n    },\n    {\n        name: 'Suzie Q',\n        linesOfCode: 1500\n    },\n    {\n        name: 'Jimmy Gosling',\n        linesOfCode: 150\n    },\n    {\n        name: 'Gracie Hopper',\n        linesOfCode: 1000\n    }\n];\n\nlet totalOutput = 0;\n\nfor (let i = 0; i &#x3C; programmerOutput.length; i++) {\n    totalOutput += programmerOutput[i].linesOfCode;\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const programmerOutput = [\n    {\n        name: 'Uncle Bobby',\n        linesOfCode: 500\n    },\n    {\n        name: 'Suzie Q',\n        linesOfCode: 1500\n    },\n    {\n        name: 'Jimmy Gosling',\n        linesOfCode: 150\n    },\n    {\n        name: 'Gracie Hopper',\n        linesOfCode: 1000\n    }\n];\n\nconst totalOutput = programmerOutput.reduce((totalLines, output) => totalLines + output.linesOfCode, 0);\n</code></pre>\n<h3>Encapsulate conditionals</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">if (fsm.state === 'fetching' &#x26;&#x26; isEmpty(listNode)) {\n    // ...\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function shouldShowSpinner(fsm, listNode) {\n    return fsm.state === 'fetching' &#x26;&#x26; isEmpty(listNode);\n}\n\nif (shouldShowSpinner(fsmInstance, listNodeInstance)) {\n    // ...\n}\n</code></pre>\n<h3>Avoid negative conditionals</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function isDOMNodeNotPresent(node) {\n    // ...\n}\n\nif (!isDOMNodeNotPresent(node)) {\n    // ...\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function isDOMNodePresent(node) {\n    // ...\n}\n\nif (isDOMNodePresent(node)) {\n    // ...\n}\n</code></pre>\n<h3>Avoid conditionals</h3>\n<p>This seems like an impossible task. Upon first hearing this, most people say,\n\"how am I supposed to do anything without an <code>if</code> statement?\" The answer is that\nyou can use polymorphism to achieve the same task in many cases. The second\nquestion is usually, \"well that's great but why would I want to do that?\" The\nanswer is a previous clean code concept we learned: a function should only do\none thing. When you have classes and functions that have <code>if</code> statements, you\nare telling your user that your function does more than one thing. Remember,\njust do one thing.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class Airplane {\n    // ...\n    getCruisingAltitude() {\n        switch (this.type) {\n            case '777':\n                return this.getMaxAltitude() - this.getPassengerCount();\n            case 'Air Force One':\n                return this.getMaxAltitude();\n            case 'Cessna':\n                return this.getMaxAltitude() - this.getFuelExpenditure();\n        }\n    }\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class Airplane {\n    // ...\n}\n\nclass Boeing777 extends Airplane {\n    // ...\n    getCruisingAltitude() {\n        return this.getMaxAltitude() - this.getPassengerCount();\n    }\n}\n\nclass AirForceOne extends Airplane {\n    // ...\n    getCruisingAltitude() {\n        return this.getMaxAltitude();\n    }\n}\n\nclass Cessna extends Airplane {\n    // ...\n    getCruisingAltitude() {\n        return this.getMaxAltitude() - this.getFuelExpenditure();\n    }\n}\n</code></pre>\n<h3>Avoid type-checking (part 1)</h3>\n<p>JavaScript is untyped, which means your functions can take any type of argument.\nSometimes you are bitten by this freedom and it becomes tempting to do\ntype-checking in your functions. There are many ways to avoid having to do this.\nThe first thing to consider is consistent APIs.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function travelToTexas(vehicle) {\n    if (vehicle instanceof Bicycle) {\n        vehicle.pedal(this.currentLocation, new Location('texas'));\n    } else if (vehicle instanceof Car) {\n        vehicle.drive(this.currentLocation, new Location('texas'));\n    }\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function travelToTexas(vehicle) {\n    vehicle.move(this.currentLocation, new Location('texas'));\n}\n</code></pre>\n<h3>Avoid type-checking (part 2)</h3>\n<p>If you are working with basic primitive values like strings and integers,\nand you can't use polymorphism but you still feel the need to type-check,\nyou should consider using TypeScript. It is an excellent alternative to normal\nJavaScript, as it provides you with static typing on top of standard JavaScript\nsyntax. The problem with manually type-checking normal JavaScript is that\ndoing it well requires so much extra verbiage that the faux \"type-safety\" you get\ndoesn't make up for the lost readability. Keep your JavaScript clean, write\ngood tests, and have good code reviews. Otherwise, do all of that but with\nTypeScript (which, like I said, is a great alternative!).</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function combine(val1, val2) {\n    if ((typeof val1 === 'number' &#x26;&#x26; typeof val2 === 'number') || (typeof val1 === 'string' &#x26;&#x26; typeof val2 === 'string')) {\n        return val1 + val2;\n    }\n\n    throw new Error('Must be of type String or Number');\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function combine(val1, val2) {\n    return val1 + val2;\n}\n</code></pre>\n<h3>Don't over-optimize</h3>\n<p>Modern browsers do a lot of optimization under-the-hood at runtime. A lot of\ntimes, if you are optimizing then you are just wasting your time. <a href=\"https://github.com/petkaantonov/bluebird/wiki/Optimization-killers\">There are good\nresources</a>\nfor seeing where optimization is lacking. Target those in the meantime, until\nthey are fixed if they can be.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">// On old browsers, each iteration with uncached `list.length` would be costly\n// because of `list.length` recomputation. In modern browsers, this is optimized.\nfor (let i = 0, len = list.length; i &#x3C; len; i++) {\n    // ...\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">for (let i = 0; i &#x3C; list.length; i++) {\n    // ...\n}\n</code></pre>\n<h3>Remove dead code</h3>\n<p>Dead code is just as bad as duplicate code. There's no reason to keep it in\nyour codebase. If it's not being called, get rid of it! It will still be safe\nin your version history if you still need it.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function oldRequestModule(url) {\n    // ...\n}\n\nfunction newRequestModule(url) {\n    // ...\n}\n\nconst req = newRequestModule;\ninventoryTracker('apples', req, 'www.inventory-awesome.io');\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function newRequestModule(url) {\n    // ...\n}\n\nconst req = newRequestModule;\ninventoryTracker('apples', req, 'www.inventory-awesome.io');\n</code></pre>\n<h2><strong>Objects and Data Structures</strong></h2>\n<h3>Use getters and setters</h3>\n<p>Using getters and setters to access data on objects could be better than simply\nlooking for a property on an object. \"Why?\" you might ask. Well, here's an\nunorganized list of reasons why:</p>\n<ul>\n<li>When you want to do more beyond getting an object property, you don't have\nto look up and change every accessor in your codebase.</li>\n<li>Makes adding validation simple when doing a <code>set</code>.</li>\n<li>Encapsulates the internal representation.</li>\n<li>Easy to add logging and error handling when getting and setting.</li>\n<li>You can lazy load your object's properties, let's say getting it from a\nserver.</li>\n</ul>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function makeBankAccount() {\n    // ...\n\n    return {\n        balance: 0\n        // ...\n    };\n}\n\nconst account = makeBankAccount();\naccount.balance = 100;\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function makeBankAccount() {\n    // this one is private\n    let balance = 0;\n\n    // a \"getter\", made public via the returned object below\n    function getBalance() {\n        return balance;\n    }\n\n    // a \"setter\", made public via the returned object below\n    function setBalance(amount) {\n        // ... validate before updating the balance\n        balance = amount;\n    }\n\n    return {\n        // ...\n        getBalance,\n        setBalance\n    };\n}\n\nconst account = makeBankAccount();\naccount.setBalance(100);\n</code></pre>\n<h3>Make objects have private members</h3>\n<p>This can be accomplished through closures (for ES5 and below).</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const Employee = function (name) {\n    this.name = name;\n};\n\nEmployee.prototype.getName = function getName() {\n    return this.name;\n};\n\nconst employee = new Employee('John Doe');\nconsole.log(`Employee name: ${employee.getName()}`); // Employee name: John Doe\ndelete employee.name;\nconsole.log(`Employee name: ${employee.getName()}`); // Employee name: undefined\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function makeEmployee(name) {\n    return {\n        getName() {\n            return name;\n        }\n    };\n}\n\nconst employee = makeEmployee('John Doe');\nconsole.log(`Employee name: ${employee.getName()}`); // Employee name: John Doe\ndelete employee.name;\nconsole.log(`Employee name: ${employee.getName()}`); // Employee name: John Doe\n</code></pre>\n<h2><strong>Classes</strong></h2>\n<h3>Prefer ES2015/ES6 classes over ES5 plain functions</h3>\n<p>It's very difficult to get readable class inheritance, construction, and method\ndefinitions for classical ES5 classes. If you need inheritance (and be aware\nthat you might not), then prefer ES2015/ES6 classes. However, prefer small functions over\nclasses until you find yourself needing larger and more complex objects.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const Animal = function (age) {\n    if (!(this instanceof Animal)) {\n        throw new Error('Instantiate Animal with `new`');\n    }\n\n    this.age = age;\n};\n\nAnimal.prototype.move = function move() {};\n\nconst Mammal = function (age, furColor) {\n    if (!(this instanceof Mammal)) {\n        throw new Error('Instantiate Mammal with `new`');\n    }\n\n    Animal.call(this, age);\n    this.furColor = furColor;\n};\n\nMammal.prototype = Object.create(Animal.prototype);\nMammal.prototype.constructor = Mammal;\nMammal.prototype.liveBirth = function liveBirth() {};\n\nconst Human = function (age, furColor, languageSpoken) {\n    if (!(this instanceof Human)) {\n        throw new Error('Instantiate Human with `new`');\n    }\n\n    Mammal.call(this, age, furColor);\n    this.languageSpoken = languageSpoken;\n};\n\nHuman.prototype = Object.create(Mammal.prototype);\nHuman.prototype.constructor = Human;\nHuman.prototype.speak = function speak() {};\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class Animal {\n    constructor(age) {\n        this.age = age;\n    }\n\n    move() {\n        /* ... */\n    }\n}\n\nclass Mammal extends Animal {\n    constructor(age, furColor) {\n        super(age);\n        this.furColor = furColor;\n    }\n\n    liveBirth() {\n        /* ... */\n    }\n}\n\nclass Human extends Mammal {\n    constructor(age, furColor, languageSpoken) {\n        super(age, furColor);\n        this.languageSpoken = languageSpoken;\n    }\n\n    speak() {\n        /* ... */\n    }\n}\n</code></pre>\n<h3>Use method chaining</h3>\n<p>This pattern is very useful in JavaScript and you see it in many libraries such\nas jQuery and Lodash. It allows your code to be expressive, and less verbose.\nFor that reason, I say, use method chaining and take a look at how clean your code\nwill be. In your class functions, simply return <code>this</code> at the end of every function,\nand you can chain further class methods onto it.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class Car {\n    constructor(make, model, color) {\n        this.make = make;\n        this.model = model;\n        this.color = color;\n    }\n\n    setMake(make) {\n        this.make = make;\n    }\n\n    setModel(model) {\n        this.model = model;\n    }\n\n    setColor(color) {\n        this.color = color;\n    }\n\n    save() {\n        console.log(this.make, this.model, this.color);\n    }\n}\n\nconst car = new Car('Ford', 'F-150', 'red');\ncar.setColor('pink');\ncar.save();\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class Car {\n    constructor(make, model, color) {\n        this.make = make;\n        this.model = model;\n        this.color = color;\n    }\n\n    setMake(make) {\n        this.make = make;\n        // NOTE: Returning this for chaining\n        return this;\n    }\n\n    setModel(model) {\n        this.model = model;\n        // NOTE: Returning this for chaining\n        return this;\n    }\n\n    setColor(color) {\n        this.color = color;\n        // NOTE: Returning this for chaining\n        return this;\n    }\n\n    save() {\n        console.log(this.make, this.model, this.color);\n        // NOTE: Returning this for chaining\n        return this;\n    }\n}\n\nconst car = new Car('Ford', 'F-150', 'red').setColor('pink').save();\n</code></pre>\n<h3>Prefer composition over inheritance</h3>\n<p>As stated famously in <a href=\"https://en.wikipedia.org/wiki/Design_Patterns\"><em>Design Patterns</em></a> by the Gang of Four,\nyou should prefer composition over inheritance where you can. There are lots of\ngood reasons to use inheritance and lots of good reasons to use composition.\nThe main point for this maxim is that if your mind instinctively goes for\ninheritance, try to think if composition could model your problem better. In some\ncases it can.</p>\n<p>You might be wondering then, \"when should I use inheritance?\" It\ndepends on your problem at hand, but this is a decent list of when inheritance\nmakes more sense than composition:</p>\n<ol>\n<li>Your inheritance represents an \"is-a\" relationship and not a \"has-a\"\nrelationship (Human->Animal vs. User->UserDetails).</li>\n<li>You can reuse code from the base classes (Humans can move like all animals).</li>\n<li>You want to make global changes to derived classes by changing a base class.\n(Change the caloric expenditure of all animals when they move).</li>\n</ol>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class Employee {\n    constructor(name, email) {\n        this.name = name;\n        this.email = email;\n    }\n\n    // ...\n}\n\n// Bad because Employees \"have\" tax data. EmployeeTaxData is not a type of Employee\nclass EmployeeTaxData extends Employee {\n    constructor(ssn, salary) {\n        super();\n        this.ssn = ssn;\n        this.salary = salary;\n    }\n\n    // ...\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class EmployeeTaxData {\n    constructor(ssn, salary) {\n        this.ssn = ssn;\n        this.salary = salary;\n    }\n\n    // ...\n}\n\nclass Employee {\n    constructor(name, email) {\n        this.name = name;\n        this.email = email;\n    }\n\n    setTaxData(ssn, salary) {\n        this.taxData = new EmployeeTaxData(ssn, salary);\n    }\n    // ...\n}\n</code></pre>\n<h2><strong>SOLID</strong></h2>\n<h3>Single Responsibility Principle (SRP)</h3>\n<p>As stated in Clean Code, \"There should never be more than one reason for a class\nto change\". It's tempting to jam-pack a class with a lot of functionality, like\nwhen you can only take one suitcase on your flight. The issue with this is\nthat your class won't be conceptually cohesive and it will give it many reasons\nto change. Minimizing the amount of times you need to change a class is important.\nIt's important because if too much functionality is in one class and you modify\na piece of it, it can be difficult to understand how that will affect other\ndependent modules in your codebase.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class UserSettings {\n    constructor(user) {\n        this.user = user;\n    }\n\n    changeSettings(settings) {\n        if (this.verifyCredentials()) {\n            // ...\n        }\n    }\n\n    verifyCredentials() {\n        // ...\n    }\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class UserAuth {\n    constructor(user) {\n        this.user = user;\n    }\n\n    verifyCredentials() {\n        // ...\n    }\n}\n\nclass UserSettings {\n    constructor(user) {\n        this.user = user;\n        this.auth = new UserAuth(user);\n    }\n\n    changeSettings(settings) {\n        if (this.auth.verifyCredentials()) {\n            // ...\n        }\n    }\n}\n</code></pre>\n<h3>Open/Closed Principle (OCP)</h3>\n<p>As stated by Bertrand Meyer, \"software entities (classes, modules, functions,\netc.) should be open for extension, but closed for modification.\" What does that\nmean though? This principle basically states that you should allow users to\nadd new functionalities without changing existing code.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class AjaxAdapter extends Adapter {\n    constructor() {\n        super();\n        this.name = 'ajaxAdapter';\n    }\n}\n\nclass NodeAdapter extends Adapter {\n    constructor() {\n        super();\n        this.name = 'nodeAdapter';\n    }\n}\n\nclass HttpRequester {\n    constructor(adapter) {\n        this.adapter = adapter;\n    }\n\n    fetch(url) {\n        if (this.adapter.name === 'ajaxAdapter') {\n            return makeAjaxCall(url).then((response) => {\n                // transform response and return\n            });\n        } else if (this.adapter.name === 'nodeAdapter') {\n            return makeHttpCall(url).then((response) => {\n                // transform response and return\n            });\n        }\n    }\n}\n\nfunction makeAjaxCall(url) {\n    // request and return promise\n}\n\nfunction makeHttpCall(url) {\n    // request and return promise\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class AjaxAdapter extends Adapter {\n    constructor() {\n        super();\n        this.name = 'ajaxAdapter';\n    }\n\n    request(url) {\n        // request and return promise\n    }\n}\n\nclass NodeAdapter extends Adapter {\n    constructor() {\n        super();\n        this.name = 'nodeAdapter';\n    }\n\n    request(url) {\n        // request and return promise\n    }\n}\n\nclass HttpRequester {\n    constructor(adapter) {\n        this.adapter = adapter;\n    }\n\n    fetch(url) {\n        return this.adapter.request(url).then((response) => {\n            // transform response and return\n        });\n    }\n}\n</code></pre>\n<h3>Liskov Substitution Principle (LSP)</h3>\n<p>This is a scary term for a very simple concept. It's formally defined as \"If S\nis a subtype of T, then objects of type T may be replaced with objects of type S\n(i.e., objects of type S may substitute objects of type T) without altering any\nof the desirable properties of that program (correctness, task performed,\netc.).\" That's an even scarier definition.</p>\n<p>The best explanation for this is if you have a parent class and a child class,\nthen the base class and child class can be used interchangeably without getting\nincorrect results. This might still be confusing, so let's take a look at the\nclassic Square-Rectangle example. Mathematically, a square is a rectangle, but\nif you model it using the \"is-a\" relationship via inheritance, you quickly\nget into trouble.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class Rectangle {\n    constructor() {\n        this.width = 0;\n        this.height = 0;\n    }\n\n    setColor(color) {\n        // ...\n    }\n\n    render(area) {\n        // ...\n    }\n\n    setWidth(width) {\n        this.width = width;\n    }\n\n    setHeight(height) {\n        this.height = height;\n    }\n\n    getArea() {\n        return this.width * this.height;\n    }\n}\n\nclass Square extends Rectangle {\n    setWidth(width) {\n        this.width = width;\n        this.height = width;\n    }\n\n    setHeight(height) {\n        this.width = height;\n        this.height = height;\n    }\n}\n\nfunction renderLargeRectangles(rectangles) {\n    rectangles.forEach((rectangle) => {\n        rectangle.setWidth(4);\n        rectangle.setHeight(5);\n        const area = rectangle.getArea(); // BAD: Returns 25 for Square. Should be 20.\n        rectangle.render(area);\n    });\n}\n\nconst rectangles = [new Rectangle(), new Rectangle(), new Square()];\nrenderLargeRectangles(rectangles);\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class Shape {\n    setColor(color) {\n        // ...\n    }\n\n    render(area) {\n        // ...\n    }\n}\n\nclass Rectangle extends Shape {\n    constructor(width, height) {\n        super();\n        this.width = width;\n        this.height = height;\n    }\n\n    getArea() {\n        return this.width * this.height;\n    }\n}\n\nclass Square extends Shape {\n    constructor(length) {\n        super();\n        this.length = length;\n    }\n\n    getArea() {\n        return this.length * this.length;\n    }\n}\n\nfunction renderLargeShapes(shapes) {\n    shapes.forEach((shape) => {\n        const area = shape.getArea();\n        shape.render(area);\n    });\n}\n\nconst shapes = [new Rectangle(4, 5), new Rectangle(4, 5), new Square(5)];\nrenderLargeShapes(shapes);\n</code></pre>\n<h3>Interface Segregation Principle (ISP)</h3>\n<p>JavaScript doesn't have interfaces so this principle doesn't apply as strictly\nas others. However, it's important and relevant even with JavaScript's lack of\ntype system.</p>\n<p>ISP states that \"Clients should not be forced to depend upon interfaces that\nthey do not use.\" Interfaces are implicit contracts in JavaScript because of\nduck typing.</p>\n<p>A good example to look at that demonstrates this principle in JavaScript is for\nclasses that require large settings objects. Not requiring clients to setup\nhuge amounts of options is beneficial, because most of the time they won't need\nall of the settings. Making them optional helps prevent having a\n\"fat interface\".</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class DOMTraverser {\n    constructor(settings) {\n        this.settings = settings;\n        this.setup();\n    }\n\n    setup() {\n        this.rootNode = this.settings.rootNode;\n        this.settings.animationModule.setup();\n    }\n\n    traverse() {\n        // ...\n    }\n}\n\nconst $ = new DOMTraverser({\n    rootNode: document.getElementsByTagName('body'),\n    animationModule() {} // Most of the time, we won't need to animate when traversing.\n    // ...\n});\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class DOMTraverser {\n    constructor(settings) {\n        this.settings = settings;\n        this.options = settings.options;\n        this.setup();\n    }\n\n    setup() {\n        this.rootNode = this.settings.rootNode;\n        this.setupOptions();\n    }\n\n    setupOptions() {\n        if (this.options.animationModule) {\n            // ...\n        }\n    }\n\n    traverse() {\n        // ...\n    }\n}\n\nconst $ = new DOMTraverser({\n    rootNode: document.getElementsByTagName('body'),\n    options: {\n        animationModule() {}\n    }\n});\n</code></pre>\n<h3>Dependency Inversion Principle (DIP)</h3>\n<p>This principle states two essential things:</p>\n<ol>\n<li>High-level modules should not depend on low-level modules. Both should\ndepend on abstractions.</li>\n<li>Abstractions should not depend upon details. Details should depend on\nabstractions.</li>\n</ol>\n<p>This can be hard to understand at first, but if you've worked with AngularJS,\nyou've seen an implementation of this principle in the form of Dependency\nInjection (DI). While they are not identical concepts, DIP keeps high-level\nmodules from knowing the details of its low-level modules and setting them up.\nIt can accomplish this through DI. A huge benefit of this is that it reduces\nthe coupling between modules. Coupling is a very bad development pattern because\nit makes your code hard to refactor.</p>\n<p>As stated previously, JavaScript doesn't have interfaces so the abstractions\nthat are depended upon are implicit contracts. That is to say, the methods\nand properties that an object/class exposes to another object/class. In the\nexample below, the implicit contract is that any Request module for an\n<code>InventoryTracker</code> will have a <code>requestItems</code> method.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class InventoryRequester {\n    constructor() {\n        this.REQ_METHODS = ['HTTP'];\n    }\n\n    requestItem(item) {\n        // ...\n    }\n}\n\nclass InventoryTracker {\n    constructor(items) {\n        this.items = items;\n\n        // BAD: We have created a dependency on a specific request implementation.\n        // We should just have requestItems depend on a request method: `request`\n        this.requester = new InventoryRequester();\n    }\n\n    requestItems() {\n        this.items.forEach((item) => {\n            this.requester.requestItem(item);\n        });\n    }\n}\n\nconst inventoryTracker = new InventoryTracker(['apples', 'bananas']);\ninventoryTracker.requestItems();\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class InventoryTracker {\n    constructor(items, requester) {\n        this.items = items;\n        this.requester = requester;\n    }\n\n    requestItems() {\n        this.items.forEach((item) => {\n            this.requester.requestItem(item);\n        });\n    }\n}\n\nclass InventoryRequesterV1 {\n    constructor() {\n        this.REQ_METHODS = ['HTTP'];\n    }\n\n    requestItem(item) {\n        // ...\n    }\n}\n\nclass InventoryRequesterV2 {\n    constructor() {\n        this.REQ_METHODS = ['WS'];\n    }\n\n    requestItem(item) {\n        // ...\n    }\n}\n\n// By constructing our dependencies externally and injecting them, we can easily\n// substitute our request module for a fancy new one that uses WebSockets.\nconst inventoryTracker = new InventoryTracker(['apples', 'bananas'], new InventoryRequesterV2());\ninventoryTracker.requestItems();\n</code></pre>\n<h2><strong>Testing</strong></h2>\n<p>Testing is more important than shipping. If you have no tests or an\ninadequate amount, then every time you ship code you won't be sure that you\ndidn't break anything. Deciding on what constitutes an adequate amount is up\nto your team, but having 100% coverage (all statements and branches) is how\nyou achieve very high confidence and developer peace of mind. This means that\nin addition to having a great testing framework, you also need to use a\n<a href=\"https://gotwarlost.github.io/istanbul/\">good coverage tool</a>.</p>\n<p>There's no excuse to not write tests. There are <a href=\"https://jstherightway.org/#testing-tools\">plenty of good JS test frameworks</a>, so find one that your team prefers.\nWhen you find one that works for your team, then aim to always write tests\nfor every new feature/module you introduce. If your preferred method is\nTest Driven Development (TDD), that is great, but the main point is to just\nmake sure you are reaching your coverage goals before launching any feature,\nor refactoring an existing one.</p>\n<h3>Single concept per test</h3>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">import assert from 'assert';\n\ndescribe('MomentJS', () => {\n    it('handles date boundaries', () => {\n        let date;\n\n        date = new MomentJS('1/1/2015');\n        date.addDays(30);\n        assert.equal('1/31/2015', date);\n\n        date = new MomentJS('2/1/2016');\n        date.addDays(28);\n        assert.equal('02/29/2016', date);\n\n        date = new MomentJS('2/1/2015');\n        date.addDays(28);\n        assert.equal('03/01/2015', date);\n    });\n});\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">import assert from 'assert';\n\ndescribe('MomentJS', () => {\n    it('handles 30-day months', () => {\n        const date = new MomentJS('1/1/2015');\n        date.addDays(30);\n        assert.equal('1/31/2015', date);\n    });\n\n    it('handles leap year', () => {\n        const date = new MomentJS('2/1/2016');\n        date.addDays(28);\n        assert.equal('02/29/2016', date);\n    });\n\n    it('handles non-leap year', () => {\n        const date = new MomentJS('2/1/2015');\n        date.addDays(28);\n        assert.equal('03/01/2015', date);\n    });\n});\n</code></pre>\n<h2><strong>Concurrency</strong></h2>\n<h3>Use Promises, not callbacks</h3>\n<p>Callbacks aren't clean, and they cause excessive amounts of nesting. With ES2015/ES6,\nPromises are a built-in global type. Use them!</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">import { get } from 'request';\nimport { writeFile } from 'fs';\n\nget('https://en.wikipedia.org/wiki/Robert_Cecil_Martin', (requestErr, response, body) => {\n    if (requestErr) {\n        console.error(requestErr);\n    } else {\n        writeFile('article.html', body, (writeErr) => {\n            if (writeErr) {\n                console.error(writeErr);\n            } else {\n                console.log('File written');\n            }\n        });\n    }\n});\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">import { get } from 'request-promise';\nimport { writeFile } from 'fs-extra';\n\nget('https://en.wikipedia.org/wiki/Robert_Cecil_Martin')\n    .then((body) => {\n        return writeFile('article.html', body);\n    })\n    .then(() => {\n        console.log('File written');\n    })\n    .catch((err) => {\n        console.error(err);\n    });\n</code></pre>\n<h3>Async/Await are even cleaner than Promises</h3>\n<p>Promises are a very clean alternative to callbacks, but ES2017/ES8 brings async and await\nwhich offer an even cleaner solution. All you need is a function that is prefixed\nin an <code>async</code> keyword, and then you can write your logic imperatively without\na <code>then</code> chain of functions. Use this if you can take advantage of ES2017/ES8 features\ntoday!</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">import { get } from 'request-promise';\nimport { writeFile } from 'fs-extra';\n\nget('https://en.wikipedia.org/wiki/Robert_Cecil_Martin')\n    .then((body) => {\n        return writeFile('article.html', body);\n    })\n    .then(() => {\n        console.log('File written');\n    })\n    .catch((err) => {\n        console.error(err);\n    });\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">import { get } from 'request-promise';\nimport { writeFile } from 'fs-extra';\n\nasync function getCleanCodeArticle() {\n    try {\n        const body = await get('https://en.wikipedia.org/wiki/Robert_Cecil_Martin');\n        await writeFile('article.html', body);\n        console.log('File written');\n    } catch (err) {\n        console.error(err);\n    }\n}\n\ngetCleanCodeArticle();\n</code></pre>\n<h2><strong>Error Handling</strong></h2>\n<p>Thrown errors are a good thing! They mean the runtime has successfully\nidentified when something in your program has gone wrong and it's letting\nyou know by stopping function execution on the current stack, killing the\nprocess (in Node), and notifying you in the console with a stack trace.</p>\n<h3>Don't ignore caught errors</h3>\n<p>Doing nothing with a caught error doesn't give you the ability to ever fix\nor react to said error. Logging the error to the console (<code>console.log</code>)\nisn't much better as often times it can get lost in a sea of things printed\nto the console. If you wrap any bit of code in a <code>try/catch</code> it means you\nthink an error may occur there and therefore you should have a plan,\nor create a code path, for when it occurs.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">try {\n    functionThatMightThrow();\n} catch (error) {\n    console.log(error);\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">try {\n    functionThatMightThrow();\n} catch (error) {\n    // One option (more noisy than console.log):\n    console.error(error);\n    // Another option:\n    notifyUserOfError(error);\n    // Another option:\n    reportErrorToService(error);\n    // OR do all three!\n}\n</code></pre>\n<h3>Don't ignore rejected promises</h3>\n<p>For the same reason you shouldn't ignore caught errors\nfrom <code>try/catch</code>.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">getdata()\n    .then((data) => {\n        functionThatMightThrow(data);\n    })\n    .catch((error) => {\n        console.log(error);\n    });\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">getdata()\n    .then((data) => {\n        functionThatMightThrow(data);\n    })\n    .catch((error) => {\n        // One option (more noisy than console.log):\n        console.error(error);\n        // Another option:\n        notifyUserOfError(error);\n        // Another option:\n        reportErrorToService(error);\n        // OR do all three!\n    });\n</code></pre>\n<h2><strong>Formatting</strong></h2>\n<p>Formatting is subjective. Like many rules herein, there is no hard and fast\nrule that you must follow. The main point is DO NOT ARGUE over formatting.\nThere are <a href=\"https://standardjs.com/rules.html\">tons of tools</a> to automate this.\nUse one! It's a waste of time and money for engineers to argue over formatting.</p>\n<p>For things that don't fall under the purview of automatic formatting\n(indentation, tabs vs. spaces, double vs. single quotes, etc.) look here\nfor some guidance.</p>\n<h3>Use consistent capitalization</h3>\n<p>JavaScript is untyped, so capitalization tells you a lot about your variables,\nfunctions, etc. These rules are subjective, so your team can choose whatever\nthey want. The point is, no matter what you all choose, just be consistent.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">const DAYS_IN_WEEK = 7;\nconst daysInMonth = 30;\n\nconst songs = ['Back In Black', 'Stairway to Heaven', 'Hey Jude'];\nconst Artists = ['ACDC', 'Led Zeppelin', 'The Beatles'];\n\nfunction eraseDatabase() {}\nfunction restore_database() {}\n\nclass animal {}\nclass Alpaca {}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">const DAYS_IN_WEEK = 7;\nconst DAYS_IN_MONTH = 30;\n\nconst SONGS = ['Back In Black', 'Stairway to Heaven', 'Hey Jude'];\nconst ARTISTS = ['ACDC', 'Led Zeppelin', 'The Beatles'];\n\nfunction eraseDatabase() {}\nfunction restoreDatabase() {}\n\nclass Animal {}\nclass Alpaca {}\n</code></pre>\n<h3>Function callers and callees should be close</h3>\n<p>If a function calls another, keep those functions vertically close in the source\nfile. Ideally, keep the caller right above the callee. We tend to read code from\ntop-to-bottom, like a newspaper. Because of this, make your code read that way.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">class PerformanceReview {\n    constructor(employee) {\n        this.employee = employee;\n    }\n\n    lookupPeers() {\n        return db.lookup(this.employee, 'peers');\n    }\n\n    lookupManager() {\n        return db.lookup(this.employee, 'manager');\n    }\n\n    getPeerReviews() {\n        const peers = this.lookupPeers();\n        // ...\n    }\n\n    perfReview() {\n        this.getPeerReviews();\n        this.getManagerReview();\n        this.getSelfReview();\n    }\n\n    getManagerReview() {\n        const manager = this.lookupManager();\n    }\n\n    getSelfReview() {\n        // ...\n    }\n}\n\nconst review = new PerformanceReview(employee);\nreview.perfReview();\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">class PerformanceReview {\n    constructor(employee) {\n        this.employee = employee;\n    }\n\n    perfReview() {\n        this.getPeerReviews();\n        this.getManagerReview();\n        this.getSelfReview();\n    }\n\n    getPeerReviews() {\n        const peers = this.lookupPeers();\n        // ...\n    }\n\n    lookupPeers() {\n        return db.lookup(this.employee, 'peers');\n    }\n\n    getManagerReview() {\n        const manager = this.lookupManager();\n    }\n\n    lookupManager() {\n        return db.lookup(this.employee, 'manager');\n    }\n\n    getSelfReview() {\n        // ...\n    }\n}\n\nconst review = new PerformanceReview(employee);\nreview.perfReview();\n</code></pre>\n<h2><strong>Comments</strong></h2>\n<h3>Only comment things that have business logic complexity.</h3>\n<p>Comments are an apology, not a requirement. Good code <em>mostly</em> documents itself.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">function hashIt(data) {\n    // The hash\n    let hash = 0;\n\n    // Length of string\n    const length = data.length;\n\n    // Loop through every character in data\n    for (let i = 0; i &#x3C; length; i++) {\n        // Get character code.\n        const char = data.charCodeAt(i);\n        // Make the hash\n        hash = (hash &#x3C;&#x3C; 5) - hash + char;\n        // Convert to 32-bit integer\n        hash &#x26;= hash;\n    }\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function hashIt(data) {\n    let hash = 0;\n    const length = data.length;\n\n    for (let i = 0; i &#x3C; length; i++) {\n        const char = data.charCodeAt(i);\n        hash = (hash &#x3C;&#x3C; 5) - hash + char;\n\n        // Convert to 32-bit integer\n        hash &#x26;= hash;\n    }\n}\n</code></pre>\n<h3>Don't leave commented out code in your codebase</h3>\n<p>Version control exists for a reason. Leave old code in your history.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">doStuff();\n// doOtherStuff();\n// doSomeMoreStuff();\n// doSoMuchStuff();\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">doStuff();\n</code></pre>\n<h3>Don't have journal comments</h3>\n<p>Remember, use version control! There's no need for dead code, commented code,\nand especially journal comments. Use <code>git log</code> to get history!</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">/**\n * 2016-12-20: Removed monads, didn't understand them (RM)\n * 2016-10-01: Improved using special monads (JP)\n * 2016-02-03: Removed type-checking (LI)\n * 2015-03-14: Added combine with type-checking (JR)\n */\nfunction combine(a, b) {\n    return a + b;\n}\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">function combine(a, b) {\n    return a + b;\n}\n</code></pre>\n<h3>Avoid positional markers</h3>\n<p>They usually just add noise. Let the functions and variable names along with the\nproper indentation and formatting give the visual structure to your code.</p>\n<p><strong>Bad:</strong></p>\n<pre><code class=\"language-javascript\">////////////////////////////////////////////////////////////////////////////////\n// Scope Model Instantiation\n////////////////////////////////////////////////////////////////////////////////\n$scope.model = {\n    menu: 'foo',\n    nav: 'bar'\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Action setup\n////////////////////////////////////////////////////////////////////////////////\nconst actions = function () {\n    // ...\n};\n</code></pre>\n<p><strong>Good:</strong></p>\n<pre><code class=\"language-javascript\">$scope.model = {\n    menu: 'foo',\n    nav: 'bar'\n};\n\nconst actions = function () {\n    // ...\n};\n</code></pre>\n<h2>Translation</h2>\n<p>This is also available in other languages:</p>\n<ul>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Armenia.png\" alt=\"am\"> <strong>Armenian</strong>: <a href=\"https://github.com/hanumanum/clean-code-javascript\">hanumanum/clean-code-javascript/</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Bangladesh.png\" alt=\"bd\"> <strong>Bangla(বাংলা)</strong>: <a href=\"https://github.com/InsomniacSabbir/clean-code-javascript/\">InsomniacSabbir/clean-code-javascript/</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Brazil.png\" alt=\"br\"> <strong>Brazilian Portuguese</strong>: <a href=\"https://github.com/fesnt/clean-code-javascript\">fesnt/clean-code-javascript</a></li>\n<li>\n<p><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/China.png\" alt=\"cn\"> <strong>Simplified Chinese</strong>:</p>\n<ul>\n<li><a href=\"https://github.com/alivebao/clean-code-js\">alivebao/clean-code-js</a></li>\n<li><a href=\"https://github.com/beginor/clean-code-javascript\">beginor/clean-code-javascript</a></li>\n</ul>\n</li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Taiwan.png\" alt=\"tw\"> <strong>Traditional Chinese</strong>: <a href=\"https://github.com/AllJointTW/clean-code-javascript\">AllJointTW/clean-code-javascript</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/France.png\" alt=\"fr\"> <strong>French</strong>: <a href=\"https://github.com/GavBaros/clean-code-javascript-fr\">GavBaros/clean-code-javascript-fr</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Germany.png\" alt=\"de\"> <strong>German</strong>: <a href=\"https://github.com/marcbruederlin/clean-code-javascript\">marcbruederlin/clean-code-javascript</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Indonesia.png\" alt=\"id\"> <strong>Indonesia</strong>: <a href=\"https://github.com/andirkh/clean-code-javascript/\">andirkh/clean-code-javascript/</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Italy.png\" alt=\"it\"> <strong>Italian</strong>: <a href=\"https://github.com/frappacchio/clean-code-javascript/\">frappacchio/clean-code-javascript/</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Japan.png\" alt=\"ja\"> <strong>Japanese</strong>: <a href=\"https://github.com/mitsuruog/clean-code-javascript/\">mitsuruog/clean-code-javascript/</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/South-Korea.png\" alt=\"kr\"> <strong>Korean</strong>: <a href=\"https://github.com/qkraudghgh/clean-code-javascript-ko\">qkraudghgh/clean-code-javascript-ko</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Poland.png\" alt=\"pl\"> <strong>Polish</strong>: <a href=\"https://github.com/greg-dev/clean-code-javascript-pl\">greg-dev/clean-code-javascript-pl</a></li>\n<li>\n<p><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Russia.png\" alt=\"ru\"> <strong>Russian</strong>:</p>\n<ul>\n<li><a href=\"https://github.com/BoryaMogila/clean-code-javascript-ru/\">BoryaMogila/clean-code-javascript-ru/</a></li>\n<li><a href=\"https://github.com/maksugr/clean-code-javascript\">maksugr/clean-code-javascript</a></li>\n</ul>\n</li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Spain.png\" alt=\"es\"> <strong>Spanish</strong>: <a href=\"https://github.com/tureey/clean-code-javascript\">tureey/clean-code-javascript</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Uruguay.png\" alt=\"es\"> <strong>Spanish</strong>: <a href=\"https://github.com/andersontr15/clean-code-javascript-es\">andersontr15/clean-code-javascript</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Serbia.png\" alt=\"rs\"> <strong>Serbian</strong>: <a href=\"https://github.com/doskovicmilos/clean-code-javascript\">doskovicmilos/clean-code-javascript/</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Turkey.png\" alt=\"tr\"> <strong>Turkish</strong>: <a href=\"https://github.com/bsonmez/clean-code-javascript/tree/turkish-translation\">bsonmez/clean-code-javascript</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Ukraine.png\" alt=\"ua\"> <strong>Ukrainian</strong>: <a href=\"https://github.com/mindfr1k/clean-code-javascript-ua\">mindfr1k/clean-code-javascript-ua</a></li>\n<li><img src=\"https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Vietnam.png\" alt=\"vi\"> <strong>Vietnamese</strong>: <a href=\"https://github.com/hienvd/clean-code-javascript/\">hienvd/clean-code-javascript/</a></li>\n</ul>"},{"url":"/docs/javascript/this-is-about-this/","relativePath":"docs/javascript/this-is-about-this.md","relativeDir":"docs/javascript","base":"this-is-about-this.md","name":"this-is-about-this","frontmatter":{"title":"WhatisTHIS","weight":0,"excerpt":"Arrow functions are great because the inner value of this cant be changed, its *always* the same as the outer this.","seo":{"title":"This in JavaScript","description":"Arrow functions are great because the inner value of this cant be changed, its *always* the same as the outer this.","robots":[],"extra":[]},"template":"docs"},"html":"<h1>What is THIS</h1>\n<h2>If the function is defined as an arrow function: <a href=\"https://web.dev/javascript-this/#arrow-functions\">#</a></h2>\n<pre><code>const arrowFunction = () => {  console.log(this);};\n</code></pre>\n<p>In this case, the value of <code>this</code> is <em>always</em> the same as <code>this</code> in the parent scope:</p>\n<pre><code>const outerThis = this;const arrowFunction = () => {  // Always logs `true`:  console.log(this === outerThis);};\n</code></pre>\n<p>Arrow functions are great because the inner value of <code>this</code> can't be changed, it's <em>always</em> the same as the outer <code>this</code>.</p>\n<h3>Other examples <a href=\"https://web.dev/javascript-this/#other-examples\">#</a></h3>\n<p>With arrow functions, the value of <code>this</code> <em>can't</em> be changed with <a href=\"https://web.dev/javascript-this/#bound\"><code>bind</code></a>:</p>\n<pre><code>// Logs `true` - bound `this` value is ignored:arrowFunction.bind({foo: 'bar'})();\n</code></pre>\n<p>With arrow functions, the value of <code>this</code> <em>can't</em> be changed with <a href=\"https://web.dev/javascript-this/#call-apply\"><code>call</code> or <code>apply</code></a>:</p>\n<pre><code>// Logs `true` - called `this` value is ignored:arrowFunction.call({foo: 'bar'});// Logs `true` - applied `this` value is ignored:arrowFunction.apply({foo: 'bar'});\n</code></pre>\n<p>With arrow functions, the value of <code>this</code> <em>can't</em> be changed by calling the function as a member of another object:</p>\n<pre><code>const obj = {arrowFunction};// Logs `true` - parent object is ignored:obj.arrowFunction();\n</code></pre>\n<p>With arrow functions, the value of <code>this</code> <em>can't</em> be changed by calling the function as a constructor:</p>\n<pre><code>// TypeError: arrowFunction is not a constructornew arrowFunction();\n</code></pre>\n<h3>'Bound' instance methods <a href=\"https://web.dev/javascript-this/#&#x27;bound&#x27;-instance-methods\">#</a></h3>\n<p>With instance methods, if you want to ensure <code>this</code> always refers to the class instance, the best way is to use arrow functions and <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields\">class fields</a>:</p>\n<pre><code>class Whatever {  someMethod = () => {    // Always the instance of Whatever:    console.log(this);  };}\n</code></pre>\n<p>This pattern is really useful when using instance methods as event listeners in components (such as React components, or web components).</p>\n<p>The above might feel like it's breaking the \"<code>this</code> will be the same as <code>this</code> in the parent scope\" rule, but it starts to make sense if you think of class fields as syntactic sugar for setting things in the constructor:</p>\n<pre><code>class Whatever {  someMethod = (() => {    const outerThis = this;    return () => {      // Always logs `true`:      console.log(this === outerThis);    };  })();}// ...is roughly equivalent to:class Whatever {  constructor() {    const outerThis = this;    this.someMethod = () => {      // Always logs `true`:      console.log(this === outerThis);    };  }}\n</code></pre>\n<p>Alternative pattens involve binding an existing function in the constructor, or assigning the function in the constructor. If you can't use class fields for some reason, assigning functions in the constructor is a reasonable alternative:</p>\n<pre><code>class Whatever {  constructor() {    this.someMethod = () => {      // ...    };  }}\n</code></pre>\n<h2>Otherwise, if the function/class is called with <code>new</code>: <a href=\"https://web.dev/javascript-this/#new\">#</a></h2>\n<pre><code>new Whatever();\n</code></pre>\n<p>The above will call <code>Whatever</code> (or its constructor function if it's a class) with <code>this</code> set to the result of <code>Object.create(Whatever.prototype)</code>.</p>\n<pre><code>class MyClass {  constructor() {    console.log(      this.constructor === Object.create(MyClass.prototype).constructor,    );  }}// Logs `true`:new MyClass();\n</code></pre>\n<p>The same is true for older-style constructors:</p>\n<pre><code>function MyClass() {  console.log(    this.constructor === Object.create(MyClass.prototype).constructor,  );}// Logs `true`:new MyClass();\n</code></pre>\n<h3>Other examples <a href=\"https://web.dev/javascript-this/#other-examples-2\">#</a></h3>\n<p>When called with <code>new</code>, the value of <code>this</code> <em>can't</em> be changed with <a href=\"https://web.dev/javascript-this/#bound\"><code>bind</code></a>:</p>\n<pre><code>const BoundMyClass = MyClass.bind({foo: 'bar'});// Logs `true` - bound `this` value is ignored:new BoundMyClass();\n</code></pre>\n<p>When called with <code>new</code>, the value of <code>this</code> <em>can't</em> be changed by calling the function as a member of another object:</p>\n<pre><code>const obj = {MyClass};// Logs `true` - parent object is ignored:new obj.MyClass();\n</code></pre>\n<h2>Otherwise, if the function has a 'bound' <code>this</code> value: <a href=\"https://web.dev/javascript-this/#bound\">#</a></h2>\n<pre><code>function someFunction() {  return this;}const boundObject = {hello: 'world'};const boundFunction = someFunction.bind(boundObject);\n</code></pre>\n<p>Whenever <code>boundFunction</code> is called, its <code>this</code> value will be the object passed to <code>bind</code> (<code>boundObject</code>).</p>\n<pre><code>// Logs `false`:console.log(someFunction() === boundObject);// Logs `true`:console.log(boundFunction() === boundObject);\n</code></pre>\n<p>Warning: Avoid using <code>bind</code> to bind a function to its outer <code>this</code>. Instead, use <a href=\"https://web.dev/javascript-this/#arrow-functions\">arrow functions</a>, as they make <code>this</code> clear from the function declaration, rather than something that happens later in the code.</p>\n<p>Don't use <code>bind</code> to set <code>this</code> to some value unrelated to the parent object; it's usually unexpected and it's why <code>this</code> gets such a bad reputation. Consider passing the value as an argument instead; it's more explicit, and works with arrow functions.</p>\n<h3>Other examples <a href=\"https://web.dev/javascript-this/#other-examples-3\">#</a></h3>\n<p>When calling a bound function, the value of <code>this</code> <em>can't</em> be changed with <a href=\"https://web.dev/javascript-this/#call-apply\"><code>call</code> or <code>apply</code></a>:</p>\n<pre><code>// Logs `true` - called `this` value is ignored:console.log(boundFunction.call({foo: 'bar'}) === boundObject);// Logs `true` - applied `this` value is ignored:console.log(boundFunction.apply({foo: 'bar'}) === boundObject);\n</code></pre>\n<p>When calling a bound function, the value of <code>this</code> <em>can't</em> be changed by calling the function as a member of another object:</p>\n<pre><code>const obj = {boundFunction};// Logs `true` - parent object is ignored:console.log(obj.boundFunction() === boundObject);\n</code></pre>\n<h2>Otherwise, if <code>this</code> is set at call-time: <a href=\"https://web.dev/javascript-this/#call-apply\">#</a></h2>\n<pre><code>function someFunction() {  return this;}const someObject = {hello: 'world'};// Logs `true`:console.log(someFunction.call(someObject) === someObject);// Logs `true`:console.log(someFunction.apply(someObject) === someObject);\n</code></pre>\n<p>The value of <code>this</code> is the object passed to <code>call</code>/<code>apply</code>.</p>\n<p>Warning: Don't use <code>call</code>/<code>apply</code> to set <code>this</code> to some value unrelated to the parent object; it's usually unexpected and it's why <code>this</code> gets such a bad reputation. Consider passing the value as an argument instead; it's more explicit, and works with arrow functions.</p>\n<p>Unfortunately <code>this</code> is set to some other value by things like DOM event listeners, and using it can result in difficult-to-understand code:</p>\n<p>Don't</p>\n<pre><code>element.addEventListener('click', function (event) {  // Logs `element`, since the DOM spec sets `this` to  // the element the handler is attached to.  console.log(this);});\n</code></pre>\n<p>I avoid using <code>this</code> in cases like above, and instead:</p>\n<p>Do</p>\n<pre><code>element.addEventListener('click', (event) => {  // Ideally, grab it from a parent scope:  console.log(element);  // But if you can't do that, get it from the event object:  console.log(event.currentTarget);});\n</code></pre>\n<h2>Otherwise, if the function is called via a parent object (<code>parent.func()</code>): <a href=\"https://web.dev/javascript-this/#object-member\">#</a></h2>\n<pre><code>const obj = {  someMethod() {    return this;  },};// Logs `true`:console.log(obj.someMethod() === obj);\n</code></pre>\n<p>In this case the function is called as a member of <code>obj</code>, so <code>this</code> will be <code>obj</code>. This happens at call-time, so the link is broken if the function is called without its parent object, or with a different parent object:</p>\n<pre><code>const {someMethod} = obj;// Logs `false`:console.log(someMethod() === obj);const anotherObj = {someMethod};// Logs `false`:console.log(anotherObj.someMethod() === obj);// Logs `true`:console.log(anotherObj.someMethod() === anotherObj);\n</code></pre>\n<p><code>someMethod() === obj</code> is false because <code>someMethod</code> <em>isn't</em> called as a member of <code>obj</code>. You might have encountered this gotcha when trying something like this:</p>\n<pre><code>const $ = document.querySelector;// TypeError: Illegal invocationconst el = $('.some-element');\n</code></pre>\n<p>This breaks because the implementation of <code>querySelector</code> looks at its own <code>this</code> value and expects it to be a DOM node of sorts, and the above breaks that connection. To achieve the above correctly:</p>\n<pre><code>const $ = document.querySelector.bind(document);// Or:const $ = (...args) => document.querySelector(...args);\n</code></pre>\n<p>Fun fact: Not all APIs use <code>this</code> internally. Console methods like <code>console.log</code> were changed to avoid <code>this</code> references, so <code>log</code> doesn't need to be bound to <code>console</code>.</p>\n<p>Warning: Don't transplant a function onto an object just to set <code>this</code> to some value unrelated to the parent object; it's usually unexpected and it's why <code>this</code> gets such a bad reputation. Consider passing the value as an argument instead; it's more explicit, and works with arrow functions.</p>\n<h2>Otherwise, if the function or parent scope is in strict mode: <a href=\"https://web.dev/javascript-this/#strict\">#</a></h2>\n<pre><code>function someFunction() {  'use strict';  return this;}// Logs `true`:console.log(someFunction() === undefined);\n</code></pre>\n<p>In this case, the value of <code>this</code> is undefined. <code>'use strict'</code> isn't needed in the function if the parent scope is in <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode\">strict mode</a> (and all modules are in strict mode).</p>\n<p>Warning: Don't rely on this. I mean, there are easier ways to get an <code>undefined</code> value 😀.</p>\n<h2>Otherwise: <a href=\"https://web.dev/javascript-this/#otherwise\">#</a></h2>\n<pre><code>function someFunction() {  return this;}// Logs `true`:console.log(someFunction() === globalThis);\n</code></pre>\n<p>In this case, the value of <code>this</code> is the same as <code>globalThis</code>.</p>"},{"url":"/docs/leetcode/004._Median_of_Two_Sorted_Arrays/","relativePath":"docs/leetcode/004._Median_of_Two_Sorted_Arrays.md","relativeDir":"docs/leetcode","base":"004._Median_of_Two_Sorted_Arrays.md","name":"004._Median_of_Two_Sorted_Arrays","frontmatter":{"title":"004._Median_of_Two_Sorted_Arrays","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/median-of-two-sorted-arrays/description/\">4. Median of Two Sorted Arrays</a></h2>\n<h3>Problem:</h3>\n<p>There are two sorted arrays nums1 and nums2 of size m and n respectively.</p>\n<p>Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).</p>\n<p>Example 1:</p>\n<pre><code>nums1 = [1, 3]\nnums2 = [2]\n\nThe median is 2.0\n</code></pre>\n<p>Example 2:</p>\n<pre><code>nums1 = [1, 2]\nnums2 = [3, 4]\n\nThe median is (2 + 3)/2 = 2.5\n</code></pre>\n<h3>Solution:</h3>\n<p>O(log (m+n)) means half of the sequence is ruled out on each loop. So obviously we need binary search.</p>\n<p>To do it on two sorted arrays, we need a formula to guide division.</p>\n<p>Let <code>nums3</code> be the sorted array combining all the items in <code>nums1</code> and <code>nums2</code>.</p>\n<p>If <code>nums2[j-1] &#x3C;= nums1[i] &#x3C;= nums2[j]</code>, then we know <code>nums1[i]</code> is at <code>num3[i+j]</code>. Same goes <code>nums1[i-1] &#x3C;= nums2[j] &#x3C;= nums1[i]</code>.</p>\n<p>Let <code>k</code> be <code>⌊(m+n-1)/2⌋</code>. We need to find <code>nums3[k]</code> (and also <code>nums3[k+1]</code> if m+n is even).</p>\n<p>Let <code>i + j = k</code>, if we find <code>nums2[j-1] &#x3C;= nums1[i] &#x3C;= nums2[j]</code> or <code>nums1[i-1] &#x3C;= nums2[j] &#x3C;= nums1[i]</code>, then we got <code>k</code>.</p>\n<p>Otherwise, if <code>nums1[i] &#x3C;= nums2[j]</code> then we know <code>nums1[i] &#x3C; nums2[j-1]</code> (because we did not find <code>k</code>).</p>\n<ul>\n<li>There are <code>i</code> items before <code>nums1[i]</code>, and <code>j-1</code> items brefor <code>nums2[j-1]</code>, which means <code>nums1[0...i]</code> are before <code>nums3[i+j-1]</code>. So we now know <code>nums1[0...i] &#x3C; nums3[k]</code>. They can be safely discarded.</li>\n<li>We Also have <code>nums1[i] &#x3C; nums2[j]</code>, which means <code>nums2[j...n)</code> are after <code>nums3[i+j]</code>. So <code>nums2[j...n) > nums3[k]</code>.</li>\n</ul>\n<p>Same goes <code>nums1[i-1] &#x3C;= nums2[j] &#x3C;= nums1[i]</code>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} nums1\n * @param {number[]} nums2\n * @return {number}\n */\nlet findMedianSortedArrays = function (nums1, nums2) {\n  const mid = ((nums1.length + nums2.length - 1) / 2) | 0;\n\n  if ((nums1.length + nums2.length) % 2 === 0) {\n    return (_find(nums1, nums2, mid) + _find(nums1, nums2, mid + 1)) / 2;\n  }\n\n  return _find(nums1, nums2, mid);\n};\n\nfunction _find(nums1, nums2, k) {\n  if (nums1.length > nums2.length) {\n    // So that the `i` below is always smalller than k,\n    // which makes `j` always non-negative\n    [nums1, nums2] = [nums2, nums1];\n  }\n  let s1 = 0;\n  let s2 = 0;\n  let e1 = nums1.length;\n  let e2 = nums2.length;\n\n  while (s1 &#x3C; e1 || s2 &#x3C; e2) {\n    const i = s1 + (((e1 - s1) / 2) | 0);\n    const j = k - i;\n    const ni = i >= e1 ? Infinity : nums1[i];\n    const nj = j >= e2 ? Infinity : nums2[j];\n    const ni_1 = i &#x3C;= 0 ? -Infinity : nums1[i - 1];\n    const nj_1 = j &#x3C;= 0 ? -Infinity : nums2[j - 1];\n\n    if (nj_1 &#x3C;= ni &#x26;&#x26; ni &#x3C;= nj) {\n      return ni;\n    }\n\n    if (ni_1 &#x3C;= nj &#x26;&#x26; nj &#x3C;= ni) {\n      return nj;\n    }\n\n    if (ni &#x3C;= nj) {\n      s1 = i + 1;\n      e2 = j;\n    } else {\n      s2 = j + 1;\n      e1 = i;\n    }\n  }\n}\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/006._ZigZag_Conversion/","relativePath":"docs/leetcode/006._ZigZag_Conversion.md","relativeDir":"docs/leetcode","base":"006._ZigZag_Conversion.md","name":"006._ZigZag_Conversion","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/zigzag-conversion/description/\">6. ZigZag Conversion</a></h2>\n<h3>Problem:</h3>\n<p>The string <code>\"PAYPALISHIRING\"</code> is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)</p>\n<pre><code>P   A   H   N\nA P L S I I G\nY   I   R\n</code></pre>\n<p>And then read line by line: <code>\"PAHNAPLSIIGYIR\"</code></p>\n<p>Write the code that will take a string and make this conversion given a number of rows:</p>\n<pre><code>string convert(string s, int numRows);\n</code></pre>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: s = \"PAYPALISHIRING\", numRows = 3\nOutput: \"PAHNAPLSIIGYIR\"\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: s = \"PAYPALISHIRING\", numRows = 4\nOutput: \"PINALSIGYAHRPI\"\nExplanation:\n\nP     I    N\nA   L S  I G\nY A   H R\nP     I\n</code></pre>\n<h3>Solution:</h3>\n<p>Squeeze the zigzag pattern horizontally to form a matrix. Now deal with the odd and even columns respectively.</p>\n<p>For example let numRows be 5, if we list out the indecies:</p>\n<pre><code>row\n 1    00    08    16\n 2    01 07 09 15 17\n 3    02 06 10 14 18\n 4    03 05 11 13 19\n 5    04    12    20\n</code></pre>\n<p>First calculate the matrix width:</p>\n<pre><code>pairs = floor( len(s) / (numRows + numRows - 2) )\nwidth = pairs * 2 + ceil( (len(s) - pairs * (numRows + numRows - 2)) / numRows )\n</code></pre>\n<p>We can easily make a observation that the direction of odd and even columns and different.</p>\n<p>Let the first column be index 0 and let i be the current position at column col.</p>\n<p>We need to count the items between matrix[row][col] and matrix[row][col+1], exclusive.</p>\n<pre><code>next_i = i + (numRows - row) + (numRows - row), if col is even &#x26;&#x26; 1 &#x3C; row &#x3C; numRows\nnext_i = i + row - 2 + row, if col is odd &#x26;&#x26; 1 &#x3C; row &#x3C; numRows\n</code></pre>\n<p>If row == 1 or row == numRows, skip the odd columns.</p>\n<pre><code>next_i = i + numRows + (numRows - 2), if col is even &#x26;&#x26; (row == 1 || row == numRows)\n</code></pre>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @param {number} numRows\n * @return {string}\n */\nlet convert = function (s, numRows) {\n  if (numRows &#x3C;= 1) {\n    return s;\n  }\n\n  const pairs = Math.floor(s.length / (numRows + numRows - 2));\n  const width =\n    pairs * 2 +\n    Math.ceil((s.length - pairs * (numRows + numRows - 2)) / numRows);\n\n  let result = \"\";\n\n  for (let row = 1; row &#x3C;= numRows; row++) {\n    let i = row - 1;\n    result += s[i] || \"\";\n    for (let col = 0; col &#x3C; width; col++) {\n      if (row === 1 || row === numRows) {\n        if (col % 2 === 0) {\n          i += numRows + (numRows - 2);\n        } else {\n          continue;\n        }\n      } else {\n        if (col % 2 === 0) {\n          i += numRows - row + (numRows - row);\n        } else {\n          i += row - 2 + row;\n        }\n      }\n      result += s[i] || \"\";\n    }\n  }\n\n  return result;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/009._Palindrome_Number/","relativePath":"docs/leetcode/009._Palindrome_Number.md","relativeDir":"docs/leetcode","base":"009._Palindrome_Number.md","name":"009._Palindrome_Number","frontmatter":{"title":"009._Palindrome_Number","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/palindrome-number/description/\">9. Palindrome Number</a></h2>\n<h3>Problem:</h3>\n<p>Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: 121\nOutput: true\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: -121\nOutput: false\nExplanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: 10\nOutput: false\nExplanation: Reads 01 from right to left. Therefore it is not a palindrome.\n</code></pre>\n<p><strong>Follow up:</strong></p>\n<p>Coud you solve it without converting the integer to a string?</p>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Easy to write but slow since it generates an array.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} x\n * @return {boolean}\n */\nlet isPalindrome = function (x) {\n  return x == String(x).split(\"\").reverse().join(\"\");\n};\n</code></pre>\n<h4>TWO</h4>\n<p>A bit faster.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} x\n * @return {boolean}\n */\nlet isPalindrome = function (x) {\n  const s = String(x);\n  for (let i = 0, j = s.length - 1; i &#x3C; j; i++, j--) {\n    if (s[i] !== s[j]) {\n      return false;\n    }\n  }\n  return true;\n};\n</code></pre>\n<h4>THREE</h4>\n<p>General solution. Combining <a href=\"./007.%20Reverse%20Integer.md\">7. Reverse Integer</a>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} x\n * @return {boolean}\n */\nlet isPalindrome = function (x) {\n  if (x &#x3C; 0) {\n    return false;\n  }\n  return x === reverse(x);\n};\n\n/**\n * @param {number} x\n * @return {number}\n */\nfunction reverse(x) {\n  let result = 0;\n  while (x) {\n    result = result * 10 + (x % 10);\n    x = (x / 10) | 0;\n  }\n  return result;\n}\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/008._String_to_Integer_(atoi)/","relativePath":"docs/leetcode/008._String_to_Integer_(atoi).md","relativeDir":"docs/leetcode","base":"008._String_to_Integer_(atoi).md","name":"008._String_to_Integer_(atoi)","frontmatter":{"title":"008._String_to_Integer","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/string-to-integer-atoi/description/\">8. String to Integer (atoi)</a></h2>\n<h3>Problem:</h3>\n<p>Implement <code>atoi</code> which converts a string to an integer.</p>\n<p>The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.</p>\n<p>The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function.</p>\n<p>If the first sequence of non-whitespace characters in str is not a valid integral number, or if no such sequence exists because either str is empty or it contains only whitespace characters, no conversion is performed.</p>\n<p>If no valid conversion could be performed, a zero value is returned.</p>\n<p><strong>Note:</strong></p>\n<p>Only the space character <code>' '</code> is considered as whitespace character.\nAssume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−231,  231 − 1]. If the numerical value is out of the range of representable values, INT<em>MAX (231 − 1) or INT</em>MIN (−231) is returned.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: \"42\"\nOutput: 42\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: \"   -42\"\nOutput: -42\nExplanation: The first non-whitespace character is '-', which is the minus sign.\n             Then take as many numerical digits as possible, which gets 42.\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: \"4193 with words\"\nOutput: 4193\nExplanation: Conversion stops at digit '3' as the next character is not a numerical digit.\n</code></pre>\n<p><strong>Example 4:</strong></p>\n<pre><code>Input: \"words and 987\"\nOutput: 0\nExplanation: The first non-whitespace character is 'w', which is not a numerical\n             digit or a +/- sign. Therefore no valid conversion could be performed.\n</code></pre>\n<p><strong>Example 5:</strong></p>\n<pre><code>Input: \"-91283472332\"\nOutput: -2147483648\nExplanation: The number \"-91283472332\" is out of the range of a 32-bit signed integer.\n             Thefore INT_MIN (−231) is returned.\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<pre><code class=\"language-javascript\">/**\n * @param {string} str\n * @return {number}\n */\nlet myAtoi = function (str) {\n  return Math.min(2147483647, Math.max(-2147483648, parseInt(str))) || 0;\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Looks like <code>Number()</code> is faster than <code>parseInt()</code>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} str\n * @return {number}\n */\nlet myAtoi = function (str) {\n  return Math.min(\n    2147483647,\n    Math.max(-2147483648, (/^ *[-+]?\\d+/.exec(str) || [0])[0])\n  );\n};\n</code></pre>\n<h4>THREE</h4>\n<p>General solution.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} str\n * @return {number}\n */\nlet myAtoi = function (str) {\n  let sign = 1;\n  let i = 0;\n\n  while (i &#x3C; str.length) {\n    const cc = str.charCodeAt(i++);\n    if (cc === 45) {\n      // -\n      sign = -1;\n      break;\n    } else if (cc === 43) {\n      // +\n      break;\n    } else if (cc >= 48 &#x26;&#x26; cc &#x3C;= 57) {\n      // 0-9\n      i--;\n      break;\n    } else if (cc !== 32) {\n      // space\n      return 0;\n    }\n  }\n\n  let result = 0;\n  while (i &#x3C; str.length) {\n    const digit = str.charCodeAt(i++) - 48;\n    if (digit &#x3C; 0 || digit > 9) {\n      break;\n    }\n    result = result * 10 + digit;\n  }\n\n  return Math.min(2147483647, Math.max(-2147483648, result * sign));\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/javascript/promises/","relativePath":"docs/javascript/promises.md","relativeDir":"docs/javascript","base":"promises.md","name":"promises","frontmatter":{"title":"Promises","weight":0,"excerpt":"Promises","seo":{"title":"Promises","description":"JavaScript is single threaded, meaning that two bits of script cannot run at the same time; they have to run one after another.","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Promises</h2>\n<p>JavaScript is single threaded, meaning that two bits of script cannot run at the same time; they have to run one after another. In browsers, JavaScript shares a thread with a load of other stuff that differs from browser to browser. But typically JavaScript is in the same queue as painting, updating styles, and handling user actions (such as highlighting text and interacting with form controls). Activity in one of these things delays the others.</p>\n<p>As a human being, you're multithreaded. You can type with multiple fingers, you can drive and hold a conversation at the same time. The only blocking function we have to deal with is sneezing, where all current activity must be suspended for the duration of the sneeze. That's pretty annoying, especially when you're driving and trying to hold a conversation. You don't want to write code that's sneezy.</p>\n<p>You've probably used events and callbacks to get around this. Here are events:</p>\n<pre><code class=\"language-js\">var img1 = document.querySelector('.img-1');\nimg1.addEventListener('load', function() {  \n// woo yey image loaded\n});\nimg1.addEventListener('error', function() {  \n// argh everything's broken\n});\n</code></pre>\n<p>This isn't sneezy at all. We get the image, add a couple of listeners, then JavaScript can stop executing until one of those listeners is called.</p>\n<p>Unfortunately, in the example above, it's possible that the events happened before we started listening for them, so we need to work around that using the \"complete\" property of images:</p>\n<pre><code class=\"language-js\">var img1 = document.querySelector('.img-1');\nfunction loaded() {  \n// woo yey image loaded}if (img1.complete) {  \nloaded();\n}else {  \nimg1.addEventListener('load', loaded);\n}img1.addEventListener('error', function() {  \n// argh everything's broken\n});\n</code></pre>\n<p>This doesn't catch images that errored before we got a chance to listen for them; unfortunately the DOM doesn't give us a way to do that. Also, this is loading one image. Things get even more complex if we want to know when a set of images have loaded.</p>\n<h2>Events aren't always the best way <a href=\"https://web.dev/promises/#events-aren&#x27;t-always-the-best-way\">#</a></h2>\n<p>Events are great for things that can happen multiple times on the same object---<code>keyup</code>, <code>touchstart</code> etc. With those events you don't really care about what happened before you attached the listener. But when it comes to async success/failure, ideally you want something like this:</p>\n<pre><code class=\"language-js\">img1.callThisIfLoadedOrWhenLoaded(function() {  \n// loaded}).orIfFailedCallThis(function() {  \n// failed\n});\n// and...whenAllTheseHaveLoaded([img1, img2]).callThis(function() {  \n// all loaded}).orIfSomeFailedCallThis(function() {  \n// one or more failed\n});\n</code></pre>\n<p>This is what promises do, but with better naming. If HTML image elements had a \"ready\" method that returned a promise, we could do this:</p>\n<pre><code class=\"language-js\">img1.ready().then(function() {  \n// loaded}, function() {  \n// failed\n});\n// and...Promise.all([img1.ready(), img2.ready()]).then(function() {  \n// all loaded}, function() {  \n// one or more failed\n});\n</code></pre>\n<p>At their most basic, promises are a bit like event listeners except:</p>\n<ul>\n<li>A promise can only succeed or fail once. It cannot succeed or fail twice, neither can it switch from success to failure or vice versa.</li>\n<li>If a promise has succeeded or failed and you later add a success/failure callback, the correct callback will be called, even though the event took place earlier.</li>\n</ul>\n<p>This is extremely useful for async success/failure, because you're less interested in the exact time something became available, and more interested in reacting to the outcome.</p>\n<h2>Promise terminology <a href=\"https://web.dev/promises/#promise-terminology\">#</a></h2>\n<p><a href=\"https://twitter.com/domenic\">Domenic Denicola</a> proof read the first draft of this article and graded me \"F\" for terminology. He put me in detention, forced me to copy out <a href=\"https://github.com/domenic/promises-unwrapping/blob/master/docs/states-and-fates.md\">States and Fates</a> 100 times, and wrote a worried letter to my parents. Despite that, I still get a lot of the terminology mixed up, but here are the basics:</p>\n<p>A promise can be:</p>\n<ul>\n<li>fulfilled - The action relating to the promise succeeded</li>\n<li>rejected - The action relating to the promise failed</li>\n<li>pending - Hasn't fulfilled or rejected yet</li>\n<li>settled - Has fulfilled or rejected</li>\n</ul>\n<p><a href=\"https://www.ecma-international.org/ecma-262/#sec-promise-objects\">The spec</a> also uses the term thenable to describe an object that is promise-like, in that it has a <code>then</code> method. This term reminds me of ex-England Football Manager <a href=\"https://en.wikipedia.org/wiki/Terry_Venables\">Terry Venables</a> so I'll be using it as little as possible.</p>\n<h2>Promises arrive in JavaScript! <a href=\"https://web.dev/promises/#promises-arrive-in-javascript!\">#</a></h2>\n<p>Promises have been around for a while in the form of libraries, such as:</p>\n<ul>\n<li><a href=\"https://github.com/kriskowal/q\">Q</a></li>\n<li><a href=\"https://github.com/cujojs/when\">when</a></li>\n<li><a href=\"https://msdn.microsoft.com/en-us/library/windows/apps/br211867.aspx\">WinJS</a></li>\n<li><a href=\"https://github.com/tildeio/rsvp.js\">RSVP.js</a></li>\n</ul>\n<p>The above and JavaScript promises share a common, standardized behaviour called <a href=\"https://github.com/promises-aplus/promises-spec\">Promises/A+</a>. If you're a jQuery user, they have something similar called <a href=\"https://api.jquery.com/category/deferred-object/\">Deferreds</a>. However, Deferreds aren't Promise/A+ compliant, which makes them <a href=\"https://thewayofcode.wordpress.com/tag/jquery-deferred-broken/\">subtly different and less useful</a>, so beware. jQuery also has <a href=\"https://api.jquery.com/Types/#Promise\">a Promise type</a>, but this is just a subset of Deferred and has the same issues.</p>\n<p>Although promise implementations follow a standardized behaviour, their overall APIs differ. JavaScript promises are similar in API to RSVP.js. Here's how you create a promise:</p>\n<pre><code class=\"language-js\">var promise = new Promise(function(resolve, reject) {  \n// do a thing, possibly async, then...  if (/* everything turned out fine */) {  \n  resolve(\"Stuff worked!\");\n  }  else {  \n  reject(Error(\"It broke\"));\n  }\n});\n</code></pre>\n<p>The promise constructor takes one argument, a callback with two parameters, resolve and reject. Do something within the callback, perhaps async, then call resolve if everything worked, otherwise call reject.</p>\n<p>Like <code>throw</code> in plain old JavaScript, it's customary, but not required, to reject with an Error object. The benefit of Error objects is they capture a stack trace, making debugging tools more helpful.</p>\n<p>Here's how you use that promise:</p>\n<pre><code class=\"language-js\">promise.then(function(result) {  \nconsole.log(result);\n // \"Stuff worked!\"}, function(err) {  \nconsole.log(err);\n // Error: \"It broke\"\n});\n</code></pre>\n<p><code>then()</code> takes two arguments, a callback for a success case, and another for the failure case. Both are optional, so you can add a callback for the success or failure case only.</p>\n<p>JavaScript promises started out in the DOM as \"Futures\", renamed to \"Promises\", and finally moved into JavaScript. Having them in JavaScript rather than the DOM is great because they'll be available in non-browser JS contexts such as Node.js (whether they make use of them in their core APIs is another question).</p>\n<p>Although they're a JavaScript feature, the DOM isn't afraid to use them. In fact, all new DOM APIs with async success/failure methods will use promises. This is happening already with <a href=\"https://dvcs.w3.org/hg/quota/raw-file/tip/Overview.html#idl-def-StorageQuota\">Quota Management</a>, <a href=\"http://dev.w3.org/csswg/css-font-loading/#font-face-set-ready\">Font Load Events</a>, <a href=\"https://github.com/slightlyoff/ServiceWorker/blob/cf459d473ae09f6994e8539113d277cbd2bce939/service_worker.ts#L17\">ServiceWorker</a>, <a href=\"https://webaudio.github.io/web-midi-api/#widl-Navigator-requestMIDIAccess-Promise-MIDIOptions-options\">Web MIDI</a>, <a href=\"https://github.com/whatwg/streams#basereadablestream\">Streams</a>, and more.</p>\n<h2>Browser support &#x26; polyfill <a href=\"https://web.dev/promises/#browser-support-and-polyfill\">#</a></h2>\n<p>There are already implementations of promises in browsers today.</p>\n<p>As of Chrome 32, Opera 19, Firefox 29, Safari 8 &#x26; Microsoft Edge, promises are enabled by default.</p>\n<p>To bring browsers that lack a complete promises implementation up to spec compliance, or add promises to other browsers and Node.js, check out <a href=\"https://github.com/jakearchibald/ES6-Promises#readme\">the polyfill</a> (2k gzipped).</p>\n<h2>Compatibility with other libraries <a href=\"https://web.dev/promises/#compatibility-with-other-libraries\">#</a></h2>\n<p>The JavaScript promises API will treat anything with a <code>then()</code> method as promise-like (or <code>thenable</code> in promise-speak <em>sigh</em>), so if you use a library that returns a Q promise, that's fine, it'll play nice with the new JavaScript promises.</p>\n<p>Although, as I mentioned, jQuery's Deferreds are a bit ... unhelpful. Thankfully you can cast them to standard promises, which is worth doing as soon as possible:</p>\n<pre><code class=\"language-js\">var jsPromise = Promise.resolve($.ajax('/whatever.json'))\n</code></pre>\n<p>Here, jQuery's <code>$.ajax</code> returns a Deferred. Since it has a <code>then()</code> method, <code>Promise.resolve()</code> can turn it into a JavaScript promise. However, sometimes deferreds pass multiple arguments to their callbacks, for example:</p>\n<pre><code class=\"language-js\">var jqDeferred = $.ajax('/whatever.json');\njqDeferred.then(function(response, statusText, xhrObj) {  \n// ...}, function(xhrObj, textStatus, err) {  \n// ...})\n</code></pre>\n<p>Whereas JS promises ignore all but the first:</p>\n<pre><code class=\"language-js\">jsPromise.then(function(response) {  \n// ...}, function(xhrObj) {  \n// ...})\n</code></pre>\n<p>Thankfully this is usually what you want, or at least gives you access to what you want. Also, be aware that jQuery doesn't follow the convention of passing Error objects into rejections.</p>\n<h2>Complex async code made easier <a href=\"https://web.dev/promises/#complex-async-code-made-easier\">#</a></h2>\n<p>Right, let's code some things. Say we want to:</p>\n<ol>\n<li>Start a spinner to indicate loading</li>\n<li>Fetch some JSON for a story, which gives us the title, and urls for each chapter</li>\n<li>Add title to the page</li>\n<li>Fetch each chapter</li>\n<li>Add the story to the page</li>\n<li>Stop the spinner</li>\n</ol>\n<p>... but also tell the user if something went wrong along the way. We'll want to stop the spinner at that point too, else it'll keep on spinning, get dizzy, and crash into some other UI.</p>\n<p>Of course, you wouldn't use JavaScript to deliver a story, <a href=\"https://jakearchibald.com/2013/progressive-enhancement-is-faster/\">serving as HTML is faster</a>, but this pattern is pretty common when dealing with APIs: Multiple data fetches, then do something when it's all done.</p>\n<p>To start with, let's deal with fetching data from the network:</p>\n<h2>Promisifying XMLHttpRequest <a href=\"https://web.dev/promises/#promisifying-xmlhttprequest\">#</a></h2>\n<p>Old APIs will be updated to use promises, if it's possible in a backwards compatible way. <code>XMLHttpRequest</code> is a prime candidate, but in the mean time let's write a simple function to make a GET request:</p>\n<pre><code class=\"language-js\">function get(url) {\n  // Return a new promise.\n  return new Promise(function(resolve, reject) {\n    // Do the usual XHR stuff\n    var req = new XMLHttpRequest();\n\n    req.open('GET', url);\n\n\n    req.onload = function() {\n      // This is called even on 404 etc\n      // so check the status\n      if (req.status == 200) {\n        // Resolve the promise with the response text\n        resolve(req.response);\n\n      }\n      else {\n        // Otherwise reject with the status text\n        // which will hopefully be a meaningful error\n        reject(Error(req.statusText));\n\n      }\n    };\n\n    // Handle network errors\n    req.onerror = function() {\n      reject(Error(\"Network Error\"));\n\n    };\n\n    // Make the request\n    req.send();\n\n  \n});\n\n}\n</code></pre>\n<p>Now let's use it:</p>\n<pre><code class=\"language-js\">get('story.json').then(function(response) {\n  console.log(\"Success!\", response);\n\n}, function(error) {\n  console.error(\"Failed!\", error);\n\n})\n</code></pre>\n<p>Now we can make HTTP requests without manually typing <code>XMLHttpRequest</code>, which is great, because the less I have to see the infuriating camel-casing of <code>XMLHttpRequest</code>, the happier my life will be.</p>\n<h2>Chaining <a href=\"https://web.dev/promises/#chaining\">#</a></h2>\n<p><code>then()</code> isn't the end of the story, you can chain <code>then</code>s together to transform values or run additional async actions one after another.</p>\n<h3>Transforming values <a href=\"https://web.dev/promises/#transforming-values\">#</a></h3>\n<p>You can transform values simply by returning the new value:</p>\n<pre><code class=\"language-js\">var promise = new Promise(function(resolve, reject) {\n  resolve(1);\n\n\n});\n\n\npromise.then(function(val) {\n  console.log(val);\n // 1\n  return val + 2;\n}).then(function(val) {\n  console.log(val);\n // 3\n})\n</code></pre>\n<p>As a practical example, let's go back to:</p>\n<pre><code class=\"language-js\">get('story.json').then(function(response) {\n  console.log(\"Success!\", response);\n\n})\n</code></pre>\n<p>The response is JSON, but we're currently receiving it as plain text. We could alter our get function to use the JSON <a href=\"https://developer.mozilla.org/docs/Web/API/XMLHttpRequest#responseType\"><code>responseType</code></a>, but we could also solve it in promises land:</p>\n<pre><code class=\"language-js\">get('story.json').then(function(response) {\n  return JSON.parse(response);\n\n}).then(function(response) {\n  console.log(\"Yey JSON!\", response);\n\n})\n</code></pre>\n<p>Since <code>JSON.parse()</code> takes a single argument and returns a transformed value, we can make a shortcut:</p>\n<pre><code class=\"language-js\">get('story.json').then(JSON.parse).then(function(response) {\n  console.log(\"Yey JSON!\", response);\n\n})\n</code></pre>\n<p>In fact, we could make a <code>getJSON()</code> function really easily:</p>\n<pre><code class=\"language-js\">function getJSON(url) {  \nreturn get(url).then(JSON.parse);\n}\n</code></pre>\n<p><code>getJSON()</code> still returns a promise, one that fetches a url then parses the response as JSON.</p>\n<h3>Queuing asynchronous actions <a href=\"https://web.dev/promises/#queuing-asynchronous-actions\">#</a></h3>\n<p>You can also chain <code>then</code>s to run async actions in sequence.</p>\n<p>When you return something from a <code>then()</code> callback, it's a bit magic. If you return a value, the next <code>then()</code> is called with that value. However, if you return something promise-like, the next <code>then()</code> waits on it, and is only called when that promise settles (succeeds/fails). For example:</p>\n<pre><code class=\"language-js\">getJSON('story.json').then(function(story) {  \nreturn getJSON(story.chapterUrls[0]);\n}).then(function(chapter1) {  \nconsole.log(\"Got chapter 1!\", chapter1);\n})\n</code></pre>\n<p>Here we make an async request to <code>story.json</code>, which gives us a set of URLs to request, then we request the first of those. This is when promises really start to stand out from simple callback patterns.</p>\n<p>You could even make a shortcut method to get chapters:</p>\n<pre><code class=\"language-js\">var storyPromise;\n\nfunction getChapter(i) {\n  storyPromise = storyPromise || getJSON('story.json');\n\n\n  return storyPromise.then(function(story) {\n    return getJSON(story.chapterUrls[i]);\n\n  })\n}\n\n// and using it is simple:\ngetChapter(0).then(function(chapter) {\n  console.log(chapter);\n\n  return getChapter(1);\n\n}).then(function(chapter) {\n  console.log(chapter);\n\n})\n</code></pre>\n<p>We don't download <code>story.json</code> until <code>getChapter</code> is called, but the next time(s) <code>getChapter</code> is called we reuse the story promise, so <code>story.json</code> is only fetched once. Yay Promises!</p>\n<h2>Error handling <a href=\"https://web.dev/promises/#error-handling\">#</a></h2>\n<p>As we saw earlier, <code>then()</code> takes two arguments, one for success, one for failure (or fulfill and reject, in promises-speak):</p>\n<pre><code class=\"language-js\">get('story.json').then(function(response) {  \nconsole.log(\"Success!\", response);\n}, function(error) {  \nconsole.log(\"Failed!\", error);\n})\n</code></pre>\n<p>You can also use <code>catch()</code>:</p>\n<pre><code class=\"language-js\">get('story.json').then(function(response) {  \nconsole.log(\"Success!\", response);\n}).catch(function(error) {  \nconsole.log(\"Failed!\", error);\n})\n</code></pre>\n<p>There's nothing special about <code>catch()</code>, it's just sugar for <code>then(undefined, func)</code>, but it's more readable. Note that the two code examples above do not behave the same, the latter is equivalent to:</p>\n<pre><code class=\"language-js\">get('story.json').then(function(response) {  \nconsole.log(\"Success!\", response);\n}).then(undefined, function(error) {  \nconsole.log(\"Failed!\", error);\n})\n</code></pre>\n<p>The difference is subtle, but extremely useful. Promise rejections skip forward to the next <code>then()</code> with a rejection callback (or <code>catch()</code>, since it's equivalent). With <code>then(func1, func2)</code>, <code>func1</code> or <code>func2</code> will be called, never both. But with <code>then(func1).catch(func2)</code>, both will be called if <code>func1</code> rejects, as they're separate steps in the chain. Take the following:</p>\n<pre><code class=\"language-js\">asyncThing1().then(function() {\n  return asyncThing2();\n\n}).then(function() {\n  return asyncThing3();\n\n}).catch(function(err) {\n  return asyncRecovery1();\n\n}).then(function() {\n  return asyncThing4();\n\n}, function(err) {\n  return asyncRecovery2();\n\n}).catch(function(err) {\n  console.log(\"Don't worry about it\");\n\n}).then(function() {\n  console.log(\"All done!\");\n\n})\n</code></pre>\n<p>The flow above is very similar to normal JavaScript try/catch, errors that happen within a \"try\" go immediately to the <code>catch()</code> block. Here's the above as a flowchart (because I love flowcharts):</p>\n<p>Follow the blue lines for promises that fulfill, or the red for ones that reject.</p>\n<h3>JavaScript exceptions and promises <a href=\"https://web.dev/promises/#javascript-exceptions-and-promises\">#</a></h3>\n<p>Rejections happen when a promise is explicitly rejected, but also implicitly if an error is thrown in the constructor callback:</p>\n<pre><code class=\"language-js\">var jsonPromise = new Promise(function(resolve, reject) {  \n// JSON.parse throws an error if you feed it some  // invalid JSON, so this implicitly rejects:  resolve(JSON.parse(\"This ain't JSON\"));\n\n});\njsonPromise.then(function(data) {  \n// This never happens:  console.log(\"It worked!\", data);\n}).catch(function(err) {  \n// Instead, this happens:  console.log(\"It failed!\", err);\n})\n</code></pre>\n<p>This means it's useful to do all your promise-related work inside the promise constructor callback, so errors are automatically caught and become rejections.</p>\n<p>The same goes for errors thrown in <code>then()</code> callbacks.</p>\n<pre><code>get('/').then(JSON.parse).then(function() {  \n// This never happens, '/' is an HTML page, not JSON  // so JSON.parse throws  console.log(\"It worked!\", data);\n}).catch(function(err) {  \n// Instead, this happens:  console.log(\"It failed!\", err);\n})\n</code></pre>\n<h3>Error handling in practice <a href=\"https://web.dev/promises/#error-handling-in-practice\">#</a></h3>\n<p>With our story and chapters, we can use catch to display an error to the user:</p>\n<pre><code class=\"language-js\">getJSON('story.json').then(function(story) {  \nreturn getJSON(story.chapterUrls[0]);\n}).then(function(chapter1) {  \naddHtmlToPage(chapter1.html);\n}).catch(function() {  \naddTextToPage(\"Failed to show chapter\");\n}).then(function() {  \ndocument.querySelector('.spinner').style.display = 'none';})\n</code></pre>\n<p>If fetching <code>story.chapterUrls[0]</code> fails (e.g., http 500 or user is offline), it'll skip all following success callbacks, which includes the one in <code>getJSON()</code> which tries to parse the response as JSON, and also skips the callback that adds chapter1.html to the page. Instead it moves onto the catch callback. As a result, \"Failed to show chapter\" will be added to the page if any of the previous actions failed.</p>\n<p>Like JavaScript's try/catch, the error is caught and subsequent code continues, so the spinner is always hidden, which is what we want. The above becomes a non-blocking async version of:</p>\n<pre><code class=\"language-js\">try {  \nvar story = getJSONSync('story.json');\n  var chapter1 = getJSONSync(story.chapterUrls[0]);\n  addHtmlToPage(chapter1.html);\n}catch (e) {  \naddTextToPage(\"Failed to show chapter\");\n}document.querySelector('.spinner').style.display = 'none'\n</code></pre>\n<p>You may want to <code>catch()</code> simply for logging purposes, without recovering from the error. To do this, just rethrow the error. We could do this in our <code>getJSON()</code> method:</p>\n<pre><code class=\"language-js\">function getJSON(url) {  \nreturn get(url).then(JSON.parse).catch(function(err) {  \n  console.log(\"getJSON failed for\", url, err);\n    throw err;  \n});\n}\n</code></pre>\n<p>So we've managed to fetch one chapter, but we want them all. Let's make that happen.</p>\n<h2>Parallelism and sequencing: getting the best of both <a href=\"https://web.dev/promises/#parallelism-and-sequencing:-getting-the-best-of-both\">#</a></h2>\n<p>Thinking async isn't easy. If you're struggling to get off the mark, try writing the code as if it were synchronous. In this case:</p>\n<pre><code class=\"language-js\">try {  \nvar story = getJSONSync('story.json');\n  addHtmlToPage(story.heading);\n  story.chapterUrls.forEach(function(chapterUrl) {  \n  var chapter = getJSONSync(chapterUrl);\n    addHtmlToPage(chapter.html);\n  \n});\n  addTextToPage(\"All done\");\n}catch (err) {  \naddTextToPage(\"Argh, broken: \" + err.message);\n}document.querySelector('.spinner').style.display = 'none'\n</code></pre>\n<p>That works! But it's sync and locks up the browser while things download. To make this work async we use <code>then()</code> to make things happen one after another.</p>\n<pre><code>getJSON('story.json').then(function(story) {  \naddHtmlToPage(story.heading);\n  // TODO: for each url in story.chapterUrls, fetch &#x26;amp; display}).then(function() {  \n// And we're all done!  addTextToPage(\"All done\");\n}).catch(function(err) {  \n// Catch any error that happened along the way  addTextToPage(\"Argh, broken: \" + err.message);\n}).then(function() {  \n// Always hide the spinner  document.querySelector('.spinner').style.display = 'none';})\n</code></pre>\n<p>But how can we loop through the chapter urls and fetch them in order? This doesn't work:</p>\n<pre><code class=\"language-js\">story.chapterUrls.forEach(function(chapterUrl) {  \n// Fetch chapter  getJSON(chapterUrl).then(function(chapter) {  \n  // and add it to the page    addHtmlToPage(chapter.html);\n  \n});\n})\n</code></pre>\n<p><code>forEach</code> isn't async-aware, so our chapters would appear in whatever order they download, which is basically how Pulp Fiction was written. This isn't Pulp Fiction, so let's fix it.</p>\n<h3>Creating a sequence <a href=\"https://web.dev/promises/#creating-a-sequence\">#</a></h3>\n<p>We want to turn our <code>chapterUrls</code> array into a sequence of promises. We can do that using <code>then()</code>:</p>\n<pre><code class=\"language-js\">// Start off with a promise that always resolvesvar sequence = Promise.resolve();\n// Loop through our chapter urlsstory.chapterUrls.forEach(function(chapterUrl) {  \n// Add these actions to the end of the sequence  sequence = sequence.then(function() {  \n  return getJSON(chapterUrl);\n  }).then(function(chapter) {  \n  addHtmlToPage(chapter.html);\n  \n});\n})\n</code></pre>\n<p>This is the first time we've seen <code>Promise.resolve()</code>, which creates a promise that resolves to whatever value you give it. If you pass it an instance of <code>Promise</code> it'll simply return it (note: this is a change to the spec that some implementations don't yet follow). If you pass it something promise-like (has a <code>then()</code> method), it creates a genuine <code>Promise</code> that fulfills/rejects in the same way. If you pass in any other value, e.g., <code>Promise.resolve('Hello')</code>, it creates a promise that fulfills with that value. If you call it with no value, as above, it fulfills with \"undefined\".</p>\n<p>There's also <code>Promise.reject(val)</code>, which creates a promise that rejects with the value you give it (or undefined).</p>\n<p>We can tidy up the above code using <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\"><code>array.reduce</code></a>:</p>\n<pre><code class=\"language-js\">// Loop through our chapter urlsstory.chapterUrls.reduce(function(sequence, chapterUrl) {  \n// Add these actions to the end of the sequence  return sequence.then(function() {  \n  return getJSON(chapterUrl);\n  }).then(function(chapter) {  \n  addHtmlToPage(chapter.html);\n  \n});\n}, Promise.resolve())\n</code></pre>\n<p>This is doing the same as the previous example, but doesn't need the separate \"sequence\" variable. Our reduce callback is called for each item in the array. \"sequence\" is <code>Promise.resolve()</code> the first time around, but for the rest of the calls \"sequence\" is whatever we returned from the previous call. <code>array.reduce</code> is really useful for boiling an array down to a single value, which in this case is a promise.</p>\n<p>Let's put it all together:</p>\n<pre><code class=\"language-js\">getJSON('story.json').then(function(story) {  \naddHtmlToPage(story.heading);\n  return story.chapterUrls.reduce(function(sequence, chapterUrl) {  \n  // Once the last chapter's promise is done...    return sequence.then(function() {  \n    // ...fetch the next chapter      return getJSON(chapterUrl);\n    }).then(function(chapter) {  \n    // and add it to the page      addHtmlToPage(chapter.html);\n    \n});\n  }, Promise.resolve());\n}).then(function() {  \n// And we're all done!  addTextToPage(\"All done\");\n}).catch(function(err) {  \n// Catch any error that happened along the way  addTextToPage(\"Argh, broken: \" + err.message);\n}).then(function() {  \n// Always hide the spinner  document.querySelector('.spinner').style.display = 'none';})\n</code></pre>\n<p>And there we have it, a fully async version of the sync version. But we can do better. At the moment our page is downloading like this:</p>\n<p>Browsers are pretty good at downloading multiple things at once, so we're losing performance by downloading chapters one after the other. What we want to do is download them all at the same time, then process them when they've all arrived. Thankfully there's an API for this:</p>\n<pre><code class=\"language-js\">Promise.all(arrayOfPromises).then(function(arrayOfResults) {  \n//...})\n</code></pre>\n<p><code>Promise.all</code> takes an array of promises and creates a promise that fulfills when all of them successfully complete. You get an array of results (whatever the promises fulfilled to) in the same order as the promises you passed in.</p>\n<pre><code>getJSON('story.json').then(function(story) {  \naddHtmlToPage(story.heading);\n  // Take an array of promises and wait on them all  return Promise.all(    // Map our array of chapter urls to    // an array of chapter json promises    story.chapterUrls.map(getJSON)  );\n}).then(function(chapters) {  \n// Now we have the chapters jsons in order! Loop through...  chapters.forEach(function(chapter) {  \n  // ...and add to the page    addHtmlToPage(chapter.html);\n  \n});\n  addTextToPage(\"All done\");\n}).catch(function(err) {  \n// catch any error that happened so far  addTextToPage(\"Argh, broken: \" + err.message);\n}).then(function() {  \ndocument.querySelector('.spinner').style.display = 'none';})\n</code></pre>\n<p>Depending on connection, this can be seconds faster than loading one-by-one, and it's less code than our first try. The chapters can download in whatever order, but they appear on screen in the right order.</p>\n<p>However, we can still improve perceived performance. When chapter one arrives we should add it to the page. This lets the user start reading before the rest of the chapters have arrived. When chapter three arrives, we wouldn't add it to the page because the user may not realize chapter two is missing. When chapter two arrives, we can add chapters two and three, etc etc.</p>\n<p>To do this, we fetch JSON for all our chapters at the same time, then create a sequence to add them to the document:</p>\n<pre><code class=\"language-js\">getJSON('story.json').then(function(story) {  \naddHtmlToPage(story.heading);\n  // Map our array of chapter urls to  // an array of chapter json promises.  // This makes sure they all download in parallel.  return story.chapterUrls.map(getJSON)    .reduce(function(sequence, chapterPromise) {  \n    // Use reduce to chain the promises together,      // adding content to the page for each chapter      return sequence      .then(function() {  \n      // Wait for everything in the sequence so far,        // then wait for this chapter to arrive.        return chapterPromise;      }).then(function(chapter) {  \n      addHtmlToPage(chapter.html);\n      \n});\n    }, Promise.resolve());\n}).then(function() {  \naddTextToPage(\"All done\");\n}).catch(function(err) {  \n// catch any error that happened along the way  addTextToPage(\"Argh, broken: \" + err.message);\n}).then(function() {  \ndocument.querySelector('.spinner').style.display = 'none';})\n</code></pre>\n<h2>Async Await:</h2>\n<details>\n<summary> Async Await:  </summary>   \n<h2>The basics of async/await</h2>\n<p>There are two parts to using async/await in your code.</p>\n<h3>The async keyword</h3>\n<p>First of all we have the <code>async</code> keyword, which you put in front of a function declaration to turn it into an <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/async_function\">async function</a>. An async function is a function that knows how to expect the possibility of the <code>await</code> keyword being used to invoke asynchronous code.</p>\n<p>Try typing the following lines into your browser's JS console:</p>\n<pre><code class=\"language-jsjs\">function hello() { return \"Hello\" };\nhello();\n</code></pre>\n<p>The function returns \"Hello\" — nothing special, right?</p>\n<p>But what if we turn this into an async function? Try the following:</p>\n<pre><code class=\"language-jsjs\">async function hello() { return \"Hello\" };\nhello();\n</code></pre>\n<p>Ah. Invoking the function now returns a promise. This is one of the traits of async functions — their return values are guaranteed to be converted to promises.</p>\n<p>You can also create an <a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/async_function\">async function expression</a>, like so:</p>\n<pre><code class=\"language-jsjs\">let hello = async function() { return \"Hello\" };\nhello();\n</code></pre>\n<p>And you can use <a href=\"/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow functions</a>:</p>\n<pre><code class=\"language-jsjs\">let hello = async () => \"Hello\";\n</code></pre>\n<p>These all do basically the same thing.</p>\n<p>To actually consume the value returned when the promise fulfills, since it is returning a promise, we could use a <code>.then()</code> block:</p>\n<pre><code class=\"language-jsjs\">hello().then((value) => console.log(value))\n</code></pre>\n<p>or even just shorthand such as</p>\n<pre><code class=\"language-js\">hello().then(console.log)\n</code></pre>\n<p>Like we saw in the last article.</p>\n<p>So the <code>async</code> keyword is added to functions to tell them to return a promise rather than directly returning the value.</p>\n<h3>The await keyword</h3>\n<p>The advantage of an async function only becomes apparent when you combine it with the <a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/await\">await</a> keyword. <code>await</code> only works inside async functions within regular JavaScript code, however it can be used on its own with <a href=\"/en-US/docs/Web/JavaScript/Guide/Modules\">JavaScript modules.</a></p>\n<p><code>await</code> can be put in front of any async promise-based function to pause your code on that line until the promise fulfills, then return the resulting value.</p>\n<p>You can use <code>await</code> when calling any function that returns a Promise, including web API functions.</p>\n<p>Here is a trivial example:</p>\n<pre><code class=\"language-jsjs\">async function hello() {\n  return await Promise.resolve(\"Hello\");\n\n};\n\nhello().then(alert);\n</code></pre>\n<p>Of course, the above example is not very useful, although it does serve to illustrate the syntax. Let's move on and look at a real example.</p>\n<h2>Rewriting promise code with async/await</h2>\n<p>Let's look back at a simple fetch example that we saw in the previous article:</p>\n<pre><code class=\"language-jsjs\">fetch('coffee.jpg')\n  .then(response => {\n    if (!response.ok) {\n      throw new Error(`HTTP error! status: ${response.status}`);\n\n    }\n    return response.blob();\n\n  })\n  .then(myBlob => {\n    let objectURL = URL.createObjectURL(myBlob);\n\n    let image = document.createElement('img');\n\n    image.src = objectURL;\n    document.body.appendChild(image);\n\n  })\n  .catch(e => {\n    console.log('There has been a problem with your fetch operation: ' + e.message);\n\n  \n});\n</code></pre>\n<p>By now, you should have a reasonable understanding of promises and how they work, but let's convert this to use async/await to see how much simpler it makes things:</p>\n<pre><code class=\"language-jsjs\">async function myFetch() {\n  let response = await fetch('coffee.jpg');\n\n\n  if (!response.ok) {\n    throw new Error(`HTTP error! status: ${response.status}`);\n\n  }\n\n  let myBlob = await response.blob();\n\n\n  let objectURL = URL.createObjectURL(myBlob);\n\n  let image = document.createElement('img');\n\n  image.src = objectURL;\n  document.body.appendChild(image);\n\n}\n\nmyFetch()\n  .catch(e => {\n    console.log('There has been a problem with your fetch operation: ' + e.message);\n\n  \n});\n</code></pre>\n<p>It makes code much simpler and easier to understand — no more <code>.then()</code> blocks everywhere!</p>\n<p>Since an <code>async</code> keyword turns a function into a promise, you could refactor your code to use a hybrid approach of promises and await, bringing the second half of the function out into a new block to make it more flexible:</p>\n<pre><code class=\"language-jsjs\">async function myFetch() {\n  let response = await fetch('coffee.jpg');\n\n  if (!response.ok) {\n    throw new Error(`HTTP error! status: ${response.status}`);\n\n  }\n  return await response.blob();\n\n}\n\nmyFetch()\n  .then(blob => {\n    let objectURL = URL.createObjectURL(blob);\n\n    let image = document.createElement('img');\n\n    image.src = objectURL;\n    document.body.appendChild(image);\n\n  })\n  .catch(e => console.log(e));\n</code></pre>\n<p>You can try typing in the example yourself, or running our <a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/simple-fetch-async-await.html\">live example</a> (see also the <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/simple-fetch-async-await.html\">source code</a>).</p>\n<h3>But how does it work?</h3>\n<p>You'll note that we've wrapped the code inside a function, and we've included the <code>async</code> keyword before the <code>function</code> keyword. This is necessary — you have to create an async function to define a block of code in which you'll run your async code; as we said earlier, <code>await</code> only works inside of async functions.</p>\n<p>Inside the <code>myFetch()</code> function definition you can see that the code closely resembles the previous promise version, but there are some differences. Instead of needing to chain a <code>.then()</code> block on to the end of each promise-based method, you just need to add an <code>await</code> keyword before the method call, and then assign the result to a variable. The <code>await</code> keyword causes the JavaScript runtime to pause your code on this line, not allowing further code to execute in the meantime until the async function call has returned its result — very useful if subsequent code relies on that result!</p>\n<p>Once that's complete, your code continues to execute starting on the next line. For example:</p>\n<pre><code class=\"language-jsjs\">let response = await fetch('coffee.jpg');\n</code></pre>\n<p>The response returned by the fulfilled <code>fetch()</code> promise is assigned to the <code>response</code> variable when that response becomes available, and the parser pauses on this line until that occurs. Once the response is available, the parser moves to the next line, which creates a <a href=\"/en-US/docs/Web/API/Blob\"><code>Blob</code></a> out of it. This line also invokes an async promise-based method, so we use <code>await</code> here as well. When the result of operation returns, we return it out of the <code>myFetch()</code> function.</p>\n<p>This means that when we call the <code>myFetch()</code> function, it returns a promise, so we can chain a <code>.then()</code> onto the end of it inside which we handle displaying the blob onscreen.</p>\n<p>You are probably already thinking \"this is really cool!\", and you are right — fewer <code>.then()</code> blocks to wrap around code, and it mostly just looks like synchronous code, so it is really intuitive.</p>\n<h3>Adding error handling</h3>\n<p>And if you want to add error handling, you've got a couple of options.</p>\n<p>You can use a synchronous <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/try...catch\"><code>try...catch</code></a> structure with <code>async</code>/<code>await</code>. This example expands on the first version of the code we showed above:</p>\n<pre><code class=\"language-jsjs\">async function myFetch() {\n  try {\n    let response = await fetch('coffee.jpg');\n\n\n    if (!response.ok) {\n      throw new Error(`HTTP error! status: ${response.status}`);\n\n    }\n    let myBlob = await response.blob();\n\n    let objectURL = URL.createObjectURL(myBlob);\n\n    let image = document.createElement('img');\n\n    image.src = objectURL;\n    document.body.appendChild(image);\n\n  } catch(e) {\n    console.log(e);\n\n  }\n}\n\nmyFetch();\n</code></pre>\n<p>The <code>catch() {}</code> block is passed an error object, which we've called <code>e</code>; we can now log that to the console, and it will give us a detailed error message showing where in the code the error was thrown.</p>\n<p>If you wanted to use the second (refactored) version of the code that we showed above, you would be better off just continuing the hybrid approach and chaining a <code>.catch()</code> block onto the end of the <code>.then()</code> call, like this:</p>\n<pre><code class=\"language-jsjs\">async function myFetch() {\n  let response = await fetch('coffee.jpg');\n\n  if (!response.ok) {\n    throw new Error(`HTTP error! status: ${response.status}`);\n\n  }\n  return await response.blob();\n\n}\n\nmyFetch()\n  .then(blob => {\n    let objectURL = URL.createObjectURL(blob);\n\n    let image = document.createElement('img');\n\n    image.src = objectURL;\n    document.body.appendChild(image);\n\n  })\n  .catch(e => console.log(e));\n</code></pre>\n<p>This is because the <code>.catch()</code> block will catch errors occurring in both the async function call and the promise chain. If you used the <code>try</code>/<code>catch</code> block here, you might still get unhandled errors in the <code>myFetch()</code> function when it's called.</p>\n<p>You can find both of these examples on GitHub:</p>\n<ul>\n<li><a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/simple-fetch-async-await-try-catch.html\">simple-fetch-async-await-try-catch.html</a> (see <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/simple-fetch-async-await-try-catch.html\">source code</a>)</li>\n<li><a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/simple-fetch-async-await-promise-catch.html\">simple-fetch-async-await-promise-catch.html</a> (see <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/simple-fetch-async-await-promise-catch.html\">source code</a>)</li>\n</ul>\n<h2>Awaiting a Promise.all()</h2>\n<p>async/await is built on top of <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\">promises</a>, so it's compatible with all the features offered by promises. This includes <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all\"><code>Promise.all()</code></a> — you can quite happily await a <code>Promise.all()</code> call to get all the results returned into a variable in a way that looks like simple synchronous code. Again, let's return to <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/promises/promise-all.html\">an example we saw in our previous article</a>. Keep it open in a separate tab so you can compare and contrast with the new version shown below.</p>\n<p>Converting this to async/await (see <a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/promise-all-async-await.html\">live demo</a> and <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/promise-all-async-await.html\">source code</a>), this now looks like so:</p>\n<pre><code class=\"language-jsjs\">async function fetchAndDecode(url, type) {\n  let response = await fetch(url);\n\n\n  let content;\n\n  if (!response.ok) {\n    throw new Error(`HTTP error! status: ${response.status}`);\n\n  } else {\n    if(type === 'blob') {\n      content = await response.blob();\n\n    } else if(type === 'text') {\n      content = await response.text();\n\n    }\n  }\n  return content;\n}\n\nasync function displayContent() {\n  let coffee = fetchAndDecode('coffee.jpg', 'blob');\n\n  let tea = fetchAndDecode('tea.jpg', 'blob');\n\n  let description = fetchAndDecode('description.txt', 'text');\n\n\n  let values = await Promise.all([coffee, tea, description]);\n\n\n  let objectURL1 = URL.createObjectURL(values[0]);\n\n  let objectURL2 = URL.createObjectURL(values[1]);\n\n  let descText = values[2];\n\n  let image1 = document.createElement('img');\n\n  let image2 = document.createElement('img');\n\n  image1.src = objectURL1;\n  image2.src = objectURL2;\n  document.body.appendChild(image1);\n\n  document.body.appendChild(image2);\n\n\n  let para = document.createElement('p');\n\n  para.textContent = descText;\n  document.body.appendChild(para);\n\n}\n\ndisplayContent()\n  .catch(e => console.log(e));\n</code></pre>\n<p>You'll see that the <code>fetchAndDecode()</code> function has been converted easily into an async function with just a few changes. See the <code>Promise.all()</code> line:</p>\n<pre><code class=\"language-jsjs\">let values = await Promise.all([coffee, tea, description]);\n</code></pre>\n<p>By using <code>await</code> here we are able to get all the results of the three promises returned into the <code>values</code> array, when they are all available, in a way that looks very much like sync code. We've had to wrap all the code in a new async function, <code>displayContent()</code>, and we've not reduced the code by a lot of lines, but being able to move the bulk of the code out of the <code>.then()</code> block provides a nice, useful simplification, leaving us with a much more readable program.</p>\n<p>For error handling, we've included a <code>.catch()</code> block on our <code>displayContent()</code> call; this will handle errors occurring in both functions.</p>\n<blockquote>\n<p><strong>Note:</strong> It is also possible to use a sync <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/try...catch#the_finally_clause\"><code>finally</code></a> block within an async function, in place of a <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally\"><code>.finally()</code></a> async block, to show a final report on how the operation went — you can see this in action in our <a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/promise-finally-async-await.html\">live example</a> (see also the <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/promise-finally-async-await.html\">source code</a>).</p>\n</blockquote>\n<h2>Handling async/await slowdown</h2>\n<p>Async/await makes your code look synchronous, and in a way it makes it behave more synchronously. The <code>await</code> keyword blocks execution of all the code that follows it until the promise fulfills, exactly as it would with a synchronous operation. It does allow other tasks to continue to run in the meantime, but the awaited code is blocked. For example:</p>\n<pre><code class=\"language-jsjs\">async function makeResult(items) {\n  let newArr = [];\n  for(let i = 0; i &#x3C; items.length; i++) {\n    newArr.push('word_' + i);\n\n  }\n  return newArr;\n}\n\nasync function getResult() {\n  let result = await makeResult(items);\n // Blocked on this line\n  useThatResult(result);\n // Will not be executed before makeResult() is done\n}\n</code></pre>\n<p>As a result, your code could be slowed down by a significant number of awaited promises happening straight after one another. Each <code>await</code> will wait for the previous one to finish, whereas actually what you might want is for the promises to begin processing simultaneously, like they would do if we weren't using async/await.</p>\n<p>Let's look at two examples — <a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/slow-async-await.html\">slow-async-await.html</a> (see <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/slow-async-await.html\">source code</a>) and <a href=\"https://mdn.github.io/learning-area/javascript/asynchronous/async-await/fast-async-await.html\">fast-async-await.html</a> (see <a href=\"https://github.com/mdn/learning-area/blob/master/javascript/asynchronous/async-await/fast-async-await.html\">source code</a>). Both of them start off with a custom promise function that fakes an async process with a <a href=\"/en-US/docs/Web/API/setTimeout\"><code>setTimeout()</code></a> call:</p>\n<pre><code class=\"language-jsjs\">function timeoutPromise(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      resolve(\"done\");\n\n    }, interval);\n\n  \n});\n\n};\n</code></pre>\n<p>Then each one includes a <code>timeTest()</code> async function that awaits three <code>timeoutPromise()</code> calls:</p>\n<pre><code class=\"language-jsjs\">async function timeTest() {\n  ...\n}\n</code></pre>\n<p>Each one ends by recording a start time, seeing how long the <code>timeTest()</code> promise takes to fulfill, then recording an end time and reporting how long the operation took in total:</p>\n<pre><code class=\"language-jsjs\">let startTime = Date.now();\n\ntimeTest()\n  .then(() => {\n    let finishTime = Date.now();\n\n    let timeTaken = finishTime - startTime;\n    alert(\"Time taken in milliseconds: \" + timeTaken);\n\n  })\n</code></pre>\n<p>It is the <code>timeTest()</code> function that differs in each case.</p>\n<p>In the <code>slow-async-await.html</code> example, <code>timeTest()</code> looks like this:</p>\n<pre><code class=\"language-jsjs\">async function timeTest() {\n  await timeoutPromise(3000);\n\n  await timeoutPromise(3000);\n\n  await timeoutPromise(3000);\n\n}\n</code></pre>\n<p>Here we await all three <code>timeoutPromise()</code> calls directly, making each one alert after 3 seconds. Each subsequent one is forced to wait until the last one finished — if you run the first example, you'll see the alert box reporting a total run time of around 9 seconds.</p>\n<p>In the <code>fast-async-await.html</code> example, <code>timeTest()</code> looks like this:</p>\n<pre><code class=\"language-jsjs\">async function timeTest() {\n  const timeoutPromise1 = timeoutPromise(3000);\n\n  const timeoutPromise2 = timeoutPromise(3000);\n\n  const timeoutPromise3 = timeoutPromise(3000);\n\n\n  await timeoutPromise1;\n  await timeoutPromise2;\n  await timeoutPromise3;\n}\n</code></pre>\n<p>Here we store the three <code>Promise</code> objects in variables, which has the effect of setting off their associated processes all running simultaneously.</p>\n<p>Next, we await their results — because the promises all started processing at essentially the same time, the promises will all fulfill at the same time; when you run the second example, you'll see the alert box reporting a total run time of just over 3 seconds!</p>\n<h3>Handling errors</h3>\n<p>There is an issue with the above pattern however — it could lead to unhandled errors.</p>\n<p>Let's update the previous examples, this time adding a rejected promise and a <code>catch</code> statement in the end:</p>\n<pre><code class=\"language-jsjs\">function timeoutPromiseResolve(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      resolve(\"successful\");\n\n    }, interval);\n\n  \n});\n\n};\n\nfunction timeoutPromiseReject(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      reject(\"error\");\n\n    }, interval);\n\n  \n});\n\n};\n\nasync function timeTest() {\n  await timeoutPromiseResolve(5000);\n\n  await timeoutPromiseReject(2000);\n\n  await timeoutPromiseResolve(3000);\n\n}\n\nlet startTime = Date.now();\n\n\ntimeTest()\n  .then(() => {})\n  .catch(e => {\n    console.log(e);\n\n    let finishTime = Date.now();\n\n    let timeTaken = finishTime - startTime;\n    alert(\"Time taken in milliseconds: \" + timeTaken);\n\n  })\n</code></pre>\n<p>In the above example, the error is handled properly, and the alert appears after approximately 7 seconds.</p>\n<p>Now onto the second pattern:</p>\n<pre><code class=\"language-jsjs\">function timeoutPromiseResolve(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      resolve(\"successful\");\n\n    }, interval);\n\n  \n});\n\n};\n\nfunction timeoutPromiseReject(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      reject(\"error\");\n\n    }, interval);\n\n  \n});\n\n};\n\nasync function timeTest() {\n  const timeoutPromiseResolve1 = timeoutPromiseResolve(5000);\n\n  const timeoutPromiseReject2 = timeoutPromiseReject(2000);\n\n  const timeoutPromiseResolve3 = timeoutPromiseResolve(3000);\n\n\n  await timeoutPromiseResolve1;\n  await timeoutPromiseReject2;\n  await timeoutPromiseResolve3;\n}\n\nlet startTime = Date.now();\n\n\ntimeTest()\n  .then(() => {})\n  .catch(e => {\n    console.log(e);\n\n    let finishTime = Date.now();\n\n    let timeTaken = finishTime - startTime;\n    alert(\"Time taken in milliseconds: \" + timeTaken);\n\n  })\n</code></pre>\n<p>In this example, we have an unhandled error in the console (after 2 seconds), and the alert appears after approximately 5 seconds.</p>\n<p>To start the promises in parallel and catch the error properly, we could use <code>Promise.all()</code>, as discussed earlier:</p>\n<pre><code class=\"language-jsjs\">function timeoutPromiseResolve(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      resolve(\"successful\");\n\n    }, interval);\n\n  \n});\n\n};\n\nfunction timeoutPromiseReject(interval) {\n  return new Promise((resolve, reject) => {\n    setTimeout(function(){\n      reject(\"error\");\n\n    }, interval);\n\n  \n});\n\n};\n\nasync function timeTest() {\n  const timeoutPromiseResolve1 = timeoutPromiseResolve(5000);\n\n  const timeoutPromiseReject2 = timeoutPromiseReject(2000);\n\n  const timeoutPromiseResolve3 = timeoutPromiseResolve(3000);\n\n\n  const results = await Promise.all([timeoutPromiseResolve1, timeoutPromiseReject2, timeoutPromiseResolve3]);\n\n  return results;\n}\n\nlet startTime = Date.now();\n\n\ntimeTest()\n  .then(() => {})\n  .catch(e => {\n    console.log(e);\n\n    let finishTime = Date.now();\n\n    let timeTaken = finishTime - startTime;\n    alert(\"Time taken in milliseconds: \" + timeTaken);\n\n  })\n</code></pre>\n<p>In this example, the error is handled properly after around 2 seconds and we also see the alert after around 2 seconds.</p>\n<p>The <code>Promise.all()</code> rejects when any of the input promises are rejected. If you want all the promises to settle and then use some of their fulfilled values, even when some of\nthem are rejected, you could use <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled\"><code>Promise.allSettled()</code></a> instead.</p>\n<h2>Async/await class methods</h2>\n<p>As a final note before we move on, you can even add <code>async</code> in front of class/object methods to make them return promises, and <code>await</code> promises inside them. Take a look at the <a href=\"/en-US/docs/Learn/JavaScript/Objects/Inheritance#ecmascript_2015_classes\">ES class code we saw in our object-oriented JavaScript article</a>, and then look at our modified version with an <code>async</code> method:</p>\n<pre><code class=\"language-jsjs\">class Person {\n  constructor(first, last, age, gender, interests) {\n    this.name = {\n      first,\n      last\n    };\n    this.age = age;\n    this.gender = gender;\n    this.interests = interests;\n  }\n\n  async greeting() {\n    return await Promise.resolve(`Hi! I'm ${this.name.first}`);\n\n  };\n\n  farewell() {\n    console.log(`${this.name.first} has left the building. Bye for now!`);\n\n  };\n}\n\nlet han = new Person('Han', 'Solo', 25, 'male', ['Smuggling']);\n</code></pre>\n<p>The first class method could now be used something like this:</p>\n<pre><code class=\"language-jsjs\">han.greeting().then(console.log);\n</code></pre>\n</details>"},{"url":"/docs/leetcode/011._Container_With_Most_Water/","relativePath":"docs/leetcode/011._Container_With_Most_Water.md","relativeDir":"docs/leetcode","base":"011._Container_With_Most_Water.md","name":"011._Container_With_Most_Water","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/container-with-most-water/description/\">11. Container With Most Water</a></h2>\n<h3>Problem:</h3>\n<p>Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.</p>\n<p>Note: You may not slant the container and n is at least 2.</p>\n<h3>Solution:</h3>\n<p>Greedy Algorithm.</p>\n<p>If we look at the simple brute force approach, where we choose one point at a time and calculate all the possible areas with other points on the right, it is easy to make a observation that we are narrowing down the horizontal distance.</p>\n<p>Greedy Algorithm can help us skip some of the conditions. It is base on a fact that the area between two columns are determined by the shorter one.</p>\n<p>Let's say we have pointer <code>l</code> and <code>r</code> at the begin and end of a distance, and the area is <code>area(l, r)</code>, how should we narrow down the distance?</p>\n<p>If <code>height[l] &#x3C; height[r]</code>, we know that the height of the area will never be greater than <code>height[l]</code> if we keep <code>l</code>. Now if we get rid of <code>r</code>, the area can only get smaller since the distance is shorter, and the height is at most <code>height[l]</code>.</p>\n<p>Here we conclude rule NO.1: Get rid of the smaller one.</p>\n<p>What if <code>height[l] == height[r]</code>? It is safe to get rid of both. We do not need any of them to constrain the max height of the rest points.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} height\n * @return {number}\n */\nlet maxArea = function (height) {\n  let max = 0;\n  for (let l = 0, r = height.length - 1; l &#x3C; r; l++, r--) {\n    max = Math.max(max, (r - l) * Math.min(height[l], height[r]));\n    if (height[l] &#x3C; height[r]) {\n      r++;\n    } else {\n      l--;\n    }\n  }\n  return max;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/012._Integer_to_Roman/","relativePath":"docs/leetcode/012._Integer_to_Roman.md","relativeDir":"docs/leetcode","base":"012._Integer_to_Roman.md","name":"012._Integer_to_Roman","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/integer-to-roman/description/\">12. Integer to Roman</a></h2>\n<h3>Problem:</h3>\n<p>Roman numerals are represented by seven different symbols: <code>I</code>, <code>V</code>, <code>X</code>, <code>L</code>, <code>C</code>, <code>D</code> and <code>M</code>.</p>\n<pre><code>Symbol       Value\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000\n</code></pre>\n<p>For example, two is written as <code>II</code> in Roman numeral, just two one's added together. Twelve is written as, <code>XII</code>, which is simply <code>X</code> + <code>II</code>. The number twenty seven is written as <code>XXVII</code>, which is <code>XX</code> + <code>V</code> + <code>II</code>.</p>\n<p>Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not <code>IIII</code>. Instead, the number four is written as <code>IV</code>. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as <code>IX</code>. There are six instances where subtraction is used:</p>\n<ul>\n<li><code>I</code> can be placed before <code>V</code> (5) and <code>X</code> (10) to make 4 and 9.</li>\n<li><code>X</code> can be placed before <code>L</code> (50) and <code>C</code> (100) to make 40 and 90.</li>\n<li><code>C</code> can be placed before <code>D</code> (500) and <code>M</code> (1000) to make 400 and 900.</li>\n</ul>\n<p>Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: 3\nOutput: \"III\"\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: 4\nOutput: \"IV\"\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: 9\nOutput: \"IX\"\n</code></pre>\n<p><strong>Example 4:</strong></p>\n<pre><code>Input: 58\nOutput: \"LVIII\"\nExplanation: C = 100, L = 50, XXX = 30 and III = 3.\n</code></pre>\n<p><strong>Example 5:</strong></p>\n<pre><code>Input: 1994\nOutput: \"MCMXCIV\"\nExplanation: M = 1000, CM = 900, XC = 90 and IV = 4.\n</code></pre>\n<h3>Solution:</h3>\n<p>Treat 4, 40, 400 and 9, 90, 900 specially.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} num\n * @return {string}\n */\nlet intToRoman = function (num) {\n  const e = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n  const s = [\n    \"M\",\n    \"CM\",\n    \"D\",\n    \"CD\",\n    \"C\",\n    \"XC\",\n    \"L\",\n    \"XL\",\n    \"X\",\n    \"IX\",\n    \"V\",\n    \"IV\",\n    \"I\",\n  ];\n\n  let result = \"\";\n  for (let i = 0; num; i++) {\n    const d = e[i];\n    const v = s[i];\n    while (num >= d) {\n      num -= d;\n      result += v;\n    }\n  }\n  return result;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/013._Roman_to_Integer/","relativePath":"docs/leetcode/013._Roman_to_Integer.md","relativeDir":"docs/leetcode","base":"013._Roman_to_Integer.md","name":"013._Roman_to_Integer","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/roman-to-integer/description/\">13. Roman to Integer</a></h2>\n<h3>Problem:</h3>\n<p>Roman numerals are represented by seven different symbols: <code>I</code>, <code>V</code>, <code>X</code>, <code>L</code>, <code>C</code>, <code>D</code> and <code>M</code>.</p>\n<pre><code>Symbol       Value\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000\n</code></pre>\n<p>For example, two is written as <code>II</code> in Roman numeral, just two one's added together. Twelve is written as, <code>XII</code>, which is simply <code>X</code> + <code>II</code>. The number twenty seven is written as <code>XXVII</code>, which is <code>XX</code> + <code>V</code> + <code>II</code>.</p>\n<p>Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not <code>IIII</code>. Instead, the number four is written as <code>IV</code>. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as <code>IX</code>. There are six instances where subtraction is used:</p>\n<ul>\n<li><code>I</code> can be placed before <code>V</code> (5) and <code>X</code> (10) to make 4 and 9.</li>\n<li><code>X</code> can be placed before <code>L</code> (50) and <code>C</code> (100) to make 40 and 90.</li>\n<li><code>C</code> can be placed before <code>D</code> (500) and <code>M</code> (1000) to make 400 and 900.</li>\n</ul>\n<p>Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: \"III\"\nOutput: 3\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: \"IV\"\nOutput: 4\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: \"IX\"\nOutput: 9\n</code></pre>\n<p><strong>Example 4:</strong></p>\n<pre><code>Input: \"LVIII\"\nOutput: 58\nExplanation: C = 100, L = 50, XXX = 30 and III = 3.\n</code></pre>\n<p><strong>Example 5:</strong></p>\n<pre><code>Input: \"MCMXCIV\"\nOutput: 1994\nExplanation: M = 1000, CM = 900, XC = 90 and IV = 4.\n</code></pre>\n<h3>Solution:</h3>\n<p>Normally we just add up the digits, except when the digit is greater than its left (e.g. IV). In that case we need to fallback and remove the last digit then combine the two as new digit. That is why we subtract the last digit twice.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {number}\n */\nlet romanToInt = function (s) {\n  const rdigit = {\n    I: 1,\n    V: 5,\n    X: 10,\n    L: 50,\n    C: 100,\n    D: 500,\n    M: 1000,\n  };\n\n  let result = 0;\n  for (let i = 0, lastDigit = Infinity; i &#x3C; s.length; i++) {\n    let digit = rdigit[s[i]];\n    result += digit &#x3C;= lastDigit ? digit : digit - lastDigit * 2;\n    lastDigit = digit;\n  }\n  return result;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/014._Longest_Common_Prefix/","relativePath":"docs/leetcode/014._Longest_Common_Prefix.md","relativeDir":"docs/leetcode","base":"014._Longest_Common_Prefix.md","name":"014._Longest_Common_Prefix","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/longest-common-prefix/description/\">14. Longest Common Prefix</a></h2>\n<h3>Problem:</h3>\n<p>Write a function to find the longest common prefix string amongst an array of strings.</p>\n<p>If there is no common prefix, return an empty string <code>\"\"</code>.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [\"flower\",\"flow\",\"flight\"]\nOutput: \"fl\"\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [\"dog\",\"racecar\",\"car\"]\nOutput: \"\"\nExplanation: There is no common prefix among the input strings.\n</code></pre>\n<p><strong>Note:</strong></p>\n<p>All given inputs are in lowercase letters <code>a-z</code>.</p>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>JavaScript specific solution. Get the min len then narrow down the prefix.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string[]} strs\n * @return {string}\n */\nlet longestCommonPrefix = function (strs) {\n  if (strs.length > 0) {\n    let minLen = Math.min(...strs.map((s) => s.length));\n    const anyStr = strs[0];\n    while (minLen) {\n      const prefix = anyStr.slice(0, minLen--);\n      if (strs.every((s) => s.startsWith(prefix))) {\n        return prefix;\n      }\n    }\n  }\n  return \"\";\n};\n</code></pre>\n<h4>TWO</h4>\n<pre><code class=\"language-javascript\">/**\n * @param {string[]} strs\n * @return {string}\n */\nlet longestCommonPrefix = function (strs) {\n  if (strs.length &#x3C;= 0) {\n    return \"\";\n  }\n\n  let i = 0;\n  while (strs.every((s) => s[i] &#x26;&#x26; s[i] === strs[0][i])) {\n    i++;\n  }\n  return strs[0].slice(0, i);\n};\n</code></pre>\n<h4>THREE</h4>\n<p>General solution. Build up the prefix.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string[]} strs\n * @return {string}\n */\nlet longestCommonPrefix = function (strs) {\n  let prefix = \"\";\n  if (strs.length > 0) {\n    for (let i = 0; ; i++) {\n      const c = strs[0][i];\n      if (!c) {\n        return prefix;\n      }\n      for (let j = 0; j &#x3C; strs.length; j++) {\n        if (strs[j][i] !== c) {\n          return prefix;\n        }\n      }\n      prefix += c;\n    }\n  }\n  return prefix;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/010._Regular_Expression_Matching/","relativePath":"docs/leetcode/010._Regular_Expression_Matching.md","relativeDir":"docs/leetcode","base":"010._Regular_Expression_Matching.md","name":"010._Regular_Expression_Matching","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/regular-expression-matching/description/\">10. Regular Expression Matching</a></h2>\n<h3>Problem:</h3>\n<p>Given an input string (<code>s</code>) and a pattern (<code>p</code>), implement regular expression matching with support for <code>'.'</code> and <code>'*'</code>.</p>\n<pre><code>'.' Matches any single character.\n'*' Matches zero or more of the preceding element.\n</code></pre>\n<p>The matching should cover the <strong>entire</strong> input string (not partial).</p>\n<p><strong>Note:</strong></p>\n<p><code>s</code> could be empty and contains only lowercase letters <code>a-z</code>.\n<code>p</code> could be empty and contains only lowercase letters <code>a-z</code>, and characters like <code>.</code> or <code>*</code>.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input:\ns = \"aa\"\np = \"a\"\nOutput: false\nExplanation: \"a\" does not match the entire string \"aa\".\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input:\ns = \"aa\"\np = \"a*\"\nOutput: true\nExplanation: '*' means zero or more of the precedeng element, 'a'. Therefore, by repeating 'a' once, it becomes \"aa\".\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input:\ns = \"ab\"\np = \".*\"\nOutput: true\nExplanation: \".*\" means \"zero or more (*) of any character (.)\".\n</code></pre>\n<p><strong>Example 4:</strong></p>\n<pre><code>Input:\ns = \"aab\"\np = \"c*a*b\"\nOutput: true\nExplanation: c can be repeated 0 times, a can be repeated 1 time. Therefore it matches \"aab\".\n</code></pre>\n<p><strong>Example 5:</strong></p>\n<pre><code>Input:\ns = \"mississippi\"\np = \"mis*is*p*.\"\nOutput: false\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Cheating with real RegExp matching.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @param {string} p\n * @return {boolean}\n */\nlet isMatch = function (s, p) {\n  if (p[0] === \"*\") {\n    return false;\n  }\n  return new RegExp(`^${p}$`).test(s);\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Let f(i, j) be the matching result of s[0...i) and p[0...j).</p>\n<pre><code class=\"language-javascript\">f(0, j) =\n    j == 0 || // empty\n    p[j-1] == '*' &#x26;&#x26; f(i, j-2) // matches 0 time, which matches empty string\n\nf(i, 0) = false // pattern must cover the entire input string\n\nf(i, j) =\n    if p[j-1] == '.'\n        f(i-1, j-1)\n    else if p[j-1] == '*'\n        f(i, j-2) || // matches 0 time\n        f(i-1, j) &#x26;&#x26; (s[i-1] == p[j-2] || p[j-2] == '.') // matches 1 or multiple times\n    else\n        f(i-1, j-1) &#x26;&#x26; s[i-1] == p[j-1]\n</code></pre>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @param {string} p\n * @return {boolean}\n */\nlet isMatch = function (s, p) {\n  if (p[0] === \"*\") {\n    return false;\n  }\n\n  const dp = [[true]];\n\n  for (let j = 2; j &#x3C;= p.length; j++) {\n    dp[0][j] = p[j - 1] === \"*\" &#x26;&#x26; dp[0][j - 2];\n  }\n\n  for (let i = 1; i &#x3C;= s.length; i++) {\n    dp[i] = [];\n    for (let j = 1; j &#x3C;= p.length; j++) {\n      switch (p[j - 1]) {\n        case \".\":\n          dp[i][j] = dp[i - 1][j - 1];\n          break;\n        case \"*\":\n          dp[i][j] =\n            dp[i][j - 2] ||\n            (dp[i - 1][j] &#x26;&#x26; (p[j - 2] === \".\" || s[i - 1] === p[j - 2]));\n          break;\n        default:\n          dp[i][j] = dp[i - 1][j - 1] &#x26;&#x26; s[i - 1] === p[j - 1];\n      }\n    }\n  }\n\n  return !!dp[s.length][p.length];\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/017._Letter_Combinations_of_a_Phone_Number/","relativePath":"docs/leetcode/017._Letter_Combinations_of_a_Phone_Number.md","relativeDir":"docs/leetcode","base":"017._Letter_Combinations_of_a_Phone_Number.md","name":"017._Letter_Combinations_of_a_Phone_Number","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/\">17. Letter Combinations of a Phone Number</a></h2>\n<h3>Problem:</h3>\n<p>Given a string containing digits from <code>2-9</code> inclusive, return all possible letter combinations that the number could represent.</p>\n<p>A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.</p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Telephone-keypad2.svg/200px-Telephone-keypad2.svg.png\" alt=\"200px-Telephone-keypad2\"></p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: \"23\"\nOutput: [\"ad\", \"ae\", \"af\", \"bd\", \"be\", \"bf\", \"cd\", \"ce\", \"cf\"].\n</code></pre>\n<p><strong>Note:</strong></p>\n<p>Although the above answer is in lexicographical order, your answer could be in any order you want.</p>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>JavaScript specific optimization.</p>\n<p><code>Array.prototype.push</code> accepts arbitrary arguments which enables tighter loops.</p>\n<p>Also, appending string is faster than prepending.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} digits\n * @return {string[]}\n */\nlet letterCombinations = function (digits) {\n  if (digits.length &#x3C;= 0) {\n    return [];\n  }\n\n  const letters = [\n    ,\n    ,\n    [\"a\", \"b\", \"c\"],\n    [\"d\", \"e\", \"f\"],\n    [\"g\", \"h\", \"i\"],\n    [\"j\", \"k\", \"l\"],\n    [\"m\", \"n\", \"o\"],\n    [\"p\", \"q\", \"r\", \"s\"],\n    [\"t\", \"u\", \"v\"],\n    [\"w\", \"x\", \"y\", \"z\"],\n  ];\n\n  let result = [\"\"];\n\n  for (let i = 0; i &#x3C; digits.length; i++) {\n    const arr = letters[digits[i]];\n    let newResult = [];\n    arr.forEach((c) => newResult.push(...result.map((r) => r + c)));\n    result = newResult;\n  }\n\n  return result;\n};\n</code></pre>\n<h4>TWO</h4>\n<p>General recursive DFS solution.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} digits\n * @return {string[]}\n */\nlet letterCombinations = function (digits) {\n  const letters = [\n    ,\n    ,\n    \"abc\",\n    \"def\",\n    \"ghi\",\n    \"jkl\",\n    \"mno\",\n    \"pqrs\",\n    \"tuv\",\n    \"wxyz\",\n  ];\n  const result = [];\n  if (digits.length > 0) {\n    dfs(digits, 0, \"\", letters, result);\n  }\n  return result;\n};\n\nfunction dfs(digits, idigit, path, letters, result) {\n  if (idigit >= digits.length) {\n    result.push(path);\n    return;\n  }\n  const str = letters[digits[idigit]];\n  for (let i = 0; i &#x3C; str.length; i++) {\n    dfs(digits, idigit + 1, path + str[i], letters, result);\n  }\n}\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/019._Remove_Nth_Node_From_End_of_List/","relativePath":"docs/leetcode/019._Remove_Nth_Node_From_End_of_List.md","relativeDir":"docs/leetcode","base":"019._Remove_Nth_Node_From_End_of_List.md","name":"019._Remove_Nth_Node_From_End_of_List","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/\">19. Remove Nth Node From End of List</a></h2>\n<h3>Problem:</h3>\n<p>Given a linked list, remove the <em>n</em>-th node from the end of list and return its head.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Given linked list: 1->2->3->4->5, and n = 2.\n\nAfter removing the second node from the end, the linked list becomes 1->2->3->5.\n</code></pre>\n<p><strong>Note:</strong></p>\n<p>Given <em>n</em> will always be valid.</p>\n<p><strong>Follow up:</strong></p>\n<p>Could you do this in one pass?</p>\n<h3>Solution:</h3>\n<p>Set a pointer <code>p1</code> for iterating, and <code>p2</code> which is <code>n</code> nodes behind, pointing at the (n+1)-th node from the end of list.</p>\n<p>Boundaries that should be awared of:</p>\n<ul>\n<li><code>p2</code> could be one node before <code>head</code>, which means the <code>head</code> should be removed.</li>\n<li><code>p2</code> could be larger than the length of the list (Though the description says <code>n</code> will always be valid, we take care of it anyway).</li>\n<li>It should be <code>p1.next</code> touches the end rather than <code>p1</code> because we want <code>p1</code> pointing at the last node.</li>\n</ul>\n<pre><code class=\"language-javascript\">/**\n * Definition for singly-linked list.\n * function ListNode(val) {\n *     this.val = val;\n *     this.next = null;\n * }\n */\n/**\n * @param {ListNode} head\n * @param {number} n\n * @return {ListNode}\n */\nlet removeNthFromEnd = function (head, n) {\n  let p1 = head;\n  while (p1 &#x26;&#x26; n--) {\n    p1 = p1.next;\n  }\n\n  if (!p1) {\n    return n ? head : head.next;\n  }\n\n  let p2 = head;\n  while (p1.next) {\n    p1 = p1.next;\n    p2 = p2.next;\n  }\n\n  p2.next = p2.next.next;\n\n  return head;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/020._Valid_Parentheses/","relativePath":"docs/leetcode/020._Valid_Parentheses.md","relativeDir":"docs/leetcode","base":"020._Valid_Parentheses.md","name":"020._Valid_Parentheses","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/valid-parentheses/description/\">20. Valid Parentheses</a></h2>\n<h3>Problem:</h3>\n<p>Given a string containing just the characters <code>'('</code>, <code>')'</code>, <code>'{'</code>, <code>'}'</code>, <code>'['</code> and <code>']'</code>, determine if the input string is valid.</p>\n<p>An input string is valid if:</p>\n<ol>\n<li>Open brackets must be closed by the same type of brackets.</li>\n<li>Open brackets must be closed in the correct order.</li>\n</ol>\n<p>Note that an empty string is also considered valid.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: \"()\"\nOutput: true\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: \"()[]{}\"\nOutput: true\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: \"(]\"\nOutput: false\n</code></pre>\n<p><strong>Example 4:</strong></p>\n<pre><code>Input: \"([)]\"\nOutput: false\n</code></pre>\n<p><strong>Example 5:</strong></p>\n<pre><code>Input: \"{[]}\"\nOutput: true\n</code></pre>\n<h3>Solution:</h3>\n<p>Stack 101.</p>\n<p>Whenever we meet a close bracket, we want to compare it to the last open bracket.</p>\n<p>That is why we use stack to store open brackets: first in, last out.</p>\n<p>And since there is only bracket characters, the last open bracket happens to be the last character.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isValid = function (s) {\n  const stack = [];\n  const pairs = {\n    \"}\": \"{\",\n    \"]\": \"[\",\n    \")\": \"(\",\n  };\n  for (const c of s) {\n    const open = pairs[c];\n    if (open) {\n      if (stack.pop() !== open) {\n        return false;\n      }\n    } else {\n      stack.push(c);\n    }\n  }\n  return stack.length &#x3C;= 0;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/022._Generate_Parentheses/","relativePath":"docs/leetcode/022._Generate_Parentheses.md","relativeDir":"docs/leetcode","base":"022._Generate_Parentheses.md","name":"022._Generate_Parentheses","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/generate-parentheses/description/\">22. Generate Parentheses</a></h2>\n<h3>Problem:</h3>\n<p>Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.</p>\n<p>For example, given n = 3, a solution set is:</p>\n<pre><code>[\n  \"((()))\",\n  \"(()())\",\n  \"(())()\",\n  \"()(())\",\n  \"()()()\"\n]\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Recursive DFS backtracking.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} n\n * @return {string[]}\n */\nlet generateParenthesis = function (n) {\n  const result = [];\n  if (n > 0) {\n    dfs(n, 0, 0, \"\", result);\n  }\n  return result;\n};\n\nfunction dfs(n, nopen, nclose, path, result) {\n  if (path.length === n * 2) {\n    result.push(path);\n    return;\n  }\n\n  if (nopen &#x3C; n) {\n    dfs(n, nopen + 1, nclose, path + \"(\", result);\n  }\n\n  if (nclose &#x3C; nopen) {\n    dfs(n, nopen, nclose + 1, path + \")\", result);\n  }\n}\n</code></pre>\n<h4>TWO</h4>\n<p>BFS.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} n\n * @return {string[]}\n */\nlet generateParenthesis = function (n) {\n  if (n &#x3C;= 0) {\n    return [];\n  }\n\n  const queue = [\n    {\n      path: \"(\",\n      open: 1,\n      close: 0,\n    },\n  ];\n\n  while (true) {\n    const { path, open, close } = queue.shift();\n    if (open + close === n * 2) {\n      queue.unshift({ path, open, close });\n      break;\n    }\n\n    if (open &#x3C; n) {\n      queue.push({\n        path: path + \"(\",\n        open: open + 1,\n        close,\n      });\n    }\n\n    if (close &#x3C; open) {\n      queue.push({\n        path: path + \")\",\n        open,\n        close: close + 1,\n      });\n    }\n  }\n\n  return queue.map((x) => x.path);\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/026._Remove_Duplicates_from_Sorted_Array/","relativePath":"docs/leetcode/026._Remove_Duplicates_from_Sorted_Array.md","relativeDir":"docs/leetcode","base":"026._Remove_Duplicates_from_Sorted_Array.md","name":"026._Remove_Duplicates_from_Sorted_Array","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/\">26. Remove Duplicates from Sorted Array</a></h2>\n<h3>Problem:</h3>\n<p>Given a sorted array <em>nums</em>, remove the duplicates <a href=\"https://en.wikipedia.org/wiki/In-place_algorithm\"><strong>in-place</strong></a> such that each element appear only <em>once</em> and return the new length.</p>\n<p>Do not allocate extra space for another array, you must do this by <strong>modifying the input array in-place</strong> with O(1) extra memory.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Given nums = [1,1,2],\n\nYour function should return length = 2, with the first two elements of nums being 1 and 2 respectively.\n\nIt doesn't matter what you leave beyond the returned length.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Given nums = [0,0,1,1,1,2,2,3,3,4],\n\nYour function should return length = 5, with the first five elements of nums being modified to 0, 1, 2, 3, and 4 respectively.\n\nIt doesn't matter what values are set beyond the returned length.\n</code></pre>\n<p><strong>Clarification:</strong></p>\n<p>Confused why the returned value is an integer but your answer is an array?</p>\n<p>Note that the input array is passed in by <strong>reference</strong>, which means modification to the input array will be known to the caller as well.</p>\n<p>Internally you can think of this:</p>\n<pre><code>// nums is passed in by reference. (i.e., without making a copy)\nint len = removeDuplicates(nums);\n\n// any modification to nums in your function would be known by the caller.\n// using the length returned by your function, it prints the first len elements.\nfor (int i = 0; i &#x3C; len; i++) {\n    print(nums[i]);\n}\n</code></pre>\n<h3>Solution:</h3>\n<p>The result array can only be shorter. That is why we can build the array in-place with the new length.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} nums\n * @return {number}\n */\nlet removeDuplicates = function (nums) {\n  let len = 0;\n  for (let i = 0; i &#x3C; nums.length; i++) {\n    if (nums[i] !== nums[i - 1]) {\n      nums[len++] = nums[i];\n    }\n  }\n  return len;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/031._Next_Permutation/","relativePath":"docs/leetcode/031._Next_Permutation.md","relativeDir":"docs/leetcode","base":"031._Next_Permutation.md","name":"031._Next_Permutation","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/next-permutation/description/\">31. Next Permutation</a></h2>\n<h3>Problem:</h3>\n<p>Implement <strong>next permutation</strong>, which rearranges numbers into the lexicographically next greater permutation of numbers.</p>\n<p>If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).</p>\n<p>The replacement must be <strong>in-place</strong> and use only constant extra memory.</p>\n<p>Here are some examples. Inputs are in the left-hand column and its corresponding outputs are in the right-hand column.</p>\n<p><code>1,2,3</code> → <code>1,3,2</code><br>\n<code>3,2,1</code> → <code>1,2,3</code><br>\n<code>1,1,5</code> → <code>1,5,1</code></p>\n<h3>Solution:</h3>\n<p>Observe a few longer examples and the pattern is self-evident.</p>\n<p>Divide the list into two parts. The first half must be incremental and the second half must be decremental.</p>\n<p>Reverse the second half and find the smallest number in it that is greater the last number of the first half.</p>\n<p>Swap the two.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} nums\n * @return {void} Do not return anything, modify nums in-place instead.\n */\nlet nextPermutation = function (nums) {\n  const len = nums.length;\n  if (len &#x3C;= 1) {\n    return;\n  }\n\n  for (let i = len - 1; i > 0; i--) {\n    if (nums[i] > nums[i - 1]) {\n      let t;\n      for (let s = i, e = len - 1; s &#x3C; e; s++, e--) {\n        t = nums[s];\n        nums[s] = nums[e];\n        nums[e] = t;\n      }\n\n      let j = len - 1;\n      while (nums[j] &#x3C;= nums[i - 1]) {\n        j--;\n      }\n\n      t = nums[j];\n      nums[j] = nums[i - 1];\n      nums[i - 1] = t;\n\n      break;\n    }\n  }\n\n  if (i === 0) {\n    nums.reverse();\n  }\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/029._Divide_Two_Integers/","relativePath":"docs/leetcode/029._Divide_Two_Integers.md","relativeDir":"docs/leetcode","base":"029._Divide_Two_Integers.md","name":"029._Divide_Two_Integers","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/divide-two-integers/description/\">29. Divide Two Integers</a></h2>\n<h3>Problem:</h3>\n<p>Given two integers <code>dividend</code> and <code>divisor</code>, divide two integers without using multiplication, division and mod operator.</p>\n<p>Return the quotient after dividing <code>dividend</code> by <code>divisor</code>.</p>\n<p>The integer division should truncate toward zero.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: dividend = 10, divisor = 3\nOutput: 3\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: dividend = 7, divisor = -3\nOutput: -2\n</code></pre>\n<p><strong>Note:</strong></p>\n<ul>\n<li>Both dividend and divisor will be 32-bit signed integers.</li>\n<li>The divisor will never be 0.</li>\n<li>Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−231,  231 − 1]. For the purpose of this problem, assume that your function returns 231 − 1 when the division result overflows.</li>\n</ul>\n<h3>Solution:</h3>\n<p>Every decimal number can be represented as <code>a0*2^0 + a1*2^1 + a2*2^2 + ... + an*2^n</code>.</p>\n<p>Replace multiplication and division with binary shifting.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} dividend\n * @param {number} divisor\n * @return {number}\n */\nlet divide = function (dividend, divisor) {\n  if (\n    divisor === 0 ||\n    (divisor === -1 &#x26;&#x26; dividend &#x3C; -2147483647) ||\n    dividend > 2147483647 ||\n    dividend &#x3C; -2147483648\n  ) {\n    return 2147483647;\n  }\n\n  const isNegative =\n    (dividend &#x3C; 0 &#x26;&#x26; divisor >= 0) || (dividend >= 0 &#x26;&#x26; divisor &#x3C; 0);\n  const pDividend = Math.abs(dividend);\n  const pDivisor = Math.abs(divisor);\n\n  if (dividend === 0 || pDividend &#x3C; pDivisor) {\n    return 0;\n  }\n\n  let doubling = pDivisor;\n  let count = 1;\n  while (doubling &#x3C; pDividend &#x26;&#x26; !(doubling &#x26; (1 &#x3C;&#x3C; 30))) {\n    doubling &#x3C;&#x3C;= 1;\n    count &#x3C;&#x3C;= 1;\n  }\n  if (doubling > pDividend) {\n    doubling >>>= 1;\n    count >>>= 1;\n  }\n\n  const result = count + divide(pDividend - doubling, pDivisor);\n  return isNegative ? -result : result;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/033._Search_in_Rotated_Sorted_Array/","relativePath":"docs/leetcode/033._Search_in_Rotated_Sorted_Array.md","relativeDir":"docs/leetcode","base":"033._Search_in_Rotated_Sorted_Array.md","name":"033._Search_in_Rotated_Sorted_Array","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2><a href=\"https://leetcode.com/problems/search-in-rotated-sorted-array/description/\">33. Search in Rotated Sorted Array</a></h2>\n<h3>Problem:</h3>\n<p>Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.</p>\n<p>(i.e., <code>[0,1,2,4,5,6,7]</code> might become <code>[4,5,6,7,0,1,2]</code>).</p>\n<p>You are given a target value to search. If found in the array return its index, otherwise return <code>-1</code>.</p>\n<p>You may assume no duplicate exists in the array.</p>\n<p>Your algorithm's runtime complexity must be in the order of <em>O</em>(log <em>n</em>).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: nums = [4,5,6,7,0,1,2], target = 0\nOutput: 4\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: nums = [4,5,6,7,0,1,2], target = 3\nOutput: -1\n</code></pre>\n<h3>Solution:</h3>\n<p>Obviously the problem requires binary search.</p>\n<p>The core idea of binary search is to pick the middle item and then decide to keep which half.</p>\n<p>The precondition of it is the array must be sorted.</p>\n<p>But take a closer look and we realize that only one of the two halves needs to be sorted. This is sufficient for us to know if the target is in that half. If not, then it must be in the other.</p>\n<p>Whenever we choose a pivot, it must be in one of the two sorted parts of the rotated array.</p>\n<ul>\n<li>If the pivot is in the left part. We know that the begin of the left part to the pivot are sorted.</li>\n<li>Otherwise the pivot is in the right part. We know that the end of the right part to the pivot are sorted.</li>\n</ul>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} nums\n * @param {number} target\n * @return {number}\n */\nlet search = function (nums, target) {\n  let s = 0;\n  let e = nums.length - 1;\n\n  while (s &#x3C;= e) {\n    const p = ((e + s) / 2) | 0;\n    const pivot = nums[p];\n\n    if (pivot === target) {\n      return p;\n    }\n\n    if (pivot &#x3C; nums[e]) {\n      // right half is sorted\n      if (target > pivot &#x26;&#x26; target &#x3C;= nums[e]) {\n        // target is inside the right half\n        s = p + 1;\n      } else {\n        e = p - 1;\n      }\n    } else {\n      // left half is sorted\n      if (target &#x3C; pivot &#x26;&#x26; target >= nums[s]) {\n        // target is inside the left half\n        e = p - 1;\n      } else {\n        s = p + 1;\n      }\n    }\n  }\n\n  return -1;\n};\n</code></pre>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>\n<hr>\n<p>☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆☆<em>: .｡. o(≧▽≦)o .｡.:</em>☆</p>\n<hr>"},{"url":"/docs/leetcode/","relativePath":"docs/leetcode/index.md","relativeDir":"docs/leetcode","base":"index.md","name":"index","frontmatter":{"title":"Leetcode","weight":0,"excerpt":"feel free to try the examples","seo":{"title":"Leetcode Examples","description":"Leetcode practice","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<br>\n<br>\n<h1>Leetcode </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://web-dev-collaborative.github.io/Leetcode-JS-PY-MD/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://web-dev-collaborative.github.io/Leetcode-JS-PY-MD/old_index.html\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>"},{"url":"/docs/projects/main-projects/","relativePath":"docs/projects/main-projects.md","relativeDir":"docs/projects","base":"main-projects.md","name":"main-projects","frontmatter":{"title":"RECENT PROJECTS","weight":0,"excerpt":"embedded utilities","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>  Potluck Planner </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://potluck-landing.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>Meditation App </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://meditate42app.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<h1>  Web Audio DAW      </h1>\n<br>\n<iframe src=\"https://mihirbeg28.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>React & Shopify Ecommerce Site (Norwex)     </h1>\n<br>\n<iframe src=\"https://friendly-amaranth-51833.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>Bgoonz Bookmarks   </h1>\n<br>\n<iframe src=\"https://bgoonzbookmarks.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>Goal Tracker  </h1>\n<br>\n<iframe src=\"https://splendid-onion-b0ec3.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>"},{"url":"/docs/projects/","relativePath":"docs/projects/index.md","relativeDir":"docs/projects","base":"index.md","name":"index","frontmatter":{"title":"Projects","excerpt":"We'd love it if you participate in the Web-Dev-Hubcommunity. Find out how to get connected.","seo":{"title":"Projects","description":"introductory-react-part-2\na-very-quick-guide-to-calculating-big-o-computational-complexity\nintroduction-to-react css-animations\n","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Projects Articles","keyName":"property"},{"name":"og:description","value":"","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Projectss"},{"name":"twitter:description","value":"This is the community page"},{"name":"og:image","value":"images/beige-maple.png","keyName":"property","relativeUrl":true}]},"template":"docs","weight":0},"html":"<br>\n<h1>  Links: </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://links4242.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<h1>  Search Awesome Lists      </h1>\n<br>\n<iframe src=\"https://bgoonz.github.io/searchAwesome/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Useful Resource Archive #3   </h1>\n<br>\n<iframe src=\"https://useful-resource-repo3-0.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Anywhere Fitness </h1>\n<br>\n<iframe src=\"https://frontend-iota.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>  Project Image Portfolio   </h1>\n<br>\n<iframe src=\"https://project-portfolio42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  Web Audio DAW      </h1>\n<br>\n<iframe src=\"https://mihirbeg28.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>React & Shopify Ecommerce Site (Norwex)     </h1>\n<br>\n<iframe src=\"https://friendly-amaranth-51833.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>Bgoonz Bookmarks   </h1>\n<br>\n<iframe src=\"https://bgoonzbookmarks.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>Portfolio </h1>\n<br>\n<iframe src=\"https://bg-portfolio.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<h1>Goal Tracker  </h1>\n<br>\n<iframe src=\"https://splendid-onion-b0ec3.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Potluck Planner </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://potluck-landing.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>Meditation App </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://meditate42app.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>"},{"url":"/docs/projects/mini-projects2/","relativePath":"docs/projects/mini-projects2.md","relativeDir":"docs/projects","base":"mini-projects2.md","name":"mini-projects2","frontmatter":{"title":"Mini Projects 2","excerpt":"In this section you'll learn how to add syntax highlighting, examples, callouts and much more.","seo":{"title":"Mini Projects 2","description":"This is the Mini Projects page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Mini Projects","keyName":"property"},{"name":"og:description","value":"This is the Mini Projects page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Mini Projects"},{"name":"twitter:description","value":"This is the Mini Projects page"}]},"template":"docs","weight":0},"html":"<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1> Random Embedable Content  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://random-list-of-embedable-content.vercel.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://futuristic-rosemary-d4acc.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>   </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://iframeshowcase.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz.blogspot.com/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>   </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://www.youtube.com/embed/xGZSWvFess8\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://ds-unit-5-lambda.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>   </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://sanity-gatsby-blog-web-skwx3b17.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1> Fractions Website </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://kguner-fractions-website.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  Dev Journal </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://dev-journal42.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1> Blood Sugars for  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://sanity-gatsby-hey-sugar-5.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1> Norwex Ecommerce  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://friendly-amaranth-51833.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1> Sidebar Blog </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://sidebar-blog.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  Markdown Templates  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://markdown-templates-42.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>"},{"url":"/docs/projects/embeded-websites/","relativePath":"docs/projects/embeded-websites.md","relativeDir":"docs/projects","base":"embeded-websites.md","name":"embeded-websites","frontmatter":{"title":"Embeded Websites & Projects","weight":0,"seo":{"title":"Gatsby Plugins For This Sites Content Model","description":"This is my markdown notes tempate","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Gatsby Plugins For This Sites Content Model","keyName":"property"},{"name":"og:description","value":"This is the Gatsby Plugins For This Sites Content Model page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Gatsby Plugins For This Sites Content Model"},{"name":"twitter:description","value":"This is the Gatsby Plugins For This Sites Content Model page"}]},"template":"docs"},"html":"<br>\n<br>\n<br>\n<h1>Family Promise Project:</h1>\n<h1>Table of contents</h1>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/README\">Home</a></li>\n</ul>\n<h2>navigation</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/navigation\">NAVIGATION</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/calendar\">Calendar</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/youtube\">Youtube:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/roadmap\">Roadmap:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/team-members\">TEAM MEMBERS</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/running-list-of-notes-links-and-pertinent-info-from-meetings\">Running List Of Notes Links &#x26; Pertinent Info From Meetings</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/trello/README\">Trello</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/trello/github-trello-integration\">Github/Trello Integration</a></li>\n</ul>\n</li>\n</ul>\n<h2>UX</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/README\">UX_TOPICS</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/action-items\">Action Items:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/accessibility\">Accessibility</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/figma-notes/README\">Figma Notes</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/figma-notes/notes\">Notes</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/figma-notes/prototyping-in-figma\">Prototyping In Figma</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/figma-notes/more-notes\">More Notes</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ux-design/README\">UX-Design</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ux-design/facebook-graph-api\">Facebook Graph API</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ant-design/README\">Ant Design</a></p>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ant-design/ant-components/README\">ANT Components</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ant-design/ant-components/buttons\">Buttons</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ant-design/ant-docs\">ANT DOCS</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/ant-design/application-codesandbox\">Application (Codesandbox)</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/examples\">Examples</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ux/untitled/how-to-add-external-url-links-to-your-prototype\">How to add external URL links to your prototype</a></li>\n</ul>\n</li>\n</ul>\n<h2>CANVAS</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/design/README\">Design</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/design/whats-inclusive-design\">What's Inclusive Design?</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/design/accessibility\">Accessibility</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/design/what-are-design-systems\">What are Design Systems?</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/canvas\">Canvas</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/notes/README\">Notes</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/notes/user-experience-design\">User Experience Design</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/notes/user-research\">User Research</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/notes/interaction-design\">Interaction Design</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/README\">UX-Engineer</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/patterns\">Patterns</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/design-tools\">Design Tools</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/design-critiques\">Design Critiques</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/product-review\">Product Review</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/quiz\">Quiz</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/canvas/ux-engineer/seven-principles-of-design\">Seven Principles of Design</a></li>\n</ul>\n</li>\n</ul>\n<h2>Front End</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/front-end/untitled\">Frontend:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/front-end/redux\">Redux</a></li>\n</ul>\n<h2>Back End</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/back-end/untitled/README\">Backend:</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/back-end/untitled/api\">API</a></li>\n</ul>\n</li>\n</ul>\n<h2>Research</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/research/untitled/README\">Research Navigation</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/research/untitled/front-end\">Front End</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/research/untitled/back-end\">Back End</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/research/untitled/ux\">UX</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/research/untitled/ptm\">PTM</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/research/untitled/general\">General</a></li>\n</ul>\n</li>\n</ul>\n<h2>DS_API</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/ds_api/untitled\">Data Science API</a></li>\n</ul>\n<h2>ROLES</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/roles/untitled/README\">TEAM ROLES</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/roles/untitled/bryan-guner\">Bryan Guner</a></li>\n</ul>\n</li>\n</ul>\n<h2>Action Items</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/action-items/untitled\">Trello</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/action-items/maps\">Maps</a></li>\n</ul>\n<h2>ARCHITECTURE</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/architecture/dns\">DNS</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/architecture/aws\">AWS</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/architecture/heroku\">Heroku</a></li>\n</ul>\n<h2>Questions</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/questions/from-previous-cohort\">From Previous Cohort</a></li>\n</ul>\n<h2>Standup Notes</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/standup-notes/meeting-notes/README\">Meeting Notes</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/standup-notes/meeting-notes/overview\">Stakeholder Meeting 1</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/standup-notes/meeting-notes/9-29-2021\">9/29/2021</a></li>\n</ul>\n</li>\n</ul>\n<h2>GitHub &#x26; Project Practice</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/github-and-project-practice/untitled/README\">GitHub</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/github-and-project-practice/untitled/untitled\">Github Guide</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/github-and-project-practice/untitled/github-actions\">Github Actions:</a></li>\n</ul>\n</li>\n</ul>\n<h2>MISC</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/misc/untitled\">MISCELLANEOUS</a></li>\n</ul>\n<h2>Background Information</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/background-information/background-info/README\">Background Info</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/background-information/background-info/swagger-open-api-specification\">Swagger OPEN API SPECIFICATION</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/background-information/background-info/github/README\">GITHUB:</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/background-information/background-info/github/git-bash\">Git Bash</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/background-information/background-info/github/git-prune\">Git Prune:</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h2>DOCS</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/coding/README\">Coding</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/coding/environment-variables\">Environment Variables</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/coding/git-rebase\">Git Rebase:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/coding/git-workflow\">Git Workflow:</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/coding/linting-and-formatting\">Linting and Formatting</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/project-docs/README\">Project Docs</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/project-docs/eng-docs-home\">Eng-Docs-Home</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/project-docs/basic-node-api\">Basic Node API</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/project-docs/contributing-to-this-scaffold-project\">Contributing to this scaffold project</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/project-docs/examples\">Examples:</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/project-description\">PROJECT DESCRIPTION (Feature List)</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/labs-learners-guide\">Labs Learners Guide</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/react/README\">REACT</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/react/untitled\">Create React App</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/react/awesome-react\">Awesome React</a></li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/untitled\">Links</a></li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/labs-engineering-docs/README\">Labs Engineering Docs</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/labs-engineering-docs/okta-basics\">Okta Basics</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/labs-engineering-docs/roadmap\">Roadmap</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/docs/labs-engineering-docs/repositories\">Repositories</a></li>\n</ul>\n</li>\n</ul>\n<h2>Workflow</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/workflow/workflow\">Workflow</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/workflow/advice\">Advice</a></li>\n</ul>\n<h2>AWS</h2>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/aws/README\">AWS</a></p>\n<ul>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/aws/elastic-beanstalk/README\">Elastic Beanstalk</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/aws/elastic-beanstalk/elastic-beanstalk-dns\">Elastic Beanstalk DNS</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/aws/amplify/README\">Amplify:</a></p>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/aws/amplify/amplify-dns\">Amplify-DNS</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/untitled-1\">Account Basics</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/aws/aws-networking\">AWS-Networking</a></li>\n</ul>\n<h2>Career &#x26; Job Hunt</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/career-and-job-hunt/career\">Career</a></li>\n</ul>\n<h2>Group 1</h2>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/lambda-labs/group-1/live-implementation\">Live Implementation</a></li>\n</ul>\n<iframe src=\"https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FbOwyinWBikQ5jdEpSx5WcI%2FFamily-Promise-Copy\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"Family_Promise_embed\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n<iframe src=\"https://codesandbox.io/embed/family-promise-embed-b434z?autoresize=1&fontsize=12&hidenavigation=1&theme=dark&view=preview\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"Family_Promise_embed\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<br>\n<h1>   Family-Promise Application</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://a.familypromiseservicetracker.dev/dashboard\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>   Speach Recognition api </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://random-static-html-deploys.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>   Paste To Markdown </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://euangoddard.github.io/clipboard2markdown/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n        \n        \n        \n<br>\n<br>\n<h1>   Paste Excel Tabel To Markdown </h1>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://codepen.io/bgoonz/embed/JjNaPpL?default-tab=result&theme-id=light\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>Paste excel to HTML</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://pedantic-wing-adbf82.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<h1>  Cloud Storage </h1>\n<br>\n<h2> Up to 1TB of cloud Storage for file sharing!</h2>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&resid=D21009FDD967A241%21538729&authkey=AHSDSyoYqzg2K2E\" height=\"275px\" width=\"17%\" style=\"zoom:0.69; align-self:center;display:auto;display: block;border:12px solid gold;\">\n</iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>     Resource Archive           </h1>\n<br>\n<iframe src=\"https://resourcerepo2.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>   Lambda Student Site </h1>\n<br>\n<iframe class=\"inner\" src=\"https://lambda-resources.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1> Text Tools     </h1>\n<br>\n<iframe src=\"https://devtools42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Ternary Converter   </h1>\n<br>\n<iframe src=\"https://ternary42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Github HTML Render from link </h1>\n<br>\n<iframe src=\"https://githtmlpreview.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Data Structures</h1>\n<br>\n<iframe src=\"https://determined-dijkstra-ee7390.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Interview     </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://web-dev-interview-prep-quiz-website.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1> Form Builder GUI </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://fourm-builder-gui.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<h1> Border Builder </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://codepen.io/bgoonz/embed/zYwLVmb?default-tab=html%2Cresult\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>                </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://ds-algo-official.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n        \n        \n        \n<br>\n<br>\n<br>\n<h1>                </h1>\n<br>\n        \n        \n <iframe height=\"800\" style=\"width: 100%;\" scrolling=\"yes\" title=\"Simple Typing Carousel \" src=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n  See the Pen <a href=\"https://codepen.io/bgoonz/pen/ExZvGoZ\">\n  Simple Typing Carousel </a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n <iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  title=\"Fibonacci Carousel\"\n      src=\"https://codepen.io/bgoonz/embed/JjNagJo?default-tab=result&theme-id=dark\" frameborder=\"no\" loading=\"lazy\"\n      allowtransparency=\"true\" allowfullscreen=\"true\">\n      See the Pen <a href=\"https://codepen.io/bgoonz/pen/JjNagJo\">\n        Fibonacci Carousel</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n      on <a href=\"https://codepen.io\">CodePen</a>.\n    </iframe>\n    <br>\n    <br>\n    <br>\n    <iframe height=\"1000px\" style=\"width: 1300px;\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  title=\"embed-twitter-feed\"\n      src=\"https://codepen.io/bgoonz/embed/poPOqEO?default-tab=result&theme-id=dark\" frameborder=\"no\" loading=\"lazy\"\n      allowtransparency=\"true\" allowfullscreen=\"true\">\n      See the Pen <a href=\"https://codepen.io/bgoonz/pen/poPOqEO\">\n        embed-twitter-feed</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n      on <a href=\"https://codepen.io\">CodePen</a>.\n    </iframe>\n    <br>\n    <br>\n    <br>\n\\\n    <br>\n    <br>\n    <br>\n    <iframe height=\"1000px\" style=\"width: 1300px;\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  src=\"//jsfiddle.net/bgoonz/vtz7820m/embedded/result/dark/\"\n      allowfullscreen=\"allowfullscreen\" frameborder=\"0\"></iframe>\n    <br>\n    <br>\n    <br>\n    <iframe height=\"1000px\" style=\"width: 1300px;\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n      src=\"//jsfiddle.net/bgoonz/1dye9uws/2/embedded/js,html,css,result/dark/\" allowfullscreen=\"allowfullscreen\"\n      frameborder=\"0\"></iframe>\n    <br>\n    <br>\n    <br>\n    <iframe height=\"1000px\" style=\"width: 1300px;\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  src=\"//jsfiddle.net/bgoonz/3mpgzkx7/1/embedded/\"\n      allowfullscreen=\"allowfullscreen\" frameborder=\"0\"></iframe> \n    <br>\n    <br>\n    <br>\n    <iframe loading=\"lazy\" src=\"https://codepen.io/bgoonz/embed/zYwJQaw?default-tab=html%2Cresult\"\n      style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n    <br>\n    <br>\n    <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n    <br>\n    <iframe loading=\"lazy\" src=\"https://codesandbox.io/embed/bigo-3wqy4?fontsize=14&hidenavigation=1&theme=dark\"\n      style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n    <br>\n    <br>\n    <br>\n    <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n    <iframe loading=\"lazy\"\n      src=\"https://codesandbox.io/embed/hvbrd-sockets-forked-vsi2o?fontsize=14&hidenavigation=1&theme=dark\"\n      style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n    <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n    <br>\n    <br>\n    <iframe loading=\"lazy\" src=\"https://codesandbox.io/embed/summer-surf-p6dei?fontsize=14&hidenavigation=1&theme=dark\"\n      style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"summer-surf-p6dei\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n    <br>\n    <br>\n    <br>\n    <br>\n    <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n    <br> <br>\n    <br>\n    <iframe loading=\"lazy\"\n      src=\"https://codesandbox.io/embed/sharp-feistel-x8bvv?fontsize=14&hidenavigation=1&theme=dark\"\n      style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"sharp-feistel-x8bvv\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n    <br>\n    <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n    <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n    <center>\n      <br>\n      <br>\n      <br>\n      <br>\n      <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\n        title=\"3D Cover Flow in React! | @keyframers 3.7\"\n        src=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\n        allowtransparency=\"true\" allowfullscreen=\"true\">\n        See the Pen <a href='https://codepen.io/bgoonz42/pen/RwpeaWr'>3D Cover Flow in React! | @keyframers\n          3.7</a> by Bryan\n        C Guner\n        (<a href='https://codepen.io/bgoonz42'>@bgoonz42</a>) on <a href='https://codepen.io'>CodePen</a>.\n      </iframe>\n      <br>\n      <br>\n      <br>\n      <br>\n      <br>\n      <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Simple Typing Carousel \"\n        src=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\n        allowtransparency=\"true\" allowfullscreen=\"true\">\n        See the Pen <a href=\"https://codepen.io/bgoonz/pen/ExZvGoZ\">\n          Simple Typing Carousel </a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n        on <a href=\"https://codepen.io\">CodePen</a>.\n      </iframe>\n      <br>\n      <br>\n      <br>\n      <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\n        title=\"3D Cover Flow in React! | @keyframers 3.7\"\n        src=\"https://codepen.io/bgoonz42/embed/RwpeaWr?height=375&theme=dark&default-tab=js,result\" frameborder=\"no\"\n        loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n        See the Pen <a href='https://codepen.io/bgoonz42/pen/RwpeaWr'>3D Cover Flow in React! | @keyframers\n          3.7</a> by Bryan\n        C Guner\n        (<a href='https://codepen.io/bgoonz42'>@bgoonz42</a>) on <a href='https://codepen.io'>CodePen</a>.\n      </iframe>\n      <br>\n      <br>\n      <br>\n    \n        <br>\n<iframe loading=\"lazy\" src=\"https://portfolio42.netlify.app/\"\n  style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\n  sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n<br>\n  <br>\n  <!-------------------------------------------------------------------------------------->\n  <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Video Background 1\"\n    src=\"https://codesandbox.io/embed/bgoonzblog20-oo3x5?fontsize=14&hidenavigation=1&theme=dark\"\n    style=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"bgoonzblog2.0\"\n    sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n  <br>\n  <br>\n  <br>\n  <!-------------------------------------------------------------------------------------->\n  <br>\n  <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Video Background 1\"\n    src=\"https://codepen.io/bgoonz/embed/BaRLKBd?default-tab=html%2Cresult&theme-id=dark\" frameborder=\"no\"\n    loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n    See the Pen <a href=\"https://codepen.io/bgoonz/pen/BaRLKBd\">\n      Video Background 1</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n    on <a href=\"https://codepen.io\">CodePen</a>.\n  </iframe>\n  <!-------------------------------------------------------------------------------------->\n  <br>\n<br>\n      <!-------------------------------------------------------------------------------------->\n      <br>\n<br>\n      <center>\n        <br>\n        <br>\n        <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\n          title=\"CSS-only Colorful Calendar Concept\" src=\"https://documentation-site-react2.vercel.app/\"\n          frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n          See the Pen <a href=\"https://codepen.io/bgoonz/pen/vYmKQYj\">\n            CSS-only Colorful Calendar Concept</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n          on <a href=\"https://codepen.io\">CodePen</a>.\n        </iframe>\n        <br>\n        <br>\n        <br>\n        <!-------------------------------------------------------------------------------------->\n        <br>\n<br>\n        <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"FullTextSearchjs\"\n          src=\"https://codepen.io/bgoonz/embed/QWvMWoQ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\n          allowtransparency=\"true\" allowfullscreen=\"true\">\n          See the Pen <a href=\"https://codepen.io/bgoonz/pen/QWvMWoQ\">\n            FullTextSearchjs</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n          on <a href=\"https://codepen.io\">CodePen</a>.\n        </iframe>\n        <br>\n        <br>\n        <br>\n        <!-------------------------------------------------------------------------------------->\n        <br>\n        <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"CSS Grid: Info Card\"\n          src=\"https://codepen.io/bgoonz42/embed/MWmpjmy?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\n          allowtransparency=\"true\" allowfullscreen=\"true\">\n          See the Pen <a href=\"https://codepen.io/bgoonz42/pen/MWmpjmy\">\n            CSS Grid: Info Card</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz42\">@bgoonz42</a>)\n          on <a href=\"https://codepen.io\">CodePen</a>.\n        </iframe>\n        <br>\n        <br>\n        <br>\n        <br>\n        <!-------------------------------------------------------------------------------------->\n        <iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\n          title=\"CSS-only Colorful Calendar Concept\"\n          src=\"https://codepen.io/bgoonz/embed/vYmKQYj?default-tab=html%2Cresult&theme-id=dark\" frameborder=\"no\"\n          loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n          See the Pen <a href=\"https://codepen.io/bgoonz/pen/vYmKQYj\">\n            CSS-only Colorful Calendar Concept</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n          on <a href=\"https://codepen.io\">CodePen</a>.\n        </iframe>\n        <br>\n        <br>\n        <br>"},{"url":"/docs/projects/list-of-projects/","relativePath":"docs/projects/list-of-projects.md","relativeDir":"docs/projects","base":"list-of-projects.md","name":"list-of-projects","frontmatter":{"title":"List Of Projects","excerpt":"We'd love it if you participate in the Web-Dev-Hubcommunity. Find out how to get connected.","seo":{"title":"List Of Projects","description":"introductory-react-part-2\na-very-quick-guide-to-calculating-big-o-computational-complexity\nintroduction-to-react css-animations\n","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"List Of Projects Articles","keyName":"property"},{"name":"og:description","value":"","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"List Of Projectss"},{"name":"twitter:description","value":"This is the community page"},{"name":"og:image","value":"images/beige-maple.png","keyName":"property","relativeUrl":true}]},"template":"docs","weight":0},"html":"<ol>\n<li><a href=\"https://web-dev-resource-hub.netlify.app\"> WEB DEV RESOURCE HUB </a></li>\n<li><a href=\"https://learning-redux42.netlify.app/\">Learn Redux</a></li>\n<li><a href=\"https://trusting-dijkstra-4d3b17.netlify.app\"> Data Structures Website </a></li>\n<li><a href=\"https://web-dev-interview-prep-quiz-website.netlify.app/intro-js2.html\">Web-Dev-Quizzes</a></li>\n<li><a href=\"https://zen-lamport-5aab2c.netlify.app\"> Recursion </a></li>\n<li><a href=\"https://csb-ov0d1-bgoonz.vercel.app/\">React Documentation Site</a></li>\n<li><a href=\"https://amazing-hodgkin-33aea6.netlify.app\"> Blogs-from-webdevhub </a></li>\n<li><a href=\"https://angry-fermat-dcf5dd.netlify.app\"> Realty Website Demo </a></li>\n<li><a href=\"https://boring-heisenberg-f425d8.netlify.app\"> Best-Prac &#x26; Tools </a></li>\n<li><a href=\"https://site-analysis.netlify.app/\">site-analysis</a></li>\n<li><a href=\"https://clever-bartik-b5ba19.netlify.app\"> a/AOpen Notes </a></li>\n<li><a href=\"https://code-playground.netlify.app\"> Iframe Embed Playground </a></li>\n<li><a href=\"https://condescending-lewin-c96727.netlify.app\"> Triggered Effects Guitar Platform </a></li>\n<li><a href=\"https://determined-dijkstra-666766.netlify.app\"> Live Form </a></li>\n<li><a href=\"https://determined-dijkstra-ee7390.netlify.app\"> Interview Questions </a></li>\n<li><a href=\"https://eager-northcutt-456076.netlify.app\"> Resources Compilation </a></li>\n<li><a href=\"https://ecstatic-jang-593fd1.netlify.app\"> React Blog Depreciated </a></li>\n<li><a href=\"https://eloquent-sammet-ba1810.netlify.app\"> MihirBeg.com </a></li>\n<li><a href=\"https://embedable-content.netlify.app\"> Embeded Html Projects </a></li>\n<li><a href=\"https://festive-borg-e4d856.netlify.app\"> Cheat Sheets </a></li>\n<li><a href=\"https://focused-pasteur-0faac8.netlify.app\"> Early Version Of WebDevHub </a></li>\n<li><a href=\"https://gists42.netlify.app\"> My Gists </a></li>\n<li><a href=\"https://gracious-raman-474030.netlify.app\"> DS-Algo-Links </a></li>\n<li><a href=\"https://happy-mestorf-0f8e75.netlify.app\"> Video Chat App </a></li>\n<li><a href=\"https://hungry-shaw-30d504.netlify.app\"> Ciriculumn </a></li>\n<li><a href=\"https://inspiring-jennings-d14689.netlify.app\"> Cheat Sheets </a></li>\n<li><a href=\"https://links4242.netlify.app\"> Links </a></li>\n<li><a href=\"https://modest-booth-4e17df.netlify.app\"> Medium Articles </a></li>\n<li><a href=\"https://modest-torvalds-34afbc.netlify.app\"> NextJS Blog Template </a></li>\n<li><a href=\"https://modest-varahamihira-772b59.netlify.app\"> React Demo </a></li>\n<li><a href=\"https://nervous-swartz-0ab2cc.netlify.app\"> Ecomerce Norwex V1 </a></li>\n<li><a href=\"https://objective-borg-a327cd.netlify.app\"> Gifs </a></li>\n<li><a href=\"https://pedantic-wing-adbf82.netlify.app\"> Excel2HTML </a></li>\n<li><a href=\"https://pensive-meitner-1ea8c4.netlify.app\"> Data Structures Site </a></li>\n<li><a href=\"https://portfolio42.netlify.app\"> Portfolio </a></li>\n<li><a href=\"https://priceless-shaw-86ccb2.netlify.app\"> Page Templates </a></li>\n<li><a href=\"https://quizzical-mcnulty-fa09f2.netlify.app\"> Photo Gallary </a></li>\n<li><a href=\"https://relaxed-bhaskara-dc85ec.netlify.app\"> Coffee Website </a></li>\n<li><a href=\"https://romantic-hamilton-514b79.netlify.app\"> Awesome Resources </a></li>\n<li><a href=\"https://silly-lichterman-b22b5f.netlify.app\"> Cheat Sheets </a></li>\n<li><a href=\"https://silly-shirley-ec955e.netlify.app\"> Link City </a></li>\n<li><a href=\"https://stoic-mccarthy-2c335f.netlify.app\"> VSCODE Extensions </a></li>\n<li><a href=\"https://web-dev-resource-hub-manual-deploy.netlify.app\"> webdevhub manual attempt </a></li>\n<li><a href=\"https://wonderful-pasteur-392fbe.netlify.app\"> Norwex Resources </a></li>\n<li><a href=\"https://zen-bhabha-bd046f.netlify.app\">idk </a></li>\n<li><a href=\"https://getting-started42.herokuapp.com/\">heroku bare bones template</a></li>\n<li><a href=\"https://bad-reads42.herokuapp.com/\">bad reads</a></li>\n<li><a href=\"https://documentation-site-react2.vercel.app/\">docusaurus</a></li>\n<li><a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326\">stackbit</a></li>\n</ol>\n<hr>\n<h1>More:</h1>\n<ul>\n<li><a href=\"https://determined-dijkstra-ee7390\">https://determined-dijkstra-ee7390</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app\">https://bgoonz-blog</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/stackbit-projects/best-celery-b2d7c\">https://github.com/stackbit-projects/best-celery-b2d7c</a></li>\n<li><a href=\"https://sanity-gatsby-blog-3-web-dnkdb4p7.netlify.app\">https://sanity-gatsby-blog-3-web-dnkdb4p7</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-blog3\">https://github.com/bgoonz/sanity-gatsby-blog3</a></li>\n<li><a href=\"https://ds-algo-official.netlify.app\">https://ds-algo-official</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\">https://github.com/bgoonz/DS-ALGO-OFFICIAL</a></li>\n<li><a href=\"https://bgoonz-blog-v3-0.netlify.app\">https://bgoonz-blog-v3-0</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/alternate-blog-theme\">https://github.com/bgoonz/alternate-blog-theme</a></li>\n<li><a href=\"https://sanity-signup.netlify.app\">https://sanity-signup</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/successful-cabbage\">https://github.com/bgoonz/successful-cabbage</a></li>\n<li><a href=\"https://bgoonz-bookmarks.netlify.app\">https://bgoonz-bookmarks</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/side-projects-42/superb-celery\">https://github.com/side-projects-42/superb-celery</a></li>\n<li><a href=\"https://side-bar-blog-4.netlify.app\">https://side-bar-blog-4</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/cool-hickory\">https://github.com/bgoonz/cool-hickory</a></li>\n<li><a href=\"https://bicknborty.netlify.app\">https://bicknborty</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/searching-bick-n-borty-api\">https://github.com/bgoonz/searching-bick-n-borty-api</a></li>\n<li><a href=\"https://blog3-backup-dd7df.netlify.app\">https://blog3-backup-dd7df</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/blog3-backup\">https://github.com/bgoonz/blog3-backup</a></li>\n<li><a href=\"https://bgoonzmedium.netlify.app\">https://bgoonzmedium</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/My-Medium-Blog\">https://github.com/bgoonz/My-Medium-Blog</a></li>\n<li><a href=\"https://adoring-nobel-85c068.netlify.app\">https://adoring-nobel-85c068</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/ntn-boilerplate\">https://github.com/bgoonz/ntn-boilerplate</a></li>\n<li><a href=\"https://random-static-html-deploys.netlify.app\">https://random-static-html-deploys</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/random-static-html-page-deploy\">https://github.com/bgoonz/random-static-html-page-deploy</a></li>\n<li><a href=\"https://docs42.netlify.app\">https://docs42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/docs-collection\">https://github.com/bgoonz/docs-collection</a></li>\n<li><a href=\"https://bgoonzblog20starter.netlify.app\">https://bgoonzblog20starter</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/graceful-pine\">https://github.com/bgoonz/graceful-pine</a></li>\n<li><a href=\"https://marvelous-aluminum-11a84.netlify.app\">https://marvelous-aluminum-11a84</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/marvelous-aluminum\">https://github.com/bgoonz/marvelous-aluminum</a></li>\n<li><a href=\"https://memes42069.netlify.app\">https://memes42069</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/stackbit-projects/oceanic-pluto-4029d\">https://github.com/stackbit-projects/oceanic-pluto-4029d</a></li>\n<li><a href=\"https://dev-journal42.netlify.app\">https://dev-journal42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/smart-artichoke\">https://github.com/bgoonz/smart-artichoke</a></li>\n<li><a href=\"https://bg-portfolio.netlify.app\">https://bg-portfolio</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/gatsby-starter-portfolio-cara\">https://github.com/bgoonz/gatsby-starter-portfolio-cara</a></li>\n<li><a href=\"https://sanity-gatsby-portfolio-3-studio-bit6zuzq.netlify.app\">https://sanity-gatsby-portfolio-3-studio-bit6zuzq</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-portfolio3\">https://github.com/bgoonz/sanity-gatsby-portfolio3</a></li>\n<li><a href=\"https://sanity-gatsby-portfolio-3-web-4dmiq19t\">https://sanity-gatsby-portfolio-3-web-4dmiq19t</a></li>\n<li><a href=\"https://random-embedable-content.netlify.app\">https://random-embedable-content</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/random-list-of-embedable-content\">https://github.com/bgoonz/random-list-of-embedable-content</a></li>\n<li><a href=\"https://optimistic-curie-ddd352.netlify.app\">https://optimistic-curie-ddd352</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/yellowcake-mailchimp\">https://github.com/bgoonz/yellowcake-mailchimp</a></li>\n<li><a href=\"https://links4242.netlify.app\">https://links4242</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Links-Shortcut-Site\">https://github.com/bgoonz/Links-Shortcut-Site</a></li>\n<li><a href=\"https://zen-bhabha-bd046f.netlify.app\">https://zen-bhabha-bd046f</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Common-npm-Readme-Compilation\">https://github.com/bgoonz/Common-npm-Readme-Compilation</a></li>\n<li><a href=\"https://potluck-landing.netlify.app\">https://potluck-landing</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/terrific-dolphin\">https://github.com/bgoonz/terrific-dolphin</a></li>\n<li><a href=\"https://mihirbegmusiclab.netlify.app\">https://mihirbegmusiclab</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/MihirBegMusicLab\">https://github.com/bgoonz/MihirBegMusicLab</a></li>\n<li><a href=\"https://interesting-aspen-ce986.netlify.app\">https://interesting-aspen-ce986</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/interesting-aspen\">https://github.com/bgoonz/interesting-aspen</a></li>\n<li><a href=\"https://mihirbeg28.netlify.app\">https://mihirbeg28</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/panoramic-eggplant\">https://github.com/bgoonz/panoramic-eggplant</a></li>\n<li><a href=\"https://enthusiastic-tomato-a7ebc\">https://enthusiastic-tomato-a7ebc</a></li>\n<li><a href=\"https://hugo-cms-42.netlify.app\">https://hugo-cms-42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/hugo-cms\">https://github.com/bgoonz/hugo-cms</a></li>\n<li><a href=\"https://bgoonz-cv.netlify.app\">https://bgoonz-cv</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/curious-eggplant\">https://github.com/bgoonz/curious-eggplant</a></li>\n<li><a href=\"https://exploring-next-sanity.netlify.app\">https://exploring-next-sanity</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/nervous-parsley\">https://github.com/bgoonz/nervous-parsley</a></li>\n<li><a href=\"https://adoring-carson-fac9fb.netlify.app\">https://adoring-carson-fac9fb</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/commercejs-nextjs-demo-store\">https://github.com/bgoonz/commercejs-nextjs-demo-store</a></li>\n<li><a href=\"https://kguner-fractions-website.netlify.app\">https://kguner-fractions-website</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/Web-Dev-Collaborative/fractions-visualizations-n-resources\">https://github.com/Web-Dev-Collaborative/fractions-visualizations-n-resources</a></li>\n<li><a href=\"https://quirky-meninsky-4181b5.netlify.app\">https://quirky-meninsky-4181b5</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\">https://github.com/side-projects-42/DS-Bash-Examples-Deploy</a></li>\n<li><a href=\"https://starter-520d2.netlify.app\">https://starter-520d2</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/starter\">https://github.com/bgoonz/starter</a></li>\n<li><a href=\"https://bg-resume.netlify.app\">https://bg-resume</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/html-resume\">https://github.com/bgoonz/html-resume</a></li>\n<li><a href=\"https://portfolio42.netlify.app\">https://portfolio42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/bgoonz.github.io\">https://github.com/bgoonz/bgoonz.github.io</a></li>\n<li><a href=\"https://objective-rosalind-d4ff71.netlify.app\">https://objective-rosalind-d4ff71</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/blog-research\">https://github.com/bgoonz/blog-research</a></li>\n<li><a href=\"https://hungry-shaw-30d504\">https://hungry-shaw-30d504</a></li>\n<li><a href=\"https://wonderful-pasteur-392fbe.netlify.app\">https://wonderful-pasteur-392fbe</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/norwex-react\">https://github.com/bgoonz/norwex-react</a></li>\n<li><a href=\"https://romantic-hamilton-514b79.netlify.app\">https://romantic-hamilton-514b79</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Cumulative-Resource-List\">https://github.com/bgoonz/Cumulative-Resource-List</a></li>\n<li><a href=\"https://stupefied-wilson-2bc726.netlify.app\">https://stupefied-wilson-2bc726</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/react-web-anki-flash-cards\">https://github.com/bgoonz/react-web-anki-flash-cards</a></li>\n<li><a href=\"https://upbeat-mayer-92c10b.netlify.app\">https://upbeat-mayer-92c10b</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/ecommerce-react\">https://github.com/bgoonz/ecommerce-react</a></li>\n<li><a href=\"https://modest-booth-4e17df.netlify.app\">https://modest-booth-4e17df</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Medium_Articles\">https://github.com/bgoonz/Medium_Articles</a></li>\n<li><a href=\"https://blog-v42-31eba.netlify.app\">https://blog-v42-31eba</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/blog-v42\">https://github.com/bgoonz/blog-v42</a></li>\n<li><a href=\"https://goofy-curran-95aa66.netlify.app\">https://goofy-curran-95aa66</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/gatsby-netlify-cms\">https://github.com/bgoonz/gatsby-netlify-cms</a></li>\n<li><a href=\"https://react-blog-1.netlify.app\">https://react-blog-1</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/React-Practice\">https://github.com/bgoonz/React-Practice</a></li>\n<li><a href=\"https://mihirbegmusic.netlify.app\">https://mihirbegmusic</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Mihir_Beg_Final\">https://github.com/bgoonz/Mihir<em>Beg</em>Final</a></li>\n<li><a href=\"https://bgoonz-games.netlify.app\">https://bgoonz-games</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Games\">https://github.com/bgoonz/Games</a></li>\n<li><a href=\"https://py-prac-42.netlify.app\">https://py-prac-42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/PYTHON_PRAC\">https://github.com/bgoonz/PYTHON_PRAC</a></li>\n<li><a href=\"https://synth-music-theory.netlify.app\">https://synth-music-theory</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard\">https://github.com/bgoonz/Music-Theory-n-Web-Synth-Keyboard</a></li>\n<li><a href=\"https://admiring-montalcini-965c0b.netlify.app\">https://admiring-montalcini-965c0b</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Standalone-Metranome\">https://github.com/bgoonz/Standalone-Metranome</a></li>\n<li><a href=\"https://sanity-gatsby-blog-3-studio-ch48ysi1.netlify.app\">https://sanity-gatsby-blog-3-studio-ch48ysi1</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-blog3\">https://github.com/bgoonz/sanity-gatsby-blog3</a></li>\n<li><a href=\"https://jovial-agnesi-8ec8b1.netlify.app\">https://jovial-agnesi-8ec8b1</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/mini-project-showcase\">https://github.com/bgoonz/mini-project-showcase</a></li>\n<li><a href=\"https://ternary42.netlify.app\">https://ternary42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Ternary-converter\">https://github.com/bgoonz/Ternary-converter</a></li>\n<li><a href=\"https://fourm-builder-gui.netlify.app\">https://fourm-builder-gui</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/form-builder-vanilla-js\">https://github.com/bgoonz/form-builder-vanilla-js</a></li>\n<li><a href=\"https://lambda-prep.netlify.app\">https://lambda-prep</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/lambda-prep\">https://github.com/bgoonz/lambda-prep</a></li>\n<li><a href=\"https://sanity-kitchen-sink-5-studio-9hogian6\">https://sanity-kitchen-sink-5-studio-9hogian6</a></li>\n<li><a href=\"https://ds-unit-5-lambda\">https://ds-unit-5-lambda</a></li>\n<li><a href=\"https://hopeful-shockley-150bee.netlify.app\">https://hopeful-shockley-150bee</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Potluck-Planner\">https://github.com/bgoonz/Potluck-Planner</a></li>\n<li><a href=\"https://sidebar-blog.netlify.app\">https://sidebar-blog</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/side-projects-42/friendly-panda\">https://github.com/side-projects-42/friendly-panda</a></li>\n<li><a href=\"https://cheatsheets42\">https://cheatsheets42</a></li>\n<li><a href=\"https://silly-lichterman-b22b5f\">https://silly-lichterman-b22b5f</a></li>\n<li><a href=\"https://learning-redux42\">https://learning-redux42</a></li>\n<li><a href=\"https://project-portfolio42.netlify.app\">https://project-portfolio42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/curious-zebra\">https://github.com/bgoonz/curious-zebra</a></li>\n<li><a href=\"https://splendid-onion-b0ec3.netlify.app\">https://splendid-onion-b0ec3</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/stackbit-projects/splendid-onion-b0ec3\">https://github.com/stackbit-projects/splendid-onion-b0ec3</a></li>\n<li><a href=\"https://bgoonzblog20-redo.netlify.app\">https://bgoonzblog20-redo</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/modern-triceratops\">https://github.com/bgoonz/modern-triceratops</a></li>\n<li><a href=\"https://hardcore-hamilton-c5b45e.netlify.app\">https://hardcore-hamilton-c5b45e</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/my-lambda-projects/peer\">https://github.com/my-lambda-projects/peer</a></li>\n<li><a href=\"https://curious-rabbit-f33af.netlify.app\">https://curious-rabbit-f33af</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/stackbit-projects/curious-rabbit-f33af\">https://github.com/stackbit-projects/curious-rabbit-f33af</a></li>\n<li><a href=\"https://kind-petunia-e8f9f.netlify.app\">https://kind-petunia-e8f9f</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/kind-petunia\">https://github.com/bgoonz/kind-petunia</a></li>\n<li><a href=\"https://elite-cabbage-3551b.netlify.app\">https://elite-cabbage-3551b</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/elite-cabbage\">https://github.com/bgoonz/elite-cabbage</a></li>\n<li><a href=\"https://norwex-next-js.netlify.app\">https://norwex-next-js</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/commercejs-nextjs-demo-store\">https://github.com/bgoonz/commercejs-nextjs-demo-store</a></li>\n<li><a href=\"https://sanity-gatsby-portfolio-studio-89chyji1.netlify.app\">https://sanity-gatsby-portfolio-studio-89chyji1</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-portfolio\">https://github.com/bgoonz/sanity-gatsby-portfolio</a></li>\n<li><a href=\"https://sanity-gatsby-blog-studio-m195df5o.netlify.app\">https://sanity-gatsby-blog-studio-m195df5o</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-blog\">https://github.com/bgoonz/sanity-gatsby-blog</a></li>\n<li><a href=\"https://sanity-translation-examples-studio-u93wc5ox.netlify.app\">https://sanity-translation-examples-studio-u93wc5ox</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-translation-examples\">https://github.com/bgoonz/sanity-translation-examples</a></li>\n<li><a href=\"https://sanity-catalyst-studio-njajg3jt.netlify.app\">https://sanity-catalyst-studio-njajg3jt</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-catalyst\">https://github.com/bgoonz/sanity-catalyst</a></li>\n<li><a href=\"https://sanity-catalyst-web-1zjgvx2t\">https://sanity-catalyst-web-1zjgvx2t</a></li>\n<li><a href=\"https://sanity-nuxt-events-studio-zd46wiji.netlify.app\">https://sanity-nuxt-events-studio-zd46wiji</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-nuxt-events\">https://github.com/bgoonz/sanity-nuxt-events</a></li>\n<li><a href=\"https://sad-ramanujan-235384\">https://sad-ramanujan-235384</a></li>\n<li><a href=\"https://gitlab.com/bryan.guner.dev/starter-hugo-online-course\">https://gitlab.com/bryan.guner.dev/starter-hugo-online-course</a></li>\n<li><a href=\"https://vibrant-noether-dbe366.netlify.app\">https://vibrant-noether-dbe366</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/jamstack-comments-engine\">https://github.com/bgoonz/jamstack-comments-engine</a></li>\n<li><a href=\"https://objective-torvalds-1c12dd.netlify.app\">https://objective-torvalds-1c12dd</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/jamstack-comments-engine1\">https://github.com/bgoonz/jamstack-comments-engine1</a></li>\n<li><a href=\"https://friendly-poincare-a11e2f.netlify.app\">https://friendly-poincare-a11e2f</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/jamstack-comments-engine2\">https://github.com/bgoonz/jamstack-comments-engine2</a></li>\n<li><a href=\"https://sanity-gatsby-blog-4-studio-p6qrh84r.netlify.app\">https://sanity-gatsby-blog-4-studio-p6qrh84r</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-blog4\">https://github.com/bgoonz/sanity-gatsby-blog4</a></li>\n<li><a href=\"https://festive-kilby-f0a784\">https://festive-kilby-f0a784</a></li>\n<li><a href=\"https://gitlab.com/bryan.guner.dev/one-click-hugo-cms\">https://gitlab.com/bryan.guner.dev/one-click-hugo-cms</a></li>\n<li><a href=\"https://keen-williams-48be7c\">https://keen-williams-48be7c</a></li>\n<li><a href=\"https://gitlab.com/bryan.guner.dev/algo-prac\">https://gitlab.com/bryan.guner.dev/algo-prac</a></li>\n<li><a href=\"https://bgoonzgist\">https://bgoonzgist</a></li>\n<li><a href=\"https://resourcerepo2\">https://resourcerepo2</a></li>\n<li><a href=\"https://sanity-gatsby-blog-4-web-mobyn8k4.netlify.app\">https://sanity-gatsby-blog-4-web-mobyn8k4</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-blog4\">https://github.com/bgoonz/sanity-gatsby-blog4</a></li>\n<li><a href=\"https://festive-elion-13b19c.netlify.app\">https://festive-elion-13b19c</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/nextjs-netlify-blog-template2\">https://github.com/bgoonz/nextjs-netlify-blog-template2</a></li>\n<li><a href=\"https://sanity-nuxt-events-web-i78cd7mw.netlify.app\">https://sanity-nuxt-events-web-i78cd7mw</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-nuxt-events\">https://github.com/bgoonz/sanity-nuxt-events</a></li>\n<li><a href=\"https://sanity-gatsby-blog-web-skwx3b17.netlify.app\">https://sanity-gatsby-blog-web-skwx3b17</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-blog\">https://github.com/bgoonz/sanity-gatsby-blog</a></li>\n<li><a href=\"https://sanity-gatsby-portfolio-web-1wwhtk8k.netlify.app\">https://sanity-gatsby-portfolio-web-1wwhtk8k</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-portfolio\">https://github.com/bgoonz/sanity-gatsby-portfolio</a></li>\n<li><a href=\"https://sanity-gatsby-hey-sugar-5.netlify.app\">https://sanity-gatsby-hey-sugar-5</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-hey-sugar5\">https://github.com/bgoonz/sanity-gatsby-hey-sugar5</a></li>\n<li><a href=\"https://unruffled-bhabha-2ea500.netlify.app\">https://unruffled-bhabha-2ea500</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/commercejs-nextjs-demo-store42\">https://github.com/bgoonz/commercejs-nextjs-demo-store42</a></li>\n<li><a href=\"https://bgoonzblog20-backup.netlify.app\">https://bgoonzblog20-backup</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/BGOONZBLOG2.0STABLE\">https://github.com/bgoonz/BGOONZBLOG2.0STABLE</a></li>\n<li><a href=\"https://wizardly-hermann-c9ade8.netlify.app\">https://wizardly-hermann-c9ade8</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/nextjs-netlify-blog-template\">https://github.com/bgoonz/nextjs-netlify-blog-template</a></li>\n<li><a href=\"https://sanity-kitchen-sink-5-web.netlify.app\">https://sanity-kitchen-sink-5-web</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-kitchen-sink5\">https://github.com/bgoonz/sanity-kitchen-sink5</a></li>\n<li><a href=\"https://iframeshowcase.netlify.app\">https://iframeshowcase</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/iframe-showcase\">https://github.com/bgoonz/iframe-showcase</a></li>\n<li><a href=\"https://friendly-amaranth-51833.netlify.app\">https://friendly-amaranth-51833</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/friendly-amaranth\">https://github.com/bgoonz/friendly-amaranth</a></li>\n<li><a href=\"https://sanity-kitchen-sink-web-geaa75ie.netlify.app\">https://sanity-kitchen-sink-web-geaa75ie</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-kitchen-sink\">https://github.com/bgoonz/sanity-kitchen-sink</a></li>\n<li><a href=\"https://lambda-resources.netlify.app\">https://lambda-resources</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Lambda\">https://github.com/bgoonz/Lambda</a></li>\n<li><a href=\"https://bgoonzblog30.netlify.app\">https://bgoonzblog30</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/bgoonzblog3.0\">https://github.com/bgoonz/bgoonzblog3.0</a></li>\n<li><a href=\"https://sanity-commercelayer-web-56265s29.netlify.app\">https://sanity-commercelayer-web-56265s29</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-commercelayer\">https://github.com/bgoonz/sanity-commercelayer</a></li>\n<li><a href=\"https://sanity-kitchen-sink-studio-us5ymc5z.netlify.app\">https://sanity-kitchen-sink-studio-us5ymc5z</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-kitchen-sink\">https://github.com/bgoonz/sanity-kitchen-sink</a></li>\n<li><a href=\"https://sanity-commercelayer-1-studio-rkmntw55.netlify.app\">https://sanity-commercelayer-1-studio-rkmntw55</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-commercelayer1\">https://github.com/bgoonz/sanity-commercelayer1</a></li>\n<li><a href=\"https://sanity-commercelayer-1-web\">https://sanity-commercelayer-1-web</a></li>\n<li><a href=\"https://sanity-gatsby-hey-sugar-studio-rkg94h5e.netlify.app\">https://sanity-gatsby-hey-sugar-studio-rkg94h5e</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-hey-sugar\">https://github.com/bgoonz/sanity-gatsby-hey-sugar</a></li>\n<li><a href=\"https://sanity-gatsby-hey-sugar-web-666eqtdv\">https://sanity-gatsby-hey-sugar-web-666eqtdv</a></li>\n<li><a href=\"https://sanity-gatsby-hey-sugar-2-web.netlify.app\">https://sanity-gatsby-hey-sugar-2-web</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-hey-sugar2\">https://github.com/bgoonz/sanity-gatsby-hey-sugar2</a></li>\n<li><a href=\"https://sanity-gatsby-hey-sugar-2-studio-1dm9vw5o\">https://sanity-gatsby-hey-sugar-2-studio-1dm9vw5o</a></li>\n<li><a href=\"https://sanity-kitchen-sink-2-studio-71rv9mea.netlify.app\">https://sanity-kitchen-sink-2-studio-71rv9mea</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-kitchen-sink2\">https://github.com/bgoonz/sanity-kitchen-sink2</a></li>\n<li><a href=\"https://sanity-kitchen-sink-2-web-p1dc8gro\">https://sanity-kitchen-sink-2-web-p1dc8gro</a></li>\n<li><a href=\"https://sanity-jigsaw-blog-studio-mgk1nds9.netlify.app\">https://sanity-jigsaw-blog-studio-mgk1nds9</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-jigsaw-blog\">https://github.com/bgoonz/sanity-jigsaw-blog</a></li>\n<li><a href=\"https://sanity-jigsaw-blog-web-cy6y69s7\">https://sanity-jigsaw-blog-web-cy6y69s7</a></li>\n<li><a href=\"https://sanity-kitchen-sink-3-studio-qpaz93e3.netlify.app\">https://sanity-kitchen-sink-3-studio-qpaz93e3</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-kitchen-sink3\">https://github.com/bgoonz/sanity-kitchen-sink3</a></li>\n<li><a href=\"https://sanity-kitchen-sink-3-web-v2fb8vmv\">https://sanity-kitchen-sink-3-web-v2fb8vmv</a></li>\n<li><a href=\"https://sanity-gatsby-hey-sugar-5-studio.netlify.app\">https://sanity-gatsby-hey-sugar-5-studio</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/sanity-gatsby-hey-sugar5\">https://github.com/bgoonz/sanity-gatsby-hey-sugar5</a></li>\n<li><a href=\"https://nervous-swartz-0ab2cc.netlify.app\">https://nervous-swartz-0ab2cc</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/ecommerce-interactive\">https://github.com/bgoonz/ecommerce-interactive</a></li>\n<li><a href=\"https://recursion-prompts.netlify.app\">https://recursion-prompts</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Live-htmlRendered-Mocha-Spec--Recursion-Practice\">https://github.com/bgoonz/Live-htmlRendered-Mocha-Spec--Recursion-Practice</a></li>\n<li><a href=\"https://clever-ramanujan-f9ce0a.netlify.app\">https://clever-ramanujan-f9ce0a</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\">https://github.com/bgoonz/Lambda-Resource-Static-Assets</a></li>\n<li><a href=\"https://gracious-raman-474030.netlify.app\">https://gracious-raman-474030</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Data-Struc-Static\">https://github.com/bgoonz/Data-Struc-Static</a></li>\n<li><a href=\"https://pedantic-wing-adbf82.netlify.app\">https://pedantic-wing-adbf82</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/excel2html-table\">https://github.com/bgoonz/excel2html-table</a></li>\n<li><a href=\"https://happy-mestorf-0f8e75.netlify.app\">https://happy-mestorf-0f8e75</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/zumzi-chat-messenger\">https://github.com/bgoonz/zumzi-chat-messenger</a></li>\n<li><a href=\"https://live-form.netlify.app\">https://live-form</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/live-form\">https://github.com/bgoonz/live-form</a></li>\n<li><a href=\"https://trusting-aryabhata-e5438d.netlify.app\">https://trusting-aryabhata-e5438d</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/vscode-Extension-readmes\">https://github.com/bgoonz/vscode-Extension-readmes</a></li>\n<li><a href=\"https://jovial-keller-063835.netlify.app\">https://jovial-keller-063835</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/https___mihirbeg.com_\">https://github.com/bgoonz/https<em>__mihirbeg.com</em></a></li>\n<li><a href=\"https://web-dev-resource-hub.netlify.app\">https://web-dev-resource-hub</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/web-dev-notes-backup\">https://github.com/bgoonz/web-dev-notes-backup</a></li>\n<li><a href=\"https://flamboyant-northcutt-14b025.netlify.app\">https://flamboyant-northcutt-14b025</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/week-10-take-2\">https://github.com/bgoonz/week-10-take-2</a></li>\n<li><a href=\"https://bgoonzconnekt4.netlify.app\">https://bgoonzconnekt4</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Connect-Four-Final-Version\">https://github.com/bgoonz/Connect-Four-Final-Version</a></li>\n<li><a href=\"https://thealgorithms\">https://thealgorithms</a></li>\n<li><a href=\"https://hardcore-lamport-7eb855.netlify.app\">https://hardcore-lamport-7eb855</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/nextjs-netlify-blog-template42\">https://github.com/bgoonz/nextjs-netlify-blog-template42</a></li>\n<li><a href=\"https://sanity-commercelayer-studio-nzbh7yx7\">https://sanity-commercelayer-studio-nzbh7yx7</a></li>\n<li><a href=\"https://python-playground42.netlify.app\">https://python-playground42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/python-playground-embed\">https://github.com/bgoonz/python-playground-embed</a></li>\n<li><a href=\"https://elegant-goodall-566182\">https://elegant-goodall-566182</a></li>\n<li><a href=\"https://python-playground43\">https://python-playground43</a></li>\n<li><a href=\"https://scopeclosurecontext.netlify.app\">https://scopeclosurecontext</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/scope-closure-context\">https://github.com/bgoonz/scope-closure-context</a></li>\n<li><a href=\"https://meditate42app.netlify.app\">https://meditate42app</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/meditation-app\">https://github.com/bgoonz/meditation-app</a></li>\n<li><a href=\"https://site-analysis.netlify.app\">https://site-analysis</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/site-analysis\">https://github.com/bgoonz/site-analysis</a></li>\n<li><a href=\"https://tetris42.netlify.app\">https://tetris42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/TetrisJS\">https://github.com/bgoonz/TetrisJS</a></li>\n<li><a href=\"https://githtmlpreview.netlify.app\">https://githtmlpreview</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL\">https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL</a></li>\n<li><a href=\"https://devtools42.netlify.app\">https://devtools42</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/TexTools\">https://github.com/bgoonz/TexTools</a></li>\n<li><a href=\"https://project-showcase-bgoonz.netlify.app\">https://project-showcase-bgoonz</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Project-Showcase\">https://github.com/bgoonz/Project-Showcase</a></li>\n<li><a href=\"https://code-playground.netlify.app\">https://code-playground</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground\">https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground</a></li>\n<li><a href=\"https://condescending-lewin-c96727.netlify.app\">https://condescending-lewin-c96727</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering\">https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering</a></li>\n<li><a href=\"https://oval-cabbage-354f6.netlify.app\">https://oval-cabbage-354f6</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/oval-cabbage\">https://github.com/bgoonz/oval-cabbage</a></li>\n<li><a href=\"https://web-dev-interview-prep-quiz-website.netlify.app\">https://web-dev-interview-prep-quiz-website</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/web-dev-interview-prep-quiz-website\">https://github.com/bgoonz/web-dev-interview-prep-quiz-website</a></li>\n<li><a href=\"https://priceless-shaw-86ccb2.netlify.app\">https://priceless-shaw-86ccb2</a></li>\n</ul>\n<hr>\n<ul>\n<li><a href=\"https://github.com/bgoonz/atlassian-templates\">https://github.com/bgoonz/atlassian-templates</a></li>\n</ul>"},{"url":"/docs/projects/my-websites/","relativePath":"docs/projects/my-websites.md","relativeDir":"docs/projects","base":"my-websites.md","name":"my-websites","frontmatter":{"title":"My Sites","excerpt":"In this section you'll learn how to add syntax highlighting, examples, callouts and much more.","seo":{"title":"My Sites","description":"This is the My Sites page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"My Sites","keyName":"property"},{"name":"og:description","value":"This is the My Sites page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"My Sites"},{"name":"twitter:description","value":"This is the My Sites page"}]},"template":"docs","weight":0},"html":"<iframe src=\"https://random-static-html-deploys.netlify.app/my-websites/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<h1> Links </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://links4242.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<h1> Wikipedia Viewer</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://random-static-html-deploys.netlify.app/wikipedia-viewer.html\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://web-dev-resource-hub.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://learning-redux42.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>/\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://trusting-dijkstra-4d3b17.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://web-dev-interview-prep-quiz-website.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>/intro-js2.html\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://modest-booth-4e17df.netlify.app/\n\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>/intro-js2.html\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://zen-lamport-5aab2c.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://csb-ov0d1-bgoonz.vercel.app/\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://amazing-hodgkin-33aea6.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://angry-fermat-dcf5dd.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://boring-heisenberg-f425d8.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://site-analysis.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>/\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://clever-bartik-b5ba19.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://code-playground.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://condescending-lewin-c96727.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://determined-dijkstra-666766.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://determined-dijkstra-ee7390.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://eager-northcutt-456076.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://ecstatic-jang-593fd1.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://eloquent-sammet-ba1810.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://embedable-content.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://festive-borg-e4d856.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://focused-pasteur-0faac8.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://gists42.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://gracious-raman-474030.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://happy-mestorf-0f8e75.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://hungry-shaw-30d504.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://inspiring-jennings-d14689.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://links4242.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://modest-booth-4e17df.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://modest-torvalds-34afbc.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://modest-varahamihira-772b59.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://nervous-swartz-0ab2cc.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://objective-borg-a327cd.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://pedantic-wing-adbf82.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://pensive-meitner-1ea8c4.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n \n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://sanity-gatsby-portfolio-3-web-4dmiq19t.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n \n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://project-portfolio42.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://portfolio42.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://priceless-shaw-86ccb2.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://quizzical-mcnulty-fa09f2.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://relaxed-bhaskara-dc85ec.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://romantic-hamilton-514b79.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://silly-lichterman-b22b5f.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://silly-shirley-ec955e.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://stoic-mccarthy-2c335f.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://web-dev-resource-hub-manual-deploy.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https\n://wonderful-pasteur-392fbe.netlify.app/\" height=\"800px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\" \n       frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n <br>\n <br>\n<hr>\n <br>\n <br>"},{"url":"/docs/projects/mini-projects/","relativePath":"docs/projects/mini-projects.md","relativeDir":"docs/projects","base":"mini-projects.md","name":"mini-projects","frontmatter":{"title":"Mini Projects","excerpt":"We'd love it if you participate in the Web-Dev-Hubcommunity. Find out how to get connected.","seo":{"title":"Mini Projects","description":"introductory-react-part-2\na-very-quick-guide-to-calculating-big-o-computational-complexity\nintroduction-to-react css-animations\n","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Mini Projects Articles","keyName":"property"},{"name":"og:description","value":"","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Mini Projectss"},{"name":"twitter:description","value":"This is the community page"},{"name":"og:image","value":"images/beige-maple.png","keyName":"property","relativeUrl":true}]},"template":"docs","weight":0},"html":"<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/NWjrEWV?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/MWpRXzb?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/BaWEVqg?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/WNpqNYG?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/MWpMWzE?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/rNyENQJ?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/zYZVYMj?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/YzZozOM?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/gOmVErj?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/vYmYzqw?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/dyvBYNj?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/ExWBVWb?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/XWMELYy?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWpmXxq?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/eYvMKwe?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWpmmom?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWpmmPm?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/JjWLLqj?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/MWpVVLP?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/gOmeeEm?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/NWgdZyq?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/RwKYRoo?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/LYyBwEp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWgYoBp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/MWbxYme?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/dyOaoXb?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/ExZxMPN?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/ZEKOmYW?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/bGWgLaR?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWvMQrb?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/JjNXROo?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/abWNmqo?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/bGWpwvv?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/mdmPrwR?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/BaRKLZw?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/RwVaGZo?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/BaRdabZ?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/OJWzbRa?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/KKaJwgo?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/ExZrayM?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/yLgZLrp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/dyNayLB?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/PoWVovN?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/VwPgwgo?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/YzNBzbK?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/NWdoWVp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/mdRvdzd?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/LYxqYMa?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/wvgNvYW?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/LYxqYBq?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/jOydOvm?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/ZELwEMv?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/oNBmNPV?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/WNRPbeO?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/poRGvzp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/WNRPNpw?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/NWdoWvN?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/LYxqEZP?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/wvgNByP?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/eYgxmyx?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/JjExopj?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/GRrzRGR?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/vYxGLao?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/abwzxKP?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/XWgJQYP?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/powvBZp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/wveBJBM?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWgwpGv?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/powvegw?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/eYRmvJV?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/GREgWEp?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/NWgdVOJ?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/QWgdVaa?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/MWmGPvO?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/rNmJMaz?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/MWmQjYJ?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe\n  height=\"300\"\n  style=\"width: 100%\"\n  scrolling=\"no\"\n  title=\"Neural Network Visualization (animated SVG)\"\n  src=\"https://codepen.io/bgoonz/embed/eYWVdmR?default-tab=html%2Cresult\"\n  frameborder=\"no\"\n  loading=\"lazy\"\n  allowtransparency=\"true\"\n  allowfullscreen=\"true\"\n></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  title=\"searchblog2.0\"\nsrc=\"https://codepen.io/bgoonz/embed/LYyBwEp?default-tab=result&theme-id=dark\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/LYyBwEp\">\nsearchblog2.0</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  title=\"Fibonacci Carousel\" src=\"\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://replit.com/@bgoonz/Comments-1#index.html\">\nFibonacci Carousel</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<iframe scrolling=\"yes\" src=\"https://goonlinetools.com/covid19/global\" style=\"border: 0px none;height: 540px; margin-top: -110px; margin-bottom: -220px; width: 100%;\"> </iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  title=\"Fibonacci Carousel\"\nsrc=\"https://codepen.io/bgoonz/embed/JjNagJo?default-tab=result&theme-id=dark\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/JjNagJo\">\nFibonacci Carousel</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  title=\"embed-twitter-feed\"\nsrc=\"https://codepen.io/bgoonz/embed/poPOqEO?default-tab=result&theme-id=dark\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/poPOqEO\">\nembed-twitter-feed</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  src=\"//jsfiddle.net/bgoonz/j4xt839d/embedded/result/\"\nallowfullscreen=\"allowfullscreen\" frameborder=\"0\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  src=\"//jsfiddle.net/bgoonz/76osauer/1/embedded/result/\"\nallowfullscreen=\"allowfullscreen\" frameborder=\"0\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  src=\"//jsfiddle.net/bgoonz/vtz7820m/embedded/result/dark/\"\nallowfullscreen=\"allowfullscreen\" frameborder=\"0\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\nsrc=\"//jsfiddle.net/bgoonz/1dye9uws/2/embedded/js,html,css,result/dark/\" allowfullscreen=\"allowfullscreen\"\nframeborder=\"0\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe height=\"300\" style=\"width: 90%;\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\"  src=\"//jsfiddle.net/bgoonz/3mpgzkx7/1/embedded/\"\nallowfullscreen=\"allowfullscreen\" frameborder=\"0\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br> \n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" src=\"https://codepen.io/bgoonz/embed/zYwJQaw?default-tab=html%2Cresult\"\nstyle=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n<br>\n<iframe loading=\"lazy\" src=\"https://codesandbox.io/embed/bigo-3wqy4?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n<iframe loading=\"lazy\"\nsrc=\"https://codesandbox.io/embed/hvbrd-sockets-forked-vsi2o?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"hvbrd-sockets (forked)\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n<br>\n<br>\n<iframe loading=\"lazy\" src=\"https://codesandbox.io/embed/summer-surf-p6dei?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"summer-surf-p6dei\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n<br> <br>\n<br>\n<iframe loading=\"lazy\"\nsrc=\"https://codesandbox.io/embed/sharp-feistel-x8bvv?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"sharp-feistel-x8bvv\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\ntitle=\"3D Cover Flow in React! | @keyframers 3.7\"\nsrc=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz42/pen/RwpeaWr'>3D Cover Flow in React! | @keyframers\n3.7</a> by Bryan\nC Guner\n(<a href='https://codepen.io/bgoonz42'>@bgoonz42</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Simple Typing Carousel \"\nsrc=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/ExZvGoZ\">\nSimple Typing Carousel </a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\ntitle=\"3D Cover Flow in React! | @keyframers 3.7\"\nsrc=\"https://codepen.io/bgoonz42/embed/RwpeaWr?height=375&theme=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz42/pen/RwpeaWr'>3D Cover Flow in React! | @keyframers\n3.7</a> by Bryan\nC Guner\n(<a href='https://codepen.io/bgoonz42'>@bgoonz42</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Video Background 1\"\nsrc=\"https://codesandbox.io/embed/bgoonzblog20-oo3x5?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:90%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"bgoonzblog2.0\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Video Background 1\"\nsrc=\"https://codepen.io/bgoonz/embed/BaRLKBd?default-tab=html%2Cresult&theme-id=dark\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/BaRLKBd\">\nVideo Background 1</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\ntitle=\"CSS-only Colorful Calendar Concept\" src=\"https://documentation-site-react2.vercel.app/\"\nframeborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/vYmKQYj\">\n  CSS-only Colorful Calendar Concept</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"FullTextSearchjs\"\nsrc=\"https://codepen.io/bgoonz/embed/QWvMWoQ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/QWvMWoQ\">\n  FullTextSearchjs</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"CSS Grid: Info Card\"\nsrc=\"https://codepen.io/bgoonz42/embed/MWmpjmy?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\"\nallowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz42/pen/MWmpjmy\">\n  CSS Grid: Info Card</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz42\">@bgoonz42</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\"\ntitle=\"CSS-only Colorful Calendar Concept\"\nsrc=\"https://codepen.io/bgoonz/embed/vYmKQYj?default-tab=html%2Cresult&theme-id=dark\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/vYmKQYj\">\n  CSS-only Colorful Calendar Concept</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Dashed Border Generator\"\nsrc=\"https://random-static-html-deploys.netlify.app/dashed-border-generator.html\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href=\"https://codepen.io/bgoonz/pen/wvdgypd\">\n  Dashed Border Generator</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\non <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Particle tornado\"\nsrc=\"https://codepen.io/bgoonz/embed/VwPwRvr?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/VwPwRvr'>Particle tornado</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"A Simple Fade Effect on Scroll\"\nsrc=\"https://codepen.io/bgoonz/embed/OJWzbRa?height=375&theme-id=dark&default-tab=html,result\"\nframeborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/OJWzbRa'>A Simple Fade Effect on Scroll</a> by Bryan C\nGuner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Controlled Text Example\"\nsrc=\"https://codepen.io/bgoonz/embed/oNZYbjZ?height=375&theme=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/oNZYbjZ'>Controlled Text Example</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"MatrixCode\"\nsrc=\"https://codepen.io/bgoonz/embed/KKaKbQX?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/KKaKbQX'>MatrixCode</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"TroisJS InstancedMesh Test\"\nsrc=\"https://codepen.io/bgoonz/embed/oNBNJMK?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/oNBNJMK'>TroisJS InstancedMesh Test</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"What's behind ?\"\nsrc=\"https://codepen.io/bgoonz/embed/mdRdaQV?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/mdRdaQV'>What's behind ?</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------Vector Swarm------------------------------------------->\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"VectorSwarm\"\nsrc=\"https://codepen.io/bgoonz/embed/BapavbW?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/BapavbW'>VectorSwarm</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Canvas Sparkly Circle Loader\"\nsrc=\"https://codepen.io/bgoonz/embed/ExZxMPN?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/ExZxMPN'>Canvas Sparkly Circle Loader</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Canvas particles\"\nsrc=\"https://codepen.io/bgoonz/embed/bGgGZEZ?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/bGgGZEZ'>Canvas particles</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Inline Styles with React\"\nsrc=\"https://codepen.io/bgoonz/embed/WNRjBoO?height=375&theme=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/WNRjBoO'>Inline Styles with React</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Constellation\"\nsrc=\"https://codepen.io/bgoonz/embed/zYNYbqK?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/zYNYbqK'>Constellation</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"95 000 particles\"\nsrc=\"https://codepen.io/bgoonz/embed/PoWoLNy?height=375&theme-id=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/PoWoLNy'>95 000 particles</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<p class=\"codepen\" data-height=\"575\" data-theme-id=\"dark\" data-default-tab=\"html,result\" data-user=\"bgoonz\"\ndata-slug-hash=\"DmnlJ\"\nstyle=\"height: 375px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"\ndata-pen-title=\"Simple Responsive Form\">\n<span>See the Pen <a href=\"https://codepen.io/chriscoyier/pen/DmnlJ\">\n    Simple Responsive Form</a> by Bryan Guner (<a href=\"https://codepen.io/chriscoyier\">@bgoonz</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.</span>\n</p>\n<script async src=\"https://cpwebassets.codepen.io/assets/embed/ei.js\"></script>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Smooth Page Scrolling in jQuery\"\nsrc=\"https://codepen.io/bgoonz/embed/KKamLNy?height=375&theme=dark&default-tab=html,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/KKamLNy'>Smooth Page Scrolling in jQuery</a> by Bryan C\nGuner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Demo Flexbox 3\"\nsrc=\"https://codepen.io/bgoonz/embed/ZELKNBo?height=375&theme=dark&default-tab=css,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/ZELKNBo'>Demo Flexbox 3</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Scroll Drawing\"\nsrc=\"https://codepen.io/bgoonz/embed/abpWrBP?height=375&theme=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/abpWrBP'>Scroll Drawing</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"Light Javascript Table Filter\"\nsrc=\"https://codepen.io/bgoonz/embed/qBRmGqw?height=375&theme=dark&default-tab=js,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/qBRmGqw'>Light Javascript Table Filter</a> by Bryan C Guner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\"\nsrc=\"https://codesandbox.io/embed/cold-firefly-si5u1?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:95%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"cold-firefly-si5u1\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\"\nsrc=\"https://codesandbox.io/embed/determined-star-57xlk?fontsize=14&hidenavigation=1&theme=dark\"\nstyle=\"width:95%; height:575px; border:0; border-radius: 4px; overflow:hidden;\" title=\"determined-star-57xlk\"\nsandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"></iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<!-------------------------------------------------------------------------------------->\n<br>\n<br>\n<br>\n<iframe loading=\"lazy\" height=\"575\" style=\"width: 90%;\" scrolling=\"no\" title=\"CSS Grid: Excel Spreadsheet\"\nsrc=\"https://codepen.io/bgoonz/embed/abJYgGX?height=375&theme=dark&default-tab=css,result\" frameborder=\"no\"\nloading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\nSee the Pen <a href='https://codepen.io/bgoonz/pen/abJYgGX'>CSS Grid: Excel Spreadsheet</a> by Bryan C\nGuner\n(<a href='https://codepen.io/bgoonz'>@bgoonz</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n <br>\n <br>\n<hr>\n <br>\n <br>\n<br>"},{"url":"/docs/python/flow-control/","relativePath":"docs/python/flow-control.md","relativeDir":"docs/python","base":"flow-control.md","name":"flow-control","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Flow Control:</h2>\n<h2>Read It</h2>\n<ul>\n<li><a href=\"https://www.pythoncheatsheet.org\">Website</a></li>\n<li><a href=\"https://github.com/wilfredinni/python-cheatsheet\">Github</a></li>\n<li><a href=\"https://github.com/wilfredinni/Python-cheatsheet/raw/master/python_cheat_sheet.pdf\">PDF</a></li>\n<li><a href=\"https://mybinder.org/v2/gh/wilfredinni/python-cheatsheet/master?filepath=jupyter_notebooks\">Jupyter Notebook</a></li>\n</ul>\n<h2>Flow Control</h2>\n<h3>Comparison Operators</h3>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>==</code></td>\n<td>Equal to</td>\n</tr>\n<tr>\n<td><code>!=</code></td>\n<td>Not equal to</td>\n</tr>\n<tr>\n<td><code>&#x3C;</code></td>\n<td>Less than</td>\n</tr>\n<tr>\n<td><code>></code></td>\n<td>Greater Than</td>\n</tr>\n<tr>\n<td><code>&#x3C;=</code></td>\n<td>Less than or Equal to</td>\n</tr>\n<tr>\n<td><code>>=</code></td>\n<td>Greater than or Equal to</td>\n</tr>\n</tbody>\n</table>\n<p>These operators evaluate to True or False depending on the values you give them.</p>\n<p>Examples:</p>\n<pre><code class=\"language-python\">42 == 42\n</code></pre>\n<pre><code class=\"language-python\">40 == 42\n</code></pre>\n<pre><code class=\"language-python\">'hello' == 'hello'\n</code></pre>\n<pre><code class=\"language-python\">'hello' == 'Hello'\n</code></pre>\n<pre><code class=\"language-python\">'dog' != 'cat'\n</code></pre>\n<pre><code class=\"language-python\">42 == 42.0\n</code></pre>\n<pre><code class=\"language-python\">42 == '42'\n</code></pre>\n<h3>Boolean evaluation</h3>\n<p>Never use <code>==</code> or <code>!=</code> operator to evaluate boolean operation. Use the <code>is</code> or <code>is not</code> operators,\nor use implicit boolean evaluation.</p>\n<p>NO (even if they are valid Python):</p>\n<pre><code class=\"language-python\">True == True\n</code></pre>\n<pre><code class=\"language-python\">True != False\n</code></pre>\n<p>YES (even if they are valid Python):</p>\n<pre><code class=\"language-python\">True is True\n</code></pre>\n<pre><code class=\"language-python\">True is not False\n</code></pre>\n<p>These statements are equivalent:</p>\n<pre><code class=\"language-Python\">if a is True:\n   pass\nif a is not False:\n   pass\nif a:\n   pass\n</code></pre>\n<p>And these as well:</p>\n<pre><code class=\"language-Python\">if a is False:\n   pass\nif a is not True:\n   pass\nif not a:\n   pass\n</code></pre>\n<h3>Boolean Operators</h3>\n<p>There are three Boolean operators: and, or, and not.</p>\n<p>The <em>and</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>True and True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>True and False</td>\n<td>False</td>\n</tr>\n<tr>\n<td>False and True</td>\n<td>False</td>\n</tr>\n<tr>\n<td>False and False</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n<p>The <em>or</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>True or True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>True or False</td>\n<td>True</td>\n</tr>\n<tr>\n<td>False or True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>False or False</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n<p>The <em>not</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>not True</td>\n<td>False</td>\n</tr>\n<tr>\n<td>not False</td>\n<td>True</td>\n</tr>\n</tbody>\n</table>\n<h3>Mixing Boolean and Comparison Operators</h3>\n<pre><code class=\"language-python\">(4 &#x3C; 5) and (5 &#x3C; 6)\n</code></pre>\n<pre><code class=\"language-python\">(4 &#x3C; 5) and (9 &#x3C; 6)\n</code></pre>\n<pre><code class=\"language-python\">(1 == 2) or (2 == 2)\n</code></pre>\n<p>You can also use multiple Boolean operators in an expression, along with the comparison operators:</p>\n<pre><code class=\"language-python\">2 + 2 == 4 and not 2 + 2 == 5 and 2 * 2 == 2 + 2\n</code></pre>\n<h3>if Statements</h3>\n<pre><code class=\"language-python\">if name == 'Alice':\n    print('Hi, Alice.')\n</code></pre>\n<h3>else Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelse:\n    print('Hello, stranger.')\n</code></pre>\n<h3>elif Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 5\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\n</code></pre>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 30\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\nelse:\n    print('You are neither Alice nor a little kid.')\n</code></pre>\n<h3>while Loop Statements</h3>\n<pre><code class=\"language-python\">spam = 0\n\nwhile spam &#x3C; 5:\n    print('Hello, world.')\n    spam = spam + 1\n</code></pre>\n<h3>break Statements</h3>\n<p>If the execution reaches a break statement, it immediately exits the while loop's clause:</p>\n<pre><code class=\"language-python\">while True:\n    print('Please type your name.')\n    name = input()\n    if name == 'your name':\n        break\n\nprint('Thank you!')\n</code></pre>\n<h3>continue Statements</h3>\n<p>When the program execution reaches a continue statement, the program execution immediately jumps back to the start of the loop.</p>\n<pre><code class=\"language-python\">while True:\n    print('Who are you?')\n    name = input()\n    if name != 'Joe':\n        continue\n    print('Hello, Joe. What is the password? (It is a fish.)')\n    password = input()\n    if password == 'swordfish':\n        break\n\nprint('Access granted.')\n</code></pre>\n<h3>for Loops and the range() Function</h3>\n<pre><code class=\"language-python\">print('My name is')\nfor i in range(5):\n    print('Jimmy Five Times ({})'.format(str(i)))\n</code></pre>\n<p>The <em>range()</em> function can also be called with three arguments. The first two arguments will be the start and stop values, and the third will be the step argument. The step is the amount that the variable is increased by after each iteration.</p>\n<pre><code class=\"language-python\">for i in range(0, 10, 2):\n   print(i)\n</code></pre>\n<p>You can even use a negative number for the step argument to make the for loop count down instead of up.</p>\n<pre><code class=\"language-python\">for i in range(5, -1, -1):\n    print(i)\n</code></pre>\n<h3>For else statement</h3>\n<p>This allows you to specify a statement to execute after the full loop has been executed. Only\nuseful when a <code>break</code> condition can occur in the loop:</p>\n<pre><code class=\"language-python\">for i in [1, 2, 3, 4, 5]:\n   if i == 3:\n       break\nelse:\n   print(\"only executed when no item of the list is equal to 3\")\n</code></pre>\n<h3>Importing Modules</h3>\n<pre><code class=\"language-python\">import random\n\nfor i in range(5):\n    print(random.randint(1, 10))\n</code></pre>\n<pre><code class=\"language-python\">import random, sys, os, math\n</code></pre>\n<pre><code class=\"language-python\">from random import *\n</code></pre>\n<h3>Ending a Program with sys.exit</h3>\n<pre><code class=\"language-python\">import sys\n\nwhile True:\n    print('Type exit to exit.')\n    response = input()\n    if response == 'exit':\n        sys.exit()\n    print('You typed {}.'.format(response))\n</code></pre>"},{"url":"/docs/python/examples/","relativePath":"docs/python/examples.md","relativeDir":"docs/python","base":"examples.md","name":"examples","frontmatter":{"title":"Practice","weight":0,"excerpt":"Example Problems","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Python Practice:</h2>\n<h1>Python Problems &#x26; Solutions For Beginners</h1>\n<p>Introduction to python taught through example problems. Solutions are included in embedded repl.it at the bottom of this page for you to…</p>\n<hr>\n<h3>Python Problems &#x26; Solutions For Beginners</h3>\n<h4>Introduction to python taught through example problems. Solutions are included in embedded repl.it at the bottom of this page for you to practice and refactor.</h4>\n<h3>Python Practice Problems</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*dMdMGwOJKHJ-5sOP.gif\" class=\"graf-image\" /></figure>\n<hr>\n<h4>Here are some other articles for reference if you need them:</h4>\n<p><a href=\"https://medium.com/geekculture/beginners-guide-to-python-e5a59b5bb64d\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://medium.com/geekculture/beginners-guide-to-python-e5a59b5bb64d\"><strong>Beginners Guide To Python</strong><br />\n<em>My favorite language for maintainability is Python. It has simple, clean syntax, object encapsulation, good library…</em>medium.com</a><a href=\"https://medium.com/geekculture/beginners-guide-to-python-e5a59b5bb64d\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb\"><strong>Python Study Guide for a JavaScript Programmer</strong><br />\n<em>A guide to commands in Python from what you know in JavaScript</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<hr>\n<h3>Here are the problems without solutions for you to practice with:</h3>\n<hr>\n<h3>Problem 1</h3>\n<p>Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn <code>100</code> years old.</p>\n<p>The <code>datetime</code> module supplies classes for manipulating dates and times.</p>\n<p>While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extraction for output formatting and manipulation.</p>\n<p><a href=\"https://docs.python.org/3/library/datetime.html\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://docs.python.org/3/library/datetime.html\"><strong>datetime - Basic date and time types - Python 3.9.6 documentation</strong><br />\n<em>Only one concrete class, the class, is supplied by the module. The class can represent simple timezones with fixed…</em>docs.python.org</a><a href=\"https://docs.python.org/3/library/datetime.html\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<h3>Problem 2</h3>\n<p>Ask the user for a number. Depending on whether the number is <code>even</code> or <code>odd</code>, print out an appropriate message to the user.</p>\n<h4>Bonus:</h4>\n<ol>\n<li><span id=\"eebc\">If the number is a multiple of <code>4</code>, print out a different message.</span></li>\n<li><span id=\"306e\">Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.</span></li>\n</ol>\n<h3>Problem 3</h3>\n<p>Take a list and write a program that prints out all the elements of the list that are <code>less</code> than <code>5</code>.</p>\n<p>Extras:</p>\n<ol>\n<li><span id=\"fe03\">Instead of printing the elements one by one, make a new list that has all the elements less than <code>5</code> from this list in it and print out this new list.</span></li>\n<li><span id=\"186b\">Write this in one line of Python.</span></li>\n<li><span id=\"9cd1\">Ask the user for a number and return a list that contains only elements from the original list a that are smaller than that number given by the user.</span></li>\n</ol>\n<h3>Problem 4</h3>\n<p>Create a program that asks the user for a number and then prints out a list of all the divisors of that number. (If you don't know what a divisor is, it is a number that divides evenly into another number.</p>\n<p>For example, <code>13</code> is a divisor of <code>26</code> because <code>26 / 13</code> has no remainder.)</p>\n<h3>Problem 5</h3>\n<p>Take two lists, and write a program that returns a list that contains only the elements that are <code>common between the lists (without duplicates)</code>. Make sure your program works on two lists of different sizes.</p>\n<p><a href=\"https://docs.python.org/3/library/random.html\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://docs.python.org/3/library/random.html\"><strong>random - Generate pseudo-random numbers - Python 3.9.6 documentation</strong><br />\n<em>Source code: Lib/random.py This module implements pseudo-random number generators for various distributions. For…</em>docs.python.org</a><a href=\"https://docs.python.org/3/library/random.html\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<p>Bonus:</p>\n<ol>\n<li><span id=\"e18a\">Randomly generate two lists to test this.</span></li>\n<li><span id=\"148a\">Write this in one line of Python.</span></li>\n</ol>\n<h3>Problem 6</h3>\n<p>Ask the user for a string and print out whether this string is a <code>palindrome</code> or not. (A palindrome is a string that reads the same forwards and backwards.)</p>\n<blockquote>\n<p>Here's 5 ways to reverse a string (courtesy of <a href=\"https://www.geeksforgeeks.org/reverse-string-python-5-different-ways/\" class=\"markup--anchor markup--pullquote-anchor\">geeksforgeeks</a>)</p>\n</blockquote>\n<hr>\n<h3>Problem 7</h3>\n<p>Let's say I give you a list saved in a variable: a = <code>[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]</code>.</p>\n<p>Write one line of Python that takes this list a and makes a new list that has only the <code>even</code> elements of this list in it.</p>\n<h3>Problem 8</h3>\n<p>Make a two-player <code>Rock-Paper-Scissors</code> game.</p>\n<p><strong>Hint:</strong><br>\nAsk for player plays (using input), compare them. Print out a message of congratulations to the winner, and ask if the players want to start a new game.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*1_4w6u4D7EDi2r4h.png\" class=\"graf-image\" /></figure>### Problem 9\n<p>Generate a random number between <code>1 and 100 (including 1 and 100)</code>. Ask the user to guess the number, then tell them whether they guessed <code>too low</code>, <code>too high</code>, or <code>exactly right</code>.</p>\n<blockquote>\n<p><strong>Hint:</strong><br>\nRemember to use the user input from the very first exercise.</p>\n</blockquote>\n<p><strong>Extras:</strong><br>\nKeep the game going until the user types <code>“exit”</code>.<br>\nKeep track of how many guesses the user has taken, and when the game ends, print this out.</p>\n<h3>Problem 10</h3>\n<p>Write a program that asks the user how many Fibonacci numbers to generate and then generates them. Take this opportunity to think about how you can use functions. Make sure to ask the user to enter the number of numbers in the sequence to generate.</p>\n<p><strong>Hint:</strong><br>\nThe Fibonacci sequence is a sequence of numbers where the next number in the sequence is the sum of the previous two numbers in the sequence. The sequence looks like this: <code>1, 1, 2, 3, 5, 8, 13, …</code></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*2xJsVLGikF6dg7qc.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Intermediate Problems:</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*hTU58jGsgkrszi76.gif\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Problem 11</h3>\n<p>In linear algebra, <em>a Toeplitz matrix is one in which the elements on any given diagonal from top left to bottom right are identical.</em><br>\nHere is an example:</p>\n<pre><code>1 2 3 4 8\n5 1 2 3 4\n4 5 1 2 3\n7 4 5 1 2\n</code></pre>\n<p>Write a program to determine whether a given input is a <code>Toeplitz</code> matrix.</p>\n<h3>Problem 12</h3>\n<p>Given a positive integer <code>N</code>, find the smallest number of steps it will take to reach <code>1</code>.</p>\n<p>There are two kinds of permitted steps:<br>\n— -> You may decrement N to N — 1.<br>\n— -> If <code>a * b = N</code>, you may decrement <code>N to the larger of a and b</code>.</p>\n<p>For example, given 100, you can reach 1 in 5 steps with the following route:<br>\n<code>100 -> 10 -> 9 -> 3 -> 2 -> 1.</code></p>\n<h3>Problem 13</h3>\n<p>Consider the following scenario: there are <code>N</code> mice and <code>N</code> holes placed at integer points along a line. Given this, find a method that maps mice to holes such that the largest number of steps any mouse takes is minimized.</p>\n<p>Each move consists of moving one mouse <code>one</code> unit to the <code>left</code> or <code>right</code>, and only <code>one</code> mouse can fit inside each hole.</p>\n<p>For example, suppose the mice are positioned at <code>[1, 4, 9, 15]</code>, and the holes are located at <code>[10, -5, 0, 16]</code>. In this case, the best pairing would require us to send the mouse at <code>1</code> to the hole at <code>-5</code>, so our function should return <code>6</code>.</p>\n<h3>My Blog:</h3>\n<p><a href=\"https://master--bgoonz-blog.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://master--bgoonz-blog.netlify.app/\"><strong>Web-Dev-Hub</strong><br />\n<em>Memoization, Tabulation, and Sorting Algorithms by Example Why is looking at runtime not a reliable method of…</em>master--bgoonz-blog.netlify.app</a><a href=\"https://master--bgoonz-blog.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\"><strong>A list of all of my articles to link to future posts</strong><br />\n<em>You should probably skip this one… seriously it's just for internal use!</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<hr>\n<h1>Python</h1>\n<ul>\n<li>Python is an interpreted, high-level and general-purpose, dynamically typed programming language</li>\n<li>It is also Object oriented, modular oriented and a scripting language.</li>\n<li>In Python, everything is considered as an Object.</li>\n<li>A python file has an extension of .py</li>\n<li>Python follows Indentation to separate code blocks instead of flower brackets({}).</li>\n<li>\n<p>We can run a python file by the following command in cmd(Windows) or shell(mac/linux).</p>\n<p><code>python &#x3C;filename.py></code></p>\n</li>\n</ul>\n<h4>By default, the python doesn't require any imports to run a python file.</h4>\n<h2>Create and execute a program</h2>\n<ol>\n<li>Open up a terminal/cmd</li>\n<li>Create the program: nano/cat > nameProgram.py</li>\n<li>Write the program and save it</li>\n<li>python nameProgram.py</li>\n</ol>\n<br>\n<h3>Basic Datatypes</h3>\n<table>\n<thead>\n<tr>\n<th>Data Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>int</td>\n<td>Integer values [0, 1, -2, 3]</td>\n</tr>\n<tr>\n<td>float</td>\n<td>Floating point values [0.1, 4.532, -5.092]</td>\n</tr>\n<tr>\n<td>char</td>\n<td>Characters [a, b, @, !, `]</td>\n</tr>\n<tr>\n<td>str</td>\n<td>Strings [abc, AbC, A@B, sd!, `asa]</td>\n</tr>\n<tr>\n<td>bool</td>\n<td>Boolean Values [True, False]</td>\n</tr>\n<tr>\n<td>char</td>\n<td>Characters [a, b, @, !, `]</td>\n</tr>\n<tr>\n<td>complex</td>\n<td>Complex numbers [2+3j, 4-1j]</td>\n</tr>\n</tbody>\n</table>\n<br>\n<h2>Keywords</h2>\n<br>\n<table>\n<thead>\n<tr>\n<th>Keyword</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>break</td>\n<td>used to exit loop and used to exit</td>\n</tr>\n<tr>\n<td>char</td>\n<td>basic declaration of a type character</td>\n</tr>\n<tr>\n<td>const</td>\n<td>prefix declaration meaning variable can not be changed</td>\n</tr>\n<tr>\n<td>continue</td>\n<td>go to bottom of loop in for, while loops</td>\n</tr>\n<tr>\n<td>class</td>\n<td>to define a class</td>\n</tr>\n<tr>\n<td>def</td>\n<td>to define a function</td>\n</tr>\n<tr>\n<td>elif</td>\n<td>shortcut for (else if) used in else if ladder</td>\n</tr>\n<tr>\n<td>else</td>\n<td>executable statement, part of \"if\" structure</td>\n</tr>\n<tr>\n<td>float</td>\n<td>basic declaration of floating point</td>\n</tr>\n<tr>\n<td>for</td>\n<td>executable statement, for loop</td>\n</tr>\n<tr>\n<td>from</td>\n<td>executable statement, used to import only specific objects from a package</td>\n</tr>\n<tr>\n<td>if</td>\n<td>executable statement</td>\n</tr>\n<tr>\n<td>import</td>\n<td>to import modules</td>\n</tr>\n<tr>\n<td>pass</td>\n<td>keyword to specify noting is happening in the codeblock, generally used in classes</td>\n</tr>\n<tr>\n<td>return</td>\n<td>executable statement with or without a value</td>\n</tr>\n<tr>\n<td>while</td>\n<td>executable statement, while loop</td>\n</tr>\n</tbody>\n</table>\n<br>\n<h2>Operators</h2>\n<br>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Description</th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>( )</td>\n<td>grouping parenthesis, function call, tuple declaration</td>\n<td></td>\n</tr>\n<tr>\n<td>[ ]</td>\n<td>array indexing, also declaring lists etc.</td>\n<td></td>\n</tr>\n<tr>\n<td>!</td>\n<td>relational not, complement, ! a yields true or false</td>\n<td></td>\n</tr>\n<tr>\n<td>~</td>\n<td>bitwise not, ones complement, ~a</td>\n<td></td>\n</tr>\n<tr>\n<td>-</td>\n<td>unary minus, - a</td>\n<td></td>\n</tr>\n<tr>\n<td>+</td>\n<td>unary plus, + a</td>\n<td></td>\n</tr>\n<tr>\n<td>*</td>\n<td>multiply, a * b</td>\n<td></td>\n</tr>\n<tr>\n<td>/</td>\n<td>divide, a / b</td>\n<td></td>\n</tr>\n<tr>\n<td>%</td>\n<td>modulo, a % b</td>\n<td></td>\n</tr>\n<tr>\n<td>+</td>\n<td>add, a + b</td>\n<td></td>\n</tr>\n<tr>\n<td>-</td>\n<td>subtract, a - b</td>\n<td></td>\n</tr>\n<tr>\n<td>&#x3C;&#x3C;</td>\n<td>shift left, left operand is shifted left by right operand bits</td>\n<td></td>\n</tr>\n<tr>\n<td>>></td>\n<td>shift right, left operand is shifted right by right operand bits</td>\n<td></td>\n</tr>\n<tr>\n<td>&#x3C;</td>\n<td>less than, result is true or false, a %lt; b</td>\n<td></td>\n</tr>\n<tr>\n<td>&#x3C;=</td>\n<td>less than or equal, result is true or false, a &#x3C;= b</td>\n<td></td>\n</tr>\n<tr>\n<td>></td>\n<td>greater than, result is true or false, a > b</td>\n<td></td>\n</tr>\n<tr>\n<td>>=</td>\n<td>greater than or equal, result is true or false, a >= b</td>\n<td></td>\n</tr>\n<tr>\n<td>==</td>\n<td>equal, result is true or false, a == b</td>\n<td></td>\n</tr>\n<tr>\n<td>!=</td>\n<td>not equal, result is true or false, a != b</td>\n<td></td>\n</tr>\n<tr>\n<td>&#x26;</td>\n<td>bitwise and, a &#x26; b</td>\n<td></td>\n</tr>\n<tr>\n<td>^</td>\n<td>bitwise exclusive or XOR, a ^ b</td>\n<td></td>\n</tr>\n<tr>\n<td>|</td>\n<td>bitwise or, a</td>\n<td>b</td>\n</tr>\n<tr>\n<td>&#x26;&#x26;, and</td>\n<td>relational and, result is true or false, a &#x3C; b &#x26;&#x26; c >= d</td>\n<td></td>\n</tr>\n<tr>\n<td>||, or</td>\n<td>relational or, result is true or false, a &#x3C; b || c >= d</td>\n<td></td>\n</tr>\n<tr>\n<td>=</td>\n<td>store or assignment</td>\n<td></td>\n</tr>\n<tr>\n<td>+=</td>\n<td>add and store</td>\n<td></td>\n</tr>\n<tr>\n<td>-=</td>\n<td>subtract and store</td>\n<td></td>\n</tr>\n<tr>\n<td>*=</td>\n<td>multiply and store</td>\n<td></td>\n</tr>\n<tr>\n<td>/=</td>\n<td>divide and store</td>\n<td></td>\n</tr>\n<tr>\n<td>%=</td>\n<td>modulo and store</td>\n<td></td>\n</tr>\n<tr>\n<td>&#x3C;&#x3C;=</td>\n<td>shift left and store</td>\n<td></td>\n</tr>\n<tr>\n<td>>>=</td>\n<td>shift right and store</td>\n<td></td>\n</tr>\n<tr>\n<td>&#x26;=</td>\n<td>bitwise and and store</td>\n<td></td>\n</tr>\n<tr>\n<td>^=</td>\n<td>bitwise exclusive or and store</td>\n<td></td>\n</tr>\n<tr>\n<td>|=</td>\n<td>bitwise or and store</td>\n<td></td>\n</tr>\n<tr>\n<td>,</td>\n<td>separator as in ( y=x,z=++x )</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<h3>Basic Data Structures</h3>\n<h3>List</h3>\n<ul>\n<li>List is a collection which is ordered and changeable. Allows duplicate members.</li>\n<li>Lists are created using square brackets:</li>\n</ul>\n<pre><code class=\"language-py\">thislist = [\"apple\", \"banana\", \"cherry\"]\n</code></pre>\n<ul>\n<li>List items are ordered, changeable, and allow duplicate values.</li>\n<li>List items are indexed, the first item has index <code>[0]</code>, the second item has index <code>[1]</code> etc.</li>\n<li>The list is changeable, meaning that we can change, add, and remove items in a list after it has been created.</li>\n<li>To determine how many items a list has, use the <code>len()</code> function.</li>\n<li>A list can contain different data types:</li>\n</ul>\n<pre><code class=\"language-py\">list1 = [\"abc\", 34, True, 40, \"male\"]\n</code></pre>\n<ul>\n<li>It is also possible to use the list() constructor when creating a new list</li>\n</ul>\n<pre><code class=\"language-py\">thislist = list((\"apple\", \"banana\", \"cherry\"))  # note the double round-brackets\n</code></pre>\n<h3>Tuple</h3>\n<ul>\n<li>Tuple is a collection which is ordered and unchangeable. Allows duplicate members.</li>\n<li>A tuple is a collection which is ordered and unchangeable.</li>\n<li>Tuples are written with round brackets.</li>\n</ul>\n<pre><code class=\"language-py\">thistuple = (\"apple\", \"banana\", \"cherry\")\n</code></pre>\n<ul>\n<li>Tuple items are ordered, unchangeable, and allow duplicate values.</li>\n<li>Tuple items are indexed, the first item has index <code>[0]</code>, the second item has index <code>[1]</code> etc.</li>\n<li>When we say that tuples are ordered, it means that the items have a defined order, and that order will not change.</li>\n<li>Tuples are unchangeable, meaning that we cannot change, add or remove items after the tuple has been created.</li>\n<li>Since tuple are indexed, tuples can have items with the same value:</li>\n<li>Tuples allow duplicate values:</li>\n</ul>\n<pre><code class=\"language-py\">thistuple = (\"apple\", \"banana\", \"cherry\", \"apple\", \"cherry\")\n</code></pre>\n<ul>\n<li>To determine how many items a tuple has, use the <code>len()</code>function:</li>\n</ul>\n<pre><code class=\"language-py\">thistuple = (\"apple\", \"banana\", \"cherry\")\nprint(len(thistuple))\n</code></pre>\n<ul>\n<li>To create a tuple with only one item, you have to add a comma after the item, otherwise Python will not recognize it as a tuple.</li>\n</ul>\n<pre><code class=\"language-py\">thistuple = (\"apple\",)\nprint(type(thistuple))\n\n#NOT a tuple\nthistuple = (\"apple\")\nprint(type(thistuple))\n</code></pre>\n<ul>\n<li>It is also possible to use the tuple() constructor to make a tuple.</li>\n</ul>\n<pre><code class=\"language-py\">thistuple = tuple((\"apple\", \"banana\", \"cherry\")) # note the double round-brackets\nprint(thistuple)\n</code></pre>\n<h3>Set</h3>\n<ul>\n<li>Set is a collection which is unordered and unindexed. No duplicate members.</li>\n<li>A set is a collection which is both unordered and unindexed.</li>\n</ul>\n<pre><code class=\"language-py\">thisset = {\"apple\", \"banana\", \"cherry\"}\n</code></pre>\n<ul>\n<li>Set items are unordered, unchangeable, and do not allow duplicate values.</li>\n<li>Unordered means that the items in a set do not have a defined order.</li>\n<li>Set items can appear in a different order every time you use them, and cannot be referred to by index or key.</li>\n<li>Sets are unchangeable, meaning that we cannot change the items after the set has been created.</li>\n<li>Duplicate values will be ignored.</li>\n<li>To determine how many items a set has, use the <code>len()</code> method.</li>\n</ul>\n<pre><code class=\"language-py\">thisset = {\"apple\", \"banana\", \"cherry\"}\n\nprint(len(thisset))\n</code></pre>\n<ul>\n<li>Set items can be of any data type:</li>\n</ul>\n<pre><code class=\"language-py\">set1 = {\"apple\", \"banana\", \"cherry\"}\nset2 = {1, 5, 7, 9, 3}\nset3 = {True, False, False}\nset4 = {\"abc\", 34, True, 40, \"male\"}\n</code></pre>\n<ul>\n<li>It is also possible to use the <code>set()</code> constructor to make a set.</li>\n</ul>\n<pre><code class=\"language-py\">thisset = set((\"apple\", \"banana\", \"cherry\")) # note the double round-brackets\n</code></pre>\n<h3>Dictionary</h3>\n<ul>\n<li>Dictionary is a collection which is unordered and changeable. No duplicate members.</li>\n<li>Dictionaries are used to store data values in key:value pairs.</li>\n<li>Dictionaries are written with curly brackets, and have keys and values:</li>\n</ul>\n<pre><code class=\"language-py\">thisdict = {\n  \"brand\": \"Ford\",\n  \"model\": \"Mustang\",\n  \"year\": 1964\n}\n</code></pre>\n<ul>\n<li>Dictionary items are presented in key:value pairs, and can be referred to by using the key name.</li>\n</ul>\n<pre><code class=\"language-py\">thisdict = {\n  \"brand\": \"Ford\",\n  \"model\": \"Mustang\",\n  \"year\": 1964\n}\nprint(thisdict[\"brand\"])\n</code></pre>\n<ul>\n<li>Dictionaries are changeable, meaning that we can change, add or remove items after the dictionary has been created.</li>\n<li>Dictionaries cannot have two items with the same key.</li>\n<li>Duplicate values will overwrite existing values.</li>\n<li>To determine how many items a dictionary has, use the <code>len()</code> function.</li>\n</ul>\n<pre><code class=\"language-py\">print(len(thisdict))\n</code></pre>\n<ul>\n<li>The values in dictionary items can be of any data type</li>\n</ul>\n<pre><code class=\"language-py\">thisdict = {\n  \"brand\": \"Ford\",\n  \"electric\": False,\n  \"year\": 1964,\n  \"colors\": [\"red\", \"white\", \"blue\"]\n}\n</code></pre>\n<h3>Conditional branching</h3>\n<pre><code class=\"language-py\">    if condition:\n        pass\n    elif condition2:\n        pass\n    else:\n        pass\n</code></pre>\n<h3>Loops</h3>\n<p>Python has two primitive loop commands:</p>\n<ol>\n<li>while loops</li>\n<li>for loops</li>\n</ol>\n<h4>While loop</h4>\n<ul>\n<li>With the <code>while</code> loop we can execute a set of statements as long as a condition is true.</li>\n<li>Example: Print i as long as i is less than 6</li>\n</ul>\n<pre><code class=\"language-py\">i = 1\nwhile i &#x3C; 6:\n  print(i)\n  i += 1\n</code></pre>\n<ul>\n<li>The while loop requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.</li>\n<li>With the <code>break</code> statement we can stop the loop even if the while condition is true</li>\n<li>With the continue statement we can stop the current iteration, and continue with the next.</li>\n<li>With the else statement we can run a block of code once when the condition no longer is true.</li>\n</ul>\n<h4>For loop</h4>\n<ul>\n<li>A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).</li>\n<li>This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages.</li>\n<li>With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.</li>\n</ul>\n<pre><code class=\"language-py\">fruits = [\"apple\", \"banana\", \"cherry\"]\nfor x in fruits:\n  print(x)\n</code></pre>\n<ul>\n<li>The for loop does not require an indexing variable to set beforehand.</li>\n<li>To loop through a set of code a specified number of times, we can use the range() function.</li>\n<li>The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.</li>\n<li>The range() function defaults to increment the sequence by 1, however it is possible to specify the increment value by adding a third parameter: range(2, 30, 3).</li>\n<li>The else keyword in a for loop specifies a block of code to be executed when the loop is finished.\nA nested loop is a loop inside a loop.</li>\n<li>The \"inner loop\" will be executed one time for each iteration of the \"outer loop\":</li>\n</ul>\n<pre><code class=\"language-py\">adj = [\"red\", \"big\", \"tasty\"]\nfruits = [\"apple\", \"banana\", \"cherry\"]\n\nfor x in adj:\n  for y in fruits:\n    print(x, y)\n</code></pre>\n<ul>\n<li>for loops cannot be empty, but if you for some reason have a for loop with no content, put in the pass statement to avoid getting an error.</li>\n</ul>\n<pre><code class=\"language-py\">for x in [0, 1, 2]:\n  pass\n</code></pre>\n<h3>Function definition</h3>\n<pre><code class=\"language-py\">def function_name():\n    return\n</code></pre>\n<h3>Function call</h3>\n<pre><code class=\"language-py\">function_name()\n</code></pre>\n<ul>\n<li>We need not to specify the return type of the function.</li>\n<li>Functions by default return <code>None</code></li>\n<li>We can return any datatype.</li>\n</ul>\n<pre><code class=\"language-py\">def say_hi(name):\n    \"\"\"&#x3C;---- Multi-Line Comments and Docstrings\n    This is where you put your content for help() to inform the user\n    about what your function does and how to use it\n    \"\"\"\n    print(f\"Hello {name}!\")\n\nprint(say_hi(\"Bryan\"))  # Should get the print inside the function, then None\n# Boolean Values\n# Work the same as in JS, except they are title case: True and False\na = True\nb = False\n# Logical Operators\n# ! = not, || = or, &#x26;&#x26; = and\nprint(True and True)\nprint(True and not True)\nprint(True or True)\n# Truthiness - Everything is True except...\n# False - None, False, '', [], (), set(), range(0)\n# Number Values\n# Integers are numbers without a floating decimal point\nprint(type(3))  # type returns the type of whatever argument you pass in\n# Floating Point values are numbers with a floating decimal point\nprint(type(3.5))\n# Type Casting\n# You can convert between ints and floats (along with other types...)\nprint(float(3))  # If you convert a float to an int, it will truncate the decimal\nprint(int(4.5))\nprint(type(str(3)))\n# Python does not automatically convert types like JS\n# print(17.0 + ' heyooo ' + 17)  # TypeError\n# Arithmetic Operators\n# ** - exponent (comparable to Math.pow(num, pow))\n# // - integer division\n# There is no ++ or -- in Python\n# String Values\n# We can use single quotes, double quotes, or f'' for string formats\n# We can use triple single quotes for multiline strings\nprint(\n    \"\"\"This here's a story\nAll about how\nMy life got twist\nTurned upside down\n\"\"\"\n)\n# Three double quotes can also be used, but we typically reserve these for\n# multi-line comments and function docstrings (refer to lines 6-9)(Nice :D)\n# We use len() to get the length of something\nprint(len(\"Bryan G\"))  # 7 characters\nprint(len([\"hey\", \"ho\", \"hey\", \"hey\", \"ho\"]))  # 5 list items\nprint(len({1, 2, 3, 4, 5, 6, 7, 9}))  # 8 set items\n# We can index into strings, list, etc..self.\nname = \"Bryan\"\nfor i in range(len(name)):\n    print(name[i])  # B, r, y, a, n\n# We can index starting from the end as well, with negatives\noccupation = \"Full Stack Software Engineer\"\nprint(occupation[-3])  # e\n# We can also get ranges in the index with the [start:stop:step] syntax\nprint(occupation[0:4:1])  # step and stop are optional, stop is exclusive\nprint(occupation[::4])  # beginning to end, every 4th letter\nprint(occupation[4:14:2])  # Let's get weird with it!\n# NOTE: Indexing out of range will give you an IndexError\n# We can also get the index og things with the .index() method, similar to indexOf()\nprint(occupation.index(\"Stack\"))\nprint([\"Mike\", \"Barry\", \"Cole\", \"James\", \"Mark\"].index(\"Cole\"))\n# We can count how many times a substring/item appears in something as well\nprint(occupation.count(\"S\"))\nprint(\n    \"\"\"Now this here's a story all about how\nMy life got twist turned upside down\nI forget the rest but the the the potato\nsmells like the potato\"\"\".count(\n        \"the\"\n    )\n)\n# We concatenate the same as Javascript, but we can also multiply strings\nprint(\"dog \" + \"show\")\nprint(\"ha\" * 10)\n# We can use format for a multitude of things, from spaces to decimal places\nfirst_name = \"Bryan\"\nlast_name = \"Guner\"\nprint(\"Your name is {0} {1}\".format(first_name, last_name))\n# Useful String Methods\nprint(\"Hello\".upper())  # HELLO\nprint(\"Hello\".lower())  # hello\nprint(\"HELLO\".islower())  # False\nprint(\"HELLO\".isupper())  # True\nprint(\"Hello\".startswith(\"he\"))  # False\nprint(\"Hello\".endswith(\"lo\"))  # True\nprint(\"Hello There\".split())  # [Hello, There]\nprint(\"hello1\".isalpha())  # False,  must consist only of letters\nprint(\"hello1\".isalnum())  # True, must consist of only letters and numbers\nprint(\"3215235123\".isdecimal())  # True, must be all numbers\n# True, must consist of only spaces/tabs/newlines\nprint(\"       \\n     \".isspace())\n# False, index 0 must be upper case and the rest lower\nprint(\"Bryan Guner\".istitle())\nprint(\"Michael Lee\".istitle())  # True!\n# Duck Typing - If it walks like a duck, and talks like a duck, it must be a duck\n# Assignment - All like JS, but there are no special keywords like let or const\na = 3\nb = a\nc = \"heyoo\"\nb = [\"reassignment\", \"is\", \"fine\", \"G!\"]\n# Comparison Operators - Python uses the same equality operators as JS, but no ===\n# &#x3C; - Less than\n# > - Greater than\n# &#x3C;= - Less than or Equal\n# >= - Greater than or Equal\n# == - Equal to\n# != - Not equal to\n# is - Refers to exact same memory location\n# not - !\n# Precedence - Negative Signs(not) are applied first(part of each number)\n#            - Multiplication and Division(and) happen next\n#            - Addition and Subtraction(or) are the last step\n#  NOTE: Be careful when using not along with ==\nprint(not a == b)  # True\n# print(a == not b) # Syntax Error\nprint(a == (not b))  # This fixes it. Answer: False\n# Python does short-circuit evaluation\n# Assignment Operators - Mostly the same as JS except Python has **= and //= (int division)\n# Flow Control Statements - if, while, for\n# Note: Python smushes 'else if' into 'elif'!\nif 10 &#x3C; 1:\n    print(\"We don't get here\")\nelif 10 &#x3C; 5:\n    print(\"Nor here...\")\nelse:\n    print(\"Hey there!\")\n# Looping over a string\nfor c in \"abcdefgh\":\n    print(c)\n# Looping over a range\nfor i in range(5):\n    print(i + 1)\n# Looping over a list\nlst = [1, 2, 3, 4]\nfor i in lst:\n    print(i)\n# Looping over a dictionary\nspam = {\"color\": \"red\", \"age\": 42, \"items\": [(1, \"hey\"), (2, \"hooo!\")]}\nfor v in spam.values():\n    print(v)\n# Loop over a list of tuples and destructuring the values\n# Assuming spam.items returns a list of tuples each containing two items (k, v)\nfor k, v in spam.items():\n    print(f\"{k}: {v}\")\n# While loops as long as the condition is True\n#  - Exit loop early with break\n#  - Exit iteration early with continue\nspam = 0\nwhile True:\n    print(\"Sike That's the wrong Numba\")\n    spam += 1\n    if spam &#x3C; 5:\n        continue\n    break\n\n# Functions - use def keyword to define a function in Python\ndef printCopyright():\n    print(\"Copyright 2021, Bgoonz\")\n\n# Lambdas are one liners! (Should be at least, you can use parenthesis to disobey)\navg = lambda num1, num2: print(num1 + num2)\navg(1, 2)\n# Calling it with keyword arguments, order does not matter\navg(num2=20, num1=1252)\nprintCopyright()\n# We can give parameters default arguments like JS\ndef greeting(name, saying=\"Hello\"):\n    print(saying, name)\n\ngreeting(\"Mike\")  # Hello Mike\ngreeting(\"Bryan\", saying=\"Hello there...\")\n# A common gotcha is using a mutable object for a default parameter\n# All invocations of the function reference the same mutable object\ndef append_item(item_name, item_list=[]):  # Will it obey and give us a new list?\n    item_list.append(item_name)\n    return item_list\n\n# Uses same item list unless otherwise stated which is counterintuitive\nprint(append_item(\"notebook\"))\nprint(append_item(\"notebook\"))\nprint(append_item(\"notebook\", []))\n# Errors - Unlike JS, if we pass the incorrect amount of arguments to a function,\n#          it will throw an error\n# avg(1)  # TypeError\n# avg(1, 2, 2) # TypeError\n# ----------------------------------- DAY 2 ----------------------------------------\n# Functions - * to get rest of position arguments as tuple\n#           - ** to get rest of keyword arguments as a dictionary\n# Variable Length positional arguments\ndef add(a, b, *args):\n    # args is a tuple of the rest of the arguments\n    total = a + b\n    for n in args:\n        total += n\n    return total\n\nprint(add(1, 2))  # args is None, returns 3\nprint(add(1, 2, 3, 4, 5, 6))  # args is (3, 4, 5, 6), returns 21\n# Variable Length Keyword Arguments\ndef print_names_and_countries(greeting, **kwargs):\n    # kwargs is a dictionary of the rest of the keyword arguments\n    for k, v in kwargs.items():\n        print(greeting, k, \"from\", v)\n\nprint_names_and_countries(\n    \"Hey there\", Monica=\"Sweden\", Mike=\"The United States\", Mark=\"China\"\n)\n# We can combine all of these together\ndef example2(arg1, arg2, *args, kw_1=\"cheese\", kw_2=\"horse\", **kwargs):\n    pass\n\n# Lists are mutable arrays\nempty_list = []\nroomates = [\"Beau\", \"Delynn\"]\n# List built-in function makes a list too\nspecials = list()\n# We can use 'in' to test if something is in the list, like 'includes' in JS\nprint(1 in [1, 2, 4])  # True\nprint(2 in [1, 3, 5])  # False\n# Dictionaries - Similar to JS POJO's or Map, containing key value pairs\na = {\"one\": 1, \"two\": 2, \"three\": 3}\nb = dict(one=1, two=2, three=3)\n# Can use 'in' on dictionaries too (for keys)\nprint(\"one\" in a)  # True\nprint(3 in b)  # False\n# Sets - Just like JS, unordered collection of distinct objects\nbedroom = {\"bed\", \"tv\", \"computer\", \"clothes\", \"playstation 4\"}\n# bedroom = set(\"bed\", \"tv\", \"computer\", \"clothes\", \"playstation 5\")\nschool_bag = set(\n    [\"book\", \"paper\", \"pencil\", \"pencil\", \"book\", \"book\", \"book\", \"eraser\"]\n)\nprint(school_bag)\nprint(bedroom)\n# We can use 'in' on sets as wel\nprint(1 in {1, 2, 3})  # True\nprint(4 in {1, 3, 5})  # False\n# Tuples are immutable lists of items\ntime_blocks = (\"AM\", \"PM\")\ncolors = \"red\", \"green\", \"blue\"  # Parenthesis not needed but encouraged\n# The tuple built-in function can be used to convert things to tuples\nprint(tuple(\"abc\"))\nprint(tuple([1, 2, 3]))\n# 'in' may be used on tuples as well\nprint(1 in (1, 2, 3))  # True\nprint(5 in (1, 4, 3))  # False\n# Ranges are immutable lists of numbers, often used with for loops\n#   - start - default: 0, first number in sequence\n#   - stop - required, next number past last number in sequence\n#   - step - default: 1, difference between each number in sequence\nrange1 = range(5)  # [0,1,2,3,4]\nrange2 = range(1, 5)  # [1,2,3,4]\nrange3 = range(0, 25, 5)  # [0,5,10,15,20]\nrange4 = range(0)  # []\nfor i in range1:\n    print(i)\n# Built-in functions:\n# Filter\nisOdd = lambda num: num % 2 == 1\nfiltered = filter(isOdd, [1, 2, 3, 4])\nprint(list(filtered))\nfor num in filtered:\n    print(f\"first way: {num}\")\nprint(\"--\" * 20)\n[print(f\"list comprehension: {i}\") for i in [1, 2, 3, 4, 5, 6, 7, 8] if i % 2 == 1]\n# Map\ndef toUpper(str):\n    return str.upper()\n\nupperCased = map(toUpper, [\"a\", \"b\", \"c\", \"d\"])\nprint(list(upperCased))\n# Sorted\nsorted_items = sorted([\"john\", \"tom\", \"sonny\", \"Mike\"])\nprint(list(sorted_items))  # Notice uppercase comes before lowercase\n# Using a key function to control the sorting and make it case insensitive\nsorted_items = sorted([\"john\", \"tom\", \"sonny\", \"Mike\"], key=str.lower)\nprint(sorted_items)\n# You can also reverse the sort\nsorted_items = sorted([\"john\", \"tom\", \"sonny\", \"Mike\"], key=str.lower, reverse=True)\nprint(sorted_items)\n# Enumerate creates a tuple with an index for what you're enumerating\nquarters = [\"First\", \"Second\", \"Third\", \"Fourth\"]\nprint(list(enumerate(quarters)))\nprint(list(enumerate(quarters, start=1)))\n# Zip takes list and combines them as key value pairs, or really however you need\nkeys = (\"Name\", \"Email\")\nvalues = (\"Buster\", \"cheetoh@johhnydepp.com\")\nzipped = zip(keys, values)\nprint(list(zipped))\n# You can zip more than 2\nx_coords = [0, 1, 2, 3, 4]\ny_coords = [4, 6, 10, 9, 10]\nz_coords = [20, 10, 5, 9, 1]\ncoords = zip(x_coords, y_coords, z_coords)\nprint(list(coords))\n# Len reports the length of strings along with list and any other object data type\nprint_len = lambda item: print(len(item))  # doing this to save myself some typing\nprint_len(\"Mike\")\nprint_len([1, 5, 2, 10, 3, 10])\nprint_len({1, 5, 10, 9, 10})  # 4 because there is a duplicate here (10)\nprint_len((1, 4, 10, 9, 20))\n# Max will return the max number in a given scenario\nprint(max(1, 2, 35, 1012, 1))\n# Min\nprint(min(1, 5, 2, 10))\nprint(min([1, 4, 7, 10]))\n# Sum\nprint(sum([1, 2, 4]))\n# Any\nprint(any([True, False, False]))\nprint(any([False, False, False]))\n# All\nprint(all([True, True, False]))\nprint(all([True, True, True]))\n# Dir returns all the attributes of an object including it's methods and dunder methods\nuser = {\"Name\": \"Bob\", \"Email\": \"bob@bob.com\"}\nprint(dir(user))\n# Importing packages and modules\n#  - Module - A Python code in a file or directory\n#  - Package - A module which is a directory containing an __init__.py file\n#  - Submodule - A module which is contained within a package\n#  - Name - An exported function, class, or variable in a module\n# Unlike JS, modules export ALL names contained within them without any special export key\n# Assuming we have the following package with four submodules\n#  math\n#  |  __init__.py\n#  | addition.py\n#  | subtraction.py\n#  | multiplication.py\n#  | division.py\n# If we peek into the addition.py file we see there's an add function\n# addition.py\n# We can import 'add' from other places because it's a 'name' and is automatically exported\ndef add(num1, num2):\n    return num1 + num2\n\n# Notice the . syntax because this package can import it's own submodules.\n# Our __init__.py has the following files\n# This imports the 'add' function\n# And now it's also re-exported in here as well\n# from .addition import add\n# These import and re-export the rest of the functions from the submodule\n# from .subtraction import subtract\n# from .division import divide\n# from .multiplication import multiply\n# So if we have a script.py and want to import add, we could do it many ways\n# This will load and execute the 'math/__init__.py' file and give\n# us an object with the exported names in 'math/__init__.py'\nimport math\n# print(math.add(1,2))\n# This imports JUST the add from 'math/__init__.py'\n# from math import add\n# print(add(1, 2))\n# This skips importing from 'math/__init__.py' (although it still runs)\n# and imports directly from the addition.py file\n# from math.addition import add\n# This imports all the functions individually from 'math/__init__.py'\n# from math import add, subtract, multiply, divide\n# print(add(1, 2))\n# print(subtract(2, 1))\n# This imports 'add' renames it to 'add_some_numbers'\n# from math import add as add_some_numbers\n# --------------------------------------- DAY 3 ---------------------------------------\n# Classes, Methods, and Properties\nclass AngryBird:\n    # Slots optimize property access and memory usage and prevent you\n    # from arbitrarily assigning new properties the instance\n    __slots__ = [\"_x\", \"_y\"]\n    # Constructor\n    def __init__(self, x=0, y=0):\n        # Doc String\n        \"\"\"\n        Construct a new AngryBird by setting it's position to (0, 0)\n        \"\"\"\n        ## Instance Variables\n        self._x = x\n        self._y = y\n    # Instance Method\n    def move_up_by(self, delta):\n        self._y += delta\n    # Getter\n    @property\n    def x(self):\n        return self._x\n    # Setter\n    @x.setter\n    def x(self, value):\n        if value &#x3C; 0:\n            value = 0\n        self._x = value\n    @property\n    def y(self):\n        return self._y\n    @y.setter\n    def y(self, value):\n        self._y = value\n    # Dunder Repr... called by 'print'\n    def __repr__(self):\n        return f\"&#x3C;AngryBird ({self._x}, {self._y})>\"\n\n# JS to Python Classes cheat table\n#        JS                    Python\n#   constructor()         def __init__(self):\n#      super()            super().__init__()\n#   this.property           self.property\n#    this.method            self.method()\n# method(arg1, arg2){}    def method(self, arg1, ...)\n# get someProperty(){}    @property\n# set someProperty(){}    @someProperty.setter\n# List Comprehensions are a way to transform a list from one format to another\n#  - Pythonic Alternative to using map or filter\n#  - Syntax of a list comprehension\n#     - new_list = [value loop condition]\n# Using a for loop\nsquares = []\nfor i in range(10):\n    squares.append(i ** 2)\nprint(squares)\n# value = i ** 2\n# loop = for i in range(10)\nsquares = [i ** 2 for i in range(10)]\nprint(list(squares))\nsentence = \"the rocket came back from mars\"\nvowels = [character for character in sentence if character in \"aeiou\"]\nprint(vowels)\n# You can also use them on dictionaries. We can use the items() method\n# for the dictionary to loop through it getting the keys and values out at once\nperson = {\"name\": \"Corina\", \"age\": 32, \"height\": 1.4}\n# This loops through and capitalizes the first letter of all keys\nnewPerson = {key.title(): value for key, value in person.items()}\nprint(list(newPerson.items()))\n</code></pre>"},{"url":"/docs/python/functions/","relativePath":"docs/python/functions.md","relativeDir":"docs/python","base":"functions.md","name":"functions","frontmatter":{"title":"Python Functions","weight":0,"excerpt":"When creating a function using the def statement, you can specify what the return value should be with a return statement.","seo":{"title":"","description":"When creating a function using the def statement, you can specify what the return value should be with a return statement.","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Functions</h2>\n<pre><code class=\"language-python\">def hello(name):\n    print('Hello {}'.format(name))\n</code></pre>\n<h3>Return Values and return Statements</h3>\n<p>When creating a function using the def statement, you can specify what the return value should be with a return statement. A return statement consists of the following:</p>\n<ul>\n<li>The return keyword.</li>\n<li>The value or expression that the function should return.</li>\n</ul>\n<pre><code class=\"language-python\">import random\ndef getAnswer(answerNumber):\n    if answerNumber == 1:\n        return 'It is certain'\n    elif answerNumber == 2:\n        return 'It is decidedly so'\n    elif answerNumber == 3:\n        return 'Yes'\n    elif answerNumber == 4:\n        return 'Reply hazy try again'\n    elif answerNumber == 5:\n        return 'Ask again later'\n    elif answerNumber == 6:\n        return 'Concentrate and ask again'\n    elif answerNumber == 7:\n        return 'My reply is no'\n    elif answerNumber == 8:\n        return 'Outlook not so good'\n    elif answerNumber == 9:\n        return 'Very doubtful'\n\nr = random.randint(1, 9)\nfortune = getAnswer(r)\nprint(fortune)\n</code></pre>\n<h3>The None Value</h3>\n<pre><code class=\"language-python\">spam = print('Hello!')\nspam is None\n</code></pre>\n<p>Note: never compare to <code>None</code> with the <code>==</code> operator. Always use <code>is</code>.</p>\n<h3>print Keyword Arguments</h3>\n<pre><code class=\"language-python\">print('Hello', end='')\nprint('World')\n</code></pre>\n<pre><code class=\"language-python\">print('cats', 'dogs', 'mice')\n</code></pre>\n<pre><code class=\"language-python\">print('cats', 'dogs', 'mice', sep=',')\n</code></pre>\n<h3>Local and Global Scope</h3>\n<ul>\n<li>Code in the global scope cannot use any local variables.</li>\n<li>However, a local scope can access global variables.</li>\n<li>Code in a function's local scope cannot use variables in any other local scope.</li>\n<li>You can use the same name for different variables if they are in different scopes. That is, there can be a local variable named spam and a global variable also named spam.</li>\n</ul>\n<h3>The global Statement</h3>\n<p>If you need to modify a global variable from within a function, use the global statement:</p>\n<pre><code class=\"language-python\">def spam():\n    global eggs\n    eggs = 'spam'\n\neggs = 'global'\nspam()\nprint(eggs)\n</code></pre>\n<p>There are four rules to tell whether a variable is in a local scope or global scope:</p>\n<ol>\n<li>If a variable is being used in the global scope (that is, outside of all functions), then it is always a global variable.</li>\n<li>If there is a global statement for that variable in a function, it is a global variable.</li>\n<li>Otherwise, if the variable is used in an assignment statement in the function, it is a local variable.</li>\n<li>But if the variable is not used in an assignment statement, it is a global variable.</li>\n</ol>"},{"url":"/docs/python/google-sheets-api/","relativePath":"docs/python/google-sheets-api.md","relativeDir":"docs/python","base":"google-sheets-api.md","name":"google-sheets-api","frontmatter":{"title":"google-sheets-api","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p><strong>If you're maintaining a dataset that frequently has to be updated in a predictable and consistent manner, automating that process has obvious benefits. It might cost some time to set up the code to automate the work, but you'll likely save time in the long run. And, if you're like me, writing the code will be less mind-numbing than repeatedly updating the same spreadsheet over and over again!</strong><img src=\"https://miro.medium.com/max/30/1*5RtrFThuAvHiqxxwPp5Ptg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/709/1*5RtrFThuAvHiqxxwPp5Ptg.png\"></p>\n<p>Screenshot of Google Cloud Console edited by the author.<img src=\"https://miro.medium.com/max/30/1*ahdHCrx8ngiDP0dBANKvgg.png?q=20\"><img src=\"https://miro.medium.com/max/709/1*ahdHCrx8ngiDP0dBANKvgg.png\"></p>\n<p>taken after successfully running the quickstart script.<img src=\"https://miro.medium.com/max/30/1*E_PHwbLycJ7mQSad2QszKw.png?q=20\"><img src=\"https://miro.medium.com/max/709/1*E_PHwbLycJ7mQSad2QszKw.png\"></p>\n<p><img src=\"https://miro.medium.com/max/709/1*cN14i55zhZfg_X63kQcBEw.png\"></p>\n<p>.<img src=\"https://miro.medium.com/max/30/1*wH0Dop5RSg3tS3sEnfIY4g.png?q=20\"><img src=\"https://miro.medium.com/max/709/1*wH0Dop5RSg3tS3sEnfIY4g.png\"></p>\n<p>Screenshot by the author.</p>\n<p>Google spreadsheets provide excellent functionality for maintaining basic datasets. Some of the obvious advantages are that they are free, easy to access, and easy to share. Moreover, Google spreadsheets can be especially powerful because of their ability to connect with tools like <a href=\"https://zapier.com/\">Zapier</a> or <a href=\"https://phantombuster.com/\">Phantombuster</a> that can create automated workflows between a plethora of different online applications.</p>\n<p>Although these kinds of tools usually offer functionalities to automatically manipulate Google spreadsheets as well, I've experienced a lack of flexibility on how to update your spreadsheets. A customized Python script can offer way more flexibility and possibilities.</p>\n<p>To update your Google spreadsheets with Python, you can use the Google sheets API. Google offers free API access to several of their workspace apps, like Gmail, Google Calendar, Google Drive, and Google Sheets. You can check out their API library <a href=\"https://console.cloud.google.com/apis/library?project=cellular-axon-327013\">here</a>.</p>\n<p>Below I'll walk you through the steps to set up the Google Sheets API with Python and show a couple of basic examples of how to manipulate spreadsheets using the API.</p>\n<h1>Setting Up the API</h1>\n<h2>Step 1: Create a Google Cloud Platform project</h2>\n<p>To get started with any of the Google workspace APIs, you need to have a so-called Google Cloud Platform (GCP) project. A GCP project forms the basis for all of Google's cloud computing services, including their API library. Setting up a project and using the APIs is completely free. Follow the steps outlined <a href=\"https://developers.google.com/workspace/guides/create-project\">here</a> to create your GCP project. It should be pretty straightforward.</p>\n<h2>Step 2: Create Credentials</h2>\n<p>After creating a GCP project (step 1), we need to set up our credentials for accessing the API. Our credentials are like a key for the API to know who is requesting access to its data and services. You can follow the steps listed <a href=\"https://developers.google.com/workspace/guides/create-credentials\">here</a> to <em>create desktop application credentials</em>. In my experience, some steps were missing in this tutorial, so I'm giving the detailed version below.</p>\n<ul>\n<li>Start by navigating back to your <a href=\"https://console.cloud.google.com/home/dashboard\">Google Cloud Console</a>.</li>\n<li>Find the <em>APIs &#x26; Services</em> tab, and then select the <em>Credentials</em> page</li>\n<li>Click on *+Create Credentials *and select <em>OAuth client ID</em>.</li>\n</ul>\n<!---->\n<ul>\n<li>Select <em>Desktop app</em> as the application type and give your app a name. Then click create.</li>\n<li>You will be prompted to set up your OAuth consent screen. Follow the steps you are prompted with and make sure to add yourself as a test user.</li>\n<li>After generating your client ID, you will be able to see it on your credentials page.</li>\n<li>Click the download button to download a JSON file with your credentials. Rename it to <em>credentials.json</em>. You will need this in the next step.</li>\n</ul>\n<h2>Step 3: Set up the API</h2>\n<p>After creating a GCP project and generating your credentials, it is time to connect to the API with Python for the first time. You can follow the steps outlined <a href=\"https://developers.google.com/sheets/api/quickstart/python\">here</a>. The steps given on the Google developers page are pretty self-explanatory. Three things I want to add:</p>\n<ul>\n<li>Make sure to have a look at the prerequisites before diving in.</li>\n<li>Don't forget to move your <em>credentials.json</em> file to the same folder where your <em>quickstart.py</em> file is.</li>\n<li>Change the URL in the SCOPE list in the quickstart script to <em><a href=\"https://www.googleapis.com/auth/spreadsheets\">https://www.googleapis.com/auth/spreadsheets</a></em> to make sure that you have both read and write access.</li>\n</ul>\n<p>If everything goes as expected, you should see this in your browser after running the sample script:</p>\n<p>After successfully running the sample, you will also find a <em>token.json</em> file in your workspace. This file is used for authentication on any of your future calls to the API. You're now ready to use the API!</p>\n<h1>Using the API</h1>\n<p>Now that we have set up the API connection, we can use the API to create, read, and edit Google spreadsheets! Extensive documentation on how to use the API can be found <a href=\"https://developers.google.com/sheets/api/guides/create#python\">here</a>. I'll run through a few basic examples below.</p>\n<h2>Reading from an existing spreadsheet</h2>\n<p>Reading from an existing spreadsheet is a key functionality if you want to automate your spreadsheets. Let's create a new spreadsheet in the Google workspace and input some data. Below is a screenshot of the table I created.</p>\n<p>The API identifies spreadsheets using a spreadsheet ID. To connect to a spreadsheet that already exists, you can find the spreadsheet ID in the Google Sheets URL as follows:</p>\n<p>After identifying the spreadsheet ID of the spreadsheet we just created, we can use the API to connect to the spreadsheet and to read its data. Below is a code example of how to do this. The main functionalities to retrieve data from an existing spreadsheet are provided by sheet.values().get().execute()* <em>on line 17</em>. *Note that this is where we pass the spreadsheet ID and the range of values in the sheet we want to retrieve. All code before that establishes the connection to the API and is very similar to the <em>quickstart.py</em> file we used to connect to the API for the first time.</p>\n<p>The code returns a list of lists containing the data of our spreadsheet. Note that the data is returned row-by-row this way.</p>\n<h2>Writing to an existing spreadsheet</h2>\n<p>Next, let's try to add a new value to the spreadsheet. After all, this is the second key bit we need to automatically update our spreadsheets.</p>\n<p>The code below shows how to add a row to the existing data with the values [6, f]. Similar to reading values from an existing sheet, we need to start with establishing the connection to the API and identifying the spreadsheet ID. Because we are now writing new data to the spreadsheet, it is essential to make sure that you have not specified read-only permission in your SCOPES list (line 5).</p>\n<p>The main functionalities to append new data to an existing spreadsheet are provided by *sheet.values().append().execute() <em>on lines 17-22</em>. *Note that this is where we pass the spreadsheet ID, spreadsheet range, and several other parameters that specify how the data has to be inserted and what data has to be inserted. The <em>body</em> parameter takes a dictionary with values to append to the existing data table, using the same list-of-list format we saw before.</p>\n<p>After running the code, the spreadsheet is automatically updated with our new entry. The new row is neatly appended to the data that we manually wrote in the spreadsheet.</p>\n<h1>Final Thoughts</h1>\n<p>The Google workspace API library is a really powerful and relatively user-friendly way to automate workflows related to any of the Google workspace applications. In this tutorial, I walked you through setting up the Google Sheets API with Python and showed a few examples of how to manipulate spreadsheets using this API. The possibilities of how to use this are endless.</p>\n<p>Setting up access to the other APIs involves a very similar process and would allow for even more elaborate and complex automation flows.</p>"},{"url":"/docs/python/intro-for-js-devs/","relativePath":"docs/python/intro-for-js-devs.md","relativeDir":"docs/python","base":"intro-for-js-devs.md","name":"intro-for-js-devs","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Lorem ipsum</h2>\n<p>Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n<ul>\n<li>Lorem ipsum</li>\n<li>dolor sit amet</li>\n</ul>"},{"url":"/docs/python/install-python-ubuntu/","relativePath":"docs/python/install-python-ubuntu.md","relativeDir":"docs/python","base":"install-python-ubuntu.md","name":"install-python-ubuntu","frontmatter":{"title":"How to install Python 2.7 on Ubuntu 20.04 LTS","weight":0,"excerpt":"Working commands to install Python 2.7 on Ubuntu 20.04 LTS Linux along with Pip 2 to install and run various server applications.","seo":{"title":"How to install Python 2.7 on Ubuntu 20.04 LTS","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>How to install Python 2.7 on Ubuntu 20.04 LTS</h1>\n<blockquote>\n<p>Working commands to install Python 2.7 on Ubuntu 20.04 LTS Linux along with Pip 2 to install and run various server applications.</p>\n</blockquote>\n<p>How to install Python 2.7 on Ubuntu 20.04 LTS</p>\n<p>Last Updated: January 19, 2021 <a href=\"https://www.how2shout.com/linux/category/ubuntu/\" title=\"View all posts in Ubuntu\">Ubuntu</a></p>\n<p>As we know Ubuntu 20.04 LTS which is the Long term version of Canonical has dropped the previous version of Python that is 2, to give space to the latest version of Python 3. Therefore, if there is some application that required Python 2.7 then you would not find it on Ubuntu 20.04 by default. However, there is a way to install it using the command line terminal.</p>\n<h2>Install Python 2.7 on Ubuntu 20.04 LTS Linux and make it default</h2>\n<h3>1. Open a command terminal</h3>\n<p>Although everybody is familiar with how to run the command terminal, however, those who don't know can use the shortcut key combination i.e Ctrl+Alt+T.</p>\n<h3>2. Add Universe repo</h3>\n<p>It is quite possible that your system would already have the Universe repository, still run the below command to add or confirm it.</p>\n<p>sudo apt-add-repository universe\nsudo apt update</p>\n<h3>3. Install Python2.7 on Ubuntu 20.04 LTS</h3>\n<p>Once done with the above command, its time to install Python 2.7 version on Ubuntu Linux, for that, follow this syntax:</p>\n<p>sudo apt install python2-minimal</p>\n<p><strong>Check Python2 version</strong></p>\n<p>To view the current version of Python on your system run:</p>\n<p>python2 -V</p>\n<p><strong>Output:</strong></p>\n<p>Python 2.7.18</p>\n<h3>4. See all available Python version on the system</h3>\n<p>As we know Ubuntu 20.04 comes out of the box with Python 3 thus, let's check what are the available versions of Python are on our system.</p>\n<p>ls /usr/bin/python*</p>\n<p><a href=\"https://www.how2shout.com/linux/wp-content/uploads/2021/01/Check-all-PHP-versions.jpg\"><img src=\"https://www.how2shout.com/linux/wp-content/uploads/2021/01/Check-all-PHP-versions.jpg\" alt=\"Check all PHP versions\" title=\"Check all PHP versions\"></a></p>\n<h3>5. Change the Default Python priority</h3>\n<p>You will see both python 2.7 and 3 on your Ubuntu 20.04 Linux. However, by default, the system will give priority to Python3, and that's when we run <code>python</code> command it will give an error:</p>\n<p>Command 'python' not found, did you mean:\ncommand 'python 3' from deb python3\ncommand 'python' from deb python-is-python3</p>\n<p>Thus, we change the priority and set Python2 at the top so that it could call by applications as the default version. Whereas Python3 will be second.</p>\n<p>sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1\nsudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2</p>\n<p><strong>Now, check the default version:</strong></p>\n<p>python -V</p>\n<p><em>In the <strong>future</strong>, if you want to <strong>set Python 3 as default</strong> or first version in the priority list, simply update the alternatives list, using this command:</em></p>\n<p>sudo update-alternatives --config python</p>\n<p>You will get something like the below screenshot with the choice to set one at the priority. To select, just enter the number given corresponding to each version path under the <strong>Selection</strong> column and hit the <strong>Enter</strong> key.</p>\n<p><a href=\"https://www.how2shout.com/linux/wp-content/uploads/2021/01/Switch-Default-Python-Version.jpg\"><img src=\"https://www.how2shout.com/linux/wp-content/uploads/2021/01/Switch-Default-Python-Version.jpg\" alt=\"Switch Default Python 2.7 Version Ubuntu 20.04\" title=\"Switch Default Python Version\"></a></p>\n<h3>6. Install Pip 2 on Ubuntu 20.04</h3>\n<p>Now, if you are also interested in Pip 2 then here are the commands to follow.</p>\n<p><strong>Note</strong>: Make sure you already have enabled the <strong>universe</strong> repo given in <strong>Step 2</strong> of this article and have Python 2 on your system.</p>\n<p>sudo apt update\nsudo apt install curl\ncurl <a href=\"https://bootstrap.pypa.io/get-pip.py\">https://bootstrap.pypa.io/get-pip.py</a> --output get-pip.py\nsudo python2 get-pip.py</p>\n<p><strong>Check Version:</strong></p>\n<p>pip2 --version</p>\n<p><a href=\"https://www.how2shout.com/linux/wp-content/uploads/2021/01/Install-python2-and-PIP-2-on-Ubuntu-20.04.jpg\"><img src=\"https://www.how2shout.com/linux/wp-content/uploads/2021/01/Install-python2-and-PIP-2-on-Ubuntu-20.04.jpg\" alt=\"Install python2 and PIP 2 on Ubuntu 20.04\" title=\"Install python2 and PIP 2 on Ubuntu 20.04\"></a></p>\n<h3>7. Uninstall (optional)</h3>\n<p>If you don't need Python 2.7 on your system then here is the command to remove it:</p>\n<p>sudo apt remove python2-minimal</p>\n<p><a href=\"https://www.how2shout.com/linux/how-to-install-python-2-7-on-ubuntu-20-04-lts/\">Source</a></p>"},{"url":"/docs/python/","relativePath":"docs/python/index.md","relativeDir":"docs/python","base":"index.md","name":"index","frontmatter":{"title":"Python","weight":0,"excerpt":"Python","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<br>\n<h1>  Python Resources</h1>\n<br>\n<iframe class=\"inner\" src=\"https://ds-unit-5-lambda.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<h2>My Python Docs:</h2>\n<h2><a href=\"https://bgoonz42.gitbook.io/datastructures-in-pytho/\">My Python Website</a></h2>\n<h1>Python Study Guide for a JavaScript Programmer</h1>\n<p>A guide to commands in Python from what you know in JavaScript</p>\n<hr>\n<h3>Python Study Guide for a JavaScript Programmer</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*3V9VOfPk_hrFdbEAd3j-QQ.png\" class=\"graf-image\" /></figure>### Applications of Tutorial & Cheat Sheet Respectivley (At Bottom Of Tutorial):\n<h3>Basics</h3>\n<ul>\n<li><span id=\"f893\"><strong>PEP8</strong> : Python Enhancement Proposals, style-guide for Python.</span></li>\n<li><span id=\"c0bf\"><code>print</code> is the equivalent of <code>console.log</code>.</span></li>\n</ul>\n<blockquote>\n<p>'print() == console.log()'</p>\n</blockquote>\n<h3><code>#</code> is used to make comments in your code.</h3>\n<pre><code>def foo():\n    \"\"\"\n    The foo function does many amazing things that you\n    should not question. Just accept that it exists and\n    use it with caution.\n    \"\"\"\n    secretThing()\n</code></pre>\n<blockquote>\n<p><em>Python has a built in help function that let's you see a description of the source code without having to navigate to it… “-SickNasty … Autor Unknown”</em></p>\n</blockquote>\n<hr>\n<h3>Numbers</h3>\n<ul>\n<li><span id=\"4060\">Python has three types of numbers:</span></li>\n<li><span id=\"8aef\"><strong>Integer</strong></span></li>\n<li><span id=\"723f\"><strong>Positive and Negative Counting Numbers.</strong></span></li>\n</ul>\n<p>No Decimal Point</p>\n<blockquote>\n<p>Created by a literal non-decimal point number … <strong>or</strong> … with the <code>int()</code> constructor.</p>\n</blockquote>\n<pre><code>print(3) # => 3\nprint(int(19)) # => 19\nprint(int()) # => 0\n</code></pre>\n<p><strong>3. Complex Numbers</strong></p>\n<blockquote>\n<p>Consist of a real part and imaginary part.</p>\n</blockquote>\n<h4>Boolean is a subtype of integer in Python.🤷‍♂️</h4>\n<blockquote>\n<p>If you came from a background in JavaScript and learned to accept the premise(s) of the following meme…</p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*eC4EvZcv6hhH88jX.png\" class=\"graf-image\" /></figure>Than I am sure you will find the means to suspend your disbelief.\n<pre><code>print(2.24) # => 2.24\nprint(2.) # => 2.0\nprint(float()) # => 0.0\nprint(27e-5) # => 0.00027\n</code></pre>\n<h3>KEEP IN MIND:</h3>\n<blockquote>\n<p><strong>The</strong> <code>i</code> <strong>is switched to a</strong> <code>j</code> <strong>in programming.</strong></p>\n</blockquote>\n<p><span class=\"graf-dropCap\">T</span>*his is because the letter i is common place as the de facto index for any and all enumerable entities so it just makes sense not to compete for name-*<strong><em>space</em></strong> <em>when there's another 25 letters that don't get used for every loop under the sun. My most medium apologies to Leonhard Euler.</em></p>\n<pre><code>print(7j) # => 7j\nprint(5.1+7.7j)) # => 5.1+7.7j\nprint(complex(3, 5)) # => 3+5j\nprint(complex(17)) # => 17+0j\nprint(complex()) # => 0j\n</code></pre>\n<ul>\n<li><span id=\"2579\"><strong>Type Casting</strong> : The process of converting one number to another.</span></li>\n</ul>\n<!-- -->\n<pre><code># Using Float\nprint(17)               # => 17\nprint(float(17))        # => 17.0\n\n# Using Int\nprint(17.0)             # => 17.0\nprint(int(17.0))        # => 17\n\n# Using Str\nprint(str(17.0) + ' and ' + str(17))        # => 17.0 and 17\n</code></pre>\n<p><strong>The arithmetic operators are the same between JS and Python, with two additions:</strong></p>\n<ul>\n<li><span id=\"8cf4\"><em>“**” : Double asterisk for exponent.</em></span></li>\n<li><span id=\"03b4\"><em>“//” : Integer Division.</em></span></li>\n<li><span id=\"2ce5\"><strong>There are no spaces between math operations in Python.</strong></span></li>\n<li><span id=\"1686\"><strong>Integer Division gives the other part of the number from Module; it is a way to do round down numbers replacing</strong> <code>Math.floor()</code> <strong>in JS.</strong></span></li>\n<li><span id=\"a6a3\"><strong>There are no</strong> <code>++</code> <strong>and</strong> <code>--</code> <strong>in Python, the only shorthand operators are:</strong></span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/0*Ez_1PZ93N4FfvkRr.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Strings</h3>\n<ul>\n<li><span id=\"e98c\">Python uses both single and double quotes.</span></li>\n<li><span id=\"225e\">You can escape strings like so <code>'Jodi asked, \"What\\'s up, Sam?\"'</code></span></li>\n<li><span id=\"9f74\">Multiline strings use triple quotes.</span></li>\n</ul>\n<!-- -->\n<pre><code>print('''My instructions are very long so to make them\nmore readable in the code I am putting them on\nmore than one line. I can even include \"quotes\"\nof any kind because they won't get confused with\nthe end of the string!''')\n</code></pre>\n<p><strong>Use the</strong> <code>len()</code> <strong>function to get the length of a string.</strong></p>\n<pre><code>print(len(“Spaghetti”)) # => 9\n</code></pre>\n<h3><strong>Python uses</strong> <code>zero-based indexing</code></h3>\n<h4>Python allows negative indexing (thank god!)</h4>\n<pre><code>print(“Spaghetti”[-1]) # => i\n\nprint(“Spaghetti”[-4]) # => e\n</code></pre>\n<ul>\n<li><span id=\"7567\">Python let's you use ranges</span></li>\n</ul>\n<p>You can think of this as roughly equivalent to the slice method called on a JavaScript object or string… <em>(mind you that in JS … strings are wrapped in an object (under the hood)… upon which the string methods are actually called. As a immutable privative type</em> <strong>*by textbook definition**</strong>, a string literal could not hope to invoke most of it's methods without violating the state it was bound to on initialization if it were not for this bit of syntactic sugar.)*</p>\n<pre><code>print(“Spaghetti”[1:4]) # => pag\nprint(“Spaghetti”[4:-1]) # => hett\nprint(“Spaghetti”[4:4]) # => (empty string)\n</code></pre>\n<ul>\n<li><span id=\"1366\">The end range is exclusive just like <code>slice</code> in JS.</span></li>\n</ul>\n<!-- -->\n<pre><code># Shortcut to get from the beginning of a string to a certain index.\nprint(\"Spaghetti\"[:4])  # => Spag\nprint(\"Spaghetti\"[:-1])    # => Spaghett\n\n# Shortcut to get from a certain index to the end of a string.\nprint(\"Spaghetti\"[1:])  # => paghetti\nprint(\"Spaghetti\"[-4:])    # => etti\n</code></pre>\n<ul>\n<li><span id=\"c786\">The <code>index</code> string function is the equiv. of <code>indexOf()</code> in JS</span></li>\n</ul>\n<!-- -->\n<pre><code>print(\"Spaghetti\".index(\"h\"))    # => 4\nprint(\"Spaghetti\".index(\"t\"))    # => 6\n</code></pre>\n<ul>\n<li><span id=\"fbb6\">The <code>count</code> function finds out how many times a substring appears in a string… pretty nifty for a hard coded feature of the language.</span></li>\n</ul>\n<!-- -->\n<pre><code>print(\"Spaghetti\".count(\"h\"))    # => 1\nprint(\"Spaghetti\".count(\"t\"))    # => 2\nprint(\"Spaghetti\".count(\"s\"))    # => 0\nprint('''We choose to go to the moon in this decade and do the other things,\nnot because they are easy, but because they are hard, because that goal will\nserve to organize and measure the best of our energies and skills, because that\nchallenge is one that we are willing to accept, one we are unwilling to\npostpone, and one which we intend to win, and the others, too.\n'''.count('the '))                # => 4\n</code></pre>\n<ul>\n<li><span id=\"7816\"><strong>You can use</strong> <code>+</code> <strong>to concatenate strings, just like in JS.</strong></span></li>\n<li><span id=\"ed0a\"><strong>You can also use “*” to repeat strings or multiply strings.</strong></span></li>\n<li><span id=\"f95c\"><strong>Use the</strong> <code>format()</code> <strong>function to use placeholders in a string to input values later on.</strong></span></li>\n</ul>\n<!-- -->\n<pre><code>first_name = \"Billy\"\nlast_name = \"Bob\"\nprint('Your name is {0} {1}'.format(first_name, last_name))  # => Your name is Billy Bob\n</code></pre>\n<ul>\n<li><span id=\"445b\"><em>Shorthand way to use format function is:<br>\n_`print(f'Your name is {first</em>name} {last_name}')`</span></li>\n</ul>\n<h4>Some useful string methods.</h4>\n<ul>\n<li><span id=\"118c\"><strong>Note that in JS</strong> <code>join</code> <strong>is used on an Array, in Python it is used on String.</strong></span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*eE3E5H0AoqkhqK1z.png\" class=\"graf-image\" /></figure>-   <span id=\"e95e\">There are also many handy testing methods.</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Q0CMqFd4PozLDFPB.png\" class=\"graf-image\" /></figure>\n<hr>\n<details>\n<summary>  See More </summary>   \n<h3>Variables and Expressions</h3>\n<ul>\n<li><span id=\"a255\"><strong>Duck-Typing</strong> : Programming Style which avoids checking an object's type to figure out what it can do.</span></li>\n<li><span id=\"6e70\">Duck Typing is the fundamental approach of Python.</span></li>\n<li><span id=\"5666\">Assignment of a value automatically declares a variable.</span></li>\n</ul>\n<!-- -->\n<pre><code>a = 7\nb = 'Marbles'\nprint(a)         # => 7\nprint(b)         # => Marbles\n</code></pre>\n<ul>\n<li><span id=\"f6cf\"><strong><em>You can chain variable assignments to give multiple var names the same value.</em></strong></span></li>\n</ul>\n<h4>Use with caution as this is highly unreadable</h4>\n<pre><code>count = max = min = 0\nprint(count)           # => 0\nprint(max)             # => 0\nprint(min)             # => 0\n</code></pre>\n<h4>The value and type of a variable can be re-assigned at any time.</h4>\n<pre><code>a = 17\nprint(a)         # => 17\na = 'seventeen'\nprint(a)         # => seventeen\n</code></pre>\n<ul>\n<li><span id=\"4605\"><code>NaN</code> _does not exist in Python, but you can 'create' it like so:<br>\n_<code>print(float(\"nan\"))</code></span></li>\n<li><span id=\"d150\"><em>Python replaces</em> <code>null</code> <em>with</em> <code>none</code><em>.</em></span></li>\n<li><span id=\"6fa7\"><code>none</code> <strong><em>is an object</em></strong> <em>and can be directly assigned to a variable.</em></span></li>\n</ul>\n<blockquote>\n<p>Using none is a convenient way to check to see why an action may not be operating correctly in your program.</p>\n</blockquote>\n<hr>\n<h3>Boolean Data Type</h3>\n<ul>\n<li><span id=\"b843\">One of the biggest benefits of Python is that it reads more like English than JS does.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*HQpndNhm1Z_xSoHb.png\" class=\"graf-image\" /></figure># Logical AND\n    print(True and True)    # => True\n    print(True and False)   # => False\n    print(False and False)  # => False\n<pre><code># Logical OR\nprint(True or True)     # => True\nprint(True or False)    # => True\nprint(False or False)   # => False\n\n# Logical NOT\nprint(not True)             # => False\nprint(not False and True)   # => True\nprint(not True or False)    # => False\n</code></pre>\n<ul>\n<li><span id=\"18cc\">By default, Python considers an object to be true UNLESS it is one of the following:</span></li>\n<li><span id=\"6e0a\">Constant <code>None</code> or <code>False</code></span></li>\n<li><span id=\"9552\">Zero of any numeric type.</span></li>\n<li><span id=\"e7ce\">Empty Sequence or Collection.</span></li>\n<li><span id=\"11d6\"><code>True</code> and <code>False</code> must be capitalized</span></li>\n</ul>\n<hr>\n<h3>Comparison Operators</h3>\n<ul>\n<li><span id=\"a4fa\">Python uses all the same equality operators as JS.</span></li>\n<li><span id=\"7f98\">In Python, equality operators are processed from left to right.</span></li>\n<li><span id=\"fb68\">Logical operators are processed in this order:</span></li>\n<li><span id=\"bf08\"><strong>NOT</strong></span></li>\n<li><span id=\"4888\"><strong>AND</strong></span></li>\n<li><span id=\"2c55\"><strong>OR</strong></span></li>\n</ul>\n<blockquote>\n<p>Just like in JS, you can use <code>parentheses</code> to change the inherent order of operations.</p>\n</blockquote>\n<blockquote>\n<p><strong>Short Circuit</strong> : Stopping a program when a <code>true</code> or <code>false</code> has been reached.</p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*qHzGRLTOMTf30miT.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Identity vs Equality</h3>\n<pre><code>print (2 == '2')    # => False\nprint (2 is '2')    # => False\n\nprint (\"2\" == '2')    # => True\nprint (\"2\" is '2')    # => True\n\n# There is a distinction between the number types.\nprint (2 == 2.0)    # => True\nprint (2 is 2.0)    # => False\n</code></pre>\n<ul>\n<li><span id=\"c5a5\">In the Python community it is better to use <code>is</code> and <code>is not</code> over <code>==</code> or <code>!=</code></span></li>\n</ul>\n<hr>\n<h3>If Statements</h3>\n<pre><code>if name == 'Monica':\n    print('Hi, Monica.')\n\nif name == 'Monica':\n    print('Hi, Monica.')\nelse:\n    print('Hello, stranger.')\n\nif name == 'Monica':\n    print('Hi, Monica.')\nelif age &#x3C; 12:\n    print('You are not Monica, kiddo.')\nelif age > 2000:\n   print('Unlike you, Monica is not an undead, immortal vampire.')\nelif age > 100:\n   print('You are not Monica, grannie.')\n</code></pre>\n<blockquote>\n<p>Remember the order of <code>elif</code> statements matter.</p>\n</blockquote>\n<hr>\n<h3>While Statements</h3>\n<pre><code>spam = 0\nwhile spam &#x3C; 5:\n  print('Hello, world.')\n  spam = spam + 1\n</code></pre>\n<ul>\n<li><span id=\"c7f3\"><code>Break</code> statement also exists in Python.</span></li>\n</ul>\n<!-- -->\n<pre><code>spam = 0\nwhile True:\n  print('Hello, world.')\n  spam = spam + 1\n  if spam >= 5:\n    break\n</code></pre>\n<ul>\n<li><span id=\"7a99\">As are <code>continue</code> statements</span></li>\n</ul>\n<!-- -->\n<pre><code>spam = 0\nwhile True:\n  print('Hello, world.')\n  spam = spam + 1\n  if spam &#x3C; 5:\n    continue\n  break\n</code></pre>\n<hr>\n<h3>Try/Except Statements</h3>\n<ul>\n<li><span id=\"72ec\">Python equivalent to <code>try/catch</code></span></li>\n</ul>\n<!-- -->\n<pre><code>a = 321\ntry:\n    print(len(a))\nexcept:\n    print('Silently handle error here')\n\n    # Optionally include a correction to the issue\n    a = str(a)\n    print(len(a)\n\na = '321'\ntry:\n    print(len(a))\nexcept:\n    print('Silently handle error here')\n\n    # Optionally include a correction to the issue\n    a = str(a)\n    print(len(a))\n</code></pre>\n<ul>\n<li><span id=\"dcd1\">You can name an error to give the output more specificity.</span></li>\n</ul>\n<!-- -->\n<pre><code>a = 100\nb = 0\ntry:\n    c = a / b\nexcept ZeroDivisionError:\n    c = None\nprint(c)\n</code></pre>\n<ul>\n<li><span id=\"4027\">You can also use the <code>pass</code> commmand to by pass a certain error.</span></li>\n</ul>\n<!-- -->\n<pre><code>a = 100\nb = 0\ntry:\n    print(a / b)\nexcept ZeroDivisionError:\n    pass\n</code></pre>\n<ul>\n<li><span id=\"030b\">The <code>pass</code> method won't allow you to bypass every single error so you can chain an exception series like so:</span></li>\n</ul>\n<!-- -->\n<pre><code>a = 100\n# b = \"5\"\ntry:\n    print(a / b)\nexcept ZeroDivisionError:\n    pass\nexcept (TypeError, NameError):\n    print(\"ERROR!\")\n</code></pre>\n<ul>\n<li><span id=\"bf45\">You can use an <code>else</code> statement to end a chain of <code>except</code> statements.</span></li>\n</ul>\n<!-- -->\n<pre><code># tuple of file names\nfiles = ('one.txt', 'two.txt', 'three.txt')\n\n# simple loop\nfor filename in files:\n    try:\n        # open the file in read mode\n        f = open(filename, 'r')\n    except OSError:\n        # handle the case where file does not exist or permission is denied\n        print('cannot open file', filename)\n    else:\n        # do stuff with the file object (f)\n        print(filename, 'opened successfully')\n        print('found', len(f.readlines()), 'lines')\n        f.close()\n</code></pre>\n<ul>\n<li><span id=\"0e91\"><code>finally</code> is used at the end to clean up all actions under any circumstance.</span></li>\n</ul>\n<!-- -->\n<pre><code>def divide(x, y):\n    try:\n        result = x / y\n    except ZeroDivisionError:\n        print(\"Cannot divide by zero\")\n    else:\n        print(\"Result is\", result)\n    finally:\n        print(\"Finally...\")\n</code></pre>\n<ul>\n<li><span id=\"84ee\">Using duck typing to check to see if some value is able to use a certain method.</span></li>\n</ul>\n<!-- -->\n<pre><code># Try a number - nothing will print out\na = 321\nif hasattr(a, '__len__'):\n    print(len(a))\n\n# Try a string - the length will print out (4 in this case)\nb = \"5555\"\nif hasattr(b, '__len__'):\n    print(len(b))\n</code></pre>\n<hr>\n<h3>Pass</h3>\n<ul>\n<li><span id=\"2b80\">Pass Keyword is required to write the JS equivalent of :</span></li>\n</ul>\n<!-- -->\n<pre><code>if (true) {\n}\n\nwhile (true) {}\n\nif True:\n  pass\n\nwhile True:\n  pass\n</code></pre>\n<hr>\n<h3>Functions</h3>\n<ul>\n<li><span id=\"7091\"><strong>Function definition includes:</strong></span></li>\n<li><span id=\"1f11\"><strong>The</strong> <code>def</code> <strong>keyword</strong></span></li>\n<li><span id=\"ec14\"><strong>The name of the function</strong></span></li>\n<li><span id=\"7733\"><strong>A list of parameters enclosed in parentheses.</strong></span></li>\n<li><span id=\"1516\"><strong>A colon at the end of the line.</strong></span></li>\n<li><span id=\"b2dd\"><strong>One tab indentation for the code to run.</strong></span></li>\n<li><span id=\"bcef\"><strong>You can use default parameters just like in JS</strong></span></li>\n</ul>\n<!-- -->\n<pre><code>def greeting(name, saying=\"Hello\"):\n    print(saying, name)\n\ngreeting(\"Monica\")\n# Hello Monica\n\ngreeting(\"Barry\", \"Hey\")\n# Hey Barry\n</code></pre>\n<h4><strong>Keep in mind, default parameters must always come after regular parameters.</strong></h4>\n<pre><code># THIS IS BAD CODE AND WILL NOT RUN\ndef increment(delta=1, value):\n    return delta + value\n</code></pre>\n<ul>\n<li><span id=\"c1aa\"><em>You can specify arguments by name without destructuring in Python.</em></span></li>\n</ul>\n<!-- -->\n<pre><code>def greeting(name, saying=\"Hello\"):\n    print(saying, name)\n\n# name has no default value, so just provide the value\n# saying has a default value, so use a keyword argument\ngreeting(\"Monica\", saying=\"Hi\")\n</code></pre>\n<ul>\n<li><span id=\"54ac\">The <code>lambda</code> keyword is used to create anonymous functions and are supposed to be <code>one-liners</code>.</span></li>\n</ul>\n<p><code>toUpper = lambda s: s.upper()</code></p>\n<hr>\n<h3>Notes</h3>\n<h4>Formatted Strings</h4>\n<blockquote>\n<p>Remember that in Python join() is called on a string with an array/list passed in as the argument.<br>\nPython has a very powerful formatting engine.<br>\nformat() is also applied directly to strings.</p>\n</blockquote>\n<pre><code>shopping_list = ['bread','milk','eggs']\nprint(','.join(shopping_list))\n</code></pre>\n<h3>Comma Thousands Separator</h3>\n<pre><code>print('{:,}'.format(1234567890))\n'1,234,567,890'\n</code></pre>\n<h3>Date and Time</h3>\n<pre><code>d = datetime.datetime(2020, 7, 4, 12, 15, 58)\nprint('{:%Y-%m-%d %H:%M:%S}'.format(d))\n'2020-07-04 12:15:58'\n</code></pre>\n<h3>Percentage</h3>\n<pre><code>points = 190\ntotal = 220\nprint('Correct answers: {:.2%}'.format(points/total))\nCorrect answers: 86.36%\n</code></pre>\n<h3>Data Tables</h3>\n<pre><code>width=8\nprint(' decimal hex binary')\nprint('-'*27)\nfor num in range(1,16):\nfor base in 'dXb':\nprint('{0:{width}{base}}'.format(num, base=base, width=width), end=' ')\nprint()\nGetting Input from the Command Line\nPython runs synchronously, all programs and processes will stop when listening for a user input.\nThe input function shows a prompt to a user and waits for them to type 'ENTER'.\nScripts vs Programs\nProgramming Script : A set of code that runs in a linear fashion.\nThe largest difference between scripts and programs is the level of complexity and purpose. Programs typically have many UI's.\n</code></pre>\n<p><strong>Python can be used to display html, css, and JS.</strong><br>\n<em>It is common to use Python as an API (Application Programming Interface)</em></p>\n<h4>Structured Data</h4>\n<h4>Sequence : The most basic data structure in Python where the index determines the order.</h4>\n<blockquote>\n<p>List<br>\nTuple<br>\nRange<br>\nCollections : Unordered data structures, hashable values.</p>\n</blockquote>\n<hr>\n<h4>Dictionaries Sets</h4>\n<h4>Iterable : Generic name for a sequence or collection; any object that can be iterated through.</h4>\n<h4>Can be mutable or immutable. Built In Data Types</h4>\n<hr>\n<h3>Lists are the python equivalent of arrays.</h3>\n<pre><code>empty_list = []\ndepartments = ['HR','Development','Sales','Finance','IT','Customer Support']\n</code></pre>\n<h3>You can instantiate</h3>\n<pre><code>specials = list()\n</code></pre>\n<h4>Test if a value is in a list.</h4>\n<pre><code>print(1 in [1, 2, 3]) #> True\nprint(4 in [1, 2, 3]) #> False\n# Tuples : Very similar to lists, but they are immutable\n</code></pre>\n<h4>Instantiated with parentheses</h4>\n<pre><code>time_blocks = ('AM','PM')\n</code></pre>\n<h4>Sometimes instantiated without</h4>\n<pre><code>colors = 'red','blue','green'\nnumbers = 1, 2, 3\n</code></pre>\n<h4>Tuple() built in can be used to convert other data into a tuple</h4>\n<pre><code>tuple('abc') # returns ('a', 'b', 'c')\ntuple([1,2,3]) # returns (1, 2, 3)\n# Think of tuples as constant variables.\n</code></pre>\n<h4>Ranges : A list of numbers which can't be changed; often used with for loops.</h4>\n<p><strong>Declared using one to three parameters</strong>.</p>\n<blockquote>\n<p>Start : opt. default 0, first # in sequence.<br>\nStop : required next number past the last number in the sequence.<br>\nStep : opt. default 1, difference between each number in the sequence.</p>\n</blockquote>\n<pre><code>range(5) # [0, 1, 2, 3, 4]\nrange(1,5) # [1, 2, 3, 4]\nrange(0, 25, 5) # [0, 5, 10, 15, 20]\nrange(0) # [ ]\nfor let (i = 0; i &#x3C; 5; i++)\nfor let (i = 1; i &#x3C; 5; i++)\nfor let (i = 0; i &#x3C; 25; i+=5)\nfor let(i = 0; i = 0; i++)\n# Keep in mind that stop is not included in the range.\n</code></pre>\n<h4>Dictionaries : Mappable collection where a hashable value is used as a key to ref. an object stored in the dictionary.</h4>\n<h4>Mutable.</h4>\n<pre><code>a = {'one':1, 'two':2, 'three':3}\nb = dict(one=1, two=2, three=3)\nc = dict([('two', 2), ('one', 1), ('three', 3)])\n# a, b, and c are all equal\n</code></pre>\n<p><strong><em>Declared with curly braces of the built in dict()</em></strong></p>\n<blockquote>\n<p><em>Benefit of dictionaries in Python is that it doesn't matter how it is defined, if the keys and values are the same the dictionaries are considered equal.</em></p>\n</blockquote>\n<p><strong>Use the in operator to see if a key exists in a dictionary.</strong></p>\n<p><span class=\"graf-dropCap\">S</span><strong>ets : Unordered collection of distinct objects; objects that need to be hashable.</strong></p>\n<blockquote>\n<p><em>Always be unique, duplicate items are auto dropped from the set.</em></p>\n</blockquote>\n<h4>Common Uses:</h4>\n<blockquote>\n<p>Removing Duplicates<br>\nMembership Testing<br>\nMathematical Operators: Intersection, Union, Difference, Symmetric Difference.</p>\n</blockquote>\n<p><strong>Standard Set is mutable, Python has a immutable version called frozenset.<br>\nSets created by putting comma seperated values inside braces:</strong></p>\n<pre><code>school_bag = {'book','paper','pencil','pencil','book','book','book','eraser'}\nprint(school_bag)\n</code></pre>\n<h4>Also can use set constructor to automatically put it into a set.</h4>\n<pre><code>letters = set('abracadabra')\nprint(letters)\n#Built-In Functions\n#Functions using iterables\n</code></pre>\n<p><strong>filter(function, iterable) : creates new iterable of the same type which includes each item for which the function returns true.</strong></p>\n<p><strong>map(function, iterable) : creates new iterable of the same type which includes the result of calling the function on every item of the iterable.</strong></p>\n<p><strong>sorted(iterable, key=None, reverse=False) : creates a new sorted list from the items in the iterable.</strong></p>\n<p><strong>Output is always a list</strong></p>\n<p><strong>key: opt function which coverts and item to a value to be compared.</strong></p>\n<p><strong>reverse: optional boolean.</strong></p>\n<p><strong>enumerate(iterable, start=0) : starts with a sequence and converts it to a series of tuples</strong></p>\n<pre><code>quarters = ['First', 'Second', 'Third', 'Fourth']\nprint(enumerate(quarters))\nprint(enumerate(quarters, start=1))\n</code></pre>\n<h4>(0, 'First'), (1, 'Second'), (2, 'Third'), (3, 'Fourth')</h4>\n<h4>(1, 'First'), (2, 'Second'), (3, 'Third'), (4, 'Fourth')</h4>\n<blockquote>\n<p>zip(*iterables) : creates a zip object filled with tuples that combine 1 to 1 the items in each provided iterable.<br>\nFunctions that analyze iterable</p>\n</blockquote>\n<p><strong>len(iterable) : returns the count of the number of items.</strong></p>\n<p><strong>max(*args, key=None) : returns the largest of two or more arguments.</strong></p>\n<p><strong>max(iterable, key=None) : returns the largest item in the iterable.</strong></p>\n<p><em>key optional function which converts an item to a value to be compared.<br>\nmin works the same way as max</em></p>\n<p><strong>sum(iterable) : used with a list of numbers to generate the total.</strong></p>\n<p><em>There is a faster way to concatenate an array of strings into one string, so do not use sum for that.</em></p>\n<p><strong>any(iterable) : returns True if any items in the iterable are true.</strong></p>\n<p><strong>all(iterable) : returns True is all items in the iterable are true.</strong></p>\n<h3>Working with dictionaries</h3>\n<p><strong>dir(dictionary) : returns the list of keys in the dictionary.<br>\nWorking with sets</strong></p>\n<p><strong>Union : The pipe | operator or union(*sets) function can be used to produce a new set which is a combination of all elements in the provided set.</strong></p>\n<pre><code>a = {1, 2, 3}\nb = {2, 4, 6}\nprint(a | b) # => {1, 2, 3, 4, 6}\n</code></pre>\n<h4>Intersection : The &#x26; operator ca be used to produce a new set of only the elements that appear in all sets.</h4>\n<pre><code>a = {1, 2, 3}\nb = {2, 4, 6}\nprint(a &#x26; b) # => {2}\nDifference : The — operator can be used to produce a new set of only the elements that appear in the first set and NOT the others.\n</code></pre>\n<p><strong>Symmetric Difference : The ^ operator can be used to produce a new set of only the elements that appear in exactly one set and not in both.</strong></p>\n<pre><code>a = {1, 2, 3}\nb = {2, 4, 6}\nprint(a — b) # => {1, 3}\nprint(b — a) # => {4, 6}\nprint(a ^ b) # => {1, 3, 4, 6}\n</code></pre>\n<hr>\n<h3><strong>For Statements In python, there is only one for loop.</strong></h3>\n<p>Always Includes:</p>\n<blockquote>\n<ol>\n<li>The for keyword</li>\n<li>A variable name</li>\n<li>The 'in' keyword</li>\n<li>An iterable of some kid</li>\n<li>A colon</li>\n<li>On the next line, an indented block of code called the for clause.</li>\n</ol>\n</blockquote>\n<p><strong>You can use break and continue statements inside for loops as well.</strong></p>\n<p><strong>You can use the range function as the iterable for the for loop.</strong></p>\n<pre><code>print('My name is')\nfor i in range(5):\nprint('Carlita Cinco (' + str(i) + ')')\n\ntotal = 0\nfor num in range(101):\ntotal += num\nprint(total)\nLooping over a list in Python\nfor c in ['a', 'b', 'c']:\nprint(c)\n\nlst = [0, 1, 2, 3]\nfor i in lst:\nprint(i)\n</code></pre>\n<p><strong><em>Common technique is to use the len() on a pre-defined list with a for loop to iterate over the indices of the list.</em></strong></p>\n<pre><code>supplies = ['pens', 'staplers', 'flame-throwers', 'binders']\nfor i in range(len(supplies)):\nprint('Index ' + str(i) + ' in supplies is: ' + supplies[i])\n</code></pre>\n<p><strong>You can loop and destructure at the same time.</strong></p>\n<pre><code>l = 1, 2], [3, 4], [5, 6\nfor a, b in l:\nprint(a, ', ', b)\n</code></pre>\n<blockquote>\n<p>Prints 1, 2</p>\n</blockquote>\n<blockquote>\n<p>Prints 3, 4</p>\n</blockquote>\n<blockquote>\n<p>Prints 5, 6</p>\n</blockquote>\n<p><strong>You can use values() and keys() to loop over dictionaries.</strong></p>\n<pre><code>spam = {'color': 'red', 'age': 42}\nfor v in spam.values():\nprint(v)\n</code></pre>\n<p><em>Prints red</em></p>\n<p><em>Prints 42</em></p>\n<pre><code>for k in spam.keys():\nprint(k)\n</code></pre>\n<p><em>Prints color</em></p>\n<p><em>Prints age</em></p>\n<p><strong>For loops can also iterate over both keys and values.</strong></p>\n<p><strong>Getting tuples</strong></p>\n<pre><code>for i in spam.items():\nprint(i)\n</code></pre>\n<p><em>Prints ('color', 'red')</em></p>\n<p><em>Prints ('age', 42)</em></p>\n<p><em>Destructuring to values</em></p>\n<pre><code>for k, v in spam.items():\nprint('Key: ' + k + ' Value: ' + str(v))\n</code></pre>\n<p><em>Prints Key: age Value: 42</em></p>\n<p><em>Prints Key: color Value: red</em></p>\n<p><strong>Looping over string</strong></p>\n<pre><code>for c in “abcdefg”:\nprint(c)\n</code></pre>\n<p><strong>When you order arguments within a function or function call, the args need to occur in a particular order:</strong></p>\n<p><em>formal positional args.</em></p>\n<p>*args</p>\n<p><em>keyword args with default values</em></p>\n<p>**kwargs</p>\n<pre><code>def example(arg_1, arg_2, *args, **kwargs):\npass\n\ndef example2(arg_1, arg_2, *args, kw_1=”shark”, kw_2=”blowfish”, **kwargs):\npass\n</code></pre>\n<hr>\n<h3><strong>Importing in Python</strong></h3>\n<p><strong>Modules are similar to packages in Node.js</strong><br>\nCome in different types:</p>\n<p>Built-In,</p>\n<p>Third-Party,</p>\n<p>Custom.</p>\n<p><strong>All loaded using import statements.</strong></p>\n<hr>\n<h3><strong>Terms</strong></h3>\n<blockquote>\n<p>module : Python code in a separate file.<br>\npackage : Path to a directory that contains modules.<br>\n<a href=\"http://init.py\" class=\"markup--anchor markup--blockquote-anchor\"><strong>init.py</strong></a> : Default file for a package.<br>\nsubmodule : Another file in a module's folder.<br>\nfunction : Function in a module.</p>\n</blockquote>\n<p><strong>A module can be any file but it is usually created by placing a special file init.py into a folder. pic</strong></p>\n<p><em>Try to avoid importing with wildcards in Python.</em></p>\n<p><em>Use multiple lines for clarity when importing.</em></p>\n<pre><code>from urllib.request import (\nHTTPDefaultErrorHandler as ErrorHandler,\nHTTPRedirectHandler as RedirectHandler,\nRequest,\npathname2url,\nurl2pathname,\nurlopen,\n)\n</code></pre>\n<hr>\n<h3>Watching Out for Python 2</h3>\n<p><strong>Python 3 removed &#x3C;> and only uses !=</strong></p>\n<p><strong>format() was introduced with P3</strong></p>\n<p><strong>All strings in P3 are unicode and encoded.<br>\nmd5 was removed.</strong></p>\n<p><strong>ConfigParser was renamed to configparser<br>\nsets were killed in favor of set() class.</strong></p>\n<h4><strong>print was a statement in P2, but is a function in P3.</strong></h4>\n<h3>Topics revisited (in python syntax)</h3>\n<h3>Cheat Sheet:</h3>\n<h4>If you found this guide helpful feel free to checkout my github/gists where I host similar content:</h4>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--p-anchor\">bgoonz's gists · GitHub</a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://goofy-euclid-1cd736.netlify.app/\"><strong>a/A-Student-Resources</strong><br />\n<em>Edit description</em>goofy-euclid-1cd736.netlify.app</a><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>Python Cheat Sheet:</h3>\n<h3>If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:</h3>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://gist.github.com/bgoonz\"><strong>bgoonz's gists</strong><br />\n<em>Instantly share code, notes, and snippets. Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python |…</em>gist.github.com</a><a href=\"https://gist.github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n</details>"},{"url":"/docs/quick-reference/Emmet/","relativePath":"docs/quick-reference/Emmet.md","relativeDir":"docs/quick-reference","base":"Emmet.md","name":"Emmet","frontmatter":{"title":"Emmet Cheat Sheet","excerpt":"In this section you'll find basic information about Web-Dev-Huband how to use it.","seo":{"title":"Emmet Cheat Sheet","description":"This is the Emmet Cheat Sheet page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Emmet Cheat Sheet","keyName":"property"},{"name":"og:description","value":"This is the Emmet Cheat Sheet page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Emmet Cheat Sheet"},{"name":"twitter:description","value":"This is the Emmet Cheat Sheet page"}]},"template":"docs"},"html":"<h1>Emmet Cheat Sheet</h1>\n<p>EMMET</p>\n<hr>\n<h3>Emmet Cheat Sheet</h3>\n<h3>EMMET</h3>\n<p><em>The a toolkit for web-developers</em></p>\n<h3>Introduction</h3>\n<p>Emmet is a productivity toolkit for web developers that uses expressions to generate HTML snippets.</p>\n<h3>Installation</h3>\n<p>Normally, installation for Emmet should be a straight-forward process from the package-manager, as most of the modern text editors support Emmet.</p>\n<h3>Usage</h3>\n<p>You can use Emmet in two ways:</p>\n<ul>\n<li><span id=\"856f\">Tab Expand Way: Type your emmet code and press <code>Tab</code> key</span></li>\n<li><span id=\"9aea\">Interactive Method: Press <code>alt + ctrl + Enter</code> and start typing your expressions. This should automatically generate HTML snippets on the fly.</span></li>\n</ul>\n<p><strong>This cheatsheet will assume that you press</strong><code>Tab</code><strong>after each expressions.</strong></p>\n<h3>HTML</h3>\n<h3>Generating HTML 5 DOCTYPE</h3>\n<p><code>html:5</code></p>\n<p>Will generate</p>\n<pre><code>&#x3C;!DOCTYPE html>\n&#x3C;html lang=\"en\">\n&#x3C;head>\n  &#x3C;meta charset=\"UTF-8\">\n  &#x3C;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  &#x3C;meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  &#x3C;title>Document&#x3C;/title>\n&#x3C;/head>\n&#x3C;body>\n\n&#x3C;/body>\n&#x3C;/html>\n</code></pre>\n<h3>Child items</h3>\n<p>Child items are created using <code>></code></p>\n<p><code>ul>li>p</code></p>\n<pre><code>&#x3C;ul>\n  &#x3C;li>\n    &#x3C;p>&#x3C;/p>\n  &#x3C;/li>\n&#x3C;/ul>\n</code></pre>\n<h3>Sibling Items</h3>\n<p>Sibling items are created using <code>+</code></p>\n<p><code>html>head+body</code></p>\n<pre><code>&#x3C;html>\n&#x3C;head>&#x3C;/head>\n&#x3C;body>\n\n&#x3C;/body>\n&#x3C;/html>\n</code></pre>\n<h3>Multiplication</h3>\n<p>Items can be multiplied by <code>*</code></p>\n<p><code>ul>li*5</code></p>\n<pre><code>&#x3C;ul>\n  &#x3C;li>&#x3C;/li>\n  &#x3C;li>&#x3C;/li>\n  &#x3C;li>&#x3C;/li>\n  &#x3C;li>&#x3C;/li>\n  &#x3C;li>&#x3C;/li>\n&#x3C;/ul>\n</code></pre>\n<h3>Grouping</h3>\n<p>Items can be grouped together using <code>()</code></p>\n<p><code>table>(tr>th*5)+tr>t*5</code></p>\n<pre><code>&#x3C;table>\n  &#x3C;tr>\n    &#x3C;th>&#x3C;/th>\n    &#x3C;th>&#x3C;/th>\n    &#x3C;th>&#x3C;/th>\n    &#x3C;th>&#x3C;/th>\n    &#x3C;th>&#x3C;/th>\n  &#x3C;/tr>\n  &#x3C;tr>\n    &#x3C;t>&#x3C;/t>\n    &#x3C;t>&#x3C;/t>\n    &#x3C;t>&#x3C;/t>\n    &#x3C;t>&#x3C;/t>\n    &#x3C;t>&#x3C;/t>\n  &#x3C;/tr>\n&#x3C;/table>\n</code></pre>\n<h3>Class and ID</h3>\n<p>Class and Id in Emmet can be done using  <code>.</code> and <code>#</code></p>\n<p><code>div.heading</code></p>\n<pre><code>&#x3C;div class=\"heading\">&#x3C;/div>\n</code></pre>\n<p><code>div#heading</code></p>\n<pre><code>&#x3C;div id=\"heading\">&#x3C;/div>\n</code></pre>\n<p>ID and Class can also be combined together</p>\n<p><code>div#heading.center</code></p>\n<pre><code>&#x3C;div id=\"heading\" class=\"center\">&#x3C;/div>\n</code></pre>\n<h3>Adding Content inside tags</h3>\n<p>Contents inside tags can be added using <code>{}</code></p>\n<p><code>h1{Emmet is awesome}+h2{Every front end developers should use this}+p{This is paragraph}*2</code></p>\n<pre><code>&#x3C;h1>Emmet is awesome&#x3C;/h1>\n&#x3C;h2>Every front end developers should use this&#x3C;/h2>\n&#x3C;p>This is paragraph&#x3C;/p>\n&#x3C;p>This is paragraph&#x3C;/p>\n</code></pre>\n<h3>Attributes inside HTML tags</h3>\n<p>Attributes can be added using <code>[]</code></p>\n<p><code>a[href=https://?google.com data-toggle=something target=_blank]</code></p>\n<pre><code>&#x3C;a href=\"https://?google.com\" data-toggle=\"something\" target=\"_blank\">&#x3C;/a>\n</code></pre>\n<h3>Numbering</h3>\n<p>Numbering can be done using <code>$</code></p>\n<p>You can use this inside tag or contents.</p>\n<p><code>h${This is so awesome $}*6</code></p>\n<pre><code>&#x3C;h1>This is so awesome 1&#x3C;/h1>\n&#x3C;h2>This is so awesome 2&#x3C;/h2>\n&#x3C;h3>This is so awesome 3&#x3C;/h3>\n&#x3C;h4>This is so awesome 4&#x3C;/h4>\n&#x3C;h5>This is so awesome 5&#x3C;/h5>\n&#x3C;h6>This is so awesome 6&#x3C;/h6>\n</code></pre>\n<p>Use <code>@-</code> to reverse the Numbering</p>\n<p><code>img[src=image$$@-.jpg]*5</code></p>\n<pre><code>&#x3C;img src=\"image05.jpg\" alt=\"\">\n&#x3C;img src=\"image04.jpg\" alt=\"\">\n&#x3C;img src=\"image03.jpg\" alt=\"\">\n&#x3C;img src=\"image02.jpg\" alt=\"\">\n&#x3C;img src=\"image01.jpg\" alt=\"\">\n</code></pre>\n<p>To start the numbering from specific number, use this way</p>\n<p><code>img[src=emmet$@100.jpg]*5</code></p>\n<pre><code>&#x3C;img src=\"emmet100.jpg\" alt=\"\">\n&#x3C;img src=\"emmet101.jpg\" alt=\"\">\n&#x3C;img src=\"emmet102.jpg\" alt=\"\">\n&#x3C;img src=\"emmet103.jpg\" alt=\"\">\n&#x3C;img src=\"emmet104.jpg\" alt=\"\">\n</code></pre>\n<h3>Tips</h3>\n<ul>\n<li><span id=\"b708\">Use <code>:</code> to expand known abbreviations</span></li>\n</ul>\n<p><code>input:date</code></p>\n<pre><code>&#x3C;input type=\"date\" name=\"\" id=\"\">\n</code></pre>\n<p><code>form:post</code></p>\n<pre><code>&#x3C;form action=\"\" method=\"post\">&#x3C;/form>\n</code></pre>\n<p><code>link:css</code></p>\n<pre><code>&#x3C;link rel=\"stylesheet\" href=\"style.css\">\n</code></pre>\n<ul>\n<li><span id=\"d43e\">Building Navbar</span></li>\n</ul>\n<p><code>.navbar>ul>li*3>a[href=#]{Item $@-}</code></p>\n<pre><code>&#x3C;div class=\"navbar\">\n  &#x3C;ul>\n    &#x3C;li>&#x3C;a href=\"#\">Item 3&#x3C;/a>&#x3C;/li>\n    &#x3C;li>&#x3C;a href=\"#\">Item 2&#x3C;/a>&#x3C;/li>\n    &#x3C;li>&#x3C;a href=\"#\">Item 1&#x3C;/a>&#x3C;/li>\n  &#x3C;/ul>\n&#x3C;/div>\n</code></pre>\n<h3>CSS</h3>\n<p>Emmet works surprisingly well with css as well.</p>\n<ul>\n<li><span id=\"68eb\"><code>f:l</code></span></li>\n</ul>\n<!-- -->\n<pre><code>float: left;\n</code></pre>\n<p>You can also use any options n/r/l</p>\n<ul>\n<li><span id=\"d9cc\"><code>pos:a­</code></span></li>\n</ul>\n<!-- -->\n<pre><code>position: absolute;\n</code></pre>\n<p>Also use any options, pos:a/r/f</p>\n<ul>\n<li><span id=\"5b67\"><code>d:n/b­/f/­i/ib</code></span></li>\n</ul>\n<p><code>d:ib</code></p>\n<pre><code>display: inline-block;\n</code></pre>\n<ul>\n<li><span id=\"26f6\">You can use <code>m</code> for margin and <code>p</code> for padding followed by direction</span></li>\n</ul>\n<p><code>mr</code> -> <code>margin-right</code></p>\n<p><code>pr</code> -> <code>padding-right</code></p>\n<ul>\n<li><span id=\"01cc\"><code>@f</code> will result in</span></li>\n</ul>\n<!-- -->\n<pre><code>@font-face {\n  font-family:;\n  src:url();\n}\n</code></pre>\n<p>You can also use these shorthands</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*h8hsUrJNyVRLYqBQP63DCA.png\" class=\"graf-image\" /></figure>#### If you found this guide helpful feel free to checkout my github/gists where I host similar content:\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--p-anchor\">bgoonz's gists · GitHub</a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://goofy-euclid-1cd736.netlify.app/\"><strong>a/A-Student-Resources</strong><br />\n<em>Edit description</em>goofy-euclid-1cd736.netlify.app</a><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/24758e628d37\">March 6, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/emmet-cheat-sheet-24758e628d37\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on May 23, 2021.</p>"},{"url":"/docs/python/python-ds/","relativePath":"docs/python/python-ds.md","relativeDir":"docs/python","base":"python-ds.md","name":"python-ds","frontmatter":{"title":"Python General Notes","weight":0,"excerpt":"Python General Notes & Resources","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Python Notes</h2>\n<table>\n<thead>\n<tr>\n<th align=\"center\"><a href=\"https://lambda-6.gitbook.io/python/\">https://lambda-6.gitbook.io/python/</a></th>\n<th align=\"left\">This Gitbook As A Website</th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n<blockquote>\n<hr>\n<p><a href=\"https://ds-unit-5-lambda.netlify.app/\"><strong><em>https://ds-unit-5-lambda.netlify.app</em></strong></a></p>\n<p><strong><em>/</em></strong></p>\n</blockquote>\n<blockquote>\n<hr>\n<p><a href=\"https://bryan-guner.gitbook.io/datastructures-in-pytho/\"><strong><em>https://bryan-guner.gitbook.io/datastructures-in-pytho/</em></strong></a></p>\n<hr>\n</blockquote>\n<blockquote>\n<hr>\n<hr>\n<p><a href=\"https://replit.com/@bgoonz/DATASTRUCPYTHONNOTES-2\"><strong><em>https://replit.com/@bgoonz/DATASTRUCPYTHONNOTES-2</em></strong></a></p>\n</blockquote>\n<p><strong>Keywords</strong>:</p>\n<pre><code class=\"language-python\">***and       del       for       is        raise\nassert    elif      from      lambda    return\nbreak     else      global    not       try\nclass     except    if        or        while\ncontinue  exec      import    pass\ndef       finally   in        print***\n</code></pre>\n<p><a href=\"https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1c25bca5-0198-42ad-aa8b-7668cb904571/py-notes.pdf\">py-notes.pdf</a></p>\n<p><a href=\"https://bryan-guner.gitbook.io/notesarchive/\">https://bryan-guner.gitbook.io/notesarchive/</a></p>\n<h2>DOCS:</h2>\n<p><a href=\"https://docs.python.org/3/\">https://docs.python.org/3/</a></p>\n<pre><code class=\"language-python\">import math\n\ndef say_hi(name):\n    \"\"\"&#x3C;---- Multi-Line Comments and Docstrings\n    This is where you put your content for help() to inform the user\n    about what your function does and how to use it\n    \"\"\"\n    print(f\"Hello {name}!\")\n\nprint(say_hi(\"Bryan\"))  # Should get the print inside the function, then None\n# Boolean Values\n# Work the same as in JS, except they are title case: True and False\na = True\nb = False\n# Logical Operators\n# ! = not, || = or, &#x26;&#x26; = and\nprint(True and True)\nprint(True and not True)\nprint(True or True)\n# Truthiness - Everything is True except...\n# False - None, False, '', [], (), set(), range(0)\n# Number Values\n# Integers are numbers without a floating decimal point\nprint(type(3))  # type returns the type of whatever argument you pass in\n# Floating Point values are numbers with a floating decimal point\nprint(type(3.5))\n# Type Casting\n# You can convert between ints and floats (along with other types...)\nprint(float(3))  # If you convert a float to an int, it will truncate the decimal\nprint(int(4.5))\nprint(type(str(3)))\n# Python does not automatically convert types like JS\n# print(17.0 + ' heyooo ' + 17)  # TypeError\n# Arithmetic Operators\n# ** - exponent (comparable to Math.pow(num, pow))\n# // - integer division\n# There is no ++ or -- in Python\n# String Values\n# We can use single quotes, double quotes, or f'' for string formats\n# We can use triple single quotes for multiline strings\nprint(\n    \"\"\"This here's a story\nAll about how\nMy life got twist\nTurned upside down\n\"\"\"\n)\n# Three double quotes can also be used, but we typically reserve these for\n# multi-line comments and function docstrings (refer to lines 6-9)(Nice :D)\n# We use len() to get the length of something\nprint(len(\"Bryan G\"))  # 7 characters\nprint(len([\"hey\", \"ho\", \"hey\", \"hey\", \"ho\"]))  # 5 list items\nprint(len({1, 2, 3, 4, 5, 6, 7, 9}))  # 8 set items\n# We can index into strings, list, etc..self.\nname = \"Bryan\"\nfor i in range(len(name)):\n    print(name[i])  # B, r, y, a, n\n# We can index starting from the end as well, with negatives\noccupation = \"Full Stack Software Engineer\"\nprint(occupation[-3])  # e\n# We can also get ranges in the index with the [start:stop:step] syntax\nprint(occupation[0:4:1])  # step and stop are optional, stop is exclusive\nprint(occupation[::4])  # beginning to end, every 4th letter\nprint(occupation[4:14:2])  # Let's get weird with it!\n# NOTE: Indexing out of range will give you an IndexError\n# We can also get the index og things with the .index() method, similar to indexOf()\nprint(occupation.index(\"Stack\"))\nprint([\"Mike\", \"Barry\", \"Cole\", \"James\", \"Mark\"].index(\"Cole\"))\n# We can count how many times a substring/item appears in something as well\nprint(occupation.count(\"S\"))\nprint(\n    \"\"\"Now this here's a story all about how\nMy life got twist turned upside down\nI forget the rest but the the the potato\nsmells like the potato\"\"\".count(\n        \"the\"\n    )\n)\n# We concatenate the same as Javascript, but we can also multiply strings\nprint(\"dog \" + \"show\")\nprint(\"ha\" * 10)\n# We can use format for a multitude of things, from spaces to decimal places\nfirst_name = \"Bryan\"\nlast_name = \"Guner\"\nprint(\"Your name is {0} {1}\".format(first_name, last_name))\n# Useful String Methods\nprint(\"Hello\".upper())  # HELLO\nprint(\"Hello\".lower())  # hello\nprint(\"HELLO\".islower())  # False\nprint(\"HELLO\".isupper())  # True\nprint(\"Hello\".startswith(\"he\"))  # False\nprint(\"Hello\".endswith(\"lo\"))  # True\nprint(\"Hello There\".split())  # [Hello, There]\nprint(\"hello1\".isalpha())  # False,  must consist only of letters\nprint(\"hello1\".isalnum())  # True, must consist of only letters and numbers\nprint(\"3215235123\".isdecimal())  # True, must be all numbers\n# True, must consist of only spaces/tabs/newlines\nprint(\"       \\\\n     \".isspace())\n# False, index 0 must be upper case and the rest lower\nprint(\"Bryan Guner\".istitle())\nprint(\"Michael Lee\".istitle())  # True!\n# Duck Typing - If it walks like a duck, and talks like a duck, it must be a duck\n# Assignment - All like JS, but there are no special keywords like let or const\na = 3\nb = a\nc = \"heyoo\"\nb = [\"reassignment\", \"is\", \"fine\", \"G!\"]\n# Comparison Operators - Python uses the same equality operators as JS, but no ===\n# &#x3C; - Less than\n# > - Greater than\n# &#x3C;= - Less than or Equal\n# >= - Greater than or Equal\n# == - Equal to\n# != - Not equal to\n# is - Refers to exact same memory location\n# not - !\n# Precedence - Negative Signs(not) are applied first(part of each number)\n#            - Multiplication and Division(and) happen next\n#            - Addition and Subtraction(or) are the last step\n#  NOTE: Be careful when using not along with ==\nprint(not a == b)  # True\n# print(a == not b) # Syntax Error\nprint(a == (not b))  # This fixes it. Answer: False\n# Python does short-circuit evaluation\n# Assignment Operators - Mostly the same as JS except Python has **= and //= (int division)\n# Flow Control Statements - if, while, for\n# Note: Python smushes 'else if' into 'elif'!\nif 10 &#x3C; 1:\n    print(\"We don't get here\")\nelif 10 &#x3C; 5:\n    print(\"Nor here...\")\nelse:\n    print(\"Hey there!\")\n# Looping over a string\nfor c in \"abcdefgh\":\n    print(c)\n# Looping over a range\nfor i in range(5):\n    print(i + 1)\n# Looping over a list\nlst = [1, 2, 3, 4]\nfor i in lst:\n    print(i)\n# Looping over a dictionary\nspam = {\"color\": \"red\", \"age\": 42, \"items\": [(1, \"hey\"), (2, \"hooo!\")]}\nfor v in spam.values():\n    print(v)\n# Loop over a list of tuples and destructuring the values\n# Assuming spam.items returns a list of tuples each containing two items (k, v)\nfor k, v in spam.items():\n    print(f\"{k}: {v}\")\n# While loops as long as the condition is True\n#  - Exit loop early with break\n#  - Exit iteration early with continue\nspam = 0\nwhile True:\n    print(\"Sike That's the wrong Numba\")\n    spam += 1\n    if spam &#x3C; 5:\n        continue\n    break\n\n# Functions - use def keyword to define a function in Python\n\ndef printCopyright():\n    print(\"Copyright 2021, Bgoonz\")\n\n# Lambdas are one liners! (Should be at least, you can use parenthesis to disobey)\ndef avg(num1, num2):\n    return print(num1 + num2)\n\navg(1, 2)\n# Calling it with keyword arguments, order does not matter\navg(num2=20, num1=1252)\nprintCopyright()\n# We can give parameters default arguments like JS\n\ndef greeting(name, saying=\"Hello\"):\n    print(saying, name)\n\ngreeting(\"Mike\")  # Hello Mike\ngreeting(\"Bryan\", saying=\"Hello there...\")\n# A common gotcha is using a mutable object for a default parameter\n# All invocations of the function reference the same mutable object\n\ndef append_item(item_name, item_list=[]):  # Will it obey and give us a new list?\n    item_list.append(item_name)\n    return item_list\n\n# Uses same item list unless otherwise stated which is counterintuitive\nprint(append_item(\"notebook\"))\nprint(append_item(\"notebook\"))\nprint(append_item(\"notebook\", []))\n# Errors - Unlike JS, if we pass the incorrect amount of arguments to a function,\n#          it will throw an error\n# avg(1)  # TypeError\n# avg(1, 2, 2) # TypeError\n# ----------------------------------- DAY 2 ----------------------------------------\n# Functions - * to get rest of position arguments as tuple\n#           - ** to get rest of keyword arguments as a dictionary\n# Variable Length positional arguments\n\ndef add(a, b, *args):\n    # args is a tuple of the rest of the arguments\n    total = a + b\n    for n in args:\n        total += n\n    return total\n\nprint(add(1, 2))  # args is None, returns 3\nprint(add(1, 2, 3, 4, 5, 6))  # args is (3, 4, 5, 6), returns 21\n# Variable Length Keyword Arguments\n\ndef print_names_and_countries(greeting, **kwargs):\n    # kwargs is a dictionary of the rest of the keyword arguments\n    for k, v in kwargs.items():\n        print(greeting, k, \"from\", v)\n\nprint_names_and_countries(\n    \"Hey there\", Monica=\"Sweden\", Mike=\"The United States\", Mark=\"China\"\n)\n# We can combine all of these together\n\ndef example2(arg1, arg2, *args, kw_1=\"cheese\", kw_2=\"horse\", **kwargs):\n    pass\n\n# Lists are mutable arrays\nempty_list = []\nroomates = [\"Beau\", \"Delynn\"]\n# List built-in function makes a list too\nspecials = list()\n# We can use 'in' to test if something is in the list, like 'includes' in JS\nprint(1 in [1, 2, 4])  # True\nprint(2 in [1, 3, 5])  # False\n# Dictionaries - Similar to JS POJO's or Map, containing key value pairs\na = {\"one\": 1, \"two\": 2, \"three\": 3}\nb = dict(one=1, two=2, three=3)\n# Can use 'in' on dictionaries too (for keys)\nprint(\"one\" in a)  # True\nprint(3 in b)  # False\n# Sets - Just like JS, unordered collection of distinct objects\nbedroom = {\"bed\", \"tv\", \"computer\", \"clothes\", \"playstation 4\"}\n# bedroom = set(\"bed\", \"tv\", \"computer\", \"clothes\", \"playstation 5\")\nschool_bag = set(\n    [\"book\", \"paper\", \"pencil\", \"pencil\", \"book\", \"book\", \"book\", \"eraser\"]\n)\nprint(school_bag)\nprint(bedroom)\n# We can use 'in' on sets as wel\nprint(1 in {1, 2, 3})  # True\nprint(4 in {1, 3, 5})  # False\n# Tuples are immutable lists of items\ntime_blocks = (\"AM\", \"PM\")\ncolors = \"red\", \"green\", \"blue\"  # Parenthesis not needed but encouraged\n# The tuple built-in function can be used to convert things to tuples\nprint(tuple(\"abc\"))\nprint(tuple([1, 2, 3]))\n# 'in' may be used on tuples as well\nprint(1 in (1, 2, 3))  # True\nprint(5 in (1, 4, 3))  # False\n# Ranges are immutable lists of numbers, often used with for loops\n#   - start - default: 0, first number in sequence\n#   - stop - required, next number past last number in sequence\n#   - step - default: 1, difference between each number in sequence\nrange1 = range(5)  # [0,1,2,3,4]\nrange2 = range(1, 5)  # [1,2,3,4]\nrange3 = range(0, 25, 5)  # [0,5,10,15,20]\nrange4 = range(0)  # []\nfor i in range1:\n    print(i)\n# Built-in functions:\n# Filter\n\ndef isOdd(num):\n    return num % 2 == 1\n\nfiltered = filter(isOdd, [1, 2, 3, 4])\nprint(list(filtered))\nfor num in filtered:\n    print(f\"first way: {num}\")\nprint(\"--\" * 20)\n[print(f\"list comprehension: {i}\")\n for i in [1, 2, 3, 4, 5, 6, 7, 8] if i % 2 == 1]\n# Map\n\ndef toUpper(str):\n    return str.upper()\n\nupperCased = map(toUpper, [\"a\", \"b\", \"c\", \"d\"])\nprint(list(upperCased))\n# Sorted\nsorted_items = sorted([\"john\", \"tom\", \"sonny\", \"Mike\"])\nprint(list(sorted_items))  # Notice uppercase comes before lowercase\n# Using a key function to control the sorting and make it case insensitive\nsorted_items = sorted([\"john\", \"tom\", \"sonny\", \"Mike\"], key=str.lower)\nprint(sorted_items)\n# You can also reverse the sort\nsorted_items = sorted([\"john\", \"tom\", \"sonny\", \"Mike\"],\n                      key=str.lower, reverse=True)\nprint(sorted_items)\n# Enumerate creates a tuple with an index for what you're enumerating\nquarters = [\"First\", \"Second\", \"Third\", \"Fourth\"]\nprint(list(enumerate(quarters)))\nprint(list(enumerate(quarters, start=1)))\n# Zip takes list and combines them as key value pairs, or really however you need\nkeys = (\"Name\", \"Email\")\nvalues = (\"Buster\", \"cheetoh@johhnydepp.com\")\nzipped = zip(keys, values)\nprint(list(zipped))\n# You can zip more than 2\nx_coords = [0, 1, 2, 3, 4]\ny_coords = [4, 6, 10, 9, 10]\nz_coords = [20, 10, 5, 9, 1]\ncoords = zip(x_coords, y_coords, z_coords)\nprint(list(coords))\n# Len reports the length of strings along with list and any other object data type\n# doing this to save myself some typing\n\ndef print_len(item):\n    return print(len(item))\n\nprint_len(\"Mike\")\nprint_len([1, 5, 2, 10, 3, 10])\nprint_len({1, 5, 10, 9, 10})  # 4 because there is a duplicate here (10)\nprint_len((1, 4, 10, 9, 20))\n# Max will return the max number in a given scenario\nprint(max(1, 2, 35, 1012, 1))\n# Min\nprint(min(1, 5, 2, 10))\nprint(min([1, 4, 7, 10]))\n# Sum\nprint(sum([1, 2, 4]))\n# Any\nprint(any([True, False, False]))\nprint(any([False, False, False]))\n# All\nprint(all([True, True, False]))\nprint(all([True, True, True]))\n# Dir returns all the attributes of an object including it's methods and dunder methods\nuser = {\"Name\": \"Bob\", \"Email\": \"bob@bob.com\"}\nprint(dir(user))\n# Importing packages and modules\n#  - Module - A Python code in a file or directory\n#  - Package - A module which is a directory containing an __init__.py file\n#  - Submodule - A module which is contained within a package\n#  - Name - An exported function, class, or variable in a module\n# Unlike JS, modules export ALL names contained within them without any special export key\n# Assuming we have the following package with four submodules\n#  math\n#  |  __init__.py\n#  | addition.py\n#  | subtraction.py\n#  | multiplication.py\n#  | division.py\n# If we peek into the addition.py file we see there's an add function\n# addition.py\n# We can import 'add' from other places because it's a 'name' and is automatically exported\n\n# def add(num1, num2):\n#     return num1 + num2\n\n# Notice the . syntax because this package can import it's own submodules.\n# Our __init__.py has the following files\n# This imports the 'add' function\n# And now it's also re-exported in here as well\n# from .addition import add\n# These import and re-export the rest of the functions from the submodule\n# from .subtraction import subtract\n# from .division import divide\n# from .multiplication import multiply\n# So if we have a script.py and want to import add, we could do it many ways\n# This will load and execute the 'math/__init__.py' file and give\n# us an object with the exported names in 'math/__init__.py'\n# print(math.add(1,2))\n# This imports JUST the add from 'math/__init__.py'\n# from math import add\n# print(add(1, 2))\n# This skips importing from 'math/__init__.py' (although it still runs)\n# and imports directly from the addition.py file\n# from math.addition import add\n# This imports all the functions individually from 'math/__init__.py'\n# from math import add, subtract, multiply, divide\n# print(add(1, 2))\n# print(subtract(2, 1))\n# This imports 'add' renames it to 'add_some_numbers'\n# from math import add as add_some_numbers\n# --------------------------------------- DAY 3 ---------------------------------------\n# Classes, Methods, and Properties\n\nclass AngryBird:\n    # Slots optimize property access and memory usage and prevent you\n    # from arbitrarily assigning new properties the instance\n    __slots__ = [\"_x\", \"_y\"]\n    # Constructor\n\n    def __init__(self, x=0, y=0):\n        # Doc String\n        \"\"\"\n        Construct a new AngryBird by setting it's position to (0, 0)\n        \"\"\"\n        # Instance Variables\n        self._x = x\n        self._y = y\n\n    # Instance Method\n\n    def move_up_by(self, delta):\n        self._y += delta\n\n    # Getter\n\n    @property\n    def x(self):\n        return self._x\n\n    # Setter\n\n    @x.setter\n    def x(self, value):\n        if value &#x3C; 0:\n            value = 0\n        self._x = value\n\n    @property\n    def y(self):\n        return self._y\n\n    @y.setter\n    def y(self, value):\n        self._y = value\n\n    # Dunder Repr... called by 'print'\n\n    def __repr__(self):\n        return f\"&#x3C;AngryBird ({self._x}, {self._y})>\"\n\n# JS to Python Classes cheat table\n#        JS                    Python\n#   constructor()         def __init__(self):\n#      super()            super().__init__()\n#   this.property           self.property\n#    this.method            self.method()\n# method(arg1, arg2){}    def method(self, arg1, ...)\n# get someProperty(){}    @property\n# set someProperty(){}    @someProperty.setter\n# List Comprehensions are a way to transform a list from one format to another\n#  - Pythonic Alternative to using map or filter\n#  - Syntax of a list comprehension\n#     - new_list = [value loop condition]\n# Using a for loop\nsquares = []\nfor i in range(10):\n    squares.append(i ** 2)\nprint(squares)\n# value = i ** 2\n# loop = for i in range(10)\nsquares = [i ** 2 for i in range(10)]\nprint(list(squares))\nsentence = \"the rocket came back from mars\"\nvowels = [character for character in sentence if character in \"aeiou\"]\nprint(vowels)\n# You can also use them on dictionaries. We can use the items() method\n# for the dictionary to loop through it getting the keys and values out at once\nperson = {\"name\": \"Corina\", \"age\": 32, \"height\": 1.4}\n# This loops through and capitalizes the first letter of all keys\nnewPerson = {key.title(): value for key, value in person.items()}\nprint(list(newPerson.items()))\n</code></pre>\n<h2><strong>2.1.7 Indentation</strong></h2>\n<p>Leading whitespace (spaces and tabs) at the beginning of a logical line is used to compute the indentation level of the line, which in turn is used to determine the grouping of statements.</p>\n<p>First, tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight (this is intended to be the same rule as used by Unix). The total number of spaces preceding the first non-blank character then determines the line's indentation. Indentation cannot be split over multiple physical lines using backslashes; the whitespace up to the first backslash determines the indentation.</p>\n<p><strong>Cross-platform compatibility note:</strong> because of the nature of text editors on non-UNIX platforms, it is unwise to use a mixture of spaces and tabs for the indentation in a single source file.</p>\n<p>A formfeed character may be present at the start of the line; it will be ignored for the indentation calculations above. Formfeed characters occurring elsewhere in the leading whitespace have an undefined effect (for instance, they may reset the space count to zero).</p>\n<p>The indentation levels of consecutive lines are used to generate INDENT and DEDENT tokens, using a stack, as follows.</p>\n<p>Before the first line of the file is read, a single zero is pushed on the stack; this will never be popped off again. The numbers pushed on the stack will always be strictly increasing from bottom to top. At the beginning of each logical line, the line's indentation level is compared to the top of the stack. If it is equal, nothing happens. If it is larger, it is pushed on the stack, and one INDENT token is generated. If it is smaller, it must be one of the numbers occurring on the stack; all numbers on the stack that are larger are popped off, and for each number popped off a DEDENT token is generated. At the end of the file, a DEDENT token is generated for each number remaining on the stack that is larger than zero.</p>\n<p>Here is an example of a correctly (though confusingly) indented piece of Python code:</p>\n<p><code>def perm(l): # Compute the list of all permutations of l if len(l) &#x3C;= 1: return [l] r = [] for i in range(len(l)): s = l[:i] + l[i+1:] p = perm(s) for x in p: r.append(l[i:i+1] + x) return r</code></p>\n<p>The following example shows various indentation errors:</p>\n<pre><code class=\"language-text\"> `def perm(l):                       # error: first line indented\nfor i in range(len(l)):             # error: not indented\n    s = l[:i] + l[i+1:]\n        p = perm(l[:i] + l[i+1:])   # error: unexpected indent\n        for x in p:\n                r.append(l[i:i+1] + x)\n            return r                # error: inconsistent dedent`\n</code></pre>\n<p>(Actually, the first three errors are detected by the parser; only the last error is found by the lexical analyzer -- the indentation of <code>return r</code> does not match a level popped off the stack.)</p>\n<p><a href=\"https://ds-unit-5-lambda.netlify.app/\">https://ds-unit-5-lambda.netlify.app/</a></p>\n<h2>Python Study Guide for a JavaScript Programmer</h2>\n<p><a href=\"https://bryanguner.medium.com/?source=post_page-----5cfdf3d2bdfb--------------------------------\">Bryan Guner</a></p>\n<p><a href=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb?source=post_page-----5cfdf3d2bdfb--------------------------------\">Mar 5</a> · 15 min read</p>\n<p><img src=\"https://miro.medium.com/max/1400/1*3V9VOfPk_hrFdbEAd3j-QQ.png\" alt=\"https://miro.medium.com/max/1400/1*3V9VOfPk_hrFdbEAd3j-QQ.png\"></p>\n<h2><strong>Applications of Tutorial &#x26; Cheat Sheet Respectivley (At Bottom Of Tutorial):</strong></h2>\n<h2><strong>Basics</strong></h2>\n<ul>\n<li><strong>PEP8</strong> : Python Enhancement Proposals, style-guide for Python.</li>\n<li><code>print</code> is the equivalent of <code>console.log</code>.</li>\n</ul>\n<blockquote>\n<p>'print() == console.log()'</p>\n</blockquote>\n<h2><code></code>** is used to make comments in your code.**</h2>\n<pre><code class=\"language-text\">def foo():\n    \"\"\"\n    The foo function does many amazing things that you\n    should not question. Just accept that it exists and\n    use it with caution.\n    \"\"\"\n    secretThing()\n</code></pre>\n<blockquote>\n<p>Python has a built in help function that let's you see a description of the source code without having to navigate to it… “-SickNasty … Autor Unknown”</p>\n</blockquote>\n<h2><strong>Numbers</strong></h2>\n<ul>\n<li>Python has three types of numbers:</li>\n<li><strong>Integer</strong></li>\n<li><strong>Positive and Negative Counting Numbers.</strong></li>\n</ul>\n<p>No Decimal Point</p>\n<blockquote>\n<p>Created by a literal non-decimal point number … or … with the int() constructor.</p>\n</blockquote>\n<pre><code class=\"language-text\">print(3) # => 3\nprint(int(19)) # => 19\nprint(int()) # => 0\n</code></pre>\n<p><strong>3. Complex Numbers</strong></p>\n<blockquote>\n<p>Consist of a real part and imaginary part.</p>\n</blockquote>\n<h3><strong>Boolean is a subtype of integer in Python.🤷‍♂️</strong></h3>\n<blockquote>\n<p>If you came from a background in JavaScript and learned to accept the premise(s) of the following meme…</p>\n</blockquote>\n<blockquote>\n<p>Than I am sure you will find the means to suspend your disbelief.</p>\n</blockquote>\n<pre><code class=\"language-text\">print(2.24) # => 2.24\nprint(2.) # => 2.0\nprint(float()) # => 0.0\nprint(27e-5) # => 0.00027\n</code></pre>\n<h2><strong>KEEP IN MIND:</strong></h2>\n<blockquote>\n<p>The i is switched to a j in programming.</p>\n</blockquote>\n<p><strong>T*</strong>his is because the letter i is common place as the de facto index for any and all enumerable entities so it just makes sense not to compete for name-<strong>space</strong> when there's another 25 letters that don't get used for every loop under the sun. My most medium apologies to Leonhard Euler.*</p>\n<pre><code class=\"language-text\">print(7j) # => 7j\nprint(5.1+7.7j)) # => 5.1+7.7j\nprint(complex(3, 5)) # => 3+5j\nprint(complex(17)) # => 17+0j\nprint(complex()) # => 0j\n</code></pre>\n<ul>\n<li><strong>Type Casting</strong> : The process of converting one number to another.</li>\n</ul>\n<pre><code class=\"language-text\"># Using Float\nprint(17)               # => 17\nprint(float(17))        # => 17.0# Using Int\nprint(17.0)             # => 17.0\nprint(int(17.0))        # => 17# Using Str\nprint(str(17.0) + ' and ' + str(17))        # => 17.0 and 17\n</code></pre>\n<p><strong>The arithmetic operators are the same between JS and Python, with two additions:</strong></p>\n<ul>\n<li><em>“**” : Double asterisk for exponent.</em></li>\n<li><em>“//” : Integer Division.</em></li>\n<li><strong>There are no spaces between math operations in Python.</strong></li>\n<li><strong>Integer Division gives the other part of the number from Module; it is a way to do round down numbers replacing <code>Math.floor()</code> in JS.</strong></li>\n<li><strong>There are no <code>++</code> and <code>-</code> in Python, the only shorthand operators are:</strong></li>\n</ul>\n<h2><strong>Strings</strong></h2>\n<ul>\n<li>Python uses both single and double quotes.</li>\n<li>You can escape strings like so <code>'Jodi asked, \"What\\\\'s up, Sam?\"'</code></li>\n<li>Multiline strings use triple quotes.</li>\n</ul>\n<pre><code class=\"language-text\">print('''My instructions are very long so to make them\nmore readable in the code I am putting them on\nmore than one line. I can even include \"quotes\"\nof any kind because they won't get confused with\nthe end of the string!''')\n</code></pre>\n<p><strong>Use the <code>len()</code> function to get the length of a string.</strong></p>\n<pre><code class=\"language-text\">print(len(“Spaghetti”)) # => 9\n</code></pre>\n<h2><strong>Python uses <code>zero-based indexing</code></strong></h2>\n<h3><strong>Python allows negative indexing (thank god!)</strong></h3>\n<pre><code class=\"language-text\">print(“Spaghetti”[-1]) # => i print(“Spaghetti”[-4]) # => e\n</code></pre>\n<ul>\n<li>Python let's you use ranges</li>\n</ul>\n<p>You can think of this as roughly equivalent to the slice method called on a JavaScript object or string… <em>(mind you that in JS … strings are wrapped in an object (under the hood)… upon which the string methods are actually called. As a immutable privative type <strong>by textbook definition</strong>, a string literal could not hope to invoke most of it's methods without violating the state it was bound to on initialization if it were not for this bit of syntactic sugar.)</em></p>\n<pre><code class=\"language-text\">print(“Spaghetti”[1:4]) # => pag\nprint(“Spaghetti”[4:-1]) # => hett\nprint(“Spaghetti”[4:4]) # => (empty string)\n</code></pre>\n<ul>\n<li>The end range is exclusive just like <code>slice</code> in JS.</li>\n</ul>\n<pre><code class=\"language-text\"># Shortcut to get from the beginning of a string to a certain index.\nprint(\"Spaghetti\"[:4])  # => Spag\nprint(\"Spaghetti\"[:-1])    # => Spaghett# Shortcut to get from a certain index to the end of a string.\nprint(\"Spaghetti\"[1:])  # => paghetti\nprint(\"Spaghetti\"[-4:])    # => etti\n</code></pre>\n<ul>\n<li>The <code>index</code> string function is the equiv. of <code>indexOf()</code> in JS</li>\n</ul>\n<pre><code class=\"language-text\">print(\"Spaghetti\".index(\"h\"))    # => 4\nprint(\"Spaghetti\".index(\"t\"))    # => 6\n</code></pre>\n<ul>\n<li>The <code>count</code> function finds out how many times a substring appears in a string… pretty nifty for a hard coded feature of the language.</li>\n</ul>\n<pre><code class=\"language-text\">print(\"Spaghetti\".count(\"h\"))    # => 1\nprint(\"Spaghetti\".count(\"t\"))    # => 2\nprint(\"Spaghetti\".count(\"s\"))    # => 0\nprint('''We choose to go to the moon in this decade and do the other things,\nnot because they are easy, but because they are hard, because that goal will\nserve to organize and measure the best of our energies and skills, because that\nchallenge is one that we are willing to accept, one we are unwilling to\npostpone, and one which we intend to win, and the others, too.\n'''.count('the '))                # => 4\n</code></pre>\n<ul>\n<li><strong>You can use <code>+</code> to concatenate strings, just like in JS.</strong></li>\n<li><strong>You can also use “*” to repeat strings or multiply strings.</strong></li>\n<li><strong>Use the <code>format()</code> function to use placeholders in a string to input values later on.</strong></li>\n</ul>\n<pre><code class=\"language-text\">first_name = \"Billy\"\nlast_name = \"Bob\"\nprint('Your name is {0} {1}'.format(first_name, last_name))  # => Your name is Billy Bob\n</code></pre>\n<ul>\n<li><em>Shorthand way to use format function is:</em><code>print(f'Your name is {first_name} {last_name}')</code></li>\n</ul>\n<h3><strong>Some useful string methods.</strong></h3>\n<ul>\n<li><strong>Note that in JS <code>join</code> is used on an Array, in Python it is used on String.</strong></li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/630/0*eE3E5H0AoqkhqK1z.png\" alt=\"https://miro.medium.com/max/630/0*eE3E5H0AoqkhqK1z.png\"></p>\n<ul>\n<li>There are also many handy testing methods.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/630/0*Q0CMqFd4PozLDFPB.png\" alt=\"https://miro.medium.com/max/630/0*Q0CMqFd4PozLDFPB.png\"></p>\n<h2><strong>Variables and Expressions</strong></h2>\n<ul>\n<li><strong>Duck-Typing</strong> : Programming Style which avoids checking an object's type to figure out what it can do.</li>\n<li>Duck Typing is the fundamental approach of Python.</li>\n<li>Assignment of a value automatically declares a variable.</li>\n</ul>\n<pre><code class=\"language-text\">a = 7\nb = 'Marbles'\nprint(a)         # => 7\nprint(b)         # => Marbles\n</code></pre>\n<ul>\n<li><strong><em>You can chain variable assignments to give multiple var names the same value.</em></strong></li>\n</ul>\n<h3><strong>Use with caution as this is highly unreadable</strong></h3>\n<pre><code class=\"language-text\">count = max = min = 0\nprint(count)           # => 0\nprint(max)             # => 0\nprint(min)             # => 0\n</code></pre>\n<h3><strong>The value and type of a variable can be re-assigned at any time.</strong></h3>\n<pre><code class=\"language-text\">a = 17\nprint(a)         # => 17\na = 'seventeen'\nprint(a)         # => seventeen\n</code></pre>\n<ul>\n<li><code>* does not exist in Python, but you can 'create' it like so:</code>*</li>\n<li><em>Python replaces <code>null</code> with <code>none</code>.</em></li>\n<li><code></code><strong>* is an object</strong> and can be directly assigned to a variable.*</li>\n</ul>\n<blockquote>\n<p>Using none is a convenient way to check to see why an action may not be operating correctly in your program.</p>\n</blockquote>\n<h2><strong>Boolean Data Type</strong></h2>\n<ul>\n<li>One of the biggest benefits of Python is that it reads more like English than JS does.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/1400/0*HQpndNhm1Z_xSoHb.png\" alt=\"https://miro.medium.com/max/1400/0*HQpndNhm1Z_xSoHb.png\"></p>\n<pre><code class=\"language-text\"># Logical AND\nprint(True and True)    # => True\nprint(True and False)   # => False\nprint(False and False)  # => False# Logical OR\nprint(True or True)     # => True\nprint(True or False)    # => True\nprint(False or False)   # => False# Logical NOT\nprint(not True)             # => False\nprint(not False and True)   # => True\nprint(not True or False)    # => False\n</code></pre>\n<ul>\n<li>By default, Python considers an object to be true UNLESS it is one of the following:</li>\n<li>Constant <code>None</code> or <code>False</code></li>\n<li>Zero of any numeric type.</li>\n<li>Empty Sequence or Collection.</li>\n<li><code>True</code> and <code>False</code> must be capitalized</li>\n</ul>\n<h2><strong>Comparison Operators</strong></h2>\n<ul>\n<li>Python uses all the same equality operators as JS.</li>\n<li>In Python, equality operators are processed from left to right.</li>\n<li>Logical operators are processed in this order:</li>\n<li><strong>NOT</strong></li>\n<li><strong>AND</strong></li>\n<li><strong>OR</strong></li>\n</ul>\n<blockquote>\n<p>Just like in JS, you can use parentheses to change the inherent order of operations.Short Circuit : Stopping a program when a true or false has been reached.</p>\n</blockquote>\n<p><img src=\"https://miro.medium.com/max/630/0*qHzGRLTOMTf30miT.png\" alt=\"https://miro.medium.com/max/630/0*qHzGRLTOMTf30miT.png\"></p>\n<h2><strong>Identity vs Equality</strong></h2>\n<p>****</p>\n<table>\n<thead>\n<tr>\n<th align=\"center\"></th>\n<th align=\"left\"></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n<pre><code class=\"language-text\">print (2 == '2')    # => False\nprint (2 is '2')    # => Falseprint (\"2\" == '2')    # => True\nprint (\"2\" is '2')    # => True# There is a distinction between the number types.\nprint (2 == 2.0)    # => True\nprint (2 is 2.0)    # => False\n</code></pre>\n<ul>\n<li>In the Python community it is better to use <code>is</code> and <code>is not</code> over <code>==</code> or <code>!=</code></li>\n</ul>\n<p><strong>If Statements</strong></p>\n<p><code>if name == 'Monica': print('Hi, Monica.')if name == 'Monica': print('Hi, Monica.')else: print('Hello, stranger.')if name == 'Monica': print('Hi, Monica.')elif age &#x3C; 12: print('You are not Monica, kiddo.')elif age > 2000: print('Unlike you, Monica is not an undead, immortal vampire.')elif age > 100: print('You are not Monica, grannie.')</code><em>Remember the order of <code>elif</code> statements matter.</em></p>\n<h2><strong>While Statements</strong></h2>\n<pre><code class=\"language-text\">spam = 0\nwhile spam &#x3C; 5:\n  print('Hello, world.')\n  spam = spam + 1\n</code></pre>\n<ul>\n<li><code>Break</code> statement also exists in Python.</li>\n</ul>\n<pre><code class=\"language-text\">spam = 0\nwhile True:\n  print('Hello, world.')\n  spam = spam + 1\n  if spam >= 5:\n    break\n</code></pre>\n<ul>\n<li>As are <code>continue</code> statements</li>\n</ul>\n<pre><code class=\"language-text\">spam = 0\nwhile True:\n  print('Hello, world.')\n  spam = spam + 1\n  if spam &#x3C; 5:\n    continue\n  break\n</code></pre>\n<h2><strong>Try/Except Statements</strong></h2>\n<ul>\n<li>Python equivalent to <code>try/catch</code></li>\n</ul>\n<pre><code class=\"language-text\">a = 321\ntry:\n    print(len(a))\nexcept:\n    print('Silently handle error here')    # Optionally include a correction to the issue\n    a = str(a)\n    print(len(a)a = '321'\ntry:\n    print(len(a))\nexcept:\n    print('Silently handle error here')    # Optionally include a correction to the issue\n    a = str(a)\n    print(len(a))\n</code></pre>\n<ul>\n<li>You can name an error to give the output more specificity.</li>\n</ul>\n<pre><code class=\"language-text\">a = 100\nb = 0\ntry:\n    c = a / b\nexcept ZeroDivisionError:\n    c = None\nprint(c)\n</code></pre>\n<ul>\n<li>You can also use the <code>pass</code> commmand to by pass a certain error.</li>\n</ul>\n<pre><code class=\"language-text\">a = 100\nb = 0\ntry:\n    print(a / b)\nexcept ZeroDivisionError:\n    pass\n</code></pre>\n<ul>\n<li>The <code>pass</code> method won't allow you to bypass every single error so you can chain an exception series like so:</li>\n</ul>\n<pre><code class=\"language-text\">a = 100\n# b = \"5\"\ntry:\n    print(a / b)\nexcept ZeroDivisionError:\n    pass\nexcept (TypeError, NameError):\n    print(\"ERROR!\")\n</code></pre>\n<ul>\n<li>You can use an <code>else</code> statement to end a chain of <code>except</code> statements.</li>\n</ul>\n<pre><code class=\"language-text\"># tuple of file names\nfiles = ('one.txt', 'two.txt', 'three.txt')# simple loop\nfor filename in files:\n    try:\n        # open the file in read mode\n        f = open(filename, 'r')\n    except OSError:\n        # handle the case where file does not exist or permission is denied\n        print('cannot open file', filename)\n    else:\n        # do stuff with the file object (f)\n        print(filename, 'opened successfully')\n        print('found', len(f.readlines()), 'lines')\n        f.close()\n</code></pre>\n<ul>\n<li><code>finally</code> is used at the end to clean up all actions under any circumstance.</li>\n</ul>\n<pre><code class=\"language-text\">def divide(x, y):\n    try:\n        result = x / y\n    except ZeroDivisionError:\n        print(\"Cannot divide by zero\")\n    else:\n        print(\"Result is\", result)\n    finally:\n        print(\"Finally...\")\n</code></pre>\n<ul>\n<li>Using duck typing to check to see if some value is able to use a certain method.</li>\n</ul>\n<pre><code class=\"language-text\"># Try a number - nothing will print out\na = 321\nif hasattr(a, '__len__'):\n    print(len(a))# Try a string - the length will print out (4 in this case)\nb = \"5555\"\nif hasattr(b, '__len__'):\n    print(len(b))\n</code></pre>\n<h2><strong>Pass</strong></h2>\n<ul>\n<li>Pass Keyword is required to write the JS equivalent of :</li>\n</ul>\n<pre><code class=\"language-text\">if (true) {\n}while (true) {}if True:\n  passwhile True:\n  pass\n</code></pre>\n<h2><strong>Functions</strong></h2>\n<ul>\n<li><strong>Function definition includes:</strong></li>\n<li><strong>The <code>def</code> keyword</strong></li>\n<li><strong>The name of the function</strong></li>\n<li><strong>A list of parameters enclosed in parentheses.</strong></li>\n<li><strong>A colon at the end of the line.</strong></li>\n<li><strong>One tab indentation for the code to run.</strong></li>\n<li><strong>You can use default parameters just like in JS</strong></li>\n</ul>\n<pre><code class=\"language-text\">def greeting(name, saying=\"Hello\"):\n    print(saying, name)greeting(\"Monica\")\n# Hello Monicagreeting(\"Barry\", \"Hey\")\n# Hey Barry\n</code></pre>\n<h3><strong>Keep in mind, default parameters must always come after regular parameters.</strong></h3>\n<pre><code class=\"language-text\"># THIS IS BAD CODE AND WILL NOT RUN\ndef increment(delta=1, value):\n    return delta + value\n</code></pre>\n<ul>\n<li><em>You can specify arguments by name without destructuring in Python.</em></li>\n</ul>\n<pre><code class=\"language-text\">def greeting(name, saying=\"Hello\"):\n    print(saying, name)# name has no default value, so just provide the value\n# saying has a default value, so use a keyword argument\ngreeting(\"Monica\", saying=\"Hi\")\n</code></pre>\n<ul>\n<li>The <code>lambda</code> keyword is used to create anonymous functions and are supposed to be <code>one-liners</code>.</li>\n</ul>\n<p><code>toUpper = lambda s: s.upper()</code></p>\n<h2><strong>Notes</strong></h2>\n<h3><strong>Formatted Strings</strong></h3>\n<blockquote>\n<p>Remember that in Python join() is called on a string with an array/list passed in as the argument.Python has a very powerful formatting engine.format() is also applied directly to strings.</p>\n</blockquote>\n<pre><code class=\"language-text\">shopping_list = ['bread','milk','eggs']\nprint(','.join(shopping_list))\n</code></pre>\n<h2><strong>Comma Thousands Separator</strong></h2>\n<pre><code class=\"language-text\">print('{:,}'.format(1234567890))\n'1,234,567,890'\n</code></pre>\n<h2><strong>Date and Time</strong></h2>\n<pre><code class=\"language-text\">d = datetime.datetime(2020, 7, 4, 12, 15, 58)\nprint('{:%Y-%m-%d %H:%M:%S}'.format(d))\n'2020-07-04 12:15:58'\n</code></pre>\n<h2><strong>Percentage</strong></h2>\n<pre><code class=\"language-text\">points = 190\ntotal = 220\nprint('Correct answers: {:.2%}'.format(points/total))\nCorrect answers: 86.36%\n</code></pre>\n<h2><strong>Data Tables</strong></h2>\n<pre><code class=\"language-text\">width=8\nprint(' decimal hex binary')\nprint('-'*27)\nfor num in range(1,16):\nfor base in 'dXb':\nprint('{0:{width}{base}}'.format(num, base=base, width=width), end=' ')\nprint()\nGetting Input from the Command Line\nPython runs synchronously, all programs and processes will stop when listening for a user input.\nThe input function shows a prompt to a user and waits for them to type 'ENTER'.\nScripts vs Programs\nProgramming Script : A set of code that runs in a linear fashion.\nThe largest difference between scripts and programs is the level of complexity and purpose. Programs typically have many UI's.\n</code></pre>\n<p>**Python can be used to display html, css, and JS.**<em>It is common to use Python as an API (Application Programming Interface)</em></p>\n<h3><strong>Structured Data</strong></h3>\n<h3><strong>Sequence : The most basic data structure in Python where the index determines the order.</strong></h3>\n<blockquote>\n<p>List-Tuple-Range-Collections : Unordered data structures, hashable values.</p>\n</blockquote>\n<h3><strong>Dictionaries-Sets-Iterable : Generic name for a sequence or collection; any object that can be iterated through.Can be mutable or immutable.Built In Data Types</strong></h3>\n<h2><strong>Lists are the python equivalent of arrays.</strong></h2>\n<pre><code class=\"language-text\">empty_list = []\ndepartments = ['HR','Development','Sales','Finance','IT','Customer Support']\n</code></pre>\n<h2><strong>You can instantiate</strong></h2>\n<pre><code class=\"language-text\">specials = list()\n</code></pre>\n<h3><strong>Test if a value is in a list.</strong></h3>\n<pre><code class=\"language-text\">print(1 in [1, 2, 3]) #> True\nprint(4 in [1, 2, 3]) #> False\n# Tuples : Very similar to lists, but they are immutable\n</code></pre>\n<h3><strong>Instantiated with parentheses</strong></h3>\n<pre><code class=\"language-text\">time_blocks = ('AM','PM')\n</code></pre>\n<h3><strong>Sometimes instantiated without</strong></h3>\n<pre><code class=\"language-text\">colors = 'red','blue','green'\nnumbers = 1, 2, 3\n</code></pre>\n<h3><strong>Tuple() built in can be used to convert other data into a tuple</strong></h3>\n<pre><code class=\"language-text\">tuple('abc') # returns ('a', 'b', 'c')\ntuple([1,2,3]) # returns (1, 2, 3)\n# Think of tuples as constant variables.\n</code></pre>\n<h3><strong>Ranges : A list of numbers which can't be changed; often used with for loops.</strong></h3>\n<p><strong>Declared using one to three parameters</strong>.</p>\n<blockquote>\n<p>Start : opt. default 0, first # in sequence.Stop : required next number past the last number in the sequence.Step : opt. default 1, difference between each number in the sequence.</p>\n</blockquote>\n<pre><code class=\"language-python\">range(5) # [0, 1, 2, 3, 4]\nrange(1,5) # [1, 2, 3, 4]\nrange(0, 25, 5) # [0, 5, 10, 15, 20]\nrange(0) # [ ]\nfor let (i = 0; i &#x3C; 5; i++)\nfor let (i = 1; i &#x3C; 5; i++)\nfor let (i = 0; i &#x3C; 25; i+=5)\nfor let(i = 0; i = 0; i++)\n# Keep in mind that stop is not included in the range.\n</code></pre>\n<h3><strong>Dictionaries : Mappable collection where a hashable value is used as a key to ref. an object stored in the dictionary.</strong></h3>\n<h3><strong>Mutable.</strong></h3>\n<pre><code class=\"language-text\">a = {'one':1, 'two':2, 'three':3}\nb = dict(one=1, two=2, three=3)\nc = dict([('two', 2), ('one', 1), ('three', 3)])\n# a, b, and c are all equal\n</code></pre>\n<p><strong><em>Declared with curly braces of the built in dict()</em></strong></p>\n<blockquote>\n<p>Benefit of dictionaries in Python is that it doesn't matter how it is defined, if the keys and values are the same the dictionaries are considered equal.</p>\n</blockquote>\n<p><strong>Use the in operator to see if a key exists in a dictionary.</strong></p>\n<p><strong>Sets : Unordered collection of distinct objects; objects that need to be hashable.</strong></p>\n<blockquote>\n<p>Always be unique, duplicate items are auto dropped from the set.</p>\n</blockquote>\n<h3><strong>Common Uses:</strong></h3>\n<blockquote>\n<p>Removing DuplicatesMembership TestingMathematical Operators: Intersection, Union, Difference, Symmetric Difference.</p>\n</blockquote>\n<p><strong>Standard Set is mutable, Python has a immutable version called frozenset.Sets created by putting comma seperated values inside braces:</strong></p>\n<pre><code class=\"language-text\">school_bag = {'book','paper','pencil','pencil','book','book','book','eraser'}\nprint(school_bag)\n</code></pre>\n<h3><strong>Also can use set constructor to automatically put it into a set.</strong></h3>\n<pre><code class=\"language-text\">letters = set('abracadabra')\nprint(letters)\n#Built-In Functions\n#Functions using iterables\n</code></pre>\n<p><strong>filter(function, iterable) : creates new iterable of the same type which includes each item for which the function returns true.</strong></p>\n<p><strong>map(function, iterable) : creates new iterable of the same type which includes the result of calling the function on every item of the iterable.</strong></p>\n<p><strong>sorted(iterable, key=None, reverse=False) : creates a new sorted list from the items in the iterable.</strong></p>\n<p><strong>Output is always a list</strong></p>\n<p><strong>key: opt function which coverts and item to a value to be compared.</strong></p>\n<p><strong>reverse: optional boolean.</strong></p>\n<p><strong>enumerate(iterable, start=0) : starts with a sequence and converts it to a series of tuples</strong></p>\n<pre><code class=\"language-text\">quarters = ['First', 'Second', 'Third', 'Fourth']\nprint(enumerate(quarters))\nprint(enumerate(quarters, start=1))\n</code></pre>\n<h3><strong>(0, 'First'), (1, 'Second'), (2, 'Third'), (3, 'Fourth')</strong></h3>\n<h3><strong>(1, 'First'), (2, 'Second'), (3, 'Third'), (4, 'Fourth')</strong></h3>\n<blockquote>\n<p>zip(*iterables) : creates a zip object filled with tuples that combine 1 to 1 the items in each provided iterable.Functions that analyze iterable</p>\n</blockquote>\n<p><strong>len(iterable) : returns the count of the number of items.</strong></p>\n<p>*<em>max(args, key=None) : returns the largest of two or more arguments.</em></p>\n<p><strong>max(iterable, key=None) : returns the largest item in the iterable.</strong></p>\n<p><em>key optional function which converts an item to a value to be compared.min works the same way as max</em></p>\n<p><strong>sum(iterable) : used with a list of numbers to generate the total.</strong></p>\n<p><em>There is a faster way to concatenate an array of strings into one string, so do not use sum for that.</em></p>\n<p><strong>any(iterable) : returns True if any items in the iterable are true.</strong></p>\n<p><strong>all(iterable) : returns True is all items in the iterable are true.</strong></p>\n<h2><strong>Working with dictionaries</strong></h2>\n<p><strong>dir(dictionary) : returns the list of keys in the dictionary.Working with sets</strong></p>\n<p>*<em>Union : The pipe | operator or union(sets) function can be used to produce a new set which is a combination of all elements in the provided set.</em></p>\n<pre><code class=\"language-text\">a = {1, 2, 3}\nb = {2, 4, 6}\nprint(a | b) # => {1, 2, 3, 4, 6}\n</code></pre>\n<h3><strong>Intersection : The &#x26; operator ca be used to produce a new set of only the elements that appear in all sets.</strong></h3>\n<pre><code class=\"language-text\">a = {1, 2, 3}\nb = {2, 4, 6}\nprint(a &#x26; b) # => {2}\nDifference : The — operator can be used to produce a new set of only the elements that appear in the first set and NOT the others.\n</code></pre>\n<p><strong>Symmetric Difference : The ^ operator can be used to produce a new set of only the elements that appear in exactly one set and not in both.</strong></p>\n<pre><code class=\"language-python\">a = {1, 2, 3}\nb = {2, 4, 6}\nprint(a — b) # => {1, 3}\nprint(b — a) # => {4, 6}\nprint(a ^ b) # => {1, 3, 4, 6}\n</code></pre>\n<h2><strong>For StatementsIn python, there is only one for loop.</strong></h2>\n<p>Always Includes:</p>\n<blockquote>\n<ol>\n<li>The for keyword2. A variable name3. The 'in' keyword4. An iterable of some kid5. A colon6. On the next line, an indented block of code called the for clause.</li>\n</ol>\n</blockquote>\n<p><strong>You can use break and continue statements inside for loops as well.</strong></p>\n<p><strong>You can use the range function as the iterable for the for loop.</strong></p>\n<pre><code class=\"language-python\">print('My name is')\nfor i in range(5):\nprint('Carlita Cinco (' + str(i) + ')')total = 0\nfor num in range(101):\ntotal += num\nprint(total)\nLooping over a list in Python\nfor c in ['a', 'b', 'c']:\nprint(c)lst = [0, 1, 2, 3]\nfor i in lst:\nprint(i)\n</code></pre>\n<p><strong><em>Common technique is to use the len() on a pre-defined list with a for loop to iterate over the indices of the list.</em></strong></p>\n<pre><code class=\"language-python\">supplies = ['pens', 'staplers', 'flame-throwers', 'binders']\nfor i in range(len(supplies)):\nprint('Index ' + str(i) + ' in supplies is: ' + supplies[i])\n</code></pre>\n<p>****</p>\n<p><strong>You can loop and destructure at the same time.</strong></p>\n<pre><code class=\"language-text\">l = 1, 2], [3, 4], [5, 6\nfor a, b in l:\nprint(a, ', ', b)\n</code></pre>\n<blockquote>\n<p>Prints 1, 2Prints 3, 4Prints 5, 6</p>\n</blockquote>\n<p><strong>You can use values() and keys() to loop over dictionaries.</strong></p>\n<pre><code class=\"language-text\">spam = {'color': 'red', 'age': 42}\nfor v in spam.values():\nprint(v)\n</code></pre>\n<p><em>Prints red</em></p>\n<p><em>Prints 42</em></p>\n<pre><code class=\"language-text\">for k in spam.keys():\nprint(k)\n</code></pre>\n<p><em>Prints color</em></p>\n<p><em>Prints age</em></p>\n<p><strong>For loops can also iterate over both keys and values.</strong></p>\n<p><strong>Getting tuples</strong></p>\n<pre><code class=\"language-text\">for i in spam.items():\nprint(i)\n</code></pre>\n<p><em>Prints ('color', 'red')</em></p>\n<p><em>Prints ('age', 42)</em></p>\n<p><em>Destructuring to values</em></p>\n<pre><code class=\"language-text\">for k, v in spam.items():\nprint('Key: ' + k + ' Value: ' + str(v))\n</code></pre>\n<p><em>Prints Key: age Value: 42</em></p>\n<p><em>Prints Key: color Value: red</em></p>\n<p><strong>Looping over string</strong></p>\n<pre><code class=\"language-text\">for c in “abcdefg”:\nprint(c)\n</code></pre>\n<p><strong>When you order arguments within a function or function call, the args need to occur in a particular order:</strong></p>\n<p><em>formal positional args.</em></p>\n<ul>\n<li>args</li>\n</ul>\n<p><em>keyword args with default values</em></p>\n<ul>\n<li>*kwargs</li>\n</ul>\n<pre><code class=\"language-text\">def example(arg_1, arg_2, *args, **kwargs):\npassdef example2(arg_1, arg_2, *args, kw_1=”shark”, kw_2=”blowfish”, **kwargs):\npass\n</code></pre>\n<h2><strong>Importing in Python</strong></h2>\n<p><strong>Modules are similar to packages in Node.js</strong>Come in different types:</p>\n<p>Built-In,</p>\n<p>Third-Party,</p>\n<p>Custom.</p>\n<p><strong>All loaded using import statements.</strong></p>\n<h2><strong>Terms</strong></h2>\n<blockquote>\n<p>module : Python code in a separate file.package : Path to a directory that contains <a href=\"http://modules.init.py\">modules.init.py</a> : Default file for a package.submodule : Another file in a module's folder.function : Function in a module.</p>\n</blockquote>\n<p><strong>A module can be any file but it is usually created by placing a special file</strong> <a href=\"http://init.py\"><strong>init.py</strong></a> <strong>into a folder. pic</strong></p>\n<p><em>Try to avoid importing with wildcards in Python.</em></p>\n<p><em>Use multiple lines for clarity when importing.</em></p>\n<pre><code class=\"language-text\">from urllib.request import (\nHTTPDefaultErrorHandler as ErrorHandler,\nHTTPRedirectHandler as RedirectHandler,\nRequest,\npathname2url,\nurl2pathname,\nurlopen,\n)\n</code></pre>\n<h2><strong>Watching Out for Python 2</strong></h2>\n<p><strong>Python 3 removed &#x3C;> and only uses !=</strong></p>\n<p><strong>format() was introduced with P3</strong></p>\n<p><strong>All strings in P3 are unicode and encoded.md5 was removed.</strong></p>\n<p><strong>ConfigParser was renamed to configparsersets were killed in favor of set() class.</strong></p>\n<h3><strong>print was a statement in P2, but is a function in P3.</strong></h3>\n<p><a href=\"https://gist.github.com/bgoonz/82154f50603f73826c27377ebaa498b5#file-python-study-guide-py\">https://gist.github.com/bgoonz/82154f50603f73826c27377ebaa498b5#file-python-study-guide-py</a></p>\n<p><a href=\"https://gist.github.com/bgoonz/282774d28326ff83d8b42ae77ab1fee3#file-python-cheatsheet-py\">https://gist.github.com/bgoonz/282774d28326ff83d8b42ae77ab1fee3#file-python-cheatsheet-py</a></p>\n<p><a href=\"https://gist.github.com/bgoonz/999163a278b987fe47fb247fd4d66904#file-python-cheat-sheet-md\">https://gist.github.com/bgoonz/999163a278b987fe47fb247fd4d66904#file-python-cheat-sheet-md</a></p>\n<p><img src=\"https://s3-us-west-2.amazonaws.com/secure.notion-static.com/be5715e2-c834-458f-8c5b-ea185717fe37/Untitled.png\" alt=\"https://s3-us-west-2.amazonaws.com/secure.notion-static.com/be5715e2-c834-458f-8c5b-ea185717fe37/Untitled.png\"></p>\n<h2>Built-in Functions</h2>"},{"url":"/docs/python/python-quiz/","relativePath":"docs/python/python-quiz.md","relativeDir":"docs/python","base":"python-quiz.md","name":"python-quiz","frontmatter":{"title":"Python Quiz","weight":0,"excerpt":"Python Quiz","seo":{"title":"Python Quiz","description":"Python Quiz cheat sheet for python developers","robots":[],"extra":[{"name":"og:image","value":"images/py-code.png","keyName":"property","relativeUrl":true},{"name":"twitter:title","value":"python cheat sheet","keyName":"name","relativeUrl":false}]},"template":"docs"},"html":"<h3>zQ1. What is an abstract class?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> An abstract class is the name for any class from which you can instantiate an object.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Abstract classes must be redefined any time an object is instantiated from them.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Abstract classes must inherit from concrete classes.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] An abstract class exists only so that other \"concrete\" classes can inherit from the abstract class.</li>\n</ul>\n<p><a href=\"https://www.geeksforgeeks.org/abstract-classes-in-python/\">reference</a></p>\n<h3>Q2. What happens when you use the build-in function <code>any()</code> on a list?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>any()</code> function will randomly return any item from the list.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The <code>any()</code> function returns True if any item in the list evaluates to True. Otherwise, it returns False.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>any()</code> function takes as arguments the list to check inside, and the item to check for. If \"any\" of the items in the list match the item to check for, the function returns True.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>any()</code> function returns a Boolean value that answers the question \"Are there any items in this list?\"</li>\n</ul>\n<p><strong>example</strong></p>\n<pre><code class=\"language-python\">if any([True, False, False, False]) == True:\n    print('Yes, there is True')\n>>> Yes, there is True\n</code></pre>\n<h3>Q3. What data structure does a binary tree degenerate to if it isn't balanced properly?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] linked list</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> queue</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> set</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> OrderedDict</li>\n</ul>\n<h3>Q4. What statement about static methods is true?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Static methods are called static because they always return <code>None</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Static methods can be bound to either a class or an instance of a class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Static methods serve mostly as utility methods or helper methods, since they can't access or modify a class's state.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Static methods can access and modify the state of a class or an instance of a class.</li>\n</ul>\n<p><a href=\"https://www.geeksforgeeks.org/class-method-vs-static-method-python\">reference</a></p>\n<h3>Q5. What are attributes?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Attributes are long-form version of an <code>if/else</code> statement, used when testing for equality between objects.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Attributes are a way to hold data or describe a state for a class or an instance of a class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Attributes are strings that describe characteristics of a class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Function arguments are called \"attributes\" in the context of class methods and instance methods.</li>\n</ul>\n<p><strong>Explanation</strong> Attributes defined under the class, arguments goes under the functions. arguments usually refer as parameter, whereas attributes are the constructor of the class or an instance of a class.</p>\n<h3>Q6. What is the term to describe this code?</h3>\n<p><code>count, fruit, price = (2, 'apple', 3.5)</code></p>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>tuple assignment</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>tuple unpacking</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>tuple matching</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>tuple duplication</code></li>\n</ul>\n<h3>Q7. What built-in list method would you use to remove items from a list?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>.delete()</code> method</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>pop(my_list)</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>del(my_list)</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>.pop()</code> method</li>\n</ul>\n<p><strong>example</strong></p>\n<pre><code class=\"language-python\">my_list = [1,2,3]\nmy_list.pop(0)\nmy_list\n>>>[2,3]\n</code></pre>\n<h3>Q8. What is one of the most common use of Python's sys library?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] to capture command-line arguments given at a file's runtime</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to connect various systems, such as connecting a web front end, an API service, a database, and a mobile app</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to take a snapshot of all the packages and libraries in your virtual environment</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to scan the health of your Python ecosystem while inside a virtual environment</li>\n</ul>\n<h3>Q9. What is the runtime of accessing a value in a dictionary by using its key?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> O(n), also called linear time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> O(log n), also called logarithmic time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> O(n^2), also called quadratic time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] O(1), also called constant time.</li>\n</ul>\n<h3>Q10. What is the correct syntax for defining a class called Game, if it inherits from a parent class called LogicGame?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>class Game(LogicGame): pass</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>def Game(LogicGame): pass</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>def Game.LogicGame(): pass</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>class Game.LogicGame(): pass</code></li>\n</ul>\n<p><strong>Explanation:</strong> <code>The parent class which is inherited is passed as an argument to the child class. Therefore, here the first option is the right answer.</code></p>\n<h3>Q11. What is the correct way to write a doctest?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    \"\"\"\n    sum(4, 3)\n    7\n\n    sum(-4, 5)\n    1\n    \"\"\"\n    return a + b\n</code></pre>\n<ul>\n<li>[✅] B</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    \"\"\"\n    >>> sum(4, 3)\n    7\n\n    >>> sum(-4, 5)\n    1\n    \"\"\"\n    return a + b\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> C</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    \"\"\"\n    # >>> sum(4, 3)\n    # 7\n\n    # >>> sum(-4, 5)\n    # 1\n    \"\"\"\n    return a + b\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> D</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    ###\n    >>> sum(4, 3)\n    7\n\n    >>> sum(-4, 5)\n    1\n    ###\n    return a + b\n</code></pre>\n<p><strong>explanation</strong> - use ''' to start the doc and add output of the cell after >>></p>\n<h3>Q12. What built-in Python data type is commonly used to represent a stack?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>set</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>list</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>None</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>dictionary</code></li>\n</ul>\n<p><code>. You can only build a stack from scratch.</code></p>\n<h3>Q13. What would this expression return?</h3>\n<pre><code class=\"language-python\">college_years = ['Freshman', 'Sophomore', 'Junior', 'Senior']\nreturn list(enumerate(college_years, 2019))\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>[('Freshman', 2019), ('Sophomore', 2020), ('Junior', 2021), ('Senior', 2022)]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>[(2019, 2020, 2021, 2022), ('Freshman', 'Sophomore', 'Junior', 'Senior')]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>[('Freshman', 'Sophomore', 'Junior', 'Senior'), (2019, 2020, 2021, 2022)]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>[(2019, 'Freshman'), (2020, 'Sophomore'), (2021, 'Junior'), (2022, 'Senior')]</code></li>\n</ul>\n<h3>Q14. How does <code>defaultdict</code> work?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>defaultdict</code> will automatically create a dictionary for you that has keys which are the integers 0-10.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>defaultdict</code> forces a dictionary to only accept keys that are of the data type specified when you created the <code>defaultdict</code> (such as strings or integers).</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] If you try to read from a <code>defaultdict</code> with a nonexistent key, a new default key-value pair will be created for you instead of throwing a <code>KeyError</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>defaultdict</code> stores a copy of a dictionary in memory that you can default to if the original gets unintentionally modified.</li>\n</ul>\n<h3>Q15. What is the correct syntax for defining a class called \"Game\", if it inherits from a parent class called \"LogicGame\"?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>class Game.LogicGame(): pass</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>def Game(LogicGame): pass</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>class Game(LogicGame): pass</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>def Game.LogicGame(): pass</code></li>\n</ul>\n<p><code>repeated but labels will be different</code></p>\n<h3>Q16. What is the purpose of the \"self\" keyword when defining or calling instance methods?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>self</code> means that no other arguments are required to be passed into the method.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> There is no real purpose for the <code>self</code> method; it's just historic computer science jargon that Python keeps to stay consistent with other programming languages.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>self</code> refers to the instance whose method was called.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>self</code> refers to the class that was inherited from to create the object using <code>self</code>.</li>\n</ul>\n<p><strong>Simple example</strong></p>\n<pre><code class=\"language-python\">class my_secrets:\n    def __init__(self, password):\n        self.password = password\n        pass\ninstance = my_secrets('1234')\ninstance.password\n>>>'1234'\n</code></pre>\n<h3>Q17. Which of these is NOT a characteristic of namedtuples?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You can assign a name to each of the <code>namedtuple</code> members and refer to them that way, similarly to how you would access keys in <code>dictionary</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Each member of a namedtuple object can be indexed to directly, just like in a regular <code>tuple</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>namedtuples</code> are just as memory efficient as regular <code>tuples</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] No import is needed to use <code>namedtuples</code> because they are available in the standard library.</li>\n</ul>\n<p>**We need to import it using <code>from collections import namedtuple</code> **</p>\n<h3>Q18. What is an instance method?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Instance methods can modify the state of an instance or the state of its parent class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Instance methods hold data related to the instance.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> An instance method is any class method that doesn't take any arguments.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> An instance method is a regular function that belongs to a class, but it must return <code>None</code>.</li>\n</ul>\n<h3>Q19. Which choice is the most syntactically correct example of the conditional branching?</h3>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">num_people = 5\n\nif num_people > 10:\n    print(\"There is a lot of people in the pool.\")\nelif num_people > 4;\n    print(\"There are some people in the pool.\")\nelif num_people > 0;\n    print(\"There are a few people in the pool.\")\nelse:\n    print(\"There is no one in the pool.\")\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">num_people = 5\n\nif num_people > 10:\n    print(\"There is a lot of people in the pool.\")\nif num_people > 4:\n    print(\"There are some people in the pool.\")\nif num_people > 0:\n    print(\"There are a few people in the pool.\")\nelse:\n    print(\"There is no one in the pool.\")\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">num_people = 5\n\nif num_people > 10:\n    print(\"There is a lot of people in the pool.\")\nelif num_people > 4:\n    print(\"There are some people in the pool.\")\nelif num_people > 0:\n    print(\"There are a few people in the pool.\")\nelse:\n    print(\"There is no one in the pool.\")\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">if num_people > 10;\n    print(\"There is a lot of people in the pool.\")\nif num_people > 4:\n    print(\"There are some people in the pool.\")\nif num_people > 0:\n    print(\"There are a few people in the pool.\")\nelse:\n    print(\"There is no one in the pool.\")\n</code></pre>\n<p>Also see Question 85 for the same question with different answers.</p>\n<h3>Q20. Which statement does NOT describe the object-oriented programming concept of encapsulation?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It protects the data from outside interference.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A parent class is encapsulated and no data from the parent class passes on to the child class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It keeps data and the methods that can manipulate that data in one place.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It only allows the data to be changed by methods.</li>\n</ul>\n<h3>Q21. What is the purpose of an if/else statement?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It tells the computer which chunk of code to run if the instructions you coded are incorrect.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It runs one chunk of code if all the imports were successful, and another chunk of code if the imports were not successful.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It tells the computer which chunk of code to run if the is enough memory to handle it, and which chunk of code to run if there is not enough memory to handle it.</li>\n</ul>\n<h3>Q22. What built-in Python data type is best suited for implementing a queue?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> dictionary</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> set</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> None. You can only build a queue from scratch.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] list</li>\n</ul>\n<h3>Q23. What is the correct syntax for instantiating a new object of the type Game?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_game = class.Game()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_game = class(Game)</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>my_game = Game()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_game = Game.create()</code></li>\n</ul>\n<h3>Q24. What does the built-in <code>map()</code> function do?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It creates a path from multiple values in an iterable to a single value.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It applies a function to each item in an iterable and returns the value of that function.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It converts a complex value type into simpler value types.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It creates a mapping between two different elements of different iterables.</li>\n</ul>\n<p><strong>Explanation:</strong> - The synax for <code>map()</code> function is <code>list(map(function,iterable)</code>. the simple area finder using map would be like this</p>\n<pre><code class=\"language-python\">import math\nradius = [1,2,3]\narea = list(map(lambda x: round(math.pi*(x**2), 2), radius))\narea\n>>> [3.14, 12.57, 28.27]\n</code></pre>\n<h3>Q25. If you don't explicitly return a value from a function, what happens?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The function will return a RuntimeError if you don't return a value.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] If the return keyword is absent, the function will return <code>None</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> If the return keyword is absent, the function will return <code>True</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The function will enter an infinite loop because it won't know when to stop executing its code.</li>\n</ul>\n<h3>Q26. What is the purpose of the <code>pass</code> statement in Python?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It is used to skip the <code>yield</code> statement of a generator and return a value of None.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It is a null operation used mainly as a placeholder in functions, classes, etc.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It is used to pass control from one statement block to another.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It is used to skip the rest of a <code>while</code> or <code>for loop</code> and return to the start of the loop.</li>\n</ul>\n<h3>Q27. What is the term used to describe items that may be passed into a function?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] arguments</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> paradigms</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> attributes</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> decorators</li>\n</ul>\n<h3>Q28. Which collection type is used to associate values with unique keys?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>slot</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>dictionary</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>queue</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>sorted list</code></li>\n</ul>\n<h3>Q29. When does a for loop stop iterating?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when it encounters an infinite loop</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when it encounters an if/else statement that contains a break keyword</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] when it has assessed each item in the iterable it is working on or a break keyword is encountered</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when the runtime for the loop exceeds O(n^2)</li>\n</ul>\n<h3>Q30. Assuming the node is in a singly linked list, what is the runtime complexity of searching for a specific node within a singly linked list?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The runtime is O(n) because in the worst case, the node you are searching for is the last node, and every node in the linked list must be visited.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The runtime is O(nk), with n representing the number of nodes and k representing the amount of time it takes to access each node in memory.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The runtime cannot be determined unless you know how many nodes are in the singly linked list.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The runtime is O(1) because you can index directly to a node in a singly linked list.</li>\n</ul>\n<h3>Q31. Given the following three list, how would you create a new list that matches the desired output printed below?</h3>\n<pre><code class=\"language-python\">fruits = ['Apples', 'Oranges', 'Bananas']\nquantities = [5, 3, 4]\nprices = [1.50, 2.25, 0.89]\n\n#Desired output\n[('Apples', 5, 1.50),\n('Oranges', 3, 2.25),\n('Bananas', 4, 0.89)]\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">output = []\n\nfruit_tuple_0 = (first[0], quantities[0], price[0])\noutput.append(fruit_tuple)\n\nfruit_tuple_1 = (first[1], quantities[1], price[1])\noutput.append(fruit_tuple)\n\nfruit_tuple_2 = (first[2], quantities[2], price[2])\noutput.append(fruit_tuple)\n\nreturn output\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">i = 0\noutput = []\nfor fruit in fruits:\n    temp_qty = quantities[i]\n    temp_price = prices[i]\n    output.append((fruit, temp_qty, temp_price))\n    i += 1\nreturn output\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">groceries = zip(fruits, quantities, prices)\nreturn groceries\n\n>>> [\n('Apples', 5, 1.50),\n('Oranges', 3, 2.25),\n('Bananas', 4, 0.89)\n]\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">i = 0\noutput = []\nfor fruit in fruits:\n    for qty in quantities:\n        for price in prices:\n            output.append((fruit, qty, price))\n    i += 1\nreturn output\n</code></pre>\n<h3>Q32. What happens when you use the built-in function all() on a list?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>all()</code> function returns a Boolean value that answers the question \"Are all the items in this list the same?</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>all()</code> function returns True if all the items in the list can be converted to strings. Otherwise, it returns False.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>all()</code> function will return all the values in the list.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The <code>all()</code> function returns True if all items in the list evaluate to True. Otherwise, it returns False.</li>\n</ul>\n<p><strong>Explaination</strong> - <code>all()</code> returns true if all in the list are True, see example below</p>\n<pre><code class=\"language-python\">test = [True,False,False,False]\nif all(test) is True:\n    print('Yeah all are True')\nelse:\n    print('There is an imposter')\n>>> There is an imposter\n</code></pre>\n<h3>Q33. What is the correct syntax for calling an instance method on a class named Game?</h3>\n<p><em>(Answer format may vary. Game and roll (or dice\\</em>roll) should each be called with no parameters.)_</p>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">>>> dice = Game()\n>>> dice.roll()\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">>>> dice = Game(self)\n>>> dice.roll(self)\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">>>> dice = Game()\n>>> dice.roll(self)\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">>>> dice = Game(self)\n>>> dice.roll()\n</code></pre>\n<h3>Q34. What is the algorithmic paradigm of quick sort?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> backtracking</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> dynamic programming</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> decrease and conquer</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] divide and conquer</li>\n</ul>\n<h3>Q35. What is runtime complexity of the list's built-in <code>.append()</code> method?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] O(1), also called constant time</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> O(log n), also called logarithmic time</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> O(n^2), also called quadratic time</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> O(n), also called linear time</li>\n</ul>\n<h3>Q36. What is key difference between a <code>set</code> and a <code>list</code>?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A set is an ordered collection unique items. A list is an unordered collection of non-unique items.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Elements can be retrieved from a list but they cannot be retrieved from a set.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A set is an ordered collection of non-unique items. A list is an unordered collection of unique items.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A set is an unordered collection unique items. A list is an ordered collection of non-unique items.</li>\n</ul>\n<h3>Q37. What is the definition of abstraction as applied to object-oriented Python?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Abstraction means that a different style of code can be used, since many details are already known to the program behind the scenes.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Abstraction means the implementation is hidden from the user, and only the relevant data or information is shown.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Abstraction means that the data and the functionality of a class are combined into one entity.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Abstraction means that a class can inherit from more than one parent class.</li>\n</ul>\n<h3>Q38. What does this function print?</h3>\n<pre><code class=\"language-python\">def print_alpha_nums(abc_list, num_list):\n    for char in abc_list:\n        for num in num_list:\n            print(char, num)\n    return\n\nprint_alpha_nums(['a', 'b', 'c'], [1, 2, 3])\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">a 1\na 2\na 3\nb 1\nb 2\nb 3\nc 1\nc 2\nc 3\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">['a', 'b', 'c'], [1, 2, 3]\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">aaa\nbbb\nccc\n111\n222\n333\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">a 1 2 3\nb 1 2 3\nc 1 2 3\n</code></pre>\n<h3>Q39. Correct representation of doctest for function in Python</h3>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    # a = 1\n    # b = 2\n    # sum(a, b) = 3\n\n    return a + b\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    \"\"\"\n    a = 1\n    b = 2\n    sum(a, b) = 3\n    \"\"\"\n\n    return a + b\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    \"\"\"\n    >>> a = 1\n    >>> b = 2\n    >>> sum(a, b)\n    3\n    \"\"\"\n\n    return a + b\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def sum(a, b):\n    '''\n    a = 1\n    b = 2\n    sum(a, b) = 3\n    '''\n    return a + b\n</code></pre>\n<p><strong>Explanation:</strong> Use \"\"\" to start and end the docstring and use >>> to represent the output. If you write this correctly you can also run the doctest using build-in doctest module</p>\n<h3>Q40. Suppose a Game class inherits from two parent classes: BoardGame and LogicGame. Which statement is true about the methods of an object instantiated from the Game class?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> When instantiating an object, the object doesn't inherit any of the parent class's methods.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> When instantiating an object, the object will inherit the methods of whichever parent class has more methods.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> When instantiating an object, the programmer must specify which parent class to inherit methods from.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] An instance of the Game class will inherit whatever methods the BoardGame and LogicGame classes have.</li>\n</ul>\n<h3>Q41. What does calling namedtuple on a collection type return?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a generic object class with iterable parameter fields</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a generic object class with non-iterable named fields</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a tuple subclass with non-iterable parameter fields</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a tuple subclass with iterable named fields</li>\n</ul>\n<p><strong>Example</strong></p>\n<pre><code class=\"language-python\">import math\nradius = [1,2,3]\narea = list(map(lambda x: round(math.pi*(x**2), 2), radius))\narea\n>>> [3.14, 12.57, 28.27]\n</code></pre>\n<h3>Q42. What symbol(s) do you use to assess equality between two elements?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x26;&#x26;</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>=</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>==</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>||</code></li>\n</ul>\n<h3>Q43. Review the code below. What is the correct syntax for changing the price to 1.5?</h3>\n<pre><code class=\"language-python\">fruit_info = {\n  'fruit': 'apple',\n  'count': 2,\n  'price': 3.5\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>fruit_info ['price'] = 1.5</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_list [3.5] = 1.5</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>1.5 = fruit_info ['price]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_list['price'] == 1.5</code></li>\n</ul>\n<h3>Q44. What value would be returned by this check for equality?</h3>\n<p><code>5 != 6</code></p>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>yes</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>False</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>True</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>None</code></li>\n</ul>\n<p><strong>Explanation</strong> - <code>!=</code> is equivalent to <strong>not equal to</strong> in python</p>\n<h3>Q45. What does a class's <code>init()</code> method do?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>__init__</code> method makes classes aware of each other if more than one class is defined in a single code file.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The<code>__init__</code> method is included to preserve backwards compatibility from Python 3 to Python 2, but no longer needs to be used in Python 3.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The <code>__init__</code> method is a constructor method that is called automatically whenever a new object is created from a class. It sets the initial state of a new object.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>__init__</code> method initializes any imports you may have included at the top of your file.</li>\n</ul>\n<p><strong>Example:</strong></p>\n<pre><code class=\"language-python\">class test:\n    def __init__(self):\n        print('I came here without your permission lol')\n        pass\nt1 = test()\n>>> 'I came here without your permission lol'\n</code></pre>\n<h3>Q46. What is meant by the phrase \"space complexity\"?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>How many microprocessors it would take to run your code in less than one second</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>How many lines of code are in your code file</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>The amount of space taken up in memory as a function of the input size</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>How many copies of the code file could fit in 1 GB of memory</code></li>\n</ul>\n<h3>Q47. What is the correct syntax for creating a variable that is bound to a dictionary?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>fruit_info = {'fruit': 'apple', 'count': 2, 'price': 3.5}</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_info =('fruit': 'apple', 'count': 2,'price': 3.5 ).dict()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_info = ['fruit': 'apple', 'count': 2,'price': 3.5 ].dict()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_info = to_dict('fruit': 'apple', 'count': 2, 'price': 3.5)</code></li>\n</ul>\n<h3>Q48. What is the proper way to write a list comprehension that represents all the keys in this dictionary?</h3>\n<p><code>fruits = {'Apples': 5, 'Oranges': 3, 'Bananas': 4}</code></p>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_names = [x in fruits.keys() for x]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_names = for x in fruits.keys() *</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>fruit_names = [x for x in fruits.keys()]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_names = x for x in fruits.keys()</code></li>\n</ul>\n<h3>Q49. What is the purpose of the <code>self</code> keyword when defining or calling methods on an instance of an object?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>self</code> refers to the class that was inherited from to create the object using <code>self</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> There is no real purpose for the <code>self</code> method. It's just legacy computer science jargon that Python keeps to stay consistent with other programming languages.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>self</code> means that no other arguments are required to be passed into the method.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>self</code> refers to the instance whose method was called.</li>\n</ul>\n<p><strong>Explanation:</strong> - Try running the example of the Q45 without passing <code>self</code> argument inside the <code>__init__</code>, you'll understand the reason. You'll get the error like this <code>__init__() takes 0 positional arguments but 1 was given</code>, this means that something is going inside even if haven't specified, which is instance itself.</p>\n<h3>Q50. What statement about the class methods is true?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A class method is a regular function that belongs to a class, but it must return None.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A class method can modify the state of the class, but they can't directly modify the state of an instance that inherits from that class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A class method is similar to a regular function, but a class method doesn't take any arguments.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A class method hold all of the data for a particular class.</li>\n</ul>\n<h3>Q51. What does it mean for a function to have linear runtime?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You did not use very many advanced computer programming concepts in your code.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The difficulty level your code is written at is not that high.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It will take your program less than half a second to run.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The amount of time it takes the function to complete grows linearly as the input size increases.</li>\n</ul>\n<h3>Q52. What is the proper way to define a function?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>def getMaxNum(list_of_nums): # body of function goes here</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>func get_max_num(list_of_nums): # body of function goes here</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>func getMaxNum(list_of_nums): # body of function goes here</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>def get_max_num(list_of_nums): # body of function goes here</code></li>\n</ul>\n<p><a href=\"https://www.python.org/dev/peps/pep-0008/\">explanation for 52 &#x26; 53</a></p>\n<h3>Q53. According to the PEP 8 coding style guidelines, how should constant values be named in Python?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> in camel case without using underscores to separate words -- e.g. <code>maxValue = 255</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> in lowercase with underscores to separate words -- e.g. <code>max_value = 255</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] in all caps with underscores separating words -- e.g. <code>MAX_VALUE = 255</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> in mixed case without using underscores to separate words -- e.g. <code>MaxValue = 255</code></li>\n</ul>\n<h3>Q54. Describe the functionality of a deque.</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A deque adds items to one side and remove items from the other side.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A deque adds items to either or both sides, but only removes items from the top.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A deque adds items at either or both ends, and remove items at either or both ends.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A deque adds items only to the top, but remove from either or both sides.</li>\n</ul>\n<p><strong>Explanation</strong> - <code>deque</code> is used to create block chanin and in that there is <em>first in first out</em> approch, which means the last element to enter will be the first to leave.</p>\n<h3>Q55. What is the correct syntax for creating a variable that is bound to a set?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>my_set = {0, 'apple', 3.5}</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_set = to_set(0, 'apple', 3.5)</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_set = (0, 'apple', 3.5).to_set()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>my_set = (0, 'apple', 3.5).set()</code></li>\n</ul>\n<h3>Q56. What is the correct syntax for defining an <code>__init__()</code> method that takes no parameters?</h3>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">class __init__(self):\n    pass\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def __init__():\n    pass\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">class __init__():\n    pass\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">def __init__(self):\n    pass\n</code></pre>\n<h3>Q57. Which of the following is TRUE About how numeric data would be organised in a binary Search tree?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] For any given Node in a binary Search Tree, the child node to the left is less than the value of the given node and the child node to its right is greater than the given node.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Binary Search Tree cannot be used to organize and search through numeric data, given the complication that arise with very deep trees.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The top node of the binary search tree would be an arbitrary number. All the nodes to the left of the top node need to be less than the top node's number, but they don't need to ordered in any particular way.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The smallest numeric value would go in the top most node. The next highest number would go in its left child node, the the next highest number after that would go in its right child node. This pattern would continue until all numeric values were in their own node.</li>\n</ul>\n<h3>Q58. Why would you use a decorator?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A decorator is similar to a class and should be used if you are doing functional programming instead of object oriented programming.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A decorator is a visual indicator to someone reading your code that a portion of your code is critical and should not be changed.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] You use the decorator to alter the functionality of a function without having to modify the functions code.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> An import statement is preceded by a decorator, python knows to import the most recent version of whatever package or library is being imported.</li>\n</ul>\n<h3>Q59. When would you use a for loop?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Only in some situations, as loops are used only for certain type of programming.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] When you need to check every element in an iterable of known length.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> When you want to minimize the use of strings in your code.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> When you want to run code in one file for a function in another file.</li>\n</ul>\n<h3>Q60. What is the most self-descriptive way to define a function that calculates sales tax on a purchase?</h3>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def tax(my_float):\n    '''Calculates the sales tax of a purchase. Takes in a float representing the subtotal as an argument and returns a float representing the sales tax.'''\n    pass\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def tx(amt):\n    '''Gets the tax on an amount.'''\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def sales_tax(amount):\n    '''Calculates the sales tax of a purchase. Takes in a float representing the subtotal as an argument and returns a float representing the sales tax.'''\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">def calculate_sales_tax(subtotal):\n    pass\n</code></pre>\n<h3>Q61. What would happen if you did not alter the state of the element that an algorithm is operating on recursively?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You do not have to alter the state of the element the algorithm is recursing on.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You would eventually get a KeyError when the recursive portion of the code ran out of items to recurse on.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] You would get a RuntimeError: maximum recursion depth exceeded.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The function using recursion would return None.</li>\n</ul>\n<p><a href=\"https://www.python-course.eu/python3_recursive_functions.php#Definition-of-Recursion\">explanation</a></p>\n<h3>Q62. What is the runtime complexity of searching for an item in a binary search tree?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The runtime for searching in a binary search tree is O(1) because each node acts as a key, similar to a dictionary.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The runtime for searching in a binary search tree is O(n!) because every node must be compared to every other node.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The runtime for searching in a binary search tree is generally O(h), where h is the height of the tree.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The runtime for searching in a binary search tree is O(n) because every node in the tree must be visited.</li>\n</ul>\n<p><a href=\"https://www.geeksforgeeks.org/binary-search-tree-data-structure/\">explanation</a></p>\n<h3>Q63. Why would you use <code>mixin</code>?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You use a <code>mixin</code> to force a function to accept an argument at runtime even if the argument wasn't included in the function's definition.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You use a <code>mixin</code> to allow a decorator to accept keyword arguments.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You use a <code>mixin</code> to make sure that a class's attributes and methods don't interfere with global variables and functions.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] If you have many classes that all need to have the same functionality, you'd use a <code>mixin</code> to define that functionality.</li>\n</ul>\n<p><a href=\"https://www.youtube.com/watch?v=zVFLBfqV-q0\">explanation</a></p>\n<h3>Q64. What is the runtime complexity of adding an item to a stack and removing an item from a stack?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add items to a stack in O(1) time and remove items from a stack on O(n) time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Add items to a stack in O(1) time and remove items from a stack in O(1) time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add items to a stack in O(n) time and remove items from a stack on O(1) time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add items to a stack in O(n) time and remove items from a stack on O(n) time.</li>\n</ul>\n<h3>Q65. Which statement accurately describes how items are added to and removed from a stack?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a stacks adds items to one side and removes items from the other side.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a stacks adds items to the top and removes items from the top.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a stacks adds items to the top and removes items from anywhere in the stack.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a stacks adds items to either end and removes items from either end.</li>\n</ul>\n<p><strong>Explanation</strong> Stack uses the <em>first in first out</em> approach</p>\n<h3>Q66. What is a base case in a recursive function?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A base case is the condition that allows the algorithm to stop recursing. It is usually a problem that is small enough to solve directly.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The base case is summary of the overall problem that needs to be solved.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The base case is passed in as an argument to a function whose body makes use of recursion.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The base case is similar to a base class, in that it can be inherited by another object.</li>\n</ul>\n<h3>Q67. Why is it considered good practice to open a file from within a Python script by using the <code>with</code> keyword?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>with</code> keyword lets you choose which application to open the file in.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>with</code> keyword acts like a <code>for</code> loop, and lets you access each line in the file one by one.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> There is no benefit to using the <code>with</code> keyword for opening a file in Python.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] When you open a file using the <code>with</code> keyword in Python, Python will make sure the file gets closed, even if an exception or error is thrown.</li>\n</ul>\n<p><a href=\"https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files\">explanation</a></p>\n<h3>Q68. Why would you use a virtual environment?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Virtual environments create a \"bubble\" around your project so that any libraries or packages you install within it don't affect your entire machine.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Teams with remote employees use virtual environments so they can share code, do code reviews, and collaborate remotely.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Virtual environments were common in Python 2 because they augmented missing features in the language. Virtual environments are not necessary in Python 3 due to advancements in the language.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Virtual environments are tied to your GitHub or Bitbucket account, allowing you to access any of your repos virtually from any machine.</li>\n</ul>\n<h3>Q69. What is the correct way to run all the doctests in a given file from the command line?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] python3 -m doctest &#x3C;<em>filename</em>></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> python3 &#x3C;<em>filename</em>></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> python3 &#x3C;<em>filename</em>> rundoctests</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> python3 doctest</li>\n</ul>\n<p><a href=\"https://www.youtube.com/watch?v=P8qm0VAbbww&#x26;t=180s\">tutorial video</a></p>\n<h3>Q70. What is a lambda function ?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> any function that makes use of scientific or mathematical constants, often represented by Greek letters in academic writing</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a function that get executed when decorators are used</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> any function whose definition is contained within five lines of code or fewer</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a small, anonymous function that can take any number of arguments but has only expression to evaluate</li>\n</ul>\n<p><a href=\"https://www.guru99.com/python-lambda-function.html\">Reference</a></p>\n<p><strong>Explanation:</strong> <code>the lambda notation is basically an anonymous function that can take any number of arguments with only single expression (i.e, cannot be overloaded). It has been introducted in other programming languages, such as C++ and Java. The lambda notation allows programmers to \"bypass\" function declaration.</code></p>\n<h3>Q71. What is the primary difference between lists and tuples?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You can access a specifc element in a list by indexing to its position, but you cannot access a specific element in a tuple unless you iterate through the tuple</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Lists are mutable, meaning you can change the data that is inside them at any time. Tuples are immutable, meaning you cannot change the data that is inside them once you have created the tuple.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Lists are immutable, meaning you cannot change the data that is inside them once you have created the list. Tuples are mutable, meaning you can change the data that is inside them at any time.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Lists can hold several data types inside them at once, but tuples can only hold the same data type if multiple elements are present.</li>\n</ul>\n<h3>Q72. Which statement about static method is true?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Static methods can be bound to either a class or an instance of a class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Static methods can access and modify the state of a class or an instance of a class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Static methods serve mostly as utility or helper methods, since they cannot access or modify a class's state.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Static methods are called static because they always return None.</li>\n</ul>\n<h3>Q73. What does a generator return?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> None</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] An iterable object</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A linked list data structure from a non-empty list</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> All the keys of the given dictionary</li>\n</ul>\n<h3>Q74. What is the difference between class attributes and instance attributes?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Instance attributes can be changed, but class attributes cannot be changed</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Class attributes are shared by all instances of the class. Instance attributes may be unique to just that instance</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> There is no difference between class attributes and instance attributes</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Class attributes belong just to the class, not to instance of that class. Instance attributes are shared among all instances of a class</li>\n</ul>\n<h3>Q75. What is the correct syntax of creating an instance method?</h3>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def get_next_card():\n  # method body goes here\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">def get_next_card(self):\n  # method body goes here\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def self.get_next_card():\n  # method body goes here\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def self.get_next_card(self):\n  # method body goes here\n</code></pre>\n<h3>Q76. What is the correct way to call a function?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] get_max_num([57, 99, 31, 18])</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> call.(get_max_num)</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> def get_max_num([57, 99, 31, 18])</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> call.get_max_num([57, 99, 31, 18])</li>\n</ul>\n<h3>Q77. How is comment created?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>-- This is a comment</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code># This is a comment</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>/_ This is a comment _\\</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>// This is a comment</code></li>\n</ul>\n<h3>Q78. What is the correct syntax for replacing the string apple in the list with the string orange?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> orange = my_list[1]</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] my_list[1] = 'orange'</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> my_list['orange'] = 1</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> my_list[1] == orange</li>\n</ul>\n<h3>Q79. What will happen if you use a while loop and forget to include logic that eventually causes the while loop to stop?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Nothing will happen; your computer knows when to stop running the code in the while loop.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You will get a KeyError.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Your code will get stuck in an infinite loop.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> You will get a WhileLoopError.</li>\n</ul>\n<h3>Q80. Describe the functionality of a queue?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A queue adds items to either end and removes items from either end.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A queue adds items to the top and removes items from the top.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A queue adds items to the top, and removes items from anywhere in, a list.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A queue adds items to the top and removes items from anywhere in the queue.</li>\n</ul>\n<h3>Q81. Which choice is the most syntactically correct example of the conditional branching?</h3>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">num_people = 5\n\nif num_people > 10:\n    print(\"There is a lot of people in the pool.\")\nelif num_people > 4:\n    print(\"There are some people in the pool.\")\nelse:\n    print(\"There is no one in the pool.\")\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">num_people = 5\n\nif num_people > 10:\n    print(\"There is a lot of people in the pool.\")\nif num_people > 4:\n    print(\"There are some people in the pool.\")\nelse:\n    print(\"There is no one in the pool.\")\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">num_people = 5\n\nif num_people > 10;\n    print(\"There is a lot of people in the pool.\")\nelif num_people > 4;\n    print(\"There are some people in the pool.\")\nelse;\n    print(\"There is no one in the pool.\")\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">if num_people > 10;\n    print(\"There is a lot of people in the pool.\")\nif num_people > 4;\n    print(\"There are some people in the pool.\")\nelse;\n    print(\"There is no one in the pool.\")\n</code></pre>\n<p>This question seems to be an updated version of Question 19.</p>\n<h3>Q82. How does <code>defaultdict</code> work?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>defaultdict</code> will automatically create a dictionary for you that has keys which are the integers 0-10.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>defaultdict</code> forces a dictionary to only accept keys that are of the types specified when you created the <code>defaultdict</code> (such as strings or integers).</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] If you try to read from a <code>defaultdict</code> with a nonexistent key, a new default key-value pair will be created for you instead of throwing a <code>KeyError</code>.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>defaultdict</code> stores a copy of a dictionary in memory that you can default to if the original gets unintentionally modified.</li>\n</ul>\n<p>Updated version of Question 14.</p>\n<h3>Q83. What is the correct syntax for adding a key called <code>variety</code> to the <code>fruit_info</code> dictionary that has a value of <code>Red Delicious</code>?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>fruit_info['variety'] == 'Red Delicious'</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>fruit_info['variety'] = 'Red Delicious'</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>red_delicious = fruit_info['variety']</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>red_delicious == fruit_info['variety']</code></li>\n</ul>\n<h3>Q84. When would you use a <code>while</code> loop?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you want to minimize the use of strings in your code</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you want to run code in one file while code in another file is also running</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] when you want some code to continue running as long as some condition is true</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you need to run two or more chunks of code at once within the same file</li>\n</ul>\n<p><strong>Simple Example</strong></p>\n<pre><code class=\"language-python\">i = 1\nwhile i&#x3C;6:\n    print('Countdown:',i)\n    i = i + 1\n</code></pre>\n<h3>Q85. What is the correct syntax for defining an <code>__init__()</code> method that sets instance-specific attributes upon creation of a new class instance?</h3>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def __init__(self, attr1, attr2):\n    attr1 = attr1\n    attr2 = attr2\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def __init__(attr1, attr2):\n    attr1 = attr1\n    attr2 = attr2\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">def __init__(self, attr1, attr2):\n    self.attr1 = attr1\n    self.attr2 = attr2\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">def __init__(attr1, attr2):\n    self.attr1 = attr1\n    self.attr2 = attr2\n</code></pre>\n<p><strong>Explanation</strong>: When instantiating a new object from a given class, the <code>__init__()</code> method will take both <code>attr1</code> and <code>attr2</code>, and set its values to their corresponding object attribute, that's why the need of using <code>self.attr1 = attr1</code> instead of <code>attr1 = attr1</code>.</p>\n<h3>Q86. What would this recursive function print if it is called with no parameters?</h3>\n<pre><code class=\"language-python\">def count_recursive(n=1):\n    if n > 3:\n        return\n    print(n)\n\ncount_recursive(n + 1)\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">1\n1\n2\n2\n3\n3\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">3\n2\n1\n</code></pre>\n<ul>\n<li>[ ]</li>\n</ul>\n<pre><code class=\"language-python\">3\n3\n2\n2\n1\n1\n</code></pre>\n<ul>\n<li>[✅]</li>\n</ul>\n<pre><code class=\"language-python\">1\n2\n3\n</code></pre>\n<h3>Q87. In Python, when using sets, you use <strong>_ to calculate the intersection between two sets and _</strong> to calculate the union.</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>Intersect;union</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> |; &#x26;</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] &#x26;; |</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> &#x26;&#x26;; ||</li>\n</ul>\n<h3>Q88. What will this code fragment return?</h3>\n<pre><code class=\"language-python\">import numpy as np\nnp.ones([1,2,3,4,5])\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It returns a 5x5 matric; each row will have the values 1,2,3,4,5.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It returns an array with the values 1,2,3,4,5</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It returns five different square matrices filled with ones. The first is 1x1, the second 2x2, and so on to 5x5</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It returns a 5-dimensional array of size 1x2x3x4x5 filled with 1s.</li>\n</ul>\n<p><a href=\"https://www.geeksforgeeks.org/numpy-ones-python/\">Reference</a></p>\n<h3>Q89. You encounter a FileNotFoundException while using just the filename in the <code>open</code> function. What might be the easiest solution?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Make sure the file is on the system PATH</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Create a symbolic link to allow better access to the file</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Copy the file to the same directory as where the script is running from</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add the path to the file to the PYTHONPATH environment variable</li>\n</ul>\n<h3>Q90. what will this command return?</h3>\n<pre><code class=\"language-python\">{x for x in range(100) if x%3 == 0}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a set of all the multiples of 3 less then 100</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a set of all the number from 0 to 100 multiplied by 3</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a list of all the multiples of 3 less then 100</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a set of all the multiples of 3 less then 100 excluding 0</li>\n</ul>\n<h3>Q91. What does the // operator in Python 3 allow you to do?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Perform integer division</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Perform operations on exponents</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Find the remainder of a division operation</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Perform floating point division</li>\n</ul>\n<h3>Q92. This code provides the _ of the list of numbers</h3>\n<pre><code class=\"language-python\">num_list = [21,13,19,3,11,5,18]\nnum_list.sort()\nnum_list[len(num_list)//2]\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> mean</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> mode</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] median</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> average</li>\n</ul>\n<h3>Q93. Which statement about the class methods is true?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A class method holds all of the data for a particular class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A class method can modify the state of the class, but it cannot directly modify the state of an instance that inherits from that class.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A class method is a regular function that belongs to a class, but it must return None</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A class method is similar to a regular function, but a class method does not take any arguments.</li>\n</ul>\n<h3>Q94. What file is imported to use dates in python?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] datetime</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> dateday</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> daytime</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> timedate</li>\n</ul>\n<h3>Q95. What is the correct syntax for defining a class called Game?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> def Game(): pass</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> def Game: pass</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] class Game: pass</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> class Game(): pass</li>\n</ul>\n<p><a href=\"https://docs.python.org/3/tutorial/classes.html\">reference here</a></p>\n<h3>Q96. What does a class's init() method do?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <strong>init</strong> method makes classes aware of each other if more than one class is defined in a single code file.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <strong>init</strong> method is included to preserve backward compatibility from Python 3 to Python 2, but no longer needs to be used in Python 3.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The <strong>init</strong> method is a constructor method that is called automatically whenever a new object is created from a class. It sets the initial state of a new object.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <strong>init</strong> method initializes any imports you may have included at the top of your file.</li>\n</ul>\n<p><a href=\"https://stackoverflow.com/questions/625083/what-init-and-self-do-in-python\">reference here</a></p>\n<h3>Q97. What is the correct syntax for calling an instance method on a class named Game?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> my_game = Game(self) self.my_game.roll_dice()</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] my_game = Game() self.my_game.roll_dice()</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> my_game = Game() my_game.roll_dice()</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> my_game = Game(self) my_game.roll_dice(self)</li>\n</ul>\n<h3>Q98. What is the output of this code? (NumPy has been imported as np.)?</h3>\n<pre><code>a = np.array([1,2,3,4])\nprint(a[[False, True, False, False]])\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> {0,2}</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] [2]</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> {2}</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [0,2,0,0]</li>\n</ul>\n<h3>Q99. Suppose you have a string variable defined as y=”stuff;thing;junk;”. What would be the output from this code?</h3>\n<pre><code>Z = y.split(‘;’)\nlen(z)\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> 17</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] 4</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> 0</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> 3</li>\n</ul>\n<p>explanation:</p>\n<pre><code>y=”stuff;thing;junk”\n    len(z) ==> 3\n\ny=”stuff;thing;junk;”\n    len(z) ==> 4\n</code></pre>\n<h3>Q100. What is the output of this code?</h3>\n<pre><code>num_list = [1,2,3,4,5]\nnum_list.remove(2)\nprint(num_list)\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [1,2,4,5]</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] [1,3,4,5]</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [3,4,5]</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [1,2,3]</li>\n</ul>\n<p>explanation:</p>\n<pre><code>num_list = [1,2,3,4,5]\n\nnum_list.pop(2)\n    [1,2,4,5]\n\nnum_list.remove(2)\n    [1,3,4,5]\n</code></pre>\n<h3>Q101. What is the correct syntax for creating an instance method?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> def get_next_card(): # method body goes here</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> def self.get_next_card(): # method body goes here</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] def get_next_card(self): # method body goes here</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> def self.get_next_card(self): # method body goes here</li>\n</ul>"},{"url":"/docs/quick-reference/git-bash/","relativePath":"docs/quick-reference/git-bash.md","relativeDir":"docs/quick-reference","base":"git-bash.md","name":"git-bash","frontmatter":{"title":"Git Bash","weight":0,"excerpt":"Git Bash","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Git Bash‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌\n\n</h1>\n<p>At its core, Git is a set of command line utility programs that are designed to execute on a Unix style command-line environment. Modern operating systems like Linux and macOS both include built-in Unix command line terminals. This makes Linux and macOS complementary operating systems when working with Git. Microsoft Windows instead uses Windows command prompt, a non-Unix terminal environment.</p>\n<p>In Windows environments, Git is often packaged as part of higher level GUI applications. GUIs for Git may attempt to abstract and hide the underlying version control system primitives. This can be a great aid for Git beginners to rapidly contribute to a project. Once a project's collaboration requirements grow with other team members, it is critical to be aware of how the actual raw Git methods work. This is when it can be beneficial to drop a GUI version for the command line tools. Git Bash is offered to provide a terminal Git experience.</p>\n<h2>What is Git Bash?</h2>\n<p>Git Bash is an application for Microsoft Windows environments which provides an emulation layer for a Git command line experience. Bash is an acronym for Bourne Again Shell. A shell is a terminal application used to interface with an operating system through written commands. Bash is a popular default shell on Linux and macOS. Git Bash is a package that installs Bash, some common bash utilities, and Git on a Windows operating system.</p>\n<h2>How to install Git Bash</h2>\n<p>Git Bash comes included as part of the <a href=\"https://gitforwindows.org/\">Git For Windows</a> package. Download and install Git For Windows like other Windows applications. Once downloaded find the included .exe file and open to execute Git Bash.</p>\n<h2>How to use Git Bash</h2>\n<p>Git Bash has the same operations as a standard Bash experience. It will be helpful to review basic Bash usage. Advanced usage of Bash is outside the scope of this Git focused document.</p>\n<h2>How to navigate folders</h2>\n<p>The Bash command pwd is used to print the 'present working directory'. pwd is equivalent to executing cd on a DOS(Windows console host) terminal. This is the folder or path that the current Bash session resides in.</p>\n<p>The Bash command ls is used to 'list' contents of the current working directory. ls is equivalent to DIR on a Windows console host terminal.</p>\n<p>Both Bash and Windows console host have a cd command. cd is an acronym for 'Change Directory'. cd is invoked with an appended directory name. Executing cd will change the terminal sessions current working directory to the passed directory argument.</p>\n<h2>Git Bash Commands</h2>\n<p>Git Bash is packaged with additional commands that can be found in the /usr/bin directory of the Git Bash emulation. Git Bash can actually provide a fairly robust shell experience on Windows. Git Bash comes packaged with the following shell commands which are outside the scope of this document: <a href=\"https://man.openbsd.org/ssh.1\">Ssh</a>, <a href=\"https://linux.die.net/man/1/scp\">scp</a>, <a href=\"http://man7.org/linux/man-pages/man1/cat.1.html\">cat</a>, <a href=\"https://linux.die.net/man/1/find\">find</a>.</p>\n<p>In addition the previously discussed set of Bash commands, Git Bash includes the full set of Git core commands discussed through out this site. Learn more at the corresponding documentation pages for <a href=\"https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone\">git clone</a>, <a href=\"https://www.atlassian.com/git/tutorials/saving-changes/git-commit\">git commit</a>, <a href=\"https://www.atlassian.com/git/tutorials/using-branches/git-checkout\">git checkout</a>, <a href=\"https://www.atlassian.com/git/tutorials/syncing/git-push\">git push</a>, and more.</p>"},{"url":"/docs/quick-reference/create-react-app/","relativePath":"docs/quick-reference/create-react-app.md","relativeDir":"docs/quick-reference","base":"create-react-app.md","name":"create-react-app","frontmatter":{"title":"Getting Started W Create React App","excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Getting Started with Create React App</h1>\n<p>This project was bootstrapped with <a href=\"https://github.com/facebook/create-react-app\">Create React App</a>.</p>\n<h2>Available Scripts</h2>\n<p>In the project directory, you can run:</p>\n<h3><code>yarn start</code></h3>\n<p>Runs the app in the development mode.<br>\nOpen <a href=\"http://localhost:3000\">http://localhost:3000</a> to view it in the browser.</p>\n<p>The page will reload if you make edits.<br>\nYou will also see any lint errors in the console.</p>\n<h3><code>yarn test</code></h3>\n<p>Launches the test runner in the interactive watch mode.<br>\nSee the section about <a href=\"https://facebook.github.io/create-react-app/docs/running-tests\">running tests</a> for more information.</p>\n<h3><code>yarn build</code></h3>\n<p>Builds the app for production to the <code>build</code> folder.<br>\nIt correctly bundles React in production mode and optimizes the build for the best performance.</p>\n<p>The build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!</p>\n<p>See the section about <a href=\"https://facebook.github.io/create-react-app/docs/deployment\">deployment</a> for more information.</p>\n<h3><code>yarn eject</code></h3>\n<p><strong>Note: this is a one-way operation. Once you <code>eject</code>, you can't go back!</strong></p>\n<p>If you aren't satisfied with the build tool and configuration choices, you can <code>eject</code> at any time. This command will remove the single build dependency from your project.</p>\n<p>Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except <code>eject</code> will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.</p>\n<p>You don't have to ever use <code>eject</code>. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.</p>\n<h2>Learn More</h2>\n<p>You can learn more in the <a href=\"https://facebook.github.io/create-react-app/docs/getting-started\">Create React App documentation</a>.</p>\n<p>To learn React, check out the <a href=\"https://reactjs.org/\">React documentation</a>.</p>\n<h3>Code Splitting</h3>\n<p>This section has moved here: <a href=\"https://facebook.github.io/create-react-app/docs/code-splitting\">https://facebook.github.io/create-react-app/docs/code-splitting</a></p>\n<h3>Analyzing the Bundle Size</h3>\n<p>This section has moved here: <a href=\"https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size\">https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size</a></p>\n<h3>Making a Progressive Web App</h3>\n<p>This section has moved here: <a href=\"https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app\">https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app</a></p>\n<h3>Advanced Configuration</h3>\n<p>This section has moved here: <a href=\"https://facebook.github.io/create-react-app/docs/advanced-configuration\">https://facebook.github.io/create-react-app/docs/advanced-configuration</a></p>\n<h3>Deployment</h3>\n<p>This section has moved here: <a href=\"https://facebook.github.io/create-react-app/docs/deployment\">https://facebook.github.io/create-react-app/docs/deployment</a></p>\n<h3><code>yarn build</code> fails to minify</h3>\n<p>This section has moved here: <a href=\"https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify\">https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify</a></p>"},{"url":"/docs/quick-reference/git-tricks/","relativePath":"docs/quick-reference/git-tricks.md","relativeDir":"docs/quick-reference","base":"git-tricks.md","name":"git-tricks","frontmatter":{"title":"Git Tricks","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Useful config <a href=\"https://w3c.github.io/git.html#config\">🔗</a>\n\n</h2>\n<ul>\n<li>branch.autosetuprebase=always (<a href=\"https://git-scm.com/docs/git-config#git-config-branchautoSetupRebase\">documentation</a>): I find it easier to work with Git this way</li>\n<li>core.editor=emacs -nw (<a href=\"https://git-scm.com/docs/git-config#git-config-coreeditor\">documentation</a>): that's the editor that will be invoked every time Git needs to ask you about a commit message, when you're squashing commits, etc (and of course, you want emacs for that)</li>\n<li>commit.gpgsign=true (<a href=\"https://git-scm.com/docs/git-config#git-config-commitgpgSign\">documentation</a>) and gpg.program=gpg2 (<a href=\"https://git-scm.com/docs/git-config#git-config-gpgprogram\">documentation</a>): you will need to set up these variables (and possibly a couple other) if you want to <a href=\"https://help.github.com/articles/signing-commits-with-gpg/\">sign your commits to GitHub using GPG (recommended)</a></li>\n</ul>\n<h2>Safest way to “update” a local copy <a href=\"https://w3c.github.io/git.html#update\">🔗</a></h2>\n<p>I find this sequence of commands the “safest” way to quickly “refresh” a clone of some remote repo, and at the same time check its status (where “safest” means <em>“reducing to the minimum the probability of messing up things with conflicts, outdated branches, uncommitted changes, etc”</em>):</p>\n<ul>\n<li>$ git branch -a displays information about <em>all</em> branches, both local and <em>remote</em></li>\n<li>$ git pull -r fetches changes from the <em>remote</em> and <a href=\"https://git-scm.com/docs/git-pull#git-pull--r\">“rebases the current branch on top of the upstream branch after fetching”</a></li>\n<li>$ git status shows you the status of your copy: whether there are new files, missing files, unstaged changes, or commits pending push</li>\n<li>$ git remote prune origin --dry tells you if any branch in the <em>remote</em> has been recently removed. (Submit the same command <em>without</em> the --dry part to actually remove those remotes from your local origin. That will still <em>not</em> remove local branches automatically, but you can do that yourself with git branch -d &#x3C;BRANCH> if you see some branch is no longer necessary.)</li>\n</ul>\n<p>You can have those four lines as an <em>alias</em>, or inside a <em>script</em> somewhere.</p>\n<p>Even better: if you set up <a href=\"https://w3c.github.io/git.html#aliases\">the aliases suggested above</a>, the whole thing becomes:</p>\n<p>You can then type it and run it just once, and, from that moment on, simply recover the line from your shell history.</p>\n<p>For example, if you're using Bash: press Ctrl+r, then start typing a distinctive chunk of the line (eg, r;, or st;gi); if you used it not too long ago for the last time, the entire line should appear, and you can simply press Enter.</p>\n<h2>An alias to view the history of the repo <a href=\"https://w3c.github.io/git.html#lg\">🔗</a></h2>\n<p>Then, simply type</p>\n<p>for a colourful graph of commits, tags and branches.</p>"},{"url":"/docs/quick-reference/google-firebase/","relativePath":"docs/quick-reference/google-firebase.md","relativeDir":"docs/quick-reference","base":"google-firebase.md","name":"google-firebase","frontmatter":{"title":"Firebase (Firebasics)","weight":0,"excerpt":"Add Firebase to your JavaScript project Note","seo":{"title":"Add Firebase to your JavaScript project Note:","description":"Add Firebase to your JavaScript project Note:","robots":[],"extra":[]},"template":"docs"},"html":"<p>Add Firebase to your JavaScript project <strong>Note:</strong> Upgrading from the version 8 Firebase SDK? Check out our <a href=\"https://firebase.google.com/docs/web/modular-upgrade\">upgrade guide</a>.<a href=\"\">####  <strong>Create a Firebase project</strong> </a><strong>Note:</strong> Using the v9 SDK is strongly recommended, especially for production apps. If you need support for other SDK management options, like <strong>window.firebase</strong>, see <a href=\"https://firebase.google.com/docs/web/modular-upgrade#window-compat\">Upgrade from version 8 to the modular Web SDK</a>.<strong>Note:</strong> You can skip this step if you are using a JavaScript framework CLI tool like the <a href=\"https://angular.io/cli\">Angular CLI</a>, <a href=\"https://nextjs.org/\">Next.js</a>, <a href=\"https://cli.vuejs.org/\">Vue CLI</a>, or <a href=\"https://reactjs.org/docs/create-a-new-react-app.html\">Create React App</a>. Check out <a href=\"https://firebase.google.com/docs/web/module-bundling\">our guide on module bundling</a> for more information.</p>\n<p>Follow this guide to use the Firebase JavaScript SDK in your web app or as a client for end-user access, for example, in a Node.js desktop or IoT application.</p>\n<h2><strong>Step 1</strong>: Create a Firebase project and register your app</h2>\n<p>Before you can add Firebase to your JavaScript app, you need to create a Firebase project and register your app with that project. When you register your app with Firebase, you'll get a Firebase configuration object that you'll use to connect your app with your Firebase project resources.</p>\n<p>Visit <a href=\"https://firebase.google.com/docs/projects/learn-more\">Understand Firebase Projects</a> to learn more about Firebase projects and best practices for adding apps to projects.</p>\n<p>If you don't already have a JavaScript project and just want to try out a Firebase product, you can download one of our <a href=\"https://firebase.google.com/docs/samples\">quickstart samples</a>.</p>\n<h2><strong>Step 2</strong>: Install the SDK and initialize Firebase</h2>\n<p>This page describes setup instructions for version 9 of the Firebase JS SDK, which uses a <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\">JavaScript Module</a> format.</p>\n<p>This workflow uses npm and requires module bundlers or JavaScript framework tooling because the v9 SDK is optimized to work with <a href=\"https://firebase.google.com/docs/web/module-bundling\">module bundlers</a> to eliminate unused code (tree-shaking) and decrease SDK size.</p>\n<ol>\n<li>Install Firebase using npm:</li>\n<li>\n<p>Initialize Firebase in your app and create a Firebase App object:</p>\n<p>A Firebase App is a container-like object that stores common configuration and shares authentication across Firebase services. After you initialize a Firebase App object in your code, you can add and start using Firebase services.</p>\n<p>Do you use ESM and want to use browser modules? Replace all your</p>\n<p><strong>import</strong></p>\n<p>lines to use the following pattern:</p>\n<p><strong>import { } from '<a href=\"https://www.gstatic.com/firebasejs/9.0.2/firebase-SERVICE.js\">https://www.gstatic.com/firebasejs/9.0.2/firebase-SERVICE.js</a>'</strong></p>\n<p>(where</p>\n<p><strong>SERVICE</strong></p>\n<p>is an SDK name such as</p>\n<p><strong>firebase-firestore</strong></p>\n<p>).</p>\n<p>Using browser modules is a quick way to get started, but we recommend using a module bundler for production.</p>\n</li>\n</ol>\n<h2><strong>Step 3</strong>: Access Firebase in your app</h2>\n<p>Firebase services (like Cloud Firestore, Authentication, Realtime Database, Remote Config, and more) are available to import within individual sub-packages.</p>\n<p>The example below shows how you could use the Cloud Firestore Lite SDK to retrieve a list of data.</p>\n<h2><strong>Step 4</strong>: Use a module bundler (webpack/Rollup) for size reduction</h2>\n<p>The Firebase Web SDK is designed to work with module bundlers to remove any unused code (tree-shaking). We strongly recommend using this approach for production apps. Tools such as the <a href=\"https://angular.io/cli\">Angular CLI</a>, <a href=\"https://nextjs.org/\">Next.js</a>, <a href=\"https://cli.vuejs.org/\">Vue CLI</a>, or <a href=\"https://reactjs.org/docs/create-a-new-react-app.html\">Create React App</a> automatically handle module bundling for libraries installed through npm and imported into your codebase.</p>\n<p>See our guide <a href=\"https://firebase.google.com/docs/web/module-bundling\">Using module bundlers with Firebase</a> for more information.</p>"},{"url":"/docs/quick-reference/all-emojis/","relativePath":"docs/quick-reference/all-emojis.md","relativeDir":"docs/quick-reference","base":"all-emojis.md","name":"all-emojis","frontmatter":{"title":"All Emojis","weight":0,"excerpt":"All Emojis","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>All Emojis</h2>\n<p>😀 😃 😄 😁 😆 😅 😂 🤣 🥲 ☺️ 😊 😇 🙂 🙃 😉 😌 😍 🥰 😘 😗 😙 😚 😋 😛 😝 😜 🤪 🤨 🧐 🤓 😎 🥸 🤩 🥳 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣 😖 😫 😩 🥺 😢 😭 😤 😠 😡 🤬 🤯 😳 🥵 🥶 😱 😨 😰 😥 😓 🤗 🤔 🤭 🤫 🤥 😶 😐 😑 😬 🙄 😯 😦 😧 😮 😲 🥱 😴 🤤 😪 😵 🤐 🥴 🤢 🤮 🤧 😷 🤒 🤕 🤑 🤠 😈 👿 👹 👺 🤡 💩 👻 💀 ☠️ 👽 👾 🤖 🎃 😺 😸 😹 😻 😼 😽 🙀 😿 😾</p>\n<h3><a href=\"https://emojipedia.org/people/\" title=\"List of people and fantasy emojis\">Gestures and Body Parts</a></h3>\n<p>👋 🤚 🖐 ✋ 🖖 👌 🤌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦵 🦿 🦶 👣 👂 🦻 👃 🫀 🫁 🧠 🦷 🦴 👀 👁 👅 👄 💋 🩸</p>\n<h3><a href=\"https://emojipedia.org/people/\" title=\"List of people and fantasy emojis\">People and Fantasy</a></h3>\n<p>👶 👧 🧒 👦 👩 🧑 👨 👩‍🦱 🧑‍🦱 👨‍🦱 👩‍🦰 🧑‍🦰 👨‍🦰 👱‍♀️ 👱 👱‍♂️ 👩‍🦳 🧑‍🦳 👨‍🦳 👩‍🦲 🧑‍🦲 👨‍🦲 🧔 👵 🧓 👴 👲 👳‍♀️ 👳 👳‍♂️ 🧕 👮‍♀️ 👮 👮‍♂️ 👷‍♀️ 👷 👷‍♂️ 💂‍♀️ 💂 💂‍♂️ 🕵️‍♀️ 🕵️ 🕵️‍♂️ 👩‍⚕️ 🧑‍⚕️ 👨‍⚕️ 👩‍🌾 🧑‍🌾 👨‍🌾 👩‍🍳 🧑‍🍳 👨‍🍳 👩‍🎓 🧑‍🎓 👨‍🎓 👩‍🎤 🧑‍🎤 👨‍🎤 👩‍🏫 🧑‍🏫 👨‍🏫 👩‍🏭 🧑‍🏭 👨‍🏭 👩‍💻 🧑‍💻 👨‍💻 👩‍💼 🧑‍💼 👨‍💼 👩‍🔧 🧑‍🔧 👨‍🔧 👩‍🔬 🧑‍🔬 👨‍🔬 👩‍🎨 🧑‍🎨 👨‍🎨 👩‍🚒 🧑‍🚒 👨‍🚒 👩‍✈️ 🧑‍✈️ 👨‍✈️ 👩‍🚀 🧑‍🚀 👨‍🚀 👩‍⚖️ 🧑‍⚖️ 👨‍⚖️ 👰‍♀️ 👰 👰‍♂️ 🤵‍♀️ 🤵 🤵‍♂️ 👸 🤴 🥷 🦸‍♀️ 🦸 🦸‍♂️ 🦹‍♀️ 🦹 🦹‍♂️ 🤶 🧑‍🎄 🎅 🧙‍♀️ 🧙 🧙‍♂️ 🧝‍♀️ 🧝 🧝‍♂️ 🧛‍♀️ 🧛 🧛‍♂️ 🧟‍♀️ 🧟 🧟‍♂️ 🧞‍♀️ 🧞 🧞‍♂️ 🧜‍♀️ 🧜 🧜‍♂️ 🧚‍♀️ 🧚 🧚‍♂️ 👼 🤰 🤱 👩‍🍼 🧑‍🍼 👨‍🍼 🙇‍♀️ 🙇 🙇‍♂️ 💁‍♀️ 💁 💁‍♂️ 🙅‍♀️ 🙅 🙅‍♂️ 🙆‍♀️ 🙆 🙆‍♂️ 🙋‍♀️ 🙋 🙋‍♂️ 🧏‍♀️ 🧏 🧏‍♂️ 🤦‍♀️ 🤦 🤦‍♂️ 🤷‍♀️ 🤷 🤷‍♂️ 🙎‍♀️ 🙎 🙎‍♂️ 🙍‍♀️ 🙍 🙍‍♂️ 💇‍♀️ 💇 💇‍♂️ 💆‍♀️ 💆 💆‍♂️ 🧖‍♀️ 🧖 🧖‍♂️ 💅 🤳 💃 🕺 👯‍♀️ 👯 👯‍♂️ 🕴 👩‍🦽 🧑‍🦽 👨‍🦽 👩‍🦼 🧑‍🦼 👨‍🦼 🚶‍♀️ 🚶 🚶‍♂️ 👩‍🦯 🧑‍🦯 👨‍🦯 🧎‍♀️ 🧎 🧎‍♂️ 🏃‍♀️ 🏃 🏃‍♂️ 🧍‍♀️ 🧍 🧍‍♂️ 👭 🧑‍🤝‍🧑 👬 👫 👩‍❤️‍👩 💑 👨‍❤️‍👨 👩‍❤️‍👨 👩‍❤️‍💋‍👩 💏 👨‍❤️‍💋‍👨 👩‍❤️‍💋‍👨 👪 👨‍👩‍👦 👨‍👩‍👧 👨‍👩‍👧‍👦 👨‍👩‍👦‍👦 👨‍👩‍👧‍👧 👨‍👨‍👦 👨‍👨‍👧 👨‍👨‍👧‍👦 👨‍👨‍👦‍👦 👨‍👨‍👧‍👧 👩‍👩‍👦 👩‍👩‍👧 👩‍👩‍👧‍👦 👩‍👩‍👦‍👦 👩‍👩‍👧‍👧 👨‍👦 👨‍👦‍👦 👨‍👧 👨‍👧‍👦 👨‍👧‍👧 👩‍👦 👩‍👦‍👦 👩‍👧 👩‍👧‍👦 👩‍👧‍👧 🗣 👤 👥 🫂</p>\n<h3><a href=\"https://emojipedia.org/people/\" title=\"List of clothing emojis\">Clothing and Accessories</a></h3>\n<p>🧳 🌂 ☂️ 🧵 🪡 🪢 🧶 👓 🕶 🥽 🥼 🦺 👔 👕 👖 🧣 🧤 🧥 🧦 👗 👘 🥻 🩴 🩱 🩲 🩳 👙 👚 👛 👜 👝 🎒 👞 👟 🥾 🥿 👠 👡 🩰 👢 👑 👒 🎩 🎓 🧢 ⛑ 🪖 💄 💍 💼</p>\n<h3><a href=\"https://emojipedia.org/light-skin-tone/\" title=\"List of light skin tone emojis\">Pale Emojis</a></h3>\n<p>👋🏻 🤚🏻 🖐🏻 ✋🏻 🖖🏻 👌🏻 🤌🏻 🤏🏻 ✌🏻 🤞🏻 🤟🏻 🤘🏻 🤙🏻 👈🏻 👉🏻 👆🏻 🖕🏻 👇🏻 ☝🏻 👍🏻 👎🏻 ✊🏻 👊🏻 🤛🏻 🤜🏻 👏🏻 🙌🏻 👐🏻 🤲🏻 🙏🏻 ✍🏻 💅🏻 🤳🏻 💪🏻 🦵🏻 🦶🏻 👂🏻 🦻🏻 👃🏻 👶🏻 👧🏻 🧒🏻 👦🏻 👩🏻 🧑🏻 👨🏻 👩🏻‍🦱 🧑🏻‍🦱 👨🏻‍🦱 👩🏻‍🦰 🧑🏻‍🦰 👨🏻‍🦰 👱🏻‍♀️ 👱🏻 👱🏻‍♂️ 👩🏻‍🦳 🧑🏻‍🦳 👨🏻‍🦳 👩🏻‍🦲 🧑🏻‍🦲 👨🏻‍🦲 🧔🏻 👵🏻 🧓🏻 👴🏻 👲🏻 👳🏻‍♀️ 👳🏻 👳🏻‍♂️ 🧕🏻 👮🏻‍♀️ 👮🏻 👮🏻‍♂️ 👷🏻‍♀️ 👷🏻 👷🏻‍♂️ 💂🏻‍♀️ 💂🏻 💂🏻‍♂️ 🕵🏻‍♀️ 🕵🏻 🕵🏻‍♂️ 👩🏻‍⚕️ 🧑🏻‍⚕️ 👨🏻‍⚕️ 👩🏻‍🌾 🧑🏻‍🌾 👨🏻‍🌾 👩🏻‍🍳 🧑🏻‍🍳 👨🏻‍🍳 👩🏻‍🎓 🧑🏻‍🎓 👨🏻‍🎓 👩🏻‍🎤 🧑🏻‍🎤 👨🏻‍🎤 👩🏻‍🏫 🧑🏻‍🏫 👨🏻‍🏫 👩🏻‍🏭 🧑🏻‍🏭 👨🏻‍🏭 👩🏻‍💻 🧑🏻‍💻 👨🏻‍💻 👩🏻‍💼 🧑🏻‍💼 👨🏻‍💼 👩🏻‍🔧 🧑🏻‍🔧 👨🏻‍🔧 👩🏻‍🔬 🧑🏻‍🔬 👨🏻‍🔬 👩🏻‍🎨 🧑🏻‍🎨 👨🏻‍🎨 👩🏻‍🚒 🧑🏻‍🚒 👨🏻‍🚒 👩🏻‍✈️ 🧑🏻‍✈️ 👨🏻‍✈️ 👩🏻‍🚀 🧑🏻‍🚀 👨🏻‍🚀 👩🏻‍⚖️ 🧑🏻‍⚖️ 👨🏻‍⚖️ 👰🏻‍♀️ 👰🏻 👰🏻‍♂️ 🤵🏻‍♀️ 🤵🏻 🤵🏻‍♂️ 👸🏻 🤴🏻 🥷🏻 🦸🏻‍♀️ 🦸🏻 🦸🏻‍♂️ 🦹🏻‍♀️ 🦹🏻 🦹🏻‍♂️ 🤶🏻 🧑🏻‍🎄 🎅🏻 🧙🏻‍♀️ 🧙🏻 🧙🏻‍♂️ 🧝🏻‍♀️ 🧝🏻 🧝🏻‍♂️ 🧛🏻‍♀️ 🧛🏻 🧛🏻‍♂️ 🧜🏻‍♀️ 🧜🏻 🧜🏻‍♂️ 🧚🏻‍♀️ 🧚🏻 🧚🏻‍♂️ 👼🏻 🤰🏻 🤱🏻 👩🏻‍🍼 🧑🏻‍🍼 👨🏻‍🍼 🙇🏻‍♀️ 🙇🏻 🙇🏻‍♂️ 💁🏻‍♀️ 💁🏻 💁🏻‍♂️ 🙅🏻‍♀️ 🙅🏻 🙅🏻‍♂️ 🙆🏻‍♀️ 🙆🏻 🙆🏻‍♂️ 🙋🏻‍♀️ 🙋🏻 🙋🏻‍♂️ 🧏🏻‍♀️ 🧏🏻 🧏🏻‍♂️ 🤦🏻‍♀️ 🤦🏻 🤦🏻‍♂️ 🤷🏻‍♀️ 🤷🏻 🤷🏻‍♂️ 🙎🏻‍♀️ 🙎🏻 🙎🏻‍♂️ 🙍🏻‍♀️ 🙍🏻 🙍🏻‍♂️ 💇🏻‍♀️ 💇🏻 💇🏻‍♂️ 💆🏻‍♀️ 💆🏻 💆🏻‍♂️ 🧖🏻‍♀️ 🧖🏻 🧖🏻‍♂️ 💃🏻 🕺🏻 🕴🏻 👩🏻‍🦽 🧑🏻‍🦽 👨🏻‍🦽 👩🏻‍🦼 🧑🏻‍🦼 👨🏻‍🦼 🚶🏻‍♀️ 🚶🏻 🚶🏻‍♂️ 👩🏻‍🦯 🧑🏻‍🦯 👨🏻‍🦯 🧎🏻‍♀️ 🧎🏻 🧎🏻‍♂️ 🏃🏻‍♀️ 🏃🏻 🏃🏻‍♂️ 🧍🏻‍♀️ 🧍🏻 🧍🏻‍♂️ 👭🏻 🧑🏻‍🤝‍🧑🏻 👬🏻 👫🏻 🧗🏻‍♀️ 🧗🏻 🧗🏻‍♂️ 🏇🏻 🏂🏻 🏌🏻‍♀️ 🏌🏻 🏌🏻‍♂️ 🏄🏻‍♀️ 🏄🏻 🏄🏻‍♂️ 🚣🏻‍♀️ 🚣🏻 🚣🏻‍♂️ 🏊🏻‍♀️ 🏊🏻 🏊🏻‍♂️ ⛹🏻‍♀️ ⛹🏻 ⛹🏻‍♂️ 🏋🏻‍♀️ 🏋🏻 🏋🏻‍♂️ 🚴🏻‍♀️ 🚴🏻 🚴🏻‍♂️ 🚵🏻‍♀️ 🚵🏻 🚵🏻‍♂️ 🤸🏻‍♀️ 🤸🏻 🤸🏻‍♂️ 🤽🏻‍♀️ 🤽🏻 🤽🏻‍♂️ 🤾🏻‍♀️ 🤾🏻 🤾🏻‍♂️ 🤹🏻‍♀️ 🤹🏻 🤹🏻‍♂️ 🧘🏻‍♀️ 🧘🏻 🧘🏻‍♂️ 🛀🏻 🛌🏻</p>\n<h3><a href=\"https://emojipedia.org/medium-light-skin-tone/\" title=\"List of medium light skin tone emojis\">Cream White Emojis</a></h3>\n<p>👋🏼 🤚🏼 🖐🏼 ✋🏼 🖖🏼 👌🏼 🤌🏼 🤏🏼 ✌🏼 🤞🏼 🤟🏼 🤘🏼 🤙🏼 👈🏼 👉🏼 👆🏼 🖕🏼 👇🏼 ☝🏼 👍🏼 👎🏼 ✊🏼 👊🏼 🤛🏼 🤜🏼 👏🏼 🙌🏼 👐🏼 🤲🏼 🙏🏼 ✍🏼 💅🏼 🤳🏼 💪🏼 🦵🏼 🦶🏼 👂🏼 🦻🏼 👃🏼 👶🏼 👧🏼 🧒🏼 👦🏼 👩🏼 🧑🏼 👨🏼 👩🏼‍🦱 🧑🏼‍🦱 👨🏼‍🦱 👩🏼‍🦰 🧑🏼‍🦰 👨🏼‍🦰 👱🏼‍♀️ 👱🏼 👱🏼‍♂️ 👩🏼‍🦳 🧑🏼‍🦳 👨🏼‍🦳 👩🏼‍🦲 🧑🏼‍🦲 👨🏼‍🦲 🧔🏼 👵🏼 🧓🏼 👴🏼 👲🏼 👳🏼‍♀️ 👳🏼 👳🏼‍♂️ 🧕🏼 👮🏼‍♀️ 👮🏼 👮🏼‍♂️ 👷🏼‍♀️ 👷🏼 👷🏼‍♂️ 💂🏼‍♀️ 💂🏼 💂🏼‍♂️ 🕵🏼‍♀️ 🕵🏼 🕵🏼‍♂️ 👩🏼‍⚕️ 🧑🏼‍⚕️ 👨🏼‍⚕️ 👩🏼‍🌾 🧑🏼‍🌾 👨🏼‍🌾 👩🏼‍🍳 🧑🏼‍🍳 👨🏼‍🍳 👩🏼‍🎓 🧑🏼‍🎓 👨🏼‍🎓 👩🏼‍🎤 🧑🏼‍🎤 👨🏼‍🎤 👩🏼‍🏫 🧑🏼‍🏫 👨🏼‍🏫 👩🏼‍🏭 🧑🏼‍🏭 👨🏼‍🏭 👩🏼‍💻 🧑🏼‍💻 👨🏼‍💻 👩🏼‍💼 🧑🏼‍💼 👨🏼‍💼 👩🏼‍🔧 🧑🏼‍🔧 👨🏼‍🔧 👩🏼‍🔬 🧑🏼‍🔬 👨🏼‍🔬 👩🏼‍🎨 🧑🏼‍🎨 👨🏼‍🎨 👩🏼‍🚒 🧑🏼‍🚒 👨🏼‍🚒 👩🏼‍✈️ 🧑🏼‍✈️ 👨🏼‍✈️ 👩🏼‍🚀 🧑🏼‍🚀 👨🏼‍🚀 👩🏼‍⚖️ 🧑🏼‍⚖️ 👨🏼‍⚖️ 👰🏼‍♀️ 👰🏼 👰🏼‍♂️ 🤵🏼‍♀️ 🤵🏼 🤵🏼‍♂️ 👸🏼 🤴🏼 🥷🏼 🦸🏼‍♀️ 🦸🏼 🦸🏼‍♂️ 🦹🏼‍♀️ 🦹🏼 🦹🏼‍♂️ 🤶🏼 🧑🏼‍🎄 🎅🏼 🧙🏼‍♀️ 🧙🏼 🧙🏼‍♂️ 🧝🏼‍♀️ 🧝🏼 🧝🏼‍♂️ 🧛🏼‍♀️ 🧛🏼 🧛🏼‍♂️ 🧜🏼‍♀️ 🧜🏼 🧜🏼‍♂️ 🧚🏼‍♀️ 🧚🏼 🧚🏼‍♂️ 👼🏼 🤰🏼 🤱🏼 👩🏼‍🍼 🧑🏼‍🍼 👨🏼‍🍼 🙇🏼‍♀️ 🙇🏼 🙇🏼‍♂️ 💁🏼‍♀️ 💁🏼 💁🏼‍♂️ 🙅🏼‍♀️ 🙅🏼 🙅🏼‍♂️ 🙆🏼‍♀️ 🙆🏼 🙆🏼‍♂️ 🙋🏼‍♀️ 🙋🏼 🙋🏼‍♂️ 🧏🏼‍♀️ 🧏🏼 🧏🏼‍♂️ 🤦🏼‍♀️ 🤦🏼 🤦🏼‍♂️ 🤷🏼‍♀️ 🤷🏼 🤷🏼‍♂️ 🙎🏼‍♀️ 🙎🏼 🙎🏼‍♂️ 🙍🏼‍♀️ 🙍🏼 🙍🏼‍♂️ 💇🏼‍♀️ 💇🏼 💇🏼‍♂️ 💆🏼‍♀️ 💆🏼 💆🏼‍♂️ 🧖🏼‍♀️ 🧖🏼 🧖🏼‍♂️ 💃🏼 🕺🏼 🕴🏼 👩🏼‍🦽 🧑🏼‍🦽 👨🏼‍🦽 👩🏼‍🦼 🧑🏼‍🦼 👨🏼‍🦼 🚶🏼‍♀️ 🚶🏼 🚶🏼‍♂️ 👩🏼‍🦯 🧑🏼‍🦯 👨🏼‍🦯 🧎🏼‍♀️ 🧎🏼 🧎🏼‍♂️ 🏃🏼‍♀️ 🏃🏼 🏃🏼‍♂️ 🧍🏼‍♀️ 🧍🏼 🧍🏼‍♂️ 👭🏼 🧑🏼‍🤝‍🧑🏼 👬🏼 👫🏼 🧗🏼‍♀️ 🧗🏼 🧗🏼‍♂️ 🏇🏼 🏂🏼 🏌🏼‍♀️ 🏌🏼 🏌🏼‍♂️ 🏄🏼‍♀️ 🏄🏼 🏄🏼‍♂️ 🚣🏼‍♀️ 🚣🏼 🚣🏼‍♂️ 🏊🏼‍♀️ 🏊🏼 🏊🏼‍♂️ ⛹🏼‍♀️ ⛹🏼 ⛹🏼‍♂️ 🏋🏼‍♀️ 🏋🏼 🏋🏼‍♂️ 🚴🏼‍♀️ 🚴🏼 🚴🏼‍♂️ 🚵🏼‍♀️ 🚵🏼 🚵🏼‍♂️ 🤸🏼‍♀️ 🤸🏼 🤸🏼‍♂️ 🤽🏼‍♀️ 🤽🏼 🤽🏼‍♂️ 🤾🏼‍♀️ 🤾🏼 🤾🏼‍♂️ 🤹🏼‍♀️ 🤹🏼 🤹🏼‍♂️ 🧘🏼‍♀️ 🧘🏼 🧘🏼‍♂️ 🛀🏼 🛌🏼</p>\n<h3><a href=\"https://emojipedia.org/medium-skin-tone/\" title=\"List of medium skin tone emojis\">Brown Emojis</a></h3>\n<p>👋🏽 🤚🏽 🖐🏽 ✋🏽 🖖🏽 👌🏽 🤌🏽 🤏🏽 ✌🏽 🤞🏽 🤟🏽 🤘🏽 🤙🏽 👈🏽 👉🏽 👆🏽 🖕🏽 👇🏽 ☝🏽 👍🏽 👎🏽 ✊🏽 👊🏽 🤛🏽 🤜🏽 👏🏽 🙌🏽 👐🏽 🤲🏽 🙏🏽 ✍🏽 💅🏽 🤳🏽 💪🏽 🦵🏽 🦶🏽 👂🏽 🦻🏽 👃🏽 👶🏽 👧🏽 🧒🏽 👦🏽 👩🏽 🧑🏽 👨🏽 👩🏽‍🦱 🧑🏽‍🦱 👨🏽‍🦱 👩🏽‍🦰 🧑🏽‍🦰 👨🏽‍🦰 👱🏽‍♀️ 👱🏽 👱🏽‍♂️ 👩🏽‍🦳 🧑🏽‍🦳 👨🏽‍🦳 👩🏽‍🦲 🧑🏽‍🦲 👨🏽‍🦲 🧔🏽 👵🏽 🧓🏽 👴🏽 👲🏽 👳🏽‍♀️ 👳🏽 👳🏽‍♂️ 🧕🏽 👮🏽‍♀️ 👮🏽 👮🏽‍♂️ 👷🏽‍♀️ 👷🏽 👷🏽‍♂️ 💂🏽‍♀️ 💂🏽 💂🏽‍♂️ 🕵🏽‍♀️ 🕵🏽 🕵🏽‍♂️ 👩🏽‍⚕️ 🧑🏽‍⚕️ 👨🏽‍⚕️ 👩🏽‍🌾 🧑🏽‍🌾 👨🏽‍🌾 👩🏽‍🍳 🧑🏽‍🍳 👨🏽‍🍳 👩🏽‍🎓 🧑🏽‍🎓 👨🏽‍🎓 👩🏽‍🎤 🧑🏽‍🎤 👨🏽‍🎤 👩🏽‍🏫 🧑🏽‍🏫 👨🏽‍🏫 👩🏽‍🏭 🧑🏽‍🏭 👨🏽‍🏭 👩🏽‍💻 🧑🏽‍💻 👨🏽‍💻 👩🏽‍💼 🧑🏽‍💼 👨🏽‍💼 👩🏽‍🔧 🧑🏽‍🔧 👨🏽‍🔧 👩🏽‍🔬 🧑🏽‍🔬 👨🏽‍🔬 👩🏽‍🎨 🧑🏽‍🎨 👨🏽‍🎨 👩🏽‍🚒 🧑🏽‍🚒 👨🏽‍🚒 👩🏽‍✈️ 🧑🏽‍✈️ 👨🏽‍✈️ 👩🏽‍🚀 🧑🏽‍🚀 👨🏽‍🚀 👩🏽‍⚖️ 🧑🏽‍⚖️ 👨🏽‍⚖️ 👰🏽‍♀️ 👰🏽 👰🏽‍♂️ 🤵🏽‍♀️ 🤵🏽 🤵🏽‍♂️ 👸🏽 🤴🏽 🥷🏽 🦸🏽‍♀️ 🦸🏽 🦸🏽‍♂️ 🦹🏽‍♀️ 🦹🏽 🦹🏽‍♂️ 🤶🏽 🧑🏽‍🎄 🎅🏽 🧙🏽‍♀️ 🧙🏽 🧙🏽‍♂️ 🧝🏽‍♀️ 🧝🏽 🧝🏽‍♂️ 🧛🏽‍♀️ 🧛🏽 🧛🏽‍♂️ 🧜🏽‍♀️ 🧜🏽 🧜🏽‍♂️ 🧚🏽‍♀️ 🧚🏽 🧚🏽‍♂️ 👼🏽 🤰🏽 🤱🏽 👩🏽‍🍼 🧑🏽‍🍼 👨🏽‍🍼 🙇🏽‍♀️ 🙇🏽 🙇🏽‍♂️ 💁🏽‍♀️ 💁🏽 💁🏽‍♂️ 🙅🏽‍♀️ 🙅🏽 🙅🏽‍♂️ 🙆🏽‍♀️ 🙆🏽 🙆🏽‍♂️ 🙋🏽‍♀️ 🙋🏽 🙋🏽‍♂️ 🧏🏽‍♀️ 🧏🏽 🧏🏽‍♂️ 🤦🏽‍♀️ 🤦🏽 🤦🏽‍♂️ 🤷🏽‍♀️ 🤷🏽 🤷🏽‍♂️ 🙎🏽‍♀️ 🙎🏽 🙎🏽‍♂️ 🙍🏽‍♀️ 🙍🏽 🙍🏽‍♂️ 💇🏽‍♀️ 💇🏽 💇🏽‍♂️ 💆🏽‍♀️ 💆🏽 💆🏽‍♂️ 🧖🏽‍♀️ 🧖🏽 🧖🏽‍♂️ 💃🏽 🕺🏽 🕴🏽 👩🏽‍🦽 🧑🏽‍🦽 👨🏽‍🦽 👩🏽‍🦼 🧑🏽‍🦼 👨🏽‍🦼 🚶🏽‍♀️ 🚶🏽 🚶🏽‍♂️ 👩🏽‍🦯 🧑🏽‍🦯 👨🏽‍🦯 🧎🏽‍♀️ 🧎🏽 🧎🏽‍♂️ 🏃🏽‍♀️ 🏃🏽 🏃🏽‍♂️ 🧍🏽‍♀️ 🧍🏽 🧍🏽‍♂️ 👭🏽 🧑🏽‍🤝‍🧑🏽 👬🏽 👫🏽 🧗🏽‍♀️ 🧗🏽 🧗🏽‍♂️ 🏇🏽 🏂🏽 🏌🏽‍♀️ 🏌🏽 🏌🏽‍♂️ 🏄🏽‍♀️ 🏄🏽 🏄🏽‍♂️ 🚣🏽‍♀️ 🚣🏽 🚣🏽‍♂️ 🏊🏽‍♀️ 🏊🏽 🏊🏽‍♂️ ⛹🏽‍♀️ ⛹🏽 ⛹🏽‍♂️ 🏋🏽‍♀️ 🏋🏽 🏋🏽‍♂️ 🚴🏽‍♀️ 🚴🏽 🚴🏽‍♂️ 🚵🏽‍♀️ 🚵🏽 🚵🏽‍♂️ 🤸🏽‍♀️ 🤸🏽 🤸🏽‍♂️ 🤽🏽‍♀️ 🤽🏽 🤽🏽‍♂️ 🤾🏽‍♀️ 🤾🏽 🤾🏽‍♂️ 🤹🏽‍♀️ 🤹🏽 🤹🏽‍♂️ 🧘🏽‍♀️ 🧘🏽 🧘🏽‍♂️ 🛀🏽 🛌🏽</p>\n<h3><a href=\"https://emojipedia.org/medium-dark-skin-tone/\" title=\"List of medium dark skin tone emojis\">Dark Brown Emojis</a></h3>\n<p>👋🏾 🤚🏾 🖐🏾 ✋🏾 🖖🏾 👌🏾 🤌🏾 🤏🏾 ✌🏾 🤞🏾 🤟🏾 🤘🏾 🤙🏾 👈🏾 👉🏾 👆🏾 🖕🏾 👇🏾 ☝🏾 👍🏾 👎🏾 ✊🏾 👊🏾 🤛🏾 🤜🏾 👏🏾 🙌🏾 👐🏾 🤲🏾 🙏🏾 ✍🏾 💅🏾 🤳🏾 💪🏾 🦵🏾 🦶🏾 👂🏾 🦻🏾 👃🏾 👶🏾 👧🏾 🧒🏾 👦🏾 👩🏾 🧑🏾 👨🏾 👩🏾‍🦱 🧑🏾‍🦱 👨🏾‍🦱 👩🏾‍🦰 🧑🏾‍🦰 👨🏾‍🦰 👱🏾‍♀️ 👱🏾 👱🏾‍♂️ 👩🏾‍🦳 🧑🏾‍🦳 👨🏾‍🦳 👩🏾‍🦲 🧑🏾‍🦲 👨🏾‍🦲 🧔🏾 👵🏾 🧓🏾 👴🏾 👲🏾 👳🏾‍♀️ 👳🏾 👳🏾‍♂️ 🧕🏾 👮🏾‍♀️ 👮🏾 👮🏾‍♂️ 👷🏾‍♀️ 👷🏾 👷🏾‍♂️ 💂🏾‍♀️ 💂🏾 💂🏾‍♂️ 🕵🏾‍♀️ 🕵🏾 🕵🏾‍♂️ 👩🏾‍⚕️ 🧑🏾‍⚕️ 👨🏾‍⚕️ 👩🏾‍🌾 🧑🏾‍🌾 👨🏾‍🌾 👩🏾‍🍳 🧑🏾‍🍳 👨🏾‍🍳 👩🏾‍🎓 🧑🏾‍🎓 👨🏾‍🎓 👩🏾‍🎤 🧑🏾‍🎤 👨🏾‍🎤 👩🏾‍🏫 🧑🏾‍🏫 👨🏾‍🏫 👩🏾‍🏭 🧑🏾‍🏭 👨🏾‍🏭 👩🏾‍💻 🧑🏾‍💻 👨🏾‍💻 👩🏾‍💼 🧑🏾‍💼 👨🏾‍💼 👩🏾‍🔧 🧑🏾‍🔧 👨🏾‍🔧 👩🏾‍🔬 🧑🏾‍🔬 👨🏾‍🔬 👩🏾‍🎨 🧑🏾‍🎨 👨🏾‍🎨 👩🏾‍🚒 🧑🏾‍🚒 👨🏾‍🚒 👩🏾‍✈️ 🧑🏾‍✈️ 👨🏾‍✈️ 👩🏾‍🚀 🧑🏾‍🚀 👨🏾‍🚀 👩🏾‍⚖️ 🧑🏾‍⚖️ 👨🏾‍⚖️ 👰🏾‍♀️ 👰🏾 👰🏾‍♂️ 🤵🏾‍♀️ 🤵🏾 🤵🏾‍♂️ 👸🏾 🤴🏾 🥷🏾 🦸🏾‍♀️ 🦸🏾 🦸🏾‍♂️ 🦹🏾‍♀️ 🦹🏾 🦹🏾‍♂️ 🤶🏾 🧑🏾‍🎄 🎅🏾 🧙🏾‍♀️ 🧙🏾 🧙🏾‍♂️ 🧝🏾‍♀️ 🧝🏾 🧝🏾‍♂️ 🧛🏾‍♀️ 🧛🏾 🧛🏾‍♂️ 🧜🏾‍♀️ 🧜🏾 🧜🏾‍♂️ 🧚🏾‍♀️ 🧚🏾 🧚🏾‍♂️ 👼🏾 🤰🏾 🤱🏾 👩🏾‍🍼 🧑🏾‍🍼 👨🏾‍🍼 🙇🏾‍♀️ 🙇🏾 🙇🏾‍♂️ 💁🏾‍♀️ 💁🏾 💁🏾‍♂️ 🙅🏾‍♀️ 🙅🏾 🙅🏾‍♂️ 🙆🏾‍♀️ 🙆🏾 🙆🏾‍♂️ 🙋🏾‍♀️ 🙋🏾 🙋🏾‍♂️ 🧏🏾‍♀️ 🧏🏾 🧏🏾‍♂️ 🤦🏾‍♀️ 🤦🏾 🤦🏾‍♂️ 🤷🏾‍♀️ 🤷🏾 🤷🏾‍♂️ 🙎🏾‍♀️ 🙎🏾 🙎🏾‍♂️ 🙍🏾‍♀️ 🙍🏾 🙍🏾‍♂️ 💇🏾‍♀️ 💇🏾 💇🏾‍♂️ 💆🏾‍♀️ 💆🏾 💆🏾‍♂️ 🧖🏾‍♀️ 🧖🏾 🧖🏾‍♂️ 💃🏾 🕺🏾 🕴🏿 👩🏾‍🦽 🧑🏾‍🦽 👨🏾‍🦽 👩🏾‍🦼 🧑🏾‍🦼 👨🏾‍🦼 🚶🏾‍♀️ 🚶🏾 🚶🏾‍♂️ 👩🏾‍🦯 🧑🏾‍🦯 👨🏾‍🦯 🧎🏾‍♀️ 🧎🏾 🧎🏾‍♂️ 🏃🏾‍♀️ 🏃🏾 🏃🏾‍♂️ 🧍🏾‍♀️ 🧍🏾 🧍🏾‍♂️ 👭🏾 🧑🏾‍🤝‍🧑🏾 👬🏾 👫🏾 🧗🏾‍♀️ 🧗🏾 🧗🏾‍♂️ 🏇🏾 🏂🏾 🏌🏾‍♀️ 🏌🏾 🏌🏾‍♂️ 🏄🏾‍♀️ 🏄🏾 🏄🏾‍♂️ 🚣🏾‍♀️ 🚣🏾 🚣🏾‍♂️ 🏊🏾‍♀️ 🏊🏾 🏊🏾‍♂️ ⛹🏾‍♀️ ⛹🏾 ⛹🏾‍♂️ 🏋🏾‍♀️ 🏋🏾 🏋🏾‍♂️ 🚴🏾‍♀️ 🚴🏾 🚴🏾‍♂️ 🚵🏾‍♀️ 🚵🏾 🚵🏾‍♂️ 🤸🏾‍♀️ 🤸🏾 🤸🏾‍♂️ 🤽🏾‍♀️ 🤽🏾 🤽🏾‍♂️ 🤾🏾‍♀️ 🤾🏾 🤾🏾‍♂️ 🤹🏾‍♀️ 🤹🏾 🤹🏾‍♂️ 🧘🏾‍♀️ 🧘🏾 🧘🏾‍♂️ 🛀🏾 🛌🏾</p>\n<h3><a href=\"https://emojipedia.org/dark-skin-tone/\" title=\"List of dark skin tone emojis\">Black Emojis</a></h3>\n<p>👋🏿 🤚🏿 🖐🏿 ✋🏿 🖖🏿 👌🏿 🤌🏿 🤏🏿 ✌🏿 🤞🏿 🤟🏿 🤘🏿 🤙🏿 👈🏿 👉🏿 👆🏿 🖕🏿 👇🏿 ☝🏿 👍🏿 👎🏿 ✊🏿 👊🏿 🤛🏿 🤜🏿 👏🏿 🙌🏿 👐🏿 🤲🏿 🙏🏿 ✍🏿 💅🏿 🤳🏿 💪🏿 🦵🏿 🦶🏿 👂🏿 🦻🏿 👃🏿 👶🏿 👧🏿 🧒🏿 👦🏿 👩🏿 🧑🏿 👨🏿 👩🏿‍🦱 🧑🏿‍🦱 👨🏿‍🦱 👩🏿‍🦰 🧑🏿‍🦰 👨🏿‍🦰 👱🏿‍♀️ 👱🏿 👱🏿‍♂️ 👩🏿‍🦳 🧑🏿‍🦳 👨🏿‍🦳 👩🏿‍🦲 🧑🏿‍🦲 👨🏿‍🦲 🧔🏿 👵🏿 🧓🏿 👴🏿 👲🏿 👳🏿‍♀️ 👳🏿 👳🏿‍♂️ 🧕🏿 👮🏿‍♀️ 👮🏿 👮🏿‍♂️ 👷🏿‍♀️ 👷🏿 👷🏿‍♂️ 💂🏿‍♀️ 💂🏿 💂🏿‍♂️ 🕵🏿‍♀️ 🕵🏿 🕵🏿‍♂️ 👩🏿‍⚕️ 🧑🏿‍⚕️ 👨🏿‍⚕️ 👩🏿‍🌾 🧑🏿‍🌾 👨🏿‍🌾 👩🏿‍🍳 🧑🏿‍🍳 👨🏿‍🍳 👩🏿‍🎓 🧑🏿‍🎓 👨🏿‍🎓 👩🏿‍🎤 🧑🏿‍🎤 👨🏿‍🎤 👩🏿‍🏫 🧑🏿‍🏫 👨🏿‍🏫 👩🏿‍🏭 🧑🏿‍🏭 👨🏿‍🏭 👩🏿‍💻 🧑🏿‍💻 👨🏿‍💻 👩🏿‍💼 🧑🏿‍💼 👨🏿‍💼 👩🏿‍🔧 🧑🏿‍🔧 👨🏿‍🔧 👩🏿‍🔬 🧑🏿‍🔬 👨🏿‍🔬 👩🏿‍🎨 🧑🏿‍🎨 👨🏿‍🎨 👩🏿‍🚒 🧑🏿‍🚒 👨🏿‍🚒 👩🏿‍✈️ 🧑🏿‍✈️ 👨🏿‍✈️ 👩🏿‍🚀 🧑🏿‍🚀 👨🏿‍🚀 👩🏿‍⚖️ 🧑🏿‍⚖️ 👨🏿‍⚖️ 👰🏿‍♀️ 👰🏿 👰🏿‍♂️ 🤵🏿‍♀️ 🤵🏿 🤵🏿‍♂️ 👸🏿 🤴🏿 🥷🏿 🦸🏿‍♀️ 🦸🏿 🦸🏿‍♂️ 🦹🏿‍♀️ 🦹🏿 🦹🏿‍♂️ 🤶🏿 🧑🏿‍🎄 🎅🏿 🧙🏿‍♀️ 🧙🏿 🧙🏿‍♂️ 🧝🏿‍♀️ 🧝🏿 🧝🏿‍♂️ 🧛🏿‍♀️ 🧛🏿 🧛🏿‍♂️ 🧜🏿‍♀️ 🧜🏿 🧜🏿‍♂️ 🧚🏿‍♀️ 🧚🏿 🧚🏿‍♂️ 👼🏿 🤰🏿 🤱🏿 👩🏿‍🍼 🧑🏿‍🍼 👨🏿‍🍼 🙇🏿‍♀️ 🙇🏿 🙇🏿‍♂️ 💁🏿‍♀️ 💁🏿 💁🏿‍♂️ 🙅🏿‍♀️ 🙅🏿 🙅🏿‍♂️ 🙆🏿‍♀️ 🙆🏿 🙆🏿‍♂️ 🙋🏿‍♀️ 🙋🏿 🙋🏿‍♂️ 🧏🏿‍♀️ 🧏🏿 🧏🏿‍♂️ 🤦🏿‍♀️ 🤦🏿 🤦🏿‍♂️ 🤷🏿‍♀️ 🤷🏿 🤷🏿‍♂️ 🙎🏿‍♀️ 🙎🏿 🙎🏿‍♂️ 🙍🏿‍♀️ 🙍🏿 🙍🏿‍♂️ 💇🏿‍♀️ 💇🏿 💇🏿‍♂️ 💆🏿‍♀️ 💆🏿 💆🏿‍♂️ 🧖🏿‍♀️ 🧖🏿 🧖🏿‍♂️ 💃🏿 🕺🏿 🕴🏿 👩🏿‍🦽 🧑🏿‍🦽 👨🏿‍🦽 👩🏿‍🦼 🧑🏿‍🦼 👨🏿‍🦼 🚶🏿‍♀️ 🚶🏿 🚶🏿‍♂️ 👩🏿‍🦯 🧑🏿‍🦯 👨🏿‍🦯 🧎🏿‍♀️ 🧎🏿 🧎🏿‍♂️ 🏃🏿‍♀️ 🏃🏿 🏃🏿‍♂️ 🧍🏿‍♀️ 🧍🏿 🧍🏿‍♂️ 👭🏿 🧑🏿‍🤝‍🧑🏿 👬🏿 👫🏿 🧗🏿‍♀️ 🧗🏿 🧗🏿‍♂️ 🏇🏿 🏂🏿 🏌🏿‍♀️ 🏌🏿 🏌🏿‍♂️ 🏄🏿‍♀️ 🏄🏿 🏄🏿‍♂️ 🚣🏿‍♀️ 🚣🏿 🚣🏿‍♂️ 🏊🏿‍♀️ 🏊🏿 🏊🏿‍♂️ ⛹🏿‍♀️ ⛹🏿 ⛹🏿‍♂️ 🏋🏿‍♀️ 🏋🏿 🏋🏿‍♂️ 🚴🏿‍♀️ 🚴🏿 🚴🏿‍♂️ 🚵🏿‍♀️ 🚵🏿 🚵🏿‍♂️ 🤸🏿‍♀️ 🤸🏿 🤸🏿‍♂️ 🤽🏿‍♀️ 🤽🏿 🤽🏿‍♂️ 🤾🏿‍♀️ 🤾🏿 🤾🏿‍♂️ 🤹🏿‍♀️ 🤹🏿 🤹🏿‍♂️ 🧘🏿‍♀️ 🧘🏿 🧘🏿‍♂️ 🛀🏿 🛌🏿</p>\n<h2><a href=\"https://emojipedia.org/nature/\" title=\"Names and meanings of animal and nature emojis\">Animals &#x26; Nature</a></h2>\n<p>🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐻‍❄️ 🐨 🐯 🦁 🐮 🐷 🐽 🐸 🐵 🙈 🙉 🙊 🐒 🐔 🐧 🐦 🐤 🐣 🐥 🦆 🦅 🦉 🦇 🐺 🐗 🐴 🦄 🐝 🪱 🐛 🦋 🐌 🐞 🐜 🪰 🪲 🪳 🦟 🦗 🕷 🕸 🦂 🐢 🐍 🦎 🦖 🦕 🐙 🦑 🦐 🦞 🦀 🐡 🐠 🐟 🐬 🐳 🐋 🦈 🐊 🐅 🐆 🦓 🦍 🦧 🦣 🐘 🦛 🦏 🐪 🐫 🦒 🦘 🦬 🐃 🐂 🐄 🐎 🐖 🐏 🐑 🦙 🐐 🦌 🐕 🐩 🦮 🐕‍🦺 🐈 🐈‍⬛ 🪶 🐓 🦃 🦤 🦚 🦜 🦢 🦩 🕊 🐇 🦝 🦨 🦡 🦫 🦦 🦥 🐁 🐀 🐿 🦔 🐾 🐉 🐲 🌵 🎄 🌲 🌳 🌴 🪵 🌱 🌿 ☘️ 🍀 🎍 🪴 🎋 🍃 🍂 🍁 🍄 🐚 🪨 🌾 💐 🌷 🌹 🥀 🌺 🌸 🌼 🌻 🌞 🌝 🌛 🌜 🌚 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔 🌙 🌎 🌍 🌏 🪐 💫 ⭐️ 🌟 ✨ ⚡️ ☄️ 💥 🔥 🌪 🌈 ☀️ 🌤 ⛅️ 🌥 ☁️ 🌦 🌧 ⛈ 🌩 🌨 ❄️ ☃️ ⛄️ 🌬 💨 💧 💦 ☔️ ☂️ 🌊 🌫</p>\n<h2><a href=\"https://emojipedia.org/food-drink/\" title=\"Names and meanings of food and drink emojis\">Food &#x26; Drink</a></h2>\n<p>🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🫐 🍈 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🍆 🥑 🥦 🥬 🥒 🌶 🫑 🌽 🥕 🫒 🧄 🧅 🥔 🍠 🥐 🥯 🍞 🥖 🥨 🧀 🥚 🍳 🧈 🥞 🧇 🥓 🥩 🍗 🍖 🦴 🌭 🍔 🍟 🍕 🫓 🥪 🥙 🧆 🌮 🌯 🫔 🥗 🥘 🫕 🥫 🍝 🍜 🍲 🍛 🍣 🍱 🥟 🦪 🍤 🍙 🍚 🍘 🍥 🥠 🥮 🍢 🍡 🍧 🍨 🍦 🥧 🧁 🍰 🎂 🍮 🍭 🍬 🍫 🍿 🍩 🍪 🌰 🥜 🍯 🥛 🍼 🫖 ☕️ 🍵 🧃 🥤 🧋 🍶 🍺 🍻 🥂 🍷 🥃 🍸 🍹 🧉 🍾 🧊 🥄 🍴 🍽 🥣 🥡 🥢 🧂</p>\n<h2><a href=\"https://emojipedia.org/activity/\" title=\"Names and meanings of sport and activity emojis\">Activity and Sports</a></h2>\n<p>⚽️ 🏀 🏈 ⚾️ 🥎 🎾 🏐 🏉 🥏 🎱 🪀 🏓 🏸 🏒 🏑 🥍 🏏 🪃 🥅 ⛳️ 🪁 🏹 🎣 🤿 🥊 🥋 🎽 🛹 🛼 🛷 ⛸ 🥌 🎿 ⛷ 🏂 🪂 🏋️‍♀️ 🏋️ 🏋️‍♂️ 🤼‍♀️ 🤼 🤼‍♂️ 🤸‍♀️ 🤸 🤸‍♂️ ⛹️‍♀️ ⛹️ ⛹️‍♂️ 🤺 🤾‍♀️ 🤾 🤾‍♂️ 🏌️‍♀️ 🏌️ 🏌️‍♂️ 🏇 🧘‍♀️ 🧘 🧘‍♂️ 🏄‍♀️ 🏄 🏄‍♂️ 🏊‍♀️ 🏊 🏊‍♂️ 🤽‍♀️ 🤽 🤽‍♂️ 🚣‍♀️ 🚣 🚣‍♂️ 🧗‍♀️ 🧗 🧗‍♂️ 🚵‍♀️ 🚵 🚵‍♂️ 🚴‍♀️ 🚴 🚴‍♂️ 🏆 🥇 🥈 🥉 🏅 🎖 🏵 🎗 🎫 🎟 🎪 🤹 🤹‍♂️ 🤹‍♀️ 🎭 🩰 🎨 🎬 🎤 🎧 🎼 🎹 🥁 🪘 🎷 🎺 🪗 🎸 🪕 🎻 🎲 ♟ 🎯 🎳 🎮 🎰 🧩</p>\n<h2><a href=\"https://emojipedia.org/travel-places/\" title=\"Names and meanings of travel and place emojis\">Travel &#x26; Places</a></h2>\n<p>🚗 🚕 🚙 🚌 🚎 🏎 🚓 🚑 🚒 🚐 🛻 🚚 🚛 🚜 🦯 🦽 🦼 🛴 🚲 🛵 🏍 🛺 🚨 🚔 🚍 🚘 🚖 🚡 🚠 🚟 🚃 🚋 🚞 🚝 🚄 🚅 🚈 🚂 🚆 🚇 🚊 🚉 ✈️ 🛫 🛬 🛩 💺 🛰 🚀 🛸 🚁 🛶 ⛵️ 🚤 🛥 🛳 ⛴ 🚢 ⚓️ 🪝 ⛽️ 🚧 🚦 🚥 🚏 🗺 🗿 🗽 🗼 🏰 🏯 🏟 🎡 🎢 🎠 ⛲️ ⛱ 🏖 🏝 🏜 🌋 ⛰ 🏔 🗻 🏕 ⛺️ 🛖 🏠 🏡 🏘 🏚 🏗 🏭 🏢 🏬 🏣 🏤 🏥 🏦 🏨 🏪 🏫 🏩 💒 🏛 ⛪️ 🕌 🕍 🛕 🕋 ⛩ 🛤 🛣 🗾 🎑 🏞 🌅 🌄 🌠 🎇 🎆 🌇 🌆 🏙 🌃 🌌 🌉 🌁</p>\n<h2><a href=\"https://emojipedia.org/objects/\" title=\"Names and meanings of object emojis\">Objects</a></h2>\n<p>⌚️ 📱 📲 💻 ⌨️ 🖥 🖨 🖱 🖲 🕹 🗜 💽 💾 💿 📀 📼 📷 📸 📹 🎥 📽 🎞 📞 ☎️ 📟 📠 📺 📻 🎙 🎚 🎛 🧭 ⏱ ⏲ ⏰ 🕰 ⌛️ ⏳ 📡 🔋 🔌 💡 🔦 🕯 🪔 🧯 🛢 💸 💵 💴 💶 💷 🪙 💰 💳 💎 ⚖️ 🪜 🧰 🪛 🔧 🔨 ⚒ 🛠 ⛏ 🪚 🔩 ⚙️ 🪤 🧱 ⛓ 🧲 🔫 💣 🧨 🪓 🔪 🗡 ⚔️ 🛡 🚬 ⚰️ 🪦 ⚱️ 🏺 🔮 📿 🧿 💈 ⚗️ 🔭 🔬 🕳 🩹 🩺 💊 💉 🩸 🧬 🦠 🧫 🧪 🌡 🧹 🪠 🧺 🧻 🚽 🚰 🚿 🛁 🛀 🧼 🪥 🪒 🧽 🪣 🧴 🛎 🔑 🗝 🚪 🪑 🛋 🛏 🛌 🧸 🪆 🖼 🪞 🪟 🛍 🛒 🎁 🎈 🎏 🎀 🪄 🪅 🎊 🎉 🎎 🏮 🎐 🧧 ✉️ 📩 📨 📧 💌 📥 📤 📦 🏷 🪧 📪 📫 📬 📭 📮 📯 📜 📃 📄 📑 🧾 📊 📈 📉 🗒 🗓 📆 📅 🗑 📇 🗃 🗳 🗄 📋 📁 📂 🗂 🗞 📰 📓 📔 📒 📕 📗 📘 📙 📚 📖 🔖 🧷 🔗 📎 🖇 📐 📏 🧮 📌 📍 ✂️ 🖊 🖋 ✒️ 🖌 🖍 📝 ✏️ 🔍 🔎 🔏 🔐 🔒 🔓</p>\n<h2><a href=\"https://emojipedia.org/objects/\" title=\"Names and meanings of hearts and symbol emojis\">Symbols</a></h2>\n<p>❤️ 🧡 💛 💚 💙 💜 🖤 🤍 🤎 💔 ❣️ 💕 💞 💓 💗 💖 💘 💝 💟 ☮️ ✝️ ☪️ 🕉 ☸️ ✡️ 🔯 🕎 ☯️ ☦️ 🛐 ⛎ ♈️ ♉️ ♊️ ♋️ ♌️ ♍️ ♎️ ♏️ ♐️ ♑️ ♒️ ♓️ 🆔 ⚛️ 🉑 ☢️ ☣️ 📴 📳 🈶 🈚️ 🈸 🈺 🈷️ ✴️ 🆚 💮 🉐 ㊙️ ㊗️ 🈴 🈵 🈹 🈲 🅰️ 🅱️ 🆎 🆑 🅾️ 🆘 ❌ ⭕️ 🛑 ⛔️ 📛 🚫 💯 💢 ♨️ 🚷 🚯 🚳 🚱 🔞 📵 🚭 ❗️ ❕ ❓ ❔ ‼️ ⁉️ 🔅 🔆 〽️ ⚠️ 🚸 🔱 ⚜️ 🔰 ♻️ ✅ 🈯️ 💹 ❇️ ✳️ ❎ 🌐 💠 Ⓜ️ 🌀 💤 🏧 🚾 ♿️ 🅿️ 🛗 🈳 🈂️ 🛂 🛃 🛄 🛅 🚹 🚺 🚼 ⚧ 🚻 🚮 🎦 📶 🈁 🔣 ℹ️ 🔤 🔡 🔠 🆖 🆗 🆙 🆒 🆕 🆓 0️⃣ 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣ 🔟 🔢 #️⃣ *️⃣ ⏏️ ▶️ ⏸ ⏯ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ⏫ ⏬ ◀️ 🔼 🔽 ➡️ ⬅️ ⬆️ ⬇️ ↗️ ↘️ ↙️ ↖️ ↕️ ↔️ ↪️ ↩️ ⤴️ ⤵️ 🔀 🔁 🔂 🔄 🔃 🎵 🎶 ➕ ➖ ➗ ✖️ ♾ 💲 💱 ™️ ©️ ®️ 〰️ ➰ ➿ 🔚 🔙 🔛 🔝 🔜 ✔️ ☑️ 🔘 🔴 🟠 🟡 🟢 🔵 🟣 ⚫️ ⚪️ 🟤 🔺 🔻 🔸 🔹 🔶 🔷 🔳 🔲 -️ ▫️ ◾️ ◽️ ◼️ ◻️ 🟥 🟧 🟨 🟩 🟦 🟪 ⬛️ ⬜️ 🟫 🔈 🔇 🔉 🔊 🔔 🔕 📣 📢 👁‍🗨 💬 💭 🗯 ♠️ ♣️ ♥️ ♦️ 🃏 🎴 🀄️ 🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕛 🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦 🕧</p>\n<h2><a href=\"https://getsymbols.com/\">Non-Emoji Symbols</a></h2>\n<p>More <a href=\"https://getsymbols.com/\">Unicode symbols, Hieroglpyhs and Pictographs to copy and paste</a>.</p>\n<p>✢ ✣ ✤ ✥ ✦ ✧ ★ ☆ ✯ ✡︎ ✩ ✪ ✫ ✬ ✭ ✮ ✶ ✷ ✵ ✸ ✹ → ⇒ ⟹ ⇨ ⇾ ➾ ⇢ ☛ ☞ ➔ ➜ ➙ ➛ ➝ ➞ ♠︎ ♣︎ ♥︎ ♦︎ ♤ ♧ ♡ ♢ ♚ ♛ ♜ ♝ ♞ ♟ ♔ ♕ ♖ ♗ ♘ ♙ ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ 🂠 ⚈ ⚉ ⚆ ⚇ 𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀐 𓀑 𓀒 𓀓 𓀔 𓀕 𓀖 𓀗 𓀘 𓀙 𓀚 𓀛 𓀜 𓀝</p>\n<h2><a href=\"https://emojipedia.org/flags/\" title=\"Names and meanings of Flag Emojis\">Flags</a></h2>\n<p>Note: Windows has <a href=\"https://blog.getemoji.com/post/620280709025841152/how-to-use-flag-emojis-on-windows\">limited flag emoji support</a>.</p>\n<p>🏳️ 🏴 🏁 🚩 🏳️‍🌈 🏳️‍⚧️ 🏴‍☠️ 🇦🇫 🇦🇽 🇦🇱 🇩🇿 🇦🇸 🇦🇩 🇦🇴 🇦🇮 🇦🇶 🇦🇬 🇦🇷 🇦🇲 🇦🇼 🇦🇺 🇦🇹 🇦🇿 🇧🇸 🇧🇭 🇧🇩 🇧🇧 🇧🇾 🇧🇪 🇧🇿 🇧🇯 🇧🇲 🇧🇹 🇧🇴 🇧🇦 🇧🇼 🇧🇷 🇮🇴 🇻🇬 🇧🇳 🇧🇬 🇧🇫 🇧🇮 🇰🇭 🇨🇲 🇨🇦 🇮🇨 🇨🇻 🇧🇶 🇰🇾 🇨🇫 🇹🇩 🇨🇱 🇨🇳 🇨🇽 🇨🇨 🇨🇴 🇰🇲 🇨🇬 🇨🇩 🇨🇰 🇨🇷 🇨🇮 🇭🇷 🇨🇺 🇨🇼 🇨🇾 🇨🇿 🇩🇰 🇩🇯 🇩🇲 🇩🇴 🇪🇨 🇪🇬 🇸🇻 🇬🇶 🇪🇷 🇪🇪 🇪🇹 🇪🇺 🇫🇰 🇫🇴 🇫🇯 🇫🇮 🇫🇷 🇬🇫 🇵🇫 🇹🇫 🇬🇦 🇬🇲 🇬🇪 🇩🇪 🇬🇭 🇬🇮 🇬🇷 🇬🇱 🇬🇩 🇬🇵 🇬🇺 🇬🇹 🇬🇬 🇬🇳 🇬🇼 🇬🇾 🇭🇹 🇭🇳 🇭🇰 🇭🇺 🇮🇸 🇮🇳 🇮🇩 🇮🇷 🇮🇶 🇮🇪 🇮🇲 🇮🇱 🇮🇹 🇯🇲 🇯🇵 🎌 🇯🇪 🇯🇴 🇰🇿 🇰🇪 🇰🇮 🇽🇰 🇰🇼 🇰🇬 🇱🇦 🇱🇻 🇱🇧 🇱🇸 🇱🇷 🇱🇾 🇱🇮 🇱🇹 🇱🇺 🇲🇴 🇲🇰 🇲🇬 🇲🇼 🇲🇾 🇲🇻 🇲🇱 🇲🇹 🇲🇭 🇲🇶 🇲🇷 🇲🇺 🇾🇹 🇲🇽 🇫🇲 🇲🇩 🇲🇨 🇲🇳 🇲🇪 🇲🇸 🇲🇦 🇲🇿 🇲🇲 🇳🇦 🇳🇷 🇳🇵 🇳🇱 🇳🇨 🇳🇿 🇳🇮 🇳🇪 🇳🇬 🇳🇺 🇳🇫 🇰🇵 🇲🇵 🇳🇴 🇴🇲 🇵🇰 🇵🇼 🇵🇸 🇵🇦 🇵🇬 🇵🇾 🇵🇪 🇵🇭 🇵🇳 🇵🇱 🇵🇹 🇵🇷 🇶🇦 🇷🇪 🇷🇴 🇷🇺 🇷🇼 🇼🇸 🇸🇲 🇸🇦 🇸🇳 🇷🇸 🇸🇨 🇸🇱 🇸🇬 🇸🇽 🇸🇰 🇸🇮 🇬🇸 🇸🇧 🇸🇴 🇿🇦 🇰🇷 🇸🇸 🇪🇸 🇱🇰 🇧🇱 🇸🇭 🇰🇳 🇱🇨 🇵🇲 🇻🇨 🇸🇩 🇸🇷 🇸🇿 🇸🇪 🇨🇭 🇸🇾 🇹🇼 🇹🇯 🇹🇿 🇹🇭 🇹🇱 🇹🇬 🇹🇰 🇹🇴 🇹🇹 🇹🇳 🇹🇷 🇹🇲 🇹🇨 🇹🇻 🇻🇮 🇺🇬 🇺🇦 🇦🇪 🇬🇧 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🏴󠁧󠁢󠁳󠁣󠁴󠁿 🏴󠁧󠁢󠁷󠁬󠁳󠁿 🇺🇳 🇺🇸 🇺🇾 🇺🇿 🇻🇺 🇻🇦 🇻🇪 🇻🇳 🇼🇫 🇪🇭 🇾🇪 🇿🇲 🇿🇼</p>\n<p><a href=\"https://getemoji.com/#smileys\">😃💁 People</a> - <a href=\"https://getemoji.com/#animals-nature\">🐻🌻 Animals</a> - <a href=\"https://getemoji.com/#food-drink\">🍔🍹 Food</a> - <a href=\"https://getemoji.com/#activities\">🎷⚽️ Activities</a> - <a href=\"https://getemoji.com/#travel-places\">🚘🌇 Travel</a> - <a href=\"https://getemoji.com/#objects\">💡🎉 Objects</a> - <a href=\"https://getemoji.com/#symbols\">💖🔣 Symbols</a> - <a href=\"https://getemoji.com/#flags\">🎌🏳️‍🌈 Flags</a></p>\n<h2><a href=\"https://emojipedia.org/new/\" title=\"New 2019 Emojis\">New Emojis</a></h2>\n<p>Emojis from <a href=\"https://emojipedia.org/emoji-13.0/\" title=\"New 2020 Emojis\">Emoji 13.0</a>: Added in 2020.</p>\n<p>🥲 🥸 🤌 🤌🏻 🤌🏼 🤌🏽 🤌🏾 🤌🏿 🫀 🫁 🥷 🤵‍♀️ 🤵🏻‍♀️ 🤵🏼‍♀️ 🤵🏽‍♀️ 🤵🏾‍♀️ 🤵🏿‍♀️ 🤵‍♂️ 🤵🏻‍♂️ 🤵🏼‍♂️ 🤵🏽‍♂️ 🤵🏾‍♂️ 🤵🏿‍♂️ 👰‍♀️ 👰🏻‍♀️ 👰🏼‍♀️ 👰🏽‍♀️ 👰🏾‍♀️ 👰🏿‍♀️ 👰‍♂️ 👰🏻‍♂️ 👰🏼‍♂️ 👰🏽‍♂️ 👰🏾‍♂️ 👰🏿‍♂️ 👩‍🍼 👩🏻‍🍼 👩🏼‍🍼 👩🏽‍🍼 👩🏾‍🍼 👩🏿‍🍼 🧑‍🍼 🧑🏻‍🍼 🧑🏼‍🍼 🧑🏽‍🍼 🧑🏾‍🍼 🧑🏿‍🍼 👨‍🍼 👨🏻‍🍼 👨🏼‍🍼 👨🏽‍🍼 👨🏾‍🍼 👨🏿‍🍼 🧑‍🎄 🧑🏻‍🎄 🧑🏼‍🎄 🧑🏽‍🎄 🧑🏾‍🎄 🧑🏿‍🎄 🫂 🐈‍⬛ 🦬 🦣 🦫 🐻‍❄️ 🦤 🪶 🦭 🪲 🪳 🪰 🪱 🪴 🫐 🫒 🫑 🫓 🫔 🫕 🫖 🧋 🪨 🪵 🛖 🛻 🛼 🪄 🪅 🪆 🪡 🪢 🩴 🪖 🪗 🪘 🪙 🪃 🪚 🪛 🪝 🪜 🛗 🪞 🪟 🪠 🪤 🪣 🪥 🪦 🪧 🏳️‍⚧️</p>\n<p>Emojis from <a href=\"https://emojipedia.org/emoji-13.1/\" title=\"New 2021 Emojis\">Emoji 13.1</a>: Added in 2021.</p>\n<p>😮‍💨 😵‍💫 😶‍🌫️ ❤️‍🔥 ❤️‍🩹 🧔‍♀️ 🧔🏻‍♀️ 🧔🏼‍♀️ 🧔🏽‍♀️ 🧔🏾‍♀️ 🧔🏿‍♀️ 🧔‍♂️ 🧔🏻‍♂️ 🧔🏼‍♂️ 🧔🏽‍♂️ 🧔🏾‍♂️ 🧔🏿‍♂️ 💑🏻 💑🏼 💑🏽 💑🏾 💑🏿 💏🏻 💏🏼 💏🏽 💏🏾 💏🏿 👨🏻‍❤️‍👨🏻 👨🏻‍❤️‍👨🏼 👨🏻‍❤️‍👨🏽 👨🏻‍❤️‍👨🏾 👨🏻‍❤️‍👨🏿 👨🏼‍❤️‍👨🏻 👨🏼‍❤️‍👨🏼 👨🏼‍❤️‍👨🏽 👨🏼‍❤️‍👨🏾 👨🏼‍❤️‍👨🏿 👨🏽‍❤️‍👨🏻 👨🏽‍❤️‍👨🏼 👨🏽‍❤️‍👨🏽 👨🏽‍❤️‍👨🏾 👨🏽‍❤️‍👨🏿 👨🏾‍❤️‍👨🏻 👨🏾‍❤️‍👨🏼 👨🏾‍❤️‍👨🏽 👨🏾‍❤️‍👨🏾 👨🏾‍❤️‍👨🏿 👨🏿‍❤️‍👨🏻 👨🏿‍❤️‍👨🏼 👨🏿‍❤️‍👨🏽 👨🏿‍❤️‍👨🏾 👨🏿‍❤️‍👨🏿 👩🏻‍❤️‍👨🏻 👩🏻‍❤️‍👨🏼 👩🏻‍❤️‍👨🏽 👩🏻‍❤️‍👨🏾 👩🏻‍❤️‍👨🏿 👩🏻‍❤️‍👩🏻 👩🏻‍❤️‍👩🏼 👩🏻‍❤️‍👩🏽 👩🏻‍❤️‍👩🏾 👩🏻‍❤️‍👩🏿 👩🏼‍❤️‍👨🏻 👩🏼‍❤️‍👨🏼 👩🏼‍❤️‍👨🏽 👩🏼‍❤️‍👨🏾 👩🏼‍❤️‍👨🏿 👩🏼‍❤️‍👩🏻 👩🏼‍❤️‍👩🏼 👩🏼‍❤️‍👩🏽 👩🏼‍❤️‍👩🏾 👩🏼‍❤️‍👩🏿 👩🏽‍❤️‍👨🏻 👩🏽‍❤️‍👨🏼 👩🏽‍❤️‍👨🏽 👩🏽‍❤️‍👨🏾 👩🏽‍❤️‍👨🏿 👩🏽‍❤️‍👩🏻 👩🏽‍❤️‍👩🏼 👩🏽‍❤️‍👩🏽 👩🏽‍❤️‍👩🏾 👩🏽‍❤️‍👩🏿 👩🏾‍❤️‍👨🏻 👩🏾‍❤️‍👨🏼 👩🏾‍❤️‍👨🏽 👩🏾‍❤️‍👨🏾 👩🏾‍❤️‍👨🏿 👩🏾‍❤️‍👩🏻 👩🏾‍❤️‍👩🏼 👩🏾‍❤️‍👩🏽 👩🏾‍❤️‍👩🏾 👩🏾‍❤️‍👩🏿 👩🏿‍❤️‍👨🏻 👩🏿‍❤️‍👨🏼 👩🏿‍❤️‍👨🏽 👩🏿‍❤️‍👨🏾 👩🏿‍❤️‍👨🏿 👩🏿‍❤️‍👩🏻 👩🏿‍❤️‍👩🏼 👩🏿‍❤️‍👩🏽 👩🏿‍❤️‍👩🏾 👩🏿‍❤️‍👩🏿 🧑🏻‍❤️‍🧑🏼 🧑🏻‍❤️‍🧑🏽 🧑🏻‍❤️‍🧑🏾 🧑🏻‍❤️‍🧑🏿 🧑🏼‍❤️‍🧑🏻 🧑🏼‍❤️‍🧑🏽 🧑🏼‍❤️‍🧑🏾 🧑🏼‍❤️‍🧑🏿 🧑🏽‍❤️‍🧑🏻 🧑🏽‍❤️‍🧑🏼 🧑🏽‍❤️‍🧑🏾 🧑🏽‍❤️‍🧑🏿 🧑🏾‍❤️‍🧑🏻 🧑🏾‍❤️‍🧑🏼 🧑🏾‍❤️‍🧑🏽 🧑🏾‍❤️‍🧑🏿 🧑🏿‍❤️‍🧑🏻 🧑🏿‍❤️‍🧑🏼 🧑🏿‍❤️‍🧑🏽 🧑🏿‍❤️‍🧑🏾 👨🏻‍❤️‍💋‍👨🏻 👨🏻‍❤️‍💋‍👨🏼 👨🏻‍❤️‍💋‍👨🏽 👨🏻‍❤️‍💋‍👨🏾 👨🏻‍❤️‍💋‍👨🏿 👨🏼‍❤️‍💋‍👨🏻 👨🏼‍❤️‍💋‍👨🏼 👨🏼‍❤️‍💋‍👨🏽 👨🏼‍❤️‍💋‍👨🏾 👨🏼‍❤️‍💋‍👨🏿 👨🏽‍❤️‍💋‍👨🏻 👨🏽‍❤️‍💋‍👨🏼 👨🏽‍❤️‍💋‍👨🏽 👨🏽‍❤️‍💋‍👨🏾 👨🏽‍❤️‍💋‍👨🏿 👨🏾‍❤️‍💋‍👨🏻 👨🏾‍❤️‍💋‍👨🏼 👨🏾‍❤️‍💋‍👨🏽 👨🏾‍❤️‍💋‍👨🏾 👨🏾‍❤️‍💋‍👨🏿 👨🏿‍❤️‍💋‍👨🏻 👨🏿‍❤️‍💋‍👨🏼 👨🏿‍❤️‍💋‍👨🏽 👨🏿‍❤️‍💋‍👨🏾 👨🏿‍❤️‍💋‍👨🏿 👩🏻‍❤️‍💋‍👨🏻 👩🏻‍❤️‍💋‍👨🏼 👩🏻‍❤️‍💋‍👨🏽 👩🏻‍❤️‍💋‍👨🏾 👩🏻‍❤️‍💋‍👨🏿 👩🏻‍❤️‍💋‍👩🏻 👩🏻‍❤️‍💋‍👩🏼 👩🏻‍❤️‍💋‍👩🏽 👩🏻‍❤️‍💋‍👩🏾 👩🏻‍❤️‍💋‍👩🏿 👩🏼‍❤️‍💋‍👨🏻 👩🏼‍❤️‍💋‍👨🏼 👩🏼‍❤️‍💋‍👨🏽 👩🏼‍❤️‍💋‍👨🏾 👩🏼‍❤️‍💋‍👨🏿 👩🏼‍❤️‍💋‍👩🏻 👩🏼‍❤️‍💋‍👩🏼 👩🏼‍❤️‍💋‍👩🏽 👩🏼‍❤️‍💋‍👩🏾 👩🏼‍❤️‍💋‍👩🏿 👩🏽‍❤️‍💋‍👨🏻 👩🏽‍❤️‍💋‍👨🏼 👩🏽‍❤️‍💋‍👨🏽 👩🏽‍❤️‍💋‍👨🏾 👩🏽‍❤️‍💋‍👨🏿 👩🏽‍❤️‍💋‍👩🏻 👩🏽‍❤️‍💋‍👩🏼 👩🏽‍❤️‍💋‍👩🏽 👩🏽‍❤️‍💋‍👩🏾 👩🏽‍❤️‍💋‍👩🏿 👩🏾‍❤️‍💋‍👨🏻 👩🏾‍❤️‍💋‍👨🏼 👩🏾‍❤️‍💋‍👨🏽 👩🏾‍❤️‍💋‍👨🏾 👩🏾‍❤️‍💋‍👨🏿 👩🏾‍❤️‍💋‍👩🏻 👩🏾‍❤️‍💋‍👩🏼 👩🏾‍❤️‍💋‍👩🏽 👩🏾‍❤️‍💋‍👩🏾 👩🏾‍❤️‍💋‍👩🏿 👩🏿‍❤️‍💋‍👨🏻 👩🏿‍❤️‍💋‍👨🏼 👩🏿‍❤️‍💋‍👨🏽 👩🏿‍❤️‍💋‍👨🏾 👩🏿‍❤️‍💋‍👨🏿 👩🏿‍❤️‍💋‍👩🏻 👩🏿‍❤️‍💋‍👩🏼 👩🏿‍❤️‍💋‍👩🏽 👩🏿‍❤️‍💋‍👩🏾 👩🏿‍❤️‍💋‍👩🏿 🧑🏻‍❤️‍💋‍🧑🏼 🧑🏻‍❤️‍💋‍🧑🏽 🧑🏻‍❤️‍💋‍🧑🏾 🧑🏻‍❤️‍💋‍🧑🏿 🧑🏼‍❤️‍💋‍🧑🏻 🧑🏼‍❤️‍💋‍🧑🏽 🧑🏼‍❤️‍💋‍🧑🏾 🧑🏼‍❤️‍💋‍🧑🏿 🧑🏽‍❤️‍💋‍🧑🏻 🧑🏽‍❤️‍💋‍🧑🏼 🧑🏽‍❤️‍💋‍🧑🏾 🧑🏽‍❤️‍💋‍🧑🏿 🧑🏾‍❤️‍💋‍🧑🏻 🧑🏾‍❤️‍💋‍🧑🏼 🧑🏾‍❤️‍💋‍🧑🏽 🧑🏾‍❤️‍💋‍🧑🏿 🧑🏿‍❤️‍💋‍🧑🏻 🧑🏿‍❤️‍💋‍🧑🏼 🧑🏿‍❤️‍💋‍🧑🏽 🧑🏿‍❤️‍💋‍🧑🏾</p>"},{"url":"/docs/quick-reference/","relativePath":"docs/quick-reference/index.md","relativeDir":"docs/quick-reference","base":"index.md","name":"index","frontmatter":{"title":"QuickRef","excerpt":"In this section you'll find basic information about Web-Dev-Hub and how to use it.","seo":{"title":"Cheat Sheets","description":"This is the Cheat Sheets page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Cheat Sheets","keyName":"property"},{"name":"og:description","value":"This is the Cheat Sheets page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Cheat Sheets"},{"name":"twitter:description","value":"This is the Cheat Sheets page"}]},"template":"docs"},"html":"<h1>Quick Reference</h1>\n<iframe src=\"https://cheatsheets-42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<iframe src=\"https://bgoonz-bookmarks.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<iframe src=\"https://search-awesome.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<iframe src=\"https://sidebar-blog.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>"},{"url":"/docs/quick-reference/markdown-dropdowns/","relativePath":"docs/quick-reference/markdown-dropdowns.md","relativeDir":"docs/quick-reference","base":"markdown-dropdowns.md","name":"markdown-dropdowns","frontmatter":{"title":"Markdown Dropdown","weight":0,"excerpt":"Markdown Dropdown","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Markdown Dropdown:</h1>\n<details>\n<summary>How do I dropdown?</summary>\n<br>\nThis is how you dropdown.\n<br>\n<br>\n<pre>\n&lt;details&gt;\n&lt;summary&gt;How do I dropdown?&lt;&#47;summary&gt;\n&lt;br&gt;\nThis is how you dropdown.\n&lt;&#47;details&gt;\n</pre>\n</details>\n<hr>\n<details open>\n<summary>Want to ruin the surprise?</summary>\n<br>\nWell, you asked for it!\n<br>\n<br>\n<pre>\n&lt;details open&gt;\n&lt;summary&gt;Want to ruin the surprise?&lt;&#47;summary&gt;\n&lt;br&gt;\nWell, you asked for it!\n&lt;&#47;details&gt;\n</pre>\n</details>"},{"url":"/docs/quick-reference/installation/","relativePath":"docs/quick-reference/installation.md","relativeDir":"docs/quick-reference","base":"installation.md","name":"installation","frontmatter":{"title":"Installation","weight":0,"seo":{"title":"Installation","description":"This is the installation page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Installation","keyName":"property"},{"name":"og:description","value":"This is the installation page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Installation"},{"name":"twitter:description","value":"This is the installation page"}]},"template":"docs"},"html":"<h1>Basic Web Development Environment Setup</h1>\n<blockquote>\n<p>Windows Subsystem for Linux (WSL) and Ubuntu</p>\n</blockquote>\n<h2>Windows Subsystem for Linux (WSL) and Ubuntu</h2>\n<p><a href=\"https://bryanguner.medium.com/?source=post_page-----9f36c3f15afe--------------------------------\"><img src=\"https://miro.medium.com/fit/c/96/96/1*ao1cHo7EQ4faDV8YNJwh_Q.png\" alt=\"Bryan Guner\"></a></p>\n<p><img src=\"https://miro.medium.com/max/60/0*aqKP1drNHmNm34zz.jpg?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/1600/0*aqKP1drNHmNm34zz.jpg\"></p>\n<p>Test if you have Ubuntu installed by typing “Ubuntu” in the search box in the bottom app bar that reads “Type here to search”. If you see a search result that reads <strong>“Ubuntu 20.04 LTS”</strong> with “App” under it, then you have it installed.</p>\n<ol>\n<li>In the application search box in the bottom bar, type “PowerShell” to find the application named “Windows PowerShell”</li>\n<li>Right-click on “Windows PowerShell” and choose “Run as administrator” from the popup menu</li>\n<li>In the blue PowerShell window, type the following: <code>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux</code></li>\n<li>Restart your computer</li>\n<li>In the application search box in the bottom bar, type “Store” to find the application named “Microsoft Store”</li>\n<li>Click “Microsoft Store”</li>\n<li>Click the “Search” button in the upper-right corner of the window</li>\n<li>Type in “Ubuntu”</li>\n<li>Click “Run Linux on Windows (Get the apps)”</li>\n<li>Click the orange tile labeled <strong>“Ubuntu”</strong> Note that there are 3 versions in the Microsoft Store… you want the one just entitled 'Ubuntu'</li>\n<li>Click “Install”</li>\n<li>After it downloads, click “Launch”</li>\n<li>If you get the option, pin the application to the task bar. Otherwise, right-click on the orange Ubuntu icon in the task bar and choose “Pin to taskbar”</li>\n<li>When prompted to “Enter new UNIX username”, type your first name with no spaces</li>\n<li>When prompted, enter and retype a password for this UNIX user (it can be the same as your Windows password)</li>\n<li>Confirm your installation by typing the command <code>whoami 'as in who-am-i'</code>followed by Enter at the prompt (it should print your first name)</li>\n<li>You need to update your packages, so type <code>sudo apt update</code> (if prompted for your password, enter it)</li>\n<li>You need to upgrade your packages, so type <code>sudo apt upgrade</code> (if prompted for your password, enter it)</li>\n</ol>\n<p>Git comes with Ubuntu, so there's nothing to install. However, you should configure it using the following instructions.</p>\n<p>‌Open an Ubuntu terminal if you don't have one open already.</p>\n<ol>\n<li>You need to configure Git, so type <code>git config --global user.name \"Your Name\"</code> with replacing \"Your Name\" with your real name.</li>\n<li>You need to configure Git, so type <code>git config --global user.email your@email.com</code> with replacing \"<a href=\"mailto:your@email.com\">your@email.com</a>\" with your real email.</li>\n</ol>\n<p><strong>Note: if you want git to remember your login credentials type:</strong></p>\n<p>$ git config --global credential.helper store</p>\n<p>Test if you have Chrome installed by typing “Chrome” in the search box in the bottom app bar that reads “Type here to search”. If you see a search result that reads “Chrome” with “App” under it, then you have it installed. Otherwise, follow these instructions to install Google Chrome.</p>\n<ol>\n<li>Open Microsoft Edge, the blue “e” in the task bar, and type in <a href=\"http://chrome.google.com/\">http://chrome.google.com</a>. Click the “Download Chrome” button. Click the “Accept and Install” button after reading the terms of service. Click “Save” in the “What do you want to do with ChromeSetup.exe” dialog at the bottom of the window. When you have the option to “Run” it, do so. Answer the questions as you'd like. Set it as the default browser.</li>\n<li>Right-click on the Chrome icon in the task bar and choose “Pin to taskbar”.</li>\n</ol>\n<p>Test if you have Node.js installed by opening an Ubuntu terminal and typing <code>node --version</code>. If it reports \"Command 'node' not found\", then you need to follow these directions.</p>\n<ol>\n<li>In the Ubuntu terminal, type <code>sudo apt update</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>sudo apt install build-essential</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>. ./.bashrc</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>nvm install --lts</code> and press Enter</li>\n<li>Confirm that <strong>node</strong> is installed by typing <code>node --version</code> and seeing it print something that is not \"Command not found\"!</li>\n</ol>\n<p>You will often have to download a zip file and unzip it. It is easier to do this from the command line. So we need to install a linux unzip utility.</p>\n<p>‌In the Ubuntu terminal type: <code>sudo apt install unzip</code> and press Enter</p>\n<p>‌Mocha.js</p>\n<p>Test if you have Mocha.js installed by opening an Ubuntu terminal and typing <code>which mocha</code>. If it prints a path, then you're good. Otherwise, if it prints nothing, install Mocha.js by typing <code>npm install -g mocha</code>.</p>\n<p>Ubuntu does not come with Python 3. Install it using the command <code>sudo apt install python3</code>. Test it by typing <code>python3 --version</code> and seeing it print a number.</p>\n<p>‌</p>\n<p>As of the time of writing of this document, WSL has an issue renaming or deleting files if Visual Studio Code is open. So before doing any linux commands which manipulate files, make sure you <strong>close</strong> Visual Studio Code before running those commands in the Ubuntu terminal.</p>\n<p># Installing build essentials<br>\nsudo apt-get install -y build-essential libssl-dev<br>\n# Nodejs and NVM<br>\ncurl -o- <a href=\"https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh\">https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh</a> | bash<br>\nsource ~/.profile<br>\nsudo nvm install 7.10.0<br>\nsudo nvm use 7.10.0<br>\nnode -v  </p>\n<h1>nodemon</h1>\n<p>sudo npm install -g nodemon<br>\nsudo npm install -g loopback-cli<br>\n# Forever to run nodejs scripts forever<br>\nsudo npm install forever -g<br>\n# Git - a version control system<br>\nsudo apt-get update<br>\nsudo apt-get install -y git xclip<br>\n# Grunt - an automated task runner<br>\nsudo npm install -g grunt-cli<br>\n# Bower - a dependency manager<br>\nsudo npm install -g bower<br>\n# Yeoman - for generators<br>\nsudo npm install -g yo<br>\n# maven<br>\nsudo apt-get install maven -y<br>\n# Gulp - an automated task runner<br>\nsudo npm install -g gulp-cli<br>\n# Angular FullStack - My favorite MEAN boilerplate (MEAN = MongoDB, Express, Angularjs, Nodejs)<br>\nsudo npm install -g generator-angular-fullstack<br>\n# Vim, Curl, Python - Some random useful stuff<br>\nsudo apt-get install -y vim curl python-software-properties<br>\nsudo apt-get install -y python-dev, python-pip<br>\nsudo apt-get install -y libkrb5-dev<br>\n# Installing JDK and JRE<br>\nsudo apt-get install -y default-jre<br>\nsudo apt-get install -y default-jdk<br>\n# Archive Extractors<br>\nsudo apt-get install -y unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller<br>\n# FileZilla - a FTP client<br>\nsudo apt-get install -y filezilla</p>\n<h2>If you found this guide helpful feel free to checkout my github/gists where I host similar content:</h2>\n<p><a href=\"https://gist.github.com/bgoonz\">bgoonz's gists · GitHub</a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://levelup.gitconnected.com/basic-web-development-environment-setup-9f36c3f15afe\">Source</a></p>"},{"url":"/docs/quick-reference/minifiction/","relativePath":"docs/quick-reference/minifiction.md","relativeDir":"docs/quick-reference","base":"minifiction.md","name":"minifiction","frontmatter":{"title":"How To Minify Code For Better Web Performance ","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>In production, it is recommended to minify any JavaScript code that is included with your application. <strong>Minification can help your website load several times faster,</strong> especially as the size of your JavaScript source code grows.</p>\n<p>Here's one way to set it up:</p>\n<ol>\n<li><a href=\"https://nodejs.org/\">Install Node.js</a></li>\n<li>Run npm init -y in your project folder (<strong>don't skip this step!</strong>)</li>\n<li>Run npm install terser</li>\n</ol>\n<p>Now, to minify a file called like_button.js, run in the terminal:</p>\n<p>This will produce a file called like_button.min.js with the minified code in the same directory. If you're typing this often, you can <a href=\"https://medium.freecodecamp.org/introduction-to-npm-scripts-1dbb2ae01633\">create an npm script</a> to give this command a name.</p>\n<h2>How to Minify Your Minify your HTML, CSS and JavaScript Using an Online Tool\n\n</h2>\n<p>Many of these online tools have a similar process which involve the following steps:</p>\n<p>Paste in your source code or upload the source code file.\nOptimize the settings for a specific output (if options are available)\nClick a button to minify or compress the code.\nCopy the minified code output or download the minified code file.</p>\n<p>For this example, I'm going to use the minify tools from minifycode.com.</p>\n<p>First, locate the css file (commonly named style.css) in your site files and open the file using a page editor. Then copy the entire css code to your clipboard.</p>\n<p><img src=\"https://www.elegantthemes.com/blog/wp-content/uploads/2018/12/min4.png\"></p>\n<p>Go to <a href=\"http://minifycode.com/css-minifier/\">minifycode.com</a> and click the CSS minifier tab. Then paste the CSS code into the input box and click the Minify CSS button.</p>\n<p><img src=\"https://www.elegantthemes.com/blog/wp-content/uploads/2018/12/min5.png\"></p>\n<p>After the new minified code is generated, copy the code.</p>\n<p><img src=\"https://www.elegantthemes.com/blog/wp-content/uploads/2018/12/min6.png\"></p>\n<p>Then go back to the css file of your website and replace the code with the new minified version.</p>\n<p>That's it!</p>\n<p>Repeat the same process to minify your site's JavaScript and Html file(s) as well.</p>\n<h3>Overview\n\n</h3>\n<p>Minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser - e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on.</p>\n<p>See <a href=\"https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/optimize-encoding-and-transfer#minification-preprocessing--context-specific-optimizations\">preprocessing &#x26; context-specific optimizations</a> to learn more.</p>\n<h3>Recommendations</h3>\n<p>You should minify your HTML, CSS, and JavaScript resources:</p>\n<ul>\n<li>To minify HTML, try <a href=\"https://github.com/kangax/html-minifier\">HTMLMinifier</a></li>\n<li>To minify CSS, try <a href=\"https://github.com/ben-eb/cssnano\">CSSNano</a> and <a href=\"https://github.com/css/csso\">csso</a>.</li>\n<li>To minify JavaScript, try <a href=\"https://github.com/mishoo/UglifyJS2\">UglifyJS</a>. The <a href=\"https://developers.google.com/closure/compiler\">Closure Compiler</a> is also <a href=\"https://github.com/samccone/The-cost-of-transpiling-es2015-in-2016#summary-of-findings\">very effective</a>. You can create a build process that uses these tools to minify and rename the development files and save them to a production directory.</li>\n</ul>\n<p>Alternatively, the <a href=\"https://developers.google.com/speed/pagespeed/module\">PageSpeed Module</a>, integrates with an Apache or Nginx web server to automatically optimize your site, including resource minification.</p>"},{"url":"/docs/quick-reference/new-repo-instructions/","relativePath":"docs/quick-reference/new-repo-instructions.md","relativeDir":"docs/quick-reference","base":"new-repo-instructions.md","name":"new-repo-instructions","frontmatter":{"title":"new-repo-git","weight":0,"seo":{"title":"new-repo-git","description":"This is the new-repo-git page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"new-repo-git","keyName":"property"},{"name":"og:description","value":"This is the new-repo-git page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"new-repo-git"},{"name":"twitter:description","value":"This is the new-repo-git page"}]},"template":"docs"},"html":"<h3>...or create a new repository on the command line</h3>\n<pre><code>echo \"# React-Self-Study\" >> README.md\ngit init\ngit add README.md\ngit commit -m \"first commit\"\ngit branch -M master\ngit remote add origin https://github.com/bgoonz/React-Self-Study.git\ngit push -u origin master\n</code></pre>\n<h3>...or push an existing repository from the command line</h3>\n<pre><code>git remote add origin https://github.com/bgoonz/React-Self-Study.git\ngit branch -M master\ngit push -u origin master\n</code></pre>\n<h3>...or import code from another repository</h3>\n<p>You can initialize this repository with code from a Subversion, Mercurial, or TFS project.</p>"},{"url":"/docs/quick-reference/quick-links/","relativePath":"docs/quick-reference/quick-links.md","relativeDir":"docs/quick-reference","base":"quick-links.md","name":"quick-links","frontmatter":{"title":"Quick Links","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Gitbook Websites:</h1>\n<ul>\n<li><a href=\"https://bryan-guner.gitbook.io/datastructures-in-pytho/\">Python</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/web-dev-hub-docs/\">General</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/solidarity-blockchain-nfts/\">Blockchain &#x26; NFTs</a></li>\n<li><a href=\"https://bryan-guner.gitbook.io/mynotes/\">React</a></li>\n</ul>\n<h1>Sites I Wish To Revisit:</h1>\n<ul>\n<li><a href=\"https://hasura.io/learn/\">Hasura</a></li>\n</ul>"},{"url":"/docs/quick-reference/heroku-error-codes/","relativePath":"docs/quick-reference/heroku-error-codes.md","relativeDir":"docs/quick-reference","base":"heroku-error-codes.md","name":"heroku-error-codes","frontmatter":{"title":"Heroku Error Codes","weight":0,"excerpt":"Full List Of Heroku Error Codes","seo":{"title":"","description":"embeded developer tools and utilities","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Heroku Error Codes</h1>\n<p>Last updated August 04, 2021</p>\n<h2>Table of Contents</h2>\n<ul>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h10-app-crashed\">H10 - App crashed</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h11-backlog-too-deep\">H11 - Backlog too deep</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h12-request-timeout\">H12 - Request timeout</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h13-connection-closed-without-response\">H13 - Connection closed without response</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running\">H14 - No web dynos running</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h15-idle-connection\">H15 - Idle connection</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h16-no-longer-in-use\">H16 - (No Longer in Use)</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h17-poorly-formatted-http-response\">H17 - Poorly formatted HTTP response</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h18-server-request-interrupted\">H18 - Server Request Interrupted</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h19-backend-connection-timeout\">H19 - Backend connection timeout</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout\">H20 - App boot timeout</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h21-backend-connection-refused\">H21 - Backend connection refused</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h22-connection-limit-reached\">H22 - Connection limit reached</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h23-endpoint-misconfigured\">H23 - Endpoint misconfigured</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h24-forced-close\">H24 - Forced close</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h25-http-restriction\">H25 - HTTP Restriction</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h26-request-error\">H26 - Request Error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h27-client-request-interrupted\">H27 - Client Request Interrupted</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h28-client-connection-idle\">H28 - Client Connection Idle</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h31-misdirected-request\">H31 - Misdirected Request</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h80-maintenance-mode\">H80 - Maintenance mode</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h81-blank-app\">H81 - Blank app</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h82-free-dyno-quota-exhausted\">H82 - Free dyno quota exhausted</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#h99-platform-error\">H99 - Platform error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout\">R10 - Boot timeout</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r12-exit-timeout\">R12 - Exit timeout</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r13-attach-error\">R13 - Attach error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r14-memory-quota-exceeded\">R14 - Memory quota exceeded</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r15-memory-quota-vastly-exceeded\">R15 - Memory quota vastly exceeded</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r16-detached\">R16 - Detached</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r17-checksum-error\">R17 - Checksum error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#r99-platform-error\">R99 - Platform error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#l10-drain-buffer-overflow\">L10 - Drain buffer overflow</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#l11-tail-buffer-overflow\">L11 - Tail buffer overflow</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#l12-local-buffer-overflow\">L12 - Local buffer overflow</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#l13-local-delivery-error\">L13 - Local delivery error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#l14-certificate-validation-error\">L14 - Certificate validation error</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/error-codes#l15-tail-buffer-temporarily-unavailable\">L15 - Tail buffer temporarily unavailable</a></li>\n</ul>\n<p>Whenever your app experiences an error, Heroku will return a standard error page with the HTTP status code 503. To help you debug the underlying error, however, the platform will also add custom error information to your logs. Each type of error gets its own error code, with all HTTP errors starting with the letter H and all runtime errors starting with R. Logging errors start with L.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h10-app-crashed\">H10 - App crashed</a></h2>\n<p>A crashed web dyno or a boot timeout on the web dyno will present this error.</p>\n<pre><code>2010-10-06T21:51:04-07:00 heroku[web.1]: State changed from down to starting\n2010-10-06T21:51:07-07:00 app[web.1]: Starting process with command: `bundle exec rails server -p 22020`\n2010-10-06T21:51:09-07:00 app[web.1]: >> Using rails adapter\n2010-10-06T21:51:09-07:00 app[web.1]: Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.\n2010-10-06T21:51:10-07:00 heroku[web.1]: Process exited\n2010-10-06T21:51:12-07:00 heroku[router]: at=error code=H10 desc=\"App crashed\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h11-backlog-too-deep\">H11 - Backlog too deep</a></h2>\n<p>When HTTP requests arrive faster than your application can process them, they can form a large backlog on a number of routers. When the backlog on a particular router passes a threshold, the router determines that your application isn't keeping up with its incoming request volume. You'll see an H11 error for each incoming request as long as the backlog is over this size. The exact value of this threshold may change depending on various factors, such as the number of dynos in your app, response time for individual requests, and your app's normal request volume.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H11 desc=\"Backlog too deep\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<p>The solution is to increase your app's throughput by adding more dynos, tuning your database (for example, adding an index), or making the code itself faster. As always, increasing performance is highly application-specific and requires profiling.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h12-request-timeout\">H12 - Request timeout</a></h2>\n<p>For more information on request timeouts (including recommendations for resolving them), take a look at <a href=\"https://devcenter.heroku.com/articles/request-timeout\">our article on the topic</a>.</p>\n<p>An HTTP <a href=\"https://devcenter.heroku.com/articles/request-timeout\">request took longer than 30 seconds</a> to complete. In the example below, a Rails app takes 37 seconds to render the page; the HTTP router returns a 503 prior to Rails completing its request cycle, but the Rails process continues and the completion message shows after the router message.</p>\n<pre><code>2010-10-06T21:51:07-07:00 app[web.2]: Processing PostController#list (for 75.36.147.245 at 2010-10-06 21:51:07) [GET]\n2010-10-06T21:51:08-07:00 app[web.2]: Rendering template within layouts/application\n2010-10-06T21:51:19-07:00 app[web.2]: Rendering post/list\n2010-10-06T21:51:37-07:00 heroku[router]: at=error code=H12 desc=\"Request timeout\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=6ms service=30001ms status=503 bytes=0\n2010-10-06T21:51:42-07:00 app[web.2]: Completed in 37000ms (View: 27, DB: 21) | 200 OK [http://myapp.heroku.com/]\n</code></pre>\n<p>This 30-second limit is measured by the router, and includes all time spent in the dyno, including the kernel's incoming connection queue and the app itself.</p>\n<p>See <a href=\"https://devcenter.heroku.com/articles/request-timeout\">Request Timeout</a> for more, as well as a language-specific article on this error:</p>\n<ul>\n<li><a href=\"https://devcenter.heroku.com/articles/h12-request-timeout-in-ruby-mri\">H12 - Request Timeout in Ruby (MRI)</a></li>\n</ul>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h13-connection-closed-without-response\">H13 - Connection closed without response</a></h2>\n<p>This error is thrown when a process in your web dyno accepts a connection but then closes the socket without writing anything to it.</p>\n<pre><code>2010-10-06T21:51:37-07:00 heroku[router]: at=error code=H13 desc=\"Connection closed without response\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=3030ms service=9767ms status=503 bytes=0\n</code></pre>\n<p>One example where this might happen is when a <a href=\"https://devcenter.heroku.com/articles/rails-unicorn\">Unicorn web server</a> is configured with a timeout shorter than 30s and a request has not been processed by a worker before the timeout happens. In this case, Unicorn closes the connection before any data is written, resulting in an H13.</p>\n<p>An <a href=\"https://github.com/hunterloftis/heroku-node-errcodes/tree/master/h13\">example of an H13 can be found here</a>.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running\">H14 - No web dynos running</a></h2>\n<p>This is most likely the result of scaling your web dynos down to 0 dynos. To fix it, scale your web dynos to 1 or more dynos:</p>\n<pre><code>$ heroku ps:scale web=1\n</code></pre>\n<p>Use the <code>heroku ps</code> command to determine the state of your web dynos.</p>\n<pre><code>2010-10-06T21:51:37-07:00 heroku[router]: at=error code=H14 desc=\"No web processes running\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h15-idle-connection\">H15 - Idle connection</a></h2>\n<p>The dyno did not send a full response and was <a href=\"https://devcenter.heroku.com/articles/request-timeout\">terminated due to 55 seconds of inactivity</a>. For example, the response indicated a <code>Content-Length</code> of 50 bytes which were not sent in time.</p>\n<pre><code>2010-10-06T21:51:37-07:00 heroku[router]: at=error code=H15 desc=\"Idle connection\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service=55449ms status=503 bytes=18\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h16-no-longer-in-use\">H16 - (No Longer in Use)</a></h2>\n<p>Heroku no longer emits H16 errors</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h17-poorly-formatted-http-response\">H17 - Poorly formatted HTTP response</a></h2>\n<p>Our HTTP routing stack has no longer accepts responses that are missing a reason phrase in the <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2\">status line</a>. 'HTTP/1.1 200 OK' will work with the new router, but 'HTTP/1.1 200' will not.</p>\n<p>This error message is logged when a router detects a malformed HTTP response coming from a dyno.</p>\n<pre><code>2010-10-06T21:51:37-07:00 heroku[router]: at=error code=H17 desc=\"Poorly formatted HTTP response\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service=1ms status=503 bytes=0\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h18-server-request-interrupted\">H18 - Server Request Interrupted</a></h2>\n<p>An H18 signifies that the socket connected, some data was sent as part of a response by the app, but then the socket was destroyed without completing the response.</p>\n<pre><code>2010-10-06T21:51:37-07:00 heroku[router]: sock=backend at=error code=H18 desc=\"Server Request Interrupted\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service=1ms status=503 bytes=0\n</code></pre>\n<p>An <a href=\"https://github.com/hunterloftis/heroku-node-errcodes/tree/master/h18\">example of an H18 can be found here</a>.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h19-backend-connection-timeout\">H19 - Backend connection timeout</a></h2>\n<p>A router received a connection timeout error after 5 seconds attempting to open a socket to a web dyno. This is usually a symptom of your app being overwhelmed and failing to accept new connections in a timely manner. If you have multiple dynos, the router will retry multiple dynos before logging H19 and serving a standard error page.</p>\n<p>If your app has a single web dyno, it is possible to see H19 errors if the runtime instance running your web dyno fails and is replaced. Once the failure is detected and the instance is terminated your web dyno will be restarted somewhere else, but in the meantime, H19s may be served as the router fails to establish a connection to your dyno. This can be mitigated by running more than one web dyno.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H19 desc=\"Backend connection timeout\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=5001ms service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout\">H20 - App boot timeout</a></h2>\n<p>The router will enqueue requests for 75 seconds while waiting for starting processes to reach an \"up\" state. If after 75 seconds, no web dynos have reached an \"up\" state, the router logs H20 and serves a standard error page.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H20 desc=\"App boot timeout\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<p>The Ruby on Rails <a href=\"http://guides.rubyonrails.org/asset_pipeline.html\">asset pipeline</a> can sometimes fail to run during <a href=\"https://devcenter.heroku.com/articles/git\">git push</a>, and will instead attempt to run when your app's <a href=\"https://devcenter.heroku.com/articles/dynos\">dynos</a> boot. Since the Rails asset pipeline is a slow process, this can cause H20 boot timeout errors.</p>\n<p>This error differs from <a href=\"https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout\">R10</a> in that the H20 75-second timeout includes platform tasks such as internal state propagation, requests between internal components, slug download, unpacking, container preparation, etc... The R10 60-second timeout applies solely to application startup tasks.</p>\n<p>If your application requires more time to boot, you may use the <a href=\"https://tools.heroku.support/limits/boot_timeout\">boot timeout tool</a> to increase the limit. However, in general, slow boot times will make it harder to deploy your application and will make recovery from dyno failures slower, so this should be considered a <em>temporary solution</em>.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h21-backend-connection-refused\">H21 - Backend connection refused</a></h2>\n<p>A router received a connection refused error when attempting to open a socket to your web process. This is usually a symptom of your app being overwhelmed and failing to accept new connections. If you have multiple dynos, the router will retry multiple dynos before logging H21 and serving a standard error page.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H21 desc=\"Backend connection refused\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h22-connection-limit-reached\">H22 - Connection limit reached</a></h2>\n<p>A routing node has detected an elevated number of HTTP client connections attempting to reach your app. Reaching this threshold most likely means your app is under heavy load and is not responding quickly enough to keep up. The exact value of this threshold may change depending on various factors, such as the number of dynos in your app, response time for individual requests, and your app's normal request volume.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H22 desc=\"Connection limit reached\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h23-endpoint-misconfigured\">H23 - Endpoint misconfigured</a></h2>\n<p>A routing node has detected a <a href=\"https://tools.ietf.org/html/rfc6455#section-1.3\">websocket handshake</a>, specifically the 'Sec-Websocket-Version' header in the request, that came from an endpoint (upstream proxy) that does not support websockets.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H23 desc=\"Endpoint misconfigured\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h24-forced-close\">H24 - Forced close</a></h2>\n<p>The routing node serving this request was either shutdown for maintenance or terminated before the request completed.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H24 desc=\"Forced close\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service=80000ms status= bytes=18\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h25-http-restriction\">H25 - HTTP Restriction</a></h2>\n<p>This error is logged when a routing node detects and blocks a valid HTTP response that is judged risky or too large to be safely parsed. The error comes in four types.</p>\n<p>Currently, this functionality is experimental, and is only made available to a subset of applications on the platform.</p>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#invalid-content-length\">Invalid content length</a></h3>\n<p>The response has multiple content lengths declared within the same response, with varying lengths.</p>\n<pre><code>2014-03-20T14:22:00.203382+00:00 heroku[router]: at=error code=H25 desc=\"HTTP restriction: invalid content length\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=3f336f1a-9be3-4791-afe3-596a1f2a481f fwd=\"17.17.17.17\" dyno=web.1 connect=0 service=1 status=502 bytes=537\n</code></pre>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#oversized-cookies\">Oversized cookies</a></h3>\n<p>The cookie in the response will be too large to be used again in a request to the Heroku router or SSL endpoints.</p>\n<pre><code>2014-03-20T14:18:57.403882+00:00 heroku[router]: at=error code=H25 desc=\"HTTP restriction: oversized cookie\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=90cfbbd2-0397-4bab-828f-193050a076c4 fwd=\"17.17.17.17\" dyno=web.1 connect=0 service=2 status=502 bytes=537\n</code></pre>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#oversized-header\">Oversized header</a></h3>\n<p>A single header line is deemed too long (over 512kb) and the response is discarded on purpose.</p>\n<pre><code>2014-03-20T14:12:28.555073+00:00 heroku[router]: at=error code=H25 desc=\"HTTP restriction: oversized header\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=ab66646e-84eb-47b8-b3bb-2031ecc1bc2c fwd=\"17.17.17.17\" dyno=web.1 connect=0 service=397 status=502 bytes=542\n</code></pre>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#oversized-status-line\">Oversized status line</a></h3>\n<p>The status line is judged too long (8kb) and the response is discarded on purpose.</p>\n<pre><code>2014-03-20T13:54:44.423083+00:00 heroku[router]: at=error code=H25 desc=\"HTTP restriction: oversized status line\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=208588ac-1a66-44c1-b665-fe60c596241b fwd=\"17.17.17.17\" dyno=web.1 connect=0 service=3 status=502 bytes=537\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h26-request-error\">H26 - Request Error</a></h2>\n<p>This error is logged when a request has been identified as belonging to a specific Heroku application, but cannot be delivered entirely to a dyno due to HTTP protocol errors in the request. Multiple possible causes can be identified in the log message.</p>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#unsupported-expect-header-value\">Unsupported expect header value</a></h3>\n<p>The request has an <code>expect</code> header, and its value is not <code>100-Continue</code>, the only expect value handled by the router. A request with an unsupported <code>expect</code> value is terminated with the status code <code>417 Expectation Failed</code>.</p>\n<pre><code>2014-05-14T17:17:37.456997+00:00 heroku[router]: at=error code=H26 desc=\"Request Error\" cause=\"unsupported expect header value\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=3f336f1a-9be3-4791-afe3-596a1f2a481f fwd=\"17.17.17.17\" dyno= connect= service= status=417 bytes=\n</code></pre>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#bad-header\">Bad header</a></h3>\n<p>The request has an HTTP header with a value that is either impossible to parse, or not handled by the router, such as <code>connection: ,</code>.</p>\n<pre><code>2014-05-14T17:17:37.456997+00:00 heroku[router]: at=error code=H26 desc=\"Request Error\" cause=\"bad header\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=3f336f1a-9be3-4791-afe3-596a1f2a481f fwd=\"17.17.17.17\" dyno= connect= service= status=400 bytes=\n</code></pre>\n<h3><a href=\"https://devcenter.heroku.com/articles/error-codes#bad-chunk\">Bad chunk</a></h3>\n<p>The request has a chunked transfer-encoding, but with a chunk that was invalid or couldn't be parsed correctly. A request with this status code will be interrupted during transfer to the dyno.</p>\n<pre><code>2014-05-14T17:17:37.456997+00:00 heroku[router]: at=error code=H26 desc=\"Request Error\" cause=\"bad chunk\" method=GET path=\"/\" host=myapp.herokuapp.com request_id=3f336f1a-9be3-4791-afe3-596a1f2a481f fwd=\"17.17.17.17\" dyno=web.1 connect=1 service=0 status=400 bytes=537\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h27-client-request-interrupted\">H27 - Client Request Interrupted</a></h2>\n<p>The client socket was closed either in the middle of the request or before a response could be returned. For example, the client closed their browser session before the request was able to complete.</p>\n<pre><code>2010-10-06T21:51:37-07:00 heroku[router]: sock=client at=warning code=H27 desc=\"Client Request Interrupted\" method=POST path=\"/submit/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service=0ms status=499 bytes=0\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h28-client-connection-idle\">H28 - Client Connection Idle</a></h2>\n<p>The client did not send a full request and was <a href=\"https://devcenter.heroku.com/articles/request-timeout#long-polling-and-streaming-responses\">terminated due to 55 seconds of inactivity</a>. For example, the client indicated a <code>Content-Length</code> of 50 bytes which were not sent in time.</p>\n<p><code>2010-10-06T21:51:37-07:00 heroku[router]: at=warning code=H28 desc=\"Client Connection Idle\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno=web.1 connect=1ms service=55449ms status=499 bytes=18</code></p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h31-misdirected-request\">H31 - Misdirected Request</a></h2>\n<p>The client sent a request to the wrong endpoint. This could be because the client used stale DNS information or is accessing the app through a CDN that has stale DNS information. Verify that <a href=\"https://devcenter.heroku.com/articles/custom-domains\">DNS is correctly configured for your app</a>. If a CDN is configured for the app, consider contacting your CDN provider.</p>\n<p>If you and your app users can successfully access the app in a browser (or however the app is used), this may not be cause for concern. The errors may be caused by clients (typically web-crawlers) with cached DNS entries trying to access a now-invalid endpoint or IP address for your app.</p>\n<p>You can verify the validity of user agent through the app log error message as shown in the example below:</p>\n<pre><code>error code=H31 desc=\"Misdirected Request\" method=GET path=\"/\" host=[host.com] request_id=[guid] fwd=\"[IP]\" dyno= connect= service= status=421 bytes= protocol=http agent=\"&#x3C;agent>\"\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h80-maintenance-mode\">H80 - Maintenance mode</a></h2>\n<p>This is not an error, but we give it a code for the sake of completeness. Note the log formatting is the same but without the word \"Error\".</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=info code=H80 desc=\"Maintenance mode\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h81-blank-app\">H81 - Blank app</a></h2>\n<p>No code has been pushed to this application. To get rid of this message you need to do one <a href=\"https://devcenter.heroku.com/articles/git#deploying-code\">deploy</a>. This is not an error, but we give it a code for the sake of completeness.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=info code=H81 desc=\"Blank app\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h82-free-dyno-quota-exhausted\">H82 - Free dyno quota exhausted</a></h2>\n<p>This indicates that an account's <a href=\"https://devcenter.heroku.com/articles/free-dyno-hours\">free dyno hour quota</a> is exhausted and that apps running free dynos are sleeping. You can view your app's free dyno usage in the <a href=\"https://dashboard.heroku.com/account/billing\">Heroku dashboard</a>.</p>\n<pre><code>2015-10-06T21:51:07-07:00 heroku[router]: at=info code=H82 desc=\"Free dyno quota exhausted\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#h99-platform-error\">H99 - Platform error</a></h2>\n<p>H99 and R99 are the only error codes that represent errors in the Heroku platform.</p>\n<p>This indicates an internal error in the Heroku platform. Unlike all of the other errors which will require action from you to correct, this one does not require action from you. Try again in a minute, or check <a href=\"http://status.heroku.com/\">the status site</a>.</p>\n<pre><code>2010-10-06T21:51:07-07:00 heroku[router]: at=error code=H99 desc=\"Platform error\" method=GET path=\"/\" host=myapp.herokuapp.com fwd=17.17.17.17 dyno= connect= service= status=503 bytes=\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout\">R10 - Boot timeout</a></h2>\n<p>A web process took longer than 60 seconds to bind to its assigned <code>$PORT</code>. When this happens, the dyno's process is killed and the dyno is considered crashed. Crashed dynos are restarted according to the dyno manager's <a href=\"https://devcenter.heroku.com/articles/dynos#automatic-dyno-restarts\">restart policy</a>.</p>\n<pre><code>2011-05-03T17:31:38+00:00 heroku[web.1]: State changed from created to starting\n2011-05-03T17:31:40+00:00 heroku[web.1]: Starting process with command: `bundle exec rails server -p 22020 -e production`\n2011-05-03T17:32:40+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch\n2011-05-03T17:32:40+00:00 heroku[web.1]: Stopping process with SIGKILL\n2011-05-03T17:32:40+00:00 heroku[web.1]: Process exited\n2011-05-03T17:32:41+00:00 heroku[web.1]: State changed from starting to crashed\n</code></pre>\n<p>This error is often caused by a process being unable to reach an external resource, such as a database, or the application doing too much work, such as parsing and evaluating numerous, large code dependencies, during startup.</p>\n<p>Common solutions are to access external resources asynchronously, so they don't block startup, and to reduce the amount of application code or its dependencies.</p>\n<p>If your application requires more time to boot, you may use the <a href=\"https://tools.heroku.support/limits/boot_timeout\">boot timeout tool</a> to increase the limit. However, in general, slow boot times will make it harder to deploy your application and will make recovery from dyno failures slower, so this should be considered a <em>temporary solution</em>.</p>\n<p>One exception is for apps using the <a href=\"https://devcenter.heroku.com/articles/java-support\">Java buildpack</a>, <a href=\"https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku\">Gradle buildpack</a>, <a href=\"https://devcenter.heroku.com/articles/war-deployment#deployment-with-the-heroku-cli\">heroku-deploy toolbelt plugin</a>, or <a href=\"https://devcenter.heroku.com/articles/deploying-java-applications-with-the-heroku-maven-plugin\">Heroku Maven plugin</a>, which will be allowed 90 seconds to bind to their assigned port.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r12-exit-timeout\">R12 - Exit timeout</a></h2>\n<p>A process failed to exit within 30 seconds of being sent a SIGTERM indicating that it should stop. The process is sent SIGKILL to force an exit.</p>\n<pre><code>2011-05-03T17:40:10+00:00 app[worker.1]: Working\n2011-05-03T17:40:11+00:00 heroku[worker.1]: Stopping process with SIGTERM\n2011-05-03T17:40:11+00:00 app[worker.1]: Ignoring SIGTERM\n2011-05-03T17:40:14+00:00 app[worker.1]: Working\n2011-05-03T17:40:18+00:00 app[worker.1]: Working\n2011-05-03T17:40:21+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> Process failed to exit within 30 seconds of SIGTERM\n2011-05-03T17:40:21+00:00 heroku[worker.1]: Stopping process with SIGKILL\n2011-05-03T17:40:21+00:00 heroku[worker.1]: Process exited\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r13-attach-error\">R13 - Attach error</a></h2>\n<p>A dyno started with <code>heroku run</code> failed to attach to the invoking client.</p>\n<pre><code>2011-06-29T02:13:29+00:00 app[run.3]: Awaiting client\n2011-06-29T02:13:30+00:00 heroku[run.3]: State changed from starting to up\n2011-06-29T02:13:59+00:00 app[run.3]: Error R13 (Attach error) -> Failed to attach to process\n2011-06-29T02:13:59+00:00 heroku[run.3]: Process exited\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r14-memory-quota-exceeded\">R14 - Memory quota exceeded</a></h2>\n<p>A dyno requires memory in excess of its <a href=\"https://devcenter.heroku.com/articles/dynos#memory-behavior\">quota</a>. If this error occurs, the dyno will <a href=\"http://en.wikipedia.org/wiki/Paging\">page to swap space</a> to continue running, which may cause degraded process performance. The R14 error is calculated by total memory swap, rss and cache.</p>\n<pre><code>2011-05-03T17:40:10+00:00 app[worker.1]: Working\n2011-05-03T17:40:10+00:00 heroku[worker.1]: Process running mem=1028MB(103.3%)\n2011-05-03T17:40:11+00:00 heroku[worker.1]: Error R14 (Memory quota exceeded)\n2011-05-03T17:41:52+00:00 app[worker.1]: Working\n</code></pre>\n<p>If you are getting a large number of R14 errors, your application performance is likely severely degraded. Resolving R14 memory errors are language specific:</p>\n<ul>\n<li><a href=\"https://devcenter.heroku.com/articles/ruby-memory-use\">R14 - Memory Quota Exceeded in Ruby (MRI)</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/java-memory-issues\">Troubleshooting Memory Issues in Java Applications</a></li>\n<li><a href=\"https://devcenter.heroku.com/articles/node-memory-use\">Troubleshooting Node.js Memory Use</a></li>\n</ul>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r15-memory-quota-vastly-exceeded\">R15 - Memory quota vastly exceeded</a></h2>\n<p>A dyno requires vastly more memory than its <a href=\"https://devcenter.heroku.com/articles/dynos#memory-behavior\">quota</a> and is consuming excessive swap space. If this error occurs, the dyno will be forcibly killed with <code>SIGKILL</code> (which cannot be caught or handled) by the platform. The R15 error is calculated by total memory swap and rss; cache is not included.</p>\n<pre><code>2011-05-03T17:40:10+00:00 app[worker.1]: Working\n2011-05-03T17:40:10+00:00 heroku[worker.1]: Process running mem=1029MB(201.0%)\n2011-05-03T17:40:11+00:00 heroku[worker.1]: Error R15 (Memory quota vastly exceeded)\n2011-05-03T17:40:11+00:00 heroku[worker.1]: Stopping process with SIGKILL\n2011-05-03T17:40:12+00:00 heroku[worker.1]: Process exited\n</code></pre>\n<p>In Private Spaces, dynos exceeding their memory quota do not use swap space and thus do not emit R14 errors.</p>\n<p>Private Space dynos vastly exceeding their memory quota generally will emit R15 errors but occasionally the platform may shut down the dyno before the R15 is sent, causing the error to be dropped. <em>If</em> an R15 is emitted it will only be visible in the app log stream but not in the dashboard <a href=\"https://devcenter.heroku.com/articles/metrics\">Application Metrics</a> interface. Other non-R15 types of errors from Private Space dynos are correctly surfaced in the Application Metrics interface.</p>\n<p>For Private Space dynos vastly exceeding their memory quota the platform kills dyno processes consuming large amounts of memory, but may not kill the dyno itself.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r16-detached\">R16 - Detached</a></h2>\n<p>An attached dyno is continuing to run after being sent <code>SIGHUP</code> when its external connection was closed. This is usually a mistake, though some apps might want to do this intentionally.</p>\n<pre><code>2011-05-03T17:32:03+00:00 heroku[run.1]: Awaiting client\n2011-05-03T17:32:03+00:00 heroku[run.1]: Starting process with command `bash`\n2011-05-03T17:40:11+00:00 heroku[run.1]: Client connection closed. Sending SIGHUP to all processes\n2011-05-03T17:40:16+00:00 heroku[run.1]: Client connection closed. Sending SIGHUP to all processes\n2011-05-03T17:40:21+00:00 heroku[run.1]: Client connection closed. Sending SIGHUP to all processes\n2011-05-03T17:40:26+00:00 heroku[run.1]: Error R16 (Detached) -> An attached process is not responding to SIGHUP after its external connection was closed.\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r17-checksum-error\">R17 - Checksum error</a></h2>\n<p>This indicates an error with runtime <a href=\"https://devcenter.heroku.com/articles/slug-checksums\">slug checksum</a> verification. If the checksum does not match or there is another problem with the checksum when launch a dyno, an R17 error will occur and the dyno will fail to launch. Check the log stream for details about the error.</p>\n<pre><code>2016-08-16T12:39:56.439438+00:00 heroku[web.1]: State changed from provisioning to starting\n2016-08-16T12:39:57.110759+00:00 heroku[web.1]: Error R17 (Checksum error) -> Checksum does match expected value. Expected: SHA256:ed5718e83475c780145609cbb2e4f77ec8076f6f59ebc8a916fb790fbdb1ae64 Actual: SHA256:9ca15af16e06625dfd123ebc3472afb0c5091645512b31ac3dd355f0d8cc42c1\n2016-08-16T12:39:57.212053+00:00 heroku[web.1]: State changed from starting to crashed\n</code></pre>\n<p>If this error occurs, try deploying a new release with a correct checksum or rolling back to an older release. Ensure the checksum is <a href=\"https://devcenter.heroku.com/articles/slug-checksums\">formatted and calculated correctly</a> with the SHA256 algorithm. The checksum must start with <code>SHA256:</code> followed by the calculated SHA256 value for the compressed slug. If you did not manually calculate the checksum and error continues to occur, please contact Heroku support.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#r99-platform-error\">R99 - Platform error</a></h2>\n<p>R99 and H99 are the only error codes that represent errors in the Heroku platform.</p>\n<p>This indicates an internal error in the Heroku platform. Unlike all of the other errors which will require action from you to correct, this one does not require action from you. Try again in a minute, or check <a href=\"http://status.heroku.com/\">the status site</a>.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#l10-drain-buffer-overflow\">L10 - Drain buffer overflow</a></h2>\n<pre><code>2013-04-17T19:04:46+00:00 d.1234-drain-identifier-567 heroku logplex - - Error L10 (output buffer overflow): 500 messages dropped since 2013-04-17T19:04:46+00:00.\n</code></pre>\n<p>The number of log messages being generated has temporarily exceeded the rate at which they can be received by a drain consumer (such as a log management add-on) and Logplex, <a href=\"https://devcenter.heroku.com/articles/logging\">Heroku's logging system</a>, has discarded some messages in order to handle the rate difference.</p>\n<p>A common cause of L10 error messages is the exhaustion of capacity in a log consumer. If a log management add-on or similar system can only accept so many messages per time period, your application may experience L10s after crossing that threshold.</p>\n<p>Another common cause of L10 error messages is a sudden burst of log messages from a dyno. As each line of dyno output (e.g. a line of a stack trace) is a single log message, and Logplex limits the total number of un-transmitted log messages it will keep in memory to 1024 messages, a burst of lines from a dyno can overflow buffers in Logplex. In order to allow the log stream to catch up, Logplex will discard messages where necessary, keeping newer messages in favor of older ones.</p>\n<p>You may need to investigate reducing the volume of log lines output by your application (e.g. condense multiple log lines into a smaller, single-line entry). You can also use the <code>heroku logs -t</code> command to get a live feed of logs and find out where your problem might be. A single dyno stuck in a loop that generates log messages can force an L10 error, as can a problematic code path that causes all dynos to generate a multi-line stack trace for some code paths.</p>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#l11-tail-buffer-overflow\">L11 - Tail buffer overflow</a></h2>\n<p>A heroku logs --tail session cannot keep up with the volume of logs generated by the application or log channel, and Logplex has discarded some log lines necessary to catch up. To avoid this error you will need run the command on a faster internet connection (increase the rate at which you can receive logs) or you will need to modify your application to reduce the logging volume (decrease the rate at which logs are generated).</p>\n<pre><code>2011-05-03T17:40:10+00:00 heroku[logplex]: L11 (Tail buffer overflow) -> This tail session dropped 1101 messages since 2011-05-03T17:35:00+00:00\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#l12-local-buffer-overflow\">L12 - Local buffer overflow</a></h2>\n<p>The application is producing logs faster than the local delivery process (log-shuttle) can deliver them to logplex and has discarded some log lines in order to keep up. If this error is sustained you will need to reduce the logging volume of your application.</p>\n<pre><code>2013-11-04T21:31:32.125756+00:00 app[log-shuttle]: Error L12: 222 messages dropped since 2013-11-04T21:31:32.125756+00:00.\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#l13-local-delivery-error\">L13 - Local delivery error</a></h2>\n<p>The local log delivery process (log-shuttle) was unable to deliver some logs to Logplex and has discarded them. This can happen during transient network errors or during logplex service degradation. If this error is sustained please contact support.</p>\n<pre><code>2013-11-04T21:31:32.125756+00:00 app[log-shuttle]: Error L13: 111 messages lost since 2013-11-04T21:31:32.125756+00:00.\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#l14-certificate-validation-error\">L14 - Certificate validation error</a></h2>\n<p>The application is configured with a TLS syslog drain that doesn't have a valid TLS certificate.</p>\n<p>You should check that:</p>\n<ol>\n<li>You're not using a self-signed certificate.</li>\n<li>The certificate is up to date.</li>\n<li>The certificate is signed by a known and trusted CA.</li>\n<li>The CN hostname embedded in the certificate matches the hostname being connected to.</li>\n</ol>\n<pre><code>2015-09-04T23:28:48+00:00 heroku[logplex]: Error L14 (certificate validation): error=\"bad certificate\" uri=\"syslog+tls://logs.example.com:6514/\"\n</code></pre>\n<h2><a href=\"https://devcenter.heroku.com/articles/error-codes#l15-tail-buffer-temporarily-unavailable\">L15 - Tail buffer temporarily unavailable</a></h2>\n<p>The tail buffer that stores the last 1500 lines of your logs is temporarily unavailable. Run <code>heroku logs</code> again. If you still encounter the error, run <code>heroku logs -t</code> to stream your logs (which does not use the tail buffer).</p>"},{"url":"/docs/quick-reference/topRepos/","relativePath":"docs/quick-reference/topRepos.md","relativeDir":"docs/quick-reference","base":"topRepos.md","name":"topRepos","frontmatter":{"title":"Top Repos","weight":0,"seo":{"title":"Top Repos","description":"This is the Top Repos page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Top Repos","keyName":"property"},{"name":"og:description","value":"This is the Top Repos page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Top Repos"},{"name":"twitter:description","value":"This is the Top Repos page"}]},"template":"docs"},"html":"<h1>My Top Repos / Websites:</h1>\n<ul>\n<li><a href=\"https://github.com/bgoonz/PYTHON_PRAC\">Python Practice</a></li>\n<li><a href=\"https://lambda-resources.netlify.app/\">Lambda Bootcamp Website</a></li>\n<li><a href=\"https://github.com/bgoonz/React_Notes_V3\">React Notes</a></li>\n<li><a href=\"https://github.com/bgoonz/Project-Showcase\">Project Showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\">Data Structures &#x26; Algorithms</a></li>\n<li><a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\">Lambda Site Static Content Server</a></li>\n<li><a href=\"https://github.com/bgoonz/mini-project-showcase\">Mini-Project Showcase</a></li>\n<li><a href=\"https://github.com/bgoonz/Useful-Snippets-js\">Useful Snippets</a></li>\n<li><a href=\"https://github.com/bgoonz/Markdown-Templates\">Markdown Templates</a></li>\n<li><a href=\"https://github.com/bgoonz/zumzi-chat-messenger\">Zumzi Video Conferencing App (mesibo api backend)</a></li>\n</ul>\n<p><a href=\"https://pages.databricks.com/rs/094-YMS-629/images/dynamic-time-warping-background.html\">https://pages.databricks.com/rs/094-YMS-629/images/dynamic-time-warping-background.html</a></p>"},{"url":"/docs/quick-reference/pull-request-rubric/","relativePath":"docs/quick-reference/pull-request-rubric.md","relativeDir":"docs/quick-reference","base":"pull-request-rubric.md","name":"pull-request-rubric","frontmatter":{"title":"Pull Request Template","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Pull Requests</h2>\n<table>\n<thead>\n<tr>\n<th>Objective</th>\n<th>Description</th>\n<th>1-3 (Not Passing)</th>\n<th>4 (Passing)</th>\n<th>5-7 (Exceptional)</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"https://www.notion.so/Clearly-documents-the-motivation-and-what-changed-0c7f5d04d7f9401e8e861ce93312d503\">Clearly documents the motivation and what changed</a></td>\n<td>Is it clear why the pull request exists? Does it link to supporting documentation (user story, product roadmap, design) to give broader context? Is the code itself appropriately commented?</td>\n<td>The PR description is either blank or only contains the boilerplate PR template or unchecked checklist items. Code comments aren't used, even when they would be helpful.</td>\n<td>The PR description outlines the motivation for the feature and/or links to a user story or other document describing the purpose of the feature.</td>\n<td>The PR description includes a clear rationale for the feature, or a screenshot showing either the intended state or completed state of the feature, and gives additional context about changes made in the PR.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.notion.so/Atomic-well-named-commits-67085273f3b945beb14af73e51c61522\">Atomic, well-named commits</a></td>\n<td>Does the pull request consist of small commits with clear titles? Do all commits have relevant and sensible messages of what was changed?</td>\n<td>Commits are not named appropriately. Commits have sensible messages. Example. \"Updated\", \"Fixed a bug\"</td>\n<td>Commits are well named. Commits have descriptive messages relevant to what changed. Some commits are not atomic.</td>\n<td>Commits are well named. Commits have descriptive messages. Each commit introduces atomic changes.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.notion.so/Appropriately-Scoped-3b6f396ee76d4075b0b66c702624f05e\">Appropriately Scoped</a></td>\n<td>Is the pull request small enough to review easily? Is it focused on solving a single cohesive problem?</td>\n<td>Pull request introduces multiple features or solves multiple problems. PR is unreasonably big with many changed files. Some code changes that are not related to the purpose of the PR</td>\n<td>PR is relatively small. PR has some minor changes not related to the feature or primary change being introduced.</td>\n<td>PR is focused on a single problem. PR is small enough and easy to review.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.notion.so/Adequately-reviewed-44cf640022d94c35a23589263a943d76\">Adequately reviewed</a></td>\n<td>Has the pull request been reviewed by at least two team members? Your release manager will be the final reviewer of the pull request. Did they leave any comments or suggestions? Were those suggestions acted on?</td>\n<td>PR was merged by the same developer who requested it. The reviewer rejected PR with no comments. PR was initiated again and suggested changes were not addressed.</td>\n<td>At least two team members reviewed PRs. Appropriate comments were left in the PR. Suggestions were acted upon.</td>\n<td>PRs were reviewed by more than one team member. PR requests were sent to multiple reviewers. Active high-quality discussions are evident in PRs.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.notion.so/Code-is-clear-and-maintainable-de9ef74e969b47f5bab234f5a346c407\">Code is clear and maintainable</a></td>\n<td>Is the code formatted appropriately? Is there dead code? <strong><em>logs and print statements have no place in your main branches!</em></strong> Are there instances of duplicate code? Does code have TODOs committed to main?</td>\n<td>Code has inconsistent formatting. Significant amount of dead code across the codebase. Multiple instances on TODOs in main. Significant amount of duplicated code.</td>\n<td>Code is consistently formatted. Functions are relatively small. Few instances of duplicate code. Few instances of dead code.</td>\n<td>Code is consistently formatted. Has config files to enforce linting and formatting. No instance on duplicate code.</td>\n</tr>\n<tr>\n<td><a href=\"https://www.notion.so/Code-is-idiomatic-c8d7786458b9430d9b6bad50cd904c9c\">Code is idiomatic</a></td>\n<td>Does the code follow industry standards for the language, framework, and libraries used?</td>\n<td>Code consistently does not adhere to best practices for the language, framework or libraries used.</td>\n<td>Code has apparent minor deviations from industry standards.</td>\n<td>Code follows best practices of language, framework and libraries use. Effort has been made to improve on those practices.</td>\n</tr>\n</tbody>\n</table>"},{"url":"/docs/quick-reference/understanding-path/","relativePath":"docs/quick-reference/understanding-path.md","relativeDir":"docs/quick-reference","base":"understanding-path.md","name":"understanding-path","frontmatter":{"title":"Understanding PATH","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h3>Understanding PATH</h3>\n<p><img src=\"images/pypath.jpeg\"></p>\n<p><img src=\"images/pypath2.PNG\"></p>\n<p>When you run a command like python or pip, your operating system searches through a list of directories to find an executable file with that name. This list of directories lives in an environment variable called PATH, with each directory in the list separated by a colon:</p>\n<p>Directories in PATH are searched from left to right, so a matching executable in a directory at the beginning of the list takes precedence over another one at the end. In this example, the /usr/local/bin directory will be searched first, then /usr/bin, then /bin.</p>\n<h3>Understanding Shims</h3>\n<p>pyenv works by inserting a directory of shims at the front of your PATH:</p>\n<p>Through a process called rehashing, pyenv maintains shims in that directory to match every Python command across every installed version of Python---python, pip, and so on.</p>\n<p>Shims are lightweight executables that simply pass your command along to pyenv. So with pyenv installed, when you run, say, pip, your operating system will do the following:</p>\n<ul>\n<li>Search your PATH for an executable file named pip</li>\n<li>Find the pyenv shim named pip at the beginning of your PATH</li>\n<li>Run the shim named pip, which in turn passes the command along to pyenv</li>\n</ul>\n<h3>Choosing the Python Version</h3>\n<p>When you execute a shim, pyenv determines which Python version to use by reading it from the following sources, in this order:</p>\n<ol>\n<li>The PYENV_VERSION environment variable (if specified). You can use the <a href=\"https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-shell\">pyenv shell</a> command to set this environment variable in your current shell session.</li>\n<li>The application-specific .python-version file in the current directory (if present). You can modify the current directory's .python-version file with the <a href=\"https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-local\">pyenv local</a> command.</li>\n<li>The first .python-version file found (if any) by searching each parent directory, until reaching the root of your filesystem.</li>\n<li>The global $(pyenv root)/version file. You can modify this file using the <a href=\"https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global\">pyenv global</a> command. If the global version file is not present, pyenv assumes you want to use the \"system\" Python. (In other words, whatever version would run if pyenv weren't in your PATH.)</li>\n</ol>\n<p><strong>NOTE:</strong> You can activate multiple versions at the same time, including multiple versions of Python2 or Python3 simultaneously. This allows for parallel usage of Python2 and Python3, and is required with tools like tox. For example, to set your path to first use your system Python and Python3 (set to 2.7.9 and 3.4.2 in this example), but also have Python 3.3.6, 3.2, and 2.5 available on your PATH, one would first pyenv install the missing versions, then set pyenv global system 3.3.6 3.2 2.5. At this point, one should be able to find the full executable path to each of these using pyenv which, e.g. pyenv which python2.5 (should display $(pyenv root)/versions/2.5/bin/python2.5), or pyenv which python3.4 (should display path to system Python3). You can also specify multiple versions in a .python-version file, separated by newlines. Lines starting with a # are ignored.</p>\n<h3>Locating the Python Installation</h3>\n<p>Once pyenv has determined which version of Python your application has specified, it passes the command along to the corresponding Python installation.</p>\n<p>Each Python version is installed into its own directory under $(pyenv root)/versions.</p>\n<p>For example, you might have these versions installed:</p>\n<ul>\n<li>$(pyenv root)/versions/2.7.8/</li>\n<li>$(pyenv root)/versions/3.4.2/</li>\n<li>$(pyenv root)/versions/pypy-2.4.0/</li>\n</ul>\n<p>As far as Pyenv is concerned, version names are simply directories under $(pyenv root)/versions.</p>\n<h3>Managing Virtual Environments</h3>\n<p>There is a pyenv plugin named <a href=\"https://github.com/pyenv/pyenv-virtualenv\">pyenv-virtualenv</a> which comes with various features to help pyenv users to manage virtual environments created by virtualenv or Anaconda. Because the activate script of those virtual environments are relying on mutating $PATH variable of user's interactive shell, it will intercept pyenv's shim style command execution hooks. We'd recommend to install pyenv-virtualenv as well if you have some plan to play with those virtual environments.<img src=\"https://i.imgur.com/0hQBL4d.png\"><img src=\"https://i.imgur.com/0hQBL4d.png\"><img src=\"images/festive-zebra.png\"></p>"},{"url":"/docs/quick-reference/psql-setup/","relativePath":"docs/quick-reference/psql-setup.md","relativeDir":"docs/quick-reference","base":"psql-setup.md","name":"psql-setup","frontmatter":{"title":"PostgreSQL Setup","weight":0,"excerpt":"PostgreSQL Setup","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>PostgreSQL Setup For Windows &#x26; WSL/Ubuntu</h1>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&amp;resid=D21009FDD967A241%21538624&amp;authkey=ALjsoYXNZpaUagA&amp;em=2&amp;wdAr=1.7777777777777777\" width=\"1186px\" height=\"691px\" frameborder=\"0\">This is an embedded <a target=\"_blank\" href=\"https://office.com\">Microsoft Office</a> presentation, powered by <a target=\"_blank\" href=\"https://office.com/webapps\">Office</a>.</iframe>\n<p>If you follow this guide to a tee… you will install PostgreSQL itself on your Windows installation. Then, you will install psql in your…</p>\n<hr>\n<h3>PostgreSQL Setup For Windows &#x26; WSL/Ubuntu</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/0*mhTM08D1J612VW7J\" class=\"graf-image\" /></figure>If you follow this guide to a tee… you will install PostgreSQL itself on your Windows installation. Then, you will install `psql` in your Ubuntu installation. Then you will also install Postbird, a cross-platform graphical user interface that makes working with SQL and PostgreSQL 'allegedly' …(personally I prefer to just use the command line but PG Admin makes for an immeasurably more complicated tutorial than postbird)… better than just using the **command line tool** `psql`**.**\n<h3>Important Distinction: PSQL is the frontend interface for PostgreSQL … they are not synonymous!</h3>\n<p><strong>Postgres</strong>, is a <a href=\"https://en.wikipedia.org/wiki/Free_and_open-source_software\" class=\"markup--anchor markup--p-anchor\" title=\"Free and open-source software\">free and open-source</a> <a href=\"https://en.wikipedia.org/wiki/Relational_database_management_system\" class=\"markup--anchor markup--p-anchor\" title=\"Relational database management system\">relational database management system</a> (RDBMS)</p>\n<p><strong>PSQL:</strong></p>\n<p>The primary <a href=\"https://en.wikipedia.org/wiki/Front_and_back_ends\" class=\"markup--anchor markup--p-anchor\" title=\"Front and back ends\">front-end</a> for PostgreSQL is the <code>psql</code> <a href=\"https://en.wikipedia.org/wiki/Command-line_program\" class=\"markup--anchor markup--p-anchor\" title=\"Command-line program\">command-line program</a>, which can be used to enter SQL queries directly, or execute them from a file.</p>\n<p>In addition, psql provides a number of meta-commands and various shell-like features to facilitate writing scripts and automating a wide variety of tasks; for example tab completion of object names and SQL syntax.</p>\n<p><strong>pgAdmin:</strong></p>\n<p>The pgAdmin package is a free and open-source <a href=\"https://en.wikipedia.org/wiki/Graphical_user_interface\" class=\"markup--anchor markup--p-anchor\" title=\"Graphical user interface\">graphical user interface</a> (GUI) administration tool for PostgreSQL.</p>\n<p>When you read “installation”, that means the actual OS that's running on your machine. So, you have a Windows installation, Windows 10, that's running when you boot your computer. Then, when you start the Ubuntu installation, it's as if there's a completely separate computer running inside your computer. It's like having two completely different laptops.</p>\n<h3>Other Noteworthy Distinctions:</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*um8fm6FDTYYOXZrLudddpg.png\" class=\"graf-image\" /></figure>### Installing PostgreSQL 12\n<p>To install PostgreSQL 12, you need to download the installer from the Internet. PostgreSQL's commercial company, Enterprise DB, offers installers for PostgreSQL for every major platform.</p>\n<p>Open <a href=\"https://www.enterprisedb.com/downloads/postgres-postgresql-downloads\" class=\"markup--anchor markup--p-anchor\">https://www.enterprisedb.com/downloads/postgres-postgresql-downloads</a>. Click the link for PostgreSQL 12 for Windows x86-64.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*wi4EbaVo-mamG_tH.png\" class=\"graf-image\" /></figure>Once that installer downloads, run it. You need to go through the normal steps of installing software.\n<ul>\n<li><span id=\"a223\">Yes, Windows, let the installer make changes to <em>my</em> device.</span></li>\n<li><span id=\"d4d0\">Thanks for the welcome. Next.</span></li>\n<li><span id=\"1283\">Yeah, that's a good place to install it. Next.</span></li>\n<li><span id=\"79cc\">I don't want that pgAdmin nor the Stack Builder things. Uncheck. Uncheck. Next.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*PSDmTsaD37MgFJ-A.png\" class=\"graf-image\" /></figure>-   <span id=\"e09d\">Also, great looking directory. Thanks. Next.</span>\n<h3>Oooh! A password! I'll enter <strong>****</strong>. I sure won't forget that because, if I do, I'll have to uninstall and reinstall PostgreSQL and lose all of my hard work. <strong>Seriously, write down this password or use one you will not forget!!!!!!!!!!!!!!!</strong></h3>\n<h3>I REALLY CANNOT STRESS THE ABOVE POINT ENOUGH… Experience is a great teacher but in this case … it's not worth it.</h3>\n<ul>\n<li><span id=\"25b7\">Sure. 5432. Good to go. Next.</span></li>\n<li><span id=\"28be\">Not even sure what that means. Default! Next.</span></li>\n<li><span id=\"b378\">Yep. Looks good. Next.</span></li>\n</ul>\n<p>Insert pop culture reference to pass the time</p>\n<h3>Installing PostgreSQL Client Tools on Ubuntu</h3>\n<p>Now, to install the PostgreSQL Client tools for Ubuntu. You need to do this so that the Node.js (and later Python) programs running on your Ubuntu installation can access the PostgreSQL server running on your Windows installation. You need to tell <code>apt</code>, the package manager, that you want it to go find the PostgreSQL 12 client tools from PostgreSQL itself rather than the common package repositories. You do that by issuing the following two commands. Copy and paste them one at a time into your shell. (If your Ubuntu shell isn't running, start one.)</p>\n<p><strong>Pro-tip</strong>: Copy those commands because you're not going to type them, right? After you copy one of them, you can just right-click on the Ubuntu shell. That should paste them in there for you.</p>\n<pre><code>wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -\n</code></pre>\n<p>If prompted for your password, type it.</p>\n<pre><code>echo \"deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main\" | sudo tee  /etc/apt/sources.list.d/pgdg.list\n</code></pre>\n<p>The last line of output of those two commands running should read “OK”. If it does not, try copying and pasting them one at a time.</p>\n<p>Now that you've registered the PostgreSQL repositories as a source to look for PostgreSQL, you need to update the <code>apt</code> registry. You should do this before you install <em>any</em> software on Ubuntu.</p>\n<pre><code>sudo apt update\n</code></pre>\n<p>Once that's finished running, the new entries for PostgreSQL 12 should be in the repository. Now, you can install them with the following command.</p>\n<pre><code>sudo apt install postgresql-client-12 postgresql-common\n</code></pre>\n<p>If it asks you if you want to install them, please tell it “Y”.</p>\n<p>Test that it installed by typing <code>psql --version</code>. You should see it print out information about the version of the installed tools. If it tells you that it can't find the command, try these instructions over.</p>\n<h3>Configuring the client tools</h3>\n<p>Since you're going to be accessing the PosgreSQL installation from your Ubuntu installation on your Windows installation, you're going to have to type that you want to access it over and over, which means extra typing. To prevent you from having to do this, you can customize your shell to always add the extra commands for you.</p>\n<p>This assumes you're still using Bash. If you changed the shell that your Ubuntu installation uses, please follow that shell's directions for adding an alias to its startup file.</p>\n<p>Make sure you're in your Ubuntu home directory. You can do that by typing <code>cd</code> and hitting enter. Use <code>ls</code> to find out if you have a <code>.bashrc</code> file. Type <code>ls .bashrc</code>. If it shows you that one exists, that's the one you will add the alias to. If it tells you that there is no file named that, then type <code>ls .profile</code>. If it shows you that one exists, that's the one you will add the alias to. If it shows you that it does not exist, then use the file name <code>.bashrc</code> in the following section.</p>\n<p>Now that you know which profile file to use, type <code>code «profile file name»</code> where \"profile file name\" is the name of the file you determined from the last section. Once Visual Studio Code starts up with your file, at the end of it (or if you've already added aliases, in that section), type the following.</p>\n<pre><code>alias psql=\"psql -h localhost\"\n</code></pre>\n<p>When you run <code>psql</code> from the command line, it will now always add the part about wanting to connect to <em>localhost</em> every time. You would have to type that each time, otherwise.</p>\n<p>To make sure that you set that up correctly, type <code>psql -U postgres postgres</code>. This tells the <code>psql</code> client that you want to connect as the user \"postgres\" (<code>-U postgres</code>) to the database postgres (<code>postgres</code> at the end), which is the default database created when PostgreSQL is installed. It will prompt you for a password. Type the password that you used when you installed PostgrSQL, earlier. If the alias works correctly and you type the correct password, then you should see something like the following output.</p>\n<pre><code>psql (12.2 (Ubuntu 12.2-2.pgdg18.04+1))\nType \"help\" for help.\n\npostgres=#\n</code></pre>\n<p>Type <code>\\q</code> and hit Enter to exit the PostgreSQL client tool.</p>\n<p>Now, you will add a user for your Ubuntu identity so that you don't have to specify it all the time. Then, you will create a file that PostgreSQL will use to automatically send your password every time.</p>\n<p>Copy and paste the following into your Ubuntu shell. Think of a password that you want to use for your user. <strong>Replace the password in the single quotes in the command with the password that you want.</strong> It <em>has</em> to be a non-empty string. PostgreSQL doesn't like it when it's not.</p>\n<pre><code>psql -U postgres -c \"CREATE USER `whoami` WITH PASSWORD 'password' SUPERUSER\"\n</code></pre>\n<p>It should prompt you for a password. Type the password that you created when you installed PostgreSQL. Once you type the correct password, you should see “CREATE ROLE”.</p>\n<p>Now you will create your PostgreSQL password file. Type the following into your Ubuntu shell to open Visual Studio Code and create a new file.</p>\n<pre><code>code ~/.pgpass\n</code></pre>\n<p>In that file, you will add this line, which tells it that on localhost for port 5432 (where PostgreSQL is running), for all databases (*), <strong>use your Ubuntu user name and the password that you just created for that user with the</strong> <code>psql</code> <strong>command you just typed.</strong> (If you have forgotten your Ubuntu user name, type <code>whoami</code> on the command line.) Your entry in the file should have this format.</p>\n<pre><code>localhost:5432:*:«your Ubuntu user name»:«the password you just used»\n</code></pre>\n<p>Once you have that information in the file, save it, and close Visual Studio Code.</p>\n<p>The last step you have to take is change the permission on that file so that it is only readable by your user. PostgreSQL will ignore it if just anyone can read and write to it. This is for <em>your</em> security. Change the file permissions so only you can read and write to it. You did this once upon a time. Here's the command.</p>\n<pre><code>chmod go-rw ~/.pgpass\n</code></pre>\n<p>You can confirm that only you have read/write permission by typing <code>ls -al ~/.pgpass</code>. That should return output that looks like this, <strong>with your Ubuntu user name instead of \"web-dev-hub\".</strong></p>\n<pre><code>-rw------- 1 web-dev-hub web-dev-hub 37 Mar 28 21:20 /home/web-dev-hub/.pgpass\n</code></pre>\n<p>Now, try connecting to PostreSQL by typing <code>psql postgres</code>. Because you added the alias to your startup script, and because you created your <strong>.pgpass</strong> file, it should now connect without prompting you for any credentials! Type <code>\\q</code> and press Enter to exit the PostgreSQL command line client.</p>\n<h3>Installing Postbird</h3>\n<p>Head over to the <a href=\"https://github.com/Paxa/postbird/releases\" class=\"markup--anchor markup--p-anchor\">Postbird releases page on GitHub</a>. Click the installer for Windows which you can recognize because it's the only file in the list that ends with “.exe”.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ZdKurvQ4bHs3vDLT.png\" class=\"graf-image\" /></figure>After that installer downloads, run it. You will get a warning from Windows that this is from an unidentified developer. If you don't want to install this, find a PostgreSQL GUI client that you do trust and install it or do everything from the command line.\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*EWpFEwM0YUDQCW_i.png\" class=\"graf-image\" /></figure>You should get used to seeing this because many open-source applications aren't signed with the Microsoft Store for monetary and philosophical reasons.\n<p>Otherwise, if you trust Paxa like web-dev-hub and tens of thousands of other developers do, then click the link that reads “More info” and the “Run anyway” button.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*9pDpx8XsYt2KnMku.png\" class=\"graf-image\" /></figure>When it's done installing, it will launch itself. Test it out by typing the “postgres” into the “Username” field and the password from your installation in the “Password” field. Click the Connect button. It should properly connect to the running\n<p>You can close it for now. It also installed an icon on your desktop. You can launch it from there or your Start Menu at any time.</p>\n<h3>Now.. if you still have some gas in the tank… let's put our new tools to work:</h3>\n<h3>The node-postgres</h3>\n<p>The node-postgres is a collection of Node.js modules for interfacing with the PostgreSQL database. It has support for callbacks, promises, async/await, connection pooling, prepared statements, cursors, and streaming results.</p>\n<p>In our examples we also use the Ramda library. See Ramda tutorial for more information.</p>\n<h3>Setting up node-postgres</h3>\n<p>First, we install node-postgres.</p>\n<p>$ node -v<br>\nv14.2</p>\n<p>$ npm init -y</p>\n<p>We initiate a new Node application.</p>\n<p>npm i pg</p>\n<p>We install node-postgres with <code>nmp i pg</code>.</p>\n<p>npm i ramda</p>\n<p>In addition, we install Ramda for beautiful work with data.</p>\n<p>cars.sql</p>\n<p>DROP TABLE IF EXISTS cars;</p>\n<p>CREATE TABLE cars(id SERIAL PRIMARY KEY, name VARCHAR(255), price INT);<br>\nINSERT INTO cars(name, price) VALUES('Audi', 52642);<br>\nINSERT INTO cars(name, price) VALUES('Mercedes', 57127);<br>\nINSERT INTO cars(name, price) VALUES('Skoda', 9000);<br>\nINSERT INTO cars(name, price) VALUES('Volvo', 29000);<br>\nINSERT INTO cars(name, price) VALUES('Bentley', 350000);<br>\nINSERT INTO cars(name, price) VALUES('Citroen', 21000);<br>\nINSERT INTO cars(name, price) VALUES('Hummer', 41400);<br>\nINSERT INTO cars(name, price) VALUES('Volkswagen', 21600);</p>\n<p>In some of the examples, we use this <code>cars</code> table.</p>\n<h3>The node-postgres first example</h3>\n<p>In the first example, we connect to the PostgreSQL database and return a simple SELECT query result.</p>\n<p>first.js</p>\n<pre><code>const pg = require('pg');\nconst R = require('ramda');\nconst cs = 'postgres://postgres:s$cret@localhost:5432/ydb';\nconst client = new pg.Client(cs);\nclient.connect();\nclient.query('SELECT 1 + 4').then(res => {\n\nconst result = R.head(R.values(R.head(res.rows)))\n\nconsole.log(result)\n}).finally(() => client.end());\n</code></pre>\n<p>The example connects to the database and issues a SELECT statement.</p>\n<pre><code>const pg = require('pg');\nconst R = require('ramda');\n</code></pre>\n<p>We include the <code>pg</code> and <code>ramda</code> modules.</p>\n<pre><code>const cs = 'postgres://postgres:s$cret@localhost:5432/ydb';\n</code></pre>\n<p>This is the PostgreSQL connection string. It is used to build a connection to the database.</p>\n<pre><code>const client = new pg.Client(cs);\nclient.connect();\n</code></pre>\n<p>A client is created. We connect to the database with <code>connect()</code>.</p>\n<pre><code>client.query('SELECT 1 + 4').then(res => {\n\nconst result = R.head(R.values(R.head(res.rows)));\n\nconsole.log(result);\n\n}).finally(() => client.end());\n</code></pre>\n<p>We issue a simple SELECT query. We get the result and output it to the console. The <code>res.rows</code> is an array of objects; we use Ramda to get the returned scalar value. In the end, we close the connection with <code>end()</code>.</p>\n<pre><code>node first.js\n5\n</code></pre>\n<p>This is the output.</p>\n<h3>The node-postgres column names</h3>\n<p>In the following example, we get the columns names of a database.</p>\n<blockquote>\n<p>column_names.js</p>\n</blockquote>\n<pre><code>const pg = require('pg');\n\nconst cs = 'postgres://postgres:s$cret@localhost:5432/ydb';\n\nconst client = new pg.Client(cs);\n\nclient.connect();\n\nclient.query('SELECT * FROM cars').then(res => {\n\nconst fields = res.fields.map(field => field.name);\n\nconsole.log(fields);\n\n}).catch(err => {\nconsole.log(err.stack);\n}).finally(() => {\nclient.end()\n});\n</code></pre>\n<p>The column names are retrieved with <code>res.fields</code> attribute. We also use the <code>catch</code> clause to output potential errors.</p>\n<pre><code>node column_names.js\n'id', 'name', 'price'′id′,′name′,′price′\n</code></pre>\n<p>The output shows three column names of the <code>cars</code> table.</p>\n<h3>Selecting all rows</h3>\n<p>In the next example, we select all rows from the database table.</p>\n<blockquote>\n<p>all_rows.js</p>\n</blockquote>\n<pre><code>const pg = require('pg');\nconst R = require('ramda');\n\nconst cs = 'postgres://postgres:s$cret@localhost:5432/ydb';\n\nconst client = new pg.Client(cs);\n\nclient.connect();\n\nclient.query('SELECT * FROM cars').then(res => {\n\nconst data = res.rows;\n\nconsole.log('all data');\ndata.forEach(row => {\n    console.log(\\`Id: ${row.id} Name: ${row.name} Price: ${row.price}\\`);\n})\n\nconsole.log('Sorted prices:');\nconst prices = R.pluck('price', R.sortBy(R.prop('price'), data));\nconsole.log(prices);\n\n}).finally(() => {\nclient.end()\n});\n</code></pre>\n<p><strong>TBC…</strong></p>\n<h4>If you found this guide helpful feel free to checkout my github/gists where I host similar content:</h4>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--p-anchor\">bgoonz's gists · GitHub</a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://bgoonz-blog.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bgoonz-blog.netlify.app/\"><strong>Stackbit Web-Dev-HubTheme</strong><br />\n<em>Memoization, Tabulation, and Sorting Algorithms by Example Why is looking at runtime not a reliable method of…</em>bgoonz-blog.netlify.app</a><a href=\"https://bgoonz-blog.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/801672ab7089\">March 6, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/postgresql-setup-for-windows-wsl-ubuntu-801672ab7089\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on August 6, 2021.</p>"},{"url":"/docs/react/ajax-n-apis/","relativePath":"docs/react/ajax-n-apis.md","relativeDir":"docs/react","base":"ajax-n-apis.md","name":"ajax-n-apis","frontmatter":{"title":"AJAX and APIs","weight":0,"excerpt":"AJAX and APIs","seo":{"title":"AJAX and APIs","description":"You can use any AJAX library you like with React. Some popular ones are Axios, jQuery AJAX, and the browser built-in window.fetch.","robots":[],"extra":[]},"template":"docs"},"html":"<h1>AJAX and APIs - React</h1>\n<blockquote>\n<h2>Excerpt</h2>\n<p>A JavaScript library for building user interfaces</p>\n</blockquote>\n<hr>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#how-can-i-make-an-ajax-call\"></a>How can I make an AJAX call?</h3>\n<p>You can use any AJAX library you like with React. Some popular ones are <a href=\"https://github.com/axios/axios\">Axios</a>, <a href=\"https://api.jquery.com/jQuery.ajax/\">jQuery AJAX</a>, and the browser built-in <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\">window.fetch</a>.</p>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#where-in-the-component-lifecycle-should-i-make-an-ajax-call\"></a>Where in the component lifecycle should I make an AJAX call?</h3>\n<p>You should populate data with AJAX calls in the <a href=\"https://reactjs.org/docs/react-component.html#mounting\"><code>componentDidMount</code></a> lifecycle method. This is so you can use <code>setState</code> to update your component when the data is retrieved.</p>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#example-using-ajax-results-to-set-local-state\"></a>Example: Using AJAX results to set local state</h3>\n<p>The component below demonstrates how to make an AJAX call in <code>componentDidMount</code> to populate local component state.</p>\n<p>The example API returns a JSON object like this:</p>\n<pre><code class=\"language-js\">{\n  \"items\": [\n    { \"id\": 1, \"name\": \"Apples\",  \"price\": \"$2\" },\n    { \"id\": 2, \"name\": \"Peaches\", \"price\": \"$5\" }\n  ] \n}\n</code></pre>\n<pre><code class=\"language-js\">class MyComponent extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      error: null,\n      isLoaded: false,\n      items: []\n    };\n  }\n\n  componentDidMount() {\n    fetch(\"https://api.example.com/items\")\n      .then(res => res.json())\n      .then(\n        (result) => {\n          this.setState({\n            isLoaded: true,\n            items: result.items\n          });\n        },\n        \n        \n        \n        (error) => {\n          this.setState({\n            isLoaded: true,\n            error\n          });\n        }\n      )\n  }\n\n  render() {\n    const { error, isLoaded, items } = this.state;\n    if (error) {\n      return &#x3C;div>Error: {error.message}&#x3C;/div>;\n    } else if (!isLoaded) {\n      return &#x3C;div>Loading...&#x3C;/div>;\n    } else {\n      return (\n        &#x3C;ul>\n          {items.map(item => (\n            &#x3C;li key={item.id}>\n              {item.name} {item.price}\n            &#x3C;/li>\n          ))}\n        &#x3C;/ul>\n      );\n    }\n  }\n}\n</code></pre>\n<p>Here is the equivalent with <a href=\"https://reactjs.org/docs/hooks-intro.html\">Hooks</a>:</p>\n<pre><code class=\"language-js\">function MyComponent() {\n  const [error, setError] = useState(null);\n  const [isLoaded, setIsLoaded] = useState(false);\n  const [items, setItems] = useState([]);\n\n  \n  \n  \n  useEffect(() => {\n    fetch(\"https://api.example.com/items\")\n      .then(res => res.json())\n      .then(\n        (result) => {\n          setIsLoaded(true);\n          setItems(result);\n        },\n        \n        \n        \n        (error) => {\n          setIsLoaded(true);\n          setError(error);\n        }\n      )\n  }, [])\n\n  if (error) {\n    return &#x3C;div>Error: {error.message}&#x3C;/div>;\n  } else if (!isLoaded) {\n    return &#x3C;div>Loading...&#x3C;/div>;\n  } else {\n    return (\n      &#x3C;ul>\n        {items.map(item => (\n          &#x3C;li key={item.id}>\n            {item.name} {item.price}\n          &#x3C;/li>\n        ))}\n      &#x3C;/ul>\n    );\n  }\n}\n</code></pre>"},{"url":"/docs/quick-reference/vscode-themes/","relativePath":"docs/quick-reference/vscode-themes.md","relativeDir":"docs/quick-reference","base":"vscode-themes.md","name":"vscode-themes","frontmatter":{"title":"vscode-themes","excerpt":"To make it easy to write documentation in plain Markdown, most vscode-themes are styled using Markdown elements with few additional CSS classes.","seo":{"title":"vscode-themes","description":"This is the vscode-themes page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"vscode-themes","keyName":"property"},{"name":"og:description","value":"This is the vscode-themes page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"vscode-themes"},{"name":"twitter:description","value":"This is the vscode-themes page"}]},"template":"docs"},"html":"<h1>My Favorite VSCode Themes</h1>\n<p>Themes</p>\n<hr>\n<h3>My Favorite VSCode Themes</h3>\n<h3>Product Icon Themes:</h3>\n<h3>Fluent Icons</h3>\n<p>A product icon theme for Visual Studio Code</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*wE_xUE1f0GU8GBGo.png\" class=\"graf-image\" /></figure><a href=\"https://code.visualstudio.com/api/extension-guides/product-icon-theme\" class=\"markup--anchor markup--p-anchor\">Product icons themes</a> allow theme authors to customize the icons used in VS Code's built-in views: all icons except file icons (covered by file icon themes) and icons contributed by extensions. This extension uses <a href=\"https://www.figma.com/community/file/836835755999342788/Microsoft-Fluent-System-Icons\" class=\"markup--anchor markup--p-anchor\">Fluent Icons</a>.\n<h3>Install</h3>\n<ol>\n<li><span id=\"5f77\">Install the icon theme from the <a href=\"https://marketplace.visualstudio.com/items?itemName=miguelsolorio.fluent-icons\" class=\"markup--anchor markup--li-anchor\">Marketplace</a></span></li>\n<li><span id=\"6411\">Open the command palette (<code>Ctrl/Cmd + Shift + P</code>) and search for <code>Preferences: Product Icon Theme</code></span></li>\n<li><span id=\"0613\">Select <code>Fluent Icons</code></span></li>\n</ol>\n<h3>TBC…</h3>\n<hr>\n<h3><a href=\"https://vscodethemes.com/e/pushqrdx.theme-monokai-oblique-vscode\" class=\"markup--anchor markup--h3-anchor\">Monokai Oblique by pushqrdx</a></h3>\n<p>Monokai inspired theme for <a href=\"https://vscodethemes.com/e/pushqrdx.theme-monokai-oblique-vscode\" class=\"markup--anchor markup--p-anchor\">Visual Studio Code</a> and <a href=\"https://github.com/pushqrdx/monokai\" class=\"markup--anchor markup--p-anchor\">Visual Studio IDE</a>.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*43PXQoFMOr28C7_B.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/monokai.theme-monokai-pro-vscode\" class=\"markup--anchor markup--h3-anchor\">Monokai Pro by monokai (commercial)</a>\n<p>Beautiful functionality for professional developers, from the author of the original Monokai color scheme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*qwLfKRWuJl0hLZ2m.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/sdras.night-owl\" class=\"markup--anchor markup--h3-anchor\">Night Owl by Sarah Drasner</a>\n<p>A VS Code theme for the night owls out there. Works well in the daytime, too, but this theme is fine-tuned for those of us who like to code late into the night. Color choices have taken into consideration what is accessible to people with color blindness and in low-light circumstances. Decisions were also based on meaningful contrast for reading comprehension and for optimal razzle dazzle. ✨</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*w4jwUZlACQz-ndRu.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/will-stone.plastic\" class=\"markup--anchor markup--h3-anchor\">Plastic by Will Stone</a>\n<p>A simple theme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*xr3ul5T1_CAsnyWR.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/arcticicestudio.nord-visual-studio-code\" class=\"markup--anchor markup--h3-anchor\">Nord by arcticicestudio</a>\n<p>An arctic, north-bluish clean and elegant Visual Studio Code theme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*yQMVpYfepk53HNxN.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/daylerees.rainglow\" class=\"markup--anchor markup--h3-anchor\">Rainglow by Dayle Rees</a>\n<p>Collection of 320+ beautiful syntax and UI themes.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*FpJBK3DBT1FUmuLF.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/mischah.relaxed-theme\" class=\"markup--anchor markup--h3-anchor\">Relaxed Theme by Michael Kühnel</a>\n<p>A relaxed theme to take a more relaxed view of things.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*bdPe8FIrL8F9qFqx.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/ahmadawais.shades-of-purple\" class=\"markup--anchor markup--h3-anchor\">Shades of Purple by Ahmad Awais</a>\n<p>⚡ A professional theme with hand-picked &#x26; bold shades of purple 💜 to go along with your VS Code. A custom VS Code theme with style.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*lyNNDrSPE5fpaMBZ.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/Endormi.2077-theme\" class=\"markup--anchor markup--h3-anchor\">2077 theme by Endormi</a>\n<p>Cyberpunk 2077 inspired theme</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*1VdJDagHs-YTIicE.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/dustinsanders.an-old-hope-theme-vscode\" class=\"markup--anchor markup--h3-anchor\">An Old Hope Theme by Dustin Sanders</a>\n<p>VSCode theme inspired by a galaxy far far away…</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*8JZCxiWSVdupy-HQ.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/wart.ariake-dark\" class=\"markup--anchor markup--h3-anchor\">Ariake Dark by wart</a>\n<p>Dark VSCode theme inspired by Japanese traditional colors and the poetry composed 1000 years ago.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Pm8gFuyXa_xNniuP.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/akamud.vscode-theme-onedark\" class=\"markup--anchor markup--h3-anchor\">Atom One Dark Theme by Mahmoud Ali</a>\n<p>One Dark Theme based on Atom.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*YBzFlHIhCnEXPKsb.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/emroussel.atomize-atom-one-dark-theme\" class=\"markup--anchor markup--h3-anchor\">Atomize by emroussel</a>\n<p>A detailed and accurate Atom One Dark Theme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*trGkLz0fLzZMjNX_.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/teabyii.ayu\" class=\"markup--anchor markup--h3-anchor\">Ayu by teabyii</a>\n<p>A simple theme with bright colors and comes in three versions — dark, light and mirage for all day long comfortable work.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*YL26P4BF0Kz-0ck9.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/eckertalex.borealis\" class=\"markup--anchor markup--h3-anchor\">Borealis Theme by Alexander Eckert</a>\n<p>VS Code theme inspired by the calm colors of the aurora borealis in Alaska.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Df5XXUX50azLyP7K.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/ultradracula.captain-sweetheart\" class=\"markup--anchor markup--h3-anchor\">Captain Sweetheart by ultradracula</a>\n<p>Tuff but sweet theme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*93oi3wFSt7uH62VR.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/Yummygum.city-lights-theme\" class=\"markup--anchor markup--h3-anchor\">City Lights by Yummygum</a>\n<p>🏙 Yummygum's Official City Lights suite</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*LwpZlufyoKuCVjqn.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/wesbos.theme-cobalt2\" class=\"markup--anchor markup--h3-anchor\">Cobalt2 Theme Official by Wes Bos</a>\n<p>🔥 Official theme by Wes Bos.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*8KsnUfTVU-A9Aqcl.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/dracula-theme.theme-dracula\" class=\"markup--anchor markup--h3-anchor\">Dracula Official by Dracula Theme</a>\n<p>Official Dracula Theme. A dark theme for many editors, shells, and more.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*xGaF3Cs8iHoC5gUr.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/bogdanlazar.edge\" class=\"markup--anchor markup--h3-anchor\">Edge by Bogdan Lazar</a>\n<p>A simple theme with bright colors in three variants — Night Sky, Serene and Ocean for all day long comfortable work.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*qELxjfUYJNuRISgB.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/fisheva.eva-theme\" class=\"markup--anchor markup--h3-anchor\">Eva Theme by fisheva</a>\n<p>A colorful and semantic coloring code theme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Dzw_28GVEGa10m-9.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/nopjmp.fairyfloss\" class=\"markup--anchor markup--h3-anchor\">Fairy Floss by nopjmp and sailorhg</a>\n<p>A fun, purple-based pastel/candy/daydream fairyfloss theme made by sailorhg.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*wJkmVL0w1tz4n4_H.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/thomaspink.theme-github\" class=\"markup--anchor markup--h3-anchor\">GitHub Theme by Thomas Pink</a>\n<p>GitHub Theme for Visual Studio Code.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*H4ZAOtLrAniVho93.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/DimitarNonov.jellybeans-theme\" class=\"markup--anchor markup--h3-anchor\">Jellybeans Theme by Dimitar Nonov</a>\n<p>Jellybeans Theme for Visual Studio Code.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*oMhZGGsUfm8rqLtJ.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/whizkydee.material-palenight-theme\" class=\"markup--anchor markup--h3-anchor\">Material Palenight Theme by whizkydee</a>\n<p>An elegant and juicy material-like theme for Visual Studio Code.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*cw3IGUQSFahiPgiH.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/Equinusocio.vsc-material-theme\" class=\"markup--anchor markup--h3-anchor\">Material Theme by Mattia Astorino</a>\n<p>The most epic theme now for Visual Studio Code.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*2YvsABxfZ4Cv1Y_j.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/u29dc.mno\" class=\"markup--anchor markup--h3-anchor\">Mno by u29dc</a>\n<p>Minimal monochrome theme.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*_NT4CQBGRRlFQl9q.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/smlombardi.slime\" class=\"markup--anchor markup--h3-anchor\">Slime Theme by smlombardi</a>\n<p>A dark syntax/workbench theme for Visual Studio Code — optimized for SCSS, HTML, JS, TS, Markdown, and PHP files.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*-ldv4DoOVntnZbBt.png\" class=\"graf-image\" /></figure>### <a href=\"https://vscodethemes.com/e/selfrefactor.niketa-theme\" class=\"markup--anchor markup--h3-anchor\">Niketa Theme by Dejan Toteff</a>\n<p>Collection of 18 light themes separated in 4 groups by background's brightness.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*n_iRSy_1IDOgajFu.png\" class=\"graf-image\" /></figure>### If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://gist.github.com/bgoonz\"><strong>bgoonz's gists</strong><br />\n<em>Instantly share code, notes, and snippets. Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python |…</em>gist.github.com</a><a href=\"https://gist.github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/9bab65af3f0f\">March 18, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/my-favorite-vscode-themes-9bab65af3f0f\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on August 6, 2021.</p>"},{"url":"/docs/react/createReactApp/","relativePath":"docs/react/createReactApp.md","relativeDir":"docs/react","base":"createReactApp.md","name":"createReactApp","frontmatter":{"title":"npx-create-react-app","weight":0,"seo":{"title":"npx-create-react-app","description":"This is the npx-create-react-app page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"npx-create-react-app","keyName":"property"},{"name":"og:description","value":"This is the npx-create-react-app page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"npx-create-react-app"},{"name":"twitter:description","value":"This is the npx-create-react-app page"}]},"template":"docs"},"html":"<hr>\n<h2>description: takes soooo much time!</h2>\n<h1>Generating React Project</h1>\n<p>takes soooo much time!</p>\n<pre><code class=\"language-text\">npx create-react-app my-app\ncd my-app\nnpm start\n</code></pre>\n<h4>Babel can translate between different versions of javascript so that your code can run on browsers that are limited to ES5 compatibility... included by default with every new react project.</h4>\n<pre><code class=\"language-bash\">|15:25:30|bryan@LAPTOP-9LGJ3JGS:[05-installing-nodejs] 05-installing-nodejs_exitstatus:0__________________________________________________________o>\n\nnpx create-react-app my-app\ny-app\nnpm start\nCreating a new React app in /mnt/c/MY-WEB-DEV/10-React-V3/05-installing-nodejs/my-app.\n\n\nInstalling packages. This might take a couple of minutes.\nInstalling react, react-dom, and react-scripts with cra-template...\n\nyarn add v1.22.5\n[1/4] Resolving packages...\n[2/4] Fetching packages...\ninfo fsevents@1.2.13: The platform \"linux\" is incompatible with this module.\ninfo \"fsevents@1.2.13\" is an optional dependency and failed compatibility check. Excluding it from installation.\ninfo fsevents@2.3.2: The platform \"linux\" is incompatible with this module.\ninfo \"fsevents@2.3.2\" is an optional dependency and failed compatibility check. Excluding it from installation.\n[3/4] Linking dependencies...\nwarning \"react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.20.0\" has unmet peer dependency \"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta\".\n[----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------[4/4] Building fresh packages...\nsuccess Saved lockfile.\nsuccess Saved 7 new dependencies.\ninfo Direct dependencies\n├─ cra-template@1.1.2\n├─ react-dom@17.0.2\n├─ react-scripts@4.0.3\n└─ react@17.0.2\ninfo All dependencies\n├─ cra-template@1.1.2\n├─ immer@8.0.1\n├─ react-dev-utils@11.0.4\n├─ react-dom@17.0.2\n├─ react-scripts@4.0.3\n├─ react@17.0.2\n└─ scheduler@0.20.2\nDone in 768.43s.\n\nInstalling template dependencies using yarnpkg...\nyarn add v1.22.5\n[1/4] Resolving packages...\n[2/4] Fetching packages...\ninfo fsevents@2.3.2: The platform \"linux\" is incompatible with this module.\ninfo \"fsevents@2.3.2\" is an optional dependency and failed compatibility check. Excluding it from installation.\ninfo fsevents@1.2.13: The platform \"linux\" is incompatible with this module.\ninfo \"fsevents@1.2.13\" is an optional dependency and failed compatibility check. Excluding it from installation.\n[3/4] Linking dependencies...\nwarning \"react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.20.0\" has unmet peer dependency \"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta\".\nwarning \" > @testing-library/user-event@12.8.3\" has unmet peer dependency \"@testing-library/dom@>=7.21.4\".\n[4/4] Building fresh packages...\nsuccess Saved lockfile.\nsuccess Saved 17 new dependencies.\ninfo Direct dependencies\n├─ @testing-library/jest-dom@5.11.10\n├─ @testing-library/react@11.2.5\n├─ @testing-library/user-event@12.8.3\n├─ react-dom@17.0.2\n├─ react@17.0.2\n└─ web-vitals@1.1.1\ninfo All dependencies\n├─ @testing-library/dom@7.30.1\n├─ @testing-library/jest-dom@5.11.10\n├─ @testing-library/react@11.2.5\n├─ @testing-library/user-event@12.8.3\n├─ @types/aria-query@4.2.1\n├─ @types/jest@26.0.22\n├─ @types/testing-library__jest-dom@5.9.5\n├─ css.escape@1.5.1\n├─ css@3.0.0\n├─ dom-accessibility-api@0.5.4\n├─ lz-string@1.4.4\n├─ min-indent@1.0.1\n├─ react-dom@17.0.2\n├─ react@17.0.2\n├─ redent@3.0.0\n├─ strip-indent@3.0.0\n└─ web-vitals@1.1.1\nDone in 706.12s.\nRemoving template package using yarnpkg...\n\nyarn remove v1.22.5\n[1/2] Removing module cra-template...\n[2/2] Regenerating lockfile and installing missing dependencies...\ninfo fsevents@2.3.2: The platform \"linux\" is incompatible with this module.\ninfo \"fsevents@2.3.2\" is an optional dependency and failed compatibility check. Excluding it from installation.\ninfo fsevents@1.2.13: The platform \"linux\" is incompatible with this module.\ninfo \"fsevents@1.2.13\" is an optional dependency and failed compatibility check. Excluding it from installation.\nwarning \" > @testing-library/user-event@12.8.3\" has unmet peer dependency \"@testing-library/dom@>=7.21.4\".\nwarning \"react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.20.0\" has unmet peer dependency \"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta\".\nsuccess Uninstalled packages.\nDone in 619.62s.\n\nSuccess! Created my-app at /mnt/c/MY-WEB-DEV/10-React-V3/05-installing-nodejs/my-app\nInside that directory, you can run several commands:\n\n  yarn start\n    Starts the development server.\n\n  yarn build\n    Bundles the app into static files for production.\n\n  yarn test\n    Starts the test runner.\n\n  yarn eject\n    Removes this tool and copies build dependencies, configuration files\n    and scripts into the app directory. If you do this, you can't go back!\n\nWe suggest that you begin by typing:\n\n  cd my-app\n  yarn start\n\nCompiled successfully!\n\nYou can now view my-app in the browser.\n\n  Local:            http://localhost:3000\n  On Your Network:  http://172.25.168.12:3000\n\nNote that the development build is not optimized.\nTo create a production build, use yarn build.\n</code></pre>"},{"url":"/docs/react/","relativePath":"docs/react/index.md","relativeDir":"docs/react","base":"index.md","name":"index","frontmatter":{"title":"React","excerpt":"To make it easy to write documentation in plain Markdown, most React are styled using Markdown elements with few additional CSS classes.","seo":{"title":"React","description":"This is the React page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"React","keyName":"property"},{"name":"og:description","value":"This is the React page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"React"},{"name":"twitter:description","value":"This is the React page"}]},"template":"docs"},"html":"<h1>React</h1>\n<h1>Examples:</h1>\n<iframe src=\"https://codesandbox.io/embed/react-embeds-w6oec?fontsize=14&hidenavigation=1&theme=dark\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"React Embeds\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n<iframe src=\"https://codesandbox.io/embed/thirsty-cori-c9qxq?fontsize=14&hidenavigation=1&theme=dark\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"thirsty-cori-c9qxq\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n   \n### For more resources visit:\n<p><a href=\"https://github.com/bgoonz/React_Notes_V3\">bgoonz/React<em>Notes</em>V3A JavaScript library for building user interfaces React makes it painless to create interactive UIs. Design simple…github.com</a></p>\n<p><a href=\"https://gist.github.com/bgoonz/e07d9e7917ae9e98807358d1e7cc4a67\">Use this appendix to get any prerequisite concepts and terminology under your belt:</a></p>\n<p>Here I will walk through a demo…. skip down below for more fundamental examples and resources…</p>\n<h2>Learn Redux:</h2>\n<iframe class=\"block-content\" src=\"https://learning-redux42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<hr>\n<script src=\"https://gist.github.com/bgoonz/0e9d7ba47f02d41d8cecfd23beecd2b1.js\"></script>\n<h2>ALL CODE:</h2>\n<pre><code class=\"language-jsx\"></code></pre>\n<h2>React Cheat Sheet: <a id=\"8738\"></a></h2>\n<p>React-Tutorial-1:<a href=\"https://replit.com/@bgoonz/react-tutorial-1\">react-tutorial-1A React repl by bgoonzreplit.com</a></p>\n<p>React Boilerplate:<a href=\"https://replit.com/@bgoonz/Reactjs-Babel-Webpack-Boilerplate#index.js\">React.js + Babel + Webpack BoilerplateCreated by @eankeen | The ultimate trifecta - React, Babel, and Webpack - complete with hot module reloading and a…replit.com</a></p>"},{"url":"/docs/react/dont-use-index-as-keys/","relativePath":"docs/react/dont-use-index-as-keys.md","relativeDir":"docs/react","base":"dont-use-index-as-keys.md","name":"dont-use-index-as-keys","frontmatter":{"title":"Index as a key is an anti-pattern","weight":0,"excerpt":"So many times I have seen developers use the index of an item as its key when they render a list.","seo":{"title":"Lists and Keys","description":"Let me explain, a _key_ is the only thing React uses to identify DOM elements. What happens if you push an item to the list or remove something in the middle? If the _key_ is same as before React assumes that the DOM element represents the same component as before. But that is no longer true.","robots":[],"extra":[]},"template":"docs"},"html":"<h2>> ## Excerpt</h2>\n<blockquote>\n</blockquote>\n<hr>\n<h1>Lists and Keys - React</h1>\n<blockquote>\n<h2>Excerpt</h2>\n<p>A JavaScript library for building user interfaces</p>\n</blockquote>\n<hr>\n<p>First, let’s review how you transform lists in JavaScript.</p>\n<p>Given the code below, we use the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map\"><code>map()</code></a> function to take an array of <code>numbers</code> and double their values. We assign the new array returned by <code>map()</code> to the variable <code>doubled</code> and log it:</p>\n<pre><code>const numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map((number) => number * 2);console.log(doubled);\n</code></pre>\n<p>This code logs <code>[2, 4, 6, 8, 10]</code> to the console.</p>\n<p>In React, transforming arrays into lists of <a href=\"https://reactjs.org/docs/rendering-elements.html\">elements</a> is nearly identical.</p>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#rendering-multiple-components\"></a>Rendering Multiple Components</h3>\n<p>You can build collections of elements and <a href=\"https://reactjs.org/docs/introducing-jsx.html#embedding-expressions-in-jsx\">include them in JSX</a> using curly braces <code>{}</code>.</p>\n<p>Below, we loop through the <code>numbers</code> array using the JavaScript <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map\"><code>map()</code></a> function. We return a <code>&#x3C;li></code> element for each item. Finally, we assign the resulting array of elements to <code>listItems</code>:</p>\n<pre><code>const numbers = [1, 2, 3, 4, 5];\nconst listItems = numbers.map((number) =>  &#x3C;li>{number}&#x3C;/li>);\n</code></pre>\n<p>We include the entire <code>listItems</code> array inside a <code>&#x3C;ul></code> element, and <a href=\"https://reactjs.org/docs/rendering-elements.html#rendering-an-element-into-the-dom\">render it to the DOM</a>:</p>\n<pre><code>ReactDOM.render(\n  &#x3C;ul>{listItems}&#x3C;/ul>,  document.getElementById('root')\n);\n</code></pre>\n<p><a href=\"https://codepen.io/gaearon/pen/GjPyQr?editors=0011\"><strong>Try it on CodePen</strong></a></p>\n<p>This code displays a bullet list of numbers between 1 and 5.</p>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#basic-list-component\"></a>Basic List Component</h3>\n<p>Usually you would render lists inside a <a href=\"https://reactjs.org/docs/components-and-props.html\">component</a>.</p>\n<p>We can refactor the previous example into a component that accepts an array of <code>numbers</code> and outputs a list of elements.</p>\n<pre><code>function NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>    &#x3C;li>{number}&#x3C;/li>  );  return (\n    &#x3C;ul>{listItems}&#x3C;/ul>  );\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(\n  &#x3C;NumberList numbers={numbers} />,  document.getElementById('root')\n);\n</code></pre>\n<p>When you run this code, you’ll be given a warning that a key should be provided for list items. A “key” is a special string attribute you need to include when creating lists of elements. We’ll discuss why it’s important in the next section.</p>\n<p>Let’s assign a <code>key</code> to our list items inside <code>numbers.map()</code> and fix the missing key issue.</p>\n<pre><code>function NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>\n    &#x3C;li key={number.toString()}>      {number}\n    &#x3C;/li>\n  );\n  return (\n    &#x3C;ul>{listItems}&#x3C;/ul>\n  );\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(\n  &#x3C;NumberList numbers={numbers} />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><a href=\"https://codepen.io/gaearon/pen/jrXYRR?editors=0011\"><strong>Try it on CodePen</strong></a></p>\n<h2><a href=\"https://reactjs.org/docs/lists-and-keys.html#keys\"></a>Keys</h2>\n<p>Keys help React identify which items have changed, are added, or are removed. Keys should be given to the elements inside the array to give the elements a stable identity:</p>\n<pre><code>const numbers = [1, 2, 3, 4, 5];\nconst listItems = numbers.map((number) =>\n  &#x3C;li key={number.toString()}>    {number}\n  &#x3C;/li>\n);\n</code></pre>\n<p>The best way to pick a key is to use a string that uniquely identifies a list item among its siblings. Most often you would use IDs from your data as keys:</p>\n<pre><code>const todoItems = todos.map((todo) =>\n  &#x3C;li key={todo.id}>    {todo.text}\n  &#x3C;/li>\n);\n</code></pre>\n<p>When you don’t have stable IDs for rendered items, you may use the item index as a key as a last resort:</p>\n<pre><code>const todoItems = todos.map((todo, index) =>\n    &#x3C;li key={index}>    {todo.text}\n  &#x3C;/li>\n);\n</code></pre>\n<p>We don’t recommend using indexes for keys if the order of items may change. This can negatively impact performance and may cause issues with component state. Check out Robin Pokorny’s article for an <a href=\"https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318\">in-depth explanation on the negative impacts of using an index as a key</a>. If you choose not to assign an explicit key to list items then React will default to using indexes as keys.</p>\n<p>Here is an <a href=\"https://reactjs.org/docs/reconciliation.html#recursing-on-children\">in-depth explanation about why keys are necessary</a> if you’re interested in learning more.</p>\n<p>Keys only make sense in the context of the surrounding array.</p>\n<p>For example, if you <a href=\"https://reactjs.org/docs/components-and-props.html#extracting-components\">extract</a> a <code>ListItem</code> component, you should keep the key on the <code>&#x3C;ListItem /></code> elements in the array rather than on the <code>&#x3C;li></code> element in the <code>ListItem</code> itself.</p>\n<p><strong>Example: Incorrect Key Usage</strong></p>\n<pre><code>function ListItem(props) {\n  const value = props.value;\n  return (\n        &#x3C;li key={value.toString()}>      {value}\n    &#x3C;/li>\n  );\n}\n\nfunction NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>\n        &#x3C;ListItem value={number} />  );\n  return (\n    &#x3C;ul>\n      {listItems}\n    &#x3C;/ul>\n  );\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(\n  &#x3C;NumberList numbers={numbers} />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><strong>Example: Correct Key Usage</strong></p>\n<pre><code>function ListItem(props) {\n    return &#x3C;li>{props.value}&#x3C;/li>;}\n\nfunction NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>\n        &#x3C;ListItem key={number.toString()} value={number} />  );\n  return (\n    &#x3C;ul>\n      {listItems}\n    &#x3C;/ul>\n  );\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(\n  &#x3C;NumberList numbers={numbers} />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><a href=\"https://codepen.io/gaearon/pen/ZXeOGM?editors=0010\"><strong>Try it on CodePen</strong></a></p>\n<p>A good rule of thumb is that elements inside the <code>map()</code> call need keys.</p>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#keys-must-only-be-unique-among-siblings\"></a>Keys Must Only Be Unique Among Siblings</h3>\n<p>Keys used within arrays should be unique among their siblings. However, they don’t need to be globally unique. We can use the same keys when we produce two different arrays:</p>\n<pre><code>function Blog(props) {\n  const sidebar = (    &#x3C;ul>\n      {props.posts.map((post) =>\n        &#x3C;li key={post.id}>          {post.title}\n        &#x3C;/li>\n      )}\n    &#x3C;/ul>\n  );\n  const content = props.posts.map((post) =>    &#x3C;div key={post.id}>      &#x3C;h3>{post.title}&#x3C;/h3>\n      &#x3C;p>{post.content}&#x3C;/p>\n    &#x3C;/div>\n  );\n  return (\n    &#x3C;div>\n      {sidebar}      &#x3C;hr />\n      {content}    &#x3C;/div>\n  );\n}\n\nconst posts = [\n  {id: 1, title: 'Hello World', content: 'Welcome to learning React!'},\n  {id: 2, title: 'Installation', content: 'You can install React from npm.'}\n];\nReactDOM.render(\n  &#x3C;Blog posts={posts} />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><a href=\"https://codepen.io/gaearon/pen/NRZYGN?editors=0010\"><strong>Try it on CodePen</strong></a></p>\n<p>Keys serve as a hint to React but they don’t get passed to your components. If you need the same value in your component, pass it explicitly as a prop with a different name:</p>\n<pre><code>const content = posts.map((post) =>\n  &#x3C;Post\n    key={post.id}    id={post.id}    title={post.title} />\n);\n</code></pre>\n<p>With the example above, the <code>Post</code> component can read <code>props.id</code>, but not <code>props.key</code>.</p>\n<h3><a href=\"https://reactjs.org/docs/lists-and-keys.html#embedding-map-in-jsx\"></a>Embedding map() in JSX</h3>\n<p>In the examples above we declared a separate <code>listItems</code> variable and included it in JSX:</p>\n<pre><code>function NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>    &#x3C;ListItem key={number.toString()}              value={number} />  );  return (\n    &#x3C;ul>\n      {listItems}\n    &#x3C;/ul>\n  );\n}\n</code></pre>\n<p>JSX allows <a href=\"https://reactjs.org/docs/introducing-jsx.html#embedding-expressions-in-jsx\">embedding any expression</a> in curly braces so we could inline the <code>map()</code> result:</p>\n<pre><code>function NumberList(props) {\n  const numbers = props.numbers;\n  return (\n    &#x3C;ul>\n      {numbers.map((number) =>        &#x3C;ListItem key={number.toString()}                  value={number} />      )}    &#x3C;/ul>\n  );\n}\n</code></pre>\n<p><a href=\"https://codepen.io/gaearon/pen/BLvYrB?editors=0010\"><strong>Try it on CodePen</strong></a></p>\n<p>Sometimes this results in clearer code, but this style can also be abused. Like in JavaScript, it is up to you to decide whether it is worth extracting a variable for readability. Keep in mind that if the <code>map()</code> body is too nested, it might be a good time to <a href=\"https://reactjs.org/docs/components-and-props.html#extracting-components\">extract a component</a>.</p>\n<p>So many times I have seen developers use the <em>index</em> of an item as its <em>key</em> when they render a list.</p>\n<p>todos.map((todo, index) => (<br>\n&#x3C;Todo {...todo} key={index} /><br>\n));<br>\n}</p>\n<p>It looks elegant and it does get rid of the warning (which was the ‘real’ issue, right?). What is the danger here?</p>\n<blockquote>\n<p>It may break your application and display wrong data!</p>\n</blockquote>\n<p>Let me explain, a <em>key</em> is the only thing React uses to identify DOM elements. What happens if you push an item to the list or remove something in the middle? If the <em>key</em> is same as before React assumes that the DOM element represents the same component as before. But that is no longer true.</p>\n<p><img src=\"https://miro.medium.com/max/27/1*9N62zUlyJcQet8kr7e_FVg.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/1*9N62zUlyJcQet8kr7e_FVg.png\"></p>\n<p>Stephen describes the problem he run into on <a href=\"https://egghead.io/forums/lesson-discussion/topics/break-up-components-into-smaller-pieces-using-functional-components#post-6310\">egghead.io</a></p>\n<p>To demonstrate the potential danger I created <a href=\"https://jsbin.com/wohima/edit?output\">a simple example</a> (<a href=\"http://jsbin.com/wohima/edit?js,output\">with source</a>).</p>\n<p><img src=\"https://miro.medium.com/max/630/1*GFYGPdDFLYcLFzx-E-GEcw.jpeg\"></p>\n<p>Screenshot of the example showing the danger of using the index as key.</p>\n<p>It turns out, when nothing is passed React uses the <em>index</em> as <em>key</em> because it is the best guess at the moment. Moreover, it will warn you that it is suboptimal (it says that in a bit confusing words, yes). If you provide it by yourself React just thinks that you know what you are doing which — remember the example — can lead to unpredictable results.</p>\n<h2>Better</h2>\n<p>Each such item should have a <em>permanent</em> and <em>unique</em> property. Ideally, it should be assigned when the item is created. Of course, I am speaking about an <em>id</em>. Then we can use it the following way:</p>\n<p>{<br>\ntodos.map((todo) => (<br>\n&#x3C;Todo {...todo} key={todo.id} /><br>\n));<br>\n}</p>\n<blockquote>\n<p><strong>Note:</strong> First look at the existing properties of the items. It is possible they already have something that can be used as an <em>id</em>.</p>\n</blockquote>\n<p>One way to do so it to just move the numbering one step up in the abstraction. Using a global index makes sure any two items would have different <em>id</em>s.</p>\n<p>let todoCounter = 1;const createNewTodo = (text) => ({<br>\ncompleted: false,<br>\nid: todoCounter++,<br>\ntext<br>\n}</p>\n<h2>Much better</h2>\n<p>A production solution should use a more robust approach that would handle a distributed creation of items. For such, I recommend <a href=\"https://github.com/ai/nanoid/\">nanoid</a>. It quickly generates short non-sequential url-friendly unique ids. The code could look like the following:</p>\n<p>import { nanoid } from 'nanoid';const createNewTodo = (text) => ({<br>\ncompleted: false,<br>\nid: nanoid(),<br>\ntext<br>\n}</p>\n<blockquote>\n<p><strong>TL;DR:</strong> Generate a unique <em>id</em> for every item and use it as <em>key</em> when rendering the list.</p>\n</blockquote>\n<h2>Update: Exception from the rule</h2>\n<p>Many people asked if they always, <em>always</em> have to generate ids. Others have suggested use cases when using the index as a key seems justifiable.</p>\n<p>It is true that sometimes generating new ids is redundant and may be avoided. For example translation of license terms or list of contributors.</p>\n<p>To help you decide, I put together three conditions which these examples have in common:</p>\n<ol>\n<li>the list and items are static-they are not computed and do not change;</li>\n<li>the items in the list have no ids;</li>\n<li>the list is <em>never</em> reordered or filtered.</li>\n</ol>\n<p>When <em>all</em> of them are met, you <strong>may safely use the index as a key</strong>.</p>\n<h2>Update 2: React, Preact, and *react</h2>\n<p>Although in this article I write about React, the problem is not exclusive to it. In similar libraries, like Preact, the danger is present, too. However, the effects can be different.</p>\n<p>See the following StackOverflow question, where the last element disappears. Also please note the explanation in the answers provided by the creator of Preact,</p>"},{"url":"/docs/react/cheatsheet/","relativePath":"docs/react/cheatsheet.md","relativeDir":"docs/react","base":"cheatsheet.md","name":"cheatsheet","frontmatter":{"title":"React Cheat Sheets:","weight":0,"excerpt":"cheat sheet","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>React Patterns:</h1>\n<iframe src=\"https://codesandbox.io/embed/lucid-pateu-ln8ex?fontsize=14&hidenavigation=1&theme=dark&view=preview\"\n     style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n     title=\"lucid-pateu-ln8ex\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n<h2>React Cheat Sheet</h2>\n<p>React:</p>\n<ul>\n<li><code>&#x3C;script src=\"https://unpkg.com/react@15/dist/react.js\">&#x3C;/script></code></li>\n<li><code>$ npm install react --save</code></li>\n<li><code>$ bower install react --save</code></li>\n</ul>\n<p>React DOM:</p>\n<ul>\n<li><code>&#x3C;script src=\"https://unpkg.com/react-dom@15/dist/react-dom.js\">&#x3C;/script></code></li>\n<li><code>$ npm install react-dom</code></li>\n<li><code>$ bower install react-dom --save</code></li>\n</ul>\n<h2>Rendering</h2>\n<h3>Rendering (ES5)</h3>\n<pre><code class=\"language-js\">ReactDOM.render(React.createElement(Link, { name: 'HackHall.com' }), document.getElementById('menu'));\n</code></pre>\n<h3>Rendering (ES5+JSX)</h3>\n<pre><code class=\"language-js\">ReactDOM.render(&#x3C;Link name=\"HackHall.com\" />, document.getElementById('menu'));\n</code></pre>\n<h2>Server-side Rendering</h2>\n<pre><code class=\"language-js\">var ReactDOMServer = require('react-dom/server');\nReactDOMServer.renderToString(Link, { name: 'HackHall.com' });\nReactDOMServer.renderToStaticMarkup(Link, { name: 'HackHall.com' });\n</code></pre>\n<h2>Components</h2>\n<h3>ES5</h3>\n<pre><code class=\"language-js\">var Link = React.createClass({\n    displayName: 'Link',\n    render: function () {\n        return React.createElement('a', { className: 'btn', title: this.props.name }, 'Click ->', this.props.name);\n    }\n});\n</code></pre>\n<h3>ES5 + JSX</h3>\n<pre><code class=\"language-js\">var Link = React.createClass({\n    render: function () {\n        return (\n            &#x3C;a className=\"btn\" title={this.props.name}>\n                Click -> this.props.name\n            &#x3C;/a>\n        );\n    }\n});\n</code></pre>\n<h3>ES6 + JSX</h3>\n<pre><code class=\"language-js\">class Link extends React.Component {\n    render() {\n        return (\n            &#x3C;a className=\"btn\" title={this.props.name}>\n                Click -> this.props.name\n            &#x3C;/a>\n        );\n    }\n}\n</code></pre>\n<hr>\n<hr>\n<pre><code class=\"language-sh\">npm install --save react       // declarative and flexible JavaScript library for building UI\nnpm install --save react-dom   // serves as the entry point of the DOM-related rendering paths\nnpm install --save prop-types  // runtime type checking for React props and similar objects\n</code></pre>\n<p>// notes: don't forget the command lines</p>\n<pre><code class=\"language-js\">/* *******************************************************************************************\n * REACT\n * https://reactjs.org/docs/react-api.html\n * ******************************************************************************************* */\n\n\n// Create and return a new React element of the given type.\n// Code written with JSX will be converted to use React.createElement().\n// You will not typically invoke React.createElement() directly if you are using JSX.\nReact.createElement(\n  type,\n  [props],\n  [...children]\n)\n\n// Clone and return a new React element using element as the starting point.\n// The resulting element will have the original element's props with the new props merged in shallowly.\nReact.cloneElement(\n  element,\n  [props],\n  [...children]\n)\n\n// Verifies the object is a React element. Returns true or false.\nReact.isValidElement(object)\n\nReact.Children  // provides utilities for dealing with the this.props.children opaque data structure.\n\n// Invokes a function on every immediate child contained within children with this set to thisArg.\nReact.Children.map(children, function[(thisArg)])\n\n// Like React.Children.map() but does not return an array.\nReact.Children.forEach(children, function[(thisArg)])\n\n// Returns the total number of components in children,\n// equal to the number of times that a callback passed to map or forEach would be invoked.\nReact.Children.count(children)\n\n// Verifies that children has only one child (a React element) and returns it.\n// Otherwise this method throws an error.\nReact.Children.only(children)\n\n// Returns the children opaque data structure as a flat array with keys assigned to each child.\n// Useful if you want to manipulate collections of children in your render methods,\n// especially if you want to reorder or slice this.props.children before passing it down.\nReact.Children.toArray(children)\n\n// The React.Fragment component lets you return multiple elements in a render() method without creating an additional DOM element\n// You can also use it with the shorthand &#x3C;>&#x3C;/> syntax.\nReact.Fragment\n\n\n/* *******************************************************************************************\n * REACT.COMPONENT\n * React.Component is an abstract base class, so it rarely makes sense to refer to React.Component\n * directly. Instead, you will typically subclass it, and define at least a render() method.\n * https://reactjs.org/docs/react-component.html\n * ******************************************************************************************* */\n\n\nclass Component extends React.Component {\n  // Will be called before it is mounted\n  constructor(props) {\n    // Call this method before any other statement\n    // or this.props will be undefined in the constructor\n    super(props);\n\n    // The constructor is also often used to bind event handlers to the class instance.\n    // Binding makes sure the method has access to component attributes like this.props and this.state\n    this.method = this.method.bind(this);\n\n    // The constructor is the right place to initialize state.\n    this.state = {\n      active: true,\n\n      // In rare cases, it's okay to initialize state based on props.\n      // This effectively “forks” the props and sets the state with the initial props.\n      // If you “fork” props by using them for state, you might also want to implement componentWillReceiveProps(nextProps)\n      // to keep the state up-to-date with them. But lifting state up is often easier and less bug-prone.\n      color: props.initialColor\n    };\n  }\n\n  // Enqueues changes to the component state and\n  // tells React that this component and its children need to be re-rendered with the updated state.\n  // setState() does not always immediately update the component. It may batch or defer the update until later.\n  // This makes reading this.state right after calling setState() a potential pitfall.\n  // Instead, use componentDidUpdate or a setState callback.\n  // You may optionally pass an object as the first argument to setState() instead of a function.\n  setState(updater[, callback]) { }\n\n  // Invoked just before mounting occurs (before render())\n  // This is the only lifecycle hook called on server rendering.\n  componentWillMount() { }\n\n  // Invoked immediately after a component is mounted.\n  // Initialization that requires DOM nodes should go here.\n  // If you need to load data from a remote endpoint, this is a good place to instantiate the network request.\n  // This method is a good place to set up any subscriptions. If you do that, don't forget to unsubscribe in componentWillUnmount().\n  componentDidMount() { }\n\n  // Invoked before a mounted component receives new props.\n  // If you need to update the state in response to prop changes (for example, to reset it),\n  // you may compare this.props and nextProps and perform state transitions using this.setState() in this method.\n  componentWillReceiveProps(nextProps) { }\n\n  // Let React know if a component's output is not affected by the current change in state or props.\n  // The default behavior is to re-render on every state change, and in the vast majority of cases you should rely on the default behavior.\n  // shouldComponentUpdate() is invoked before rendering when new props or state are being received. Defaults to true.\n  // This method is not called for the initial render or when forceUpdate() is used.\n  // Returning false does not prevent child components from re-rendering when their state changes.\n  shouldComponentUpdate(nextProps, nextState) { }\n\n  // Invoked just before rendering when new props or state are being received.\n  // Use this as an opportunity to perform preparation before an update occurs. This method is not called for the initial render.\n  // Note that you cannot call this.setState() here; nor should you do anything else\n  // (e.g. dispatch a Redux action) that would trigger an update to a React component before componentWillUpdate() returns.\n  // If you need to update state in response to props changes, use componentWillReceiveProps() instead.\n  componentWillUpdate(nextProps, nextState) { }\n\n  // Invoked immediately after updating occurs. This method is not called for the initial render.\n  // Use this as an opportunity to operate on the DOM when the component has been updated.\n  // This is also a good place to do network requests as long as you compare the current props to previous props (e.g. a network request may not be necessary if the props have not changed).\n  componentDidUpdate(prevProps, prevState) { }\n\n  // Invoked immediately before a component is unmounted and destroyed.\n  // Perform any necessary cleanup in this method, such as invalidating timers, canceling network requests,\n  // or cleaning up any subscriptions that were created in componentDidMount().\n  componentWillUnmount() { }\n\n  // Error boundaries are React components that catch JavaScript errors anywhere in their child component tree,\n  // log those errors, and display a fallback UI instead of the component tree that crashed.\n  // Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.\n  componentDidCatch() { }\n\n  // This method is required.\n  // It should be pure, meaning that it does not modify component state,\n  // it returns the same result each time it's invoked, and\n  // it does not directly interact with the browser (use lifecycle methods for this)\n  // It must return one of the following types: react elements, string and numbers, portals, null or booleans.\n  render() {\n    // Contains the props that were defined by the caller of this component.\n    console.log(this.props);\n\n    // Contains data specific to this component that may change over time.\n    // The state is user-defined, and it should be a plain JavaScript object.\n    // If you don't use it in render(), it shouldn't be in the state.\n    // For example, you can put timer IDs directly on the instance.\n    // Never mutate this.state directly, as calling setState() afterwards may replace the mutation you made.\n    // Treat this.state as if it were immutable.\n    console.log(this.state);\n\n    return (\n      &#x3C;div>\n        {/* Comment goes here */}\n        Hello, {this.props.name}!\n      &#x3C;/div>\n    );\n  }\n}\n\n// Can be defined as a property on the component class itself, to set the default props for the class.\n// This is used for undefined props, but not for null props.\nComponent.defaultProps = {\n  color: 'blue'\n};\n\ncomponent = new Component();\n\n// By default, when your component's state or props change, your component will re-render.\n// If your render() method depends on some other data, you can tell React that the component needs re-rendering by calling forceUpdate().\n// Normally you should try to avoid all uses of forceUpdate() and only read from this.props and this.state in render().\ncomponent.forceUpdate(callback)\n\n\n/* *******************************************************************************************\n * REACT.DOM\n * The react-dom package provides DOM-specific methods that can be used at the top level of\n * your app and as an escape hatch to get outside of the React model if you need to.\n * Most of your components should not need to use this module.\n * https://reactjs.org/docs/react-dom.html\n * ******************************************************************************************* */\n\n\n// Render a React element into the DOM in the supplied container and return a reference\n// to the component (or returns null for stateless components).\nReactDOM.render(element, container[, callback])\n\n// Same as render(), but is used to hydrate a container whose HTML contents were rendered\n// by ReactDOMServer. React will attempt to attach event listeners to the existing markup.\nReactDOM.hydrate(element, container[, callback])\n\n// Remove a mounted React component from the DOM and clean up its event handlers and state.\n// If no component was mounted in the container, calling this function does nothing.\n// Returns true if a component was unmounted and false if there was no component to unmount.\nReactDOM.unmountComponentAtNode(container)\n\n// If this component has been mounted into the DOM, this returns the corresponding native browser\n// DOM element. This method is useful for reading values out of the DOM, such as form field values\n// and performing DOM measurements. In most cases, you can attach a ref to the DOM node and avoid\n// using findDOMNode at all.\nReactDOM.findDOMNode(component)\n\n// Creates a portal. Portals provide a way to render children into a DOM node that exists outside\n// the hierarchy of the DOM component.\nReactDOM.createPortal(child, container)\n\n\n/* *******************************************************************************************\n * REACTDOMSERVER\n * The ReactDOMServer object enables you to render components to static markup.\n * https://reactjs.org/docs/react-dom.html\n * ******************************************************************************************* */\n\n\n// Render a React element to its initial HTML. React will return an HTML string.\n// You can use this method to generate HTML on the server and send the markup down on the initial\n// request for faster page loads and to allow search engines to crawl your pages for SEO purposes.\nReactDOMServer.renderToString(element)\n\n// Similar to renderToString, except this doesn't create extra DOM attributes that React uses\n// internally, such as data-reactroot. This is useful if you want to use React as a simple static\n// page generator, as stripping away the extra attributes can save some bytes.\nReactDOMServer.renderToStaticMarkup(element)\n\n// Render a React element to its initial HTML. Returns a Readable stream that outputs an HTML string.\n// The HTML output by this stream is exactly equal to what ReactDOMServer.renderToString would return.\n// You can use this method to generate HTML on the server and send the markup down on the initial\n// request for faster page loads and to allow search engines to crawl your pages for SEO purposes.\nReactDOMServer.renderToNodeStream(element)\n\n// Similar to renderToNodeStream, except this doesn't create extra DOM attributes that React uses\n// internally, such as data-reactroot. This is useful if you want to use React as a simple static\n// page generator, as stripping away the extra attributes can save some bytes.\nReactDOMServer.renderToStaticNodeStream(element)\n\n\n/* *******************************************************************************************\n * TYPECHECKING WITH PROPTYPES\n * https://reactjs.org/docs/typechecking-with-proptypes.html\n * ******************************************************************************************* */\n\n\nimport PropTypes from 'prop-types';\n\nMyComponent.propTypes = {\n  // You can declare that a prop is a specific JS type. By default, these\n  // are all optional.\n  optionalArray: PropTypes.array,\n  optionalBool: PropTypes.bool,\n  optionalFunc: PropTypes.func,\n  optionalNumber: PropTypes.number,\n  optionalObject: PropTypes.object,\n  optionalString: PropTypes.string,\n  optionalSymbol: PropTypes.symbol,\n\n  // Anything that can be rendered: numbers, strings, elements or an array\n  // (or fragment) containing these types.\n  optionalNode: PropTypes.node,\n\n  // A React element.\n  optionalElement: PropTypes.element,\n\n  // You can also declare that a prop is an instance of a class. This uses\n  // JS's instanceof operator.\n  optionalMessage: PropTypes.instanceOf(Message),\n\n  // You can ensure that your prop is limited to specific values by treating\n  // it as an enum.\n  optionalEnum: PropTypes.oneOf(['News', 'Photos']),\n\n  // An object that could be one of many types\n  optionalUnion: PropTypes.oneOfType([\n    PropTypes.string,\n    PropTypes.number,\n    PropTypes.instanceOf(Message)\n  ]),\n\n  // An array of a certain type\n  optionalArrayOf: PropTypes.arrayOf(PropTypes.number),\n\n  // An object with property values of a certain type\n  optionalObjectOf: PropTypes.objectOf(PropTypes.number),\n\n  // An object taking on a particular shape\n  optionalObjectWithShape: PropTypes.shape({\n    color: PropTypes.string,\n    fontSize: PropTypes.number\n  }),\n\n  // You can chain any of the above with `isRequired` to make sure a warning\n  // is shown if the prop isn't provided.\n  requiredFunc: PropTypes.func.isRequired,\n\n  // A value of any data type\n  requiredAny: PropTypes.any.isRequired,\n\n  // You can also specify a custom validator. It should return an Error\n  // object if the validation fails. Don't `console.warn` or throw, as this\n  // won't work inside `oneOfType`.\n  customProp: function(props, propName, componentName) {\n    if (!/matchme/.test(props[propName])) {\n      return new Error(\n        'Invalid prop `' + propName + '` supplied to' +\n        ' `' + componentName + '`. Validation failed.'\n      );\n    }\n  },\n\n  // You can also supply a custom validator to `arrayOf` and `objectOf`.\n  // It should return an Error object if the validation fails. The validator\n  // will be called for each key in the array or object. The first two\n  // arguments of the validator are the array or object itself, and the\n  // current item's key.\n  customArrayProp: PropTypes.arrayOf(function(propValue, key, componentName, location, propFullName) {\n    if (!/matchme/.test(propValue[key])) {\n      return new Error(\n        'Invalid prop `' + propFullName + '` supplied to' +\n        ' `' + componentName + '`. Validation failed.'\n      );\n    }\n  })\n};\n</code></pre>\n<hr>\n<hr>\n<h2>Advanced Components</h2>\n<h3>Options (ES5)</h3>\n<ul>\n<li><code>propTypes object</code>: Type validation in development mode</li>\n<li><code>getDefaultProps function()</code>: object of default props</li>\n<li><code>getInitialState function()</code>: object of the initial state</li>\n</ul>\n<p>ES5:</p>\n<pre><code class=\"language-js\">var Link = React.createClass({\n    propTypes: { name: React.PropTypes.string },\n    getDefaultProps: function () {\n        return { initialCount: 0 };\n    },\n    getInitialState: function () {\n        return { count: this.props.initialCount };\n    },\n    tick: function () {\n        this.setState({ count: this.state.count + 1 });\n    },\n    render: function () {\n        return React.createElement(\n            'a',\n            { className: 'btn', href: '#', title: this.props.name, onClick: this.tick.bind(this) },\n            'Click ->',\n            this.props.name ? this.props.name : 'webapplog.com',\n            ' (Clicked: ' + this.state.count + ')'\n        );\n    }\n});\n</code></pre>\n<p>ES5 + JSX:</p>\n<pre><code class=\"language-js\">var Link = React.createClass({\n    propTypes: { name: React.PropTypes.string },\n    getDefaultProps: function () {\n        return { initialCount: 0 };\n    },\n    getInitialState: function () {\n        return { count: this.props.initialCount };\n    },\n    tick: function () {\n        this.setState({ count: this.state.count + 1 });\n    },\n    render: function () {\n        return (\n            &#x3C;a onClick={this.tick.bind(this)} href=\"#\" className=\"btn\" title={this.props.name}>\n                Click -> {this.props.name ? this.props.name : 'webapplog.com'}\n                (Clicked: {this.state.count})\n            &#x3C;/a>\n        );\n    }\n});\n</code></pre>\n<p>ES6 + JSX:</p>\n<pre><code class=\"language-js\">export class Link extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { count: props.initialCount };\n    }\n    tick() {\n        this.setState({ count: this.state.count + 1 });\n    }\n    render() {\n        return (\n            &#x3C;a onClick={this.tick.bind(this)} href=\"#\" className=\"btn\" title={this.props.name}>\n                Click -> {this.props.name ? this.props.name : 'webapplog.com'}\n                (Clicked: {this.state.count})\n            &#x3C;/a>\n        );\n    }\n}\nLink.propTypes = { initialCount: React.PropTypes.number };\nLink.defaultProps = { initialCount: 0 };\n</code></pre>\n<h2>Lifecycle Events</h2>\n<p>Modern React lifecycle methods (v16+)\n<img src=\"DZ-97vzW4AAbcZj.jpg\"></p>\n<p>Legacy Lifecycle Events:</p>\n<ul>\n<li><code>componentWillMount function()</code></li>\n<li><code>componentDidMount function()</code></li>\n<li><code>componentWillReceiveProps function(nextProps)</code></li>\n<li><code>shouldComponentUpdate function(nextProps, nextState)-> bool</code></li>\n<li><code>componentWillUpdate function(nextProps, nextState)</code></li>\n<li><code>componentDidUpdate function(prevProps, prevState)</code></li>\n<li><code>componentWillUnmount function()</code></li>\n</ul>\n<p>Sequence of lifecycle events:</p>\n<p><img src=\"lifecycle-events.png\"></p>\n<p>Inspired by <a href=\"http://react.tips\">http://react.tips</a></p>\n<h2>Special Props</h2>\n<ul>\n<li><code>key</code>: Unique identifier for an element to turn arrays/lists into hashes for better performance, e.g., <code>key={id}</code></li>\n<li><code>ref</code>: Reference to an element via <code>this.refs.NAME</code>, e.g., <code>ref=\"email\"</code> will create <code>this.refs.email</code> DOM node or <code>ReactDOM.findDOMNode(this.refs.email)</code></li>\n<li><code>style</code>: Accept an object of styles, instead of a string (immutable since v0.14), e.g., <code>style={{color: red}}</code></li>\n<li><code>className</code>: the HTML <code>class</code> attribute, e.g., <code>className=\"btn\"</code></li>\n<li><code>htmlFor</code>: the HTML <code>for</code> attribute, e.g., <code>htmlFor=\"email\"</code></li>\n<li><code>dangerouslySetInnerHTML</code>: raw HTML by providing an object with the key <code>__html</code></li>\n<li><code>children</code>: content of the element via <code>this.props.children</code>, e.g., <code>this.props.children[0]</code></li>\n<li><code>data-NAME</code>: custom attribute, e.g., <code>data-tooltip-text=\"...\"</code></li>\n</ul>\n<h2>propTypes</h2>\n<p>Types available under <code>React.PropTypes</code>:</p>\n<ul>\n<li><code>any</code></li>\n<li><code>array</code></li>\n<li><code>bool</code></li>\n<li><code>element</code></li>\n<li><code>func</code></li>\n<li><code>node</code></li>\n<li><code>number</code></li>\n<li><code>object</code></li>\n<li><code>string</code></li>\n</ul>\n<p>To make required, append <code>.isRequired</code>.</p>\n<p>More methods:</p>\n<ul>\n<li><code>instanceOf(constructor)</code></li>\n<li><code>oneOf(['News', 'Photos'])</code></li>\n<li><code>oneOfType([propType, propType])</code></li>\n</ul>\n<h3>Custom Validation</h3>\n<pre><code class=\"language-js\">propTypes: {\n  customProp: function(props, propName, componentName) {\n    if (!/regExPattern/.test(props[propName])) {\n      return new Error('Validation failed!');\n    }\n  }\n}\n</code></pre>\n<h2>Component Properties and Methods</h2>\n<p>Properties:</p>\n<ul>\n<li><code>this.refs</code>: Lists components with a <code>ref</code> prop</li>\n<li><code>this.props</code>: Any props passed to an element (immutable)</li>\n<li><code>this.state</code>: State set by setState and getInitialState (muttable) — avoid setting state manually with <code>this.state=...</code></li>\n<li><code>this.isMounted</code>: Flag whether the element has a corresponding DOM node or not</li>\n</ul>\n<p>Methods:</p>\n<ul>\n<li><code>setState(changes)</code>: Change state (partially) to <code>this.state</code> and trigger re-render</li>\n<li><code>replaceState(newState)</code>: Replace <code>this.state</code> and trigger re-render</li>\n<li><code>forceUpdate()</code>: Trigger DOM re-render immediately</li>\n</ul>\n<h2>React Addons</h2>\n<p>As npm modules:</p>\n<ul>\n<li><a href=\"http://facebook.github.io/react/docs/animation.html\"><code>react-addons-css-transition-group</code></a></li>\n<li><a href=\"http://facebook.github.io/react/docs/perf.html\"><code>react-addons-perf</code></a></li>\n<li><a href=\"http://facebook.github.io/react/docs/test-utils.html\"><code>react-addons-test-utils</code></a></li>\n<li><a href=\"http://facebook.github.io/react/docs/pure-render-mixin.html\"><code>react-addons-pure-render-mixin</code></a></li>\n<li><a href=\"http://facebook.github.io/react/docs/two-way-binding-helpers.html\"><code>react-addons-linked-state-mixin</code></a></li>\n<li><code>react-addons-clone-with-props</code></li>\n<li><code>react-addons-create-fragment</code></li>\n<li><code>react-addons-css-transition-group</code></li>\n<li><code>react-addons-linked-state-mixin</code></li>\n<li><code>react-addons-pure-render-mixin</code></li>\n<li><code>react-addons-shallow-compare</code></li>\n<li><code>react-addons-transition-group</code></li>\n<li><a href=\"http://facebook.github.io/react/docs/update.html\"><code>react-addons-update</code></a></li>\n</ul>\n<h2>React Components</h2>\n<ul>\n<li><a href=\"https://github.com/brillout/awesome-react-components\">https://github.com/brillout/awesome-react-components</a> and <a href=\"http://devarchy.com/react-components\">http://devarchy.com/react-components</a>: List of React components</li>\n<li><a href=\"http://www.material-ui.com\">Material-UI</a>: Material design React components</li>\n<li><a href=\"http://react-toolbox.com\">http://react-toolbox.com</a>: Set of React components that implement Google Material Design specification</li>\n<li><a href=\"https://js.coach\">https://js.coach</a>: Opinionated catalog of open source JS (mostly React) packages</li>\n<li><a href=\"https://react.rocks\">https://react.rocks</a>: Catalog of React components</li>\n<li><a href=\"https://khan.github.io/react-components\">https://khan.github.io/react-components</a>: Khan Academy React components</li>\n<li><a href=\"http://www.reactjsx.com\">http://www.reactjsx.com</a>: Registry of React components</li>\n</ul>"},{"url":"/docs/react/jsx/","relativePath":"docs/react/jsx.md","relativeDir":"docs/react","base":"jsx.md","name":"jsx","frontmatter":{"title":"Introducing JSX","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Introducing JSX\n\n</h1>\n<p>Consider this variable declaration:</p>\n<p>This funny tag syntax is neither a string nor HTML.</p>\n<p>It is called JSX, and it is a syntax extension to JavaScript. We recommend using it with React to describe what the UI should look like. JSX may remind you of a template language, but it comes with the full power of JavaScript.</p>\n<p>JSX produces React “elements”. We will explore rendering them to the DOM in the <a href=\"https://reactjs.org/docs/rendering-elements.html\">next section</a>. Below, you can find the basics of JSX necessary to get you started.</p>\n<h3>Why JSX?</h3>\n<p>React embraces the fact that rendering logic is inherently coupled with other UI logic: how events are handled, how the state changes over time, and how the data is prepared for display.</p>\n<p>Instead of artificially separating <em>technologies</em> by putting markup and logic in separate files, React <a href=\"https://en.wikipedia.org/wiki/Separation_of_concerns\">separates <em>concerns</em></a> with loosely coupled units called “components” that contain both. We will come back to components in a <a href=\"https://reactjs.org/docs/components-and-props.html\">further section</a>, but if you're not yet comfortable putting markup in JS, <a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">this talk</a> might convince you otherwise.</p>\n<p>React <a href=\"https://reactjs.org/docs/react-without-jsx.html\">doesn't require</a> using JSX, but most people find it helpful as a visual aid when working with UI inside the JavaScript code. It also allows React to show more useful error and warning messages.</p>\n<p>With that out of the way, let's get started!</p>\n<h3>Embedding Expressions in JSX</h3>\n<p>In the example below, we declare a variable called name and then use it inside JSX by wrapping it in curly braces:</p>\n<p>You can put any valid <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions\">JavaScript expression</a> inside the curly braces in JSX. For example, 2 + 2, user.firstName, or formatName(user) are all valid JavaScript expressions.</p>\n<p>In the example below, we embed the result of calling a JavaScript function, formatName(user), into an &#x3C;h1> element.</p>\n<p><a href=\"https://reactjs.org/redirect-to-codepen/introducing-jsx\">Try it on CodePen</a></p>\n<p>We split JSX over multiple lines for readability. While it isn't required, when doing this, we also recommend wrapping it in parentheses to avoid the pitfalls of <a href=\"https://stackoverflow.com/q/2846283\">automatic semicolon insertion</a>.</p>\n<h3>JSX is an Expression Too</h3>\n<p>After compilation, JSX expressions become regular JavaScript function calls and evaluate to JavaScript objects.</p>\n<p>This means that you can use JSX inside of if statements and for loops, assign it to variables, accept it as arguments, and return it from functions:</p>\n<h3>Specifying Attributes with JSX</h3>\n<p>You may use quotes to specify string literals as attributes:</p>\n<p>You may also use curly braces to embed a JavaScript expression in an attribute:</p>\n<p>Don't put quotes around curly braces when embedding a JavaScript expression in an attribute. You should either use quotes (for string values) or curly braces (for expressions), but not both in the same attribute.</p>\n<blockquote>\n<p><strong>Warning:</strong></p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>Since JSX is closer to JavaScript than to HTML, React DOM uses camelCase property naming convention instead of HTML attribute names.</p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>For example, class becomes <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Element/className\">className</a> in JSX, and tabindex becomes <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/tabIndex\">tabIndex</a>.</p>\n</blockquote>\n<h3>Specifying Children with JSX</h3>\n<p>If a tag is empty, you may close it immediately with />, like XML:</p>\n<p>JSX tags may contain children:</p>\n<h3>JSX Prevents Injection Attacks</h3>\n<p>It is safe to embed user input in JSX:</p>\n<p>By default, React DOM <a href=\"https://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html\">escapes</a> any values embedded in JSX before rendering them. Thus it ensures that you can never inject anything that's not explicitly written in your application. Everything is converted to a string before being rendered. This helps prevent <a href=\"https://en.wikipedia.org/wiki/Cross-site_scripting\">XSS (cross-site-scripting)</a> attacks.</p>\n<h3>JSX Represents Objects</h3>\n<p>Babel compiles JSX down to React.createElement() calls.</p>\n<p>These two examples are identical:</p>\n<p>React.createElement() performs a few checks to help you write bug-free code but essentially it creates an object like this:</p>\n<p>These objects are called “React elements”. You can think of them as descriptions of what you want to see on the screen. React reads these objects and uses them to construct the DOM and keep it up to date.</p>\n<p>We will explore rendering React elements to the DOM in the <a href=\"https://reactjs.org/docs/rendering-elements.html\">next section</a>.</p>\n<blockquote>\n<p><strong>Tip:</strong></p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>We recommend using the <a href=\"https://babeljs.io/docs/en/next/editors\">“Babel” language definition</a> for your editor of choice so that both ES6 and JSX code is properly highlighted.</p>\n</blockquote>"},{"url":"/docs/react/demo/","relativePath":"docs/react/demo.md","relativeDir":"docs/react","base":"demo.md","name":"demo","frontmatter":{"title":"React Class Components Demo","weight":0,"excerpt":"React Class Components Demo","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>React Class Components Demo</h2>\n<h2>React Demo <a id=\"b2b8\"></a></h2>\n<ul>\n<li>ex1 — A Basic React Component</li>\n<li>ex2 — A Basic React Class Component</li>\n<li>ex3 — A Class Component with State</li>\n<li>ex4 — A Class Component that Updates State</li>\n<li>ex5 — A Class Component that Iterates through State</li>\n<li>ex6 — An Example of Parent and Child Components</li>\n</ul>\n<p>With regards to converting an existing HTML, CSS, and JS site into React, first you'll want to think about how to break up your site into components,</p>\n<ul>\n<li>as well as think about what the general hierarchical component structure of your site will look like.</li>\n<li>From there, it's a simple matter of copying the relevant HTML for that component and throwing it into the <strong>render method of your component file.</strong></li>\n<li><em>Any methods that are needed for that component to function properly can added onto your new component.</em></li>\n</ul>\n<p>Once you've refactored your HTML components into React components, you'll want to lay them out in the desired hierarchical structure</p>\n<ul>\n<li>with children components being rendered by their parents, as well as ensuring that the parent components are passing down the necessary data as props to their children components.</li>\n</ul>\n<p>ex.)</p>\n<pre><code class=\"language-javascript\">&#x3C;!-- Hello world -->\n&#x3C;div class=\"awesome\" style=\"border: 1px solid red\">\n  &#x3C;label for=\"name\">Enter your name: &#x3C;/label>\n  &#x3C;input type=\"text\" id=\"name\" />\n&#x3C;/div>\n&#x3C;p>Enter your HTML here&#x3C;/p>\n</code></pre>\n<p>Is equivalent to:</p>\n<pre><code class=\"language-jsx\">let NewComponent = React.createClass({\n    render: function () {\n        return (\n            &#x3C;div>\n                {/* Hello world */}\n                &#x3C;div className=\"awesome\" style={{ border: '1px solid red' }}>\n                    &#x3C;label htmlFor=\"name\">Enter your name: &#x3C;/label>\n                    &#x3C;input type=\"text\" id=\"name\" />\n                &#x3C;/div>\n                &#x3C;p>Enter your HTML here&#x3C;/p>\n            &#x3C;/div>\n        );\n    }\n});\n</code></pre>\n<h2>A Basic Component <a id=\"fa4c\"></a></h2>\n<p>Acomponent is some thing that is being rendered in the browser. It could be a button, a form with a bunch of fields in it…etc.…</p>\n<p>React doesn't place any restrictions on how large or small a component can be.</p>\n<p>You <em>could</em> have an entire static site encapsulated in a single React component, but that would defeat the purpose of using React.</p>\n<p>So the first thing to remember about a component is that a <strong>component must</strong> <strong><em>render</em></strong> <strong>something.</strong></p>\n<p><em>If nothing is being rendered from a component, then React will throw an error.</em></p>\n<p>Inside of <code>BasicComponent.js</code> , first import React at the top of the file. Our most basic of components looks like this:</p>\n<pre><code class=\"language-jsx\">import React from 'react';\n\nconst BasicComponent = () => &#x3C;div>Hello World!&#x3C;/div>;\n\nexport default BasicComponent;\n</code></pre>\n<blockquote>\n<p><em>This is a component that simply returns a div tag with the words Hello World! inside.</em></p>\n<p><em>The last line simply exports our component so that it can be imported</em><br>\n<em>by another file.</em></p>\n</blockquote>\n<p>Notice that this component looks exactly like an anonymous arrow function that we've named <code>BasicComponent</code> .</p>\n<p>In fact, that is literally what this is.</p>\n<p>The arrow function then is simply returning the div tag. When a component is written as a function like this one is, it is called a <em>functional</em> component.</p>\n<h2>A Basic Class Component <a id=\"8d7d\"></a></h2>\n<p>The above component is an example of a functional component, which is appropriate since that component is literally nothing more than a function that returns some HTML.</p>\n<p><em>Functional components are great when all you want a component to do is to render some stuff.</em></p>\n<p><em>Components can also be written as classes (although this paradigm is becoming outdated and you should strive to write your components functionally!</em></p>\n<p>For this exercise, we're going to write a class component that does exactly the same thing as the functional component we just wrote.</p>\n<p>We'll again need to import React at the top of the file, but we'll also need to add a little something. Our import statement will look like this:</p>\n<pre><code class=\"language-text\">import React, { Component } from 'react';\n</code></pre>\n<p><strong>So, in addition to importing React, we're also importing the base Component class that is included in the React library.</strong></p>\n<h3>React lets you define components as classes or functions. <a id=\"ed09\"></a></h3>\n<p>Components defined as classes currently provide more features . To define a React component class, you need to extend <code>React.Component</code>:</p>\n<pre><code class=\"language-javascript\">class Welcome extends React.Component {\n    render() {\n        return &#x3C;h1>Hello, {this.props.name}&#x3C;/h1>;\n    }\n}\n</code></pre>\n<p><strong>The only method you</strong> <strong><em>must</em></strong> <strong>define in a <code>React.Component</code> subclass is called</strong> <a href=\"https://reactjs.org/docs/react-component.html#render\">``</a><strong>.</strong></p>\n<h2><code>render()</code> <a id=\"2c45\"></a></h2>\n<p>The <code>render()</code> method is the only required method in a class component.</p>\n<p>When called, it should examine <code>this.props</code> and <code>this.state</code> and return one of the following types:</p>\n<ul>\n<li><strong>React elements.</strong> Typically created via <a href=\"https://reactjs.org/docs/introducing-jsx.html\">JSX</a>. For example, <code>&#x3C;div /></code> and <code>&#x3C;MyComponent /></code> are React elements that instruct React to render a DOM node, or another user-defined component, respectively.</li>\n<li><strong>Arrays and fragments.</strong> Let you return multiple elements from render. See the documentation on <a href=\"https://reactjs.org/docs/fragments.html\">fragments</a> for more details.</li>\n<li><strong>Portals</strong>. Let you render children into a different DOM subtree. See the documentation on <a href=\"https://reactjs.org/docs/portals.html\">portals</a> for more details.</li>\n<li><strong>String and numbers.</strong> These are rendered as text nodes in the DOM.</li>\n<li><strong>Booleans or <code>null</code></strong>. Render nothing. (Mostly exists to support <code>return test &#x26;&#x26; &#x3C;Child /></code> pattern, where <code>test</code> is boolean.)</li>\n</ul>\n<p>The <code>render()</code> function should be pure, meaning that it does not modify component state, it returns the same result each time it's invoked, and it does not directly interact with the browser.</p>\n<p>If you need to interact with the browser, perform your work in <code>componentDidMount()</code> or the other lifecycle methods instead. Keeping <code>render()</code> pure makes components easier to think about.</p>\n<blockquote>\n<p><em>Note</em></p>\n<p><code>* will not be invoked if* [</code>](<a href=\"https://reactjs.org/docs/react-component.html#shouldcomponentupdate\">https://reactjs.org/docs/react-component.html#shouldcomponentupdate</a>) <em>returns false.</em></p>\n</blockquote>\n<p>The export statement at the bottom of the file also stays, completely unchanged. Our class component will thus look like this:</p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass BasicClassComponent extends Component {\n    render() {\n        return &#x3C;div>Hello World!&#x3C;/div>;\n    }\n}\n\nexport default BasicClassComponent;\n</code></pre>\n<p><strong>Notice that our <code>BasicClassComponent</code> inherits from the base <code>Component</code> class that we imported from the React library, by virtue of the 'extends' keyword.</strong></p>\n<p><em>That being said, there's nothing in this minimal component that takes advantage of any of those inherited methods.</em></p>\n<p><strong>All we have is a method on our component class called <code>render</code> that returns the same div tag.</strong></p>\n<p>If we really were deciding between whether to use a functional component versus a class component to render a simple div tag, then the functional style is more appropriate to use.</p>\n<p>This is because class components are much better suited for handling component state and triggering events based on the component's <a href=\"https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/\">lifecycle.</a></p>\n<h3>The important takeaways at this point are that there are two types of components, functional and class components, and that functional components are well-suited if you're just looking to render some HTML. <a id=\"66ab\"></a></h3>\n<p><em>Class components, on the other hand, are much better suited for handling components that require more complex functionality, need to exhibit more varied behavior, and/or need to keep track of some state that may change throughout said component's lifecycle.</em></p>\n<h2>A Class Component with Some State <a id=\"da0a\"></a></h2>\n<p><strong>Component state is any dynamic data that we want the component to keep track of.</strong></p>\n<blockquote>\n<p>For example, let's say we have a form component. This form has some input fields that we'd like users to fill out. When a user types characters into an input field, how is that input persisted from the point of view of our form component?</p>\n</blockquote>\n<p><strong>The answer is by using component state!</strong></p>\n<p>There are a few important concepts regarding component state, such as how to update it, pass it to another component, render it, etc.</p>\n<p><strong>Only class components have the ability to persist state, so if at any time you realize that a component needs to keep track of some state, you know that you'll automatically need a class component instead of a functional component.</strong></p>\n<blockquote>\n<p>It is possible to handle state with functional components but that requires the use of something called the <a href=\"https://reactjs.org/docs/hooks-state.html\">useState() hook</a>. Hooks were added in React 16.8; prior to this release, there was no mechanism to add state to functional components.</p>\n</blockquote>\n<p>Here's what the above component looks like as a functional component:</p>\n<p>Our class component with state will look a lot like the basic class component we just wrote, but with some exceptions:</p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass ClassComponentWithState extends Component {\n    constructor() {\n        super();\n        this.state = {};\n    }\n\n    render() {\n        return &#x3C;div>Hello World!&#x3C;/div>;\n    }\n}\n\nexport default ClassComponentWithState;\n</code></pre>\n<p><strong>So far, the only new thing going on here is the constructor block. If you recall how classes in JavaScript work, classes need constructors.</strong></p>\n<p><strong>Additionally, if a class is extending off of another class and wants access to its parent class's methods and properties, then the <code>super</code> function needs to be called inside the class's constructor function.</strong></p>\n<h3>Point being, the constructor function and the call to the <code>super</code> function are <em>not</em> associated with React, they are associated with all JavaScript classes. <a id=\"7791\"></a></h3>\n<ul>\n<li>Then there is the ``** property inside the constructor function that is set as an empty object**.</li>\n<li>We're adding a property called <code>state</code> to our class and setting it to an empty object.</li>\n</ul>\n<h3>State objects in React are always just plain old objects. <a id=\"2e40\"></a></h3>\n<h3><strong>So why is it that the basic class component we wrote in the previous exercise had no constructor function within its body?</strong> <a id=\"a76e\"></a></h3>\n<p>That is because we had no need for them since all our class component was doing was rendering some HTML.</p>\n<p><strong>The constructor is needed here because that is where we need to initialize our state object.</strong></p>\n<p><strong>The call to <code>super</code> is needed because we can't reference <code>this</code> inside of our constructor without a call to <code>super</code> first.</strong></p>\n<p>Ok, now let's actually use this state object.</p>\n<p><em>One very common application of state objects in React components is to render the data being stored inside them within our component's render function.</em></p>\n<h3>Refactoring our component class to do that: <a id=\"6929\"></a></h3>\n<pre><code class=\"language-jsx\">class ClassComponentWithState extends Component {\n    constructor() {\n        super();\n        this.state = {\n            someData: 8\n        };\n    }\n\n    render() {\n        return &#x3C;div>{`Here's some data to render: ${this.state.someData}`}&#x3C;/div>;\n    }\n}\n\nexport default ClassComponentWithState;\n</code></pre>\n<p>We added a key-value pair to our state object inside our constructor.</p>\n<ul>\n<li>Then we changed the contents of the render function.</li>\n<li>Now, it's actually rendering the data that we have inside the state object.</li>\n<li>Notice that inside the div tags we're using a template string literal so that we can access the value of <code>this.state.someData</code> straight inside of our rendered content.</li>\n</ul>\n<p><strong>With Reacts newest version, we can actually now add state to a component without explicitly defining a constructor on the class. We can refactor our class component to look like this:</strong></p>\n<pre><code class=\"language-jsx\">class ClassComponentWithState extends Component {\n    state = {\n        someData: 8\n    };\n\n    render() {\n        return &#x3C;div>{`Here's some data to render: ${this.state.someData}`}&#x3C;/div>;\n    }\n}\n\nexport default ClassComponentWithState;\n</code></pre>\n<p><img src=\"https://miro.medium.com/max/3064/1*6sYhFUNpUkt6xN9kkn4pJQ.png\"></p>\n<p>This new syntax is what is often referred to as 'syntactic sugar': under the hood, the React library translates this back into the old constructor code that we first started with, so that the JavaScript remains valid to the JavaScript interpreter.</p>\n<p>The clue to this is the fact that when we want to access some data from the state object, we still need to call it with <code>this.state.someData</code> ; changing it to just <code>state.someData</code> does not work.</p>\n<h2>Class Component Updating State <a id=\"3e29\"></a></h2>\n<p>Great, so we can render some state that our component persists for us.</p>\n<p>However, we said an important use case of component state is to handle <em>dynamic</em> data.</p>\n<p>A single static number isn't very dynamic at all.</p>\n<p>So now let's walk through how to update component state.</p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass ClassComponentUpdatingState extends Component {\n    constructor() {\n        super();\n        this.state = {\n            aNumber: 8\n        };\n    }\n\n    increment = () => {\n        this.setState({ aNumber: ++this.state.aNumber });\n    };\n\n    decrement = () => {\n        this.setState({ aNumber: --this.state.aNumber });\n    };\n\n    render() {\n        return (\n            &#x3C;div>\n                &#x3C;div>{`Our number: ${this.state.aNumber}`}&#x3C;/div>\n                &#x3C;button onClick={this.increment}>+&#x3C;/button>\n                &#x3C;button onClick={this.decrement}>-&#x3C;/button>\n            &#x3C;/div>\n        );\n    }\n}\n\nexport default ClassComponentUpdatingState;\n</code></pre>\n<p>Notice that we've added two methods to our class: <code>increment</code> and <code>decrement</code> .</p>\n<p><code>increment</code> and <code>decrement</code> are methods that <em>we</em> are adding to our class component.</p>\n<p>Unlike the <code>render</code> method, <code>increment</code> and <code>decrement</code> were not already a part of our class component.</p>\n<p>This is why <code>increment</code> and <code>decrement</code> are written as arrow functions, <strong><em>so that they are automatically bound to our class component.</em></strong></p>\n<p>The alternative is using a declaration syntax function with the bind method to bind the context of our methods to the class component.</p>\n<p>The more interesting thing is what is going on within the bodies of these methods.</p>\n<h3>Each calls the <code>setState</code> function. <a id=\"3d7e\"></a></h3>\n<ul>\n<li><code>setState</code> in fact <em>is</em> provided to us by React.</li>\n</ul>\n<p>It is the standard way to update a component's state.</p>\n<p>It's the <em>only</em> way you should ever update a component's state. It may seem more verbose than necessary, but there are good reasons for why you should be doing it this way.</p>\n<p>Unlike the lifecycle methods above (which React calls for you), the methods below are the methods <em>you</em> can call from your components.</p>\n<p>There are just two of them: <code>setState()</code> and <code>forceUpdate()</code>.</p>\n<h4><code>setState()</code></h4>\n<pre><code class=\"language-text\">setState(updater, [callback])\n</code></pre>\n<p><code>setState()</code> enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state. This is the primary method you use to update the user interface in response to event handlers and server responses.</p>\n<p>Think of <code>setState()</code> as a <em>request</em> rather than an immediate command to update the component. For better perceived performance, React may delay it, and then update several components in a single pass. React does not guarantee that the state changes are applied immediately.</p>\n<p><code>setState()</code> does not always immediately update the component. It may batch or defer the update until later. This makes reading <code>this.state</code> right after calling <code>setState()</code> a potential pitfall. Instead, use <code>componentDidUpdate</code> or a <code>setState</code> callback (<code>setState(updater, callback)</code>), either of which are guaranteed to fire after the update has been applied. If you need to set the state based on the previous state, read about the <code>updater</code> argument below.</p>\n<p><code>setState()</code> will always lead to a re-render unless <code>shouldComponentUpdate()</code> returns <code>false</code>. If mutable objects are being used and conditional rendering logic cannot be implemented in <code>shouldComponentUpdate()</code>, calling <code>setState()</code> only when the new state differs from the previous state will avoid unnecessary re-renders.</p>\n<p>The first argument is an <code>updater</code> function with the signature:</p>\n<pre><code class=\"language-text\">(state, props) => stateChange\n</code></pre>\n<p><code>state</code> is a reference to the component state at the time the change is being applied. It should not be directly mutated. Instead, changes should be represented by building a new object based on the input from <code>state</code> and <code>props</code>. For instance, suppose we wanted to increment a value in state by <code>props.step</code>:</p>\n<pre><code class=\"language-text\">this.setState((state, props) => {\n  return {counter: state.counter + props.step};\n});\n</code></pre>\n<p>Both <code>state</code> and <code>props</code> received by the updater function are guaranteed to be up-to-date. The output of the updater is shallowly merged with <code>state</code>.</p>\n<p>The second parameter to <code>setState()</code> is an optional callback function that will be executed once <code>setState</code> is completed and the component is re-rendered. Generally we recommend using <code>componentDidUpdate()</code> for such logic instead.</p>\n<p>You may optionally pass an object as the first argument to <code>setState()</code> instead of a function:</p>\n<pre><code class=\"language-text\">setState(stateChange[, callback])\n</code></pre>\n<p>This performs a shallow merge of <code>stateChange</code> into the new state, e.g., to adjust a shopping cart item quantity:</p>\n<pre><code class=\"language-text\">this.setState({quantity: 2})\n</code></pre>\n<p>This form of <code>setState()</code> is also asynchronous, and multiple calls during the same cycle may be batched together. For example, if you attempt to increment an item quantity more than once in the same cycle, that will result in the equivalent of:</p>\n<pre><code class=\"language-text\">Object.assign(\n  previousState,\n  {quantity: state.quantity + 1},\n  {quantity: state.quantity + 1},\n  ...\n)\n</code></pre>\n<p>Subsequent calls will override values from previous calls in the same cycle, so the quantity will only be incremented once. If the next state depends on the current state, we recommend using the updater function form, instead:</p>\n<pre><code class=\"language-text\">this.setState((state) => {\n  return {quantity: state.quantity + 1};\n});\n</code></pre>\n<h3>So the way to use <code>setState</code> to update a component's state is to pass it an object with each of the state keys you wish to update, along with the updated value. <a id=\"bd27\"></a></h3>\n<p>In our <code>increment</code> method we said \"I would like to update the <code>aNumber</code> property on my component state by adding one to it and then setting the new value as my new <code>aNumber</code> \".</p>\n<p>The same thing happens in our <code>decrement</code> method, only we're subtracting instead of adding.</p>\n<p>Then the other new concept we're running into here is how to actually call these methods we've added to our class.<img src=\"https://miro.medium.com/max/60/1*k8t5QBcMvHDX521sd4pC4g.png?q=20\"><img src=\"https://miro.medium.com/max/856/1*k8t5QBcMvHDX521sd4pC4g.png\"></p>\n<p>We added two HTML button tags within our <code>render</code> function, then in their respective <code>onClick</code> handlers, we specify the method that should be called whenever this button gets clicked. So whenever we click either of the buttons, our state gets updated appropriately and our component will re-render to show the correct value we're expecting.</p>\n<h2>Class Component Iterating State <a id=\"e859\"></a></h2>\n<p>Another common state pattern you'll see being used in React components is iterating over an array in our state object and rendering each array element in its own tag.</p>\n<blockquote>\n<p>This is often used in order to render lists.</p>\n</blockquote>\n<p>Additionally, we want to be able to easily update lists and have React re-render our updated list.</p>\n<p>We'll see how both of these are done and how they work together within a single component in order to create the behavior of a dynamic list.</p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass ClassComponentIteratingState extends Component {\n    constructor() {\n        super();\n\n        this.state = {\n            ingredients: ['flour', 'eggs', 'milk', 'sugar', 'vanilla extract'],\n            newIngredient: ''\n        };\n    }\n\n    handleIngredientInput = (event) => {\n        this.setState({ newIngredient: event.target.value });\n    };\n\n    addIngredient = (event) => {\n        event.preventDefault();\n        const ingredientsList = this.state.ingredients;\n        ingredientsList.push(this.state.newIngredient);\n        this.setState({\n            newIngredient: '',\n            ingredients: ingredientsList\n        });\n    };\n\n    render() {\n        return (\n            &#x3C;div>\n                {this.state.ingredients.map((ingredient) => (\n                    &#x3C;div>{ingredient}&#x3C;/div>\n                ))}\n                &#x3C;form onSubmit={this.addIngredient}>\n                    &#x3C;input type=\"text\" onChange={this.handleIngredientInput} placeholder=\"Add a new ingredient\" value={this.state.newIngredient} />\n                &#x3C;/form>\n            &#x3C;/div>\n        );\n    }\n}\n\nexport default ClassComponentIteratingState;\n</code></pre>\n<p>The first change to note is that our state object now has an 'ingredients' array, and a 'newIngredient' field that has been initialized to an empty string.</p>\n<p>The ingredients array contains the elements that we'll want to render in our list.</p>\n<p>The <code>addIngredient</code> and <code>handleIngredientInput</code> methods we've added to our class receives a parameter called 'event'.</p>\n<p>This event object is part of the browser's API.</p>\n<p>When we interact with some DOM element, <strong>such as clicking on an HTML button, the</strong> <strong><em>function that is invoked upon that button being clicked</em></strong> <strong>actually receives the event object.</strong></p>\n<ul>\n<li>So when we type some input into an input tag, we're able grab each character that was typed into the input field through the event object parameter.</li>\n<li>The <code>handleIngredientInput</code> method is what gets invoked every time the user presses a key to enter text in the input box for adding a new ingredient.</li>\n<li>Every character the user types gets persisted in the <code>newIngredient</code> field on the state object.</li>\n</ul>\n<p>We're able to grab the text in the input box using <code>event.target.value</code></p>\n<p><strong>Which holds the value of the string text that is currently in the input box</strong>.</p>\n<blockquote>\n<p>We use that to update our <code>newIngredient</code> string field.</p>\n</blockquote>\n<p>Breaking down the <code>addIngredient</code> method, we see this <code>event.preventDefault()</code> invocation.</p>\n<p>This is because this method will be used upon submitting a form, and it turns out that submitting a form triggers some default form behavior that we don't want to trigger when we submit the form (<strong>namely refreshing the entire page</strong>).</p>\n<blockquote>\n<p><code>event.preventDefault()</code> will prevent this default form behavior, meaning our form will only do what we want it to do when it is submitted.</p>\n</blockquote>\n<p><img src=\"https://miro.medium.com/max/894/1*RN_y7Bk4tb-LLG8vNqGHHA.png\"></p>\n<p>Next, we store a reference to <code>this.state.ingredients</code> in a variable called <code>ingredientsList</code> .</p>\n<p>So we now have a copy of the array that is stored in our state object.</p>\n<p><strong>We want to update the copy of the ingredients array first instead of directly updating the actual array itself in state.</strong></p>\n<p>Now we push whatever value is being stored at our <code>newIngredient</code> field onto the <code>ingredientsList</code> array so that our <code>ingredientsList</code> array is now more up-to-date than our <code>this.state.ingredients</code> array.</p>\n<p>So all we have to do now is call <code>setState</code> appropriately in order to update the value in our state object.</p>\n<p>Additionally, we also set the <code>newIngredient</code> field back to an empty string in order to clear out the input field once we submit a new ingredient.</p>\n<p>Now it's ready to accept more user input!</p>\n<p><img src=\"https://miro.medium.com/max/60/1*LXx7WeP_5wFRfYa45snSEA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/478/1*LXx7WeP_5wFRfYa45snSEA.png\"></p>\n<p>Looking at our render function, first note the <code>this.state.ingredients.map</code> call.</p>\n<p>This is looping through each ingredient in our <code>ingredients</code> array and returning each one within its own div tag.</p>\n<p>This is a very common pattern for rendering everything inside an array.</p>\n<p>Then we have an HTML form which contains an input field.</p>\n<p>The purpose of this form is to allow a user to add new ingredients to the list. Note that we're passing our <code>addIngredient</code> method to the form's <code>onSubmit</code> handler.</p>\n<p>This means that our <code>addIngredient</code> method gets invoked whenever our form is submitted.</p>\n<p>Lastly, the input field has an <code>onChange</code> handler that invokes our <code>handleIngredientInput</code> method whenever there is some sort of change in the input field, namely when a user types into it.<img src=\"https://miro.medium.com/max/60/1*S7s9FfaPVlKGyaSwFeId_w.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/816/1*S7s9FfaPVlKGyaSwFeId_w.png\"></p>\n<p>Notice that the <code>value</code> field in our input tag reads off of <code>this.state.newIngredient</code> in order to know what value to display.</p>\n<p>So when a user enters text into the input field, the <code>onChange</code> handler is invoked every time, which updates our <code>this.state.newIngredient</code> field, which the input field and then renders.</p>\n<h2>Parent and Child Components <a id=\"413c\"></a></h2>\n<p>A single isolated component isn't going to do us much good.</p>\n<blockquote>\n<p>The beauty of React lies in the fact that it allows us to compose modular components together.</p>\n<p>Let's start off with the component we just saw, but let's change its name to `` .</p>\n</blockquote>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\nimport ChildComponent from './ChildComponent';\n\nclass ParentComponent extends Component {\n    constructor() {\n        super();\n\n        this.state = {\n            ingredients: ['flour', 'eggs', 'milk', 'sugar', 'vanilla'],\n            newIngredient: ''\n        };\n    }\n\n    handleIngredientInput = (event) => {\n        this.setState({ newIngredient: event.target.value });\n    };\n\n    addIngredient = (event) => {\n        event.preventDefault();\n        const ingredientsList = this.state.ingredients;\n        ingredientsList.push(this.state.newIngredient);\n        this.setState({\n            newIngredient: '',\n            ingredients: ingredientsList\n        });\n    };\n\n    render() {\n        return (\n            &#x3C;div>\n                {this.state.ingredients.map((ingredient) => (\n                    &#x3C;ChildComponent thing={ingredient} />\n                ))}\n                &#x3C;form onSubmit={this.addIngredient}>\n                    &#x3C;input type=\"text\" onChange={this.handleIngredientInput} placeholder=\"Add a new ingredient\" value={this.state.newIngredient} />\n                &#x3C;/form>\n            &#x3C;/div>\n        );\n    }\n}\n\nexport default ParentComponent;\n</code></pre>\n<p>The only two other differences in this component are that we're importing a <code>ChildComponent</code> and then using it inside our <code>this.state.ingredients.map</code> call.</p>\n<p><code>ChildComponent</code> is another React component.</p>\n<p>Notice that we're using it just as if it were any other HTML tag.</p>\n<p><strong>This is how we lay out our component hierarchy: the ChildComponent is rendered within the ParentComponent.</strong></p>\n<p>We can see this to be the case if we open up the developer console and inspect these elements.<strong>child-left: parent-right</strong></p>\n<p><img src=\"https://miro.medium.com/max/2602/1*q_XLnJ2h1L5yZjNnSKzj5w.png\"></p>\n<p>Note also that we're passing each ingredient as a 'thing' to the ChildComponent component.</p>\n<p>This is how a parent component passes data to a child component. It doesn't need to be called 'thing'; you can call it whatever you want.</p>\n<p>Conceptually though, <strong>every piece of data that a parent component passes down to a child component is called a 'prop' in React lingo.</strong></p>\n<p>Let's take a look now at the Child Component. It serves two purposes:</p>\n<ol>\n<li>to render the props data that it gets from a parent component,</li>\n<li>to add the ability for a user to click on it and have it toggle a strikethrough, indicating that the item is 'complete'.</li>\n</ol>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass ChildComponent extends Component {\n    constructor() {\n        super();\n        this.state = {\n            clicked: false\n        };\n    }\n\n    handleClick = () => {\n        this.setState({ clicked: !this.state.clicked });\n    };\n\n    render() {\n        const styles = this.state.clicked ? { textDecoration: 'line-through' } : { textDecoration: 'none' };\n        return (\n            &#x3C;div style={styles} onClick={this.handleClick}>\n                {this.props.thing}\n            &#x3C;/div>\n        );\n    }\n}\n\nexport default ChildComponent;\n</code></pre>\n<p>The overall structure of the child component is nothing we haven't seen. It's just another class component with its own s<strong>tate object and a method called <code>handleClick</code> .</strong></p>\n<p><strong>A component accesses its props via the <code>this.props</code> object.</strong></p>\n<p><em>Any prop a parent component passes down to a child component is accessible inside the child component's <code>this.prop</code> object.</em></p>\n<p>So our child component keeps its own state that tracks whether the component has been clicked or not.</p>\n<p>Then at the top of the <code>render</code> function, it uses a ternary condition to determine whether the div tag that is being rendered should have a strikethrough or not.</p>\n<p>The <code>handleClick</code> method is then invoked via an <code>onClick</code> handler on the div tag; it does the work of toggling the <code>this.state.clicked</code> Boolean.</p>\n<p>The overall structure of React applications can be represented as a hierarchical tree structure, just like how the DOM itself is structure. There is an overarching root component at the top of the hierarchy that every other component sits underneath. Specifying that a component should be a child of some parent component is as simple as throwing it in the parent component's render function, just like how we did it in this example<img src=\"https://miro.medium.com/max/60/0*aqqfHMjBXT8PWYJC?q=20\"><img src=\"https://miro.medium.com/max/490/0*aqqfHMjBXT8PWYJC\"><img src=\"https://miro.medium.com/max/1000/0*j9aPKza7Y4htBeQ-.gif\"></p>\n<h2><strong>Core Concepts:</strong> <a id=\"c45d\"></a></h2>\n<h3>1. What is react? <a id=\"068e\"></a></h3>\n<h3>React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It uses components to update and render as your data changes. <a id=\"a7cb\"></a></h3>\n<blockquote>\n<p>React manages the <strong>creation and continuous updating of DOM nodes in your Web page</strong>.</p>\n</blockquote>\n<ul>\n<li><em>It does not handle</em> <a href=\"https://skillcrush.com/blog/what-is-ajax/\"><em>AJAX</em> </a><em>requests, Local Storage or style your website. IT is just a tool to dynamically render content on a webpage as a result of changes in 'state'. Because it's function is so limited in scope you may hear it referred to as a library… (not a framework … like Angular for example) and you may also hear it described as unopinionated.</em></li>\n</ul>\n<h3>2. Why use react? <a id=\"643d\"></a></h3>\n<ul>\n<li>Works for teams and helps UI workflow patterns</li>\n<li>The components can be reusable</li>\n<li>Componentized UI is the future of web dev</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*pFe_v7Ea--vfdmvR3UcunA.png?q=20\"><img src=\"https://miro.medium.com/max/846/1*pFe_v7Ea--vfdmvR3UcunA.png\"></p>\n<h2>Declarative programming <a id=\"994b\"></a></h2>\n<p>In the same way that you use HTML to <em>declare</em> what the user interface should<br>\nlook like, React provides the same mechanism in its `` method or the higher-level language known as JSX.<img src=\"https://miro.medium.com/max/60/0*MW-A5Dp_v1T0BB1s.png?q=20\"><img src=\"https://miro.medium.com/max/1338/0*MW-A5Dp_v1T0BB1s.png\">React… like HTML is Declarative</p>\n<p><a href=\"https://en.wikipedia.org/wiki/Declarative_programming\">Declarative programming</a> is often defined as any style of programming that is not <a href=\"https://en.wikipedia.org/wiki/Imperative_programming\">imperative</a>.</p>\n<p>A number of other common definitions attempt to define it by simply contrasting it with imperative programming. For example:</p>\n<ul>\n<li>A high-level program that describes what a computation should perform.</li>\n<li>Any programming language that lacks <a href=\"https://en.wikipedia.org/wiki/Side_effect_%28computer_science%29\">side effects</a></li>\n<li>A language with a clear correspondence to <a href=\"https://en.wikipedia.org/wiki/Mathematical_logic\">mathematical logic</a>.<a href=\"https://en.wikipedia.org/wiki/Declarative_programming#cite_note-5\">[5]</a></li>\n</ul>\n<p>These definitions overlap substantially.</p>\n<p>D<strong>eclarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed.</strong></p>\n<p><a href=\"https://en.wikipedia.org/wiki/Functional_programming\">Functional</a> and <a href=\"https://en.wikipedia.org/wiki/Logical_programming\">logical programming</a> languages are characterized by a declarative programming style.</p>\n<p><em>In a</em> <a href=\"https://en.wikipedia.org/wiki/Pure_functional_language\"><em>pure functional language</em></a><em>, such as</em> <a href=\"https://en.wikipedia.org/wiki/Haskell_%28programming_language%29\"><em>Haskell</em></a><em>, all functions are</em> <a href=\"https://en.wikipedia.org/wiki/Pure_function\"><em>without side effects</em></a><em>, and state changes are only represented as functions that transform the state, which is explicitly represented as a</em> <a href=\"https://en.wikipedia.org/wiki/First-class_citizen\"><em>first-class</em></a> <em>object in the program.</em></p>\n<p>— Wikipedia</p>\n<h2>What is a React pure component? <a id=\"abbb\"></a></h2>\n<p><a href=\"https://blog.logrocket.com/react-pure-components-functional/#whatisareactpurecomponent\">Based on the concept of purity in functional programming paradigms, a function is said to be pure if:</a></p>\n<ul>\n<li>Its return value is only determined by its input values</li>\n<li>Its return value is always the same for the same input values</li>\n</ul>\n<p>A React component is considered pure if it renders the same output for the same state and props. For class components like this, React provides the <code>PureComponent</code> base class. Class components that extend the <code>React.PureComponent</code> class are treated as pure components.</p>\n<p>Pure components have some performance improvements and render optimizations since React implements the <code>shouldComponentUpdate()</code> method for them with a shallow comparison for props and state.</p>\n<h2>Are React functional components pure? <a id=\"e24e\"></a></h2>\n<p>Functional components are very useful in React, especially when you want to isolate state management from the component. That's why they are often called stateless components.</p>\n<p>However, functional components cannot leverage the performance improvements and render optimizations that come with <code>React.PureComponent</code> since they are not classes by definition.</p>\n<p>If you want React to treat a functional component as a pure component, you'll have to convert the functional component to a class component that extends <code>React.PureComponent</code>.</p>\n<pre><code class=\"language-jsx\">function PercentageStat({ label, score = 0, total = Math.max(1, score) }) {\n    return (\n        &#x3C;div>\n            &#x3C;h6>{label}&#x3C;/h6>\n            &#x3C;span>{Math.round((score / total) * 100)}%&#x3C;/span>\n        &#x3C;/div>\n    );\n}\n\n// CONVERTED TO PURE COMPONENT\nclass PercentageStat extends React.PureComponent {\n    render() {\n        const { label, score = 0, total = Math.max(1, score) } = this.props;\n\n        return (\n            &#x3C;div>\n                &#x3C;h6>{label}&#x3C;/h6>\n                &#x3C;span>{Math.round((score / total) * 100)}%&#x3C;/span>\n            &#x3C;/div>\n        );\n    }\n}\n</code></pre>\n<h2>Reusability <a id=\"9c36\"></a></h2>\n<p>React encourages you to think in terms of reusability as you construct the user<br>\ninterface from elements and components that you create. When you<br>\nmake a list or a button, you can then reuse those components to show different data 'state' in the same UI structure as you have built for different data previously.<img src=\"https://miro.medium.com/max/60/0*cBLQ5aBP2qihrT59.jpeg?q=20\"><img src=\"https://miro.medium.com/max/1885/0*cBLQ5aBP2qihrT59.jpeg\"></p>\n<h3>Component-Based <a id=\"a38d\"></a></h3>\n<p>Build encapsulated components that manage their own state, then compose them to make complex UIs.</p>\n<p>Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.</p>\n<h3>Learn Once, Write Anywhere <a id=\"fc7f\"></a></h3>\n<p>We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code.</p>\n<p>React can also render on the server using Node and power mobile apps using <a href=\"https://reactnative.dev/\">React Native</a>.</p>\n<h2>Speed <a id=\"345f\"></a></h2>\n<p>Due to the use of a virtual DOM, React handles changes to a Web page more<br>\nintelligently than just string manipulation. It is constantly monitors the<br>\nvirtual DOM for changes. It very efficiently reconciles changes in the virtual<br>\nDOM with what it has already produced in the real DOM. This is what<br>\nmakes React one of the speediest front-end libraries available.<img src=\"https://miro.medium.com/max/60/0*OdOq6pmpXBJhjj7k.png?q=20\"><img src=\"https://miro.medium.com/max/810/0*OdOq6pmpXBJhjj7k.png\"></p>\n<h3>3. Who uses react? <a id=\"c395\"></a></h3>\n<ul>\n<li>Companies such as Facebook app for android and Instagram</li>\n<li><a href=\"https://facebook.github.io/react-native/showcase.html\">Here</a> is a link to a list of other companies who use react.</li>\n</ul>\n<p><img src=\"https://miro.medium.com/max/60/1*Cn9JvaSmkxdLwgXIO9Y8iQ.png?q=20\"><img src=\"https://miro.medium.com/max/1027/1*Cn9JvaSmkxdLwgXIO9Y8iQ.png\">Who uses react</p>\n<h3>4. Setting up react <a id=\"ba44\"></a></h3>\n<ul>\n<li>React can be set up in CodePen for quick practice development by adding react.js, react-dom and babel.</li>\n<li>It can also be set up by downloading a react starter project from GitHub installing node and following these <a href=\"https://github.com/hjb23/ReduxSimpleStarter\">instructions</a>.</li>\n<li>Alternatively it can be set up through NPM like <a href=\"https://www.codementor.io/tamizhvendan/beginner-guide-setup-reactjs-environment-npm-babel-6-webpack-du107r9zr\">this</a>.</li>\n</ul>\n<h3>5. Intro to eco system <a id=\"6ef8\"></a></h3>\n<ul>\n<li>Composition, being able to wrap up sections of code into there own containers so they can be re used.</li>\n<li>How to make a large application? by combining small components to create a larger complex application.</li>\n</ul>\n<h3>6. Imperative vs Declarative <a href=\"https://medium.com/trabe/why-is-react-declarative-a-story-about-function-components-aaae83198f79\">(React is Declarative)</a> <a id=\"ea7a\"></a></h3>\n<ul>\n<li><strong>Imperative, 'telling to computer HOW to do something' e.g looping over an array of numbers using a for loop.</strong></li>\n<li><strong>Declarative, is concerned about WHAT we want to happen. e.g using a reduce method on an array.</strong></li>\n<li>Benefits of using declarative code:</li>\n<li>Reduce side effects</li>\n<li>Minimize mutability</li>\n<li>Less Bugs</li>\n</ul>\n<h3>7. Unidirectional Data Flow <a id=\"e6f2\"></a></h3>\n<ul>\n<li>As the state collects from user interaction, the UI gets updated.</li>\n<li>Explicit Mutations</li>\n<li>Whenever the state needs to be updated in our application setState has to be called.</li>\n</ul>\n<pre><code class=\"language-text\">this.setState({\n  highlight: !this.state.highlight,\n})\n</code></pre>\n<h3>7.1. First component <a id=\"d1c5\"></a></h3>\n<ul>\n<li>Components are the building blocks of React.</li>\n<li>They are similar to a collection of HTML,CSS, JS and data specific to that component.</li>\n<li>They can be defined in pure JavaScript or JSX.</li>\n<li>Data is either received from a component's parent component, or it's contained in the component itself.</li>\n<li>Applications can be separated into smaller components like this…</li>\n<li>React components can be created using ES6 class like this.</li>\n</ul>\n<pre><code class=\"language-text\">import React from 'react';class Hello extends React.Component {\n  render () {\n    return &#x3C;h1>Hello, {this.props.name}!&#x3C;/h1>;\n  }\n}export default Hello;\n</code></pre>\n<ul>\n<li>At the top with have the code to bring react and react dom libraries in.</li>\n<li>React library is used for the react syntax.</li>\n<li>React DOM is used to update the DOM.</li>\n<li>We then have the Class section which creates the component.</li>\n<li>Render() describes the specific UI for the component.</li>\n<li>Return is used to return the JSX</li>\n<li>And Finally ReactDOM.render is used to update the DOM.</li>\n</ul>\n<h3>8. Data flow with props <a id=\"91ff\"></a></h3>\n<p>Small examples of data flow, see if you can get the code to work.</p>\n<p><a href=\"https://codepen.io/bgoonz/embed/WNpoLbg?default-tab=&#x26;theme-id=\">https://codepen.io/bgoonz/embed/WNpoLbg?default-tab=&#x26;theme-id=</a></p>\n<p>{% embed url=\"<a href=\"https://codepen.io/bgoonz/embed/BaWQGQp?default-tab=%5C&#x26;theme-id=\">https://codepen.io/bgoonz/embed/BaWQGQp?default-tab=\\&#x26;theme-id=</a>\" %}</p>\n<h3>9. Creating lists with map <a id=\"6790\"></a></h3>\n<p>{% embed url=\"<a href=\"https://codepen.io/bgoonz/embed/XWMNoJr?default-tab=%5C&#x26;theme-id=\">https://codepen.io/bgoonz/embed/XWMNoJr?default-tab=\\&#x26;theme-id=</a>\" %}</p>\n<p>The parent component passes down to the child component as props.</p>\n<p>Using props to access names and map to loop through each list item. Then passing this by using props.</p>\n<p>{% embed url=\"<a href=\"https://codepen.io/bgoonz/embed/gOmLZbX?default-tab=%5C&#x26;theme-id=\">https://codepen.io/bgoonz/embed/gOmLZbX?default-tab=\\&#x26;theme-id=</a>\" %}</p>\n<p>Checking data to see if Boolean is true then adding detail to the list.</p>\n<p>{% embed url=\"<a href=\"https://codepen.io/bgoonz/embed/WNpoLbg?default-tab=%5C&#x26;theme-id=\">https://codepen.io/bgoonz/embed/WNpoLbg?default-tab=\\&#x26;theme-id=</a>\" %}</p>\n<h3>10. Prop types <a id=\"18ed\"></a></h3>\n<p>PropTypes allow you to declare the type (string, number, function, etc) of each prop being passed to a component. Then if a prop passed in isn't of the declared type you'll get a warning in the console.</p>\n<h2>Excerpt from the React website: <a id=\"7094\"></a></h2>\n<h2>React — A JavaScript library for building user interfaces <a id=\"5047\"></a></h2>\n<blockquote>\n<p><em>A JavaScript library for building user interfaces</em></p>\n</blockquote>\n<h3>Declarative <a id=\"cae4\"></a></h3>\n<p>React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.</p>\n<p>Declarative views make your code more predictable and easier to debug.</p>\n<h3>A Simple Component <a id=\"b36a\"></a></h3>\n<p>React components implement a <code>render()</code> method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by <code>render()</code> via <code>this.props</code>.</p>\n<p>JSX is optional and not required to use React. Try the <a href=\"https://babeljs.io/repl/#?presets=react&#x26;code_lz=MYewdgzgLgBApgGzgWzmWBeGAeAFgRgD4AJRBEAGhgHcQAnBAEwEJsB6AwgbgChRJY_KAEMAlmDh0YWRiGABXVOgB0AczhQAokiVQAQgE8AkowAUAcjogQUcwEpeAJTjDgUACIB5ALLK6aRklTRBQ0KCohMQk6Bx4gA\">Babel REPL</a> to see the raw JavaScript code produced by the JSX compilation step.</p>\n<p>In addition to taking input data (accessed via <code>this.props</code>), a component can maintain internal state data (accessed via <code>this.state</code>). When a component's state data changes, the rendered markup will be updated by re-invoking <code>render()</code>.</p>\n<h3>An Application <a id=\"2936\"></a></h3>\n<p>Using <code>props</code> and <code>state</code>, we can put together a small Todo application. This example uses <code>state</code> to track the current list of items as well as the text that the user has entered. Although event handlers appear to be rendered inline, they will be collected and implemented using event delegation.</p>\n<h3>A Component Using External Plugins <a id=\"2276\"></a></h3>\n<p>React allows you to interface with other libraries and frameworks. This example uses remarkable, an external Markdown library, to convert the <code>&#x3C;textarea></code>'s value in real time.</p>"},{"url":"/docs/react/quiz/","relativePath":"docs/react/quiz.md","relativeDir":"docs/react","base":"quiz.md","name":"quiz","frontmatter":{"title":"React Quiz Questions","weight":0,"excerpt":"cheat sheet","seo":{"title":"React Quiz Questions","description":"Of course, if you get a DOM node for the component via refs, you can do anything you want with the DOM nodes of other components, but it will likely mess up React.","robots":[],"extra":[]},"template":"docs"},"html":"<p><strong>What we know:</strong></p>\n<p>A top-level <code>App</code> component returns <code>&#x3C;Button /></code> from its <code>render()</code> method.</p>\n<p><strong>Question:</strong></p>\n<blockquote>\n<p>What is the relationship between <code>&#x3C;Button /></code> and <code>this</code> in that <code>Button</code>’s <code>render()</code>?</p>\n</blockquote>\n<p><strong>Answer:</strong> </p>\n<p><code>&#x3C;Button></code> is a React \"element\".<br>\nIf you log it, you will see a plain object like <code>{ type: Button, props: {} }</code>.</p>\n<p>The element does not represent anything on the screen at that point.<br>\nIt is a <em>description</em> of what <code>App</code> wants to be rendered.</p>\n<p>At some point, React will look at that description and think: “Hmm, there was no <code>Button</code> here but now there should be. So I’ll create a <code>Button</code> instance.”</p>\n<p>This <code>Button</code> instance created by React is <code>this</code> value in the <code>render()</code> and lifecycle methods. It’s only useful for calling <code>setState()</code> or reading the props and state.</p>\n<p>If <code>App</code> gets re-rendered and React sees a <code>&#x3C;Button /></code> in its output again, it will think: “Hmm, I already have a <code>Button</code> instance exactly at the same spot. Rather than create a new one, I will just update props on the existing one and re-render it.”</p>\n<p>Let’s recap.</p>\n<p><code>&#x3C;Button /></code> is an element, a description of what should be rendered. <code>this</code> inside the <code>Button</code> is the actual instance React created based on that description.</p>\n<p><code>App</code> can return a different <code>&#x3C;Button /></code> element every time but as long as its key doesn’t change, and it is still a <code>&#x3C;Button /></code> and not a <code>&#x3C;Door /></code>, React will keep using the same instance. </p>\n<p><strong>Question:</strong></p>\n<blockquote>\n<p>Does rendering <code>&#x3C;Button>&#x3C;Icon />&#x3C;/Button></code> guarantee that an <code>Icon</code> mounts?</p>\n</blockquote>\n<p>It doesn’t. Ultimately it’s always up to the component to decide what to do with its children. For example, the <code>Button</code> implementation could completely ignore them and render something else:</p>\n<pre><code class=\"language-jsx\">function Button(props) {\n  return &#x3C;h1>I render whatever I want&#x3C;/h1>\n}\n</code></pre>\n<p>Interestingly, it could also render <code>children</code> multiple times:</p>\n<pre><code class=\"language-jsx\">function Button(props) {\n  return (\n    &#x3C;div>\n      I like to repeat things.\n      {props.children}\n      {props.children}\n      {props.children}\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<p>Ultimately, <code>children</code> is not a special prop in any way except for JSX sugar syntax. <code>&#x3C;Button>&#x3C;Icon />&#x3C;/Button></code> is technically the same as <code>&#x3C;Button children={&#x3C;Icon />} /></code>, and it’s up to the component how to treat its input props.</p>\n<p><strong>Question:</strong></p>\n<blockquote>\n<p>Can the <code>App</code> change anything in the <code>Button</code> output? What and how?</p>\n</blockquote>\n<p><strong>Answer:</strong> </p>\n<p>There have been a few fun answers in the <a href=\"https://gist.github.com/gaearon/8fa9fdd2c4197ee0b52894877bf587a4\">quiz comments</a> so I will direct you to them. Indeed, since JavaScript doesn't provide any guarantees, technically you can hijack <code>Button</code> before React gets a chance to render it.</p>\n<p>However, normally there is no way for a parent component to control the child output except by two mechanisms: passing props and providing context. You probably already know about props, and I won’t talk about the context because it’s an experimental API and has a few pitfalls. Don’t use context in apps unless <a href=\"https://medium.com/@mweststrate/how-to-safely-use-react-context-b7e343eff076\">you know its pitfalls well</a>.</p>\n<p>Of course, if you get a DOM node for the component via refs, you can do anything you want with the DOM nodes of other components, but it will likely mess up React.</p>\n<h1>React.js</h1>\n<h3>Q1. If you want to import just the Component from the React library, what syntax do you use?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>import React.Component from 'react'</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>import [ Component ] from 'react'</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>import Component from 'react'</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>import { Component } from 'react'</code></li>\n</ul>\n<h3>Q2. If a function component should always render the same way given the same props, what is a simple performance optimization available for it?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Wrap it in the <code>React.memo</code> higher-order component.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Implement the <code>useReducer</code> Hook.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Implement the <code>useMemo</code> Hook.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Implement the <code>shouldComponentUpdate</code> lifecycle method.</li>\n</ul>\n<h3>Q3. How do you fix the syntax error that results from running this code?</h3>\n<pre><code class=\"language-javascript\">const person =(firstName, lastName) =>\n{\n  first: firstName,\n  last: lastName\n}\nconsole.log(person(\"Jill\", \"Wilson\"))\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Wrap the object in parentheses.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Call the function from another file.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add a return statement before the first curly brace.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Replace the object with an array.</li>\n</ul>\n<h3>Q4. If you see the following import in a file, what is being used for state management in the component?</h3>\n<p><code>import React, {useState} from 'react';</code></p>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] React Hooks</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> stateful components</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> math</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> class components</li>\n</ul>\n<h3>Q5. Using object literal enhancement, you can put values back into an object. When you log person to the console, what is the output?</h3>\n<pre><code class=\"language-javascript\">const name = \"Rachel\";\nconst age = 31;\nconst person = { name, age };\nconsole.log(person);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>{{name: \"Rachel\", age: 31}}</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>{name: \"Rachel\", age: 31}</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>{person: \"Rachel\", person: 31}}</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>{person: {name: \"Rachel\", age: 31}}</code></li>\n</ul>\n<h3>Q6. What is the testing library most often associated with React?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Mocha</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Chai</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Sinon</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Jest</li>\n</ul>\n<h3>Q7. To get the first item from the array (\"cooking\") using array destructuring, how do you adjust this line?</h3>\n<pre><code class=\"language-javascript\">const topics = [\"cooking\", \"art\", \"history\"];\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>const first = [\"cooking\", \"art\", \"history\"]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>const [] = [\"cooking\", \"art\", \"history\"]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>const [, first][\"cooking\", \"art\", \"history\"]</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>const [first] = [\"cooking\", \"art\", \"history\"]</code></li>\n</ul>\n<h3>Q8. How do you handle passing through the component tree without having to pass props down manually at every level?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React Send</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React Pinpoint</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React Router</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] React Context</li>\n</ul>\n<h3>Q9. What should the console read when the following code is run?</h3>\n<pre><code class=\"language-javascript\">const [, , animal] = [\"Horse\", \"Mouse\", \"Cat\"];\nconsole.log(animal);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Horse</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Cat</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Mouse</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> undefined</li>\n</ul>\n<h3>10. What is the name of the tool used to take JSX and turn it into createElement calls?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> JSX Editor</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> ReactDOM</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Browser Buddy</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Babel</li>\n</ul>\n<h3>11. Why might you use useReducer over useState in a React component?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you want to replace Redux</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] when you need to manage more complex state in an app</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you want to improve performance</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you want to break your production app</li>\n</ul>\n<h3>12. Which props from the props object is available to the component with the following syntax?</h3>\n<pre><code class=\"language-javascript\">&#x3C;Message {...props} />\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> any that have not changed</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] all of them</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> child props</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> any that have changed</li>\n</ul>\n<h3>13. Consider the following code from React Router. What do you call :id in the path prop?</h3>\n<pre><code class=\"language-javascript\">&#x3C;Route path=\"/:id\" />\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> This is a route modal</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] This is a route parameter</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> This is a route splitter</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> This is a route link</li>\n</ul>\n<h3>14. If you created a component called Dish and rendered it to the DOM, what type of element would be rendered?</h3>\n<pre><code class=\"language-javascript\">function Dish() {\n  return &#x3C;h1>Mac and Cheese&#x3C;/h1>;\n}\n\nReactDOM.render(&#x3C;Dish />, document.getElementById(\"root\"));\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>div</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> section</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> component</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>h1</code></li>\n</ul>\n<h3>15. What does this React element look like given the following function? (Alternative: Given the following code, what does this React element look like?)</h3>\n<pre><code class=\"language-javascript\">React.createElement(\"h1\", null, \"What's happening?\");\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;h1 props={null}>What's happening?&#x3C;/h1></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>&#x3C;h1>What's happening?&#x3C;/h1></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;h1 id=\"component\">What's happening?&#x3C;/h1></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;h1 id=\"element\">What's happening?&#x3C;/h1></code></li>\n</ul>\n<h3>16. What property do you need to add to the Suspense component in order to display a spinner or loading state?</h3>\n<pre><code class=\"language-javascript\">function MyComponent() {\n  return (\n    &#x3C;Suspense>\n      &#x3C;div>\n        &#x3C;Message />\n      &#x3C;/div>\n    &#x3C;/Suspense>\n  );\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> lazy</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> loading</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] fallback</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> spinner</li>\n</ul>\n<h3>17. What do you call the message wrapped in curly braces below?</h3>\n<pre><code class=\"language-javascript\">const message = \"Hi there\";\nconst element = &#x3C;p>{message}&#x3C;/p>;\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a JS function</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a JS element</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a JS expression</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a JSX wrapper</li>\n</ul>\n<h3>18. What can you use to handle code splitting?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React.memo</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React.split</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>React.lazy</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React.fallback</code></li>\n</ul>\n<h3>19. When do you use <code>useLayoutEffect</code>?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to optimize for all devices</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to complete the update</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to change the layout of the screen</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] when you need the browser to paint before the effect runs</li>\n</ul>\n<h3>20. What is the difference between the click behaviors of these two buttons (assuming that this.handleClick is bound correctly)?</h3>\n<pre><code class=\"language-javascript\">A. &#x3C;button onClick={this.handleClick}>Click Me&#x3C;/button>\nB. &#x3C;button onClick={event => this.handleClick(event)}>Click Me&#x3C;/button>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Button A will not have access to the event object on click of the button.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Button B will not fire the handler this.handleClick successfully.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Button A will not fire the handler this.handleClick successfully.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] There is no difference.</li>\n</ul>\n<h3>21. How do you destructure the properties that are sent to the Dish component?</h3>\n<pre><code class=\"language-javascript\">function Dish(props) {\n  return (\n    &#x3C;h1>\n      {props.name} {props.cookingTime}\n    &#x3C;/h1>\n  );\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>function Dish([name, cookingTime]) { return &#x3C;h1>{name} {cookingTime}&#x3C;/h1>; }</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>function Dish({name, cookingTime}) { return &#x3C;h1>{name} {cookingTime}&#x3C;/h1>; }</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>function Dish(props) { return &#x3C;h1>{name} {cookingTime}&#x3C;/h1>; }</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>function Dish(...props) { return &#x3C;h1>{name} {cookingTime}&#x3C;/h1>; }</code></li>\n</ul>\n<h3>22. When might you use <code>React.PureComponent</code>?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you do not want your component to have props</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you have sibling components that need to be compared</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] when you want a default implementation of <code>shouldComponentUpdate()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when you do not want your component to have state</li>\n</ul>\n<h3>23. Why is it important to avoid copying the values of props into a component's state where possible?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> because you should never mutate state</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> because <code>getDerivedStateFromProps()</code> is an unsafe method to use</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] because you want to allow a component to update in response to changes in the props</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> because you want to allow data to flow back up to the parent</li>\n</ul>\n<h3>24. What is the children prop?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a property that adds child components to state</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a property that lets you pass components as data to other components</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a property that lets you set an array as a property</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a property that lets you pass data to child elements</li>\n</ul>\n<h3>25. Which attribute do you use to replace innerHTML in the browser DOM?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> injectHTML</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] dangerouslySetInnerHTML</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> weirdSetInnerHTML</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> strangeHTML</li>\n</ul>\n<h3>26. Which of these terms commonly describe React applications?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] declarative</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> integrated</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> closed</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> imperative</li>\n</ul>\n<h3>27. When using webpack, why would you need to use a loader?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to put together physical file folders</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] to preprocess files</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to load external data</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to load the website into everyone's phone</li>\n</ul>\n<h3>28. A representation of a user interface that is kept in memory and is synced with the \"real\" DOM is called what?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] virtual DOM</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> DOM</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> virtual elements</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> shadow DOM</li>\n</ul>\n<h3>29. You have written the following code but nothing is rendering. How do you fix this problem?</h3>\n<pre><code class=\"language-javascript\">const Heading = () => {\n  &#x3C;h1>Hello!&#x3C;/h1>;\n};\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add a render function.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Change the curly braces to parentheses or add a return statement before the <code>h1</code> tag.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Move the <code>h1</code> to another component.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Surround the <code>h1</code> in a <code>div</code>.</li>\n</ul>\n<h3>Q30. To create a constant in JavaScript, which keyword do you use?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] const</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> let</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> constant</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> var</li>\n</ul>\n<h3>Q31. What do you call a React component that catches JavaScript errors anywhere in the child component tree?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> error bosses</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> error catchers</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> error helpers</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] error boundaries</li>\n</ul>\n<h3>Q32. In which lifecycle method do you make requests for data in a class component?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> constructor</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] componentDidMount</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> componentWillReceiveProps</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> componentWillMount</li>\n</ul>\n<h3>Q33. React components are composed to create a user interface. How are components composed?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> by putting them in the same file</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] by nesting components</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> with webpack</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> with code splitting</li>\n</ul>\n<h3>Q34. All React components must act like <strong>_</strong> with respect to their props.</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> monads</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] pure functions</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> recursive functions</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> higher-order functions</li>\n</ul>\n<h3>Q35. Why might you use a ref?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] to directly access the DOM node</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to refer to another JS file</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to call a function</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> to bind the function</li>\n</ul>\n<h3>Q36. What is <code>[e.target.id]</code> called in the following code snippet?</h3>\n<pre><code class=\"language-javascript\">handleChange(e) {\n  this.setState({ [e.target.id]: e.target.value })\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a computed property name</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a set value</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a dynamic key</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a JSX code string</li>\n</ul>\n<h3>Q37. What is the name of this component?</h3>\n<pre><code class=\"language-javascript\">class Clock extends React.Component {\n  render() {\n    return &#x3C;h1>Look at the time: {time}&#x3C;/h1>;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Clock</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It does not have a name prop.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React.Component</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Component</li>\n</ul>\n<h3>Q38. What is sent to an <code>Array.map()</code> function?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a callback function that is called once for each element in the array</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the name of another array to iterate over</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the number of times you want to call the function</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a string describing what the function should do</li>\n</ul>\n<h3>Q39. Why is it a good idea to pass a function to <code>setState</code> instead of an object?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It provides better encapsulation.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It makes sure that the object is not mutated.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It automatically updates a component.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>setState</code> is asynchronous and might result in out of sync values.</li>\n</ul>\n<h3>Q40. What package contains the render() function that renders a React element tree to the DOM?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>ReactDOM</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>Render</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>DOM</code></li>\n</ul>\n<h3>Q41. How do you set a default value for an uncontrolled form field?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Use the <code>value</code> property.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Use the <code>defaultValue</code> property.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Use the <code>default</code> property.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It assigns one automatically.</li>\n</ul>\n<h3>Q42. What do you need to change about this code to get it to run?</h3>\n<pre><code class=\"language-js\">class clock extends React.Component {\n  render() {\n    return &#x3C;h1>Look at the time: {this.props.time}&#x3C;/h1>;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Add quotes around the return value</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Remove <code>this</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Remove the render method</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Capitalize <code>clock</code></li>\n</ul>\n<p><strong>Explanation:</strong> In JSX, lower-case tag names are considered to be HTML tags. Read <a href=\"https://reactjs.org/docs/jsx-in-depth.html#html-tags-vs.-react-components\">this article</a></p>\n<h3>Q43. Which Hook could be used to update the document's title?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>useEffect(function updateTitle() { document.title = name + ' ' + lastname; });</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>useEffect(() => { title = name + ' ' + lastname; });</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>useEffect(function updateTitle() { name + ' ' + lastname; });</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>useEffect(function updateTitle() { title = name + ' ' + lastname; });</code></li>\n</ul>\n<h3>Q44. What can you use to wrap Component imports in order to load them lazily?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React.fallback</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React.split</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>React.lazy</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React.memo</code></li>\n</ul>\n<h3>Q45. How do you invoke setDone only when component mounts, using hooks?</h3>\n<pre><code class=\"language-javascript\">function MyComponent(props) {\n  const [done, setDone] = useState(false);\n\n  return &#x3C;h1>Done: {done}&#x3C;/h1>;\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>useEffect(() => { setDone(true); });</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>useEffect(() => { setDone(true); }, []);</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>useEffect(() => { setDone(true); }, [setDone]);</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>useEffect(() => { setDone(true); }, [done, setDone]);</code></li>\n</ul>\n<h3>Q46. Which of the following click event handlers will allow you to pass the name of the person to be hugged?</h3>\n<pre><code class=\"language-javascript\">class Huggable extends React.Component {\n  hug(id) {\n    console.log(\"hugging \" + id);\n  }\n\n  render() {\n    let name = \"kitteh\";\n    let button = // Missing Code\n    return button;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;button onClick={(name) => this.hug(name)}>Hug Button&#x3C;/button></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;button onClick={this.hug(e, name)}>Hug Button&#x3C;/button></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;button onClick={(e) => hug(e, name)}>Hug Button&#x3C;/button></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>&#x3C;button onClick={(e) => this.hug(name,e)}>Hug Button&#x3C;/button></code></li>\n</ul>\n<h3>Q47. Currently, <code>handleClick</code> is being called instead of passed as a reference. How do you fix this?</h3>\n<pre><code class=\"language-javascript\">&#x3C;button onClick={this.handleClick()}>Click this&#x3C;/button>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;button onClick={this.handleClick.bind(handleClick)}>Click this&#x3C;/button></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;button onClick={handleClick()}>Click this&#x3C;/button></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>&#x3C;button onClick={this.handleClick}>Click this&#x3C;/button></code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>&#x3C;button onclick={this.handleClick}>Click this&#x3C;/button></code></li>\n</ul>\n<h3>Q48. Which answer best describes a function component?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A function component is the same as a class component.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] A function component accepts a single props object and returns a React element.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A function component is the only way to create a component.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A function component is required to create a React component.</li>\n</ul>\n<h3>Q49. Which library does the <code>fetch()</code> function come from?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> FetchJS</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> ReactDOM</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] No library. <code>fetch()</code> is supported by most browsers.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React</li>\n</ul>\n<h3>Q50. What will happen when this useEffect Hook is executed, assuming name is not already equal to John?</h3>\n<pre><code class=\"language-javascript\">useEffect(() => {\n  setName(\"John\");\n}, [name]);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It will cause an error immediately.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It will execute the code inside the function, but only after waiting to ensure that no other component is accessing the name variable.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It will update the value of name once and not run again until name is changed from the outside.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It will cause an infinite loop.</li>\n</ul>\n<h3>Q51. Which choice will not cause a React component to rerender?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> if the component calls <code>this.setState(...)</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the value of one of the component's props changes</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> if the component calls <code>this.forceUpdate()</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] one of the component's siblings rerenders</li>\n</ul>\n<h3>Q52. You have created a new method in a class component called handleClick, but it is not working. Which code is missing?</h3>\n<pre><code class=\"language-javascript\">class Button extends React.Component{\n\n  constructor(props) {\n    super(props);\n    // Missing line\n  }\n\n  handleClick() {...}\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>this.handleClick.bind(this);</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>props.bind(handleClick);</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>this.handleClick.bind();</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>this.handleClick = this.handleClick.bind(this);</code></li>\n</ul>\n<h3>Q53. React does not render two sibling elements unless they are wrapped in a fragment. Below is one way to render a fragment. What is the shorthand for this?</h3>\n<pre><code class=\"language-javascript\">&#x3C;React.Fragment>\n  &#x3C;h1>Our Staff&#x3C;/h1>\n  &#x3C;p>Our staff is available 9-5 to answer your questions&#x3C;/p>\n&#x3C;/React.Fragment>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;...>\n  &#x3C;h1>Our Staff&#x3C;/h1>\n  &#x3C;p>Our staff is available 9-5 to answer your questions&#x3C;/p>\n&#x3C;/...>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> B</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;//>\n  &#x3C;h1>Our Staff&#x3C;/h1>\n  &#x3C;p>Our staff is available 9-5 to answer your questions&#x3C;/p>\n&#x3C;///>\n</code></pre>\n<ul>\n<li>[✅] C</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;>\n  &#x3C;h1>Our Staff&#x3C;/h1>\n  &#x3C;p>Our staff is available 9-5 to answer your questions&#x3C;/p>\n&#x3C;/>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> D</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;Frag>\n  &#x3C;h1>Our Staff&#x3C;/h1>\n  &#x3C;p>Our staff is available 9-5 to answer your questions&#x3C;/p>\n&#x3C;/Frag>\n</code></pre>\n<h3>Q54. If you wanted to display the count state value in the component, what do you need to add to the curly braces in the <code>h1</code>?</h3>\n<pre><code class=\"language-javascript\">class Ticker extends React.component {\n  constructor(props) {\n    super(props);\n    this.state = { count: 0 };\n  }\n  render() {\n    return &#x3C;h1>{}&#x3C;/h1>;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] this.state.count</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> count</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> state</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> state.count</li>\n</ul>\n<h3>Q55. Per the following code, when is the Hello component displayed?</h3>\n<pre><code class=\"language-javascript\">const greeting = isLoggedIn ? &#x3C;Hello /> : null;\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> never</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] when <code>isLoggedIn</code> is true</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when a user logs in</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> when the Hello function is called</li>\n</ul>\n<h3>Q56. In the following code block, what type is orderNumber?</h3>\n<pre><code class=\"language-javascript\">ReactDOM.render(&#x3C;Message orderNumber=\"16\" />, document.getElementById(\"root\"));\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] string</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> boolean</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> object</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> number</li>\n</ul>\n<h3>Q57. You have added a style property to the <code>h1</code> but there is an unexpected token error when it runs. How do you fix this?</h3>\n<pre><code class=\"language-javascript\">const element = &#x3C;h1 style={ backgroundColor: \"blue\" }>Hi&#x3C;/h1>;\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>const element = &#x3C;h1 style=\"backgroundColor: \"blue\"\"}>Hi&#x3C;/h1>;</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>const element = &#x3C;h1 style={{backgroundColor: \"blue\"}}>Hi&#x3C;/h1>;</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>const element = &#x3C;h1 style={blue}>Hi&#x3C;/h1>;</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>const element = &#x3C;h1 style=\"blue\">Hi&#x3C;/h1>;</code></li>\n</ul>\n<h3>Q58. Which function is used to update state variables in a React class component?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>replaceState</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>refreshState</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>updateState</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>setState</code></li>\n</ul>\n<h3>Q59. Consider the following component. What is the default color for the star?</h3>\n<pre><code class=\"language-javascript\">const Star = ({ selected = false }) => (\n  &#x3C;Icon color={selected ? \"red\" : \"grey\"} />\n);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> black</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> red</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] grey</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> white</li>\n</ul>\n<h3>Q60. Which answer best describes a function component?(Not sure answer)</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>A function component is the same as a class component.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>A function component accepts a single props object and returns a React element.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>A function component is the only way to create a component.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>A function component is required to create a React component.</code></li>\n</ul>\n<h3>Q61.Which library does the fetch() function come from?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>FetchJS</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>ReactDOM</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>No library. fetch() is supported by most browsers.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>React</code></li>\n</ul>\n<h3>Q62.What is the difference between the click behaviors of these two buttons(assuming that this.handleClick is bound correctly)</h3>\n<pre><code class=\"language-javascript\">  A. &#x3C;button onClick=this.handleClick>Click Me&#x3C;/button>\n  B. &#x3C;button onClick={event => this.handleClick(event)}>Click Me&#x3C;/button>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>Button A will not have access to the event object on click of the button</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>Button A will not fire the handler this.handleClick successfully</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>There is no difference</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>Button B will not fire the handler this.handleClick successfully</code></li>\n</ul>\n<h3>Q63.What will happen when this useEffect Hook is executed, assuming name is not already equal to John?</h3>\n<pre><code class=\"language-javascript\">useEffect(() => {\n  setName(\"John\");\n}, [name]);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>It will cause an error immediately.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>It will execute the code inside the function, but only after waiting to ensure that no other component is accessing the name variable.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] <code>It will update the value of name once and not run again until name is changed from the outside.</code></li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> <code>It will cause an infinite loop.</code></li>\n</ul>\n<h3>Q64. How would you add to this code, from React Router, to display a component called About?</h3>\n<pre><code class=\"language-javascript\">&#x3C;Route path=\"/:id\" />\n</code></pre>\n<ul>\n<li>[✅] A</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;Route path=\"/:id\">\n  {\" \"}\n  &#x3C;About />\n&#x3C;/Route>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> B</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;Route path=\"/tid\" about={Component} />\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> C</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;Route path=\"/:id\" route={About} />\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> D</li>\n</ul>\n<pre><code class=\"language-javascript\">&#x3C;Route>\n  &#x3C;About path=\"/:id\" />\n&#x3C;/Route>\n</code></pre>\n<h3>Q65. Which class-based component is equivalent to this function component?</h3>\n<pre><code class=\"language-javascript\">const Greeting ({ name }) > &#x3C;h1>Hello {name}!&#x3C;/h1>;\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> A</li>\n</ul>\n<pre><code class=\"language-javascript\">class Greeting extends React.Component {\n  constructor() {\n    return &#x3C;h1>Hello {this.props.name}!&#x3C;/h1>;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> B</li>\n</ul>\n<pre><code class=\"language-javascript\">class Greeting extends React.Component {\n  &#x3C;h1>Hello {this.props.name}!&#x3C;/h1>;\n}\n</code></pre>\n<ul>\n<li>[✅] C</li>\n</ul>\n<pre><code class=\"language-javascript\">class Greeting extends React.Component {\n  render() {\n    return &#x3C;h1>Hello {this.props.name}!&#x3C;/h1>;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> D</li>\n</ul>\n<pre><code class=\"language-javascript\">class Greeting extends React.Component {\n  render({ name }) {\n    return &#x3C;h1>Hello {name}!&#x3C;/h1>;\n  }\n}\n</code></pre>\n<h3>Q66. Give the code below, what does the second argument that is sent to the render function describe?</h3>\n<pre><code class=\"language-javascript\">ReactDOM.render(\n  &#x3C;h1>Hi&#x3C;h1>,\n    document.getElementById('root')\n)\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] where the React element should be added to the DOM</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> where to call the function</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> where the root component is</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> where to create a new JavaScript file</li>\n</ul>\n<h3>Q67. Why should you use React Router's Link component instead of a basic <code>&#x3C;a></code> tag in React?</h3>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The link component allows the user to use the browser's <code>Back</code> button.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> There is no difference--the <code>Link</code> component is just another name for the <code>&#x3C;a></code> tag.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The <code>&#x3C;a></code> tag will cause an error when used in React.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] The <code>&#x3C;a></code> tag triggers a full page reload, while the <code>Link</code> component does not.</li>\n</ul>\n<h3>Q68. What is the first argument, <code>x</code>, that is sent to the <code>createElement</code> function?</h3>\n<pre><code class=\"language-javascript\">React.createElement(x, y, z);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] the element that should be created</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the order in which this element should be placed on the page</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the properties of the element</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> data that should be displayed in the element</li>\n</ul>\n<h3>Q69. Which class-based lifecycle method would be called at the same time as this effect Hook?</h3>\n<pre><code class=\"language-javascript\">useEffect(() => {\n  // do things\n}, []);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> componentWillUnmount</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] componentDidMount</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> render</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> componentDidUpdate</li>\n</ul>\n<h3>Q70. Given the code below, what does the second argument that is sent to the render function describe?</h3>\n<pre><code class=\"language-javascript\">ReactDOM.render(&#x3C;h1>Hi&#x3C;/h1>, document.getElementById(\"root\"));\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] where the React element should be added to the DOM</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> where to call the function</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> where the root component is</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> where to create a new JavaScript file</li>\n</ul>\n<h3>Q71. What is the first argument, x, that is sent to the <code>createElement</code> function?</h3>\n<p><code>React.createElement(x,y,z);</code></p>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] the element that should be created</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the order in which this element should be placed on the page</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the properties of the element</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> data that should be displayed in the element.</li>\n</ul>\n<h3>Q72. What is the name of this component?</h3>\n<pre><code class=\"language-javascript\">class Comp extends React.Component {\n  render() {\n    return &#x3C;h1>Look at the time: {time}&#x3C;/h1>;\n  }\n}\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] Comp</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> h1</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React.Component</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> Component</li>\n</ul>\n<p>This question might be an updated version of Q37.</p>\n<h3>Q73. When using a portal, what is the first argument?</h3>\n<pre><code class=\"language-javascript\">ReactDOM.createPortal(x, y);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the current state</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] the element to render</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the App component</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the page</li>\n</ul>\n<p><strong>Explanation:</strong> From official docs: <a href=\"https://reactjs.org/docs/portals.html\">Portals</a></p>\n<h3>Q74. What is <code>setCount</code>?</h3>\n<pre><code class=\"language-javascript\">const [count, setCount] = useState(0);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the initial state value</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a variable</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> a state object</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] a function to update the state</li>\n</ul>\n<p><strong>Reference:</strong> From official docs: <a href=\"https://reactjs.org/docs/hooks-state.html#:~:text=If%20we%20want%20to%20update%20the%20current\">Hooks-State</a></p>\n<h3>Q75. What is the use of map function below?</h3>\n<pre><code class=\"language-javascript\">const database = [user1:{},user2:{},user3:{}];\ndatabase.map((user)=>&#x3C;h1>user.data&#x3C;/h1>);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> gives a map of all the entries in database</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] returns a heading tag for every entry in the database containing it's data</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> returns one heading tag for all the entries in database</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> checks which entry in the database is suitable for heading tag</li>\n</ul>\n<h3>Q76. Describe what is happening in this code?</h3>\n<pre><code class=\"language-javascript\">const { name: firstName } = person;\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It is creating a new object that contains the same name property as the person object.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It is assigning the value of the person object's firstName property to a constant called name.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It is retrieving the value of person.name.firstName.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] It is assigning the value of the person object's name property to a constant called firstName.</li>\n</ul>\n<h3>Q77. What is wrong with this code?</h3>\n<pre><code class=\"language-javascript\">const MyComponent = ({ names }) => (\n  &#x3C;h1>Hello&#x3C;/h1>\n  &#x3C;p>Hello again&#x3C;/p>\n);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> React components cannot be defined using functions.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] React does not allow components to return more than one element.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> The component needs to use the return keyword.</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> String literals must be surrounded by quotes.</li>\n</ul>\n<h3>Q78. When using a portal, what is the second argument?</h3>\n<pre><code class=\"language-javascript\">ReactDOM.createPortal(x, y);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the App component</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the page</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> the current state</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] the DOM element that exists outside of the parent component</li>\n</ul>\n<h3>Q79. Given this code, what will be printed in the</h3>\n<p><strong>tag?</strong></p>\n<pre><code class=\"language-javascript\">const MyComponent = ({ children }) => (\n  &#x3C;h1>{children.length}&#x3C;/h1>\n);\n...\n&#x3C;MyComponent>\n&#x3C;p>Hello&#x3C;/p>\n&#x3C;p>Goodbye&#x3C;/p>\n&#x3C;/MyComponent>\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> It will produce an error saying \"cannot read property \"length\" of undefined.\"</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> 1</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> undefined</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] 2</li>\n</ul>\n<h2>Q80. What is this pattern called?</h2>\n<pre><code class=\"language-javascript\">const [count, setCount] = useState(0);\n</code></pre>\n<ul>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> object destructuring</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> [✅] array destructuring</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> spread operating</li>\n<li class=\"task-list-item\"><input type=\"checkbox\" disabled> code pushing</li>\n</ul>"},{"url":"/docs/react/react-w-api/","relativePath":"docs/react/react-w-api.md","relativeDir":"docs/react","base":"react-w-api.md","name":"react-w-api","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>Etiam facilisis lacus nec pretium lobortis. Praesent dapibus justo non efficitur efficitur. Nullam viverra justo arcu, eget egestas tortor pretium id. Sed imperdiet mattis eleifend. Vivamus suscipit et neque imperdiet venenatis.</p>\n<blockquote>\n<p>Vestibulum ullamcorper risus auctor eleifend consequat.</p>\n</blockquote>\n<p><img src=\"https://assets.stackbit.com/components/images/default/post-4.jpeg\" alt=\"Placeholder Image\"></p>\n<p>In malesuada sed urna eget vehicula. Donec fermentum tortor sit amet nisl elementum fringilla. Pellentesque dapibus suscipit faucibus. Nullam malesuada sed urna quis rutrum. Donec facilisis lorem id maximus mattis. Vestibulum quis elit magna. Vestibulum accumsan blandit consequat. Phasellus quis posuere quam.</p>\n<p>Vivamus mollis in tellus ac ullamcorper. Vestibulum sit amet bibendum ipsum, vitae rutrum ex. Nullam cursus, urna et dapibus aliquam, urna leo euismod metus, eu luctus justo mi eget mauris. Proin felis leo, volutpat et purus in, lacinia luctus eros. Pellentesque lobortis massa scelerisque lorem ullamcorper, sit amet elementum nulla scelerisque. In volutpat efficitur nulla, aliquam ornare lectus ultricies ac. Mauris sagittis ornare dictum. Nulla vel felis ut purus fermentum pretium. Sed id lectus ac diam aliquet venenatis. Etiam ac auctor enim. Nunc velit mauris, viverra vel orci ut, egestas rhoncus diam. Morbi scelerisque nibh tellus, vel varius urna malesuada sed. Etiam ultricies sem consequat, posuere urna non, maximus ex. Mauris gravida diam sed augue condimentum pulvinar vel ac dui. Integer vel convallis justo.</p>"},{"url":"/docs/react/react-patterns-by-usecase/","relativePath":"docs/react/react-patterns-by-usecase.md","relativeDir":"docs/react","base":"react-patterns-by-usecase.md","name":"react-patterns-by-usecase","frontmatter":{"title":"React Patterns & Use Cases","weight":0,"excerpt":"React Patterns & Use Cases","seo":{"title":"React Patterns & Use Cases","description":"React Patterns & Use Cases","robots":[],"extra":[{"name":"og:image","value":"images/py-code.png","keyName":"property","relativeUrl":true},{"name":"twitter:title","value":"python cheat sheet","keyName":"name","relativeUrl":false}]},"template":"docs"},"html":"<h2>Wrapping/Mirroring</h2>\n<h3>Wrapping/Mirroring a HTML Element</h3>\n<p>Usecase: you want to make a <code>&#x3C;Button></code> that takes all the normal props of <code>&#x3C;button></code> and does extra stuff.</p>\n<p>Strategy: extend <code>React.ComponentPropsWithoutRef&#x3C;'button'></code></p>\n<pre><code class=\"language-tsx\">// usage\nfunction App() {\n  // Type '\"foo\"' is not assignable to type '\"button\" | \"submit\" | \"reset\" | undefined'.(2322)\n  // return &#x3C;Button type=\"foo\"> sldkj &#x3C;/Button>\n\n  // no error\n  return &#x3C;Button type=\"button\"> text &#x3C;/Button>;\n}\n\n// implementation\nexport interface ButtonProps extends React.ComponentPropsWithoutRef&#x3C;\"button\"> {\n  specialProp?: string;\n}\nexport function Button(props: ButtonProps) {\n  const { specialProp, ...rest } = props;\n  // do something with specialProp\n  return &#x3C;button {...rest} />;\n}\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwCwAUI4wPQtwCuqyA5lowQ4A7fMAhC4AQTBgAFAEo4Ab0Zw4bOABUAnmCzkARAQgQDZOMHRCI8NKmA8hyAEYAbfTAhwYu-WQPOHDCeQgZwAD5wBqgcziDAMGGRBpSoWIkRnEIAJlgEwEJY2WQAdLIATADM5eXyqurslDAcUBIAPABCQSHevgC8RiYGAHxwqK7ZANYAVnBtLF3B4sP19RrWcFhQxFD1TS3tiz0+egOBS6GjMFgAHvDzR8uMAL7MDBqgYO4gWEIwyDAxEJGLdILALH8tgQ8PpHkIAArEMDoW7XHLobB4GAlADCJEghT+iIgyLaZHOITIoxUDDUqD0uGAyFcxLAAH4AFxjGBQAo8egMV4MUHQQjCUTiOBw2RgJGoLlw1moRQ0tS4cSoeBKMYMpkspEAGjgJRNqXgzzgfTgspJqAFag02S8qBI6QAFny4AB3BJunVYRnM1l7dIHOYUyVKE0lM0WljDAXPIA\"><em>See this in the TS Playground</em></a></p>\n<p><strong>Forwarding Refs</strong>: As <a href=\"https://reactjs.org/docs/forwarding-refs.html\">the React docs themselves note</a>, most usecases will not need to obtain a ref to the inner element. But for people making reusable component libraries, you will need to <code>forwardRef</code> the underlying element, and then you can use <code>ComponentPropsWithRef</code> to grab props for your wrapper component. Check <a href=\"https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/\">our docs on forwarding Refs</a> for more.</p>\n<p>In future, the need to <code>forwardRef</code> may go away in React 17+, but for now we still have to deal with this. 🙃</p>\n<details>\n<summary>\n<p>Why not <code>ComponentProps</code> or <code>IntrinsicElements</code> or <code>[Element]HTMLAttributes</code> or <code>HTMLProps</code> or <code>HTMLAttributes</code>?</p>\n</summary>\n<h2><code>ComponentProps</code></h2>\n<p>You CAN use <code>ComponentProps</code> in place of <code>ComponentPropsWithRef</code>, but you may prefer to be explicit about whether or not the component's refs are forwarded, which is what we have chosen to demonstrate. The tradeoff is slightly more intimidating terminology.</p>\n<p>More info: <a href=\"https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/\">https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/</a></p>\n<h3>Maybe <code>JSX.IntrinsicElements</code> or <code>React.[Element]HTMLAttributes</code></h3>\n<p>There are at least 2 other equivalent ways to do this, but they are more verbose:</p>\n<pre><code class=\"language-tsx\">// Method 1: JSX.IntrinsicElements\ntype btnType = JSX.IntrinsicElements[\"button\"]; // cannot inline or will error\nexport interface ButtonProps extends btnType {} // etc\n\n// Method 2: React.[Element]HTMLAttributes\nexport interface ButtonProps extends React.ButtonHTMLAttributes&#x3C;HTMLButtonElement>\n</code></pre>\n<p>Looking at <a href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/blob/f3134f4897c8473f590cbcdd5788da8d59796f45/types/react/index.d.ts#L821\">the source for <code>ComponentProps</code></a> shows that this is a clever wrapper for <code>JSX.IntrinsicElements</code>, whereas the second method relies on specialized interfaces with unfamiliar naming/capitalization.</p>\n<blockquote>\n<p>Note: There are over 50 of these specialized interfaces available - look for <code>HTMLAttributes</code> in our <a href=\"https://react-typescript-cheatsheet.netlify.app/docs/advanced/types_react_api#typesreact\"><code>@types/react</code> commentary</a>.</p>\n</blockquote>\n<p>Ultimately, <a href=\"https://github.com/typescript-cheatsheets/react/pull/276\">we picked the <code>ComponentProps</code> method</a> as it involves the least TS specific jargon and has the most ease of use. But you'll be fine with either of these methods if you prefer.</p>\n<h3>Definitely not <code>React.HTMLProps</code> or <code>React.HTMLAttributes</code></h3>\n<p>This is what happens when you use <code>React.HTMLProps</code>:</p>\n<pre><code class=\"language-tsx\">export interface ButtonProps extends React.HTMLProps&#x3C;HTMLButtonElement> {\n  specialProp: string;\n}\nexport function Button(props: ButtonProps) {\n  const { specialProp, ...rest } = props;\n  // ERROR: Type 'string' is not assignable to type '\"button\" | \"submit\" | \"reset\" | undefined'.\n  return &#x3C;button {...rest} />;\n}\n</code></pre>\n<p>It infers a too-wide type of <code>string</code> for <code>type</code>, because it <a href=\"https://github.com/typescript-cheatsheets/react/issues/128#issuecomment-508103558\">uses <code>AllHTMLAttributes</code> under the hood</a>.</p>\n<p>This is what happens when you use <code>React.HTMLAttributes</code>:</p>\n<pre><code class=\"language-tsx\">export interface ButtonProps extends React.HTMLAttributes&#x3C;HTMLButtonElement> {\n  /* etc */\n}\n// usage\nfunction App() {\n  // Property 'type' does not exist on type 'IntrinsicAttributes &#x26; ButtonProps'\n  return &#x3C;Button type=\"submit\"> text &#x3C;/Button>;\n}\n</code></pre>\n</details>\n<h3>Wrapping/Mirroring a Component</h3>\n<blockquote>\n<p>TODO: this section needs work to make it simplified.</p>\n</blockquote>\n<p>Usecase: same as above, but for a React Component you don't have access to the underlying props</p>\n<pre><code class=\"language-tsx\">const Box = (props: React.CSSProperties) => &#x3C;div style={props} />;\n\nconst Card = (\n  { title, children, ...props }: { title: string } &#x26; $ElementProps&#x3C;typeof Box> // new utility, see below\n) => (\n  &#x3C;Box {...props}>\n    {title}: {children}\n  &#x3C;/Box>\n);\n</code></pre>\n<p>Strategy: extract a component's props by inferring them</p>\n<p>Example:</p>\n<pre><code class=\"language-tsx\">// ReactUtilityTypes.d.ts\ndeclare type $ElementProps&#x3C;T> = T extends React.ComponentType&#x3C;infer Props>\n  ? Props extends object\n    ? Props\n    : never\n  : never;\n</code></pre>\n<p>Usage:</p>\n<pre><code class=\"language-tsx\">import * as Recompose from \"recompose\";\nexport const defaultProps = &#x3C;\n  C extends React.ComponentType,\n  D extends Partial&#x3C;$ElementProps&#x3C;C>>\n>(\n  defaults: D,\n  Component: C\n): React.ComponentType&#x3C;$ElementProps&#x3C;C> &#x26; Partial&#x3C;D>> =>\n  Recompose.defaultProps(defaults)(Component);\n</code></pre>\n<p><em>thanks <a href=\"https://github.com/typescript-cheatsheets/react/issues/23\">dmisdm</a></em></p>\n<p>:new: You should also consider whether to explicitly forward refs:</p>\n<pre><code class=\"language-tsx\">// base button, with ref forwarding\ntype Props = { children: React.ReactNode; type: \"submit\" | \"button\" };\nexport type Ref = HTMLButtonElement;\nexport const FancyButton = React.forwardRef&#x3C;Ref, Props>((props, ref) => (\n  &#x3C;button ref={ref} className=\"MyCustomButtonClass\" type={props.type}>\n    {props.children}\n  &#x3C;/button>\n));\n\n// second layer button, no need for forwardRef (TODO: doublecheck this)\nexport interface DoubleWrappedProps\n  extends React.ComponentPropsWithRef&#x3C;typeof FancyButton> {\n  specialProp?: string;\n}\nexport function DoubleWrappedButton(props: DoubleWrappedProps) {\n  const { specialProp, ref, ...rest } = props;\n  return &#x3C;button ref={ref} {...rest} />;\n}\n\n// usage\nfunction App() {\n  const btnRef = React.useRef&#x3C;HTMLButtonElement>(null!);\n  return (\n    &#x3C;DoubleWrappedButton type=\"button\" ref={btnRef}>\n      {\" \"}\n      text{\" \"}\n    &#x3C;/DoubleWrappedButton>\n  );\n}\n</code></pre>\n<p><em><a href=\"https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwCwAUIwPTNwBGaWHArjDBAB2AGjgB3YDAAWcSgTgFoY5FAAmwQQHNGMAJ5huABWJh0AXjgBvOLinAANqsqCAXJiowAdNjwwAchCqWDRwegZuAESoPOwgkhFwAD5wEex8AoIJAL70DFgAHpCwofrc2PIWABIAKgCyADIAQulCAKL2WCBYgjC5BUXwuEKo8ABiyIK4us38QnAWPvieilDKauUAPOWixhCmAHwAFIdgJqiicgCU8-twh4xwcBtps4KyWARmlnJZNvZoqD8yC6ZgitV0AGF-qhAcCsAkwlgvqc9qhPIisvsHo8rCjTJ5bA4nN0stiNswXhksQxLpdcowWGxUFghoJVHB-rosFBeK9GP1oPANDBuQQ8NwACIQGIdADqUGQYAMql2pjgBRFbPQiy8EJIkEE3RgqtQsskUk2iIg8nGk2mLUEt0s2NQBlwwGQ9lVAH43CMoBpNLlSXlCoKFDxJjBgHMpTKsPLFcqZhkTmc3HH2HKFUqsCqztdnQxHqyRlY4K6WR6vSYLh9RJ5G5Qy78LHjULlHpQYDwoG9ng73p9vh9fpZG55mzBfsx9sGGQxWHAeKhkJosIwCJH8DG3gBBJWHQvY0vwdgwQTlebuXyeFdYTY1BoptodLo9I6CHj2ewAQku2Ldr2-aZtmSZ5i+byIqClJCAkchfOel6jrcIr5PA5KgQmObJg61IhkAA\">TS Playground link</a></em></p>\n<h2>Polymorphic Components (e.g. with <code>as</code> props)</h2>\n<blockquote>\n<p>\"Polymorphic Components\" = passing a component to be rendered, e.g. with <code>as</code> props</p>\n</blockquote>\n<p><code>ElementType</code> is pretty useful to cover most types that can be passed to createElement e.g.</p>\n<pre><code class=\"language-tsx\">function PassThrough(props: { as: React.ElementType&#x3C;any> }) {\n  const { as: Component } = props;\n\n  return &#x3C;Component />;\n}\n</code></pre>\n<p>You might also see this with React Router:</p>\n<pre><code class=\"language-tsx\">const PrivateRoute = ({ component: Component, ...rest }: PrivateRouteProps) => {\n  const { isLoggedIn } = useAuth();\n\n  return isLoggedIn ? &#x3C;Component {...rest} /> : &#x3C;Redirect to=\"/\" />;\n};\n</code></pre>\n<p>For more info you can refer to these resources:</p>\n<ul>\n<li><a href=\"https://blog.andrewbran.ch/polymorphic-react-components/\">https://blog.andrewbran.ch/polymorphic-react-components/</a></li>\n<li><a href=\"https://github.com/kripod/react-polymorphic-box\">https://github.com/kripod/react-polymorphic-box</a></li>\n<li><a href=\"https://stackoverflow.com/questions/58200824/generic-react-typescript-component-with-as-prop-able-to-render-any-valid-dom\">https://stackoverflow.com/questions/58200824/generic-react-typescript-component-with-as-prop-able-to-render-any-valid-dom</a></li>\n</ul>\n<p><a href=\"https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/pull/69\">Thanks @eps1lon</a> and <a href=\"https://github.com/typescript-cheatsheets/react/issues/151\">@karol-majewski</a> for thoughts!</p>\n<h2>Generic Components</h2>\n<p>Just as you can make generic functions and classes in TypeScript, you can also make generic components to take advantage of the type system for reusable type safety. Both Props and State can take advantage of the same generic types, although it probably makes more sense for Props than for State. You can then use the generic type to annotate types of any variables defined inside your function / class scope.</p>\n<pre><code class=\"language-tsx\">interface Props&#x3C;T> {\n  items: T[];\n  renderItem: (item: T) => React.ReactNode;\n}\nfunction List&#x3C;T>(props: Props&#x3C;T>) {\n  const { items, renderItem } = props;\n  const [state, setState] = React.useState&#x3C;T[]>([]); // You can use type T in List function scope.\n  return (\n    &#x3C;div>\n      {items.map(renderItem)}\n      &#x3C;button onClick={() => setState(items)}>Clone&#x3C;/button>\n      {JSON.stringify(state, null, 2)}\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<p>You can then use the generic components and get nice type safety through type inference:</p>\n<pre><code class=\"language-tsx\">ReactDOM.render(\n  &#x3C;List\n    items={[\"a\", \"b\"]} // type of 'string' inferred\n    renderItem={(item) => (\n      &#x3C;li key={item}>\n        {/* Error: Property 'toPrecision' does not exist on type 'string'. */}\n        {item.toPrecision(3)}\n      &#x3C;/li>\n    )}\n  />,\n  document.body\n);\n</code></pre>\n<p>As of <a href=\"#typescript-29\">TS 2.9</a>, you can also supply the type parameter in your JSX to opt out of type inference:</p>\n<pre><code class=\"language-tsx\">ReactDOM.render(\n  &#x3C;List&#x3C;number>\n    items={[\"a\", \"b\"]} // Error: Type 'string' is not assignable to type 'number'.\n    renderItem={(item) => &#x3C;li key={item}>{item.toPrecision(3)}&#x3C;/li>}\n  />,\n  document.body\n);\n</code></pre>\n<p>You can also use Generics using fat arrow function style:</p>\n<pre><code class=\"language-tsx\">interface Props&#x3C;T> {\n  items: T[];\n  renderItem: (item: T) => React.ReactNode;\n}\n\n// Note the &#x3C;T extends unknown> before the function definition.\n// You can't use just `&#x3C;T>` as it will confuse the TSX parser whether it's a JSX tag or a Generic Declaration.\n// You can also use &#x3C;T,> https://github.com/microsoft/TypeScript/issues/15713#issuecomment-499474386\nconst List = &#x3C;T extends unknown>(props: Props&#x3C;T>) => {\n  const { items, renderItem } = props;\n  const [state, setState] = React.useState&#x3C;T[]>([]); // You can use type T in List function scope.\n  return (\n    &#x3C;div>\n      {items.map(renderItem)}\n      &#x3C;button onClick={() => setState(items)}>Clone&#x3C;/button>\n      {JSON.stringify(state, null, 2)}\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<p>The same for using classes: (Credit: <a href=\"https://twitter.com/WrocTypeScript/status/1163234064343736326\">Karol Majewski</a>'s <a href=\"https://gist.github.com/karol-majewski/befaf05af73c7cb3248b4e084ae5df71\">gist</a>)</p>\n<pre><code class=\"language-tsx\">interface Props&#x3C;T> {\n  items: T[];\n  renderItem: (item: T) => React.ReactNode;\n}\n\ninterface State&#x3C;T> {\n  items: T[];\n}\n\nclass List&#x3C;T> extends React.PureComponent&#x3C;Props&#x3C;T>, State&#x3C;T>> {\n  // You can use type T inside List class.\n  state: Readonly&#x3C;State&#x3C;T>> = {\n    items: [],\n  };\n  render() {\n    const { items, renderItem } = this.props;\n    // You can use type T inside List class.\n    const clone: T[] = items.slice(0);\n    return (\n      &#x3C;div>\n        {items.map(renderItem)}\n        &#x3C;button onClick={() => this.setState({ items: clone })}>Clone&#x3C;/button>\n        {JSON.stringify(this.state, null, 2)}\n      &#x3C;/div>\n    );\n  }\n}\n</code></pre>\n<p>Though you can't use Generic Type Parameters for Static Members:</p>\n<pre><code class=\"language-tsx\">class List&#x3C;T> extends React.PureComponent&#x3C;Props&#x3C;T>, State&#x3C;T>> {\n  // Static members cannot reference class type parameters.ts(2302)\n  static getDerivedStateFromProps(props: Props&#x3C;T>, state: State&#x3C;T>) {\n    return { items: props.items };\n  }\n}\n</code></pre>\n<p>To fix this you need to convert your static function to a type inferred function:</p>\n<pre><code class=\"language-tsx\">class List&#x3C;T> extends React.PureComponent&#x3C;Props&#x3C;T>, State&#x3C;T>> {\n  static getDerivedStateFromProps&#x3C;T>(props: Props&#x3C;T>, state: State&#x3C;T>) {\n    return { items: props.items };\n  }\n}\n</code></pre>\n<h3>Generic components with children</h3>\n<p><code>children</code> is usually not defined as a part of the props type. Unless <code>children</code> are explicitly defined as a part of the <code>props</code> type, an attempt to use <code>props.children</code> in JSX or in the function body will fail:</p>\n<pre><code class=\"language-tsx\">interface WrapperProps&#x3C;T> {\n  item: T;\n  renderItem: (item: T) => React.ReactNode;\n}\n\n/* Property 'children' does not exist on type 'WrapperProps&#x3C;T>'. */\nconst Wrapper = &#x3C;T extends {}>(props: WrapperProps&#x3C;T>) => {\n  return (\n    &#x3C;div>\n      {props.renderItem(props.item)}\n      {props.children}\n    &#x3C;/div>\n  );\n};\n\n/*\nType '{ children: string; item: string; renderItem: (item: string) => string; }' is not assignable to type 'IntrinsicAttributes &#x26; WrapperProps&#x3C;string>'.\n  Property 'children' does not exist on type 'IntrinsicAttributes &#x26; WrapperProps&#x3C;string>'.\n*/\n\nconst wrapper = (\n  &#x3C;Wrapper item=\"test\" renderItem={(item) => item}>\n    {test}\n  &#x3C;/Wrapper>\n);\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wFgAoC4AOxiSk3STgHUoUwx6AFHMAZwA8AFQB8cAN4U4cYHRAAuOMIDc0uEWoATegEl5SgBRyki5QEo4AXnHJ0MAHR2MAOQg615GWgAWwADZamkrOjqFuHhQAvhQUAPQAVHC8EFywAJ4EvgFBSNT4cFoQSPxw1BDwSAAewPzwENRwMOlcBGwcaSkCIqL4DnAJcRRoDXWs7Jz01nAicNV02qUSUaKGYHz8Su2TUF1CYpY2kupEMACuUI2G6jKCWsAAbqI3MpLrqfwOmjpQ+qZrGwcJhA5hiXleMgk7wEDmygU0YIhgji9ye6nMniinniCQowhazHwEjgcNy1CUdSgNAA5ipZAY4JSaXTvnoGcYGUzqNTDuIubS4FECrUyhU4Ch+PxgNTqCgAEb+ZgwCBNAkEXS0KnUKVoACCMBgVLlZzopQAZOMOjwNoJ+b0HOouvRmlk-PC8gUiiVRZUamMGqrWvgNYaaDr9aHjaa4Bbtp0bXa+hRBrFyCNtfBTfArHBDLyZqjRAAJJD+fwqrPIwvDUbwADuEzS02u4MEcamwKsACIs12NHkfn8QFYJMDrOJgSsXhIs4iZnF21BnuQMUA\">View in the TypeScript Playground</a></p>\n<p>To work around that, either add <code>children</code> to the <code>WrapperProps</code> definition (possibly narrowing down its type, as needed):</p>\n<pre><code class=\"language-tsx\">interface WrapperProps&#x3C;T> {\n  item: T;\n  renderItem: (item: T) => React.ReactNode;\n  children: string; // The component will only accept a single string child\n}\n\nconst Wrapper = &#x3C;T extends {}>(props: WrapperProps&#x3C;T>) => {\n  return (\n    &#x3C;div>\n      {props.renderItem(props.item)}\n      {props.children}\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<p>or wrap the type of the props in <code>React.PropsWithChildren</code> (this is what <code>React.FC&#x3C;></code> does):</p>\n<pre><code class=\"language-tsx\">interface WrapperProps&#x3C;T> {\n  item: T;\n  renderItem: (item: T) => React.ReactNode;\n}\n\nconst Wrapper = &#x3C;T extends {}>(\n  props: React.PropsWithChildren&#x3C;WrapperProps&#x3C;T>>\n) => {\n  return (\n    &#x3C;div>\n      {props.renderItem(props.item)}\n      {props.children}\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<h2>Typing Children</h2>\n<p>Some API designs require some restriction on <code>children</code> passed to a parent component. It is common to want to enforce these in types, but you should be aware of limitations to this ability.</p>\n<h3>What You CAN Do</h3>\n<p>You can type the <strong>structure</strong> of your children: just one child, or a tuple of children.</p>\n<p>The following are valid:</p>\n<pre><code class=\"language-ts\">type OneChild = React.ReactElement;\ntype TwoChildren = [React.ReactElement, React.ReactElement];\ntype ArrayOfProps = SomeProp[];\ntype NumbersChildren = number[];\ntype TwoNumbersChildren = [number, number];\n</code></pre>\n<details>\n<summary>\nDon't forget that you can also use `prop-types` if TS fails you.\n</summary>\n<pre><code class=\"language-ts\">Parent.propTypes = {\n  children: PropTypes.shape({\n    props: PropTypes.shape({\n      // could share `propTypes` to the child\n      value: PropTypes.string.isRequired,\n    }),\n  }).isRequired,\n};\n</code></pre>\n</details>\n<h3>What You CANNOT Do</h3>\n<p>The thing you cannot do is <strong>specify which components</strong> the children are, e.g. If you want to express the fact that \"React Router <code>&#x3C;Routes></code> can only have <code>&#x3C;Route></code> as children, nothing else is allowed\" in TypeScript.</p>\n<p>This is because when you write a JSX expression (<code>const foo = &#x3C;MyComponent foo='foo' /></code>), the resultant type is blackboxed into a generic JSX.Element type. (<em><a href=\"https://github.com/typescript-cheatsheets/react/issues/271\">thanks @ferdaber</a></em>)</p>\n<h2>Type Narrowing based on Props</h2>\n<p>What you want:</p>\n<pre><code class=\"language-tsx\">// Usage\nfunction App() {\n  return (\n    &#x3C;>\n      {/* 😎 All good */}\n      &#x3C;Button target=\"_blank\" href=\"https://www.google.com\">\n        Test\n      &#x3C;/Button>\n      {/* 😭 Error, `disabled` doesnt exist on anchor element */}\n      &#x3C;Button disabled href=\"x\">\n        Test\n      &#x3C;/Button>\n    &#x3C;/>\n  );\n}\n</code></pre>\n<p>How to implement: Use <a href=\"https://basarat.gitbooks.io/typescript/docs/types/typeGuard.html#user-defined-type-guards\">type guards</a>!</p>\n<pre><code class=\"language-tsx\">// Button props\ntype ButtonProps = React.ButtonHTMLAttributes&#x3C;HTMLButtonElement> &#x26; {\n  href?: undefined;\n};\n\n// Anchor props\ntype AnchorProps = React.AnchorHTMLAttributes&#x3C;HTMLAnchorElement> &#x26; {\n  href?: string;\n};\n\n// Input/output options\ntype Overload = {\n  (props: ButtonProps): JSX.Element;\n  (props: AnchorProps): JSX.Element;\n};\n\n// Guard to check if href exists in props\nconst hasHref = (props: ButtonProps | AnchorProps): props is AnchorProps =>\n  \"href\" in props;\n\n// Component\nconst Button: Overload = (props: ButtonProps | AnchorProps) => {\n  // anchor render\n  if (hasHref(props)) return &#x3C;a {...props} />;\n  // button render\n  return &#x3C;button {...props} />;\n};\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wFgAoAekrgCEBXGGCAOzjBzAGcKYBPMEjqNmLAAqcucALyJiMAHQMmrABIAVALIAZAIJMowAEaMkXADwady0QFEANkhBIWMAHxwAZHADeFOHAAFkSYAPwAXHD0LAAmSJjALEgxANwUAL5p5BTUcLosaIHQ7JK8AkL5hdASENwycuiKlUVQVnoGxqYWbc3QDk4u7l6+-kEhEXBcMIYsAOZZmRQ5NACSLGCMlBCMG-C1MMCsPOT8gnAA8gBuSFD2ECgx9X7kAQAUHLVckTasNdwAlJEAFIAZQAGgp+s5XFk3h9uJFelA-lxAXBQRCoYMFlllnAAOL0FBQR7MOCFJBoADWcGAmDG8TgSAAHsAplJEiVPhQ0Ed4IEUFxVCF6u9JN8RL9JHAAD55AotFFo+EcqRIlEyNyjABEwXi2tpbBVuKoNAAwrhIElXDy+cIVCxIlcbncHqKVRKHRq5erJP9NSMXnBcigFcUiLEbqM6XBXgKhSExZ9-v6iDB6FA2OYUL4FHmVelg25YcGaCYHXAI3EoKM0xms+XRLn85JC5RixkTbkAKpcFCzJAUTDRDCHNi6MBgV7+54BOuZ2OjALmLVBgIBHyUABUcEAvBuAOD28vZ7HBZhAII8t5R0kv1+YfmwYMSBzBpNqAPpGeyhqkGvWYN9AiYBFqAAd3AhQzwgWZHAUXkQG1Vd12QuB1DMGBb2XSgHyQlDNx3XdAFo9uBbCgHAoAAGjgAADGI2RQL9kmouAYggMxXCZVkpjgVg4FDKooCZRxoXgK8bzXO8HxY+jGMef832ZRDMPXNCpmU8xsMlFhcKw3D-gWIA\">View in the TypeScript Playground</a></p>\n<p>Components, and JSX in general, are analogous to functions. When a component can render differently based on their props, it's similar to how a function can be overloaded to have multiple call signatures. In the same way, you can overload a function component's call signature to list all of its different \"versions\".</p>\n<p>A very common use case for this is to render something as either a button or an anchor, based on if it receives a <code>href</code> attribute.</p>\n<pre><code class=\"language-tsx\">type ButtonProps = JSX.IntrinsicElements[\"button\"];\ntype AnchorProps = JSX.IntrinsicElements[\"a\"];\n\n// optionally use a custom type guard\nfunction isPropsForAnchorElement(\n  props: ButtonProps | AnchorProps\n): props is AnchorProps {\n  return \"href\" in props;\n}\n\nfunction Clickable(props: ButtonProps | AnchorProps) {\n  if (isPropsForAnchorElement(props)) {\n    return &#x3C;a {...props} />;\n  } else {\n    return &#x3C;button {...props} />;\n  }\n}\n</code></pre>\n<p>They don't even need to be completely different props, as long as they have at least one difference in properties:</p>\n<pre><code class=\"language-tsx\">type LinkProps = Omit&#x3C;JSX.IntrinsicElements[\"a\"], \"href\"> &#x26; { to?: string };\n\nfunction RouterLink(props: LinkProps | AnchorProps) {\n  if (\"href\" in props) {\n    return &#x3C;a {...props} />;\n  } else {\n    return &#x3C;Link {...props} />;\n  }\n}\n</code></pre>\n<details>\n  <summary><b>Approach: Generic Components</b></summary>\n<p>Here is an example solution, see the further discussion for other solutions. <em>thanks to <a href=\"https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/12#issuecomment-394440577\">@jpavon</a></em></p>\n<pre><code class=\"language-tsx\">interface LinkProps {}\ntype AnchorProps = React.AnchorHTMLAttributes&#x3C;HTMLAnchorElement>;\ntype RouterLinkProps = Omit&#x3C;NavLinkProps, \"href\">;\n\nconst Link = &#x3C;T extends {}>(\n  props: LinkProps &#x26; T extends RouterLinkProps ? RouterLinkProps : AnchorProps\n) => {\n  if ((props as RouterLinkProps).to) {\n    return &#x3C;NavLink {...(props as RouterLinkProps)} />;\n  } else {\n    return &#x3C;a {...(props as AnchorProps)} />;\n  }\n};\n\n&#x3C;Link&#x3C;RouterLinkProps> to=\"/\">My link&#x3C;/Link>; // ok\n&#x3C;Link&#x3C;AnchorProps> href=\"/\">My link&#x3C;/Link>; // ok\n&#x3C;Link&#x3C;RouterLinkProps> to=\"/\" href=\"/\">\n  My link\n&#x3C;/Link>; // error\n</code></pre>\n</details>\n<details>\n  <summary><b>Approach: Composition</b></summary>\n<p>If you want to conditionally render a component, sometimes is better to use <a href=\"https://reactjs.org/docs/composition-vs-inheritance.html\">React's composition model</a> to have simpler components and better to understand typings:</p>\n<pre><code class=\"language-tsx\">type AnchorProps = React.AnchorHTMLAttributes&#x3C;HTMLAnchorElement>;\ntype RouterLinkProps = Omit&#x3C;AnchorProps, \"href\">;\n\ninterface Button {\n  as: React.ComponentClass | \"a\";\n}\n\nconst Button: React.FunctionComponent&#x3C;Button> = (props) => {\n  const { as: Component, children, ...rest } = props;\n  return (\n    &#x3C;Component className=\"button\" {...rest}>\n      {children}\n    &#x3C;/Component>\n  );\n};\n\nconst AnchorButton: React.FunctionComponent&#x3C;AnchorProps> = (props) => (\n  &#x3C;Button as=\"a\" {...props} />\n);\n\nconst LinkButton: React.FunctionComponent&#x3C;RouterLinkProps> = (props) => (\n  &#x3C;Button as={NavLink} {...props} />\n);\n\n&#x3C;LinkButton to=\"/login\">Login&#x3C;/LinkButton>;\n&#x3C;AnchorButton href=\"/login\">Login&#x3C;/AnchorButton>;\n&#x3C;AnchorButton href=\"/login\" to=\"/test\">\n  Login\n&#x3C;/AnchorButton>; // Error: Property 'to' does not exist on type...\n</code></pre>\n</details>\n<p>You may also want to use Discriminated Unions, please check out <a href=\"https://blog.andrewbran.ch/expressive-react-component-apis-with-discriminated-unions/\">Expressive React Component APIs with Discriminated Unions</a>.</p>\n<p>Here is a brief intuition for <strong>Discriminated Union Types</strong>:</p>\n<pre><code class=\"language-ts\">type UserTextEvent = {\n  type: \"TextEvent\";\n  value: string;\n  target: HTMLInputElement;\n};\ntype UserMouseEvent = {\n  type: \"MouseEvent\";\n  value: [number, number];\n  target: HTMLElement;\n};\ntype UserEvent = UserTextEvent | UserMouseEvent;\nfunction handle(event: UserEvent) {\n  if (event.type === \"TextEvent\") {\n    event.value; // string\n    event.target; // HTMLInputElement\n    return;\n  }\n  event.value; // [number, number]\n  event.target; // HTMLElement\n}\n</code></pre>\n<details>\n  <summary>\n  Take care: TypeScript does not narrow the type of a Discriminated Union on the basis of typeof checks. The type guard has to be on the value of a key and not it's type.\n  </summary>\n<pre><code class=\"language-ts\">type UserTextEvent = { value: string; target: HTMLInputElement };\ntype UserMouseEvent = { value: [number, number]; target: HTMLElement };\ntype UserEvent = UserTextEvent | UserMouseEvent;\nfunction handle(event: UserEvent) {\n  if (typeof event.value === \"string\") {\n    event.value; // string\n    event.target; // HTMLInputElement | HTMLElement (!!!!)\n    return;\n  }\n  event.value; // [number, number]\n  event.target; // HTMLInputElement | HTMLElement (!!!!)\n}\n</code></pre>\n<p>The above example does not work as we are not checking the value of <code>event.value</code> but only it's type. Read more about it <a href=\"https://github.com/microsoft/TypeScript/issues/30506#issuecomment-474858198\">microsoft/TypeScript#30506 (comment)</a></p>\n</details>\n<details>\n  <summary>\n  Discriminated Unions in TypeScript can also work with hook dependencies in React. The type matched is automatically updated when the corresponding union member based on which a hook depends, changes. Expand more to see an example usecase.\n   <br/><br/>\n  </summary>\n<pre><code class=\"language-tsx\">type SingleElement = {\n  isArray: true;\n  value: string[];\n};\ntype MultiElement = {\n  isArray: false;\n  value: string;\n};\ntype Props = SingleElement | MultiElement;\nfunction Sequence(p: Props) {\n  return React.useMemo(\n    () => (\n      &#x3C;div>\n        value(s):\n        {p.isArray &#x26;&#x26; p.value.join(\",\")}\n        {!p.isArray &#x26;&#x26; p.value}\n      &#x3C;/div>\n    ),\n    [p.isArray, p.value] // TypeScript automatically matches the corresponding value type based on dependency change\n  );\n}\nfunction App() {\n  return (\n    &#x3C;div>\n      &#x3C;Sequence isArray={false} value={\"foo\"} />\n      &#x3C;Sequence isArray={true} value={[\"foo\", \"bar\", \"baz\"]} />\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwBQdMAnmFnAArFjoC8dccAD5wA3vwETgqAIJQoyJgC44MKAFcs9CRIBuyADYblqVcAB2AcwDaAXRpxxAgL7jhY7QKmz5SuAQOomo66BkZwJlDmFloSTvS4EGYmcAAacDxwABRgypwQ3ACU6QB8ouKUMGpQZphUMAB0aoEAslggEJnBmUU8pZ0ecAA8ACbAOsXB2nqGWJmoBYqTEiJg9V5yCnAAZFtwq9Ma9QBWEOaZZAA0ZAUuAwIiAISr6z7bu-uhWLcegwD0o+NggULsErM8ZBsmBc9vUDlgbNDfr84AAVFhYVC4SJgeDINQwEjIGDAXAGfRMOAgIm4AAWGJUdLgCTkGMgZlGljgcJU6PEBXocToBDUZnwwEScGkYDA3TKAgqVRq-QkIzGTP0aFQADlkCAsDwAERSsAGiYDQZpF4KHgifz6QJOLmfG1kAgQCBkR2-M0-S0Qnw21QaR1wm1WV3uy7kABGyCgUbIsYAXmQbF6fQI-gCffy6E4gA\"><i>See this in TS Playground</i>\n</a></p>\n<p>In the above example, based on the <code>isArray</code> union member, the type of the <code>value</code> hook dependency changes.</p>\n </details>\n<p>To streamline this you may also combine this with the concept of <strong>User-Defined Type Guards</strong>:</p>\n<pre><code class=\"language-ts\">function isString(a: unknown): a is string {\n  return typeof a === \"string\";\n}\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards\">Read more about User-Defined Type Guards in the Handbook</a>.</p>\n<h2>Props: One or the Other but not Both</h2>\n<p>Use the <code>in</code> keyword, function overloading, and union types to make components that take either one or another sets of props, but not both:</p>\n<pre><code class=\"language-tsx\">type Props1 = { foo: string };\ntype Props2 = { bar: string };\n\nfunction MyComponent(props: Props1 | Props2) {\n  if (\"foo\" in props) {\n    // props.bar // error\n    return &#x3C;div>{props.foo}&#x3C;/div>;\n  } else {\n    // props.foo // error\n    return &#x3C;div>{props.bar}&#x3C;/div>;\n  }\n}\nconst UsageComponent: React.FC = () => (\n  &#x3C;div>\n    &#x3C;MyComponent foo=\"foo\" />\n    &#x3C;MyComponent bar=\"bar\" />\n    {/* &#x3C;MyComponent foo=\"foo\" bar=\"bar\"/> // invalid */}\n  &#x3C;/div>\n);\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wFgAoCmATzCTgAUcwBnARjgF44BvOTCBABccFjCjAAdgHM4AXwDcVWvSYRWAJi684AIxRQRYiTPlLK5TAFdJGYBElwAstQDCuSJKSSYACjDMLCJqrBwAPoyBGgCUvBRwcMCYcL4ARAIQqYmOAeossTzxCXAA9CVwuawAdPpQpeVIUDhQRQlEMFZQjgA8ACbAAG4AfDyVLFUZct0l-cPmCXJwSAA2LPSF5MX1FYETgtuNza1w7Z09syNjNQZTM4ND8-IUchRoDmJwAKosKNJI7uAHN4YCJkOgYFUAGKubS+WKcIYpIp9e7HbouAGeYH8QScdKCLIlIZojEeIE+PQGPG1QnEzbFHglABUcHRbjJXgpGTxGSytWpBlSRO2UgGKGWwF6cCZJRe9OmFwo0QUQA\">View in the TypeScript Playground</a></p>\n<p>Further reading: <a href=\"http://www.javiercasas.com/articles/typescript-impossible-states-irrepresentable\">how to ban passing <code>{}</code> if you have a <code>NoFields</code> type.</a></p>\n<h2>Props: Must Pass Both</h2>\n<pre><code class=\"language-tsx\">type OneOrAnother&#x3C;T1, T2> =\n  | (T1 &#x26; { [K in keyof T2]?: undefined })\n  | (T2 &#x26; { [K in keyof T1]?: undefined });\n\ntype Props = OneOrAnother&#x3C;{ a: string; b: string }, {}>;\n\nconst a: Props = { a: \"a\" }; // error\nconst b: Props = { b: \"b\" }; // error\nconst ab: Props = { a: \"a\", b: \"b\" }; // ok\n</code></pre>\n<p>Thanks <a href=\"https://twitter.com/kentcdodds/status/1085655423611367426\">diegohaz</a></p>\n<h2>Props: Pass One ONLY IF the Other Is Passed</h2>\n<p>Say you want a Text component that gets truncated if <code>truncate</code> prop is passed but expands to show the full text when <code>expanded</code> prop is passed (e.g. when the user clicks the text).</p>\n<p>You want to allow <code>expanded</code> to be passed only if <code>truncate</code> is also passed, because there is no use for <code>expanded</code> if the text is not truncated.</p>\n<p>Usage example:</p>\n<pre><code class=\"language-tsx\">const App: React.FC = () => (\n  &#x3C;>\n    {/* these all typecheck */}\n    &#x3C;Text>not truncated&#x3C;/Text>\n    &#x3C;Text truncate>truncated&#x3C;/Text>\n    &#x3C;Text truncate expanded>\n      truncate-able but expanded\n    &#x3C;/Text>\n    {/* TS error: Property 'truncate' is missing in type '{ children: string; expanded: true; }' but required in type '{ truncate: true; expanded?: boolean | undefined; }'. */}\n    &#x3C;Text expanded>truncate-able but expanded&#x3C;/Text>\n  &#x3C;/>\n);\n</code></pre>\n<p>You can implement this by function overloads:</p>\n<pre><code class=\"language-tsx\">type CommonProps = {\n  children: React.ReactNode;\n  miscProps?: any;\n};\n\ntype NoTruncateProps = CommonProps &#x26; { truncate?: false };\n\ntype TruncateProps = CommonProps &#x26; { truncate: true; expanded?: boolean };\n\n// Function overloads to accept both prop types NoTruncateProps &#x26; TruncateProps\nfunction Text(props: NoTruncateProps): JSX.Element;\nfunction Text(props: TruncateProps): JSX.Element;\nfunction Text(props: CommonProps &#x26; { truncate?: boolean; expanded?: boolean }) {\n  const { children, truncate, expanded, ...otherProps } = props;\n  const classNames = truncate ? \".truncate\" : \"\";\n  return (\n    &#x3C;div className={classNames} aria-expanded={!!expanded} {...otherProps}>\n      {children}\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<h2>Props: Omit prop from a type</h2>\n<p>Note: <a href=\"https://www.typescriptlang.org/docs/handbook/utility-types.html#omittk\">Omit was added as a first class utility in TS 3.5</a>! 🎉</p>\n<p>Sometimes when intersecting types, we want to define our own version of a prop. For example, I want my component to have a <code>label</code>, but the type I am intersecting with also has a <code>label</code> prop. Here's how to extract that out:</p>\n<pre><code class=\"language-tsx\">export interface Props {\n  label: React.ReactNode; // this will conflict with the InputElement's label\n}\n\n// this comes inbuilt with TS 3.5\ntype Omit&#x3C;T, K extends keyof T> = Pick&#x3C;T, Exclude&#x3C;keyof T, K>>;\n\n// usage\nexport const Checkbox = (\n  props: Props &#x26; Omit&#x3C;React.HTMLProps&#x3C;HTMLInputElement>, \"label\">\n) => {\n  const { label } = props;\n  return (\n    &#x3C;div className=\"Checkbox\">\n      &#x3C;label className=\"Checkbox-label\">\n        &#x3C;input type=\"checkbox\" {...props} />\n      &#x3C;/label>\n      &#x3C;span>{label}&#x3C;/span>\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<p>When your component defines multiple props, chances of those conflicts increase. However you can explicitly state that all your fields should be removed from the underlying component using the <code>keyof</code> operator:</p>\n<pre><code class=\"language-tsx\">export interface Props {\n  label: React.ReactNode; // conflicts with the InputElement's label\n  onChange: (text: string) => void; // conflicts with InputElement's onChange\n}\n\nexport const Textbox = (\n  props: Props &#x26; Omit&#x3C;React.HTMLProps&#x3C;HTMLInputElement>, keyof Props>\n) => {\n  // implement Textbox component ...\n};\n</code></pre>\n<p>As you can see from the Omit example above, you can write significant logic in your types as well. <a href=\"https://github.com/pelotom/type-zoo\">type-zoo</a> is a nice toolkit of operators you may wish to check out (includes Omit), as well as <a href=\"https://github.com/piotrwitek/utility-types\">utility-types</a> (especially for those migrating from Flow).</p>\n<h2>Props: Extracting Prop Types of a Component</h2>\n<p>Sometimes you want the prop types of a component, but it isn't exported.</p>\n<p>A simple solution is to use <code>React.ComponentProps</code>:</p>\n<pre><code class=\"language-tsx\">// a Modal component defined elsewhere\nconst defaultProps: React.ComponentProps&#x3C;typeof Modal> = {\n  title: \"Hello World\",\n  visible: true,\n  onClick: jest.fn(),\n};\n</code></pre>\n<p>There are advanced edge cases if you want to extract the prop types of a component taking into account internal props, <code>propTypes</code>, and <code>defaultProps</code> - <a href=\"https://github.com/typescript-cheatsheets/react/issues/63\">check our issue here for helper utilities that resolve these</a>.</p>\n<h2>Props: Render Props</h2>\n<blockquote>\n<p>Advice: Where possible, you should try to use Hooks instead of Render Props. We include this merely for completeness.</p>\n</blockquote>\n<p>Sometimes you will want to write a function that can take a React element or a string or something else as a prop. The best Type to use for such a situation is <code>React.ReactNode</code> which fits anywhere a normal, well, React Node would fit:</p>\n<pre><code class=\"language-tsx\">export interface Props {\n  label?: React.ReactNode;\n  children: React.ReactNode;\n}\nexport const Card = (props: Props) => {\n  return (\n    &#x3C;div>\n      {props.label &#x26;&#x26; &#x3C;div>{props.label}&#x3C;/div>}\n      {props.children}\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<p>If you are using a function-as-a-child render prop:</p>\n<pre><code class=\"language-tsx\">export interface Props {\n  children: (foo: string) => React.ReactNode;\n}\n</code></pre>\n<p><a href=\"https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/new/choose\">Something to add? File an issue</a>.</p>\n<h2>Handling Exceptions</h2>\n<p>You can provide good information when bad things happen.</p>\n<pre><code class=\"language-ts\">class InvalidDateFormatError extends RangeError {}\nclass DateIsInFutureError extends RangeError {}\n\n/**\n * // optional docblock\n * @throws {InvalidDateFormatError} The user entered date incorrectly\n * @throws {DateIsInFutureError} The user entered date in future\n *\n */\nfunction parse(date: string) {\n  if (!isValid(date))\n    throw new InvalidDateFormatError(\"not a valid date format\");\n  if (isInFuture(date)) throw new DateIsInFutureError(\"date is in the future\");\n  // ...\n}\n\ntry {\n  // call parse(date) somewhere\n} catch (e) {\n  if (e instanceof InvalidDateFormatError) {\n    console.error(\"invalid date format\", e);\n  } else if (e instanceof DateIsInFutureError) {\n    console.warn(\"date is in future\", e);\n  } else {\n    throw e;\n  }\n}\n</code></pre>\n<p><a href=\"https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wFgAoCtAGxQGc64BJAOwDcVrgATAERRhIAYtBACAolBxQ4SAB6CW3RghQsA5kknS4AbwC+VWgzj9BTOqyEBXGNaLboshUiUq1mxzIMUKmaywYwBAscMB0AGqcPAAU3AJIAFxwdDBQwBoAlHoUcHBEdlCh8YJwAPxwadZIcMmYnHRIANwUhpTk-oEwwaHhVrb2SHEJyanpWTnkeWghqXAlSAByEADucAC8cCxIa2ZDmS1TcDMsc2j2RCwwextbO6YJw4KZuXCvBfah51Ku1wkAdJoYAAVUD7OAAPnmCWWK0BSBBYJiB1avnIAHoAFSY3KYuDo9FwCBgbohTjzCBoABG1EpAGtcXAAAIwAAWOBWjF0rA4XD4CREUDEMC8+jgwNZNWsjRkvyQRG40NKGRmPww1AAnoyWezVly9hZ+oUtFJoGKJVKZbIrvKkIqFmFQv5jbjcei-AEgiE4GAUFBGk8kik0hl1NldK9gJg4DEAIThKJ8wOZF5HPJsjl3NY86L8wSC4VeGIAIhYEHgKDgvJ4SpqmFEAmLKKOUZjfRYNmNyeyGdWWYe5ksHYGDlNUBLDvCjsqkrgzsGTcOeQJcH+a9R7TSGsmy8JaE41B9foDC2ydFwO0lRFaxwEaFZMaQ4cj0ZiNQyqTUaCQEGjOb5ewFhIY7PmmxyzBA1BIP88rSCWGTVvaCRzg2MDFgANLIzZ5GKSDUI0YSvu+pwwF+P7RgaQ6doMXigXk0wQVB-wrH6LATshU4ZHOI5IBhWFLnAuH4TUEZgb2azNK8bT6EAA\">View in TypeScript Playground</a></p>\n<p>Simply throwing an exception is fine, however it would be nice to make TypeScript remind the consumer of your code to handle your exception. We can do that just by returning instead of throwing:</p>\n<pre><code class=\"language-ts\">function parse(\n  date: string\n): Date | InvalidDateFormatError | DateIsInFutureError {\n  if (!isValid(date))\n    return new InvalidDateFormatError(\"not a valid date format\");\n  if (isInFuture(date)) return new DateIsInFutureError(\"date is in the future\");\n  // ...\n}\n\n// now consumer *has* to handle the errors\nlet result = parse(\"mydate\");\nif (result instanceof InvalidDateFormatError) {\n  console.error(\"invalid date format\", result.message);\n} else if (result instanceof DateIsInFutureError) {\n  console.warn(\"date is in future\", result.message);\n} else {\n  /// use result safely\n}\n\n// alternately you can just handle all errors\nif (result instanceof Error) {\n  console.error(\"error\", result);\n} else {\n  /// use result safely\n}\n</code></pre>\n<p>You can also describe exceptions with special-purpose data types (don't say monads...) like the <code>Try</code>, <code>Option</code> (or <code>Maybe</code>), and <code>Either</code> data types:</p>\n<pre><code class=\"language-ts\">interface Option&#x3C;T> {\n  flatMap&#x3C;U>(f: (value: T) => None): None;\n  flatMap&#x3C;U>(f: (value: T) => Option&#x3C;U>): FormikOption&#x3C;U>;\n  getOrElse(value: T): T;\n}\nclass Some&#x3C;T> implements Option&#x3C;T> {\n  constructor(private value: T) {}\n  flatMap&#x3C;U>(f: (value: T) => None): None;\n  flatMap&#x3C;U>(f: (value: T) => Some&#x3C;U>): Some&#x3C;U>;\n  flatMap&#x3C;U>(f: (value: T) => Option&#x3C;U>): Option&#x3C;U> {\n    return f(this.value);\n  }\n  getOrElse(): T {\n    return this.value;\n  }\n}\nclass None implements Option&#x3C;never> {\n  flatMap&#x3C;U>(): None {\n    return this;\n  }\n  getOrElse&#x3C;U>(value: U): U {\n    return value;\n  }\n}\n\n// now you can use it like:\nlet result = Option(6) // Some&#x3C;number>\n  .flatMap((n) => Option(n * 3)) // Some&#x3C;number>\n  .flatMap((n = new None())) // None\n  .getOrElse(7);\n\n// or:\nlet result = ask() // Option&#x3C;string>\n  .flatMap(parse) // Option&#x3C;Date>\n  .flatMap((d) => new Some(d.toISOString())) // Option&#x3C;string>\n  .getOrElse(\"error parsing string\");\n</code></pre>"},{"url":"/docs/react/render-elements/","relativePath":"docs/react/render-elements.md","relativeDir":"docs/react","base":"render-elements.md","name":"render-elements","frontmatter":{"title":"Rendering Elements With React","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Rendering Elements\n\n</h1>\n<p>Elements are the smallest building blocks of React apps.</p>\n<p>An element describes what you want to see on the screen:</p>\n<p>Unlike browser DOM elements, React elements are plain objects, and are cheap to create. React DOM takes care of updating the DOM to match the React elements.</p>\n<blockquote>\n<p><strong>Note:</strong></p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>One might confuse elements with a more widely known concept of “components”. We will introduce components in the <a href=\"https://reactjs.org/docs/components-and-props.html\">next section</a>. Elements are what components are “made of”, and we encourage you to read this section before jumping ahead.</p>\n</blockquote>\n<h2>Rendering an Element into the DOM</h2>\n<p>Let's say there is a &#x3C;div> somewhere in your HTML file:</p>\n<p>We call this a “root” DOM node because everything inside it will be managed by React DOM.</p>\n<p>Applications built with just React usually have a single root DOM node. If you are integrating React into an existing app, you may have as many isolated root DOM nodes as you like.</p>\n<p>To render a React element into a root DOM node, pass both to <a href=\"https://reactjs.org/docs/react-dom.html#render\">ReactDOM.render()</a>:</p>\n<p><a href=\"https://reactjs.org/redirect-to-codepen/rendering-elements/render-an-element\">Try it on CodePen</a></p>\n<p>It displays “Hello, world” on the page.</p>\n<h2>Updating the Rendered Element</h2>\n<p>React elements are <a href=\"https://en.wikipedia.org/wiki/Immutable_object\">immutable</a>. Once you create an element, you can't change its children or attributes. An element is like a single frame in a movie: it represents the UI at a certain point in time.</p>\n<p>With our knowledge so far, the only way to update the UI is to create a new element, and pass it to <a href=\"https://reactjs.org/docs/react-dom.html#render\">ReactDOM.render()</a>.</p>\n<p>Consider this ticking clock example:</p>\n<p><a href=\"https://reactjs.org/redirect-to-codepen/rendering-elements/update-rendered-element\">Try it on CodePen</a></p>\n<p>It calls <a href=\"https://reactjs.org/docs/react-dom.html#render\">ReactDOM.render()</a> every second from a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval\">setInterval()</a> callback.</p>\n<blockquote>\n<p><strong>Note:</strong></p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>In practice, most React apps only call <a href=\"https://reactjs.org/docs/react-dom.html#render\">ReactDOM.render()</a> once. In the next sections we will learn how such code gets encapsulated into <a href=\"https://reactjs.org/docs/state-and-lifecycle.html\">stateful components</a>.</p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>We recommend that you don't skip topics because they build on each other.</p>\n</blockquote>\n<h2>React Only Updates What's Necessary</h2>\n<p>React DOM compares the element and its children to the previous one, and only applies the DOM updates necessary to bring the DOM to the desired state.</p>\n<p>You can verify by inspecting the <a href=\"https://reactjs.org/redirect-to-codepen/rendering-elements/update-rendered-element\">last example</a> with the browser tools:</p>\n<p><img src=\"https://reactjs.org/c158617ed7cc0eac8f58330e49e48224/granular-dom-updates.gif\"></p>\n<p>Even though we create an element describing the whole UI tree on every tick, only the text node whose contents have changed gets updated by React DOM.</p>\n<p>In our experience, thinking about how the UI should look at any given moment, rather than how to change it over time, eliminates a whole class of bugs.</p>"},{"url":"/docs/reference/awesome-static/","relativePath":"docs/reference/awesome-static.md","relativeDir":"docs/reference","base":"awesome-static.md","name":"awesome-static","frontmatter":{"title":"Awesome Static Site Resources","weight":0,"excerpt":"inspired by Awesome Lists","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Awesome Static Site Resources</h1>\n<h2>Table of Contents</h2>\n<ul>\n<li><a href=\"#audio\">Audio</a></li>\n<li><a href=\"#books\">Books</a></li>\n<li><a href=\"#calendar-and-scheduling\">Calendar and Scheduling</a></li>\n<li><a href=\"#images\">Images</a></li>\n<li><a href=\"#maps\">Maps</a></li>\n<li><a href=\"#presentations\">Presentations</a></li>\n<li><a href=\"#video\">Video</a></li>\n<li><a href=\"#code\">Code</a></li>\n<li><a href=\"#functions-as-a-service\">Functions as a Service FaaS</a></li>\n<li><a href=\"#GraphQL\">GraphQL</a></li>\n<li>\n<p><a href=\"#community\">Community</a></p>\n<ul>\n<li><a href=\"#comments\">Comments</a></li>\n<li><a href=\"#forms\">Forms</a></li>\n<li><a href=\"#live-chat\">Live Chat</a></li>\n<li><a href=\"#newsletters\">Newsletters</a></li>\n<li><a href=\"#social-media\">Social Media</a></li>\n<li><a href=\"#surveys\">Surveys</a></li>\n</ul>\n</li>\n<li><a href=\"#e-commerce\">E-Commerce</a></li>\n<li><a href=\"#payments\">Payments</a></li>\n<li><a href=\"#search\">Search</a></li>\n<li><a href=\"#analytics\">Analytics</a></li>\n<li><a href=\"#authentication\">Authentication</a></li>\n<li><a href=\"#other\">Other</a></li>\n<li><a href=\"#related-lists\">Related Lists</a></li>\n</ul>\n<hr>\n<h2>Audio</h2>\n<ul>\n<li><a href=\"https://soundcloud.com/\">SoundCloud</a> - Audio hosting with an embeddable player. Up to 3 hours of content is free.</li>\n<li><a href=\"https://www.mixcloud.com/\">Mixcloud</a> - Audio hosting with unlimited uploads and an embeddable player.</li>\n<li><a href=\"https://www.spotify.com/\">Spotify</a> - You can embed any song, album, or playlist with a <a href=\"https://developer.spotify.com/documentation/widgets/guides/adding-a-spotify-embed/\">Spotify Play Button</a>.</li>\n</ul>\n<h2>Books</h2>\n<ul>\n<li><a href=\"https://github.com/aharris88/google-bookshelves-widget\">Google Books</a> - Allows you to display the books in your Google Books Library.</li>\n<li><a href=\"https://www.goodreads.com/api\">Goodreads API and widgets</a> - Allows you to access any of the Goodreads data. Widgets are found on the widgets tab on your <a href=\"https://www.goodreads.com/user/edit\">settings page</a>.</li>\n</ul>\n<h2>Calendar and Scheduling</h2>\n<ul>\n<li><a href=\"http://calendar.google.com/\">Google Calendar</a> - Embeddable calendar that you can collaborate with other people.</li>\n<li><a href=\"http://booking.timekit.io/\">Booking.js</a> - Beautiful embeddable booking widget.</li>\n<li><a href=\"http://zenplanner.com/\">zenplanner</a> - Paid - Online scheduling for fitness.</li>\n</ul>\n<h2>Images</h2>\n<ul>\n<li><a href=\"https://www.flickr.com/\">Flickr</a> - Online photo hosting by Yahoo.</li>\n<li><a href=\"https://cloudinary.com/\">Cloudinary</a> - Image hosting, manipulation and delivery.</li>\n</ul>\n<h2>Maps</h2>\n<ul>\n<li><a href=\"http://maps.google.com/\">Google Maps</a> - Google maps are easily embeddable.</li>\n<li><a href=\"https://www.mapbox.com/\">Mapbox</a> - Really nice looking embeddable maps.</li>\n</ul>\n<h2>Presentations</h2>\n<ul>\n<li><a href=\"https://prezi.com/\">Prezi</a> - Online presentations with really transitions that can zoom and rotate.</li>\n<li><a href=\"http://lab.hakim.se/reveal-js/\">Reveal.js</a> - HTML presentation framework.</li>\n<li><a href=\"http://slides.com/\">Slides.com</a> - A place for creating, presenting and sharing slide decks.</li>\n<li><a href=\"https://speakerdeck.com/\">SpeakerDeck</a> - Upload your slides as a PDF, and get an online, shareable presentation.</li>\n</ul>\n<h2>Video</h2>\n<ul>\n<li><a href=\"https://mux.com/\">Mux</a> - Paid - An API to play videos directly to the client. Can also power live streams.</li>\n<li><a href=\"https://www.youtube.com/\">YouTube</a> - Embeddable videos with unlimited uploads.</li>\n<li><a href=\"https://vimeo.com/\">Vimeo</a> - Paid - Embeddable videos with no ads.</li>\n<li><a href=\"http://www.vevo.com/\">Vevo</a> - Embeddable music videos.</li>\n<li><a href=\"http://wistia.com/\">Wistia</a> - Free plan has a limit of 25 videos.</li>\n</ul>\n<h3>Code</h3>\n<ul>\n<li><a href=\"http://codepen.io/\">Codepen</a> - A playground of embeddable front-end code examples.</li>\n<li><a href=\"http://jsbin.com/\">JS Bin</a> - Embeddable front-end code examples.</li>\n<li><a href=\"http://jsfiddle.net/\">JSFiddle</a> - Embeddable front-end code examples.</li>\n<li><a href=\"https://highlightjs.org/\">highlight.js</a> - Syntax highlighting for the web.</li>\n</ul>\n<h2>Functions as a Service</h2>\n<ul>\n<li><a href=\"https://github.com/1backend/1backend\">1Backend</a> - Deploy your backend in seconds. Free tier included. Open source.</li>\n<li><a href=\"https://aws.amazon.com/lambda/\">AWS Lambda</a> - AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume</li>\n<li><a href=\"https://cloud.google.com/functions/\">Google Cloud Functions</a> - Create single-purpose, stand-alone functions that respond to Cloud events without the need to manage a server or runtime environment</li>\n<li><a href=\"https://webtask.io/\">Webtask by Auth0</a> - Call code on the server with simple HTTP, easier to set up by far than Lambda or Google's</li>\n<li><a href=\"https://azure.microsoft.com/en-us/services/functions/\">Azure Functions</a> - by Microsoft - same premise as Lambda on the Azure cloud</li>\n<li><a href=\"https://www.iron.io/platform/ironworker/\">IronWorkers</a> - by Iron.io - Run code in a multilanguage containerized environment with unlimited scale and simple pricing</li>\n<li><a href=\"http://open.iron.io/\">IronFunctions</a> - by Iron.io - IronFunctions is an open source serverless computing platform for any cloud - private, public, or hybrid.</li>\n<li><a href=\"https://console.ng.bluemix.net/openwhisk/\">OpenWhisk by IBM</a> - part of their BlueMix hosting platform, and open source, ties into their Watson AI ecosystem nicely</li>\n<li><a href=\"https://www.stackpath.com/products/edgeengine/\">StackPath EdgeEngine</a> - Write functions as a service in the language of your choice and deploy them to a global network of data centers. All the networking, including intelligent routing and load balancing, is managed by StackPath over a private backbone.</li>\n<li><a href=\"https://vercel.com/home#features\">Vercel</a> - Vercel lets people write functions as a service in their language of choice and deploy as part of a monorepo.</li>\n<li><a href=\"https://azure.microsoft.com/en-us/services/app-service/static/#features\">Azure Static Web Apps</a> - Full-stack static app hosting including serverless Functions, authentication, CDN and more</li>\n</ul>\n<h2>GraphQL</h2>\n<ul>\n<li><a href=\"https://fauna.com\">FaunaDB</a> - Serverless GraphQL database. Free tier with no time limit. Easily included in Netlify apps.</li>\n</ul>\n<h2>Community</h2>\n<h3>Comments</h3>\n<ul>\n<li><a href=\"https://github.com/eduardoboucas/staticman\">Staticman</a> - Staticman is a Node.js application that receives user-generated content and uploads it as data files to a GitHub repository. In practice, this allows you to have dynamic content (e.g. blog post comments) as part of a fully static website, as long as your site automatically deploys on every push to GitHub, as seen on GitHub Pages, Netlify and others.</li>\n<li><a href=\"https://disqus.com/\">Disqus</a> - Easily embeddable comments with nested replies, multiple login methods, and email notifications.</li>\n<li><a href=\"https://developers.facebook.com/docs/plugins/comments\">Facebook Comments</a> - Embeddable comments for your site by Facebook.</li>\n<li><a href=\"http://www.intensedebate.com/\">IntenseDebate Comments</a> - Embeddable comments with nested replies, multiple login methods, and email notifications.</li>\n<li><a href=\"http://web.livefyre.com/apps/comments/\">LiveFyre</a> - Real-time comments, SEO-optimized, stocked with social features, and beautiful on both desktop and mobile.</li>\n<li><a href=\"http://embed.redditjs.com/\">Redditjs Embed Widget</a> - Embed Reddit comments on your site. If it hasn't been posted, it will show a link to encourage the user to submit.</li>\n<li><a href=\"https://muut.com/\">Muut.com</a> - Embeddable comments, forum and private messaging. A lot of functionality, but really low footprint left on your website.</li>\n<li><a href=\"https://github.com/imsun/gitment\">Gitment</a> - Comment system based on GitHub Issues, which can be used in the frontend without any server-side implementation.</li>\n<li><a href=\"https://github.com/laymonage/giscus\">giscus</a> - A comments widget built on GitHub Discussions.</li>\n</ul>\n<h3>Forms</h3>\n<h4>Really Simple Forms</h4>\n<ul>\n<li><a href=\"http://formspree.io/\">Formspree</a> - Receive emails from a form on your static website.</li>\n<li><a href=\"https://www.elformo.com/\">elFormo</a> - Simple form processing and response retrieval via email.</li>\n<li><a href=\"http://flipmail.co/\">Flipmail</a> - Simple form processing and response retrieval via email.</li>\n<li><a href=\"http://mailthis.to/\">MailThis</a> - Simple form submissions via email with optional attachments.</li>\n<li><a href=\"https://getsimpleform.com/\">Simple Form</a> - Simple forms with optional file attachments, email notifications, and online submission viewing.</li>\n<li><a href=\"https://github.com/stevensona/briskforms\">Brisk Forms</a> - Free form submission service emails you responses while keeping your email address private and is open source.</li>\n<li><a href=\"https://www.99inbound.com\">99 Inbound</a> - Form endpoint service with email/Slack notifications and third party app integrations (e.g. MailChimp)</li>\n<li><a href=\"http://getform.io/\">Getform</a> - Form backend platform for designers and developers, with email and integrations.</li>\n<li><a href=\"https://form.taxi/\">Form.taxi</a> - Backend to handle form submissions easily and reliably, with email notifications, file uploads and GDPR-compliant data processing.</li>\n</ul>\n<h4>Normal Forms</h4>\n<ul>\n<li><a href=\"https://formcarry.com\">Formcarry</a> - Hassle-free HTML form endpoints for your form, powerful dashboard, reliable spam blocking, attachment uploads and Zapier integrations.</li>\n<li><a href=\"https://formcake.com\">Formcake</a> - The form backend built for developers: Zapier integrations, simple endpoint API, unlimited forms.</li>\n<li><a href=\"https://www.google.com/forms/about/\">Google Forms</a> - Saves results into Google Sheets and can email you when there is a submission.</li>\n<li><a href=\"https://formkeep.com/\">FormKeep</a> - Paid - View form submissions in a beautiful web interface. It has spam filtering and it integrates with webhooks such as Gmail, Trello, and Basecamp.</li>\n<li><a href=\"http://www.123contactform.com/\">123 Contact Form</a> - Connects to other online services such at MailChimp, Salesforce, and Google Drive. It also integrates with payment Processers and includes security and analytics.</li>\n<li><a href=\"http://www.formassembly.com/\">FormAssembly</a> - Allows you to build any kind of form that can include complex branching logic and multiple pages.</li>\n<li><a href=\"https://www.formsite.com/\">FormSite</a> - Form builder with payments and form management.</li>\n<li><a href=\"https://www.formstack.com/\">FormStack</a> - Forms with A/B testing, partial submission, analytics, and integrations.</li>\n<li><a href=\"https://sheetsu.com/\">Sheetsu</a> - POST and GET your data to Google Spreadsheet.</li>\n<li><a href=\"http://www.typeform.com/\">Typeform</a> - Awesome forms that can be embedded.</li>\n<li><a href=\"http://www.wufoo.com/\">Wufoo</a> - Free or Paid - Forms that you can build with a form designer, with notifications, reports, and payments.</li>\n<li><a href=\"https://www.zoho.com/crm/help/web-forms/set-up-web-forms.html\">Zoho</a> - Forms with file upload and captcha.</li>\n<li><a href=\"https://help.github.com/articles/about-issues/\">GitHub Issues</a> - This is an interesting way for developers to get comments/questions. See <a href=\"https://github.com/sindresorhus/ama\">github.com/sindresorhus/ama</a> for an example.</li>\n<li><a href=\"https://github.com/utterance/utterances\">Utterences</a> - A lightweight comments widget built on GitHub issues.</li>\n<li><a href=\"https://www.formbackend.com\">FormBackend</a> - Create form-backends and submit your HTML forms to our backend. View the entries online and connect to other services. Receive an email every time a new entry is submitted.</li>\n<li><a href=\"https://pageclip.co\">Pageclip</a> - A flexible server / backend for HTML forms. View your data in the realtime web interface, or use the API to get CSV and JSON output.</li>\n<li><a href=\"https://www.formester.com\">Formester</a> - Forms and email marketing (lead collection, email campaigns, and newsletters) with integrations.</li>\n<li><a href=\"https://statickit.com\">StaticKit</a> - Modern forms for static sites, with native support for React.</li>\n<li><a href=\"https://sheetdb.io/\">SheetDB</a> - Turn a Google Spreadsheet into a JSON API.</li>\n</ul>\n<h4>Provided by the Host</h4>\n<ul>\n<li><a href=\"https://www.netlify.com/docs/form-handling/\">Netlify</a> - Netlify comes with built-in form handling.</li>\n</ul>\n<h3>Live Chat</h3>\n<ul>\n<li><a href=\"https://www.jivochat.com/\">jivochat</a> - JivoSite is a professional live chat for websites that was specifically designed to increase your online sales.</li>\n<li><a href=\"https://www.livechatinc.com/\">LiveChat</a> - Live chat on your website.</li>\n<li><a href=\"https://www.olark.com/\">Olark</a> - Live chat on your website. You can also see who's on your website and what they're doing.</li>\n<li><a href=\"https://snapengage.com/\">SnapEngage</a> - Live chat with integrations and custom styles.</li>\n<li><a href=\"https://www.tawk.to/\">tawk.co</a> - Lets you monitor and chat with visitors on your website.</li>\n<li><a href=\"https://www.websitealive.com/\">WebsiteAlive</a> - Live chat for your website &#x26; social networks.</li>\n<li><a href=\"https://www.zopim.com/\">Zopim</a> - Live chat with free trial.</li>\n</ul>\n<h3>Newsletters</h3>\n<ul>\n<li><a href=\"http://mailchimp.com/\">MailChimp</a> - Free email marketing. You can pay to add more features.</li>\n<li><a href=\"http://www.constantcontact.com/\">Constant Contact</a> - Email marketing with campaigns, autoresponders, and analytics.</li>\n<li><a href=\"http://www.aweber.com/\">AWeber</a> - Email marketing with campaigns, autoresponders, and analytics.</li>\n<li><a href=\"https://www.campaignmonitor.com/\">Campaign Monitor</a> - Email marketing with campaigns, autoresponders, and analytics.</li>\n<li><a href=\"https://www.mailerlite.com/\">MailerLite</a> - Free email marketing. You can pay for more subscribers.</li>\n</ul>\n<h3>Social Media</h3>\n<ul>\n<li><a href=\"https://developers.pinterest.com/\">Pinterest</a> - Pin It Button.</li>\n<li><a href=\"https://dev.twitter.com/web/embedded-tweets\">Twitter</a> - Embedded tweets.</li>\n<li><a href=\"https://developers.facebook.com/docs/plugins\">Facebook</a> - Facebook embedded plugins.</li>\n<li><a href=\"http://www.sharethis.com/\">ShareThis</a> - Sharing buttons for multiple social networks.</li>\n<li><a href=\"https://www.kontaktify.com/\">Kontaktify</a> - A contact widget that provides an easy way for visitors to get in touch.</li>\n</ul>\n<h3>Surveys</h3>\n<ul>\n<li><a href=\"https://www.google.co.nz/forms/about/\">Google Forms</a> - You can use Google forms for surveys or for forms on your site.</li>\n<li><a href=\"https://www.surveymonkey.com/\">SurveyMonkey</a> - Easy to use and free surveys.</li>\n<li><a href=\"http://www.typeform.com/\">Typeform</a> - Really beautiful forms.</li>\n<li><a href=\"https://qualaroo.com/\">Qualaroo</a> - Embed surveys anywhere on your website that comes up from the bottom right side of the screen.</li>\n<li><a href=\"https://insightstash.com/\">Insight Stash</a> - Fast, Simple survey forms.</li>\n</ul>\n<h2>E-Commerce</h2>\n<ul>\n<li><a href=\"https://www.ecwid.com/\">Ecwid</a> - Embeddable shopping cart.</li>\n<li><a href=\"http://www.foxycart.com/\">FoxyCart</a> - Add a shopping cart with basic html code.</li>\n<li><a href=\"https://snipcart.com/\">Snipcart</a> - Include a few lines of code for a full online shop.</li>\n<li><a href=\"https://gumroad.com/\">Gumroad</a> - An all-in-one solution to sell your work.</li>\n<li><a href=\"https://payhip.com/\">Payhip</a> - An embeddable way to sell digital downloads &#x26; memberships</li>\n<li><a href=\"https://moltin.com/\">Moltin</a> - Add eCommerce functionality to anything.</li>\n<li><a href=\"https://trolley.link/\">Trolley</a> - Add a popup cart to any website - designed for static &#x26; JAMstack sites.</li>\n<li><a href=\"https://commercelayer.io/\">Commerce Layer</a> - Add enterprise ecommerce to your JAMstack.</li>\n</ul>\n<h2>Payments</h2>\n<ul>\n<li><a href=\"https://www.moneybutton.com/\">MoneyButton</a> - Website payments and donations using Bitcoin (Satoshi's Vision).</li>\n<li><a href=\"https://info.shapeshift.io/tools/shifty-button\">ShapeShift Shifty Button</a> - Accept payments using various cryptocurrencies.</li>\n</ul>\n<h2>Search</h2>\n<p>Self-hosted:</p>\n<ul>\n<li><a href=\"http://lunrjs.com/\">lunr.js</a> - Simple full-text search in your browser.</li>\n<li><a href=\"https://github.com/itemsapi/itemsjs\">itemsjs</a> - Full text, faceted, almost dependency free search engine in javascript</li>\n<li><a href=\"https://github.com/lucaong/minisearch\">minisearch</a> - Tiny and powerful JavaScript full-text search engine for browser and Node</li>\n<li><a href=\"https://github.com/nextapps-de/flexsearch\">flexsearch</a> - Next-Generation full text search library for Browser and Node.js</li>\n<li><a href=\"https://fusejs.io/\">fuse.js</a> - Powerful, lightweight fuzzy-search library, with zero dependencies</li>\n<li><a href=\"https://github.com/dchest/static-search\">static-search</a> - A Go program to generate JSON index of HTML files, and a JavaScript component with optional UI to search this index</li>\n<li><a href=\"http://elasticlunr.com/docs/index.html\">elasticlunr</a> - Lightweight full-text search engine developed in JavaScript for browser search and offline search based on Lunr.js</li>\n<li><a href=\"https://github.com/tinysearch/tinysearch\">tinysearch</a> - Tiny, full-text search engine for static websites built with Rust and Wasm</li>\n<li><a href=\"https://www.npmjs.com/package/js-search\">js-search</a> - Client-side searches of JavaScript and JSON objects, ES5 compatible and does not require jQuery or any other third-party libraries</li>\n<li><a href=\"https://github.com/fergiemcdowall/search-index\">search-index</a> - A persistent, network resilient, full text search library for the browser and Node.js</li>\n<li><a href=\"https://github.com/bevacqua/fuzzysearch\">fuzzysearch</a> - Tiny and blazing-fast fuzzy search in JavaScript</li>\n<li><a href=\"https://github.com/mattyork/fuzzy\">fuzzy</a> - Fuzzy search / filter for browser and node</li>\n<li><a href=\"https://reyesr.github.io/fullproof/\">fullproof</a> - Javascript library that provides high-quality full-text search in the browser</li>\n<li><a href=\"https://jets.js.org/\">Jets.js</a> - Native CSS search engine</li>\n</ul>\n<p>Third party integration:</p>\n<ul>\n<li><a href=\"https://cse.google.com/cse/\">Google Custom Search Engine</a> - Search your site with a custom Google Search.</li>\n<li><a href=\"https://www.algolia.com/\">Algolia</a> - Hosted Search API that delivers instant and relevant results from the first keystroke.</li>\n<li><a href=\"https://cloudsh.com/\">CloudSh</a> - Powerful search for your website with a few lines of JavaScript.</li>\n</ul>\n<h2>Analytics</h2>\n<ul>\n<li><a href=\"http://www.google.com/analytics/\">Google Analytics</a> - Freemium web analytics service offered by Google.</li>\n<li><a href=\"https://simpleanalytics.io/\">Simple Analytics</a> - 💲 - Simple, clean, and friendly analytics.</li>\n</ul>\n<h2>Authentication</h2>\n<ul>\n<li><a href=\"https://uthentic.net\">Uthentic</a> - Serverless, passwordless login for static sites in 2 lines of code.</li>\n</ul>\n<h2>Other</h2>\n<ul>\n<li><a href=\"https://sketchfab.com/\">Sketch Fab</a> - Embeddable 3D content.</li>\n</ul>\n<h2>Related Lists</h2>\n<ul>\n<li><a href=\"https://github.com/b-long/awesome-static-hosting\">Awesome Static Hosting</a></li>\n<li><a href=\"https://github.com/staticwebdev/awesome-azure-static-web-apps\">Awesome Azure Static Web Apps</a></li>\n</ul>"},{"url":"/docs/reference/google-cloud/","relativePath":"docs/reference/google-cloud.md","relativeDir":"docs/reference","base":"google-cloud.md","name":"google-cloud","frontmatter":{"title":"Google Cloud","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<p>The gcloud command-line tool cheat sheet</p>\n<h2>The gcloud cheat sheet</h2>\n<p>A roster of go-to gcloud commands for the gcloud tool, Google Cloud's primary command-line tool.</p>\n<p>(Also included: <a href=\"https://cloud.google.com/sdk/docs/cheatsheet#introductory_primer\">introductory primer</a>, <a href=\"https://cloud.google.com/sdk/docs/cheatsheet#understanding_commands\">understanding commands</a>, and a <a href=\"https://cloud.google.com/sdk/docs/images/gcloud-cheat-sheet.pdf\">printable PDF</a>.)</p>\n<h2>Cheat sheet</h2>\n<h3>Getting started</h3>\n<p>Get going with the gcloud command-line tool.</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/init\">gcloud init</a>: Initialize, authorize, and configure the gcloud tool.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/version\">gcloud version</a>: Display version and installed components.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/components/install\">gcloud components install</a>: Install specific components.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/components/update\">gcloud components update</a>: Update your Cloud SDK to the latest version.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/set\">gcloud config set project</a>: Set a default Google Cloud project to work on.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/info\">gcloud info</a>: Display current gcloud tool environment details.</li>\n</ul>\n<h3>Help</h3>\n<p>Cloud SDK is happy to help.</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/help\">gcloud help</a>: Search the gcloud tool reference documents for specific terms.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/feedback\">gcloud feedback</a>: Provide feedback for the Cloud SDK team.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/topic\">gcloud topic</a>: Supplementary help material for non-command topics like accessibility, filtering, and formatting.</li>\n</ul>\n<h3>Personalization</h3>\n<p>Make the Cloud SDK your own; personalize your configuration with properties.</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/set\">gcloud config set</a>: Define a property (like compute/zone) for the current configuration.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/get-value\">gcloud config get-value</a>: Fetch value of a Cloud SDK property.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/list\">gcloud config list</a>: Display all the properties for the current configuration.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/configurations/create\">gcloud config configurations create</a>: Create a new named configuration.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/configurations/list\">gcloud config configurations list</a>: Display a list of all available configurations.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/config/configurations/activate\">gcloud config configurations activate</a>: Switch to an existing named configuration.</li>\n</ul>\n<h3>Credentials</h3>\n<p>Grant and revoke authorization to Cloud SDK</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/auth/login\">gcloud auth login</a>: Authorize Google Cloud access for the gcloud tool with Google user credentials and set current account as active.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account\">gcloud auth activate-service-account</a>: Like gcloud auth login but with service account credentials.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/auth/list\">gcloud auth list</a>: List all credentialed accounts.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/auth/print-access-token\">gcloud auth print-access-token</a>: Display the current account's access token.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/auth/revoke\">gcloud auth revoke</a>: Remove access credentials for an account.</li>\n</ul>\n<h3>Projects</h3>\n<p>Manage project access policies</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/projects/describe\">gcloud projects describe</a>: Display metadata for a project (including its ID).</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/projects/add-iam-policy-binding\">gcloud projects add-iam-policy-binding</a>: Add an IAM policy binding to a specified project.</li>\n</ul>\n<h3>Identity &#x26; Access Management</h3>\n<p>Configuring Cloud Identity &#x26; Access Management (IAM) preferences and service accounts</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/iam/list-grantable-roles\">gcloud iam list-grantable-roles</a>: List IAM grantable roles for a resource.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/iam/roles/create\">gcloud iam roles create</a>: Create a custom role for a project or org.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/create\">gcloud iam service-accounts create</a>: Create a service account for a project.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/add-iam-policy-binding\">gcloud iam service-accounts add-iam-policy-binding</a>: Add an IAM policy binding to a service account.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/set-iam-policy\">gcloud iam service-accounts set-iam-policy-binding</a>: Replace existing IAM policy binding.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/keys/list\">gcloud iam service-accounts keys list</a>: List a service account's keys.</li>\n</ul>\n<h3>Docker &#x26; Google Kubernetes Engine (GKE)</h3>\n<p>Manage containerized applications on Kubernetes</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/auth/configure-docker\">gcloud auth configure-docker</a>: Register the gcloud tool as a Docker credential helper.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/container/clusters/create\">gcloud container clusters create</a>: Create a cluster to run GKE containers.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/container/clusters/list\">gcloud container clusters list</a>: List clusters for running GKE containers.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials\">gcloud container clusters get-credentials</a>: Update kubeconfig to get kubectl to use a GKE cluster.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/container/images/list-tags\">gcloud container images list-tags</a>: List tag and digest metadata for a container image.</li>\n</ul>\n<h3>Virtual Machines &#x26; Compute Engine</h3>\n<p>Create, run, and manage VMs on Google infrastructure</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/zones/list\">gcloud compute zones list</a>: List Compute Engine zones.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/instances/describe\">gcloud compute instances describe</a>: Display a VM instance's details.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/instances/list\">gcloud compute instances list</a>: List all VM instances in a project.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/disks/snapshot\">gcloud compute disks snapshot</a>: Create snapshot of persistent disks.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/snapshots/describe\">gcloud compute snapshots describe</a>: Display a snapshot's details.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/snapshots/delete\">gcloud compute snapshots delete</a>: Delete a snapshot.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/compute/ssh\">gcloud compute ssh</a>: Connect to a VM instance by using SSH.</li>\n</ul>\n<h3>Serverless &#x26; App Engine</h3>\n<p>Build highly scalable applications on a fully managed serverless platform</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/app/deploy\">gcloud app deploy</a>: Deploy your app's code and configuration to the App Engine server.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/app/versions/list\">gcloud app versions list</a>: List all versions of all services deployed to the App Engine server.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/app/browse\">gcloud app browse</a>: Open the current app in a web browser.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/app/create\">gcloud app create</a>: Create an App Engine app within your current project.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/app/logs/read\">gcloud app logs read</a>: Display the latest App Engine app logs.</li>\n</ul>\n<h3>Miscellaneous</h3>\n<p>Commands that might come in handy</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/kms/decrypt\">gcloud kms decrypt</a>: Decrypt ciphertext (to a plaintext file) using a Cloud Key Management Service (Cloud KMS) key.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/logging/logs/list\">gcloud logging logs list</a>: List your project's logs.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/sql/backups/describe\">gcloud sql backups describe</a>: Display info about a Cloud SQL instance backup.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference/sql/export/sql\">gcloud sql export sql</a>: Export data from a Cloud SQL instance to a SQL file.</li>\n</ul>\n<h2>Introductory primer</h2>\n<p>A quick primer for getting started with the gcloud command-line tool.</p>\n<h3>Installing the Cloud SDK</h3>\n<p>Install the Cloud SDK with these <a href=\"https://cloud.google.com/sdk/docs/install\">installation instructions</a>.</p>\n<h3>Flags, arguments, and other wondrous additions</h3>\n<p>Arguments can be Positional args or Flags</p>\n<ul>\n<li><strong>Positional args:</strong> Set after command name; must respect order of positional args.</li>\n<li>\n<p><strong>Flags:</strong> Set after positional args; order of flags doesn't matter.</p>\n<p>A flag can be either a:</p>\n<ul>\n<li><em>Name-value pair</em> (--foo=bar), or</li>\n<li><em>Boolean</em> (--force/no-force).</li>\n</ul>\n<p>Additionally, flags can either be:</p>\n<ul>\n<li><em>Required</em></li>\n<li><em>Optional:</em> in which case, the default value is used, if the flag is not defined</li>\n</ul>\n</li>\n</ul>\n<h3>Global flags</h3>\n<p>Some flags are available throughout the gcloud command-line tool experience, like:</p>\n<ul>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference#--help\">--help</a>: For when in doubt; display detailed help for a command.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference#--project\">--project</a>: If using a project other than the current one.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference#--quiet\">--quiet</a>: Disabling interactive prompting (and applying default values for inputs).</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference#--verbosity\">--verbosity</a>: Can set verbosity levels at debug, info, warning, error, critical, and none.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference#--version\">--version</a>: Display gcloud version information.</li>\n<li><a href=\"https://cloud.google.com/sdk/gcloud/reference#--format\">--format</a>: Set output format as config, csv, default, diff, disable, flattened, get, json, list, multi, none, object, table, text, value, or yaml.</li>\n</ul>\n<h3>Cleaning up results</h3>\n<p>Extricate the most from your output with the <a href=\"https://cloud.google.com/sdk/gcloud/reference/topic/filters\">filter</a>, <a href=\"https://cloud.google.com/sdk/gcloud/reference/topic/formats\">format</a>, limit, and sort-by flags.</p>\n<p>For Compute Engine instances with prefix us and not machine type f1-micro:</p>\n<p>For a list of projects created on or after 15 January 2018, sorted from oldest to newest, presented as a table with project number, project id and creation time columns with dates and times in local timezone:</p>\n<p>For a list of ten Compute Engine instances with a label my-label (of any value):</p>\n<h2>Understanding commands</h2>\n<p>The underlying patterns for gcloud commands; to aid self-discovery of commands.</p>\n<h3>Finding gcloud commands</h3>\n<p>The gcloud command-line tool is a tree; non-leaf nodes are command groups and leaf nodes are commands. (Also, tab completion works for commands and resources!)</p>\n<p>Most gcloud commands follow the following format:</p>\n<p>For example: gcloud + compute + instances + create + example-instance-1 + --zone=us-central1-a</p>\n<h4>Release level</h4>\n<p><em>Release Level</em> refers to the command's release status.</p>\n<p><em>Example:</em> alpha for alpha commands, beta for beta commands, no release level needed for GA commands.</p>\n<h4>Component</h4>\n<p><em>Component</em> refers to the different Google Cloud services.</p>\n<p><em>Example:</em> compute for Compute Engine, app for App Engine, etc.</p>\n<h4>Entity</h4>\n<p><em>Entity</em> refers to the plural form of an element or collection of elements under a component.</p>\n<p><em>Example:</em> disks, firewalls, images, instances, regions, zones for compute</p>\n<h4>Operation</h4>\n<p><em>Operation</em> refers to the imperative verb form of the operation to be performed on the entity.</p>\n<p><em>Example:</em> Common operations are describe, list, create/update, delete/clear, import, export, copy, remove, add, reset, restart, restore, run, and deploy.</p>\n<h4>Positional args</h4>\n<p><em>Positional args</em> refer to the required, order-specific arguments needed to execute the command.</p>\n<p><em>Example:</em> &#x3C;INSTANCE_NAMES> is the required positional argument for gcloud compute instances create.</p>\n<h4>Flags</h4>\n<p><em>Flags</em> refer to the additional arguments, --flag-name(=value), passed in to the command after positional args.</p>\n<p><em>Example:</em> --machine-type=&#x3C;MACHINE_TYPE> and --preemptible are optional flags for gcloud compute instances create.</p>"},{"url":"/docs/reference/bash-commands/","relativePath":"docs/reference/bash-commands.md","relativeDir":"docs/reference","base":"bash-commands.md","name":"bash-commands","frontmatter":{"title":"Bash-Commands","weight":0,"seo":{"title":"Bash-Commands","description":"This is the Bash-Commands page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Bash-Commands","keyName":"property"},{"name":"og:description","value":"This is the Bash-Commands page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Bash-Commands"},{"name":"twitter:description","value":"This is the Bash-Commands page"}]},"template":"docs"},"html":"<h2>My Commands:</h2>\n<h4>Find:</h4>\n<h1>To find files by case-insensitive extension (ex: .jpg, .JPG, .jpG):</h1>\n<p>find . -iname \"*.jpg\"</p>\n<h1>To find directories:</h1>\n<p>find . -type d</p>\n<h1>To find files:</h1>\n<p>find . -type f</p>\n<h1>To find files by octal permission:</h1>\n<p>find . -type f -perm 777</p>\n<h1>To find files with setuid bit set:</h1>\n<p>find . -xdev ( -perm -4000 ) -type f -print0 | xargs -0 ls -l</p>\n<h1>To find files with extension '.txt' and remove them:</h1>\n<p>find ./path/ -name '*.txt' -exec rm '{}' ;</p>\n<h1>To find files with extension '.txt' and look for a string into them:</h1>\n<p>find ./path/ -name '*.txt' | xargs grep 'string'</p>\n<h1>To find files with size bigger than 5 Mebibyte and sort them by size:</h1>\n<p>find . -size +5M -type f -print0 | xargs -0 ls -Ssh | sort -z</p>\n<h1>To find files bigger than 2 Megabyte and list them:</h1>\n<p>find . -type f -size +200000000c -exec ls -lh {} ; | awk '{ print $9 \": \" $5 }'</p>\n<h1>To find files modified more than 7 days ago and list file information:</h1>\n<p>find . -type f -mtime +7d -ls</p>\n<h1>To find symlinks owned by a user and list file information:</h1>\n<p>find . -type l -user <username-or-userid> -ls</p>\n<h1>To search for and delete empty directories:</h1>\n<p>find . -type d -empty -exec rmdir {} ;</p>\n<h1>To search for directories named build at a max depth of 2 directories:</h1>\n<p>find . -maxdepth 2 -name build -type d</p>\n<h1>To search all files who are not in .git directory:</h1>\n<p>find . ! -iwholename '<em>.git</em>' -type f</p>\n<h1>To find all files that have the same node (hard link) as MY<em>FILE</em>HERE:</h1>\n<p>find . -type f -samefile MY<em>FILE</em>HERE 2>/dev/null</p>\n<h1>To find all files in the current directory and modify their permissions:</h1>\n<p>find . -type f -exec chmod 644 {} ;</p>\n<hr>\n<h1>1. Remove spaces from file and folder names and then remove numbers from files and folder names....</h1>\n<h3>Description: need to : <code>sudo apt install rename</code></h3>\n<blockquote>\n<p>Notes: Issue when renaming file without numbers collides with existing file name...</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"* *\" -type d | rename 's/ /_/g'   \nfind . -name \"* *\" -type f | rename 's/ /_/g'\n</code></pre>\n<pre><code class=\"language-sh\">```sh\nfind $dir -type f | sed 's|\\(.*/\\)[^A-Z]*\\([A-Z].*\\)|mv \\\"&#x26;\\\" \\\"\\1\\2\\\"|' | sh\n\nfind $dir -type d | sed 's|\\(.*/\\)[^A-Z]*\\([A-Z].*\\)|mv \\\"&#x26;\\\" \\\"\\1\\2\\\"|' | sh\n\nfor i in *.html; do mv \"$i\" \"${i%-*}.html\"; done\n\nfor i in *.*; do mv \"$i\" \"${i%-*}.${i##*.}\"; done\n\n---\n### Description: combine the contents of every file in the contaning directory.\n\n\n>Notes: this includes the contents of the file it's self...\n\n\n###### code:\n\n\n```js\n//APPEND-DIR.js\nconst fs = require('fs');\nlet cat = require('child_process')\n  .execSync('cat *')\n  .toString('UTF-8');\nfs.writeFile('output.md', cat, err => {\n  if (err) throw err;\n});\n</code></pre>\n<hr>\n<h1>2. Download Website Using Wget:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:       ==>     sudo apt install wget</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://bootcamp42.gitbook.io/python/\n</code></pre>\n<hr>\n<h1>3. Clean Out Messy Git Repo:</h1>\n<h3>Description: recursively removes git related folders as well as internal use files / attributions in addition to empty folders</h3>\n<blockquote>\n<p>Notes:   To clear up clutter in repositories that only get used on your local machine.</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -empty -type d -print -delete        \n\n\nfind . \\( -name \".git\" -o -name \".gitignore\" -o -name \".gitmodules\" -o -name \".gitattributes\" \\) -exec rm -rf -- {} +\n\n\nfind . \\( -name \"*SECURITY.txt\" -o -name \"*RELEASE.txt\" -o  -name \"*CHANGELOG.txt\" -o -name \"*LICENSE.txt\" -o -name \"*CONTRIBUTING.txt\" -name \"*HISTORY.md\" -o -name \"*LICENSE\" -o -name \"*SECURITY.md\" -o -name \"*RELEASE.md\" -o  -name \"*CHANGELOG.md\" -o -name \"*LICENSE.md\" -o -name \"*CODE_OF_CONDUCT.md\" -o -name \"*CONTRIBUTING.md\" \\) -exec rm -rf -- {} +\n</code></pre>\n<hr>\n<h1>4. clone all of a user's git repositories</h1>\n<h3>Description: clone all of a user or organization's git  repositories.</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<h1>Generalized:</h1>\n<pre><code class=\"language-sh\">CNTX={users|orgs}; NAME={username|orgname}; PAGE=1\ncurl \"https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&#x26;per_page=100\" |\n  grep -e 'git_url*' |\n  cut -d \\\" -f 4 |\n  xargs -L1 git clone\n</code></pre>\n<h1>Clone all Git User</h1>\n<pre><code class=\"language-sh\">CNTX={users}; NAME={bgoonz}; PAGE=1\ncurl \"https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&#x26;per_page=200\"?branch=master |\n  grep -e 'git_url*' |\n  cut -d \\\" -f 4 |\n  xargs -L1 git clone\n</code></pre>\n<h1>Clone all Git Organization:</h1>\n<pre><code class=\"language-sh\">CNTX={organizations}; NAME={TheAlgorithms}; PAGE=1\ncurl \"https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&#x26;per_page=200\"?branch=master |\n  grep -e 'git_url*' |\n  cut -d \\\" -f 4 |\n  xargs -L1 git clone\n</code></pre>\n<hr>\n<h1>5. Git Workflow</h1>\n<h3>Description:</h3>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git pull\ngit init\ngit add .\ngit commit -m\"update\"\ngit push -u origin master\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin main\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin bryan-guner\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin gh-pages\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin preview\n</code></pre>\n<hr>\n<h1>6. Recursive Unzip In Place</h1>\n<h3>Description: recursively unzips folders and then deletes the zip file by the same name.</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"*.zip\" | while read filename; do unzip -o -d \"`dirname \"$filename\"`\" \"$filename\"; done;\n\n\n\nfind . -name \"*.zip\" -type f -print -delete\n</code></pre>\n<hr>\n<h1>7. git pull keeping local changes:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git stash\ngit pull\ngit stash pop\n</code></pre>\n<hr>\n<h1>8. Prettier Code Formatter:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo npm i prettier -g\n\nprettier --write .\n</code></pre>\n<hr>\n<h1>9.  Pandoc</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find ./ -iname \"*.md\" -type f -exec sh -c 'pandoc --standalone \"${0}\" -o \"${0%.md}.html\"' {} \\;\n\n\n\nfind ./ -iname \"*.html\" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict \"${0}\" -o \"${0%.html}.md\"' {} \\;\n\n\n\nfind ./ -iname \"*.docx\" -type f -exec sh -c 'pandoc \"${0}\" -o \"${0%.docx}.md\"' {} \\;\n</code></pre>\n<hr>\n<h1>10. Gitpod Installs</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo apt install tree \nsudo apt install pandoc -y\nsudo apt install rename -y\nsudo apt install black -y\nsudo apt install wget -y\nnpm i lebab -g\nnpm i prettier -g\nnpm i npm-recursive-install -g\n</code></pre>\n<pre><code class=\"language-sh\">black .\n\nprettier --write .\nnpm-recursive-install\n</code></pre>\n<hr>\n<h1>11. Repo Utils Package:</h1>\n<h3>Description: my standard repo utis package</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">npm i @bgoonz11/repoutils\n</code></pre>\n<hr>\n<h1>12.  Unix Tree Package Usage:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">tree -d -I  'node_modules'\n\ntree  -I  'node_modules'\n\ntree -f  -I  'node_modules' >TREE.md\n\ntree -f -L 2  >README.md\n\ntree -f  -I  'node_modules' >listing-path.md\n\n\ntree -f  -I  'node_modules' -d >TREE.md\n\ntree -f >README.md\n</code></pre>\n<hr>\n<h1>13. Find &#x26; Replace string in file &#x26; folder names recursively..</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -type f -exec rename 's/string1/string2/g' {} +\n\n\nfind . -type d -exec rename 's/-master//g' {} +\n\n\nfind . -type f -exec rename 's/\\.download//g' {} +\n\n\n\n\nfind . -type d -exec rename 's/-main//g' {} +\n\n\n\nrename 's/\\.js\\.download$/.js/' *.js\\.download \n\n\nrename 's/\\.html\\.markdown$/.md/' *.html\\.markdown \n\n\nfind . -type d -exec rename 's/es6//g' {} +\n</code></pre>\n<hr>\n<h1>14. Remove double extensions :</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/bash\n\nfor file in *.md.md\ndo\n    mv \"${file}\" \"${file%.md}\"\ndone\n\n#!/bin/bash\n\nfor file in *.html.html\ndo\n    mv \"${file}\" \"${file%.html}\"\ndone\n</code></pre>\n<pre><code class=\"language-sh\">#!/bin/bash\n\nfor file in *.html.png\ndo\n    mv \"${file}\" \"${file%.png}\"\ndone\n\nfor file in *.jpg.jpg\ndo\n    mv \"${file}\" \"${file%.png}\"\ndone\n</code></pre>\n<hr>\n<h1>15. Truncate folder names down to 12 characters:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">for d in ./*; do mv $d ${d:0:12}; done\n</code></pre>\n<hr>\n<h1>16.Appendir.js</h1>\n<h3>Description: combine the contents of every file in the contaning directory.</h3>\n<blockquote>\n<p>Notes: this includes the contents of the file it's self...</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-js\">//APPEND-DIR.js\nconst fs = require('fs');\nlet cat = require('child_process')\n  .execSync('cat *')\n  .toString('UTF-8');\nfs.writeFile('output.md', cat, err => {\n  if (err) throw err;\n});\n</code></pre>\n<hr>\n<h1>17. Replace space in filename with underscore</h1>\n<h3>Description: followed by replace <code>'#' with '_'</code> in directory name</h3>\n<blockquote>\n<p>Notes: Can be re-purposed to find and replace any set of strings in file or folder names. </p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"* *\" -type f | rename 's/_//g'\n\nfind . -name \"* *\" -type d | rename 's/#/_/g'   \n</code></pre>\n<hr>\n<h1>18. Filter &#x26; delete files by name and extension</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name '.bin' -type d -prune -exec rm -rf '{}' +\n\nfind . -name '*.html' -type d -prune -exec rm -rf '{}' +\n\nfind . -name 'nav-index' -type d -prune -exec rm -rf '{}' +\n\nfind . -name 'node-gyp' -type d -prune -exec rm -rf '{}' +\n\nfind . -name 'deleteme.txt' -type f -prune -exec rm -rf '{}' +\n\nfind . -name 'right.html' -type f -prune -exec rm -rf '{}' +\n\nfind . -name 'left.html' -type f -prune -exec rm -rf '{}' +\n</code></pre>\n<hr>\n<h1>19. Remove lines containing string:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes: Remove lines not containing <code>'.js'</code></p>\n</blockquote>\n<pre><code class=\"language-sh\">sudo sed -i '/\\.js/!d' ./*scrap2.md\n</code></pre>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo sed -i '/githubusercontent/d' ./*sandbox.md\n\n\nsudo sed -i '/githubusercontent/d' ./*scrap2.md\n\n\n\nsudo sed -i '/github\\.com/d' ./*out.md\n\n\nsudo sed -i '/author/d' ./*\n</code></pre>\n<hr>\n<h1>20. Remove duplicate lines from a text file</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:\n//...syntax of uniq...//\n$uniq [OPTION] [INPUT[OUTPUT]]\nThe syntax of this is quite easy to understand. Here, INPUT refers to the input file in which repeated lines need to be filtered out and if INPUT isn’t specified then uniq reads from the standard input. OUTPUT refers to the output file in which you can store the filtered output generated by uniq command and as in case of INPUT if OUTPUT isn’t specified then uniq writes to the standard output. </p>\n</blockquote>\n<p>Now, let’s understand the use of this with the help of an example. Suppose you have a text file named kt.txt which contains repeated lines that needs to be omitted. This can simply be done with uniq. </p>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo apt install uniq\nuniq -u input.txt output.txt\n</code></pre>\n<hr>\n<h1>21. Remove lines containing string:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo sed -i '/githubusercontent/d' ./*sandbox.md\n\n\nsudo sed -i '/githubusercontent/d' ./*scrap2.md\n\n\nsudo sed -i '/github\\.com/d' ./*out.md\n\n---\ntitle: add_days\ntags: date,intermediate\nfirstSeen: 2020-10-28T16:19:04+02:00\nlastUpdated: 2020-10-28T16:19:04+02:00\n---\n\nsudo sed -i '/title:/d' ./*output.md\nsudo sed -i '/firstSeen/d' ./*output.md\nsudo sed -i '/lastUpdated/d' ./*output.md\nsudo sed -i '/tags:/d' ./*output.md\n\nsudo sed -i '/badstring/d' ./*\n\n\nsudo sed -i '/stargazers/d' ./repo.txt\nsudo sed -i '/node_modules/d' ./index.html\nsudo sed -i '/right\\.html/d' ./index.html\nsudo sed -i '/right\\.html/d' ./right.html\n</code></pre>\n<hr>\n<h1>22. Zip directory excluding .git and node_modules all the way down (Linux)</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/bash\nTSTAMP=`date '+%Y%m%d-%H%M%S'`\nzip -r $1.$TSTAMP.zip $1 -x \"**.git/*\" -x \"**node_modules/*\" `shift; echo $@;`\n\nprintf \"\\nCreated: $1.$TSTAMP.zip\\n\"\n\n# usage: \n# - zipdir thedir\n# - zip thedir -x \"**anotherexcludedsubdir/*\"    (important the double quotes to prevent glob expansion)\n\n# if in windows/git-bash, add 'zip' command this way: \n# https://stackoverflow.com/a/55749636/1482990\n</code></pre>\n<hr>\n<h1>23. Delete files containing a certain string:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . | xargs grep -l www.redhat.com | awk '{print \"rm \"$1}' > doit.sh\nvi doit.sh // check for murphy and his law\nsource doit.sh\n</code></pre>\n<hr>\n<h1>24.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/sh\n\n# find ./ | grep -i \"\\.*$\" >files\nfind ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i \"\\.*$\">files\nlisting=\"files\"\n\nout=\"\"\n\nhtml=\"sitemap.html\"\nout=\"basename $out.html\"\nhtml=\"sitemap.html\"\ncmd() {\n\n  echo '  &#x3C;!DOCTYPE html>'\n  echo '&#x3C;html>'\n  echo '&#x3C;head>'\n\n  echo '  &#x3C;meta http-equiv=\"Content-Type\" content=\"text/html\">'\n\n  echo '  &#x3C;meta name=\"Author\" content=\"Bryan Guner\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"./assets/prism.css\">'\n  echo ' &#x3C;link rel=\"stylesheet\" href=\"./assets/style.css\">'\n  echo ' &#x3C;script async defer src=\"./assets/prism.js\">&#x3C;/script>'\n\n  echo \"  &#x3C;title> directory &#x3C;/title>\"\n    echo '&#x3C;link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/mdn-article.css\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/markdown-to-html-style.css\">'\n  echo \"\"\n  echo '&#x3C;style>'\n\n\necho '    a {'\necho '      color: black;'\necho '    }'\necho ''\necho '    li {'\necho '      border: 1px solid black !important;'\necho '      font-size: 20px;'\necho '      letter-spacing: 0px;'\necho '      font-weight: 700;'\necho '      line-height: 16px;'\necho '      text-decoration: none !important;'\necho '      text-transform: uppercase;'\necho '      background: #194ccdaf !important;'\necho '      color: black !important;'\necho '      border: none;'\necho '      cursor: pointer;'\necho '      justify-content: center;'\necho '      padding: 30px 60px;'\necho '      height: 48px;'\necho '      text-align: center;'\necho '      white-space: normal;'\necho '      border-radius: 10px;'\necho '      min-width: 45em;'\necho '      padding: 1.2em 1em 0;'\necho '      box-shadow: 0 0 5px;'\necho '      margin: 1em;'\necho '      display: grid;'\necho '      -webkit-border-radius: 10px;'\necho '      -moz-border-radius: 10px;'\necho '      -ms-border-radius: 10px;'\necho '      -o-border-radius: 10px;'\necho '    }'\necho '  &#x3C;/style>'\n  echo '&#x3C;/head>'\n\n  echo '&#x3C;body>'\n\n  echo \"\"\n\n  # continue with the HTML stuff\n\n  echo \"\"\n\n  echo \"\"\n\n  echo \"&#x3C;ul>\"\n\n  awk '{print \"&#x3C;li>&#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x26;nbsp;&#x3C;/a>&#x3C;/li>\"}' $listing\n\n  # awk '{print \"&#x3C;li>\"};\n\n  #     {print \" &#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x3C;/a>&#x3C;/li>&#x26;nbsp;\"}' \\ $listing\n\n  echo \"\"\n\n  echo \"&#x3C;/ul>\"\n\n  echo \"&#x3C;/body>\"\n\n  echo \"&#x3C;/html>\"\n\n}\n\ncmd $listing --sort=extension >>$html\n</code></pre>\n<hr>\n<h1>25. Index of Iframes</h1>\n<h3>Description: Creates an index.html file that contains all the files in the working directory or any of it's sub folders as iframes instead of anchor tags.</h3>\n<blockquote>\n<p>Notes: Useful Follow up Code:</p>\n</blockquote>\n<pre><code class=\"language-sh\"></code></pre>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/sh\n\n# find ./ | grep -i \"\\.*$\" >files\nfind ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i \"\\.*$\">files\nlisting=\"files\"\n\nout=\"\"\n\nhtml=\"index.html\"\nout=\"basename $out.html\"\nhtml=\"index.html\"\ncmd() {\n\n  echo '  &#x3C;!DOCTYPE html>'\n  echo '&#x3C;html>'\n  echo '&#x3C;head>'\n\n  echo '  &#x3C;meta http-equiv=\"Content-Type\" content=\"text/html\">'\n\n  echo '  &#x3C;meta name=\"Author\" content=\"Bryan Guner\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"./assets/prism.css\">'\n  echo ' &#x3C;link rel=\"stylesheet\" href=\"./assets/style.css\">'\n  echo ' &#x3C;script async defer src=\"./assets/prism.js\">&#x3C;/script>'\n\n  echo \"  &#x3C;title> directory &#x3C;/title>\"\n\n  echo \"\"\n  echo '&#x3C;style>'\n\n\necho '    a {'\necho '      color: black;'\necho '    }'\necho ''\necho '    li {'\necho '      border: 1px solid black !important;'\necho '      font-size: 20px;'\necho '      letter-spacing: 0px;'\necho '      font-weight: 700;'\necho '      line-height: 16px;'\necho '      text-decoration: none !important;'\necho '      text-transform: uppercase;'\necho '      background: #194ccdaf !important;'\necho '      color: black !important;'\necho '      border: none;'\necho '      cursor: pointer;'\necho '      justify-content: center;'\necho '      padding: 30px 60px;'\necho '      height: 48px;'\necho '      text-align: center;'\necho '      white-space: normal;'\necho '      border-radius: 10px;'\necho '      min-width: 45em;'\necho '      padding: 1.2em 1em 0;'\necho '      box-shadow: 0 0 5px;'\necho '      margin: 1em;'\necho '      display: grid;'\necho '      -webkit-border-radius: 10px;'\necho '      -moz-border-radius: 10px;'\necho '      -ms-border-radius: 10px;'\necho '      -o-border-radius: 10px;'\necho '    }'\necho '  &#x3C;/style>'\n  echo '&#x3C;/head>'\n\n  echo '&#x3C;body>'\n\n  echo \"\"\n\n  # continue with the HTML stuff\n\n  echo \"\"\n\n  echo \"\"\n\n  echo \"&#x3C;ul>\"\n\n  awk '{print \"&#x3C;iframe src=\\\"\"$1\"\\\">\",\"&#x3C;/iframe>\"}' $listing\n\n  # awk '{print \"&#x3C;li>\"};\n\n  #     {print \" &#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x3C;/a>&#x3C;/li>&#x26;nbsp;\"}' \\ $listing\n\n  echo \"\"\n\n  echo \"&#x3C;/ul>\"\n\n  echo \"&#x3C;/body>\"\n\n  echo \"&#x3C;/html>\"\n\n}\n\ncmd $listing --sort=extension >>$html\n</code></pre>\n<hr>\n<h1>26. Filter Corrupted Git Repo For Troublesome File:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD\n</code></pre>\n<hr>\n<h1>27.  OVERWRITE LOCAL CHANGES:</h1>\n<h3>Description:</h3>\n<p>Important: If you have any local changes, they will be lost. With or without --hard option, any local commits that haven't been pushed will be lost.[*]\nIf you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected.</p>\n<blockquote>\n<p>Notes:\nFirst, run a fetch to update all origin/<branch> refs to latest:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git fetch --all\n# Backup your current branch:\n\ngit branch backup-master\n# Then, you have two options:\n\ngit reset --hard origin/master\n# OR If you are on some other branch:\n\ngit reset --hard origin/&#x3C;branch_name>\n# Explanation:\n# git fetch downloads the latest from remote without trying to merge or rebase anything.\n\n# Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master\ngit fetch --all\ngit reset --hard origin/master\n</code></pre>\n<hr>\n<h1>28. Remove Submodules:</h1>\n<h3>Description: To remove a submodule you need to:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<blockquote>\n<p>Delete the relevant section from the .gitmodules file.\nStage the .gitmodules changes git add .gitmodules\nDelete the relevant section from .git/config.\nRun git rm --cached path<em>to</em>submodule (no trailing slash).\nRun rm -rf .git/modules/path<em>to</em>submodule (no trailing slash).\nCommit git commit -m \"Removed submodule \"\nDelete the now untracked submodule files rm -rf path<em>to</em>submodule</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git submodule deinit\n</code></pre>\n<hr>\n<h1>29. GET GISTS</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo apt install wget\n\n\n\nwget -q -O - https://api.github.com/users/bgoonz/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n3 wget\n\n\nwget -q -O - https://api.github.com/users/amitness/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n3 wget\n\n\nwget -q -O - https://api.github.com/users/drodsou/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n1 wget\n\nwget -q -O - https://api.github.com/users/thomasmb/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n1 wget\n</code></pre>\n<hr>\n<h1>30. Remove Remote OriginL</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git remote remove origin\n</code></pre>\n<hr>\n<h1>31. just clone .git folder:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git clone --bare --branch=master --single-branch https://github.com/bgoonz/My-Web-Dev-Archive.git\n</code></pre>\n<hr>\n<h1>32. Undo recent pull request:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git reset --hard master@{\"10 minutes ago\"}\n</code></pre>\n<hr>\n<h1>33. Lebab</h1>\n<h3>Description: ES5 --> ES6</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"># Safe:\n\n lebab --replace ./ --transform arrow\n lebab --replace ./ --transform arrow-return\n lebab --replace ./ --transform for-of\n lebab --replace ./ --transform for-each\n lebab --replace ./ --transform arg-rest\n lebab --replace ./ --transform arg-spread\n lebab --replace ./ --transform obj-method\n lebab --replace ./ --transform obj-shorthand\n lebab --replace ./ --transform multi-var\n\n\n# ALL:\n\n\nlebab --replace ./ --transform obj-method\nlebab --replace ./ --transform class\nlebab --replace ./ --transform arrow\nlebab --replace ./ --transform let\nlebab --replace ./ --transform arg-spread\nlebab --replace ./ --transform arg-rest\nlebab --replace ./ --transform for-each\nlebab --replace ./ --transform for-of\nlebab --replace ./ --transform commonjs \nlebab --replace ./ --transform exponent\nlebab --replace ./ --transform multi-var\nlebab --replace ./ --transform template\nlebab --replace ./ --transform default-param\nlebab --replace ./ --transform  destruct-param \nlebab --replace ./ --transform includes\nlebab --replace ./ --transform obj-method\nlebab --replace ./ --transform class\nlebab --replace ./ --transform arrow\nlebab --replace ./ --transform arg-spread\nlebab --replace ./ --transform arg-rest\nlebab --replace ./ --transform for-each\nlebab --replace ./ --transform for-of\nlebab --replace ./ --transform commonjs \nlebab --replace ./ --transform exponent\nlebab --replace ./ --transform multi-var\nlebab --replace ./ --transform template\nlebab --replace ./ --transform default-param\nlebab --replace ./ --transform  destruct-param \nlebab --replace ./ --transform includes\n</code></pre>\n<hr>\n<h1>34. Troubleshoot Ubuntu Input/Output Error</h1>\n<h3>Description: Open Powershell as Administrator...</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-ps1\"> wsl.exe --shutdown\n\n Get-Service LxssManager | Restart-Service\n</code></pre>\n<hr>\n<h1>35. Export Medium as Markdown</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">npm i mediumexporter -g\n\n\nmediumexporter https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4 >ds.md\n</code></pre>\n<hr>\n<h1>36. Delete files in violation of a given size range (100MB for git)</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -size +75M -a -print -a -exec rm -f {} \\;\n\n\n\n\nfind . -size +98M -a -print -a -exec rm -f {} \\;\n</code></pre>\n<hr>\n<h1>37. download all links of given file type</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">wget -r -A.pdf https://overapi.com/git\n</code></pre>\n<hr>\n<h1>38. Kill all node processes</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">killall -s KILL node\n</code></pre>\n<hr>\n<h1>39. Remove string from file names recursively</h1>\n<h3>Description: In the example below I am using this command to remove the string \"-master\" from all file names in the working directory and all of it's sub directories.</h3>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find &#x3C;mydir> -type f -exec sed -i 's/&#x3C;string1>/&#x3C;string2>/g' {} +\n\n\n\n\nfind . -type f -exec rename 's/-master//g' {} +\n</code></pre>\n<blockquote>\n<p>Notes: The same could be done for folder names by changing the <em>-type f</em> flag (for file) to a <em>-type d</em> flag (for directory)</p>\n</blockquote>\n<pre><code class=\"language-sh\">find &#x3C;mydir> -type d -exec sed -i 's/&#x3C;string1>/&#x3C;string2>/g' {} +\n\n\n\n\nfind . -type d -exec rename 's/-master//g' {} +\n</code></pre>\n<hr>\n<h1>40. Remove spaces from file and folder names recursively</h1>\n<h3>Description: replaces spaces in file and folder names with an <code>_</code> underscore</h3>\n<blockquote>\n<p>Notes: need to run <code>sudo apt install rename</code> to use this command</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"* *\" -type d | rename 's/ /_/g'   \nfind . -name \"* *\" -type f | rename 's/ /_/g'\n</code></pre>\n<hr>\n<h1>41.  Zip Each subdirectories in a given directory into their own zip file</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">for i in */; do zip -r \"${i%/}.zip\" \"$i\"; done\n</code></pre>\n<hr>\n<h1>42.</h1>\n<h1>43.</h1>\n<h1>44.</h1>\n<h1>45.</h1>\n<h1>46.</h1>\n<h1>47.</h1>\n<h1>48.</h1>\n<h1>49.</h1>\n<h1>50.</h1>\n<h1>51.</h1>\n<h1>52.</h1>\n<h1>53.</h1>\n<h1>54.</h1>\n<h1>55.</h1>\n<h1>56.</h1>\n<h1>57.</h1>\n<h1>58.</h1>\n<h1>59.</h1>\n<h1>60.</h1>\n<h1>61.</h1>\n<h1>62.</h1>\n<h1>63.</h1>\n<h1>64.</h1>\n<h1>65.</h1>\n<h1>66.</h1>\n<h1>67.</h1>\n<h1>68.</h1>\n<h1>69.</h1>\n<h1>70.</h1>\n<h1>71.</h1>\n<h1>72.</h1>\n<h1>73.</h1>\n<h1>74.</h1>\n<h1>75.</h1>\n<h1>76.</h1>\n<h1>77.</h1>\n<h1>78.</h1>\n<h1>79.</h1>\n<h1>80.</h1>\n<h1>81.</h1>\n<h1>82.</h1>\n<h1>83.</h1>\n<h1>84.</h1>\n<h1>85.</h1>\n<h1>86.</h1>\n<h1>87.</h1>\n<h1>88.</h1>\n<h1>89.</h1>\n<h1>90.</h1>\n<h1>91. Unzip PowerShell</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-ps1\">PARAM (\n    [string] $ZipFilesPath = \"./\",\n    [string] $UnzipPath = \"./RESULT\"\n)\n \n$Shell = New-Object -com Shell.Application\n$Location = $Shell.NameSpace($UnzipPath)\n \n$ZipFiles = Get-Childitem $ZipFilesPath -Recurse -Include *.ZIP\n \n$progress = 1\nforeach ($ZipFile in $ZipFiles) {\n    Write-Progress -Activity \"Unzipping to $($UnzipPath)\" -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status \"File $($Progress) of $($ZipFiles.Count)\"\n    $ZipFolder = $Shell.NameSpace($ZipFile.fullname)\n \n \n    $Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes to the user - http://msdn.microsoft.com/en-us/library/bb787866%28VS.85%29.aspx\n    $progress++\n}\n</code></pre>\n<hr>\n<h1>92. return to bash from zsh</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"> sudo apt --purge remove zsh\n</code></pre>\n<hr>\n<h1>93. Symbolic Link</h1>\n<h3>Description: to working directory</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">ln -s \"$(pwd)\" ~/NameOfLink\n\nln -s \"$(pwd)\" ~/Downloads\n</code></pre>\n<hr>\n<h1>94. auto generate readme</h1>\n<h3>Description: rename existing readme to blueprint.md</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">npx @appnest/readme generate\n</code></pre>\n<hr>\n<h1>95. Log into postgres:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo -u postgres psql\n</code></pre>\n<hr>\n<h1>96. URL To Subscribe To YouTube Channel</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-txt\">https://www.youtube.com/channel/UC1HDa0wWnIKUf-b4yY9JecQ?sub_confirmation=1\n</code></pre>\n<hr>\n<h1>97. Embed Repl.it In Medium Post:</h1>\n<h6>code:</h6>\n<pre><code class=\"language-txt\">https://repl.it/@bgoonz/Data-Structures-Algos-Codebase?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n\n\nhttps://repl.it/@bgoonz/node-db1-project?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n\nhttps://repl.it/@bgoonz/interview-prac?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n\n\nhttps://repl.it/@bgoonz/Database-Prac?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n</code></pre>\n<hr>\n<h1>98.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name *right.html  -type f -exec sed -i 's/target=\"_parent\"//g' {} +\n\n\nfind . -name *right.html  -type f -exec sed -i 's/target=\"_parent\"//g' {} +\n</code></pre>\n<hr>\n<h1>99.  Cheat Sheet</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/bash\n##############################################################################\n# SHORTCUTS and HISTORY\n##############################################################################\n\nCTRL+A  # move to beginning of line\nCTRL+B  # moves backward one character\nCTRL+C  # halts the current command\nCTRL+D  # deletes one character backward or logs out of current session, similar to exit\nCTRL+E  # moves to end of line\nCTRL+F  # moves forward one character\nCTRL+G  # aborts the current editing command and ring the terminal bell\nCTRL+H  # deletes one character under cursor (same as DELETE)\nCTRL+J  # same as RETURN\nCTRL+K  # deletes (kill) forward to end of line\nCTRL+L  # clears screen and redisplay the line\nCTRL+M  # same as RETURN\nCTRL+N  # next line in command history\nCTRL+O  # same as RETURN, then displays next line in history file\nCTRL+P  # previous line in command history\nCTRL+Q  # resumes suspended shell output\nCTRL+R  # searches backward\nCTRL+S  # searches forward or suspends shell output\nCTRL+T  # transposes two characters\nCTRL+U  # kills backward from point to the beginning of line\nCTRL+V  # makes the next character typed verbatim\nCTRL+W  # kills the word behind the cursor\nCTRL+X  # lists the possible filename completions of the current word\nCTRL+Y  # retrieves (yank) last item killed\nCTRL+Z  # stops the current command, resume with fg in the foreground or bg in the background\n\nALT+B   # moves backward one word\nALT+D   # deletes next word\nALT+F   # moves forward one word\nALT+H   # deletes one character backward\nALT+T   # transposes two words\nALT+.   # pastes last word from the last command. Pressing it repeatedly traverses through command history.\nALT+U   # capitalizes every character from the current cursor position to the end of the word\nALT+L   # uncapitalizes every character from the current cursor position to the end of the word\nALT+C   # capitalizes the letter under the cursor. The cursor then moves to the end of the word.\nALT+R   # reverts any changes to a command you’ve pulled from your history if you’ve edited it.\nALT+?   # list possible completions to what is typed\nALT+^   # expand line to most recent match from history\n\nCTRL+X then (   # start recording a keyboard macro\nCTRL+X then )   # finish recording keyboard macro\nCTRL+X then E   # recall last recorded keyboard macro\nCTRL+X then CTRL+E   # invoke text editor (specified by $EDITOR) on current command line then execute resultes as shell commands\n\nBACKSPACE  # deletes one character backward\nDELETE     # deletes one character under cursor\n\nhistory   # shows command line history\n!!        # repeats the last command\n!&#x3C;n>      # refers to command line 'n'\n!&#x3C;string> # refers to command starting with 'string'\n\nexit      # logs out of current session\n\n\n##############################################################################\n# BASH BASICS\n##############################################################################\n\nenv                 # displays all environment variables\n\necho $SHELL         # displays the shell you're using\necho $BASH_VERSION  # displays bash version\n\nbash                # if you want to use bash (type exit to go back to your previously opened shell)\nwhereis bash        # locates the binary, source and manual-page for a command\nwhich bash          # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments)\n\nclear               # clears content on window (hide displayed lines)\n\n\n##############################################################################\n# FILE COMMANDS\n##############################################################################\n\n\nls                            # lists your files in current directory, ls &#x3C;dir> to print files in a specific directory\nls -l                         # lists your files in 'long format', which contains the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified\nls -a                         # lists all files in 'long format', including hidden files (name beginning with '.')\nln -s &#x3C;filename> &#x3C;link>       # creates symbolic link to file\nreadlink &#x3C;filename>           # shows where a symbolic links points to\ntree                          # show directories and subdirectories in easilly readable file tree\nmc                            # terminal file explorer (alternative to ncdu)\ntouch &#x3C;filename>              # creates or updates (edit) your file\nmktemp -t &#x3C;filename>            # make a temp file in /tmp/ which is deleted at next boot (-d to make directory)\ncat &#x3C;filename>                # prints file raw content (will not be interpreted)\nany_command > &#x3C;filename>      # '>' is used to perform redirections, it will set any_command's stdout to file instead of \"real stdout\" (generally /dev/stdout)\nmore &#x3C;filename>               # shows the first part of a file (move with space and type q to quit)\nhead &#x3C;filename>               # outputs the first lines of file (default: 10 lines)\ntail &#x3C;filename>               # outputs the last lines of file (useful with -f option) (default: 10 lines)\nvim &#x3C;filename>                # opens a file in VIM (VI iMproved) text editor, will create it if it doesn't exist\nmv &#x3C;filename1> &#x3C;dest>         # moves a file to destination, behavior will change based on 'dest' type (dir: file is placed into dir; file: file will replace dest (tip: useful for renaming))\ncp &#x3C;filename1> &#x3C;dest>         # copies a file\nrm &#x3C;filename>                 # removes a file\nfind . -name &#x3C;name> &#x3C;type>    # searches for a file or a directory in the current directory and all its sub-directories by its name\ndiff &#x3C;filename1> &#x3C;filename2>  # compares files, and shows where they differ\nwc &#x3C;filename>                 # tells you how many lines, words and characters there are in a file. Use -lwc (lines, word, character) to ouput only 1 of those informations\nsort &#x3C;filename>               # sorts the contents of a text file line by line in alphabetical order, use -n for numeric sort and -r for reversing order.\nsort -t -k &#x3C;filename>         # sorts the contents on specific sort key field starting from 1, using the field separator t.\nrev                           # reverse string characters (hello becomes olleh)\nchmod -options &#x3C;filename>     # lets you change the read, write, and execute permissions on your files (more infos: SUID, GUID)\ngzip &#x3C;filename>               # compresses files using gzip algorithm\ngunzip &#x3C;filename>             # uncompresses files compressed by gzip\ngzcat &#x3C;filename>              # lets you look at gzipped file without actually having to gunzip it\nlpr &#x3C;filename>                # prints the file\nlpq                           # checks out the printer queue\nlprm &#x3C;jobnumber>              # removes something from the printer queue\ngenscript                     # converts plain text files into postscript for printing and gives you some options for formatting\ndvips &#x3C;filename>              # prints .dvi files (i.e. files produced by LaTeX)\ngrep &#x3C;pattern> &#x3C;filenames>    # looks for the string in the files\ngrep -r &#x3C;pattern> &#x3C;dir>       # search recursively for pattern in directory\nhead -n file_name | tail +n   # Print nth line from file.\nhead -y lines.txt | tail +x   # want to display all the lines from x to y. This includes the xth and yth lines.\n\n\n##############################################################################\n# DIRECTORY COMMANDS\n##############################################################################\n\n\nmkdir &#x3C;dirname>               # makes a new directory\nrmdir &#x3C;dirname>               # remove an empty directory\nrmdir -rf &#x3C;dirname>           # remove a non-empty directory\nmv &#x3C;dir1> &#x3C;dir2>              # rename a directory from &#x3C;dir1> to &#x3C;dir2>\ncd                            # changes to home\ncd ..                         # changes to the parent directory\ncd &#x3C;dirname>                  # changes directory\ncp -r &#x3C;dir1> &#x3C;dir2>           # copy &#x3C;dir1> into &#x3C;dir2> including sub-directories\npwd                           # tells you where you currently are\ncd ~                          # changes to home.\ncd -                          # changes to previous working directory\n\n##############################################################################\n# SSH, SYSTEM INFO &#x26; NETWORK COMMANDS\n##############################################################################\n\n\nssh user@host            # connects to host as user\nssh -p &#x3C;port> user@host  # connects to host on specified port as user\nssh-copy-id user@host    # adds your ssh key to host for user to enable a keyed or passwordless login\n\nwhoami                   # returns your username\npasswd                   # lets you change your password\nquota -v                 # shows what your disk quota is\ndate                     # shows the current date and time\ncal                      # shows the month's calendar\nuptime                   # shows current uptime\nw                        # displays whois online\nfinger &#x3C;user>            # displays information about user\nuname -a                 # shows kernel information\nman &#x3C;command>            # shows the manual for specified command\ndf                       # shows disk usage\ndu &#x3C;filename>            # shows the disk usage of the files and directories in filename (du -s give only a total)\nlast &#x3C;yourUsername>      # lists your last logins\nps -u yourusername       # lists your processes\nkill &#x3C;PID>               # kills the processes with the ID you gave\nkillall &#x3C;processname>    # kill all processes with the name\ntop                      # displays your currently active processes\nlsof                     # lists open files\nbg                       # lists stopped or background jobs ; resume a stopped job in the background\nfg                       # brings the most recent job in the foreground\nfg &#x3C;job>                 # brings job to the foreground\n\nping &#x3C;host>              # pings host and outputs results\nwhois &#x3C;domain>           # gets whois information for domain\ndig &#x3C;domain>             # gets DNS information for domain\ndig -x &#x3C;host>            # reverses lookup host\nwget &#x3C;file>              # downloads file\n\ntime &#x3C;command>             # report time consumed by command execution\n\n\n##############################################################################\n# VARIABLES\n##############################################################################\n\n\nvarname=value                # defines a variable\nvarname=value command        # defines a variable to be in the environment of a particular subprocess\necho $varname                # checks a variable's value\necho $$                      # prints process ID of the current shell\necho $!                      # prints process ID of the most recently invoked background job\necho $?                      # displays the exit status of the last command\nread &#x3C;varname>               # reads a string from the input and assigns it to a variable\nread -p \"prompt\" &#x3C;varname>   # same as above but outputs a prompt to ask user for value \ncolumn -t &#x3C;filename>         # display info in pretty columns (often used with pipe)\nlet &#x3C;varname> = &#x3C;equation>   # performs mathematical calculation using operators like +, -, *, /, %\nexport VARNAME=value         # defines an environment variable (will be available in subprocesses)\n\narray[0]=valA                # how to define an array\narray[1]=valB\narray[2]=valC\narray=([2]=valC [0]=valA [1]=valB)  # another way\narray=(valA valB valC)              # and another\n\n${array[i]}                  # displays array's value for this index. If no index is supplied, array element 0 is assumed\n${#array[i]}                 # to find out the length of any element in the array\n${#array[@]}                 # to find out how many values there are in the array\n\ndeclare -a                   # the variables are treated as arrays\ndeclare -f                   # uses function names only\ndeclare -F                   # displays function names without definitions\ndeclare -i                   # the variables are treated as integers\ndeclare -r                   # makes the variables read-only\ndeclare -x                   # marks the variables for export via the environment\n\n${varname:-word}             # if varname exists and isn't null, return its value; otherwise return word\n${varname:word}              # if varname exists and isn't null, return its value; otherwise return word\n${varname:=word}             # if varname exists and isn't null, return its value; otherwise set it word and then return its value\n${varname:?message}          # if varname exists and isn't null, return its value; otherwise print varname, followed by message and abort the current command or script\n${varname:+word}             # if varname exists and isn't null, return word; otherwise return null\n${varname:offset:length}     # performs substring expansion. It returns the substring of $varname starting at offset and up to length characters\n\n${variable#pattern}          # if the pattern matches the beginning of the variable's value, delete the shortest part that matches and return the rest\n${variable##pattern}         # if the pattern matches the beginning of the variable's value, delete the longest part that matches and return the rest\n${variable%pattern}          # if the pattern matches the end of the variable's value, delete the shortest part that matches and return the rest\n${variable%%pattern}         # if the pattern matches the end of the variable's value, delete the longest part that matches and return the rest\n${variable/pattern/string}   # the longest match to pattern in variable is replaced by string. Only the first match is replaced\n${variable//pattern/string}  # the longest match to pattern in variable is replaced by string. All matches are replaced\n\n${#varname}                  # returns the length of the value of the variable as a character string\n\n*(patternlist)               # matches zero or more occurrences of the given patterns\n+(patternlist)               # matches one or more occurrences of the given patterns\n?(patternlist)               # matches zero or one occurrence of the given patterns\n@(patternlist)               # matches exactly one of the given patterns\n!(patternlist)               # matches anything except one of the given patterns\n\n$(UNIX command)              # command substitution: runs the command and returns standard output\n\n\n##############################################################################\n# FUNCTIONS\n##############################################################################\n\n\n# The function refers to passed arguments by position (as if they were positional parameters), that is, $1, $2, and so forth.\n# $@ is equal to \"$1\" \"$2\"... \"$N\", where N is the number of positional parameters. $# holds the number of positional parameters.\n\n\nfunction functname() {\n  shell commands\n}\n\nunset -f functname  # deletes a function definition\ndeclare -f          # displays all defined functions in your login session\n\n\n##############################################################################\n# FLOW CONTROLS\n##############################################################################\n\n\nstatement1 &#x26;&#x26; statement2  # and operator\nstatement1 || statement2  # or operator\n\n-a                        # and operator inside a test conditional expression\n-o                        # or operator inside a test conditional expression\n\n# STRINGS\n\nstr1 == str2               # str1 matches str2\nstr1 != str2               # str1 does not match str2\nstr1 &#x3C; str2                # str1 is less than str2 (alphabetically)\nstr1 > str2                # str1 is greater than str2 (alphabetically)\nstr1 \\> str2               # str1 is sorted after str2\nstr1 \\&#x3C; str2               # str1 is sorted before str2\n-n str1                    # str1 is not null (has length greater than 0)\n-z str1                    # str1 is null (has length 0)\n\n# FILES\n\n-a file                   # file exists or its compilation is successful\n-d file                   # file exists and is a directory\n-e file                   # file exists; same -a\n-f file                   # file exists and is a regular file (i.e., not a directory or other special type of file)\n-r file                   # you have read permission\n-s file                   # file exists and is not empty\n-w file                   # your have write permission\n-x file                   # you have execute permission on file, or directory search permission if it is a directory\n-N file                   # file was modified since it was last read\n-O file                   # you own file\n-G file                   # file's group ID matches yours (or one of yours, if you are in multiple groups)\nfile1 -nt file2           # file1 is newer than file2\nfile1 -ot file2           # file1 is older than file2\n\n# NUMBERS\n\n-lt                       # less than\n-le                       # less than or equal\n-eq                       # equal\n-ge                       # greater than or equal\n-gt                       # greater than\n-ne                       # not equal\n\nif condition\nthen\n  statements\n[elif condition\n  then statements...]\n[else\n  statements]\nfi\n\nfor x in {1..10}\ndo\n  statements\ndone\n\nfor name [in list]\ndo\n  statements that can use $name\ndone\n\nfor (( initialisation ; ending condition ; update ))\ndo\n  statements...\ndone\n\ncase expression in\n  pattern1 )\n    statements ;;\n  pattern2 )\n    statements ;;\nesac\n\nselect name [in list]\ndo\n  statements that can use $name\ndone\n\nwhile condition; do\n  statements\ndone\n\nuntil condition; do\n  statements\ndone\n\n##############################################################################\n# COMMAND-LINE PROCESSING CYCLE\n##############################################################################\n\n\n# The default order for command lookup is functions, followed by built-ins, with scripts and executables last.\n# There are three built-ins that you can use to override this order: `command`, `builtin` and `enable`.\n\ncommand  # removes alias and function lookup. Only built-ins and commands found in the search path are executed\nbuiltin  # looks up only built-in commands, ignoring functions and commands found in PATH\nenable   # enables and disables shell built-ins\n\neval     # takes arguments and run them through the command-line processing steps all over again\n\n\n##############################################################################\n# INPUT/OUTPUT REDIRECTORS\n##############################################################################\n\n\ncmd1|cmd2  # pipe; takes standard output of cmd1 as standard input to cmd2\n&#x3C; file     # takes standard input from file\n> file     # directs standard output to file\n>> file    # directs standard output to file; append to file if it already exists\n>|file     # forces standard output to file even if noclobber is set\nn>|file    # forces output to file from file descriptor n even if noclobber is set\n&#x3C;> file    # uses file as both standard input and standard output\nn&#x3C;>file    # uses file as both input and output for file descriptor n\nn>file     # directs file descriptor n to file\nn&#x3C;file     # takes file descriptor n from file\nn>>file    # directs file description n to file; append to file if it already exists\nn>&#x26;        # duplicates standard output to file descriptor n\nn&#x3C;&#x26;        # duplicates standard input from file descriptor n\nn>&#x26;m       # file descriptor n is made to be a copy of the output file descriptor\nn&#x3C;&#x26;m       # file descriptor n is made to be a copy of the input file descriptor\n&#x26;>file     # directs standard output and standard error to file\n&#x3C;&#x26;-        # closes the standard input\n>&#x26;-        # closes the standard output\nn>&#x26;-       # closes the ouput from file descriptor n\nn&#x3C;&#x26;-       # closes the input from file descripor n\n\n|tee &#x3C;file># output command to both terminal and a file (-a to append to file)\n\n\n##############################################################################\n# PROCESS HANDLING\n##############################################################################\n\n\n# To suspend a job, type CTRL+Z while it is running. You can also suspend a job with CTRL+Y.\n# This is slightly different from CTRL+Z in that the process is only stopped when it attempts to read input from terminal.\n# Of course, to interrupt a job, type CTRL+C.\n\nmyCommand &#x26;  # runs job in the background and prompts back the shell\n\njobs         # lists all jobs (use with -l to see associated PID)\n\nfg           # brings a background job into the foreground\nfg %+        # brings most recently invoked background job\nfg %-        # brings second most recently invoked background job\nfg %N        # brings job number N\nfg %string   # brings job whose command begins with string\nfg %?string  # brings job whose command contains string\n\nkill -l               # returns a list of all signals on the system, by name and number\nkill PID              # terminates process with specified PID\nkill -s SIGKILL 4500  # sends a signal to force or terminate the process\nkill -15 913          # Ending PID 913 process with signal 15 (TERM)\nkill %1               # Where %1 is the number of job as read from 'jobs' command.\n\nps           # prints a line of information about the current running login shell and any processes running under it\nps -a        # selects all processes with a tty except session leaders\n\ntrap cmd sig1 sig2  # executes a command when a signal is received by the script\ntrap \"\" sig1 sig2   # ignores that signals\ntrap - sig1 sig2    # resets the action taken when the signal is received to the default\n\ndisown &#x3C;PID|JID>    # removes the process from the list of jobs\n\nwait                # waits until all background jobs have finished\nsleep &#x3C;number>      # wait # of seconds before continuing\n\npv                  # display progress bar for data handling commands. often used with pipe like |pv\nyes                 # give yes response everytime an input is requested from script/process\n\n\n##############################################################################\n# TIPS &#x26; TRICKS\n##############################################################################\n\n\n# set an alias\ncd; nano .bash_profile\n> alias gentlenode='ssh admin@gentlenode.com -p 3404'  # add your alias in .bash_profile\n\n# to quickly go to a specific directory\ncd; nano .bashrc\n> shopt -s cdable_vars\n> export websites=\"/Users/mac/Documents/websites\"\n\nsource .bashrc\ncd $websites\n\n\n##############################################################################\n# DEBUGGING SHELL PROGRAMS\n##############################################################################\n\n\nbash -n scriptname  # don't run commands; check for syntax errors only\nset -o noexec       # alternative (set option in script)\n\nbash -v scriptname  # echo commands before running them\nset -o verbose      # alternative (set option in script)\n\nbash -x scriptname  # echo commands after command-line processing\nset -o xtrace       # alternative (set option in script)\n\ntrap 'echo $varname' EXIT  # useful when you want to print out the values of variables at the point that your script exits\n\nfunction errtrap {\n  es=$?\n  echo \"ERROR line $1: Command exited with status $es.\"\n}\n\ntrap 'errtrap $LINENO' ERR  # is run whenever a command in the surrounding script or function exits with non-zero status\n\nfunction dbgtrap {\n  echo \"badvar is $badvar\"\n}\n\ntrap dbgtrap DEBUG  # causes the trap code to be executed before every statement in a function or script\n# ...section of code in which the problem occurs...\ntrap - DEBUG  # turn off the DEBUG trap\n\nfunction returntrap {\n  echo \"A return occurred\"\n}\n\ntrap returntrap RETURN  # is executed each time a shell function or a script executed with the . or source commands finishes executing\n\n##############################################################################\n# COLORS AND BACKGROUNDS \n##############################################################################\n# note: \\e or \\x1B also work instead of \\033 \n# Reset\nColor_Off='\\033[0m' # Text Reset\n\n# Regular Colors\nBlack='\\033[0;30m'  # Black\nRed='\\033[0;31m'    # Red\nGreen='\\033[0;32m'  # Green\nYellow='\\033[0;33m' # Yellow\nBlue='\\033[0;34m'   # Blue\nPurple='\\033[0;35m' # Purple\nCyan='\\033[0;36m'   # Cyan\nWhite='\\033[0;97m'  # White\n\n# Additional colors\nLGrey='\\033[0;37m'  # Ligth Gray\nDGrey='\\033[0;90m'  # Dark Gray\nLRed='\\033[0;91m'   # Ligth Red\nLGreen='\\033[0;92m' # Ligth Green\nLYellow='\\033[0;93m'# Ligth Yellow\nLBlue='\\033[0;94m'  # Ligth Blue\nLPurple='\\033[0;95m'# Light Purple\nLCyan='\\033[0;96m'  # Ligth Cyan\n\n\n# Bold\nBBlack='\\033[1;30m' # Black\nBRed='\\033[1;31m'   # Red\nBGreen='\\033[1;32m' # Green\nBYellow='\\033[1;33m'# Yellow\nBBlue='\\033[1;34m'  # Blue\nBPurple='\\033[1;35m'# Purple\nBCyan='\\033[1;36m'  # Cyan\nBWhite='\\033[1;37m' # White\n\n# Underline\nUBlack='\\033[4;30m' # Black\nURed='\\033[4;31m'   # Red\nUGreen='\\033[4;32m' # Green\nUYellow='\\033[4;33m'# Yellow\nUBlue='\\033[4;34m'  # Blue\nUPurple='\\033[4;35m'# Purple\nUCyan='\\033[4;36m'  # Cyan\nUWhite='\\033[4;37m' # White\n\n# Background\nOn_Black='\\033[40m' # Black\nOn_Red='\\033[41m'   # Red\nOn_Green='\\033[42m' # Green\nOn_Yellow='\\033[43m'# Yellow\nOn_Blue='\\033[44m'  # Blue\nOn_Purple='\\033[45m'# Purple\nOn_Cyan='\\033[46m'  # Cyan\nOn_White='\\033[47m' # White\n\n# Example of usage\necho -e \"${Green}This is GREEN text${Color_Off} and normal text\"\necho -e \"${Red}${On_White}This is Red test on White background${Color_Off}\" \n# option -e is mandatory, it enable interpretation of backslash escapes\nprintf \"${Red} This is red \\n\"\n</code></pre>"},{"url":"/docs/reference/","relativePath":"docs/reference/index.md","relativeDir":"docs/reference","base":"index.md","name":"index","frontmatter":{"title":"Reference","weight":0,"excerpt":"helpful reference guides","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Reference:</h1>\n<ul>\n<li>[SITEMAP🗺🟈](<a href=\"https://bgoonz-blog.netlify.app/docs/sitemap/\">https://bgoonz-blog.netlify.app/docs/sitemap/</a>)</li>\n</ul>\n<h1>Bookmarks:</h1>\n<iframe src=\"https://bgoonz-bookmarks.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<h1>SearchAwesome:</h1>\n<iframe src=\"https://search-awesome.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<h1>Job Search:</h1>\n<iframe src=\"https://web-dev-collaborative.github.io/gitpod-job-search-html-static/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>"},{"url":"/docs/reference/how-to-kill-a-process/","relativePath":"docs/reference/how-to-kill-a-process.md","relativeDir":"docs/reference","base":"how-to-kill-a-process.md","name":"how-to-kill-a-process","frontmatter":{"title":"Kill a Process in Linux","weight":0,"excerpt":"Kill a Process in Linux","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>How to Kill a Process in Linux</h1>\n<p><strong><em>Learn how to kill errant processes in this tutorial.</em></strong></p>\n<p>Picture this: You've launched an application (be it from your favorite desktop menu or from the command line) and you start using that launched app, only to have it lock up on you, stop performing, or unexpectedly die. You try to run the app again, but it turns out the original never truly shut down completely.</p>\n<p>What do you do? You kill the process. But how? Believe it or not, your best bet most often lies within the command line. Thankfully, Linux has every tool necessary to empower you, the user, to kill an errant process. However, before you immediately launch that command to kill the process, you first have to know what the process is. How do you take care of this layered task? It's actually quite simple...once you know the tools at your disposal.</p>\n<p>Let me introduce you to said tools.</p>\n<p>The steps I'm going to outline will work on almost every Linux distribution, whether it is a desktop or a server. I will be dealing strictly with the command line, so open up your terminal and prepare to type.</p>\n<h3>Locating the process</h3>\n<p>The first step in killing the unresponsive process is locating it. There are two commands I use to locate a process: <em>top *and *ps</em>. Top is a tool every administrator should get to know. With <em>top</em>, you get a full listing of currently running process. From the command line, issue <em>top</em> to see a list of your running processes (Figure 1).</p>\n<p><img src=\"https://lcom.static.linuxfound.org/sites/lcom/files/killa.jpg\"></p>\n<p>Figure 1: The top command gives you plenty of information.</p>\n<p>From this list you will see some rather important information. Say, for example, Chrome has become unresponsive. According to our <em>top</em> display, we can discern there are four instances of chrome running with Process IDs (PID) 3827, 3919, 10764, and 11679. This information will be important to have with one particular method of killing the process.</p>\n<p>Although <em>top</em> is incredibly handy, it's not always the most efficient means of getting the information you need. Let's say you know the Chrome process is what you need to kill, and you don't want to have to glance through the real-time information offered by <em>top</em>. For that, you can make use of the <em>ps *command and filter the output through *grep</em>. The <em>ps</em> command reports a snapshot of a current process and <em>grep *prints lines matching a pattern. The reason why we filter *ps</em> through <em>grep</em> is simple: If you issue the <em>ps</em> command by itself, you will get a snapshot listing of all current processes. We only want the listing associated with Chrome. So this command would look like:</p>\n<p>ps aux | grep chrome</p>\n<p>The <em>aux</em> options are as follows:</p>\n<ul>\n<li>a = show processes for all users</li>\n<li>u = display the process's user/owner</li>\n<li>x = also show processes not attached to a terminal</li>\n</ul>\n<p>The <em>x</em> option is important when you're hunting for information regarding a graphical application.</p>\n<p>When you issue the command above, you'll be given more information than you need (Figure 2) for the killing of a process, but it is sometimes more efficient than using top.</p>\n<p><img src=\"https://lcom.static.linuxfound.org/sites/lcom/files/killb.jpg\"></p>\n<p>Figure 2: Locating the necessary information with the ps command.</p>\n<h3>Killing the process</h3>\n<p>Now we come to the task of killing the process. We have two pieces of information that will help us kill the errant process:</p>\n<ul>\n<li>Process name</li>\n<li>Process ID</li>\n</ul>\n<p>Which you use will determine the command used for termination. There are two commands used to kill a process:</p>\n<ul>\n<li>kill -- Kill a process by ID</li>\n<li>killall -- Kill a process by name</li>\n</ul>\n<p>There are also different signals that can be sent to both kill commands. What signal you send will be determined by what results you want from the kill command. For instance, you can send the HUP (hang up) signal to the kill command, which will effectively restart the process. This is always a wise choice when you need the process to immediately restart (such as in the case of a daemon). You can get a list of all the signals that can be sent to the kill command by issuing kill -l. You'll find quite a large number of signals (Figure 3).</p>\n<p><img src=\"https://lcom.static.linuxfound.org/sites/lcom/files/killc.jpg\"></p>\n<p>Figure 3: The available kill signals.</p>\n<p>The most common kill signals are:</p>\n<p>|</p>\n<p>Signal Name</p>\n<p>|</p>\n<p>Single Value</p>\n<p>|</p>\n<p>Effect</p>\n<p>|\n|</p>\n<p>SIGHUP</p>\n<p>|</p>\n<p>1</p>\n<p>|</p>\n<p>Hangup</p>\n<p>|\n|</p>\n<p>SIGINT</p>\n<p>|</p>\n<p>2</p>\n<p>|</p>\n<p>Interrupt from keyboard</p>\n<p>|\n|</p>\n<p>SIGKILL</p>\n<p>|</p>\n<p>9</p>\n<p>|</p>\n<p>Kill signal</p>\n<p>|\n|</p>\n<p>SIGTERM</p>\n<p>|</p>\n<p>15</p>\n<p>|</p>\n<p>Termination signal</p>\n<p>|\n|</p>\n<p>SIGSTOP</p>\n<p>|</p>\n<p>17, 19, 23</p>\n<p>|</p>\n<p>Stop the process</p>\n<p>|</p>\n<p>What's nice about this is that you can use the Signal Value in place of the Signal Name. So you don't have to memorize all of the names of the various signals.<br>\nSo, let's now use the *kill *command to kill our instance of chrome. The structure for this command would be:</p>\n<p>kill SIGNAL PID</p>\n<p>Where SIGNAL is the signal to be sent and PID is the Process ID to be killed. We already know, from our <em>ps</em> command that the IDs we want to kill are 3827, 3919, 10764, and 11679. So to send the kill signal, we'd issue the commands:</p>\n<p>kill -9 3827</p>\n<p>kill -9 3919</p>\n<p>kill -9 10764</p>\n<p>kill -9 11679</p>\n<p>Once we've issued the above commands, all of the chrome processes will have been successfully killed.</p>\n<p>Let's take the easy route! If we already know the process we want to kill is named chrome, we can make use of the *killall *command and send the same signal the process like so:</p>\n<p><em>killall -9 chrome</em></p>\n<p>The only caveat to the above command is that it may not catch all of the running chrome processes. If, after running the above command, you issue the ps aux|grep chrome command and see remaining processes running, your best bet is to go back to the *kill *command and send signal 9 to terminate the process by PID.</p>\n<h3>Ending processes made easy</h3>\n<p>As you can see, killing errant processes isn't nearly as challenging as you might have thought. When I wind up with a stubborn process, I tend to start off with the *killall *command as it is the most efficient route to termination. However, when you wind up with a really feisty process, the *kill *command is the way to go.</p>"},{"url":"/docs/reference/embed-the-web/","relativePath":"docs/reference/embed-the-web.md","relativeDir":"docs/reference","base":"embed-the-web.md","name":"embed-the-web","frontmatter":{"title":"Embed The Web","weight":0,"excerpt":"Embed The Web","seo":{"title":"embeding content","description":"A long time ago on the Web, it was popular to use **frames** to create websites ","robots":[],"extra":[]},"template":"docs"},"html":"<h2><a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#a_short_history_of_embedding\" title=\"Permalink to A short history of embedding\">A short history of embedding</a></h2>\n<p>A long time ago on the Web, it was popular to use <strong>frames</strong> to create websites — small parts of a website stored in individual HTML pages. These were embedded in a master document called a <strong>frameset</strong>, which allowed you to specify the area on the screen that each frame filled, rather like sizing the columns and rows of a table. These were considered the height of coolness in the mid to late 90s, and there was evidence that having a webpage split up into smaller chunks like this was better for download speeds — especially noticeable with network connections being so slow back then. They did however have many problems, which far outweighed any positives as network speeds got faster, so you don't see them being used anymore.</p>\n<p>A little while later (late 90s, early 2000s), plugin technologies became very popular, such as <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Java\">Java Applets</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Adobe_Flash\">Flash</a> — these allowed web developers to embed rich content into webpages such as videos and animations, which just weren't available through HTML alone. Embedding these technologies was achieved through elements like <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object\"><code>&#x3C;object></code></a>, and the lesser-used <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed\"><code>&#x3C;embed></code></a>, and they were very useful at the time. They have since fallen out of fashion due to many problems, including accessibility, security, file size, and more. These days major browsers have stopped supporting plugins such as Flash.</p>\n<p>Finally, the <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\"><code>&#x3C;iframe></code></a> element appeared (along with other ways of embedding content, such as <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas\"><code>&#x3C;canvas></code></a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\"><code>&#x3C;video></code></a>, etc.) This provides a way to embed an entire web document inside another one, as if it were an <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\"><code>&#x3C;img></code></a> or other such element, and is used regularly today.</p>\n<p>With the history lesson out of the way, let's move on and see how to use some of these.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#active_learning_classic_embedding_uses\" title=\"Permalink to Active learning: classic embedding uses\">Active learning: classic embedding uses</a></h2>\n<p>In this article we are going to jump straight into an active learning section, to immediately give you a real idea of just what embedding technologies are useful for. The online world is very familiar with <a href=\"https://www.youtube.com/\">YouTube</a>, but many people don't know about some of the sharing facilities it has available. Let's look at how YouTube allows us to embed a video in any page we like using an <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\"><code>&#x3C;iframe></code></a>.</p>\n<ol>\n<li>First, go to YouTube and find a video you like.</li>\n<li>Below the video, you'll find a <em>Share</em> button — select this to display the sharing options.</li>\n<li>Select the <em>Embed</em> button and you'll be given some <code>&#x3C;iframe></code> code — copy this.</li>\n<li>Insert it into the <em>Input</em> box below, and see what the result is in the <em>Output</em>.</li>\n</ol>\n<p>For bonus points, you could also try embedding a <a href=\"https://www.google.com/maps/\">Google Map</a> in the example:</p>\n<ol>\n<li>Go to Google Maps and find a map you like.</li>\n<li>Click on the \"Hamburger Menu\" (three horizontal lines) in the top left of the UI.</li>\n<li>Select the <em>Share or embed map</em> option.</li>\n<li>Select the Embed map option, which will give you some <code>&#x3C;iframe></code> code — copy this.</li>\n<li>Insert it into the <em>Input</em> box below, and see what the result is in the <em>Output</em>.</li>\n</ol>\n<p>If you make a mistake, you can always reset it using the <em>Reset</em> button. If you get really stuck, press the <em>Show solution</em> button to see an answer.</p>\n<pre><code>&#x3C;h2>Live output&#x3C;/h2>\n\n&#x3C;div class=\"output\" style=\"min-height: 250px;\">\n&#x3C;/div>\n\n&#x3C;h2>Editable code&#x3C;/h2>\n&#x3C;p class=\"a11y-label\">Press Esc to move focus away from the code area (Tab inserts a tab character).&#x3C;/p>\n\n&#x3C;textarea id=\"code\" class=\"input\" style=\"width: 95%;min-height: 100px;\">\n&#x3C;/textarea>\n\n&#x3C;div class=\"playable-buttons\">\n  &#x3C;input id=\"reset\" type=\"button\" value=\"Reset\">\n  &#x3C;input id=\"solution\" type=\"button\" value=\"Show solution\">\n&#x3C;/div>\n</code></pre>\n<pre><code>html {\n  font-family: sans-serif;\n}\n\nh2 {\n  font-size: 16px;\n}\n\n.a11y-label {\n  margin: 0;\n  text-align: right;\n  font-size: 0.7rem;\n  width: 98%;\n}\n\nbody {\n  margin: 10px;\n  background: #f5f9fa;\n}\n</code></pre>\n<pre><code>const textarea = document.getElementById('code');\nconst reset = document.getElementById('reset');\nconst solution = document.getElementById('solution');\nconst output = document.querySelector('.output');\nlet code = textarea.value;\nlet userEntry = textarea.value;\n\nfunction updateCode() {\n  output.innerHTML = textarea.value;\n}\n\nreset.addEventListener('click', function() {\n  textarea.value = code;\n  userEntry = textarea.value;\n  solutionEntry = htmlSolution;\n  solution.value = 'Show solution';\n  updateCode();\n});\n\nsolution.addEventListener('click', function() {\n  if(solution.value === 'Show solution') {\n    textarea.value = solutionEntry;\n    solution.value = 'Hide solution';\n  } else {\n    textarea.value = userEntry;\n    solution.value = 'Show solution';\n  }\n  updateCode();\n});\n\nconst htmlSolution = '&#x3C;iframe width=\"420\" height=\"315\" src=\"https://www.youtube.com/embed/QH2-TGUlwu4\" frameborder=\"0\" allowfullscreen>\\n&#x3C;/iframe>\\n\\n&#x3C;iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d37995.65748333395!2d-2.273568166412784!3d53.473310471916975!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x487bae6c05743d3d%3A0xf82fddd1e49fc0a1!2sThe+Lowry!5e0!3m2!1sen!2suk!4v1518171785211\" width=\"600\" height=\"450\" frameborder=\"0\" style=\"border:0\" allowfullscreen>\\n&#x3C;/iframe>';\nlet solutionEntry = htmlSolution;\n\ntextarea.addEventListener('input', updateCode);\nwindow.addEventListener('load', updateCode);\n\n\n\n\ntextarea.onkeydown = function(e){\n  if (e.keyCode === 9) {\n    e.preventDefault();\n    insertAtCaret('\\t');\n  }\n\n  if (e.keyCode === 27) {\n    textarea.blur();\n  }\n};\n\nfunction insertAtCaret(text) {\n  const scrollPos = textarea.scrollTop;\n  let caretPos = textarea.selectionStart;\n\n  const front = (textarea.value).substring(0, caretPos);\n  const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length);\n  textarea.value = front + text + back;\n  caretPos = caretPos + text.length;\n  textarea.selectionStart = caretPos;\n  textarea.selectionEnd = caretPos;\n  textarea.focus();\n  textarea.scrollTop = scrollPos;\n}\n\n\n\ntextarea.onkeyup = function(){\n  \n  \n  if(solution.value === 'Show solution') {\n    userEntry = textarea.value;\n  } else {\n    solutionEntry = textarea.value;\n  }\n\n  updateCode();\n};\n</code></pre>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#iframes_in_detail\" title=\"Permalink to iframes in detail\">iframes in detail</a></h2>\n<p>So, that was easy and fun, right? <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\"><code>&#x3C;iframe></code></a> elements are designed to allow you to embed other web documents into the current document. This is great for incorporating third-party content into your website that you might not have direct control over and don't want to have to implement your own version of — such as video from online video providers, commenting systems like <a href=\"https://disqus.com/\">Disqus</a>, maps from online map providers, advertising banners, etc. The live editable examples you've been using through this course are implemented using <code>&#x3C;iframe></code>s.</p>\n<p>There are some serious <a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#security_concerns\">Security concerns</a> to consider with <code>&#x3C;iframe></code>s, as we'll discuss below, but this doesn't mean that you shouldn't use them in your websites — it just requires some knowledge and careful thinking. Let's explore the code in a bit more detail. Say you wanted to include the MDN glossary on one of your web pages — you could try something like this:</p>\n<pre><code>&#x3C;head>\n  &#x3C;style> iframe { border: none } &#x3C;/style>\n&#x3C;/head>\n&#x3C;body>\n  &#x3C;iframe src=\"https://developer.mozilla.org/en-US/docs/Glossary\"\n          width=\"100%\" height=\"500\" allowfullscreen sandbox>\n    &#x3C;p>\n      &#x3C;a href=\"/en-US/docs/Glossary\">\n         Fallback link for browsers that don't support iframes\n      &#x3C;/a>\n    &#x3C;/p>\n  &#x3C;/iframe>\n&#x3C;/body>\n</code></pre>\n<p>This example includes the basic essentials needed to use an <code>&#x3C;iframe></code>:</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border\"><code>border: none</code></a></p>\n<p>If used, the <code>&#x3C;iframe></code> is displayed without a surrounding border. Otherwise, by default, browsers display the <code>&#x3C;iframe></code> with a surrounding border (which is generally undesirable).</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-allowfullscreen\"><code>allowfullscreen</code></a></p>\n<p>If set, the <code>&#x3C;iframe></code> is able to be placed in fullscreen mode using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API\">Fullscreen API</a> (somewhat beyond the scope of this article.)</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-src\"><code>src</code></a></p>\n<p>This attribute, as with <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\"><code>&#x3C;video></code></a>/<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\"><code>&#x3C;img></code></a>, contains a path pointing to the URL of the document to be embedded.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-width\"><code>width</code></a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-height\"><code>height</code></a></p>\n<p>These attributes specify the width and height you want the iframe to be.</p>\n<p>Fallback content</p>\n<p>In the same way as other similar elements like <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\"><code>&#x3C;video></code></a>, you can include fallback content between the opening and closing <code>&#x3C;iframe>&#x3C;/iframe></code> tags that will appear if the browser doesn't support the <code>&#x3C;iframe></code>. In this case, we have included a link to the page instead. It is unlikely that you'll come across any browser that doesn't support <code>&#x3C;iframe></code>s these days.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox\"><code>sandbox</code></a></p>\n<p>This attribute, which works in slightly more modern browsers than the rest of the <code>&#x3C;iframe></code> features (e.g. IE 10 and above) requests heightened security settings; we'll say more about this in the next section.</p>\n<p><strong>Note:</strong> In order to improve speed, it's a good idea to set the iframe's <code>src</code> attribute with JavaScript after the main content is done with loading. This makes your page usable sooner and decreases your official page load time (an important <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/SEO\">SEO</a> metric.)</p>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#security_concerns\" title=\"Permalink to Security concerns\">Security concerns</a></h3>\n<p>Above we mentioned security concerns — let's go into this in a bit more detail now. We are not expecting you to understand all of this content perfectly the first time; we just want to make you aware of this concern, and provide a reference to come back to as you get more experienced and start considering using <code>&#x3C;iframe></code>s in your experiments and work. Also, there is no need to be scared and not use <code>&#x3C;iframe></code>s — you just need to be careful. Read on...</p>\n<p>Browser makers and Web developers have learned the hard way that iframes are a common target (official term: <strong>attack vector</strong>) for bad people on the Web (often termed <strong>hackers</strong>, or more accurately, <strong>crackers</strong>) to attack if they are trying to maliciously modify your webpage, or trick people into doing something they don't want to do, such as reveal sensitive information like usernames and passwords. Because of this, spec engineers and browser developers have developed various security mechanisms for making <code>&#x3C;iframe></code>s more secure, and there are also best practices to consider — we'll cover some of these below.</p>\n<p><strong>Note:</strong> <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Clickjacking\">Clickjacking</a> is one kind of common iframe attack where hackers embed an invisible iframe into your document (or embed your document into their own malicious website) and use it to capture users' interactions. This is a common way to mislead users or steal sensitive data.</p>\n<p>A quick example first though — try loading the previous example we showed above into your browser — you can <a href=\"https://mdn.github.io/learning-area/html/multimedia-and-embedding/other-embedding-technologies/iframe-detail.html\">find it live on GitHub</a> (<a href=\"https://github.com/mdn/learning-area/blob/gh-pages/html/multimedia-and-embedding/other-embedding-technologies/iframe-detail.html\">see the source code</a> too.) Instead of the page you expected, you'll probably see some kind of message to the effect of \"I can't open this page\", and if you look at the <em>Console</em> in the <a href=\"https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools\">browser developer tools</a>, you'll see a message telling you why. In Firefox, you'll get told something like <em>The loading of “<a href=\"https://developer.mozilla.org/en-US/docs/Glossary%E2%80%9D\">https://developer.mozilla.org/en-US/docs/Glossary”</a> in a frame is denied by “X-Frame-Options“ directive set to “DENY“.</em>. This is because the developers that built MDN have included a setting on the server that serves the website pages to disallow them from being embedded inside <code>&#x3C;iframe></code>s (see <a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#configure_csp_directives\">Configure CSP directives</a>, below.) This makes sense — an entire MDN page doesn't really make sense to be embedded in other pages unless you want to do something like embed them on your site and claim them as your own — or attempt to steal data via <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Clickjacking\">clickjacking</a>, which are both really bad things to do. Plus if everybody started to do this, all the additional bandwidth would start to cost Mozilla a lot of money.</p>\n<h4>Only embed when necessary</h4>\n<p>Sometimes it makes sense to embed third-party content — like youtube videos and maps — but you can save yourself a lot of headaches if you only embed third-party content when completely necessary. A good rule of thumb for web security is <em>\"You can never be too cautious. If you made it, double-check it anyway. If someone else made it, assume it's dangerous until proven otherwise.\"</em></p>\n<p>Besides security, you should also be aware of intellectual property issues. Most content is copyrighted, offline and online, even content you might not expect (for example, most images on <a href=\"https://commons.wikimedia.org/wiki/Main_Page\">Wikimedia Commons</a>). Never display content on your webpage unless you own it or the owners have given you written, unequivocal permission. Penalties for copyright infringement are severe. Again, you can never be too cautious.</p>\n<p>If the content is licensed, you must obey the license terms. For example, the content on MDN is <a href=\"https://developer.mozilla.org/en-US/docs/MDN/About#copyrights_and_licenses\">licensed under CC-BY-SA</a>. That means, you must <a href=\"https://wiki.creativecommons.org/wiki/Best_practices_for_attribution\">credit us properly</a> when you quote our content, even if you make substantial changes.</p>\n<h4>Use HTTPS</h4>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/https\">HTTPS</a> is the encrypted version of <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/HTTP\">HTTP</a>. You should serve your websites using HTTPS whenever possible:</p>\n<ol>\n<li>HTTPS reduces the chance that remote content has been tampered with in transit,</li>\n<li>HTTPS prevents embedded content from accessing content in your parent document, and vice versa.</li>\n</ol>\n<p>HTTPS-enabling your site requires a special security certificate to be installed. Many hosting providers offer HTTPS-enabled hosting without you needing to do any setup on your own to put a certificate in place. But if you <em>do</em> need to set up HTTPS support for your site on your own, <a href=\"https://letsencrypt.org/\">Let's Encrypt</a> provides tools and instructions you can use for automatically creating and installing the necessary certificate — with built-in support for the most widely-used web servers, including the Apache web server, Nginx, and others. The Let's Encrypt tooling is designed to make the process as easy as possible, so there’s really no good reason to avoid using it or other available means to HTTPS-enable your site.</p>\n<p><strong>Note:</strong> <a href=\"https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Using_Github_pages\">GitHub pages</a> allow content to be served via HTTPS by default, so it is useful for hosting content. If you are using a different hosting provider and are not sure, ask them about it.</p>\n<h4>Always use the <code>sandbox</code> attribute</h4>\n<p>You want to give attackers as little power as you can to do bad things on your website, therefore you should give embedded content <em>only the permissions needed for doing its job.</em> Of course, this applies to your own content, too. A container for code where it can be used appropriately — or for testing — but can't cause any harm to the rest of the codebase (either accidental or malicious) is called a <a href=\"https://en.wikipedia.org/wiki/Sandbox_(computer_security)\">sandbox</a>.</p>\n<p>Unsandboxed content can do way too much (executing JavaScript, submitting forms, popup windows, etc.) By default, you should impose all available restrictions by using the <code>sandbox</code> attribute with no parameters, as shown in our previous example.</p>\n<p>If absolutely required, you can add permissions back one by one (inside the <code>sandbox=\"\"</code> attribute value) — see the <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox\"><code>sandbox</code></a> reference entry for all the available options. One important note is that you should <em>never</em> add both <code>allow-scripts</code> and <code>allow-same-origin</code> to your <code>sandbox</code> attribute — in that case, the embedded content could bypass the <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy\">Same-origin policy</a> that stops sites from executing scripts, and use JavaScript to turn off sandboxing altogether.</p>\n<p><strong>Note:</strong> Sandboxing provides no protection if attackers can fool people into visiting malicious content directly (outside an <code>iframe</code>). If there's any chance that certain content may be malicious (e.g., user-generated content), please serve it from a different <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Domain\">domain</a> to your main site.</p>\n<h4>Configure CSP directives</h4>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/CSP\">CSP</a> stands for <strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP\">content security policy</a></strong> and provides <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy\">a set of HTTP Headers</a> (metadata sent along with your web pages when they are served from a web server) designed to improve the security of your HTML document. When it comes to securing <code>&#x3C;iframe></code>s, you can <em><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options\">configure your server to send an appropriate <code>X-Frame-Options</code>  header.</a></em> This can prevent other websites from embedding your content in their web pages (which would enable <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Clickjacking\">clickjacking</a> and a host of other attacks), which is exactly what the MDN developers have done, as we saw earlier on.</p>\n<p><strong>Note:</strong> You can read Frederik Braun's post <a href=\"https://blog.mozilla.org/security/2013/12/12/on-the-x-frame-options-security-header/\">On the X-Frame-Options Security Header</a> for more background information on this topic. Obviously, it's rather out of scope for a full explanation in this article.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#the_embed_and_object_elements\" title=\"Permalink to The <embed> and <object> elements\">The <embed> and <object> elements</a></h2>\n<p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed\"><code>&#x3C;embed></code></a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object\"><code>&#x3C;object></code></a> elements serve a different function to <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\"><code>&#x3C;iframe></code></a> — these elements are general purpose embedding tools for embedding external content, such as PDFs.</p>\n<p>However, you are unlikely to use these elements very much. If you need to display PDFs, it's usually better to link to them, rather than embedding them in the page.</p>\n<p>Historically these elements have also been used for embedding content handled by browser <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Plugin\">plugins</a> such as <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Adobe_Flash\">Adobe Flash</a>, but this technology is now obsolete and is not supported by modern browsers.</p>\n<p>If you find yourself needing to embed plugin content, this is the kind of information you'll need, at a minimum:</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed\"><code>&#x3C;embed></code></a></p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object\"><code>&#x3C;object></code></a></p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/URL\">URL</a> of the embedded content</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed#attr-src\"><code>src</code></a></p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object#attr-data\"><code>data</code></a></p>\n<p><em>accurate</em> <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/MIME_type\">media type</a> of the embedded content</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed#attr-type\"><code>type</code></a></p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object#attr-type\"><code>type</code></a></p>\n<p>height and width (in CSS pixels) of the box controlled by the plugin</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed#attr-height\"><code>height</code></a><br>\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed#attr-width\"><code>width</code></a></p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object#attr-height\"><code>height</code></a><br>\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object#attr-width\"><code>width</code></a></p>\n<p>names and values, to feed the plugin as parameters</p>\n<p>ad hoc attributes with those names and values</p>\n<p>single-tag <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/param\"><code>&#x3C;param></code></a> elements, contained within <code>&#x3C;object></code></p>\n<p>independent HTML content as fallback for an unavailable resource</p>\n<p>not supported (<code>&#x3C;noembed></code> is obsolete)</p>\n<p>contained within <code>&#x3C;object></code>, after <code>&#x3C;param></code> elements</p>\n<p>Let's look at an <code>&#x3C;object></code> example that embeds a PDF into a page (see the <a href=\"https://mdn.github.io/learning-area/html/multimedia-and-embedding/other-embedding-technologies/object-pdf.html\">live example</a> and the <a href=\"https://github.com/mdn/learning-area/blob/gh-pages/html/multimedia-and-embedding/other-embedding-technologies/object-pdf.html\">source code</a>):</p>\n<pre><code>&#x3C;object data=\"mypdf.pdf\" type=\"application/pdf\"\n        width=\"800\" height=\"1200\">\n  &#x3C;p>You don't have a PDF plugin, but you can\n    &#x3C;a href=\"mypdf.pdf\">download the PDF file.\n    &#x3C;/a>\n  &#x3C;/p>\n&#x3C;/object>\n</code></pre>\n<p>PDFs were a necessary stepping stone between paper and digital, but they pose many <a href=\"https://webaim.org/techniques/acrobat/acrobat\">accessibility challenges</a> and can be hard to read on small screens. They do still tend to be popular in some circles, but it is much better to link to them so they can be downloaded or read on a separate page, rather than embedding them in a webpage.</p>"},{"url":"/docs/reference/how-2-reinstall-npm/","relativePath":"docs/reference/how-2-reinstall-npm.md","relativeDir":"docs/reference","base":"how-2-reinstall-npm.md","name":"how-2-reinstall-npm","frontmatter":{"title":"How To Reinstall NPM and Node.js On Your System","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>The Node Package Manager (usually shortened to npm) and Node.js are popular technologies among JavaScript developers. npm is the default package management utility that is installed automatically on your machine when you download and install Node.js.</p>\n<p>npm assists in building, consuming, managing, and sharing small pieces of code. On the other hand, Node.js provides a server-side environment for creating powerful applications.</p>\n<p>However, at times, npm can get corrupted, become incompatible with other programs, or just experience performance issues. In such cases, it may help to reinstall npm on your system and save yourself the hassles. Similarly, reinstalling Node.js may assist you in clearing out any performance errors.</p>\n<p>And since npm is shipped with Node.js by default, installing Node.js will also install npm on your system.</p>\n<h2>How to check if reinstallation succeeded</h2>\n<p>Note that after completing the reinstallation process, you can check if it was successful by running the following commands on the terminal:</p>\n<p>Then, if everything went well, the system will output your installed versions.</p>\n<p>Something like this:</p>\n<p>Since npm is usually updated more frequently than Node.js, your installation may not come with the latest npm version.</p>\n<p>So, if your installed npm version is not the latest, you can update it by running the following command:</p>\n<p>The above command will install the latest, stable npm version. However, if you want to experiment with things by using a version that will be released in the future, you can run the following:</p>\n<p>If you want to update Node.js to the latest version, <a href=\"https://renovate.whitesourcesoftware.com/blog/update-node-js/\">you can read this article.</a></p>\n<h2>How to reinstall npm and Node.js on Windows</h2>\n<p>If the npm or Node.js running on your Windows environment is broken, you can reinstall and get the most out of them.</p>\n<p>You can use any of the following methods:</p>\n<ul>\n<li>Reinstalling using a Node version manager</li>\n<li>Reinstalling using a Node installer</li>\n</ul>\n<p>Let's talk about each of them.</p>\n<h3>a) Reinstalling using a Node version manager</h3>\n<p>A Node version manager is a tool you can use to install various versions of Node.js and npm and shift between them seamlessly.</p>\n<p>A popular Node version management tool you can use is <a href=\"https://github.com/coreybutler/nvm-windows/\">nvm-windows</a>. It's a powerful command line utility that allows you to manage multiple installations of Node.js comfortably.</p>\n<p>Before installing the utility, it is recommended to remove all the existing versions of Node.js and npm from your Windows computer. This will prevent any conflict issues when installing the software.</p>\n<p>You can uninstall them by doing the following:</p>\n<ul>\n<li>Go to the Windows Control Panel and uninstall the Node.js program.</li>\n<li>If any Node.js installation directories are still remaining, delete them. An example is C:\\Program Files\\mynodejs.</li>\n<li>If any npm install location is still remaining, delete it. An example is C:\\Users\\&#x3C;username>\\AppData\\Roaming\\npm.</li>\n</ul>\n<p>Then, once your system is clean, go to <a href=\"https://github.com/coreybutler/nvm-windows/releases\">this page</a> and download and run the latest nvm-windows installer. After it has been installed, you can start the Command Prompt or Powershell as an Administrator and use the tool to reinstall Node.js and npm.</p>\n<p>If you want to reinstall a specific Node.js version, you can run the following command:</p>\n<p>Let's say you want to reinstall Node.js version 12.18.0, you can run:</p>\n<p>If you want to reinstall the latest stable Node.js version, you can run:</p>\n<p>If you want to check the list of Node.js versions available for download, you can run:</p>\n<p>To use the installed Node.js version in your project, you can switch to it:</p>\n<h3>b) Reinstalling using a Node installer</h3>\n<p>Using the official Node installer is the easiest way to reinstall Node.js and npm on your Windows environment.</p>\n<p>To use this option, you can go to the <a href=\"https://nodejs.org/en/download/\">Node.js download page</a> and reinstall the latest Node.js version.</p>\n<p>It is recommended to download the version labeled LTS (Long-term Supported) because it has been tested with npm. Although the version labeled Current comes with the latest features, it may be unstable and unreliable.</p>\n<p><img src=\"https://www.whitesourcesoftware.com/wp-content/media/2020/09/12121.png\"></p>\n<p>After selecting the version you want to download, and clicking the Windows Installer option, the installation wizard will magically complete the installation process for you.</p>\n<p>Ultimately, the installer will automatically overwrite your existing, malfunctioned Node.js version with a new one.</p>\n<h2>How to reinstall npm and Node.js on macOS</h2>\n<p>Before reinstalling Node.js and npm on your macOS system, you'll need to remove any previously installed versions.</p>\n<p>Here are some ways you can use to uninstall them:</p>\n<ul>\n<li>Manually—this involves manually removing any references of Node and npm from your system. Unfortunately, this process is difficult since there may be several directories with Node resources. For example, you may need to delete the node executable and node_modules from /usr/local/lib, delete .npm from the home directory, and delete many other directories.</li>\n<li>Using a script—this involves running a script to uninstall Node.js and npm automatically from your macOS system. You can find a simple script to use <a href=\"https://gist.github.com/nicerobot/2697848\">here</a>.</li>\n<li>Using <a href=\"https://brew.sh/\">Homebrew</a>—this package management utility lets you complete the uninstallation process fast and easily. You can run the following command:</li>\n</ul>\n<p>Then, once your system is clean, you can use any of the following methods to reinstall Node.js and npm on macOS:</p>\n<ul>\n<li>Reinstalling using a Node installer</li>\n<li>Reinstalling using Homebrew</li>\n<li>Reinstalling using a Node version manager</li>\n</ul>\n<p>Let's talk about each of them.</p>\n<h3>a) Reinstalling using a Node installer</h3>\n<p>To use the official Node installer for reinstalling the tools, go to the <a href=\"https://nodejs.org/en/download/\">Node.js download page</a> and select the version you want to install—just as we described previously.</p>\n<p>Remember to choose the macOS installer option. If you run the installer, it will complete the reinstallation process for you automatically.</p>\n<h3>b) Reinstalling using Homebrew</h3>\n<p>To reinstall using Homebrew, just run the following command on the macOS terminal:</p>\n<h3>c) Reinstalling using a Node version manager</h3>\n<p>You can also reinstall the two tools using the <a href=\"https://github.com/nvm-sh/nvm\">nvm</a> Node version manager. Since the process for using nvm is the same for both macOS and Linux, we'll describe how to use it in the next section.</p>\n<h2>How to reinstall npm and Node.js on Linux</h2>\n<p>Just like in the previous cases, you'll need to remove any installed version of Node.js and npm before reinstalling them on a Linux distribution, such as Ubuntu.</p>\n<p>Here are some ways you can use to uninstall them:</p>\n<ul>\n<li>Using the apt package manager—you can remove Node.js by running the following command:</li>\n</ul>\n<p>The above command will delete the distro-stable version while retaining the configuration files for later use. However, if you intend to remove the package as well as its configuration files, run the following:</p>\n<p>Finally, you can delete any unused packages that were installed automatically with the deleted package:</p>\n<ul>\n<li>Using nvm—you can also use the nvm Node version manager to uninstall Node.js from your system. We'll illustrate how to do this in the next section.</li>\n</ul>\n<p>Then, once your machine is clean, you can use any of the following methods to reinstall Node.js and npm on Linux:</p>\n<ul>\n<li>Reinstalling using a Node version manager</li>\n<li>Reinstalling using the apt package manager</li>\n</ul>\n<p>Let's talk about each of them.</p>\n<h3>a) Reinstalling using a Node version manager</h3>\n<p>As earlier mentioned, you can use the <a href=\"https://github.com/nvm-sh/nvm/\">nvm</a> Node version manager to reinstall Node.js and npm on both macOS and Linux.</p>\n<p>To install the script-based tool, you can use either Wget or cURL.</p>\n<p>If using Wget, execute the following on the terminal:</p>\n<p>If using cURL, execute this:</p>\n<p>The above commands will install nvm version 0.35.0 on your system. Remember to check <a href=\"https://github.com/nvm-sh/nvm/releases\">the latest version</a> and refer to it accordingly on the command you want to run.</p>\n<p>To verify if it was installed successfully, run the following:</p>\n<p>If all went well, it would output nvm.</p>\n<p>After installing nvm, you can use it to reinstall Node.js on your system.</p>\n<p>Simply, execute the following command:</p>\n<p>To reinstall a specific Node.js version, run:</p>\n<p>For example, to reinstall Node.js version 12.18.0, execute:</p>\n<p>Once reinstallation is complete, you can set that Node.js version for use as the system-wide default version:</p>\n<p>Furthermore, you can check the list of Node.js versions available for download by executing the following:</p>\n<p>To remove a Node.js version that you've set up using nvm, start by establishing if the version is currently active on your system:</p>\n<p>If it is not actively running, execute the following to uninstall it:</p>\n<p>On the other hand, if the version targeted for removal is the current active version, you'll need to deactivate nvm first:</p>\n<p>Then, you can use the above uninstall command to remove it from your system.</p>\n<h3>b) Reinstalling using the apt package manager</h3>\n<p>A simpler way to reinstall Node.js and npm on a Linux distribution, such as Ubuntu, is to use the apt package manager.</p>\n<p>To do so, you can start by refreshing your local package index:</p>\n<p>Then, reinstall the distro-stable Node.js version from the repositories:</p>\n<p>In most cases, this is all you need to get up and running with Node.js. Also, you may want to reinstall npm by running the following command:</p>\n<h2>Conclusion</h2>\n<p>That's how to reinstall npm and Node.js on Windows, macOS, and Linux.</p>\n<p>After completing the reinstallation, you'll avoid any performance issues that often arise from using malfunctioned versions of the technologies.</p>\n<p>---</p>\n<p>---</p>\n<p>Node.js is a popular open-source, cross-platform server-side environment for building robust applications. Since a vibrant community of contributors backs it, the platform is continuously updated to introduce new features, security patches, and other performance improvements.    node -version   node -v  wget -qO- <a href=\"https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh\">https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh</a> | bash  curl -o- <a href=\"https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh\">https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh</a> | bash  command -v nvm  nvm install node  nvm install -lts  nvm install &#x3C;version-number>  nvm install 12.18.3  nvm use 12.18.3  nvm lsnvm ls-remotenpm install -g nn &#x3C;version-number>n 12.18.3    nn ltsn latestnvm install &#x3C;version-number>nvm install 12.18.3nvm use 12.18.3nvm install latestnvm listnvm list availablewget <a href=\"https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xzsudo\">https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xzsudo</a> apt-get install xz-utilstar -C /usr/local -strip-components 1 -xJf node-v12.18.3-linux-x64.tar.xzbrew install nodebrew update #ensure Homebrew is up to date firstbrew upgrade nodebrew switch node 12.18.3</p>\n<p>So, updating to the latest Node.js version can help you to make the most of the technology. You can decide to work with the Long-term Supported (LTS) version or the Current version that comes with the latest features.</p>\n<p>Typically, LTS is recommended for most users because it is a stable version that provides predictable update releases as well as a slower introduction of substantial changes.</p>\n<p>In this article, you will learn how to quickly and easily update Node.js on different operating systems—macOS, Linux, and Windows.</p>\n<p>As we'll demonstrate, there are many ways of updating to the next version of Node.js. So, you can choose the option that best meets your system requirements and preferences.</p>\n<p>These are the updating options we'll talk about:</p>\n<ul>\n<li>Updating using a Node version manager on macOS or Linux</li>\n<li>Updating using a Node version manager on Windows</li>\n<li>Updating using a Node installer on Linux</li>\n<li>Updating using a Node installer on macOS and Windows</li>\n<li>Updating using Homebrew on macOS</li>\n</ul>\n<h2>Checking your version of Node.js</h2>\n<p>Before getting started, you can check the version of Node.js currently deployed on your system by running the following command on the terminal:</p>\n<p>or (shortened method):</p>\n<p>Let's now talk about the different ways on how to update Node.js.</p>\n<h2>1. Updating using a Node version manager on macOS or Linux</h2>\n<p>A Node version manager is a utility that lets you install different Node.js versions and switch flawlessly between them on your machine. You can also use it to update your version of Node.js.</p>\n<p>On macOS or Linux, you can use either of the following Node version managers:</p>\n<ul>\n<li>nvm</li>\n<li>n</li>\n</ul>\n<p>Let's talk about each of them.</p>\n<p>a) nvm</p>\n<p><a href=\"https://github.com/nvm-sh/nvm\">nvm</a> is a script-based version manager for Node.js. To install it on macOS or Linux, you can use either Wget or cURL.</p>\n<p>For Wget, run the following command on the terminal:</p>\n<p>For cURL, run the following:</p>\n<p>The above commands assume that you're installing nvm version 0.35.3. So, you'll need to check <a href=\"https://github.com/nvm-sh/nvm/releases\">the latest version</a> before installing it on your machine.</p>\n<p>With these commands, you can clone the repository to ~/.nvm. This way, you can make changes to your bash profile, allowing you to access nvm system-wide.</p>\n<p>To confirm if the installation was successful, you can run the following command:</p>\n<p>If everything went well, it'd output nvm.</p>\n<p>Next, you can simply download and update to the latest Node.js version by running the following:</p>\n<p>Note that node refers to an alias of the latest Node.js version.</p>\n<p>You can also reference LTS versions in aliases as well as .nvmrc files using the notation lts/* for the most recent LTS releases.</p>\n<p>Here is an example:</p>\n<p>If you want to install and upgrade to a specific version, you can run the following:</p>\n<p>For example, if you want to update Node.js to version 12.18.3, you can run:</p>\n<p>After the upgrade, you can set that version to be the default version to use throughout your system:</p>\n<p>You can see the list of installed Node.js versions by running this command:</p>\n<p>Also, you can see the list of versions available for installation by running this command:</p>\n<p>b) n</p>\n<p><a href=\"https://www.npmjs.com/package/n\">n</a> is another useful Node version manager you can use for updating Node.js on macOS and Linux.</p>\n<p>Since it's an <a href=\"https://renovate.whitesourcesoftware.com/blog/updating-npm-packages/\">npm-based package</a>, if you already have Node.js available on your environment, you can simply install it by running this command:</p>\n<p>Then, to download and update to your desired Node.js version, execute the following:</p>\n<p>For example, if you want to update Node.js to version 12.18.3, you can run:</p>\n<p>To see a list of your downloaded Node.js versions, run n on its own:</p>\n<p>You can specify to update to the newest LTS version by running:</p>\n<p>You can also specify to update to the latest current version by running:</p>\n<p>You can specify to update to the newest LTS version by running:</p>\n<h2></h2>\n<h2>2. Updating using a Node version manager on Windows</h2>\n<p>On Windows, you can use the following Node version manager:</p>\n<ul>\n<li>nvm-windows</li>\n</ul>\n<p>Let's talk about it.</p>\n<p><strong>a) nvm-windows</strong></p>\n<p><a href=\"https://github.com/coreybutler/nvm-windows/\">nvm-windows</a> is a Node version management tool for the Windows operating system. While it's not the same as nvm, both tools share several usage similarities for Node.js version management.</p>\n<p>Before installing nvm-windows, it's recommended to uninstall any available Node.js versions from your machine. This will avoid potential conflict issues during installation.</p>\n<p>Next, you can download and run the latest <a href=\"https://github.com/coreybutler/nvm-windows/releases\">nvm-setup.zip</a> installer.</p>\n<p>Also, since the utility runs in an Admin shell, you'll need to begin the Command Prompt or Powershell as an Administrator before using it.</p>\n<p>If you want to install and upgrade to a specific version, you can run the following:</p>\n<p>You can specify to update to the newest LTS version by running:</p>\n<p>For example, if you want to update Node.js to version 12.18.3, you can run:</p>\n<p>After the upgrade, you can switch to that version:</p>\n<p>You can also specify to update to the latest stable Node.js version:</p>\n<p>You can see the list of installed Node.js versions by running this command:</p>\n<p>Also, you can see the list of versions available for download by running this command:</p>\n<h2></h2>\n<h2>3. Updating using a Node installer on Linux</h2>\n<p>Using a Node installer is the least recommended way of upgrading Node.js on Linux. Nonetheless, if it's the only route you can use, then follow the following steps:</p>\n<ul>\n<li>Go to the official <a href=\"https://nodejs.org/en/download/\">Node.js downloads site</a>, which has different Linux binary packages, and select your preferred built-in installer or source code. You can choose either the LTS releases or the latest current releases.</li>\n<li>Download the binary package using your browser. Or, you can download it using the following Wget command on the terminal:</li>\n</ul>\n<p><img src=\"https://www.whitesourcesoftware.com/wp-content/media/2020/08/node-js-linux.png\"></p>\n<ul>\n<li>Download the binary package using your browser. Or, you can download it using the following Wget command on the terminal:</li>\n</ul>\n<p>Remember to change the version number on the Wget command depending on the one you want.</p>\n<ul>\n<li>Install the xz-utils utility using the following command:</li>\n</ul>\n<p>This utility will be used for unpacking the binary package.</p>\n<ul>\n<li>Finally, run the following command to unpack and install the binary package on usr/local:</li>\n</ul>\n<h2></h2>\n<h2>4. Updating using a Node installer on macOS and Windows</h2>\n<p>Another way of updating your Node.js on macOS and Windows is to go to the official <a href=\"https://nodejs.org/en/download/\">download site</a> and install the most recent version. This way, it'll overwrite your existing old version with the latest one.</p>\n<p>You can follow the following steps to update it using this method:</p>\n<ul>\n<li>On the Node.js download page, select either the LTS version or the latest current version.</li>\n</ul>\n<p><img src=\"https://www.whitesourcesoftware.com/wp-content/media/2020/08/node-js-mac-windows.png\"></p>\n<ul>\n<li>Depending on your system, click either the Windows Installer option or the macOS installer option.</li>\n<li>Run the installation wizard. It will magically complete the installation process and upgrade your Node.js version by replacing it with the new, updated one.</li>\n</ul>\n<h2>5. Updating using Homebrew on macOS</h2>\n<p><a href=\"https://brew.sh/\">Homebrew</a> is a popular package management utility for macOS.</p>\n<p>To use it for installing Node.js, run the following command on your macOS terminal:</p>\n<p>Later, if you'd like to update it, run the following commands:</p>\n<p>Furthermore, you can switch between installed Node.js versions:</p>"},{"url":"/docs/reference/installing-node/","relativePath":"docs/reference/installing-node.md","relativeDir":"docs/reference","base":"installing-node.md","name":"installing-node","frontmatter":{"title":"Installing Node","weight":0,"excerpt":"Installing Node","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Android<a href=\"https://nodejs.org/en/download/package-manager/#android\"></a></h2>\n<p>Android support is still experimental in Node.js, so precompiled binaries are not yet provided by Node.js developers.</p>\n<p>However, there are some third-party solutions. For example, <a href=\"https://termux.com/\">Termux</a> community provides terminal emulator and Linux environment for Android, as well as own package manager and <a href=\"https://github.com/termux/termux-packages\">extensive collection</a> of many precompiled applications. This command in Termux app will install the last available Node.js version:</p>\n<pre><code>pkg install nodejs\n</code></pre>\n<p>Currently, Termux Node.js binaries are linked against <code>system-icu</code> (depending on <code>libicu</code> package).</p>\n<h2>Arch Linux<a href=\"https://nodejs.org/en/download/package-manager/#arch-linux\"></a></h2>\n<p>Node.js and npm packages are available in the Community Repository.</p>\n<pre><code>pacman -S nodejs npm\n</code></pre>\n<h2>CentOS, Fedora and Red Hat Enterprise Linux<a href=\"https://nodejs.org/en/download/package-manager/#centos-fedora-and-red-hat-enterprise-linux\"></a></h2>\n<p>Node.js is available as a module called <code>nodejs</code> in CentOS/RHEL 8 and Fedora.</p>\n<pre><code>dnf module install nodejs:&#x3C;stream>\n</code></pre>\n<p>where <code>&#x3C;stream></code> corresponds to the major version of Node.js. To see a list of available streams:</p>\n<pre><code>dnf module list nodejs\n</code></pre>\n<p>For example, to install Node.js 12:</p>\n<pre><code>dnf module install nodejs:12\n</code></pre>\n<p>For CentOS/RHEL 7 Node.js is available via <a href=\"https://www.softwarecollections.org/en/scls/?search=NodeJS\">Software Collections</a>.</p>\n<h3>Alternatives<a href=\"https://nodejs.org/en/download/package-manager/#alternatives\"></a></h3>\n<p>These resources provide packages compatible with CentOS, Fedora, and RHEL.</p>\n<ul>\n<li><a href=\"https://nodejs.org/en/download/package-manager/#snap\">Node.js snaps</a> maintained and supported at <a href=\"https://github.com/nodejs/snap\">https://github.com/nodejs/snap</a></li>\n<li><a href=\"https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions\">Node.js binary distributions</a> maintained and supported by <a href=\"https://github.com/nodesource/distributions\">NodeSource</a></li>\n</ul>\n<h2>Debian and Ubuntu based Linux distributions<a href=\"https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions\"></a></h2>\n<p><a href=\"https://github.com/nodesource/distributions/blob/master/README.md\">Node.js binary distributions</a> are available from NodeSource.</p>\n<h3>Alternatives<a href=\"https://nodejs.org/en/download/package-manager/#alternatives-1\"></a></h3>\n<p>Packages compatible with Debian and Ubuntu based Linux distributions are available via <a href=\"https://nodejs.org/en/download/package-manager/#snap\">Node.js snaps</a>.</p>\n<h2>fnm<a href=\"https://nodejs.org/en/download/package-manager/#fnm\"></a></h2>\n<p>Fast and simple Node.js version manager built in Rust used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch Node versions automatically based on the current directory, etc. To install fnm, use this <a href=\"https://github.com/Schniz/fnm#using-a-script-macoslinux\">install script</a>.</p>\n<p>fnm has cross-platform support (macOS, Windows, Linux) &#x26; all popular shells (Bash, Zsh, Fish, PowerShell, Windows Command Line Prompt). fnm is built with speed in mind and compatibility support for <code>.node-version</code> and <code>.nvmrc</code> files.</p>\n<h2>FreeBSD<a href=\"https://nodejs.org/en/download/package-manager/#freebsd\"></a></h2>\n<p>The most recent release of Node.js is available via the <a href=\"https://www.freshports.org/www/node\">www/node</a> port.</p>\n<p>Install a binary package via <a href=\"https://www.freebsd.org/cgi/man.cgi?pkg\">pkg</a>:</p>\n<pre><code>pkg install node\n</code></pre>\n<p>Or compile it on your own using <a href=\"https://www.freebsd.org/cgi/man.cgi?ports\">ports</a>:</p>\n<pre><code>cd /usr/ports/www/node &#x26;&#x26; make install\n</code></pre>\n<h2>Gentoo<a href=\"https://nodejs.org/en/download/package-manager/#gentoo\"></a></h2>\n<p>Node.js is available in the portage tree.</p>\n<pre><code>emerge nodejs\n</code></pre>\n<h2>IBM i<a href=\"https://nodejs.org/en/download/package-manager/#ibm-i\"></a></h2>\n<p>LTS versions of Node.js are available from IBM, and are available via <a href=\"https://ibm.biz/ibmi-rpms\">the 'yum' package manager</a>. The package name is <code>nodejs</code> followed by the major version number (for instance, <code>nodejs12</code>, <code>nodejs14</code> etc)</p>\n<p>To install Node.js 14.x from the command line, run the following as a user with *ALLOBJ special authority:</p>\n<pre><code>yum install nodejs14\n</code></pre>\n<p>Node.js can also be installed with the IBM i Access Client Solutions product. See <a href=\"http://www-01.ibm.com/support/docview.wss?uid=nas8N1022619\">this support document</a> for more details</p>\n<h2>macOS<a href=\"https://nodejs.org/en/download/package-manager/#macos\"></a></h2>\n<p>Download the <a href=\"https://nodejs.org/en/#home-downloadhead\">macOS Installer</a> directly from the <a href=\"https://nodejs.org/\">nodejs.org</a> web site.</p>\n<p><em>If you want to download the package with bash:</em></p>\n<pre><code>curl \"https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\\.pkg&#x3C;/a>.*|\\1|p')}.pkg\" > \"$HOME/Downloads/node-latest.pkg\" &#x26;&#x26; sudo installer -store -pkg \"$HOME/Downloads/node-latest.pkg\" -target \"/\"\n</code></pre>\n<h3>Alternatives<a href=\"https://nodejs.org/en/download/package-manager/#alternatives-2\"></a></h3>\n<p>Using <a href=\"https://brew.sh/\">Homebrew</a>:</p>\n<pre><code>brew install node\n</code></pre>\n<p>Using <a href=\"https://www.macports.org/\">MacPorts</a>:</p>\n<pre><code>port install nodejs&#x3C;major version>\n\n# Example\nport install nodejs7\n</code></pre>\n<p>Using <a href=\"https://pkgsrc.joyent.com/install-on-osx/\">pkgsrc</a>:</p>\n<p>Install the binary package:</p>\n<pre><code>pkgin -y install nodejs\n</code></pre>\n<p>Or build manually from pkgsrc:</p>\n<pre><code>cd pkgsrc/lang/nodejs &#x26;&#x26; bmake install\n</code></pre>\n<h2>n<a href=\"https://nodejs.org/en/download/package-manager/#n\"></a></h2>\n<p><code>n</code> is a simple to use Node.js version manager for Mac and Linux. Specify the target version to install using a rich syntax, or select from a menu of previously downloaded versions. The versions are installed system-wide or user-wide, and for more targeted use you can run a version directly from the cached downloads.</p>\n<p>See the <a href=\"https://github.com/tj/n\">homepage</a> for install methods (boostrap, npm, Homebrew, third-party), and all the usage details.</p>\n<p>If you already have <code>npm</code> then installing <code>n</code> and then the newest LTS <code>node</code> version is as simple as:</p>\n<pre><code>npm install -g n\nn lts\n</code></pre>\n<h2>NetBSD<a href=\"https://nodejs.org/en/download/package-manager/#netbsd\"></a></h2>\n<p>Node.js is available in the pkgsrc tree:</p>\n<pre><code>cd /usr/pkgsrc/lang/nodejs &#x26;&#x26; make install\n</code></pre>\n<p>Or install a binary package (if available for your platform) using pkgin:</p>\n<pre><code>pkgin -y install nodejs\n</code></pre>\n<h2>Nodenv<a href=\"https://nodejs.org/en/download/package-manager/#nodenv\"></a></h2>\n<p><code>nodenv</code> is a lightweight node version manager, similar to <code>nvm</code>. It's simple and predictable. A rich plugin ecosystem lets you tailor it to suit your needs. Use <code>nodenv</code> to pick a Node version for your application and guarantee that your development environment matches production.</p>\n<p>Nodenv installation instructions are maintained <a href=\"https://github.com/nodenv/nodenv#installation\">on its Github page</a>. Please visit that page to ensure you're following the latest version of the installation steps.</p>\n<h2>nvm<a href=\"https://nodejs.org/en/download/package-manager/#nvm\"></a></h2>\n<p>Node Version Manager is a bash script used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch version, etc. To install nvm, use this <a href=\"https://github.com/nvm-sh/nvm#install--update-script\">install script</a>.</p>\n<p>On Unix / OS X systems Node.js built from source can be installed using <a href=\"https://github.com/creationix/nvm\">nvm</a> by installing into the location that nvm expects:</p>\n<pre><code>env VERSION=`python tools/getnodeversion.py` make install DESTDIR=`nvm_version_path v$VERSION` PREFIX=\"\"\n</code></pre>\n<p>After this you can use <code>nvm</code> to switch between released versions and versions built from source. For example, if the version of Node.js is v8.0.0-pre:</p>\n<pre><code>nvm use 8\n</code></pre>\n<p>Once the official release is out you will want to uninstall the version built from source:</p>\n<pre><code>nvm uninstall 8\n</code></pre>\n<h2>nvs<a href=\"https://nodejs.org/en/download/package-manager/#nvs\"></a></h2>\n<h4>Windows<a href=\"https://nodejs.org/en/download/package-manager/#windows\"></a></h4>\n<p>The <code>nvs</code> version manager is cross-platform and can be used on Windows, macOS, and Unix-like systems</p>\n<p>To install <code>nvs</code> on Windows go to the <a href=\"https://github.com/jasongin/nvs/releases\">release page</a> here and download the MSI installer file of the latest release.</p>\n<p>You can also use <code>chocolatey</code> to install it:</p>\n<pre><code>choco install nvs\n</code></pre>\n<h4>macOS,UnixLike<a href=\"https://nodejs.org/en/download/package-manager/#macos-unixlike\"></a></h4>\n<p>You can find the documentation regarding the installation steps of <code>nvs</code> in macOS/Unix-like systems <a href=\"https://github.com/jasongin/nvs/blob/master/doc/SETUP.md#mac-linux\">here</a></p>\n<h4>Usage<a href=\"https://nodejs.org/en/download/package-manager/#usage\"></a></h4>\n<p>After this you can use <code>nvs</code> to switch between different versions of node.</p>\n<p>To add the latest version of node:</p>\n<pre><code>nvs add latest\n</code></pre>\n<p>Or to add the latest LTS version of node:</p>\n<pre><code>nvs add lts\n</code></pre>\n<p>Then run the <code>nvs use</code> command to add a version of node to your <code>PATH</code> for the current shell:</p>\n<pre><code>$ nvs use lts\nPATH -= %LOCALAPPDATA%\\nvs\\default\nPATH += %LOCALAPPDATA%\\nvs\\node\\14.17.0\\x64\n</code></pre>\n<p>To add it to <code>PATH</code> permanently, use <code>nvs link</code>:</p>\n<pre><code>nvs link lts\n</code></pre>\n<h2>OpenBSD<a href=\"https://nodejs.org/en/download/package-manager/#openbsd\"></a></h2>\n<p>Node.js is available through the ports system.</p>\n<pre><code>/usr/ports/lang/node\n</code></pre>\n<p>Using <a href=\"https://man.openbsd.org/OpenBSD-current/man1/pkg_add.1\">pkg_add</a> on OpenBSD:</p>\n<pre><code>pkg_add node\n</code></pre>\n<h2>openSUSE and SLE<a href=\"https://nodejs.org/en/download/package-manager/#opensuse-and-sle\"></a></h2>\n<p>Node.js is available in the main repositories under the following packages:</p>\n<ul>\n<li>openSUSE Leap 15.2: <code>nodejs10</code>, <code>nodejs12</code>, <code>nodejs14</code></li>\n<li>openSUSE Tumbleweed: <code>nodejs16</code></li>\n<li>SUSE Linux Enterprise Server (SLES) 12: <code>nodejs10</code>, <code>nodejs12</code>, and <code>nodejs14</code> (The \"Web and Scripting Module\" must be <a href=\"https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP5/#intro-modulesExtensionsRelated\">enabled</a>.)</li>\n<li>SUSE Linux Enterprise Server (SLES) 15 SP2: <code>nodejs10</code>, <code>nodejs12</code>, and <code>nodejs14</code> (The \"Web and Scripting Module\" must be <a href=\"https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15/#Intro.Module\">enabled</a>.)</li>\n</ul>\n<p>For example, to install Node.js 14.x on openSUSE Leap 15.2, run the following as root:</p>\n<pre><code>zypper install nodejs14\n</code></pre>\n<p>Different major versions of Node can be installed and used concurrently.</p>\n<h2>SmartOS and illumos<a href=\"https://nodejs.org/en/download/package-manager/#smartos-and-illumos\"></a></h2>\n<p>SmartOS images come with pkgsrc pre-installed. On other illumos distributions, first install <a href=\"https://pkgsrc.joyent.com/install-on-illumos/\">pkgsrc</a>, then you may install the binary package as normal:</p>\n<pre><code>pkgin -y install nodejs\n</code></pre>\n<p>Or build manually from pkgsrc:</p>\n<pre><code>cd pkgsrc/lang/nodejs &#x26;&#x26; bmake install\n</code></pre>\n<h2>Snap<a href=\"https://nodejs.org/en/download/package-manager/#snap\"></a></h2>\n<p><a href=\"https://github.com/nodejs/snap\">Node.js snaps</a> are available as <a href=\"https://snapcraft.io/node\"><code>node</code></a> on the Snap store.</p>\n<h2>Solus<a href=\"https://nodejs.org/en/download/package-manager/#solus\"></a></h2>\n<p>Solus provides Node.js in its main repository.</p>\n<pre><code>sudo eopkg install nodejs\n</code></pre>\n<h2>Void Linux<a href=\"https://nodejs.org/en/download/package-manager/#void-linux\"></a></h2>\n<p>Void Linux ships Node.js stable in the main repository.</p>\n<pre><code>xbps-install -Sy nodejs\n</code></pre>\n<h2>Windows<a href=\"https://nodejs.org/en/download/package-manager/#windows-1\"></a></h2>\n<p>Download the <a href=\"https://nodejs.org/en/#home-downloadhead\">Windows Installer</a> directly from the <a href=\"https://nodejs.org/\">nodejs.org</a> web site.</p>\n<h3>Alternatives<a href=\"https://nodejs.org/en/download/package-manager/#alternatives-3\"></a></h3>\n<p>Using <a href=\"https://chocolatey.org/\">Chocolatey</a>:</p>\n<pre><code>cinst nodejs\n# or for full install with npm\ncinst nodejs.install\n</code></pre>\n<p>Using <a href=\"https://scoop.sh/\">Scoop</a>:</p>\n<pre><code>scoop install nodejs\n</code></pre>"},{"url":"/docs/reference/psql/","relativePath":"docs/reference/psql.md","relativeDir":"docs/reference","base":"psql.md","name":"psql","frontmatter":{"title":"Postgresql Cheat Sheet","weight":0,"excerpt":"Postgresql Cheat Sheet","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Postgresql Cheat Sheet</h1>\n<p>PostgreSQL commands</p>\n<hr>\n<h4><a href=\"http://medium.com/codex\" class=\"markup--anchor markup--h4-anchor\">CODEX</a></h4>\n<h3>PostgreSQL Cheat Sheet</h3>\n<h4><strong>Each table is made up of rows and columns. If you think of a table as a grid, the column go from left to right across the grid and each entry of data is listed down as a row.</strong></h4>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ZLWhY1d1jdboZh_s.png\" class=\"graf-image\" /></figure><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\"><strong>ALLOFMYOTHERARTICLES</strong><br />\nbryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a>\n<p>Each row in a relational is uniquely identified by a primary key. This can be by one or more sets of column values. In most scenarios it is a single column, such as employeeID.</p>\n<p>Every relational table has one primary key. Its purpose is to uniquely identify each row in the database. No two rows can have the same primary key value. The practical result of this is that you can select every single row by just knowing its primary key.</p>\n<p>SQL Server UNIQUE constraints allow you to ensure that the data stored in a column, or a group of columns, is unique among the rows in a table.</p>\n<p>Although both UNIQUE and <a href=\"https://www.sqlservertutorial.net/sql-server-basics/sql-server-primary-key/\" class=\"markup--anchor markup--p-anchor\">PRIMARY KEY</a> constraints enforce the uniqueness of data, you should use the UNIQUE constraint instead of PRIMARY KEY constraint when you want to enforce the uniqueness of a column, or a group of columns, that are not the primary key columns.</p>\n<p>Different from PRIMARY KEY constraints, UNIQUE constraints allow NULL. Moreover, UNIQUE constraints treat the NULL as a regular value, therefore, it only allows one NULL per column.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*kgzq5NoL5ejBGvuZ4qLDaQ.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*hr8DccnpiR2Uj5UI3iLsOQ.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*RiWJpwpVMdge3Sqofn3srA.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*GN5aSwENOvntpfk90rHYFg.png\" class=\"graf-image\" /></figure>Create a new <a href=\"https://www.postgresqltutorial.com/postgresql-roles/\" class=\"markup--anchor markup--p-anchor\">role</a>:\n<pre><code>CREATE ROLE role_name;\n</code></pre>\n<p>Create a new role with a <code>username</code> and <code>password</code>:</p>\n<pre><code>CREATE ROLE username NOINHERIT LOGIN PASSWORD password;\n</code></pre>\n<p>Change role for the current session to the <code>new_role</code>:</p>\n<pre><code>SET ROLE new_role;\n</code></pre>\n<p>Allow <code>role_1</code> to set its role as <code>role_2:</code></p>\n<pre><code>GRANT role_2 TO role_1;\n</code></pre>\n<h3>Managing databases</h3>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-create-database/\" class=\"markup--anchor markup--p-anchor\">Create a new database</a>:</p>\n<pre><code>CREATE DATABASE [IF NOT EXISTS] db_name;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-drop-database/\" class=\"markup--anchor markup--p-anchor\">Delete a database permanently</a>:</p>\n<pre><code>DROP DATABASE [IF EXISTS] db_name;\n</code></pre>\n<h3>Managing tables</h3>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-create-table/\" class=\"markup--anchor markup--p-anchor\">Create a new table</a> or a <a href=\"https://www.postgresqltutorial.com/postgresql-temporary-table/\" class=\"markup--anchor markup--p-anchor\">temporary table</a></p>\n<pre><code>CREATE [TEMP] TABLE [IF NOT EXISTS] table_name(\n       pk SERIAL PRIMARY KEY,\n   c1 type(size) NOT NULL,\n   c2 type(size) NULL,\n   ...\n);\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-add-column/\" class=\"markup--anchor markup--p-anchor\">Add a new column</a> to a table:</p>\n<pre><code>ALTER TABLE table_name ADD COLUMN new_column_name TYPE;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-drop-column/\" class=\"markup--anchor markup--p-anchor\">Drop a column</a> in a table:</p>\n<pre><code>ALTER TABLE table_name DROP COLUMN column_name;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-rename-column/\" class=\"markup--anchor markup--p-anchor\">Rename a column</a>:</p>\n<pre><code>ALTER TABLE table_name RENAME column_name TO new_column_name;\n</code></pre>\n<p>Set or remove a default value for a column:</p>\n<pre><code>ALTER TABLE table_name ALTER COLUMN [SET DEFAULT value | DROP DEFAULT]\n</code></pre>\n<p>Add a <a href=\"https://www.postgresqltutorial.com/postgresql-primary-key/\" class=\"markup--anchor markup--p-anchor\">primary key</a> to a table.</p>\n<pre><code>ALTER TABLE table_name ADD PRIMARY KEY (column,...);\n</code></pre>\n<p>Remove the primary key from a table.</p>\n<pre><code>ALTER TABLE table_name\nDROP CONSTRAINT primary_key_constraint_name;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-rename-table/\" class=\"markup--anchor markup--p-anchor\">Rename a table</a>.</p>\n<pre><code>ALTER TABLE table_name RENAME TO new_table_name;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-drop-table/\" class=\"markup--anchor markup--p-anchor\">Drop a table</a> and its dependent objects:</p>\n<pre><code>DROP TABLE [IF EXISTS] table_name CASCADE;\n</code></pre>\n<h3>Managing views</h3>\n<p><a href=\"https://www.postgresqltutorial.com/managing-postgresql-views/\" class=\"markup--anchor markup--p-anchor\">Create a view</a>:</p>\n<pre><code>CREATE OR REPLACE view_name AS\nquery;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-recursive-view/\" class=\"markup--anchor markup--p-anchor\">Create a recursive view</a>:</p>\n<pre><code>CREATE RECURSIVE VIEW view_name(column_list) AS\nSELECT column_list;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-materialized-views/\" class=\"markup--anchor markup--p-anchor\">Create a materialized view</a>:</p>\n<pre><code>CREATE MATERIALIZED VIEW view_name\nAS\nquery\nWITH [NO] DATA;\n</code></pre>\n<p>Refresh a materialized view:</p>\n<pre><code>REFRESH MATERIALIZED VIEW CONCURRENTLY view_name;\n</code></pre>\n<p>Drop a view:</p>\n<pre><code>DROP VIEW [ IF EXISTS ] view_name;\n</code></pre>\n<p>Drop a materialized view:</p>\n<pre><code>DROP MATERIALIZED VIEW view_name;\n</code></pre>\n<p>Rename a view:</p>\n<pre><code>ALTER VIEW view_name RENAME TO new_name;\n</code></pre>\n<h3>Managing indexes</h3>\n<p>Creating an index with the specified name on a table</p>\n<pre><code>CREATE [UNIQUE] INDEX index_name\nON table (column,...)\n</code></pre>\n<p>Removing a specified index from a table</p>\n<pre><code>DROP INDEX index_name;\n</code></pre>\n<h3>Querying data from tables</h3>\n<p>Query all data from a table:</p>\n<pre><code>SELECT * FROM table_name;\n</code></pre>\n<p>Query data from specified columns of all rows in a table:</p>\n<pre><code>SELECT column_list\nFROM table;\n</code></pre>\n<p>Query data and select only unique rows:</p>\n<pre><code>SELECT DISTINCT (column)\nFROM table;\n</code></pre>\n<p>Query data from a table with a filter:</p>\n<pre><code>SELECT *\nFROM table\nWHERE condition;\n</code></pre>\n<p>Assign an <a href=\"https://www.postgresqltutorial.com/postgresql-alias/\" class=\"markup--anchor markup--p-anchor\">alias</a> to a column in the result set:</p>\n<pre><code>SELECT column_1 AS new_column_1, ...\nFROM table;\n</code></pre>\n<p>Query data using the <code>LIKE</code> operator:</p>\n<pre><code>SELECT * FROM table_name\nWHERE column LIKE '%value%'\n</code></pre>\n<p>Query data using the <code>BETWEEN</code>operator:</p>\n<pre><code>SELECT * FROM table_name\nWHERE column BETWEEN low AND high;\n</code></pre>\n<p>Query data using the <code>IN</code>operator:</p>\n<pre><code>SELECT * FROM table_name\nWHERE column IN (value1, value2,...);\n</code></pre>\n<p>Constrain the returned rows with the <code>LIMIT</code> clause:</p>\n<pre><code>SELECT * FROM table_name\nLIMIT limit OFFSET offset\nORDER BY column_name;\n</code></pre>\n<p>Query data from multiple using the <a href=\"https://www.postgresqltutorial.com/postgresql-inner-join/\" class=\"markup--anchor markup--p-anchor\">inner join</a>, <a href=\"https://www.postgresqltutorial.com/postgresql-left-join/\" class=\"markup--anchor markup--p-anchor\">left join</a>, <a href=\"https://www.postgresqltutorial.com/postgresql-full-outer-join/\" class=\"markup--anchor markup--p-anchor\">full outer join</a>, <a href=\"https://www.postgresqltutorial.com/postgresql-cross-join/\" class=\"markup--anchor markup--p-anchor\">cross join</a> and <a href=\"https://www.postgresqltutorial.com/postgresql-natural-join/\" class=\"markup--anchor markup--p-anchor\">natural join</a>:</p>\n<pre><code>SELECT *\nFROM table1\nINNER JOIN table2 ON conditions\nSELECT *\nFROM table1\nLEFT JOIN table2 ON conditions\nSELECT *\nFROM table1\nFULL OUTER JOIN table2 ON conditions\nSELECT *\nFROM table1\nCROSS JOIN table2;\nSELECT *\nFROM table1\nNATURAL JOIN table2;\n</code></pre>\n<p>Return the number of rows of a table.</p>\n<pre><code>SELECT COUNT (*)\nFROM table_name;\n</code></pre>\n<p>Sort rows in ascending or descending order:</p>\n<pre><code>SELECT select_list\nFROM table\nORDER BY column ASC [DESC], column2 ASC [DESC],...;\n</code></pre>\n<p>Group rows using <code>GROUP BY</code> clause.</p>\n<pre><code>SELECT *\nFROM table\nGROUP BY column_1, column_2, ...;\n</code></pre>\n<p>Filter groups using the <code>HAVING</code> clause.</p>\n<pre><code>SELECT *\nFROM table\nGROUP BY column_1\nHAVING condition;\n</code></pre>\n<h3>Set operations</h3>\n<p>Combine the result set of two or more queries with <code>UNION</code> operator:</p>\n<pre><code>SELECT * FROM table1\nUNION\nSELECT * FROM table2;\n</code></pre>\n<p>Minus a result set using <code>EXCEPT</code> operator:</p>\n<pre><code>SELECT * FROM table1\nEXCEPT\nSELECT * FROM table2;\n</code></pre>\n<p>Get intersection of the result sets of two queries:</p>\n<pre><code>SELECT * FROM table1\nINTERSECT\nSELECT * FROM table2;\n</code></pre>\n<h3>Modifying data</h3>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-insert/\" class=\"markup--anchor markup--p-anchor\">Insert a new row into a table</a>:</p>\n<pre><code>INSERT INTO table(column1,column2,...)\nVALUES(value_1,value_2,...);\n</code></pre>\n<p>Insert multiple rows into a table:</p>\n<pre><code>INSERT INTO table_name(column1,column2,...)\nVALUES(value_1,value_2,...),\n      (value_1,value_2,...),\n      (value_1,value_2,...)...\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-update/\" class=\"markup--anchor markup--p-anchor\">Update</a> data for all rows:</p>\n<pre><code>UPDATE table_name\nSET column_1 = value_1,\n    ...;\n</code></pre>\n<p>Update data for a set of rows specified by a condition in the <code>WHERE</code> clause.</p>\n<pre><code>UPDATE table\nSET column_1 = value_1,\n    ...\nWHERE condition;\n</code></pre>\n<p><a href=\"https://www.postgresqltutorial.com/postgresql-delete/\" class=\"markup--anchor markup--p-anchor\">Delete all rows</a> of a table:</p>\n<pre><code>DELETE FROM table_name;\n</code></pre>\n<p>Delete specific rows based on a condition:</p>\n<pre><code>DELETE FROM table_name\nWHERE condition;\n</code></pre>\n<h3>Performance</h3>\n<p>Show the query plan for a query:</p>\n<pre><code>EXPLAIN query;\n</code></pre>\n<p>Show and execute the query plan for a query:</p>\n<pre><code>EXPLAIN ANALYZE query;\n</code></pre>\n<p>Collect statistics:</p>\n<pre><code>ANALYZE table_name;\n</code></pre>\n<hr>\n<h3>Postgres &#x26; JSON:</h3>\n<h3>Creating the DB and the Table</h3>\n<pre><code>DROP DATABASE IF EXISTS books_db;\nCREATE DATABASE books_db WITH ENCODING='UTF8' TEMPLATE template0;\n\nDROP TABLE IF EXISTS books;\n\nCREATE TABLE books (\n  id SERIAL PRIMARY KEY,\n  client VARCHAR NOT NULL,\n  data JSONb NOT NULL\n);\n</code></pre>\n<h3>Populating the DB</h3>\n<pre><code>INSERT INTO books(client, data) values( 'Joe', '{ \"title\": \"Siddhartha\", \"author\": { \"first_name\": \"Herman\", \"last_name\": \"Hesse\" } }' ); INSERT INTO books(client, data) values('Jenny', '{ \"title\": \"Bryan Guner\", \"author\": { \"first_name\": \"Jack\", \"last_name\": \"Kerouac\" } }'); INSERT INTO books(client, data) values('Jenny', '{ \"title\": \"100 años de soledad\", \"author\": { \"first_name\": \"Gabo\", \"last_name\": \"Marquéz\" } }');\n</code></pre>\n<p>Lets see everything inside the table books:</p>\n<pre><code>SELECT * FROM books;\n</code></pre>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*GOQQ0qNGak2yIrtQ\" class=\"graf-image\" /></figure>### `->` operator returns values out of JSON columns\n<p>Selecting 1 column:</p>\n<pre><code>SELECT client,\n    data->'title' AS title\n    FROM books;\n</code></pre>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*OIVYOfYcbVh65Mt5\" class=\"graf-image\" /></figure>Selecting 2 columns:\n<pre><code>SELECT client,\n   data->'title' AS title, data->'author' AS author\n   FROM books;\n</code></pre>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*fEzPkSY8yGexKOk4\" class=\"graf-image\" /></figure>### `->` vs `->>`\n<p>The <code>-></code> operator returns the original JSON type (which might be an object), whereas <code>->></code> returns text.</p>\n<h3>Return NESTED objects</h3>\n<p>You can use the <code>-></code> to return a nested object and thus chain the operators:</p>\n<pre><code>SELECT client,\n   data->'author'->'last_name' AS author\n   FROM books;\n</code></pre>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*lwy8bR7igaroMXeb\" class=\"graf-image\" /></figure>### Filtering\n<p>Select rows based on a value inside your JSON:</p>\n<pre><code>SELECT\n client,\n data->'title' AS title\n FROM books\n  WHERE data->'title' = '\"Bryan Guner\"';\n</code></pre>\n<p>Notice WHERE uses <code>-></code> so we must compare to JSON <code>'\"Bryan Guner\"'</code></p>\n<p>Or we could use <code>->></code> and compare to <code>'Bryan Guner'</code></p>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*poASndLoU71qlXqE\" class=\"graf-image\" /></figure>### Nested filtering\n<p>Find rows based on the value of a nested JSON object:</p>\n<pre><code>SELECT\n client,\n data->'title' AS title\n FROM books\n  WHERE data->'author'->>'last_name' = 'Kerouac';\n</code></pre>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*R1kOhDK19ntdUYkq\" class=\"graf-image\" /></figure>### A real world example\n<pre><code>CREATE TABLE events (\n  name varchar(200),\n  visitor_id varchar(200),\n  properties json,\n  browser json\n);\n</code></pre>\n<p>We're going to store events in this table, like pageviews. Each event has properties, which could be anything (e.g. current page) and also sends information about the browser (like OS, screen resolution, etc). Both of these are completely free form and could change over time (as we think of extra stuff to track).</p>\n<pre><code>INSERT INTO events VALUES (\n  'pageview', '1',\n  '{ \"page\": \"/\" }',\n  '{ \"name\": \"Chrome\", \"os\": \"Mac\", \"resolution\": { \"x\": 1440, \"y\": 900 } }'\n);\nINSERT INTO events VALUES (\n  'pageview', '2',\n  '{ \"page\": \"/\" }',\n  '{ \"name\": \"Firefox\", \"os\": \"Windows\", \"resolution\": { \"x\": 1920, \"y\": 1200 } }'\n);\nINSERT INTO events VALUES (\n  'pageview', '1',\n  '{ \"page\": \"/account\" }',\n  '{ \"name\": \"Chrome\", \"os\": \"Mac\", \"resolution\": { \"x\": 1440, \"y\": 900 } }'\n);\nINSERT INTO events VALUES (\n  'purchase', '5',\n  '{ \"amount\": 10 }',\n  '{ \"name\": \"Firefox\", \"os\": \"Windows\", \"resolution\": { \"x\": 1024, \"y\": 768 } }'\n);\nINSERT INTO events VALUES (\n  'purchase', '15',\n  '{ \"amount\": 200 }',\n  '{ \"name\": \"Firefox\", \"os\": \"Windows\", \"resolution\": { \"x\": 1280, \"y\": 800 } }'\n);\nINSERT INTO events VALUES (\n  'purchase', '15',\n  '{ \"amount\": 500 }',\n  '{ \"name\": \"Firefox\", \"os\": \"Windows\", \"resolution\": { \"x\": 1280, \"y\": 800 } }'\n);\n</code></pre>\n<p>Now lets select everything:</p>\n<pre><code>SELECT * FROM events;\n</code></pre>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ZPHfB4FxjSIlAVxL\" class=\"graf-image\" /></figure>### JSON operators + PostgreSQL aggregate functions\n<p>Using the JSON operators, combined with traditional PostgreSQL aggregate functions, we can pull out whatever we want. You have the full might of an RDBMS at your disposal.</p>\n<ul>\n<li><span id=\"4ffd\">Lets see browser usage:</span></li>\n<li><span id=\"261c\"><code>SELECT browser->>'name' AS browser, count(browser) FROM events GROUP BY browser->>'name';</code></span></li>\n</ul>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*4lEv2DgUk33FeUgo\" class=\"graf-image\" /></figure>-   <span id=\"946c\">Total revenue per visitor:</span>\n<p><code>SELECT visitor_id, SUM(CAST(properties->>'amount' AS integer)) AS total FROM events WHERE CAST(properties->>'amount' AS integer) > 0 GROUP BY visitor_id;</code></p>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*HxOS3CgwXBJ6A2FP\" class=\"graf-image\" /></figure>-   <span id=\"9850\">Average screen resolution</span>\n-   <span id=\"132f\">`SELECT AVG(CAST(browser->'resolution'->>'x' AS integer)) AS width, AVG(CAST(browser->'resolution'->>'y' AS integer)) AS height FROM events;`</span>\n<p>Output:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*iyv4Iv4Rc8M8mwt1\" class=\"graf-image\" /></figure>#### If you found this guide helpful feel free to checkout my github/gists where I host similar content:\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--p-anchor\">bgoonz's gists · GitHub</a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p>Or Checkout my personal Resource Site:</p>\n<p><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://goofy-euclid-1cd736.netlify.app/\"><strong>a/A-Student-Resources</strong><br />\n<em>Edit description</em>goofy-euclid-1cd736.netlify.app</a><a href=\"https://goofy-euclid-1cd736.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:</h3>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://gist.github.com/bgoonz\"><strong>bgoonz's gists</strong><br />\n<em>Instantly share code, notes, and snippets. Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python |…</em>gist.github.com</a><a href=\"https://gist.github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>Or Checkout my personal Resource Site:</h3>"},{"url":"/docs/reference/intro-to-nodejs/","relativePath":"docs/reference/intro-to-nodejs.md","relativeDir":"docs/reference","base":"intro-to-nodejs.md","name":"intro-to-nodejs","frontmatter":{"title":"Intro To NodeJS","weight":0,"excerpt":"A Node.js app runs in a single process, without creating a new thread for every request.","seo":{"title":"","description":"Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project!","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Enter the NodeJS</h2>\n<p>Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project!</p>\n<p>Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant.</p>\n<p>A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.</p>\n<p>When Node.js performs an I/O operation, like reading from the network, accessing a database or the filesystem, instead of blocking the thread and wasting CPU cycles waiting, Node.js will resume the operations when the response comes back.</p>\n<p>This allows Node.js to handle thousands of concurrent connections with a single server without introducing the burden of managing thread concurrency, which could be a significant source of bugs.</p>\n<p>Node.js has a unique advantage because millions of frontend developers that write JavaScript for the browser are now able to write the server-side code in addition to the client-side code without the need to learn a completely different language.</p>\n<p>In Node.js the new ECMAScript standards can be used without problems, as you don't have to wait for all your users to update their browsers - you are in charge of deciding which ECMAScript version to use by changing the Node.js version, and you can also enable specific experimental features by running Node.js with flags.</p>\n<h2><a href=\"https://nodejs.dev/learn#a-vast-number-of-libraries\"></a>A Vast Number of Libraries</h2>\n<p>npm with its simple structure helped the ecosystem of Node.js proliferate, and now the npm registry hosts over 1,000,000 open source packages you can freely use.</p>\n<h2><a href=\"https://nodejs.dev/learn#an-example-nodejs-application\"></a>An Example Node.js Application</h2>\n<p>The most common example Hello World of Node.js is a web server:</p>\n<p>This code first includes the Node.js <a href=\"https://nodejs.org/api/http.html\"><code>http</code> module</a>.</p>\n<p>Node.js has a fantastic <a href=\"https://nodejs.org/api/\">standard library</a>, including first-class support for networking.</p>\n<p>The <code>createServer()</code> method of <code>http</code> creates a new HTTP server and returns it.</p>\n<p>The server is set to listen on the specified port and host name. When the server is ready, the callback function is called, in this case informing us that the server is running.</p>\n<p>Whenever a new request is received, the <a href=\"https://nodejs.org/api/http.html#http_event_request\"><code>request</code> event</a> is called, providing two objects: a request (an <a href=\"https://nodejs.org/api/http.html#http_class_http_incomingmessage\"><code>http.IncomingMessage</code></a> object) and a response (an <a href=\"https://nodejs.org/api/http.html#http_class_http_serverresponse\"><code>http.ServerResponse</code></a> object).</p>\n<p>Those 2 objects are essential to handle the HTTP call.</p>\n<p>The first provides the request details. In this simple example, this is not used, but you could access the request headers and request data.</p>\n<p>The second is used to return data to the caller.</p>\n<p>In this case with:</p>\n<p>JScopy</p>\n<p>res.statusCode = 200</p>\n<p>we set the statusCode property to 200, to indicate a successful response.</p>\n<p>We set the Content-Type header:</p>\n<p>JScopy</p>\n<p>res.setHeader('Content-Type', 'text/plain')</p>\n<p>and we close the response, adding the content as an argument to <code>end()</code>:</p>\n<p>JScopy</p>\n<p>res.end('Hello World\\n')</p>\n<h2><a href=\"https://nodejs.dev/learn#nodejs-frameworks-and-tools\"></a>Node.js Frameworks and Tools</h2>\n<p>Node.js is a low-level platform. In order to make things easy and exciting for developers, thousands of libraries were built upon Node.js by the community.</p>\n<p>Many of those established over time as popular options. Here is a non-comprehensive list of the ones worth learning:</p>\n<ul>\n<li><a href=\"https://adonisjs.com/\"><strong>AdonisJS</strong></a>: A TypeScript-based fully featured framework highly focused on developer ergonomics, stability, and confidence. Adonis is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"https://eggjs.org/en/\"><strong>Egg.js</strong></a>: A framework to build better enterprise frameworks and apps with Node.js &#x26; Koa.</li>\n<li><a href=\"https://expressjs.com/\"><strong>Express</strong></a>: It provides one of the most simple yet powerful ways to create a web server. Its minimalist approach, unopinionated, focused on the core features of a server, is key to its success.</li>\n<li><a href=\"https://fastify.io/\"><strong>Fastify</strong></a>: A web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. Fastify is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"https://feathersjs.com/\"><strong>FeatherJS</strong></a>: Feathers is a lightweight web-framework for creating real-time applications and REST APIs using JavaScript or TypeScript. Build prototypes in minutes and production-ready apps in days.</li>\n<li><a href=\"https://www.gatsbyjs.com/\"><strong>Gatsby</strong></a>: A <a href=\"https://reactjs.org/\">React</a>-based, <a href=\"https://graphql.org/\">GraphQL</a> powered, static site generator with a very rich ecosystem of plugins and starters.</li>\n<li><a href=\"https://hapijs.com/\"><strong>hapi</strong></a>: A rich framework for building applications and services that enables developers to focus on writing reusable application logic instead of spending time building infrastructure.</li>\n<li><a href=\"http://koajs.com/\"><strong>koa</strong></a>: It is built by the same team behind Express, aims to be even simpler and smaller, building on top of years of knowledge. The new project born out of the need to create incompatible changes without disrupting the existing community.</li>\n<li><a href=\"https://loopback.io/\"><strong>Loopback.io</strong></a>: Makes it easy to build modern applications that require complex integrations.</li>\n<li><a href=\"https://meteor.com/\"><strong>Meteor</strong></a>: An incredibly powerful full-stack framework, powering you with an isomorphic approach to building apps with JavaScript, sharing code on the client and the server. Once an off-the-shelf tool that provided everything, now integrates with frontend libs <a href=\"https://reactjs.org/\">React</a>, <a href=\"https://vuejs.org/\">Vue</a>, and <a href=\"https://angular.io/\">Angular</a>. Can be used to create mobile apps as well.</li>\n<li><a href=\"https://github.com/zeit/micro\"><strong>Micro</strong></a>: It provides a very lightweight server to create asynchronous HTTP microservices.</li>\n<li><a href=\"https://nestjs.com/\"><strong>NestJS</strong></a>: A TypeScript based progressive Node.js framework for building enterprise-grade efficient, reliable and scalable server-side applications.</li>\n<li><a href=\"https://nextjs.org/\"><strong>Next.js</strong></a>: <a href=\"https://reactjs.org/\">React</a> framework that gives you the best developer experience with all the features you need for production: hybrid static &#x26; server rendering, TypeScript support, smart bundling, route pre-fetching, and more.</li>\n<li><a href=\"https://nx.dev/\"><strong>Nx</strong></a>: A toolkit for full-stack monorepo development using NestJS, Express, <a href=\"https://reactjs.org/\">React</a>, <a href=\"https://angular.io/\">Angular</a>, and more! Nx helps scale your development from one team building one application to many teams collaborating on multiple applications!</li>\n<li><a href=\"https://sapper.svelte.dev/\"><strong>Sapper</strong></a>: Sapper is a framework for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing. Offers SSR and more!</li>\n<li><a href=\"https://socket.io/\"><strong>Socket.io</strong></a>: A real-time communication engine to build network applications.</li>\n<li><a href=\"https://strapi.io/\"><strong>Strapi</strong></a>: Strapi is a flexible, open-source Headless CMS that gives developers the freedom to choose their favorite tools and frameworks while also allowing editors to easily manage and distribute their content. By making the admin panel and API extensible through a plugin system, Strapi enables the world's largest companies to accelerate content delivery while building beautiful digital experiences.</li>\n</ul>\n<h1>Extended Version:</h1>\n<iframe src=\"https://codesandbox.io/embed/nodejs-examples-4ohjz?autoresize=1&expanddevtools=1&fontsize=13&hidenavigation=1&theme=light&view=editor\"\n     style=\"width:100%; height:400px; border:2; border-radius: 15px; overflow:auto;resize:both;\"\n     title=\"nodejs-examples\"\n     allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n     sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n   ></iframe>\n<h1>Introduction to JavaScript</h1>\n<p>JavaScript is dynamically typed single-threaded interpreted languages for the Web. That means if you are doing web development, you can use this language to perform some operating on the web page, like running some JavaScript code when a button is clicked by the user.</p>\n<p>JavaScript is a dynamically typed language which means a variable can hold any data type like String or Number in its lifetime and JavaScript interpreter won't complain about it. It's single-threaded which means your JavaScript code runs synchronously or sequentially line by line. It's interpreted which means you don't need to compile your JavaScript code.</p>\n<p>JavaScript is interactive, which means you can directly feed JavaScript code to the interpreter and it will be executed immediately. You can try this by opening <a href=\"https://developers.google.com/web/tools/chrome-devtools/\">DevTools</a> in the browser (_in Chrome, press _<code>*command** + **option** + **i*</code>) or right-click anywhere on the page and click inspect. Then go to the console tab, here you can type any valid JavaScript code and press enter to run it. Use <code>shift + enter</code> to add a new-line in your code.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*iSdHW-r4lmJ41vrpm_0lxQ.png\"></p>\n<p>(interacting with JavaScript interpreter)</p>\n<p>Every browser ships a JavaScript Interpreter also called a JavaScript Engine. <a href=\"https://v8.dev/\">V8</a> is the JavaScript engine designed by Google and used in the Google Chrome browser while <a href=\"https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey\">SpiderMonkey</a> is a JavaScript engine developed by Mozilla for their Firefox browser.</p>\n<p>Since JavaScript engine designed by every browser is different, <a href=\"https://en.wikipedia.org/wiki/Ecma_International\">ECMA</a> standardizes features of JavaScript. This standard is known as <a href=\"https://en.wikipedia.org/wiki/ECMAScript\">ECMAScript</a> (<em>pronounced as ek-ma-script</em>). Whenever ECMA adds a feature to this JavaScript standard, the browser has to add it in their JavaScript engine to stay in the competition (<em>though this process is very slow</em>).</p>\n<p>JavaScript is a very easy language to learn and fun to write. Every year, new features are added to ECMAScript which brings JavaScript one more step closer to dominate the planet. The latest major revision of JavaScript is <a href=\"http://es6-features.org/\">ES6</a> or ECMAScript 6 or ECMAScript 2015 which has dumped a ton of features to make it more fun to code in. At the moment, JavaScript supports the OOP paradigm very well and can be used in functional programming as well.</p>\n<p><a href=\"https://en.wikipedia.org/wiki/Mozilla\">Mozilla</a> is an open-source foundation that documents JavaScript very well on their developer documentation AKA <a href=\"https://developer.mozilla.org/en-US/\">Mozilla Developer Network</a> or <a href=\"https://developer.mozilla.org/en-US/\">MDN</a>. It is one of the top online destinations to learn JavaScript, though there are other online resources as well. If you want to take a look at the JavaScript specifications and learn simple tutorials, visit <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript\">MDN Documentation</a>.</p>\n<p>JavaScript is sometimes abbreviated as JS or .js/.JS (<em>dot J S</em>) to state that an entity is related to JavaScript, like Node.js or ReactJS or AngularJS. But in no ways, JavaScript is related to Java, or so you think 👻. If you need a history lesson about JavaScript and its evolution, watch this amazing video.</p>\n<p><a href=\"https://www.youtube.com/watch?v=Sh6lK57Cuk4\">https://www.youtube.com/watch?v=Sh6lK57Cuk4</a></p>\n<p>Assuming that you are familiar with JavaScript and gained a good amount of knowledge, we can move forward. But if you don't know JavaScript at all, learn basic JavaScript from the MDN documentation I explained earlier. Because learning about Node.js without knowledge of JavaScript is like understanding web development without HTML.</p>\n<h1>What is server-side JavaScript?</h1>\n<p>JavaScript is a single-threaded language, it knows how to get things done one at a time. It can't do asynchronous tasks or run JavaScript code in multiple threads for efficiency. It just knows about JavaScript as defined in ECMAScript specification and nothing more.</p>\n<p>Since JavaScript is used on the web, it needs to be secure. Hence, using JavaScript, you can't access the computer it is running on, like File System, IO, Networking, etc. and neither ECMAScript has specifications for that.</p>\n<p>So it is up to the browser vendors to extend JavaScript engine with APIs that can do other things. For example, DOM API is responsible to print an HTML code into actual pixels on the screen, I have explained this process in <a href=\"https://itnext.io/how-the-browser-renders-a-web-page-dom-cssom-and-rendering-df10531c9969?source=your_stories_page---------------------------\">my Medium article</a>. Also, the <a href=\"https://javascript.info/xmlhttprequest\">XMLHttpRequest</a> API gives us the ability to send network requests to fetch data from a remote server in the background.</p>\n<p>These sorts of APIs are responsible to perform other operations that JavaScript is not designed to perform. These APIs are provided by the browser and they are called <a href=\"https://developer.mozilla.org/en-US/docs/Web/API\">Web APIs</a>. These APIs are written in some Low-Level languages like C or C++ but their interface is made available through JavaScript.</p>\n<p>These Web APIs sometimes do their job in separate thread allowing other JavaScript code to run normally while the job is running in the background. Once the job is done, it then informs the main JavaScript thread.</p>\n<blockquote>\n<p>So through JavaScript, you are executing C++ code and returning result back to the JavaScript, that doesn't sound so difficult.</p>\n</blockquote>\n<p>For example, <code>[setTimeout(callback, delay)](https://www.w3schools.com/jsref/met_win_settimeout.asp)</code> function is not part of ECMAScript specification, it is provided by the browser to perform an asynchronous operation. The <code>callback</code> function is executed in the main JavaScript thread once <code>delay</code> milliseconds has elapsed.</p>\n<p><img src=\"https://miro.medium.com/max/20/1*Lyq6NipNFEgLwjXs0-BDgA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/473/1*Lyq6NipNFEgLwjXs0-BDgA.png\"></p>\n<p>(an oversimplification of how JavaScript runs in a browser)</p>\n<p>So far we know that JavaScript is essential in a browser. But if you think about JavaScript engine alone, it can exist anywhere. You can take the V8 JavaScript engine and install it on your computer (<em>let's call it as a server</em>). With some fiddling, you can feed JavaScript code to it and it will run that code for you and may return the result. In theory, it looks pretty simple.</p>\n<p>The concept of server-side JavaScript comes from this simple idea. You can take any JavaScript engine, wrap inside an application that gives a clean interface to take the user's JavaScript code and execute it in the JavaScript engine. You can also provide APIs to perform operations like File System IO, Networking, etc. which do not run on JavaScript engine.</p>\n<p><img src=\"https://miro.medium.com/max/20/1*i1b-kgRTc9KPvHjvBifoyA.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/473/1*i1b-kgRTc9KPvHjvBifoyA.png\"></p>\n<p>(an oversimplification of how JavaScript runs on a server)</p>\n<p><a href=\"https://en.wikipedia.org/wiki/Ryan_Dahl\">Ryan Dahl</a> took this idea and made Node.js.</p>\n<blockquote>\n<p>To understand more about how a JavaScript engine works in a browser, you should read my article on <a href=\"https://itnext.io/how-javascript-works-in-browser-and-node-ab7d0d09ac2f\">How JavaScript engine works in browser and Node</a>. This article also explain concept of Web APIs in depth.</p>\n</blockquote>\n<h1>How Node.js works?</h1>\n<p>Sometimes, Node.js is also called simply Node or node.</p>\n<p>Node.js is a framework that contains the V8 JavaScript engine, the standard library of packages, and some binaries. In reality, it is more complex than that as explained in the below diagram (<em>follow the link for more details</em>).</p>\n<p><img src=\"https://miro.medium.com/max/405/1*iTdvBPVxYZdJZQKsP3yILw.jpeg\"></p>\n<p>(Source: <a href=\"https://stackoverflow.com/questions/36766696/which-is-correct-node-js-architecture\">Stackoverflow</a>)</p>\n<p>Like Web APIs in the browser, Node.js has a standard library that contains JavaScript packages (<em>we will learn about packages later</em>) which may also provide an interface to low-level APIs. For example, Node.js comes with <code>fs</code> package which contains <code>readFile</code> function among many. This function reads the file on the disk of the machine and returns file content back.</p>\n<p>Most of these packages contain code written in a low-level programming language to communicate with the device, like for file system access. These packages export JavaScript functions and other types to run this code. Since JavaScript can not talk to C++ or some other language, Node.js has to create a binding to facilitate this communication. The process to create such packages is very tricky, but it is explained <a href=\"https://medium.com/the-node-js-collection/native-extensions-for-node-js-767e221b3d26\">here</a> in-depth.</p>\n<p>Node.js uses different threads to perform low-level non-JavaScript time-taking operations. This way, our JavaScript is not blocked while a time taking operation like reading a file is in progress. Since these operations are running in the background once initiated, we need a confirmation or a callback when the operation is finished. This callback is a JavaScript function that will execute as soon as the operation is finished.</p>\n<p>const fs = require('fs'); // fs is built-in packagefs.readFile('/path/to/file.txt', function(error, data){<br>\n// if error is not empty, show error log<br>\n// read data and do something with it<br>\n});</p>\n<p>The Node.js architecture is very complex and made of different parts as seen in the earlier diagram. It also contains an event loop that facilitates the execution of these callback functions. You should watch the below video on the event loop, though it is in the context of the browser but things are pretty similar in Node.js as well. This will clear your remaining doubts.</p>\n<h1>Installing Node.js</h1>\n<p>You should install Node.js from their official website at <a href=\"https://nodejs.org/en/\">nodejs.org</a>. If you are using Windows, Mac OS, or Linux, you can get precompiled binaries and installers. The best way to go is by using an installer.</p>\n<p>When you install Node.js, you get <code>node</code> and <code>npm</code> binaries added to your path. That means, now you can use <code>node</code> and <code>npm</code> command. We will talk about <code>npm</code> later, but for now, let's focus on the <code>node</code>.</p>\n<p><img src=\"https://miro.medium.com/max/459/1*jjZ-5MLgkPDNd-6j6x52rQ.png\"></p>\n<p>Using <code>-v</code> or <code>--version</code> flag, we can check the version of the Node installed. The latest node will have the latest V8 engine, hence latest JavaScript features. If you need the flexibility to change Node version at any given time, in that case, you should not install Node.js using above method. Instead, you should use Node Version Manager or <a href=\"https://github.com/nvm-sh/nvm\">NVM</a>.</p>\n<blockquote>\n<p><a href=\"https://nodejs.org/en/download/releases/\">Here</a> is the list of Node.js releases with V8 engine versions.</p>\n</blockquote>\n<p>Like we saw in DevTools of the browser, using the simple command <code>node</code> will open a JavaScript interpreter in the terminal. This way we can run some simple JavaScript code to amuse yourself.</p>\n<p><img src=\"https://miro.medium.com/max/20/1*yfvMB7k2KBIylz_ISFUL-Q.png?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/459/1*yfvMB7k2KBIylz_ISFUL-Q.png\"></p>\n<p>(node interpreter)</p>\n<h1>Running JavaScript code with Node.js</h1>\n<p>Now that we have a good understanding of what Node.js is and how JavaScript engine works, we can start messing with it.</p>\n<p>Using an interpreter we can perform some basic arithmetics and other basic stuff. But most of the time, your actual JavaScript code will be in a <code>.js</code> file. Instead of giving one line at a time to the interpreter, we need to give whole file content at once. We can do that by using <code>node /path/to/file.js</code> command.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*UdmQcaaaqcGtbzgWUFtE2A.png\"></p>\n<p>(<a href=\"https://github.com/course-one/node-js-introduction/blob/master/hello-world.js\">hello-world.js</a>)</p>\n<p>In the above example, we have created <code>hello-world.js</code> file and it contains <code>hello</code> function. This function is executed after it was defined in the same file. Using the terminal, we executed <code>node ./hello-world.js</code> command. <code>node</code> will pick up <code>hello-world.js</code> file from the directory where the terminal is opened and run it using the V8 JavaScript engine.</p>\n<p>Since <code>node</code> can only execute <code>.js</code> files, adding <code>.js</code> extension to the file path is optional. If we provide a directory path instead of file path to <code>node</code>, Node.js will try to resolve <code>index.js</code> file inside that directory.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*J1cd4WNICvBUcuDpUfvecA.png\"></p>\n<p>(executing index.js in the current directory with Node)</p>\n<h1>Importing scripts in the program</h1>\n<p>Normally our application is broken down to different parts. For example, if a set of functions are used over and over, we would like them to be contained in a separate file and import that file wherever those functions are to be used.</p>\n<p>Node.js supports this functionality natively. When you import a file inside another file, that file is called a module. Node.js uses the CommonJS module system syntax to import modules and packages.</p>\n<blockquote>\n<p>Though <a href=\"https://medium.com/backticks-tildes/introduction-to-es6-modules-49956f580da\">ES6+</a> supports new module system, it is yet to be implemented in Node.</p>\n</blockquote>\n<p>Let's create a <code>lib</code> directory and place <code>math.js</code> file inside it. This file contains some common math functions like <code>add</code> and <code>multiply</code>. We will import this file inside <code>calculate.js</code> file situated in the main directory. Hence <code>math.js</code> is a module, since we are importing it and not executing it directly with Node.</p>\n<p>To import a module, we need to use <code>require</code> function provided by the Node.js and available globally everywhere in the program. This function takes a relative or an absolute path of the module file and returns what module is exporting. Hence, we need to save it inside a variable.</p>\n<p>// calculate.js<br>\nvar math = require( './lib/math.js' ); // <code>.js</code> is optional</p>\n<blockquote>\n<p><code>require()</code> statement sometimes also called as import statement.</p>\n</blockquote>\n<p>Now let's take a look at <code>math.js</code> file. We need to provide AKA export some values to the <code>require()</code> function call. This is done using <code>exports</code> variable. This variable is also globally available everywhere.</p>\n<p>This variable is actually an object which is empty <code>{}</code> at the beginning. When we import this module using <code>require</code> function, this is the object <code>require()</code> call will return.</p>\n<p>// calculate.js<br>\nvar math = require( './lib/math' );console.log(math); // {}</p>\n<p>Since we know that <code>exports</code> is an object that will be exported from the module, we can stuff it with whatever we want. As objects go, an object is a collection of key-value pairs. So let's add some math functions to it.</p>\n<p>// lib/math.js// add <code>add</code> function to <code>exports</code><br>\nexports.add = function( num1, num2 ) {<br>\nreturn num1 + num2<br>\n};</p>\n<p>From <code>math</code> module, we are exporting <code>add</code> function which returns the sum of the two numbers (<em>arguments</em>). Let's see what <code>math</code> variable looks like.</p>\n<p>// calculate.js<br>\nvar math = require( './lib/math' );console.log(math);<br>\n{ add: [Function] }</p>\n<p>It shows that <code>math</code> variable is an object that contains <code>add</code> key which has a <code>Function</code> value. Let's execute that function and see the result.</p>\n<p>// calculate.js<br>\nvar math = require( './lib/math' );// add 1 + 2<br>\nvar result = math.add(1, 2);<br>\nconsole.log( result ); // 3</p>\n<h2>What the heck is module.exports then?</h2>\n<p>I kind of skipped over this part so that you can understand module import with ease. I have a simple question, what if my <code>math</code> module exports only one function like <code>add</code> but I don't want to export it inside an object. This is the only function my module is exporting, so I want <code>require()</code> call to return this function only so that I can start using it like below.</p>\n<p>// calculate.js<br>\nvar math = require( './lib/math' );// add 1 + 2<br>\nvar result = math(1, 2); // math is a function<br>\nconsole.log( result ); // 3</p>\n<p>This is where <code>module</code> global variable comes into the picture. Like <code>exports</code>, <code>module</code> is also globally available everywhere. <code>module</code> is an object and it contains information about module (<em>auto injected by Node.js in key-value pairs</em>). The important key in this object we should know about is <code>exports</code>.</p>\n<p><code>exports</code> variable inside a module points to <code>exports</code> property on the <code>module</code> object, as you can prove in the below test.</p>\n<p>// lib/math.js<br>\nconsole.log(exports === module.exports); // true</p>\n<p>That means when we were setting <code>exports.add</code>, we were actually setting <code>module.exports.add</code>. So if we want our module to export only one function, we can just assign <code>module.exports</code> to that function.</p>\n<blockquote>\n<p>We could say that since <code>exports</code> and <code>module.exports</code> is the same, why not just set <code>exports</code> to the function. The reason is how objects are handled in JavaScript. Read <a href=\"https://stackoverflow.com/a/16383925\">this answer</a> to explore this topic in details.</p>\n</blockquote>\n<p>// lib/math.js// export function only<br>\nmodule.exports = function( num1, num2 ) {<br>\nreturn num1 + num2<br>\n};</p>\n<p>If your module import path is a directory, then <code>require</code> function will resolve <code>index.js</code> file inside it. Using this feature, you can have multiple .<code>js</code> files in a directory that contains different exports and you can import them inside <code>index.js</code> to exports them again from a single point.</p>\n<p>└── lib/<br>\n├── index.js (import <code>math</code> and <code>graph</code> and export them)<br>\n├── math.js<br>\n└── graph.js</p>\n<p>This way, the importer does not need to target individual module files in a directory. The importer can just point to <code>index.js</code> file.</p>\n<p>// lib/math.js<br>\nexports.add = function( num1, num2 ) {<br>\nreturn num1 + num2<br>\n};// lib/index.js<br>\nvar math = require('./math');<br>\nexports.add = math.add<br>\n// calculate.js<br>\nconst lib = require('./lib'); // points to './lib/index.js'<br>\nlib.add(1, 2) // 3</p>\n<p>In Node.js, a module or a package is loaded only once (<em>per thread or session</em>) even when you <code>require()</code> them multiple times in the program. Once loaded, it will be cached by the Node for performance enhancement.</p>\n<p>There are other tricks with CommonJS module system and sometimes we also need to be careful. Read <a href=\"https://www.sitepoint.com/understanding-module-exports-exports-node-js/\">this article</a> to understand more about imports.</p>\n<h1>Packages in Node.js</h1>\n<p>A package is nothing but a directory that contains a bunch of modules. Like for example <code>lib</code> in our previous example can be called a package but not quite yet. The most important feature about a node package is that, from anywhere in the program, we should be able to import it, without providing a relative or an absolute path.</p>\n<p>Well, that sounds absurd. If our <code>.js</code> files are nested, the import path will also change. Let's say that, we have a <code>src</code> directory and it contains <code>compute.js</code>. If we need to import <code>lib</code> package, the import path will be <code>../lib</code>.</p>\n<p>├── lib/<br>\n| ├── index.js<br>\n| └── math.js<br>\n└── src/<br>\n├── compute.js // require( '../lib')<br>\n└── deep/<br>\n└── nested.js // require( '../../lib')</p>\n<p>As we nest our files deeper, the import path is very difficult to track. What would be easy is instead of the relative path, we would just use <code>lib</code> and Node.js just finds the path to that package for us.</p>\n<p>// src/compute.js<br>\nconst lib = require('lib'); // points to '../lib/index.js'<br>\nlib.add(1, 2) // 3</p>\n<p>This might sound like a fantasy but it is actually very real. Node.js can do this for us, just that we need to create <code>node_modules</code> directory and clone <code>lib</code> directory inside it. This way, when we call <code>require('lib')</code>, it will point to the <code>lib</code> directory inside <code>node_modules</code>. Now, <code>lib</code> is a package.</p>\n<blockquote>\n<p>You might wonder, why they are called <code>node_modules</code> and not <code>node_packages</code>? In a conventional sense, a module is a file and package is a collection of modules. But when it comes to <code>require</code> function, they are ambiguous. Hence, let's stick to a common name, module. But normally, when people say node module, it is a package inside <code>node_modules</code> directory.</p>\n</blockquote>\n<p>But the real question is, how does Node knows where the <code>node_modules</code> directory is. The answer is, it doesn't. When we import a package, it searches that package inside <code>node_modules</code> directory of the current file path (<em>where import statement is written</em>). If it doesn't find <code>node_modules</code> directory or the package directory, it performs a similar search in the parent directory.</p>\n<p>This continues until the last directory in the file system is reached. If it doesn't find the package, it throws <code>Error: Cannot find module 'lib'</code> error.</p>\n<p>Let's create <code>node_modules</code> directory in our project and clone <code>lib</code> directory there. From <code>src/compute.js</code>, we will call the <code>add</code> function as before.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*o2PkxJ468fIvuQaZojV-sw.png\"></p>\n<p>(<a href=\"https://github.com/course-one/node-js-introduction/tree/master/lib\">package introduction</a>)</p>\n<p>In the above example, we are importing <code>math.js</code> file from <code>lib</code> package. If we just use <code>require('lib')</code>, Node.js will point to <code>index.js</code> file inside <code>lib</code> package directory. If <code>math.js</code> is missing, <code>require</code> will try to resolve <code>math/index.js</code> file treating <code>math</code> as a directory.</p>\n<p>Even though packages seems easy, their management if done manually is very difficult. Like what if we needed a 3rd-party package? I mean, should we clone the remote source code and put it inside <code>node_module</code> directory manually? Do you know how hard that would be for multiple people in the team? And whenever package version changes, it would be a mess to update.</p>\n<p>This is where NPM comes into the picture.</p>\n<blockquote>\n<p>This whole modules and packages theory might sound familiar to you if you are a python developer. But you don't need <strong>init</strong>.py like file in Node.js 😉</p>\n</blockquote>\n<h1>What is NPM?</h1>\n<p>When we installed Node.js, we also got <code>npm</code> command. <a href=\"https://www.npmjs.com/\">NPM</a> or <a href=\"https://www.npmjs.com/\">Node Package Manager</a> is the default package manager for Node.js. A role of a package manager is to download and install remote package, with ease.</p>\n<blockquote>\n<p>BTW, we can also install packages from a local directory.</p>\n</blockquote>\n<p>Node.js has a wide community that develop good packages for everybody to use. For example, <code>lodash</code> is the package that is used widely. This package contains useful utility functions like <code>add</code> in our earlier example. These utility functions are very well documented on their <a href=\"https://lodash.com/docs/4.17.15\">official website</a>.</p>\n<p>When we have a remote package in our project, it is called as a dependency since our project depends on it. We need to keep track of our dependencies or at least list them down somewhere. We list all our dependencies inside a <code>package.json</code> file which is a JSON file that contains some information about our project and dependencies it needs.</p>\n<p>This file is essential for NPM. To create this file using <code>npm</code>, use <code>npm init</code> command. This command will ask you some question to fill project-specific data in <code>package.json</code> and eventually create <code>package.json</code> file. You can bypass the questions using <code>-y</code> flag.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*QIqW9G-YXcvQAs0xl0zh2A.png\"></p>\n<p>(Initializing <a href=\"https://github.com/course-one/node-js-introduction/blob/master/package.json\">package.json</a>)</p>\n<p>Note <code>dependencies</code> section in the <code>package.json</code> file, it is empty at the moment. This means, our project at the moment does not depend on any of the remote packages.</p>\n<p>To install a package, we use <code>npm install &#x3C;packagename></code> command. For example, to install <code>lodash</code> package, we use <code>npm install --save lodash</code> command. Using <code>--save</code> flag, we can make entry of this package inside <code>dependencies</code> section of the <code>package.json</code> file.</p>\n<p>This command will do the following things.</p>\n<ol>\n<li>At first, it searches for this package on <code>[registry.npm.com](http://registry.npmjs.org/)</code> which contains the database of all packages. You can see the documentation of a package by visiting <code>[https://www.npmjs.com/package/&#x3C;packagename>](https://www.npmjs.com/package/lodash)</code> URL.</li>\n<li>Then it downloads the compressed zip (<em>or tar</em>) file that contains all the source code of the package. If a version of the package was not specified in the command, it will download the latest version.</li>\n<li>Then it adds the package entry to the <code>dependencies</code> section of <code>package.json</code> with the version of the package. If the entry of the package already exists, it will just override the version of the package downloaded.</li>\n<li>Then it creates <code>node_modules</code> folder in the same directory if it doesn't already exist.</li>\n<li>Then it will copy all the files from the downloaded compressed file in the directory with the name of the package inside <code>node_modules</code>.</li>\n</ol>\n<p>Let's actually install <code>lodash</code> package and see how <code>node_modules</code> and <code>package.json</code> file looks like after the install.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*xPtGu4bjhl4YJlH9PvwH9A.png\"></p>\n<p>(npm install -- save lodash)</p>\n<p>From the above example, <code>npm</code> installed the version <code>4.17.15</code> of the <code>lodash</code>. This type of version number system is called as <a href=\"https://devhints.io/semver\">Semantic Versioning</a>. We can also specify a specific version of a package to install using the command like <code>npm install --save lodash@4.17.10</code>.</p>\n<p>Now that we have installed <code>lodash</code>, let's use its <code>_.toUpper</code> function to change the case of a string. But first, we need to import the package.</p>\n<p>// src/transform.js<br>\nvar lodash = require( 'lodash' );var result = lodash.toUpper( 'hello world!' );<br>\nconsole.log( result ); // HELLO WORLD!</p>\n<p>When we run this file using the command <code>node src/transform.js</code>, we get <code>HELLO WORLD!</code> printed in the terminal.</p>\n<p>When you install a package, NPM also creates <code>package-lock.json</code> file if not already present. This file contains a list of dependency packages with their versions that your project has installed as well as dependencies of those packages (<em>because a package might use other packages and so on</em>). This file including <code>package.json</code> should be tracked by your <a href=\"https://en.wikipedia.org/wiki/Version_control\">VCS</a> while <code>node_module</code> directory should be ignored (<em>reasons explained later</em>).</p>\n<blockquote>\n<p>NPM and package management is far more sophisticated (and for good) than this but we will discuss it later in details.</p>\n</blockquote>\n<h1>Built-in Packages AKA Built-in Modules</h1>\n<p>Node.js ships with a collection of built-in packages called as a Node Standard Library. These packages are essential to perform low-level operations like File System I/O and Networking. We do not have to install them using NPM.</p>\n<p>Since these packages contain code in a low-level programming language tailored to a specific version of Node.js, they have to be shipped as a part of the installation process. <a href=\"https://nodejs.org/api/index.html\">Here</a> is a list of built-in modules in Node.js.</p>\n<p>These packages do not exist on disk like <code>lodash</code>. They are compiled into low-level or intermediate stuff (<a href=\"https://stackoverflow.com/a/42892065\">explained here</a>) but their sources are listed <a href=\"https://github.com/nodejs/node/tree/master/lib\">here</a>.</p>\n<p><code>[fs](https://nodejs.org/api/fs.html)</code> package is used to perform File System operations like file read and write while <code>[path](https://nodejs.org/api/path.html)</code> package is used to resolve a file or directory path on the system. Let's use these packages to demonstrate a cool example.</p>\n<p>├── res<br>\n| └── hello-world.txt<br>\n└── fs-example.js</p>\n<p>According to the above project structure, we have <code>hello-world.txt</code> file which contains <code>Hello World!</code> text. Using <code>fs-example.js</code>, we want to read the text in the file and log in to the console.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*78ejxNXflo4CGZ18gRXPhQ.png\"></p>\n<p>(Sample <code>fs</code> and <code>path</code> module introduction)</p>\n<p>In the above program, we imported the <code>fs</code> and <code>path</code> built-in modules.</p>\n<blockquote>\n<p>When we <code>require(name)</code> a package, Node.js first searches for the package <code>name</code> in the built-in packages. If it doesn't find it in the standard library, then it searches for it in <code>node_modules</code> as explained earlier.</p>\n</blockquote>\n<p><code>__dirname</code> is a globally available variable that resolves to the absolute path of the current file on the disk. <code>[path.resolve](https://nodejs.org/api/path.html#path_path_resolve_paths)</code> function takes multiple path segments and joins them. This is a safe way to create an absolute path of a file on the disk, as Windows and Unix systems use different path delimiter.</p>\n<blockquote>\n<p>You can also use a relative path like <code>var filePath = './res/hello-world.txt';</code> in the above example but <code>path.resolve</code> is safer. <code>process</code> is a globally available object that contains information about environment variables and current process context in general. Unlike <code>__dirname</code>, <code>[process.cwd()](https://nodejs.org/api/process.html#process_process_cwd)</code> function returns the path of the directory from where the <code>node</code> command was executed in the terminal (or the current directory in the terminal).</p>\n</blockquote>\n<p>Let's talk about the example in detail. Inside <code>fs-example.js</code> file, we imported built-in modules <code>fs</code> and <code>path</code>. Then we constructed a <code>filePath</code> which points to <code>hello-world.txt</code> on the disk.</p>\n<p><code>[fs.readFile](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback)</code> function takes below arguments in series</p>\n<ol>\n<li>filePath: A absolute or relative path to the file we are trying to read.</li>\n<li>options: An object that contains a configuration about reading. In the above example, we set <code>encoding</code> to <code>utf-8</code> which converts binary data to Text format. This will convert file content to Text.</li>\n<li>callback: Sync file read operation using <code>readFile</code> function is asynchronous, we need a callback function to execute when the file is read completely. This function will receive read error (<em>if any</em>) as the first argument and file data as the second argument.</li>\n</ol>\n<p>Notice the console log. The first <code>-end-of-the-program-</code> statement got printed as <code>fs.readFile</code> was reading the file in the background. Once file reading was completed, the callback function was called.</p>\n<p>Node.js can also perform synchronous (blocking) operations. For example, using <code>[fs.readFileSync](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options)</code>, we can block the JavaScript thread until the file is read. This way, we can make sure, JavaScript code run sequentially.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*FmUCo0e0Cs_QKxEGZ509nQ.png\"></p>\n<p>(<a href=\"https://github.com/course-one/node-js-introduction/blob/master/fs-example.js\">Reading a file synchronously</a>)</p>\n<h1>Creating an HTTP server in Node.js</h1>\n<p>Node.js can do anything, literally anything. Node.js has built-in <code>[http](https://nodejs.org/api/http.html)</code> module as well as <code>[https](https://nodejs.org/api/https.html)</code> module to create an HTTP/HTTPS server. But their implementation is kind of hard.</p>\n<p>ExpressJS is a 3rd-party package that wraps the built-in <code>http</code> module and provide a cleaner interface to create an HTTP server. This package is listed on NPM registry under <code>[express](https://www.npmjs.com/package/express)</code> name. Let's create a basic HTTP server.</p>\n<p>First, we need to install <code>express</code> package using NPM.</p>\n<p>npm install --save express</p>\n<p>Then we will import this package and create a basic HTTP server inside <code>server.js</code> file. We will follow their <a href=\"https://github.com/expressjs/express\">startup documentation</a>.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*6yP5kysrs9UIKk8RYnR0AQ.png\"></p>\n<p>(<a href=\"https://github.com/course-one/node-js-introduction/blob/master/server.js\">Sample express HTTP server</a>)</p>\n<p>When we executed <code>server.js</code> file with <code>node</code>, ExpressJS will lock the Node process as we want the server to be running forever. Now that server is running on the port <code>9000</code>, we can open the browser and access URL <code>&#x3C;http://localhost:9000/></code> which will execute the <code>.get</code> callback.</p>\n<p><img src=\"https://miro.medium.com/max/473/1*evvJp-ynknMqnUTbW4dssw.png\"></p>\n<p><code>(&#x3C;http://localhost:9000/>)</code></p>\n<p>This was just a basic example of how we can create an HTTP server in Node.js. But with express.js, we can create more complex servers which can send HTML file content using <code>response.sendFile(filePath)</code> function or send JSON using <code>response.json(object)</code> function. We can also create an endpoint that <a href=\"https://expressjs.com/en/starter/static-files.html\">serves static files</a> like images from the disk using <a href=\"https://expressjs.com/en/guide/writing-middleware.html\">middlewares</a>.</p>\n<p>To stop the server, we need to stop the locked Node.js process. We can do that by pressing <code>ctrl+c</code> in the terminal. But what if we need to actually run the server on the production literally forever. In that case, we can't have terminal open for years. This is where the process managers comes in.</p>\n<p><a href=\"http://pm2.keymetrics.io/\">PM2</a> is one of the best process managers that can run a Node process in the background. When you install it, it will give you a clean command-line interface to start a Node.js process and PM2 will monitor it.</p>\n<h1>Execute a Bash command from Node.js</h1>\n<p>If you make Node.js your life and want to do everything from Node, then this topic is very important. Let's say that from a JavaScript program, you want to execute a BASH command. A Bash command would be <code>echo Hello World!</code>. You can try this command in the terminal and it will print <code>Hello World!</code>.</p>\n<p>Node.js provides a built-in <code>[child_process](https://nodejs.org/api/child_process.html)</code> command to run Bash command in a separate process. <code>[child_process.exec](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)</code> function takes a Bash command and executes it. It takes an optional callback function to execute (<em>with some process information</em>) when the process is terminated.</p>\n<p>Let's create a <code>echo.js</code> file that executes <code>echo Hello World!</code> Bash command.</p>\n<p><img src=\"https://miro.medium.com/max/675/1*NGwvmLnmj436x2EXbWAJvg.png\"></p>\n<p>(<a href=\"https://github.com/course-one/node-js-introduction/blob/master/echo.js\">child_process example</a>)</p>\n<p>In the above program, the callback function to <code>child_process.exec</code> receives the <a href=\"https://www.computerhope.com/jargon/s/stdout.htm\">standard output</a> of the program.</p>\n<p><code>child_process</code> module can do many things, like execute a Bash file using <code>[child_process.execFile](https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback)</code> function. It also supports synchronous variants to run a bash command synchronously, like <code>[child_process.execSync](https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options)</code> function.</p>\n<h1>How to ship your code to Production?</h1>\n<p>Now that we have a good understanding of Node.js and NPM, we can move forward to this most important topic.</p>\n<p><code>package.json</code> and <code>package-lock.json</code> files are very important as they contain information about dependencies our project has. Those dependencies are stored inside <code>node_modules</code> directory by the NPM.</p>\n<p>So if our project is managed using a VCS like Git then should we commit all our code? The answer is, 😱 NOOOOOOOOOOO. <code>node_modules</code> directory can be very large as it contains deeply nested dependencies. Hence it should be ignored by the VCS. Use <code>.gitignore</code> file to do that.</p>\n<h1>.gitignore\\</h1>\n<p>node_modules</p>\n<p>But then when your buddy takes the clone or a pull of the project, he/she won't get <code>node_modules</code>. Nothing to worry about here because NPM can take care of that.</p>\n<p>When we used <code>npm install &#x3C;packagename></code> command for the first time, NPM created <code>node_modules</code> directory and install <code>packagename</code> package. Using <code>npm install</code> command (<em>without a package name</em>), NPM will look at <code>pakage.json</code> to install all the dependencies listed inside it.</p>\n<blockquote>\n<p>Actually, since NPM v.5, <code>npm install</code> command looks at <code>package-lock.json</code> command to install the dependencies since it contains the exact versions of the packages and their dependencies (which were installed by the developer of the project). This minimizes the conflict of versions between the development machine and production machine.</p>\n</blockquote>\n<p>By ignoring <code>node_modules</code>, we are actually saving a lot of time and bandwidth of transferring the project from a development machine to production.</p>\n<p><a href=\"https://codesandbox.io/s/nodejs-examples-4ohjz?autoresize=1&#x26;expanddevtools=1&#x26;fontsize=13&#x26;hidenavigation=1&#x26;theme=light&#x26;view=editor\"><img src=\"https://codesandbox.io/static/img/play-codesandbox.svg\" alt=\"Edit nodejs-examples\"></a></p>"},{"url":"/docs/reference/markdown-styleguide/","relativePath":"docs/reference/markdown-styleguide.md","relativeDir":"docs/reference","base":"markdown-styleguide.md","name":"markdown-styleguide","frontmatter":{"title":"Markdown Lint Styleguide","weight":0,"excerpt":"Markdown Lint Styleguide","seo":{"title":"Markdown Lint Styleguide","description":"This document contains a description of all rules, what they are checking for, as well as examples of documents that break the rule and corrected versions of the examples.","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Rules</h1>\n<p>This document contains a description of all rules, what they are checking for,\nas well as examples of documents that break the rule and corrected\nversions of the examples. Any rule whose heading is <del>struck through</del> is\ndeprecated, but still provided for backward-compatibility.</p>\n<p><a name=\"md001\"></a></p>\n<h2>MD001 - Heading levels should only increment by one level at a time</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: heading-increment, header-increment</p>\n<p>This rule is triggered when you skip heading levels in a markdown document, for\nexample:</p>\n<pre><code class=\"language-markdown\"># Heading 1\n\n### Heading 3\n\nWe skipped out a 2nd level heading in this document\n</code></pre>\n<p>When using multiple heading levels, nested headings should increase by only one\nlevel at a time:</p>\n<pre><code class=\"language-markdown\"># Heading 1\n\n## Heading 2\n\n### Heading 3\n\n#### Heading 4\n\n## Another Heading 2\n\n### Another Heading 3\n</code></pre>\n<p>Rationale: Headings represent the structure of a document and can be confusing\nwhen skipped - especially for accessibility scenarios. More information:\n<a href=\"https://www.w3.org/WAI/tutorials/page-structure/headings/\">https://www.w3.org/WAI/tutorials/page-structure/headings/</a>.</p>\n<p><a name=\"md002\"></a></p>\n<h2><del>MD002 - First heading should be a top-level heading</del></h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: first-heading-h1, first-header-h1</p>\n<p>Parameters: level (number; default 1)</p>\n<blockquote>\n<p>Note: <em>MD002 has been deprecated and is disabled by default.</em>\n<a href=\"#md041\">MD041/first-line-heading</a> offers an improved implementation.</p>\n</blockquote>\n<p>This rule is intended to ensure document headings start at the top level and\nis triggered when the first heading in the document isn't an h1 heading:</p>\n<pre><code class=\"language-markdown\">## This isn't an H1 heading\n\n### Another heading\n</code></pre>\n<p>The first heading in the document should be an h1 heading:</p>\n<pre><code class=\"language-markdown\"># Start with an H1 heading\n\n## Then use an H2 for subsections\n</code></pre>\n<p>Note: The <code>level</code> parameter can be used to change the top-level (ex: to h2) in\ncases where an h1 is added externally.</p>\n<p>Rationale: The top-level heading often acts as the title of a document. More\ninformation: <a href=\"https://cirosantilli.com/markdown-style-guide#top-level-header\">https://cirosantilli.com/markdown-style-guide#top-level-header</a>.</p>\n<p><a name=\"md003\"></a></p>\n<h2>MD003 - Heading style</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: heading-style, header-style</p>\n<p>Parameters: style (\"consistent\", \"atx\", \"atx<em>closed\", \"setext\",\n\"setext</em>with<em>atx\", \"setext</em>with<em>atx</em>closed\"; default \"consistent\")</p>\n<p>This rule is triggered when different heading styles (atx, setext, and 'closed'\natx) are used in the same document:</p>\n<pre><code class=\"language-markdown\"># ATX style H1\n\n## Closed ATX style H2 ##\n\nSetext style H1\n===============\n</code></pre>\n<p>Be consistent with the style of heading used in a document:</p>\n<pre><code class=\"language-markdown\"># ATX style H1\n\n## ATX style H2\n</code></pre>\n<p>The setext<em>with</em>atx and setext<em>with</em>atx_closed doc styles allow atx-style\nheadings of level 3 or more in documents with setext style headings:</p>\n<pre><code class=\"language-markdown\">Setext style H1\n===============\n\nSetext style H2\n---------------\n\n### ATX style H3\n</code></pre>\n<p>Note: the configured heading style can be a specific style to use (atx,\natx<em>closed, setext, setext</em>with<em>atx, setext</em>with<em>atx</em>closed), or simply require\nthat the usage is consistent within the document.</p>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md004\"></a></p>\n<h2>MD004 - Unordered list style</h2>\n<p>Tags: bullet, ul</p>\n<p>Aliases: ul-style</p>\n<p>Parameters: style (\"consistent\", \"asterisk\", \"plus\", \"dash\", \"sublist\"; default\n\"consistent\")</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when the symbols used in the document for unordered\nlist items do not match the configured unordered list style:</p>\n<pre><code class=\"language-markdown\">* Item 1\n+ Item 2\n- Item 3\n</code></pre>\n<p>To fix this issue, use the configured style for list items throughout the\ndocument:</p>\n<pre><code class=\"language-markdown\">* Item 1\n* Item 2\n* Item 3\n</code></pre>\n<p>The configured list style can be a specific symbol to use (asterisk, plus, dash),\nto ensure that all list styling is consistent, or to ensure that each\nsublist has a consistent symbol that differs from its parent list.</p>\n<p>For example, the following is valid for the <code>sublist</code> style because the outer-most\nindent uses asterisk, the middle indent uses plus, and the inner-most indent uses\ndash:</p>\n<pre><code class=\"language-markdown\">* Item 1\n  + Item 2\n    - Item 3\n  + Item 4\n* Item 4\n  + Item 5\n</code></pre>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md005\"></a></p>\n<h2>MD005 - Inconsistent indentation for list items at the same level</h2>\n<p>Tags: bullet, ul, indentation</p>\n<p>Aliases: list-indent</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when list items are parsed as being at the same level,\nbut don't have the same indentation:</p>\n<pre><code class=\"language-markdown\">* Item 1\n  * Nested Item 1\n  * Nested Item 2\n   * A misaligned item\n</code></pre>\n<p>Usually, this rule will be triggered because of a typo. Correct the indentation\nfor the list to fix it:</p>\n<pre><code class=\"language-markdown\">* Item 1\n  * Nested Item 1\n  * Nested Item 2\n  * Nested Item 3\n</code></pre>\n<p>Sequentially-ordered list markers are usually left-aligned such that all items\nhave the same starting column:</p>\n<pre><code class=\"language-markdown\">...\n8. Item\n9. Item\n10. Item\n11. Item\n...\n</code></pre>\n<p>This rule also supports right-alignment of list markers such that all items have\nthe same ending column:</p>\n<pre><code class=\"language-markdown\">...\n 8. Item\n 9. Item\n10. Item\n11. Item\n...\n</code></pre>\n<p>Rationale: Violations of this rule can lead to improperly rendered content.</p>\n<p><a name=\"md006\"></a></p>\n<h2><del>MD006 - Consider starting bulleted lists at the beginning of the line</del></h2>\n<p>Tags: bullet, ul, indentation</p>\n<p>Aliases: ul-start-left</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when top-level lists don't start at the beginning of a\nline:</p>\n<pre><code class=\"language-markdown\">Some text\n\n  * List item\n  * List item\n</code></pre>\n<p>To fix, ensure that top-level list items are not indented:</p>\n<pre><code class=\"language-markdown\">Some test\n\n* List item\n* List item\n</code></pre>\n<p>Note: This rule is triggered for the following scenario because the unordered\nsublist is not recognized as such by the parser. Not being nested 3 characters\nas required by the outer ordered list, it creates a top-level unordered list\ninstead.</p>\n<pre><code class=\"language-markdown\">1. List item\n  - List item\n  - List item\n1. List item\n</code></pre>\n<p>Rationale: Starting lists at the beginning of the line means that nested list\nitems can all be indented by the same amount when an editor's indent function\nor the tab key is used to indent. Starting a list 1 space in means that the\nindent of the first nested list is less than the indent of the second level (3\ncharacters if you use 4 space tabs, or 1 character if you use 2 space tabs).</p>\n<p><a name=\"md007\"></a></p>\n<h2>MD007 - Unordered list indentation</h2>\n<p>Tags: bullet, ul, indentation</p>\n<p>Aliases: ul-indent</p>\n<p>Parameters: indent, start_indented (number; default 2, boolean; default false)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when list items are not indented by the configured\nnumber of spaces (default: 2).</p>\n<p>Example:</p>\n<pre><code class=\"language-markdown\">* List item\n   * Nested list item indented by 3 spaces\n</code></pre>\n<p>Corrected Example:</p>\n<pre><code class=\"language-markdown\">* List item\n  * Nested list item indented by 2 spaces\n</code></pre>\n<p>Note: This rule applies to a sublist only if its parent lists are all also\nunordered (otherwise, extra indentation of ordered lists interferes with the\nrule).</p>\n<p>The <code>start_indented</code> parameter allows the first level of lists to be indented by\nthe configured number of spaces rather than starting at zero (the inverse of\nMD006).</p>\n<p>Rationale: Indenting by 2 spaces allows the content of a nested list to be in\nline with the start of the content of the parent list when a single space is\nused after the list marker. Indenting by 4 spaces is consistent with code blocks\nand simpler for editors to implement. Additionally, this can be a compatibility\nissue for multi-markdown parsers, which require 4-space indents. More information:\n<a href=\"https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists\">https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists</a>\nand <a href=\"http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting\">http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting</a>.</p>\n<p>Note: See <a href=\"Prettier.md\">Prettier.md</a> for compatibility information.</p>\n<p><a name=\"md009\"></a></p>\n<h2>MD009 - Trailing spaces</h2>\n<p>Tags: whitespace</p>\n<p>Aliases: no-trailing-spaces</p>\n<!-- markdownlint-disable line-length -->\n<p>Parameters: br<em>spaces, list</em>item<em>empty</em>lines, strict (number; default 2, boolean; default false, boolean; default false)</p>\n<!-- markdownlint-restore -->\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered on any lines that end with unexpected whitespace. To fix this,\nremove the trailing space from the end of the line.</p>\n<p>Note: Trailing space is allowed in indented and fenced code blocks because some\nlanguages require it.</p>\n<p>The <code>br_spaces</code> parameter allows an exception to this rule for a specific number\nof trailing spaces, typically used to insert an explicit line break. The default\nvalue allows 2 spaces to indicate a hard break (&#x3C;br> element).</p>\n<p>Note: You must set <code>br_spaces</code> to a value >= 2 for this parameter to take effect.\nSetting <code>br_spaces</code> to 1 behaves the same as 0, disallowing any trailing spaces.</p>\n<p>By default, this rule will not trigger when the allowed number of spaces is used,\neven when it doesn't create a hard break (for example, at the end of a paragraph).\nTo report such instances as well, set the <code>strict</code> parameter to <code>true</code>.</p>\n<pre><code class=\"language-markdown\">Text text text\ntext[2 spaces]\n</code></pre>\n<p>Using spaces to indent blank lines inside a list item is usually not necessary,\nbut some parsers require it. Set the <code>list_item_empty_lines</code> parameter to <code>true</code>\nto allow this (even when <code>strict</code> is <code>true</code>):</p>\n<pre><code class=\"language-markdown\">- list item text\n  [2 spaces]\n  list item text\n</code></pre>\n<p>Rationale: Except when being used to create a line break, trailing whitespace\nhas no purpose and does not affect the rendering of content.</p>\n<p><a name=\"md010\"></a></p>\n<h2>MD010 - Hard tabs</h2>\n<p>Tags: whitespace, hard_tab</p>\n<p>Aliases: no-hard-tabs</p>\n<p>Parameters: code<em>blocks, spaces</em>per_tab (boolean; default true, number; default 1)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered by any lines that contain hard tab characters instead\nof using spaces for indentation. To fix this, replace any hard tab characters\nwith spaces instead.</p>\n<p>Example:</p>\n<!-- markdownlint-disable no-hard-tabs -->\n<pre><code class=\"language-markdown\">Some text\n\n    * hard tab character used to indent the list item\n</code></pre>\n<!-- markdownlint-restore -->\n<p>Corrected example:</p>\n<pre><code class=\"language-markdown\">Some text\n\n    * Spaces used to indent the list item instead\n</code></pre>\n<p>You have the option to exclude this rule for code blocks. To do so, set the\n<code>code_blocks</code> parameter to <code>false</code>. Code blocks are included by default since\nhandling of tabs by tools is often inconsistent (ex: using 4 vs. 8 spaces).</p>\n<p>If you would like the fixer to change tabs to x spaces, then configure the <code>spaces_per_tab</code>\nparameter to the number x. The default value would be 1.</p>\n<p>Rationale: Hard tabs are often rendered inconsistently by different editors and\ncan be harder to work with than spaces.</p>\n<p><a name=\"md011\"></a></p>\n<h2>MD011 - Reversed link syntax</h2>\n<p>Tags: links</p>\n<p>Aliases: no-reversed-links</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when text that appears to be a link is encountered, but\nwhere the syntax appears to have been reversed (the <code>[]</code> and <code>()</code> are\nreversed):</p>\n<pre><code class=\"language-markdown\">(Incorrect link syntax)[https://www.example.com/]\n</code></pre>\n<p>To fix this, swap the <code>[]</code> and <code>()</code> around:</p>\n<pre><code class=\"language-markdown\">[Correct link syntax](https://www.example.com/)\n</code></pre>\n<p>Note: <a href=\"https://en.wikipedia.org/wiki/Markdown_Extra\">Markdown Extra</a>-style\nfootnotes do not trigger this rule:</p>\n<pre><code class=\"language-markdown\">For (example)[^1]\n</code></pre>\n<p>Rationale: Reversed links are not rendered as usable links.</p>\n<p><a name=\"md012\"></a></p>\n<h2>MD012 - Multiple consecutive blank lines</h2>\n<p>Tags: whitespace, blank_lines</p>\n<p>Aliases: no-multiple-blanks</p>\n<p>Parameters: maximum (number; default 1)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when there are multiple consecutive blank lines in the\ndocument:</p>\n<pre><code class=\"language-markdown\">Some text here\n\n\nSome more text here\n</code></pre>\n<p>To fix this, delete the offending lines:</p>\n<pre><code class=\"language-markdown\">Some text here\n\nSome more text here\n</code></pre>\n<p>Note: this rule will not be triggered if there are multiple consecutive blank\nlines inside code blocks.</p>\n<p>Note: The <code>maximum</code> parameter can be used to configure the maximum number of\nconsecutive blank lines.</p>\n<p>Rationale: Except in a code block, blank lines serve no purpose and do not\naffect the rendering of content.</p>\n<p><a name=\"md013\"></a></p>\n<h2>MD013 - Line length</h2>\n<p>Tags: line_length</p>\n<p>Aliases: line-length</p>\n<!-- markdownlint-disable line-length -->\n<p>Parameters: line<em>length, heading</em>line<em>length, code</em>block<em>line</em>length, code<em>blocks, tables, headings, headers, strict, stern (number; default 80 for *</em>length, boolean; default true (except strict/stern which default false))</p>\n<!-- markdownlint-restore -->\n<blockquote>\n<p>If <code>headings</code> is not provided, <code>headers</code> (deprecated) will be used.</p>\n</blockquote>\n<p>This rule is triggered when there are lines that are longer than the\nconfigured <code>line_length</code> (default: 80 characters). To fix this, split the line\nup into multiple lines. To set a different maximum length for headings, use\n<code>heading_line_length</code>. To set a different maximum length for code blocks, use\n<code>code_block_line_length</code></p>\n<p>This rule has an exception when there is no whitespace beyond the configured\nline length. This allows you to still include items such as long URLs without\nbeing forced to break them in the middle. To disable this exception, set the\n<code>strict</code> parameter to <code>true</code> to report an issue when any line is too long.\nTo warn for lines that are too long and could be fixed but allow lines without\nspaces, set the <code>stern</code> parameter to <code>true</code>.</p>\n<p>For example (assuming normal behavior):</p>\n<pre><code class=\"language-markdown\">IF THIS LINE IS THE MAXIMUM LENGTH\nThis line is okay because there are-no-spaces-beyond-that-length\nAnd this line is a violation because there are\nThis-line-is-also-okay-because-there-are-no-spaces\n</code></pre>\n<p>In <code>strict</code> or <code>stern</code> modes, the two middle lines above are a violation. The\nthird line is a violation in <code>strict</code> mode but allowed in <code>stern</code> mode.</p>\n<p>You have the option to exclude this rule for code blocks, tables, or headings.\nTo do so, set the <code>code_blocks</code>, <code>tables</code>, or <code>headings</code> parameter(s) to false.</p>\n<p>Code blocks are included in this rule by default since it is often a\nrequirement for document readability, and tentatively compatible with code\nrules. Still, some languages do not lend themselves to short lines.</p>\n<p>Rationale: Extremely long lines can be difficult to work with in some editors.\nMore information: <a href=\"https://cirosantilli.com/markdown-style-guide#line-wrapping\">https://cirosantilli.com/markdown-style-guide#line-wrapping</a>.</p>\n<p><a name=\"md014\"></a></p>\n<h2>MD014 - Dollar signs used before commands without showing output</h2>\n<p>Tags: code</p>\n<p>Aliases: commands-show-output</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when there are code blocks showing shell commands to be\ntyped, and <em>all</em> of the shell commands are preceded by dollar signs ($):</p>\n<!-- markdownlint-disable commands-show-output -->\n<pre><code class=\"language-markdown\">$ ls\n$ cat foo\n$ less bar\n</code></pre>\n<!-- markdownlint-restore -->\n<p>The dollar signs are unnecessary in this situation, and should not be\nincluded:</p>\n<pre><code class=\"language-markdown\">ls\ncat foo\nless bar\n</code></pre>\n<p>Showing output for commands preceded by dollar signs does not trigger this rule:</p>\n<pre><code class=\"language-markdown\">$ ls\nfoo bar\n$ cat foo\nHello world\n$ cat bar\nbaz\n</code></pre>\n<p>Because some commands do not produce output, it is not a violation if <em>some</em>\ncommands do not have output:</p>\n<pre><code class=\"language-markdown\">$ mkdir test\nmkdir: created directory 'test'\n$ ls test\n</code></pre>\n<p>Rationale: It is easier to copy/paste and less noisy if the dollar signs\nare omitted when they are not needed. See\n<a href=\"https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code\">https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code</a>\nfor more information.</p>\n<p><a name=\"md018\"></a></p>\n<h2>MD018 - No space after hash on atx style heading</h2>\n<p>Tags: headings, headers, atx, spaces</p>\n<p>Aliases: no-missing-space-atx</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when spaces are missing after the hash characters\nin an atx style heading:</p>\n<pre><code class=\"language-markdown\">#Heading 1\n\n##Heading 2\n</code></pre>\n<p>To fix this, separate the heading text from the hash character by a single\nspace:</p>\n<pre><code class=\"language-markdown\"># Heading 1\n\n## Heading 2\n</code></pre>\n<p>Rationale: Violations of this rule can lead to improperly rendered content.</p>\n<p><a name=\"md019\"></a></p>\n<h2>MD019 - Multiple spaces after hash on atx style heading</h2>\n<p>Tags: headings, headers, atx, spaces</p>\n<p>Aliases: no-multiple-space-atx</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when more than one space is used to separate the\nheading text from the hash characters in an atx style heading:</p>\n<pre><code class=\"language-markdown\">#  Heading 1\n\n##  Heading 2\n</code></pre>\n<p>To fix this, separate the heading text from the hash character by a single\nspace:</p>\n<pre><code class=\"language-markdown\"># Heading 1\n\n## Heading 2\n</code></pre>\n<p>Rationale: Extra space has no purpose and does not affect the rendering of\ncontent.</p>\n<p><a name=\"md020\"></a></p>\n<h2>MD020 - No space inside hashes on closed atx style heading</h2>\n<p>Tags: headings, headers, atx_closed, spaces</p>\n<p>Aliases: no-missing-space-closed-atx</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when spaces are missing inside the hash characters\nin a closed atx style heading:</p>\n<pre><code class=\"language-markdown\">#Heading 1#\n\n##Heading 2##\n</code></pre>\n<p>To fix this, separate the heading text from the hash character by a single\nspace:</p>\n<pre><code class=\"language-markdown\"># Heading 1 #\n\n## Heading 2 ##\n</code></pre>\n<p>Note: this rule will fire if either side of the heading is missing spaces.</p>\n<p>Rationale: Violations of this rule can lead to improperly rendered content.</p>\n<p><a name=\"md021\"></a></p>\n<h2>MD021 - Multiple spaces inside hashes on closed atx style heading</h2>\n<p>Tags: headings, headers, atx_closed, spaces</p>\n<p>Aliases: no-multiple-space-closed-atx</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when more than one space is used to separate the\nheading text from the hash characters in a closed atx style heading:</p>\n<pre><code class=\"language-markdown\">#  Heading 1  #\n\n##  Heading 2  ##\n</code></pre>\n<p>To fix this, separate the heading text from the hash character by a single\nspace:</p>\n<pre><code class=\"language-markdown\"># Heading 1 #\n\n## Heading 2 ##\n</code></pre>\n<p>Note: this rule will fire if either side of the heading contains multiple\nspaces.</p>\n<p>Rationale: Extra space has no purpose and does not affect the rendering of\ncontent.</p>\n<p><a name=\"md022\"></a></p>\n<h2>MD022 - Headings should be surrounded by blank lines</h2>\n<p>Tags: headings, headers, blank_lines</p>\n<p>Aliases: blanks-around-headings, blanks-around-headers</p>\n<p>Parameters: lines<em>above, lines</em>below (number; default 1)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when headings (any style) are either not preceded or not\nfollowed by at least one blank line:</p>\n<pre><code class=\"language-markdown\"># Heading 1\nSome text\n\nSome more text\n## Heading 2\n</code></pre>\n<p>To fix this, ensure that all headings have a blank line both before and after\n(except where the heading is at the beginning or end of the document):</p>\n<pre><code class=\"language-markdown\"># Heading 1\n\nSome text\n\nSome more text\n\n## Heading 2\n</code></pre>\n<p>The <code>lines_above</code> and <code>lines_below</code> parameters can be used to specify a different\nnumber of blank lines (including 0) above or below each heading.</p>\n<p>Note: If <code>lines_above</code> or <code>lines_below</code> are configured to require more than one\nblank line, <a href=\"#md012\">MD012/no-multiple-blanks</a> should also be customized.</p>\n<p>Rationale: Aside from aesthetic reasons, some parsers, including <code>kramdown</code>, will\nnot parse headings that don't have a blank line before, and will parse them as\nregular text.</p>\n<p><a name=\"md023\"></a></p>\n<h2>MD023 - Headings must start at the beginning of the line</h2>\n<p>Tags: headings, headers, spaces</p>\n<p>Aliases: heading-start-left, header-start-left</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when a heading is indented by one or more spaces:</p>\n<pre><code class=\"language-markdown\">Some text\n\n  # Indented heading\n</code></pre>\n<p>To fix this, ensure that all headings start at the beginning of the line:</p>\n<pre><code class=\"language-markdown\">Some text\n\n# Heading\n</code></pre>\n<p>Rationale: Headings that don't start at the beginning of the line will not be\nparsed as headings, and will instead appear as regular text.</p>\n<p><a name=\"md024\"></a></p>\n<h2>MD024 - Multiple headings with the same content</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: no-duplicate-heading, no-duplicate-header</p>\n<p>Parameters: siblings<em>only, allow</em>different_nesting (boolean; default <code>false</code>)</p>\n<p>This rule is triggered if there are multiple headings in the document that have\nthe same text:</p>\n<pre><code class=\"language-markdown\"># Some text\n\n## Some text\n</code></pre>\n<p>To fix this, ensure that the content of each heading is different:</p>\n<pre><code class=\"language-markdown\"># Some text\n\n## Some more text\n</code></pre>\n<p>If the parameter <code>siblings_only</code> (alternatively <code>allow_different_nesting</code>) is\nset to <code>true</code>, heading duplication is allowed for non-sibling headings (common\nin changelogs):</p>\n<pre><code class=\"language-markdown\"># Change log\n\n## 1.0.0\n\n### Features\n\n## 2.0.0\n\n### Features\n</code></pre>\n<p>Rationale: Some markdown parsers generate anchors for headings based on the\nheading name; headings with the same content can cause problems with that.</p>\n<p><a name=\"md025\"></a></p>\n<h2>MD025 - Multiple top-level headings in the same document</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: single-title, single-h1</p>\n<p>Parameters: level, front<em>matter</em>title (number; default 1, string; default \"^\\s<em>\"?title\"?\\s</em>[:=]\")</p>\n<p>This rule is triggered when a top-level heading is in use (the first line of\nthe file is an h1 heading), and more than one h1 heading is in use in the\ndocument:</p>\n<pre><code class=\"language-markdown\"># Top level heading\n\n# Another top-level heading\n</code></pre>\n<p>To fix, structure your document so there is a single h1 heading that is\nthe title for the document. Subsequent headings must be\nlower-level headings (h2, h3, etc.):</p>\n<pre><code class=\"language-markdown\"># Title\n\n## Heading\n\n## Another heading\n</code></pre>\n<p>Note: The <code>level</code> parameter can be used to change the top-level (ex: to h2) in\ncases where an h1 is added externally.</p>\n<p>If <a href=\"https://en.wikipedia.org/wiki/YAML\">YAML</a> front matter is present and contains\na <code>title</code> property (commonly used with blog posts), this rule treats that as a top\nlevel heading and will report a violation for any subsequent top-level headings.\nTo use a different property name in the front matter, specify the text of a regular\nexpression via the <code>front_matter_title</code> parameter. To disable the use of front\nmatter by this rule, specify <code>\"\"</code> for <code>front_matter_title</code>.</p>\n<p>Rationale: A top-level heading is an h1 on the first line of the file, and\nserves as the title for the document. If this convention is in use, then there\ncan not be more than one title for the document, and the entire document\nshould be contained within this heading.</p>\n<p><a name=\"md026\"></a></p>\n<h2>MD026 - Trailing punctuation in heading</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: no-trailing-punctuation</p>\n<p>Parameters: punctuation (string; default \".,;:!。，；：！\")</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered on any heading that has one of the specified normal or\nfull-width punctuation characters as the last character in the line:</p>\n<pre><code class=\"language-markdown\"># This is a heading.\n</code></pre>\n<p>To fix this, remove the trailing punctuation:</p>\n<pre><code class=\"language-markdown\"># This is a heading\n</code></pre>\n<p>Note: The <code>punctuation</code> parameter can be used to specify what characters count\nas punctuation at the end of a heading. For example, you can change it to\n<code>\".,;:\"</code> to allow headings that end with an exclamation point. <code>?</code> is\nallowed by default because of how common it is in headings of FAQ-style documents.\nSetting the <code>punctuation</code> parameter to <code>\"\"</code> allows all characters - and is\nequivalent to disabling the rule.</p>\n<p>Note: The trailing semicolon of\n<a href=\"https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references\">HTML entity references</a>\nlike <code>&#x26;copy;</code>, <code>&#x26;#169;</code>, and <code>&#x26;#x000A9;</code> is ignored by this rule.</p>\n<p>Rationale: Headings are not meant to be full sentences. More information:\n<a href=\"https://cirosantilli.com/markdown-style-guide#punctuation-at-the-end-of-headers\">https://cirosantilli.com/markdown-style-guide#punctuation-at-the-end-of-headers</a></p>\n<p><a name=\"md027\"></a></p>\n<h2>MD027 - Multiple spaces after blockquote symbol</h2>\n<p>Tags: blockquote, whitespace, indentation</p>\n<p>Aliases: no-multiple-space-blockquote</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when blockquotes have more than one space after the\nblockquote (<code>></code>) symbol:</p>\n<pre><code class=\"language-markdown\">>  This is a blockquote with bad indentation\n>  there should only be one.\n</code></pre>\n<p>To fix, remove any extraneous space:</p>\n<pre><code class=\"language-markdown\">> This is a blockquote with correct\n> indentation.\n</code></pre>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md028\"></a></p>\n<h2>MD028 - Blank line inside blockquote</h2>\n<p>Tags: blockquote, whitespace</p>\n<p>Aliases: no-blanks-blockquote</p>\n<p>This rule is triggered when two blockquote blocks are separated by nothing\nexcept for a blank line:</p>\n<pre><code class=\"language-markdown\">> This is a blockquote\n> which is immediately followed by\n\n> this blockquote. Unfortunately\n> In some parsers, these are treated as the same blockquote.\n</code></pre>\n<p>To fix this, ensure that any blockquotes that are right next to each other\nhave some text in between:</p>\n<pre><code class=\"language-markdown\">> This is a blockquote.\n\nAnd Jimmy also said:\n\n> This too is a blockquote.\n</code></pre>\n<p>Alternatively, if they are supposed to be the same quote, then add the\nblockquote symbol at the beginning of the blank line:</p>\n<pre><code class=\"language-markdown\">> This is a blockquote.\n>\n> This is the same blockquote.\n</code></pre>\n<p>Rationale: Some markdown parsers will treat two blockquotes separated by one\nor more blank lines as the same blockquote, while others will treat them as\nseparate blockquotes.</p>\n<p><a name=\"md029\"></a></p>\n<h2>MD029 - Ordered list item prefix</h2>\n<p>Tags: ol</p>\n<p>Aliases: ol-prefix</p>\n<p>Parameters: style (\"one\", \"ordered\", \"one<em>or</em>ordered\", \"zero\"; default \"one<em>or</em>ordered\")</p>\n<p>This rule is triggered for ordered lists that do not either start with '1.' or\ndo not have a prefix that increases in numerical order (depending on the\nconfigured style). The less-common pattern of using '0.' as a first prefix or\nfor all prefixes is also supported.</p>\n<p>Example valid list if the style is configured as 'one':</p>\n<pre><code class=\"language-markdown\">1. Do this.\n1. Do that.\n1. Done.\n</code></pre>\n<p>Examples of valid lists if the style is configured as 'ordered':</p>\n<pre><code class=\"language-markdown\">1. Do this.\n2. Do that.\n3. Done.\n</code></pre>\n<pre><code class=\"language-markdown\">0. Do this.\n1. Do that.\n2. Done.\n</code></pre>\n<p>All three examples are valid when the style is configured as 'one<em>or</em>ordered'.</p>\n<p>Example valid list if the style is configured as 'zero':</p>\n<pre><code class=\"language-markdown\">0. Do this.\n0. Do that.\n0. Done.\n</code></pre>\n<p>Example invalid list for all styles:</p>\n<pre><code class=\"language-markdown\">1. Do this.\n3. Done.\n</code></pre>\n<p>This rule supports 0-prefixing ordered list items for uniform indentation:</p>\n<pre><code class=\"language-markdown\">...\n08. Item\n09. Item\n10. Item\n11. Item\n...\n</code></pre>\n<p>Note: This rule will report violations for cases like the following where an\nimproperly-indented code block (or similar) appears between two list items and\n\"breaks\" the list in two:</p>\n<!-- markdownlint-disable code-fence-style -->\n<pre><code class=\"language-markdown\">1. First list\n\n```text\nCode block\n```\n\n1. Second list\n</code></pre>\n<p>The fix is to indent the code block so it becomes part of the preceding list\nitem as intended:</p>\n<pre><code class=\"language-markdown\">1. First list\n\n   ```text\n   Code block\n   ```\n\n2. Still first list\n</code></pre>\n<!-- markdownlint-restore -->\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md030\"></a></p>\n<h2>MD030 - Spaces after list markers</h2>\n<p>Tags: ol, ul, whitespace</p>\n<p>Aliases: list-marker-space</p>\n<p>Parameters: ul<em>single, ol</em>single, ul<em>multi, ol</em>multi (number; default 1)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule checks for the number of spaces between a list marker (e.g. '<code>-</code>',\n'<code>*</code>', '<code>+</code>' or '<code>1.</code>') and the text of the list item.</p>\n<p>The number of spaces checked for depends on the document style in use, but the\ndefault is 1 space after any list marker:</p>\n<pre><code class=\"language-markdown\">* Foo\n* Bar\n* Baz\n\n1. Foo\n1. Bar\n1. Baz\n\n1. Foo\n   * Bar\n1. Baz\n</code></pre>\n<p>A document style may change the number of spaces after unordered list items\nand ordered list items independently, as well as based on whether the content\nof every item in the list consists of a single paragraph or multiple\nparagraphs (including sub-lists and code blocks).</p>\n<p>For example, the style guide at\n<a href=\"https://cirosantilli.com/markdown-style-guide#spaces-after-list-marker\">https://cirosantilli.com/markdown-style-guide#spaces-after-list-marker</a>\nspecifies that 1 space after the list marker should be used if every item in\nthe list fits within a single paragraph, but to use 2 or 3 spaces (for ordered\nand unordered lists respectively) if there are multiple paragraphs of content\ninside the list:</p>\n<pre><code class=\"language-markdown\">* Foo\n* Bar\n* Baz\n</code></pre>\n<p>vs.</p>\n<pre><code class=\"language-markdown\">*   Foo\n\n    Second paragraph\n\n*   Bar\n</code></pre>\n<p>or</p>\n<pre><code class=\"language-markdown\">1.  Foo\n\n    Second paragraph\n\n1.  Bar\n</code></pre>\n<p>To fix this, ensure the correct number of spaces are used after the list marker\nfor your selected document style.</p>\n<p>Rationale: Violations of this rule can lead to improperly rendered content.</p>\n<p>Note: See <a href=\"Prettier.md\">Prettier.md</a> for compatibility information.</p>\n<p><a name=\"md031\"></a></p>\n<h2>MD031 - Fenced code blocks should be surrounded by blank lines</h2>\n<p>Tags: code, blank_lines</p>\n<p>Aliases: blanks-around-fences</p>\n<p>Parameters: list_items (boolean; default true)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when fenced code blocks are either not preceded or not\nfollowed by a blank line:</p>\n<pre><code class=\"language-markdown\">Some text\n```\nCode block\n```\n\n```\nAnother code block\n```\nSome more text\n</code></pre>\n<p>To fix this, ensure that all fenced code blocks have a blank line both before\nand after (except where the block is at the beginning or end of the document):</p>\n<pre><code class=\"language-markdown\">Some text\n\n```\nCode block\n```\n\n```\nAnother code block\n```\n\nSome more text\n</code></pre>\n<p>Set the <code>list_items</code> parameter to <code>false</code> to disable this rule for list items.\nDisabling this behavior for lists can be useful if it is necessary to create a\n<a href=\"https://spec.commonmark.org/0.29/#tight\">tight</a> list containing a code fence.</p>\n<p>Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will\nnot parse fenced code blocks that don't have blank lines before and after them.</p>\n<p><a name=\"md032\"></a></p>\n<h2>MD032 - Lists should be surrounded by blank lines</h2>\n<p>Tags: bullet, ul, ol, blank_lines</p>\n<p>Aliases: blanks-around-lists</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when lists (of any kind) are either not preceded or not\nfollowed by a blank line:</p>\n<pre><code class=\"language-markdown\">Some text\n* Some\n* List\n\n1. Some\n2. List\nSome text\n</code></pre>\n<p>To fix this, ensure that all lists have a blank line both before and after\n(except where the block is at the beginning or end of the document):</p>\n<pre><code class=\"language-markdown\">Some text\n\n* Some\n* List\n\n1. Some\n2. List\n\nSome text\n</code></pre>\n<p>Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will\nnot parse lists that don't have blank lines before and after them.</p>\n<p><a name=\"md033\"></a></p>\n<h2>MD033 - Inline HTML</h2>\n<p>Tags: html</p>\n<p>Aliases: no-inline-html</p>\n<p>Parameters: allowed_elements (array of string; default empty)</p>\n<p>This rule is triggered whenever raw HTML is used in a markdown document:</p>\n<pre><code class=\"language-markdown\">&#x3C;h1>Inline HTML heading&#x3C;/h1>\n</code></pre>\n<p>To fix this, use 'pure' markdown instead of including raw HTML:</p>\n<pre><code class=\"language-markdown\"># Markdown heading\n</code></pre>\n<p>Note: To allow specific HTML elements, use the 'allowed_elements' parameter.</p>\n<p>Rationale: Raw HTML is allowed in markdown, but this rule is included for\nthose who want their documents to only include \"pure\" markdown, or for those\nwho are rendering markdown documents in something other than HTML.</p>\n<p><a name=\"md034\"></a></p>\n<h2>MD034 - Bare URL used</h2>\n<p>Tags: links, url</p>\n<p>Aliases: no-bare-urls</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered whenever a URL is given that isn't surrounded by angle\nbrackets:</p>\n<pre><code class=\"language-markdown\">For more information, see https://www.example.com/.\n</code></pre>\n<p>To fix this, add angle brackets around the URL:</p>\n<pre><code class=\"language-markdown\">For more information, see &#x3C;https://www.example.com/>.\n</code></pre>\n<p>Note: To use a bare URL without it being converted into a link, enclose it in\na code block, otherwise in some markdown parsers it <em>will</em> be converted:</p>\n<pre><code class=\"language-markdown\">`https://www.example.com`\n</code></pre>\n<p>Note: The following scenario does <em>not</em> trigger this rule to avoid conflicts\nwith <code>MD011</code>/<code>no-reversed-links</code>:</p>\n<pre><code class=\"language-markdown\">[https://www.example.com]\n</code></pre>\n<p>The use of quotes around a bare link will <em>not</em> trigger this rule, either:</p>\n<pre><code class=\"language-markdown\">\"https://www.example.com\"\n'https://www.example.com'\n</code></pre>\n<p>Rationale: Without angle brackets, the URL isn't converted into a link by many\nmarkdown parsers.</p>\n<p><a name=\"md035\"></a></p>\n<h2>MD035 - Horizontal rule style</h2>\n<p>Tags: hr</p>\n<p>Aliases: hr-style</p>\n<p>Parameters: style (\"consistent\", \"---\", \"***\", or other string specifying the\nhorizontal rule; default \"consistent\")</p>\n<p>This rule is triggered when inconsistent styles of horizontal rules are used\nin the document:</p>\n<pre><code class=\"language-markdown\">---\n\n- - -\n\n***\n\n* * *\n\n****\n</code></pre>\n<p>To fix this, ensure any horizontal rules used in the document are consistent,\nor match the given style if the rule is so configured:</p>\n<pre><code class=\"language-markdown\">---\n\n---\n</code></pre>\n<p>Note: by default, this rule is configured to just require that all horizontal\nrules in the document are the same and will trigger if any of the horizontal\nrules are different than the first one encountered in the document. If you\nwant to configure the rule to match a specific style, the parameter given to\nthe 'style' option is a string containing the exact horizontal rule text that\nis allowed.</p>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md036\"></a></p>\n<h2>MD036 - Emphasis used instead of a heading</h2>\n<p>Tags: headings, headers, emphasis</p>\n<p>Aliases: no-emphasis-as-heading, no-emphasis-as-header</p>\n<p>Parameters: punctuation (string; default \".,;:!?。，；：！？\")</p>\n<p>This check looks for instances where emphasized (i.e. bold or italic) text is\nused to separate sections, where a heading should be used instead:</p>\n<pre><code class=\"language-markdown\">**My document**\n\nLorem ipsum dolor sit amet...\n\n_Another section_\n\nConsectetur adipiscing elit, sed do eiusmod.\n</code></pre>\n<p>To fix this, use markdown headings instead of emphasized text to denote\nsections:</p>\n<pre><code class=\"language-markdown\"># My document\n\nLorem ipsum dolor sit amet...\n\n## Another section\n\nConsectetur adipiscing elit, sed do eiusmod.\n</code></pre>\n<p>Note: This rule looks for single-line paragraphs that consist entirely\nof emphasized text. It won't fire on emphasis used within regular text,\nmulti-line emphasized paragraphs, or paragraphs ending in punctuation\n(normal or full-width). Similarly to rule MD026, you can configure what\ncharacters are recognized as punctuation.</p>\n<p>Rationale: Using emphasis instead of a heading prevents tools from inferring\nthe structure of a document. More information:\n<a href=\"https://cirosantilli.com/markdown-style-guide#emphasis-vs-headers\">https://cirosantilli.com/markdown-style-guide#emphasis-vs-headers</a>.</p>\n<p><a name=\"md037\"></a></p>\n<h2>MD037 - Spaces inside emphasis markers</h2>\n<p>Tags: whitespace, emphasis</p>\n<p>Aliases: no-space-in-emphasis</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when emphasis markers (bold, italic) are used, but they\nhave spaces between the markers and the text:</p>\n<pre><code class=\"language-markdown\">Here is some ** bold ** text.\n\nHere is some * italic * text.\n\nHere is some more __ bold __ text.\n\nHere is some more _ italic _ text.\n</code></pre>\n<p>To fix this, remove the spaces around the emphasis markers:</p>\n<pre><code class=\"language-markdown\">Here is some **bold** text.\n\nHere is some *italic* text.\n\nHere is some more __bold__ text.\n\nHere is some more _italic_ text.\n</code></pre>\n<p>Rationale: Emphasis is only parsed as such when the asterisks/underscores\naren't surrounded by spaces. This rule attempts to detect where\nthey were surrounded by spaces, but it appears that emphasized text was\nintended by the author.</p>\n<p><a name=\"md038\"></a></p>\n<h2>MD038 - Spaces inside code span elements</h2>\n<p>Tags: whitespace, code</p>\n<p>Aliases: no-space-in-code</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered for code span elements that have spaces adjacent to the\nbackticks:</p>\n<pre><code class=\"language-markdown\">`some text `\n\n` some text`\n</code></pre>\n<p>To fix this, remove any spaces adjacent to the backticks:</p>\n<pre><code class=\"language-markdown\">`some text`\n</code></pre>\n<p>Note: A single leading and trailing space is allowed by the specification and\nautomatically trimmed (to allow for embedded backticks):</p>\n<pre><code class=\"language-markdown\">`` `backticks` ``\n</code></pre>\n<p>Note: A single leading or trailing space is allowed if used to separate code span\nmarkers from an embedded backtick:</p>\n<pre><code class=\"language-markdown\">`` ` embedded backtick``\n</code></pre>\n<p>Rationale: Violations of this rule can lead to improperly rendered content.</p>\n<p><a name=\"md039\"></a></p>\n<h2>MD039 - Spaces inside link text</h2>\n<p>Tags: whitespace, links</p>\n<p>Aliases: no-space-in-links</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered on links that have spaces surrounding the link text:</p>\n<pre><code class=\"language-markdown\">[ a link ](https://www.example.com/)\n</code></pre>\n<p>To fix this, remove the spaces surrounding the link text:</p>\n<pre><code class=\"language-markdown\">[a link](https://www.example.com/)\n</code></pre>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md040\"></a></p>\n<h2>MD040 - Fenced code blocks should have a language specified</h2>\n<p>Tags: code, language</p>\n<p>Aliases: fenced-code-language</p>\n<p>This rule is triggered when fenced code blocks are used, but a language isn't\nspecified:</p>\n<pre><code class=\"language-markdown\">```\n#!/bin/bash\necho Hello world\n```\n</code></pre>\n<p>To fix this, add a language specifier to the code block:</p>\n<pre><code class=\"language-markdown\">```bash\n#!/bin/bash\necho Hello world\n```\n</code></pre>\n<p>To display a code block without syntax highlighting, use:</p>\n<pre><code class=\"language-markdown\">```text\nPlain text in a code block\n```\n</code></pre>\n<p>Rationale: Specifying a language improves content rendering by using the\ncorrect syntax highlighting for code. More information:\n<a href=\"https://cirosantilli.com/markdown-style-guide#option-code-fenced\">https://cirosantilli.com/markdown-style-guide#option-code-fenced</a>.</p>\n<p><a name=\"md041\"></a></p>\n<h2>MD041 - First line in a file should be a top-level heading</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: first-line-heading, first-line-h1</p>\n<p>Parameters: level, front<em>matter</em>title (number; default 1, string; default \"^\\s<em>\"?title\"?\\s</em>[:=]\")</p>\n<p>This rule is intended to ensure documents have a title and is triggered when\nthe first line in the file isn't a top-level (h1) heading:</p>\n<pre><code class=\"language-markdown\">This is a file without a heading\n</code></pre>\n<p>To fix this, add a top-level heading to the beginning of the file:</p>\n<pre><code class=\"language-markdown\"># File with heading\n\nThis is a file with a top-level heading\n</code></pre>\n<p>Because it is common for projects on GitHub to use an image for the heading of\n<code>README.md</code> and that is not well-supported by Markdown, HTML headings are also\npermitted by this rule. For example:</p>\n<pre><code class=\"language-markdown\">&#x3C;h1 align=\"center\">&#x3C;img src=\"https://placekitten.com/300/150\"/>&#x3C;/h1>\n\nThis is a file with a top-level HTML heading\n</code></pre>\n<p>Note: The <code>level</code> parameter can be used to change the top-level (ex: to h2) in cases\nwhere an h1 is added externally.</p>\n<p>If <a href=\"https://en.wikipedia.org/wiki/YAML\">YAML</a> front matter is present and\ncontains a <code>title</code> property (commonly used with blog posts), this rule will not\nreport a violation. To use a different property name in the front matter,\nspecify the text of a regular expression via the <code>front_matter_title</code> parameter.\nTo disable the use of front matter by this rule, specify <code>\"\"</code> for <code>front_matter_title</code>.</p>\n<p>Rationale: The top-level heading often acts as the title of a document. More\ninformation: <a href=\"https://cirosantilli.com/markdown-style-guide#top-level-header\">https://cirosantilli.com/markdown-style-guide#top-level-header</a>.</p>\n<p><a name=\"md042\"></a></p>\n<h2>MD042 - No empty links</h2>\n<p>Tags: links</p>\n<p>Aliases: no-empty-links</p>\n<p>This rule is triggered when an empty link is encountered:</p>\n<pre><code class=\"language-markdown\">[an empty link]()\n</code></pre>\n<p>To fix the violation, provide a destination for the link:</p>\n<pre><code class=\"language-markdown\">[a valid link](https://example.com/)\n</code></pre>\n<p>Empty fragments will trigger this rule:</p>\n<pre><code class=\"language-markdown\">[an empty fragment](#)\n</code></pre>\n<p>But non-empty fragments will not:</p>\n<pre><code class=\"language-markdown\">[a valid fragment](#fragment)\n</code></pre>\n<p>Rationale: Empty links do not lead anywhere and therefore don't function as links.</p>\n<p><a name=\"md043\"></a></p>\n<h2>MD043 - Required heading structure</h2>\n<p>Tags: headings, headers</p>\n<p>Aliases: required-headings, required-headers</p>\n<p>Parameters: headings, headers (array of string; default <code>null</code> for disabled)</p>\n<blockquote>\n<p>If <code>headings</code> is not provided, <code>headers</code> (deprecated) will be used.</p>\n</blockquote>\n<p>This rule is triggered when the headings in a file do not match the array of\nheadings passed to the rule. It can be used to enforce a standard heading\nstructure for a set of files.</p>\n<p>To require exactly the following structure:</p>\n<pre><code class=\"language-markdown\"># Head\n## Item\n### Detail\n</code></pre>\n<p>Set the <code>headings</code> parameter to:</p>\n<pre><code class=\"language-json\">[\n    \"# Head\",\n    \"## Item\",\n    \"### Detail\"\n]\n</code></pre>\n<p>To allow optional headings as with the following structure:</p>\n<pre><code class=\"language-markdown\"># Head\n## Item\n### Detail (optional)\n## Foot\n### Notes (optional)\n</code></pre>\n<p>Use the special value <code>\"*\"</code> meaning \"zero or more unspecified headings\" or the\nspecial value <code>\"+\"</code> meaning \"one or more unspecified headings\" and set the\n<code>headings</code> parameter to:</p>\n<pre><code class=\"language-json\">[\n    \"# Head\",\n    \"## Item\",\n    \"*\",\n    \"## Foot\",\n    \"*\"\n]\n</code></pre>\n<p>When an error is detected, this rule outputs the line number of the first\nproblematic heading (otherwise, it outputs the last line number of the file).</p>\n<p>Note that while the <code>headings</code> parameter uses the \"## Text\" ATX heading style for\nsimplicity, a file may use any supported heading style.</p>\n<p>Rationale: Projects may wish to enforce a consistent document structure across\na set of similar content.</p>\n<p><a name=\"md044\"></a></p>\n<h2>MD044 - Proper names should have the correct capitalization</h2>\n<p>Tags: spelling</p>\n<p>Aliases: proper-names</p>\n<p>Parameters: names, code_blocks (string array; default <code>null</code>, boolean; default <code>true</code>)</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when any of the strings in the <code>names</code> array do not have\nthe specified capitalization. It can be used to enforce a standard letter case\nfor the names of projects and products.</p>\n<p>For example, the language \"JavaScript\" is usually written with both the 'J' and\n'S' capitalized - though sometimes the 's' or 'j' appear in lower-case. To enforce\nthe proper capitalization, specify the desired letter case in the <code>names</code> array:</p>\n<pre><code class=\"language-json\">[\n    \"JavaScript\"\n]\n</code></pre>\n<p>Set the <code>code_blocks</code> parameter to <code>false</code> to disable this rule for code blocks.</p>\n<p>Rationale: Incorrect capitalization of proper names is usually a mistake.</p>\n<p><a name=\"md045\"></a></p>\n<h2>MD045 - Images should have alternate text (alt text)</h2>\n<p>Tags: accessibility, images</p>\n<p>Aliases: no-alt-text</p>\n<p>This rule is triggered when an image is missing alternate text (alt text) information.</p>\n<p>Alternate text is commonly specified inline as:</p>\n<pre><code class=\"language-markdown\">![Alternate text](image.jpg)\n</code></pre>\n<p>Or with reference syntax as:</p>\n<pre><code class=\"language-markdown\">![Alternate text][ref]\n\n...\n\n[ref]: image.jpg \"Optional title\"\n</code></pre>\n<p>Guidance for writing alternate text is available from the <a href=\"https://www.w3.org/WAI/alt/\">W3C</a>,\n<a href=\"https://en.wikipedia.org/wiki/Alt_attribute\">Wikipedia</a>, and\n<a href=\"https://www.phase2technology.com/blog/no-more-excuses\">other locations</a>.</p>\n<p>Rationale: Alternate text is important for accessibility and describes the\ncontent of an image for people who may not be able to see it.</p>\n<p><a name=\"md046\"></a></p>\n<h2>MD046 - Code block style</h2>\n<p>Tags: code</p>\n<p>Aliases: code-block-style</p>\n<p>Parameters: style (\"consistent\", \"fenced\", \"indented\"; default \"consistent\")</p>\n<p>This rule is triggered when unwanted or different code block styles are used in\nthe same document.</p>\n<p>In the default configuration this rule reports a violation for the following document:</p>\n<!-- markdownlint-disable code-block-style -->\n<pre><code>Some text.\n\n    # Indented code\n\nMore text.\n\n```ruby\n# Fenced code\n```\n\nMore text.\n</code></pre>\n<!-- markdownlint-restore -->\n<p>To fix violations of this rule, use a consistent style (either indenting or code\nfences).</p>\n<p>The specified style can be specific (<code>fenced</code>, <code>indented</code>) or simply require\nthat usage be consistent within the document (<code>consistent</code>).</p>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>\n<p><a name=\"md047\"></a></p>\n<h2>MD047 - Files should end with a single newline character</h2>\n<p>Tags: blank_lines</p>\n<p>Aliases: single-trailing-newline</p>\n<p>Fixable: Most violations can be fixed by tooling</p>\n<p>This rule is triggered when there is not a single newline character at the end\nof a file.</p>\n<p>An example that triggers the rule:</p>\n<pre><code class=\"language-markdown\"># Heading\n\nThis file ends without a newline.[EOF]\n</code></pre>\n<p>To fix the violation, add a newline character to the end of the file:</p>\n<pre><code class=\"language-markdown\"># Heading\n\nThis file ends with a newline.\n[EOF]\n</code></pre>\n<p>Rationale: Some programs have trouble with files that do not end with a newline.\nMore information: <a href=\"https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file\">https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file</a>.</p>\n<p><a name=\"md048\"></a></p>\n<h2>MD048 - Code fence style</h2>\n<p>Tags: code</p>\n<p>Aliases: code-fence-style</p>\n<p>Parameters: style (\"consistent\", \"tilde\", \"backtick\"; default \"consistent\")</p>\n<p>This rule is triggered when the symbols used in the document for fenced code\nblocks do not match the configured code fence style:</p>\n<pre><code class=\"language-markdown\">```ruby\n# Fenced code\n```\n\n~~~ruby\n# Fenced code\n~~~\n</code></pre>\n<p>To fix this issue, use the configured code fence style throughout the\ndocument:</p>\n<pre><code class=\"language-markdown\">```ruby\n# Fenced code\n```\n\n```ruby\n# Fenced code\n```\n</code></pre>\n<p>The configured list style can be a specific symbol to use (backtick, tilde), or\ncan require that usage be consistent within the document.</p>\n<p>Rationale: Consistent formatting makes it easier to understand a document.</p>"},{"url":"/docs/reference/notes-template/","relativePath":"docs/reference/notes-template.md","relativeDir":"docs/reference","base":"notes-template.md","name":"notes-template","frontmatter":{"title":"Notes Template","weight":0,"seo":{"title":"Gatsby Plugins For This Sites Content Model","description":"This is my markdown notes tempate","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Gatsby Plugins For This Sites Content Model","keyName":"property"},{"name":"og:description","value":"This is the Gatsby Plugins For This Sites Content Model page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Gatsby Plugins For This Sites Content Model"},{"name":"twitter:description","value":"This is the Gatsby Plugins For This Sites Content Model page"}]},"template":"docs"},"html":"<p><img src=\"images/0001-76d89ef6.jpg\"></p>\n<h1>Title</h1>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<ul>\n<li>\n<p>Description:</p>\n<blockquote>\n<p>/_ Description here _/</p>\n</blockquote>\n</li>\n</ul>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>ToC:</h2>\n<ul>\n<li>\n<p><a href=\"#title\">Title</a></p>\n<ul>\n<li><a href=\"#toc\">ToC:</a></li>\n<li><a href=\"#main-notes\">Main Notes:</a></li>\n<li><a href=\"#resource-links\">Resource Links:</a></li>\n<li><a href=\"#10-x-10-table\">10 X 10 Table</a></li>\n<li><a href=\"#headers\">Headers</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#h1\">H1</a></p>\n<ul>\n<li>\n<p><a href=\"#h2\">H2</a></p>\n<ul>\n<li>\n<p><a href=\"#h3\">H3</a></p>\n<ul>\n<li>\n<p><a href=\"#h4\">H4</a></p>\n<ul>\n<li>\n<p><a href=\"#h5\">H5</a></p>\n<ul>\n<li><a href=\"#h6\">H6</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><a href=\"#alt-h1\">Alt-H1</a></p>\n<ul>\n<li><a href=\"#alt-h2\">Alt-H2</a></li>\n<li><a href=\"#emphasis\">Emphasis</a></li>\n<li><a href=\"#lists\">Lists</a></li>\n<li><a href=\"#links\">Links</a></li>\n<li><a href=\"#images\">Images</a></li>\n<li><a href=\"#code-and-syntax-highlighting\">Code and Syntax Highlighting</a></li>\n<li><a href=\"#tables\">Tables</a></li>\n<li><a href=\"#blockquotes\">Blockquotes</a></li>\n<li><a href=\"#inline-html\">Inline HTML</a></li>\n<li><a href=\"#horizontal-rule\">Horizontal Rule</a></li>\n<li><a href=\"#line-breaks\">Line Breaks</a></li>\n<li><a href=\"#youtube-videos\">YouTube Videos</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#this-is-an-h1\">This is an H1</a></p>\n<ul>\n<li>\n<p><a href=\"#this-is-an-h2\">This is an H2</a></p>\n<ul>\n<li>\n<p><a href=\"#this-is-an-h3\">This is an H3</a></p>\n<ul>\n<li><a href=\"#this-is-an-h4\">This is an H4</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li><a href=\"#quoting\">Quoting</a></li>\n<li><a href=\"#unordered-lists\">Unordered Lists</a></li>\n<li><a href=\"#ordered-lists\">Ordered Lists</a></li>\n<li><a href=\"#video-embeds\">Video Embeds</a></li>\n<li><a href=\"#code-blocks\">Code Blocks</a></li>\n<li><a href=\"#tables-1\">Tables</a></li>\n</ul>\n</li>\n</ul>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>Main Notes:</h2>\n<pre><code class=\"language-js\"></code></pre>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>Resource Links:</h2>\n<ol>\n<li><a href=\"\"></a></li>\n<li><a href=\"\"></a></li>\n<li><a href=\"\"></a></li>\n<li><a href=\"\"></a></li>\n<li><a href=\"\"></a></li>\n<li><a href=\"\"></a></li>\n</ol>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>10 X 10 Table</h2>\n<table>\n<tbody>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n</tbody>\n</table>\n<a name=\"headers\"/>\n<h2>Headers</h2>\n<pre><code class=\"language-no-highlight\"># H1\n## H2\n### H3\n#### H4\n##### H5\n###### H6\n\nAlternatively, for H1 and H2, an underline-ish style:\n\nAlt-H1\n======\n\nAlt-H2\n------\n</code></pre>\n<h1>H1</h1>\n<h2>H2</h2>\n<h3>H3</h3>\n<h4>H4</h4>\n<h5>H5</h5>\n<h6>H6</h6>\n<p>Alternatively, for H1 and H2, an underline-ish style:</p>\n<h1>Alt-H1</h1>\n<h2>Alt-H2</h2>\n<a name=\"emphasis\"/>\n<h2>Emphasis</h2>\n<pre><code class=\"language-no-highlight\">Emphasis, aka italics, with *asterisks* or _underscores_.\n\nStrong emphasis, aka bold, with **asterisks** or __underscores__.\n\nCombined emphasis with **asterisks and _underscores_**.\n\nStrikethrough uses two tildes. ~~Scratch this.~~\n</code></pre>\n<p>Emphasis, aka italics, with <em>asterisks</em> or <em>underscores</em>.</p>\n<p>Strong emphasis, aka bold, with <strong>asterisks</strong> or <strong>underscores</strong>.</p>\n<p>Combined emphasis with <strong>asterisks and <em>underscores</em></strong>.</p>\n<p>Strikethrough uses two tildes. <del>Scratch this.</del></p>\n<a name=\"lists\"/>\n<h2>Lists</h2>\n<p>(In this example, leading and trailing spaces are shown with with dots: ⋅)</p>\n<pre><code class=\"language-no-highlight\">1. First ordered list item\n2. Another item\n⋅⋅* Unordered sub-list.\n1. Actual numbers don't matter, just that it's a number\n⋅⋅1. Ordered sub-list\n4. And another item.\n\n⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).\n\n⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅\n⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅\n⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)\n\n* Unordered list can use asterisks\n- Or minuses\n+ Or pluses\n</code></pre>\n<ol>\n<li>First ordered list item</li>\n<li>Another item</li>\n<li>Unordered sub-list.</li>\n<li>Actual numbers don't matter, just that it's a number</li>\n<li>Ordered sub-list</li>\n<li>\n<p>And another item.</p>\n<p>You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).</p>\n<p>To have a line break without a paragraph, you will need to use two trailing spaces.<br>\nNote that this line is separate, but within the same paragraph.<br>\n(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)</p>\n</li>\n<li>Unordered list can use asterisks</li>\n</ol>\n<!---->\n<ul>\n<li>Or minuses</li>\n</ul>\n<!---->\n<ul>\n<li>Or pluses</li>\n</ul>\n<a name=\"links\"/>\n<h2>Links</h2>\n<p>There are two ways to create links.</p>\n<pre><code class=\"language-no-highlight\">[I'm an inline-style link](https://www.google.com)\n\n[I'm an inline-style link with title](https://www.google.com \"Google's Homepage\")\n\n[I'm a reference-style link][Arbitrary case-insensitive reference text]\n\n[I'm a relative reference to a repository file](../blob/master/LICENSE)\n\n[You can use numbers for reference-style link definitions][1]\n\nOr leave it empty and use the [link text itself].\n\nURLs and URLs in angle brackets will automatically get turned into links.\nhttp://www.example.com or &#x3C;http://www.example.com> and sometimes\nexample.com (but not on Github, for example).\n\nSome text to show that the reference links can follow later.\n\n[arbitrary case-insensitive reference text]: https://www.mozilla.org\n[1]: http://slashdot.org\n[link text itself]: http://www.reddit.com\n</code></pre>\n<p><a href=\"https://www.google.com\">I'm an inline-style link</a></p>\n<p><a href=\"https://www.google.com\" title=\"Google&#x27;s Homepage\">I'm an inline-style link with title</a></p>\n<p><a href=\"https://www.mozilla.org\">I'm a reference-style link</a></p>\n<p><a href=\"../blob/master/LICENSE\">I'm a relative reference to a repository file</a></p>\n<p><a href=\"http://slashdot.org\">You can use numbers for reference-style link definitions</a></p>\n<p>Or leave it empty and use the <a href=\"http://www.reddit.com\">link text itself</a>.</p>\n<p>URLs and URLs in angle brackets will automatically get turned into links.\n<a href=\"http://www.example.com\">http://www.example.com</a> or <a href=\"http://www.example.com\">http://www.example.com</a> and sometimes\nexample.com (but not on Github, for example).</p>\n<p>Some text to show that the reference links can follow later.</p>\n<a name=\"images\"/>\n<h2>Images</h2>\n<p><img src=\"images/md-cheat-sheet-42411273.PNG\"></p>\n<pre><code class=\"language-no-highlight\">Here's our logo (hover to see the title text):\n\nInline-style:\n![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png \"Logo Title Text 1\")\n\nReference-style:\n![alt text][logo]\n\n[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png \"Logo Title Text 2\"\n</code></pre>\n<p>Here's our logo (hover to see the title text):</p>\n<p>Inline-style:\n<img src=\"https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png\" alt=\"alt text\" title=\"Logo Title Text 1\"></p>\n<p>Reference-style:\n<img src=\"https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png\" alt=\"alt text\" title=\"Logo Title Text 2\"></p>\n<a name=\"code\"/>\n<h2>Code and Syntax Highlighting</h2>\n<p>Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and <em>Markdown Here</em> -- support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. <em>Markdown Here</em> supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the <a href=\"http://softwaremaniacs.org/media/soft/highlight/test.html\">highlight.js demo page</a>.</p>\n<pre><code class=\"language-no-highlight\">Inline `code` has `back-ticks around` it.\n</code></pre>\n<p>Inline <code>code</code> has <code>back-ticks around</code> it.</p>\n<p>Blocks of code are either fenced by lines with three back-ticks <code>```</code>, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.</p>\n<pre lang=\"no-highlight\"><code>```javascript\nvar s = \"JavaScript syntax highlighting\";\nalert(s);\n```\n \n```python\ns = \"Python syntax highlighting\"\nprint s\n```\n \n```\nNo language indicated, so no syntax highlighting. \nBut let's throw in a &lt;b&gt;tag&lt;/b&gt;.\n```\n</code></pre>\n<pre><code class=\"language-javascript\">var s = 'JavaScript syntax highlighting';\nalert(s);\n</code></pre>\n<pre><code class=\"language-python\">s = \"Python syntax highlighting\"\nprint s\n</code></pre>\n<pre><code>No language indicated, so no syntax highlighting in Markdown Here (varies on Github).\nBut let's throw in a &#x3C;b>tag&#x3C;/b>.\n</code></pre>\n<a name=\"tables\"/>\n<h2>Tables</h2>\n<p>Tables aren't part of the core Markdown spec, but they are part of GFM and <em>Markdown Here</em> supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.</p>\n<pre><code class=\"language-no-highlight\">Colons can be used to align columns.\n\n| Tables        |      Are      |  Cool |\n| ------------- | :-----------: | ----: |\n| col 3 is      | right-aligned | $1600 |\n| col 2 is      |   centered    |   $12 |\n| zebra stripes |   are neat    |    $1 |\n\nThere must be at least 3 dashes separating each header cell.\nThe outer pipes (|) are optional, and you don't need to make the\nraw Markdown line up prettily. You can also use inline Markdown.\n\n| Markdown | Less      | Pretty     |\n| -------- | --------- | ---------- |\n| *Still*  | `renders` | **nicely** |\n| 1        | 2         | 3          |\n</code></pre>\n<p>Colons can be used to align columns.</p>\n<table>\n<thead>\n<tr>\n<th>Tables</th>\n<th align=\"center\">Are</th>\n<th align=\"right\">Cool</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>col 3 is</td>\n<td align=\"center\">right-aligned</td>\n<td align=\"right\">$1600</td>\n</tr>\n<tr>\n<td>col 2 is</td>\n<td align=\"center\">centered</td>\n<td align=\"right\">$12</td>\n</tr>\n<tr>\n<td>zebra stripes</td>\n<td align=\"center\">are neat</td>\n<td align=\"right\">$1</td>\n</tr>\n</tbody>\n</table>\n<p>There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.</p>\n<table>\n<thead>\n<tr>\n<th>Markdown</th>\n<th>Less</th>\n<th>Pretty</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><em>Still</em></td>\n<td><code>renders</code></td>\n<td><strong>nicely</strong></td>\n</tr>\n<tr>\n<td>1</td>\n<td>2</td>\n<td>3</td>\n</tr>\n</tbody>\n</table>\n<a name=\"blockquotes\"/>\n<h2>Blockquotes</h2>\n<pre><code class=\"language-no-highlight\">> Blockquotes are very handy in email to emulate reply text.\n> This line is part of the same quote.\n\nQuote break.\n\n> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.\n</code></pre>\n<blockquote>\n<p>Blockquotes are very handy in email to emulate reply text.\nThis line is part of the same quote.</p>\n</blockquote>\n<p>Quote break.</p>\n<blockquote>\n<p>This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can <em>put</em> <strong>Markdown</strong> into a blockquote.</p>\n</blockquote>\n<a name=\"html\"/>\n<h2>Inline HTML</h2>\n<p>You can also use raw HTML in your Markdown, and it'll mostly work pretty well.</p>\n<pre><code class=\"language-no-highlight\">&#x3C;dl>\n  &#x3C;dt>Definition list&#x3C;/dt>\n  &#x3C;dd>Is something people use sometimes.&#x3C;/dd>\n\n  &#x3C;dt>Markdown in HTML&#x3C;/dt>\n  &#x3C;dd>Does *not* work **very** well. Use HTML &#x3C;em>tags&#x3C;/em>.&#x3C;/dd>\n&#x3C;/dl>\n</code></pre>\n<dl>\n  <dt>Definition list</dt>\n  <dd>Is something people use sometimes.</dd>\n  <dt>Markdown in HTML</dt>\n  <dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>\n</dl>\n<a name=\"hr\"/>\n<h2>Horizontal Rule</h2>\n<pre><code>Three or more...\n\n[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#-)\n\nHyphens\n\n***\n\nAsterisks\n\n___\n\nUnderscores\n</code></pre>\n<p>Three or more...</p>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<p>Hyphens</p>\n<hr>\n<p>Asterisks</p>\n<hr>\n<p>Underscores</p>\n<a name=\"lines\"/>\n<h2>Line Breaks</h2>\n<p>My basic recommendation for learning how line breaks work is to experiment and discover -- hit &#x3C;Enter> once (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You'll soon learn to get what you want. \"Markdown Toggle\" is your friend.</p>\n<p>Here are some things to try out:</p>\n<pre><code>Here's a line for us to start with.\n\nThis line is separated from the one above by two newlines, so it will be a *separate paragraph*.\n\nThis line is also a separate paragraph, but...\nThis line is only separated by a single newline, so it's a separate line in the *same paragraph*.\n</code></pre>\n<p>Here's a line for us to start with.</p>\n<p>This line is separated from the one above by two newlines, so it will be a <em>separate paragraph</em>.</p>\n<p>This line is also begins a separate paragraph, but...<br>\nThis line is only separated by a single newline, so it's a separate line in the <em>same paragraph</em>.</p>\n<p>(Technical note: <em>Markdown Here</em> uses GFM line breaks, so there's no need to use MD's two-space line breaks.)</p>\n<a name=\"videos\"/>\n<h2>YouTube Videos</h2>\n<p>They can't be added directly but you can add an image with a link to the video like this:</p>\n<pre><code class=\"language-no-highlight\">&#x3C;a href=\"http://www.youtube.com/watch?feature=player_embedded&#x26;v=YOUTUBE_VIDEO_ID_HERE\n\" target=\"_blank\">&#x3C;img src=\"http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg\"\nalt=\"IMAGE ALT TEXT HERE\" width=\"240\" height=\"180\" border=\"10\" />&#x3C;/a>\n</code></pre>\n<p>Or, in pure Markdown, but losing the image sizing and border:</p>\n<pre><code class=\"language-no-highlight\">[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)\n</code></pre>\n<p><strong>This is a paragraph</strong>. Pellentesque habitant morbi <em>tristique senectus et netus et malesuada</em> fames ac turpis egestas. Vestibulum <a href=\"https://www.google.com\">tortor quam</a>, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit <mark>amet est et sapien ullamcorper</mark> pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.</p>\n<h1>This is an H1</h1>\n<p>Quisque facilisis erat a dui. Nam malesuada ornare dolor. Cras gravida, this is marked text ornare, erat elit consectetuer erat, id egestas pede nibh eget odio. Proin tincidunt, velit vel porta elementum, magna diam molestie sapien, non aliquet massa pede eu diam. Aliquam iaculis. Fusce et ipsum et nulla tristique facilisis.</p>\n<h2>This is an H2</h2>\n<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero.</p>\n<h3>This is an H3</h3>\n<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero.</p>\n<h4>This is an H4</h4>\n<p>Quisque facilisis erat a dui. Nam malesuada ornare dolor. Cras gravida, diam sit amet rhoncus ornare, erat elit consectetuer erat, id egestas pede nibh eget odio. Proin tincidunt, velit vel porta elementum, magna diam molestie sapien, non aliquet massa pede eu diam. Aliquam iaculis.</p>\n<h2>Quoting</h2>\n<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>\n<blockquote>\n<p>Creativity is allowing yourself to make mistakes. Design is knowing which ones to keep. - Scott Adams</p>\n</blockquote>\n<p>Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero.</p>\n<hr />\n<h2>Unordered Lists</h2>\n<ul>\n<li>Donec non tortor in arcu mollis feugiat</li>\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit</li>\n<li>Donec id eros eget quam aliquam gravida</li>\n<li>Vivamus convallis urna id felis</li>\n<li>Nulla porta tempus sapien</li>\n</ul>\n<h2>Ordered Lists</h2>\n<ol>\n<li>Donec non tortor in arcu mollis feugiat</li>\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit</li>\n<li>Donec id eros eget quam aliquam gravida</li>\n<li>Vivamus convallis urna id felis</li>\n<li>Nulla porta tempus sapien</li>\n</ol>\n<h2>Video Embeds</h2>\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/8uuFIi-ghPI\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<h2>Code Blocks</h2>\n<p>Blocks of code are either fenced by <code>lines with three back-ticks</code>, or are indented with four spaces.</p>\n<pre><code>&#x3C;!-- Some example CSS code -->\nbody {\n  color:red;\n}\n</code></pre>\n<pre><code class=\"language-javascript\">window.$docsify = {\n    coverpage: true,\n\n    // Custom file name\n    coverpage: 'cover.md',\n\n    // mutiple covers\n    coverpage: ['/', '/zh-cn/'],\n\n    // mutiple covers and custom file name\n    coverpage: {\n        '/': 'cover.md',\n        '/zh-cn/': 'cover.md'\n    }\n};\n</code></pre>\n<h2>Tables</h2>\n<div class=\"responsive-table\">\n  <table>\n      <caption>Table with thead, tfoot, and tbody</caption>\n    <thead>\n      <tr>\n        <th>Header content 1</th>\n        <th>Header content 2</th>\n      </tr>\n    </thead>\n    <tbody>\n      <tr>\n        <td>Body content 1</td>\n        <td>Body content 2</td>\n      </tr>\n    </tbody>\n    <tfoot>\n      <tr>\n        <td>Footer content 1</td>\n        <td>Footer content 2</td>\n      </tr>\n    </tfoot>\n  </table>\n</div>\n<div class=\"note\"><strong>Note:</strong> Both of the features you used above are parts of the Document Object Model (DOM) API, which allows you to manipulate documents.</div>\n<div class=\"important\"><strong>Important:</strong> In this article, try entering the example code lines into your JavaScript console to see what happens. For more details on JavaScript consoles, see Discover browser developer tools.</div>"},{"url":"/docs/tips/array-methods/","relativePath":"docs/tips/array-methods.md","relativeDir":"docs/tips","base":"array-methods.md","name":"array-methods","frontmatter":{"title":"Tips","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Lorem ipsum</h2>\n<p>Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n<ul>\n<li>Lorem ipsum</li>\n<li>dolor sit amet</li>\n</ul>"},{"url":"/docs/reference/resources/","relativePath":"docs/reference/resources.md","relativeDir":"docs/reference","base":"resources.md","name":"resources","frontmatter":{"title":"Developer Resources","weight":0,"excerpt":"Developer Resources","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h3>Web Dev Resources</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*S5zCjm6p0WSZJQfT\" alt=\"Photo by Roman Synkevych on Unsplash\" class=\"graf-image\" /><figcaption>Photo by <a href=\"https://unsplash.com/@synkevych?utm_source=medium&amp;utm_medium=referral\" class=\"markup--anchor markup--figure-anchor\">Roman Synkevych</a> on <a href=\"https://unsplash.com?utm_source=medium&amp;utm_medium=referral\" class=\"markup--anchor markup--figure-anchor\">Unsplash</a></figcaption></figure>### Web Development\n<ul>\n<li><span id=\"7f87\"><a href=\"https://caniuse.com/#home\" class=\"markup--anchor markup--li-anchor\">Check cross-browser compatibility for CSS, JavaScript and HTML</a></span></li>\n<li><span id=\"6491\"><a href=\"https://medium.freecodecamp.org/modern-frontend-hacking-cheatsheets-df9c2566c72a\" class=\"markup--anchor markup--li-anchor\">Modern front-end Cheatsheets</a></span></li>\n<li><span id=\"1272\"><a href=\"https://stackshare.io/\" class=\"markup--anchor markup--li-anchor\">Check out what your favorite company's stack is</a></span></li>\n<li><span id=\"d228\"><a href=\"https://medium.com/coderbyte/a-guide-to-becoming-a-full-stack-developer-in-2017-5c3c08a1600c\" class=\"markup--anchor markup--li-anchor\">A Guide to Becoming a Full-Stack Developer in 2017</a></span></li>\n<li><span id=\"0b32\"><a href=\"http://edusagar.com/articles/view/70/What-happens-when-you-type-a-URL-in-browser\" class=\"markup--anchor markup--li-anchor\">What happens when you type a URL into a web browser</a></span></li>\n</ul>\n<h3>JavaScript</h3>\n<ul>\n<li><span id=\"cb55\"><a href=\"https://github.com/airbnb/javascript\" class=\"markup--anchor markup--li-anchor\">Airbnb JavaScript Style Guide</a></span></li>\n<li><span id=\"5f22\"><a href=\"https://medium.freecodecamp.org/regular-expressions-demystified-regex-isnt-as-hard-as-it-looks-617b55cf787\" class=\"markup--anchor markup--li-anchor\">Regular Expressions Demystified</a></span></li>\n<li><span id=\"1f9e\"><a href=\"https://kangax.github.io/compat-table/es6/\" class=\"markup--anchor markup--li-anchor\">ECMAScript compatibility table</a></span></li>\n</ul>\n<h3>GIT</h3>\n<ul>\n<li><span id=\"c612\"><a href=\"http://product.hubspot.com/blog/git-and-github-tutorial-for-beginners\" class=\"markup--anchor markup--li-anchor\">HubSpot's Intro to Git/GitHub including Pull Requests &#x26; Merging</a></span></li>\n</ul>\n<h3>Express</h3>\n<ul>\n<li><span id=\"f5e1\"><a href=\"https://github.com/tanukid/express-starter\" class=\"markup--anchor markup--li-anchor\">Express Starter</a></span></li>\n</ul>\n<h3>Node.js</h3>\n<ul>\n<li><span id=\"3f91\"><a href=\"https://medium.com/@thejasonfile/fetch-vs-axios-js-for-making-http-requests-2b261cdd3af5\" class=\"markup--anchor markup--li-anchor\">Fetch vs. Axios.js for making http requests</a> ## Sequelize</span></li>\n<li><span id=\"b94a\"><a href=\"https://www.youtube.com/watch?v=6NKNfXtKk0c\" class=\"markup--anchor markup--li-anchor\">Sequelize: Getting Started</a></span></li>\n<li><span id=\"fe38\">[Sequelize reference by @tmkelly28](<a href=\"https://github.com/tmkelly28/sequelize-reference\">https://github.com/tmkelly28/sequelize-reference</a>)</span></li>\n<li><span id=\"63a1\"><a href=\"https://blog.cloudboost.io/docs-for-the-sequelize-docs-querying-edition-aed4bd1273f0\" class=\"markup--anchor markup--li-anchor\">Short but useful Sequelize querying cheatsheet</a></span></li>\n</ul>\n<h3>Study Guides</h3>\n<ul>\n<li><span id=\"06de\"><a href=\"https://github.com/ohagert1/Express-Sequelize-Boilerplate-Study-Guide\" class=\"markup--anchor markup--li-anchor\">Express &#x26; Sequelize Boilerplate/Study Guide</a></span></li>\n</ul>\n<h3>React</h3>\n<ul>\n<li><span id=\"524d\"><a href=\"https://www.youtube.com/channel/UCZkjWyyLvzWeoVWEpRemrDQ\" class=\"markup--anchor markup--li-anchor\">React Casts — Series of React tutorials by Cassio</a></span></li>\n<li><span id=\"4e2f\"><a href=\"https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en\" class=\"markup--anchor markup--li-anchor\">React Dev Tool Google Chrome Extension</a></span></li>\n<li><span id=\"f6ec\"><a href=\"https://github.com/facebookincubator/create-react-app\" class=\"markup--anchor markup--li-anchor\">create-react-app: Create React apps with no build configuration.</a></span></li>\n<li><span id=\"e294\"><a href=\"https://www.javascriptstuff.com/react-starter-projects/\" class=\"markup--anchor markup--li-anchor\">Find the perfect React starter template</a></span></li>\n<li><span id=\"df74\"><a href=\"https://github.com/jaredpalmer/formik\" class=\"markup--anchor markup--li-anchor\">Formik — Build forms in React, without the tears 😭</a></span></li>\n</ul>\n<h3>Redux</h3>\n<ul>\n<li><span id=\"3ec4\"><a href=\"https://egghead.io/courses/getting-started-with-redux\" class=\"markup--anchor markup--li-anchor\">Getting Started with Redux (free course by Dan Abramov)</a></span></li>\n<li><span id=\"ccfe\"><a href=\"https://egghead.io/courses/building-react-applications-with-idiomatic-redux\" class=\"markup--anchor markup--li-anchor\">Building React Applications with Idiomatic Redux (free course by Dan Abramov)</a></span></li>\n<li><span id=\"5cd7\"><a href=\"https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en\" class=\"markup--anchor markup--li-anchor\">Redux Dev Tool Chrome Extension</a></span></li>\n</ul>\n<h3>Redux Middleware</h3>\n<ul>\n<li><span id=\"281b\"><a href=\"https://github.com/buunguyen/redux-freeze\" class=\"markup--anchor markup--li-anchor\">redux-freeze: avoid accidental in-place mutations of state</a></span></li>\n<li><span id=\"34e9\"><a href=\"https://github.com/redux-saga/redux-saga\" class=\"markup--anchor markup--li-anchor\">redux-saga: manage redux side-effects with es6 generators</a></span></li>\n<li><span id=\"7dd0\"><a href=\"https://github.com/pburtchaell/redux-promise-middleware\" class=\"markup--anchor markup--li-anchor\">redux-promise-middleware: A thunk alternative with more bells and whistles</a> ## CSS</span></li>\n<li><span id=\"883f\"><a href=\"https://specificity.keegan.st/\" class=\"markup--anchor markup--li-anchor\">Specificity Calculator</a></span></li>\n<li><span id=\"4a83\"><a href=\"http://bennettfeely.com/clippy/\" class=\"markup--anchor markup--li-anchor\">Tool for making clip-paths quickly with CSS</a></span></li>\n</ul>\n<h3>Command Line</h3>\n<ul>\n<li><span id=\"ed0b\"><a href=\"https://lifehacker.com/5743814/become-a-command-line-ninja-with-these-time-saving-shortcuts\" class=\"markup--anchor markup--li-anchor\">Useful commands</a></span></li>\n<li><span id=\"bf51\">Get your IP address in Mac OSX/Unix: <code>ifconfig | grep 'inet '</code></span></li>\n</ul>\n<h3>Atom</h3>\n<ul>\n<li><span id=\"118a\"><a href=\"https://gist.github.com/chrissimpkins/5bf5686bae86b8129bee\" class=\"markup--anchor markup--li-anchor\">Atom command cheat sheet</a></span></li>\n</ul>\n<h3>VS Code</h3>\n<ul>\n<li><span id=\"e3ec\"><a href=\"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf\" class=\"markup--anchor markup--li-anchor\">Keystroke cheat sheet</a></span></li>\n<li><span id=\"7f06\"><a href=\"https://gist.github.com/tanukid/4ba5d7021a2027362592cbac0a356f58\" class=\"markup--anchor markup--li-anchor\">Daniel's Config</a></span></li>\n</ul>\n<h3>Sublime</h3>\n<ul>\n<li><span id=\"e63f\"><a href=\"http://sweetme.at/2013/08/08/sublime-text-keyboard-shortcuts/\" class=\"markup--anchor markup--li-anchor\">Keystroke cheat sheet</a></span></li>\n<li><span id=\"02d2\"><a href=\"https://medium.com/beyond-the-manifesto/configuring-sublime-text-3-for-modern-es6-js-projects-6f3fd69e95de\" class=\"markup--anchor markup--li-anchor\">Configuring Sublime Text 3 for Modern ES6 JS Projects</a></span></li>\n</ul>\n<h3>Whiteboard Interviews</h3>\n<ul>\n<li><span id=\"555f\"><a href=\"https://www.algoexpert.io/product\" class=\"markup--anchor markup--li-anchor\">algoexpert.io (Made by FSA alumni)</a></span></li>\n<li><span id=\"cb9b\"><a href=\"https://github.com/mgechev/javascript-algorithms\" class=\"markup--anchor markup--li-anchor\">JavaScript implementation of popular algorithms and data structures</a></span></li>\n<li><span id=\"ed3d\"><a href=\"www.codewars.com\" class=\"markup--anchor markup--li-anchor\">Code Wars</a></span></li>\n<li><span id=\"d0e8\"><a href=\"http://www.geeksforgeeks.org/\" class=\"markup--anchor markup--li-anchor\">Geeks for Geeks</a></span></li>\n<li><span id=\"adce\"><a href=\"https://www.interviewcake.com/\" class=\"markup--anchor markup--li-anchor\">Interview Cake</a></span></li>\n<li><span id=\"9e2d\"><a href=\"https://leetcode.com/\" class=\"markup--anchor markup--li-anchor\">Leet Code</a></span></li>\n<li><span id=\"3b9d\"><a href=\"https://coderbyte.com/\" class=\"markup--anchor markup--li-anchor\">Coder Byte</a></span></li>\n<li><span id=\"b6d5\"><a href=\"https://www.hackerrank.com/\" class=\"markup--anchor markup--li-anchor\">Hacker Rank</a></span></li>\n<li><span id=\"6a45\"><a href=\"https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/0984782850/ref=pd_lpo_sbs_14_t_0?_encoding=UTF8&amp;psc=1&amp;refRID=8BB0KRJ073A8CZXTW5PP&amp;dpID=41XgSiYW7dL&amp;preST=_SY291_BO1,204,203,200_QL40_&amp;dpSrc=detail\" class=\"markup--anchor markup--li-anchor\">Cracking the Coding Interview</a></span></li>\n</ul>\n<p>Here's a repo where I hoard resource lists!</p>\n<p><a href=\"https://github.com/bgoonz/Cumulative-Resource-List.git\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/Cumulative-Resource-List.git\"><strong>bgoonz/Cumulative-Resource-List</strong><br />\n<em>Inspired by Awesome Lists. Contribute to bgoonz/Cumulative-Resource-List development by creating an account on GitHub.</em>github.com</a><a href=\"https://github.com/bgoonz/Cumulative-Resource-List.git\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h2>MOAR!</h2>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*eEDATI6RAaEQw71I.jpg\" class=\"graf-image\" /></figure>-   <span id=\"84dc\"><a href=\"https://bgoonz.github.io/about.html#ansible\" class=\"markup--anchor markup--li-anchor\">Ansible</a></span>\n-   <span id=\"1d08\"><a href=\"https://bgoonz.github.io/about.html#awesome-lists\" class=\"markup--anchor markup--li-anchor\">Awesome Lists</a></span>\n-   <span id=\"958d\"><a href=\"https://bgoonz.github.io/about.html#continious-integration\" class=\"markup--anchor markup--li-anchor\">CI/CD</a></span>\n-   <span id=\"eee2\"><a href=\"https://bgoonz.github.io/about.html#data-science\" class=\"markup--anchor markup--li-anchor\">Data Science</a></span>\n-   <span id=\"efef\"><a href=\"https://bgoonz.github.io/about.html#docker\" class=\"markup--anchor markup--li-anchor\">Docker</a></span>\n-   <span id=\"069b\"><a href=\"https://bgoonz.github.io/about.html#dynamodb\" class=\"markup--anchor markup--li-anchor\">DynamoDB</a></span>\n-   <span id=\"49cc\"><a href=\"https://bgoonz.github.io/about.html#elasticsearch\" class=\"markup--anchor markup--li-anchor\">Elasticsearch</a></span>\n-   <span id=\"a53b\"><a href=\"https://bgoonz.github.io/about.html#environment-setups\" class=\"markup--anchor markup--li-anchor\">Environment Setups</a></span>\n-   <span id=\"e5a2\"><a href=\"https://bgoonz.github.io/about.html#epic-github-repos\" class=\"markup--anchor markup--li-anchor\">Epic Github Repos</a></span>\n-   <span id=\"3439\"><a href=\"https://bgoonz.github.io/about.html#golang\" class=\"markup--anchor markup--li-anchor\">Golang</a></span>\n-   <span id=\"4a3d\"><a href=\"https://bgoonz.github.io/about.html#grafana\" class=\"markup--anchor markup--li-anchor\">Grafana</a></span>\n-   <span id=\"7b62\"><a href=\"https://bgoonz.github.io/about.html#great-blogs\" class=\"markup--anchor markup--li-anchor\">Great Blogs</a></span>\n-   <span id=\"ad80\"><a href=\"https://bgoonz.github.io/about.html#knowledge-base\" class=\"markup--anchor markup--li-anchor\">Knowledge Base</a></span>\n-   <span id=\"227d\"><a href=\"https://bgoonz.github.io/about.html#kubernetes\" class=\"markup--anchor markup--li-anchor\">Kubernetes</a></span>\n-   <span id=\"6ceb\"><a href=\"https://bgoonz.github.io/about.html#kubernetes-storage\" class=\"markup--anchor markup--li-anchor\">Kubernetes Storage</a></span>\n-   <span id=\"97b6\"><a href=\"https://bgoonz.github.io/about.html#machine-learning\" class=\"markup--anchor markup--li-anchor\">Machine Learning</a></span>\n-   <span id=\"5b37\"><a href=\"https://bgoonz.github.io/about.html#monitoring\" class=\"markup--anchor markup--li-anchor\">Monitoring</a></span>\n-   <span id=\"c262\"><a href=\"https://bgoonz.github.io/about.html#mongodb\" class=\"markup--anchor markup--li-anchor\">MongoDB</a></span>\n-   <span id=\"5857\"><a href=\"https://bgoonz.github.io/about.html#programming\" class=\"markup--anchor markup--li-anchor\">Programming</a></span>\n-   <span id=\"60a1\"><a href=\"https://bgoonz.github.io/about.html#queues\" class=\"markup--anchor markup--li-anchor\">Queues</a></span>\n-   <span id=\"2694\"><a href=\"https://bgoonz.github.io/about.html#self-hosting\" class=\"markup--anchor markup--li-anchor\">Self Hosting</a></span>\n-   <span id=\"d4a4\"><a href=\"https://bgoonz.github.io/about.html#email-server-setups\" class=\"markup--anchor markup--li-anchor\">Email Server Setups</a></span>\n-   <span id=\"6309\"><a href=\"https://bgoonz.github.io/about.html#mailscanner-server-setups\" class=\"markup--anchor markup--li-anchor\">Mailscanner Server Setups</a></span>\n-   <span id=\"1c97\"><a href=\"https://bgoonz.github.io/about.html#serverless\" class=\"markup--anchor markup--li-anchor\">Serverless</a></span>\n-   <span id=\"bafa\"><a href=\"https://bgoonz.github.io/about.html#sysadmin-references\" class=\"markup--anchor markup--li-anchor\">Sysadmin References</a></span>\n-   <span id=\"5fc4\"><a href=\"https://bgoonz.github.io/about.html#vpn\" class=\"markup--anchor markup--li-anchor\">VPN</a></span>\n-   <span id=\"81ef\"><a href=\"https://bgoonz.github.io/about.html#web-frameworks\" class=\"markup--anchor markup--li-anchor\">Web Frameworks</a></span>\n<h3>Ansible</h3>\n<ul>\n<li><span id=\"abab\"><a href=\"https://github.com/zimmertr/Bootstrap-Kubernetes-with-LXC\" class=\"markup--anchor markup--li-anchor\">Kubernetes on LXC with Ansible</a></span></li>\n</ul>\n<h3>Awesome Lists</h3>\n<ul>\n<li><span id=\"4570\"><a href=\"https://github.com/exAspArk/awesome-chatops\" class=\"markup--anchor markup--li-anchor\">Awesome ChatOps</a></span></li>\n<li><span id=\"e8b4\"><a href=\"https://github.com/binhnguyennus/awesome-scalability\" class=\"markup--anchor markup--li-anchor\">Awesome Scalability</a></span></li>\n<li><span id=\"9050\"><a href=\"https://github.com/drone/awesome-drone\" class=\"markup--anchor markup--li-anchor\">Awesome Drone</a></span></li>\n</ul>\n<h3>Epic Github Repos</h3>\n<ul>\n<li><span id=\"1cb2\"><a href=\"https://github.com/mlabouardy?tab=repositories\" class=\"markup--anchor markup--li-anchor\">mlabouardy</a></span></li>\n</ul>\n<h3>Authentication</h3>\n<ul>\n<li><span id=\"19fa\"><a href=\"https://mapr.com/blog/how-secure-elasticsearch-and-kibana/\" class=\"markup--anchor markup--li-anchor\">Nginx ES and Kibana Proxy with LDAP</a></span></li>\n</ul>\n<h3>Data Science</h3>\n<ul>\n<li><span id=\"cf4c\"><a href=\"https://github.com/bulutyazilim/awesome-datascience\" class=\"markup--anchor markup--li-anchor\">bulutyazilim — datascience awesome list</a></span></li>\n</ul>\n<h3>Grafana</h3>\n<ul>\n<li><span id=\"db81\"><a href=\"https://github.com/mlabouardy/grafana-dashboards\" class=\"markup--anchor markup--li-anchor\">Grafana Dashboards @mlabouardy</a></span></li>\n</ul>\n<h3>Docker</h3>\n<h4>Deploy Stacks to your Swarm: 🐳 ❤️</h4>\n<p>Logging:</p>\n<ul>\n<li><span id=\"b7ff\"><a href=\"https://github.com/shazChaudhry/docker-elastic\" class=\"markup--anchor markup--li-anchor\">shazChaudhry Swarm GELF Stack</a></span></li>\n</ul>\n<p>Metrics:</p>\n<ul>\n<li><span id=\"52cc\"><a href=\"https://github.com/stefanprodan/swarmprom\" class=\"markup--anchor markup--li-anchor\">StefanProdan — Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager</a></span></li>\n<li><span id=\"d0e5\"><a href=\"https://github.com/mlabouardy/swarm-tick\" class=\"markup--anchor markup--li-anchor\">Mlabouardy — Telegraf, InfluxDB, Chronograf, Kapacitor &#x26; Slack</a></span></li>\n</ul>\n<h4>Awesome Docker Repos</h4>\n<ul>\n<li><span id=\"8b0f\"><a href=\"https://github.com/jessfraz/dockerfiles\" class=\"markup--anchor markup--li-anchor\">Jess's Dockerfiles</a></span></li>\n<li><span id=\"46e9\"><a href=\"https://github.com/firecat53/dockerfiles\" class=\"markup--anchor markup--li-anchor\">Firecat53's Dockerfiles</a></span></li>\n</ul>\n<h4>RaspberryPi ARM Images:</h4>\n<ul>\n<li><span id=\"1cd6\"><a href=\"https://hub.docker.com/r/arm32v6/alpine/\" class=\"markup--anchor markup--li-anchor\">arm32v6/alpine:edge</a></span></li>\n<li><span id=\"c5c2\"><a href=\"https://hub.docker.com/r/arm32v6/golang/\" class=\"markup--anchor markup--li-anchor\">arm32v6/golang:alpine</a></span></li>\n<li><span id=\"1b14\"><a href=\"https://hub.docker.com/r/arm32v6/haproxy/\" class=\"markup--anchor markup--li-anchor\">arm32v6/haproxy:alpine</a></span></li>\n<li><span id=\"a39c\"><a href=\"https://hub.docker.com/r/arm32v6/node/\" class=\"markup--anchor markup--li-anchor\">arm32v6/node:alpine</a></span></li>\n<li><span id=\"80fb\"><a href=\"https://hub.docker.com/r/arm32v6/openjdk/\" class=\"markup--anchor markup--li-anchor\">arm32v6/openjdk:alpine</a></span></li>\n<li><span id=\"13b3\"><a href=\"https://hub.docker.com/r/arm32v6/postgres/\" class=\"markup--anchor markup--li-anchor\">arm32v6/postgres:alpine</a></span></li>\n<li><span id=\"8a43\"><a href=\"https://hub.docker.com/r/arm32v6/python/\" class=\"markup--anchor markup--li-anchor\">arm32v6/python:2.7-alpine3.6</a></span></li>\n<li><span id=\"ef75\"><a href=\"https://hub.docker.com/r/arm32v6/python/\" class=\"markup--anchor markup--li-anchor\">arm32v6/python:3.6-alpine3.6</a></span></li>\n<li><span id=\"846e\"><a href=\"https://hub.docker.com/r/arm32v6/rabbitmq/\" class=\"markup--anchor markup--li-anchor\">arm32v6/rabbitmq:alpine</a></span></li>\n<li><span id=\"bfdc\"><a href=\"https://hub.docker.com/r/arm32v6/redis/\" class=\"markup--anchor markup--li-anchor\">arm32v6/redis:alpine</a></span></li>\n<li><span id=\"b879\"><a href=\"https://hub.docker.com/r/arm32v6/ruby/\" class=\"markup--anchor markup--li-anchor\">arm32v6/ruby:alpine3.6</a></span></li>\n<li><span id=\"3cbe\"><a href=\"https://hub.docker.com/r/arm32v6/tomcat/\" class=\"markup--anchor markup--li-anchor\">arm32v6/tomcat:alpine</a></span></li>\n<li><span id=\"18e7\"><a href=\"https://hub.docker.com/r/arm32v6/traefik/\" class=\"markup--anchor markup--li-anchor\">arm32v6/traefik:latest</a></span></li>\n<li><span id=\"502c\"><a href=\"https://hub.docker.com/r/arm32v7/debian/\" class=\"markup--anchor markup--li-anchor\">arm32v7/debian:lates</a></span></li>\n<li><span id=\"c976\"><a href=\"https://hub.docker.com/r/hypriot/rpi-redis/\" class=\"markup--anchor markup--li-anchor\">hypriot/rpi-redis</a></span></li>\n<li><span id=\"5c87\"><a href=\"https://github.com/jixer/rpi-mongo\" class=\"markup--anchor markup--li-anchor\">jixer/rpi-mongo</a></span></li>\n<li><span id=\"15e1\"><a href=\"https://github.com/alexellis/docker-arm/tree/master/images/armhf\" class=\"markup--anchor markup--li-anchor\">alexellis/armhf</a></span></li>\n<li><span id=\"578c\"><a href=\"https://github.com/zeiot\" class=\"markup--anchor markup--li-anchor\">zeiot: rpi-prometheus stack</a></span></li>\n<li><span id=\"0ce9\"><a href=\"https://hub.docker.com/u/larmog/\" class=\"markup--anchor markup--li-anchor\">larmog</a></span></li>\n<li><span id=\"3662\"><a href=\"https://github.com/andresvidal/rpi3-mongodb3\" class=\"markup--anchor markup--li-anchor\">Rpi MongoDB</a></span></li>\n<li><span id=\"2ea6\"><a href=\"https://github.com/armswarm\" class=\"markup--anchor markup--li-anchor\">ARM Swarm</a></span></li>\n</ul>\n<h4>Docker Image Repositories</h4>\n<ul>\n<li><span id=\"202f\"><a href=\"https://hub.docker.com/u/arm32v6/\" class=\"markup--anchor markup--li-anchor\">Docker Hub: arm32v6</a></span></li>\n<li><span id=\"67a9\"><a href=\"https://hub.docker.com/u/armv7/\" class=\"markup--anchor markup--li-anchor\">Docker Hub: armv7</a></span></li>\n<li><span id=\"5e86\"><a href=\"https://github.com/luvres/armhf\" class=\"markup--anchor markup--li-anchor\">Github: Luvres Armhf</a></span></li>\n<li><span id=\"3f80\"><a href=\"https://github.com/ulsmith/alpine-apache-php7\" class=\"markup--anchor markup--li-anchor\">Apache/PHP7 on Alpine</a></span></li>\n<li><span id=\"6cff\"><a href=\"https://github.com/docker-library/tomcat/blob/master/8.0/jre8-alpine/Dockerfile\" class=\"markup--anchor markup--li-anchor\">Tomcat on Alpine</a></span></li>\n<li><span id=\"57cd\"><a href=\"https://github.com/jwilder/nginx-proxy\" class=\"markup--anchor markup--li-anchor\">Nginx (jwilder)</a></span></li>\n<li><span id=\"7aa0\"><a href=\"https://github.com/smebberson/docker-alpine\" class=\"markup--anchor markup--li-anchor\">Alpine Images (smebberson)</a></span></li>\n<li><span id=\"6e95\"><a href=\"https://hub.docker.com/u/sameersbn/\" class=\"markup--anchor markup--li-anchor\">SameerSbn</a></span></li>\n<li><span id=\"d74c\"><a href=\"https://hub.docker.com/u/linuxserver/\" class=\"markup--anchor markup--li-anchor\">Linuxserver.io</a></span></li>\n<li><span id=\"54e0\"><a href=\"https://hub.docker.com/r/nimmis/alpine-apache-php5/\" class=\"markup--anchor markup--li-anchor\">Apache-PHP5</a></span></li>\n<li><span id=\"ea4c\"><a href=\"https://github.com/harobed/docker-php-ssmtp\" class=\"markup--anchor markup--li-anchor\">Apache-PHP-Email</a></span></li>\n</ul>\n<h4>Docker-Awesome-Lists</h4>\n<ul>\n<li><span id=\"b67a\"><a href=\"https://github.com/AdamBien/docklands\" class=\"markup--anchor markup--li-anchor\">Java Docker Services</a></span></li>\n<li><span id=\"158f\"><a href=\"https://gist.github.com/shouse/a14c44e97a2cd2a1f030\" class=\"markup--anchor markup--li-anchor\">shouse Docker Awesome List</a></span></li>\n</ul>\n<h4>Docker Blogs:</h4>\n<ul>\n<li><span id=\"5e06\"><a href=\"https://hub.docker.com/r/emilevauge/whoami/\" class=\"markup--anchor markup--li-anchor\">Whoami used in Traefik Docs</a></span></li>\n<li><span id=\"3fd6\"><a href=\"https://github.com/spartakode/my-docker-repos/blob/master/sqlite3/Dockerfile\" class=\"markup--anchor markup--li-anchor\">Sqlite with Docker</a></span></li>\n<li><span id=\"433f\"><a href=\"https://github.com/mookjp/rails-docker-example\" class=\"markup--anchor markup--li-anchor\">Rails with Postgres and Redis</a></span></li>\n<li><span id=\"ff65\"><a href=\"https://testdriven.io/asynchronous-tasks-with-flask-and-redis-queue\" class=\"markup--anchor markup--li-anchor\">Async Tasks with Flask and Redis</a></span></li>\n<li><span id=\"e4f4\"><a href=\"https://github.com/davidmukiibi/docker-flask\" class=\"markup--anchor markup--li-anchor\">Flask and Postgres</a></span></li>\n<li><span id=\"2935\"><a href=\"http://ict.renevdmark.nl/2016/07/05/elastic-beats-on-raspberry-pi/\" class=\"markup--anchor markup--li-anchor\">Elastic Beats on RaspberryPi</a></span></li>\n</ul>\n<h4>Docker Storage</h4>\n<ul>\n<li><span id=\"a2ce\"><a href=\"https://github.com/rancher/convoy\" class=\"markup--anchor markup--li-anchor\">Rancher Convoy</a></span></li>\n<li><span id=\"118f\"><a href=\"https://flocker.readthedocs.io/en/latest/flocker-features/storage-backends.html#supported-backends\" class=\"markup--anchor markup--li-anchor\">Flocker</a></span></li>\n<li><span id=\"2312\"><a href=\"http://node.mu/2017/06/30/scaleio-on-ubuntu-xenial/\" class=\"markup--anchor markup--li-anchor\">EMC ScaleIO</a></span></li>\n<li><span id=\"0ab0\"><a href=\"https://github.com/lucj/swarm-rexray-ceph\" class=\"markup--anchor markup--li-anchor\">RexRay Ceph with Ansible</a></span></li>\n<li><span id=\"f428\"><a href=\"http://containx.io/\" class=\"markup--anchor markup--li-anchor\">ContainX</a></span></li>\n</ul>\n<h4>OpenFaas:</h4>\n<ul>\n<li><span id=\"da90\"><a href=\"https://github.com/openfaas/faas/releases\" class=\"markup--anchor markup--li-anchor\">FaaS Releases</a></span></li>\n<li><span id=\"3af4\"><a href=\"https://github.com/openfaas/workshop\" class=\"markup--anchor markup--li-anchor\">FaaS Workshop</a></span></li>\n</ul>\n<h4>Prometheus / Grafana on Swarm:</h4>\n<ul>\n<li><span id=\"f482\"><a href=\"https://github.com/stefanprodan/swarmprom\" class=\"markup--anchor markup--li-anchor\">StefanProdan — SwarmProm</a></span></li>\n<li><span id=\"6ded\"><a href=\"https://medium.com/@soumyadipde/monitoring-in-docker-stacks-its-that-easy-with-prometheus-5d71c1042443\" class=\"markup--anchor markup--li-anchor\">Monitoring with Prometheus</a></span></li>\n<li><span id=\"2631\"><a href=\"https://github.com/uschtwill/docker_monitoring_logging_alerting\" class=\"markup--anchor markup--li-anchor\">UschtWill — Prometheus Grafana Elastalert</a></span></li>\n<li><span id=\"2849\"><a href=\"https://github.com/chmod666org/docker-swarm-prometheus\" class=\"markup--anchor markup--li-anchor\">Chmod-Org Promethus with Blackbox</a></span></li>\n<li><span id=\"3995\"><a href=\"https://finestructure.co/blog/2016/5/16/monitoring-with-prometheus-grafana-docker-part-1\" class=\"markup--anchor markup--li-anchor\">Finestructure: Prometheus Tutorial</a></span></li>\n</ul>\n<h3>Logging / Kibana / Beats</h3>\n<h3>Libraries</h3>\n<ul>\n<li><span id=\"b055\"><a href=\"https://github.com/Delgan/loguru\" class=\"markup--anchor markup--li-anchor\">Loguru</a> | <a href=\"https://gist.github.com/M0r13n/0b8c62c603fdbc98361062bd9ebe8153\" class=\"markup--anchor markup--li-anchor\">Flask Example with Loguru</a></span></li>\n</ul>\n<h3>Frameworks</h3>\n<ul>\n<li><span id=\"8e4c\"><a href=\"https://github.com/shazChaudhry/docker-elastic\" class=\"markup--anchor markup--li-anchor\">shazChaudhry Swarm GELF Stack</a></span></li>\n</ul>\n<h3>Continious Integration:</h3>\n<h4>Circle-CI</h4>\n<ul>\n<li><span id=\"0eac\"><a href=\"https://circleci.com/docs/1.0/language-php/\" class=\"markup--anchor markup--li-anchor\">PHP with Circle-CI</a></span></li>\n</ul>\n<h4>Concourse</h4>\n<ul>\n<li><span id=\"3f92\"><a href=\"https://concourse.ci/docker-repository.html\" class=\"markup--anchor markup--li-anchor\">Setup Concourse Environment with Docker</a></span></li>\n<li><span id=\"4284\"><a href=\"https://blog.anynines.com/getting-started-with-concourse-ci-and-docker/\" class=\"markup--anchor markup--li-anchor\">Getting Started with Concourse and Docker</a></span></li>\n<li><span id=\"7536\"><a href=\"https://github.com/pivotalservices/concourse-pipeline-samples/tree/master/concourse-pipeline-patterns/gated-pipelines\" class=\"markup--anchor markup--li-anchor\">Concourse Gated Pipelines</a></span></li>\n<li><span id=\"1a92\"><a href=\"https://github.com/EugenMayer/concourseci-server-boilerplate\" class=\"markup--anchor markup--li-anchor\">Concourse Boilerplate</a></span></li>\n</ul>\n<h4>Jenkins</h4>\n<ul>\n<li><span id=\"e55e\"><a href=\"https://modess.io/jenkins-php/\" class=\"markup--anchor markup--li-anchor\">Modess — PHP with Jenkins</a></span></li>\n<li><span id=\"e077\"><a href=\"https://code.tutsplus.com/tutorials/setting-up-continuous-integration-continuous-deployment-with-jenkins--cms-21511\" class=\"markup--anchor markup--li-anchor\">CI/CD Nodejs Tutorial with Jenkins</a></span></li>\n<li><span id=\"8663\"><a href=\"https://medium.com/@mosheezderman/how-to-set-up-ci-cd-pipeline-for-a-node-js-app-with-jenkins-c51581cc783c\" class=\"markup--anchor markup--li-anchor\">CI/CD Nodejs Tutorial with Jenkins @medium</a></span></li>\n<li><span id=\"c17d\"><a href=\"https://github.com/shazChaudhry/docker-swarm-mode\" class=\"markup--anchor markup--li-anchor\">Epic CICD workflow with Jenkins, Gitlab, Sonar, Nexus</a></span></li>\n</ul>\n<h4>SwarmCi</h4>\n<ul>\n<li><span id=\"ca48\"><a href=\"https://github.com/ghostsquad/swarmci\" class=\"markup--anchor markup--li-anchor\">SwarmCI</a></span></li>\n</ul>\n<h4>Travis-CI</h4>\n<ul>\n<li><span id=\"5050\"><a href=\"https://docs.travis-ci.com/user/getting-started/\" class=\"markup--anchor markup--li-anchor\">Getting Started with Travis-CI (Original Docs)</a></span></li>\n<li><span id=\"1f71\"><a href=\"https://github.com/dwyl/learn-travis\" class=\"markup--anchor markup--li-anchor\">Getting Started with Travis-CI (dwyl — nodejs)</a></span></li>\n<li><span id=\"12a1\"><a href=\"https://matthewmoisen.com/blog/how-to-set-up-travis-ci-with-github-for-a-python-project/\" class=\"markup--anchor markup--li-anchor\">Blog Site with Travis-CI (Python)</a></span></li>\n<li><span id=\"74dd\"><a href=\"https://github.com/softwaresaved/build_and_test_examples/blob/master/travis/HelloWorld.md\" class=\"markup--anchor markup--li-anchor\">Build Tests with Python on Travis-CI</a></span></li>\n<li><span id=\"0c8a\"><a href=\"https://www.raywenderlich.com/109418/travis-ci-tutorial\" class=\"markup--anchor markup--li-anchor\">Moving app with Travis-CI</a></span></li>\n</ul>\n<h4>LambCI</h4>\n<ul>\n<li><span id=\"5a62\"><a href=\"https://github.com/lambci/lambci\" class=\"markup--anchor markup--li-anchor\">LambCI</a></span></li>\n</ul>\n<h3>DynamoDB</h3>\n<h4>DynamoDB Docs</h4>\n<ul>\n<li><span id=\"f776\"><a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SQLtoNoSQL.ReadData.Query.html\" class=\"markup--anchor markup--li-anchor\">AWS DynamoDB: SQL to NoSQL</a></span></li>\n</ul>\n<h4>DynamoDB Best Practices</h4>\n<ul>\n<li><span id=\"db69\"><a href=\"https://aws.amazon.com/blogs/database/choosing-the-right-dynamodb-partition-key/\" class=\"markup--anchor markup--li-anchor\">Choosing the Right Partition Key</a></span></li>\n<li><span id=\"6d4c\"><a href=\"https://cloudacademy.com/blog/amazon-dynamodb-ten-things/\" class=\"markup--anchor markup--li-anchor\">10 Things you should know</a></span></li>\n</ul>\n<h4>DynamoDB General Info</h4>\n<ul>\n<li><span id=\"1006\"><a href=\"https://medium.com/@yaofei/understand-dynamodb-b278f718ddb8\" class=\"markup--anchor markup--li-anchor\">Understanding DynamoDB</a></span></li>\n</ul>\n<h3>Elasticsearch</h3>\n<h4>Elasticsearch Documentation</h4>\n<ul>\n<li><span id=\"4493\"><a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/current/general-recommendations.html\" class=\"markup--anchor markup--li-anchor\">General Recommendation</a></span></li>\n<li><span id=\"8921\"><a href=\"https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster\" class=\"markup--anchor markup--li-anchor\">How Many Shards in my Cluster</a></span></li>\n<li><span id=\"8e3f\"><a href=\"https://www.elastic.co/blog/managing-time-based-indices-efficiently\" class=\"markup--anchor markup--li-anchor\">Managing Time-Based Indices Efficiently</a></span></li>\n<li><span id=\"bdc6\"><a href=\"https://bonsai.io/2016/01/11/ideal-elasticsearch-cluster\" class=\"markup--anchor markup--li-anchor\">Elasticsearch Best Practices (Bonsai.io)</a></span></li>\n<li><span id=\"300c\"><a href=\"https://aws.amazon.com/premiumsupport/knowledge-center/elasticsearch-scale-up/\" class=\"markup--anchor markup--li-anchor\">AWS ES — Scaling up my Domain</a></span></li>\n</ul>\n<h4>Elasticsearch Cheetsheets:</h4>\n<ul>\n<li><span id=\"1637\"><a href=\"https://gist.github.com/ruanbekker/e8a09604b14f37e8d2f743a87b930f93\" class=\"markup--anchor markup--li-anchor\">My ES Cheatsheet</a></span></li>\n</ul>\n<h4>Elasticsearch Blogs</h4>\n<ul>\n<li><span id=\"0f1a\"><a href=\"https://qbox.io/blog/maximize-guide-elasticsearch-indexing-performance-part-1\" class=\"markup--anchor markup--li-anchor\">Maximize Elasticsearch Indexing Performance</a></span></li>\n<li><span id=\"b16a\"><a href=\"https://qbox.io/blog/authoritative-guide-elasticsearch-performance-tuning-part-1\" class=\"markup--anchor markup--li-anchor\">Autoritative Guide to ES Performance Tuning</a></span></li>\n<li><span id=\"a39b\"><a href=\"https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/full-text/\" class=\"markup--anchor markup--li-anchor\">Full text Search Queries</a></span></li>\n<li><span id=\"e4d6\"><a href=\"https://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html\" class=\"markup--anchor markup--li-anchor\">Query Elasticsearch</a></span></li>\n</ul>\n<h4>Elasticsearch Tools</h4>\n<ul>\n<li><span id=\"daeb\"><a href=\"https://github.com/mallocator/Elasticsearch-Exporter\" class=\"markup--anchor markup--li-anchor\">Export Data from ES to ES</a></span></li>\n</ul>\n<h3>Environment Setups:</h3>\n<ul>\n<li><span id=\"efec\"><a href=\"https://medium.com/aishik/install-golang-the-right-way-4743fee9255f\" class=\"markup--anchor markup--li-anchor\">Golang</a></span></li>\n</ul>\n<h3>Knowledge Base</h3>\n<h3>KB HTTPS</h3>\n<ul>\n<li><span id=\"b222\"><a href=\"https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https\" class=\"markup--anchor markup--li-anchor\">How does HTTPS work (Miguel Grinberg)</a></span></li>\n</ul>\n<h3>Kubernetes</h3>\n<ul>\n<li><span id=\"aafa\"><a href=\"https://github.com/ramitsurana/awesome-kubernetes/blob/master/README.md\" class=\"markup--anchor markup--li-anchor\">Awesome Kubernetes</a></span></li>\n<li><span id=\"6faa\"><a href=\"https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-a4\" class=\"markup--anchor markup--li-anchor\">Kubernetes Cheatsheet</a></span></li>\n<li><span id=\"7b5a\"><a href=\"https://kubernetes.io/blog/2019/07/23/get-started-with-kubernetes-using-python/\" class=\"markup--anchor markup--li-anchor\">Getting Started: Python application on Kubernetes</a></span></li>\n<li><span id=\"8945\"><a href=\"https://semaphoreci.com/blog/kubernetes-deployment\" class=\"markup--anchor markup--li-anchor\">Kubernetes Deployments: The Ultimate Guide</a></span></li>\n<li><span id=\"b6dc\"><a href=\"https://www.digitalocean.com/community/tutorials/how-to-set-up-a-prometheus-grafana-and-alertmanager-monitoring-stack-on-digitalocean-kubernetes\" class=\"markup--anchor markup--li-anchor\">Prometheus Monitoring Stack with Kubernetes on DO</a></span></li>\n<li><span id=\"7d6a\"><a href=\"https://tech.evaneos.com/traefik-as-an-ingress-controller-on-minikube-with-kustomize-helm-a3b2f44a5c2a\" class=\"markup--anchor markup--li-anchor\">Traefik as an Ingress Controller on Minikube</a></span></li>\n<li><span id=\"1a6e\"><a href=\"https://itnext.io/traefik-cluster-as-ingress-controller-for-kubernetes-99fa6c34402\" class=\"markup--anchor markup--li-anchor\">Traefik Ingress with Kubernetes</a></span></li>\n<li><span id=\"7ac9\"><a href=\"https://medium.com/faun/manually-connect-to-your-kubernetes-cluster-from-the-outside-d852346a7f0a\" class=\"markup--anchor markup--li-anchor\">Manual Connect your Kubernetes from Outside</a></span></li>\n<li><span id=\"8967\"><a href=\"https://pascalw.me/blog/2019/07/02/k3s-https-letsencrypt.html\" class=\"markup--anchor markup--li-anchor\">HTTPS Letsencrypt on k3s</a></span></li>\n<li><span id=\"4e91\"><a href=\"https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0\" class=\"markup--anchor markup--li-anchor\">Kubernetes: Nodeport vs Loadbalancer</a></span></li>\n<li><span id=\"0df0\"><a href=\"https://medium.com/kubernetes-tutorials/simple-management-of-prometheus-monitoring-pipeline-with-the-prometheus-operator-b445da0e0d1a\" class=\"markup--anchor markup--li-anchor\">Prometheus Monitoring Pipeline on Kubernetes</a></span></li>\n<li><span id=\"8eef\"><a href=\"https://rancher.com/blog/2018/2018-08-07-cicd-pipeline-k8s-autodevops-rancher-and-gitlab/\" class=\"markup--anchor markup--li-anchor\">Building a Kubernetes CI/CD Pipeline with Rancher</a></span></li>\n<li><span id=\"57cf\"><a href=\"https://medium.com/swlh/universal-cicd-pipeline-on-aws-and-k8s-7b4129fac5d4\" class=\"markup--anchor markup--li-anchor\">Building a Kubernetes CI/CD Pipeline with AWS</a></span></li>\n<li><span id=\"d761\"><a href=\"https://itnext.io/explore-gitea-drone-ci-cd-on-k3s-4a9e99f8b938\" class=\"markup--anchor markup--li-anchor\">Gitea and Drone CI/CD on k3s</a></span></li>\n<li><span id=\"bde3\"><a href=\"https://github.com/openfaas-incubator/openfaas-linkerd2/blob/master/README.md\" class=\"markup--anchor markup--li-anchor\">Serverless with Kubernetes using OpenFaaS and Linkerd2</a></span></li>\n<li><span id=\"236a\"><a href=\"https://rancher.com/blog/2019/how-to-manage-kubernetes-with-kubectl/\" class=\"markup--anchor markup--li-anchor\">Managing Kubernetes with kubectl</a></span></li>\n<li><span id=\"b0af\"><a href=\"https://gist.github.com/alexellis/a6ee5f094f86987a0dc508442220c52a\" class=\"markup--anchor markup--li-anchor\">OpenFaas Workshop on k3s</a></span></li>\n<li><span id=\"b217\"><a href=\"http://collabnix.com/kubernetes-hands-on-lab-4-deploy-application-stack-using-helm-on-play-with-kubernetes-platform/\" class=\"markup--anchor markup--li-anchor\">Kubernetes Hands-On Lab with collabnix</a></span></li>\n<li><span id=\"e717\"><a href=\"https://medium.com/asl19-developers/create-readwritemany-persistentvolumeclaims-on-your-kubernetes-cluster-3a8db51f98e3\" class=\"markup--anchor markup--li-anchor\">Create ReadWrite Persistent Volumes on Kubernetes</a></span></li>\n<li><span id=\"fca8\"><a href=\"https://medium.com/@mattiaperi/kubernetes-cluster-with-k3s-and-multipass-7532361affa3\" class=\"markup--anchor markup--li-anchor\">Kubernetes Clusters with k3s and multipass</a></span></li>\n</ul>\n<h3>Kubernetes Storage</h3>\n<ul>\n<li><span id=\"4413\"><a href=\"https://kadalu.io/docs/quick-start\" class=\"markup--anchor markup--li-anchor\">Kadalu</a></span></li>\n<li><span id=\"eb56\"><a href=\"https://rancher.com/docs/k3s/latest/en/storage/\" class=\"markup--anchor markup--li-anchor\">Rancher: Longhorn Storage</a></span></li>\n</ul>\n<h3>Golang</h3>\n<ul>\n<li><span id=\"fc71\"><a href=\"https://github.com/brianvoe/gofakeit\" class=\"markup--anchor markup--li-anchor\">Generate Fake Random Data with Golang</a></span></li>\n<li><span id=\"ad3a\"><a href=\"https://github.com/hoanhan101/ultimate-go\" class=\"markup--anchor markup--li-anchor\">Ultimate Golang Study Guide</a></span></li>\n</ul>\n<h3>Great Blogs</h3>\n<ul>\n<li><span id=\"6f90\"><a href=\"https://www.exratione.com/blog/\" class=\"markup--anchor markup--li-anchor\">Exratione.com</a></span></li>\n<li><span id=\"e5f2\"><a href=\"http://joelabrahamsson.com/elasticsearch-101/\" class=\"markup--anchor markup--li-anchor\">Joelabrahamsson.com</a></span></li>\n<li><span id=\"38cc\"><a href=\"http://bencane.com/\" class=\"markup--anchor markup--li-anchor\">Benjamin Cane</a></span></li>\n<li><span id=\"2583\"><a href=\"http://mherman.org/\" class=\"markup--anchor markup--li-anchor\">Michael Herman</a></span></li>\n<li><span id=\"3e8c\"><a href=\"http://charlesleifer.com/\" class=\"markup--anchor markup--li-anchor\">Charles Leifer</a></span></li>\n<li><span id=\"3b5d\"><a href=\"https://www.blog.labouardy.com/\" class=\"markup--anchor markup--li-anchor\">Labouardy</a></span></li>\n<li><span id=\"2759\"><a href=\"https://tech.marksblogg.com/\" class=\"markup--anchor markup--li-anchor\">Mark's Tech Blog</a></span></li>\n</ul>\n<h3>Linuxkit:</h3>\n<ul>\n<li><span id=\"22a7\"><a href=\"https://medium.com/aishik/getting-started-with-linuxkit-and-moby-project-ff7121c4e321\" class=\"markup--anchor markup--li-anchor\">Getting Started with Linuxkit</a></span></li>\n</ul>\n<h3>Logging Stacks</h3>\n<ul>\n<li><span id=\"bc7b\"><a href=\"https://github.com/shazChaudhry/docker-elastic\" class=\"markup--anchor markup--li-anchor\">shazChaudhry Swarm GELF Stack</a></span></li>\n</ul>\n<h3>Machine Learning:</h3>\n<ul>\n<li><span id=\"7892\"><a href=\"https://github.com/GokuMohandas/practicalAI/blob/master/README.md\" class=\"markup--anchor markup--li-anchor\">PracticalAI</a></span></li>\n</ul>\n<h3>Metrics:</h3>\n<ul>\n<li><span id=\"02a4\"><a href=\"https://github.com/avalente/appmetrics\" class=\"markup--anchor markup--li-anchor\">AppMetrics with Flask</a></span></li>\n<li><span id=\"f097\"><a href=\"https://github.com/Cue/scales\" class=\"markup--anchor markup--li-anchor\">Scales: Metrics for Python</a></span></li>\n<li><span id=\"1e03\"><a href=\"https://pypi.org/project/graphite-pymetrics/\" class=\"markup--anchor markup--li-anchor\">Graphite: Python Flask Metrics</a></span></li>\n</ul>\n<h3>MongoDB:</h3>\n<ul>\n<li><span id=\"a9f4\"><a href=\"https://linode.com/docs/databases/mongodb/build-database-clusters-with-mongodb/\" class=\"markup--anchor markup--li-anchor\">Setup MongoDB Cluster</a></span></li>\n<li><span id=\"8450\"><a href=\"https://github.com/AD7six/mongo-scripts\" class=\"markup--anchor markup--li-anchor\">MongoDB Scripts</a></span></li>\n<li><span id=\"31a1\"><a href=\"https://docs.mongodb.com/v2.4/administration/monitoring/#self-hosted-monitoring-tools\" class=\"markup--anchor markup--li-anchor\">MongoDB Monitoring Tools</a></span></li>\n<li><span id=\"6864\"><a href=\"https://studio3t.com/knowledge-base/articles/mongodb-users-roles-explained-part-1/\" class=\"markup--anchor markup--li-anchor\">Roles with MongoDB</a></span></li>\n<li><span id=\"b14c\"><a href=\"https://www.guru99.com/mongodb-tutorials.html\" class=\"markup--anchor markup--li-anchor\">Queries: Guru99</a></span></li>\n<li><span id=\"5531\"><a href=\"https://blog.exploratory.io/an-introduction-to-mongodb-query-for-beginners-bd463319aa4c\" class=\"markup--anchor markup--li-anchor\">Queries: Exploratory</a></span></li>\n<li><span id=\"ea6e\"><a href=\"https://www.tutorialspoint.com/mongodb/mongodb_create_database.htm\" class=\"markup--anchor markup--li-anchor\">Queries: Tutorialspoint</a></span></li>\n<li><span id=\"3fb5\"><a href=\"https://gist.github.com/rbekker87/5b4cd9ef36b6ae092a6260ab9e621a43\" class=\"markup--anchor markup--li-anchor\">Queries: MongoDB Cheatsheet</a></span></li>\n</ul>\n<h3>Monitoring</h3>\n<ul>\n<li><span id=\"49fb\"><a href=\"https://hackernoon.com/monitor-swarm-cluster-with-tick-stack-slack-3aaa6483d44a\" class=\"markup--anchor markup--li-anchor\">Docker Swarm Monitoring Stack: Telegraf, InfluxDB, Chronograf, Kapacitor</a> <a href=\"https://github.com/mlabouardy/swarm-tick\" class=\"markup--anchor markup--li-anchor\">github source</a></span></li>\n<li><span id=\"7f00\"><a href=\"https://stefanprodan.com/2017/docker-swarm-instrumentation-with-prometheus/\" class=\"markup--anchor markup--li-anchor\">Docker Swarm Monitoring Stack: Prometheus, Grafana, cAdvisor, Node Exporter</a> <a href=\"https://github.com/stefanprodan/swarmprom\" class=\"markup--anchor markup--li-anchor\">github source</a></span></li>\n<li><span id=\"be31\"><a href=\"https://finestructure.co/blog/2016/5/16/monitoring-with-prometheus-grafana-docker-part-1\" class=\"markup--anchor markup--li-anchor\">Prometheus Grafana Docker</a></span></li>\n<li><span id=\"dc44\"><a href=\"https://pierrevincent.github.io/2017/12/prometheus-blog-series-part-1-metrics-and-labels/\" class=\"markup--anchor markup--li-anchor\">Prometheus Blog Seros</a></span></li>\n<li><span id=\"eb7c\"><a href=\"https://blog.serverdensity.com/monitor-memcached/\" class=\"markup--anchor markup--li-anchor\">Memcached Monitoring</a></span></li>\n<li><span id=\"eb53\"><a href=\"https://raymii.org/s/tutorials/Nagios_Core_4_Installation_on_Ubuntu_12.04.html\" class=\"markup--anchor markup--li-anchor\">Nagios with Nagios Graph</a></span></li>\n<li><span id=\"aaa6\"><a href=\"https://medium.com/quiq-blog/better-slack-alerts-from-prometheus-49125c8c672b\" class=\"markup--anchor markup--li-anchor\">Slack Alerts with Prometheus</a></span></li>\n<li><span id=\"6035\"><a href=\"https://github.com/deanwilson/docker-compose-prometheus\" class=\"markup--anchor markup--li-anchor\">Local Prometheus Stack</a></span></li>\n<li><span id=\"9144\"><a href=\"https://github.com/chmod666org/docker-swarm-prometheus\" class=\"markup--anchor markup--li-anchor\">Docker Swarm Promethus Setup #1</a></span></li>\n<li><span id=\"58e5\"><a href=\"https://chmod666.org/2017/08/monitoring-a-docker-swarm-cluster-with-prometheus\" class=\"markup--anchor markup--li-anchor\">Docker Swarm Prometheus Setup #1: Blog</a></span></li>\n<li><span id=\"dfae\"><a href=\"https://homelab.business/docker-swarm-monitoring-part-01/\" class=\"markup--anchor markup--li-anchor\">Docker Swarm Promethus Setup #2</a></span></li>\n<li><span id=\"3810\"><a href=\"https://medium.com/the-telegraph-engineering/how-prometheus-and-the-blackbox-exporter-makes-monitoring-microservice-endpoints-easy-and-free-of-a986078912ee\" class=\"markup--anchor markup--li-anchor\">Docker Swarm Promethus Setup #3 (Blackbox)</a></span></li>\n<li><span id=\"945a\"><a href=\"https://github.com/fzaninotto/uptime\" class=\"markup--anchor markup--li-anchor\">Uptime (fzaninotto)</a></span></li>\n</ul>\n<h3>Monitoring and Alerting</h3>\n<ul>\n<li><span id=\"dccc\"><a href=\"https://github.com/arachnys/cabot\" class=\"markup--anchor markup--li-anchor\">Cabot (Lightweight Pagerduty)</a></span></li>\n<li><span id=\"4e80\"><a href=\"https://www.nagios.org/\" class=\"markup--anchor markup--li-anchor\">Nagios</a></span></li>\n</ul>\n<h3>Monitoring as Statuspages</h3>\n<ul>\n<li><span id=\"d496\"><a href=\"https://github.com/darkpixel/statuspage\" class=\"markup--anchor markup--li-anchor\">Statuspage (darkpixel</a></span></li>\n<li><span id=\"7997\"><a href=\"https://github.com/cachethq/Cachet\" class=\"markup--anchor markup--li-anchor\">Cachet</a></span></li>\n</ul>\n<h3>Programming</h3>\n<h4>Golang:</h4>\n<ul>\n<li><span id=\"f63d\"><a href=\"http://golangtutorials.blogspot.co.za/2011/05/table-of-contents.html\" class=\"markup--anchor markup--li-anchor\">Golang Tutorials</a></span></li>\n<li><span id=\"a233\"><a href=\"https://github.com/golang/go/wiki\" class=\"markup--anchor markup--li-anchor\">Golang Wiki</a></span></li>\n</ul>\n<h4>Java:</h4>\n<ul>\n<li><span id=\"aba9\"><a href=\"https://wiki.ruanbekker.com/index.php/Java_Spring_Boot_App_Examples\" class=\"markup--anchor markup--li-anchor\">Java Spring Boot Examples</a></span></li>\n</ul>\n<h4>Python</h4>\n<h4>Ruby:</h4>\n<ul>\n<li><span id=\"935a\"><a href=\"https://learnrubythehardway.org/book\" class=\"markup--anchor markup--li-anchor\">Learn Ruby: Learn Ruby the Hard Way</a></span></li>\n<li><span id=\"d022\"><a href=\"http://ruby-for-beginners.rubymonstas.org/index.html\" class=\"markup--anchor markup--li-anchor\">Learn Ruby: Ruby for Beginners</a></span></li>\n<li><span id=\"9ff8\"><a href=\"https://launchschool.com/books/ruby/read/loops_iterators#forloops\" class=\"markup--anchor markup--li-anchor\">Learn Ruby: Launch School</a></span></li>\n<li><span id=\"bda7\"><a href=\"https://gistpages.com/posts/ruby_arrays_insert_append_length_index_remove\" class=\"markup--anchor markup--li-anchor\">Learn Ruby: Arrays</a></span></li>\n<li><span id=\"bb79\"><a href=\"https://gorails.com/setup/osx/10.12-sierra\" class=\"markup--anchor markup--li-anchor\">Install Ruby Environment on Mac</a></span></li>\n</ul>\n<h4>Ruby on Rails:</h4>\n<ul>\n<li><span id=\"473f\"><a href=\"https://www.railstutorial.org/book/beginning\" class=\"markup--anchor markup--li-anchor\">Tutorial: Ruby On Rails</a></span></li>\n<li><span id=\"2639\"><a href=\"http://codingnudge.com/2017/03/17/tutorial-how-to-run-ruby-on-rails-on-docker-part-1/\" class=\"markup--anchor markup--li-anchor\">Tutorial: ROR on Docker</a></span></li>\n</ul>\n<h3>Queues</h3>\n<ul>\n<li><span id=\"2d48\"><a href=\"https://github.com/roribio/alpine-sqs\" class=\"markup--anchor markup--li-anchor\">Alpine SQS</a></span></li>\n<li><span id=\"30f2\"><a href=\"https://github.com/celery/kombu\" class=\"markup--anchor markup--li-anchor\">Kombu: Messaging library for Python</a></span></li>\n<li><span id=\"da56\"><a href=\"https://python-rq.org/\" class=\"markup--anchor markup--li-anchor\">Python Job Queues with Redis</a></span></li>\n</ul>\n<h3>Sysadmin References:</h3>\n<ul>\n<li><span id=\"2ead\"><a href=\"https://gist.github.com/ruanbekker/3118ed23c25451132becacd3b974db08\" class=\"markup--anchor markup--li-anchor\">Sysadmin Command References</a></span></li>\n<li><span id=\"69c9\"><a href=\"https://medium.com/@chrishantha/linux-performance-observability-tools-19ae2328f87f\" class=\"markup--anchor markup--li-anchor\">Linux Performance Observability Tools</a></span></li>\n<li><span id=\"0009\"><a href=\"http://bencane.com/2012/08/06/troubleshooting-high-io-wait-in-linux/\" class=\"markup--anchor markup--li-anchor\">Troubleshooting High IO Wait</a></span></li>\n<li><span id=\"aef7\"><a href=\"https://blog.pythian.com/basic-io-monitoring-on-linux/\" class=\"markup--anchor markup--li-anchor\">IO Monitoring in Linux</a></span></li>\n<li><span id=\"5716\"><a href=\"http://xiayubin.com/blog/2014/01/29/how-i-use-iostat-and-vmstat-for-performance-analysis/\" class=\"markup--anchor markup--li-anchor\">IOStat and VMStat for Performance Monitoring</a></span></li>\n<li><span id=\"e5bf\"><a href=\"https://www.tummy.com/articles/isolating-heavy-load/\" class=\"markup--anchor markup--li-anchor\">Debugging Heavy Load</a></span></li>\n</ul>\n<h3>Self Hosting</h3>\n<h4>Email Server Setups</h4>\n<ul>\n<li><span id=\"8cd4\"><a href=\"https://www.exratione.com/2016/05/a-mailserver-on-ubuntu-16-04-postfix-dovecot-mysql/\" class=\"markup--anchor markup--li-anchor\">Extratione: Postfix Dovecot MySQL Virtual Users Postfixadmin</a></span></li>\n<li><span id=\"4409\"><a href=\"https://www.exratione.com/2019/02/a-mailserver-on-ubuntu-18-04-postfix-dovecot-mysql/\" class=\"markup--anchor markup--li-anchor\">Extratione: Postfix Dovecot MySQL Virtual Users Postfixadmin (Ubuntu 18)</a></span></li>\n<li><span id=\"bd51\"><a href=\"https://linuxize.com/post/set-up-an-email-server-with-postfixadmin/\" class=\"markup--anchor markup--li-anchor\">Linuxsize: Postfix Dovecot MySQL Virtual Users Postfixadmin</a></span></li>\n<li><span id=\"aa71\"><a href=\"https://www.howtoforge.com/postfix_mysql_dovecot_dspam_clamav_postgrey_rbl_debian_etch\" class=\"markup--anchor markup--li-anchor\">Howtoforge: Postfix, MySQL, Dovecto, Dspam</a></span></li>\n<li><span id=\"35d1\"><a href=\"https://linuxize.com/post/set-up-an-email-server-with-postfixadmin/\" class=\"markup--anchor markup--li-anchor\">Linuxsize: VirtualUsers, MySQL, Postfix, Dovecot</a></span></li>\n</ul>\n<h4>Mailscanner Server Setups</h4>\n<ul>\n<li><span id=\"8498\"><a href=\"https://syslint.com/blog/tutorial/how-to-install-and-configure-spamassassin-with-postfix-in-debian-8/\" class=\"markup--anchor markup--li-anchor\">Spamassassin with Debian 8</a></span></li>\n</ul>\n<h4>Financial</h4>\n<ul>\n<li><span id=\"0ba4\"><a href=\"https://github.com/firefly-iii/firefly-iii\" class=\"markup--anchor markup--li-anchor\">SelfHosted Firefly</a></span></li>\n</ul>\n<h4>Self Hosting Frameworks:</h4>\n<ul>\n<li><span id=\"0c97\"><a href=\"https://sandstorm.io/\" class=\"markup--anchor markup--li-anchor\">Sandstorm</a></span></li>\n</ul>\n<h3>Serverless</h3>\n<ul>\n<li><span id=\"0baf\"><a href=\"https://github.com/Miserlou/Zappa\" class=\"markup--anchor markup--li-anchor\">Serverless Zappa</a></span></li>\n<li><span id=\"eb32\"><a href=\"https://github.com/faizanbashir/python-ses-dynamodb-contactform\" class=\"markup--anchor markup--li-anchor\">Serverless Contact Form</a></span></li>\n<li><span id=\"67dc\"><a href=\"https://github.com/danilop/LambdAuth\" class=\"markup--anchor markup--li-anchor\">Serverless Authentication on AWS (danilop)</a></span></li>\n</ul>\n<h3>VPN:</h3>\n<h4>VPN-Howto:</h4>\n<ul>\n<li><span id=\"d7dc\"><a href=\"https://www.cyberciti.biz/faq/howto-setup-openvpn-server-on-ubuntu-linux-14-04-or-16-04-lts/\" class=\"markup--anchor markup--li-anchor\">Ubuntu OpenVPN Script</a></span></li>\n<li><span id=\"2198\"><a href=\"https://github.com/hwdsl2/setup-ipsec-vpn\" class=\"markup--anchor markup--li-anchor\">Ubuntu IPSec Script</a></span></li>\n<li><span id=\"7fec\"><a href=\"https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04\" class=\"markup--anchor markup--li-anchor\">DO — Setup OpenVPN on Ubuntu</a></span></li>\n<li><span id=\"bbff\"><a href=\"https://www.elastichosts.com/blog/linux-l2tpipsec-vpn-client/\" class=\"markup--anchor markup--li-anchor\">Elasticshosts — IPSec VPN</a></span></li>\n<li><span id=\"43f7\"><a href=\"https://github.com/bedefaced/vpn-install\" class=\"markup--anchor markup--li-anchor\">PPTP/IPSec/OpenVPN Auto Install</a></span></li>\n</ul>\n<h3>Website Templates</h3>\n<h4>Resume Templates</h4>\n<ul>\n<li><span id=\"7f29\"><a href=\"https://github.com/johnmarcampbell/resume-site\" class=\"markup--anchor markup--li-anchor\">johnmarcampbell resume-site</a></span></li>\n</ul>\n<h3>Web Frameworks</h3>\n<h4>Python Flask:</h4>\n<ul>\n<li><span id=\"a98a\"><a href=\"https://gist.github.com/dAnjou/2874714\" class=\"markup--anchor markup--li-anchor\">Python Flask Upload Example</a></span></li>\n<li><span id=\"2c23\"><a href=\"https://github.com/humiaozuzu/awesome-flask#awesome-flask\" class=\"markup--anchor markup--li-anchor\">Awesome Flask — humiaozuzu</a></span></li>\n<li><span id=\"b710\"><a href=\"https://github.com/greyli?tab=repositories\" class=\"markup--anchor markup--li-anchor\">Awesome Flask Apps — Greyli</a></span></li>\n<li><span id=\"f396\"><a href=\"https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https\" class=\"markup--anchor markup--li-anchor\">Flask over HTTPS (MG)</a></span></li>\n<li><span id=\"9d33\"><a href=\"https://speakerdeck.com/mitsuhiko/advanced-flask-patterns-1\" class=\"markup--anchor markup--li-anchor\">Flask Advanced Patterns</a></span></li>\n<li><span id=\"adf1\"><a href=\"https://github.com/tojrobinson/flask-mvc\" class=\"markup--anchor markup--li-anchor\">Flask MVC Boilerplate</a></span></li>\n</ul>\n<h3>If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:</h3>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://gist.github.com/bgoonz\"><strong>bgoonz's gists</strong><br />\n<em>Instantly share code, notes, and snippets. Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python |…</em>gist.github.com</a><a href=\"https://gist.github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>Ada</h3>\n<ul>\n<li><a href=\"https://learn.adacore.com/courses/intro-to-ada/index.html\">Introduction to Ada</a></li>\n</ul>\n<h3>Android</h3>\n<ul>\n<li><a href=\"https://www.tutlane.com/tutorial/android\">Android Tutorial</a> - tutlane</li>\n<li><a href=\"https://www.javatpoint.com/android-tutorial\">Javatpoint Android Tutorial</a></li>\n</ul>\n<h3>Bash</h3>\n<ul>\n<li><a href=\"https://explainshell.com\">Help messages will explain everything</a></li>\n<li><a href=\"http://www.learnshell.org\">Learn Shell Programming</a></li>\n</ul>\n<h3>C</h3>\n<ul>\n<li><a href=\"http://www.learn-c.org\">Learn C</a></li>\n</ul>\n<h3>C Sharp</h3>\n<ul>\n<li><a href=\"https://www.tutlane.com/tutorial/csharp\">C# Tutorial</a> - tutlane</li>\n<li><a href=\"https://www.w3schools.com/cs\">C# Tutorial</a> - W3Schools</li>\n<li><a href=\"https://codeasy.net/course/csharp_elementary\">Codeasy</a></li>\n<li><a href=\"http://www.learncs.org\">Learn C#</a></li>\n<li><a href=\"https://www.codecademy.com/learn/learn-c-sharp\">Learn C#</a> - Codecademy</li>\n</ul>\n<h3 id=\"cpp\">C++</h3>\n<ul>\n<li><a href=\"https://www.w3schools.com/cpp\">C++ Tutorial</a> - W3Schools</li>\n<li><a href=\"https://github.com/torbjoernk/CppKoans\">CppKoans</a></li>\n</ul>\n<h3>Clojure</h3>\n<ul>\n<li><a href=\"http://www.4clojure.com\">4Clojure - Koans</a></li>\n<li><a href=\"http://clojurekoans.com\">Clojure Koans</a></li>\n<li><a href=\"http://clojurescriptkoans.com\">ClojureScript Koans</a></li>\n<li><a href=\"http://www.tryclj.com\">Try Clojure</a></li>\n</ul>\n<h3>Cloud Computing</h3>\n<ul>\n<li><a href=\"https://run.qwiklabs.com/focuses/269?catalog_rank=%7B%22rank%22%3A3%2C%22num_filters%22%3A1%2C%22has_search%22%3Atrue%7D&#x26;parent=catalog&#x26;search_id=3605949\">AWS API Gateway</a> - <em>registration required</em></li>\n<li><a href=\"https://run.qwiklabs.com/focuses/7782?catalog_rank=%7B%22rank%22%3A6%2C%22num_filters%22%3A1%2C%22has_search%22%3Atrue%7D&#x26;parent=catalog&#x26;search_id=3605942\">AWS Identity and Access Management (IAM)</a> - <em>registration required</em></li>\n<li><a href=\"https://run.qwiklabs.com/focuses/6431?catalog_rank=%7B%22rank%22%3A2%2C%22num_filters%22%3A1%2C%22has_search%22%3Atrue%7D&#x26;parent=catalog&#x26;search_id=3605949\">AWS Lambda</a> - <em>registration required</em></li>\n<li><a href=\"https://run.qwiklabs.com/focuses/7860?catalog_rank=%7B%22rank%22%3A3%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&#x26;parent=catalog&#x26;search_id=3597563\">AWS Simple Storage Service (S3)</a> - <em>registration required</em></li>\n<li><a href=\"https://cloud.google.com/training/free-labs/\">Google Cloud Platform</a></li>\n</ul>\n<h3>CoffeeScript</h3>\n<ul>\n<li><a href=\"https://github.com/polarmobile/coffeescript-style-guide/blob/master/README.md\">Coffeescript Style Guide</a></li>\n<li><a href=\"http://autotelicum.github.io/Smooth-CoffeeScript/interactive/interactive-coffeescript.html\">Smooth CoffeeScript, Interactive Edition</a></li>\n</ul>\n<h3>Dart</h3>\n<ul>\n<li><a href=\"https://dart.dev/codelabs\">Dart Official Codelabs</a></li>\n</ul>\n<h3>Erlang</h3>\n<ul>\n<li><a href=\"http://www.tryerlang.org\">Try Erlang</a></li>\n</ul>\n<h3>Git</h3>\n<ul>\n<li><a href=\"https://github.com/git-game/git-game\">git-game</a></li>\n<li><a href=\"https://github.com/git-game/git-game-v2\">git-game-v2</a></li>\n<li><a href=\"https://github.com/Gazler/githug\">Githug</a> (Tutorial in shell)</li>\n<li><a href=\"https://learngitbranching.js.org\">Learn Git Branching</a></li>\n<li><a href=\"https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud\">Learn Git with Bitbucket Cloud</a></li>\n<li><a href=\"http://try.github.io\">Try Git</a></li>\n</ul>\n<h3>GLSL</h3>\n<ul>\n<li><a href=\"https://thebookofshaders.com\">The Book of Shaders</a></li>\n</ul>\n<h3>Go</h3>\n<ul>\n<li><a href=\"https://github.com/cdarwin/go-koans\">Go Koans</a></li>\n<li><a href=\"https://docs.microsoft.com/en-us/learn/paths/go-first-steps/\">Start using Go</a> - Microsoft</li>\n<li><a href=\"http://tour.golang.org\">The Go Tutorial</a></li>\n</ul>\n<h3>Haskell</h3>\n<ul>\n<li><a href=\"http://tryhaskell.org\">Try Haskell!</a></li>\n</ul>\n<h3>HTML / CSS</h3>\n<ul>\n<li><a href=\"http://flukeout.github.io\">CSS Diner</a></li>\n<li><a href=\"https://www.w3schools.com/css/\">CSS Tutorial</a> - W3Schools</li>\n<li><a href=\"https://codingfantasy.com/games/flexboxadventure\">Flex Box Adventure</a> - Nick Bull</li>\n<li><a href=\"http://flexboxdefense.com\">Flexbox Defense</a></li>\n<li><a href=\"http://flexboxfroggy.com\">Flexbox Froggy</a></li>\n<li><a href=\"https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/\">FreeCodeCamp: Responsive Web Design Course</a></li>\n<li><a href=\"https://codingfantasy.com/games/css-grid-attack\">Grid Attack</a> - Nick Bull</li>\n<li><a href=\"https://cssgridgarden.com\">Grid Garden</a></li>\n<li><a href=\"https://www.w3schools.com/html/\">HTML Tutorial</a> - W3Schools</li>\n<li><a href=\"https://knightsoftheflexboxtable.com\">Knights of the Flexbox Table</a></li>\n<li><a href=\"https://dash.generalassemb.ly\">Learn by doing beginner projects</a></li>\n<li><a href=\"https://www.codecademy.com/learn/web\">Learn HTML &#x26; CSS interactively</a></li>\n<li><a href=\"https://www.codecademy.com/learn/make-a-website\">Prototyping a professional website</a></li>\n</ul>\n<h4>Bootstrap</h4>\n<ul>\n<li><a href=\"https://www.tutlane.com/tutorial/bootstrap\">Bootstrap Tutorial</a> - tutlane</li>\n<li><a href=\"https://www.freecodecamp.org/learn/front-end-libraries/bootstrap\">Front End Libraries: Bootstrap</a></li>\n</ul>\n<h3>Java</h3>\n<ul>\n<li><a href=\"http://codingbat.com/java\">CodingBat code practice</a></li>\n<li><a href=\"https://www.codecademy.com/courses/learn-java\">Java at Codecademy</a></li>\n<li><a href=\"https://www.w3schools.com/java\">Java Tutorial</a> - W3Schools</li>\n<li><a href=\"http://www.learnjavaonline.org\">Learn Java</a></li>\n<li><a href=\"https://www.learneroo.com/modules/11\">Learneroo Java tutorial</a></li>\n</ul>\n<h3>JavaScript</h3>\n<ul>\n<li><a href=\"http://www.openjs.com/tutorials/basic_tutorial/\">ABC of JavaScript : An Interactive JavaScript Tutorial</a></li>\n<li><a href=\"https://www.codecademy.com/learn/jquery\">Codecademy jquery track</a></li>\n<li><a href=\"http://stack.formidable.com/es6-interactive-guide/#/\">ES6 Interactive Guide</a></li>\n<li><a href=\"https://github.com/ReactiveX/learnrx\">Functional Programming in Javascript</a></li>\n<li><a href=\"https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript\">JavaScript Algorithms and Data Structures Certification</a></li>\n<li><a href=\"https://www.codecademy.com/learn/javascript\">Javascript interactive tutorial on CodeCademy</a></li>\n<li><a href=\"http://www.codermania.com/javascript/lesson/1a/hello-world\">JavaScript interactive tutorial on CoderMania</a></li>\n<li><a href=\"https://www.w3schools.com/js\">JavaScript Tutorial</a> - W3Schools</li>\n<li><a href=\"https://github.com/sethvincent/javascripting\">Javascripting</a></li>\n<li><a href=\"http://www.learn-js.org\">Learn JavaScript</a></li>\n<li><a href=\"http://learn.knockoutjs.com\">Learn knockout.js</a></li>\n<li><a href=\"https://grasshopper.app\">Learn to Code for Free - Grasshopper</a></li>\n<li><a href=\"http://ejohn.org/apps/learn/\">Learning Advanced JavaScript</a></li>\n<li><a href=\"http://try.jquery.com\">Try jQuery</a></li>\n</ul>\n<h4>Angular.js</h4>\n<ul>\n<li><a href=\"http://www.angularjsbook.com\">Angular Basics</a></li>\n<li><a href=\"https://www.w3schools.com/angular/\">Angular Tutorial</a> - W3Schools</li>\n<li><a href=\"http://nicholasjohnson.com/angular-book/\">AngularJS - Step by Logical Step</a></li>\n<li><a href=\"https://www.tutlane.com/tutorial/angularjs\">AngularJS Tutorial</a> - tutlane</li>\n<li><a href=\"https://egghead.io\">egghead.io: Learn AngularJS with Tutorial Videos &#x26; Training</a></li>\n<li><a href=\"http://www.learn-angular.org\">Learn AngularJS with free interactive lessons</a></li>\n</ul>\n<h4>jQuery</h4>\n<ul>\n<li><a href=\"https://www.freecodecamp.org/learn/front-end-libraries/jquery\">Front End Libraries: jQuery</a></li>\n</ul>\n<h4>React</h4>\n<ul>\n<li><a href=\"https://www.freecodecamp.org/learn/front-end-libraries/react\">Front End Libraries: React</a></li>\n<li><a href=\"https://react-tutorial.app\">React Tutorial</a></li>\n</ul>\n<h3>Kotlin</h3>\n<ul>\n<li><a href=\"https://kotlinlang.org/docs/tutorials/\">Kotlin tutorial</a></li>\n</ul>\n<h3>Language Agnostic</h3>\n<ul>\n<li><a href=\"http://codecombat.com\">CodeCombat</a> - Python, JavaScript, CoffeeScript, Clojure, Lua, Io</li>\n<li><a href=\"https://codility.com/programmers/\">Codility</a></li>\n<li><a href=\"https://www.freecodecamp.org/learn/coding-interview-prep/algorithms\">Introduction to the Coding Interview Prep Algorithms</a> (freeCodeCamp)</li>\n<li><a href=\"http://pythontutor.com\">Python Tutor</a> - Python, Java, JavaScript, TypeScript, Ruby, C, C++</li>\n<li><a href=\"https://www.howtographql.com\">The Fullstack Tutorial for GraphQL</a></li>\n</ul>\n<h4>Operating systems</h4>\n<ul>\n<li><a href=\"https://github.com/s-matyukevich/raspberry-pi-os\">Learning operating system development using Linux kernel and Raspberry Pi</a> - Sergey Matyukevich (:construction: <em>in process</em>)</li>\n</ul>\n<h3>LaTeX</h3>\n<ul>\n<li><a href=\"https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes\">Learn LaTeX in 30 minutes</a></li>\n</ul>\n<h3>Lisp</h3>\n<ul>\n<li><a href=\"https://github.com/google/lisp-koans\">Lisp Koans</a></li>\n</ul>\n<h3>MATLAB</h3>\n<ul>\n<li><a href=\"http://www.mathworks.com/tutorials\">Interactive Tutorials for MATLAB, Simulink, Signal Processing, Controls, and Computational Mathematics</a></li>\n</ul>\n<h3>Node</h3>\n<ul>\n<li><a href=\"http://nodeschool.io\">Node School</a></li>\n<li><a href=\"https://www.tutlane.com/tutorial/nodejs\">Node.js Tutorial</a> - tutlane</li>\n<li><a href=\"https://www.w3schools.com/nodejs\">Node.js Tutorial</a> - W3Schools</li>\n</ul>\n<h3>NoSQL</h3>\n<ul>\n<li><a href=\"https://github.com/chicagoruby/MongoDB_Koans\">MongoDB Koans</a></li>\n<li><a href=\"http://try.redis.io\">Try Redis</a></li>\n</ul>\n<h3>Objective-C</h3>\n<ul>\n<li><a href=\"http://tryobjectivec.codeschool.com\">Try Objective-C</a></li>\n</ul>\n<h3>Ocaml</h3>\n<ul>\n<li><a href=\"http://try.ocamlpro.com\">Try Ocaml</a></li>\n</ul>\n<h3>PHP</h3>\n<ul>\n<li><a href=\"https://www.codecademy.com/learn/php\">CodeCademy PHP</a></li>\n<li><a href=\"http://www.learn-php.org\">Learn PHP</a></li>\n<li><a href=\"https://www.w3schools.com/php\">PHP tutorial</a> - W3Schools</li>\n</ul>\n<h3>PostgreSQL</h3>\n<ul>\n<li><a href=\"https://www.postgresqltutorial.com\">PostgreSQL Tutorial</a></li>\n</ul>\n<h3>Python</h3>\n<ul>\n<li><a href=\"https://www.codecademy.com/learn/python\">Codecademy Python course</a></li>\n<li><a href=\"http://interactivepython.org/courselib/static/thinkcspy/index.html\">How to Think Like a Computer Scientist: Learning with Python, Interactive Edition</a></li>\n<li><a href=\"http://www.learnpython.org\">Learn Python</a></li>\n<li><a href=\"http://www.techbeamers.com/python-tutorial-step-by-step\">Learn Python Step by Step</a></li>\n<li><a href=\"https://runestone.academy/runestone/books/published/py4e-int/index.html\">Python for Everybody - Interactive</a> - Barbara Ericson</li>\n<li><a href=\"https://github.com/gregmalcolm/python_koans\">Python Koans</a></li>\n<li><a href=\"https://www.learndatasci.com/tutorials/python-pandas-tutorial-complete-introduction-for-beginners/\">Python Pandas Tutorial: A Complete Introduction for Beginners</a> - George McIntire, Brendan Martin, Lauren Washington</li>\n<li><a href=\"https://www.geeksforgeeks.org/python-programming-language/\">Python Programming Language</a> - GeeksforGeeks</li>\n<li><a href=\"https://www.tutlane.com/tutorial/python\">Python Tutorial</a> - tutlane</li>\n<li><a href=\"https://www.w3schools.com/python\">Python Tutorial</a> - W3Schools</li>\n</ul>\n<h3>Ruby</h3>\n<ul>\n<li><a href=\"https://www.codecademy.com/learn/ruby\">CodeCademy Ruby</a></li>\n<li><a href=\"http://www.rubykoans.com\">Ruby Koans</a></li>\n<li><a href=\"http://www.theodinproject.com\">The Odin Project</a></li>\n<li><a href=\"http://tryruby.org\">Try Ruby</a></li>\n</ul>\n<h3>Rust</h3>\n<ul>\n<li><a href=\"https://github.com/rust-lang/rustlings\">Rustlings</a></li>\n</ul>\n<h3>Scala</h3>\n<ul>\n<li><a href=\"https://scalatutorials.com/tour/\">A Tour of Scala - an interactive scala tutorial</a></li>\n<li><a href=\"https://www.scala-exercises.org\">Scala Exercises</a></li>\n</ul>\n<h3>Selenium</h3>\n<ul>\n<li><a href=\"http://www.techbeamers.com/selenium-webdriver-tutorial\">Selenium Tutorial - Web Automation</a></li>\n</ul>\n<h3>SQL</h3>\n<ul>\n<li><a href=\"https://www.khanacademy.org/computing/computer-programming/sql\">Intro to SQL: Querying and managing data</a> - Khan Academy</li>\n<li><a href=\"https://www.codecademy.com/courses/learn-sql\">SQL at Codecademy</a></li>\n<li><a href=\"https://www.tutlane.com/tutorial/sql-server\">SQL Server Tutorial</a> - tutlane</li>\n<li><a href=\"https://www.w3schools.com/sql\">SQL Tutorial</a> - W3Schools</li>\n<li><a href=\"http://sqlbolt.com\">SQLBolt</a></li>\n</ul>\n<h3>Vim</h3>\n<ul>\n<li><a href=\"http://www.openvim.com/tutorial.html\">Interactive Vim Tutorial</a></li>\n</ul>"},{"url":"/docs/reference/vscode/","relativePath":"docs/reference/vscode.md","relativeDir":"docs/reference","base":"vscode.md","name":"vscode","frontmatter":{"title":"vscode","weight":0,"seo":{"title":"vscode","description":"This is the vscode page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"vscode","keyName":"property"},{"name":"og:description","value":"This is the vscode page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"vscode"},{"name":"twitter:description","value":"This is the vscode page"}]},"template":"docs"},"html":"<h1>Everything You Need to Get Started With VSCode + Extensions &#x26; Resources</h1>\n<p>Commands:</p>\n<hr>\n<h3>Everything You Need to Get Started With VSCode + Extensions &#x26; Resources</h3>\n<h4>Every extension or tool you could possibly need</h4>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*gcp0kkiWQY6qd1Y4qEcqxw.png\" class=\"graf-image\" /></figure>\n<h3>Here's a rudimentary static site I made that goes into more detail on the extensions I use…</h3>\n<p><a href=\"https://5fff5b9a2430bb564bfd451d--stoic-mccarthy-2c335f.netlify.app/#h18\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://5fff5b9a2430bb564bfd451d--stoic-mccarthy-2c335f.netlify.app/#h18\"><strong>VSCodeExtensions</strong><br />\n5fff5b9a2430bb564bfd451d--stoic-mccarthy-2c335f.netlify.app</a><a href=\"https://5fff5b9a2430bb564bfd451d--stoic-mccarthy-2c335f.netlify.app/#h18\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>Here's the repo it was deployed from:</h3>\n<p><a href=\"https://github.com/bgoonz/vscode-Extension-readmes\" class=\"markup--anchor markup--p-anchor\">https://github.com/bgoonz/vscode-Extension-readmes</a></p>\n<hr>\n<h3>Commands:</h3>\n<blockquote>\n<p>Command Palette</p>\n</blockquote>\n<blockquote>\n<p>Access all available commands based on your current context.</p>\n</blockquote>\n<blockquote>\n<p>Keyboard Shortcut: <strong>Ctrl+Shift+P</strong></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*BByhnDoVQdRPdO4F.gif\" class=\"graf-image\" /></figure>### Command palette\n<p><code>⇧⌘P</code> Show all commands <code>⌘P</code> Show files</p>\n<h3>Sidebars</h3>\n<p><code>⌘B</code> Toggle sidebar <code>⇧⌘E</code> Explorer <code>⇧⌘F</code> Search <code>⇧⌘D</code> Debug <code>⇧⌘X</code> Extensions <code>⇧^G</code> Git (SCM)</p>\n<h3>Search</h3>\n<p><code>⌘F</code> Find <code>⌥⌘F</code> Replace <code>⇧⌘F</code> Find in files <code>⇧⌘H</code> Replace in files</p>\n<h3>Panel</h3>\n<p><code>⌘J</code> Toggle panel <code>⇧⌘M</code> Problems <code>⇧⌘U</code> Output <code>⇧⌘Y</code> Debug console<code></code> ^` <code></code>Terminal</p>\n<h3>View</h3>\n<p><code>⌘k</code> <code>z</code> Zen mode <code>⌘k</code> <code>u</code> Close unmodified <code>⌘k</code> <code>w</code> Close all</p>\n<h3>Debug</h3>\n<p><code>F5</code> Start <code>⇧F5</code> Stop <code>⇧⌘F5</code> Restart <code>^F5</code> Start without debugging <code>F9</code> Toggle breakpoint <code>F10</code> Step over <code>F11</code> Step into <code>⇧F11</code> Step out <code>⇧⌘D</code> Debug sidebar <code>⇧⌘Y</code> Debug panel</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/0*llpkl5jsIMhWMucR.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Tips-N-Tricks:</h3>\n<p>Here is a selection of common features for editing code. If the keyboard shortcuts aren't comfortable for you, consider installing a <a href=\"https://marketplace.visualstudio.com/search?target=VSCode&amp;category=Keymaps&amp;sortBy=Downloads\" class=\"markup--anchor markup--p-anchor\">keymap extension</a> for your old editor.</p>\n<p>Tip: You can see recommended keymap extensions in the Extensions view with Ctrl+K Ctrl+M which filters the search to <code>@recommended:keymaps</code> .</p>\n<h3>Multi cursor selection</h3>\n<p>To add cursors at arbitrary positions, select a position with your mouse and use Alt+Click (Option+click on macOS).</p>\n<p>To set cursors above or below the current position use:</p>\n<p>Keyboard Shortcut: Ctrl+Alt+Up or Ctrl+Alt+Down</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Le_oEOiYnEBmFfig.gif\" class=\"graf-image\" /></figure>You can add additional cursors to all occurrences of the current selection with Ctrl+Shift+L.\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*WcrfwIln6NIG3zNW.gif\" class=\"graf-image\" /></figure>*Note: You can also change the modifier to Ctrl/Cmd for applying multiple cursors with the* `editor.multiCursorModifier` <a href=\"https://code.visualstudio.com/docs/getstarted/settings\" class=\"markup--anchor markup--blockquote-anchor\"><em>setting</em></a>* . See* <a href=\"https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier\" class=\"markup--anchor markup--blockquote-anchor\"><em>Multi-cursor Modifier</em></a> *for details.*\n<p>If you do not want to add all occurrences of the current selection, you can use Ctrl+D instead. This only selects the next occurrence after the one you selected so you can add selections one by one.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*09EveaKtpZEKFEpO.gif\" class=\"graf-image\" /></figure>### Column (box) selection\n<p>You can select blocks of text by holding Shift+Alt (Shift+Option on macOS) while you drag your mouse. A separate cursor will be added to the end of each selected line.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*LrsOBXP4MVqr7aes.gif\" class=\"graf-image\" /></figure>You can also use <a href=\"https://code.visualstudio.com/docs/editor/codebasics#_column-box-selection\" class=\"markup--anchor markup--p-anchor\">keyboard shortcuts</a> to trigger column selection.\n<hr>\n<h3>Extensions:</h3>\n<h4><a href=\"https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-autohotkey-plus\" class=\"markup--anchor markup--h4-anchor\">AutoHotkey Plus</a></h4>\n<blockquote>\n<p><em>Syntax Highlighting, Snippets, Go to Definition, Signature helper and Code formatter</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=rogalmic.bash-debug\" class=\"markup--anchor markup--h3-anchor\">Bash Debug</a></h3>\n<blockquote>\n<p><em>A debugger extension for Bash scripts based on</em> <code>bashdb</code></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*8j2gGGs0WHcuFIwY.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=Remisa.shellman\" class=\"markup--anchor markup--h3-anchor\">Shellman</a>\n<blockquote>\n<p><em>Bash script snippets extension</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*wyimtX27gWygAeOb.gif\" class=\"graf-image\" /></figure>### C++\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools\" class=\"markup--anchor markup--blockquote-anchor\">C/C++</a> — Preview C/C++ extension by <a href=\"https://www.microsoft.com/\" class=\"markup--anchor markup--blockquote-anchor\">Microsoft</a>, read <a href=\"https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/\" class=\"markup--anchor markup--blockquote-anchor\">official blog post</a> for the details</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd\" class=\"markup--anchor markup--blockquote-anchor\">Clangd</a> — Provides C/C++ language IDE features for VS Code using clangd: code completion, compile errors and warnings, go-to-definition and cross references, include management, code formatting, simple refactorings.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=austin.code-gnu-global\" class=\"markup--anchor markup--blockquote-anchor\">gnu-global-tags</a> — Provide Intellisense for C/C++ with the help of the GNU Global tool.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=RichardHe.you-complete-me\" class=\"markup--anchor markup--blockquote-anchor\">YouCompleteMe</a> — Provides semantic completions for C/C++ (and TypeScript, JavaScript, Objective-C, Golang, Rust) using <a href=\"http://ycm-core.github.io/YouCompleteMe/\" class=\"markup--anchor markup--blockquote-anchor\">YouCompleteMe</a>.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://github.com/mitaki28/vscode-clang\" class=\"markup--anchor markup--blockquote-anchor\">C/C++ Clang Command Adapter</a> — Completion and Diagnostic for C/C++/Objective-C using Clang command.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://github.com/cquery-project/vscode-cquery\" class=\"markup--anchor markup--blockquote-anchor\">CQuery</a> — <a href=\"https://github.com/jacobdufault/cquery\" class=\"markup--anchor markup--blockquote-anchor\">C/C++ language server</a> supporting multi-million line code base, powered by libclang. Cross references, completion, diagnostics, semantic highlighting and more.</p>\n</blockquote>\n<h4>More</h4>\n<ul>\n<li><span id=\"4dd9\"><a href=\"https://devblogs.microsoft.com/cppblog/vscode-cpp-may-2019-update/\" class=\"markup--anchor markup--li-anchor\">Microsoft's tutorial on using VSCode for remote C/C++ development</a></span></li>\n</ul>\n<h3>C#, ASP . NET and . NET Core</h3>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp\" class=\"markup--anchor markup--blockquote-anchor\">C#</a> — C# extension by <a href=\"https://www.microsoft.com/\" class=\"markup--anchor markup--blockquote-anchor\">Microsoft</a>, read <a href=\"https://code.visualstudio.com/docs/languages/csharp\" class=\"markup--anchor markup--blockquote-anchor\">official documentation</a> for the details</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=Leopotam.csharpfixformat\" class=\"markup--anchor markup--blockquote-anchor\">C# FixFormat</a> — Fix format of usings / indents / braces / empty lines</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=jchannon.csharpextensions\" class=\"markup--anchor markup--blockquote-anchor\">C# Extensions</a> — Provides extensions to the IDE that will speed up your development workflow.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=tintoy.msbuild-project-tools\" class=\"markup--anchor markup--blockquote-anchor\">MSBuild Project Tools</a></p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=fernandoescolar.vscode-solution-explorer\" class=\"markup--anchor markup--blockquote-anchor\">VSCode Solution Explorer</a></p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=formulahendry.dotnet-test-explorer\" class=\"markup--anchor markup--blockquote-anchor\">. NET Core Test Explorer</a></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ZG5W4_VVBv89zO_g.gif\" class=\"graf-image\" /></figure>\n<hr>\n<h3>CSS</h3>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=pranaygp.vscode-css-peek\" class=\"markup--anchor markup--h3-anchor\">CSS Peek</a></h3>\n<blockquote>\n<p><em>Peek or Jump to a CSS definition directly from HTML, just like in Brackets!</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*MN4pNqxDw4FyRk8g.gif\" class=\"graf-image\" /></figure>-   <span id=\"7261\"><a href=\"https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint\" class=\"markup--anchor markup--li-anchor\">stylelint</a> — Lint CSS/SCSS.</span>\n<ul>\n<li><span id=\"e8d5\"><a href=\"https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-autoprefixer\" class=\"markup--anchor markup--li-anchor\">Autoprefixer</a> Parse CSS, SCSS, LESS and add vendor prefixes automatically.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*edXaUlo7z9TRDQnC.gif\" class=\"graf-image\" /></figure>-   <span id=\"b1b1\"><a href=\"https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion\" class=\"markup--anchor markup--li-anchor\">Intellisense for CSS class names</a> — Provides CSS class name completion for the HTML class attribute based on the CSS files in your workspace. Also supports React's className attribute.</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*AHJJrCMfkLWLHLH4.gif\" class=\"graf-image\" /></figure>### Groovy\n<ul>\n<li><span id=\"e453\"><a href=\"https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-groovy-lint\" class=\"markup--anchor markup--li-anchor\">VsCode Groovy Lint</a> — Groovy lint, format, prettify and auto-fix</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*jmi5_-erJj7WOMq7.gif\" class=\"graf-image\" /></figure>### Haskell\n<ul>\n<li><span id=\"66eb\"><a href=\"https://marketplace.visualstudio.com/items?itemName=hoovercj.haskell-linter\" class=\"markup--anchor markup--li-anchor\">haskell-linter</a></span></li>\n<li><span id=\"fd71\"><a href=\"https://marketplace.visualstudio.com/items?itemName=alanz.vscode-hie-server\" class=\"markup--anchor markup--li-anchor\">Haskell IDE engine</a> — provides <a href=\"https://github.com/haskell/haskell-ide-engine\" class=\"markup--anchor markup--li-anchor\">language server</a> for stack and cabal projects.</span></li>\n<li><span id=\"cbfe\"><a href=\"https://marketplace.visualstudio.com/items?itemName=truman.autocomplate-shell\" class=\"markup--anchor markup--li-anchor\">autocomplate-shell</a></span></li>\n</ul>\n<hr>\n<h3>Java</h3>\n<ul>\n<li><span id=\"cf71\"><a href=\"https://marketplace.visualstudio.com/items?itemName=redhat.java\" class=\"markup--anchor markup--li-anchor\">Language Support for Java(TM) by Red Hat</a></span></li>\n<li><span id=\"d93f\"><a href=\"https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug\" class=\"markup--anchor markup--li-anchor\">Debugger for Java</a></span></li>\n<li><span id=\"3c8c\"><a href=\"https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven\" class=\"markup--anchor markup--li-anchor\">Maven for Java</a></span></li>\n<li><span id=\"2d5c\"><a href=\"https://marketplace.visualstudio.com/items?itemName=GabrielBB.vscode-lombok\" class=\"markup--anchor markup--li-anchor\">Lombok</a></span></li>\n</ul>\n<hr>\n<h3>JavaScript</h3>\n<ul>\n<li><span id=\"8516\"><a href=\"https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel\" class=\"markup--anchor markup--li-anchor\">Babel JavaScript</a></span></li>\n<li><span id=\"aa22\"><a href=\"https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode\" class=\"markup--anchor markup--li-anchor\">Visual Studio IntelliCode</a> — This extension provides AI-assisted development features including autocomplete and other insights based on understanding your code context.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*i7CZbSbHqsWqEM4w.gif\" class=\"graf-image\" /></figure>See the difference between these two <a href=\"https://github.com/michaelgmcd/vscode-language-babel/issues/1\" class=\"markup--anchor markup--p-anchor\">here</a>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin\" class=\"markup--anchor markup--blockquote-anchor\">tslint</a> — TSLint for Visual Studio Code (with <code>\"tslint.jsEnable\": true</code> ).</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint\" class=\"markup--anchor markup--blockquote-anchor\">eslint</a> — Linter for <a href=\"https://eslint.org/\" class=\"markup--anchor markup--blockquote-anchor\">eslint</a>.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=samverschueren.linter-xo\" class=\"markup--anchor markup--blockquote-anchor\">XO</a> — Linter for <a href=\"https://github.com/xojs/xo\" class=\"markup--anchor markup--blockquote-anchor\">XO</a>.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=samverschueren.ava\" class=\"markup--anchor markup--blockquote-anchor\">AVA</a> — Snippets for <a href=\"https://github.com/avajs/ava\" class=\"markup--anchor markup--blockquote-anchor\">AVA</a>.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode\" class=\"markup--anchor markup--blockquote-anchor\">Prettier</a> — Linter, Formatter and Pretty printer for <a href=\"https://github.com/prettier/prettier-vscode\" class=\"markup--anchor markup--blockquote-anchor\">Prettier</a>.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=austinleegordon.vscode-schema-dot-org\" class=\"markup--anchor markup--blockquote-anchor\">Schema.org Snippets</a> — Snippets for <a href=\"https://schema.org/\" class=\"markup--anchor markup--blockquote-anchor\">Schema.org</a>.</p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker\" class=\"markup--anchor markup--blockquote-anchor\">Code Spell Checker</a> — Spelling Checker for Visual Studio Code.</p>\n</blockquote>\n<p>Framework-specific:</p>\n<h4><a href=\"https://marketplace.visualstudio.com/items?itemName=octref.vetur\" class=\"markup--anchor markup--h4-anchor\">Vetur</a> — Toolkit for Vue.js</h4>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*F7J_vW0ISbVMTXIZ.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome\" class=\"markup--anchor markup--h3-anchor\">Debugger for Chrome</a></h3>\n<blockquote>\n<p><em>A VS Code extension to debug your JavaScript code in the Chrome browser, or other targets that support the Chrome Debugging Protocol.</em></p>\n</blockquote>\n<h3>Facebook Flow</h3>\n<ul>\n<li><span id=\"155f\"><a href=\"https://marketplace.visualstudio.com/items?itemName=flowtype.flow-for-vscode\" class=\"markup--anchor markup--li-anchor\">Flow Language Support</a> — provides all the functionality you would expect — linting, intellisense, type tooltips and click-to-definition</span></li>\n<li><span id=\"ac2f\"><a href=\"https://marketplace.visualstudio.com/items?itemName=gcazaciuc.vscode-flow-ide\" class=\"markup--anchor markup--li-anchor\">vscode-flow-ide</a> — an alternative Flowtype extension for Visual Studio Code</span></li>\n</ul>\n<h3>TypeScript</h3>\n<ul>\n<li><span id=\"8883\"><a href=\"https://marketplace.visualstudio.com/items?itemName=eg2.tslint\" class=\"markup--anchor markup--li-anchor\">tslint</a> — TSLint for Visual Studio Code</span></li>\n<li><span id=\"9665\"><a href=\"https://marketplace.visualstudio.com/items?itemName=rbbit.typescript-hero\" class=\"markup--anchor markup--li-anchor\">TypeScript Hero</a> — Code outline view of your open TS, sort and organize your imports.</span></li>\n</ul>\n<hr>\n<h3>Markdown</h3>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint\" class=\"markup--anchor markup--h3-anchor\">markdownlint</a></h3>\n<blockquote>\n<p><em>Linter for</em> <a href=\"https://github.com/DavidAnson/markdownlint\" class=\"markup--anchor markup--blockquote-anchor\"><em>markdownlint</em></a><em>.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one\" class=\"markup--anchor markup--h3-anchor\">Markdown All in One</a></h3>\n<blockquote>\n<p><em>All-in-one markdown plugin (keyboard shortcuts, table of contents, auto preview, list editing and more)</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*8oVrYuZ9kLRNSuBs.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=bierner.markdown-emoji\" class=\"markup--anchor markup--h3-anchor\">Markdown Emoji</a>\n<blockquote>\n<p><em>Adds emoji syntax support to VS Code's built-in Markdown preview</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*rckUMIIZ9Jh7UE5q.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>PHP</h3>\n<h3>IntelliSense</h3>\n<p>These extensions provide slightly different sets of features. While the first one offers better autocompletion support, the second one seems to have more features overall.</p>\n<ul>\n<li><span id=\"94df\"><a href=\"https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client\" class=\"markup--anchor markup--li-anchor\">PHP Intelephense</a></span></li>\n<li><span id=\"b2b4\"><a href=\"https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense\" class=\"markup--anchor markup--li-anchor\">PHP IntelliSense</a></span></li>\n</ul>\n<h3>Laravel</h3>\n<ul>\n<li><span id=\"687e\"><a href=\"https://marketplace.visualstudio.com/items?itemName=onecentlin.laravel5-snippets\" class=\"markup--anchor markup--li-anchor\">Laravel 5 Snippets</a> — Laravel 5 snippets for Visual Studio Code</span></li>\n<li><span id=\"42ab\"><a href=\"https://marketplace.visualstudio.com/items?itemName=onecentlin.laravel-blade\" class=\"markup--anchor markup--li-anchor\">Laravel Blade Snippets</a> — Laravel blade snippets and syntax highlight support</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*f4hMFe1l7NpJTG8v.gif\" class=\"graf-image\" /></figure>-   <span id=\"bf66\"><a href=\"https://marketplace.visualstudio.com/items?itemName=ahinkle.laravel-model-snippets\" class=\"markup--anchor markup--li-anchor\">Laravel Model Snippets</a> — Quickly get models up and running with Laravel Model Snippets.</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*1xydH2CgYGDSMZtB.gif\" class=\"graf-image\" /></figure>-   <span id=\"fa58\"><a href=\"https://marketplace.visualstudio.com/items?itemName=ryannaddy.laravel-artisan\" class=\"markup--anchor markup--li-anchor\">Laravel Artisan</a> — Laravel Artisan commands within Visual Studio Code</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*rzK952c4UgikNNPR.gif\" class=\"graf-image\" /></figure>-   <span id=\"1e4d\"><a href=\"https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv\" class=\"markup--anchor markup--li-anchor\">DotENV</a> — Support for dotenv file syntax</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*fSAaqpXfBx1Sgztf.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Other extensions</h3>\n<ul>\n<li><span id=\"8443\"><a href=\"https://marketplace.visualstudio.com/items?itemName=rifi2k.format-html-in-php\" class=\"markup--anchor markup--li-anchor\">Format HTML in PHP</a> — Formatting for the HTML in PHP files. Runs before the save action so you can still have a PHP formatter.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*6gF0K20iKes7I9ZF.gif\" class=\"graf-image\" /></figure>-   <span id=\"f3f0\"><a href=\"https://marketplace.visualstudio.com/items?itemName=ikappas.composer\" class=\"markup--anchor markup--li-anchor\">Composer</a></span>\n<ul>\n<li><span id=\"e5ba\"><a href=\"https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug\" class=\"markup--anchor markup--li-anchor\">PHP Debug</a> — XDebug extension for Visual Studio Code</span></li>\n<li><span id=\"6a3c\"><a href=\"https://marketplace.visualstudio.com/items?itemName=neilbrayfield.php-docblocker\" class=\"markup--anchor markup--li-anchor\">PHP DocBlocker</a></span></li>\n<li><span id=\"a4ca\"><a href=\"https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer\" class=\"markup--anchor markup--li-anchor\">php cs fixer</a> — PHP CS Fixer extension for VS Code, php formatter, php code beautify tool</span></li>\n<li><span id=\"30f1\"><a href=\"https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs\" class=\"markup--anchor markup--li-anchor\">phpcs</a> — PHP CodeSniffer for Visual Studio Code</span></li>\n<li><span id=\"d82e\"><a href=\"https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt\" class=\"markup--anchor markup--li-anchor\">phpfmt</a> — phpfmt for Visual Studio Code</span></li>\n</ul>\n<hr>\n<h3>Python</h3>\n<ul>\n<li><span id=\"0136\"><a href=\"https://marketplace.visualstudio.com/items?itemName=ms-python.python\" class=\"markup--anchor markup--li-anchor\">Python</a> — Linting, Debugging (multi threaded, web apps), Intellisense, auto-completion, code formatting, snippets, unit testing, and more.</span></li>\n</ul>\n<h3>TensorFlow</h3>\n<ul>\n<li><span id=\"402b\"><a href=\"https://marketplace.visualstudio.com/items?itemName=vahidk.tensorflow-snippets\" class=\"markup--anchor markup--li-anchor\">TensorFlow Snippets</a> — This extension includes a set of useful code snippets for developing TensorFlow models in Visual Studio Code.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*stmhgQ3sGvJBTvf2.gif\" class=\"graf-image\" /></figure>\n<hr>\n<h3>Rust</h3>\n<ul>\n<li><span id=\"cec4\"><a href=\"https://marketplace.visualstudio.com/items?itemName=rust-lang.rust\" class=\"markup--anchor markup--li-anchor\">Rust</a> — Linting, auto-completion, code formatting, snippets and more</span></li>\n</ul>\n<hr>\n<h3>Productivity</h3>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=bencoleman.armview\" class=\"markup--anchor markup--h3-anchor\">ARM Template Viewer</a></h3>\n<blockquote>\n<p><em>Displays a graphical preview of Azure Resource Manager (ARM) templates. The view will show all resources with the official Azure icons and also linkage between the resources.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*p8bvCI9DXF44m4z3.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb\" class=\"markup--anchor markup--h3-anchor\">Azure Cosmos DB</a>\n<blockquote>\n<p><em>Browse your database inside the vs code editor</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*VWvSU6Hbf20Kfc_P.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit\" class=\"markup--anchor markup--h3-anchor\">Azure IoT Toolkit</a>\n<blockquote>\n<p><em>Everything you need for the Azure IoT development: Interact with Azure IoT Hub, manage devices connected to Azure IoT Hub, and develop with code snippets for Azure IoT Hub</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*AobtCd80fICrbQPI.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks\" class=\"markup--anchor markup--h3-anchor\">Bookmarks</a>\n<blockquote>\n<p><em>Mark lines and jump to them</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=orepor.color-tabs-vscode-ext\" class=\"markup--anchor markup--h3-anchor\">Color Tabs</a></h3>\n<blockquote>\n<p><em>An extension for big projects or monorepos that colors your tab/titlebar based on the current package</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*SEp-hgfDLlubNRyc.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=hardikmodha.create-tests\" class=\"markup--anchor markup--h3-anchor\">Create tests</a>\n<blockquote>\n<p><em>An extension to quickly generate test files.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*DLZLYmrBiui0YOBt.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-deploy\" class=\"markup--anchor markup--h3-anchor\">Deploy</a>\n<blockquote>\n<p><em>Commands for upload or copy files of a workspace to a destination.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*lLasjzlmWnBwdbAT.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-duplicate\" class=\"markup--anchor markup--h3-anchor\">Duplicate Action</a>\n<blockquote>\n<p><em>Ability to duplicate files and directories.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens\" class=\"markup--anchor markup--h3-anchor\">Error Lens</a></h3>\n<blockquote>\n<p><em>Show language diagnostics inline (errors/warnings/…).</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*1tJJkV0p2Ka_W06r.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets\" class=\"markup--anchor markup--h3-anchor\">ES7 React/Redux/GraphQL/React-Native snippets</a>\n<blockquote>\n<p><em>Provides Javascript and React/Redux snippets in ES7</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*W3N0kbgEumWYa-m4.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=rubbersheep.gi\" class=\"markup--anchor markup--h3-anchor\">Gi</a>\n<blockquote>\n<p><em>Generating .gitignore files made easy</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*sfddghz8B1D362UB.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs\" class=\"markup--anchor markup--h3-anchor\">GistPad</a>\n<blockquote>\n<p><em>Allows you to manage GitHub Gists entirely within the editor. You can open, create, delete, fork, star and clone gists, and then seamlessly begin editing files as if they were local. It's like your very own developer library for building and referencing code snippets, commonly used config/scripts, programming-related notes/documentation, and interactive samples.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*1MiBQ0u4Z8TPNaG9.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory\" class=\"markup--anchor markup--h3-anchor\">Git History</a>\n<blockquote>\n<p><em>View git log, file or line History</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=felipecaputo.git-project-manager\" class=\"markup--anchor markup--h3-anchor\">Git Project Manager</a></h3>\n<blockquote>\n<p><em>Automatically indexes your git projects and lets you easily toggle between them</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=qezhu.gitlink\" class=\"markup--anchor markup--h3-anchor\">GitLink</a></h3>\n<blockquote>\n<p><em>GoTo current file's online link in browser and Copy the link in clipboard.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Acgfn2rmhinuIPjk.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens\" class=\"markup--anchor markup--h3-anchor\">GitLens</a>\n<blockquote>\n<p><em>Provides Git CodeLens information (most recent commit, # of authors), on-demand inline blame annotations, status bar blame information, file and blame history explorers, and commands to compare changes with the working tree or previous versions.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*MZu4GV7SOCW88UQQ.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=lamartire.git-indicators\" class=\"markup--anchor markup--h3-anchor\">Git Indicators</a>\n<blockquote>\n<p><em>Atom-like git indicators on active panel</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*vitZrD9ZU0_eWckU.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*0BHxQOLMx09FFuWZ.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*x8F97F4AdSvvtehT.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=KnisterPeter.vscode-github\" class=\"markup--anchor markup--h3-anchor\">GitHub</a>\n<blockquote>\n<p><em>Provides GitHub workflow support. For example browse project, issues, file (the current line), create and manage pull request. Support for other providers (e.g. gitlab or bitbucket) is planned. Have a look at the</em> <a href=\"https://github.com/KnisterPeter/vscode-github/blob/master/README.md\" class=\"markup--anchor markup--blockquote-anchor\"><em>README.md</em></a> <em>on how to get started with the setup for this extension.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=erichbehrens.pull-request-monitor\" class=\"markup--anchor markup--h3-anchor\">GitHub Pull Request Monitor</a></h3>\n<blockquote>\n<p><em>This extension uses the GitHub api to monitor the state of your pull requests and let you know when it's time to merge or if someone requested changes.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*TOq5OERkgQNETGPK.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=gitlab.gitlab-workflow\" class=\"markup--anchor markup--h3-anchor\">GitLab Workflow</a>\n<blockquote>\n<p><em>Adds a GitLab sidebar icon to view issues, merge requests and other GitLab resources. You can also view the results of your GitLab CI/CD pipeline and check the syntax of your _<code>.gitlab-ci.yml</code></em>._</p>\n</blockquote>\n<h4><a href=\"https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-gradle\" class=\"markup--anchor markup--h4-anchor\">Gradle Tasks</a></h4>\n<blockquote>\n<p><em>Run gradle tasks in VS Code.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Vx-3DIT22BJpEnJr.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=idleberg.icon-fonts\" class=\"markup--anchor markup--h3-anchor\">Icon Fonts</a>\n<blockquote>\n<p><em>Snippets for popular icon fonts such as Font Awesome, Ionicons, Glyphicons, Octicons, Material Design Icons and many more!</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost\" class=\"markup--anchor markup--h3-anchor\">Import Cost</a></h3>\n<blockquote>\n<p><em>This extension will display inline in the editor the size of the imported package. The extension utilizes webpack with babili-webpack-plugin in order to detect the imported size.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=Atlassian.atlascode\" class=\"markup--anchor markup--h3-anchor\">Jira and Bitbucket</a></h3>\n<blockquote>\n<p><em>Bringing the power of Jira and Bitbucket to VS Code — With Atlassian for VS Code you can create and view issues, start work on issues, create pull requests, do code reviews, start builds, get build statuses and more!</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*T6iuH2VnPYj93YqW.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=lannonbr.vscode-js-annotations\" class=\"markup--anchor markup--h3-anchor\">JS Parameter Annotations</a>\n<blockquote>\n<p><em>Provides annotations on function calls in JS/TS files to provide parameter names to arguments.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*zHffPsYWln4dxhus.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=wmaurer.vscode-jumpy\" class=\"markup--anchor markup--h3-anchor\">Jumpy</a>\n<blockquote>\n<p><em>Provides fast cursor movement, inspired by Atom's package of the same name.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*uPOceUJ4eMjCP_Qt.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-kanban\" class=\"markup--anchor markup--h3-anchor\">Kanban</a>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*SzUG3UU1fl5ub7bA.gif\" class=\"graf-image\" /></figure>*Simple Kanban board for use in Visual Studio Code, with time tracking and Markdown support.*\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer\" class=\"markup--anchor markup--h3-anchor\">Live Server</a></h3>\n<blockquote>\n<p><em>Launch a development local Server with live reload feature for static &#x26; dynamic pages.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Oj5zPrWwMbCBViBi.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=slevesque.vscode-multiclip\" class=\"markup--anchor markup--h3-anchor\">Multiple clipboards</a>\n<blockquote>\n<p><em>Override the regular Copy and Cut commands to keep selections in a clipboard ring</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=philnash.ngrok-for-vscode\" class=\"markup--anchor markup--h3-anchor\">ngrok for VSCode</a></h3>\n<blockquote>\n<p><em>ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on. This extension allows you to control</em> <a href=\"https://ngrok.com/\" class=\"markup--anchor markup--blockquote-anchor\"><em>ngrok</em></a> <em>from the VSCode command palette</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*IX15MuJrEVBcTd0F.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=dbankier.vscode-instant-markdown\" class=\"markup--anchor markup--h3-anchor\">Instant Markdown</a>\n<blockquote>\n<p><em>Simply, edit markdown documents in vscode and instantly preview it in your browser as you type.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*jBw9vP9cAtvv2IcV.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense\" class=\"markup--anchor markup--h3-anchor\">npm Intellisense</a>\n<blockquote>\n<p><em>Visual Studio Code plugin that autocompletes npm modules in import statements.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*iVJamJugt_b7-VsV.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=DominicVonk.parameter-hints\" class=\"markup--anchor markup--h3-anchor\">Parameter Hints</a>\n<blockquote>\n<p><em>Provides parameter hints on function calls in JS/TS/PHP files.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*BSj8-Qt7xtVTsl1Z.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff\" class=\"markup--anchor markup--h3-anchor\">Partial Diff</a>\n<blockquote>\n<p><em>Compare (diff) text selections within a file, across different files, or to the clipboard</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*KHki85jdv1hZeY3V.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=quicktype.quicktype\" class=\"markup--anchor markup--h3-anchor\">Paste JSON as Code</a>\n<blockquote>\n<p><em>Infer the structure of JSON and paste is as types in many programming languages</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*K2GCRMGsYjpsK8OX.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense\" class=\"markup--anchor markup--h3-anchor\">Path IntelliSense</a>\n<blockquote>\n<p><em>Visual Studio Code plugin that autocompletes filenames</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*xwxU_1ffZvZ6DeoO.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=ego-digital.vscode-powertools\" class=\"markup--anchor markup--h3-anchor\">Power Tools</a>\n<blockquote>\n<p><em>Extends Visual Studio Code via things like Node.js based scripts or shell commands, without writing separate extensions</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Cb7J6-PYsXsnjqSN.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=nobuhito.printcode\" class=\"markup--anchor markup--h3-anchor\">PrintCode</a>\n<blockquote>\n<p><em>PrintCode converts the code being edited into an HTML file, displays it by browser and prints it.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*2spvNSEEHM-ETd_F.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager\" class=\"markup--anchor markup--h3-anchor\">Project Manager</a>\n<blockquote>\n<p><em>Easily switch between projects.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=kruemelkatze.vscode-dashboard\" class=\"markup--anchor markup--h3-anchor\">Project Dashboard</a></h3>\n<blockquote>\n<p><em>VSCode Project Dashboard is a Visual Studio Code extension that lets you organize your projects in a speed-dial like manner. Pin your frequently visited folders, files, and SSH remotes onto a dashboard to access them quickly.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*PxOoARROhi1rf63R.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv\" class=\"markup--anchor markup--h3-anchor\">Rainbow CSV</a>\n<blockquote>\n<p><em>Highlight columns in comma, tab, semicolon and pipe separated files, consistency check and linting with CSVLint, multi-cursor column editing, column trimming and realignment, and SQL-style querying with RBQL.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*XAb9jlOfGWlEaCEM.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack\" class=\"markup--anchor markup--h3-anchor\">Remote Development</a>\n<blockquote>\n<p><em>Allows users to open any folder in a container, on a remote machine, container or in Windows Subsystem for Linux(WSL) and take advantage of VS Code's full feature set.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*b6XEPh9PJzeWDB_z.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=rafaelmaiolla.remote-vscode\" class=\"markup--anchor markup--h3-anchor\">Remote VSCode</a>\n<blockquote>\n<p><em>Allow user to edit files from Remote server in Visual Studio Code directly.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=humao.rest-client\" class=\"markup--anchor markup--h3-anchor\">REST Client</a></h3>\n<blockquote>\n<p><em>Allows you to send HTTP request and view the response in Visual Studio Code directly.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*zGne78bniDbTXzyf.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync\" class=\"markup--anchor markup--h3-anchor\">Settings Sync</a>\n<blockquote>\n<p><em>Synchronize settings, snippets, themes, file icons, launch, key bindings, workspaces and extensions across multiple machines using GitHub Gist</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ilH91MRgGnMF6C8c.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=qcz.text-power-tools\" class=\"markup--anchor markup--h3-anchor\">Text Power Tools</a>\n<blockquote>\n<p><em>All-in-one extension for text manipulation: filtering (grep), remove lines, insert number sequences and GUIDs, format content as table, change case, converting numbers and more. Great for finding information in logs and manipulating text.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Pfp4noD5OeQRbmsZ.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree\" class=\"markup--anchor markup--h3-anchor\">Todo Tree</a>\n<blockquote>\n<p><em>Custom keywords, highlighting, and colors for TODO comments. As well as a sidebar to view all your current tags.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*6utz502-rPCa0Xcg.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=BriteSnow.vscode-toggle-quotes\" class=\"markup--anchor markup--h3-anchor\">Toggle Quotes</a>\n<blockquote>\n<p><em>Cycle between single, double and backtick quotes</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*7kZFpggvGAVkvoYa\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=tusaeff.vscode-typescript-destructure-plugin\" class=\"markup--anchor markup--h3-anchor\">Typescript Destructure</a>\n<blockquote>\n<p><em>TypeScript Language Service Plugin providing a set of source actions for easy objects destructuring</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*sEi0imXK2Yx69m7H.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=WakaTime.vscode-wakatime\" class=\"markup--anchor markup--h3-anchor\">WakaTime</a>\n<blockquote>\n<p><em>Automatic time tracker and productivity dashboard showing how long you coded in each project, file, branch, and language.</em></p>\n</blockquote>\n<hr>\n<h3>Formatting &#x26; Beautification</h3>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=wwm.better-align\" class=\"markup--anchor markup--h3-anchor\">Better Align</a></h3>\n<blockquote>\n<p><em>Align your code by colon(:), assignment(=, +=, -=, *=, /=) and arrow(=> ). It has additional support for comma-first coding style and trailing comment.</em></p>\n</blockquote>\n<blockquote>\n<p><em>And it doesn't require you to select what to be aligned, the extension will figure it out by itself.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*5maDjvvH57MAks1l.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag\" class=\"markup--anchor markup--h3-anchor\">Auto Close Tag</a>\n<blockquote>\n<p><em>Automatically add HTML/XML close tag, same as Visual Studio IDE or Sublime Text</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*h6Q6HLQ8jfHLnPlJ.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag\" class=\"markup--anchor markup--h3-anchor\">Auto Rename Tag</a>\n<blockquote>\n<p><em>Auto rename paired HTML/XML tags</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*uRKX2-umhSQzlESv.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify\" class=\"markup--anchor markup--h3-anchor\">beautify</a>\n<blockquote>\n<p><em>Beautify code in place for VS Code</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=dbalas.vscode-html2pug\" class=\"markup--anchor markup--h3-anchor\">html2pug</a></h3>\n<blockquote>\n<p><em>Transform html to pug inside your Visual Studio Code, forget about using an external page anymore.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=vilicvane.es-quotes\" class=\"markup--anchor markup--h3-anchor\">ECMAScript Quotes Transformer</a></h3>\n<blockquote>\n<p><em>Transform quotes of ECMAScript string literals</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*W1Z1fIvOGgPclFMJ.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=Rubymaniac.vscode-paste-and-indent\" class=\"markup--anchor markup--h3-anchor\">Paste and Indent</a>\n<blockquote>\n<p><em>Paste code with “correct” indentation</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines\" class=\"markup--anchor markup--h3-anchor\">Sort Lines</a></h3>\n<blockquote>\n<p><em>Sorts lines of text in specific order</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*a4wPhA7VjJqkp3lu.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=yatki.vscode-surround\" class=\"markup--anchor markup--h3-anchor\">Surround</a>\n<blockquote>\n<p><em>A simple yet powerful extension to add wrapper templates around your code blocks.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*lyjRgfSrvdmhGFXd.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=konstantin.wrapSelection\" class=\"markup--anchor markup--h3-anchor\">Wrap Selection</a>\n<blockquote>\n<p><em>Wraps selection or multiple selections with symbol or multiple symbols</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=tombonnike.vscode-status-bar-format-toggle\" class=\"markup--anchor markup--h3-anchor\">Formatting Toggle</a></h3>\n<blockquote>\n<p><em>Allows you to toggle your formatter on and off with a simple click</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer\" class=\"markup--anchor markup--h3-anchor\">Bracket Pair Colorizer</a></h3>\n<blockquote>\n<p><em>This extension allows matching brackets to be identified with colours. The user can define which characters to match, and which colours to use.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*m3nU-5UxgUxX4-eJ.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=steoates.autoimport\" class=\"markup--anchor markup--h3-anchor\">Auto Import</a>\n<blockquote>\n<p><em>Automatically finds, parses and provides code actions and code completion for all available imports. Works with Typescript and TSX.</em></p>\n</blockquote>\n<h3><a href=\"https://github.com/foxundermoon/vs-shell-format\" class=\"markup--anchor markup--h3-anchor\">shell-format</a></h3>\n<blockquote>\n<p><em>shell script &#x26; Dockerfile &#x26; dotenv format</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*TThlkfK1KgQm5AKU.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=funkyremi.vscode-google-translate\" class=\"markup--anchor markup--h3-anchor\">Vscode Google Translate</a>\n<blockquote>\n<p><em>Quickly translate selected text right in your code</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*JF8NuxAFDxXiTn_u.gif\" class=\"graf-image\" /></figure>### Explorer Icons\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme\" class=\"markup--anchor markup--h3-anchor\">Material Icon Theme</a></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*67ZZ9mhoISPk_lM4.png\" class=\"graf-image\" /></figure>### Uncategorized\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=auchenberg.vscode-browser-preview\" class=\"markup--anchor markup--h3-anchor\">Browser Preview</a></h3>\n<blockquote>\n<p><em>Browser Preview for VS Code enables you to open a real browser preview inside your editor that you can debug. Browser Preview is powered by Chrome Headless, and works by starting a headless Chrome instance in a new process. This enables a secure way to render web content inside VS Code, and enables interesting features such as in-editor debugging and more!</em></p>\n</blockquote>\n<blockquote>\n<p><strong><em>FYI:… I HAVE TRIED ENDLESSLEY TO GET THE DEBUGGER TO WORK IN VSCODE BUT IT DOES NOT… I SUSPECT THAT'S WHY IT HAS A 3 STAR RATING FOR AN OTHERWISE PHENOMINAL EXTENSION.</em></strong></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Oilwsi7EKGpCZb46.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=CodeRoad.coderoad\" class=\"markup--anchor markup--h3-anchor\">CodeRoad</a>\n<blockquote>\n<p><em>Play interactive tutorials in your favorite editor.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*iV8P93QMmWdYfnrQ.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner\" class=\"markup--anchor markup--h3-anchor\">Code Runner</a>\n<blockquote>\n<p><em>Run code snippet or code file for multiple languages: C, C++, Java, JavaScript, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, C# Script, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*hMsM_IEyBklQXchd.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode\" class=\"markup--anchor markup--h3-anchor\">Code Time</a>\n<blockquote>\n<p><em>Automatic time reports by project and other programming metrics right in VS Code.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Uo1BYexJenprpgLa\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight\" class=\"markup--anchor markup--h3-anchor\">Color Highlight</a>\n<blockquote>\n<p><em>Highlight web colors in your editor</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*ZwE7OHKR5opvDCJJOw9KeQ.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=IBM.output-colorizer\" class=\"markup--anchor markup--h3-anchor\">Output Colorizer</a>\n<blockquote>\n<p><em>Syntax highlighting for the VS Code Output Panel and log files</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*9DpzVZ9cUNp2TMyD.jpg\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=deerawan.vscode-dash\" class=\"markup--anchor markup--h3-anchor\">Dash</a>\n<blockquote>\n<p><em>Dash integration in Visual Studio Code</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*sqGllC-pgXNaEBfB-cxG9Q.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=ryu1kn.edit-with-shell\" class=\"markup--anchor markup--h3-anchor\">Edit with Shell Command</a>\n<blockquote>\n<p><em>Leverage your favourite shell commands to edit text</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*2wW31HJ1nUCjORZe.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig\" class=\"markup--anchor markup--h3-anchor\">Editor Config for VS Code</a>\n<blockquote>\n<p><em>Editor Config for VS Code</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=lukasz-wronski.ftp-sync\" class=\"markup--anchor markup--h3-anchor\">ftp-sync</a></h3>\n<blockquote>\n<p><em>Auto-sync your work to remote FTP server</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*-viKhwxpeYQdWHRE.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag\" class=\"markup--anchor markup--h3-anchor\">Highlight JSX/HTML tags</a>\n<blockquote>\n<p><em>Highlights matching tags in the file.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow\" class=\"markup--anchor markup--h3-anchor\">Indent Rainbow</a></h3>\n<blockquote>\n<p><em>A simple extension to make indentation more readable.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*GK_yEd-50SU3yc_y.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=ftonato.password-generator\" class=\"markup--anchor markup--h3-anchor\">Password Generator</a>\n<blockquote>\n<p><em>Create a secure password using our generator tool. Help prevent a security threat by getting a strong password today.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*qPJAZk9-NcYgsx7H.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=formulahendry.platformio\" class=\"markup--anchor markup--h3-anchor\">PlatformIO</a>\n<blockquote>\n<p><em>An open source ecosystem for IoT development: supports 350+ embedded boards, 20+ development platforms, 10+ frameworks. Arduino and ARM mbed compatible.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*RywVt_vikqB-5urO.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=pnp.polacode\" class=\"markup--anchor markup--h3-anchor\">Polacode</a>\n<blockquote>\n<p><em>Polaroid for your code 📸.</em></p>\n</blockquote>\n<blockquote>\n<p><strong><em>Note: Polacode no longer works as of the most recent update… go for Polacode2020 or CodeSnap…</em></strong></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Io4fPojDRrDf5CmW.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=WallabyJs.quokka-vscode\" class=\"markup--anchor markup--h3-anchor\">Quokka</a>\n<h4>This one is super cool!</h4>\n<blockquote>\n<p><em>Rapid prototyping playground for JavaScript and TypeScript in VS Code, with access to your project's files, inline reporting, code coverage and rich output formatting.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Q9kp8EWZHTD0Hfru.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=sozercan.slack\" class=\"markup--anchor markup--h3-anchor\">Slack</a>\n<blockquote>\n<p><em>Send messages and code snippets, upload files to Slack</em></p>\n</blockquote>\n<p>Personally I found this extension to slow down my editor in addition to confliction with other extensions: (I have over 200 as of this writing)….. <strong>yes I have been made fully aware that I have a problem and need to get help</strong></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*9-xxjXzdPCh_46kZ.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=shyykoserhiy.vscode-spotify\" class=\"markup--anchor markup--h3-anchor\">Spotify</a>\n<p><em>No real advantage over just using Spotify normally… it's problematic enough in implementation that you won't save any time using it. Further, it's a bit tricky to configure … or at least it was the last time I tried syncing it with my spotify account.</em></p>\n<blockquote>\n<p><em>Provides integration with Spotify Desktop client. Shows the currently playing song in status bar, search lyrics and provides commands for controlling Spotify with buttons and hotkeys.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*IqsxXiGpZQWbQbfD.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=jock.svg\" class=\"markup--anchor markup--h3-anchor\">SVG</a>\n<blockquote>\n<p><em>A Powerful SVG Language Support Extension(beta). Almost all the features you need to handle SVG.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*SC6zCXGaBnM_LkgC.png\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=cssho.vscode-svgviewer\" class=\"markup--anchor markup--h3-anchor\">SVG Viewer</a>\n<blockquote>\n<p><em>View an SVG in the editor and export it as data URI scheme or PNG.</em></p>\n</blockquote>\n<h3><a href=\"https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker\" class=\"markup--anchor markup--h3-anchor\">Text Marker (Highlighter)</a></h3>\n<blockquote>\n<p><em>Highlight multiple text patterns with different colors at the same time. Highlighting a single text pattern can be done with the editor's search functionality, but it cannot highlight multiple patterns at the same time, and this is where this extension comes handy.</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*YDreVyGNjZmqj_KC.gif\" class=\"graf-image\" /></figure>### <a href=\"https://marketplace.visualstudio.com/items?itemName=samundrak.esdoc-mdn\" class=\"markup--anchor markup--h3-anchor\">ESDOC MDN</a>\n<h3>THIS IS A MUST HAVE</h3>\n<blockquote>\n<p><em>Quickly bring up helpful MDN documentation in the editor</em></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*xiUfWBsz8x8beY70.gif\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*mMBU6d1iCkt5VHq2.gif\" class=\"graf-image\" /></figure>### Themes:\n<p>In the interest of not making the reader scroll endlessly as I often do… I've made a separate post for that here. If you've made it this far, I thank you!</p>\n<p><a href=\"https://bryanguner.medium.com/my-favorite-vscode-themes-9bab65af3f0f\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bryanguner.medium.com/my-favorite-vscode-themes-9bab65af3f0f\"><strong>My Favorite VSCode <em>Themes</em></strong><br />\nThemesbryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/my-favorite-vscode-themes-9bab65af3f0f\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<hr>\n<h3>If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:</h3>\n<p><a href=\"https://gist.github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://gist.github.com/bgoonz\"><strong>bgoonz's gists</strong><br />\n<em>Instantly share code, notes, and snippets. Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python |…</em>gist.github.com</a><a href=\"https://gist.github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz — Overview</strong><br />\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>Or Checkout my personal Resource Site:</h3>\n<p><a href=\"https://web-dev-resource-hub.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://web-dev-resource-hub.netlify.app/\"><strong>Web-Dev-Resource-Hub</strong><br />\n<em>Edit description</em>web-dev-resource-hub.netlify.app</a><a href=\"https://web-dev-resource-hub.netlify.app/\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/b9f4c8d91931\">March 18, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on May 23, 2021.</p>"},{"url":"/docs/tips/","relativePath":"docs/tips/index.md","relativeDir":"docs/tips","base":"index.md","name":"index","frontmatter":{"title":"Tips","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Lorem ipsum</h2>"},{"url":"/docs/tips/regex-tips/","relativePath":"docs/tips/regex-tips.md","relativeDir":"docs/tips","base":"regex-tips.md","name":"regex-tips","frontmatter":{"title":"Regex Tricks","weight":0,"excerpt":"Regex Tricks","seo":{"title":"Regex Tricks","description":"Regular expressions make light work of single-character delimiters, which is why it’s so easy to remove markup from a string:","robots":[],"extra":[]},"template":"docs"},"html":"<p>Regular expressions make light work of <strong>single-character delimiters</strong>, which is why it’s so easy to remove markup from a string:</p>\n<pre><code>str = str.replace(/(&#x3C;[\\/]?[^>]+>)/g, '');\n</code></pre>\n<p>It’s the negation in the character class that does the real work:</p>\n<pre><code>[^>]\n</code></pre>\n<p>Which means <em>“anything except <code>&#x3C;</code>“</em>. So the expression looks for the starting tag-delimiter and possible slash, then anything except the closing tag-delimiter, and then the delimiter itself. Easy.</p>\n<p>However comments are not so simple, because comment delimiters are comprised of <strong>more than one character</strong>. Multi-line comments in CSS and JavaScript, for example, start with <code>/*</code> and end with <code>*/</code>, but between those two delimiters there could be <strong>any number of unrelated stars</strong>.</p>\n<p>I often use multiple stars in comments, to indicate the severity of a bug I’ve just noticed, for example:</p>\n<pre><code>/*** this is a bug with 3-star severity ***/\n</code></pre>\n<p>But if we tried to parse that with a single negation character, it would fail:</p>\n<pre><code>str = str.replace(/(\\/\\*[^\\*]+\\*\\/)/g, '');\n</code></pre>\n<p>Yet it’s not possible with regular expressions to say: <em>“anything except [this sequence of characters]”</em>, we can only say: <em>“anything except [one of these single characters]”</em>.</p>\n<p>So here’s the regular expression we need instead:</p>\n<pre><code>str = str.replace(/(\\/\\*([^*]|(\\*+[^*\\/]))*\\*+\\/)/gm, '');\n</code></pre>\n<p>The expression handles unrelated characters by <strong>looking at what comes after them</strong> — stars are allowed as long as they’re not followed by a slash, until we find one that is, and that’s the end of the comment.</p>\n<p>So it says: “<code>/</code> then <code>*</code> (then anything except <code>*</code> OR any number of <code>*</code> followed by anything except <code>/</code>)(and any number of instances of that) then any number of <code>*</code> then <code>/</code>“.</p>\n<p>(The syntax looks particular convoluted, because <code>*</code> and <code>/</code> are both special characters in regular expressions, so the ambiguous literal ones have to be escaped. Also note the <code>m</code> flag at the end of the expression, which means <strong>multi-line</strong>, and specifies that the regular expression should search across more than one line of text.)</p>\n<p>Using the same principle then, we can adapt the expression to search for any kind of complex delimiters. Here’s another one that matches HTML comments:</p>\n<pre><code>str = str.replace(/(&#x3C;!\\-\\-([^\\-]|(\\-+[^>]))*\\-+>)/gm, '');\n</code></pre>\n<p>And here’s one for <code>CDATA</code> sections:</p>\n<pre><code>str = str.replace(/(&#x3C;\\!\\[CDATA\\[([^\\]]|(\\]+[^>]))*\\]+>)/gm, '');\n</code></pre>\n<h2>2. Using Replacement Callbacks</h2>\n<p>The <code>replace</code> function can also be <strong>passed a callback</strong> as its second parameter, and this is invaluable in cases where the replacement you want can’t be described in a simple expression. For example:</p>\n<pre><code>isocode = isocode.replace(/^([a-z]+)(\\-[a-z]+)?$/i, \n  function(match, lang, country)\n  {\n    return lang.toLowerCase() \n      + (country ? country.toUpperCase() : '');\n  });\n</code></pre>\n<p>That example normalizes the capitalisation in language codes — so <code>\"EN\"</code> would become <code>\"en\"</code>, while <code>\"en-us\"</code> would become <code>\"en-US\"</code>.</p>\n<p>The first argument that’s passed to the callback is always the complete match, then each subsequent argument corresponds with the backreferences (i.e. <code>arguments[1]</code> is what a string replacement would refer to as <code>$1</code>, and so on).</p>\n<p>So taking <code>\"en-us\"</code> as the input, we’d get the three arguments:</p>\n<ol start=\"0\">\n<li><code>\"en-us\"</code></li>\n<li><code>\"en\"</code></li>\n<li><code>\"-us\"</code></li>\n</ol>\n<p>Then all the function has to do is enforce the appropriate cases, re-combine the parts and return them. Whatever the callback returns is what the replacement itself returns.</p>\n<p>But we don’t actually have to assign the return value (or return at all), and if we don’t, then the original string will be unaffected. This means we can use <code>replace</code> as a <strong>general-purpose string processor</strong> — to extract data from a string without changing it.</p>\n<p>Here’s another example, that combines the multi-line comment expression from the previous section, with a callback that extracts and saves the text of each comment:</p>\n<pre><code>let comments = [];\nstr.replace(/(\\/\\*([^*]|(\\*+[^*\\/]))*\\*+\\/)/gm, \n  function(match)\n  {\n    comments.push(match);\n  });\n</code></pre>\n<p>Since nothing is returned, the original string remains unchanged. Although if we wanted to extract <em>and</em> remove the comments, we could simply return and assign an empty-string:</p>\n<pre><code>let comments = [];\nstr = str.replace(/(\\/\\*([^*]|(\\*+[^*\\/]))*\\*+\\/)/gm, \n  function(match)\n  {\n    comments.push(match);\n    return '';\n  });\n</code></pre>\n<h2>3. Working With Invisible Delimiters</h2>\n<p>Extracting content is all very well when it uses standard delimiters, but what if you’re using <strong>custom delimiters</strong> that only your program knows about? The problem there is that <strong>the string might already contain your delimiter</strong>, literally character for character, and then what do you?</p>\n<p>Well, recently I came up with a very cute trick, that not only avoids this problem, it’s also as simple to use as the single-character class we saw at the start! The trick is to use <strong>unicode characters that the document can’t contain</strong>.</p>\n<p>Originally I tried this with <em>undefined</em> characters, and that certainly worked, but it’s not safe to assume that any such character will always be undefined (or that the document won’t already contain it anyway). Then I discovered that Unicode actually reserves a set of code-points specifically for this kind of thing — so-called <a href=\"http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters\" title=\"Mapping of Unicode Characters (wikipedia.org)\">noncharacters</a>, which will never be used to define actual characters. A valid Unicode document is not allowed to contain noncharacters, but a program can use them internally for its own purposes.</p>\n<p>I was working on CSS processor, and I needed to remove all the comments before parsing the selectors, so they wouldn’t confuse the selector-matching expressions. But they had to be replaced in the source with something that took up the same number of lines, so that the line-numbers would remain accurate. Then later they would have to be added back to the source, for final output.</p>\n<p>So first we use a regex callback to extract and save the comments. The callback returns a copy of the match in which all non-whitespace is converted to space, and which is delimited with a noncharacter either side:</p>\n<pre><code>let comments = [];\ncsstext = csstext.replace(/(\\/\\*([^*]|(\\*+([^*\\/])))*\\*+\\/)/gm, \n  function(match)\n  {\n    comments.push(match);\n    return '\\ufddf' + match.replace(/[\\S]/gim, ' ') + '\\ufddf';\n  });\n</code></pre>\n<p>That creates an array of comments in the same source-order as the spaces they leave behind, while the spaces themselves take-up as many lines as the original comment.</p>\n<p>Then the originals can be restored simply by replacing each delimited space with its corresponding saved comment — and since the delimiters are single characters, we only need a <strong>simple character class</strong> to match each pair:</p>\n<pre><code>csstext = csstext.replace(/(\\ufddf[^\\ufddf]+\\ufddf)/gim, \n  function()\n  {\n    return comments.shift();\n  });\n</code></pre>\n<p>How easy is that!</p>"},{"url":"/docs/tips/insert-into-array/","relativePath":"docs/tips/insert-into-array.md","relativeDir":"docs/tips","base":"insert-into-array.md","name":"insert-into-array","frontmatter":{"title":"Insert Into Array","weight":0,"excerpt":"Insert Into Array","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Insert Into Array</h2>\n<p>We have some <code>in-built methods</code> to add at elements at the beginning and end of the array.</p>\n<p><code>push(value)</code> → Add an element to the end of the array.</p>\n<p><code>unshift(value)</code> → Add an element to the beginning of an array.</p>\n<p>To add an element to the specific index there is no method available in <code>Array</code> object. But we can use already available <code>splice</code> method in <code>Array</code> object to achieve this.</p>\n<p>An array starts from <code>index 0</code> ,So if we want to add an element as first element of the array , then the index of the element is <code>0</code> .If we want to add an element to <code>nth</code> position , then the index is <code>(n-1) th</code> index.</p>\n<p>MDN :    The splice() method changes the contents of an array by removing      or replacing existing elements and/or adding new elements, in the original array(which means the source array is modified)</p>\n<p><code>splice()</code> method takes three argument</p>\n<ol>\n<li>*start** → *The index at which to start changing the array.</li>\n<li>*deleteCount(optional) → *An integer indicating the number of elements in the array to remove from <code>start</code>.</li>\n<li>*(elem1, elem2 ...) → *The elements to add to the array, beginning from <code>start</code>. If you do not specify any elements, <code>splice()</code> will only remove elements from the array.</li>\n</ol>\n<p>In order to insert an element to the specific index , we need to provide arguments as</p>\n<ol>\n<li><code>start</code> → <code>index</code> where to insert the element</li>\n<li><code>deleteCount</code> → <code>0</code> (because we don't need to delete element)</li>\n<li><code>elem</code> → elements to insert</li>\n</ol>\n<p>Let's Write the function<br>\nfunction insertAt(array, index, ...elementsArray) { array.splice(index, 0, ...elements);}</p>\n<p>Now Let's call the function</p>\n<p>var num = [1,2,3,6,7,8];/*<br>\narguments\\</p>\n<ul>\n<li>\n<ol>\n<li>source array - num\\</li>\n</ol>\n</li>\n<li>\n<ol start=\"2\">\n<li>index to insert - 3\\</li>\n</ol>\n</li>\n<li>\n<ol start=\"3\">\n<li>remaining are elements to insert<br>\n*/insertAt(num, 3, 4, 5); // [1,2,3,4,5,6,7,8]<strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>____</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong>// let's try changing the indexvar num = [1,2,3,6,7,8];insertAt(numbers, 2, 4,5); // [1,2,4,5,3,6,7,8]</li>\n</ol>\n</li>\n</ul>"},{"url":"/docs/tips/sorting-strings/","relativePath":"docs/tips/sorting-strings.md","relativeDir":"docs/tips","base":"sorting-strings.md","name":"sorting-strings","frontmatter":{"title":"Sorting Strings","weight":0,"excerpt":"Sorting Strings","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>Javascript has a native method <strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\">sort</a></strong> that allows sorting arrays. Doing a simple <code>array.sort()</code> will treat each array entry as a string and sort it alphabetically. Also you can provide your <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters\">own custom sorting</a> function.</p>\n<pre><code class=\"language-javascript\">['Shanghai', 'New York', 'Mumbai', 'Buenos Aires'].sort();\n// [\"Buenos Aires\", \"Mumbai\", \"New York\", \"Shanghai\"]\n</code></pre>\n<p>But when you try order an array of non ASCII characters like this <code>['é', 'a', 'ú', 'c']</code>, you will obtain a strange result <code>['c', 'e', 'á', 'ú']</code>. That happens because sort works only with the English language.</p>\n<p>See the next example:</p>\n<pre><code class=\"language-javascript\">// Spanish\n['único', 'árbol', 'cosas', 'fútbol'].sort();\n// [\"cosas\", \"fútbol\", \"árbol\", \"único\"] // bad order\n\n// German\n['Woche', 'wöchentlich', 'wäre', 'Wann'].sort();\n// [\"Wann\", \"Woche\", \"wäre\", \"wöchentlich\"] // bad order\n</code></pre>\n<p>Fortunately, there are two ways to overcome this behavior <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare\">localeCompare</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator\">Intl.Collator</a> provided by ECMAScript Internationalization API.</p>\n<blockquote>\n<p>Both methods have their own custom parameters in order to configure it to work adequately.</p>\n</blockquote>\n<h3>Using <code>localeCompare()</code></h3>\n<pre><code class=\"language-javascript\">['único', 'árbol', 'cosas', 'fútbol'].sort(function (a, b) {\n    return a.localeCompare(b);\n});\n// [\"árbol\", \"cosas\", \"fútbol\", \"único\"]\n\n['Woche', 'wöchentlich', 'wäre', 'Wann'].sort(function (a, b) {\n    return a.localeCompare(b);\n});\n// [\"Wann\", \"wäre\", \"Woche\", \"wöchentlich\"]\n</code></pre>\n<h3>Using <code>Intl.Collator()</code></h3>\n<pre><code class=\"language-javascript\">['único', 'árbol', 'cosas', 'fútbol'].sort(Intl.Collator().compare);\n// [\"árbol\", \"cosas\", \"fútbol\", \"único\"]\n\n['Woche', 'wöchentlich', 'wäre', 'Wann'].sort(Intl.Collator().compare);\n// [\"Wann\", \"wäre\", \"Woche\", \"wöchentlich\"]\n</code></pre>\n<ul>\n<li>For each method you can customize the location.</li>\n<li>According to <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare#Performance\">Firefox</a> Intl.Collator is faster when comparing large numbers of strings.</li>\n</ul>\n<p>So when you are working with arrays of strings in a language other than English, remember to use this method to avoid unexpected sorting.</p>"},{"url":"/docs/tools/dev-utilities/","relativePath":"docs/tools/dev-utilities.md","relativeDir":"docs/tools","base":"dev-utilities.md","name":"dev-utilities","frontmatter":{"title":"General Utilities","weight":0,"excerpt":"General Utilities","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>General Utilities</h2>\n<br>\n<br>\n<br>\n<h1> Semvar Checker </h1>\n<br>\n<iframe src=\"https://semvar-checker-tool-beta.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Photo Editor   </h1>\n<br>\n<iframe src=\"https://onlinephotoeditor.goonlinetools.com/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Github HTML Render from link </h1>\n<br>\n<iframe src=\"https://githtmlpreview.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Form Builder GUI </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://fourm-builder-gui.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<h1> Border Builder </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://codepen.io/bgoonz/embed/zYwLVmb?default-tab=html%2Cresult\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h2>Archives</h2>\n<br>\n<br>\n<br>\n<h1> Original Blog Site </h1>\n<br>\n<iframe src=\"https://web-dev-resource-hub.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Ternary Converter   </h1>\n<br>\n<iframe src=\"https://ternary42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<iframe height=\"1000px\" width=\"1400px\" scrolling=\"yes\" title=\"Dashed Border Generator\" src=\"https://codepen.io/bgoonz/embed/preview/zYwLVmb?default-tab=result&editable=true&theme-id=dark\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n  See the Pen <a href=\"https://codepen.io/bgoonz/pen/zYwLVmb\">\n  Dashed Border Generator</a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>"},{"url":"/docs/tools/archive/","relativePath":"docs/tools/archive.md","relativeDir":"docs/tools","base":"archive.md","name":"archive","frontmatter":{"title":"Archive","weight":0,"excerpt":"more tools that I have created or collaborated on.","seo":{"title":"Embed Archive","description":"embeded developer tools and utilities","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Archive</h1>\n<iframe src=\"https://bgoonz-blog-v3-0.netlify.app/archive/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1> Archive</h1>\n<br>\n<iframe src=\"https://resourcerepo2.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n <iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\"  width=\"400\" height=\"575\"\n            src=\"https://bgoonz.blogspot.com/\"  \n           frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\n            encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>     Resource Archive           </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://resourcerepo2.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Google Drive</h1>\n<iframe src=\"https://drive.google.com/embeddedfolderview?id=1DHyQsPLziqSUODclplhnNX1eknzbZrL8#list\" style=\"width:100%; height:600px; border:0;\"></iframe>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>  Cloud Storage </h1>\n<br>\n<h2> Up to 1TB of cloud Storage for file sharing!</h2>\n<iframe src=\"https://onedrive.live.com/embed?cid=D21009FDD967A241&resid=D21009FDD967A241%21538729&authkey=AHSDSyoYqzg2K2E\" height=\"1000px\" width=\"1300px\">\n</iframe>\n<br>\n<br>\n<hr>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>    Internet Archive        </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://archive.org/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>   Lambda Student Site </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe class=\"inner\" src=\"https://lambda-resources.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>   Bass Station CSS Showcase</h1>\n<br>\n<br>\n<br>\n<br>\n<iframe class=\"inner\" src=\"https://bgoonz.github.io/bass-station/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1>  Interview     </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://web-dev-interview-prep-quiz-website.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>   Speach Recognition api </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://random-static-html-deploys.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>  The Algos Bgoonz Branch </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://thealgorithms.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>Markdown Templates</h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://markdown-templates-42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>CURL</h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz.github.io/everything-curl/index.html\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1> Text Tools     </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://devtools42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Ternary Converter   </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://ternary42.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>  Github HTML Render from link </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://githtmlpreview.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Form Builder GUI </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://fourm-builder-gui.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<h1> Border Builder </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://codepen.io/bgoonz/embed/zYwLVmb?default-tab=html%2Cresult\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h2>Archives</h2>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1> Original Blog Site </h1>\n<br>\n<br>\n<br>\n<br>\n<iframe src=\"https://web-dev-resource-hub.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>"},{"url":"/docs/tools/","relativePath":"docs/tools/index.md","relativeDir":"docs/tools","base":"index.md","name":"index","frontmatter":{"title":"Tools","excerpt":"See some interesting tools developed by the Web-Dev-Hubcommunity to help automate parts of your workflow.","seo":{"title":"Tools","description":"paste to markdown, excel table to markdown, excel to html, cloud storage, text manipulation, ternary converter, github html preview, form builder, border","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Tools","keyName":"property"},{"name":"og:description","value":"paste to markdown, excel table to markdown, excel to html, cloud storage, text manipulation, ternary converter, github html preview, form builder, border","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Tools"},{"name":"twitter:description","value":"This is the tools page"},{"name":"og:image","value":"images/tex.PNG","keyName":"property","relativeUrl":true}]},"template":"docs"},"html":"<br>\n<br>\n<h1>   Markdown tools  </h1>\n<br>\n<iframe src=\"https://random-static-html-deploys.netlify.app/markdow-tools-embed.html\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<iframe src=\"https://drive.google.com/embeddedfolderview?id=1DHyQsPLziqSUODclplhnNX1eknzbZrL8#grid\" style=\"width:100%; height:600px; border:0;\"></iframe>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> PDF Tools   </h1>\n<br>\n<iframe src=\"https://pdf-tools-xi.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<hr>\n<br>\n<hr>\n<br>\n<h1>  React Calculator  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://react-calculator2.vercel.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n<hr>\n<hr>\n<br>\n<h1>   Number Base Converter  </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://number-base-converter-react.vercel.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n                                                       \n<br>\n<br>\n  <h1>  Text Tools </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://devtools42.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>      \n        \n<h1>   Paste excel to HTML</h1>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://codepen.io/bgoonz/embed/JjNaPpL?default-tab=result&theme-id=light\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>Awesome Search</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://search-awesome.vercel.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\"  src=\"https://resourcerepo2.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>  Github HTML Render from link </h1>\n<br>\n<iframe src=\"https://githtmlpreview.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1> Form Builder GUI </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://fourm-builder-gui.netlify.app/\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<!-- <br>\n<h1> Border Builder </h1>\n<br>\n\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" src=\"https://random-static-html-deploys.netlify.app/web-speech-api-master/speak-easy-synthesis/index.html\" height=\"1000px\" style=\"width: 1300px; scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n -->\n<br>\n<br>\n<h1>                </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://ds-algo-official.netlify.app/\" height=\"800px\" style=\"width: 100%;\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n        \n        \n        \n<br>\n<br>\n<br>\n<h1>                </h1>\n<br>\n        \n        \n <iframe height=\"800\" style=\"width: 100%;\" scrolling=\"yes\" title=\"Simple Typing Carousel \" src=\"https://codepen.io/bgoonz/embed/ExZvGoZ?default-tab=html%2Cresult\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\">\n  See the Pen <a href=\"https://codepen.io/bgoonz/pen/ExZvGoZ\">\n  Simple Typing Carousel </a> by Bryan C Guner (<a href=\"https://codepen.io/bgoonz\">@bgoonz</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>"},{"url":"/docs/tools/markdown-html/","relativePath":"docs/tools/markdown-html.md","relativeDir":"docs/tools","base":"markdown-html.md","name":"markdown-html","frontmatter":{"title":"md and html","weight":0,"excerpt":"Tools For Markdown & Html","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Tools For Markdown &#x26; Html</h2>\n<br>\n<br>\n<br>\n<br>\n<h1>   Paste To Markdown </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://euangoddard.github.io/clipboard2markdown/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n        \n        \n   \n<br>\n<br>\n<h1>   Paste Excel Tabel To Markdown </h1>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://codepen.io/bgoonz/embed/JjNaPpL?default-tab=result&theme-id=light\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>Paste excel to HTML</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://pedantic-wing-adbf82.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<h1>Html To Markdown Converter</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz.github.io/html-2-md-converter/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>"},{"url":"/docs/tutorials/how-to-use-google-sheets-as-cms/","relativePath":"docs/tutorials/how-to-use-google-sheets-as-cms.md","relativeDir":"docs/tutorials","base":"how-to-use-google-sheets-as-cms.md","name":"how-to-use-google-sheets-as-cms","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>Etiam facilisis lacus nec pretium lobortis. Praesent dapibus justo non efficitur efficitur. Nullam viverra justo arcu, eget egestas tortor pretium id. Sed imperdiet mattis eleifend. Vivamus suscipit et neque imperdiet venenatis.</p>\n<blockquote>\n<p>Vestibulum ullamcorper risus auctor eleifend consequat.</p>\n</blockquote>\n<p><img src=\"https://assets.stackbit.com/components/images/default/post-4.jpeg\" alt=\"Placeholder Image\"></p>\n<p>In malesuada sed urna eget vehicula. Donec fermentum tortor sit amet nisl elementum fringilla. Pellentesque dapibus suscipit faucibus. Nullam malesuada sed urna quis rutrum. Donec facilisis lorem id maximus mattis. Vestibulum quis elit magna. Vestibulum accumsan blandit consequat. Phasellus quis posuere quam.</p>\n<p>Vivamus mollis in tellus ac ullamcorper. Vestibulum sit amet bibendum ipsum, vitae rutrum ex. Nullam cursus, urna et dapibus aliquam, urna leo euismod metus, eu luctus justo mi eget mauris. Proin felis leo, volutpat et purus in, lacinia luctus eros. Pellentesque lobortis massa scelerisque lorem ullamcorper, sit amet elementum nulla scelerisque. In volutpat efficitur nulla, aliquam ornare lectus ultricies ac. Mauris sagittis ornare dictum. Nulla vel felis ut purus fermentum pretium. Sed id lectus ac diam aliquet venenatis. Etiam ac auctor enim. Nunc velit mauris, viverra vel orci ut, egestas rhoncus diam. Morbi scelerisque nibh tellus, vel varius urna malesuada sed. Etiam ultricies sem consequat, posuere urna non, maximus ex. Mauris gravida diam sed augue condimentum pulvinar vel ac dui. Integer vel convallis justo.</p>"},{"url":"/docs/tutorials/enviorment-setup/","relativePath":"docs/tutorials/enviorment-setup.md","relativeDir":"docs/tutorials","base":"enviorment-setup.md","name":"enviorment-setup","frontmatter":{"title":"Basic Bash Proficiency","weight":0,"excerpt":null,"seo":{"title":"","description":"bash shell tutorial","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Basic Bash Proficiency:</h1>\n<h2>Everyday use</h2>\n<ul>\n<li>In Bash, use <strong>Tab</strong> to complete arguments or list all available commands and <strong>ctrl-r</strong> to search through command history (after pressing, type to search, press <strong>ctrl-r</strong> repeatedly to cycle through more matches, press <strong>Enter</strong> to execute the found command, or hit the right arrow to put the result in the current line to allow editing).</li>\n<li>In Bash, use <strong>ctrl-w</strong> to delete the last word, and <strong>ctrl-u</strong> to delete the content from current cursor back to the start of the line. Use <strong>alt-b</strong> and <strong>alt-f</strong> to move by word, <strong>ctrl-a</strong> to move cursor to beginning of line,  <strong>ctrl-e</strong> to move cursor to end of line, <strong>ctrl-k</strong> to kill to the end of the line, <strong>ctrl-l</strong> to clear the screen. See <code>man readline</code> for all the default keybindings in Bash. There are a lot. For example <strong>alt-.</strong> cycles through previous arguments, and <strong>alt-*</strong> expands a glob.</li>\n<li>Alternatively, if you love vi-style key-bindings, use <code>set -o vi</code> (and <code>set -o emacs</code> to put it back).</li>\n<li>For editing long commands, after setting your editor (for example <code>export EDITOR=vim</code>), <strong>ctrl-x</strong> <strong>ctrl-e</strong> will open the current command in an editor for multi-line editing. Or in vi style, <strong>escape-v</strong>.</li>\n<li>To see recent commands, use <code>history</code>. Follow with <code>!n</code> (where <code>n</code> is the command number) to execute again. There are also many abbreviations you can use, the most useful probably being <code>!$</code> for last argument and <code>!!</code> for last command (see \"HISTORY EXPANSION\" in the man page). However, these are often easily replaced with <strong>ctrl-r</strong> and <strong>alt-.</strong>.</li>\n<li>Go to your home directory with <code>cd</code>. Access files relative to your home directory with the <code>~</code> prefix (e.g. <code>~/.bashrc</code>). In <code>sh</code> scripts refer to the home directory as <code>$HOME</code>.</li>\n<li>To go back to the previous working directory: <code>cd -</code>.</li>\n<li>If you are halfway through typing a command but change your mind, hit <strong>alt-#</strong> to add a <code>#</code> at the beginning and enter it as a comment (or use <strong>ctrl-a</strong>, <strong>#</strong>, <strong>enter</strong>). You can then return to it later via command history.</li>\n<li>\n<p>Use <code>xargs</code> (or <code>parallel</code>). It's very powerful. Note you can control how many items execute per line (<code>-L</code>) as well as parallelism (<code>-P</code>). If you're not sure if it'll do the right thing, use <code>xargs echo</code> first. Also, <code>-I{}</code> is handy. Examples:</p>\n<pre><code class=\"language-bash\">  find . -name '*.py' | xargs grep some_function\n  cat hosts | xargs -I{} ssh root@{} hostname\n</code></pre>\n</li>\n<li><code>pstree -p</code> is a helpful display of the process tree.</li>\n<li>Use <code>pgrep</code> and <code>pkill</code> to find or signal processes by name (<code>-f</code> is helpful).</li>\n<li>Know the various signals you can send processes. For example, to suspend a process, use <code>kill -STOP [pid]</code>. For the full list, see <code>man 7 signal</code></li>\n<li>Use <code>nohup</code> or <code>disown</code> if you want a background process to keep running forever.</li>\n<li>Check what processes are listening via <code>netstat -lntp</code> or <code>ss -plat</code> (for TCP; add <code>-u</code> for UDP) or <code>lsof -iTCP -sTCP:LISTEN -P -n</code> (which also works on macOS).</li>\n<li>See also <code>lsof</code> and <code>fuser</code> for open sockets and files.</li>\n<li>See <code>uptime</code> or <code>w</code> to know how long the system has been running.</li>\n<li>Use <code>alias</code> to create shortcuts for commonly used commands. For example, <code>alias ll='ls -latr'</code> creates a new alias <code>ll</code>.</li>\n<li>Save aliases, shell settings, and functions you commonly use in <code>~/.bashrc</code>, and <a href=\"http://superuser.com/a/183980/7106\">arrange for login shells to source it</a>. This will make your setup available in all your shell sessions.</li>\n<li>Put the settings of environment variables as well as commands that should be executed when you login in <code>~/.bash_profile</code>. Separate configuration will be needed for shells you launch from graphical environment logins and <code>cron</code> jobs.</li>\n<li>Synchronize your configuration files (e.g. <code>.bashrc</code> and <code>.bash_profile</code>) among various computers with Git.</li>\n<li>Understand that care is needed when variables and filenames include whitespace. Surround your Bash variables with quotes, e.g. <code>\"$FOO\"</code>. Prefer the <code>-0</code> or <code>-print0</code> options to enable null characters to delimit filenames, e.g. <code>locate -0 pattern | xargs -0 ls -al</code> or <code>find / -print0 -type d | xargs -0 ls -al</code>. To iterate on filenames containing whitespace in a for loop, set your IFS to be a newline only using <code>IFS=$'\\n'</code>.</li>\n<li>\n<p>In Bash scripts, use <code>set -x</code> (or the variant <code>set -v</code>, which logs raw input, including unexpanded variables and comments) for debugging output. Use strict modes unless you have a good reason not to: Use <code>set -e</code> to abort on errors (nonzero exit code). Use <code>set -u</code> to detect unset variable usages. Consider <code>set -o pipefail</code> too, to abort on errors within pipes (though read up on it more if you do, as this topic is a bit subtle). For more involved scripts, also use <code>trap</code> on EXIT or ERR. A useful habit is to start a script like this, which will make it detect and abort on common errors and print a message:</p>\n<pre><code class=\"language-bash\">  set -euo pipefail\n  trap \"echo 'error: Script failed: see failed command above'\" ERR\n</code></pre>\n</li>\n<li>\n<p>In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory, e.g.</p>\n<pre><code class=\"language-bash\">  # do something in current dir\n  (cd /some/other/dir &#x26;&#x26; other-command)\n  # continue in original dir\n</code></pre>\n</li>\n<li>In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: <code>${name:?error message}</code>. For example, if a Bash script requires a single argument, just write <code>input_file=${1:?usage: $0 input_file}</code>. Using a default value if a variable is empty: <code>${name:-default}</code>. If you want to have an additional (optional) parameter added to the previous example, you can use something like <code>output_file=${2:-logfile}</code>. If <code>$2</code> is omitted and thus empty, <code>output_file</code> will be set to <code>logfile</code>. Arithmetic expansion: <code>i=$(( (i + 1) % 5 ))</code>. Sequences: <code>{1..10}</code>. Trimming of strings: <code>${var%suffix}</code> and <code>${var#prefix}</code>. For example if <code>var=foo.pdf</code>, then <code>echo ${var%.pdf}.txt</code> prints <code>foo.txt</code>.</li>\n<li>Brace expansion using <code>{</code>...<code>}</code> can reduce having to re-type similar text and automate combinations of items.  This is helpful in examples like <code>mv foo.{txt,pdf} some-dir</code> (which moves both files), <code>cp somefile{,.bak}</code> (which expands to <code>cp somefile somefile.bak</code>) or <code>mkdir -p test-{a,b,c}/subtest-{1,2,3}</code> (which expands all possible combinations and creates a directory tree). Brace expansion is performed before any other expansion.</li>\n<li>The order of expansions is: brace expansion; tilde expansion, parameter and variable expansion, arithmetic expansion, and command substitution (done in a left-to-right fashion); word splitting; and filename expansion. (For example, a range like <code>{1..20}</code> cannot be expressed with variables using <code>{$a..$b}</code>. Use <code>seq</code> or a <code>for</code> loop instead, e.g., <code>seq $a $b</code> or <code>for((i=a; i&#x3C;=b; i++)); do ... ; done</code>.)</li>\n<li>\n<p>The output of a command can be treated like a file via <code>&#x3C;(some command)</code> (known as process substitution). For example, compare local <code>/etc/hosts</code> with a remote one:</p>\n<pre><code class=\"language-sh\">  diff /etc/hosts &#x3C;(ssh somehost cat /etc/hosts)\n</code></pre>\n</li>\n<li>\n<p>When writing scripts you may want to put all of your code in curly braces. If the closing brace is missing, your script will be prevented from executing due to a syntax error. This makes sense when your script is going to be downloaded from the web, since it prevents partially downloaded scripts from executing:</p>\n<pre><code class=\"language-bash\">{\n  # Your code here\n}\n</code></pre>\n</li>\n<li>\n<p>A \"here document\" allows <a href=\"https://www.tldp.org/LDP/abs/html/here-docs.html\">redirection of multiple lines of input</a> as if from a file:</p>\n<pre><code>cat &#x3C;&#x3C;EOF\ninput\non multiple lines\nEOF\n</code></pre>\n</li>\n<li>In Bash, redirect both standard output and standard error via: <code>some-command >logfile 2>&#x26;1</code> or <code>some-command &#x26;>logfile</code>. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add <code>&#x3C;/dev/null</code>.</li>\n<li>Use <code>man ascii</code> for a good ASCII table, with hex and decimal values. For general encoding info, <code>man unicode</code>, <code>man utf-8</code>, and <code>man latin1</code> are helpful.</li>\n<li>Use <code>screen</code> or <a href=\"https://tmux.github.io/\"><code>tmux</code></a> to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. <code>byobu</code> can enhance screen or tmux by providing more information and easier management. A more minimal alternative for session persistence only is <a href=\"https://github.com/bogner/dtach\"><code>dtach</code></a>.</li>\n<li>In ssh, knowing how to port tunnel with <code>-L</code> or <code>-D</code> (and occasionally <code>-R</code>) is useful, e.g. to access web sites from a remote server.</li>\n<li>\n<p>It can be useful to make a few optimizations to your ssh configuration; for example, this <code>~/.ssh/config</code> contains settings to avoid dropped connections in certain network environments, uses compression (which is helpful with scp over low-bandwidth connections), and multiplex channels to the same server with a local control file:</p>\n<pre><code>  TCPKeepAlive=yes\n  ServerAliveInterval=15\n  ServerAliveCountMax=6\n  Compression=yes\n  ControlMaster auto\n  ControlPath /tmp/%r@%h:%p\n  ControlPersist yes\n</code></pre>\n</li>\n<li>A few other options relevant to ssh are security sensitive and should be enabled with care, e.g. per subnet or host or in trusted networks: <code>StrictHostKeyChecking=no</code>, <code>ForwardAgent=yes</code></li>\n<li>Consider <a href=\"https://mosh.mit.edu/\"><code>mosh</code></a> an alternative to ssh that uses UDP, avoiding dropped connections and adding convenience on the road (requires server-side setup).</li>\n<li>\n<p>To get the permissions on a file in octal form, which is useful for system configuration but not available in <code>ls</code> and easy to bungle, use something like</p>\n<pre><code class=\"language-sh\">  stat -c '%A %a %n' /etc/timezone\n</code></pre>\n</li>\n<li>For interactive selection of values from the output of another command, use <a href=\"https://github.com/mooz/percol\"><code>percol</code></a> or <a href=\"https://github.com/junegunn/fzf\"><code>fzf</code></a>.</li>\n<li>For interaction with files based on the output of another command (like <code>git</code>), use <code>fpp</code> (<a href=\"https://github.com/facebook/PathPicker\">PathPicker</a>).</li>\n<li>For a simple web server for all files in the current directory (and subdirs), available to anyone on your network, use:\n<code>python -m SimpleHTTPServer 7777</code> (for port 7777 and Python 2) and <code>python -m http.server 7777</code> (for port 7777 and Python 3).</li>\n<li>For running a command as another user, use <code>sudo</code>. Defaults to running as root; use <code>-u</code> to specify another user. Use <code>-i</code> to login as that user (you will be asked for <em>your</em> password).</li>\n<li>For switching the shell to another user, use <code>su username</code> or <code>su - username</code>. The latter with \"-\" gets an environment as if another user just logged in. Omitting the username defaults to root. You will be asked for the password <em>of the user you are switching to</em>.</li>\n<li>Know about the <a href=\"https://wiki.debian.org/CommonErrorMessages/ArgumentListTooLong\">128K limit</a> on command lines. This \"Argument list too long\" error is common when wildcard matching large numbers of files. (When this happens alternatives like <code>find</code> and <code>xargs</code> may help.)</li>\n<li>\n<p>For a basic calculator (and of course access to Python in general), use the <code>python</code> interpreter. For example,</p>\n<pre><code>>>> 2+3\n5\n</code></pre>\n</li>\n</ul>\n<h2>Processing files and data</h2>\n<ul>\n<li>To locate a file by name in the current directory, <code>find . -iname '*something*'</code> (or similar). To find a file anywhere by name, use <code>locate something</code> (but bear in mind <code>updatedb</code> may not have indexed recently created files).</li>\n<li>For general searching through source or data files, there are several options more advanced or faster than <code>grep -r</code>, including (in rough order from older to newer) <a href=\"https://github.com/beyondgrep/ack2\"><code>ack</code></a>, <a href=\"https://github.com/ggreer/the_silver_searcher\"><code>ag</code></a> (\"the silver searcher\"), and <a href=\"https://github.com/BurntSushi/ripgrep\"><code>rg</code></a> (ripgrep).</li>\n<li>To convert HTML to text: <code>lynx -dump -stdin</code></li>\n<li>For Markdown, HTML, and all kinds of document conversion, try <a href=\"http://pandoc.org/\"><code>pandoc</code></a>. For example, to convert a Markdown document to Word format: <code>pandoc README.md --from markdown --to docx -o temp.docx</code></li>\n<li>If you must handle XML, <code>xmlstarlet</code> is old but good.</li>\n<li>For JSON, use <a href=\"http://stedolan.github.io/jq/\"><code>jq</code></a>. For interactive use, also see <a href=\"https://github.com/simeji/jid\"><code>jid</code></a> and <a href=\"https://github.com/fiatjaf/jiq\"><code>jiq</code></a>.</li>\n<li>For YAML, use <a href=\"https://github.com/0k/shyaml\"><code>shyaml</code></a>.</li>\n<li>For Excel or CSV files, <a href=\"https://github.com/onyxfish/csvkit\">csvkit</a> provides <code>in2csv</code>, <code>csvcut</code>, <code>csvjoin</code>, <code>csvgrep</code>, etc.</li>\n<li>For Amazon S3, <a href=\"https://github.com/s3tools/s3cmd\"><code>s3cmd</code></a> is convenient and <a href=\"https://github.com/bloomreach/s4cmd\"><code>s4cmd</code></a> is faster. Amazon's <a href=\"https://github.com/aws/aws-cli\"><code>aws</code></a> and the improved <a href=\"https://github.com/donnemartin/saws\"><code>saws</code></a> are essential for other AWS-related tasks.</li>\n<li>Know about <code>sort</code> and <code>uniq</code>, including uniq's <code>-u</code> and <code>-d</code> options -- see one-liners below. See also <code>comm</code>.</li>\n<li>Know about <code>cut</code>, <code>paste</code>, and <code>join</code> to manipulate text files. Many people use <code>cut</code> but forget about <code>join</code>.</li>\n<li>Know about <code>wc</code> to count newlines (<code>-l</code>), characters (<code>-m</code>), words (<code>-w</code>) and bytes (<code>-c</code>).</li>\n<li>Know about <code>tee</code> to copy from stdin to a file and also to stdout, as in <code>ls -al | tee file.txt</code>.</li>\n<li>For more complex calculations, including grouping, reversing fields, and statistical calculations, consider <a href=\"https://www.gnu.org/software/datamash/\"><code>datamash</code></a>.</li>\n<li>Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set <code>LANG</code> or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run <em>many times</em> slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using <code>export LC_ALL=C</code>.</li>\n<li>You can set a specific command's environment by prefixing its invocation with the environment variable settings, as in <code>TZ=Pacific/Fiji date</code>.</li>\n<li>Know basic <code>awk</code> and <code>sed</code> for simple data munging. See <a href=\"#one-liners\">One-liners</a> for examples.</li>\n<li>\n<p>To replace all occurrences of a string in place, in one or more files:</p>\n<pre><code class=\"language-sh\">  perl -pi.bak -e 's/old-string/new-string/g' my-files-*.txt\n</code></pre>\n</li>\n<li>\n<p>To rename multiple files and/or search and replace within files, try <a href=\"https://github.com/jlevy/repren\"><code>repren</code></a>. (In some cases the <code>rename</code> command also allows multiple renames, but be careful as its functionality is not the same on all Linux distributions.)</p>\n<pre><code class=\"language-sh\">  # Full rename of filenames, directories, and contents foo -> bar:\n  repren --full --preserve-case --from foo --to bar .\n  # Recover backup files whatever.bak -> whatever:\n  repren --renames --from '(.*)\\.bak' --to '\\1' *.bak\n  # Same as above, using rename, if available:\n  rename 's/\\.bak$//' *.bak\n</code></pre>\n</li>\n<li>\n<p>As the man page says, <code>rsync</code> really is a fast and extraordinarily versatile file copying tool. It's known for synchronizing between machines but is equally useful locally. When security restrictions allow, using <code>rsync</code> instead of <code>scp</code> allows recovery of a transfer without restarting from scratch. It also is among the <a href=\"https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html\">fastest ways</a> to delete large numbers of files:</p>\n<pre><code class=\"language-sh\">mkdir empty &#x26;&#x26; rsync -r --delete empty/ some-dir &#x26;&#x26; rmdir some-dir\n</code></pre>\n</li>\n<li>For monitoring progress when processing files, use <a href=\"http://www.ivarch.com/programs/pv.shtml\"><code>pv</code></a>, <a href=\"https://github.com/dmerejkowsky/pycp\"><code>pycp</code></a>, <a href=\"https://github.com/dspinellis/pmonitor\"><code>pmonitor</code></a>, <a href=\"https://github.com/Xfennec/progress\"><code>progress</code></a>, <code>rsync --progress</code>, or, for block-level copying, <code>dd status=progress</code>.</li>\n<li>Use <code>shuf</code> to shuffle or select random lines from a file.</li>\n<li>Know <code>sort</code>'s options. For numbers, use <code>-n</code>, or <code>-h</code> for handling human-readable numbers (e.g. from <code>du -h</code>). Know how keys work (<code>-t</code> and <code>-k</code>). In particular, watch out that you need to write <code>-k1,1</code> to sort by only the first field; <code>-k1</code> means sort according to the whole line. Stable sort (<code>sort -s</code>) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use <code>sort -k1,1 | sort -s -k2,2</code>.</li>\n<li>If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press <strong>ctrl-v</strong> <strong>[Tab]</strong> or write <code>$'\\t'</code> (the latter is better as you can copy/paste it).</li>\n<li>The standard tools for patching source code are <code>diff</code> and <code>patch</code>. See also <code>diffstat</code> for summary statistics of a diff and <code>sdiff</code> for a side-by-side diff. Note <code>diff -r</code> works for entire directories. Use <code>diff -r tree1 tree2 | diffstat</code> for a summary of changes. Use <code>vimdiff</code> to compare and edit files.</li>\n<li>For binary files, use <code>hd</code>, <code>hexdump</code> or <code>xxd</code> for simple hex dumps and <code>bvi</code>, <code>hexedit</code> or <code>biew</code> for binary editing.</li>\n<li>Also for binary files, <code>strings</code> (plus <code>grep</code>, etc.) lets you find bits of text.</li>\n<li>For binary diffs (delta compression), use <code>xdelta3</code>.</li>\n<li>\n<p>To convert text encodings, try <code>iconv</code>. Or <code>uconv</code> for more advanced use; it supports some advanced Unicode things. For example:</p>\n<pre><code class=\"language-sh\">  # Displays hex codes or actual names of characters (useful for debugging):\n  uconv -f utf-8 -t utf-8 -x '::Any-Hex;' &#x3C; input.txt\n  uconv -f utf-8 -t utf-8 -x '::Any-Name;' &#x3C; input.txt\n  # Lowercase and removes all accents (by expanding and dropping them):\n  uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC;' &#x3C; input.txt > output.txt\n</code></pre>\n</li>\n<li>To split files into pieces, see <code>split</code> (to split by size) and <code>csplit</code> (to split by a pattern).</li>\n<li>Date and time: To get the current date and time in the helpful <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format, use <code>date -u +\"%Y-%m-%dT%H:%M:%SZ\"</code> (other options <a href=\"https://stackoverflow.com/questions/7216358/date-command-on-os-x-doesnt-have-iso-8601-i-option\">are</a> <a href=\"https://unix.stackexchange.com/questions/164826/date-command-iso-8601-option\">problematic</a>). To manipulate date and time expressions, use <code>dateadd</code>, <code>datediff</code>, <code>strptime</code> etc. from <a href=\"http://www.fresse.org/dateutils/\"><code>dateutils</code></a>.</li>\n<li>Use <code>zless</code>, <code>zmore</code>, <code>zcat</code>, and <code>zgrep</code> to operate on compressed files.</li>\n<li>File attributes are settable via <code>chattr</code> and offer a lower-level alternative to file permissions. For example, to protect against accidental file deletion the immutable flag:  <code>sudo chattr +i /critical/directory/or/file</code></li>\n<li>\n<p>Use <code>getfacl</code> and <code>setfacl</code> to save and restore file permissions. For example:</p>\n<pre><code class=\"language-sh\">getfacl -R /some/path > permissions.txt\nsetfacl --restore=permissions.txt\n</code></pre>\n</li>\n<li>To create empty files quickly, use <code>truncate</code> (creates <a href=\"https://en.wikipedia.org/wiki/Sparse_file\">sparse file</a>), <code>fallocate</code> (ext4, xfs, btrfs and ocfs2 filesystems), <code>xfs_mkfile</code> (almost any filesystems, comes in xfsprogs package), <code>mkfile</code> (for Unix-like systems like Solaris, Mac OS).</li>\n</ul>\n<h2>System debugging</h2>\n<ul>\n<li>For web debugging, <code>curl</code> and <code>curl -I</code> are handy, or their <code>wget</code> equivalents, or the more modern <a href=\"https://github.com/jkbrzt/httpie\"><code>httpie</code></a>.</li>\n<li>To know current cpu/disk status, the classic tools are <code>top</code> (or the better <code>htop</code>), <code>iostat</code>, and <code>iotop</code>. Use <code>iostat -mxz 15</code> for basic CPU and detailed per-partition disk stats and performance insight.</li>\n<li>For network connection details, use <code>netstat</code> and <code>ss</code>.</li>\n<li>For a quick overview of what's happening on a system, <code>dstat</code> is especially useful. For broadest overview with details, use <a href=\"https://github.com/nicolargo/glances\"><code>glances</code></a>.</li>\n<li>To know memory status, run and understand the output of <code>free</code> and <code>vmstat</code>. In particular, be aware the \"cached\" value is memory held by the Linux kernel as file cache, so effectively counts toward the \"free\" value.</li>\n<li>Java system debugging is a different kettle of fish, but a simple trick on Oracle's and some other JVMs is that you can run <code>kill -3 &#x3C;pid></code> and a full stack trace and heap summary (including generational garbage collection details, which can be highly informative) will be dumped to stderr/logs. The JDK's <code>jps</code>, <code>jstat</code>, <code>jstack</code>, <code>jmap</code> are useful. <a href=\"https://github.com/aragozin/jvm-tools\">SJK tools</a> are more advanced.</li>\n<li>Use <a href=\"http://www.bitwizard.nl/mtr/\"><code>mtr</code></a> as a better traceroute, to identify network issues.</li>\n<li>For looking at why a disk is full, <a href=\"https://dev.yorhel.nl/ncdu\"><code>ncdu</code></a> saves time over the usual commands like <code>du -sh *</code>.</li>\n<li>To find which socket or process is using bandwidth, try <a href=\"http://www.ex-parrot.com/~pdw/iftop/\"><code>iftop</code></a> or <a href=\"https://github.com/raboof/nethogs\"><code>nethogs</code></a>.</li>\n<li>The <code>ab</code> tool (comes with Apache) is helpful for quick-and-dirty checking of web server performance. For more complex load testing, try <code>siege</code>.</li>\n<li>For more serious network debugging, <a href=\"https://wireshark.org/\"><code>wireshark</code></a>, <a href=\"https://www.wireshark.org/docs/wsug_html_chunked/AppToolstshark.html\"><code>tshark</code></a>, or <a href=\"http://ngrep.sourceforge.net/\"><code>ngrep</code></a>.</li>\n<li>Know about <code>strace</code> and <code>ltrace</code>. These can be helpful if a program is failing, hanging, or crashing, and you don't know why, or if you want to get a general idea of performance. Note the profiling option (<code>-c</code>), and the ability to attach to a running process (<code>-p</code>). Use trace child option (<code>-f</code>) to avoid missing important calls.</li>\n<li>Know about <code>ldd</code> to check shared libraries etc — but <a href=\"http://www.catonmat.net/blog/ldd-arbitrary-code-execution/\">never run it on untrusted files</a>.</li>\n<li>Know how to connect to a running process with <code>gdb</code> and get its stack traces.</li>\n<li>Use <code>/proc</code>. It's amazingly helpful sometimes when debugging live problems. Examples: <code>/proc/cpuinfo</code>, <code>/proc/meminfo</code>, <code>/proc/cmdline</code>, <code>/proc/xxx/cwd</code>, <code>/proc/xxx/exe</code>, <code>/proc/xxx/fd/</code>, <code>/proc/xxx/smaps</code> (where <code>xxx</code> is the process id or pid).</li>\n<li>When debugging why something went wrong in the past, <a href=\"http://sebastien.godard.pagesperso-orange.fr/\"><code>sar</code></a> can be very helpful. It shows historic statistics on CPU, memory, network, etc.</li>\n<li>For deeper systems and performance analyses, look at <code>stap</code> (<a href=\"https://sourceware.org/systemtap/wiki\">SystemTap</a>), <a href=\"https://en.wikipedia.org/wiki/Perf_%28Linux%29\"><code>perf</code></a>, and <a href=\"https://github.com/draios/sysdig\"><code>sysdig</code></a>.</li>\n<li>Check what OS you're on with <code>uname</code> or <code>uname -a</code> (general Unix/kernel info) or <code>lsb_release -a</code> (Linux distro info).</li>\n<li>Use <code>dmesg</code> whenever something's acting really funny (it could be hardware or driver issues).</li>\n<li>If you delete a file and it doesn't free up expected disk space as reported by <code>du</code>, check whether the file is in use by a process:\n<code>lsof | grep deleted | grep \"filename-of-my-big-file\"</code></li>\n</ul>\n<h2>One-liners</h2>\n<p>A few examples of piecing together commands:</p>\n<ul>\n<li>\n<p>It is remarkably helpful sometimes that you can do set intersection, union, and difference of text files via <code>sort</code>/<code>uniq</code>. Suppose <code>a</code> and <code>b</code> are text files that are already uniqued. This is fast, and works on files of arbitrary size, up to many gigabytes. (Sort is not limited by memory, though you may need to use the <code>-T</code> option if <code>/tmp</code> is on a small root partition.) See also the note about <code>LC_ALL</code> above and <code>sort</code>'s <code>-u</code> option (left out for clarity below).</p>\n<pre><code class=\"language-sh\">  sort a b | uniq > c   # c is a union b\n  sort a b | uniq -d > c   # c is a intersect b\n  sort a b b | uniq -u > c   # c is set difference a - b\n</code></pre>\n</li>\n<li>\n<p>Pretty-print two JSON files, normalizing their syntax, then coloring and paginating the result:</p>\n<pre><code>  diff &#x3C;(jq --sort-keys . &#x3C; file1.json) &#x3C;(jq --sort-keys . &#x3C; file2.json) | colordiff | less -R\n</code></pre>\n</li>\n<li>Use <code>grep . *</code> to quickly examine the contents of all files in a directory (so each line is paired with the filename), or <code>head -100 *</code> (so each file has a heading). This can be useful for directories filled with config settings like those in <code>/sys</code>, <code>/proc</code>, <code>/etc</code>.</li>\n<li>\n<p>Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python):</p>\n<pre><code class=\"language-sh\">  awk '{ x += $3 } END { print x }' myfile\n</code></pre>\n</li>\n<li>\n<p>To see sizes/dates on a tree of files, this is like a recursive <code>ls -l</code> but is easier to read than <code>ls -lR</code>:</p>\n<pre><code class=\"language-sh\">  find . -type f -ls\n</code></pre>\n</li>\n<li>\n<p>Say you have a text file, like a web server log, and a certain value that appears on some lines, such as an <code>acct_id</code> parameter that is present in the URL. If you want a tally of how many requests for each <code>acct_id</code>:</p>\n<pre><code class=\"language-sh\">  egrep -o 'acct_id=[0-9]+' access.log | cut -d= -f2 | sort | uniq -c | sort -rn\n</code></pre>\n</li>\n<li>To continuously monitor changes, use <code>watch</code>, e.g. check changes to files in a directory with <code>watch -d -n 2 'ls -rtlh | tail'</code> or to network settings while troubleshooting your wifi settings with <code>watch -d -n 2 ifconfig</code>.</li>\n<li>\n<p>Run this function to get a random tip from this document (parses Markdown and extracts an item):</p>\n<pre><code class=\"language-sh\">  function taocl() {\n    curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md |\n      sed '/cowsay[.]png/d' |\n      pandoc -f markdown -t html |\n      xmlstarlet fo --html --dropdtd |\n      xmlstarlet sel -t -v \"(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]\" |\n      xmlstarlet unesc | fmt -80 | iconv -t US\n  }\n</code></pre>\n</li>\n</ul>\n<h2>Obscure but useful</h2>\n<ul>\n<li><code>expr</code>: perform arithmetic or boolean operations or evaluate regular expressions</li>\n<li><code>m4</code>: simple macro processor</li>\n<li><code>yes</code>: print a string a lot</li>\n<li><code>cal</code>: nice calendar</li>\n<li><code>env</code>: run a command (useful in scripts)</li>\n<li><code>printenv</code>: print out environment variables (useful in debugging and scripts)</li>\n<li><code>look</code>: find English words (or lines in a file) beginning with a string</li>\n<li><code>cut</code>, <code>paste</code> and <code>join</code>: data manipulation</li>\n<li><code>fmt</code>: format text paragraphs</li>\n<li><code>pr</code>: format text into pages/columns</li>\n<li><code>fold</code>: wrap lines of text</li>\n<li><code>column</code>: format text fields into aligned, fixed-width columns or tables</li>\n<li><code>expand</code> and <code>unexpand</code>: convert between tabs and spaces</li>\n<li><code>nl</code>: add line numbers</li>\n<li><code>seq</code>: print numbers</li>\n<li><code>bc</code>: calculator</li>\n<li><code>factor</code>: factor integers</li>\n<li><a href=\"https://gnupg.org/\"><code>gpg</code></a>: encrypt and sign files</li>\n<li><code>toe</code>: table of terminfo entries</li>\n<li><code>nc</code>: network debugging and data transfer</li>\n<li><code>socat</code>: socket relay and tcp port forwarder (similar to <code>netcat</code>)</li>\n<li><a href=\"https://github.com/mattthias/slurm\"><code>slurm</code></a>: network traffic visualization</li>\n<li><code>dd</code>: moving data between files or devices</li>\n<li><code>file</code>: identify type of a file</li>\n<li><code>tree</code>: display directories and subdirectories as a nesting tree; like <code>ls</code> but recursive</li>\n<li><code>stat</code>: file info</li>\n<li><code>time</code>: execute and time a command</li>\n<li><code>timeout</code>: execute a command for specified amount of time and stop the process when the specified amount of time completes.</li>\n<li><code>lockfile</code>: create semaphore file that can only be removed by <code>rm -f</code></li>\n<li><code>logrotate</code>: rotate, compress and mail logs.</li>\n<li><code>watch</code>: run a command repeatedly, showing results and/or highlighting changes</li>\n<li><a href=\"https://github.com/joh/when-changed\"><code>when-changed</code></a>: runs any command you specify whenever it sees file changed. See <code>inotifywait</code> and <code>entr</code> as well.</li>\n<li><code>tac</code>: print files in reverse</li>\n<li><code>comm</code>: compare sorted files line by line</li>\n<li><code>strings</code>: extract text from binary files</li>\n<li><code>tr</code>: character translation or manipulation</li>\n<li><code>iconv</code> or <code>uconv</code>: conversion for text encodings</li>\n<li><code>split</code> and <code>csplit</code>: splitting files</li>\n<li><code>sponge</code>: read all input before writing it, useful for reading from then writing to the same file, e.g., <code>grep -v something some-file | sponge some-file</code></li>\n<li><code>units</code>: unit conversions and calculations; converts furlongs per fortnight to twips per blink (see also <code>/usr/share/units/definitions.units</code>)</li>\n<li><code>apg</code>: generates random passwords</li>\n<li><code>xz</code>: high-ratio file compression</li>\n<li><code>ldd</code>: dynamic library info</li>\n<li><code>nm</code>: symbols from object files</li>\n<li><code>ab</code> or <a href=\"https://github.com/wg/wrk\"><code>wrk</code></a>: benchmarking web servers</li>\n<li><code>strace</code>: system call debugging</li>\n<li><a href=\"http://www.bitwizard.nl/mtr/\"><code>mtr</code></a>: better traceroute for network debugging</li>\n<li><code>cssh</code>: visual concurrent shell</li>\n<li><code>rsync</code>: sync files and folders over SSH or in local file system</li>\n<li><a href=\"https://wireshark.org/\"><code>wireshark</code></a> and <a href=\"https://www.wireshark.org/docs/wsug_html_chunked/AppToolstshark.html\"><code>tshark</code></a>: packet capture and network debugging</li>\n<li><a href=\"http://ngrep.sourceforge.net/\"><code>ngrep</code></a>: grep for the network layer</li>\n<li><code>host</code> and <code>dig</code>: DNS lookups</li>\n<li><code>lsof</code>: process file descriptor and socket info</li>\n<li><code>dstat</code>: useful system stats</li>\n<li><a href=\"https://github.com/nicolargo/glances\"><code>glances</code></a>: high level, multi-subsystem overview</li>\n<li><code>iostat</code>: Disk usage stats</li>\n<li><code>mpstat</code>: CPU usage stats</li>\n<li><code>vmstat</code>: Memory usage stats</li>\n<li><code>htop</code>: improved version of top</li>\n<li><code>last</code>: login history</li>\n<li><code>w</code>: who's logged on</li>\n<li><code>id</code>: user/group identity info</li>\n<li><a href=\"http://sebastien.godard.pagesperso-orange.fr/\"><code>sar</code></a>: historic system stats</li>\n<li><a href=\"http://www.ex-parrot.com/~pdw/iftop/\"><code>iftop</code></a> or <a href=\"https://github.com/raboof/nethogs\"><code>nethogs</code></a>: network utilization by socket or process</li>\n<li><code>ss</code>: socket statistics</li>\n<li><code>dmesg</code>: boot and system error messages</li>\n<li><code>sysctl</code>: view and configure Linux kernel parameters at run time</li>\n<li><code>hdparm</code>: SATA/ATA disk manipulation/performance</li>\n<li><code>lsblk</code>: list block devices: a tree view of your disks and disk partitions</li>\n<li><code>lshw</code>, <code>lscpu</code>, <code>lspci</code>, <code>lsusb</code>, <code>dmidecode</code>: hardware information, including CPU, BIOS, RAID, graphics, devices, etc.</li>\n<li><code>lsmod</code> and <code>modinfo</code>: List and show details of kernel modules.</li>\n<li><code>fortune</code>, <code>ddate</code>, and <code>sl</code>: um, well, it depends on whether you consider steam locomotives and Zippy quotations \"useful\"</li>\n</ul>\n<h2>macOS only</h2>\n<p>These are items relevant <em>only</em> on macOS.</p>\n<ul>\n<li>Package management with <code>brew</code> (Homebrew) and/or <code>port</code> (MacPorts). These can be used to install on macOS many of the above commands.</li>\n<li>Copy output of any command to a desktop app with <code>pbcopy</code> and paste input from one with <code>pbpaste</code>.</li>\n<li>To enable the Option key in macOS Terminal as an alt key (such as used in the commands above like <strong>alt-b</strong>, <strong>alt-f</strong>, etc.), open Preferences -> Profiles -> Keyboard and select \"Use Option as Meta key\".</li>\n<li>To open a file with a desktop app, use <code>open</code> or <code>open -a /Applications/Whatever.app</code>.</li>\n<li>Spotlight: Search files with <code>mdfind</code> and list metadata (such as photo EXIF info) with <code>mdls</code>.</li>\n<li>Be aware macOS is based on BSD Unix, and many commands (for example <code>ps</code>, <code>ls</code>, <code>tail</code>, <code>awk</code>, <code>sed</code>) have many subtle variations from Linux, which is largely influenced by System V-style Unix and GNU tools. You can often tell the difference by noting a man page has the heading \"BSD General Commands Manual.\" In some cases GNU versions can be installed, too (such as <code>gawk</code> and <code>gsed</code> for GNU awk and sed). If writing cross-platform Bash scripts, avoid such commands (for example, consider Python or <code>perl</code>) or test carefully.</li>\n<li>To get macOS release information, use <code>sw_vers</code>.</li>\n</ul>\n<h2>Windows only</h2>\n<p>These items are relevant <em>only</em> on Windows.</p>\n<h3>Ways to obtain Unix tools under Windows</h3>\n<ul>\n<li>Access the power of the Unix shell under Microsoft Windows by installing <a href=\"https://cygwin.com/\">Cygwin</a>. Most of the things described in this document will work out of the box.</li>\n<li>On Windows 10, you can use <a href=\"https://msdn.microsoft.com/commandline/wsl/about\">Windows Subsystem for Linux (WSL)</a>, which provides a familiar Bash environment with Unix command line utilities.</li>\n<li>If you mainly want to use GNU developer tools (such as GCC) on Windows, consider <a href=\"http://www.mingw.org/\">MinGW</a> and its <a href=\"http://www.mingw.org/wiki/msys\">MSYS</a> package, which provides utilities such as bash, gawk, make and grep. MSYS doesn't have all the features compared to Cygwin. MinGW is particularly useful for creating native Windows ports of Unix tools.</li>\n<li>Another option to get Unix look and feel under Windows is <a href=\"https://github.com/dthree/cash\">Cash</a>. Note that only very few Unix commands and command-line options are available in this environment.</li>\n</ul>\n<h3>Useful Windows command-line tools</h3>\n<ul>\n<li>You can perform and script most Windows system administration tasks from the command line by learning and using <code>wmic</code>.</li>\n<li>Native command-line Windows networking tools you may find useful include <code>ping</code>, <code>ipconfig</code>, <code>tracert</code>, and <code>netstat</code>.</li>\n<li>You can perform <a href=\"http://www.thewindowsclub.com/rundll32-shortcut-commands-windows\">many useful Windows tasks</a> by invoking the <code>Rundll32</code> command.</li>\n</ul>\n<h3>Cygwin tips and tricks</h3>\n<ul>\n<li>Install additional Unix programs with the Cygwin's package manager.</li>\n<li>Use <code>mintty</code> as your command-line window.</li>\n<li>Access the Windows clipboard through <code>/dev/clipboard</code>.</li>\n<li>Run <code>cygstart</code> to open an arbitrary file through its registered application.</li>\n<li>Access the Windows registry with <code>regtool</code>.</li>\n<li>Note that a <code>C:\\</code> Windows drive path becomes <code>/cygdrive/c</code> under Cygwin, and that Cygwin's <code>/</code> appears under <code>C:\\cygwin</code> on Windows. Convert between Cygwin and Windows-style file paths with <code>cygpath</code>. This is most useful in scripts that invoke Windows programs.</li>\n</ul>\n<h2>More resources</h2>\n<ul>\n<li><a href=\"https://github.com/alebcay/awesome-shell\">awesome-shell</a>: A curated list of shell tools and resources.</li>\n<li><a href=\"https://github.com/herrbischoff/awesome-osx-command-line\">awesome-osx-command-line</a>: A more in-depth guide for the macOS command line.</li>\n<li><a href=\"http://redsymbol.net/articles/unofficial-bash-strict-mode/\">Strict mode</a> for writing better shell scripts.</li>\n<li><a href=\"https://github.com/koalaman/shellcheck\">shellcheck</a>: A shell script static analysis tool. Essentially, lint for bash/sh/zsh.</li>\n<li><a href=\"http://www.dwheeler.com/essays/filenames-in-shell.html\">Filenames and Pathnames in Shell</a>: The sadly complex minutiae on how to handle filenames correctly in shell scripts.</li>\n<li><a href=\"http://datascienceatthecommandline.com/#tools\">Data Science at the Command Line</a>: More commands and tools helpful for doing data science, from the book of the same name</li>\n</ul>"},{"url":"/docs/tutorials/","relativePath":"docs/tutorials/index.md","relativeDir":"docs/tutorials","base":"index.md","name":"index","frontmatter":{"title":"Tutorials","weight":0,"excerpt":"Walkthroughs of various development activities and skills","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<p>This section is dedicated to coding walkthroughs:</p>"},{"url":"/docs/articles/node-api-express/","relativePath":"docs/articles/node-api-express.md","relativeDir":"docs/articles","base":"node-api-express.md","name":"node-api-express","frontmatter":{"title":"Node APIs With Express","sections":[],"seo":{"title":" Node APIs With Express","description":"Review-Of-Previous-Concepts","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h3>Overview</h3>\n<p><code>REST</code> is a generally agreed-upon set of principles and constraints. They are <strong>recommendations</strong>, not a standard.</p>\n<pre><code>// inside /api/apiRoutes.js &#x3C;- this can be place anywhere and called anything\nconst express = require('express');\n\n// if the other routers are not nested inside /api then the paths would change\nconst userRoutes = require('./users/userRoutes');\nconst productRoutes = require('./products/productRoutes');\nconst clientRoutes = require('./clients/clientRoutes');\n\nconst router = express.Router(); // notice the Uppercase R\n\n// this file will only be used when the route begins with \"/api\"\n// so we can remove that from the URLs, so \"/api/users\" becomes simply \"/users\"\nrouter.use('/users', userRoutes);\nrouter.use('/products', productRoutes);\nrouter.use('/clients', clientRoutes);\n\n// .. and any other endpoint related to the user's resource\n\n// after the route has been fully configured, we then export it so it can be required where needed\nmodule.exports = router; // standard convention dictates that this is the last line on the file\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### Objective 1 — explain the role of a foreign key\n<h3>Overview</h3>\n<p><strong>Foreign keys</strong> are a type of table field used for creating links between tables. Like <strong>primary keys</strong>, they are most often integers that identify (rather than store) data. However, whereas a primary key is used to id rows in a table, foreign keys are used to connect a record in one table to a record in a second table.</p>\n<h3>Follow Along</h3>\n<p>Consider the following <code>farms</code> and <code>ranchers</code> tables.</p>\n<p><a href=\"https://www.notion.so/b88ebcd8fa3a4fa3a36cf99c939f6067\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/a4ccaec69c484ce0bcd03d2e8a83e489\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>The <code>farm_id</code> in the <code>ranchers</code> table is an example of a <code>foreign key</code>. Each entry in the <code>farm_id</code> (foreign key) column corresponds to an <code>id</code> (primary key) in the <code>farms</code> table. This allows us to track which farm each rancher belongs to while keeping the tables normalized.</p>\n<p>If we could only see the <code>ranchers</code> table, we would know that John, Jane, and Jen all work together and that Jim and Jay also work together. However, to know where any of them work, we would need to look at the <code>farms</code> table.</p>\n<h3>Challenge</h3>\n<p>Open <a href=\"https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in\" class=\"markup--anchor markup--p-anchor\">SQLTryIT (Links to an external site.)</a>.</p>\n<p>How many records in the products table belong to the category “confections”?</p>\n<h3>Objective 2 — query data from multiple tables</h3>\n<p>Now that we understand the basics of querying data from a single table, let's move on to selecting data from multiple tables using JOIN operations.</p>\n<h3>Overview</h3>\n<p>We can use a <code>JOIN</code> to combine query data from multiple tables using a single <code>SELECT</code> statement.</p>\n<p>There are different types of joins; some are listed below:</p>\n<ul>\n<li><span id=\"9c7e\">inner joins.</span></li>\n<li><span id=\"7cd3\">outer joins.</span></li>\n<li><span id=\"96e6\">left joins.</span></li>\n<li><span id=\"0e55\">right joins.</span></li>\n<li><span id=\"d582\">cross joins.</span></li>\n<li><span id=\"6716\">non-equality joins.</span></li>\n<li><span id=\"b7f0\">self joins.</span></li>\n</ul>\n<p>Using <code>joins</code> requires that the two tables of interest contain at least one field with shared information. For example, if a <em>departments</em> table has an <em>id</em> field, and an employee table has a <em>department</em>id_ field, and the values that exist in the <em>id</em> column of the <em>departments</em> table live in the <em>department</em>id_ field of the employee table, we can use those fields to join both tables like so:</p>\n<pre><code>select * from employees\njoin departments on employees.department_id = departments.id\n</code></pre>\n<p>This query will return the data from both tables for every instance where the <code>ON</code> condition is true. If there are employees with no value for department<em>id or where the value stored in the field does not correspond to an existing id in the</em> departments <em>table, then that record will NOT be returned. In a similar fashion, any records from the</em> departments <em>table that don't have an employee associated with them will also be omitted from the results. Basically, if the</em> id* does not show as the value of department_id for an employee, it won't be able to join.</p>\n<p>We can shorten the condition by giving the table names an alias. This is a common practice. Below is the same example using aliases, picking which fields to return and sorting the results:</p>\n<pre><code>select d.id, d.name, e.id, e.first_name, e.last_name, e.salary\nfrom employees as e\njoin departments as d\n  on e.department_id = d.id\norder by d.name, e.last_name\n</code></pre>\n<p>Notice that we can take advantage of white space and indentation to make queries more readable.</p>\n<p>There are several ways of writing joins, but the one shown here should work on all database management systems and avoid some pitfalls, so we recommend it.</p>\n<p>The syntax for performing a similar join using Knex is as follows:</p>\n<pre><code>db('employees as e')\n  .join('departments as d', 'e.department_id', 'd.id')\n  .select('d.id', 'd.name', 'e.first_name', 'e.last_name', 'e.salary')\n</code></pre>\n<h3>Follow Along</h3>\n<p>A good explanation of how the different types of joins can be seen <a href=\"https://www.w3resource.com/sql/joins/sql-joins.php\" class=\"markup--anchor markup--p-anchor\">in this article from w3resource.com (Links to an external site.)</a>.</p>\n<h3>Challenge</h3>\n<p>Use <a href=\"https://www.w3schools.com/Sql/tryit.asp?filename=trysql_select_top\" class=\"markup--anchor markup--p-anchor\">this online tool (Links to an external site.)</a> to write the following queries:</p>\n<ul>\n<li><span id=\"9ccf\">list the products, including their category name.</span></li>\n<li><span id=\"b07f\">list the products, including the supplier name.</span></li>\n<li><span id=\"7b08\">list the products, including both the category name and supplier name.</span></li>\n</ul>\n<h3>What is SQL Joins?</h3>\n<p>An SQL JOIN clause combines rows from two or more tables. It creates a set of rows in a temporary table.</p>\n<h3>How to Join two tables in SQL?</h3>\n<p>A JOIN works on two or more tables if they have at least one common field and have a relationship between them.</p>\n<p>JOIN keeps the base tables (structure and data) unchanged.</p>\n<h3>Join vs. Subquery</h3>\n<ul>\n<li><span id=\"eeea\">JOINs are faster than a subquery and it is very rare that the opposite.</span></li>\n<li><span id=\"3b2e\">In JOINs the RDBMS calculates an execution plan, that can predict, what data should be loaded and how much it will take to processed and as a result this process save some times, unlike the subquery there is no pre-process calculation and run all the queries and load all their data to do the processing.</span></li>\n<li><span id=\"84ce\">A JOIN is checked conditions first and then put it into table and displays; where as a subquery take separate temp table internally and checking condition.</span></li>\n<li><span id=\"3002\">When joins are using, there should be connection between two or more than two tables and each table has a relation with other while subquery means query inside another query, has no need to relation, it works on columns and conditions.</span></li>\n</ul>\n<h3>SQL JOINS: EQUI JOIN and NON EQUI JOIN</h3>\n<p>The are two types of SQL JOINS — EQUI JOIN and NON EQUI JOIN</p>\n<ol>\n<li><span id=\"31e6\">SQL EQUI JOIN :</span></li>\n</ol>\n<p>The SQL EQUI JOIN is a simple SQL join uses the equal sign(=) as the comparison operator for the condition. It has two types — SQL Outer join and SQL Inner join.</p>\n<ol>\n<li><span id=\"d86b\">SQL NON EQUI JOIN :</span></li>\n</ol>\n<p>The <strong>SQL NON EQUI JOIN</strong> is a join uses comparison operator other than the equal sign like >, &#x3C;, >=, &#x3C;= with the condition.</p>\n<p><strong>SQL EQUI JOIN : INNER JOIN and OUTER JOIN</strong></p>\n<p>The SQL EQUI JOIN can be classified into two types — INNER JOIN and OUTER JOIN</p>\n<ol>\n<li><span id=\"c9b5\">SQL INNER JOIN</span></li>\n</ol>\n<p>This type of EQUI JOIN returns all rows from tables where the key record of one table is equal to the key records of another table.</p>\n<ol>\n<li><span id=\"6bc6\">SQL OUTER JOIN</span></li>\n</ol>\n<p>This type of EQUI JOIN returns all rows from one table and only those rows from the secondary table where the joined condition is satisfying i.e. the columns are equal in both tables.</p>\n<p>In order to perform a JOIN query, the required information we need are:</p>\n<p><strong>a)</strong> The name of the tables<strong>b)</strong> Name of the columns of two or more tables, based on which a condition will perform.</p>\n<p><strong>Syntax:</strong></p>\n<pre><code>FROM table1\njoin_type table2\n[ON (join_condition)]\n</code></pre>\n<p><strong>Parameters:</strong></p>\n<p><a href=\"https://www.notion.so/3e2d9e2f028e4b7abf2da81156a54364\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><strong>Pictorial Presentation of SQL Joins:</strong></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*bbwqJEpV2a9WZG-t.gif\" class=\"graf-image\" /></figure>**Example:**\n<p><strong>Sample table: company</strong></p>\n<p><strong>Sample table: foods</strong></p>\n<p>To join two tables 'company' and 'foods', the following SQL statement can be used :</p>\n<p><strong>SQL Code:</strong></p>\n<pre><code>SELECT  company.company_id,company.company_name,\nfoods.item_id,foods.item_name\nFROM company,foods;\n</code></pre>\n<p>Copy</p>\n<p>Output:</p>\n<pre><code>COMPAN COMPANY_NAME              ITEM_ID  ITEM_NAME\n------ ------------------------- -------- ---------------\n18     Order All                 1        Chex Mix\n18     Order All                 6        Cheez-It\n18     Order All                 2        BN Biscuit\n18     Order All                 3        Mighty Munch\n18     Order All                 4        Pot Rice\n18     Order All                 5        Jaffa Cakes\n18     Order All                 7        Salt n Shake\n15     Jack Hill Ltd             1        Chex Mix\n15     Jack Hill Ltd             6        Cheez-It\n15     Jack Hill Ltd             2        BN Biscuit\n15     Jack Hill Ltd             3        Mighty Munch\n15     Jack Hill Ltd             4        Pot Rice\n15     Jack Hill Ltd             5        Jaffa Cakes\n15     Jack Hill Ltd             7        Salt n Shake\n16     Akas Foods                1        Chex Mix\n16     Akas Foods                6        Cheez-It\n16     Akas Foods                2        BN Biscuit\n16     Akas Foods                3        Mighty Munch\n16     Akas Foods                4        Pot Rice\n16     Akas Foods                5        Jaffa Cakes\n16     Akas Foods                7        Salt n Shake\n.........\n.........\n.........\n</code></pre>\n<p><strong>JOINS: Relational Databases</strong></p>\n<ul>\n<li><span id=\"74c4\"><a href=\"https://www.w3resource.com/oracle/joins/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>Oracle JOINS</strong></a></span></li>\n<li><span id=\"f8da\"><a href=\"https://www.w3resource.com/mysql/advance-query-in-mysql/mysql-joins.php\" class=\"markup--anchor markup--li-anchor\"><strong>MySQL JOINS</strong></a></span></li>\n<li><span id=\"33a5\"><a href=\"https://www.w3resource.com/PostgreSQL/postgresql-join.php\" class=\"markup--anchor markup--li-anchor\"><strong>PostgreSQL JOINS</strong></a></span></li>\n<li><span id=\"b578\"><a href=\"https://www.w3resource.com/sqlite/sqlite-inner-join.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQLite JOINS</strong></a></span></li>\n</ul>\n<p><strong>Key points to remember:</strong></p>\n<p><em>Click on the following to get the slides presentation -</em></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*lP_nQo6VtVu_68nx.png\" class=\"graf-image\" /></figure>###\n<p><strong>Practice SQL Exercises</strong></p>\n<ul>\n<li><span id=\"0765\"><a href=\"https://www.w3resource.com/sql-exercises/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Exercises, Practice, Solution</strong></a></span></li>\n<li><span id=\"4cd9\"><a href=\"https://www.w3resource.com/sql-exercises/sql-retrieve-from-table.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Retrieve data from tables [33 Exercises]</strong></a></span></li>\n<li><span id=\"7204\"><a href=\"https://www.w3resource.com/sql-exercises/sql-boolean-operators.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Boolean and Relational operators [12 Exercises]</strong></a></span></li>\n<li><span id=\"3d4e\"><a href=\"https://www.w3resource.com/sql-exercises/sql-wildcard-special-operators.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Wildcard and Special operators [22 Exercises]</strong></a></span></li>\n<li><span id=\"7afb\"><a href=\"https://www.w3resource.com/sql-exercises/sql-aggregate-functions.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Aggregate Functions [25 Exercises]</strong></a></span></li>\n<li><span id=\"cc71\"><a href=\"https://www.w3resource.com/sql-exercises/sql-fromatting-output-exercises.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Formatting query output [10 Exercises]</strong></a></span></li>\n<li><span id=\"77bf\"><a href=\"https://www.w3resource.com/sql/joins/s/sql-exercises/ql-exercises-quering-on-multiple-table.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Quering on Multiple Tables [7 Exercises]</strong></a></span></li>\n<li><span id=\"0bc2\"><a href=\"https://www.w3resource.com/sql-exercises/sorting-and-filtering-hr/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>FILTERING and SORTING on HR Database [38 Exercises]</strong></a></span></li>\n<li><span id=\"e28a\">SQL JOINS</span></li>\n<li><span id=\"84a2\"><a href=\"https://www.w3resource.com/sql-exercises/sql-joins-exercises.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL JOINS [29 Exercises]</strong></a></span></li>\n<li><span id=\"f97b\"><a href=\"https://www.w3resource.com/sql-exercises/joins-hr/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL JOINS on HR Database [27 Exercises]</strong></a></span></li>\n<li>\n<span id=\"b33e\">  \n</span>\n</li>\n<li><span id=\"0983\">SQL SUBQUERIES</span></li>\n<li><span id=\"423b\"><a href=\"https://www.w3resource.com/sql-exercises/subqueries/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL SUBQUERIES [39 Exercises]</strong></a></span></li>\n<li><span id=\"a4d7\"><a href=\"https://www.w3resource.com/sql-exercises/sql-subqueries-exercises.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL SUBQUERIES on HR Database [55 Exercises]</strong></a></span></li>\n<li>\n<span id=\"b63d\">  \n</span>\n</li>\n<li><span id=\"2c29\"><a href=\"https://www.w3resource.com/sql-exercises/union/sql-union.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL Union[9 Exercises]</strong></a></span></li>\n<li><span id=\"92c5\"><a href=\"https://www.w3resource.com/sql-exercises/view/sql-view.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL View[16 Exercises]</strong></a></span></li>\n<li><span id=\"d3e5\"><a href=\"https://www.w3resource.com/sql-exercises/sql-user-management.php\" class=\"markup--anchor markup--li-anchor\"><strong>SQL User Account Management [16 Exercise]</strong></a></span></li>\n<li><span id=\"e280\">Movie Database</span></li>\n<li><span id=\"5198\"><a href=\"https://www.w3resource.com/sql-exercises/movie-database-exercise/basic-exercises-on-movie-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>BASIC queries on movie Database [10 Exercises]</strong></a></span></li>\n<li><span id=\"ddd5\"><a href=\"https://www.w3resource.com/sql-exercises/movie-database-exercise/subqueries-exercises-on-movie-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>SUBQUERIES on movie Database [16 Exercises]</strong></a></span></li>\n<li><span id=\"5363\"><a href=\"https://www.w3resource.com/sql-exercises/movie-database-exercise/joins-exercises-on-movie-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>JOINS on movie Database [24 Exercises]</strong></a></span></li>\n<li>\n<span id=\"b248\">  \n</span>\n</li>\n<li><span id=\"d5ba\">Soccer Database</span></li>\n<li><span id=\"a586\"><a href=\"https://www.w3resource.com/sql-exercises/soccer-database-exercise/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>Introduction</strong></a></span></li>\n<li><span id=\"d585\"><a href=\"https://www.w3resource.com/sql-exercises/soccer-database-exercise/basic-exercises-on-soccer-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>BASIC queries on soccer Database [29 Exercises]</strong></a></span></li>\n<li><span id=\"b626\"><a href=\"https://www.w3resource.com/sql-exercises/soccer-database-exercise/subqueries-exercises-on-soccer-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>SUBQUERIES on soccer Database [33 Exercises]</strong></a></span></li>\n<li><span id=\"95e1\"><a href=\"https://www.w3resource.com/sql-exercises/soccer-database-exercise/joins-exercises-on-soccer-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>JOINS queries on soccer Database [61 Exercises]</strong></a></span></li>\n<li>\n<span id=\"05ba\">  \n</span>\n</li>\n<li><span id=\"2b7b\">Hospital Database</span></li>\n<li><span id=\"788d\"><a href=\"https://www.w3resource.com/sql-exercises/hospital-database-exercise/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>Introduction</strong></a></span></li>\n<li><span id=\"0c32\"><a href=\"https://www.w3resource.com/sql-exercises/hospital-database-exercise/sql-exercise-on-hospital-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>BASIC, SUBQUERIES, and JOINS [39 Exercises]</strong></a></span></li>\n<li>\n<span id=\"228b\">  \n</span>\n</li>\n<li><span id=\"54d4\">Employee Database</span></li>\n<li><span id=\"c6fb\"><a href=\"https://www.w3resource.com/sql-exercises/employee-database-exercise/index.php\" class=\"markup--anchor markup--li-anchor\"><strong>BASIC queries on employee Database [115 Exercises]</strong></a></span></li>\n<li><span id=\"0419\"><a href=\"https://www.w3resource.com/sql-exercises/employee-database-exercise/subqueries-exercises-on-employee-database.php\" class=\"markup--anchor markup--li-anchor\"><strong>SUBQUERIES on employee Database [77 Exercises]</strong></a></span></li>\n<li>\n<span id=\"cb3e\">  \n</span>\n</li>\n<li><span id=\"b3da\">More to come!</span></li>\n</ul>\n<h3>Objective 3 — write database access methods</h3>\n<h3>Overview</h3>\n<p>While we can write database code directly into our endpoints, best practices dictate that all database logic exists in separate, modular methods. These files containing database access helpers are often called <strong>models</strong></p>\n<h3>Follow Along</h3>\n<p>To handle CRUD operations for a single resource, we would want to create a <strong>model</strong> (or database access file) containing the following methods:</p>\n<pre><code>function find() {\n}\n\nfunction findById(id) {\n}\n\nfunction add(user) {\n}\n\nfunction update(changes, id) {\n}\n\nfunction remove(id) {\n}\n</code></pre>\n<p>Each of these functions would use Knex logic to perform the necessary database operation.</p>\n<pre><code>function find() {\n  return db('users');\n}\n</code></pre>\n<p>For each method, we can choose what value to return. For example, we may prefer <code>findById()</code> to return a single <code>user</code> object rather than an array.</p>\n<pre><code>function findById(id) {\n// first() returns the first entry in the db matching the query\n  return db('users').where({ id }).first();\n}\n</code></pre>\n<p>We can also use existing methods like <code>findById()</code> to help <code>add()</code> return the new user (instead of just the id).</p>\n<pre><code>function add(user) {\n  db('users').insert(user)\n    .then(ids => {\n      return findById(ids[0]);\n    });\n}\n</code></pre>\n<p>Once all methods are written as desired, we can export them like so:</p>\n<pre><code>module.exports = {\n  find,\n  findById,\n  add,\n  update,\n  delete,\n}\n</code></pre>\n<p>…and use the helpers in our endpoints</p>\n<pre><code>const User = require('./user-model.js');\n\nrouter.get('/', (req, res) => {\n  User.find()\n    .then(users => {\n      res.json(users);\n    })\n    .catch(&#x26;nbsp;err => {});\n});\n</code></pre>\n<p>There should no be <code>knex</code> code in the endpoints themselves.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### A database is a collection of data organized for easy retrieval and manipulation.\n<p>We're concerned only with digital databases, those that run on computers or other electronic devices. Digital databases have been around since the 1960s. Relational databases, those which store “related” data, are the oldest and most common type of database in use today.</p>\n<h3>Data Persistence</h3>\n<p>A database is often necessary because our application or code requires data persistence. This term refers to data that is infrequently accessed and not likely to be modified. In less technical terms, the information will be safely stored and remain untouched unless intentionally modified.</p>\n<p>A familiar example of non-persistent data would be JavaScript objects and arrays, which reset each time the code runs.</p>\n<h3>Relational Databases</h3>\n<p>In relational databases, <strong>the data is stored in tabular format grouped into rows and columns</strong> (similar to spreadsheets). A collection of rows is called a table. Each row represents a single record in the table and is made up of one or more columns.</p>\n<p>These kinds of databases are relational because a <em>relation</em> is a mathematical idea equivalent to a table. So relational databases are databases that store their data in tables.</p>\n<h3>Tables</h3>\n<p><strong>Below are some basic facts about tables:</strong></p>\n<blockquote>\n<p>Tables organize data in rows and columns.</p>\n</blockquote>\n<blockquote>\n<p>Each row in a table represents one distinct record.</p>\n</blockquote>\n<blockquote>\n<p>Each column represents a field or attribute that is common to all the records.</p>\n</blockquote>\n<blockquote>\n<p>Fields should have a descriptive name and a data type appropriate for the attribute it represents.</p>\n</blockquote>\n<blockquote>\n<p>Tables usually have more rows than columns.</p>\n</blockquote>\n<blockquote>\n<p>Tables have primary keys that uniquely identify each row.</p>\n</blockquote>\n<blockquote>\n<p>Foreign keys represent the relationships with other tables.</p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*7ZPYzWNRcs2PBL6p.jpg\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### SQL:\n<p>SQL is a standard language, which means that it almost certainly will be supported, no matter how your database is managed. That said, be aware that the SQL language can vary depending on database management tools. This lesson focuses on a set of core commands that never change. Learning the standard commands is an excellent introduction since the knowledge transfers between database products.</p>\n<p>The syntax for SQL is English-like and requires fewer symbols than programming languages like C, Java, and JavaScript.</p>\n<p>It is declarative and concise, which means there is a lot less to learn to use it effectively.</p>\n<p>When learning SQL, it is helpful to understand that each command is designed for a different purpose. If we classify the commands by purpose, we'll end up with the following sub-categories of SQL:</p>\n<ul>\n<li><span id=\"aba8\"><strong>Data Definition Language (DDL)</strong>: used to modify database objects. Some examples are: <code>CREATE TABLE</code>, <code>ALTER TABLE</code>, and <code>DROP TABLE</code>.</span></li>\n<li><span id=\"4f3f\"><strong>Data Manipulation Language (DML)</strong>: used to manipulate the data stored in the database. Some examples are: <code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code>.</span></li>\n<li><span id=\"e1f2\"><strong>Data Query Language (DQL)</strong>: used to ask questions about the data stored in the database. The most commonly used SQL command is <code>SELECT</code>, and it falls in this category.</span></li>\n<li><span id=\"4474\"><strong>Data Control Language (DCL)</strong>: used to manage database security and user's access to data. These commands fall into the realm of Database Administrators. Some examples are <code>GRANT</code> and <code>REVOKE</code>.</span></li>\n<li><span id=\"921b\"><strong>Transaction Control Commands</strong>: used for managing groups of statements that must execute as a unit or not execute at all. Examples are <code>COMMIT</code> and <code>ROLLBACK</code>.</span></li>\n</ul>\n<p>As a developer, you'll need to get familiar with DDL and become proficient using DML and DQL. This lesson will cover only DML and DQL commands.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>The four SQL operations covered in this section will allow a user to **query**, **insert**, and **modify** a database table.\n<h3>Query</h3>\n<p>A <strong>query</strong> is a SQL statement used to retrieve data from a database. The command used to write queries is <code>SELECT</code>, and it is one of the most commonly used SQL commands.</p>\n<p>The basic syntax for a <code>SELECT</code> statement is this:</p>\n<pre><code>select &#x3C;selection> from &#x3C;table name>;\n</code></pre>\n<p>To see all the fields on a table, we can use a <code>*</code> as the <code>selection</code>.</p>\n<pre><code>select * from employees;\n</code></pre>\n<p>The preceding statement would show all the records and all the columns for each record in the <code>employees</code> table.</p>\n<p>To pick the fields we want to see, we use a comma-separated list:</p>\n<pre><code>select first_name, last_name, salary from employees;\n</code></pre>\n<p>The return of that statement would hold all records from the listed fields.</p>\n<p>We can extend the <code>SELECT</code> command's capabilities using <code>clauses</code> for things like filtering, sorting, pagination, and more.</p>\n<p>It is possible to query multiple tables in a single query. But, in this section, we only perform queries on a single table. We will cover performing queries on multiple tables in another section.</p>\n<h3>Insert</h3>\n<p>To <strong>insert</strong> new data into a table, we'll use the <code>INSERT</code> command. The basic syntax for an <code>INSERT</code> statement is this:</p>\n<pre><code>insert into &#x3C;table name> (&#x3C;selection>) values (&#x3C;values>)\n</code></pre>\n<p>Using this formula, we can specify which values will be inserted into which fields like so:</p>\n<pre><code>insert into Customers (Country, CustomerName, ContactName, Address, City, PostalCode)\nvalues ('USA', 'WebDev School', 'Austen Allred', '1 WebDev Court', 'Provo', '84601');\n</code></pre>\n<h3>Modify</h3>\n<p><strong>Modifying</strong> a database consists of updating and removing records. For these operations, we'll use <code>UPDATE</code> and <code>DELETE</code> commands, respectively.</p>\n<p>The basic syntax for an <code>UPDATE</code> statement is:</p>\n<pre><code>update &#x3C;table name> set &#x3C;field> = &#x3C;value> where &#x3C;condition>;\n</code></pre>\n<p>The basic syntax for a <code>DELETE</code> statement is:</p>\n<pre><code>delete from &#x3C;table name> where &#x3C;condition>;\n</code></pre>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### Filtering results using WHERE clause\n<p>When querying a database, the default result will be every entry in the given table. However, often, we are looking for a specific record or a set of records that meets certain criteria.</p>\n<p>A <code>WHERE</code> clause can help in both cases.</p>\n<p>Here's an example where we might only want to find customers living in Berlin.</p>\n<pre><code>select City, CustomerName, ContactName\nfrom Customers\nwhere City = 'Berlin'\n</code></pre>\n<p>We can also chain together <code>WHERE</code> clauses using <code>OR</code> and <code>AND</code> to limit our results further.</p>\n<p>The following query includes only records that match both criteria.</p>\n<pre><code>select City, CustomerName, ContactName\nfrom Customers\nwhere Country = 'France' and City = 'Paris'\n</code></pre>\n<p>And this query includes records that match either criteria.</p>\n<pre><code>select City, CustomerName, ContactName\nfrom Customers\nwhere Country = 'France' or City = 'Paris'\n</code></pre>\n<p>These operators can be combined and grouped with parentheses to add complex selection logic. They behave similarly to what you're used to in programming languages.</p>\n<p>You can read more about SQLite operators from <a href=\"https://www.w3resource.com/sqlite/operators.php\" class=\"markup--anchor markup--p-anchor\">w3resource (Links to an external site.)</a>.</p>\n<p>To select a single record, we can use a <code>WHERE</code> statement with a uniquely identifying field, like an id:</p>\n<pre><code>select * from Customers\nwhere CustomerId=3;\n</code></pre>\n<p>Other comparison operators also work in <code>WHERE</code> conditions, such as <code>></code>, <code>&#x3C;</code>, <code>&#x3C;=</code>, and <code>>=</code>.</p>\n<pre><code>select * from employees where salary >= 50000\n</code></pre>\n<h3>Ordering results using the ORDER BY clause</h3>\n<p>Query results are shown in the same order the data was inserted. To control how the data is sorted, we can use the <code>ORDER BY</code> clause. Let's see an example.</p>\n<pre><code>-- sorts the results first by salary in descending order, then by the last name in ascending order\nselect * from employees order by salary desc, last_name;\n</code></pre>\n<p>We can pass a list of field names to <code>order by</code> and optionally choose <code>asc</code> or <code>desc</code> for the sort direction. The default is <code>asc</code>, so it doesn't need to be specified.</p>\n<p>Some SQL engines also support using field abbreviations when sorting.</p>\n<pre><code>select name, salary, department from employees order by 3, 2 desc;\n</code></pre>\n<p>In this case, the results are sorted by the department in ascending order first and then by salary in descending order. The numbers refer to the fields' position in the <em>selection</em> portion of the query, so <code>1</code> would be <em>name</em>, <code>2</code> would be <em>salary</em>, and so on.</p>\n<p>Note that the <code>WHERE</code> clause should come after the <code>FROM</code> clause. The <code>ORDER BY</code> clause always goes last.</p>\n<pre><code>select * from employees where salary > 50000 order by last_name;\n</code></pre>\n<h3>Limiting results using the LIMIT clause</h3>\n<p>When we wish to see only a limited number of records, we can use a <code>LIMIT</code> clause.</p>\n<p>The following returns the first ten records in the products table:</p>\n<pre><code>select * from products\nlimit 10\n</code></pre>\n<p><code>LIMIT</code> clauses are often used in conjunction with <code>ORDER BY</code>. The following shows us the five cheapest products:</p>\n<pre><code>select * from products\norder by price desc\nlimit 5\n</code></pre>\n<h3>Inserting data using INSERT</h3>\n<p>An insert statement adds a new record to the database. All non-null fields must be listed out in the same order as their values. Some fields, like ids and timestamps, may be auto-generated and do not need to be included in an <code>INSERT</code> statement.</p>\n<pre><code>-- we can add fields in any order; the values need to be in the same ordinal position\n-- the id will be assigned automatically\n  insert into Customers (Country, CustomerName, ContactName, Address, City, PostalCode)\n  values ('USA', 'WebDev School', 'Austen Allred', '1 WebDev Court', 'Provo', '84601');\n</code></pre>\n<p>The values in an insert statement must not violate any restrictions and constraints that the database has in place, such as expected datatypes. We will learn more about constraints and schema design in a later section.</p>\n<h3>Modifying recording using UPDATE</h3>\n<p>When modifying a record, we identify a single record or a set of records to update using a <code>WHERE</code> clause. Then we can set the new value(s) in place.</p>\n<pre><code>update Customers\nset City = 'Silicon Valley', Country = 'USA'\nwhere CustomerName = 'WebDev School'\n</code></pre>\n<p>Technically the <code>WHERE</code> clause is not required, but leaving it off would result in every record within the table receiving the update.</p>\n<h3>Removing records using DELETE</h3>\n<p>When removing a record or set of records, we need only identify which record(s) to remove using a <code>WHERE</code> clause:</p>\n<pre><code>delete from Customers\nwhere CustomerName = 'WebDev School`;\n</code></pre>\n<p>Once again, the <code>WHERE</code> clause is not required, but leaving it off would remove every record in the table, so it's essential.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>Raw SQL is a critical baseline skill. However, Node developers generally use an **Object Relational Mapper (ORM)** or **query builder** to write database commands in a backend codebase. Both **ORMs** and **query builders** are JavaScript libraries that allow us to interface with the database using a JavaScript version of the SQL language.\n<p>For example, instead of a raw SQL <code>SELECT</code>:</p>\n<pre><code>SELECT * FROM users;\n</code></pre>\n<p>We could use a query builder to write the same logic in JavaScript:</p>\n<pre><code>db.select('*').from('users');\n</code></pre>\n<p><strong>Query builders</strong> are lightweight and easy to get off the ground, whereas <strong>ORMs</strong> use an object-oriented model and provide more heavy lifting within their rigid structure.</p>\n<p>We will use a <strong>query builder</strong> called <a href=\"https://knexjs.org/\" class=\"markup--anchor markup--p-anchor\">knex.js (Links to an external site.)</a>.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### Knex Setup\n<p>To use Knex in a repository, we'll need to add two libraries:</p>\n<pre><code>npm install knex sqlite3\n</code></pre>\n<p><code>knex</code> is our query builder library, and <code>sqlite3</code> allows us to interface with a <code>sqlite</code> database. We'll learn more about <code>sqlite</code> and other <strong>database management systems</strong> in the following module. For now, know that you need both libraries.</p>\n<p>Next, we use Knex to set up a config file:</p>\n<pre><code>const knex = require('knex');\n\nconst config = {\n  client: 'sqlite3',\n  connection: {\n    filename: './data/posts.db3',\n  },\n  useNullAsDefault: true,\n};\n\nmodule.exports = knex(config);\n</code></pre>\n<p>To use the query builder elsewhere in our code, we need to call <code>knex</code> and pass in a <code>config</code> object. We'll be discussing Knex configuration more in a future module. Still, we only need the <code>client</code>, <code>connection</code>, and <code>useNullAsDefault</code> keys as shown above. The <code>filename</code> should point towards the pre-existing database file, which can be recognized by the <code>.db3</code> extension.</p>\n<p><strong>GOTCHA</strong>: The file path to the database should be with respect to the <strong>root</strong> of the repo, not the configuration file itself.</p>\n<p>Once Knex is configured, we can import the above config file anywhere in our codebase to access the database.</p>\n<pre><code>const db = require('../data/db-config.js);\n</code></pre>\n<p>The <code>db</code> object provides methods that allow us to begin building queries.</p>\n<h3>SELECT using Knex</h3>\n<p>In Knex, the equivalent of <code>SELECT * FROM users</code> is:</p>\n<pre><code>db.select('*').from('users');\n</code></pre>\n<p>There's a simpler way to write the same command:</p>\n<pre><code>db('users');\n</code></pre>\n<p>Using this, we could write a <code>GET</code> endpoint.</p>\n<pre><code>router.get('/api/users', (req, res) => {\n  db('users')\n  .then(users => {\n    res.json(users);\n  })\n  .catch (err => {\n    res.status(500).json({ message: 'Failed to get users' });\n  });\n});\n</code></pre>\n<p><strong>NOTE</strong>: All Knex queries return promises.</p>\n<p>Knex also allows for a where clause. In Knex, we could write <code>SELECT * FROM users WHERE id=1</code> as</p>\n<pre><code>db('users').where({ id: 1 });\n</code></pre>\n<p>This method will resolve to an array containing a single entry like so: <code>[{ id: 1, name: 'bill' }]</code>.</p>\n<p>Using this, we might add a <code>GET</code> endpoint where a specific user:</p>\n<pre><code>server.get('api/users/:id', (req, res) => {\n  const { id } = req.params;\n\ndb('users').where({ id })\n  .then(users => {\n    // we must check the length to find our if our user exists\n    if (users.length) {\n      res.json(users);\n    } else {\n      res.status(404).json({ message: 'Could not find user with given id.' })\n   })\n  .catch (err => {\n    res.status(500).json({ message: 'Failed to get user' });\n  });\n});\n</code></pre>\n<h3>INSERT using Knex</h3>\n<p>In Knex, the equivalent of <code>INSERT INTO users (name, age) VALUES ('Eva', 32)</code> is:</p>\n<pre><code>db('users').insert({ name: 'Eva', age: 32 });\n</code></pre>\n<p>The insert method in Knex will resolve to an array containing the newly created id for that user like so: <code>[3]</code>.</p>\n<h3>UPDATE using Knex</h3>\n<p>In knex, the equivalent of <code>UPDATE users SET name='Ava', age=33 WHERE id=3;</code> is:</p>\n<pre><code>db('users').where({ id: 3 })\n.update({name: 'Ava', age: 33 });\n</code></pre>\n<p>Note that the <code>where</code> method comes before <code>update</code>, unlike in SQL.</p>\n<p>Update will resolve to a count of rows updated.</p>\n<h3>DELETE using Knex</h3>\n<p>In Knex, the equivalent of <code>DELETE FROM users WHERE age=33;</code> is:</p>\n<pre><code>db('users').where({ age: 33}).del();\n</code></pre>\n<p>Once again, the <code>where</code> must come before the <code>del</code>. This method will resolve to a count of records removed.</p>\n<hr>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>###\n<h3>Here's a small project you can practice with.</h3>\n<p>SQLlite Studio is an application that allows us to create, open, view, and modify SQLite databases. To fully understand what SQLite Studio is and how it works, we must also understand the concept of the Database Management Systems (DBMS).</p>\n<h3>What is a DBMS?</h3>\n<p>To manage digital databases we use specialized software called <strong>D</strong>ata<strong>B</strong>ase <strong>M</strong>anagement <strong>S</strong>ystems (DBMS). These systems typically run on servers and are managed by <strong>D</strong>ata<strong>B</strong>ase <strong>A</strong>dministrators (DBAs).</p>\n<p>In less technical terms, we need a type of software that will allow us to create, access, and generally manage our databases. In the world of relational databases, we specifically use Relational Database Mangement Systems (RDBMs). Some examples are Postgres, SQLite, MySQL, and Oracle.</p>\n<p>Choosing a DBMS determines everything from how you set up your database, to where and how the data is stored, to what SQL commands you can use. Most systems share the core of the SQL language that you've already learned.</p>\n<p>In other words, you can expect <code>SELECT</code>, <code>UPDATE</code>, <code>INSERT</code>, <code>WHERE</code> , and the like to be the same across all DBMSs, but the subtleties of the language may vary.</p>\n<h3>What is SQLite?</h3>\n<p><strong>SQLite</strong> is the DBMS, as the name suggests, it is a more lightweight system and thus easier to get set up than some others.</p>\n<p>SQLite allows us to store databases as single files. SQLite projects have a <code>.db3</code> extension. That is the database.</p>\n<p>SQLite is <em>not a database</em> (like relational, graph, or document are databases) but rather <em>a database management system</em>.</p>\n<h3>Opening an existing database in SQLite Studio</h3>\n<p>One useful visual interface we might use with a SQLite database is called <strong>SQLite Studio</strong>. <a href=\"https://sqlitestudio.pl/\" class=\"markup--anchor markup--p-anchor\">Install SQLITE Studio here. (Links to an external site.)</a></p>\n<p>Once installed, we can use SQLite Studio to open any <code>.db3</code> file from a previous lesson. We may view the tables, view the data, and even make changes to the database.</p>\n<p>For a more detailed look at SQLite Studio, follow along in the video above.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>A **database schema** is the shape of our database. It defines what tables we'll have, which columns should exist within the tables and any restrictions on each column.\n<p>A well-designed database schema keeps the data well organized and can help ensure high-quality data.</p>\n<p>Note that while schema design is usually left to Database Administrators (DBAs), understanding schema helps when designing APIs and database logic. And in a smaller team, this step may fall on the developer.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>For a look at schema design in SQLite Studio, follow along in the video above.\n<p>When designing a single table, we need to ask three things:</p>\n<ul>\n<li><span id=\"2e1a\">What fields (or columns) are present?</span></li>\n<li><span id=\"52e7\">What type of data do we expect for each field?</span></li>\n<li><span id=\"8aff\">Are there other restrictions needed for each column?</span></li>\n</ul>\n<p>Looking at the following schema diagram for an <code>accounts</code> table, we can the answer to each other those questions:</p>\n<p><a href=\"https://www.notion.so/9790405dda624818822293a383eec2d2\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<h3>Table Fields</h3>\n<p>Choosing which fields to include in a table is relatively straight forward. What information needs to be tracked regarding this resource? In the real world, this is determined by the intended use of the product or app.</p>\n<p>However, this is one requirement every table should satisfy: a <strong>primary key</strong>. A primary key is a way to identify each entry in the database uniquely. It is most often represented as a auto-incrementing integer called <code>id</code> or <code>[tablename]Id</code>.</p>\n<h3>Datatypes</h3>\n<p>Each field must also have a specified datatype. The datatype available depends on our DBMS. Some supported datatype in SQLite include:</p>\n<ul>\n<li><span id=\"92fb\"><strong>Null:</strong> Missing or unknown information.</span></li>\n<li><span id=\"32ef\"><strong>Integer:</strong> Whole numbers.</span></li>\n<li><span id=\"181d\"><strong>Real:</strong> Any number, including decimals.</span></li>\n<li><span id=\"ebce\"><strong>Text:</strong> Character data.</span></li>\n<li><span id=\"c00e\"><strong>Blob:</strong> a large binary object that can be used to store miscellaneous data.</span></li>\n</ul>\n<p>Any data inserted into the table must match the datatypes determined in schema design.</p>\n<h3>Constraints</h3>\n<p>Beyond datatypes, we may add additional <strong>constraints</strong> on each field. Some examples include:</p>\n<ul>\n<li><span id=\"14ca\"><strong>Not Null:</strong> The field cannot be left empty</span></li>\n<li><span id=\"b533\"><strong>Unique:</strong> No two records can have the same value in this field</span></li>\n<li><span id=\"f0c4\"><strong>Primary key:</strong> — Indicates this field is the primary key. Both the not null and unique constraints will be enforced.</span></li>\n<li><span id=\"f116\"><strong>Default:</strong> — Sets a default value if none is provided.</span></li>\n</ul>\n<p>As with data types, any data that does not satisfy the schema constraints will be rejected from the database.</p>\n<h3></h3>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### Multi-Table Design\n<p>Another critical component of schema design is to understand how different tables relate to each other. This will be covered in later lesson.</p>\n<p>Knex provides a <strong>schema builder</strong>, which allows us to write code to design our database schema. However, beyond thinking about columns and constraints, we must also consider updates.</p>\n<p>When a schema needs to be updated, a developer must feel confident that the changes go into effect everywhere. This means schema updates on the developer's local machine, on any testing or staging versions, on the production database, and then on any other developer's local machines. This is where <strong>migrations</strong> come into play.</p>\n<p>A <code>database migration</code> describes changes made to the structure of a database. Migrations include things like adding new objects, adding new tables, and modifying existing objects or tables.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### Knex Cli\n<p>To use migrations (and to make Knex setup easier), we need to use <strong>knex cli</strong>. Install knex globally with <code>npm install -g knex</code>.</p>\n<p>This allows you to use Knex commands within any repo that has <code>knex</code> as a local dependency. If you have any issues with this global install, you can use the <code>npx knex</code> command instead.</p>\n<h3>Initializing Knex</h3>\n<p>To start, add the <code>knex</code> and <code>sqlite3</code> libraries to your repository.</p>\n<p><code>npm install knex sqlite3</code></p>\n<p>We've seen how to use manually create a config object to get started with Knex, but the best practice is to use the following command:</p>\n<pre><code>knex init\n</code></pre>\n<p>Or, if Knex isn't globally installed:</p>\n<pre><code>npx knex init\n</code></pre>\n<p>This command will generate a file in your root folder called <code>knexfile.js</code>. It will be auto populated with three config objects, based on different environments. We can delete all except for the development object.</p>\n<pre><code>module.exports = {\n\ndevelopment: {\n    client: 'sqlite3',\n    connection: {\n      filename: './dev.sqlite3'\n    }\n  }\n\n};\n</code></pre>\n<p>We'll need to update the location (or desired location) of the database as well as add the <code>useNullAsDefault</code> option. The latter option prevents crashes when working with <code>sqlite3</code>.</p>\n<pre><code>module.exports = {\n\ndevelopment: {\n    // our DBMS driver\n    client: 'sqlite3',\n    // the location of our db\n    connection: {\n      filename: './data/database_file.db3',\n    },\n    // necessary when using sqlite3\n    useNullAsDefault: true\n  }\n\n};\n</code></pre>\n<p>Now, wherever we configure our database, we may use the following syntax instead of hardcoding in a config object.</p>\n<pre><code>const knex = require('knex');\n\nconst config = require('../knexfile.js');\n\n// we must select the development object from our knexfile\nconst db = knex(config.development);\n\n// export for use in codebase\nmodule.exports = db;\n</code></pre>\n<h3>Knex Migrations</h3>\n<p>Once our <code>knexfile</code> is set up, we can begin creating <strong>migrations</strong>. Though it's not required, we are going to add an <code>addition</code> option to the config object to specify a directory for the migration files.</p>\n<pre><code>development: {\n    client: 'sqlite3',\n    connection: {\n      filename: './data/produce.db3',\n    },\n    useNullAsDefault: true,\n    // generates migration files in a data/migrations/ folder\n    migrations: {\n      directory: './data/migrations'\n    }\n  }\n</code></pre>\n<p>We can generate a new migration with the following command:</p>\n<p><code>knex migrate:make [migration-name]</code></p>\n<p>If we needed to create an accounts table, we might run:</p>\n<p><code>knex migrate:make create-accounts</code></p>\n<p>Note that inside <code>data/migrations/</code> a new file has appeared. Migrations have a timestamp in their filenames automatically. Wither you like this or not, <strong>do not edit migration names.</strong></p>\n<p>The migration file should have both an <code>up</code> and a <code>down</code> function. Within the <code>up</code> function, we write the ended database changes. Within the <code>down</code> function, we write the code to undo the <code>up</code> functions. This allows us to undo any changes made to the schema if necessary.</p>\n<pre><code>exports.up = function(knex, Promise) {\n  // don't forget the return statement\n  return knex.schema.createTable('accounts', tbl => {\n    // creates a primary key called id\n    tbl.increments();\n    // creates a text field called name which is both required and unique\n    tbl.text('name', 128).unique().notNullable();\n    // creates a numeric field called budget which is required\n    tbl.decimal('budget').notNullable();\n  });\n};\n\nexports.down = function(knex, Promise) {\n  // drops the entire table\n  return knex.schema.dropTableIfExists('accounts');\n};\n</code></pre>\n<p>References for these methods are found in the <strong>schema builder</strong> section of the <a href=\"https://knexjs.org/\" class=\"markup--anchor markup--p-anchor\">Knex docs (Links to an external site.)</a>.</p>\n<p>At this point, the table is <strong>not</strong> yet created. To run this (and any other) migrations, use the command:</p>\n<p><code>knex migrate:latest</code></p>\n<p>Note if the database does not exist, this command will auto-generate one. We can use SQLite Studio to confirm that the accounts table has been created.</p>\n<h3>Changes and Rollbacks</h3>\n<p>If later down the road, we realize you need to update your schema, you shouldn't edit the migration file. Instead, you will want to create a new migration with the command:</p>\n<p><code>knex migrate:make accounts-schema-update</code></p>\n<p>Once we've written our updates into this file we save and close with:</p>\n<p><code>knex migrate:latest</code></p>\n<p>If we migrate our database and then quickly realize something isn't right, we can edit the migration file. However, first, we need to <strong>rolllback</strong> (or undo) our last migration with:</p>\n<p><code>knex migrate:rollback</code></p>\n<p>Finally, we are free to rerun that file with <code>knex migrate</code> latest.</p>\n<p><strong>NOTE</strong>: A rollback should not be used to edit an old migration file once that file has accepted into a main branch. However, an entire team may use a rollback to return to a previous version of a database.</p>\n<h3>Overview</h3>\n<p>Knex provides a <strong>schema builder</strong>, which allows us to write code to design our database schema. However, beyond thinking about columns and constraints, we must also consider updates.</p>\n<p>When a schema needs to be updated, a developer must feel confident that the changes go into effect everywhere. This means schema updates on the developer's local machine, on any testing or staging versions, on the production database, and then on any other developer's local machines. This is where <strong>migrations</strong> come into play.</p>\n<p>A <code>database migration</code> describes changes made to the structure of a database. Migrations include things like adding new objects, adding new tables, and modifying existing objects or tables.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### Knex Cli\n<p>To use migrations (and to make Knex setup easier), we need to use <strong>knex cli</strong>. Install knex globally with <code>npm install -g knex</code>.</p>\n<p>This allows you to use Knex commands within any repo that has <code>knex</code> as a local dependency. If you have any issues with this global install, you can use the <code>npx knex</code> command instead.</p>\n<h3>Initializing Knex</h3>\n<p>To start, add the <code>knex</code> and <code>sqlite3</code> libraries to your repository.</p>\n<p><code>npm install knex sqlite3</code></p>\n<p>We've seen how to use manually create a config object to get started with Knex, but the best practice is to use the following command:</p>\n<pre><code>knex init\n</code></pre>\n<p>Or, if Knex isn't globally installed:</p>\n<pre><code>npx knex init\n</code></pre>\n<p>This command will generate a file in your root folder called <code>knexfile.js</code>. It will be auto populated with three config objects, based on different environments. We can delete all except for the development object.</p>\n<pre><code>module.exports = {\n\ndevelopment: {\n    client: 'sqlite3',\n    connection: {\n      filename: './dev.sqlite3'\n    }\n  }\n\n};\n</code></pre>\n<p>We'll need to update the location (or desired location) of the database as well as add the <code>useNullAsDefault</code> option. The latter option prevents crashes when working with <code>sqlite3</code>.</p>\n<pre><code>module.exports = {\n\ndevelopment: {\n    // our DBMS driver\n    client: 'sqlite3',\n    // the location of our db\n    connection: {\n      filename: './data/database_file.db3',\n    },\n    // necessary when using sqlite3\n    useNullAsDefault: true\n  }\n\n};\n</code></pre>\n<p>Now, wherever we configure our database, we may use the following syntax instead of hardcoding in a config object.</p>\n<pre><code>const knex = require('knex');\n\nconst config = require('../knexfile.js');\n\n// we must select the development object from our knexfile\nconst db = knex(config.development);\n\n// export for use in codebase\nmodule.exports = db;\n</code></pre>\n<h3>Knex Migrations</h3>\n<p>Once our <code>knexfile</code> is set up, we can begin creating <strong>migrations</strong>. Though it's not required, we are going to add an <code>addition</code> option to the config object to specify a directory for the migration files.</p>\n<pre><code>development: {\n    client: 'sqlite3',\n    connection: {\n      filename: './data/produce.db3',\n    },\n    useNullAsDefault: true,\n    // generates migration files in a data/migrations/ folder\n    migrations: {\n      directory: './data/migrations'\n    }\n  }\n</code></pre>\n<p>We can generate a new migration with the following command:</p>\n<p><code>knex migrate:make [migration-name]</code></p>\n<p>If we needed to create an accounts table, we might run:</p>\n<p><code>knex migrate:make create-accounts</code></p>\n<p>Note that inside <code>data/migrations/</code> a new file has appeared. Migrations have a timestamp in their filenames automatically. Wither you like this or not, <strong>do not edit migration names.</strong></p>\n<p>The migration file should have both an <code>up</code> and a <code>down</code> function. Within the <code>up</code> function, we write the ended database changes. Within the <code>down</code> function, we write the code to undo the <code>up</code> functions. This allows us to undo any changes made to the schema if necessary.</p>\n<pre><code>exports.up = function(knex, Promise) {\n  // don't forget the return statement\n  return knex.schema.createTable('accounts', tbl => {\n    // creates a primary key called id\n    tbl.increments();\n    // creates a text field called name which is both required and unique\n    tbl.text('name', 128).unique().notNullable();\n    // creates a numeric field called budget which is required\n    tbl.decimal('budget').notNullable();\n  });\n};\n\nexports.down = function(knex, Promise) {\n  // drops the entire table\n  return knex.schema.dropTableIfExists('accounts');\n};\n</code></pre>\n<p>References for these methods are found in the <strong>schema builder</strong> section of the <a href=\"https://knexjs.org/\" class=\"markup--anchor markup--p-anchor\">Knex docs (Links to an external site.)</a>.</p>\n<p>At this point, the table is <strong>not</strong> yet created. To run this (and any other) migrations, use the command:</p>\n<p><code>knex migrate:latest</code></p>\n<p>Note if the database does not exist, this command will auto-generate one. We can use SQLite Studio to confirm that the accounts table has been created.</p>\n<h3>Changes and Rollbacks</h3>\n<p>If later down the road, we realize you need to update your schema, you shouldn't edit the migration file. Instead, you will want to create a new migration with the command:</p>\n<p><code>knex migrate:make accounts-schema-update</code></p>\n<p>Once we've written our updates into this file we save and close with:</p>\n<p><code>knex migrate:latest</code></p>\n<p>If we migrate our database and then quickly realize something isn't right, we can edit the migration file. However, first, we need to <strong>rolllback</strong> (or undo) our last migration with:</p>\n<p><code>knex migrate:rollback</code></p>\n<p>Finally, we are free to rerun that file with <code>knex migrate</code> latest.</p>\n<p><strong>NOTE</strong>: A rollback should not be used to edit an old migration file once that file has accepted into a main branch. However, an entire team may use a rollback to return to a previous version of a database.</p>\n<h3>Overview</h3>\n<p>Often we want to pre-populate our database with sample data for testing. <strong>Seeds</strong> allow us to add and reset sample data easily.</p>\n<h3>Follow Along</h3>\n<p>The Knex command-line tool offers a way to <strong>seed</strong> our database; in other words, pre-populate our tables.</p>\n<p>Similarly to migrations, we want to customize where our seed files are generated using our <code>knexfile</code></p>\n<pre><code>development: {\n    client: 'sqlite3',\n    connection: {\n      filename: './data/produce.db3',\n    },\n    useNullAsDefault: true,\n    // generates migration files in a data/migrations/ folder\n    migrations: {\n      directory: './data/migrations'\n    },\n    seeds: {\n      directory: './data/seeds'\n    }\n  }\n</code></pre>\n<p>To create a seed run: <code>knex seed:make 001-seedName</code></p>\n<p>Numbering is a good idea because Knex doesn't attach a timestamp to the name like migrate does. Adding numbers to the file name, we can control the order in which they run.</p>\n<p>We want to create seeds for our accounts table:</p>\n<p><code>knex seed:make 001-accounts</code></p>\n<p>A file will appear in the designated seed folder.</p>\n<pre><code>exports.seed = function(knex, Promise) {\n  // we want to remove all data before seeding\n  // truncate will reset the primary key each time\n  return knex('accounts').truncate()\n    .then(function () {\n      // add data into insert\n      return knex('accounts').insert([\n        { name: 'Stephenson', budget: 10000 },\n        { name: 'Gordon &#x26; Gale', budget: 40400 },\n      ]);\n    });\n};\n</code></pre>\n<p>Run the seed files by typing:</p>\n<p><code>knex seed:run</code></p>\n<p>You can now use SQLite Studio to confirm that the accounts table has two entries.</p>\n<hr>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>### SQL & PostgreSQL\n<p><strong>Foreign keys</strong> are a type of table field used for creating links between tables. Like <strong>primary keys</strong>, they are most often integers that identify (rather than store) data. However, whereas a primary key is used to id rows in a table, foreign keys are used to connect a record in one table to a record in a second table.</p>\n<h3></h3>\n<p>Consider the following <code>farms</code> and <code>ranchers</code> tables.</p>\n<p><a href=\"https://www.notion.so/5b20c5e233dd4a70a33d6ab2c2e1c8bb\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/0b0a909c24a9474fb9df80938546f12a\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>The <code>farm_id</code> in the <code>ranchers</code> table is an example of a <code>foreign key</code>. Each entry in the <code>farm_id</code> (foreign key) column corresponds to an <code>id</code> (primary key) in the <code>farms</code> table. This allows us to track which farm each rancher belongs to while keeping the tables normalized.</p>\n<p>If we could only see the <code>ranchers</code> table, we would know that John, Jane, and Jen all work together and that Jim and Jay also work together. However, to know where any of them work, we would need to look at the <code>farms</code> table.</p>\n<p>Now that we understand the basics of querying data from a single table, let's move on to selecting data from multiple tables using JOIN operations.</p>\n<h3>Overview</h3>\n<p>We can use a <code>JOIN</code> to combine query data from multiple tables using a single <code>SELECT</code> statement.</p>\n<p>There are different types of joins; some are listed below:</p>\n<ul>\n<li><span id=\"d886\">inner joins.</span></li>\n<li><span id=\"43f5\">outer joins.</span></li>\n<li><span id=\"882e\">left joins.</span></li>\n<li><span id=\"ad86\">right joins.</span></li>\n<li><span id=\"4d8b\">cross joins.</span></li>\n<li><span id=\"eb21\">non-equality joins.</span></li>\n<li><span id=\"fc6a\">self joins.</span></li>\n</ul>\n<p>Using <code>joins</code> requires that the two tables of interest contain at least one field with shared information. For example, if a <em>departments</em> table has an <em>id</em> field, and an employee table has a <em>department</em>id_ field, and the values that exist in the <em>id</em> column of the <em>departments</em> table live in the <em>department</em>id_ field of the employee table, we can use those fields to join both tables like so:</p>\n<pre><code>select * from employees\njoin departments on employees.department_id = departments.id\n</code></pre>\n<p>This query will return the data from both tables for every instance where the <code>ON</code> condition is true. If there are employees with no value for department<em>id or where the value stored in the field does not correspond to an existing id in the</em> departments <em>table, then that record will NOT be returned. In a similar fashion, any records from the</em> departments <em>table that don't have an employee associated with them will also be omitted from the results. Basically, if the</em> id* does not show as the value of department_id for an employee, it won't be able to join.</p>\n<p>We can shorten the condition by giving the table names an alias. This is a common practice. Below is the same example using aliases, picking which fields to return and sorting the results:</p>\n<pre><code>select d.id, d.name, e.id, e.first_name, e.last_name, e.salary\nfrom employees as e\njoin departments as d\n  on e.department_id = d.id\norder by d.name, e.last_name\n</code></pre>\n<p>Notice that we can take advantage of white space and indentation to make queries more readable.</p>\n<p>There are several ways of writing joins, but the one shown here should work on all database management systems and avoid some pitfalls, so we recommend it.</p>\n<p>The syntax for performing a similar join using Knex is as follows:</p>\n<pre><code>db('employees as e')\n  .join('departments as d', 'e.department_id', 'd.id')\n  .select('d.id', 'd.name', 'e.first_name', 'e.last_name', 'e.salary')\n</code></pre>\n<h3>Follow Along</h3>\n<p>A good explanation of how the different types of joins can be seen <a href=\"https://www.w3resource.com/sql/joins/sql-joins.php\" class=\"markup--anchor markup--p-anchor\">in this article from w3resource.com (Links to an external site.)</a>.</p>\n<h3>What is SQL Joins?</h3>\n<p>An SQL JOIN clause combines rows from two or more tables. It creates a set of rows in a temporary table.</p>\n<h3>How to Join two tables in SQL?</h3>\n<p>A JOIN works on two or more tables if they have at least one common field and have a relationship between them.</p>\n<p>JOIN keeps the base tables (structure and data) unchanged.</p>\n<h3>Join vs. Subquery</h3>\n<ul>\n<li><span id=\"6fdc\">JOINs are faster than a subquery and it is very rare that the opposite.</span></li>\n<li><span id=\"c648\">In JOINs the RDBMS calculates an execution plan, that can predict, what data should be loaded and how much it will take to processed and as a result this process save some times, unlike the subquery there is no pre-process calculation and run all the queries and load all their data to do the processing.</span></li>\n<li><span id=\"d59c\">A JOIN is checked conditions first and then put it into table and displays; where as a subquery take separate temp table internally and checking condition.</span></li>\n<li><span id=\"08ff\">When joins are using, there should be connection between two or more than two tables and each table has a relation with other while subquery means query inside another query, has no need to relation, it works on columns and conditions.</span></li>\n</ul>\n<h3>SQL JOINS: EQUI JOIN and NON EQUI JOIN</h3>\n<p>The are two types of SQL JOINS — EQUI JOIN and NON EQUI JOIN</p>\n<ol>\n<li><span id=\"2bb1\">SQL EQUI JOIN :</span></li>\n</ol>\n<p>The SQL EQUI JOIN is a simple SQL join uses the equal sign(=) as the comparison operator for the condition. It has two types — SQL Outer join and SQL Inner join.</p>\n<ol>\n<li><span id=\"a9be\">SQL NON EQUI JOIN :</span></li>\n</ol>\n<p>The <strong>SQL NON EQUI JOIN</strong> is a join uses comparison operator other than the equal sign like >, &#x3C;, >=, &#x3C;= with the condition.</p>\n<p><strong>SQL EQUI JOIN : INNER JOIN and OUTER JOIN</strong></p>\n<p>The SQL EQUI JOIN can be classified into two types — INNER JOIN and OUTER JOIN</p>\n<ol>\n<li><span id=\"cf44\">SQL INNER JOIN</span></li>\n</ol>\n<p>This type of EQUI JOIN returns all rows from tables where the key record of one table is equal to the key records of another table.</p>\n<ol>\n<li><span id=\"22a6\">SQL OUTER JOIN</span></li>\n</ol>\n<p>This type of EQUI JOIN returns all rows from one table and only those rows from the secondary table where the joined condition is satisfying i.e. the columns are equal in both tables.</p>\n<p>In order to perform a JOIN query, the required information we need are:</p>\n<p><strong>a)</strong> The name of the tables<strong>b)</strong> Name of the columns of two or more tables, based on which a condition will perform.</p>\n<p><strong>Syntax:</strong></p>\n<pre><code>FROM table1\njoin_type table2\n[ON (join_condition)]\n</code></pre>\n<p><strong>Parameters:</strong></p>\n<p><a href=\"https://www.notion.so/5522c3e6d5d0443eb870f7a34f60c7ff\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><strong>Pictorial Presentation of SQL Joins:</strong></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*2DcsnJXF_FOGhUtL.gif\" class=\"graf-image\" /></figure>**Example:**\n<p><strong>Sample table: company</strong></p>\n<p><strong>Sample table: foods</strong></p>\n<p>To join two tables 'company' and 'foods', the following SQL statement can be used :</p>\n<p><strong>SQL Code:</strong></p>\n<pre><code>SELECT  company.company_id,company.company_name,\nfoods.item_id,foods.item_name\nFROM company,foods;\n</code></pre>\n<p>Copy</p>\n<p>Output:</p>\n<pre><code>COMPAN COMPANY_NAME              ITEM_ID  ITEM_NAME\n------ ------------------------- -------- ---------------\n18     Order All                 1        Chex Mix\n18     Order All                 6        Cheez-It\n18     Order All                 2        BN Biscuit\n18     Order All                 3        Mighty Munch\n18     Order All                 4        Pot Rice\n18     Order All                 5        Jaffa Cakes\n18     Order All                 7        Salt n Shake\n15     Jack Hill Ltd             1        Chex Mix\n15     Jack Hill Ltd             6        Cheez-It\n15     Jack Hill Ltd             2        BN Biscuit\n15     Jack Hill Ltd             3        Mighty Munch\n15     Jack Hill Ltd             4        Pot Rice\n15     Jack Hill Ltd             5        Jaffa Cakes\n15     Jack Hill Ltd             7        Salt n Shake\n16     Akas Foods                1        Chex Mix\n16     Akas Foods                6        Cheez-It\n16     Akas Foods                2        BN Biscuit\n16     Akas Foods                3        Mighty Munch\n16     Akas Foods                4        Pot Rice\n16     Akas Foods                5        Jaffa Cakes\n16     Akas Foods                7        Salt n Shake\n.........\n.........\n.........\n</code></pre>\n<h3>Overview</h3>\n<p>While we can write database code directly into our endpoints, best practices dictate that all database logic exists in separate, modular methods. These files containing database access helpers are often called <strong>models</strong></p>\n<h3>Follow Along</h3>\n<p>To handle CRUD operations for a single resource, we would want to create a <strong>model</strong> (or database access file) containing the following methods:</p>\n<pre><code>function find() {\n}\n\nfunction findById(id) {\n}\n\nfunction add(user) {\n}\n\nfunction update(changes, id) {\n}\n\nfunction remove(id) {\n}\n</code></pre>\n<p>Each of these functions would use Knex logic to perform the necessary database operation.</p>\n<pre><code>function find() {\n  return db('users');\n}\n</code></pre>\n<p>For each method, we can choose what value to return. For example, we may prefer <code>findById()</code> to return a single <code>user</code> object rather than an array.</p>\n<pre><code>function findById(id) {\n// first() returns the first entry in the db matching the query\n  return db('users').where({ id }).first();\n}\n</code></pre>\n<p>We can also use existing methods like <code>findById()</code> to help <code>add()</code> return the new user (instead of just the id).</p>\n<pre><code>function add(user) {\n  db('users').insert(user)\n    .then(ids => {\n      return findById(ids[0]);\n    });\n}\n</code></pre>\n<p>Once all methods are written as desired, we can export them like so:</p>\n<pre><code>module.exports = {\n  find,\n  findById,\n  add,\n  update,\n  delete,\n}\n</code></pre>\n<p>…and use the helpers in our endpoints</p>\n<pre><code>const User = require('./user-model.js');\n\nrouter.get('/', (req, res) => {\n  User.find()\n    .then(users => {\n      res.json(users);\n    })\n    .catch(&#x26;nbsp;err => {});\n});\n</code></pre>\n<p>There should no be <code>knex</code> code in the endpoints themselves.</p>\n<hr>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>###\n<p><code>Normalization</code> is the process of designing or refactoring database tables for maximum consistency and minimum redundancy.</p>\n<p>With objects, we're used to <em>denormalized</em> data, stored with ease of use and speed in mind. Non-normalized tables are considered ineffective in relational databases.</p>\n<h3></h3>\n<p><strong>Data normalization</strong> is a deep topic in database design. To begin thinking about it, we'll explore a few basic guidelines and some data examples that violate these rules.</p>\n<h3>Normalization Guidelines</h3>\n<blockquote>\n<p>Each record has a primary key.</p>\n</blockquote>\n<blockquote>\n<p>No fields are repeated.</p>\n</blockquote>\n<blockquote>\n<p>All fields relate directly to the key data.</p>\n</blockquote>\n<blockquote>\n<p>Each field entry contains a single data point.</p>\n</blockquote>\n<blockquote>\n<p>There are no redundant entries.</p>\n</blockquote>\n<h3>Denormalized Data</h3>\n<p><a href=\"https://www.notion.so/19a01f68a659470fb85bbe6906fb4bad\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>This table has two issues. There is no proper id field (as multiple farms may have the same name), and multiple fields are representing the same type of data: animals.</p>\n<p><a href=\"https://www.notion.so/075ad6dd99ac48698625d7b56ca67bef\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>While we have now eliminated the first two issues, we now have multiple entries in one field, separated by commas. This isn't good either, as its another example of denormalization. There is no “array” data type in a relational database, so each field must contain only one data point.</p>\n<p><a href=\"https://www.notion.so/375a15b0cb3f444a8698cd6cb3a08fe0\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>Now we've solved the multiple fields issue, but we created repeating data (the farm field), which is also an example of denormalization. As well, we can see that if we were tracking additional ranch information (such as annual revenue), that field is only vaguely related to the animal information.</p>\n<p><strong>When these issues begin arising in your schema design, it means that you should separate information into two or more tables.</strong></p>\n<h3>Anomalies</h3>\n<p>Obeying the above guidelines prevent <strong>anomalies</strong> in your database when inserting, updating, or deleting. For example, imagine if the revenue of Beech Ranch changed. With our denormalized schema, it may get updated in some records but not others:</p>\n<p><a href=\"https://www.notion.so/e05f5b2e8ff141798adc6f188f56f31e\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>Similarly, if Beech Ranch shut down, there would be three (if not more) records that needed to be deleted to remove a single farm.</p>\n<p>Thus a denormalized table opens the door for contradictory, confusing, and unusable data.</p>\n<h3></h3>\n<p>What issues does the following table have?</p>\n<p><a href=\"https://www.notion.so/2793e8f6b70a47f48f9208779366e69e\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<h3></h3>\n<p>There are three types of relationships:</p>\n<blockquote>\n<p>One to one.</p>\n</blockquote>\n<blockquote>\n<p>One to many.</p>\n</blockquote>\n<blockquote>\n<p>Many to many.</p>\n</blockquote>\n<p>Determining how data is related can provide a set of guidelines for table representation and guides the use of foreign keys to connect said tables.</p>\n<h3></h3>\n<h3>One to One Relationships</h3>\n<p>Imagine we are storing the financial projections for a series of farms.</p>\n<p>We may wish to attach fields like farm name, address, description, projected revenue, and projected expenses. We could divide these fields into two categories: information related to the farm directly (name, address, description) and information related to the financial projections (revenue, expenses).</p>\n<p>We would say that <code>farms</code> and <code>projections</code> have a <strong>one-to-one</strong> relationship. This is to say that every farm has exactly one projection, and every project corresponds to exactly one farm.</p>\n<p>This data can be represented in two tables: <code>farms</code> and <code>projections</code></p>\n<p><a href=\"https://www.notion.so/944e594f3464473ea06383bfdea13265\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/de32fcf6760e45f284707274433fee92\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>The <code>farm_id</code> is the foreign key that links <code>farms</code> and <code>projections</code> together.</p>\n<p>Notes about one-to-one relationships:</p>\n<ul>\n<li><span id=\"198d\">The foreign key should always have a <code>unique</code> constraint to prevent duplicate entries. In the example above, we wouldn't want to allow multiple projections records for one farm.</span></li>\n<li><span id=\"25c6\">The foreign key can be in either table. For example, we may have had a <code>projection_id</code> in the <code>farms</code> table instead. A good rule of thumb is to put the foreign key in whichever table is more auxiliary to the other.</span></li>\n<li><span id=\"960d\">You can represent one-to-one data in a single table <em>without</em> creating anomalies. However, it is sometimes prudent to use two tables as shown above to keep separate concerns in separate tables.</span></li>\n</ul>\n<h3>One to Many Relationships</h3>\n<p>Now imagine, we are storing the full-time ranchers employed at each farm. In this case, each rancher would only work at one farm however, each farm may have multiple ranchers.</p>\n<p>This is called a <strong>one-to-many</strong> relationship.</p>\n<p>This is the most common type of relationship between entities. Some other examples:</p>\n<ul>\n<li><span id=\"5627\">One <code>customer</code> can have many <code>orders</code>.</span></li>\n<li><span id=\"cc42\">One <code>user</code> can have many <code>posts</code>.</span></li>\n<li><span id=\"dae3\">One <code>post</code> can have many <code>comments</code>.</span></li>\n</ul>\n<p>Manage this type of relationship by adding a foreign key on the “many” table of the relationship that points to the primary key on the “one” table. Consider the <code>farms</code> and <code>ranchers</code> tables.</p>\n<p><a href=\"https://www.notion.so/7dfd2e69c9804a01845f2e9b716a5ac2\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/c95f3d418db94ab4b4532eeba0e4f918\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>In a many-to-many relationship, the foreign key (in this case <code>farm_id</code>) should <em>not</em> be unique.</p>\n<h3>Many to Many Relationships</h3>\n<p>If we want to track animals on a farm as well, we must explore the <strong>many-to-many</strong> relationship. A farm has multiple animals, and multiple of each type of animal is present at multiple different farms.</p>\n<p>Some other examples:</p>\n<ul>\n<li><span id=\"d757\">an <code>order</code> can have many <code>products</code> and the same <code>product</code> will appear in many <code>orders</code>.</span></li>\n<li><span id=\"0256\">a <code>book</code> can have more than one <code>author</code>, and an <code>author</code> can write more than one <code>book</code>.</span></li>\n</ul>\n<p>To model this relationship, we need to introduce an <strong>intermediary table</strong> that holds foreign keys that reference the primary key on the related tables. We now have a <code>farms</code>, <code>animals</code>, and <code>farm_animals</code> table.</p>\n<p><a href=\"https://www.notion.so/3269812d7c2a4578b1a9f6bc27e485b1\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/c2642c7f632f489cb1b9639c80b8400d\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p><a href=\"https://www.notion.so/d0b0042c5e104edd9ed55e122af89084\" class=\"markup--anchor markup--p-anchor\">Untitled</a></p>\n<p>While each foreign key on the intermediary table is not unique, the combinations of keys should be unique.</p>\n<h3></h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*9xpwm_56lgvHkFTKsmoMqg.gif\" class=\"graf-image\" /></figure>The Knex query builder library also allows us to create multi-table schemas include foreign keys. However, there are a few extra things to keep in mind when designing a multi-table schema, such as using the correct order when creating tables, dropping tables, seeding data, and removing data.\n<p>We have to consider the way that <code>delete</code> and <code>updates</code> through our API will impact related data.</p>\n<h3></h3>\n<h3>Foreign Key Setup</h3>\n<p>In Knex, foreign key restrictions don't automatically work. Whenever using foreign keys in your schema, add the following code to your <code>knexfile</code>. This will prevent users from entering bad data into a foreign key column.</p>\n<pre><code>development: {\n  client: 'sqlite3',\n  useNullAsDefault: true,\n  connection: {\n    filename: './data/database.db3',\n  },\n  // needed when using foreign keys\n  pool: {\n    afterCreate: (conn, done) => {\n      // runs after a connection is made to the sqlite engine\n      conn.run('PRAGMA foreign_keys = ON', done); // turn on FK enforcement\n    },\n  },\n},\n</code></pre>\n<h3>Migrations</h3>\n<p>Let's look at how we might track our <code>farms</code> and <code>ranchers</code> using Knex. In our migration file's <code>up</code> function, we would want to create two tables:</p>\n<pre><code>exports.up = function(knex, Promise) {\n  return knex.schema\n    .createTable('farms', tbl => {\n      tbl.increments();\n      tbl.string('farm_name', 128)\n        .notNullable();\n    })\n    // we can chain together createTable\n    .createTable('ranchers', tbl => {\n      tbl.increments();\n      tbl.string('rancher_name', 128);\n      tbl.integer('farm_id')\n        // forces integer to be positive\n        .unsigned()\n        .notNullable()\n        .references('id')\n        // this table must exist already\n        .inTable('farms')\n    })\n};\n</code></pre>\n<p>Note that the foreign key can only be created <em>after</em> the reference table.</p>\n<p>In the down function, the opposite is true. We always want to drop a table with a foreign key <em>before</em> dropping the table it references.</p>\n<pre><code>exports.down = function(knex, Promise) {\n  // drop in the opposite order\n  return knex.schema\n    .dropTableIfExists('ranchers')\n    .dropTableIfExists('farms')\n};\n</code></pre>\n<p>In the case of a many-to-many relationship, the syntax for creating an intermediary table is identical, except for one additional piece. We need a way to make sure our combination of foreign keys is unique.</p>\n<pre><code>.createTable('farm_animals', tbl => {\n  tbl.integer('farm_id')\n    .unsigned()\n    .notNullable()\n    .references('id')\n    // this table must exist already\n    .inTable('farms')\n  tbl.integer('animal_id')\n    .unsigned()\n    .notNullable()\n    .references('id')\n    // this table must exist already\n    .inTable('animals')\n\n// the combination of the two keys becomes our primary key\n  // will enforce unique combinations of ids\n  tbl.primary(['farm_id', 'animal_id']);\n});\n</code></pre>\n<h3>Seeds</h3>\n<p>Order is also a concern when seeding. We want to create seeds in the <strong>same</strong> order we created our tables. In other words, don't create a seed with a foreign key, until that reference record exists.</p>\n<p>In our example, make sure to write the <code>01-farms</code> seed file and then the <code>02-ranchers</code> seed file.</p>\n<p>However, we run into a problem with truncating our seeds, because we want to truncate <code>02-ranchers</code> <em>before</em> <code>01-farms</code>. A library called <code>knex-cleaner</code> provides an easy solution for us.</p>\n<p>Run <code>knex seed:make 00-cleanup</code> and <code>npm install knex-cleaner</code>. Inside the cleanup seed, use the following code.</p>\n<pre><code>const cleaner = require('knex-cleaner');\n\nexports.seed = function(knex) {\n  return cleaner.clean(knex, {\n    mode: 'truncate', // resets ids\n    ignoreTables: ['knex_migrations', 'knex_migrations_lock'], // don't empty migration tables\n  });\n};\n</code></pre>\n<p>This removes all tables (excluding the two tables that track migrations) in the correct order before any seed files run.</p>\n<h3>Cascading</h3>\n<p>If a user attempt to delete a record that is referenced by another record (such as attempting to delete <code>Morton Ranch</code> when entries in our <code>ranchers</code> table reference that record), by default, the database will block the action. The same thing can happen when updating a record when a foreign key reference.</p>\n<p>If we want that to override this default, we can delete or update with <strong>cascade</strong>. With cascade, deleting a record also deletes all referencing records, we can set that up in our schema.</p>\n<pre><code>.createTable('ranchers', tbl => {\n    tbl.increments();\n    tbl.string('rancher_name', 128);\n    tbl.integer('farm_id')\n    .unsigned()\n    .notNullable()\n    .references('id')\n    .inTable('farms')\n    .onUpdate('CASCADE');\n    .onDelete('CASCADE')\n})\n</code></pre>"},{"url":"/docs/data-structures/big-o/","relativePath":"docs/data-structures/big-o.md","relativeDir":"docs/data-structures","base":"big-o.md","name":"big-o","frontmatter":{"title":"Big-O Notation","weight":0,"excerpt":"Why is looking at runtime not a reliable method of calculating time complexity?","seo":{"title":"Big-O Notation","description":"A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example","robots":[],"extra":[]},"template":"docs"},"html":"<h1>A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example</h1>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*yjlSk3T9c2_14in1.png\"></p>\n<iframe frameborder=\"0\" width=\"100%\" height=\"500px\" src=\"https://replit.com/@bgoonz/Medium-article-comp-complex?lite=true\"></iframe>\n<ul>\n<li>Why is looking at runtime not a reliable method of calculating time complexity?</li>\n<li>Not all computers are made equal( some may be stronger and therefore boost our runtime speed )</li>\n<li>How many background processes ran concurrently with our program that was being tested?</li>\n<li>We also need to ask if our code remains performant if we increase the size of the input.</li>\n<li>\n<p>The real question we need to answering is: <code>How does our performance scale?</code>.</p>\n<iframe src=\"https://codepen.io/bgoonz/embed/preview/RwKYRoo?height=600&amp;slug-hash=RwKYRoo&amp;default-tabs=js,result&amp;host=https://codepen.io\" width=\"100%\" height=\"500px\"  frameborder=\"0\" scrolling=\"no\"></iframe>\n### big 'O' notation\n</li>\n<li>Big O Notation is a tool for describing the efficiency of algorithms with respect to the size of the input arguments.</li>\n<li>Since we use mathematical functions in Big-O, there are a few big picture ideas that we'll want to keep in mind:</li>\n<li>The function should be defined by the size of the input.</li>\n<li><code>Smaller</code> Big O is better (lower time complexity)</li>\n<li>Big O is used to describe the worst case scenario.</li>\n<li>Big O is simplified to show only its most dominant mathematical term.</li>\n</ul>\n<h3>Simplifying Math Terms</h3>\n<ul>\n<li>We can use the following rules to simplify the our Big O functions:</li>\n<li><code>Simplify Products</code> : If the function is a product of many terms, we drop the terms that don't depend on n.</li>\n<li><code>Simplify Sums</code> : If the function is a sum of many terms, we drop the non-dominant terms.</li>\n<li><code>n</code> : size of the input</li>\n<li><code>T(f)</code> : unsimplified math function</li>\n<li><code>O(f)</code> : simplified math function.</li>\n</ul>\n<p><code>Putting it all together</code></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/1*TT8uuv1x3nmGUw5rvtoZ8A.png\"></p>\n<ul>\n<li>First we apply the product rule to drop all constants.</li>\n<li>Then we apply the sum rule to select the single most dominant term.</li>\n</ul>\n<hr>\n<h3>Complexity Classes</h3>\n<p>Common Complexity Classes</p>\n<h4>There are 7 major classes in Time Complexity</h4>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/1*6zKhmJoHkvDbrd8jfUDf3A.png\"></p>\n<h4><code>O(1) Constant</code></h4>\n<blockquote>\n<p><strong>The algorithm takes roughly the same number of steps for any input size.</strong></p>\n</blockquote>\n<h4><code>O(log(n)) Logarithmic</code></h4>\n<blockquote>\n<p><strong>In most cases our hidden base of Logarithmic time is 2, log complexity algorithm's will typically display 'halving' the size of the input (like binary search!)</strong></p>\n</blockquote>\n<pre><code class=\"language-js\">// O(log(n))\nfunction logarithmic1(n) {\n  if (n &#x3C;= 1) return;\n  logarithmic1(n / 2);\n}\n\n// O(log(n))\nfunction logarithmic2(n) {\n  let i = n;\n  while (i > 1) {\n    i /= 2;\n  }\n}\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/a1e6dec81f0639818db7f9a8e76b3992/raw/ee8d492025cc76e76c91cb15c3c2ec29b3ffb616/logorithmic.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/a1e6dec81f0639818db7f9a8e76b3992#file-logorithmic-js\">logorithmic.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h4><code>O(n) Linear</code></h4>\n<blockquote>\n<p><strong>Linear algorithm's will access each item of the input \"once\".</strong></p>\n</blockquote>\n<pre><code class=\"language-js\">// O(n)\nfunction linear1(n) {\n  for (let i = 1; i &#x3C;= n; i++) {\n    console.log(i);\n  }\n}\n\n// O(n), where n is the length of the array\nfunction linear2(array) {\n  for (let i = 0; i &#x3C; array.length; i++) {\n    console.log(i);\n  }\n}\n\n// O(n)\nfunction linear3(n) {\n  if (n === 1) return;\n  linear3(n - 1);\n}\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/cc953ba2bd6e1d6f524a6d8b297aad5b/raw/f3b470ce20d77e52bf25d0749149c5a724099ff2/linear.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/cc953ba2bd6e1d6f524a6d8b297aad5b#file-linear-js\">linear.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3><code>O(nlog(n)) Log Linear Time</code></h3>\n<blockquote>\n<p><strong>Combination of linear and logarithmic behavior, we will see features from both classes.</strong></p>\n</blockquote>\n<blockquote>\n<p>Algorithm's that are log-linear will use** both recursion AND iteration.**</p>\n</blockquote>\n<pre><code class=\"language-js\">// O(n * log(n))\nfunction loglinear(n) {\n  if (n &#x3C;= 1) return;\n\n  for (let i = 1; i &#x3C;= n; i++) {\n    console.log(i);\n  }\n\n  loglinear(n / 2);\n  loglinear(n / 2);\n}\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/e9bd6337c17f1623a4da088574ed0d8e/raw/7680dadbfd6dd058f4ecde2085d160019b782282/loglin.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/e9bd6337c17f1623a4da088574ed0d8e#file-loglin-js\">loglin.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3><code>O(nc) Polynomial</code></h3>\n<blockquote>\n<p><strong>C is a fixed constant.</strong>\n`</p>\n</blockquote>\n<pre><code class=\"language-js\">// O(n^2)\nfunction quadratic(n) {\n  for (let i = 1; i &#x3C;= n; i++) {\n    for (let j = 1; j &#x3C;= n; j++) {}\n  }\n}\n//Example of Quadratic and Cubic runtime.\n// O(n^3)\nfunction cubic(n) {\n  for (let i = 1; i &#x3C;= n; i++) {\n    for (let j = 1; j &#x3C;= n; j++) {\n      for (let k = 1; k &#x3C;= n; k++) {}\n    }\n  }\n}\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/3e6096e66bac80b962435b7d873cdbe9/raw/255fae18df5ce42945ba19f9b83f122b83a4738b/poly.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/3e6096e66bac80b962435b7d873cdbe9#file-poly-js\">poly.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3><code>O(c^n) Exponential</code></h3>\n<blockquote>\n<p><strong>C is now the number of recursive calls made in each stack frame.</strong></p>\n</blockquote>\n<blockquote>\n<p><strong>Algorithm's with exponential time are VERY SLOW.</strong></p>\n</blockquote>\n<pre><code class=\"language-js\">// O(2^n)\nfunction exponential2n(n) {\n  if (n === 1) return;\n  exponential_2n(n - 1);\n  exponential_2n(n - 1);\n}\n\n// O(3^n)\nfunction exponential3n(n) {\n  if (n === 0) return;\n  exponential_3n(n - 1);\n  exponential_3n(n - 1);\n  exponential_3n(n - 1);\n}\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/5dec7e3736d7b5e28a5f1c85b5b50705/raw/68270be48d6a30bb5d889ca83ee6810813018601/exponential.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/5dec7e3736d7b5e28a5f1c85b5b50705#file-exponential-js\">exponential.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<hr>\n<h3>Memoization</h3>\n<ul>\n<li>Memoization : a design pattern used to reduce the overall number of calculations that can occur in algorithms that use recursive strategies to solve.</li>\n<li>MZ stores the results of the sub-problems in some other data structure, so that we can avoid duplicate calculations and only 'solve' each problem once.</li>\n<li>Two features that comprise memoization:</li>\n<li>FUNCTION MUST BE RECURSIVE.</li>\n<li>Our additional Data Structure is usually an object (we refer to it as our memo... or sometimes cache!)</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/1*4U79jBMjU2wKE_tyYcD_3A.png\"></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/1*Qh42KZgcCxmVt6WrTasCVw.png\"></p>\n<h3>Memoizing Factorial</h3>\n<p>Our memo object is <em>mapping</em> out our arguments of factorial to it's return value.</p>\n<ul>\n<li>Keep in mind we didn't improve the speed of our algorithm.</li>\n</ul>\n<h3>Memoizing Fibonacci</h3>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*2XaPj7UGKZYFjYhb\"></p>\n<ul>\n<li>Our time complexity for Fibonacci goes from O(2^n) to O(n) after applying memoization.</li>\n</ul>\n<h3>The Memoization Formula</h3>\n<blockquote>\n<p><em>Rules:</em></p>\n</blockquote>\n<ol>\n<li><em>Write the unoptimized brute force recursion (make sure it works);</em></li>\n<li><em>Add memo object as an additional argument .</em></li>\n<li><em>Add a base case condition that returns the stored value if the function's argument is in the memo.</em></li>\n<li><em>Before returning the result of the recursive case, store it in the memo as a value and make the function's argument it's key.</em></li>\n</ol>\n<h4>Things to remember</h4>\n<ol>\n<li><em>When solving DP problems with Memoization, it is helpful to draw out the visual tree first.</em></li>\n<li><em>When you notice duplicate sub-tree's that means we can memoize.</em></li>\n</ol>\n<pre><code class=\"language-js\">   function fastFib(n, memo = {}) { \n   if (n in memo) return memo[n]; \n   if (n === 1 || n === 2) return 1; \n   memo[n] = fastFib(n - 1, memo) + fastFib(n - 2, memo); \n   return memo[n]; \n   } \n   fastFib(6); // => 8 \n   fastFib(50); // => 12586269025 |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/c15feb228a51a3543625009c8fd0b6de/raw/2c3d2998221f0b375bcece6dab8916c598ff9e03/fastfib.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/c15feb228a51a3543625009c8fd0b6de#file-fastfib-js\">fastfib.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<hr>\n<h3>Tabulation</h3>\n<h4>Tabulation Strategy</h4>\n<blockquote>\n<p>Use When:</p>\n</blockquote>\n<ul>\n<li><strong>The function is iterative and not recursive.</strong></li>\n<li><em>The accompanying DS is usually an array.</em></li>\n</ul>\n<pre><code class=\"language-js\">   function fib(n) { \n   let mostRecentCalcs = [0, 1]; \n   if (n === 0) return mostRecentCalcs[0]; \n   for (let i = 2; i &#x3C;= n; i++) { \n   const [secondLast, last] = mostRecentCalcs; \n   mostRecentCalcs = [last, secondLast + last]; \n   } \n   return mostRecentCalcs[1]; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/a57bf449f5a8b16eedd1aa9fd71707e2/raw/9c6cff4bb301bc4f9a87ebb9c0399a8c56ccb083/tabfib.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/a57bf449f5a8b16eedd1aa9fd71707e2#file-tabfib-js\">tabfib.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h4>Steps for tabulation</h4>\n<ul>\n<li><em>Create a table array based off the size of the input.</em></li>\n<li><em>Initialize some values in the table to 'answer' the trivially small subproblem.</em></li>\n<li><em>Iterate through the array and fill in the remaining entries.</em></li>\n<li><em>Your final answer is usually the last entry in the table.</em></li>\n</ul>\n<hr>\n<h3>Memo and Tab Demo with Fibonacci</h3>\n<blockquote>\n<p><em>Normal Recursive Fibonacci</em></p>\n</blockquote>\n<p>function fibonacci(n) {<br>\nif (n &#x3C;= 2) return 1;<br>\nreturn fibonacci(n - 1) + fibonacci(n - 2);<br>\n}</p>\n<blockquote>\n<p><em>Memoization Fibonacci 1</em></p>\n</blockquote>\n<pre><code class=\"language-js\">   function fibMemo(n, memo = { 0: 0, 1: 1 }) { \n   if (n in memo) return memo[n]; \n   memo[n] = fibMemo(n - 1) + fibMemo(n - 2); \n   return memo[n]; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/504a9120ca40bbb4a246549937c43a12/raw/5cb9cd921642d16ca1c86231c2387646dfad8daa/fib-memo.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/504a9120ca40bbb4a246549937c43a12#file-fib-memo-js\">fib-memo.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<blockquote>\n<p><em>Memoization Fibonacci 2</em></p>\n</blockquote>\n<pre><code class=\"language-js\">   function fib(n, memo) { \n   memo = memo || {}; \n   if (memo[n]) return memo[n]; \n   if (n &#x3C;= 2) return 1; \n   return (memo[n] = fib(n - 1, memo) + fib(n - 2, memo)); \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/07d315d92b3458a8640cee31bce9c236/raw/3425643262eb8389ce6fe4366c4ca7803dce2968/memo-fib2.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/07d315d92b3458a8640cee31bce9c236#file-memo-fib2-js\">memo-fib2.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<blockquote>\n<p><em>Tabulated Fibonacci</em></p>\n</blockquote>\n<pre><code class=\"language-js\">   function tabFib(n) { \n   let table = new Array(n); \n   table[0] = 0; \n   table[1] = 1; \n   table[2] = 1; \n   for (i = 3; i &#x3C;= n; i++) { \n   table[i] = table[i - 1] + table[i - 2]; \n   console.log(table); \n   } \n   return table[n]; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/b1b1f7e259193ecdc432350b6199f2d3/raw/dbaa48acf583535b11204569b7a0054bef5fe72e/tabfib.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/b1b1f7e259193ecdc432350b6199f2d3#file-tabfib-js\">tabfib.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3>Example of Linear Search</h3>\n<pre><code class=\"language-js\">   function search(array, term) { \n   for (let i = 0; i &#x3C; array.length; i++) { \n   if (array[i] === term) { \n   return i; \n   } \n   } \n   return -1; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/e98354b287ce2f80da4ab943399eb555/raw/fed7adac0a75d080573e20e62d64080c4880c867/linsearch.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/e98354b287ce2f80da4ab943399eb555#file-linsearch-js\">linsearch.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<ul>\n<li><em>Worst Case Scenario: The term does not even exist in the array.</em></li>\n<li><em>Meaning: If it doesn't exist then our for loop would run until the end therefore making our time complexity O(n).</em></li>\n</ul>\n<hr>\n<h3>Sorting Algorithms</h3>\n<h3>Bubble Sort</h3>\n<p><code>Time Complexity</code>: Quadratic O(n^2)</p>\n<ul>\n<li>The inner for-loop contributes to O(n), however in a worst case scenario the while loop will need to run n times before bringing all n elements to their final resting spot.</li>\n</ul>\n<p><code>Space Complexity</code>: O(1)</p>\n<ul>\n<li>Bubble Sort will always use the same amount of memory regardless of n.</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*Ck9aeGY-d5tbz7dT\"></p>\n<pre><code class=\"language-js\">   function swap(array, idx1, idx2) { \n   [array[idx1], array[idx2]] = [array[idx2], array[idx1]]; \n   } \n   function bubbleSort(array) { \n   let swapped = false; \n   while (!swapped) { \n   swapped = true; \n   for (let i = 0; i &#x3C; array.length; i++) { \n   if (array[i] > array[i + 1]) { \n   swap(array, i, i + 1); \n   swapped = false; \n   } \n   } \n   } \n   return array; \n   } \n   //Alt SLN------------------------------------------------- \n   function bubbleSort(array) { \n   let sorted = false; \n   while (!sorted) { \n   sorted = true; \n   for (let i = 0; i &#x3C; array.length; i++) { \n   if (array[i] > array[i + 1]) { \n   let temp = arr[i]; \n   array[i] = array[i + 1]; \n   array[i + 1] = temp; \n   sorted = false; \n   } \n   } \n   } \n   return array; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/e67e56bed7c5a20a54851867ba5efef6/raw/f0005f56a012a38607e194c89ff796aaad217788/bub2.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/e67e56bed7c5a20a54851867ba5efef6#file-bub2-js\">bub2.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<ul>\n<li>The first major sorting algorithm one learns in introductory programming courses.</li>\n<li>Gives an intro on how to convert unsorted data into sorted data.</li>\n</ul>\n<blockquote>\n<p>It's almost never used in production code because:</p>\n</blockquote>\n<ul>\n<li><em>It's not efficient</em></li>\n<li><em>It's not commonly used</em></li>\n<li><em>There is stigma attached to it</em></li>\n<li><code>*Bubbling Up*</code>* : Term that infers that an item is in motion, moving in some direction, and has some final resting destination.*</li>\n<li><em>Bubble sort, sorts an array of integers by bubbling the largest integer to the top.</em></li>\n</ul>\n<pre><code class=\"language-js\">   // Bubble Sort \n   function bubble(array) { \n   let sorted = true; \n   for (let i = 0; i &#x3C; array.length; i++) { \n   let num1 = array[i]; \n   let num2 = array[i + 1]; \n   if (num1 > num2) { \n   array[i + 1] = num1; \n   array[i] = num2; \n   sorted = false; \n   } \n   } \n   if (sorted) { \n   return array; \n   } else { \n   return bubble(array); \n   } \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/fd4acc0c89033bd219ebf9d3ec40b053/raw/14b00dabe615cdfaf39dce21b99edf038c345d94/bub.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/fd4acc0c89033bd219ebf9d3ec40b053#file-bub-js\">bub.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<pre><code class=\"language-js\">   function bubbleSort(items) { \n   let length = items.length; \n   for (let i = 0; i &#x3C; length; i++) { \n   for (let j = 0; j &#x3C; length - i - 1; j++) { \n   if (items[j] > items[j + 1]) { \n   let tmp = items[j]; \n   items[j] = items[j + 1]; \n   items[j + 1] = tmp; \n   } \n   } \n   } \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/80934783c628c70ac2a5a48119a82d54/raw/b99e87081b1f89fd363805bb3dee7195046b758d/bubble.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/80934783c628c70ac2a5a48119a82d54#file-bubble-js\">bubble.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<ul>\n<li><em>Worst Case &#x26; Best Case are always the same because it makes nested loops.</em></li>\n<li><em>Double for loops are polynomial time complexity or more specifically in this case Quadratic (Big O) of: O(n²)</em></li>\n</ul>\n<h3>Selection Sort</h3>\n<p><code>Time Complexity</code>: Quadratic O(n^2)</p>\n<ul>\n<li>Our outer loop will contribute O(n) while the inner loop will contribute O(n / 2) on average. Because our loops are nested we will get O(n²);</li>\n</ul>\n<p><code>Space Complexity</code>: O(1)</p>\n<ul>\n<li>Selection Sort will always use the same amount of memory regardless of n.</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*AByxtBjFrPVVYmyu\"></p>\n<pre><code class=\"language-js\">   function swap(array, idx1, idx2) { \n   [array[idx1], array[idx2]] = [array[idx2], array[idx2]]; \n   } \n   function selectionSort(array) { \n   for (let i = 0; i &#x3C; array.length; i++) { \n   let lowest = i; \n   for (let j = i + 1; j &#x3C; array.length; j++) { \n   if (list[j] &#x3C; list[lowest]) { \n   lowest = j; \n   } \n   } \n   if (place !== i) { \n   swap(array, i, lowest); \n   } \n   } \n   } \n   //Alt Solution---------------------------------------------------- \n   function selectionSort(array) { \n   for (let i = 0; i &#x3C; array.length; i++) { \n   let lowest = i; \n   for (let j = 0; j &#x3C; array.length; j++) { \n   if (array[j] &#x3C; array[i]) { \n   lowest = j; \n   } \n   } \n   if (lowest !== i) { \n   let temp = array[i]; \n   array[i] = array[lowest]; \n   array[lowest] = temp; \n   } \n   } \n   return array; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/4abc0fe0bf01599b0c4104b0ba633402/raw/2199dc275f3d5b7f6b56b103201fee492044aa0b/selectionsort.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/4abc0fe0bf01599b0c4104b0ba633402#file-selectionsort-js\">selectionsort.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<ul>\n<li>Selection sort organizes the smallest elements to the start of the array.</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*GeYNxlRcbt2cf0rY\"></p>\n<blockquote>\n<p>Summary of how Selection Sort should work:</p>\n</blockquote>\n<ol>\n<li><em>Set MIN to location 0</em></li>\n<li><em>Search the minimum element in the list.</em></li>\n<li><em>Swap with value at location Min</em></li>\n<li><em>Increment Min to point to next element.</em></li>\n<li><em>Repeat until list is sorted.</em></li>\n</ol>\n<pre><code class=\"language-js\">   let selectionSort = (arr) => { \n   let len = arr.length; \n   for (let i = 0; i &#x3C; len; i++) { \n   let min = i; \n   for (let j = i + 1; j &#x3C; len; j++) { \n   if (arr[min] > arr[j]) { \n   min = j; \n   } \n   } \n   if (min !== i) { \n   let tmp = arr[i]; \n   arr[i] = arr[min]; \n   arr[min] = tmp; \n   } \n   } \n   return arr; \n   }; |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/61f130c8e0097572ed908fe2629bdee0/raw/84be7efce4a0362fe9f6e34738c61769159f26f4/selectsort.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/61f130c8e0097572ed908fe2629bdee0#file-selectsort-js\">selectsort.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3>Insertion Sort</h3>\n<p><code>Time Complexity</code>: Quadratic O(n^2)</p>\n<ul>\n<li>Our outer loop will contribute O(n) while the inner loop will contribute O(n / 2) on average. Because our loops are nested we will get O(n²);</li>\n</ul>\n<p><code>Space Complexity</code>: O(n)</p>\n<ul>\n<li>Because we are creating a subArray for each element in the original input, our Space Comlexity becomes linear.</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*gbNU6wrszGPrfAZG\"></p>\n<pre><code class=\"language-js\">   function insertionSort(array) { \n   for (let i = 1; i &#x3C; array.length; i++) { \n   let value = list[i]; \n   let hole = i; \n   while (hole > 0 &#x26;&#x26; list[hole - 1] > value) { \n   list[hole] = list[hole - 1]; \n   hole--; \n   } \n   list[hole] = value; \n   } \n   return array; \n   } \n   //Alt Solution-------------------------------------------- \n   function insertionSort(arr) { \n   for (let i = 1; i &#x3C; arr.length; i++) { \n   let current = arr[i]; \n   let j = i - 1; \n   while (j > -1 &#x26;&#x26; current &#x3C; arr[j]) { \n   arr[j + 1] = arr[j]; \n   j--; \n   } \n   arr[j + 1] = current; \n   } \n   return arr; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/a9f4b8596c7546ac92746db659186d8c/raw/d8abcdb6ccc32e53120ec3a97a397cf4a032e225/insertionsort.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/a9f4b8596c7546ac92746db659186d8c#file-insertionsort-js\">insertionsort.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3>Merge Sort</h3>\n<p><code>Time Complexity</code>: Log Linear O(nlog(n))</p>\n<ul>\n<li>Since our array gets split in half every single time we contribute O(log(n)). The while loop contained in our helper merge function contributes O(n) therefore our time complexity is O(nlog(n)); <code>Space Complexity</code>: O(n)</li>\n<li>We are linear O(n) time because we are creating subArrays.</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*GeU8YwwCoK8GiSTD\"></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*IxqGb72XDVDeeiMl\"></p>\n<h3>Example of Merge Sort</h3>\n<pre><code class=\"language-js\">   function merge(leftArray, rightArray) { \n   const sorted = []; \n   while (letArray.length > 0 &#x26;&#x26; rightArray.length > 0) { \n   const leftItem = leftArray[0]; \n   const rightItem = rightArray[0]; \n   if (leftItem > rightItem) { \n   sorted.push(rightItem); \n   rightArray.shift(); \n   } else { \n   sorted.push(leftItem); \n   leftArray.shift(); \n   } \n   } \n   while (leftArray.length !== 0) { \n   const value = leftArray.shift(); \n   sorted.push(value); \n   } \n   while (rightArray.length !== 0) { \n   const value = rightArray.shift(); \n   sorted.push(value); \n   } \n   return sorted; \n   } \n   function mergeSort(array) { \n   const length = array.length; \n   if (length === 1) { \n   return array; \n   } \n   const middleIndex = Math.ceil(length / 2); \n   const leftArray = array.slice(0, middleIndex); \n   const rightArray = array.slice(middleIndex, length); \n   leftArray = mergeSort(leftArray); \n   rightArray = mergeSort(rightArray); \n   return merge(leftArray, rightArray); \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/18fbb7edc9f5c4820ccfcecacf3c5e48/raw/9e9157edcd1c4c2a795666eeff038bac405a9ff6/mergesort.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/18fbb7edc9f5c4820ccfcecacf3c5e48#file-mergesort-js\">mergesort.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<pre><code class=\"language-js\">   function merge(arr1, arr2) { \n   let result = []; \n   while (arr1.length &#x26;&#x26; arr2.length) { \n   if (arr1[0] &#x3C; arr2[0]) { \n   result.push(arr1.shift()); \n   } else { \n   result.push(arr2.shift()); \n   } \n   } \n   return [...result, ...arr1, ...arr2]; \n   } \n   function mergeSort(arr) { \n   if (arr.length &#x3C;= 1) return arr; \n   const mid = Math.floor(arr.length / 2); \n   const left = mergeSort(arr.slice(0, mid)); \n   const right = mergeSort(arr.slice(mid)); \n   return merge(left, right); \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/cbb533137a7f957d3bc4077395c1ff64/raw/8e1b1d82bcc6ef7a8350632740ad1bf38e660ec4/merge2.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/cbb533137a7f957d3bc4077395c1ff64#file-merge2-js\">merge2.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*HMCR--9niDt5zY6M\"></p>\n<ul>\n<li><strong>Merge sort is O(nlog(n)) time.</strong></li>\n<li><em>We need a function for merging and a function for sorting.</em></li>\n</ul>\n<blockquote>\n<p>Steps:</p>\n</blockquote>\n<ol>\n<li><em>If there is only one element in the list, it is already sorted; return the array.</em></li>\n<li><em>Otherwise, divide the list recursively into two halves until it can no longer be divided.</em></li>\n<li><em>Merge the smallest lists into new list in a sorted order.</em></li>\n</ol>\n<h3>Quick Sort</h3>\n<p><code>Time Complexity</code>: Quadratic O(n^2)</p>\n<ul>\n<li>Even though the average time complexity O(nLog(n)), the worst case scenario is always quadratic.</li>\n</ul>\n<p><code>Space Complexity</code>: O(n)</p>\n<ul>\n<li>Our space complexity is linear O(n) because of the partition arrays we create.</li>\n<li>QS is another Divide and Conquer strategy.</li>\n<li>Some key ideas to keep in mind:</li>\n<li>It is easy to sort elements of an array relative to a particular target value.</li>\n<li>An array of 0 or 1 elements is already trivially sorted.</li>\n</ul>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*WLl_HpdBGXYx284T\"></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*-LyHJXGPTYsWLDZf\"></p>\n<pre><code class=\"language-js\">   function quickSort(array) { \n   if (array.length &#x3C;= 1) return array; \n   let pivot = array.shift(); \n   let left = array.filter((x) => x &#x3C; pivot); \n   let right = array.filter((x) => x >= pivot); \n   let sortedLeft = quickSort(left); \n   let sortedRight = quickSort(right); \n   return [...sortedLeft, pivot, ...sortedRight]; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/24bcbc5248a8c4e1671945e9512da57e/raw/3a1022625e327a8f4ce2da191179532124a0fb2a/quicksort.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/24bcbc5248a8c4e1671945e9512da57e#file-quicksort-js\">quicksort.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3>Binary Search</h3>\n<p><code>Time Complexity</code>: Log Time O(log(n))</p>\n<p><code>Space Complexity</code>: O(1)</p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/0*-naVYGTXzE2Yoali\"></p>\n<blockquote>\n<p><em>Recursive Solution</em></p>\n</blockquote>\n<pre><code class=\"language-js\">   function binarySearch(array, target) { \n   if (array.length === 0) return false; \n   let midPt = Math.floor(array.length / 2); \n   if (array[midPt] === target) { \n   return true; \n   } else if (list[midPt] > target) { \n   return binarySearch(list.slice(0, mid), target); \n   } else { \n   return binarySearch(list.slice(midPt + 1), target); \n   } \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/c82c00a4bcba4b69b7d326d6cad3ac8c/raw/860f27bc6288ec672055b2d1becf3079b36486de/recur-bin-search.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/c82c00a4bcba4b69b7d326d6cad3ac8c#file-recur-bin-search-js\">recur-bin-search.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<blockquote>\n<p><em>Min Max Solution</em></p>\n</blockquote>\n<pre><code class=\"language-js\">   function binarySearch(array, target) { \n   let start = 0; \n   let end = array.length - 1; \n   while (start &#x3C;= end) { \n   let midpoint = Math.floor((start + end) / 2); \n   if (target === array[midpoint]) { \n   return midpoint; \n   } \n   if (target > array[midpoint]) { \n   start = midpoint + 1; \n   } \n   if (target &#x3C; array[midpoint]) { \n   end = midpoint - 1; \n   } \n   } \n   return -1; \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/eb8d1e1684db15cc2c8af28e13f38751/raw/25f8dd3250bf27dff4215f23e5f693b4ab54ebb7/minmaxbinsearch.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/eb8d1e1684db15cc2c8af28e13f38751#file-minmaxbinsearch-js\">minmaxbinsearch.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<pre><code class=\"language-js\">   function binarySearch(arr, x, start, end) { \n   if (start > end) return false; \n   let mid = Math.floor((start + end) / 2); \n   if (arr[mid] === x) return true; \n   if (arr[mid] > x) { \n   return binarySearch(arr, x, start, mid - 1); \n   } else { \n   return binarySearch(arr, x, mid + 1, end); \n   } \n   } |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/bc3f576b9795ccef12a108e36f9f820a/raw/341aedf69e77cde5a7ca8de3d80c4422ce0185b1/binsearch.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/bc3f576b9795ccef12a108e36f9f820a#file-binsearch-js\">binsearch.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<ul>\n<li><em>Must be conducted on a sorted array.</em></li>\n<li><em>Binary search is logarithmic time, not exponential b/c n is cut down by two, not growing.</em></li>\n<li><em>Binary Search is part of Divide and Conquer.</em></li>\n</ul>\n<h3>Insertion Sort</h3>\n<ul>\n<li><strong>Works by building a larger and larger sorted region at the left-most end of the array.</strong></li>\n</ul>\n<blockquote>\n<p>Steps:</p>\n</blockquote>\n<ol>\n<li><em>If it is the first element, and it is already sorted; return 1.</em></li>\n<li><em>Pick next element.</em></li>\n<li><em>Compare with all elements in the sorted sub list</em></li>\n<li><em>Shift all the elements in the sorted sub list that is greater than the value to be sorted.</em></li>\n<li><em>Insert the value</em></li>\n<li><em>Repeat until list is sorted.</em></li>\n</ol>\n<pre><code class=\"language-js\">   let insertionSort = (inputArr) => { \n   let length = inputArr.length; \n   for (let i = 1; i &#x3C; length; i++) { \n   let key = inputArr[i]; \n   let j = i - 1; \n   while (j >= 0 &#x26;&#x26; inputArr[j] > key) { \n   inputArr[j + 1] = inputArr[j]; \n   j = j - 1; \n   } \n   inputArr[j + 1] = key; \n   } \n   return inputArr; \n   }; |\n</code></pre>\n<p><a href=\"https://gist.github.com/eengineergz/ffead1de0836c4bcc6445780a604f617/raw/1838b4ddb05f78930479f71a6d64e239b71f63c1/insertionsort.js\">view raw</a><a href=\"https://gist.github.com/eengineergz/ffead1de0836c4bcc6445780a604f617#file-insertionsort-js\">insertionsort.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h3>If you found this guide helpful feel free to checkout my GitHub/gists where I host similar content:</h3>\n<p><a href=\"https://gist.github.com/bgoonz\" title=\"https://gist.github.com/bgoonz\"><strong>bgoonz's gists</strong><br>\n<em>Instantly share code, notes, and snippets. Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python |...</em>gist.github.com</a><a href=\"https://gist.github.com/bgoonz\"></a></p>\n<p><a href=\"https://github.com/bgoonz\" title=\"https://github.com/bgoonz\"><strong>bgoonz --- Overview</strong><br>\n<em>Web Developer, Electrical Engineer JavaScript | CSS | Bootstrap | Python | React | Node.js | Express | Sequelize...</em>github.com</a><a href=\"https://github.com/bgoonz\"></a></p>\n<h3>Or Checkout my personal Resource Site:</h3>\n<p><a href=\"https://bgoonz-blog.netlify.app/\" title=\"https://bgoonz-blog.netlify.app/\"><strong>Web-Dev-Hub</strong><br>\n<em>Memoization, Tabulation, and Sorting Algorithms by Example Why is looking at runtime not a reliable method of...</em>bgoonz-blog.netlify.app</a><a href=\"https://bgoonz-blog.netlify.app/\"></a></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/800/1*VCmj_H9AHs41oC9Yx1hZFQ.png\"></p>\n<pre><code class=\"language-js\">   /**************************************BIG-O***********************************/ \n   /***********************Common Algorithms for Analysis********************/ \n   //mdn Object; \n   //-**************-recursive factorial:*********************/ \n   /* \n   Factorial: the product of a given positive integer multiplied by all lesser positive integers: \n   The quantity four factorial (4!) = 4 ⋅ 3 ⋅ 2 ⋅ 1 = 24. \n   Symbol:n!, where n is the given integer. \n   */ \n   function factorial(n) { \n   if (n === 1) return 1; //* Base Case ... 1 * 1 = 1 \n   return n * factorial(n - 1); //* n! = n * (n-1) * (n-2) * (n-3) * ... * 1 \n   } \n   factorial(5); //*5 * 4 * 3 * 2 * 1 = 120 &#x3C;----expected \n   //console.log( \"factorial(5): \", factorial( 5 ) ); //- factorial(5): 120 \n   /* \n   Fibonacci numbers are the numbers such that every number in the series after the first two is the sum of the two preceding ones. \n   The series starts with 1, 1. Example -1, 1, 2, 3, 5, 8, 13, 21, 34, .... \n   Mathematical Expression: fib(n) = fib(n-1) + fib(n-2) \n   ! fib-tree-structure-diagram.png \n   https://miro.medium.com/max/700/1*svQ784qk1hvBE3iz7VGGgQ.jpeg \n   */ \n   function fibonacci(n) { \n   if (n === 1 || n === 2) return 1; \n   return fibonacci(n - 1) + fibonacci(n - 2); \n   } \n   fibonacci(5); \n   //console.log(\"fib(5): \", fibonacci(5)); //- fib(5): 5 \n   /* \n   the major differences between tabulation and memoization are: \n   1.) tabulation has to look through the entire search space; memoization does not \n   2.) tabulation requires careful ordering of the subproblems is; memoization doesn't care much about the order of recursive calls. \n   */ \n   const memo = { \n   0: 0, \n   1: 0, \n   2: 1, \n   }; \n   const fib = (n) => { \n   if (memo[n] !== undefined) return memo[n]; \n   const n1 = fib(n - 1); \n   const n2 = fib(n - 2); \n   memo[n] = fib(n - 1) + fib(n - 2); \n   return memo[n]; \n   }; \n   //console.log(\"fib(50): \", fib(20)); //- fib(50): 4181 \n   /******************End of Common Algorithms for Analysis*****************/ \n   /***********Comparing two functions that calculate the sum of all numbers from 1 up to n**********************/ \n   function addUpTo(n) { \n   let total = 0; \n   for (let i = 0; i &#x3C;= n; i++) { \n   //! Number of operations will grow with input n. \n   total += i; \n   } \n   return total; \n   } \n   addUpTo(4); \n   //console.log(\"addUpTo( 4 ): \", addUpTo(4)); //- addUpTo( 4 ): 10 \n   //! Would be O(n) or Linear Time. \n   //---------------------------------------------------------------- \n   /* \n   The infinite series whose terms are the natural numbers 1 + 2 + 3 + 4 + ⋯ is a divergent series. \n   The nth partial sum of the series is the triangular number( https://en.wikipedia.org/wiki/Triangular_number ) \n   addUpTo(n)=(n * (n + 1)) / 2 \n   https://wikimedia.org/api/rest_v1/media/math/render/svg/99476e25466549387c585cb4de44e90f6cbe4cf2 \n   */ \n   function constantAddUpTo(n) { \n   return (n * (n + 1)) / 2; \n   } \n   constantAddUpTo(4); //- constantAddUpTo(4): 10 \n   //console.log(\"constantAddUpTo(4): \", constantAddUpTo(4)); \n   //! Has three simple operations: 1 Multiplication 1 Addition 1 Division. \n   //!(Regardless of n) Would be O(1) or Constant Time. \n   /***********End of Comparing two functions that calculate the sum of all numbers from 1 up to n*******************/ \n   /* \n   !Simplifying Math Terms \n   We want our Big-O notation to describe the performance of our algorithm with respect to the input size and nothing else. \n   !Use the following rules to simplify our Big-O functions using the following rules: \n   1.) Simplify Products: if the function is a product of many terms, we drop the terms that don't depend on the size of the input. \n   2.) Simplify Sums: if the function is a sum of many terms, we keep the term with the largest growth rate and drop the other terms. \n   * n is the size of the input \n   * T(f) refers to an un-simplified mathematical function \n   * O(f) refers to the Big-O simplified mathematical function \n   * Simplifying a Product \n   If a function consists of a product of many factors, \n   !we drop the factors that don't depend on the size of the input, n. \n   The factors that we drop are called constant factors because their size remains consistent as we increase the size of the input. \n   examples-of-big-O-simplification.png \n   simplifying-a-sum.png \n   simp-examples.png \n   */ \n   /***********Comparing two functions with nested for loops*********************/ \n   // function countUpAndDown(n) { \n   // console.log(\"going up!\"); \n   // for (let i = 0; i &#x3C; n; i++) { \n   // console.log(i); \n   // } \n   // console.log(\"at the top, going down!\"); \n   // for (let j = n - 1; j >= 0; j--) { \n   // console.log(j); \n   // } \n   // console.log(\"Back down, bye!\"); \n   // } \n   // countUpAndDown(5); \n   // console.log(\"countUpAndDown(5): \", countUpAndDown(5)); \n   /* \n   going up! \n   0 1 2 3 4 \n   at the top, going down! \n   4 3 2 1 0 \n   Back down, bye! \n   countUpAndDown(5): undefined //- because there was no return statment... only console.log \n   */ \n   //------------------------------------------------ \n   //!Both loops are O(n) but since we just want the big picture, O(n); \n   //----------------------------------------------- \n   // function printAllPairs(n) { \n   // for (let i = 0; i &#x3C; n; i++) { \n   // for (let j = 0; j &#x3C; n; j++) { \n   // console.log(i, j); \n   // } \n   // } \n   // } \n   // printAllPairs(4); \n   /* \n   0 0 0 1 0 2 0 3 1 0 1 1 1 2 1 3 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3 \n   */ \n   //!Nested loops who's number of iterations depend on the size of the input are never a good thing when trying to write fast code. \n   //!O(n^2) or Quadratic Time. \n   /***********END of Comparing two functions with nested for loops**********************/ \n   /**************************Big-O-Operations**********************/ \n   //! Arithmetic Operations are Constant \n   //! Variable assignment is constant \n   //! Accessing elements in an array (by index) or by object (by key) is constant. \n   //! In a loop, the complexity is the length of the loop times the complexity of whatever is inside of the loop. \n   /**************************More Examples**********************/ \n   //---------------------logAtLeast5--------------------------------- \n   function logAtLeast5(n) { \n   for (let i = 1; i &#x3C;= Math.max(5, n); i++) { \n   //console.log(i); \n   } \n   } \n   //! O(n) Linear Time \n   //logAtLeast5(2); \n   /* \n   1 2 3 4 5 \n   ---------------------------- \n   */ \n   //logAtLeast5(6); \n   /* \n   ---------------------------- \n   1 2 3 4 5 6 \n   */ \n   //---------------------logAtMost5--------------------------------- \n   function logAtMost5(n) { \n   for (var i = 1; i &#x3C;= Math.min(5, n); i++) { \n   //console.log(i); \n   } \n   } \n   logAtMost5(20); \n   //! O(1) Constant Time. \n   /* \n   1 2 3 4 5 \n   */ \n   //***********************Big-O Complexity Classes*************************** */ \n   /* \n   //! O(1) Constant \n   The algorithm takes roughly the same number of steps for any input size. \n   */ \n   function constant1(n) { \n   return n * 2 + 1; \n   } \n   constant1(5); //constant1(5): 11 \n   //console.log(\"constant1(5): \", constant1(5)); \n   //-------- \n   //! O(1) \n   //-------- \n   function constant2(n) { \n   for (let i = 1; i &#x3C;= 100; i++) { \n   console.log(i); \n   } \n   } \n   //constant2(5); \n   ////console.log(\"constant2(5): \", constant2(5)); \n   //1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 \n   //------------------------------------------ \n   /* \n   O(log(n)) Logarithmic \n   In most cases our hidden base of Logarithmic time is 2, \n   log complexity algo's will typically display 'halving' the size of the input ?? \n   ? (like binary search!) \n   */ \n   // O(log(n)) \n   function logarithmic1(n) { \n   if (n &#x3C;= 1) { \n   return \"base case\"; \n   } else { \n   return logarithmic1(n / 2); //*Recursive call on **half** the input \n   } \n   } \n   //! O(log(n)) \n   function logarithmic2(n) { \n   let i = n; \n   while (i > 1) { \n   i /= 2; \n   return i; \n   } \n   } \n   logarithmic1(5); \n   ////console.log(\"logarithmic1(5): \", logarithmic1(5)); //logarithmic1(5): base case \n   logarithmic2(6); \n   ////console.log(\"logarithmic2(6): \", logarithmic2(6)); //logarithmic2(6): 3 \n   //------------------------------------------ \n   /* \n   * O(n) Linear \n   Linear algo's will access each item of the input \"once\". \n   */ \n   // O(n) \n   function linear1(n) { \n   for (let i = 1; i &#x3C;= n; i++) { \n   //console.log(\"linear1\", i); \n   } \n   } \n   linear1(3); \n   /* \n   linear1 1 \n   linear1 2 \n   linear1 3 \n   */ \n   // O(n), where n is the length of the array \n   function linear2(array) { \n   for (let i = 0; i &#x3C; array.length; i++) { \n   //console.log(\"linear2\", i); \n   } \n   } \n   linear2([1, 2, 3]); \n   /* \n   linear2 0 \n   linear2 1 \n   linear2 2 \n   */ \n   //! O(n) \n   function linear3(n) { \n   if (n === 1) { \n   return 1; \n   } else { \n   //console.log(`linear3(${n})--->`, linear3(n - 1)); \n   /* \n   */ \n   } \n   } \n   //!linear3(6); \n   //linear3(2)---> 1 linear3(3)---> undefined linear3(4)---> undefined \n   //linear3(5)---> undefined linear3(6)---> undefined \n   //!linear3(5); \n   // linear3(2)---> 1 linear3(3)---> undefined linear3(4)---> undefined \n   //linear3(5)---> undefined \n   //// in the two function calls above we can see that size of output corresponds to a proportional change in the size of the input \n   //console.log(\"linear3(4): \", linear3(4)); //// linear3(4): undefined \n   //------------------------------------------ \n   /* \n   * O(nlog(n)) Log Linear Time \n   Combination of linear and logarithmic behavior, \n   we will see features from both classes. \n   !Algorithm's that are log-linear will use both recursion AND iteration. \n   */ \n   // O(n * log(n)) \n   // function loglinear(n) { \n   // if (n &#x3C;= 1) return; // base case \n   // for (let i = 1; i &#x3C;= n; i++) { \n   // console.log( \n   // `for an input (n=${n}):`, \n   // `we are on the ${i}'th itteration where i = ${i}` \n   // ); \n   // } \n   // console.log(\" first call n('old n'):\", n); \n   // loglinear(n / 2); \n   // console.log(` new n is = (${n})`); \n   // } \n   // loglinear(4); \n   /* \n   for an input (n=4): we are on the 1'th itteration where i = 1 \n   for an input (n=4): we are on the 2'th itteration where i = 2 \n   for an input (n=4): we are on the 3'th itteration where i = 3 \n   for an input (n=4): we are on the 4'th itteration where i = 4 \n   first call n('old n'): 4 \n   for an input (n=2): we are on the 1'th itteration where i = 1 \n   for an input (n=2): we are on the 2'th itteration where i = 2 \n   first call n('old n'): 2 \n   new n is = (2) \n   new n is = (4) \n   */ \n   function loglinear(n) { \n   if (n &#x3C;= 1) return; // base case \n   for (let i = 1; i &#x3C;= n; i++) { \n   console.log( \n   `for an input (n=${n}):`, \n   `we are on the ${i}'th itteration where i = ${i}` \n   ); \n   } \n   console.log(\" first call n('old n'):\", n, `new n is = (${n / 2})`); \n   loglinear(n / 2); \n   console.log(` new n is = (${n})`); \n   loglinear(n / 2); \n   console.log(` Second Call : new n is = (${n})`); \n   } \n   //loglinear(4); \n   /* \n   for an input (n=4): we are on the 1'th itteration where i = 1 \n   for an input (n=4): we are on the 2'th itteration where i = 2 \n   for an input (n=4): we are on the 3'th itteration where i = 3 \n   for an input (n=4): we are on the 4'th itteration where i = 4 \n   first call n('old n'): 4 new n is = (2) \n   for an input (n=2): we are on the 1'th itteration where i = 1 \n   for an input (n=2): we are on the 2'th itteration where i = 2 \n   first call n('old n'): 2 new n is = (1) \n   new n is = (2) \n   Second Call : new n is = (2) \n   new n is = (4) \n   for an input (n=2): we are on the 1'th itteration where i = 1 \n   for an input (n=2): we are on the 2'th itteration where i = 2 \n   first call n('old n'): 2 new n is = (1) \n   new n is = (2) \n   Second Call : new n is = (2) \n   Second Call : new n is = (4) \n   */ \n   //------------------------------------------ \n   /* \n   O(nc) Polynomial \n   C is a fixed constant. \n   */ \n   // O(n^3) \n   function cubic(n) { \n   let count = 0; \n   for (let i = 1; i &#x3C;= n; i++) { \n   //console.log(`i is ${i}`, \"count:\", count); \n   for (let j = 1; j &#x3C;= n; j++) { \n   //console.log(` for i: ${i} j is:${j}`); \n   for (let k = 1; k &#x3C;= n; k++) { \n   count += 1; \n   // console.log( ` itteration #${count}: i: is ${i}, j: is ${j}, k:is ${k}`); \n   } \n   } \n   } \n   } \n   cubic(3); \n   /* \n   i is 1 count: 0 \n   for i: 1 j is:1 \n   itteration #1: i: is 1, j: is 1, k: is 1 \n   itteration #2: i: is 1, j: is 1, k: is 2 \n   itteration #3: i: is 1, j: is 1, k: is 3 \n   for i: 1 j is:2 \n   itteration #4: i: is 1, j: is 2, k: is 1 \n   itteration #5: i: is 1, j: is 2, k: is 2 \n   itteration #6: i: is 1, j: is 2, k: is 3 \n   for i: 1 j is:3 \n   itteration #7: i: is 1, j: is 3, k: is 1 \n   itteration #8: i: is 1, j: is 3, k: is 2 \n   itteration #9: i: is 1, j: is 3, k: is 3 \n   i is 2 count: 9 \n   for i: 2 j is:1 \n   itteration #10: i: is 2, j: is 1, k: is 1 \n   itteration #11: i: is 2, j: is 1, k: is 2 \n   itteration #12: i: is 2, j: is 1, k: is 3 \n   for i: 2 j is:2 \n   itteration #13: i: is 2, j: is 2, k: is 1 \n   itteration #14: i: is 2, j: is 2, k: is 2 \n   itteration #15: i: is 2, j: is 2, k: is 3 \n   for i: 2 j is:3 \n   itteration #16: i: is 2, j: is 3, k: is 1 \n   itteration #17: i: is 2, j: is 3, k: is 2 \n   itteration #18: i: is 2, j: is 3, k: is 3 \n   i is 3 count: 18 \n   for i: 3 j is:1 \n   itteration #19: i: is 3, j: is 1, k: is 1 \n   itteration #20: i: is 3, j: is 1, k: is 2 \n   itteration #21: i: is 3, j: is 1, k: is 3 \n   for i: 3 j is:2 \n   itteration #22: i: is 3, j: is 2, k: is 1 \n   itteration #23: i: is 3, j: is 2, k: is 2 \n   itteration #24: i: is 3, j: is 2, k: is 3 \n   for i: 3 j is:3 \n   itteration #25: i: is 3, j: is 3, k: is 1 \n   itteration #26: i: is 3, j: is 3, k: is 2 \n   itteration #27: i: is 3, j: is 3, k: is 3 \n   */ \n   //------------------------------------------ \n   /* \n   Example of Quadratic and Cubic runtime. \n   !O(c^n) Exponential \n   C is now the number of recursive calls made in each stack frame. \n   -Algo's with exponential time are VERY SLOW. \n   */ \n   // O(3^n) \n   function exponential3n(n) { \n   if (n === 0) return; \n   //console.log(\"1.) first call n('old n'):\", n, `....new n is = (${n - 1})`); \n   exponential3n(n - 1); \n    \n   // console.log(\"---------------------(__1__)---------------------------\", \"\\n\"); \n   // console.log( \n   // \"2.) after first call ('old n'):\", \n   // n, \n   // `....new n is = (${n - 1})` \n   // ); \n    \n   exponential3n(n - 1); \n    \n   //console.log(\"-------------------------(__2__)---------------------\", \"\\n\"); \n   //console.log( \n   // \"3.) after second call ('old n'):\", \n   // n, \n   // `....new n is = (${n - 1})` \n   // ); \n    \n   exponential3n(n - 1); \n    \n   //console.log(\"-----------------------(__3__)-------------------------\", \"\\n\"); \n   //console.log( \n   // \"4.) after third call ('old n'):\", \n   // n, \n   // `....new n is = (${n - 1})` \n   //); \n   } \n   exponential3n(3); \n    \n   //***********************__Memoization__*************************** */ \n   /* \n   Memoization : a design pattern used to reduce the overall number of calculations that can occur \n   in algorithms that use recursive strategies to solve. \n   MZ stores the results of the sub-problems in some other data structure, so that we can avoid \n   duplicate calculations and only 'solve' each problem once. \n   Two features that comprise memoization: \n   1\\. FUNCTION MUST BE RECURSIVE. \n   2\\. Our additional DS is usually an object (we refer to it as our memo!) \n   */ \n    \n   //! _____Memoizing Factorial_____ \n    \n   // function fib(n, memo = {}) { \n   // if (n in memo) return memo[n]; // If we already calculated this value, return it \n   // if (n === 1 || n === 2) return 1; \n    \n   // // Store the result in the memo first before returning \n   // // Make sure to pass the memo in to your calls to fib! \n   // memo[n] = fib(n - 1, memo) + fib(n - 2, memo); \n   // return memo[n]; \n   // } \n   function factorial(n, memo2 = {}) { \n   const key = JSON.stringify(n); \n   if (key in memo2) return memo2[key]; \n   if (n === 1) return 1; \n   memo2[key] = n * factorial(n - 1, memo2); \n   //console.log(\"this is memo\", memo2); \n   return memo2[key]; \n   } \n    \n   //console.log(memo2); \n   // //factorial(6); // => 720, requires 6 calls \n   //console.log(\"factorial(6): \", factorial(6)); \n   // //factorial(6); // => 720, requires 1 call \n   // //factorial(5); // => 120, requires 1 call \n   // console.log(\"factorial(5): \", factorial(5)); \n   //factorial(7); // => 5040, requires 2 calls \n   //console.log(\"factorial(7): \", factorial(7)); \n   //console.log(\"factorial(20): \", factorial(20)); // 2432902008176640000 \n   /* \n   this is memo { '2': 2 } \n   this is memo { '2': 2, '3': 6 } \n   this is memo { '2': 2, '3': 6, '4': 24 } \n   this is memo { '2': 2, '3': 6, '4': 24, '5': 120 } \n   this is memo { '2': 2 } \n   this is memo { '2': 2, '3': 6 } \n   this is memo { '2': 2, '3': 6, '4': 24 } \n   this is memo { '2': 2, '3': 6, '4': 24, '5': 120 } \n   this is memo { '2': 2, '3': 6, '4': 24, '5': 120, '6': 720 } \n   factorial(6): 720 \n   this is memo { '2': 2 } \n   this is memo { '2': 2, '3': 6 } \n   this is memo { '2': 2, '3': 6, '4': 24 } \n   this is memo { '2': 2, '3': 6, '4': 24, '5': 120 } \n   this is memo { '2': 2, '3': 6, '4': 24, '5': 120, '6': 720 } \n   this is memo { '2': 2, '3': 6, '4': 24, '5': 120, '6': 720, '7': 5040 } \n   factorial(7): 5040 \n   */ \n    \n   /* \n   The Memoization Formula \n   Rules \n   1\\. Write the unoptimized brute force recursion (make sure it works); \n   2\\. Add memo object as an additional arugmnt . \n   3\\. Add a base case condition that returns the stored value if the function's argument is in the memo. \n   4\\. Before returning the result of the recursive case, store it in the memo as a value and make the \n   function's argument it's key. \n    \n   !Things to remember \n   *1. When solving DP problems with Memoization, it is helpful to draw out the visual tree first. \n   *2. When you notice duplicate sub-tree's that means we can memoize. \n    \n   */ \n   function fastFib(n, memo = {}) { \n   if (n in memo) return memo[n]; \n   if (n === 1 || n === 2) return 1; \n   memo[n] = fastFib(n - 1, memo) + fastFib(n - 2, memo); \n   return memo[n]; \n   } \n   //fastFib(6); // => 8 \n   //console.log(\"fastFib(6): \", fastFib(6)); //fastFib(6): 8 \n   //fastFib(50); // => 12586269025 \n   //console.log(\"fastFib(50): \", fastFib(50)); //fastFib(50): 12586269025 \n    \n   //***********************__Tabulation__*************************** */ \n   /* \n   Tabulation Strategy \n   //Use When: \n   -The function is iterative and not recursive. \n   -The accompanying Data Structure is usually an array. \n   */ \n   function fibTab(n) { \n   let table = [0, 1, 1]; \n    \n   // if(n === 0 || n === 1){ \n   // return 1; \n   // } \n    \n   while (table.length - 1 &#x3C; n) { \n   table.push(table[table.length - 1] + table[table.length - 2]); \n   } \n    \n   return table[n]; \n   } \n    \n   console.log(fibTab(1)); //1 \n   console.log(fibTab(2)); //1 \n   console.log(fibTab(3)); //2 \n   console.log(fibTab(4)); //3 \n   console.log(fibTab(5)); //5 \n   console.log(fibTab(50)); //12586269025 |\n</code></pre>\n<p><a href=\"https://gist.github.com/bgoonz/af844eda5a20b0fdc0b813304401602b/raw/a5bd8a34d26c2b6cff9232c7f6218463122ff7ef/algo-time-complexity-by-example.js\">view raw</a><a href=\"https://gist.github.com/bgoonz/af844eda5a20b0fdc0b813304401602b#file-algo-time-complexity-by-example-js\">algo-time-complexity-by-example.js </a>hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<details>\n<summary> Big O Examples In JavaScript  </summary>\n<pre><code class=\"language-js\">/**************************************BIG-O***********************************/\n/***********************Common Algorithms for Analysis********************/\n//mdn Object;\n//-**************-recursive factorial:*********************/\n/*\nFactorial: the product of a given positive integer multiplied by all lesser positive integers:\nThe quantity four factorial (4!) = 4 ⋅ 3 ⋅ 2 ⋅ 1 = 24.\nSymbol:n!, where n is the given integer.\n */\nfunction factorial(n) {\n    if (n === 1) return 1; //* Base Case ... 1 * 1 = 1\n    return n * factorial(n - 1); //*  n! = n * (n-1) *  (n-2) * (n-3) * ... * 1\n}\nfactorial(5); //*5 * 4 * 3 * 2 * 1 = 120 &#x3C;----expected\n//console.log( \"factorial(5): \", factorial( 5 ) ); //-    factorial(5):  120\n/*\nFibonacci numbers are the numbers such that every number in the series after the first two is the sum of the two preceding ones.\nThe series starts with 1, 1. Example −1, 1, 2, 3, 5, 8, 13, 21, 34, ….\nMathematical Expression: fib(n) = fib(n−1) + fib(n−2)\n! fib-tree-structure-diagram.png\nhttps://miro.medium.com/max/700/1*svQ784qk1hvBE3iz7VGGgQ.jpeg\n */\nfunction fibonacci(n) {\n    if (n === 1 || n === 2) return 1;\n    return fibonacci(n - 1) + fibonacci(n - 2);\n}\nfibonacci(5);\n//console.log(\"fib(5): \", fibonacci(5)); //-  fib(5):  5\n/*\nthe major differences between tabulation and memoization are:\n1.)     tabulation has to look through the entire search space; memoization does not\n2.)     tabulation requires careful ordering of the subproblems is; memoization doesn’t care much about the order of recursive calls.\n*/\nconst memo = {\n    0: 0,\n    1: 0,\n    2: 1\n};\nconst fib = (n) => {\n    if (memo[n] !== undefined) return memo[n];\n    const n1 = fib(n - 1);\n    const n2 = fib(n - 2);\n    memo[n] = fib(n - 1) + fib(n - 2);\n    return memo[n];\n};\n//console.log(\"fib(50): \", fib(20));      //-  fib(50):  4181\n/******************End of Common Algorithms for Analysis*****************/\n/***********Comparing two functions that calculate the sum of all numbers from 1 up to n**********************/\nfunction addUpTo(n) {\n    let total = 0;\n    for (let i = 0; i &#x3C;= n; i++) {\n        //! Number of operations will grow with input n.\n        total += i;\n    }\n    return total;\n}\naddUpTo(4);\n//console.log(\"addUpTo( 4 ): \", addUpTo(4)); //-  addUpTo( 4 ):  10\n//! Would be O(n) or Linear Time.\n//----------------------------------------------------------------\n/*\nThe infinite series whose terms are the natural numbers 1 + 2 + 3 + 4 + ⋯ is a divergent series.\nThe nth partial sum of the series is the triangular number( https://en.wikipedia.org/wiki/Triangular_number )\naddUpTo(n)=(n * (n + 1)) / 2\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/99476e25466549387c585cb4de44e90f6cbe4cf2\n*/\nfunction constantAddUpTo(n) {\n    return (n * (n + 1)) / 2;\n}\nconstantAddUpTo(4); //-  constantAddUpTo(4):  10\n//console.log(\"constantAddUpTo(4): \", constantAddUpTo(4));\n//! Has three simple operations: 1 Multiplication 1 Addition 1 Division.\n//!(Regardless of n) Would be O(1) or Constant Time.\n/***********End of Comparing two functions that calculate the sum of all numbers from 1 up to n*******************/\n/*\n!Simplifying Math Terms\nWe want our Big-O notation to describe the performance of our algorithm with respect to the input size and nothing else.\n !Use the following rules to simplify our Big-O functions using the following rules:\n1.)   Simplify Products: if the function is a product of many terms, we drop the terms that don't depend on the size of the input.\n2.)   Simplify Sums: if the function is a sum of many terms, we keep the term with the largest growth rate and drop the other terms.\n*   n is the size of the input\n*   T(f) refers to an un-simplified mathematical function\n*   O(f) refers to the Big-O simplified mathematical function\n*   Simplifying a Product\nIf a function consists of a product of many factors,\n!we drop the factors that don't depend on the size of the input, n.\nThe factors that we drop are called constant factors because their size remains consistent as we increase the size of the input.\nexamples-of-big-O-simplification.png\nsimplifying-a-sum.png\nsimp-examples.png\n*/\n/***********Comparing two functions with nested for loops*********************/\n// function countUpAndDown(n) {\n//   console.log(\"going up!\");\n//   for (let i = 0; i &#x3C; n; i++) {\n//     console.log(i);\n//   }\n//   console.log(\"at the top, going down!\");\n//   for (let j = n - 1; j >= 0; j--) {\n//     console.log(j);\n//   }\n//   console.log(\"Back down, bye!\");\n// }\n// countUpAndDown(5);\n// console.log(\"countUpAndDown(5): \", countUpAndDown(5));\n/*\ngoing up!\n0 1 2   3   4\nat the top, going down!\n4   3   2   1   0\nBack down, bye!\ncountUpAndDown(5):  undefined //- because there was no return statment... only console.log\n*/\n//------------------------------------------------\n//!Both loops are O(n) but since we just want the big picture, O(n);\n//-----------------------------------------------\n// function printAllPairs(n) {\n//   for (let i = 0; i &#x3C; n; i++) {\n//     for (let j = 0; j &#x3C; n; j++) {\n//       console.log(i, j);\n//     }\n//   }\n// }\n// printAllPairs(4);\n/*\n0 0 0 1 0 2 0 3 1 0 1 1 1 2 1 3 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3\n*/\n//!Nested loops who's number of iterations depend on the size of the input are never a good thing when trying to write fast code.\n//!O(n^2) or Quadratic Time.\n/***********END of Comparing two functions with nested for loops**********************/\n/**************************Big-O-Operations**********************/\n//! Arithmetic Operations are Constant\n//! Variable assignment is constant\n//! Accessing elements in an array (by index) or by object (by key) is constant.\n//! In a loop, the complexity is the length of the loop times the complexity of whatever is inside of the loop.\n/**************************More Examples**********************/\n//---------------------logAtLeast5---------------------------------\nfunction logAtLeast5(n) {\n    for (let i = 1; i &#x3C;= Math.max(5, n); i++) {\n        //console.log(i);\n    }\n}\n//!   O(n) Linear Time\n//logAtLeast5(2);\n/*\n1   2   3   4   5\n----------------------------\n*/\n//logAtLeast5(6);\n/*\n----------------------------\n1   2   3   4   5   6\n*/\n//---------------------logAtMost5---------------------------------\nfunction logAtMost5(n) {\n    for (var i = 1; i &#x3C;= Math.min(5, n); i++) {\n        //console.log(i);\n    }\n}\nlogAtMost5(20);\n//! O(1) Constant Time.\n/*\n1   2   3   4   5\n*/\n//***********************Big-O Complexity Classes*************************** */\n/*\n//! O(1) Constant\nThe algorithm takes roughly the same number of steps for any input size.\n*/\nfunction constant1(n) {\n    return n * 2 + 1;\n}\nconstant1(5); //constant1(5):  11\n//console.log(\"constant1(5): \", constant1(5));\n//--------\n//! O(1)\n//--------\nfunction constant2(n) {\n    for (let i = 1; i &#x3C;= 100; i++) {\n        console.log(i);\n    }\n}\n//constant2(5);\n////console.log(\"constant2(5): \", constant2(5));\n//1 2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100\n//------------------------------------------\n/*\nO(log(n)) Logarithmic\nIn most cases our hidden base of Logarithmic time is 2,\nlog complexity algo's will typically display 'halving' the size of the input ??\n? (like binary search!)\n*/\n// O(log(n))\nfunction logarithmic1(n) {\n    if (n &#x3C;= 1) {\n        return \"base case\";\n    } else {\n        return logarithmic1(n / 2); //*Recursive call on **half** the input\n    }\n}\n//! O(log(n))\nfunction logarithmic2(n) {\n    let i = n;\n    while (i > 1) {\n        i /= 2;\n        return i;\n    }\n}\nlogarithmic1(5);\n////console.log(\"logarithmic1(5): \", logarithmic1(5)); //logarithmic1(5):  base case\nlogarithmic2(6);\n////console.log(\"logarithmic2(6): \", logarithmic2(6)); //logarithmic2(6):  3\n//------------------------------------------\n/*\n*  O(n) Linear\nLinear algo's will access each item of the input \"once\".\n */\n// O(n)\nfunction linear1(n) {\n    for (let i = 1; i &#x3C;= n; i++) {\n        //console.log(\"linear1\", i);\n    }\n}\nlinear1(3);\n/*\nlinear1 1\nlinear1 2\nlinear1 3\n*/\n// O(n), where n is the length of the array\nfunction linear2(array) {\n    for (let i = 0; i &#x3C; array.length; i++) {\n        //console.log(\"linear2\", i);\n    }\n}\nlinear2([1, 2, 3]);\n/*\nlinear2 0\nlinear2 1\nlinear2 2\n*/\n//!  O(n)\nfunction linear3(n) {\n    if (n === 1) {\n        return 1;\n    } else {\n        //console.log(`linear3(${n})--->`, linear3(n - 1));\n        /*\n         */\n    }\n}\n//!linear3(6);\n//linear3(2)---> 1  linear3(3)---> undefined    linear3(4)---> undefined\n//linear3(5)---> undefined  linear3(6)---> undefined\n//!linear3(5);\n// linear3(2)---> 1 linear3(3)---> undefined    linear3(4)---> undefined\n//linear3(5)---> undefined\n//// in the two function calls above we can see that size of output corresponds to a proportional change in the size of the input\n//console.log(\"linear3(4): \", linear3(4)); //// linear3(4):  undefined\n//------------------------------------------\n/*\n* O(nlog(n)) Log Linear Time\nCombination of linear and logarithmic behavior,\nwe will see features from both classes.\n!Algorithm's that are log-linear will use both recursion AND iteration.\n */\n// O(n * log(n))\n// function loglinear(n) {\n//   if (n &#x3C;= 1) return; // base case\n//   for (let i = 1; i &#x3C;= n; i++) {\n//     console.log(\n//       `for an input (n=${n}):`,\n//       `we are on the ${i}'th itteration where i = ${i}`\n//     );\n//   }\n//   console.log(\" first call n('old n'):\", n);\n//   loglinear(n / 2);\n//   console.log(`   new n is = (${n})`);\n// }\n// loglinear(4);\n/*\nfor an input (n=4): we are on the 1'th itteration where i = 1\nfor an input (n=4): we are on the 2'th itteration where i = 2\nfor an input (n=4): we are on the 3'th itteration where i = 3\nfor an input (n=4): we are on the 4'th itteration where i = 4\n first call n('old n'): 4\nfor an input (n=2): we are on the 1'th itteration where i = 1\nfor an input (n=2): we are on the 2'th itteration where i = 2\n first call n('old n'): 2\n   new n is = (2)\n   new n is = (4)\n*/\nfunction loglinear(n) {\n    if (n &#x3C;= 1) return; // base case\n    for (let i = 1; i &#x3C;= n; i++) {\n        console.log(\n            `for an input (n=${n}):`,\n            `we are on the ${i}'th itteration where i = ${i}`\n        );\n    }\n    console.log(\" first call n('old n'):\", n, `new n is = (${n / 2})`);\n    loglinear(n / 2);\n    console.log(`   new n is = (${n})`);\n    loglinear(n / 2);\n    console.log(`   Second Call : new n is = (${n})`);\n}\n//loglinear(4);\n/*\nfor an input (n=4): we are on the 1'th itteration where i = 1\nfor an input (n=4): we are on the 2'th itteration where i = 2\nfor an input (n=4): we are on the 3'th itteration where i = 3\nfor an input (n=4): we are on the 4'th itteration where i = 4\n first call n('old n'): 4 new n is = (2)\nfor an input (n=2): we are on the 1'th itteration where i = 1\nfor an input (n=2): we are on the 2'th itteration where i = 2\n first call n('old n'): 2 new n is = (1)\n   new n is = (2)\n   Second Call : new n is = (2)\n   new n is = (4)\nfor an input (n=2): we are on the 1'th itteration where i = 1\nfor an input (n=2): we are on the 2'th itteration where i = 2\n first call n('old n'): 2 new n is = (1)\n   new n is = (2)\n   Second Call : new n is = (2)\n   Second Call : new n is = (4)\n*/\n//------------------------------------------\n/*\nO(nc) Polynomial\nC is a fixed constant.\n */\n// O(n^3)\nfunction cubic(n) {\n    let count = 0;\n    for (let i = 1; i &#x3C;= n; i++) {\n        //console.log(`i is ${i}`, \"count:\", count);\n        for (let j = 1; j &#x3C;= n; j++) {\n            //console.log(`  for i:    ${i}      j is:${j}`);\n            for (let k = 1; k &#x3C;= n; k++) {\n                count += 1;\n                // console.log(  `     itteration #${count}:       i: is  ${i},   j: is  ${j},     k:is   ${k}`);\n            }\n        }\n    }\n}\ncubic(3);\n/*\ni is 1 count: 0\n  for i:    1      j is:1\n     itteration #1:       i: is  1,   j: is  1,     k: is   1\n     itteration #2:       i: is  1,   j: is  1,     k: is   2\n     itteration #3:       i: is  1,   j: is  1,     k: is   3\n  for i:    1      j is:2\n     itteration #4:       i: is  1,   j: is  2,     k: is   1\n     itteration #5:       i: is  1,   j: is  2,     k: is   2\n     itteration #6:       i: is  1,   j: is  2,     k: is   3\n  for i:    1      j is:3\n     itteration #7:       i: is  1,   j: is  3,     k: is   1\n     itteration #8:       i: is  1,   j: is  3,     k: is   2\n     itteration #9:       i: is  1,   j: is  3,     k: is   3\ni is 2 count: 9\n  for i:    2      j is:1\n     itteration #10:       i: is  2,   j: is  1,     k: is   1\n     itteration #11:       i: is  2,   j: is  1,     k: is   2\n     itteration #12:       i: is  2,   j: is  1,     k: is   3\n  for i:    2      j is:2\n     itteration #13:       i: is  2,   j: is  2,     k: is   1\n     itteration #14:       i: is  2,   j: is  2,     k: is   2\n     itteration #15:       i: is  2,   j: is  2,     k: is   3\n  for i:    2      j is:3\n     itteration #16:       i: is  2,   j: is  3,     k: is   1\n     itteration #17:       i: is  2,   j: is  3,     k: is   2\n     itteration #18:       i: is  2,   j: is  3,     k: is   3\ni is 3 count: 18\n  for i:    3      j is:1\n     itteration #19:       i: is  3,   j: is  1,     k: is   1\n     itteration #20:       i: is  3,   j: is  1,     k: is   2\n     itteration #21:       i: is  3,   j: is  1,     k: is   3\n  for i:    3      j is:2\n     itteration #22:       i: is  3,   j: is  2,     k: is   1\n     itteration #23:       i: is  3,   j: is  2,     k: is   2\n     itteration #24:       i: is  3,   j: is  2,     k: is   3\n  for i:    3      j is:3\n     itteration #25:       i: is  3,   j: is  3,     k: is   1\n     itteration #26:       i: is  3,   j: is  3,     k: is   2\n     itteration #27:       i: is  3,   j: is  3,     k: is   3\n*/\n//------------------------------------------\n/*\nExample of Quadratic and Cubic runtime.\n!O(c^n) Exponential\nC is now the number of recursive calls made in each stack frame.\n-Algo's with exponential time are VERY SLOW.\n*/\n// O(3^n)\nfunction exponential3n(n) {\n    if (n === 0) return;\n    //console.log(\"1.)  first call n('old n'):\", n, `....new n is = (${n - 1})`);\n    exponential3n(n - 1);\n\n    // console.log(\"---------------------(__1__)---------------------------\", \"\\n\");\n    // console.log(\n    //   \"2.)  after first call ('old n'):\",\n    //   n,\n    //   `....new n is = (${n - 1})`\n    // );\n\n    exponential3n(n - 1);\n\n    //console.log(\"-------------------------(__2__)---------------------\", \"\\n\");\n    //console.log(\n    //   \"3.)  after second call ('old n'):\",\n    //   n,\n    //   `....new n is = (${n - 1})`\n    // );\n\n    exponential3n(n - 1);\n\n    //console.log(\"-----------------------(__3__)-------------------------\", \"\\n\");\n    //console.log(\n    //  \"4.)   after third call ('old n'):\",\n    //  n,\n    // `....new n is = (${n - 1})`\n    //);\n}\nexponential3n(3);\n\n//***********************__Memoization__*************************** */\n/*\nMemoization : a design pattern used to reduce the overall number of calculations that can occur\nin algorithms that use recursive strategies to solve.\nMZ stores the results of the sub-problems in some other data structure, so that we can avoid\nduplicate calculations and only 'solve' each problem once.\nTwo features that comprise memoization:\n1. FUNCTION MUST BE RECURSIVE.\n2. Our additional DS is usually an object (we refer to it as our memo!)\n*/\n\n//!    _____Memoizing Factorial_____\n\n// function fib(n, memo = {}) {\n//   if (n in memo) return memo[n]; // If we already calculated this value, return it\n//   if (n === 1 || n === 2) return 1;\n\n//   // Store the result in the memo first before returning\n//   // Make sure to pass the memo in to your calls to fib!\n//   memo[n] = fib(n - 1, memo) + fib(n - 2, memo);\n//   return memo[n];\n// }\nfunction factorial(n, memo2 = {}) {\n    const key = JSON.stringify(n);\n    if (key in memo2) return memo2[key];\n    if (n === 1) return 1;\n    memo2[key] = n * factorial(n - 1, memo2);\n    //console.log(\"this is memo\", memo2);\n    return memo2[key];\n}\n\n//console.log(memo2);\n// //factorial(6); // => 720, requires 6 calls\n//console.log(\"factorial(6): \", factorial(6));\n// //factorial(6); // => 720, requires 1 call\n// //factorial(5); // => 120, requires 1 call\n// console.log(\"factorial(5): \", factorial(5));\n//factorial(7); // => 5040, requires 2 calls\n//console.log(\"factorial(7): \", factorial(7));\n//console.log(\"factorial(20): \", factorial(20)); // 2432902008176640000\n/*\nthis is memo { '2': 2 }\nthis is memo { '2': 2, '3': 6 }\nthis is memo { '2': 2, '3': 6, '4': 24 }\nthis is memo { '2': 2, '3': 6, '4': 24, '5': 120 }\nthis is memo { '2': 2 }\nthis is memo { '2': 2, '3': 6 }\nthis is memo { '2': 2, '3': 6, '4': 24 }\nthis is memo { '2': 2, '3': 6, '4': 24, '5': 120 }\nthis is memo { '2': 2, '3': 6, '4': 24, '5': 120, '6': 720 }\nfactorial(6):  720\nthis is memo { '2': 2 }\nthis is memo { '2': 2, '3': 6 }\nthis is memo { '2': 2, '3': 6, '4': 24 }\nthis is memo { '2': 2, '3': 6, '4': 24, '5': 120 }\nthis is memo { '2': 2, '3': 6, '4': 24, '5': 120, '6': 720 }\nthis is memo { '2': 2, '3': 6, '4': 24, '5': 120, '6': 720, '7': 5040 }\nfactorial(7):  5040\n*/\n\n/*\nThe Memoization Formula\nRules\n1. Write the unoptimized brute force recursion (make sure it works);\n2. Add memo object as an additional arugmnt .\n3. Add a base case condition that returns the stored value if the function's argument is in the memo.\n4. Before returning the result of the recursive case, store it in the memo as a value and make the\nfunction's argument it's key.\n!Things to remember\n*1. When solving DP problems with Memoization, it is helpful to draw out the visual tree first.\n*2. When you notice duplicate sub-tree's that means we can memoize.\n*/\nfunction fastFib(n, memo = {}) {\n    if (n in memo) return memo[n];\n    if (n === 1 || n === 2) return 1;\n    memo[n] = fastFib(n - 1, memo) + fastFib(n - 2, memo);\n    return memo[n];\n}\n//fastFib(6); // => 8\n//console.log(\"fastFib(6): \", fastFib(6)); //fastFib(6):  8\n//fastFib(50); // => 12586269025\n//console.log(\"fastFib(50): \", fastFib(50)); //fastFib(50):  12586269025\n\n//***********************__Tabulation__*************************** */\n/*\nTabulation Strategy\n//Use When:\n-The function is iterative and not recursive.\n-The accompanying Data Structure is usually an array.\n*/\nfunction fibTab(n) {\n    let table = [0, 1, 1];\n\n    // if(n === 0 || n === 1){\n    //    return 1;\n    // }\n\n    while (table.length - 1 &#x3C; n) {\n        table.push(table[table.length - 1] + table[table.length - 2]);\n    }\n\n    return table[n];\n}\n\nconsole.log(fibTab(1)); //1\nconsole.log(fibTab(2)); //1\nconsole.log(fibTab(3)); //2\nconsole.log(fibTab(4)); //3\nconsole.log(fibTab(5)); //5\nconsole.log(fibTab(50)); //12586269025\n</code></pre>\n</details>"},{"url":"/docs/community/github-profiles/","relativePath":"docs/community/github-profiles.md","relativeDir":"docs/community","base":"github-profiles.md","name":"github-profiles","frontmatter":{"title":"Cool Github Profiles","weight":0,"excerpt":"Cool Github Profiles","seo":{"title":"  Cool Github Profiles","description":" Cool Github Profiles","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Cool Github Profiles</h1>\n<table>\n<thead>\n<tr>\n<th align=\"center\"><p><a href=\"https://github.com/aakarshteja\">Aakarsh Teja</a></p><p><img src=\"https://user-images.githubusercontent.com/42816874/92400662-e2e84180-f149-11ea-8304-6e76cab7fb05.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/84\">(💯 give your vote)</a></p></th>\n<th align=\"center\"><p><a href=\"https://github.com/AaquibAli\">Aaquib Ali</a></p><p><img src=\"https://user-images.githubusercontent.com/84700316/135708541-936038fd-97c2-4fc0-a51d-7d6a5b96dbf1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/747\">(💯 give your vote)</a></p></th>\n<th align=\"center\"><p><a href=\"https://github.com/fabdul88\">Abdul Farhan</a></p><p><img src=\"https://user-images.githubusercontent.com/60126985/138183204-9d6d4458-01e7-4394-816a-0d530a6b78ce.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/786\">(💯 give your vote)</a></p></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Abhay2611\">Abhay Anand</a></p><p><img src=\"https://user-images.githubusercontent.com/48680107/90428369-801eff80-e0e1-11ea-98b1-742aa741b7cc.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/59\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/AbhiVikrant\">Abhishek Kumar Vikrant</a></p><p><img src=\"https://user-images.githubusercontent.com/22058976/95264390-db9d7c00-084c-11eb-8fac-453eba7879ff.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/130\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Abiola-Farounbi\">Abiola Farounbi</a></p><p><img src=\"https://user-images.githubusercontent.com/49586787/94759122-fd06ef80-0396-11eb-9014-e0ac0226ea49.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/110\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/adityagarde\">Aditya Garde</a></p><p><img src=\"https://user-images.githubusercontent.com/14886766/127783620-6b94c878-9fd2-40c5-a62d-995818f0caa3.jpeg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/630\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/adityamangal1\">Aditya Mangal</a></p><p><img src=\"https://user-images.githubusercontent.com/68494604/120438793-6bc1a000-c39f-11eb-845b-c145db5e2f9b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/544\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/adityaoberai\">Aditya Oberai</a></p><p><img src=\"https://user-images.githubusercontent.com/31401437/106563296-974b8f80-6551-11eb-8753-a13ea9e944c2.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/304\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/AVS1508\">Aditya Vikram Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/20084950/90978133-08315900-e569-11ea-9299-9f43bc5f1912.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/41\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/sl4ureano\">Adriano Laureano</a></p><p><img src=\"https://user-images.githubusercontent.com/36384130/97517158-792f2b80-1973-11eb-9463-53bdb041497f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/156\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/advaith-unnikrishnan\">Advaith U</a></p><p><img src=\"https://user-images.githubusercontent.com/45172876/115498803-d73a2d00-a28b-11eb-809c-79a8eaf10a5d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/447\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ahamedbasha-n\">Ahamed Basha N</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/130546663-9ff92a77-14a1-4004-8d9c-dbc67fb027df.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/663\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ahammadshawki8\">Ahammad Shawki</a></p><p><img src=\"https://user-images.githubusercontent.com/56157819/102689296-26f9e080-4227-11eb-9e75-08c1f2426889.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/193\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ApolloDev0\">Ahmed Muhammed Galadima</a></p><p><img src=\"https://user-images.githubusercontent.com/68035852/103576376-18c4e900-4ee4-11eb-943e-3e097b0cc6a8.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/210\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/akasrai\">Akas Rai</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88123456-d40df580-cbc2-11ea-9add-a7fc8675b243.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/12\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Akshu-on-github\">Akshaya Kulasekaran</a></p><p><img src=\"https://user-images.githubusercontent.com/61582763/138205409-82ee17f6-4e1c-4beb-bcf3-98f063de2db9.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/788\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/hippyaki\">Akshayan Sinha</a></p><p><img src=\"https://user-images.githubusercontent.com/52236719/125198464-98f74d00-e27f-11eb-98ff-fb5f0a0ab4a6.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/586\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/akshitagupta15june\">Akshita Gupta</a></p><p><img src=\"https://user-images.githubusercontent.com/57909583/97854357-58722780-1d1f-11eb-8bda-83425c231ff5.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/160\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Aleksey-Voko\">Aleksey Voko</a></p><p><img src=\"https://user-images.githubusercontent.com/30869493/142190869-56b6a22a-061c-4a18-a725-4a5895b3e1df.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/844\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/BADSHAH-AMAN\">Aman Upadhyay</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/132057221-2e7c6dc4-a664-4565-9909-101b8fadfa4b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/685\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/UltimateBrains\">Amit Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/20683046/139575119-4c44ca4f-9a7d-4aa9-9d40-b9b930707353.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/817\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/AmpoluNisa03\">Ampolu Nisa</a></p><p><img src=\"https://user-images.githubusercontent.com/63179438/120458515-f82a8d80-c3b4-11eb-8d4e-4f1a698078ba.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/547\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/anaskhan28\">Anas Khan</a></p><p><img src=\"https://user-images.githubusercontent.com/87796038/130655483-7fd4dc84-9f0d-412b-acac-68ab178aaf3c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/666\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/adreaskar\">Andreas Karabetian</a></p><p><img src=\"https://user-images.githubusercontent.com/63111742/88703846-eed9f000-d115-11ea-9569-587de740a27a.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/39\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/angshuBHADRA\">Angshu Bhadra</a></p><p><img src=\"https://user-images.githubusercontent.com/61795945/116436758-56ba9400-a86a-11eb-9eb4-82da46fef05a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/464\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/longqua69\">Anh Hoang Chi Tran</a></p><p><img src=\"https://user-images.githubusercontent.com/37626565/115994832-da724780-a602-11eb-8a4f-6ab6d151715d.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/459\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Anikcb\">Anik Chakraborty</a></p><p><img src=\"https://user-images.githubusercontent.com/47493387/130086990-1072a097-f8b7-423b-8eeb-b161870b11ea.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/657\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/aniket-24\">Aniket Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/134812399-6a005576-3b24-46a6-b9bc-7798f79e5bf1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/723\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/aniketsingh98571\">Aniket Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/63097956/93450123-351c2600-f8f3-11ea-8964-bd44fd12dc0f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/88\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/sonichigo\">Animesh Pathak</a></p><p><img src=\"https://user-images.githubusercontent.com/53110238/125169823-89b5c800-e1c9-11eb-941f-3c2a43a0e149.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/584\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/qwe123pro\">Anirudh Anup</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/129775827-5d94ffc7-81bc-4364-9e08-a936030e6006.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/629\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/AnirudhPanda\">Anirudh Panda</a></p><p><img src=\"https://user-images.githubusercontent.com/66218496/126046283-45db0b3a-fd83-4dc3-ba12-6692dd2b3228.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/596\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/AnishDe12020\">Anish De</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/143733055-ea3a82e1-0d0d-460d-89c2-e622877974a0.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/870\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Anjan50\">Anjan Diyora</a></p><p><img src=\"https://user-images.githubusercontent.com/49095535/102576689-37716480-411c-11eb-804e-2b331e4e72e6.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/190\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/AnkitSharma-007\">Ankit</a></p><p><img src=\"https://user-images.githubusercontent.com/33789321/124962632-7cb79e00-e03c-11eb-9a5c-d7699fa3a6b2.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/580\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/An-prog-hub\">Ankush Chauhan</a></p><p><img src=\"https://user-images.githubusercontent.com/67872399/106575972-a71f9f80-6562-11eb-87dc-1b97d93f4d71.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/310\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/cankush625\">Ankush Chavan</a></p><p><img src=\"https://user-images.githubusercontent.com/41515472/135764171-9fbac687-0017-449f-815d-527dc6b5f44f.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/754\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ATCtech\">Ankush Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/50258860/94898939-046dec00-04b0-11eb-8a6a-10a0c59da3f0.JPG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/115\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/AnkushSinghGandhi\">Ankush Singh Gandhi</a></p><p><img src=\"https://user-images.githubusercontent.com/24972335/96338880-96bde480-1099-11eb-8b76-f6a39292477a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/151\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/annu12340\">Annu</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88266719-92b33e00-ccc7-11ea-9b40-d77fa96dcd4f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/22\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/metantonio\">Antonio Martínez</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/139906982-fb25c6da-4255-41b6-9f53-71f48f78d32b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/820\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Antonio-Riccelli\">Antonio Riccelli</a></p><p><img src=\"https://user-images.githubusercontent.com/39813213/140726958-9a6ea79e-f3d5-402f-8735-8a1cd51f92f5.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/829\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/anubhav201241\">Anubhav</a></p><p><img src=\"https://user-images.githubusercontent.com/72249059/135831764-78458d46-cfa1-4563-bfdf-8e5561907509.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/756\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/anuraghazra\">Anurag Hazra</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88123729-6adab200-cbc3-11ea-8d73-a190de560b3a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/13\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/AnuragThePathak\">Anurag Pathak</a></p><p><img src=\"https://user-images.githubusercontent.com/75429250/143869337-38c7d5d6-f496-4435-9970-6d0831931884.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/874\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/arturssmirnovs\">Arturs Smirnovs</a></p><p><img src=\"https://user-images.githubusercontent.com/7140344/94891559-14bfa000-048b-11eb-9f3b-6d79cc4b894b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/113\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/arwazkhan189\">Arwaz Khan</a></p><p><img src=\"https://user-images.githubusercontent.com/48387278/96334933-121b9800-1092-11eb-8904-a88502c8b003.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/147\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/aryasoni98\">Arya Soni</a></p><p><img src=\"https://user-images.githubusercontent.com/18515597/107496228-0b6fde00-6bb7-11eb-9a23-15d3f8aac015.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/354\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Ashutosh00710\">Ashutosh Dwivedi</a></p><p><img src=\"https://user-images.githubusercontent.com/42907572/95647789-c3995700-0aef-11eb-97f3-01ff3b54cdaf.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/134\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Asmit2952\">Asmit Malakannawar</a></p><p><img src=\"https://user-images.githubusercontent.com/81866614/138748320-ea30910c-c0c0-4fcd-b4ec-d8ffc605bb1f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/803\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/nayakastha\">Astha Nayak</a></p><p><img src=\"https://user-images.githubusercontent.com/58568514/119360619-6cd03e80-bcc8-11eb-8fec-699c31daac61.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/526\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/AvidCoder101\">Avid Coder</a></p><p><img src=\"https://user-images.githubusercontent.com/70807684/126078076-3df641ea-3c0f-483f-952c-cbabbb5758c1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/594\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ImAvinashSharma\">Avinash Sharma</a></p><p><img src=\"https://user-images.githubusercontent.com/58262578/118364777-87633300-b5b7-11eb-9d16-7ada5d04b460.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/510\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/avneesh0612\">Avneesh Agarwal</a></p><p><img src=\"https://user-images.githubusercontent.com/76690419/143516958-4e176034-cbce-45dd-8667-f3e9208e5c19.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/863\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Ayush7614\">Ayush Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/67006255/106144942-ee8ce100-619a-11eb-908d-4bdceade5661.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/283\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Ayushparikh-code\">Ayush Parikh</a></p><p><img src=\"https://user-images.githubusercontent.com/60268067/118812871-33649100-b8cc-11eb-9e90-0ec4fe333229.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/519\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ayushtamra\">Ayush Tamra</a></p><p><img src=\"https://user-images.githubusercontent.com/64156683/118395408-fb5d1400-b667-11eb-99c9-549cc5e49b00.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/517\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ayush-09\">Ayush Varshney</a></p><p><img src=\"https://user-images.githubusercontent.com/51924622/107047890-54f2ae80-67ee-11eb-8995-90c289eb8346.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/325\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/bevennyamande\">Beven Nyamande</a></p><p><img src=\"https://user-images.githubusercontent.com/10162710/120894576-6ff8f200-c619-11eb-9ee5-5078912d5550.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/552\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/BhuvaneshHingal\">Bhuvanesh Hingal</a></p><p><img src=\"https://user-images.githubusercontent.com/58567847/92334550-be8a5780-f0ac-11ea-9bbc-626b8dac30c6.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/80\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/BolajiAyodeji\">Bolaji Ayodeji</a></p><p><img src=\"https://user-images.githubusercontent.com/64528871/92191405-9e178e80-ee5b-11ea-8e21-108a54d77075.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/76\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/bdougie\">Brian Douglas</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358969-70da6f00-dc2b-11eb-8f3b-43779550acb6.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/576\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Bryson69\">Bryson Mundia</a></p><p><img src=\"https://user-images.githubusercontent.com/62892010/113439186-ba2fde00-93f2-11eb-8042-bdb111493c18.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/423\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/CarlosViniMSouza\">Carlos Souza</a></p><p><img src=\"https://user-images.githubusercontent.com/60679101/118286430-d1112800-b4a8-11eb-8bc9-9152ba87d351.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/501\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/DevCassie\">Cas Martens</a></p><p><img src=\"https://user-images.githubusercontent.com/19227530/112297527-4b39e300-8c96-11eb-9da2-717607286946.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/394\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/chandrikadeb7\">Chandrika Deb</a></p><p><img src=\"https://user-images.githubusercontent.com/29686102/106919215-f0711a00-672f-11eb-88f6-8ab44f67b911.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/313\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Chayan-11\">Chayan Debbarma</a></p><p><img src=\"https://user-images.githubusercontent.com/76246106/137589642-7e33d835-d02d-4f20-9fec-85c35554c2a2.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/777\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/chetan-2002\">Chetan Thakral</a></p><p><img src=\"https://user-images.githubusercontent.com/77783033/133980058-5a671e7b-f80a-400d-933e-613118a32e02.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/724\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ChinmayMhatre\">Chinmay Mhatre</a></p><p><img src=\"https://user-images.githubusercontent.com/51131670/111893373-5091f600-8a28-11eb-8e94-48b23eec0495.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/403\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/CodingSpecies\">CodingSpecies</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/129598330-ca71253a-4431-4bbd-91af-8db083144b9a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/650\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/CyberBoyAyush\">CyberBoyAyush</a></p><p><img src=\"https://user-images.githubusercontent.com/69210117/119606961-1f131d80-be11-11eb-8af0-608ec3bb3a0c.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/528\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/L0um15\">Damian Ziolo</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358914-2e189700-dc2b-11eb-80db-180c14723db1.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/574\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/w3bdesign\">Daniel F</a></p><p><img src=\"https://user-images.githubusercontent.com/45217974/104978190-9b2fcb80-5a01-11eb-81d6-af81f6147770.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/72\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/danishulhassan7\">Danish Ul Hassan</a></p><p><img src=\"https://user-images.githubusercontent.com/57491009/107846186-87f6fc80-6e03-11eb-9054-d89fba7d4e65.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/359\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/DarshGupta1910\">Darsh Gupta</a></p><p><img src=\"https://user-images.githubusercontent.com/73016212/135509959-87f8b8e4-9fab-4247-bae4-d965fca5ddbc.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/742\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Panquesito7\">David Leal</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/145443558-adb25d23-0f1f-4e90-9c7c-e447ad315494.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/550\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/devded\">Dedar Alam</a></p><p><img src=\"https://user-images.githubusercontent.com/60034035/100518834-4cfb0a80-31be-11eb-8e88-35413ff200de.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/21\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/devesh-anand\">Devesh Anand</a></p><p><img src=\"https://user-images.githubusercontent.com/30005922/133293857-90933953-10a7-4dc7-b69e-9272837daeb4.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/715\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/diptochakrabarty\">Dipto Chakrabarty</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88163171-2d4d4780-cc0a-11ea-91fe-6fc7c37fc8d6.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/14\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/diyajaiswal11\">Diya Jaiswal</a></p><p><img src=\"https://user-images.githubusercontent.com/48059117/106366095-a539be80-635f-11eb-95b0-c2d68c787410.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/285\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/codlipa\">Dmitry Labuzov</a></p><p><img src=\"https://user-images.githubusercontent.com/87143407/144700867-49ff3d28-1c45-4a93-966a-cef5266bbec8.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/880\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/evavic44\">Eke Victor</a></p><p><img src=\"https://user-images.githubusercontent.com/62628408/117089670-0b165780-ad4e-11eb-84c6-7b24f8956048.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/471\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ektaarora16\">Ekta Arora</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/135740246-b0be6db0-160a-43d8-819d-0ad3c190619c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/749\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/eshan1925\">Eshan Gupta</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/138337875-218a672c-8400-4e1d-b7ef-e7ddfcb0f5e5.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/791\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/evaristocuesta\">Evaristo Cuesta</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124359001-a8e1b200-dc2b-11eb-8c4d-924c29801aaa.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/577\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/fcsouza\">Fabricio Cavalcante</a></p><p><img src=\"https://user-images.githubusercontent.com/7094035/109435109-7f074d00-79f7-11eb-9e98-9486279e5a63.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/378\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/lostgirljourney\">Falguni Sarkar</a></p><p><img src=\"https://user-images.githubusercontent.com/56036475/136514446-f91cea9a-a793-4dc4-bf80-706e7bb87bf9.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/764\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/faouzimohamed\">Faouzi Mohamed</a></p><p><img src=\"https://user-images.githubusercontent.com/57812398/102703659-030fbc80-4272-11eb-97ce-53598f7211ae.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/196\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/FayasNoushad\">Fayas Noushad</a></p><p><img src=\"https://user-images.githubusercontent.com/76828314/132162846-8e55ec2c-90de-4f9a-8c12-e8254a942f0f.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/646\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/filippo-fonseca\">Filippo Fonseca</a></p><p><img src=\"https://user-images.githubusercontent.com/48065878/104632919-feb5a400-5663-11eb-8dd0-b05cfd377158.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/244\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/DeveloperAspire\">Franklin Okolie</a></p><p><img src=\"https://user-images.githubusercontent.com/57295537/103459329-e1e9aa00-4d0e-11eb-9758-5351230c2df8.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/207\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/frankiefab100\">Franklin U.O. Ohaegbulam</a></p><p><img src=\"https://user-images.githubusercontent.com/46662771/96289652-5731c280-0fdd-11eb-8b7f-1eed9d020903.JPG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/133\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/gagan3012\">Gagan Bhatia</a></p><p><img src=\"https://user-images.githubusercontent.com/49101362/120364787-7c501880-c2c2-11eb-8f18-0f0ef10c4439.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/539\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/gouravkhunger\">Gourav Khunger</a></p><p><img src=\"https://user-images.githubusercontent.com/46792249/141504841-54ecc6ab-437f-4122-bdef-2127e264bf7e.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/831\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/grawish\">Grawish Sachdeva</a></p><p><img src=\"https://user-images.githubusercontent.com/41504211/133457470-bca4c546-8800-4729-ad5d-587527d4ab29.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/717\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/iamgunjan\">Gunjan Paneri</a></p><p><img src=\"https://user-images.githubusercontent.com/53567221/129094169-e012e3fb-3ba9-47e7-9173-0e09e7517034.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/642\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Gur-jot\">Gurjot Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/78019426/135703000-f777dee5-735f-4c93-acc7-86fcce0d20a0.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/745\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/hanshulll\">Hanshul Chandel</a></p><p><img src=\"https://user-images.githubusercontent.com/56799372/124683406-90eb8600-deea-11eb-9de0-d4536ed04eeb.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/578\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/HariAcidReign\">Hariharan B</a></p><p><img src=\"https://user-images.githubusercontent.com/58134096/113426876-b2bc0500-93f1-11eb-962e-772207a6e965.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/425\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/hariketsheth\">Hariket Sukesh Kumar Sheth</a></p><p><img src=\"https://user-images.githubusercontent.com/72455881/134767118-d853cd39-ddc1-4df6-bda1-1a4315f9c855.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/728\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/harikanani\">Harikrushn kanani</a></p><p><img src=\"https://user-images.githubusercontent.com/54361799/116959271-c1306180-acba-11eb-8f59-2ee53b9da174.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/469\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/harkiratsm\">Harkirat Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/71957674/130051242-25747856-913e-4613-9cc6-7384dc58d752.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/645\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/harshkumarkhatri\">Harsh Kumar Khatri</a></p><p><img src=\"https://user-images.githubusercontent.com/42743629/97598257-c28f8180-1a2c-11eb-859a-5902efa7a828.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/158\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/HenokB\">Henok B Ademtew</a></p><p><img src=\"https://user-images.githubusercontent.com/46082799/107974254-4f326100-6f84-11eb-8cbb-105cd0d59189.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/371\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/hossainrabbi\">Hossain Rabbi</a></p><p><img src=\"https://user-images.githubusercontent.com/67089472/107899660-189b1d00-6f69-11eb-8361-086bb1b05d19.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/366\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/hrishikeshnikam2000\">Hrishikesh Nikam</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/91057573-48531300-e61f-11ea-9e13-2d7384e42000.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/612\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/hritik5102\">Hritik Jaiswal</a></p><p><img src=\"https://raw.githubusercontent.com/hritik5102/hritik5102/master/.github/images/Hritik-ReadMe.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/104\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/hrittikhere\">Hrittik Roy</a></p><p><img src=\"https://user-images.githubusercontent.com/67012359/123159920-38000480-d48b-11eb-9dab-b879898d4ccc.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/560\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ibby360\">Ibrahim Ramadhan</a></p><p><img src=\"https://user-images.githubusercontent.com/51038084/118176523-31b54c00-b43a-11eb-8e62-bcc439335b8f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/502\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Ibtihel-ouni\">Ibtihel Ouni</a></p><p><img src=\"https://user-images.githubusercontent.com/58151963/107116883-97f86480-6876-11eb-8382-fc1c6ce06403.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/338\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Olanetsoft\">Idris Olubisi</a></p><p><img src=\"https://user-images.githubusercontent.com/45847909/104912483-9da40e00-598c-11eb-8881-971faeaecd9d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/254\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Israel-Laguan\">Israel Antonio Rosales Laguan</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358938-4ab4cf00-dc2b-11eb-9f53-8efb56a72b96.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/575\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ivan-pesenti\">Ivan Pesenti</a></p><p><img src=\"https://user-images.githubusercontent.com/60645922/107370491-57515300-6ae3-11eb-8659-37214e9aff86.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/308\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Iwi4a\">Ivelin Iliev</a></p><p><img src=\"https://user-images.githubusercontent.com/20727684/112530125-fb464380-8d9d-11eb-963a-0a8b25a7a87f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/412\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/JaideepGuntupalli\">Jaideep Guntupalli</a></p><p><img src=\"https://user-images.githubusercontent.com/63718527/142635090-b0065905-edad-4d60-81d1-206ddf3093a4.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/853\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/bloedboemmel\">Jakob Jung</a></p><p><img src=\"https://user-images.githubusercontent.com/58067119/126633887-0f5362c3-1189-47ce-b195-1fc772d28ac7.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/614\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Jassi10000\">Jaskeerat Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/64856348/105141728-9f520b00-5b1f-11eb-924f-d87a5ac8e9f0.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/265\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Jas-Script\">Jaskirat Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/75515362/137254367-8c87ff8d-9cb9-476f-bd9d-b830c9ae20a2.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/772\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/jaypatel31\">Jay Patel</a></p><p><img src=\"https://user-images.githubusercontent.com/59785863/109974379-82fcdd00-7d1f-11eb-9cf9-9a7911767705.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/388\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/JayantGoel001\">Jayant Goel</a></p><p><img src=\"https://user-images.githubusercontent.com/54479676/118960081-8bf56600-b980-11eb-9d59-a6d84971c5a3.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/169\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/jayesh-srivastava\">Jayesh Srivastava</a></p><p><img src=\"https://user-images.githubusercontent.com/49337716/124381232-eeab8280-dcde-11eb-84ed-c54a5bfcf208.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/566\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Jaynil1611\">Jaynil Gaglani</a></p><p><img src=\"https://user-images.githubusercontent.com/48921037/88678363-00b69580-d10c-11ea-902b-58e25c2c799c.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/36\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/rosajen27\">Jennifer Rosa</a></p><p><img src=\"https://raw.githubusercontent.com/rosajen27/rosajen27/master/rosajen27.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/165\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Joel-Nickson\">Joel Nickson</a></p><p><img src=\"https://user-images.githubusercontent.com/61058781/117574506-00b3df00-b0fb-11eb-808d-a653374f0fd1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/485\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/DenverCoder1\">Jonah Lawrence</a></p><p><img src=\"https://user-images.githubusercontent.com/20955511/115257585-e6f52c80-a138-11eb-86a5-22d9e4e3a062.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/209\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Achilles8055\">Jose Jimmy</a></p><p><img src=\"https://user-images.githubusercontent.com/88069006/141782197-78045eb4-e07b-4e46-916c-996245ac1b06.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/842\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/JoykishanSharma\">Joykishan Sharma</a></p><p><img src=\"https://user-images.githubusercontent.com/47889468/90676332-78925e80-e279-11ea-9f7d-bbc2c44289b0.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/62\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/kaiwalyakoparkar\">Kaiwalya Koparkar</a></p><p><img src=\"https://user-images.githubusercontent.com/53310847/117104479-d3350180-ad99-11eb-8152-2afaff67fe04.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/475\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/kamleshjoshi8102\">Kamlesh Joshi</a></p><p><img src=\"https://user-images.githubusercontent.com/72374645/123034023-67b8f900-d406-11eb-829a-6df34ba91852.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/558\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/karan-ksrk\">Karan Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/44173143/113564123-6c032080-9626-11eb-80ec-e59b75892328.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/431\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/KarthikNayak024\">Karthik Nayak</a></p><p><img src=\"https://user-images.githubusercontent.com/39642646/90327189-aa23d500-dfae-11ea-8147-53bbddc3d1c3.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/56\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/starlightknown\">Karuna Tata</a></p><p><img src=\"https://user-images.githubusercontent.com/74637789/117139898-6128e080-adca-11eb-8cc1-0277b7e43114.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/479\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/KKhushhalR2405\">Khushhal Reddy</a></p><p><img src=\"https://user-images.githubusercontent.com/58569950/120160642-14db8f80-c214-11eb-8f2a-d5946aa8d59e.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/537\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Khushi0321\">Khushi Saxena</a></p><p><img src=\"https://user-images.githubusercontent.com/62301468/143006604-d866b862-8fb2-4357-ad3a-aff3c0fdd704.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/859\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/KhushiSharma22\">Khushi Sharma</a></p><p><img src=\"https://user-images.githubusercontent.com/67903164/112979129-cd824580-9175-11eb-8fc7-09169b54d5e9.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/421\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/kingsley-einstein\">Kingsley Victor</a></p><p><img src=\"https://user-images.githubusercontent.com/35224620/112137884-1c0d6e00-8bd1-11eb-9f40-9c578888669f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/407\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Kira272921\">Kira</a></p><p><img src=\"https://user-images.githubusercontent.com/90365542/142598803-a3a64c69-b985-4b80-a628-6c841193cb75.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/849\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Komal7209\">Komal Pal</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/131920342-adaf32bd-cfde-4bb2-ad5f-390b61898a37.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/681\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/krishdevdb\">Krish</a></p><p><img src=\"https://user-images.githubusercontent.com/76587897/117103511-1db57e80-ad98-11eb-83cc-7dd9ab1f64ab.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/473\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/krishguptadev\">Krish Gupta</a></p><p><img src=\"https://user-images.githubusercontent.com/91655303/142618933-d2dead94-c735-47ac-92d8-025c23a2c07d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/851\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Krishnapro\">Krishna Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/59277887/132136661-d62a6664-0fa3-437d-b97d-ea41ca21c61f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/702\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/kshitijarvikar\">Kshitij Arvikar</a></p><p><img src=\"https://user-images.githubusercontent.com/89210111/141609753-c7666dfe-91df-4576-8d6a-495b475e3ae7.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/833\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/kumarankm\">Kumaran KM</a></p><p><img src=\"https://user-images.githubusercontent.com/60292723/107042199-7bf9b200-67e7-11eb-8454-23f4bfa10f59.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/321\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Kushal997-das\">Kushal Das</a></p><p><img src=\"https://user-images.githubusercontent.com/61356005/104895611-1c547780-599c-11eb-8538-04f74005a4b4.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/250\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/leereilly\">Lee Reilly</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358735-489e4080-dc2a-11eb-951e-5961bf3388cb.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/569\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/leticiarosario\">Leticia Rosário</a></p><p><img src=\"https://user-images.githubusercontent.com/60137996/121890703-c9d87680-cd01-11eb-938c-2d4e4416126a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/554\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/makuzaverite\">Makuza Mugabo Verite</a></p><p><img src=\"https://user-images.githubusercontent.com/53856673/102192030-10423b00-3e6f-11eb-8494-a684cebb2ecc.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/186\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/MallikarjunHt\">Mallikarjun H T</a></p><p><img src=\"https://user-images.githubusercontent.com/40291553/95041576-b72e8c00-06f4-11eb-8e29-61e76c681f98.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/127\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Matteas-Eden\">Matt Eden</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358889-09bcba80-dc2b-11eb-85bd-4141b8693256.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/573\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/M4cs\">Max Bridgland</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/91051132-96fcaf00-e617-11ea-91f7-48d42535373d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/65\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/mayankchaudhary26\">Mayank Choudhary</a></p><p><img src=\"https://user-images.githubusercontent.com/56837137/139258468-f7b162b5-94f2-4fb3-94e0-7da43db795dd.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/805\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/manzumrahman\">Md. Manzum Rahman</a></p><p><img src=\"https://user-images.githubusercontent.com/63909405/103669582-baab0b00-4fa2-11eb-9e79-d21a269096a1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/220\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/moshfiqrony\">Md. Moshfiqur Rahman Rony</a></p><p><img src=\"https://user-images.githubusercontent.com/26689488/88507621-a085fd80-cffe-11ea-8918-e0dab7a7f3b2.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/30\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Meghna-DAS\">Meghna Das</a></p><p><img src=\"https://user-images.githubusercontent.com/58567847/92334660-c1397c80-f0ad-11ea-9c35-45f99de50225.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/82\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/msandfor\">Michelle Sandford</a></p><p><img src=\"https://user-images.githubusercontent.com/5952956/94992077-f86e5100-05b9-11eb-819a-73fe944f59c3.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/125\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/mofazil17\">Mohamed Fazil</a></p><p><img src=\"https://user-images.githubusercontent.com/85509306/138413377-05fa8201-47de-47ec-aa3e-9f3605be4178.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/798\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Yaseen549\">Mohamed Yaseen Sheriff S</a></p><p><img src=\"https://user-images.githubusercontent.com/43935210/115549892-d377cc00-a2c6-11eb-9b4b-7983603b5c6c.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/449\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Mo-Shakib\">Mohammad Shakib</a></p><p><img src=\"https://user-images.githubusercontent.com/50780268/131604251-f07f6811-d795-448f-a7b8-0f13b58c602f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/675\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/anotherwebguy\">Mohit singh</a></p><p><img src=\"https://user-images.githubusercontent.com/66346161/114270825-18c90d80-9a2c-11eb-9173-1c072e90ac27.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/436\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/motasimmakki\">Motasim</a></p><p><img src=\"https://user-images.githubusercontent.com/44056349/127783862-dfa186c1-478a-45d0-8088-59cab12c36a9.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/631\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/muhammadawaisshaikh\">Muhammad Awais</a></p><p><img src=\"https://user-images.githubusercontent.com/24633059/107117015-17972b00-6899-11eb-8670-b7bf41a77d32.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/340\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Nandani-Paliwal\">Nandani Paliwal</a></p><p><img src=\"https://user-images.githubusercontent.com/83964826/136408997-e2fcefa5-2c78-4484-9ac3-574bd72da253.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/760\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/nellyXinwei\">Nelson T. Alba Jr.</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358826-c3675b80-dc2a-11eb-944e-90b8ea2c72d8.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/572\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/nikita-jain-01\">Nikita jain</a></p><p><img src=\"https://user-images.githubusercontent.com/72670446/115362754-7c4afc00-a1df-11eb-84be-97a7554ae69b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/442\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/NirmalSilwal\">Nirmal Silwal</a></p><p><img src=\"https://user-images.githubusercontent.com/31946761/93670031-aefc0d00-fab5-11ea-9ca9-cc4bfe73fa83.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/93\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Nkap23\">Nisarg Kapkar</a></p><p><img src=\"https://user-images.githubusercontent.com/53402062/107231517-67672500-6a46-11eb-857e-8b6ad34f7a38.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/350\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Nitesh-thapliyal\">Nitesh Thapliyal</a></p><p><img src=\"https://user-images.githubusercontent.com/53345517/103440787-a13a5400-4c6e-11eb-8ab7-b82e497f662d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/205\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/krniya\">Nitish Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/5454844/109417110-3b591700-79e8-11eb-9258-b4d830b0cbe6.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/375\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/OKTAYKIR\">Oktay Kır</a></p><p><img src=\"https://user-images.githubusercontent.com/8077228/107888040-53766400-6f1b-11eb-93e4-97696149b0f0.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/364\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/chryzcodez\">Olanrewaju Alaba</a></p><p><img src=\"https://user-images.githubusercontent.com/77321169/106990847-5cc23c80-6775-11eb-83ae-3160bce68b20.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/306\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Omkar0114\">Omkar Kulkarni</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/133314407-008ec664-bdbd-4428-a9c4-8c306f74a91c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/713\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/passy4ucj\">Pascal Ojinnaka</a></p><p><img src=\"https://user-images.githubusercontent.com/56399504/107071622-46ec6000-67e5-11eb-8ce8-dc2b06f16dae.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/336\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/shpatrickguo\">Patrick Guo</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358808-a5016000-dc2a-11eb-9210-b80403eae437.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/571\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/paulsonjpaul\">Paulson J Paul</a></p><p><img src=\"https://user-images.githubusercontent.com/73777251/104731775-360a7a80-5762-11eb-8a86-b50d98b58b01.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/247\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Pradumnasaraf\">Pradumna Saraf</a></p><p><img src=\"https://user-images.githubusercontent.com/51878265/144732646-c5e180c9-4d2f-4a03-b6ff-70dc2bafabaf.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/884\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/pvcodes\">Pranjal Verma</a></p><p><img src=\"https://user-images.githubusercontent.com/54075838/111760905-40153a80-88c5-11eb-9600-aa49a78ddd05.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/399\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/bhagatpratham\">Pratham Bhagat</a></p><p><img src=\"https://user-images.githubusercontent.com/66031743/128864527-177a97f6-967c-4b18-93d2-c02472274612.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/639\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/viraldevpb\">Prathamesh Borse</a></p><p><img src=\"https://user-images.githubusercontent.com/66899360/104146755-cb6bde80-53f1-11eb-84bd-dbc87d80152e.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/232\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Pratham31\">Prathamesh Giri</a></p><p><img src=\"https://user-images.githubusercontent.com/56548231/94920063-2c227b80-04d3-11eb-8474-1e1c78f22b95.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/118\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/praveenscience\">Praveen</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88163309-62599a00-cc0a-11ea-8f70-8a9fd17b8eed.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/15\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Amchuz\">Prify Philip</a></p><p><img src=\"https://user-images.githubusercontent.com/32680794/94683989-036c7b80-0345-11eb-9c27-76da3756d1d0.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/106\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/priyaankamishra\">Priyanka Mishra</a></p><p><img src=\"https://user-images.githubusercontent.com/71710239/117578918-55148a00-b10e-11eb-93f4-8d2bd01dcd8c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/487\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/kumarsonsoff3\">Priyanshu Kumawat</a></p><p><img src=\"https://user-images.githubusercontent.com/88786642/145443571-d8423735-6fd9-48c8-ba4d-23d453571d9f.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/894\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Push9828\">Pushkar Thakur</a></p><p><img src=\"https://user-images.githubusercontent.com/31934448/95063061-77c76600-071b-11eb-813f-f53f9ba04035.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/128\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/webdevrachit\">Rachit Tandon</a></p><p><img src=\"https://user-images.githubusercontent.com/72686780/106394124-fa89d480-6420-11eb-837b-fbf179a7697d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/286\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/rajivranjanmars\">Rajiv Ranjan Mars</a></p><p><img src=\"https://user-images.githubusercontent.com/67179338/126766490-97cc500e-eed4-46d0-959f-799b1d7f1e7c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/619\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/mahatorakesh\">Rakesh Mahato</a></p><p><img src=\"https://user-images.githubusercontent.com/69909347/132104145-a6c264c0-7049-4572-8fae-e08a413c4afe.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/689\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/13yadav\">Ranjit Yadav</a></p><p><img src=\"https://user-images.githubusercontent.com/51192422/119933239-5ca6b080-bfa1-11eb-96c7-b6edb9da4778.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/531\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ravithemore\">Ravi M Damor</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/144976103-9e774349-2eee-4cc9-a4eb-6e02d5dabaca.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/892\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Rayman-Sodhi\">Rayman</a></p><p><img src=\"https://user-images.githubusercontent.com/65675692/103086722-50da4b00-460b-11eb-9259-a75a12957bea.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/198\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/RayyanRNKJ\">Rayyan Rasheed</a></p><p><img src=\"https://user-images.githubusercontent.com/64679235/141696204-3084d6cf-49d0-452a-979e-35a58b89b4dc.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/837\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/syedareehaquasar\">Reeha</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88165225-473c5980-cc0d-11ea-936d-3c3daa24a536.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/17\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/rehanpunjwani\">Rehan Punjwani</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/134791010-7e18ffeb-f5f1-4b0f-ac41-4c4bc9006485.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/730\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/RemcoHalman\">Remco Halman</a></p><p><img src=\"https://user-images.githubusercontent.com/25010775/91281626-9cc5d200-e788-11ea-843f-52a10890b485.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/69\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/rishabh062\">Rishabh Dwivedi</a></p><p><img src=\"https://user-images.githubusercontent.com/57454462/109994066-f3612980-7d32-11eb-97b3-5940a4f35ce7.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/390\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Rishabhrathore055\">Rishabh Rathore</a></p><p><img src=\"https://user-images.githubusercontent.com/77366500/115426452-234e8880-a21e-11eb-9e2d-c508acdb921f.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/445\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/wordssaysalot\">Ritesh Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/56651899/118150685-71773600-b430-11eb-95f7-38a7479c5e34.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/498\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ritik307\">Ritik Rawal</a></p><p><img src=\"https://user-images.githubusercontent.com/22374829/104178614-a8acea80-5430-11eb-8ee8-1a7bb89248b2.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/237\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Ritika-Das\">Ritika Das</a></p><p><img src=\"https://user-images.githubusercontent.com/61988162/94970758-f907d880-0522-11eb-91fc-2c0c0b48b735.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/121\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ritvij14\">Ritvij Kumar Sharma</a></p><p><img src=\"https://user-images.githubusercontent.com/51456744/92560038-521b7e00-f28f-11ea-91be-5a74bff8c4ff.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/86\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Ritwik880\">Ritwik Sinha</a></p><p><img src=\"https://user-images.githubusercontent.com/54446880/127509715-b594b68d-4703-4bc2-aed5-1172d7df6a5c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/627\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/roaldnefs\">Roald Nefs</a></p><p><img src=\"https://user-images.githubusercontent.com/6523325/106946650-a8e78f80-6729-11eb-9f51-a580cdf9e6f1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/315\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/DemonDaddy22\">Rohan Gupta</a></p><p><img src=\"https://user-images.githubusercontent.com/39908472/135729184-0a1a05a2-1f74-48e8-ace7-4d4b2a62eb94.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/751\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/rohank2502\">Rohan Kulkarni</a></p><p><img src=\"https://user-images.githubusercontent.com/76584243/111806629-30fbb000-88f8-11eb-892c-c64d7e88d035.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/401\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/rohansaini886\">Rohan Saini</a></p><p><img src=\"https://user-images.githubusercontent.com/83878702/142400265-5eb0aeb6-1575-4322-ba44-bca642b4d227.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/847\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/rohitturbot\">Rohit Yadav</a></p><p><img src=\"https://user-images.githubusercontent.com/40739903/126065686-40212b44-01a8-4c5f-b38a-de22ca76cc9c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/602\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/rudrabarad\">Rudra Barad</a></p><p><img src=\"https://user-images.githubusercontent.com/53337681/115293769-5983fd80-a175-11eb-91f8-dbdadf06a8b0.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/440\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Rupam-Shil\">Rupam Shil</a></p><p><img src=\"https://user-images.githubusercontent.com/68724228/119318846-67a6cb80-bc97-11eb-8dd1-32832f379fe5.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/523\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/rperry99\">Russ Perry</a></p><p><img src=\"https://user-images.githubusercontent.com/24259120/92329693-1a19fe00-f037-11ea-889a-8fb530b03514.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/78\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/msaaddev\">Saad Irfan</a></p><p><img src=\"https://user-images.githubusercontent.com/44341551/128627907-fbeb7a8a-f0d7-454f-a077-cf10c8876aaa.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/636\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Saatvik21\">Saatvik Nagpal</a></p><p><img src=\"https://user-images.githubusercontent.com/61618767/117973604-3bf81d00-b34a-11eb-86a2-8bbd7f19b6d5.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/493\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Sachin-chaurasiya\">Sachin Chaurasiya</a></p><p><img src=\"https://user-images.githubusercontent.com/59080942/138445987-87153dd1-fa52-4d9d-935f-a643443afd70.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/801\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/SahityaRoy\">Sahitya</a></p><p><img src=\"https://user-images.githubusercontent.com/72821604/127466372-6f894759-7511-4bd1-828c-30734755102e.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/621\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/SairamNomula\">Sairam Nomula</a></p><p><img src=\"https://user-images.githubusercontent.com/78247889/137581575-7f2195b8-bf1b-49e0-9df1-19080616d117.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/774\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Sam-Varghese\">Sam Varghese</a></p><p><img src=\"https://user-images.githubusercontent.com/79152648/116452787-b79e9800-a87b-11eb-852c-14509cd1c33e.jpeg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/467\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Samridhi-98\">Samriddhi</a></p><p><img src=\"https://user-images.githubusercontent.com/54466041/104162252-40530e80-541a-11eb-967d-6b6f4050371c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/235\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/samuelbartels20\">Samuel Bartels</a></p><p><img src=\"https://user-images.githubusercontent.com/40799981/145493827-298abbdd-1ad2-482a-aad0-f999f50e1de9.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/898\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/sanchitvj\">Sanchit Vijay</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88266811-c1311900-ccc7-11ea-8863-efa1664b45fd.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/23\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/sandip15\">Sandip Roy</a></p><p><img src=\"https://user-images.githubusercontent.com/23638291/88459015-c94dac00-ceb3-11ea-82df-691a23987640.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/28\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/saswatsamal\">Saswat Samal</a></p><p><img src=\"https://user-images.githubusercontent.com/39031660/116078640-7d36ce80-a6b4-11eb-8987-525d3c2ad64d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/462\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/saumya66\">Saumya Ranjan Nayak</a></p><p><img src=\"https://user-images.githubusercontent.com/60464414/104895387-d0a1ce00-599b-11eb-8bc0-58d79507051b.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/249\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/saviomartin\">Savio Martin</a></p><p><img src=\"https://user-images.githubusercontent.com/45217974/104979077-b3a0e580-5a03-11eb-892f-8eaa3b8bb214.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/98\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/SayantaniDeb\">Sayantani Deb</a></p><p><img src=\"https://user-images.githubusercontent.com/74983536/135533466-d88b6a9c-1950-4cf5-a694-cdb2109dbff2.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/744\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/sifa123\">Sefat Siddiquea Sifa</a></p><p><img src=\"https://user-images.githubusercontent.com/63462931/112490528-a3add500-8da9-11eb-853e-9972b42e5caf.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/410\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/shajeen\">Shajeen Ahamed</a></p><p><img src=\"https://user-images.githubusercontent.com/2623563/95846887-a2439f80-0d69-11eb-9a7a-bff4bb113cee.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/140\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/sharannyobasu\">Sharannyo Basu</a></p><p><img src=\"https://user-images.githubusercontent.com/55141861/94108238-921c5c80-fe5c-11ea-842e-f4b7a0befcb4.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/101\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/shashank-indukuri\">Shashank Indukuri</a></p><p><img src=\"https://user-images.githubusercontent.com/65766473/136482587-d24ef165-095a-448c-9c14-b15f5fd047e3.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/762\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/skjha1\">Shivendra K Jha</a></p><p><img src=\"https://user-images.githubusercontent.com/47923680/120433441-d7ecd580-c398-11eb-9c5c-fe8cd356e4d2.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/542\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/shoaibpython\">Shoaib Khalid</a></p><p><img src=\"https://user-images.githubusercontent.com/56650286/95706498-75f82800-0c70-11eb-8bc6-77355fb9f71e.JPG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/139\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/shrejal99\">Shrejal Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/54766839/138070516-8a61d5cd-1a3b-467c-a108-945f2dcc6530.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/784\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/shreyalive\">Shreya Purohit</a></p><p><img src=\"https://user-images.githubusercontent.com/63795399/106517095-07c8c100-64fe-11eb-807a-64405ddb4db0.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/297\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/shreyaansjain06\">Shreyaans Jain</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/134031514-b0bbff29-3974-4f05-a2c6-a5c163e90216.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/726\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Shubham714\">Shubham Hadake</a></p><p><img src=\"https://user-images.githubusercontent.com/40699892/89451190-6db7d400-d779-11ea-8302-fd5d4f9bc8f8.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/50\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/KukretiShubham\">Shubham Kukreti</a></p><p><img src=\"https://user-images.githubusercontent.com/51391473/129485691-4a1249b6-3203-4f15-ac8c-654a67d50ee4.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/648\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ShyamPraveenSingh\">Shyam Praveen Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/57350162/94983126-66385f80-055d-11eb-9193-1cd683dd677b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/123\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/siddhi-244\">Siddhi Bhanushali</a></p><p><img src=\"https://user-images.githubusercontent.com/69195262/126054873-11415026-bcee-40d4-81dc-db3076965670.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/598\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/MrSlimCoder\">Slim Coder</a></p><p><img src=\"https://user-images.githubusercontent.com/28563357/126220805-82470ad3-f38a-40b4-a277-8c40704fdb5b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/607\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Tiwarisonal19\">Sonal Tiwari</a></p><p><img src=\"https://user-images.githubusercontent.com/66546980/136524950-8180c22f-d630-4e07-97f4-90d40a6d890e.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/768\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/elli0t43\">Soumyadeep Dutta</a></p><p><img src=\"https://user-images.githubusercontent.com/53973185/138368824-978d12e5-16b5-4bc8-a33f-1bccdb9b68b8.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/795\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/Subathra19\">Sri Subathra Devi B</a></p><p><img src=\"https://user-images.githubusercontent.com/55084520/127505296-cd9fe349-ed69-4ff8-ad10-4b363cdf8f34.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/625\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/srini047\">Sriniketh J</a></p><p><img src=\"https://user-images.githubusercontent.com/81156510/142722621-fe15ceb1-3be2-4526-baea-024f5cdfd60a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/855\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/stemount\">Stephen Mount</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88265731-e91f7d00-ccc5-11ea-99c5-c68434be9d26.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/20\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/SubhamRaoniar28\">Subham Raoniar</a></p><p><img src=\"https://user-images.githubusercontent.com/41485604/111068853-767f3e00-84f0-11eb-9122-80af0d842463.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/397\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Subhampreet\">Subhampreet Mohanty</a></p><p><img src=\"https://user-images.githubusercontent.com/61475220/95688833-8eddea80-0c2a-11eb-86f0-79916ba9499d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/131\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/SulthanNK\">Sulthan Mohaideen</a></p><p><img src=\"https://user-images.githubusercontent.com/32130871/117547009-e4586980-b04a-11eb-8daa-baad5ffb4949.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/482\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/suprajaarthi\">Supraja Arthi</a></p><p><img src=\"https://user-images.githubusercontent.com/51900501/117803970-d554ff80-b274-11eb-91de-e62714a56d2f.jpeg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/490\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Surajbokde\">Suraj Bokde</a></p><p><img src=\"https://user-images.githubusercontent.com/66197682/105803643-eaf33180-5fc3-11eb-8f97-42de7cee0f05.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/279\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/imsushant12\">Sushant Gaurav</a></p><p><img src=\"https://user-images.githubusercontent.com/68695162/136514805-e77cb457-2a22-43b3-bea5-4e77eccf22a4.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/765\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ChoudharyTara\">Tara Choudhary</a></p><p><img src=\"https://user-images.githubusercontent.com/87922322/141666358-ffc20544-4424-4e6e-a702-9e0912082b44.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/835\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Tarun-Kamboj\">Tarun Kamboj</a></p><p><img src=\"https://user-images.githubusercontent.com/56023742/112745083-62910d00-8fc3-11eb-9f48-ee1cbc7bacd9.PNG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/419\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/TawfikYasser\">Tawfik Yasser</a></p><p><img src=\"https://user-images.githubusercontent.com/54971231/107149052-42e44d80-695f-11eb-9fbf-83c20f4a3e0a.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/227\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ThalesBMC\">Thales Brederodes Montarroyos Candido</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358775-7c796600-dc2a-11eb-9e2f-e9d9daf27bf9.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/570\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/thejaswin123\">Thejaswin S</a></p><p><img src=\"https://user-images.githubusercontent.com/52855622/118305007-08152700-b505-11eb-919e-268ffa68a0ff.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/507\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/timburgan\">Tim Burgan</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358657-f0673e80-dc29-11eb-9e43-84c889b175b0.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/564\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/tips367\">Tipu khan</a></p><p><img src=\"https://user-images.githubusercontent.com/41302067/123315141-03eb1900-d549-11eb-9021-a4c3b985c95d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/562\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/hill\">Tom Hill</a></p><p><img src=\"https://user-images.githubusercontent.com/5620045/125885321-8cda4575-b72f-42ea-99ad-4de890e747ad.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/592\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Utkarsh1504\">Utkarsh Mishra</a></p><p><img src=\"https://user-images.githubusercontent.com/76392681/107881996-f673b180-6f0c-11eb-90a8-9365ff3e4753.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/361\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/UtkarshMishra12\">Utkarsh Mishra</a></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/600\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Utkarsh299-tech\">Utkarsh Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/60184229/103612077-a7b81c80-4f49-11eb-90eb-0002bc43e97c.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/217\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/helper-uttam\">Uttam Kumar</a></p><p><img src=\"https://user-images.githubusercontent.com/72701081/137596655-04914ae9-7ce0-44d3-8904-12af8a089696.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/779\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/smv1999\">Vaidhyanathan S M</a></p><p><img src=\"https://user-images.githubusercontent.com/42896577/107180778-6f4fa680-69ff-11eb-9e53-b2d3c858644d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/344\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/Vanshikapandey30\">Vanshika Pandey</a></p><p><img src=\"https://user-images.githubusercontent.com/70807500/135111984-f6c4f540-949b-451c-8fb3-22d5daa07575.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/738\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/varghesejose2020\">Varghese Jose</a></p><p><img src=\"https://user-images.githubusercontent.com/71702982/106555821-526d2c00-6544-11eb-9da0-076566844959.JPG\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/302\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/VasudevJaiswal\">Vasudev Jaiswal</a></p><p><img src=\"https://user-images.githubusercontent.com/85981735/129255772-5bac726e-d98e-4eb4-8c9f-c2206b72c976.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/641\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/plazzy99\">Vatsal Kesarwani</a></p><p><img src=\"https://user-images.githubusercontent.com/48295138/106139911-0f9e0380-6194-11eb-9558-56ff97b53c94.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/281\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/VedantKhairnar\">Vedant Khairnar</a></p><p><img src=\"https://user-images.githubusercontent.com/624760/88165360-7b177f00-cc0d-11ea-804a-776639dcca29.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/18\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/victor-cody\">Victor Ikechukwu</a></p><p><img src=\"https://user-images.githubusercontent.com/69702944/118384168-daf77000-b5fb-11eb-9a81-0f6a3298b613.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/512\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/victoria-lo\">Victoria Lo</a></p><p><img src=\"https://user-images.githubusercontent.com/47699978/125807703-6d8c6adf-d642-42f2-b1bf-51f6a32c0a84.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/590\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/ckvignesh\">Vignesh CK</a></p><p><img src=\"https://user-images.githubusercontent.com/61013244/140084080-ba40ae9a-c470-4a82-99a4-42dbbffca978.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/825\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/vinzvinci\">Vincent Villafuerte</a></p><p><img src=\"https://user-images.githubusercontent.com/73097560/117130491-b49f2c80-add2-11eb-90bb-a04331c96a4b.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/215\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/vineelsai26\">Vineel Sai</a></p><p><img src=\"https://user-images.githubusercontent.com/52851879/128023216-f48c89f6-c745-4e76-ae7a-38b9034de2b1.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/634\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/vivmost\">Vivek Singh</a></p><p><img src=\"https://user-images.githubusercontent.com/58567847/92334655-ad8e1600-f0ad-11ea-9de9-c44ee1ff7420.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/81\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/geekyvyas\">Yajush Vyas</a></p><p><img src=\"https://user-images.githubusercontent.com/35025375/98467874-c924b280-21fd-11eb-810b-2d17e0342e10.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/163\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/YashIndane\">Yash Indane</a></p><p><img src=\"https://user-images.githubusercontent.com/53041219/99989860-22353e80-2dd9-11eb-95c5-07dd04eecd7d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/180\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/yashsehgal\">Yash Sehgal</a></p><p><img src=\"https://user-images.githubusercontent.com/62352288/113475867-6aeeb980-9495-11eb-86be-bfa0085a6f48.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/429\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/ZaidKhan2002\">Zaid Khan</a></p><p><img src=\"https://user-images.githubusercontent.com/71960989/135026473-a1f58d4b-55d7-4d5f-8a72-1673d52ea20d.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/733\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/afc163\">afc163</a></p><p><img src=\"https://user-images.githubusercontent.com/52232302/124358687-1987cf00-dc2a-11eb-9e6f-faa4f425476f.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/568\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/amino19\">aminos</a></p><p><img src=\"https://user-images.githubusercontent.com/75872316/125152497-91924f80-e16a-11eb-8366-8d5c3d26df10.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/499\">(💯 give your vote)</a></p></td>\n</tr>\n<tr>\n<td align=\"center\"><p><a href=\"https://github.com/charan-web\">charan</a></p><p><img src=\"https://user-images.githubusercontent.com/56212945/93706577-39d81880-fb45-11ea-9f6c-236275f1a0be.jpg\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/95\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/schmelto\">schmelto</a></p><p><img src=\"https://user-images.githubusercontent.com/30869493/108380804-7ea4d000-7207-11eb-8f3e-2d00b21d1456.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/373\">(💯 give your vote)</a></p></td>\n<td align=\"center\"><p><a href=\"https://github.com/vonhyou\">vonhyou</a></p><p><img src=\"https://user-images.githubusercontent.com/29454668/115579668-f8853280-a2f8-11eb-8372-95202883ac86.png\" alt=\"\"></p><p><a href=\"https://github.com/EddieHubCommunity/awesome-github-profiles/issues/451\">(💯 give your vote)</a></p></td>\n</tr>\n</tbody>\n</table>"},{"url":"/docs/data-structures/","relativePath":"docs/data-structures/index.md","relativeDir":"docs/data-structures","base":"index.md","name":"index","frontmatter":{"title":"Data Structures","excerpt":"In this section you'll learn how to add syntax highlighting, examples, callouts and much more.","seo":{"title":"Data Structures","description":"This is the  Data Structures page","extra":[{"name":"og:type","value":"website","keyName":"property"},{"name":"og:title","value":"Data Structures","keyName":"property"},{"name":"og:description","value":"This is the  Data Structures page","keyName":"property"},{"name":"twitter:card","value":"summary"},{"name":"twitter:title","value":"Data Structures"},{"name":"twitter:description","value":"This is the  Data Structures page"}]},"template":"docs","weight":0},"html":"<p>Data structures</p>\n<p><br><a href=\"https://ds-unit-5-lambda.netlify.app/#\">https://ds-unit-5-lambda.netlify.app/#</a>.\n<br>\n<br>\n<br></p>\n<h1>   Algorithms </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz-branch-the-algos.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h1>  The Algos Bgoonz Branch </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://thealgorithms.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<h1>  Python Data Structures</h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://ds-unit-5-lambda.netlify.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<h1>   Leetcode </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz.github.io/Leetcode-JS-PY-MD/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<br>\n<br>\n<br>\n<h1>   Algorithms </h1>\n<br>\n<iframe  style=\"z-index:-1!important; overflow:scroll;resize:both;\" class=\"block-content\" src=\"https://bgoonz-branch-the-algos.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" ></iframe>\n<br>\n<br>\n<br>\n<h3>Data structures in JavaScript</h3>\n<p><span class=\"graf-dropCap\">H</span>ere's a website I created to practice data structures!</p>\n<p><a href=\"https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/\"><strong>directory</strong><br />\n<em>Edit description</em>ds-algo-official-c3dw6uapg-bgoonz.vercel.app</a><a href=\"https://ds-algo-official-c3dw6uapg-bgoonz.vercel.app/\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<p><span class=\"graf-dropCap\">H</span>ere's the repo that the website is built on:</p>\n<p><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><strong>bgoonz/DS-ALGO-OFFICIAL</strong><br />\n<em>Navigation ####Author:Bryan Guner Big O notation is the language we use for talking about how long an algorithm takes…</em>github.com</a><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><span class=\"graf-dropCap\">H</span>ere's a live code editor where you can mess with any of the examples…</p>\n<h3>Resources (article content below):</h3>\n<h4>Videos</h4>\n<ul>\n<li><span id=\"53c4\"><a href=\"https://www.youtube.com/watch?v=0IAPZzGSbME&amp;list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O&amp;index=2&amp;t=0s\" class=\"markup--anchor markup--li-anchor\">Abdul Bari: YouTubeChannel for Algorithms</a></span></li>\n<li><span id=\"ab93\"><a href=\"https://www.youtube.com/watch?v=lxja8wBwN0k&amp;list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s\" class=\"markup--anchor markup--li-anchor\">Data Structures and algorithms</a></span></li>\n<li><span id=\"e614\"><a href=\"https://www.youtube.com/playlist?list=PLmGElG-9wxc9Us6IK6Qy-KHlG_F3IS6Q9\" class=\"markup--anchor markup--li-anchor\">Data Structures and algorithms Course</a></span></li>\n<li><span id=\"3d48\"><a href=\"https://www.khanacademy.org/computing/computer-science/algorithms\" class=\"markup--anchor markup--li-anchor\">Khan Academy</a></span></li>\n<li><span id=\"ac90\"><a href=\"https://www.youtube.com/playlist?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P\" class=\"markup--anchor markup--li-anchor\">Data structures by mycodeschool</a>Pre-requisite for this lesson is good understanding of pointers in C.</span></li>\n<li><span id=\"9bd9\"><a href=\"https://www.youtube.com/watch?v=HtSuA80QTyo&amp;list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb\" class=\"markup--anchor markup--li-anchor\">MIT 6.006: Intro to Algorithms(2011)</a></span></li>\n<li><span id=\"71f0\"><a href=\"https://www.youtube.com/watch?v=5_5oE5lgrhw&amp;list=PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi\" class=\"markup--anchor markup--li-anchor\">Data Structures and Algorithms by Codewithharry</a></span></li>\n</ul>\n<h4>Books</h4>\n<ul>\n<li><span id=\"2eac\"><a href=\"https://edutechlearners.com/download/Introduction_to_algorithms-3rd%20Edition.pdf\" class=\"markup--anchor markup--li-anchor\">Introduction to Algorithms</a> by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein</span></li>\n<li><span id=\"3e8d\"><a href=\"http://www.sso.sy/sites/default/files/competitive%20programming%203_1.pdf\" class=\"markup--anchor markup--li-anchor\">Competitive Programming 3</a> by Steven Halim and Felix Halim</span></li>\n<li><span id=\"3aa3\"><a href=\"https://cses.fi/book/book.pdf\" class=\"markup--anchor markup--li-anchor\">Competitive Programmers Hand Book</a> Beginner friendly hand book for competitive programmers.</span></li>\n<li><span id=\"3c02\"><a href=\"https://github.com/Amchuz/My-Data-Structures-and-Algorithms-Resources/raw/master/Books/Data%20Structures%20and%20Algorithms%20-%20Narasimha%20Karumanchi.pdf\" class=\"markup--anchor markup--li-anchor\">Data Structures and Algorithms Made Easy</a> by Narasimha Karumanchi</span></li>\n<li><span id=\"93ec\"><a href=\"https://github.com/Amchuz/My-Data-Structures-and-Algorithms-Resources/raw/master/Books/Learning%20Algorithms%20Through%20Programming%20and%20Puzzle%20Solving.pdf\" class=\"markup--anchor markup--li-anchor\">Learning Algorithms Through Programming and Puzzle Solving</a> by Alexander Kulikov and Pavel Pevzner</span></li>\n</ul>\n<h4>Coding practice</h4>\n<ul>\n<li><span id=\"824c\"><a href=\"https://leetcode.com/\" class=\"markup--anchor markup--li-anchor\">LeetCode</a></span></li>\n<li><span id=\"a528\"><a href=\"https://www.interviewbit.com/\" class=\"markup--anchor markup--li-anchor\">InterviewBit</a></span></li>\n<li><span id=\"fa41\"><a href=\"https://codility.com/\" class=\"markup--anchor markup--li-anchor\">Codility</a></span></li>\n<li><span id=\"6c61\"><a href=\"https://www.hackerrank.com/\" class=\"markup--anchor markup--li-anchor\">HackerRank</a></span></li>\n<li><span id=\"dff6\"><a href=\"https://projecteuler.net/\" class=\"markup--anchor markup--li-anchor\">Project Euler</a></span></li>\n<li><span id=\"b2dd\"><a href=\"https://spoj.com/\" class=\"markup--anchor markup--li-anchor\">Spoj</a></span></li>\n<li><span id=\"c8e8\"><a href=\"https://code.google.com/codejam/contests.html\" class=\"markup--anchor markup--li-anchor\">Google Code Jam practice problems</a></span></li>\n<li><span id=\"e8bb\"><a href=\"https://www.hackerearth.com/\" class=\"markup--anchor markup--li-anchor\">HackerEarth</a></span></li>\n<li><span id=\"e803\"><a href=\"https://www.topcoder.com/\" class=\"markup--anchor markup--li-anchor\">Top Coder</a></span></li>\n<li><span id=\"294e\"><a href=\"https://www.codechef.com/\" class=\"markup--anchor markup--li-anchor\">CodeChef</a></span></li>\n<li><span id=\"9c05\"><a href=\"https://www.codewars.com/\" class=\"markup--anchor markup--li-anchor\">Codewars</a></span></li>\n<li><span id=\"356e\"><a href=\"https://codesignal.com/\" class=\"markup--anchor markup--li-anchor\">CodeSignal</a></span></li>\n<li><span id=\"2d20\"><a href=\"http://codekata.com/\" class=\"markup--anchor markup--li-anchor\">CodeKata</a></span></li>\n<li><span id=\"d3bf\"><a href=\"https://www.firecode.io/\" class=\"markup--anchor markup--li-anchor\">Firecode</a></span></li>\n</ul>\n<h4>Courses</h4>\n<ul>\n<li><span id=\"eac2\"><a href=\"https://academy.zerotomastery.io/p/master-the-coding-interview-faang-interview-prep\" class=\"markup--anchor markup--li-anchor\">Master the Coding Interview: Big Tech (FAANG) Interviews</a> Course by Andrei and his team.</span></li>\n<li><span id=\"36ca\"><a href=\"https://realpython.com/python-data-structures\" class=\"markup--anchor markup--li-anchor\">Common Python Data Structures</a> Data structures are the fundamental constructs around which you build your programs. Each data structure provides a particular way of organizing data so it can be accessed efficiently, depending on your use case. Python ships with an extensive set of data structures in its standard library.</span></li>\n<li><span id=\"cdc9\"><a href=\"https://www.geeksforgeeks.org/fork-cpp-course-structure\" class=\"markup--anchor markup--li-anchor\">Fork CPP</a> A good course for beginners.</span></li>\n<li><span id=\"6d47\"><a href=\"https://codeforces.com/edu/course/2\" class=\"markup--anchor markup--li-anchor\">EDU</a> Advanced course.</span></li>\n<li><span id=\"8bb5\"><a href=\"https://www.udacity.com/course/c-for-programmers--ud210\" class=\"markup--anchor markup--li-anchor\">C++ For Programmers</a> Learn features and constructs for C++.</span></li>\n</ul>\n<h4>Guides</h4>\n<ul>\n<li><span id=\"e9e9\"><a href=\"http://www.geeksforgeeks.org/\" class=\"markup--anchor markup--li-anchor\">GeeksForGeeks — A CS portal for geeks</a></span></li>\n<li><span id=\"a228\"><a href=\"https://www.learneroo.com/subjects/8\" class=\"markup--anchor markup--li-anchor\">Learneroo — Algorithms</a></span></li>\n<li><span id=\"a2f0\"><a href=\"http://www.topcoder.com/tc?d1=tutorials&amp;d2=alg_index&amp;module=Static\" class=\"markup--anchor markup--li-anchor\">Top Coder tutorials</a></span></li>\n<li><span id=\"f3ec\"><a href=\"http://www.infoarena.ro/training-path\" class=\"markup--anchor markup--li-anchor\">Infoarena training path</a> (RO)</span></li>\n<li><span id=\"ec93\">Steven &#x26; Felix Halim — <a href=\"https://uva.onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8&amp;category=118\" class=\"markup--anchor markup--li-anchor\">Increasing the Lower Bound of Programming Contests</a> (UVA Online Judge)</span></li>\n</ul>\n<h3><strong><em>space</em></strong></h3>\n<blockquote>\n<p><em>The space complexity represents the memory consumption of a data structure. As for most of the things in life, you can't have it all, so it is with the data structures. You will generally need to trade some time for space or the other way around.</em></p>\n</blockquote>\n<h3><em>time</em></h3>\n<blockquote>\n<p><em>The time complexity for a data structure is in general more diverse than its space complexity.</em></p>\n</blockquote>\n<h3><em>Several operations</em></h3>\n<blockquote>\n<p><em>In contrary to algorithms, when you look at the time complexity for data structures you need to express it for several operations that you can do with data structures. It can be adding elements, deleting elements, accessing an element or even searching for an element.</em></p>\n</blockquote>\n<h3><em>Dependent on data</em></h3>\n<blockquote>\n<p><em>Something that data structure and algorithms have in common when talking about time complexity is that they are both dealing with data. When you deal with data you become dependent on them and as a result the time complexity is also dependent of the data that you received. To solve this problem we talk about 3 different time complexity.</em></p>\n</blockquote>\n<ul>\n<li><span id=\"bc8d\"><strong>The best-case complexity: when the data looks the best</strong></span></li>\n<li><span id=\"8b06\"><strong>The worst-case complexity: when the data looks the worst</strong></span></li>\n<li><span id=\"881c\"><strong>The average-case complexity: when the data looks average</strong></span></li>\n</ul>\n<h3>Big O notation</h3>\n<p>The complexity is usually expressed with the Big O notation. The wikipedia page about this subject is pretty complex but you can find here a good summary of the different complexity for the most famous data structures and sorting algorithms.</p>\n<h3>The Array data structure</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Qk3UYgeqXamRrFLR.gif\" class=\"graf-image\" /></figure>### Definition\n<p>An Array data structure, or simply an Array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. The simplest type of data structure is a linear array, also called one-dimensional array. From Wikipedia</p>\n<p>Arrays are among the oldest and most important data structures and are used by every program. They are also used to implement many other data structures.</p>\n<p><em>Complexity</em>\n<em>Average</em>\n<em>Access Search Insertion Deletion</em></p>\n<p>O(1) O(n) O(1) O(n)</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*-BJ2hU-CZO2kuzu4x5a53g.png\" class=\"graf-image\" /></figure>indexvalue0 … this is the first value, stored at zero position\n<ol>\n<li><span id=\"b953\">The index of an array <strong>runs in sequence</strong></span></li>\n<li>This could be useful for storing data that are required to be ordered, such as rankings or queues</li>\n<li>In JavaScript, array's value could be mixed; meaning value of each index could be of different data, be it String, Number or even Objects</li>\n</ol>\n<h3>2. Objects</h3>\n<p>Think of objects as a logical grouping of a bunch of properties.</p>\n<p>Properties could be some variable that it's storing or some methods that it's using.</p>\n<p>I also visualize an object as a table.</p>\n<p>The main difference is that object's “index” need not be numbers and is not necessarily sequenced.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*KVZkD2zrgEa_47igW8Hq8g.png\" class=\"graf-image\" /></figure>\n<h3>The Hash Table</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*avbxLAFocSV6vsl5.gif\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*3GJiRoLyEoZ_aIlO\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Hash Table (Hash Map) is a data structure used to implement an associative array, a structure that can map keys to values. A Hash Table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found. From Wikipedia</em></p>\n</blockquote>\n<p>Hash Tables are considered the more efficient data structure for lookup and for this reason, they are widely used.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion</p>\n<ul>\n<li><span id=\"f63f\">O(1) O(1) O(1)</span></li>\n</ul>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<p>Note, here I am storing another object for every hash in my Hash Table.</p>\n<h3>The Set</h3>\n<h3>Sets</h3>\n<p>Sets are pretty much what it sounds like. It's the same intuition as Set in Mathematics. I visualize Sets as Venn Diagrams.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*AIQljh9p8Baw9TnE.png\" class=\"graf-image\" /></figure><figure><img src=\"https://cdn-images-1.medium.com/max/800/0*gOE33ANZP2ujbjIG\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Set is an abstract data type that can store certain values, without any particular order, and no repeated values. It is a computer implementation of the mathematical concept of a finite Set. From Wikipedia</em></p>\n</blockquote>\n<p>The Set data structure is usually used to test whether elements belong to set of values. Rather then only containing elements, Sets are more used to perform operations on multiple values at once with methods such as union, intersect, etc…</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion</p>\n<ul>\n<li><span id=\"daa6\">O(n) O(n) O(n)</span></li>\n</ul>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<h3>The Singly Linked List</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*fLs64rV-Xq19aVCA.gif\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Singly Linked List is a linear collection of data elements, called nodes pointing to the next node by means of pointer. It is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of data and a reference (in other words, a link) to the next node in the sequence.</em></p>\n</blockquote>\n<p>Linked Lists are among the simplest and most common data structures because it allows for efficient insertion or removal of elements from any position in the sequence.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<hr>\n<h3>The Doubly Linked List</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*TQXiR-L_itiG3WP-.gif\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Doubly Linked List is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. From Wikipedia</em></p>\n</blockquote>\n<p>Having two node links allow traversal in either direction but adding or removing a node in a doubly linked list requires changing more links than the same operations on a Singly Linked List.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<h3>The Stack</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/0*qsjYW-Lvfo22ecLE.gif\" class=\"graf-image\" /></figure>\n<h3><em>Definition</em></h3>\n<blockquote>\n<p><em>A Stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. The order in which elements come off a Stack gives rise to its alternative name, LIFO (for last in, first out). From Wikipedia</em></p>\n</blockquote>\n<p>A Stack often has a third method peek which allows to check the last pushed element without popping it.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(1)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<h3>The Queue</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*YvfuX5tKP7-V0p7v.gif\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal operations are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. This makes the Queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the Queue will be the first one to be removed.</em></p>\n</blockquote>\n<p>As for the Stack data structure, a peek operation is often added to the Queue data structure. It returns the value of the front element without dequeuing it.</p>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(1) O(n)</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<h3>The Tree</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*yUiQ-NaPKeLQnN7n\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Tree is a widely used data structure that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node. A tree data structure can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the “children”), with the constraints that no reference is duplicated, and none points to the root node. From Wikipedia</em></p>\n</blockquote>\n<p>Complexity\nAverage\nAccess Search Insertion Deletion\nO(n) O(n) O(n) O(n)\nTo get a full overview of the time and space complexity of the Tree data structure, have a look to this excellent Big O cheat sheet.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*DCdQiB6XqBJCrFRz12BwqA.png\" class=\"graf-image\" /></figure>*The code*\n<h3>The Graph</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*q31mL1kjFWlIzw3l.gif\" class=\"graf-image\" /></figure>### *Definition*\n<blockquote>\n<p><em>A Graph data structure consists of a finite (and possibly mutable) set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected Graph or a set of ordered pairs for a directed Graph. These pairs are known as edges, arcs, or lines for an undirected Graph and as arrows, directed edges, directed arcs, or directed lines for a directed Graph. The vertices may be part of the Graph structure, or may be external entities represented by integer indices or references.</em></p>\n</blockquote>\n<ul>\n<li><span id=\"f896\">A graph is <strong>any</strong> collection of nodes and edges.</span></li>\n<li><span id=\"fbda\">Much more relaxed in structure than a tree.</span></li>\n<li><span id=\"5281\">It doesn't need to have a root node (not every node needs to be accessible from a single node)</span></li>\n<li><span id=\"0c79\">It can have cycles (a group of nodes whose paths begin and end at the same node)</span></li>\n<li><span id=\"4afc\">Cycles are not always “isolated”, they can be one part of a larger graph. You can detect them by starting your search on a specific node and finding a path that takes you back to that same node.</span></li>\n<li><span id=\"8f45\">Any number of edges may leave a given node</span></li>\n<li><span id=\"51cf\">A Path is a sequence of nodes on a graph</span></li>\n</ul>\n<h3>Cycle Visual</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*dn1BqCdXdFg4FCVSz6uArA.png\" class=\"graf-image\" /></figure>A Graph data structure may also associate to each edge some edge value, such as a symbolic label or a numeric attribute (cost, capacity, length, etc.).\n<p>Representation\nThere are different ways of representing a graph, each of them with its own advantages and disadvantages. Here are the main 2:</p>\n<p>Adjacency list: For every vertex a list of adjacent vertices is stored. This can be viewed as storing the list of edges. This data structure allows the storage of additional data on the vertices and edges.\nAdjacency matrix: Data are stored in a two-dimensional matrix, in which the rows represent source vertices and columns represent destination vertices. The data on the edges and vertices must be stored externally.</p>\n<p>Graph</p>\n<blockquote>\n<p><em>The code</em></p>\n</blockquote>\n<hr>\n<h1>Leetcode</h1>\n<h2>Data Structures &#x26; Algorithms</h2>\n<p><a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\">DS Algo Codebase</a></p>\n<p><a href=\"#115-distinct-subsequenceshttpsleetcodecomproblemsdistinct-subsequencesdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/distinct-subsequences/description/\">115. Distinct Subsequences</a></h2>\n<h3>Problem:</h3>\n<p>Given a string <strong>S</strong> and a string <strong>T</strong>, count the number of distinct subsequences of <strong>S</strong> which equals <strong>T</strong>.</p>\n<p>A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, <code>\"ACE\"</code> is a subsequence of <code>\"ABCDE\"</code> while <code>\"AEC\"</code> is not).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: S = \"rabbbit\", T = \"rabbit\"\nOutput: 3\nExplanation:\n\nAs shown below, there are 3 ways you can generate \"rabbit\" from S.\n(The caret symbol ^ means the chosen letters)\n\nrabbbit\n^^^^ ^^\nrabbbit\n^^ ^^^^\nrabbbit\n^^^ ^^^\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: S = \"babgbag\", T = \"bag\"\nOutput: 5\nExplanation:\n\nAs shown below, there are 5 ways you can generate \"bag\" from S.\n(The caret symbol ^ means the chosen letters)\n\nbabgbag\n^^ ^\nbabgbag\n^^    ^\nbabgbag\n^    ^^\nbabgbag\n  ^  ^^\nbabgbag\n    ^^^\n</code></pre>\n<h3>Solution:</h3>\n<p>Define <code>f(i, j)</code> to be the number of ways that generate <code>T[0...j)</code> from <code>S[0...i)</code>.</p>\n<p>For <code>f(i, j)</code> you can always skip <code>S[i-1]</code>, but can only take it when <code>S[i-1] === T[j-1]</code>.</p>\n<pre><code class=\"language-javascript\">f(0, j) = 0, j > 0 // nothing to delete\nf(i, 0) = 1 // delete all\nf(i, j) = f(i-1, j) + (S[i-1] === T[j-1] ? f(i-1, j-1) : 0)\n</code></pre>\n<p>Dynamic array can be used.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @param {string} t\n * @return {number}\n */\nlet numDistinct = function (s, t) {\n    const lens = s.length;\n    const lent = t.length;\n    const dp = new Array(lent + 1).fill(0);\n    dp[0] = 1;\n    for (let i = 1; i &#x3C;= lens; i++) {\n        for (let j = lent; j >= 1; j--) {\n            if (s[i - 1] === t[j - 1]) {\n                dp[j] += dp[j - 1];\n            }\n        }\n    }\n    return dp[lent];\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Populating Next Right Pointers in Each Node II\": <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii\">https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii</a>\n\"Binary Tree Right Side View\": <a href=\"https://leetcode.com/problems/binary-tree-right-side-view\">https://leetcode.com/problems/binary-tree-right-side-view</a></p>\n<hr>\n<p><a href=\"#116-populating-next-right-pointers-in-each-nodehttpsleetcodecomproblemspopulating-next-right-pointers-in-each-nodedescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/\">116. Populating Next Right Pointers in Each Node</a></h2>\n<h3>Problem:</h3>\n<p>Given a binary tree</p>\n<pre><code>struct TreeLinkNode {\n  TreeLinkNode *left;\n  TreeLinkNode *right;\n  TreeLinkNode *next;\n}\n</code></pre>\n<p>Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to <code>NULL</code>.</p>\n<p>Initially, all next pointers are set to <code>NULL</code>.</p>\n<p><strong>Note:</strong></p>\n<ul>\n<li>You may only use constant extra space.</li>\n<li>Recursive approach is fine, implicit stack space does not count as extra space for this problem.</li>\n<li>You may assume that it is a perfect binary tree (ie, all leaves are at the same level, and every parent has two children).</li>\n</ul>\n<p><strong>Example:</strong></p>\n<p>Given the following perfect binary tree,</p>\n<pre><code>     1\n   /  \\\n  2    3\n / \\  / \\\n4  5  6  7\n</code></pre>\n<p>After calling your function, the tree should look like:</p>\n<pre><code>     1 -> NULL\n   /  \\\n  2 -> 3 -> NULL\n / \\  / \\\n4->5->6->7 -> NULL\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Recursive.</p>\n<p>For every <code>node</code>:</p>\n<ul>\n<li>Left child: points to <code>node.right</code>.</li>\n<li>Right child: points to <code>node.next.left</code> if <code>node.next</code> exists.</li>\n</ul>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n    if (root.left !== null) {\n        root.left.next = root.right;\n        connect(root.left);\n    }\n    if (root.right !== null) {\n        if (root.next !== null) {\n            root.right.next = root.next.left;\n        }\n        connect(root.right);\n    }\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Level order traversal.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n\n    const queue = [NaN, root];\n    while (queue.length > 1) {\n        const node = queue.shift();\n        if (node !== node) {\n            for (let i = 0; i &#x3C; queue.length; i++) {\n                queue[i].next = queue[i + 1] || null;\n            }\n            queue.push(NaN);\n        } else {\n            if (node.left !== null) {\n                queue.push(node.left);\n            }\n            if (node.right !== null) {\n                queue.push(node.right);\n            }\n        }\n    }\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Populating Next Right Pointers in Each Node\": <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node\">https://leetcode.com/problems/populating-next-right-pointers-in-each-node</a></p>\n<hr>\n<p><a href=\"#117-populating-next-right-pointers-in-each-node-iihttpsleetcodecomproblemspopulating-next-right-pointers-in-each-node-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/description/\">117. Populating Next Right Pointers in Each Node II</a></h2>\n<h3>Problem:</h3>\n<p>Given a binary tree</p>\n<pre><code>struct TreeLinkNode {\n  TreeLinkNode *left;\n  TreeLinkNode *right;\n  TreeLinkNode *next;\n}\n</code></pre>\n<p>Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to <code>NULL</code>.</p>\n<p>Initially, all next pointers are set to <code>NULL</code>.</p>\n<p><strong>Note:</strong></p>\n<ul>\n<li>You may only use constant extra space.</li>\n<li>Recursive approach is fine, implicit stack space does not count as extra space for this problem.</li>\n</ul>\n<p><strong>Example:</strong></p>\n<p>Given the following binary tree,</p>\n<pre><code>     1\n   /  \\\n  2    3\n / \\    \\\n4   5    7\n</code></pre>\n<p>After calling your function, the tree should look like:</p>\n<pre><code>     1 -> NULL\n   /  \\\n  2 -> 3 -> NULL\n / \\    \\\n4-> 5 -> 7 -> NULL\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<p>Recursive. See <a href=\"./116.%20Populating%20Next%20Right%20Pointers%20in%20Each%20Node.md\">116. Populating Next Right Pointers in Each Node</a>.</p>\n<p>The tree may not be perfect now. So keep finding <code>next</code> until there is a node with children, or <code>null</code>.</p>\n<p>This also means post-order traversal is required.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n    let next = null;\n    for (let node = root.next; node !== null; node = node.next) {\n        if (node.left !== null) {\n            next = node.left;\n            break;\n        }\n        if (node.right !== null) {\n            next = node.right;\n            break;\n        }\n    }\n    if (root.right !== null) {\n        root.right.next = next;\n    }\n    if (root.left !== null) {\n        root.left.next = root.right || next;\n    }\n    connect(root.right);\n    connect(root.left);\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Level order traversal. Exact same as <a href=\"./116.%20Populating%20Next%20Right%20Pointers%20in%20Each%20Node.md\">116. Populating Next Right Pointers in Each Node</a>.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for binary tree with next pointer.\n * function TreeLinkNode(val) {\n *     this.val = val;\n *     this.left = this.right = this.next = null;\n * }\n */\n\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nlet connect = function (root) {\n    if (!root) {\n        return;\n    }\n\n    const queue = [NaN, root];\n    while (queue.length > 1) {\n        const node = queue.shift();\n        if (node !== node) {\n            for (let i = 0; i &#x3C; queue.length; i++) {\n                queue[i].next = queue[i + 1] || null;\n            }\n            queue.push(NaN);\n        } else {\n            if (node.left !== null) {\n                queue.push(node.left);\n            }\n            if (node.right !== null) {\n                queue.push(node.right);\n            }\n        }\n    }\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\nSimilar Questions:\n\"Pascal's Triangle II\": <a href=\"https://leetcode.com/problems/pascals-triangle-ii\">https://leetcode.com/problems/pascals-triangle-ii</a></p>\n<hr>\n<p><a href=\"#118-pascals-trianglehttpsleetcodecomproblemspascals-triangledescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/pascals-triangle/description/\">118. Pascal's Triangle</a></h2>\n<h3>Problem:</h3>\n<p>Given a non-negative integer <em>numRows</em>, generate the first <em>numRows</em> of Pascal's triangle.</p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif\" alt=\"PascalTriangleAnimated2.gif\"></p>\n<p>In Pascal's triangle, each number is the sum of the two numbers directly above it.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: 5\nOutput:\n[\n     [1],\n    [1,1],\n   [1,2,1],\n  [1,3,3,1],\n [1,4,6,4,1]\n]\n</code></pre>\n<h3>Solution:</h3>\n<p>Dynamic Programming 101.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} numRows\n * @return {number[][]}\n */\nlet generate = function (numRows) {\n    if (numRows &#x3C;= 0) {\n        return [];\n    }\n\n    const result = [[1]];\n    for (let i = 1; i &#x3C; numRows; i++) {\n        const lastRow = result[i - 1];\n        const row = [1];\n        for (let j = 1; j &#x3C; i; j++) {\n            row[j] = lastRow[j] + lastRow[j - 1];\n        }\n        row.push(1);\n        result.push(row);\n    }\n\n    return result;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\nSimilar Questions:\n\"Pascal's Triangle\": <a href=\"https://leetcode.com/problems/pascals-triangle\">https://leetcode.com/problems/pascals-triangle</a></p>\n<hr>\n<p><a href=\"#119-pascals-triangle-iihttpsleetcodecomproblemspascals-triangle-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/pascals-triangle-ii/description/\">119. Pascal's Triangle II</a></h2>\n<h3>Problem:</h3>\n<p>Given a non-negative index <em>k</em> where <em>k</em> ≤ 33, return the <em>k</em>th index row of the Pascal's triangle.</p>\n<p>Note that the row index starts from 0.</p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif\" alt=\"PascalTriangleAnimated2.gif\"></p>\n<p>In Pascal's triangle, each number is the sum of the two numbers directly above it.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: 3\nOutput: [1,3,3,1]\n</code></pre>\n<p><strong>Follow up:</strong></p>\n<p>Could you optimize your algorithm to use only <em>O</em>(<em>k</em>) extra space?</p>\n<h3>Solution:</h3>\n<p>Dynamic Programming 101 with dynamic array.</p>\n<p>State <code>(i, j)</code> depends on <code>(i-1, j)</code> and <code>(i-1, j-1)</code>. So to access <code>(i-1, j-1)</code> iteration must be from right to left.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number} rowIndex\n * @return {number[]}\n */\nlet getRow = function (rowIndex) {\n    if (rowIndex &#x3C; 0) {\n        return [];\n    }\n\n    const row = [1];\n    for (let i = 1; i &#x3C;= rowIndex; i++) {\n        for (let j = i - 1; j > 0; j--) {\n            row[j] += row[j - 1];\n        }\n        row.push(1);\n    }\n\n    return row;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Dynamic Programming\": <a href=\"https://leetcode.com/tag/dynamic-programming\">https://leetcode.com/tag/dynamic-programming</a></p>\n<hr>\n<p><a href=\"#120-trianglehttpsleetcodecomproblemstriangledescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/triangle/description/\">120. Triangle</a></h2>\n<h3>Problem:</h3>\n<p>Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.</p>\n<p>For example, given the following triangle</p>\n<pre><code>[\n     [2],\n    [3,4],\n   [6,5,7],\n  [4,1,8,3]\n]\n</code></pre>\n<p>The minimum path sum from top to bottom is <code>11</code> (i.e., <strong>2</strong> + <strong>3</strong> + <strong>5</strong> + <strong>1</strong> = 11).</p>\n<p><strong>Note:</strong></p>\n<p>Bonus point if you are able to do this using only <em>O</em>(<em>n</em>) extra space, where <em>n</em> is the total number of rows in the triangle.</p>\n<h3>Solution:</h3>\n<p>Define <code>f(i, j)</code> to be the minimum path sum from <code>triangle[0][0]</code> to <code>triangle[i][j]</code>.</p>\n<pre><code>f(i, 0) = f(i-1, j) + triangle[i][0]\nf(i, j) = min( f(i-1, j-1), f(i-1, j) ) + triangle[i][j], 0 &#x3C; j &#x3C; i\nf(i, i) = f(i-1, i-1) + triangle[i][i], i > 0\n</code></pre>\n<p>Dynamic array can be used.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[][]} triangle\n * @return {number}\n */\nlet minimumTotal = function (triangle) {\n    if (triangle.length &#x3C;= 0) {\n        return 0;\n    }\n\n    const dp = [triangle[0][0]];\n    for (let i = 1; i &#x3C; triangle.length; i++) {\n        dp[i] = dp[i - 1] + triangle[i][i];\n        for (let j = i - 1; j >= 1; j--) {\n            dp[j] = Math.min(dp[j], dp[j - 1]) + triangle[i][j];\n        }\n        dp[0] += triangle[i][0];\n    }\n    return Math.min(...dp);\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Dynamic Programming\": <a href=\"https://leetcode.com/tag/dynamic-programming\">https://leetcode.com/tag/dynamic-programming</a>\nSimilar Questions:\n\"Maximum Subarray\": <a href=\"https://leetcode.com/problems/maximum-subarray\">https://leetcode.com/problems/maximum-subarray</a>\n\"Best Time to Buy and Sell Stock II\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii</a>\n\"Best Time to Buy and Sell Stock III\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii</a>\n\"Best Time to Buy and Sell Stock IV\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv</a>\n\"Best Time to Buy and Sell Stock with Cooldown\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown</a></p>\n<hr>\n<p><a href=\"#121-best-time-to-buy-and-sell-stockhttpsleetcodecomproblemsbest-time-to-buy-and-sell-stockdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/\">121. Best Time to Buy and Sell Stock</a></h2>\n<h3>Problem:</h3>\n<p>Say you have an array for which the <em>i</em>th element is the price of a given stock on day <em>i</em>.</p>\n<p>If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit.</p>\n<p>Note that you cannot sell a stock before you buy one.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [7,1,5,3,6,4]\nOutput: 5\nExplanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5.\n             Not 7-1 = 6, as selling price needs to be larger than buying price.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n</code></pre>\n<h3>Solution:</h3>\n<p>Only care about positive profits. Take the frist item as base and scan to the right. If we encounter an item <code>j</code> whose price <code>price[j]</code> is lower than the base (which means if we sell now the profit would be negative), we sell <code>j-1</code> instead and make <code>j</code> the new base.</p>\n<p>Because <code>price[j]</code> is lower that the base, using <code>j</code> as new base is guaranteed to gain more profit comparing to the old one.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} prices\n * @return {number}\n */\nlet maxProfit = function (prices) {\n    let max = 0;\n    let base = prices[0];\n    for (let i = 1; i &#x3C; prices.length; i++) {\n        const profit = prices[i] - base;\n        if (profit > max) {\n            max = profit;\n        } else if (profit &#x3C; 0) {\n            base = prices[i];\n        }\n    }\n    return max;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Greedy\": <a href=\"https://leetcode.com/tag/greedy\">https://leetcode.com/tag/greedy</a>\nSimilar Questions:\n\"Best Time to Buy and Sell Stock\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock</a>\n\"Best Time to Buy and Sell Stock III\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii</a>\n\"Best Time to Buy and Sell Stock IV\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv</a>\n\"Best Time to Buy and Sell Stock with Cooldown\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown</a>\n\"Best Time to Buy and Sell Stock with Transaction Fee\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee</a></p>\n<hr>\n<p><a href=\"#122-best-time-to-buy-and-sell-stock-iihttpsleetcodecomproblemsbest-time-to-buy-and-sell-stock-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/description/\">122. Best Time to Buy and Sell Stock II</a></h2>\n<h3>Problem:</h3>\n<p>Say you have an array for which the <em>i</em>th element is the price of a given stock on day <em>i</em>.</p>\n<p>Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times).</p>\n<p><strong>Note:</strong> You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [7,1,5,3,6,4]\nOutput: 7\nExplanation: Buy on day 2 (price = 1) and sell on day 3 (price = 5), profit = 5-1 = 4.\n             Then buy on day 4 (price = 3) and sell on day 5 (price = 6), profit = 6-3 = 3.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [1,2,3,4,5]\nOutput: 4\nExplanation: Buy on day 1 (price = 1) and sell on day 5 (price = 5), profit = 5-1 = 4.\n             Note that you cannot buy on day 1, buy on day 2 and sell them later, as you are\n             engaging multiple transactions at the same time. You must sell before buying again.\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n</code></pre>\n<h3>Solution:</h3>\n<p>Sell immediately after the price drops. Or in other perspective, it is the sum of all the incremental pairs (buy in then immediately sell out).</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} prices\n * @return {number}\n */\nlet maxProfit = function (prices) {\n    let max = 0;\n    for (let i = 1; i &#x3C; prices.length; i++) {\n        if (prices[i] > prices[i - 1]) {\n            max += prices[i] - prices[i - 1];\n        }\n    }\n    return max;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Dynamic Programming\": <a href=\"https://leetcode.com/tag/dynamic-programming\">https://leetcode.com/tag/dynamic-programming</a>\nSimilar Questions:\n\"Best Time to Buy and Sell Stock\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock</a>\n\"Best Time to Buy and Sell Stock II\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii</a>\n\"Best Time to Buy and Sell Stock IV\": <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv\">https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv</a>\n\"Maximum Sum of 3 Non-Overlapping Subarrays\": <a href=\"https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays\">https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays</a></p>\n<hr>\n<p><a href=\"#123-best-time-to-buy-and-sell-stock-iiihttpsleetcodecomproblemsbest-time-to-buy-and-sell-stock-iiidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/description/\">123. Best Time to Buy and Sell Stock III</a></h2>\n<h3>Problem:</h3>\n<p>Say you have an array for which the <em>i</em>th element is the price of a given stock on day <em>i</em>.</p>\n<p>Design an algorithm to find the maximum profit. You may complete at most <em>two</em> transactions.</p>\n<p>**Note:**You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again).</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [3,3,5,0,0,3,1,4]\nOutput: 6\nExplanation: Buy on day 4 (price = 0) and sell on day 6 (price = 3), profit = 3-0 = 3.\n             Then buy on day 7 (price = 1) and sell on day 8 (price = 4), profit = 4-1 = 3.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [1,2,3,4,5]\nOutput: 4\nExplanation: Buy on day 1 (price = 1) and sell on day 5 (price = 5), profit = 5-1 = 4.\n             Note that you cannot buy on day 1, buy on day 2 and sell them later, as you are\n             engaging multiple transactions at the same time. You must sell before buying again.\n</code></pre>\n<p><strong>Example 3:</strong></p>\n<pre><code>Input: [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n</code></pre>\n<h3>Solution:</h3>\n<p>Multiple transactions may not be engaged in at the same time. That means if we view the days that involed in the same transaction as a group, there won't be any intersection. We may complete at most <em>two</em> transactions, so divide the days into two groups, <code>[0...k]</code> and <code>[k...n-1]</code>. Notice <code>k</code> exists in both groups because technically we can sell out then immediately buy in at the same day.</p>\n<p>Define <code>p1(i)</code> to be the max profit of day <code>[0...i]</code>. This is just like the problem of <a href=\"./121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.md\">121. Best Time to Buy and Sell Stock</a>.</p>\n<pre><code>p1(0) = 0\np1(i) = max( p1(i-1), prices[i] - min(prices[0], ..., prices[i-1]) ), 0 &#x3C; i &#x3C;= n-1\n</code></pre>\n<p>Define <code>p2(i)</code> to be the max profit of day <code>[i...n-1]</code>. This is the mirror of <code>p1</code>.</p>\n<pre><code>p2(n-1) = 0\np2(i) = max( p2(i+1), max(prices[i], ..., prices[n-1]) - prices[i] ), n-1 > i >= 0\n</code></pre>\n<p>Define <code>f(k)</code> to be <code>p1(k) + p2(k)</code>. We need to get <code>max( f(0), ..., f(n-1) )</code>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} prices\n * @return {number}\n */\nlet maxProfit = function (prices) {\n    const len = prices.length;\n    if (len &#x3C;= 1) {\n        return 0;\n    }\n\n    const dp = [0];\n\n    let min = prices[0];\n    for (let i = 1; i &#x3C; len; i++) {\n        dp[i] = Math.max(dp[i - 1], prices[i] - min);\n        min = Math.min(prices[i], min);\n    }\n\n    let p2 = 0;\n    let max = prices[len - 1];\n    for (let i = len - 2; i >= 0; i--) {\n        max = Math.max(prices[i], max);\n        p2 = Math.max(p2, max - prices[i]);\n        dp[i] += p2;\n    }\n\n    return Math.max(...dp);\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Path Sum\": <a href=\"https://leetcode.com/problems/path-sum\">https://leetcode.com/problems/path-sum</a>\n\"Sum Root to Leaf Numbers\": <a href=\"https://leetcode.com/problems/sum-root-to-leaf-numbers\">https://leetcode.com/problems/sum-root-to-leaf-numbers</a>\n\"Path Sum IV\": <a href=\"https://leetcode.com/problems/path-sum-iv\">https://leetcode.com/problems/path-sum-iv</a>\n\"Longest Univalue Path\": <a href=\"https://leetcode.com/problems/longest-univalue-path\">https://leetcode.com/problems/longest-univalue-path</a></p>\n<hr>\n<p><a href=\"#124-binary-tree-maximum-path-sumhttpsleetcodecomproblemsbinary-tree-maximum-path-sumdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/binary-tree-maximum-path-sum/description/\">124. Binary Tree Maximum Path Sum</a></h2>\n<h3>Problem:</h3>\n<p>Given a <strong>non-empty</strong> binary tree, find the maximum path sum.</p>\n<p>For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path must contain <strong>at least one node</strong> and does not need to go through the root.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: [1,2,3]\n\n       1\n      / \\\n     2   3\n\nOutput: 6\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [-10,9,20,null,null,15,7]\n\n   -10\n   / \\\n  9  20\n    /  \\\n   15   7\n\nOutput: 42\n</code></pre>\n<h3>Solution:</h3>\n<p>For every <code>node</code>, there are six possible ways to get the max path sum:</p>\n<ul>\n<li>\n<p>With <code>node.val</code></p>\n<ol>\n<li><code>node.val</code> plus the max sum of a path that ends with <code>node.left</code>.</li>\n<li><code>node.val</code> plus the max sum of a path that starts with <code>node.right</code>.</li>\n<li><code>node.val</code> plus the max sum of both paths.</li>\n<li>Just <code>node.val</code> (the max sum of both paths are negative).</li>\n</ol>\n</li>\n<li>\n<p>Without<code>node.val</code> (disconnected)</p>\n<ol>\n<li>The max-sum path is somewhere under the <code>node.left</code> subtree.</li>\n<li>The max-sum path is somewhere under the <code>node.right</code> subtree.</li>\n</ol>\n</li>\n</ul>\n<p>There are two ways to implement this.</p>\n<h4>ONE</h4>\n<p>Define a function that returns two values. The max sum of a path that may or may not end with <code>root</code> node, and the max sum of the path that ends with <code>root</code> node.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {number}\n */\nlet maxPathSum = function (root) {\n    return Math.max(..._maxPathSum(root));\n};\n\n/**\n * @param {TreeNode} root\n * @return {number[]}\n */\nfunction _maxPathSum(root) {\n    if (!root) {\n        return [-Infinity, -Infinity];\n    }\n\n    const left = _maxPathSum(root.left);\n    const right = _maxPathSum(root.right);\n    return [Math.max(left[0], right[0], root.val + Math.max(0, left[1], right[1], left[1] + right[1])), Math.max(left[1], right[1], 0) + root.val];\n}\n</code></pre>\n<h4>TWO</h4>\n<p>Just return the later (max sum of a path that ends with <code>root</code>). Maintain a global variable to store the disconnected max sum.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {number}\n */\nlet maxPathSum = function (root) {\n    const global = { max: -Infinity };\n    _maxPathSum(root, global);\n    return global.max;\n};\n\n/**\n * @param {TreeNode} root\n * @param {object} global\n * @param {number} global.max\n * @return {number[]}\n */\nfunction _maxPathSum(root, global) {\n    if (!root) {\n        return -Infinity;\n    }\n\n    const left = _maxPathSum(root.left, global);\n    const right = _maxPathSum(root.right, global);\n    const localMax = Math.max(left, right, 0) + root.val;\n    global.max = Math.max(global.max, localMax, root.val + left + right);\n    return localMax;\n}\n</code></pre>\n<hr>\n<p>Difficulty: Easy\nRelated Topics:\n\"Two Pointers\": <a href=\"https://leetcode.com/tag/two-pointers\">https://leetcode.com/tag/two-pointers</a>\n\"String\": <a href=\"https://leetcode.com/tag/string\">https://leetcode.com/tag/string</a>\nSimilar Questions:\n\"Palindrome Linked List\": <a href=\"https://leetcode.com/problems/palindrome-linked-list\">https://leetcode.com/problems/palindrome-linked-list</a>\n\"Valid Palindrome II\": <a href=\"https://leetcode.com/problems/valid-palindrome-ii\">https://leetcode.com/problems/valid-palindrome-ii</a></p>\n<hr>\n<p><a href=\"#125-valid-palindromehttpsleetcodecomproblemsvalid-palindromedescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/valid-palindrome/description/\">125. Valid Palindrome</a></h2>\n<h3>Problem:</h3>\n<p>Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.</p>\n<p><strong>Note:</strong> For the purpose of this problem, we define empty string as valid palindrome.</p>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input: \"A man, a plan, a canal: Panama\"\nOutput: true\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: \"race a car\"\nOutput: false\n</code></pre>\n<h3>Solution:</h3>\n<h4>ONE</h4>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isPalindrome = function (s) {\n    const clean = s.toLowerCase().split(/[^a-z0-9]*/);\n    return clean.join('') === clean.reverse().join('');\n};\n</code></pre>\n<h4>TWO</h4>\n<p>Remove non-alphanumeric characters then compare.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isPalindrome = function (s) {\n    const clean = s.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();\n    for (let i = 0, j = clean.length - 1; i &#x3C; j; i++, j--) {\n        if (clean[i] !== clean[j]) {\n            return false;\n        }\n    }\n    return true;\n};\n</code></pre>\n<h4>THREE</h4>\n<p>Compare the char codes.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} s\n * @return {boolean}\n */\nlet isPalindrome = function (s) {\n    for (let i = 0, j = s.length - 1; i &#x3C; j; i++, j--) {\n        let left = s.charCodeAt(i);\n        while (i &#x3C; j &#x26;&#x26; (left &#x3C; 48 || (left > 57 &#x26;&#x26; left &#x3C; 65) || (left > 90 &#x26;&#x26; left &#x3C; 97) || left > 122)) {\n            left = s.charCodeAt(++i);\n        }\n        if (i >= j) {\n            return true;\n        }\n        if (left >= 65 &#x26;&#x26; left &#x3C;= 90) {\n            left += 32;\n        }\n\n        let right = s.charCodeAt(j);\n        while (i &#x3C; j &#x26;&#x26; (right &#x3C; 48 || (right > 57 &#x26;&#x26; right &#x3C; 65) || (right > 90 &#x26;&#x26; right &#x3C; 97) || right > 122)) {\n            right = s.charCodeAt(--j);\n        }\n        if (i >= j) {\n            return true;\n        }\n        if (right >= 65 &#x26;&#x26; right &#x3C;= 90) {\n            right += 32;\n        }\n\n        if (left !== right) {\n            return false;\n        }\n    }\n\n    return true;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"String\": <a href=\"https://leetcode.com/tag/string\">https://leetcode.com/tag/string</a>\n\"Backtracking\": <a href=\"https://leetcode.com/tag/backtracking\">https://leetcode.com/tag/backtracking</a>\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\nSimilar Questions:\n\"Word Ladder\": <a href=\"https://leetcode.com/problems/word-ladder\">https://leetcode.com/problems/word-ladder</a></p>\n<hr>\n<p><a href=\"#126-word-ladder-iihttpsleetcodecomproblemsword-ladder-iidescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/word-ladder-ii/description/\">126. Word Ladder II</a></h2>\n<h3>Problem:</h3>\n<p>Given two words (<em>beginWord</em> and <em>endWord</em>), and a dictionary's word list, find all shortest transformation sequence(s) from <em>beginWord</em> to <em>endWord</em>, such that:</p>\n<ol>\n<li>Only one letter can be changed at a time</li>\n<li>Each transformed word must exist in the word list. Note that <em>beginWord</em> is <em>not</em> a transformed word.</li>\n</ol>\n<p><strong>Note:</strong></p>\n<ul>\n<li>Return an empty list if there is no such transformation sequence.</li>\n<li>All words have the same length.</li>\n<li>All words contain only lowercase alphabetic characters.</li>\n<li>You may assume no duplicates in the word list.</li>\n<li>You may assume <em>beginWord</em> and <em>endWord</em> are non-empty and are not the same.</li>\n</ul>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\",\nendWord = \"cog\",\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\n\nOutput:\n[\n  [\"hit\",\"hot\",\"dot\",\"dog\",\"cog\"],\n  [\"hit\",\"hot\",\"lot\",\"log\",\"cog\"]\n]\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\"\nendWord = \"cog\"\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\n\nOutput: []\n\nExplanation: The endWord \"cog\" is not in wordList, therefore no possible transformation.\n</code></pre>\n<h3>Solution:</h3>\n<p>This is just like <a href=\"./127.%20Word%20Ladder\">127. Word Ladder</a>.</p>\n<p>The constrain still works, but instead of deleting the words right away, collect them and delete them all when a level ends, so that we can reuse the words (matching different parents in the same level).</p>\n<p>The items in the queue are not just words now. Parent nodes are also kept so that we can backtrack the path from the end.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} beginWord\n * @param {string} endWord\n * @param {string[]} wordList\n * @return {string[][]}\n */\nfunction findLadders(beginWord, endWord, wordList) {\n    wordList = new Set(wordList);\n    if (!wordList.has(endWord)) {\n        return [];\n    }\n\n    const ALPHABET = 'abcdefghijklmnopqrstuvwxyz';\n\n    const result = [];\n    let isEndWordFound = false;\n    const levelWords = new Set();\n    const queue = [[beginWord, null], null];\n    while (queue.length > 1) {\n        const node = queue.shift();\n\n        if (node === null) {\n            if (isEndWordFound) {\n                break;\n            }\n            levelWords.forEach((word) => wordList.delete(word));\n            levelWords.clear();\n            queue.push(null);\n            continue;\n        }\n\n        const word = node[0];\n\n        for (let i = word.length - 1; i >= 0; i--) {\n            const head = word.slice(0, i);\n            const tail = word.slice(i + 1);\n\n            for (let c = 0; c &#x3C; 26; c++) {\n                if (ALPHABET[c] !== word[i]) {\n                    const w = head + ALPHABET[c] + tail;\n                    if (w === endWord) {\n                        const path = [endWord];\n                        for (let n = node; n !== null; n = n[1]) {\n                            path.unshift(n[0]);\n                        }\n                        result.push(path);\n                        isEndWordFound = true;\n                    }\n                    if (wordList.has(w)) {\n                        levelWords.add(w);\n                        queue.push([w, node]);\n                    }\n                }\n            }\n        }\n    }\n\n    return result;\n}\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\nSimilar Questions:\n\"Word Ladder II\": <a href=\"https://leetcode.com/problems/word-ladder-ii\">https://leetcode.com/problems/word-ladder-ii</a>\n\"Minimum Genetic Mutation\": <a href=\"https://leetcode.com/problems/minimum-genetic-mutation\">https://leetcode.com/problems/minimum-genetic-mutation</a></p>\n<hr>\n<p><a href=\"#127-word-ladderhttpsleetcodecomproblemsword-ladderdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/word-ladder/description/\">127. Word Ladder</a></h2>\n<h3>Problem:</h3>\n<p>Given two words (<em>beginWord</em> and <em>endWord</em>), and a dictionary's word list, find the length of shortest transformation sequence from <em>beginWord</em> to <em>endWord</em>, such that:</p>\n<ol>\n<li>Only one letter can be changed at a time.</li>\n<li>Each transformed word must exist in the word list. Note that <em>beginWord</em> is <em>not</em> a transformed word.</li>\n</ol>\n<p><strong>Note:</strong></p>\n<ul>\n<li>Return 0 if there is no such transformation sequence.</li>\n<li>All words have the same length.</li>\n<li>All words contain only lowercase alphabetic characters.</li>\n<li>You may assume no duplicates in the word list.</li>\n<li>You may assume <em>beginWord</em> and <em>endWord</em> are non-empty and are not the same.</li>\n</ul>\n<p><strong>Example 1:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\",\nendWord = \"cog\",\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\n\nOutput: 5\n\nExplanation: As one shortest transformation is \"hit\" -> \"hot\" -> \"dot\" -> \"dog\" -> \"cog\",\nreturn its length 5.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input:\nbeginWord = \"hit\"\nendWord = \"cog\"\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\n\nOutput: 0\n\nExplanation: The endWord \"cog\" is not in wordList, therefore no possible transformation.\n</code></pre>\n<h3>Solution:</h3>\n<p>Think of it as building a tree, with <code>begineWord</code> as root and <code>endWord</code> as leaves.</p>\n<p>The best way control the depth (length of the shortest transformations) while building the tree is level-order traversal (BFS).</p>\n<p>We do not actually build the tree because it is expensive (astronomical if the list is huge). In fact, we only need one shortest path. So just like Dijkstra's algorithm, we say that the first time (level <code>i</code>) we encounter a word that turns out to be in a shortest path, then level <code>i</code> is the lowest level this word could ever get. We can safely remove it from the <code>wordList</code>.</p>\n<p>To find all the next words, instead of filtering the <code>wordList</code>, enumerate all 25 possible words and check if in <code>wordList</code>.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {string} beginWord\n * @param {string} endWord\n * @param {string[]} wordList\n * @return {number}\n */\nlet ladderLength = function (beginWord, endWord, wordList) {\n    wordList = new Set(wordList);\n    if (!wordList.has(endWord)) {\n        return 0;\n    }\n\n    const ALPHABET = 'abcdefghijklmnopqrstuvwxyz';\n\n    let level = 1;\n    const queue = [beginWord, null];\n    while (queue.length > 1) {\n        const word = queue.shift();\n\n        if (word === null) {\n            level++;\n            queue.push(null);\n            continue;\n        }\n\n        for (let i = word.length - 1; i >= 0; i--) {\n            const head = word.slice(0, i);\n            const tail = word.slice(i + 1);\n\n            for (let c = 0; c &#x3C; 26; c++) {\n                if (ALPHABET[c] !== word[i]) {\n                    const word = head + ALPHABET[c] + tail;\n                    if (word === endWord) {\n                        return level + 1;\n                    }\n                    if (wordList.delete(word)) {\n                        queue.push(word);\n                    }\n                }\n            }\n        }\n    }\n\n    return 0;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Hard\nRelated Topics:\n\"Array\": <a href=\"https://leetcode.com/tag/array\">https://leetcode.com/tag/array</a>\n\"Union Find\": <a href=\"https://leetcode.com/tag/union-find\">https://leetcode.com/tag/union-find</a>\nSimilar Questions:\n\"Binary Tree Longest Consecutive Sequence\": <a href=\"https://leetcode.com/problems/binary-tree-longest-consecutive-sequence\">https://leetcode.com/problems/binary-tree-longest-consecutive-sequence</a></p>\n<hr>\n<p><a href=\"#128-longest-consecutive-sequencehttpsleetcodecomproblemslongest-consecutive-sequencedescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/longest-consecutive-sequence/description/\">128. Longest Consecutive Sequence</a></h2>\n<h3>Problem:</h3>\n<p>Given an unsorted array of integers, find the length of the longest consecutive elements sequence.</p>\n<p>Your algorithm should run in O(<em>n</em>) complexity.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: [100, 4, 200, 1, 3, 2]\nOutput: 4\nExplanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.\n</code></pre>\n<h3>Solution:</h3>\n<p>Build a Set from the list. Pick a number, find all it's adjacent numbers that are also in the Set. Count them and remove them all from the Set. Repeat until the Set is empty. Time complexity O(n + n) = O(n).</p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[]} nums\n * @return {number}\n */\nlet longestConsecutive = function (nums) {\n    const numSet = new Set(nums);\n    let maxCount = 0;\n    while (numSet.size > 0) {\n        const num = numSet.values().next().value;\n        numSet.delete(num);\n        let count = 1;\n        for (let n = num + 1; numSet.delete(n); n++) {\n            count++;\n        }\n        for (let n = num - 1; numSet.delete(n); n--) {\n            count++;\n        }\n        if (count > maxCount) {\n            maxCount = count;\n        }\n    }\n    return maxCount;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Tree\": <a href=\"https://leetcode.com/tag/tree\">https://leetcode.com/tag/tree</a>\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\nSimilar Questions:\n\"Path Sum\": <a href=\"https://leetcode.com/problems/path-sum\">https://leetcode.com/problems/path-sum</a>\n\"Binary Tree Maximum Path Sum\": <a href=\"https://leetcode.com/problems/binary-tree-maximum-path-sum\">https://leetcode.com/problems/binary-tree-maximum-path-sum</a></p>\n<hr>\n<p><a href=\"#129-sum-root-to-leaf-numbershttpsleetcodecomproblemssum-root-to-leaf-numbersdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/sum-root-to-leaf-numbers/description/\">129. Sum Root to Leaf Numbers</a></h2>\n<h3>Problem:</h3>\n<p>Given a binary tree containing digits from <code>0-9</code> only, each root-to-leaf path could represent a number.</p>\n<p>An example is the root-to-leaf path <code>1->2->3</code> which represents the number <code>123</code>.</p>\n<p>Find the total sum of all root-to-leaf numbers.</p>\n<p><strong>Note:</strong> A leaf is a node with no children.</p>\n<p><strong>Example:</strong></p>\n<pre><code>Input: [1,2,3]\n    1\n   / \\\n  2   3\nOutput: 25\nExplanation:\nThe root-to-leaf path 1->2 represents the number 12.\nThe root-to-leaf path 1->3 represents the number 13.\nTherefore, sum = 12 + 13 = 25.\n</code></pre>\n<p><strong>Example 2:</strong></p>\n<pre><code>Input: [4,9,0,5,1]\n    4\n   / \\\n  9   0\n / \\\n5   1\nOutput: 1026\nExplanation:\nThe root-to-leaf path 4->9->5 represents the number 495.\nThe root-to-leaf path 4->9->1 represents the number 491.\nThe root-to-leaf path 4->0 represents the number 40.\nTherefore, sum = 495 + 491 + 40 = 1026.\n</code></pre>\n<h3>Solution:</h3>\n<p>To write a clean solution for this promblem, use <code>0</code> as indicator of leaf node. If all the children get <code>0</code>, it is a leaf node, return the sum of current level.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {number}\n */\nlet sumNumbers = function (root, sum = 0) {\n    if (!root) {\n        return 0;\n    }\n    sum = sum * 10 + root.val;\n    return sumNumbers(root.left, sum) + sumNumbers(root.right, sum) || sum;\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\n\"Union Find\": <a href=\"https://leetcode.com/tag/union-find\">https://leetcode.com/tag/union-find</a>\nSimilar Questions:\n\"Number of Islands\": <a href=\"https://leetcode.com/problems/number-of-islands\">https://leetcode.com/problems/number-of-islands</a>\n\"Walls and Gates\": <a href=\"https://leetcode.com/problems/walls-and-gates\">https://leetcode.com/problems/walls-and-gates</a></p>\n<hr>\n<p><a href=\"#130-surrounded-regionshttpsleetcodecomproblemssurrounded-regionsdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/surrounded-regions/description/\">130. Surrounded Regions</a></h2>\n<h3>Problem:</h3>\n<p>Given a 2D board containing <code>'X'</code> and <code>'O'</code> (<strong>the letter O</strong>), capture all regions surrounded by <code>'X'</code>.</p>\n<p>A region is captured by flipping all <code>'O'</code>s into <code>'X'</code>s in that surrounded region.</p>\n<p><strong>Example:</strong></p>\n<pre><code>X X X X\nX O O X\nX X O X\nX O X X\n</code></pre>\n<p>After running your function, the board should be:</p>\n<pre><code>X X X X\nX X X X\nX X X X\nX O X X\n</code></pre>\n<p><strong>Explanation:</strong></p>\n<p>Surrounded regions shouldn't be on the border, which means that any <code>'O'</code> on the border of the board are not flipped to <code>'X'</code>. Any <code>'O'</code> that is not on the border and it is not connected to an <code>'O'</code> on the border will be flipped to <code>'X'</code>. Two cells are connected if they are adjacent cells connected horizontally or vertically.</p>\n<h3>Solution:</h3>\n<p>Find all the <code>O</code>s that are connected to the <code>O</code>s on the border, change them to <code>#</code>. Then scan the board, change <code>O</code> to <code>X</code> and <code>#</code> back to <code>O</code>.</p>\n<p>The process of finding the connected <code>O</code>s is just like tree traversal. <code>O</code>s on the border are the same level. Their children are the second level. And so on.</p>\n<p>So both BFS and DFS are good. I prefer BFS when pruning is not needed in favor of its readability.</p>\n<pre><code class=\"language-javascript\">/**\n * @param {character[][]} board\n * @return {void} Do not return anything, modify board in-place instead.\n */\nlet solve = function (board) {\n    const height = board.length;\n    if (height &#x3C;= 1) {\n        return;\n    }\n    const width = board[0].length;\n    if (width &#x3C;= 1) {\n        return;\n    }\n\n    const rowend = height - 1;\n    const colend = width - 1;\n\n    const queue = [];\n\n    for (let row = 0; row &#x3C; height; row++) {\n        if (board[row][0] === 'O') {\n            board[row][0] = '#';\n            queue.push(row, 0);\n        }\n        if (board[row][colend] === 'O') {\n            board[row][colend] = '#';\n            queue.push(row, colend);\n        }\n    }\n\n    for (let col = 0; col &#x3C; width; col++) {\n        if (board[0][col] === 'O') {\n            board[0][col] = '#';\n            queue.push(0, col);\n        }\n        if (board[rowend][col] === 'O') {\n            board[rowend][col] = '#';\n            queue.push(rowend, col);\n        }\n    }\n\n    while (queue.length > 0) {\n        const row = queue.shift();\n        const col = queue.shift();\n        if (row &#x3C; rowend &#x26;&#x26; board[row + 1][col] === 'O') {\n            board[row + 1][col] = '#';\n            queue.push(row + 1, col);\n        }\n        if (row > 0 &#x26;&#x26; board[row - 1][col] === 'O') {\n            board[row - 1][col] = '#';\n            queue.push(row - 1, col);\n        }\n        if (board[row][col + 1] === 'O') {\n            board[row][col + 1] = '#';\n            queue.push(row, col + 1);\n        }\n        if (board[row][col - 1] === 'O') {\n            board[row][col - 1] = '#';\n            queue.push(row, col - 1);\n        }\n    }\n\n    for (let row = 0; row &#x3C; height; row++) {\n        for (let col = 0; col &#x3C; width; col++) {\n            if (board[row][col] === '#') {\n                board[row][col] = 'O';\n            } else if (board[row][col] === 'O') {\n                board[row][col] = 'X';\n            }\n        }\n    }\n};\n</code></pre>\n<hr>\n<p>Difficulty: Medium\nRelated Topics:\n\"Depth-first Search\": <a href=\"https://leetcode.com/tag/depth-first-search\">https://leetcode.com/tag/depth-first-search</a>\n\"Breadth-first Search\": <a href=\"https://leetcode.com/tag/breadth-first-search\">https://leetcode.com/tag/breadth-first-search</a>\n\"Graph\": <a href=\"https://leetcode.com/tag/graph\">https://leetcode.com/tag/graph</a>\nSimilar Questions:\n\"Copy List with Random Pointer\": <a href=\"https://leetcode.com/problems/copy-list-with-random-pointer\">https://leetcode.com/problems/copy-list-with-random-pointer</a></p>\n<hr>\n<p><a href=\"#133-clone-graphhttpsleetcodecomproblemsclone-graphdescription\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h2>➤ <a href=\"https://leetcode.com/problems/clone-graph/description/\">133. Clone Graph</a></h2>\n<h3>Problem:</h3>\n<p>Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph contains a <code>label</code> (<code>int</code>) and a list (<code>List[UndirectedGraphNode]</code>) of its <code>neighbors</code>. There is an edge between the given node and each of the nodes in its neighbors.</p>\n<p>OJ's undirected graph serialization (so you can understand error output):</p>\n<p>Nodes are labeled uniquely.</p>\n<p>We use <code>#</code> as a separator for each node, and <code>,</code> as a separator for node label and each neighbor of the node.</p>\n<p>As an example, consider the serialized graph <code>{0,1,2#1,2#2,2}</code>.</p>\n<p>The graph has a total of three nodes, and therefore contains three parts as separated by <code>#</code>.</p>\n<ol>\n<li>First node is labeled as <code>0</code>. Connect node <code>0</code> to both nodes <code>1</code> and <code>2</code>.</li>\n<li>Second node is labeled as <code>1</code>. Connect node <code>1</code> to node <code>2</code>.</li>\n<li>Third node is labeled as <code>2</code>. Connect node <code>2</code> to node <code>2</code> (itself), thus forming a self-cycle.</li>\n</ol>\n<p>Visually, the graph looks like the following:</p>\n<pre><code>       1\n      / \\\n     /   \\\n    0 --- 2\n         / \\\n         \\_/\n</code></pre>\n<p><strong>Note</strong>: The information about the tree serialization is only meant so that you can understand error output if you get a wrong answer. You don't need to understand the serialization to solve the problem.</p>\n<h3>Solution:</h3>\n<p>DFS. Cache the visited node before entering the next recursion.</p>\n<pre><code class=\"language-javascript\">/**\n * Definition for undirected graph.\n * function UndirectedGraphNode(label) {\n *     this.label = label;\n *     this.neighbors = [];   // Array of UndirectedGraphNode\n * }\n */\n\n/**\n * @param {UndirectedGraphNode} graph\n * @return {UndirectedGraphNode}\n */\nlet cloneGraph = function (graph) {\n    const cache = {};\n    return _clone(graph);\n\n    function _clone(graph) {\n        if (!graph) {\n            return graph;\n        }\n        const label = graph.label;\n        if (!cache[label]) {\n            cache[label] = new UndirectedGraphNode(label);\n            cache[label].neighbors = graph.neighbors.map(_clone);\n        }\n        return cache[label];\n    }\n};\n</code></pre>\n<p><img src=\"https://github.com/everthis/leetcode-js/blob/master/images/binary-tree-upside-down.webp\" alt=\"alt text\" title=\"binary-tree-upside-down\"></p>\n<pre><code class=\"language-js\">/**\n * Definition for a binary tree node.\n * function TreeNode(val) {\n *     this.val = val;\n *     this.left = this.right = null;\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {TreeNode}\n */\nconst upsideDownBinaryTree = function (root) {\n    let curr = root;\n    let next = null;\n    let temp = null;\n    let prev = null;\n    while (curr !== null) {\n        next = curr.left;\n        curr.left = temp;\n        temp = curr.right;\n        curr.right = prev;\n        prev = curr;\n        curr = next;\n    }\n    return prev;\n};\n\n// another\n\nconst upsideDownBinaryTree = function (root) {\n    if (root == null || root.left == null) {\n        return root;\n    }\n    const newRoot = upsideDownBinaryTree(root.left);\n    root.left.left = root.right;\n    root.left.right = root;\n    root.left = null;\n    root.right = null;\n    return newRoot;\n};\n</code></pre>\n<p><img src=\"https://github.com/everthis/leetcode-js/blob/master/images/maximum-sum-circular-subarray.png\" alt=\"alt text\" title=\"maximum-sum-circular-subarray\"></p>\n<pre><code class=\"language-js\">/**\n * @param {number[]} A\n * @return {number}\n */\nconst maxSubarraySumCircular = function (A) {\n    let minSum = Infinity,\n        sum = 0,\n        maxSum = -Infinity,\n        curMax = 0,\n        curMin = 0;\n    for (let a of A) {\n        sum += a;\n        curMax = Math.max(curMax + a, a);\n        maxSum = Math.max(maxSum, curMax);\n        curMin = Math.min(curMin + a, a);\n        minSum = Math.min(minSum, curMin);\n    }\n    return maxSum > 0 ? Math.max(maxSum, sum - minSum) : maxSum;\n};\n</code></pre>\n<p><a href=\"#balanced-binary-tree---leetcode\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>\n<h1>➤ Balanced Binary Tree - LeetCode</h1>\n<blockquote>\n<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>\n</blockquote>\n<p>Given a binary tree, determine if it is height-balanced.</p>\n<p>For this problem, a height-balanced binary tree is defined as:</p>\n<blockquote>\n<p>a binary tree in which the left and right subtrees of <em>every</em> node differ in height by no more than 1.</p>\n</blockquote>\n<p><strong>Example 1:</strong></p>\n<p><img src=\"https://assets.leetcode.com/uploads/2020/10/06/balance_1.jpg\"></p>\n<p><strong>Input:</strong> root = [3,9,20,null,null,15,7]\n<strong>Output:</strong> true</p>\n<p><strong>Example 2:</strong></p>\n<p><img src=\"https://assets.leetcode.com/uploads/2020/10/06/balance_2.jpg\"></p>\n<p><strong>Input:</strong> root = [1,2,2,3,3,null,null,4,4]\n<strong>Output:</strong> false</p>\n<p><strong>Example 3:</strong></p>\n<p><strong>Input:</strong> root = []\n<strong>Output:</strong> true</p>\n<p><strong>Constraints:</strong></p>\n<ul>\n<li>The number of nodes in the tree is in the range <code>[0, 5000]</code>.</li>\n<li><code>-104 &#x3C;= Node.val &#x3C;= 104</code></li>\n</ul>\n<p><a href=\"https://leetcode.com/problems/balanced-binary-tree/\">Source</a># Convert Sorted Array to Binary Search Tree</p>\n<blockquote>\n<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>\n</blockquote>\n<p>Given an array where elements are sorted in ascending order, convert it to a height balanced BST.</p>\n<p>For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of <em>every</em> node never differ by more than 1.</p>\n<p><strong>Example:</strong></p>\n<p>Given the sorted array: [-10,-3,0,5,9],</p>\n<p>One possible answer is: [0,-3,9,-10,null,5], which represents the following height balanced BST:</p>\n<pre><code>  0\n / \\\\\n</code></pre>\n<p>-3 9\n/ /\n-10 5</p>\n<p><a href=\"https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/\">Source</a># Delete Node in a BST</p>\n<blockquote>\n<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>\n</blockquote>\n<p>Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.</p>\n<p>Basically, the deletion can be divided into two stages:</p>\n<ol>\n<li>Search for a node to remove.</li>\n<li>If the node is found, delete the node.</li>\n</ol>\n<p><strong>Follow up:</strong> Can you solve it with time complexity <code>O(height of tree)</code>?</p>\n<p><strong>Example 1:</strong></p>\n<p><img src=\"https://assets.leetcode.com/uploads/2020/09/04/del_node_1.jpg\"></p>\n<p><strong>Input:</strong> root = [5,3,6,2,4,null,7], key = 3\n<strong>Output:</strong> [5,4,6,2,null,null,7]\n<strong>Explanation:</strong> Given key to delete is 3. So we find the node with value 3 and delete it.\nOne valid answer is [5,4,6,2,null,null,7], shown in the above BST.\nPlease notice that another valid answer is [5,2,6,null,4,null,7] and it's also accepted.\n<img src=\"https://assets.leetcode.com/uploads/2020/09/04/del_node_supp.jpg\"></p>\n<p><strong>Example 2:</strong></p>\n<p><strong>Input:</strong> root = [5,3,6,2,4,null,7], key = 0\n<strong>Output:</strong> [5,3,6,2,4,null,7]\n<strong>Explanation:</strong> The tree does not contain a node with value = 0.</p>\n<p><strong>Example 3:</strong></p>\n<p><strong>Input:</strong> root = [], key = 0\n<strong>Output:</strong> []</p>\n<p><strong>Constraints:</strong></p>\n<ul>\n<li>The number of nodes in the tree is in the range <code>[0, 104]</code>.</li>\n<li><code>-105 &#x3C;= Node.val &#x3C;= 105</code></li>\n<li>Each node has a <strong>unique</strong> value.</li>\n<li><code>root</code> is a valid binary search tree.</li>\n<li><code>-105 &#x3C;= key &#x3C;= 105</code></li>\n</ul>\n<p><a href=\"https://leetcode.com/problems/delete-node-in-a-bst/\">Source</a><img src=\"https://github.com/everthis/leetcode-js/blob/master/images/meeting-room-ii-0.jpg\" alt=\"alt text\" title=\"meeting-room-ii\">\n<img src=\"https://github.com/everthis/leetcode-js/blob/master/images/meeting-room-ii-1.jpg\" alt=\"alt text\" title=\"meeting-room-ii\"></p>\n<pre><code class=\"language-javascript\">/**\n * @param {number[][]} intervals\n * @return {number}\n */\nconst minMeetingRooms = function (intervals) {\n    const len = intervals.length;\n    const starts = new Array(len);\n    const ends = new Array(len);\n    for (let i = 0; i &#x3C; len; i++) {\n        starts[i] = intervals[i][0];\n        ends[i] = intervals[i][1];\n    }\n    starts.sort((a, b) => a - b);\n    ends.sort((a, b) => a - b);\n    let rooms = 0;\n    let endsIdx = 0;\n    for (let i = 0; i &#x3C; len; i++) {\n        if (starts[i] &#x3C; ends[endsIdx]) rooms++;\n        else endsIdx++;\n    }\n    return rooms;\n};\n</code></pre>\n<p><a href=\"#-\"><img src=\"https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png\" alt=\"-----------------------------------------------------\"></a></p>"},{"url":"/docs/docs/bash/","relativePath":"docs/docs/bash.md","relativeDir":"docs/docs","base":"bash.md","name":"bash","frontmatter":{"title":"Bash Commands That Save Me Time and Frustration","weight":0,"excerpt":"Bash Commands That Save Me Time and Frustration","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Bash Commands</h1>\n<h1>Bash Commands That Save Me Time and Frustration</h1>\n<p>Here's a list of bash commands that stand between me and insanity.</p>\n<hr>\n<h3>Bash Commands That Save Me Time and Frustration</h3>\n<h4>Here's a list of bash commands that stand between me and insanity.</h4>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*w0J8u6jWTikYVZzW.jpg\" class=\"graf-image\" /></figure><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"markup--anchor markup--p-anchor\">https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b</a>\n<blockquote>\n<p><strong>This article will be accompanied by the following</strong> <a href=\"https://github.com/bgoonz/bash-commands-walkthrough\" class=\"markup--anchor markup--pullquote-anchor\"><strong>github repository</strong></a> <strong>which will contain all the commands listed as well as folders that demonstrate before and after usage!</strong></p>\n</blockquote>\n<p><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/bash-commands-walkthrough\"><strong>bgoonz/bash-commands-walkthrough</strong><br />\n<em>to accompany the medium article I am writing. Contribute to bgoonz/bash-commands-walkthrough development by creating an…</em>github.com</a><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<blockquote>\n<p>The <a href=\"https://github.com/bgoonz/bash-commands-walkthrough#readme\" class=\"markup--anchor markup--pullquote-anchor\">readme</a> for this git repo will provide a much more condensed list… whereas this article will break up the commands with explanations… images &#x26; links!</p>\n</blockquote>\n<p><strong>I will include the code examples as both github gists (for proper syntax highlighting) and as code snippets adjacent to said gists so that they can easily be copied and pasted… or … if you're like me for instance; and like to use an extension to grab the markdown content of a page… the code will be included rather than just a link to the gist!</strong></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*3m_UcQOAyKtIpHQ6j9JzZw.gif\" class=\"graf-image\" /></figure>\n<h3>Here's a Cheatsheet:</h3>\n<h3>Getting Started (Advanced Users Skip Section):</h3>\n<hr>\n<h4>✔ Check the Current Directory ➡ <code>pwd</code>:</h4>\n<p>On the command line, it's important to know the directory we are currently working on. For that, we can use <code>pwd</code> command.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*dimzLUrmDI4Ufev6.gif\" class=\"graf-image\" /></figure>It shows that I'm working on my Desktop directory.\n<h4>✔ Display List of Files ➡ <code>ls</code>:</h4>\n<p>To see the list of files and directories in the current directory use <code>ls</code> command in your CLI.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*HHzVrK2CtTPwTdYT.gif\" class=\"graf-image\" /></figure>Shows all of my files and directories of my Desktop directory.\n<ul>\n<li><span id=\"20cb\">To show the contents of a directory pass the directory name to the <code>ls</code> command i.e. <code>ls directory_name</code>.</span></li>\n<li><span id=\"5cd8\">Some useful <code>ls</code> command options:-</span></li>\n</ul>\n<p>OptionDescriptionls -alist all files including hidden file starting with '.'ls -llist with the long formatls -lalist long format including hidden files</p>\n<h4>✔ Create a Directory ➡ <code>mkdir</code>:</h4>\n<p>We can create a new folder using the <code>mkdir</code> command. To use it type <code>mkdir folder_name</code>.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*m3dDyC9vRJBUZSxR.gif\" class=\"graf-image\" /></figure>Use `ls` command to see the directory is created or not.\n<p>I created a cli-practice directory in my working directory i.e. Desktop directory.</p>\n<h4>✔ Move Between Directories ➡ <code>cd</code>:</h4>\n<p>It's used to change directory or to move other directories. To use it type <code>cd directory_name</code>.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*34KGxT2G8oNMDnIc.gif\" class=\"graf-image\" /></figure>Can use `pwd` command to confirm your directory name.\n<p>Changed my directory to the cli-practice directory. And the rest of the tutorial I'm gonna work within this directory.</p>\n<h4>✔ Parent Directory ➡ <code>..</code>:</h4>\n<p>We have seen <code>cd</code> command to change directory but if we want to move back or want to move to the parent directory we can use a special symbol <code>..</code> after <code>cd</code> command, like <code>cd ..</code></p>\n<h4>✔ Create Files ➡ <code>touch</code>:</h4>\n<p>We can create an empty file by typing <code>touch file_name</code>. It's going to create a new file in the current directory (the directory you are currently in) with your provided name.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*xu1wtv7gJ2NMvP60.gif\" class=\"graf-image\" /></figure>I created a hello.txt file in my current working directory. Again you can use `ls` command to see the file is created or not.\n<p>Now open your hello.txt file in your text editor and write <em>Hello Everyone!</em> into your hello.txt file and save it.</p>\n<h4>✔ Display the Content of a File ➡ <code>cat</code>:</h4>\n<p>We can display the content of a file using the <code>cat</code> command. To use it type <code>cat file_name</code>.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*iKf5w9QFNCeLRv8a.gif\" class=\"graf-image\" /></figure>Shows the content of my hello.txt file.\n<h4>✔ Move Files &#x26; Directories ➡ <code>mv</code>:</h4>\n<p>To move a file and directory, we use <code>mv</code> command.</p>\n<p>By typing <code>mv file_to_move destination_directory</code>, you can move a file to the specified directory.</p>\n<p>By entering <code>mv directory_to_move destination_directory</code>, you can move all the files and directories under that directory.</p>\n<p>Before using this command, we are going to create two more directories and another txt file in our cli-practice directory.</p>\n<p><code>mkdir html css touch bye.txt</code></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*piaAQz_MQpzo7DPH.gif\" class=\"graf-image\" /></figure>Yes, we can use multiple directories & files names one after another to create multiple directories & files in one command.\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*5jmj_ZyNz46GuQKz.gif\" class=\"graf-image\" /></figure>Moved my bye.txt file into my css directory and then moved my css directory into my html directory.\n<h4>✔ Rename Files &#x26; Directories ➡ <code>mv</code>:</h4>\n<p><code>mv</code> command can also be used to rename a file and a directory.</p>\n<p>You can rename a file by typing <code>mv old_file_name new_file_name</code> &#x26; also rename a directory by typing <code>mv old_directory_name new_directory_name</code>.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*WTVu1dd6gr-nmWhD.gif\" class=\"graf-image\" /></figure>Renamed my hello.txt file to the hi.txt file and html directory to the folder directory.\n<h4>✔ Copy Files &#x26; Directories ➡ <code>cp</code>:</h4>\n<p>To do this, we use the <code>cp</code> command.</p>\n<ul>\n<li><span id=\"62fa\">You can copy a file by entering <code>cp file_to_copy new_file_name</code>.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*kCLVtKN9oKPbHfRF.gif\" class=\"graf-image\" /></figure>Copied my hi.txt file content into hello.txt file. For confirmation open your hello.txt file in your text editor.\n<ul>\n<li><span id=\"9bfc\">You can also copy a directory by adding the <code>-r</code> option, like <code>cp -r directory_to_copy new_directory_name</code>.</span></li>\n</ul>\n<p><em>The</em> <code>-r</code> <em>option for \"recursive\" means that it will copy all of the files including the files inside of subfolders.</em></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*MnmzMiioIYCuK92B.gif\" class=\"graf-image\" /></figure>Here I copied all of the files from the folder to folder-copy.\n<h4>✔ Remove Files &#x26; Directories ➡ <code>rm</code>:</h4>\n<p>To do this, we use the <code>rm</code> command.</p>\n<ul>\n<li><span id=\"487a\">To remove a file, you can use the command like <code>rm file_to_remove</code>.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ohCmdthd92_HA6Ze.gif\" class=\"graf-image\" /></figure>Here I removed my hi.txt file.\n<ul>\n<li><span id=\"0e9a\">To remove a directory, use the command like <code>rm -r directory_to_remove</code>.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*voDbzwSpw24A2RjQ.gif\" class=\"graf-image\" /></figure>I removed my folder-copy directory from my cli-practice directory i.e. current working directory.\n<h4>✔ Clear Screen ➡ <code>clear</code>:</h4>\n<p>Clear command is used to clear the terminal screen.</p>\n<h4>✔ Home Directory ➡ <code>~</code>:</h4>\n<p>The Home directory is represented by <code>~</code>. The Home directory refers to the base directory for the user. If we want to move to the Home directory we can use <code>cd ~</code> command. Or we can only use <code>cd</code> command.</p>\n<hr>\n<h3>MY COMMANDS:</h3>\n<h3>1.) Recursively unzip zip files and then delete the archives when finished:</h3>\n<p><strong>here is a</strong> <a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/1-recursive-unzip\" class=\"markup--anchor markup--p-anchor\"><strong>folde</strong></a><strong>r containing the before and after… I had to change folder names slightly due to a limit on the length of file-paths in a github repo.</strong></p>\n<pre><code>find . -name \"*.zip\" | while read filename; do unzip -o -d \"`dirname \"$filename\"`\" \"$filename\"; done;\n\nfind . -name \"*.zip\" -type f -print -delete\n</code></pre>\n<hr>\n<h3>2.) Install node modules recursively:</h3>\n<pre><code>npm i -g recursive-install\n\nnpm-recursive-install\n</code></pre>\n<hr>\n<h3>3.) Clean up unnecessary files/folders in git repo:</h3>\n<pre><code>find . -empty -type f -print -delete #Remove empty files\n\n# -------------------------------------------------------\nfind . -empty -type d -print -delete #Remove empty folders\n\n# -------------------------------------------------------\n\n# This will remove .git folders...    .gitmodule files as well as .gitattributes and .gitignore files.\n\nfind . \\( -name \".git\" -o -name \".gitignore\" -o -name \".gitmodules\" -o -name \".gitattributes\" \\) -exec rm -rf -- {} +\n\n# -------------------------------------------------------\n\n# This will remove the filenames you see listed below that just take up space if a repo has been downloaded for use exclusively in your personal file system (in which case the following files just take up space)# Disclaimer... you should not use this command in a repo that you intend to use with your work as it removes files that attribute the work to their original creators!\n\nfind . \\( -name \"*SECURITY.txt\" -o -name \"*RELEASE.txt\" -o -name \"*CHANGELOG.txt\" -o -name \"*LICENSE.txt\" -o -name \"*CONTRIBUTING.txt\" -name \"*HISTORY.md\" -o -name \"*LICENSE\" -o -name \"*SECURITY.md\" -o -name \"*RELEASE.md\" -o -name \"*CHANGELOG.md\" -o -name \"*LICENSE.md\" -o -name \"*CODE_OF_CONDUCT.md\" -o -name \"\\*CONTRIBUTING.md\" \\) -exec rm -rf -- {} +\n</code></pre>\n<h4>In Action:</h4>\n<p>The following output from my bash shell corresponds to the directory:</p>\n<p><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\"><strong>bgoonz/bash-commands-walkthrough</strong><br />\n<em>Deployment github-pages Navigation Big O notation is the language we use for talking about how long an algorithm takes…</em>github.com</a><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h4>which was created by running the aforementioned commands in in a perfect copy of this directory:</h4>\n<p><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><strong>bgoonz/DS-ALGO-OFFICIAL</strong><br />\n<em>Deployment github-pages Navigation Big O notation is the language we use for talking about how long an algorithm takes…</em>github.com</a><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<blockquote>\n<p><strong>…..below is the terminal output for the following commands:</strong></p>\n</blockquote>\n<pre><code>pwd\n/mnt/c/Users/bryan/Downloads/bash-commands/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\n</code></pre>\n<blockquote>\n<p><strong>After printing the working directory for good measure:</strong></p>\n</blockquote>\n<pre><code>find . -empty -type f -print -delete\n</code></pre>\n<blockquote>\n<p><strong>The above command deletes empty files recursively starting from the directory in which it was run:</strong></p>\n</blockquote>\n<pre><code>./CONTENT/DS-n-Algos/File-System/file-utilities/node_modules/line-reader/test/data/empty_file.txt\n./CONTENT/DS-n-Algos/_Extra-Practice/free-code-camp/nodejs/http-collect.js\n./CONTENT/Resources/Comments/node_modules/mime/.npmignore\n./markdown/tree2.md\n./node_modules/loadashes6/lodash/README.md\n./node_modules/loadashes6/lodash/release.md\n./node_modules/web-dev-utils/Markdown-Templates/Markdown-Templates-master/filled-out-readme.md\n|01:33:16|bryan@LAPTOP-9LGJ3JGS:[DS-ALGO-OFFICIAL-master] DS-ALGO-OFFICIAL-master_exitstatus:0[╗___________o>\n</code></pre>\n<blockquote>\n<p><strong>The command seen below deletes empty folders recursively starting from the directory in which it was run:</strong></p>\n</blockquote>\n<pre><code>find . -empty -type d -print -delete\n</code></pre>\n<blockquote>\n<p>The resulting directories….</p>\n</blockquote>\n<pre><code>|01:33:16|bryan@LAPTOP-9LGJ3JGS:[DS-ALGO-OFFICIAL-master] DS-ALGO-OFFICIAL-master_exitstatus:0[╗___________o>\n\nfind . -empty -type d -print -delete\n./.git/branches\n./.git/objects/info\n./.git/refs/tags\n|01:33:31|bryan@LAPTOP-9LGJ3JGS:[DS-ALGO-OFFICIAL-master] DS-ALGO-OFFICIAL-master_exitstatus:0[╗___________o>\n</code></pre>\n<blockquote>\n<p><strong>The command seen below deletes .git folders as well as .gitignore, .gitattributes, .gitmodule files</strong></p>\n</blockquote>\n<pre><code>find . \\( -name \".git\" -o -name \".gitignore\" -o -name \".gitmodules\" -o -name \".gitattributes\" \\) -exec rm -rf -- {} +\n</code></pre>\n<p><strong>The command seen below deletes most SECURITY, RELEASE, CHANGELOG, LICENSE, CONTRIBUTING, &#x26; HISTORY files that take up pointless space in repo's you wish to keep exclusively for your own reference.</strong></p>\n<h3>!!!Use with caution as this command removes the attribution of the work from it's original authors!!!!!</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*r5dGhtbeZ4VdO54U\" alt=\"!!!Use with caution as this command removes the attribution of the work from it's original authors!!!!!\" class=\"graf-image\" /><figcaption>!!!Use with caution as this command removes the attribution of the work from it's original authors!!!!!</figcaption></figure>find . \\( -name \"*SECURITY.txt\" -o -name \"*RELEASE.txt\" -o  -name \"*CHANGELOG.txt\" -o -name \"*LICENSE.txt\" -o -name \"*CONTRIBUTING.txt\" -name \"*HISTORY.md\" -o -name \"*LICENSE\" -o -name \"*SECURITY.md\" -o -name \"*RELEASE.md\" -o  -name \"*CHANGELOG.md\" -o -name \"*LICENSE.md\" -o -name \"*CODE_OF_CONDUCT.md\" -o -name \"*CONTRIBUTING.md\" \\) -exec rm -rf -- {} +\n<hr>\n<h3>4.) Generate index.html file that links to all other files in working directory:</h3>\n<pre><code>#!/bin/sh\n# find ./ | grep -i \"\\.*$\" >files\nfind ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i \"\\.*$\">files\nlisting=\"files\"\nout=\"\"\nhtml=\"index.html\"\nout=\"basename $out.html\"\nhtml=\"index.html\"\ncmd() {\n  echo '  &#x3C;!DOCTYPE html>'\n  echo '&#x3C;html>'\n  echo '&#x3C;head>'\n  echo '  &#x3C;meta http-equiv=\"Content-Type\" content=\"text/html\">'\n  echo '  &#x3C;meta name=\"Author\" content=\"Bryan Guner\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"./assets/prism.css\">'\n  echo ' &#x3C;link rel=\"stylesheet\" href=\"./assets/style.css\">'\n  echo ' &#x3C;script async defer src=\"./assets/prism.js\">&#x3C;/script>'\n  echo \"  &#x3C;title> directory &#x3C;/title>\"\n  echo \"\"\n  echo '&#x3C;style>'\necho '    a {'\necho '      color: black;'\necho '    }'\necho ''\necho '    li {'\necho '      border: 1px solid black !important;'\necho '      font-size: 20px;'\necho '      letter-spacing: 0px;'\necho '      font-weight: 700;'\necho '      line-height: 16px;'\necho '      text-decoration: none !important;'\necho '      text-transform: uppercase;'\necho '      background: #194ccdaf !important;'\necho '      color: black !important;'\necho '      border: none;'\necho '      cursor: pointer;'\necho '      justify-content: center;'\necho '      padding: 30px 60px;'\necho '      height: 48px;'\necho '      text-align: center;'\necho '      white-space: normal;'\necho '      border-radius: 10px;'\necho '      min-width: 45em;'\necho '      padding: 1.2em 1em 0;'\necho '      box-shadow: 0 0 5px;'\necho '      margin: 1em;'\necho '      display: grid;'\necho '      -webkit-border-radius: 10px;'\necho '      -moz-border-radius: 10px;'\necho '      -ms-border-radius: 10px;'\necho '      -o-border-radius: 10px;'\necho '    }'\necho '  &#x3C;/style>'\n  echo '&#x3C;/head>'\n  echo '&#x3C;body>'\n  echo \"\"\n  # continue with the HTML stuff\n  echo \"\"\n  echo \"\"\n  echo \"&#x3C;ul>\"\n  awk '{print \"&#x3C;li>&#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x26;nbsp;&#x3C;/a>&#x3C;/li>\"}' $listing\n  # awk '{print \"&#x3C;li>\"};\n  #  {print \" &#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x3C;/a>&#x3C;/li>&#x26;nbsp;\"}' \\ $listing\n  echo \"\"\n  echo \"&#x3C;/ul>\"\n  echo \"&#x3C;/body>\"\n  echo \"&#x3C;/html>\"\n}\ncmd $listing --sort=extension >>$html\n</code></pre>\n<h4>In Action:</h4>\n<p><strong>I will use this copy of my Data Structures Practice Site to demonstrate the result:</strong></p>\n<p><a href=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\"><strong>side-projects-42/DS-Bash-Examples-Deploy</strong><br />\n<em>Deployment github-pages Navigation Big O notation is the language we use for talking about how long an algorithm takes…</em>github.com</a><a href=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*PuuDTUviX5G6mja-5eKUIw.png\" class=\"graf-image\" /></figure>#### The result is a index.html file that contains a list of links to each file in the directory:\n<blockquote>\n<p>here is a link to and photo of the resulting html file:</p>\n</blockquote>\n<p><a href=\"https://quirky-meninsky-4181b5.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://quirky-meninsky-4181b5.netlify.app/\"><strong>index.html</strong><br />\n<em>CONTENT/DS-n-Algos/</em>quirky-meninsky-4181b5.netlify.app</a><a href=\"https://quirky-meninsky-4181b5.netlify.app/\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/1*AOYbWvUGN9yJ4ceNzAGGsw.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>5.) Download all links to a files of a specified extension on a user provided (url) webpage:</h3>\n<pre><code>wget -r -A.pdf https://overapi.com/gitwget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off\n</code></pre>\n<blockquote>\n<p>The result is stored in <a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/5-download-all-pdf\" class=\"markup--anchor markup--blockquote-anchor\">this directory:</a></p>\n</blockquote>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*8evVPO_z-_TATzkcDTp15Q.png\" class=\"graf-image\" /></figure>\n<hr>\n<h3>6.)Recursively remove lines of text containing the string badFolder from files in the working directory.</h3>\n<pre><code>find . -type f -exec sed -i '/badFolder/d' ./* {} \\;\n\n# OR\n\nfind . -name 'result.md'  -type f -exec sed -i '/badFolder/d' ./* {} \\;\n</code></pre>\n<p><strong>As an example I will run this command on a file containing the text:</strong></p>\n<pre><code>Hacks Blog\n\nRead more at hacks.mozilla.org\n\nbadFolder\n\nbadFolder Implementing Private Fields for JavaScript\n\nWhen implementing a language feature for JavaScript, an implementer must make decisions about how the language in the specification maps to the implementation. Private fields is an example of where the specification language and implementation reality diverge, at least in SpiderMonkey- the JavaScript engine which powers Firefox. To understand more, I'll explain what private fields are, a couple of models for thinking about them, and explain why our implementation diverges from the specification language.The post Implementing Private Fields for JavaScript appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, June 8, 2021 by Matthew Gaudet\n\nLooking fine with Firefox 89\n\nFirefox 89 has smartened up and brings with it a slimmed-down, slightly more minimalist interface.badFolder Along with this new look, we get some great styling features including a force-colours feature for media queries and better control over how fonts are displayed. The long-awaited top-level await keyword for JavaScript modules is now enabled, as well as the PerformanceEventTiming interface, which is another addition to the performance suite of APIs: 89 really has been working out!The post Looking fine with Firefox 89 appeared first on Mozilla Hacks - the Web developer blog.\n\nbadFolder\n\nPosted Tuesday, June 1, 2021 by Chris Mills\n\nbadFolder\n\nImproving Firefox stability on Linux\n\nRoughly a year ago at Mozilla we started an effort to improve Firefox stability on Linux. This effort quickly became an example of good synergies between FOSS projects.The post Improving Firefox stability on Linux appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Wednesday, May 19, 2021 by Gabriele Svelto badFolder\n\nIntroducing Firefox's new Site Isolation Security Architecture\n\nLike any web browser, Firefox loads code from untrusted and potentially hostile websites and runs it on your computer. To protect you against new types of attacks from malicious sites and to meet the security principles of Mozilla, we set out to redesign Firefox on desktop.The post Introducing Firefox's new Site Isolation Security Architecture appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, May 18, 2021 by Anny Gakhokidze\n\nPyodide Spin Out and 0.17 Release\n\nWe are happy to announce that Pyodide has become an independent and community-driven project. We are also pleased to announce the 0.17 release for Pyodide with many new features and improvements. Pyodide consists of the CPython 3.8 interpreter compiled to WebAssembly which allows Python to run in the browser.The post Pyodide Spin Out and 0.17 Release appeared first on Mozilla Hacks - the Web developer blog. badFolder\n\nPosted Thursday, April 22, 2021 by Teon Brooks\n</code></pre>\n<p><strong><em>I modified the command slightly to apply only to files called 'result.md':</em></strong></p>\n<blockquote>\n<p>The result is :</p>\n</blockquote>\n<pre><code>Hacks Blog\n\nRead more at hacks.mozilla.org\n\nWhen implementing a language feature for JavaScript, an implementer must make decisions about how the language in the specification maps to the implementation. Private fields is an example of where the specification language and implementation reality diverge, at least in SpiderMonkey- the JavaScript engine which powers Firefox. To understand more, I'll explain what private fields are, a couple of models for thinking about them, and explain why our implementation diverges from the specification language.The post Implementing Private Fields for JavaScript appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, June 8, 2021 by Matthew Gaudet\n\nLooking fine with Firefox 89\n\nPosted Tuesday, June 1, 2021 by Chris Mills\n\nImproving Firefox stability on Linux\n\nRoughly a year ago at Mozilla we started an effort to improve Firefox stability on Linux. This effort quickly became an example of good synergies between FOSS projects.The post Improving Firefox stability on Linux appeared first on Mozilla Hacks - the Web developer blog.\n\nIntroducing Firefox's new Site Isolation Security Architecture\n\nLike any web browser, Firefox loads code from untrusted and potentially hostile websites and runs it on your computer. To protect you against new types of attacks from malicious sites and to meet the security principles of Mozilla, we set out to redesign Firefox on desktop.The post Introducing Firefox's new Site Isolation Security Architecture appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, May 18, 2021 by Anny Gakhokidze\n\nPyodide Spin Out and 0.17 Release\n\nPosted Thursday, April 22, 2021 by Teon Brooks\n</code></pre>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*Up5as-MkHcHbvI_qX1AqPw.png\" class=\"graf-image\" /></figure>\n<p><strong>the test.txt and result.md files can be found here:</strong></p>\n<p><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/6-remove-lines-contaning-bad-text\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/6-remove-lines-contaning-bad-text\"><strong>bgoonz/bash-commands-walkthrough</strong><br />\n<em>to accompany the medium article I am writing. Contribute to bgoonz/bash-commands-walkthrough development by creating an…</em>github.com</a><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/6-remove-lines-contaning-bad-text\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<hr>\n<h3>7.) Execute command recursively:</h3>\n<p><strong>Here I have modified the command I wish to run recursively to account for the fact that the 'find' command already works recursively, by appending the -maxdepth 1 flag…</strong></p>\n<blockquote>\n<p><strong>I am essentially removing the recursive action of the find command…</strong></p>\n</blockquote>\n<p><strong>That way, if the command affects the more deeply nested folders we know the outer RecurseDirs function we are using to run the <em>find/pandoc</em> line once in every subfolder of the working directory… is working properly!</strong></p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/600/1*5C_uzLnuCSlTiioi2EtnUA.png\" class=\"graf-image\" /></figure>**Run in the folder shown to the left… we would expect every .md file to be accompanied by a newly generated html file by the same name.**\n<p><strong>The results of said operation can be found in the</strong> <a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/7-recursive-run\" class=\"markup--anchor markup--p-anchor\"><strong>following directory</strong></a></p>\n<h4>In Action:</h4>\n<p>🢃 Below 🢃</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*k9c1QRKY07TLJnp9Se89lQ.gif\" class=\"graf-image\" /></figure>\n<h4>The final result is:</h4>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/1*jqrjNeBuRmTrDt3vmQ50LQ.png\" class=\"graf-image\" /></figure>\n<p><em>If you want to run any bash script recursively all you have to do is substitue out line #9 with the command you want to run once in every sub-folder.</em></p>\n<pre><code>function RecurseDirs ()\n{\n    oldIFS=$IFS\n    IFS=$'\\n'\n    for f in \"$@\"\n    do\n\n#Replace the line below with your own command!\n\n#find ./ -iname \"*.md\" -maxdepth 1 -type f -exec sh -c 'pandoc --standalone \"${0}\" -o \"${0%.md}.html\"' {} \\;\n\n#####################################################\n# YOUR CODE BELOW!\n\n#####################################################\n\nif [[ -d \"${f}\" ]]; then\n            cd \"${f}\"\n            RecurseDirs $(ls -1 \".\")\n            cd ..\n        fi\n    done\n    IFS=$oldIFS\n}\nRecurseDirs \"./\"\n</code></pre>\n<hr>\n<h3>TBC….</h3>\n<p><strong>Here are some of the other commands I will cover in greater detail… at a later time:</strong></p>\n<h3>9. Copy any text between &#x3C;script> tags in a file called example.html to be inserted into a new file: out.js</h3>\n<pre><code>sed -n -e '/&#x3C;script>/,/&#x3C;\\/script>/p' example.html >out.js\n</code></pre>\n<hr>\n<h3>10. Recursively Delete node_modules folders</h3>\n<pre><code>find . -name 'node_modules' -type d -print -prune -exec rm -rf '{}' +\n</code></pre>\n<hr>\n<h3>11. Sanatize file and folder names to remove illegal characters and reserved words.</h3>\n<pre><code>sanitize() {\n  shopt -s extglob;\n\n  filename=$(basename \"$1\")\n  directory=$(dirname \"$1\")\n\n  filename_clean=$(echo \"$filename\" | sed -e 's/[\\\\/:\\*\\?\"&#x3C;>\\|\\x01-\\x1F\\x7F]//g' -e 's/^\\(nul\\|prn\\|con\\|lpt[0-9]\\|com[0-9]\\|aux\\)\\(\\.\\|$\\)//i' -e 's/^\\.*$//' -e 's/^$/NONAME/')\n\n  if (test \"$filename\" != \"$filename_clean\")\n  then\n    mv -v \"$1\" \"$directory/$filename_clean\"\n  fi\n}\n\nexport -f sanitize\n\nsanitize_dir() {\n  find \"$1\" -depth -exec bash -c 'sanitize \"$0\"' {} \\;\n\n}\n\nsanitize_dir '/path/to/somewhere'\n</code></pre>\n<hr>\n<h3>12. Start postgresql in terminal</h3>\n<pre><code>sudo -u postgres psql\n</code></pre>\n<hr>\n<h3>13. Add closing body and script tags to each html file in working directory.</h3>\n<pre><code>for f in * ; do\n  mv \"$f\" \"$f.html\"\ndoneecho \"&#x3C;form>\n &#x3C;input type=\"button\" value=\"Go back!\" onclick=\"history.back()\">\n&#x3C;/form>\n  &#x3C;/body>&#x3C;/html>\" | tee -a *.html\n</code></pre>\n<hr>\n<h3>14. Batch Download Videos</h3>\n<pre><code>#!/bin/bash\n\nlink=\"#insert url here#\"\n#links were a set of strings with just the index of the video as the variable\n\nnum=3\n#first video was numbered 3 - weird.\n\next=\".mp4\"\n\nwhile [ $num -le 66 ]\ndo\n      wget $link$num$ext -P ~/Downloads/\n      num=$(($num+1))\ndone\n</code></pre>\n<hr>\n<h3>15. Change File Extension from '.txt' to .doc for all files in working directory.</h3>\n<pre><code>sudo apt install rename\n\nrename 's/\\.txt$/.doc/' *.txt\n</code></pre>\n<h3>16. Recursivley change any file with extension .js.download to .js</h3>\n<pre><code>find . -name \"*.\\.js\\.download\" -exec rename 's/\\.js\\.download$/.js/' '{}' +\n</code></pre>\n<hr>\n<h3>17. Copy folder structure including only files of a specific extension into an ouput Folder</h3>\n<pre><code>find . -name '*.md' | cpio -pdm './../outputFolder'\n</code></pre>\n<hr>\n<h3>Discover More:</h3>\n<p><a href=\"https://bgoonz-blog.netlify.app/\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bgoonz-blog.netlify.app/\"><strong>Web-Dev-Hub</strong><br />\n<em>Memoization, Tabulation, and Sorting Algorithms by Example Why is looking at runtime not a reliable method of…</em>bgoonz-blog.netlify.app</a><a href=\"https://bgoonz-blog.netlify.app/\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<h3>Part 2 of this series:</h3>\n<p><a href=\"https://medium.com/@bryanguner/life-saving-bash-scripts-part-2-b40c8ee22682\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://medium.com/@bryanguner/life-saving-bash-scripts-part-2-b40c8ee22682\"><strong>Medium</strong><br />\n<em>Continued!!!medium.com</em></a><a href=\"https://medium.com/@bryanguner/life-saving-bash-scripts-part-2-b40c8ee22682\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a></p>\n<hr>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/920fb6ab9d0a\">June 29, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/bash-commands-that-save-time-920fb6ab9d0a\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on August 31, 2021.</p>\n<h1>Resources:</h1>\n<ul>\n<li><a href=\"https://gist.github.com/bgoonz/df74dfa73bb5edd239ac738a14104eee\">holy grail</a></li>\n</ul>\n<h1>1. Remove spaces from file and folder names and then remove numbers from files and folder names....</h1>\n<h3>Description: need to : <code>sudo apt install rename</code></h3>\n<blockquote>\n<p>Notes: Issue when renaming file without numbers collides with existing file name...</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"* *\" -type d | rename 's/ /_/g'\nfind . -name \"* *\" -type f | rename 's/ /_/g'\n</code></pre>\n<pre><code class=\"language-sh\">```sh\nfind $dir -type f | sed 's|\\(.*/\\)[^A-Z]*\\([A-Z].*\\)|mv \\\"&#x26;\\\" \\\"\\1\\2\\\"|' | sh\n\nfind $dir -type d | sed 's|\\(.*/\\)[^A-Z]*\\([A-Z].*\\)|mv \\\"&#x26;\\\" \\\"\\1\\2\\\"|' | sh\n\nfor i in *.html; do mv \"$i\" \"${i%-*}.html\"; done\n\nfor i in *.*; do mv \"$i\" \"${i%-*}.${i##*.}\"; done\n\n---\n### Description: combine the contents of every file in the contaning directory.\n\n\n>Notes: this includes the contents of the file it's self...\n\n\n###### code:\n\n\n```js\n//APPEND-DIR.js\nconst fs = require('fs');\nlet cat = require('child_process')\n  .execSync('cat *')\n  .toString('UTF-8');\nfs.writeFile('output.md', cat, err => {\n  if (err) throw err;\n});\n</code></pre>\n<hr>\n<h1>2. Download Website Using Wget:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes: ==> sudo apt install wget</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://bootcamp42.gitbook.io/python/\n</code></pre>\n<hr>\n<h1>3. Clean Out Messy Git Repo:</h1>\n<h3>Description: recursively removes git related folders as well as internal use files / attributions in addition to empty folders</h3>\n<blockquote>\n<p>Notes: To clear up clutter in repositories that only get used on your local machine.</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -empty -type d -print -delete\n\n\nfind . \\( -name \".git\" -o -name \".gitignore\" -o -name \".gitmodules\" -o -name \".gitattributes\" \\) -exec rm -rf -- {} +\n\n\nfind . \\( -name \"*SECURITY.txt\" -o -name \"*RELEASE.txt\" -o  -name \"*CHANGELOG.txt\" -o -name \"*LICENSE.txt\" -o -name \"*CONTRIBUTING.txt\" -name \"*HISTORY.md\" -o -name \"*LICENSE\" -o -name \"*SECURITY.md\" -o -name \"*RELEASE.md\" -o  -name \"*CHANGELOG.md\" -o -name \"*LICENSE.md\" -o -name \"*CODE_OF_CONDUCT.md\" -o -name \"*CONTRIBUTING.md\" \\) -exec rm -rf -- {} +\n</code></pre>\n<hr>\n<h1>4. clone all of a user's git repositories</h1>\n<h3>Description: clone all of a user or organization's git repositories.</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<h1>Generalized:</h1>\n<pre><code class=\"language-sh\">CNTX={users|orgs}; NAME={username|orgname}; PAGE=1\ncurl \"https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&#x26;per_page=100\" |\n  grep -e 'git_url*' |\n  cut -d \\\" -f 4 |\n  xargs -L1 git clone\n</code></pre>\n<h1>Clone all Git User</h1>\n<pre><code class=\"language-sh\">CNTX={users}; NAME={bgoonz}; PAGE=1\ncurl \"https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&#x26;per_page=200\"?branch=master |\n  grep -e 'git_url*' |\n  cut -d \\\" -f 4 |\n  xargs -L1 git clone\n</code></pre>\n<h1>Clone all Git Organization:</h1>\n<pre><code class=\"language-sh\">CNTX={organizations}; NAME={TheAlgorithms}; PAGE=1\ncurl \"https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&#x26;per_page=200\"?branch=master |\n  grep -e 'git_url*' |\n  cut -d \\\" -f 4 |\n  xargs -L1 git clone\n</code></pre>\n<hr>\n<h1>5. Git Workflow</h1>\n<h3>Description:</h3>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git pull\ngit init\ngit add .\ngit commit -m\"update\"\ngit push -u origin master\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin main\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin bryan-guner\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin gh-pages\n</code></pre>\n<pre><code class=\"language-sh\">git init\ngit add .\ngit commit -m\"update\"\ngit push -u origin preview\n</code></pre>\n<hr>\n<h1>6. Recursive Unzip In Place</h1>\n<h3>Description: recursively unzips folders and then deletes the zip file by the same name.</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"*.zip\" | while read filename; do unzip -o -d \"`dirname \"$filename\"`\" \"$filename\"; done;\n\n\n\nfind . -name \"*.zip\" -type f -print -delete\n</code></pre>\n<hr>\n<h1>7. git pull keeping local changes:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git stash\ngit pull\ngit stash pop\n</code></pre>\n<hr>\n<h1>8. Prettier Code Formatter:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo npm i prettier -g\n\nprettier --write .\n</code></pre>\n<hr>\n<h1>9. Pandoc</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find ./ -iname \"*.md\" -type f -exec sh -c 'pandoc --standalone \"${0}\" -o \"${0%.md}.html\"' {} \\;\n\n\n\nfind ./ -iname \"*.html\" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict \"${0}\" -o \"${0%.html}.md\"' {} \\;\n\n\n\nfind ./ -iname \"*.docx\" -type f -exec sh -c 'pandoc \"${0}\" -o \"${0%.docx}.md\"' {} \\;\n</code></pre>\n<hr>\n<h1>10. Gitpod Installs</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo apt install tree\nsudo apt install pandoc -y\nsudo apt install rename -y\nsudo apt install black -y\nsudo apt install wget -y\nnpm i lebab -g\nnpm i prettier -g\nnpm i npm-recursive-install -g\n</code></pre>\n<pre><code class=\"language-sh\">black .\n\nprettier --write .\nnpm-recursive-install\n</code></pre>\n<hr>\n<h1>11. Repo Utils Package:</h1>\n<h3>Description: my standard repo utis package</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">npm i @bgoonz11/repoutils\n</code></pre>\n<hr>\n<h1>12. Unix Tree Package Usage:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">tree -d -I  'node_modules'\n\ntree  -I  'node_modules'\n\ntree -f  -I  'node_modules' >TREE.md\n\ntree -f -L 2  >README.md\n\ntree -f  -I  'node_modules' >listing-path.md\n\n\ntree -f  -I  'node_modules' -d >TREE.md\n\ntree -f >README.md\n</code></pre>\n<hr>\n<h1>13. Find &#x26; Replace string in file &#x26; folder names recursively..</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -type f -exec rename 's/string1/string2/g' {} +\n\n\nfind . -type d -exec rename 's/-master//g' {} +\n\n\nfind . -type f -exec rename 's/\\.download//g' {} +\n\n\n\n\nfind . -type d -exec rename 's/-main//g' {} +\n\n\n\nrename 's/\\.js\\.download$/.js/' *.js\\.download\n\n\nrename 's/\\.html\\.markdown$/.md/' *.html\\.markdown\n\n\nfind . -type d -exec rename 's/es6//g' {} +\n</code></pre>\n<hr>\n<h1>14. Remove double extensions :</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/bash\n\nfor file in *.md.md\ndo\n    mv \"${file}\" \"${file%.md}\"\ndone\n\n#!/bin/bash\n\nfor file in *.html.html\ndo\n    mv \"${file}\" \"${file%.html}\"\ndone\n</code></pre>\n<pre><code class=\"language-sh\">#!/bin/bash\n\nfor file in *.html.png\ndo\n    mv \"${file}\" \"${file%.png}\"\ndone\n\nfor file in *.jpg.jpg\ndo\n    mv \"${file}\" \"${file%.png}\"\ndone\n</code></pre>\n<hr>\n<h1>15. Truncate folder names down to 12 characters:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">for d in ./*; do mv $d ${d:0:12}; done\n</code></pre>\n<hr>\n<h1>16.Appendir.js</h1>\n<h3>Description: combine the contents of every file in the contaning directory.</h3>\n<blockquote>\n<p>Notes: this includes the contents of the file it's self...</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-js\">//APPEND-DIR.js\nconst fs = require('fs');\nlet cat = require('child_process').execSync('cat *').toString('UTF-8');\nfs.writeFile('output.md', cat, (err) => {\n    if (err) throw err;\n});\n</code></pre>\n<hr>\n<h1>17. Replace space in filename with underscore</h1>\n<h3>Description: followed by replace <code>'#' with '_'</code> in directory name</h3>\n<blockquote>\n<p>Notes: Can be re-purposed to find and replace any set of strings in file or folder names.</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"* *\" -type f | rename 's/_//g'\n\nfind . -name \"* *\" -type d | rename 's/#/_/g'\n</code></pre>\n<hr>\n<h1>18. Filter &#x26; delete files by name and extension</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name '.bin' -type d -prune -exec rm -rf '{}' +\n\nfind . -name '*.html' -type d -prune -exec rm -rf '{}' +\n\nfind . -name 'nav-index' -type d -prune -exec rm -rf '{}' +\n\nfind . -name 'node-gyp' -type d -prune -exec rm -rf '{}' +\n\nfind . -name 'deleteme.txt' -type f -prune -exec rm -rf '{}' +\n\nfind . -name 'right.html' -type f -prune -exec rm -rf '{}' +\n\nfind . -name 'left.html' -type f -prune -exec rm -rf '{}' +\n</code></pre>\n<hr>\n<h1>19. Remove lines containing string:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes: Remove lines not containing <code>'.js'</code></p>\n</blockquote>\n<pre><code class=\"language-sh\">sudo sed -i '/\\.js/!d' ./*scrap2.md\n</code></pre>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo sed -i '/githubusercontent/d' ./*sandbox.md\n\n\nsudo sed -i '/githubusercontent/d' ./*scrap2.md\n\n\n\nsudo sed -i '/github\\.com/d' ./*out.md\n\n\nsudo sed -i '/author/d' ./*\n</code></pre>\n<hr>\n<h1>20. Remove duplicate lines from a text file</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:\n//...syntax of uniq...//\n$uniq [OPTION] [INPUT[OUTPUT]]\nThe syntax of this is quite easy to understand. Here, INPUT refers to the input file in which repeated lines need to be filtered out and if INPUT isn't specified then uniq reads from the standard input. OUTPUT refers to the output file in which you can store the filtered output generated by uniq command and as in case of INPUT if OUTPUT isn't specified then uniq writes to the standard output.</p>\n</blockquote>\n<p>Now, let's understand the use of this with the help of an example. Suppose you have a text file named kt.txt which contains repeated lines that needs to be omitted. This can simply be done with uniq.</p>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo apt install uniq\nuniq -u input.txt output.txt\n</code></pre>\n<hr>\n<h1>21. Remove lines containing string:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo sed -i '/githubusercontent/d' ./*sandbox.md\n\n\nsudo sed -i '/githubusercontent/d' ./*scrap2.md\n\n\nsudo sed -i '/github\\.com/d' ./*out.md\n\n---\ntitle: add_days\ntags: date,intermediate\nfirstSeen: 2020-10-28T16:19:04+02:00\nlastUpdated: 2020-10-28T16:19:04+02:00\n---\n\nsudo sed -i '/title:/d' ./*output.md\nsudo sed -i '/firstSeen/d' ./*output.md\nsudo sed -i '/lastUpdated/d' ./*output.md\nsudo sed -i '/tags:/d' ./*output.md\n\nsudo sed -i '/badstring/d' ./*\n\n\nsudo sed -i '/stargazers/d' ./repo.txt\nsudo sed -i '/node_modules/d' ./index.html\nsudo sed -i '/right\\.html/d' ./index.html\nsudo sed -i '/right\\.html/d' ./right.html\n</code></pre>\n<hr>\n<h1>22. Zip directory excluding .git and node_modules all the way down (Linux)</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/bash\nTSTAMP=`date '+%Y%m%d-%H%M%S'`\nzip -r $1.$TSTAMP.zip $1 -x \"**.git/*\" -x \"**node_modules/*\" `shift; echo $@;`\n\nprintf \"\\nCreated: $1.$TSTAMP.zip\\n\"\n\n# usage:\n# - zipdir thedir\n# - zip thedir -x \"**anotherexcludedsubdir/*\"    (important the double quotes to prevent glob expansion)\n\n# if in windows/git-bash, add 'zip' command this way:\n# https://stackoverflow.com/a/55749636/1482990\n</code></pre>\n<hr>\n<h1>23. Delete files containing a certain string:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . | xargs grep -l www.redhat.com | awk '{print \"rm \"$1}' > doit.sh\nvi doit.sh // check for murphy and his law\nsource doit.sh\n</code></pre>\n<hr>\n<h1>24.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/sh\n\n# find ./ | grep -i \"\\.*$\" >files\nfind ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i \"\\.*$\">files\nlisting=\"files\"\n\nout=\"\"\n\nhtml=\"sitemap.html\"\nout=\"basename $out.html\"\nhtml=\"sitemap.html\"\ncmd() {\n\n  echo '  &#x3C;!DOCTYPE html>'\n  echo '&#x3C;html>'\n  echo '&#x3C;head>'\n\n  echo '  &#x3C;meta http-equiv=\"Content-Type\" content=\"text/html\">'\n\n  echo '  &#x3C;meta name=\"Author\" content=\"Bryan Guner\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"./assets/prism.css\">'\n  echo ' &#x3C;link rel=\"stylesheet\" href=\"./assets/style.css\">'\n  echo ' &#x3C;script async defer src=\"./assets/prism.js\">&#x3C;/script>'\n\n  echo \"  &#x3C;title> directory &#x3C;/title>\"\n    echo '&#x3C;link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/mdn-article.css\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/markdown-to-html-style.css\">'\n  echo \"\"\n  echo '&#x3C;style>'\n\n\necho '    a {'\necho '      color: black;'\necho '    }'\necho ''\necho '    li {'\necho '      border: 1px solid black !important;'\necho '      font-size: 20px;'\necho '      letter-spacing: 0px;'\necho '      font-weight: 700;'\necho '      line-height: 16px;'\necho '      text-decoration: none !important;'\necho '      text-transform: uppercase;'\necho '      background: #194ccdaf !important;'\necho '      color: black !important;'\necho '      border: none;'\necho '      cursor: pointer;'\necho '      justify-content: center;'\necho '      padding: 30px 60px;'\necho '      height: 48px;'\necho '      text-align: center;'\necho '      white-space: normal;'\necho '      border-radius: 10px;'\necho '      min-width: 45em;'\necho '      padding: 1.2em 1em 0;'\necho '      box-shadow: 0 0 5px;'\necho '      margin: 1em;'\necho '      display: grid;'\necho '      -webkit-border-radius: 10px;'\necho '      -moz-border-radius: 10px;'\necho '      -ms-border-radius: 10px;'\necho '      -o-border-radius: 10px;'\necho '    }'\necho '  &#x3C;/style>'\n  echo '&#x3C;/head>'\n\n  echo '&#x3C;body>'\n\n  echo \"\"\n\n  # continue with the HTML stuff\n\n  echo \"\"\n\n  echo \"\"\n\n  echo \"&#x3C;ul>\"\n\n  awk '{print \"&#x3C;li>&#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x26;nbsp;&#x3C;/a>&#x3C;/li>\"}' $listing\n\n  # awk '{print \"&#x3C;li>\"};\n\n  #     {print \" &#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x3C;/a>&#x3C;/li>&#x26;nbsp;\"}' \\ $listing\n\n  echo \"\"\n\n  echo \"&#x3C;/ul>\"\n\n  echo \"&#x3C;/body>\"\n\n  echo \"&#x3C;/html>\"\n\n}\n\ncmd $listing --sort=extension >>$html\n</code></pre>\n<hr>\n<h1>25. Index of Iframes</h1>\n<h3>Description: Creates an index.html file that contains all the files in the working directory or any of it's sub folders as iframes instead of anchor tags.</h3>\n<blockquote>\n<p>Notes: Useful Follow up Code:</p>\n</blockquote>\n<pre><code class=\"language-sh\"></code></pre>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/sh\n\n# find ./ | grep -i \"\\.*$\" >files\nfind ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i \"\\.*$\">files\nlisting=\"files\"\n\nout=\"\"\n\nhtml=\"index.html\"\nout=\"basename $out.html\"\nhtml=\"index.html\"\ncmd() {\n\n  echo '  &#x3C;!DOCTYPE html>'\n  echo '&#x3C;html>'\n  echo '&#x3C;head>'\n\n  echo '  &#x3C;meta http-equiv=\"Content-Type\" content=\"text/html\">'\n\n  echo '  &#x3C;meta name=\"Author\" content=\"Bryan Guner\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"./assets/prism.css\">'\n  echo ' &#x3C;link rel=\"stylesheet\" href=\"./assets/style.css\">'\n  echo ' &#x3C;script async defer src=\"./assets/prism.js\">&#x3C;/script>'\n\n  echo \"  &#x3C;title> directory &#x3C;/title>\"\n\n  echo \"\"\n  echo '&#x3C;style>'\n\n\necho '    a {'\necho '      color: black;'\necho '    }'\necho ''\necho '    li {'\necho '      border: 1px solid black !important;'\necho '      font-size: 20px;'\necho '      letter-spacing: 0px;'\necho '      font-weight: 700;'\necho '      line-height: 16px;'\necho '      text-decoration: none !important;'\necho '      text-transform: uppercase;'\necho '      background: #194ccdaf !important;'\necho '      color: black !important;'\necho '      border: none;'\necho '      cursor: pointer;'\necho '      justify-content: center;'\necho '      padding: 30px 60px;'\necho '      height: 48px;'\necho '      text-align: center;'\necho '      white-space: normal;'\necho '      border-radius: 10px;'\necho '      min-width: 45em;'\necho '      padding: 1.2em 1em 0;'\necho '      box-shadow: 0 0 5px;'\necho '      margin: 1em;'\necho '      display: grid;'\necho '      -webkit-border-radius: 10px;'\necho '      -moz-border-radius: 10px;'\necho '      -ms-border-radius: 10px;'\necho '      -o-border-radius: 10px;'\necho '    }'\necho '  &#x3C;/style>'\n  echo '&#x3C;/head>'\n\n  echo '&#x3C;body>'\n\n  echo \"\"\n\n  # continue with the HTML stuff\n\n  echo \"\"\n\n  echo \"\"\n\n  echo \"&#x3C;ul>\"\n\n  awk '{print \"&#x3C;iframe src=\\\"\"$1\"\\\">\",\"&#x3C;/iframe>\"}' $listing\n\n  # awk '{print \"&#x3C;li>\"};\n\n  #     {print \" &#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x3C;/a>&#x3C;/li>&#x26;nbsp;\"}' \\ $listing\n\n  echo \"\"\n\n  echo \"&#x3C;/ul>\"\n\n  echo \"&#x3C;/body>\"\n\n  echo \"&#x3C;/html>\"\n\n}\n\ncmd $listing --sort=extension >>$html\n</code></pre>\n<hr>\n<h1>26. Filter Corrupted Git Repo For Troublesome File:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD\n</code></pre>\n<hr>\n<h1>27. OVERWRITE LOCAL CHANGES:</h1>\n<h3>Description:</h3>\n<p>Important: If you have any local changes, they will be lost. With or without --hard option, any local commits that haven't been pushed will be lost.[*]\nIf you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected.</p>\n<blockquote>\n<p>Notes:\nFirst, run a fetch to update all origin/<branch> refs to latest:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git fetch --all\n# Backup your current branch:\n\ngit branch backup-master\n# Then, you have two options:\n\ngit reset --hard origin/master\n# OR If you are on some other branch:\n\ngit reset --hard origin/&#x3C;branch_name>\n# Explanation:\n# git fetch downloads the latest from remote without trying to merge or rebase anything.\n\n# Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master\ngit fetch --all\ngit reset --hard origin/master\n</code></pre>\n<hr>\n<h1>28. Remove Submodules:</h1>\n<h3>Description: To remove a submodule you need to:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<blockquote>\n<p>Delete the relevant section from the .gitmodules file.\nStage the .gitmodules changes git add .gitmodules\nDelete the relevant section from .git/config.\nRun git rm --cached path<em>to</em>submodule (no trailing slash).\nRun rm -rf .git/modules/path<em>to</em>submodule (no trailing slash).\nCommit git commit -m \"Removed submodule \"\nDelete the now untracked submodule files rm -rf path<em>to</em>submodule</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git submodule deinit\n</code></pre>\n<hr>\n<h1>29. GET GISTS</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo apt install wget\n\n\n\nwget -q -O - https://api.github.com/users/bgoonz/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n3 wget\n\n\nwget -q -O - https://api.github.com/users/amitness/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n3 wget\n\n\nwget -q -O - https://api.github.com/users/drodsou/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n1 wget\n\nwget -q -O - https://api.github.com/users/thomasmb/gists | grep raw_url | awk -F\\\" '{print $4}' | xargs -n1 wget\n</code></pre>\n<hr>\n<h1>30. Remove Remote OriginL</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git remote remove origin\n</code></pre>\n<hr>\n<h1>31. just clone .git folder:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git clone --bare --branch=master --single-branch https://github.com/bgoonz/My-Web-Dev-Archive.git\n</code></pre>\n<hr>\n<h1>32. Undo recent pull request:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">git reset --hard master@{\"10 minutes ago\"}\n</code></pre>\n<hr>\n<h1>33. Lebab</h1>\n<h3>Description: ES5 --> ES6</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"># Safe:\n\n lebab --replace ./ --transform arrow\n lebab --replace ./ --transform arrow-return\n lebab --replace ./ --transform for-of\n lebab --replace ./ --transform for-each\n lebab --replace ./ --transform arg-rest\n lebab --replace ./ --transform arg-spread\n lebab --replace ./ --transform obj-method\n lebab --replace ./ --transform obj-shorthand\n lebab --replace ./ --transform multi-var\n\n\n# ALL:\n\n\nlebab --replace ./ --transform obj-method\nlebab --replace ./ --transform class\nlebab --replace ./ --transform arrow\nlebab --replace ./ --transform let\nlebab --replace ./ --transform arg-spread\nlebab --replace ./ --transform arg-rest\nlebab --replace ./ --transform for-each\nlebab --replace ./ --transform for-of\nlebab --replace ./ --transform commonjs\nlebab --replace ./ --transform exponent\nlebab --replace ./ --transform multi-var\nlebab --replace ./ --transform template\nlebab --replace ./ --transform default-param\nlebab --replace ./ --transform  destruct-param\nlebab --replace ./ --transform includes\nlebab --replace ./ --transform obj-method\nlebab --replace ./ --transform class\nlebab --replace ./ --transform arrow\nlebab --replace ./ --transform arg-spread\nlebab --replace ./ --transform arg-rest\nlebab --replace ./ --transform for-each\nlebab --replace ./ --transform for-of\nlebab --replace ./ --transform commonjs\nlebab --replace ./ --transform exponent\nlebab --replace ./ --transform multi-var\nlebab --replace ./ --transform template\nlebab --replace ./ --transform default-param\nlebab --replace ./ --transform  destruct-param\nlebab --replace ./ --transform includes\n</code></pre>\n<hr>\n<h1>34. Troubleshoot Ubuntu Input/Output Error</h1>\n<h3>Description: Open Powershell as Administrator...</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-ps1\"> wsl.exe --shutdown\n\n Get-Service LxssManager | Restart-Service\n</code></pre>\n<hr>\n<h1>35. Export Medium as Markdown</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">npm i mediumexporter -g\n\n\nmediumexporter https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4 >ds.md\n</code></pre>\n<hr>\n<h1>36. Delete files in violation of a given size range (100MB for git)</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -size +75M -a -print -a -exec rm -f {} \\;\n\n\n\n\nfind . -size +98M -a -print -a -exec rm -f {} \\;\n</code></pre>\n<hr>\n<h1>37. download all links of given file type</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">wget -r -A.pdf https://overapi.com/git\n</code></pre>\n<hr>\n<h1>38. Kill all node processes</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">killall -s KILL node\n</code></pre>\n<hr>\n<h1>39. Remove string from file names recursively</h1>\n<h3>Description: In the example below I am using this command to remove the string \"-master\" from all file names in the working directory and all of it's sub directories.</h3>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find &#x3C;mydir> -type f -exec sed -i 's/&#x3C;string1>/&#x3C;string2>/g' {} +\n\n\n\n\nfind . -type f -exec rename 's/-master//g' {} +\n</code></pre>\n<blockquote>\n<p>Notes: The same could be done for folder names by changing the <em>-type f</em> flag (for file) to a <em>-type d</em> flag (for directory)</p>\n</blockquote>\n<pre><code class=\"language-sh\">find &#x3C;mydir> -type d -exec sed -i 's/&#x3C;string1>/&#x3C;string2>/g' {} +\n\n\n\n\nfind . -type d -exec rename 's/-master//g' {} +\n</code></pre>\n<hr>\n<h1>40. Remove spaces from file and folder names recursively</h1>\n<h3>Description: replaces spaces in file and folder names with an <code>_</code> underscore</h3>\n<blockquote>\n<p>Notes: need to run <code>sudo apt install rename</code> to use this command</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name \"* *\" -type d | rename 's/ /_/g'\nfind . -name \"* *\" -type f | rename 's/ /_/g'\n</code></pre>\n<hr>\n<h1>41. Zip Each subdirectories in a given directory into their own zip file</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">for i in */; do zip -r \"${i%/}.zip\" \"$i\"; done\n</code></pre>\n<hr>\n<h1>42.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>43.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>44.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>45.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>46.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>47.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>48.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>49.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>50.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>51.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>52.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>53.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>54.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>55.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>56.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>57.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>58.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>59.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>60.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>61.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>62.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>63.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>64.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>65.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>66.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>67.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>68.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>69.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>70.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>71.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>72.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>73.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>74.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>75.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>76.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>77.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>78.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>79.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>80.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>81.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>82.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>83.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>84.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>85.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>86.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>87.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>88.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>89.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>90.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"></code></pre>\n<hr>\n<h1>91. Unzip PowerShell</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-ps1\">PARAM (\n    [string] $ZipFilesPath = \"./\",\n    [string] $UnzipPath = \"./RESULT\"\n)\n\n$Shell = New-Object -com Shell.Application\n$Location = $Shell.NameSpace($UnzipPath)\n\n$ZipFiles = Get-Childitem $ZipFilesPath -Recurse -Include *.ZIP\n\n$progress = 1\nforeach ($ZipFile in $ZipFiles) {\n    Write-Progress -Activity \"Unzipping to $($UnzipPath)\" -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status \"File $($Progress) of $($ZipFiles.Count)\"\n    $ZipFolder = $Shell.NameSpace($ZipFile.fullname)\n\n\n    $Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes to the user - http://msdn.microsoft.com/en-us/library/bb787866%28VS.85%29.aspx\n    $progress++\n}\n</code></pre>\n<hr>\n<h1>92. return to bash from zsh</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\"> sudo apt --purge remove zsh\n</code></pre>\n<hr>\n<h1>93. Symbolic Link</h1>\n<h3>Description: to working directory</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">ln -s \"$(pwd)\" ~/NameOfLink\n\nln -s \"$(pwd)\" ~/Downloads\n</code></pre>\n<hr>\n<h1>94. auto generate readme</h1>\n<h3>Description: rename existing readme to blueprint.md</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">npx @appnest/readme generate\n</code></pre>\n<hr>\n<h1>95. Log into postgres:</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">sudo -u postgres psql\n</code></pre>\n<hr>\n<h1>96. URL To Subscribe To YouTube Channel</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-txt\">https://www.youtube.com/channel/UC1HDa0wWnIKUf-b4yY9JecQ?sub_confirmation=1\n</code></pre>\n<hr>\n<h1>97. Embed Repl.it In Medium Post:</h1>\n<h6>code:</h6>\n<pre><code class=\"language-txt\">https://repl.it/@bgoonz/Data-Structures-Algos-Codebase?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n\n\nhttps://repl.it/@bgoonz/node-db1-project?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n\nhttps://repl.it/@bgoonz/interview-prac?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n\n\nhttps://repl.it/@bgoonz/Database-Prac?lite=true&#x26;amp;referrer=https%3A%2F%2Fbryanguner.medium.com\n</code></pre>\n<hr>\n<h1>98.</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">find . -name *right.html  -type f -exec sed -i 's/target=\"_parent\"//g' {} +\n\n\nfind . -name *right.html  -type f -exec sed -i 's/target=\"_parent\"//g' {} +\n</code></pre>\n<hr>\n<h1>99. Cheat Sheet</h1>\n<h3>Description:</h3>\n<blockquote>\n<p>Notes:</p>\n</blockquote>\n<h6>code:</h6>\n<pre><code class=\"language-sh\">#!/bin/bash\n##############################################################################\n# SHORTCUTS and HISTORY\n##############################################################################\n\nCTRL+A  # move to beginning of line\nCTRL+B  # moves backward one character\nCTRL+C  # halts the current command\nCTRL+D  # deletes one character backward or logs out of current session, similar to exit\nCTRL+E  # moves to end of line\nCTRL+F  # moves forward one character\nCTRL+G  # aborts the current editing command and ring the terminal bell\nCTRL+H  # deletes one character under cursor (same as DELETE)\nCTRL+J  # same as RETURN\nCTRL+K  # deletes (kill) forward to end of line\nCTRL+L  # clears screen and redisplay the line\nCTRL+M  # same as RETURN\nCTRL+N  # next line in command history\nCTRL+O  # same as RETURN, then displays next line in history file\nCTRL+P  # previous line in command history\nCTRL+Q  # resumes suspended shell output\nCTRL+R  # searches backward\nCTRL+S  # searches forward or suspends shell output\nCTRL+T  # transposes two characters\nCTRL+U  # kills backward from point to the beginning of line\nCTRL+V  # makes the next character typed verbatim\nCTRL+W  # kills the word behind the cursor\nCTRL+X  # lists the possible filename completions of the current word\nCTRL+Y  # retrieves (yank) last item killed\nCTRL+Z  # stops the current command, resume with fg in the foreground or bg in the background\n\nALT+B   # moves backward one word\nALT+D   # deletes next word\nALT+F   # moves forward one word\nALT+H   # deletes one character backward\nALT+T   # transposes two words\nALT+.   # pastes last word from the last command. Pressing it repeatedly traverses through command history.\nALT+U   # capitalizes every character from the current cursor position to the end of the word\nALT+L   # uncapitalizes every character from the current cursor position to the end of the word\nALT+C   # capitalizes the letter under the cursor. The cursor then moves to the end of the word.\nALT+R   # reverts any changes to a command you've pulled from your history if you've edited it.\nALT+?   # list possible completions to what is typed\nALT+^   # expand line to most recent match from history\n\nCTRL+X then (   # start recording a keyboard macro\nCTRL+X then )   # finish recording keyboard macro\nCTRL+X then E   # recall last recorded keyboard macro\nCTRL+X then CTRL+E   # invoke text editor (specified by $EDITOR) on current command line then execute resultes as shell commands\n\nBACKSPACE  # deletes one character backward\nDELETE     # deletes one character under cursor\n\nhistory   # shows command line history\n!!        # repeats the last command\n!&#x3C;n>      # refers to command line 'n'\n!&#x3C;string> # refers to command starting with 'string'\n\nexit      # logs out of current session\n\n\n##############################################################################\n# BASH BASICS\n##############################################################################\n\nenv                 # displays all environment variables\n\necho $SHELL         # displays the shell you're using\necho $BASH_VERSION  # displays bash version\n\nbash                # if you want to use bash (type exit to go back to your previously opened shell)\nwhereis bash        # locates the binary, source and manual-page for a command\nwhich bash          # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments)\n\nclear               # clears content on window (hide displayed lines)\n\n\n##############################################################################\n# FILE COMMANDS\n##############################################################################\n\n\nls                            # lists your files in current directory, ls &#x3C;dir> to print files in a specific directory\nls -l                         # lists your files in 'long format', which contains the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified\nls -a                         # lists all files in 'long format', including hidden files (name beginning with '.')\nln -s &#x3C;filename> &#x3C;link>       # creates symbolic link to file\nreadlink &#x3C;filename>           # shows where a symbolic links points to\ntree                          # show directories and subdirectories in easilly readable file tree\nmc                            # terminal file explorer (alternative to ncdu)\ntouch &#x3C;filename>              # creates or updates (edit) your file\nmktemp -t &#x3C;filename>            # make a temp file in /tmp/ which is deleted at next boot (-d to make directory)\ncat &#x3C;filename>                # prints file raw content (will not be interpreted)\nany_command > &#x3C;filename>      # '>' is used to perform redirections, it will set any_command's stdout to file instead of \"real stdout\" (generally /dev/stdout)\nmore &#x3C;filename>               # shows the first part of a file (move with space and type q to quit)\nhead &#x3C;filename>               # outputs the first lines of file (default: 10 lines)\ntail &#x3C;filename>               # outputs the last lines of file (useful with -f option) (default: 10 lines)\nvim &#x3C;filename>                # opens a file in VIM (VI iMproved) text editor, will create it if it doesn't exist\nmv &#x3C;filename1> &#x3C;dest>         # moves a file to destination, behavior will change based on 'dest' type (dir: file is placed into dir; file: file will replace dest (tip: useful for renaming))\ncp &#x3C;filename1> &#x3C;dest>         # copies a file\nrm &#x3C;filename>                 # removes a file\nfind . -name &#x3C;name> &#x3C;type>    # searches for a file or a directory in the current directory and all its sub-directories by its name\ndiff &#x3C;filename1> &#x3C;filename2>  # compares files, and shows where they differ\nwc &#x3C;filename>                 # tells you how many lines, words and characters there are in a file. Use -lwc (lines, word, character) to ouput only 1 of those informations\nsort &#x3C;filename>               # sorts the contents of a text file line by line in alphabetical order, use -n for numeric sort and -r for reversing order.\nsort -t -k &#x3C;filename>         # sorts the contents on specific sort key field starting from 1, using the field separator t.\nrev                           # reverse string characters (hello becomes olleh)\nchmod -options &#x3C;filename>     # lets you change the read, write, and execute permissions on your files (more infos: SUID, GUID)\ngzip &#x3C;filename>               # compresses files using gzip algorithm\ngunzip &#x3C;filename>             # uncompresses files compressed by gzip\ngzcat &#x3C;filename>              # lets you look at gzipped file without actually having to gunzip it\nlpr &#x3C;filename>                # prints the file\nlpq                           # checks out the printer queue\nlprm &#x3C;jobnumber>              # removes something from the printer queue\ngenscript                     # converts plain text files into postscript for printing and gives you some options for formatting\ndvips &#x3C;filename>              # prints .dvi files (i.e. files produced by LaTeX)\ngrep &#x3C;pattern> &#x3C;filenames>    # looks for the string in the files\ngrep -r &#x3C;pattern> &#x3C;dir>       # search recursively for pattern in directory\nhead -n file_name | tail +n   # Print nth line from file.\nhead -y lines.txt | tail +x   # want to display all the lines from x to y. This includes the xth and yth lines.\n\n\n##############################################################################\n# DIRECTORY COMMANDS\n##############################################################################\n\n\nmkdir &#x3C;dirname>               # makes a new directory\nrmdir &#x3C;dirname>               # remove an empty directory\nrmdir -rf &#x3C;dirname>           # remove a non-empty directory\nmv &#x3C;dir1> &#x3C;dir2>              # rename a directory from &#x3C;dir1> to &#x3C;dir2>\ncd                            # changes to home\ncd ..                         # changes to the parent directory\ncd &#x3C;dirname>                  # changes directory\ncp -r &#x3C;dir1> &#x3C;dir2>           # copy &#x3C;dir1> into &#x3C;dir2> including sub-directories\npwd                           # tells you where you currently are\ncd ~                          # changes to home.\ncd -                          # changes to previous working directory\n\n##############################################################################\n# SSH, SYSTEM INFO &#x26; NETWORK COMMANDS\n##############################################################################\n\n\nssh user@host            # connects to host as user\nssh -p &#x3C;port> user@host  # connects to host on specified port as user\nssh-copy-id user@host    # adds your ssh key to host for user to enable a keyed or passwordless login\n\nwhoami                   # returns your username\npasswd                   # lets you change your password\nquota -v                 # shows what your disk quota is\ndate                     # shows the current date and time\ncal                      # shows the month's calendar\nuptime                   # shows current uptime\nw                        # displays whois online\nfinger &#x3C;user>            # displays information about user\nuname -a                 # shows kernel information\nman &#x3C;command>            # shows the manual for specified command\ndf                       # shows disk usage\ndu &#x3C;filename>            # shows the disk usage of the files and directories in filename (du -s give only a total)\nlast &#x3C;yourUsername>      # lists your last logins\nps -u yourusername       # lists your processes\nkill &#x3C;PID>               # kills the processes with the ID you gave\nkillall &#x3C;processname>    # kill all processes with the name\ntop                      # displays your currently active processes\nlsof                     # lists open files\nbg                       # lists stopped or background jobs ; resume a stopped job in the background\nfg                       # brings the most recent job in the foreground\nfg &#x3C;job>                 # brings job to the foreground\n\nping &#x3C;host>              # pings host and outputs results\nwhois &#x3C;domain>           # gets whois information for domain\ndig &#x3C;domain>             # gets DNS information for domain\ndig -x &#x3C;host>            # reverses lookup host\nwget &#x3C;file>              # downloads file\n\ntime &#x3C;command>             # report time consumed by command execution\n\n\n##############################################################################\n# VARIABLES\n##############################################################################\n\n\nvarname=value                # defines a variable\nvarname=value command        # defines a variable to be in the environment of a particular subprocess\necho $varname                # checks a variable's value\necho $$                      # prints process ID of the current shell\necho $!                      # prints process ID of the most recently invoked background job\necho $?                      # displays the exit status of the last command\nread &#x3C;varname>               # reads a string from the input and assigns it to a variable\nread -p \"prompt\" &#x3C;varname>   # same as above but outputs a prompt to ask user for value\ncolumn -t &#x3C;filename>         # display info in pretty columns (often used with pipe)\nlet &#x3C;varname> = &#x3C;equation>   # performs mathematical calculation using operators like +, -, *, /, %\nexport VARNAME=value         # defines an environment variable (will be available in subprocesses)\n\narray[0]=valA                # how to define an array\narray[1]=valB\narray[2]=valC\narray=([2]=valC [0]=valA [1]=valB)  # another way\narray=(valA valB valC)              # and another\n\n${array[i]}                  # displays array's value for this index. If no index is supplied, array element 0 is assumed\n${#array[i]}                 # to find out the length of any element in the array\n${#array[@]}                 # to find out how many values there are in the array\n\ndeclare -a                   # the variables are treated as arrays\ndeclare -f                   # uses function names only\ndeclare -F                   # displays function names without definitions\ndeclare -i                   # the variables are treated as integers\ndeclare -r                   # makes the variables read-only\ndeclare -x                   # marks the variables for export via the environment\n\n${varname:-word}             # if varname exists and isn't null, return its value; otherwise return word\n${varname:word}              # if varname exists and isn't null, return its value; otherwise return word\n${varname:=word}             # if varname exists and isn't null, return its value; otherwise set it word and then return its value\n${varname:?message}          # if varname exists and isn't null, return its value; otherwise print varname, followed by message and abort the current command or script\n${varname:+word}             # if varname exists and isn't null, return word; otherwise return null\n${varname:offset:length}     # performs substring expansion. It returns the substring of $varname starting at offset and up to length characters\n\n${variable#pattern}          # if the pattern matches the beginning of the variable's value, delete the shortest part that matches and return the rest\n${variable##pattern}         # if the pattern matches the beginning of the variable's value, delete the longest part that matches and return the rest\n${variable%pattern}          # if the pattern matches the end of the variable's value, delete the shortest part that matches and return the rest\n${variable%%pattern}         # if the pattern matches the end of the variable's value, delete the longest part that matches and return the rest\n${variable/pattern/string}   # the longest match to pattern in variable is replaced by string. Only the first match is replaced\n${variable//pattern/string}  # the longest match to pattern in variable is replaced by string. All matches are replaced\n\n${#varname}                  # returns the length of the value of the variable as a character string\n\n*(patternlist)               # matches zero or more occurrences of the given patterns\n+(patternlist)               # matches one or more occurrences of the given patterns\n?(patternlist)               # matches zero or one occurrence of the given patterns\n@(patternlist)               # matches exactly one of the given patterns\n!(patternlist)               # matches anything except one of the given patterns\n\n$(UNIX command)              # command substitution: runs the command and returns standard output\n\n\n##############################################################################\n# FUNCTIONS\n##############################################################################\n\n\n# The function refers to passed arguments by position (as if they were positional parameters), that is, $1, $2, and so forth.\n# $@ is equal to \"$1\" \"$2\"... \"$N\", where N is the number of positional parameters. $# holds the number of positional parameters.\n\n\nfunction functname() {\n  shell commands\n}\n\nunset -f functname  # deletes a function definition\ndeclare -f          # displays all defined functions in your login session\n\n\n##############################################################################\n# FLOW CONTROLS\n##############################################################################\n\n\nstatement1 &#x26;&#x26; statement2  # and operator\nstatement1 || statement2  # or operator\n\n-a                        # and operator inside a test conditional expression\n-o                        # or operator inside a test conditional expression\n\n# STRINGS\n\nstr1 == str2               # str1 matches str2\nstr1 != str2               # str1 does not match str2\nstr1 &#x3C; str2                # str1 is less than str2 (alphabetically)\nstr1 > str2                # str1 is greater than str2 (alphabetically)\nstr1 \\> str2               # str1 is sorted after str2\nstr1 \\&#x3C; str2               # str1 is sorted before str2\n-n str1                    # str1 is not null (has length greater than 0)\n-z str1                    # str1 is null (has length 0)\n\n# FILES\n\n-a file                   # file exists or its compilation is successful\n-d file                   # file exists and is a directory\n-e file                   # file exists; same -a\n-f file                   # file exists and is a regular file (i.e., not a directory or other special type of file)\n-r file                   # you have read permission\n-s file                   # file exists and is not empty\n-w file                   # your have write permission\n-x file                   # you have execute permission on file, or directory search permission if it is a directory\n-N file                   # file was modified since it was last read\n-O file                   # you own file\n-G file                   # file's group ID matches yours (or one of yours, if you are in multiple groups)\nfile1 -nt file2           # file1 is newer than file2\nfile1 -ot file2           # file1 is older than file2\n\n# NUMBERS\n\n-lt                       # less than\n-le                       # less than or equal\n-eq                       # equal\n-ge                       # greater than or equal\n-gt                       # greater than\n-ne                       # not equal\n\nif condition\nthen\n  statements\n[elif condition\n  then statements...]\n[else\n  statements]\nfi\n\nfor x in {1..10}\ndo\n  statements\ndone\n\nfor name [in list]\ndo\n  statements that can use $name\ndone\n\nfor (( initialisation ; ending condition ; update ))\ndo\n  statements...\ndone\n\ncase expression in\n  pattern1 )\n    statements ;;\n  pattern2 )\n    statements ;;\nesac\n\nselect name [in list]\ndo\n  statements that can use $name\ndone\n\nwhile condition; do\n  statements\ndone\n\nuntil condition; do\n  statements\ndone\n\n##############################################################################\n# COMMAND-LINE PROCESSING CYCLE\n##############################################################################\n\n\n# The default order for command lookup is functions, followed by built-ins, with scripts and executables last.\n# There are three built-ins that you can use to override this order: `command`, `builtin` and `enable`.\n\ncommand  # removes alias and function lookup. Only built-ins and commands found in the search path are executed\nbuiltin  # looks up only built-in commands, ignoring functions and commands found in PATH\nenable   # enables and disables shell built-ins\n\neval     # takes arguments and run them through the command-line processing steps all over again\n\n\n##############################################################################\n# INPUT/OUTPUT REDIRECTORS\n##############################################################################\n\n\ncmd1|cmd2  # pipe; takes standard output of cmd1 as standard input to cmd2\n&#x3C; file     # takes standard input from file\n> file     # directs standard output to file\n>> file    # directs standard output to file; append to file if it already exists\n>|file     # forces standard output to file even if noclobber is set\nn>|file    # forces output to file from file descriptor n even if noclobber is set\n&#x3C;> file    # uses file as both standard input and standard output\nn&#x3C;>file    # uses file as both input and output for file descriptor n\nn>file     # directs file descriptor n to file\nn&#x3C;file     # takes file descriptor n from file\nn>>file    # directs file description n to file; append to file if it already exists\nn>&#x26;        # duplicates standard output to file descriptor n\nn&#x3C;&#x26;        # duplicates standard input from file descriptor n\nn>&#x26;m       # file descriptor n is made to be a copy of the output file descriptor\nn&#x3C;&#x26;m       # file descriptor n is made to be a copy of the input file descriptor\n&#x26;>file     # directs standard output and standard error to file\n&#x3C;&#x26;-        # closes the standard input\n>&#x26;-        # closes the standard output\nn>&#x26;-       # closes the ouput from file descriptor n\nn&#x3C;&#x26;-       # closes the input from file descripor n\n\n|tee &#x3C;file># output command to both terminal and a file (-a to append to file)\n\n\n##############################################################################\n# PROCESS HANDLING\n##############################################################################\n\n\n# To suspend a job, type CTRL+Z while it is running. You can also suspend a job with CTRL+Y.\n# This is slightly different from CTRL+Z in that the process is only stopped when it attempts to read input from terminal.\n# Of course, to interrupt a job, type CTRL+C.\n\nmyCommand &#x26;  # runs job in the background and prompts back the shell\n\njobs         # lists all jobs (use with -l to see associated PID)\n\nfg           # brings a background job into the foreground\nfg %+        # brings most recently invoked background job\nfg %-        # brings second most recently invoked background job\nfg %N        # brings job number N\nfg %string   # brings job whose command begins with string\nfg %?string  # brings job whose command contains string\n\nkill -l               # returns a list of all signals on the system, by name and number\nkill PID              # terminates process with specified PID\nkill -s SIGKILL 4500  # sends a signal to force or terminate the process\nkill -15 913          # Ending PID 913 process with signal 15 (TERM)\nkill %1               # Where %1 is the number of job as read from 'jobs' command.\n\nps           # prints a line of information about the current running login shell and any processes running under it\nps -a        # selects all processes with a tty except session leaders\n\ntrap cmd sig1 sig2  # executes a command when a signal is received by the script\ntrap \"\" sig1 sig2   # ignores that signals\ntrap - sig1 sig2    # resets the action taken when the signal is received to the default\n\ndisown &#x3C;PID|JID>    # removes the process from the list of jobs\n\nwait                # waits until all background jobs have finished\nsleep &#x3C;number>      # wait # of seconds before continuing\n\npv                  # display progress bar for data handling commands. often used with pipe like |pv\nyes                 # give yes response everytime an input is requested from script/process\n\n\n##############################################################################\n# TIPS &#x26; TRICKS\n##############################################################################\n\n\n# set an alias\ncd; nano .bash_profile\n> alias gentlenode='ssh admin@gentlenode.com -p 3404'  # add your alias in .bash_profile\n\n# to quickly go to a specific directory\ncd; nano .bashrc\n> shopt -s cdable_vars\n> export websites=\"/Users/mac/Documents/websites\"\n\nsource .bashrc\ncd $websites\n\n\n##############################################################################\n# DEBUGGING SHELL PROGRAMS\n##############################################################################\n\n\nbash -n scriptname  # don't run commands; check for syntax errors only\nset -o noexec       # alternative (set option in script)\n\nbash -v scriptname  # echo commands before running them\nset -o verbose      # alternative (set option in script)\n\nbash -x scriptname  # echo commands after command-line processing\nset -o xtrace       # alternative (set option in script)\n\ntrap 'echo $varname' EXIT  # useful when you want to print out the values of variables at the point that your script exits\n\nfunction errtrap {\n  es=$?\n  echo \"ERROR line $1: Command exited with status $es.\"\n}\n\ntrap 'errtrap $LINENO' ERR  # is run whenever a command in the surrounding script or function exits with non-zero status\n\nfunction dbgtrap {\n  echo \"badvar is $badvar\"\n}\n\ntrap dbgtrap DEBUG  # causes the trap code to be executed before every statement in a function or script\n# ...section of code in which the problem occurs...\ntrap - DEBUG  # turn off the DEBUG trap\n\nfunction returntrap {\n  echo \"A return occurred\"\n}\n\ntrap returntrap RETURN  # is executed each time a shell function or a script executed with the . or source commands finishes executing\n\n##############################################################################\n# COLORS AND BACKGROUNDS\n##############################################################################\n# note: \\e or \\x1B also work instead of \\033\n# Reset\nColor_Off='\\033[0m' # Text Reset\n\n# Regular Colors\nBlack='\\033[0;30m'  # Black\nRed='\\033[0;31m'    # Red\nGreen='\\033[0;32m'  # Green\nYellow='\\033[0;33m' # Yellow\nBlue='\\033[0;34m'   # Blue\nPurple='\\033[0;35m' # Purple\nCyan='\\033[0;36m'   # Cyan\nWhite='\\033[0;97m'  # White\n\n# Additional colors\nLGrey='\\033[0;37m'  # Ligth Gray\nDGrey='\\033[0;90m'  # Dark Gray\nLRed='\\033[0;91m'   # Ligth Red\nLGreen='\\033[0;92m' # Ligth Green\nLYellow='\\033[0;93m'# Ligth Yellow\nLBlue='\\033[0;94m'  # Ligth Blue\nLPurple='\\033[0;95m'# Light Purple\nLCyan='\\033[0;96m'  # Ligth Cyan\n\n\n# Bold\nBBlack='\\033[1;30m' # Black\nBRed='\\033[1;31m'   # Red\nBGreen='\\033[1;32m' # Green\nBYellow='\\033[1;33m'# Yellow\nBBlue='\\033[1;34m'  # Blue\nBPurple='\\033[1;35m'# Purple\nBCyan='\\033[1;36m'  # Cyan\nBWhite='\\033[1;37m' # White\n\n# Underline\nUBlack='\\033[4;30m' # Black\nURed='\\033[4;31m'   # Red\nUGreen='\\033[4;32m' # Green\nUYellow='\\033[4;33m'# Yellow\nUBlue='\\033[4;34m'  # Blue\nUPurple='\\033[4;35m'# Purple\nUCyan='\\033[4;36m'  # Cyan\nUWhite='\\033[4;37m' # White\n\n# Background\nOn_Black='\\033[40m' # Black\nOn_Red='\\033[41m'   # Red\nOn_Green='\\033[42m' # Green\nOn_Yellow='\\033[43m'# Yellow\nOn_Blue='\\033[44m'  # Blue\nOn_Purple='\\033[45m'# Purple\nOn_Cyan='\\033[46m'  # Cyan\nOn_White='\\033[47m' # White\n\n# Example of usage\necho -e \"${Green}This is GREEN text${Color_Off} and normal text\"\necho -e \"${Red}${On_White}This is Red test on White background${Color_Off}\"\n# option -e is mandatory, it enable interpretation of backslash escapes\nprintf \"${Red} This is red \\n\"\n</code></pre>\n<hr>"},{"url":"/docs/docs/node-docs-full/","relativePath":"docs/docs/node-docs-full.md","relativeDir":"docs/docs","base":"node-docs-full.md","name":"node-docs-full","frontmatter":{"title":"Node Docs","weight":0,"excerpt":"Node docs","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Cheat Sheet:</h2>\n<pre><code class=\"language-js\">/* *******************************************************************************************\n * SYNOPSIS\n * http://nodejs.org/api/synopsis.html\n * ******************************************************************************************* */\n\n\nvar http = require('http');\n\n// An example of a web server written with Node which responds with 'Hello World'.\n// To run the server, put the code into a file called example.js and execute it with the node program.\nhttp.createServer(function (request, response) {\n  response.writeHead(200, {'Content-Type': 'text/plain'});\n  response.end('Hello World\\n');\n}).listen(8124);\n\nconsole.log('Server running at http://127.0.0.1:8124/');\n\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS\n * http://nodejs.org/api/globals.html\n * ******************************************************************************************* */\n\n\n// In browsers, the top-level scope is the global scope.\n// That means that in browsers if you're in the global scope var something will define a global variable.\n// In Node this is different. The top-level scope is not the global scope; var something inside a Node module will be local to that module.\n\n__filename;  // The filename of the code being executed. (absolute path)\n__dirname;   // The name of the directory that the currently executing script resides in. (absolute path)\nmodule;      // A reference to the current module. In particular module.exports is used for defining what a module exports and makes available through require().\nexports;     // A reference to the module.exports that is shorter to type.\nprocess;     // The process object is a global object and can be accessed from anywhere. It is an instance of EventEmitter.\nBuffer;      // The Buffer class is a global type for dealing with binary data directly.\n\n\n/* *******************************************************************************************\n * CONSOLE\n * http://nodejs.org/api/console.html\n * ******************************************************************************************* */\n\n\nconsole.log([data], [...]);             // Prints to stdout with newline.\nconsole.info([data], [...]);            // Same as console.log.\nconsole.error([data], [...]);           // Same as console.log but prints to stderr.\nconsole.warn([data], [...]);            // Same as console.error.\nconsole.dir(obj);                       // Uses util.inspect on obj and prints resulting string to stdout.\nconsole.time(label);                    // Mark a time.\nconsole.timeEnd(label);                 // Finish timer, record output.\nconsole.trace(label);                   // Print a stack trace to stderr of the current position.\nconsole.assert(expression, [message]);  // Same as assert.ok() where if the expression evaluates as false throw an AssertionError with message.\n\n\n/* *******************************************************************************************\n * TIMERS\n * http://nodejs.org/api/timers.html\n * ******************************************************************************************* */\n\n\nsetTimeout(callback, delay, [arg], [...]);   // To schedule execution of a one-time callback after delay milliseconds. Optionally you can also pass arguments to the callback.\nclearTimeout(t);                             // Stop a timer that was previously created with setTimeout().\nsetInterval(callback, delay, [arg], [...]);  // To schedule the repeated execution of callback every delay milliseconds. Optionally you can also pass arguments to the callback.\nclearInterval(t);                            // Stop a timer that was previously created with setInterval().\nsetImmediate(callback, [arg], [...]);        // To schedule the \"immediate\" execution of callback after I/O events callbacks and before setTimeout and setInterval.\nclearImmediate(immediateObject);             // Stop a timer that was previously created with setImmediate().\n\nunref();  // Allow you to create a timer that is active but if it is the only item left in the event loop, node won't keep the program running.\nref();    // If you had previously unref()d a timer you can call ref() to explicitly request the timer hold the program open.\n\n\n/* *******************************************************************************************\n * MODULES\n * http://nodejs.org/api/modules.html\n * ******************************************************************************************* */\n\n\nvar module = require('./module.js');    // Loads the module module.js in the same directory.\nmodule.require('./another_module.js');  // load another_module as if require() was called from the module itself.\n\nmodule.id;        // The identifier for the module. Typically this is the fully resolved filename.\nmodule.filename;  // The fully resolved filename to the module.\nmodule.loaded;    // Whether or not the module is done loading, or is in the process of loading.\nmodule.parent;    // The module that required this one.\nmodule.children;  // The module objects required by this one.\n\nexports.area = function (r) {\n  return Math.PI * r * r;\n};\n\n// If you want the root of your module's export to be a function (such as a constructor)\n// or if you want to export a complete object in one assignment instead of building it one property at a time,\n// assign it to module.exports instead of exports.\nmodule.exports = function(width) {\n  return {\n    area: function() {\n      return width * width;\n    }\n  };\n}\n\n\n/* *******************************************************************************************\n * PROCESS\n * http://nodejs.org/api/process.html\n * ******************************************************************************************* */\n\n\nprocess.on('exit', function(code) {});              // Emitted when the process is about to exit\nprocess.on('uncaughtException', function(err) {});  // Emitted when an exception bubbles all the way back to the event loop. (should not be used)\n\nprocess.stdout;           // A writable stream to stdout.\nprocess.stderr;           // A writable stream to stderr.\nprocess.stdin;            // A readable stream for stdin.\n\nprocess.argv;             // An array containing the command line arguments.\nprocess.env;              // An object containing the user environment.\nprocess.execPath;         // This is the absolute pathname of the executable that started the process.\nprocess.execArgv;         // This is the set of node-specific command line options from the executable that started the process.\n\nprocess.arch;             // What processor architecture you're running on: 'arm', 'ia32', or 'x64'.\nprocess.config;           // An Object containing the JavaScript representation of the configure options that were used to compile the current node executable.\nprocess.pid;              // The PID of the process.\nprocess.platform;         // What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'.\nprocess.title;            // Getter/setter to set what is displayed in 'ps'.\nprocess.version;          // A compiled-in property that exposes NODE_VERSION.\nprocess.versions;         // A property exposing version strings of node and its dependencies.\n\nprocess.abort();          // This causes node to emit an abort. This will cause node to exit and generate a core file.\nprocess.chdir(dir);       // Changes the current working directory of the process or throws an exception if that fails.\nprocess.cwd();            // Returns the current working directory of the process.\nprocess.exit([code]);     // Ends the process with the specified code. If omitted, exit uses the 'success' code 0.\nprocess.getgid();         // Gets the group identity of the process.\nprocess.setgid(id);       // Sets the group identity of the process.\nprocess.getuid();         // Gets the user identity of the process.\nprocess.setuid(id);       // Sets the user identity of the process.\nprocess.getgroups();      // Returns an array with the supplementary group IDs.\nprocess.setgroups(grps);  // Sets the supplementary group IDs.\n\nprocess.initgroups(user, extra_grp);  // Reads /etc/group and initializes the group access list, using all groups of which the user is a member.\nprocess.kill(pid, [signal]);          // Send a signal to a process. pid is the process id and signal is the string describing the signal to send.\nprocess.memoryUsage();                // Returns an object describing the memory usage of the Node process measured in bytes.\nprocess.nextTick(callback);           // On the next loop around the event loop call this callback.\nprocess.maxTickDepth;                 // Callbacks passed to process.nextTick will usually be called at the end of the current flow of execution, and are thus approximately as fast as calling a function synchronously.\nprocess.umask([mask]);                // Sets or reads the process's file mode creation mask.\nprocess.uptime();                     // Number of seconds Node has been running.\nprocess.hrtime();                     // Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array.\n\n\n/* *******************************************************************************************\n * CHILD PROCESS\n * http://nodejs.org/api/child_process.html\n * ******************************************************************************************* */\n\n\n// Node provides a tri-directional popen facility through the child_process module.\n// It is possible to stream data through a child's stdin, stdout, and stderr in a fully non-blocking way.\n\nChildProcess;                                                 // Class. ChildProcess is an EventEmitter.\n\nchild.stdin;                                                  // A Writable Stream that represents the child process's stdin\nchild.stdout;                                                 // A Readable Stream that represents the child process's stdout\nchild.stderr;                                                 // A Readable Stream that represents the child process's stderr.\nchild.pid;                                                    // The PID of the child process\nchild.connected;                                              // If .connected is false, it is no longer possible to send messages\nchild.kill([signal]);                                         // Send a signal to the child process\nchild.send(message, [sendHandle]);                            // When using child_process.fork() you can write to the child using child.send(message, [sendHandle]) and messages are received by a 'message' event on the child.\nchild.disconnect();                                           // Close the IPC channel between parent and child, allowing the child to exit gracefully once there are no other connections keeping it alive.\nchild_process.spawn(command, [args], [options]);              // Launches a new process with the given command, with command line arguments in args. If omitted, args defaults to an empty Array.\nchild_process.exec(command, [options], callback);             // Runs a command in a shell and buffers the output.\nchild_process.execFile(file, [args], [options], [callback]);  // Runs a command in a shell and buffers the output.\nchild_process.fork(modulePath, [args], [options]);            // This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in. \n\n\n/* *******************************************************************************************\n * UTIL\n * http://nodejs.org/api/util.html\n * ******************************************************************************************* */\n\n\n// These functions are in the module 'util'. Use require('util') to access them.\n\nutil.format(format, [...]);    // Returns a formatted string using the first argument as a printf-like format. (%s, %d, %j)\nutil.debug(string);            // A synchronous output function. Will block the process and output string immediately to stderr.\nutil.error([...]);             // Same as util.debug() except this will output all arguments immediately to stderr.\nutil.puts([...]);              // A synchronous output function. Will block the process and output all arguments to stdout with newlines after each argument.\nutil.print([...]);             // A synchronous output function. Will block the process, cast each argument to a string then output to stdout. (no newlines)\nutil.log(string);              // Output with timestamp on stdout.\nutil.inspect(object, [opts]);  // Return a string representation of object, which is useful for debugging. (options: showHidden, depth, colors, customInspect)\nutil.isArray(object);          // Returns true if the given \"object\" is an Array. false otherwise.\nutil.isRegExp(object);         // Returns true if the given \"object\" is a RegExp. false otherwise.\nutil.isDate(object);           // Returns true if the given \"object\" is a Date. false otherwise.\nutil.isError(object);          // Returns true if the given \"object\" is an Error. false otherwise.\nutil.promisify(fn)             // Takes a function whose last argument is a callback and returns a version that returns promises.\n\nutil.inherits(constructor, superConstructor);  // Inherit the prototype methods from one constructor into another.\n\n\n/* *******************************************************************************************\n * EVENTS\n * http://nodejs.org/api/events.html\n * ******************************************************************************************* */\n\n\n// All objects which emit events are instances of events.EventEmitter. You can access this module by doing: require(\"events\");\n// To access the EventEmitter class, require('events').EventEmitter.\n// All EventEmitters emit the event 'newListener' when new listeners are added and 'removeListener' when a listener is removed.\n\nemitter.addListener(event, listener);        // Adds a listener to the end of the listeners array for the specified event.\nemitter.on(event, listener);                 // Same as emitter.addListener().\nemitter.once(event, listener);               // Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.\nemitter.removeListener(event, listener);     // Remove a listener from the listener array for the specified event.\nemitter.removeAllListeners([event]);         // Removes all listeners, or those of the specified event.\nemitter.setMaxListeners(n);                  // By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.\nemitter.listeners(event);                    // Returns an array of listeners for the specified event.\nemitter.emit(event, [arg1], [arg2], [...]);  // Execute each of the listeners in order with the supplied arguments. Returns true if event had listeners, false otherwise.\n\nEventEmitter.listenerCount(emitter, event);  // Return the number of listeners for a given event.\n\n\n/* *******************************************************************************************\n * STREAM\n * http://nodejs.org/api/stream.html\n * ******************************************************************************************* */\n\n\n// A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout.\n// Streams are readable, writable, or both. All streams are instances of EventEmitter.\n\n// The Readable stream interface is the abstraction for a source of data that you are reading from.\n// In other words, data comes out of a Readable stream.\n// A Readable stream will not start emitting data until you indicate that you are ready to receive it.\n// Examples of readable streams include: http responses on the client, http requests on the server, fs read streams\n// zlib streams, crypto streams, tcp sockets, child process stdout and stderr, process.stdin.\n\nvar readable = getReadableStreamSomehow();\n\nreadable.on('readable', function() {});   // When a chunk of data can be read from the stream, it will emit a 'readable' event.\nreadable.on('data', function(chunk) {});  // If you attach a data event listener, then it will switch the stream into flowing mode, and data will be passed to your handler as soon as it is available.\nreadable.on('end', function() {});        // This event fires when there will be no more data to read.\nreadable.on('close', function() {});      // Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this.\nreadable.on('error', function() {});      // Emitted if there was an error receiving data.\n\n// The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.\n// This method should only be called in non-flowing mode. In flowing-mode, this method is called automatically until the internal buffer is drained.\nreadable.read([size]);\n\nreadable.setEncoding(encoding);           // Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.\nreadable.resume();                        // This method will cause the readable stream to resume emitting data events.\nreadable.pause();                         // This method will cause a stream in flowing-mode to stop emitting data events.\nreadable.pipe(destination, [options]);    // This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.\nreadable.unpipe([destination]);           // This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed.\nreadable.unshift(chunk);                  // This is useful in certain cases where a stream is being consumed by a parser, which needs to \"un-consume\" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.\n\n\n// The Writable stream interface is an abstraction for a destination that you are writing data to.\n// Examples of writable streams include: http requests on the client, http responses on the server, fs write streams,\n// zlib streams, crypto streams, tcp sockets, child process stdin, process.stdout, process.stderr.\n\nvar writer = getWritableStreamSomehow();\n\nwritable.write(chunk, [encoding], [callback]);  // This method writes some data to the underlying system, and calls the supplied callback once the data has been fully handled.\nwriter.once('drain', write);                    // If a writable.write(chunk) call returns false, then the drain event will indicate when it is appropriate to begin writing more data to the stream.\n\nwritable.end([chunk], [encoding], [callback]);  // Call this method when no more data will be written to the stream.\nwriter.on('finish', function() {});             // When the end() method has been called, and all data has been flushed to the underlying system, this event is emitted.\nwriter.on('pipe', function(src) {});            // This is emitted whenever the pipe() method is called on a readable stream, adding this writable to its set of destinations.\nwriter.on('unpipe', function(src) {});          // This is emitted whenever the unpipe() method is called on a readable stream, removing this writable from its set of destinations.\nwriter.on('error', function(src) {});           // Emitted if there was an error when writing or piping data.\n\n\n// Duplex streams are streams that implement both the Readable and Writable interfaces. See above for usage.\n// Examples of Duplex streams include: tcp sockets, zlib streams, crypto streams.\n\n// Transform streams are Duplex streams where the output is in some way computed from the input. They implement both the Readable and Writable interfaces. See above for usage.\n// Examples of Transform streams include: zlib streams, crypto streams.\n\n\n/* *******************************************************************************************\n * FILE SYSTEM\n * http://nodejs.org/api/fs.html\n * ******************************************************************************************* */\n\n\n// To use this module do require('fs').\n// All the methods have asynchronous and synchronous forms.\n\nfs.rename(oldPath, newPath, callback);  // Asynchronous rename. No arguments other than a possible exception are given to the completion callback.Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.\nfs.renameSync(oldPath, newPath);        // Synchronous rename.\n\nfs.ftruncate(fd, len, callback);        // Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.\nfs.ftruncateSync(fd, len);              // Synchronous ftruncate.\nfs.truncate(path, len, callback);       // Asynchronous truncate. No arguments other than a possible exception are given to the completion callback.\nfs.truncateSync(path, len);             // Synchronous truncate.\n\nfs.chown(path, uid, gid, callback);     // Asynchronous chown. No arguments other than a possible exception are given to the completion callback.\nfs.chownSync(path, uid, gid);           // Synchronous chown.\nfs.fchown(fd, uid, gid, callback);      // Asynchronous fchown. No arguments other than a possible exception are given to the completion callback.\nfs.fchownSync(fd, uid, gid);            // Synchronous fchown.\nfs.lchown(path, uid, gid, callback);    // Asynchronous lchown. No arguments other than a possible exception are given to the completion callback.\nfs.lchownSync(path, uid, gid);          // Synchronous lchown.\n\nfs.chmod(path, mode, callback);         // Asynchronous chmod. No arguments other than a possible exception are given to the completion callback.\nfs.chmodSync(path, mode);               // Synchronous chmod.\nfs.fchmod(fd, mode, callback);          // Asynchronous fchmod. No arguments other than a possible exception are given to the completion callback.\nfs.fchmodSync(fd, mode);                // Synchronous fchmod.\nfs.lchmod(path, mode, callback);        // Asynchronous lchmod. No arguments other than a possible exception are given to the completion callback.\nfs.lchmodSync(path, mode);              // Synchronous lchmod.\n\nfs.stat(path, callback);                // Asynchronous stat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. \nfs.statSync(path);                      // Synchronous stat. Returns an instance of fs.Stats.\nfs.lstat(path, callback);               // Asynchronous lstat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to.\nfs.lstatSync(path);                     // Synchronous lstat. Returns an instance of fs.Stats.\nfs.fstat(fd, callback);                 // Asynchronous fstat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd.\nfs.fstatSync(fd);                       // Synchronous fstat. Returns an instance of fs.Stats.\n\nfs.link(srcpath, dstpath, callback);             // Asynchronous link. No arguments other than a possible exception are given to the completion callback.\nfs.linkSync(srcpath, dstpath);                   // Synchronous link.\nfs.symlink(srcpath, dstpath, [type], callback);  // Asynchronous symlink. No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms)\nfs.symlinkSync(srcpath, dstpath, [type]);        // Synchronous symlink.\nfs.readlink(path, callback);                     // Asynchronous readlink. The callback gets two arguments (err, linkString).\nfs.readlinkSync(path);                           // Synchronous readlink. Returns the symbolic link's string value.\nfs.unlink(path, callback);                       // Asynchronous unlink. No arguments other than a possible exception are given to the completion callback.\nfs.unlinkSync(path);                             // Synchronous unlink.\n\nfs.realpath(path, [cache], callback);     // Asynchronous realpath. The callback gets two arguments (err, resolvedPath).\nfs.realpathSync(path, [cache]);           // Synchronous realpath. Returns the resolved path.\n\nfs.rmdir(path, callback);                 // Asynchronous rmdir. No arguments other than a possible exception are given to the completion callback.\nfs.rmdirSync(path);                       // Synchronous rmdir.\nfs.mkdir(path, [mode], callback);         // Asynchronous mkdir. No arguments other than a possible exception are given to the completion callback. mode defaults to 0777.\nfs.mkdirSync(path, [mode]);               // Synchronous mkdir.\nfs.readdir(path, callback);               // Asynchronous readdir. Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.\nfs.readdirSync(path);                     // Synchronous readdir. Returns an array of filenames excluding '.' and '..'.\nfs.close(fd, callback);                   // Asynchronous close. No arguments other than a possible exception are given to the completion callback.\nfs.closeSync(fd);                         // Synchronous close.\nfs.open(path, flags, [mode], callback);   // Asynchronous file open.\nfs.openSync(path, flags, [mode]);         // Synchronous version of fs.open().\nfs.utimes(path, atime, mtime, callback);  // Change file timestamps of the file referenced by the supplied path.\nfs.utimesSync(path, atime, mtime);        // Synchronous version of fs.utimes().\nfs.futimes(fd, atime, mtime, callback);   // Change the file timestamps of a file referenced by the supplied file descriptor.\nfs.futimesSync(fd, atime, mtime);         // Synchronous version of fs.futimes().\nfs.fsync(fd, callback);                   // Asynchronous fsync. No arguments other than a possible exception are given to the completion callback.\nfs.fsyncSync(fd);                         // Synchronous fsync.\n\nfs.write(fd, buffer, offset, length, position, callback);  // Write buffer to the file specified by fd.\nfs.writeSync(fd, buffer, offset, length, position);        // Synchronous version of fs.write(). Returns the number of bytes written.\nfs.read(fd, buffer, offset, length, position, callback);   // Read data from the file specified by fd.\nfs.readSync(fd, buffer, offset, length, position);         // Synchronous version of fs.read. Returns the number of bytesRead.\nfs.readFile(filename, [options], callback);                // Asynchronously reads the entire contents of a file.\nfs.readFileSync(filename, [options]);                      // Synchronous version of fs.readFile. Returns the contents of the filename. If the encoding option is specified then this function returns a string. Otherwise it returns a buffer.\n\nfs.writeFile(filename, data, [options], callback);   // Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer.\nfs.writeFileSync(filename, data, [options]);         // The synchronous version of fs.writeFile.\nfs.appendFile(filename, data, [options], callback);  // Asynchronously append data to a file, creating the file if it not yet exists. data can be a string or a buffer.\nfs.appendFileSync(filename, data, [options]);        // The synchronous version of fs.appendFile.\nfs.watch(filename, [options], [listener]);           // Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher. The listener callback gets two arguments (event, filename). event is either 'rename' or 'change', and filename is the name of the file which triggered the event.\nfs.exists(path, callback);                           // Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false. (should not be used)\nfs.existsSync(path);                                 // Synchronous version of fs.exists. (should not be used)\n\n// fs.Stats: objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type.\nstats.isFile();\nstats.isDirectory()\nstats.isBlockDevice()\nstats.isCharacterDevice()\nstats.isSymbolicLink()  // (only valid with fs.lstat())\nstats.isFIFO()\nstats.isSocket()\n\nfs.createReadStream(path, [options]);   // Returns a new ReadStream object.\nfs.createWriteStream(path, [options]);  // Returns a new WriteStream object.\n\n\n/* *******************************************************************************************\n * PATH\n * http://nodejs.org/api/fs.html\n * ******************************************************************************************* */\n\n\n// Use require('path') to use this module.\n// This module contains utilities for handling and transforming file paths.\n// Almost all these methods perform only string transformations.\n// The file system is not consulted to check whether paths are valid.\n\npath.normalize(p);                    // Normalize a string path, taking care of '..' and '.' parts.\npath.join([path1], [path2], [...]);   // Join all arguments together and normalize the resulting path.\npath.resolve([from ...], to);         // Resolves 'to' to an absolute path.\npath.relative(from, to);              // Solve the relative path from 'from' to 'to'.\npath.dirname(p);                      // Return the directory name of a path. Similar to the Unix dirname command.\npath.basename(p, [ext]);              // Return the last portion of a path. Similar to the Unix basename command.\npath.extname(p);                      // Return the extension of the path, from the last '.' to end of string in the last portion of the path.\n\npath.sep;                             // The platform-specific file separator. '\\\\' or '/'.\npath.delimiter;                       // The platform-specific path delimiter, ';' or ':'.\n\n\n/* *******************************************************************************************\n * HTTP\n * http://nodejs.org/api/http.html\n * ******************************************************************************************* */\n\n\n// To use the HTTP server and client one must require('http').\n\nhttp.STATUS_CODES;                                             // A collection of all the standard HTTP response status codes, and the short description of each.\nhttp.request(options, [callback]);                             // This function allows one to transparently issue requests.\nhttp.get(options, [callback]);                                 // Set the method to GET and calls req.end() automatically.\n\nserver = http.createServer([requestListener]);                 // Returns a new web server object. The requestListener is a function which is automatically added to the 'request' event.\nserver.listen(port, [hostname], [backlog], [callback]);        // Begin accepting connections on the specified port and hostname.\nserver.listen(path, [callback]);                               // Start a UNIX socket server listening for connections on the given path.\nserver.listen(handle, [callback]);                             // The handle object can be set to either a server or socket (anything with an underlying _handle member), or a {fd: &#x3C;n>} object.\nserver.close([callback]);                                      // Stops the server from accepting new connections. \nserver.setTimeout(msecs, callback);                            // Sets the timeout value for sockets, and emits a 'timeout' event on the Server object, passing the socket as an argument, if a timeout occurs.\n\nserver.maxHeadersCount;  // Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied.\nserver.timeout;          // The number of milliseconds of inactivity before a socket is presumed to have timed out.\n\nserver.on('request', function (request, response) { });        // Emitted each time there is a request.\nserver.on('connection', function (socket) { });                // When a new TCP stream is established.\nserver.on('close', function () { });                           // Emitted when the server closes.\nserver.on('checkContinue', function (request, response) { });  // Emitted each time a request with an http Expect: 100-continue is received.\nserver.on('connect', function (request, socket, head) { });    // Emitted each time a client requests a http CONNECT method.\nserver.on('upgrade', function (request, socket, head) { });    // Emitted each time a client requests a http upgrade.\nserver.on('clientError', function (exception, socket) { });    // If a client connection emits an 'error' event - it will forwarded here.\n\nrequest.write(chunk, [encoding]);                              // Sends a chunk of the body.\nrequest.end([data], [encoding]);                               // Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream.\nrequest.abort();                                               // Aborts a request.\nrequest.setTimeout(timeout, [callback]);                       // Once a socket is assigned to this request and is connected socket.setTimeout() will be called.\nrequest.setNoDelay([noDelay]);                                 // Once a socket is assigned to this request and is connected socket.setNoDelay() will be called.\nrequest.setSocketKeepAlive([enable], [initialDelay]);          // Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called.\n\nrequest.on('response', function(response) { });                // Emitted when a response is received to this request. This event is emitted only once.\nrequest.on('socket', function(socket) { });                    // Emitted after a socket is assigned to this request.\nrequest.on('connect', function(response, socket, head) { });   // Emitted each time a server responds to a request with a CONNECT method. If this event isn't being listened for, clients receiving a CONNECT method will have their connections closed.\nrequest.on('upgrade', function(response, socket, head) { });   // Emitted each time a server responds to a request with an upgrade. If this event isn't being listened for, clients receiving an upgrade header will have their connections closed.\nrequest.on('continue', function() { });                        // Emitted when the server sends a '100 Continue' HTTP response, usually because the request contained 'Expect: 100-continue'. This is an instruction that the client should send the request body.\n\nresponse.write(chunk, [encoding]);                             // This sends a chunk of the response body. If this merthod is called and response.writeHead() has not been called, it will switch to implicit header mode and flush the implicit headers.\nresponse.writeContinue();                                      // Sends a HTTP/1.1 100 Continue message to the client, indicating that the request body should be sent.\nresponse.writeHead(statusCode, [reasonPhrase], [headers]);     // Sends a response header to the request.\nresponse.setTimeout(msecs, callback);                          // Sets the Socket's timeout value to msecs. If a callback is provided, then it is added as a listener on the 'timeout' event on the response object.\nresponse.setHeader(name, value);                               // Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name.\nresponse.getHeader(name);                                      // Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive.\nresponse.removeHeader(name);                                   // Removes a header that's queued for implicit sending.\nresponse.addTrailers(headers);                                 // This method adds HTTP trailing headers (a header but at the end of the message) to the response.\nresponse.end([data], [encoding]);                              // This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.\n\nresponse.statusCode;                                           // When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed.\nresponse.headersSent;                                          // Boolean (read-only). True if headers were sent, false otherwise.\nresponse.sendDate;                                             // When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true.\n\nresponse.on('close', function () { });  // Indicates that the underlying connection was terminated before response.end() was called or able to flush.\nresponse.on('finish', function() { });  // Emitted when the response has been sent. \n\nmessage.httpVersion;                    // In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server.\nmessage.headers;                        // The request/response headers object.\nmessage.trailers;                       // The request/response trailers object. Only populated after the 'end' event.\nmessage.method;                         // The request method as a string. Read only. Example: 'GET', 'DELETE'.\nmessage.url;                            // Request URL string. This contains only the URL that is present in the actual HTTP request.\nmessage.statusCode;                     // The 3-digit HTTP response status code. E.G. 404.\nmessage.socket;                         // The net.Socket object associated with the connection.\n\nmessage.setTimeout(msecs, callback);    // Calls message.connection.setTimeout(msecs, callback).\n\n\n/* *******************************************************************************************\n * URL\n * http://nodejs.org/api/url.html\n * ******************************************************************************************* */\n\n\n// This module has utilities for URL resolution and parsing. Call require('url') to use it.\n\nurl.parse(urlStr, [parseQueryString], [slashesDenoteHost]);  // Take a URL string, and return an object.\nurl.format(urlObj);                                          // Take a parsed URL object, and return a formatted URL string.\nurl.resolve(from, to);                                       // Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.\n\n\n/* *******************************************************************************************\n * QUERY STRING\n * http://nodejs.org/api/querystring.html\n * ******************************************************************************************* */\n\n\n// This module provides utilities for dealing with query strings. Call require('querystring') to use it.\n\nquerystring.stringify(obj, [sep], [eq]);         // Serialize an object to a query string. Optionally override the default separator ('&#x26;') and assignment ('=') characters.\nquerystring.parse(str, [sep], [eq], [options]);  // Deserialize a query string to an object. Optionally override the default separator ('&#x26;') and assignment ('=') characters.\n\n\n/* *******************************************************************************************\n * ASSERT\n * http://nodejs.org/api/assert.html\n * ******************************************************************************************* */\n\n\n// This module is used for writing unit tests for your applications, you can access it with require('assert').\n\nassert.fail(actual, expected, message, operator);     // Throws an exception that displays the values for actual and expected separated by the provided operator.\nassert(value, message); assert.ok(value, [message]);  // Tests if value is truthy, it is equivalent to assert.equal(true, !!value, message);\nassert.equal(actual, expected, [message]);            // Tests shallow, coercive equality with the equal comparison operator ( == ).\nassert.notEqual(actual, expected, [message]);         // Tests shallow, coercive non-equality with the not equal comparison operator ( != ).\nassert.deepEqual(actual, expected, [message]);        // Tests for deep equality.\nassert.notDeepEqual(actual, expected, [message]);     // Tests for any deep inequality.\nassert.strictEqual(actual, expected, [message]);      // Tests strict equality, as determined by the strict equality operator ( === )\nassert.notStrictEqual(actual, expected, [message]);   // Tests strict non-equality, as determined by the strict not equal operator ( !== )\nassert.throws(block, [error], [message]);             // Expects block to throw an error. error can be constructor, RegExp or validation function.\nassert.doesNotThrow(block, [message]);                // Expects block not to throw an error, see assert.throws for details.\nassert.ifError(value);                                // Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks.\n\n\n/* *******************************************************************************************\n * OS\n * http://nodejs.org/api/os.html\n * ******************************************************************************************* */\n\n\n// Provides a few basic operating-system related utility functions.\n// Use require('os') to access this module.\n\nos.tmpdir();             // Returns the operating system's default directory for temp files.\nos.endianness();         // Returns the endianness of the CPU. Possible values are \"BE\" or \"LE\".\nos.hostname();           // Returns the hostname of the operating system.\nos.type();               // Returns the operating system name.\nos.platform();           // Returns the operating system platform.\nos.arch();               // Returns the operating system CPU architecture.\nos.release();            // Returns the operating system release.\nos.uptime();             // Returns the system uptime in seconds.\nos.loadavg();            // Returns an array containing the 1, 5, and 15 minute load averages.\nos.totalmem();           // Returns the total amount of system memory in bytes.\nos.freemem();            // Returns the amount of free system memory in bytes.\nos.cpus();               // Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).\nos.networkInterfaces();  // Get a list of network interfaces.\nos.EOL;                  // A constant defining the appropriate End-of-line marker for the operating system.\n\n\n/* *******************************************************************************************\n * BUFFER\n * http://nodejs.org/api/buffer.html\n * ******************************************************************************************* */\n\n\n// Buffer is used to dealing with binary data\n// Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap\n\nBuffer.from(size);                                                  // Allocates a new buffer of size octets.\nBuffer.from(array);                                                 // Allocates a new buffer using an array of octets.\nBuffer.from(str, [encoding]);                                       // Allocates a new buffer containing the given str. encoding defaults to 'utf8'.\n\nBuffer.isEncoding(encoding);                                        // Returns true if the encoding is a valid encoding argument, or false otherwise.\nBuffer.isBuffer(obj);                                               // Tests if obj is a Buffer\nBuffer.concat(list, [totalLength]);                                 // Returns a buffer which is the result of concatenating all the buffers in the list together.\nBuffer.byteLength(string, [encoding]);                              // Gives the actual byte length of a string.\n\nbuf.write(string, [offset], [length], [encoding]);                  // Writes string to the buffer at offset using the given encoding\nbuf.toString([encoding], [start], [end]);                           // Decodes and returns a string from buffer data encoded with encoding (defaults to 'utf8') beginning at start (defaults to 0) and ending at end (defaults to buffer.length).\nbuf.toJSON();                                                       // Returns a JSON-representation of the Buffer instance, which is identical to the output for JSON Arrays\nbuf.copy(targetBuffer, [targetStart], [sourceStart], [sourceEnd]);  // Does copy between buffers. The source and target regions can be overlapped\nbuf.slice([start], [end]);                                          // Returns a new buffer which references the same memory as the old, but offset and cropped by the start (defaults to 0) and end (defaults to buffer.length) indexes. Negative indexes start from the end of the buffer.   \nbuf.fill(value, [offset], [end]);                                   // Fills the buffer with the specified value\nbuf[index];                                                         // Get and set the octet at index\nbuf.length;                                                         // The size of the buffer in bytes, Note that this is not necessarily the size of the contents\n\nbuffer.INSPECT_MAX_BYTES;                                           // How many bytes will be returned when buffer.inspect() is called. This can be overridden by user modules.\n</code></pre>\n<p>Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project!</p>\n<p>Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant.</p>\n<p>A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.</p>\n<p>When Node.js performs an I/O operation, like reading from the network, accessing a database or the filesystem, instead of blocking the thread and wasting CPU cycles waiting, Node.js will resume the operations when the response comes back.</p>\n<p>This allows Node.js to handle thousands of concurrent connections with a single server without introducing the burden of managing thread concurrency, which could be a significant source of bugs.</p>\n<p>Node.js has a unique advantage because millions of frontend developers that write JavaScript for the browser are now able to write the server-side code in addition to the client-side code without the need to learn a completely different language.</p>\n<p>In Node.js the new ECMAScript standards can be used without problems, as you don't have to wait for all your users to update their browsers - you are in charge of deciding which ECMAScript version to use by changing the Node.js version, and you can also enable specific experimental features by running Node.js with flags.</p>\n<h2><a href=\"https://nodejs.dev/learn#a-vast-number-of-libraries\"></a>A Vast Number of Libraries</h2>\n<p>npm with its simple structure helped the ecosystem of Node.js proliferate, and now the npm registry hosts over 1,000,000 open source packages you can freely use.</p>\n<h2><a href=\"https://nodejs.dev/learn#an-example-nodejs-application\"></a>An Example Node.js Application</h2>\n<p>The most common example Hello World of Node.js is a web server:</p>\n<p>This code first includes the Node.js <a href=\"https://nodejs.org/api/http.html\"><code>http</code> module</a>.</p>\n<p>Node.js has a fantastic <a href=\"https://nodejs.org/api/\">standard library</a>, including first-class support for networking.</p>\n<p>The <code>createServer()</code> method of <code>http</code> creates a new HTTP server and returns it.</p>\n<p>The server is set to listen on the specified port and host name. When the server is ready, the callback function is called, in this case informing us that the server is running.</p>\n<p>Whenever a new request is received, the <a href=\"https://nodejs.org/api/http.html#http_event_request\"><code>request</code> event</a> is called, providing two objects: a request (an <a href=\"https://nodejs.org/api/http.html#http_class_http_incomingmessage\"><code>http.IncomingMessage</code></a> object) and a response (an <a href=\"https://nodejs.org/api/http.html#http_class_http_serverresponse\"><code>http.ServerResponse</code></a> object).</p>\n<p>Those 2 objects are essential to handle the HTTP call.</p>\n<p>The first provides the request details. In this simple example, this is not used, but you could access the request headers and request data.</p>\n<p>The second is used to return data to the caller.</p>\n<p>In this case with:</p>\n<p>JS</p>\n<p>res.statusCode = 200</p>\n<p>we set the statusCode property to 200, to indicate a successful response.</p>\n<p>We set the Content-Type header:</p>\n<p>JS</p>\n<p>res.setHeader('Content-Type', 'text/plain')</p>\n<p>and we close the response, adding the content as an argument to <code>end()</code>:</p>\n<p>JS</p>\n<p>res.end('Hello World\\n')</p>\n<p>Node.js is a low-level platform. In order to make things easy and exciting for developers, thousands of libraries were built upon Node.js by the community.</p>\n<p>Many of those established over time as popular options. Here is a non-comprehensive list of the ones worth learning:</p>\n<ul>\n<li><a href=\"https://adonisjs.com/\"><strong>AdonisJS</strong></a>: A TypeScript-based fully featured framework highly focused on developer ergonomics, stability, and confidence. Adonis is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"https://eggjs.org/en/\"><strong>Egg.js</strong></a>: A framework to build better enterprise frameworks and apps with Node.js &#x26; Koa.</li>\n<li><a href=\"https://expressjs.com/\"><strong>Express</strong></a>: It provides one of the most simple yet powerful ways to create a web server. Its minimalist approach, unopinionated, focused on the core features of a server, is key to its success.</li>\n<li><a href=\"https://fastify.io/\"><strong>Fastify</strong></a>: A web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. Fastify is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"https://feathersjs.com/\"><strong>FeatherJS</strong></a>: Feathers is a lightweight web-framework for creating real-time applications and REST APIs using JavaScript or TypeScript. Build prototypes in minutes and production-ready apps in days.</li>\n<li><a href=\"https://www.gatsbyjs.com/\"><strong>Gatsby</strong></a>: A <a href=\"https://reactjs.org/\">React</a>-based, <a href=\"https://graphql.org/\">GraphQL</a> powered, static site generator with a very rich ecosystem of plugins and starters.</li>\n<li><a href=\"https://hapijs.com/\"><strong>hapi</strong></a>: A rich framework for building applications and services that enables developers to focus on writing reusable application logic instead of spending time building infrastructure.</li>\n<li><a href=\"http://koajs.com/\"><strong>koa</strong></a>: It is built by the same team behind Express, aims to be even simpler and smaller, building on top of years of knowledge. The new project born out of the need to create incompatible changes without disrupting the existing community.</li>\n<li><a href=\"https://loopback.io/\"><strong>Loopback.io</strong></a>: Makes it easy to build modern applications that require complex integrations.</li>\n<li><a href=\"https://meteor.com/\"><strong>Meteor</strong></a>: An incredibly powerful full-stack framework, powering you with an isomorphic approach to building apps with JavaScript, sharing code on the client and the server. Once an off-the-shelf tool that provided everything, now integrates with frontend libs <a href=\"https://reactjs.org/\">React</a>, <a href=\"https://vuejs.org/\">Vue</a>, and <a href=\"https://angular.io/\">Angular</a>. Can be used to create mobile apps as well.</li>\n<li><a href=\"https://github.com/zeit/micro\"><strong>Micro</strong></a>: It provides a very lightweight server to create asynchronous HTTP microservices.</li>\n<li><a href=\"https://nestjs.com/\"><strong>NestJS</strong></a>: A TypeScript based progressive Node.js framework for building enterprise-grade efficient, reliable and scalable server-side applications.</li>\n<li><a href=\"https://nextjs.org/\"><strong>Next.js</strong></a>: <a href=\"https://reactjs.org/\">React</a> framework that gives you the best developer experience with all the features you need for production: hybrid static &#x26; server rendering, TypeScript support, smart bundling, route pre-fetching, and more.</li>\n<li><a href=\"https://nx.dev/\"><strong>Nx</strong></a>: A toolkit for full-stack monorepo development using NestJS, Express, <a href=\"https://reactjs.org/\">React</a>, <a href=\"https://angular.io/\">Angular</a>, and more! Nx helps scale your development from one team building one application to many teams collaborating on multiple applications!</li>\n<li><a href=\"https://sapper.svelte.dev/\"><strong>Sapper</strong></a>: Sapper is a framework for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing. Offers SSR and more!</li>\n<li><a href=\"https://socket.io/\"><strong>Socket.io</strong></a>: A real-time communication engine to build network applications.</li>\n<li><a href=\"https://strapi.io/\"><strong>Strapi</strong></a>: Strapi is a flexible, open-source Headless CMS that gives developers the freedom to choose their favorite tools and frameworks while also allowing editors to easily manage and distribute their content. By making the admin panel and API extensible through a plugin system, Strapi enables the world's largest companies to accelerate content delivery while building beautiful digital experiences.</li>\n</ul>\n<p>Node.js can be installed in different ways. This post highlights the most common and convenient ones.</p>\n<p>Official packages for all the major platforms are available at <a href=\"https://nodejs.dev/download/\">https://nodejs.dev/download/</a>.</p>\n<p>One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own.</p>\n<p>Other package managers for MacOS, Linux, and Windows are listed in <a href=\"https://nodejs.dev/download/package-manager/\">https://nodejs.dev/download/package-manager/</a></p>\n<p><code>nvm</code> is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks, for example.</p>\n<p>It is also very useful to test your code with old Node.js versions.</p>\n<p>See <a href=\"https://github.com/nvm-sh/nvm\">https://github.com/nvm-sh/nvm</a> for more information about this option.</p>\n<p>In any case, when Node.js is installed you'll have access to the <code>node</code> executable program in the command line.</p>\n<h1>How much JavaScript do you need to know to use Node.js</h1>\n<p>As a beginner, it's hard to get to a point where you are confident enough in your programming abilities.</p>\n<p>While learning to code, you might also be confused at where does JavaScript end, and where Node.js begins, and vice versa.</p>\n<p>I would recommend you to have a good grasp of the main JavaScript concepts before diving into Node.js:</p>\n<ul>\n<li>Lexical Structure</li>\n<li>Expressions</li>\n<li>Types</li>\n<li>Classes</li>\n<li>Variables</li>\n<li>Functions</li>\n<li>this</li>\n<li>Arrow Functions</li>\n<li>Loops</li>\n<li>Scopes</li>\n<li>Arrays</li>\n<li>Template Literals</li>\n<li>Semicolons</li>\n<li>Strict Mode</li>\n<li>ECMAScript 6, 2016, 2017</li>\n</ul>\n<p>With those concepts in mind, you are well on your road to become a proficient JavaScript developer, in both the browser and in Node.js.</p>\n<p>The following concepts are also key to understand asynchronous programming, which is one of the fundamental parts of Node.js:</p>\n<ul>\n<li><a href=\"https://nodejs.dev/learn/javascript-asynchronous-programming-and-callbacks\">Asynchronous programming and callbacks</a></li>\n<li><a href=\"https://nodejs.dev/learn/discover-javascript-timers\">Timers</a></li>\n<li><a href=\"https://nodejs.dev/learn/understanding-javascript-promises\">Promises</a></li>\n<li><a href=\"https://nodejs.dev/learn/modern-asynchronous-javascript-with-async-and-await\">Async and Await</a></li>\n<li>Closures</li>\n<li><a href=\"https://nodejs.dev/learn/the-nodejs-event-loop\">The Event Loop</a></li>\n</ul>\n<h1>Differences between Node.js and the Browser</h1>\n<p>Both the browser and Node.js use JavaScript as their programming language.</p>\n<p>Building apps that run in the browser is a completely different thing than building a Node.js application.</p>\n<p>Despite the fact that it's always JavaScript, there are some key differences that make the experience radically different.</p>\n<p>From the perspective of a frontend developer who extensively uses JavaScript, Node.js apps bring with them a huge advantage: the comfort of programming everything - the frontend and the backend - in a single language.</p>\n<p>You have a huge opportunity because we know how hard it is to fully, deeply learn a programming language, and by using the same language to perform all your work on the web - both on the client and on the server, you're in a unique position of advantage.</p>\n<p>What changes is the ecosystem.</p>\n<p>In the browser, most of the time what you are doing is interacting with the DOM, or other Web Platform APIs like Cookies. Those do not exist in Node.js, of course. You don't have the <code>document</code>, <code>window</code> and all the other objects that are provided by the browser.</p>\n<p>And in the browser, we don't have all the nice APIs that Node.js provides through its modules, like the filesystem access functionality.</p>\n<p>Another big difference is that in Node.js you control the environment. Unless you are building an open source application that anyone can deploy anywhere, you know which version of Node.js you will run the application on. Compared to the browser environment, where you don't get the luxury to choose what browser your visitors will use, this is very convenient.</p>\n<p>This means that you can write all the modern ES6-7-8-9 JavaScript that your Node.js version supports.</p>\n<p>Since JavaScript moves so fast, but browsers can be a bit slow to upgrade, sometimes on the web you are stuck with using older JavaScript / ECMAScript releases.</p>\n<p>You can use Babel to transform your code to be ES5-compatible before shipping it to the browser, but in Node.js, you won't need that.</p>\n<p>Another difference is that Node.js uses the CommonJS module system, while in the browser we are starting to see the ES Modules standard being implemented.</p>\n<p>In practice, this means that for the time being you use <code>require()</code> in Node.js and <code>import</code> in the browser.</p>\n<h1>The V8 JavaScript Engine</h1>\n<p>V8 is the name of the JavaScript engine that powers Google Chrome. It's the thing that takes our JavaScript and executes it while browsing with Chrome.</p>\n<p>V8 provides the runtime environment in which JavaScript executes. The DOM, and the other Web Platform APIs are provided by the browser.</p>\n<p>The cool thing is that the JavaScript engine is independent of the browser in which it's hosted. This key feature enabled the rise of Node.js. V8 was chosen to be the engine that powered Node.js back in 2009, and as the popularity of Node.js exploded, V8 became the engine that now powers an incredible amount of server-side code written in JavaScript.</p>\n<p>The Node.js ecosystem is huge and thanks to V8 which also powers desktop apps, with projects like Electron.</p>\n<h2><a href=\"https://nodejs.dev/learn#other-js-engines\"></a>Other JS engines</h2>\n<p>Other browsers have their own JavaScript engine:</p>\n<ul>\n<li>Firefox has <a href=\"https://spidermonkey.dev/\"><strong>SpiderMonkey</strong></a></li>\n<li>Safari has <a href=\"https://developer.apple.com/documentation/javascriptcore\"><strong>JavaScriptCore</strong></a> (also called Nitro)</li>\n<li>Edge was originally based on <a href=\"https://github.com/Microsoft/ChakraCore\"><strong>Chakra</strong></a> but has more recently been <a href=\"https://support.microsoft.com/en-us/help/4501095/download-the-new-microsoft-edge-based-on-chromium\">rebuilt using Chromium</a> and the V8 engine.</li>\n</ul>\n<p>and many others exist as well.</p>\n<p>All those engines implement the <a href=\"https://www.ecma-international.org/publications/standards/Ecma-262.htm\">ECMA ES-262 standard</a>, also called ECMAScript, the standard used by JavaScript.</p>\n<h2><a href=\"https://nodejs.dev/learn#the-quest-for-performance\"></a>The quest for performance</h2>\n<p>V8 is written in C++, and it's continuously improved. It is portable and runs on Mac, Windows, Linux and several other systems.</p>\n<p>In this V8 introduction, we will ignore the implementation details of V8: they can be found on more authoritative sites (e.g. the <a href=\"https://v8.dev/\">V8 official site</a>), and they change over time, often radically.</p>\n<p>V8 is always evolving, just like the other JavaScript engines around, to speed up the Web and the Node.js ecosystem.</p>\n<p>On the web, there is a race for performance that's been going on for years, and we (as users and developers) benefit a lot from this competition because we get faster and more optimized machines year after year.</p>\n<h2><a href=\"https://nodejs.dev/learn#compilation\"></a>Compilation</h2>\n<p>JavaScript is generally considered an interpreted language, but modern JavaScript engines no longer just interpret JavaScript, they compile it.</p>\n<p>This has been happening since 2009, when the SpiderMonkey JavaScript compiler was added to Firefox 3.5, and everyone followed this idea.</p>\n<p>JavaScript is internally compiled by V8 with <strong>just-in-time</strong> (JIT) <strong>compilation</strong> to speed up the execution.</p>\n<p>This might seem counter-intuitive, but since the introduction of Google Maps in 2004, JavaScript has evolved from a language that was generally executing a few dozens of lines of code to complete applications with thousands to hundreds of thousands of lines running in the browser.</p>\n<p>Our applications can now run for hours inside a browser, rather than being just a few form validation rules or simple scripts.</p>\n<p>In this <em>new world</em>, compiling JavaScript makes perfect sense because while it might take a little bit more to have the JavaScript <em>ready</em>, once done it's going to be much more performant than purely interpreted code.</p>\n<h1>Run Node.js scripts from the command line</h1>\n<p>The usual way to run a Node.js program is to run the <code>node</code> globally available command (once you install Node.js) and pass the name of the file you want to execute.</p>\n<p>If your main Node.js application file is <code>app.js</code>, you can call it by typing:</p>\n<p>BASH</p>\n<p>node app.js</p>\n<p>Above, you are explicitly telling the shell to run your script with <code>node</code>. You can also embed this information into your JavaScript file with a \"shebang\" line. The \"shebang\" is the first line in the file, and tells the OS which interpreter to use for running the script. Below is the first line of JavaScript:</p>\n<p>BASH</p>\n<h1>!/usr/bin/node</h1>\n<p>Above, we are explicitly giving the absolute path of interpreter. Not all operating systems have <code>node</code> in the bin folder, but all should have <code>env</code>. You can tell the OS to run <code>env</code> with node as parameter:</p>\n<p>BASH</p>\n<h1>!/usr/bin/env node</h1>\n<p>// your code</p>\n<p>To use a shebang, your file should have executable permission. You can give <code>app.js</code> the executable permission by running:</p>\n<p>BASH</p>\n<p>chmod u+x app.js</p>\n<p>While running the command, make sure you are in the same directory which contains the <code>app.js</code> file.</p>\n<h1>How to exit from a Node.js program</h1>\n<hr>\n<p>created: 2021-11-27T11:28:53 (UTC -05:00)\ntags: []\nsource: <a href=\"https://nodejs.dev/learn\">https://nodejs.dev/learn</a>\nauthor: </p>\n<hr>\n<h1>How to exit from a Node.js program</h1>\n<blockquote>\n<h2>Excerpt</h2>\n<p>Learn how to terminate a Node.js app in the best possible way</p>\n</blockquote>\n<hr>\n<p>There are various ways to terminate a Node.js application.</p>\n<p>When running a program in the console you can close it with <code>ctrl-C</code>, but what we want to discuss here is programmatically exiting.</p>\n<p>Let's start with the most drastic one, and see why you're better off <em>not</em> using it.</p>\n<p>The <code>process</code> core module provides a handy method that allows you to programmatically exit from a Node.js program: <code>process.exit()</code>.</p>\n<p>When Node.js runs this line, the process is immediately forced to terminate.</p>\n<p>This means that any callback that's pending, any network request still being sent, any filesystem access, or processes writing to <code>stdout</code> or <code>stderr</code> - all is going to be ungracefully terminated right away.</p>\n<p>If this is fine for you, you can pass an integer that signals the operating system the exit code:</p>\n<p>JS</p>\n<p>process.exit(1)</p>\n<p>By default the exit code is <code>0</code>, which means success. Different exit codes have different meaning, which you might want to use in your own system to have the program communicate to other programs.</p>\n<p>You can read more on exit codes at <a href=\"https://nodejs.org/api/process.html#process_exit_codes\">https://nodejs.org/api/process.html#process_exit_codes</a></p>\n<p>You can also set the <code>process.exitCode</code> property:</p>\n<p>JS</p>\n<p>process.exitCode = 1</p>\n<p>and when the program ends, Node.js will return that exit code.</p>\n<p>A program will gracefully exit when all the processing is done.</p>\n<p>Many times with Node.js we start servers, like this HTTP server:</p>\n<p>JS</p>\n<p>const express = require('express')</p>\n<p>const app = express()</p>\n<p>app.get('/', (req, res) => {</p>\n<p> res.send('Hi!')</p>\n<p>})</p>\n<p>app.listen(3000, () => console.log('Server ready'))</p>\n<blockquote>\n<p>Express is a framework that uses the http module under the hood, app.listen() returns an instance of http. You would use https.createServer if you needed to serve your app using HTTPS, as app.listen only uses the http module.</p>\n</blockquote>\n<p>This program is never going to end. If you call <code>process.exit()</code>, any currently pending or running request is going to be aborted. This is <em>not nice</em>.</p>\n<p>In this case you need to send the command a SIGTERM signal, and handle that with the process signal handler:</p>\n<blockquote>\n<p>Note: <code>process</code> does not require a \"require\", it's automatically available.</p>\n</blockquote>\n<p>JS</p>\n<p>const express = require('express')</p>\n<p>const app = express()</p>\n<p>app.get('/', (req, res) => {</p>\n<p> res.send('Hi!')</p>\n<p>})</p>\n<p>const server = app.listen(3000, () => console.log('Server ready'))</p>\n<p>process.on('SIGTERM', () => {</p>\n<p> server.close(() => {</p>\n<p> console.log('Process terminated')</p>\n<p> })</p>\n<p>})</p>\n<blockquote>\n<p>What are signals? Signals are a POSIX intercommunication system: a notification sent to a process in order to notify it of an event that occurred.</p>\n</blockquote>\n<p><code>SIGKILL</code> is the signal that tells a process to immediately terminate, and would ideally act like <code>process.exit()</code>.</p>\n<p><code>SIGTERM</code> is the signal that tells a process to gracefully terminate. It is the signal that's sent from process managers like <code>upstart</code> or <code>supervisord</code> and many others.</p>\n<p>You can send this signal from inside the program, in another function:</p>\n<p>JS</p>\n<p>process.kill(process.pid, 'SIGTERM')</p>\n<p>Or from another Node.js running program, or any other app running in your system that knows the PID of the process you want to terminate.</p>"},{"url":"/docs/docs/html-spec/","relativePath":"docs/docs/html-spec.md","relativeDir":"docs/docs","base":"html-spec.md","name":"html-spec","frontmatter":{"title":"HTML SPEC","weight":0,"excerpt":"HTML SPEC","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>HTML SPEC</h2>\n<p><a href=\"https://github.com/whatwg/html/issues/new\">File an issue about the selected text</a></p>\n<p><a href=\"https://whatwg.org/\"><img src=\"https://resources.whatwg.org/logo.svg\" alt=\"WHATWG\"></a></p>\n<h2>Living Standard — Last Updated 29 October 2021</h2>\n<hr>\n<h2>Table of contents</h2>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#toc-introduction\">1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-infrastructure\">2 Common infrastructure</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-dom\">3 Semantics, structure, and APIs of HTML documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-semantics\">4 The elements of HTML</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-microdata\">5 Microdata</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-editing\">6 User interaction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-browsers\">7 Loading web pages</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-webappapis\">8 Web application APIs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-comms\">9 Communication</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-workers\">10 Web workers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-worklets\">11 Worklets</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-webstorage\">12 Web storage</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-syntax\">13 The HTML syntax</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-the-xhtml-syntax\">14 The XML syntax</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-rendering\">15 Rendering</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-obsolete\">16 Obsolete features</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-iana\">17 IANA considerations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-index\">Index</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-references\">References</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-acknowledgments\">Acknowledgments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#toc-ipr\">Intellectual property rights</a></li>\n</ol>\n<h2>Full table of contents</h2>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#introduction\">1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#abstract\">1.1 Where does this specification fit?</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#is-this-html5?\">1.2 Is this HTML5?</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#background\">1.3 Background</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#audience\">1.4 Audience</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scope\">1.5 Scope</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#history-2\">1.6 History</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#design-notes\">1.7 Design notes</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#serialisability-of-script-execution\">1.7.1 Serializability of script execution</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#compliance-with-other-specifications\">1.7.2 Compliance with other specifications</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#extensibility\">1.7.3 Extensibility</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#html-vs-xhtml\">1.8 HTML vs XML syntax</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#structure-of-this-specification\">1.9 Structure of this specification</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#how-to-read-this-specification\">1.9.1 How to read this specification</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#typographic-conventions\">1.9.2 Typographic conventions</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#a-quick-introduction-to-html\">1.10 A quick introduction to HTML</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#writing-secure-applications-with-html\">1.10.1 Writing secure applications with HTML</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#common-pitfalls-to-avoid-when-using-the-scripting-apis\">1.10.2 Common pitfalls to avoid when using the scripting APIs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#how-to-catch-mistakes-when-writing-html:-validators-and-conformance-checkers\">1.10.3 How to catch mistakes when writing HTML: validators and conformance checkers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#conformance-requirements-for-authors\">1.11 Conformance requirements for authors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#presentational-markup\">1.11.1 Presentational markup</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#syntax-errors\">1.11.2 Syntax errors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#restrictions-on-content-models-and-on-attribute-values\">1.11.3 Restrictions on content models and on attribute values</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#suggested-reading\">1.12 Suggested reading</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#infrastructure\">2 Common infrastructure</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#terminology\">2.1 Terminology</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#parallelism\">2.1.1 Parallelism</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#resources\">2.1.2 Resources</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#xml\">2.1.3 XML compatibility</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dom-trees\">2.1.4 DOM trees</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scripting-2\">2.1.5 Scripting</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#plugins\">2.1.6 Plugins</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#encoding-terminology\">2.1.7 Character encodings</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#conformance-classes\">2.1.8 Conformance classes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dependencies\">2.1.9 Dependencies</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#extensibility-2\">2.1.10 Extensibility</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#interactions-with-xpath-and-xslt\">2.1.11 Interactions with XPath and XSLT</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#policy-controlled-features\">2.2 Policy-controlled features</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#common-microsyntaxes\">2.3 Common microsyntaxes</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#common-parser-idioms\">2.3.1 Common parser idioms</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#boolean-attributes\">2.3.2 Boolean attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#keywords-and-enumerated-attributes\">2.3.3 Keywords and enumerated attributes</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#numbers\">2.3.4 Numbers</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#signed-integers\">2.3.4.1 Signed integers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#non-negative-integers\">2.3.4.2 Non-negative integers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#floating-point-numbers\">2.3.4.3 Floating-point numbers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#percentages-and-dimensions\">2.3.4.4 Percentages and lengths</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#nonzero-percentages-and-lengths\">2.3.4.5 Nonzero percentages and lengths</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#lists-of-floating-point-numbers\">2.3.4.6 Lists of floating-point numbers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#lists-of-dimensions\">2.3.4.7 Lists of dimensions</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#dates-and-times\">2.3.5 Dates and times</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#months\">2.3.5.1 Months</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dates\">2.3.5.2 Dates</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#yearless-dates\">2.3.5.3 Yearless dates</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#times\">2.3.5.4 Times</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#local-dates-and-times\">2.3.5.5 Local dates and times</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#time-zones\">2.3.5.6 Time zones</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#global-dates-and-times\">2.3.5.7 Global dates and times</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#weeks\">2.3.5.8 Weeks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#durations\">2.3.5.9 Durations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#vaguer-moments-in-time\">2.3.5.10 Vaguer moments in time</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#colours\">2.3.6 Colors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#space-separated-tokens\">2.3.7 Space-separated tokens</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comma-separated-tokens\">2.3.8 Comma-separated tokens</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#syntax-references\">2.3.9 References</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#mq\">2.3.10 Media queries</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#urls\">2.4 URLs</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#terminology-2\">2.4.1 Terminology</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#resolving-urls\">2.4.2 Parsing URLs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dynamic-changes-to-base-urls\">2.4.3 Dynamic changes to base URLs</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#fetching-resources\">2.5 Fetching resources</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#terminology-3\">2.5.1 Terminology</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#content-type-sniffing\">2.5.2 Determining the type of a resource</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#extracting-character-encodings-from-meta-elements\">2.5.3 Extracting character encodings from <code>meta</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cors-settings-attributes\">2.5.4 CORS settings attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#referrer-policy-attributes\">2.5.5 Referrer policy attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#nonce-attributes\">2.5.6 Nonce attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#lazy-loading-attributes\">2.5.7 Lazy loading attributes</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#common-dom-interfaces\">2.6 Common DOM interfaces</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes\">2.6.1 Reflecting content attributes in IDL attributes</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#collections\">2.6.2 Collections</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-htmlallcollection-interface\">2.6.2.1 The <code>HTMLAllCollection</code> interface</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#HTMLAllCollection-call\">2.6.2.1.1 [[Call]] ( thisArgument, argumentsList )</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-htmlformcontrolscollection-interface\">2.6.2.2 The <code>HTMLFormControlsCollection</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-htmloptionscollection-interface\">2.6.2.3 The <code>HTMLOptionsCollection</code> interface</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-domstringlist-interface\">2.6.3 The <code>DOMStringList</code> interface</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#safe-passing-of-structured-data\">2.7 Safe passing of structured data</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#serializable-objects\">2.7.1 Serializable objects</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#transferable-objects\">2.7.2 Transferable objects</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structuredserializeinternal\">2.7.3 StructuredSerializeInternal ( value, forStorage [ , memory ] )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structuredserialize\">2.7.4 StructuredSerialize ( value )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structuredserializeforstorage\">2.7.5 StructuredSerializeForStorage ( value )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structureddeserialize\">2.7.6 StructuredDeserialize ( serialized, targetRealm [ , memory ] )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structuredserializewithtransfer\">2.7.7 StructuredSerializeWithTransfer ( value, transferList )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structureddeserializewithtransfer\">2.7.8 StructuredDeserializeWithTransfer ( serializeWithTransferResult, targetRealm )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#performing-structured-clones-from-other-specifications\">2.7.9 Performing serialization and transferring from other specifications</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#structured-cloning\">2.7.10 Structured cloning API</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#dom\">3 Semantics, structure, and APIs of HTML documents</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#documents\">3.1 Documents</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-document-object\">3.1.1 The <code>Document</code> object</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-documentorshadowroot-interface\">3.1.2 The <code>DocumentOrShadowRoot</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#resource-metadata-management\">3.1.3 Resource metadata management</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#reporting-document-loading-status\">3.1.4 Reporting document loading status</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dom-tree-accessors\">3.1.5 DOM tree accessors</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#elements\">3.2 Elements</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#semantics-2\">3.2.1 Semantics</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#elements-in-the-dom\">3.2.2 Elements in the DOM</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#html-element-constructors\">3.2.3 HTML element constructors</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#element-definitions\">3.2.4 Element definitions</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#attributes\">3.2.4.1 Attributes</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#content-models\">3.2.5 Content models</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-nothing-content-model\">3.2.5.1 The \"nothing\" content model</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#kinds-of-content\">3.2.5.2 Kinds of content</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#metadata-content\">3.2.5.2.1 Metadata content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#flow-content\">3.2.5.2.2 Flow content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sectioning-content\">3.2.5.2.3 Sectioning content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#heading-content\">3.2.5.2.4 Heading content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#phrasing-content\">3.2.5.2.5 Phrasing content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#embedded-content-2\">3.2.5.2.6 Embedded content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#interactive-content\">3.2.5.2.7 Interactive content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#palpable-content\">3.2.5.2.8 Palpable content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-supporting-elements\">3.2.5.2.9 Script-supporting elements</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#transparent-content-models\">3.2.5.3 Transparent content models</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#paragraphs\">3.2.5.4 Paragraphs</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#global-attributes\">3.2.6 Global attributes</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-title-attribute\">3.2.6.1 The <code>title</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-lang-and-xml:lang-attributes\">3.2.6.2 The <code>lang</code> and <code>xml:lang</code> attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-translate-attribute\">3.2.6.3 The <code>translate</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dir-attribute\">3.2.6.4 The <code>dir</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-style-attribute\">3.2.6.5 The <code>style</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#embedding-custom-non-visible-data-with-the-data-*-attributes\">3.2.6.6 Embedding custom non-visible data with the <code>data-*</code> attributes</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-innertext-idl-attribute\">3.2.7 The <code>innerText</code> and <code>outerText</code> properties</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#requirements-relating-to-the-bidirectional-algorithm\">3.2.8 Requirements relating to the bidirectional algorithm</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#authoring-conformance-criteria-for-bidirectional-algorithm-formatting-characters\">3.2.8.1 Authoring conformance criteria for bidirectional-algorithm formatting characters</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#user-agent-conformance-criteria\">3.2.8.2 User agent conformance criteria</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#wai-aria\">3.2.9 Requirements related to ARIA and to platform accessibility APIs</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#semantics\">4 The elements of HTML</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-root-element\">4.1 The document element</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-html-element\">4.1.1 The <code>html</code> element</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#document-metadata\">4.2 Document metadata</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-head-element\">4.2.1 The <code>head</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-title-element\">4.2.2 The <code>title</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-base-element\">4.2.3 The <code>base</code> element</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-link-element\">4.2.4 The <code>link</code> element</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#processing-the-media-attribute\">4.2.4.1 Processing the <code>media</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#processing-the-type-attribute\">4.2.4.2 Processing the <code>type</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#fetching-and-processing-a-resource-from-a-link-element\">4.2.4.3 Fetching and processing a resource from a <code>link</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#processing-link-headers\">4.2.4.4 Processing `<code>Link</code>` headers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#providing-users-with-a-means-to-follow-hyperlinks-created-using-the-link-element\">4.2.4.5 Providing users with a means to follow hyperlinks created using the <code>link</code> element</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-meta-element\">4.2.5 The <code>meta</code> element</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#standard-metadata-names\">4.2.5.1 Standard metadata names</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#other-metadata-names\">4.2.5.2 Other metadata names</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#pragma-directives\">4.2.5.3 Pragma directives</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#charset\">4.2.5.4 Specifying the document's character encoding</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-style-element\">4.2.6 The <code>style</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#interactions-of-styling-and-scripting\">4.2.7 Interactions of styling and scripting</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#sections\">4.3 Sections</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-body-element\">4.3.1 The <code>body</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-article-element\">4.3.2 The <code>article</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-section-element\">4.3.3 The <code>section</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-nav-element\">4.3.4 The <code>nav</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-aside-element\">4.3.5 The <code>aside</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements\">4.3.6 The <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>, <code>h5</code>, and <code>h6</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-hgroup-element\">4.3.7 The <code>hgroup</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-header-element\">4.3.8 The <code>header</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-footer-element\">4.3.9 The <code>footer</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-address-element\">4.3.10 The <code>address</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#headings-and-sections\">4.3.11 Headings and sections</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#outlines\">4.3.11.1 Creating an outline</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sample-outlines\">4.3.11.2 Sample outlines</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#exposing-outlines-to-users\">4.3.11.3 Exposing outlines to users</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#usage-summary-2\">4.3.12 Usage summary</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#article-or-section\">4.3.12.1 Article or section?</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#grouping-content\">4.4 Grouping content</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-p-element\">4.4.1 The <code>p</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-hr-element\">4.4.2 The <code>hr</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-pre-element\">4.4.3 The <code>pre</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-blockquote-element\">4.4.4 The <code>blockquote</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-ol-element\">4.4.5 The <code>ol</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-ul-element\">4.4.6 The <code>ul</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-menu-element\">4.4.7 The <code>menu</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-li-element\">4.4.8 The <code>li</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dl-element\">4.4.9 The <code>dl</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dt-element\">4.4.10 The <code>dt</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dd-element\">4.4.11 The <code>dd</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-figure-element\">4.4.12 The <code>figure</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-figcaption-element\">4.4.13 The <code>figcaption</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-main-element\">4.4.14 The <code>main</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-div-element\">4.4.15 The <code>div</code> element</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#text-level-semantics\">4.5 Text-level semantics</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-a-element\">4.5.1 The <code>a</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-em-element\">4.5.2 The <code>em</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-strong-element\">4.5.3 The <code>strong</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-small-element\">4.5.4 The <code>small</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-s-element\">4.5.5 The <code>s</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-cite-element\">4.5.6 The <code>cite</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-q-element\">4.5.7 The <code>q</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dfn-element\">4.5.8 The <code>dfn</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-abbr-element\">4.5.9 The <code>abbr</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-ruby-element\">4.5.10 The <code>ruby</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-rt-element\">4.5.11 The <code>rt</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-rp-element\">4.5.12 The <code>rp</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-data-element\">4.5.13 The <code>data</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-time-element\">4.5.14 The <code>time</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-code-element\">4.5.15 The <code>code</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-var-element\">4.5.16 The <code>var</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-samp-element\">4.5.17 The <code>samp</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-kbd-element\">4.5.18 The <code>kbd</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-sub-and-sup-elements\">4.5.19 The <code>sub</code> and <code>sup</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-i-element\">4.5.20 The <code>i</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-b-element\">4.5.21 The <code>b</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-u-element\">4.5.22 The <code>u</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-mark-element\">4.5.23 The <code>mark</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-bdi-element\">4.5.24 The <code>bdi</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-bdo-element\">4.5.25 The <code>bdo</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-span-element\">4.5.26 The <code>span</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-br-element\">4.5.27 The <code>br</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-wbr-element\">4.5.28 The <code>wbr</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#usage-summary\">4.5.29 Usage summary</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#links\">4.6 Links</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-2\">4.6.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#links-created-by-a-and-area-elements\">4.6.2 Links created by <code>a</code> and <code>area</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#api-for-a-and-area-elements\">4.6.3 API for <code>a</code> and <code>area</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#following-hyperlinks\">4.6.4 Following hyperlinks</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#downloading-resources\">4.6.5 Downloading resources</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#hyperlink-auditing\">4.6.5.1 Hyperlink auditing</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#linkTypes\">4.6.6 Link types</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#rel-alternate\">4.6.6.1 Link type \"<code>alternate</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-author\">4.6.6.2 Link type \"<code>author</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-bookmark\">4.6.6.3 Link type \"<code>bookmark</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-canonical\">4.6.6.4 Link type \"<code>canonical</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-dns-prefetch\">4.6.6.5 Link type \"<code>dns-prefetch</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-external\">4.6.6.6 Link type \"<code>external</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-help\">4.6.6.7 Link type \"<code>help</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rel-icon\">4.6.6.8 Link type \"<code>icon</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-license\">4.6.6.9 Link type \"<code>license</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-manifest\">4.6.6.10 Link type \"<code>manifest</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-modulepreload\">4.6.6.11 Link type \"<code>modulepreload</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-nofollow\">4.6.6.12 Link type \"<code>nofollow</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-noopener\">4.6.6.13 Link type \"<code>noopener</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-noreferrer\">4.6.6.14 Link type \"<code>noreferrer</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-opener\">4.6.6.15 Link type \"<code>opener</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-pingback\">4.6.6.16 Link type \"<code>pingback</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-preconnect\">4.6.6.17 Link type \"<code>preconnect</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-prefetch\">4.6.6.18 Link type \"<code>prefetch</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-preload\">4.6.6.19 Link type \"<code>preload</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-prerender\">4.6.6.20 Link type \"<code>prerender</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-search\">4.6.6.21 Link type \"<code>search</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-stylesheet\">4.6.6.22 Link type \"<code>stylesheet</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-tag\">4.6.6.23 Link type \"<code>tag</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sequential-link-types\">4.6.6.24 Sequential link types</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-next\">4.6.6.24.1 Link type \"<code>next</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#link-type-prev\">4.6.6.24.2 Link type \"<code>prev</code>\"</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#other-link-types\">4.6.6.25 Other link types</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#edits\">4.7 Edits</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-ins-element\">4.7.1 The <code>ins</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-del-element\">4.7.2 The <code>del</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attributes-common-to-ins-and-del-elements\">4.7.3 Attributes common to <code>ins</code> and <code>del</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#edits-and-paragraphs\">4.7.4 Edits and paragraphs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#edits-and-lists\">4.7.5 Edits and lists</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#edits-and-tables\">4.7.6 Edits and tables</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#embedded-content\">4.8 Embedded content</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-picture-element\">4.8.1 The <code>picture</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-source-element\">4.8.2 The <code>source</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-img-element\">4.8.3 The <code>img</code> element</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#images\">4.8.4 Images</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#introduction-3\">4.8.4.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#adaptive-images\">4.8.4.1.1 Adaptive images</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#attributes-common-to-source-and-img-elements\">4.8.4.2 Attributes common to <code>source</code>, <code>img</code>, and <code>link</code> elements</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#srcset-attributes\">4.8.4.2.1 Srcset attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sizes-attributes\">4.8.4.2.2 Sizes attributes</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#images-processing-model\">4.8.4.3 Processing model</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#when-to-obtain-images\">4.8.4.3.1 When to obtain images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#reacting-to-dom-mutations\">4.8.4.3.2 Reacting to DOM mutations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-list-of-available-images\">4.8.4.3.3 The list of available images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#decoding-images\">4.8.4.3.4 Decoding images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#updating-the-image-data\">4.8.4.3.5 Updating the image data</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#preparing-an-image-for-presentation\">4.8.4.3.6 Preparing an image for presentation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#selecting-an-image-source\">4.8.4.3.7 Selecting an image source</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#updating-the-source-set\">4.8.4.3.8 Updating the source set</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-a-srcset-attribute\">4.8.4.3.9 Parsing a srcset attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-a-sizes-attribute\">4.8.4.3.10 Parsing a sizes attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#normalizing-the-source-densities\">4.8.4.3.11 Normalizing the source densities</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#reacting-to-environment-changes\">4.8.4.3.12 Reacting to environment changes</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#alt\">4.8.4.4 Requirements for providing text to act as an alternative for images</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#general-guidelines\">4.8.4.4.1 General guidelines</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-link-or-button-containing-nothing-but-the-image\">4.8.4.4.2 A link or button containing nothing but the image</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-phrase-or-paragraph-with-an-alternative-graphical-representation:-charts,-diagrams,-graphs,-maps,-illustrations\">4.8.4.4.3 A phrase or paragraph with an alternative graphical representation: charts, diagrams, graphs, maps, illustrations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-short-phrase-or-label-with-an-alternative-graphical-representation:-icons,-logos\">4.8.4.4.4 A short phrase or label with an alternative graphical representation: icons, logos</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text-that-has-been-rendered-to-a-graphic-for-typographical-effect\">4.8.4.4.5 Text that has been rendered to a graphic for typographical effect</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-graphical-representation-of-some-of-the-surrounding-text\">4.8.4.4.6 A graphical representation of some of the surrounding text</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ancillary-images\">4.8.4.4.7 Ancillary images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-purely-decorative-image-that-doesn&#x27;t-add-any-information\">4.8.4.4.8 A purely decorative image that doesn't add any information</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-group-of-images-that-form-a-single-larger-picture-with-no-links\">4.8.4.4.9 A group of images that form a single larger picture with no links</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-group-of-images-that-form-a-single-larger-picture-with-links\">4.8.4.4.10 A group of images that form a single larger picture with links</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-key-part-of-the-content\">4.8.4.4.11 A key part of the content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#an-image-not-intended-for-the-user\">4.8.4.4.12 An image not intended for the user</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#an-image-in-an-e-mail-or-private-document-intended-for-a-specific-person-who-is-known-to-be-able-to-view-images\">4.8.4.4.13 An image in an email or private document intended for a specific person who is known to be able to view images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#guidance-for-markup-generators\">4.8.4.4.14 Guidance for markup generators</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#guidance-for-conformance-checkers\">4.8.4.4.15 Guidance for conformance checkers</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-iframe-element\">4.8.5 The <code>iframe</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-embed-element\">4.8.6 The <code>embed</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-object-element\">4.8.7 The <code>object</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-param-element\">4.8.8 The <code>param</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-video-element\">4.8.9 The <code>video</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-audio-element\">4.8.10 The <code>audio</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-track-element\">4.8.11 The <code>track</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#media-elements\">4.8.12 Media elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#error-codes\">4.8.12.1 Error codes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-of-the-media-resource\">4.8.12.2 Location of the media resource</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#mime-types\">4.8.12.3 MIME types</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#network-states\">4.8.12.4 Network states</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#loading-the-media-resource\">4.8.12.5 Loading the media resource</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#offsets-into-the-media-resource\">4.8.12.6 Offsets into the media resource</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ready-states\">4.8.12.7 Ready states</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#playing-the-media-resource\">4.8.12.8 Playing the media resource</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#seeking\">4.8.12.9 Seeking</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#media-resources-with-multiple-media-tracks\">4.8.12.10 Media resources with multiple media tracks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#audiotracklist-and-videotracklist-objects\">4.8.12.10.1 <code>AudioTrackList</code> and <code>VideoTrackList</code> objects</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#selecting-specific-audio-and-video-tracks-declaratively\">4.8.12.10.2 Selecting specific audio and video tracks declaratively</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#timed-text-tracks\">4.8.12.11 Timed text tracks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text-track-model\">4.8.12.11.1 Text track model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sourcing-in-band-text-tracks\">4.8.12.11.2 Sourcing in-band text tracks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sourcing-out-of-band-text-tracks\">4.8.12.11.3 Sourcing out-of-band text tracks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#guidelines-for-exposing-cues-in-various-formats-as-text-track-cues\">4.8.12.11.4 Guidelines for exposing cues in various formats as text track cues</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text-track-api\">4.8.12.11.5 Text track API</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cue-events\">4.8.12.11.6 Event handlers for objects of the text track APIs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#best-practices-for-metadata-text-tracks\">4.8.12.11.7 Best practices for metadata text tracks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#identifying-a-track-kind-through-a-url\">4.8.12.12 Identifying a track kind through a URL</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#user-interface\">4.8.12.13 User interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#time-ranges\">4.8.12.14 Time ranges</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-trackevent-interface\">4.8.12.15 The <code>TrackEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#mediaevents\">4.8.12.16 Events summary</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#security-and-privacy-considerations\">4.8.12.17 Security and privacy considerations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#best-practices-for-authors-using-media-elements\">4.8.12.18 Best practices for authors using media elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#best-practices-for-implementers-of-media-elements\">4.8.12.19 Best practices for implementers of media elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-map-element\">4.8.13 The <code>map</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-area-element\">4.8.14 The <code>area</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#image-maps\">4.8.15 Image maps</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#authoring\">4.8.15.1 Authoring</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#image-map-processing-model\">4.8.15.2 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#mathml\">4.8.16 MathML</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#svg-0\">4.8.17 SVG</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dimension-attributes\">4.8.18 Dimension attributes</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#tables\">4.9 Tabular data</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-table-element\">4.9.1 The <code>table</code> element</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#table-descriptions-techniques\">4.9.1.1 Techniques for describing tables</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#table-layout-techniques\">4.9.1.2 Techniques for table design</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-caption-element\">4.9.2 The <code>caption</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-colgroup-element\">4.9.3 The <code>colgroup</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-col-element\">4.9.4 The <code>col</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-tbody-element\">4.9.5 The <code>tbody</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-thead-element\">4.9.6 The <code>thead</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-tfoot-element\">4.9.7 The <code>tfoot</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-tr-element\">4.9.8 The <code>tr</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-td-element\">4.9.9 The <code>td</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-th-element\">4.9.10 The <code>th</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attributes-common-to-td-and-th-elements\">4.9.11 Attributes common to <code>td</code> and <code>th</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#table-processing-model\">4.9.12 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#forming-a-table\">4.9.12.1 Forming a table</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#header-and-data-cell-semantics\">4.9.12.2 Forming relationships between data cells and header cells</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#table-examples\">4.9.13 Examples</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#forms\">4.10 Forms</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#introduction-4\">4.10.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#writing-a-form&#x27;s-user-interface\">4.10.1.1 Writing a form's user interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#implementing-the-server-side-processing-for-a-form\">4.10.1.2 Implementing the server-side processing for a form</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#configuring-a-form-to-communicate-with-a-server\">4.10.1.3 Configuring a form to communicate with a server</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#client-side-form-validation\">4.10.1.4 Client-side form validation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#enabling-client-side-automatic-filling-of-form-controls\">4.10.1.5 Enabling client-side automatic filling of form controls</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#improving-the-user-experience-on-mobile-devices\">4.10.1.6 Improving the user experience on mobile devices</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-difference-between-the-field-type,-the-autofill-field-name,-and-the-input-modality\">4.10.1.7 The difference between the field type, the autofill field name, and the input modality</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#input-author-notes\">4.10.1.8 Date, time, and number formats</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#categories\">4.10.2 Categories</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-form-element\">4.10.3 The <code>form</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-label-element\">4.10.4 The <code>label</code> element</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-input-element\">4.10.5 The <code>input</code> element</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#states-of-the-type-attribute\">4.10.5.1 States of the <code>type</code> attribute</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#hidden-state-(type=hidden)\">4.10.5.1.1 Hidden state (<code>type=hidden</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text-(type=text)-state-and-search-state-(type=search)\">4.10.5.1.2 Text (<code>type=text</code>) state and Search state (<code>type=search</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#telephone-state-(type=tel)\">4.10.5.1.3 Telephone state (<code>type=tel</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#url-state-(type=url)\">4.10.5.1.4 URL state (<code>type=url</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#email-state-(type=email)\">4.10.5.1.5 Email state (<code>type=email</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#password-state-(type=password)\">4.10.5.1.6 Password state (<code>type=password</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#date-state-(type=date)\">4.10.5.1.7 Date state (<code>type=date</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#month-state-(type=month)\">4.10.5.1.8 Month state (<code>type=month</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#week-state-(type=week)\">4.10.5.1.9 Week state (<code>type=week</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#time-state-(type=time)\">4.10.5.1.10 Time state (<code>type=time</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#local-date-and-time-state-(type=datetime-local)\">4.10.5.1.11 Local Date and Time state (<code>type=datetime-local</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#number-state-(type=number)\">4.10.5.1.12 Number state (<code>type=number</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#range-state-(type=range)\">4.10.5.1.13 Range state (<code>type=range</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#color-state-(type=color)\">4.10.5.1.14 Color state (<code>type=color</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#checkbox-state-(type=checkbox)\">4.10.5.1.15 Checkbox state (<code>type=checkbox</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#radio-button-state-(type=radio)\">4.10.5.1.16 Radio Button state (<code>type=radio</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#file-upload-state-(type=file)\">4.10.5.1.17 File Upload state (<code>type=file</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#submit-button-state-(type=submit)\">4.10.5.1.18 Submit Button state (<code>type=submit</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#image-button-state-(type=image)\">4.10.5.1.19 Image Button state (<code>type=image</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#reset-button-state-(type=reset)\">4.10.5.1.20 Reset Button state (<code>type=reset</code>)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#button-state-(type=button)\">4.10.5.1.21 Button state (<code>type=button</code>)</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#input-impl-notes\">4.10.5.2 Implementation notes regarding localization of form controls</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#common-input-element-attributes\">4.10.5.3 Common <code>input</code> element attributes</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-maxlength-and-minlength-attributes\">4.10.5.3.1 The <code>maxlength</code> and <code>minlength</code> attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-size-attribute\">4.10.5.3.2 The <code>size</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-readonly-attribute\">4.10.5.3.3 The <code>readonly</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-required-attribute\">4.10.5.3.4 The <code>required</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-multiple-attribute\">4.10.5.3.5 The <code>multiple</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-pattern-attribute\">4.10.5.3.6 The <code>pattern</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-min-and-max-attributes\">4.10.5.3.7 The <code>min</code> and <code>max</code> attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-step-attribute\">4.10.5.3.8 The <code>step</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-list-attribute\">4.10.5.3.9 The <code>list</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-placeholder-attribute\">4.10.5.3.10 The <code>placeholder</code> attribute</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#common-input-element-apis\">4.10.5.4 Common <code>input</code> element APIs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#common-input-element-events\">4.10.5.5 Common event behaviors</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-button-element\">4.10.6 The <code>button</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-select-element\">4.10.7 The <code>select</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-datalist-element\">4.10.8 The <code>datalist</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-optgroup-element\">4.10.9 The <code>optgroup</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-option-element\">4.10.10 The <code>option</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-textarea-element\">4.10.11 The <code>textarea</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-output-element\">4.10.12 The <code>output</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-progress-element\">4.10.13 The <code>progress</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-meter-element\">4.10.14 The <code>meter</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-fieldset-element\">4.10.15 The <code>fieldset</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-legend-element\">4.10.16 The <code>legend</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#form-control-infrastructure\">4.10.17 Form control infrastructure</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#a-form-control&#x27;s-value\">4.10.17.1 A form control's value</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#mutability\">4.10.17.2 Mutability</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#association-of-controls-and-forms\">4.10.17.3 Association of controls and forms</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attributes-common-to-form-controls\">4.10.18 Attributes common to form controls</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#naming-form-controls:-the-name-attribute\">4.10.18.1 Naming form controls: the <code>name</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#submitting-element-directionality:-the-dirname-attribute\">4.10.18.2 Submitting element directionality: the <code>dirname</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#limiting-user-input-length:-the-maxlength-attribute\">4.10.18.3 Limiting user input length: the <code>maxlength</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#setting-minimum-input-length-requirements:-the-minlength-attribute\">4.10.18.4 Setting minimum input length requirements: the <code>minlength</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#enabling-and-disabling-form-controls:-the-disabled-attribute\">4.10.18.5 Enabling and disabling form controls: the <code>disabled</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#form-submission-attributes\">4.10.18.6 Form submission attributes</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#autofill\">4.10.18.7 Autofill</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#autofilling-form-controls:-the-autocomplete-attribute\">4.10.18.7.1 Autofilling form controls: the <code>autocomplete</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#autofill-processing-model\">4.10.18.7.2 Processing model</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#textFieldSelection\">4.10.19 APIs for the text control selections</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#constraints\">4.10.20 Constraints</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#definitions\">4.10.20.1 Definitions</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#constraint-validation\">4.10.20.2 Constraint validation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-constraint-validation-api\">4.10.20.3 The constraint validation API</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#security-forms\">4.10.20.4 Security</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#form-submission-2\">4.10.21 Form submission</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-5\">4.10.21.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#implicit-submission\">4.10.21.2 Implicit submission</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#form-submission-algorithm\">4.10.21.3 Form submission algorithm</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#constructing-form-data-set\">4.10.21.4 Constructing the entry list</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#selecting-a-form-submission-encoding\">4.10.21.5 Selecting a form submission encoding</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#converting-an-entry-list-to-a-list-of-name-value-pairs\">4.10.21.6 Converting an entry list to a list of name-value pairs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#url-encoded-form-data\">4.10.21.7 URL-encoded form data</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#multipart-form-data\">4.10.21.8 Multipart form data</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#plain-text-form-data\">4.10.21.9 Plain text form data</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-submitevent-interface\">4.10.21.10 The <code>SubmitEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-formdataevent-interface\">4.10.21.11 The <code>FormDataEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#resetting-a-form\">4.10.22 Resetting a form</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#interactive-elements\">4.11 Interactive elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-details-element\">4.11.1 The <code>details</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-summary-element\">4.11.2 The <code>summary</code> element</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#commands\">4.11.3 Commands</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#facets-2\">4.11.3.1 Facets</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#using-the-a-element-to-define-a-command\">4.11.3.2 Using the <code>a</code> element to define a command</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#using-the-button-element-to-define-a-command\">4.11.3.3 Using the <code>button</code> element to define a command</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#using-the-input-element-to-define-a-command\">4.11.3.4 Using the <code>input</code> element to define a command</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#using-the-option-element-to-define-a-command\">4.11.3.5 Using the <code>option</code> element to define a command</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command\">4.11.3.6 Using the <code>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#using-the-accesskey-attribute-to-define-a-command-on-other-elements\">4.11.3.7 Using the <code>accesskey</code> attribute to define a command on other elements</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dialog-element\">4.11.4 The <code>dialog</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scripting-3\">4.12 Scripting</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-script-element\">4.12.1 The <code>script</code> element</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#script-processing-model\">4.12.1.1 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scriptingLanguages\">4.12.1.2 Scripting languages</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements\">4.12.1.3 Restrictions for contents of <code>script</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#inline-documentation-for-external-scripts\">4.12.1.4 Inline documentation for external scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scriptTagXSLT\">4.12.1.5 Interaction of <code>script</code> elements and XSLT</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-noscript-element\">4.12.2 The <code>noscript</code> element</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-template-element\">4.12.3 The <code>template</code> element</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#template-XSLT-XPath\">4.12.3.1 Interaction of <code>template</code> elements with XSLT and XPath</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-slot-element\">4.12.4 The <code>slot</code> element</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-canvas-element\">4.12.5 The <code>canvas</code> element</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#2dcontext\">4.12.5.1 The 2D rendering context</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#implementation-notes\">4.12.5.1.1 Implementation notes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-canvas-state\">4.12.5.1.2 The canvas state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#line-styles\">4.12.5.1.3 Line styles</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text-styles\">4.12.5.1.4 Text styles</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#building-paths\">4.12.5.1.5 Building paths</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#path2d-objects\">4.12.5.1.6 <code>Path2D</code> objects</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#transformations\">4.12.5.1.7 Transformations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#image-sources-for-2d-rendering-contexts\">4.12.5.1.8 Image sources for 2D rendering contexts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#fill-and-stroke-styles\">4.12.5.1.9 Fill and stroke styles</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drawing-rectangles-to-the-bitmap\">4.12.5.1.10 Drawing rectangles to the bitmap</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drawing-text-to-the-bitmap\">4.12.5.1.11 Drawing text to the bitmap</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drawing-paths-to-the-canvas\">4.12.5.1.12 Drawing paths to the canvas</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drawing-focus-rings-and-scrolling-paths-into-view\">4.12.5.1.13 Drawing focus rings and scrolling paths into view</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drawing-images\">4.12.5.1.14 Drawing images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#pixel-manipulation\">4.12.5.1.15 Pixel manipulation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#compositing\">4.12.5.1.16 Compositing</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#image-smoothing\">4.12.5.1.17 Image smoothing</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shadows\">4.12.5.1.18 Shadows</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#filters\">4.12.5.1.19 Filters</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#working-with-externally-defined-svg-filters\">4.12.5.1.20 Working with externally-defined SVG filters</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drawing-model\">4.12.5.1.21 Drawing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#best-practices\">4.12.5.1.22 Best practices</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#examples\">4.12.5.1.23 Examples</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-imagebitmap-rendering-context\">4.12.5.2 The <code>ImageBitmap</code> rendering context</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-6\">4.12.5.2.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-imagebitmaprenderingcontext-interface\">4.12.5.2.2 The <code>ImageBitmapRenderingContext</code> interface</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-offscreencanvas-interface\">4.12.5.3 The <code>OffscreenCanvas</code> interface</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context\">4.12.5.3.1 The offscreen 2D rendering context</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#colour-spaces-and-colour-correction\">4.12.5.4 Color spaces and color space conversion</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#serialising-bitmaps-to-a-file\">4.12.5.5 Serializing bitmaps to a file</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#security-with-canvas-elements\">4.12.5.6 Security with <code>canvas</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#premultiplied-alpha-and-the-2d-rendering-context\">4.12.5.7 Premultiplied alpha and the 2D rendering context</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements\">4.13 Custom elements</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#custom-elements-intro\">4.13.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-autonomous-example\">4.13.1.1 Creating an autonomous custom element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-face-example\">4.13.1.2 Creating a form-associated custom element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-accessibility-example\">4.13.1.3 Creating a custom element with default accessible roles, states, and properties</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-customized-builtin-example\">4.13.1.4 Creating a customized built-in element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-autonomous-drawbacks\">4.13.1.5 Drawbacks of autonomous custom elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-upgrades-examples\">4.13.1.6 Upgrading elements after their creation</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-element-conformance\">4.13.2 Requirements for custom element constructors and reactions</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-core-concepts\">4.13.3 Core concepts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-elements-api\">4.13.4 The <code>CustomElementRegistry</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#upgrades\">4.13.5 Upgrades</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#custom-element-reactions\">4.13.6 Custom element reactions</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#element-internals\">4.13.7 Element internals</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-elementinternals-interface\">4.13.7.1 The <code>ElementInternals</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shadow-root-access\">4.13.7.2 Shadow root access</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#form-associated-custom-elements\">4.13.7.3 Form-associated custom elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#accessibility-semantics\">4.13.7.4 Accessibility semantics</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#common-idioms\">4.14 Common idioms without dedicated elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rel-up\">4.14.1 Breadcrumb navigation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#tag-clouds\">4.14.2 Tag clouds</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#conversations\">4.14.3 Conversations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#footnotes\">4.14.4 Footnotes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#disabled-elements\">4.15 Disabled elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#selectors\">4.16 Matching HTML elements using selectors and CSS</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#case-sensitivity-of-the-css-&#x27;attr()&#x27;-function\">4.16.1 Case-sensitivity of the CSS 'attr()' function</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#case-sensitivity-of-selectors\">4.16.2 Case-sensitivity of selectors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#pseudo-classes\">4.16.3 Pseudo-classes</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#microdata\">5 Microdata</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#introduction-7\">5.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#overview\">5.1.1 Overview</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-basic-syntax\">5.1.2 The basic syntax</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#typed-items\">5.1.3 Typed items</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#global-identifiers-for-items\">5.1.4 Global identifiers for items</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#selecting-names-when-defining-vocabularies\">5.1.5 Selecting names when defining vocabularies</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#encoding-microdata\">5.2 Encoding microdata</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-microdata-model\">5.2.1 The microdata model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#items\">5.2.2 Items</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#names:-the-itemprop-attribute\">5.2.3 Names: the <code>itemprop</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#values\">5.2.4 Values</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#associating-names-with-items\">5.2.5 Associating names with items</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#microdata-and-other-namespaces\">5.2.6 Microdata and other namespaces</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#mdvocabs\">5.3 Sample microdata vocabularies</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#vcard\">5.3.1 vCard</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#conversion-to-vcard\">5.3.1.1 Conversion to vCard</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#examples-2\">5.3.1.2 Examples</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#vevent\">5.3.2 vEvent</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#conversion-to-icalendar\">5.3.2.1 Conversion to iCalendar</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#examples-3\">5.3.2.2 Examples</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#licensing-works\">5.3.3 Licensing works</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#examples-4\">5.3.3.1 Examples</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#converting-html-to-other-formats\">5.4 Converting HTML to other formats</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#json\">5.4.1 JSON</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#editing\">6 User interaction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-hidden-attribute\">6.1 The <code>hidden</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#inert-subtrees\">6.2 Inert subtrees</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#tracking-user-activation\">6.3 Tracking user activation</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#user-activation-data-model\">6.3.1 Data model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#user-activation-processing-model\">6.3.2 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#user-activation-gated-apis\">6.3.3 APIs gated by user activation</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#activation\">6.4 Activation behavior of elements</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#focus\">6.5 Focus</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-8\">6.5.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#data-model\">6.5.2 Data model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-tabindex-attribute\">6.5.3 The <code>tabindex</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#focus-processing-model\">6.5.4 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sequential-focus-navigation\">6.5.5 Sequential focus navigation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#focus-management-apis\">6.5.6 Focus management APIs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-autofocus-attribute\">6.5.7 The <code>autofocus</code> attribute</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#assigning-keyboard-shortcuts\">6.6 Assigning keyboard shortcuts</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-9\">6.6.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-accesskey-attribute\">6.6.2 The <code>accesskey</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#keyboard-shortcuts-processing-model\">6.6.3 Processing model</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#editing-2\">6.7 Editing</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#contenteditable\">6.7.1 Making document regions editable: The <code>contenteditable</code> content attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#making-entire-documents-editable:-the-designmode-idl-attribute\">6.7.2 Making entire documents editable: the <code>designMode</code> getter and setter</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#best-practices-for-in-page-editors\">6.7.3 Best practices for in-page editors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#editing-apis\">6.7.4 Editing APIs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#spelling-and-grammar-checking\">6.7.5 Spelling and grammar checking</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#autocapitalization\">6.7.6 Autocapitalization</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute\">6.7.7 Input modalities: the <code>inputmode</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#input-modalities:-the-enterkeyhint-attribute\">6.7.8 Input modalities: the <code>enterkeyhint</code> attribute</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#find-in-page\">6.8 Find-in-page</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-10\">6.8.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#interaction-with-details\">6.8.2 Interaction with <code>details</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#interaction-with-selection\">6.8.3 Interaction with selection</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#dnd\">6.9 Drag and drop</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#event-drag\">6.9.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-drag-data-store\">6.9.2 The drag data store</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-datatransfer-interface\">6.9.3 The <code>DataTransfer</code> interface</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-datatransferitemlist-interface\">6.9.3.1 The <code>DataTransferItemList</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-datatransferitem-interface\">6.9.3.2 The <code>DataTransferItem</code> interface</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-dragevent-interface\">6.9.4 The <code>DragEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#drag-and-drop-processing-model\">6.9.5 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dndevents\">6.9.6 Events summary</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-draggable-attribute\">6.9.7 The <code>draggable</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#security-risks-in-the-drag-and-drop-model\">6.9.8 Security risks in the drag-and-drop model</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#browsers\">7 Loading web pages</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#windows\">7.1 Browsing contexts</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#creating-browsing-contexts\">7.1.1 Creating browsing contexts</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#nested-browsing-contexts\">7.1.2 Related browsing contexts</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#navigating-nested-browsing-contexts-in-the-dom\">7.1.2.1 Navigating related browsing contexts in the DOM</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#security-nav\">7.1.3 Security</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#groupings-of-browsing-contexts\">7.1.4 Groupings of browsing contexts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#browsing-context-names\">7.1.5 Browsing context names</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#cross-origin-objects\">7.2 Security infrastructure for <code>Window</code>, <code>WindowProxy</code>, and <code>Location</code> objects</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#integration-with-idl\">7.2.1 Integration with IDL</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shared-internal-slot:-crossoriginpropertydescriptormap\">7.2.2 Shared internal slot: [[CrossOriginPropertyDescriptorMap]]</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#shared-abstract-operations\">7.2.3 Shared abstract operations</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#crossoriginproperties-(-o-)\">7.2.3.1 CrossOriginProperties ( O )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#crossoriginpropertyfallback-(-p-)\">7.2.3.2 CrossOriginPropertyFallback ( P )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#isplatformobjectsameorigin-(-o-)\">7.2.3.3 IsPlatformObjectSameOrigin ( O )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)\">7.2.3.4 CrossOriginGetOwnPropertyHelper ( O, P )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#crossoriginget-(-o,-p,-receiver-)\">7.2.3.5 CrossOriginGet ( O, P, Receiver )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#crossoriginset-(-o,-p,-v,-receiver-)\">7.2.3.6 CrossOriginSet ( O, P, V, Receiver )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#crossoriginownpropertykeys-(-o-)\">7.2.3.7 CrossOriginOwnPropertyKeys ( O )</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-window-object\">7.3 The <code>Window</code> object</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#apis-for-creating-and-navigating-browsing-contexts-by-name\">7.3.1 APIs for creating and navigating browsing contexts by name</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#accessing-other-browsing-contexts\">7.3.2 Accessing other browsing contexts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#named-access-on-the-window-object\">7.3.3 Named access on the <code>Window</code> object</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#garbage-collection-and-browsing-contexts\">7.3.4 Discarding browsing contexts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#closing-browsing-contexts\">7.3.5 Closing browsing contexts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#browser-interface-elements\">7.3.6 Browser interface elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-settings-for-window-objects\">7.3.7 Script settings for <code>Window</code> objects</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-windowproxy-exotic-object\">7.4 The <code>WindowProxy</code> exotic object</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-getprototypeof\">7.4.1 [[GetPrototypeOf]] ( )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-setprototypeof\">7.4.2 [[SetPrototypeOf]] ( V )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-isextensible\">7.4.3 [[IsExtensible]] ( )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-preventextensions\">7.4.4 [[PreventExtensions]] ( )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-getownproperty\">7.4.5 [[GetOwnProperty]] ( P )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-defineownproperty\">7.4.6 [[DefineOwnProperty]] ( P, Desc )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-get\">7.4.7 [[Get]] ( P, Receiver )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-set\">7.4.8 [[Set]] ( P, V, Receiver )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-delete\">7.4.9 [[Delete]] ( P )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#windowproxy-ownpropertykeys\">7.4.10 [[OwnPropertyKeys]] ( )</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#origin\">7.5 Origin</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#sites\">7.5.1 Sites</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#relaxing-the-same-origin-restriction\">7.5.2 Relaxing the same-origin restriction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#origin-keyed-agent-clusters\">7.5.3 Origin-keyed agent clusters</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#sandboxing\">7.6 Sandboxing</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#cross-origin-opener-policies\">7.7 Cross-origin opener policies</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-headers\">7.7.1 The headers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#browsing-context-group-switches-due-to-cross-origin-opener-policy\">7.7.2 Browsing context group switches due to cross-origin opener policy</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#reporting\">7.7.3 Reporting</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#coep\">7.8 Cross-origin embedder policies</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-headers-2\">7.8.1 The headers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#embedder-policy-checks\">7.8.2 Embedder policy checks</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#policy-containers\">7.9 Policy containers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#history\">7.10 Session history and navigation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#browsing-sessions\">7.10.1 Browsing sessions</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-session-history-of-browsing-contexts\">7.10.2 The session history of browsing contexts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-history-interface\">7.10.3 The <code>History</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#history-notes\">7.10.4 Implementation notes for session history</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-location-interface\">7.10.5 The <code>Location</code> interface</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#location-getprototypeof\">7.10.5.1 [[GetPrototypeOf]] ( )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-setprototypeof\">7.10.5.2 [[SetPrototypeOf]] ( V )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-isextensible\">7.10.5.3 [[IsExtensible]] ( )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-preventextensions\">7.10.5.4 [[PreventExtensions]] ( )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-getownproperty\">7.10.5.5 [[GetOwnProperty]] ( P )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-defineownproperty\">7.10.5.6 [[DefineOwnProperty]] ( P, Desc )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-get\">7.10.5.7 [[Get]] ( P, Receiver )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-set\">7.10.5.8 [[Set]] ( P, V, Receiver )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-delete\">7.10.5.9 [[Delete]] ( P )</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#location-ownpropertykeys\">7.10.5.10 [[OwnPropertyKeys]] ( )</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#browsing-the-web\">7.11 Browsing the web</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#navigating-across-documents\">7.11.1 Navigating across documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-html\">7.11.2 Page load processing model for HTML files</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-xml\">7.11.3 Page load processing model for XML files</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-text\">7.11.4 Page load processing model for text files</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-multipart-x-mixed-replace\">7.11.5 Page load processing model for <code>multipart/x-mixed-replace</code> resources</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-media\">7.11.6 Page load processing model for media</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-plugin\">7.11.7 Page load processing model for content that uses plugins</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#read-ua-inline\">7.11.8 Page load processing model for inline content that doesn't have a DOM</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scroll-to-fragid\">7.11.9 Navigating to a fragment</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#history-traversal\">7.11.10 History traversal</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#persisted-user-state-restoration\">7.11.10.1 Persisted history entry state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-popstateevent-interface\">7.11.10.2 The <code>PopStateEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-hashchangeevent-interface\">7.11.10.3 The <code>HashChangeEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-pagetransitionevent-interface\">7.11.10.4 The <code>PageTransitionEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#loading-documents\">7.11.11 Loading documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#unloading-documents\">7.11.12 Unloading documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-beforeunloadevent-interface\">7.11.12.1 The <code>BeforeUnloadEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#aborting-a-document-load\">7.11.13 Aborting a document load</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-x-frame-options-header\">7.11.14 The `<code>X-Frame-Options</code>` header</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#webappapis\">8 Web application APIs</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#scripting\">8.1 Scripting</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-11\">8.1.1 Introduction</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#agents-and-agent-clusters\">8.1.2 Agents and agent clusters</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#integration-with-the-javascript-agent-formalism\">8.1.2.1 Integration with the JavaScript agent formalism</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#integration-with-the-javascript-agent-cluster-formalism\">8.1.2.2 Integration with the JavaScript agent cluster formalism</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#realms-and-their-counterparts\">8.1.3 Realms and their counterparts</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#environments\">8.1.3.1 Environments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#environment-settings-objects\">8.1.3.2 Environment settings objects</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#realms-settings-objects-global-objects\">8.1.3.3 Realms, settings objects, and global objects</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#entry\">8.1.3.3.1 Entry</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#incumbent\">8.1.3.3.2 Incumbent</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#current\">8.1.3.3.3 Current</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#relevant\">8.1.3.3.4 Relevant</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#enabling-and-disabling-scripting\">8.1.3.4 Enabling and disabling scripting</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#secure-contexts\">8.1.3.5 Secure contexts</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#scripting-processing-model\">8.1.4 Script processing model</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#script-structs\">8.1.4.1 Scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#fetching-scripts\">8.1.4.2 Fetching scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#creating-scripts\">8.1.4.3 Creating scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#calling-scripts\">8.1.4.4 Calling scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#killing-scripts\">8.1.4.5 Killing scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#runtime-script-errors\">8.1.4.6 Runtime script errors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#unhandled-promise-rejections\">8.1.4.7 Unhandled promise rejections</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#javascript-specification-host-hooks\">8.1.5 JavaScript specification host hooks</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#hostensurecancompilestrings(callerrealm,-calleerealm)\">8.1.5.1 HostEnsureCanCompileStrings(callerRealm, calleeRealm)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-hostpromiserejectiontracker-implementation\">8.1.5.2 HostPromiseRejectionTracker(promise, operation)</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#integration-with-javascript-jobs\">8.1.5.3 Job-related host hooks</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#hostcalljobcallback\">8.1.5.3.1 HostCallJobCallback(callback, V, argumentsList)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hostenqueuefinalizationregistrycleanupjob\">8.1.5.3.2 HostEnqueueFinalizationRegistryCleanupJob(finalizationRegistry)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hostenqueuepromisejob\">8.1.5.3.3 HostEnqueuePromiseJob(job, realm)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hostmakejobcallback\">8.1.5.3.4 HostMakeJobCallback(callable)</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#integration-with-the-javascript-module-system\">8.1.5.4 Module-related host hooks</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#hostgetimportmetaproperties\">8.1.5.4.1 HostGetImportMetaProperties(moduleRecord)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hostimportmoduledynamically(referencingscriptormodule,-modulerequest,-promisecapability)\">8.1.5.4.2 HostImportModuleDynamically(referencingScriptOrModule, moduleRequest, promiseCapability)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hostresolveimportedmodule(referencingscriptormodule,-modulerequest)\">8.1.5.4.3 HostResolveImportedModule(referencingScriptOrModule, moduleRequest)</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hostgetsupportedimportassertions\">8.1.5.4.4 HostGetSupportedImportAssertions()</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#event-loops\">8.1.6 Event loops</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#definitions-3\">8.1.6.1 Definitions</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#queuing-tasks\">8.1.6.2 Queuing tasks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#event-loop-processing-model\">8.1.6.3 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#generic-task-sources\">8.1.6.4 Generic task sources</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#event-loop-for-spec-authors\">8.1.6.5 Dealing with the event loop from other specifications</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#events\">8.1.7 Events</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#event-handler-attributes\">8.1.7.1 Event handlers</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#event-handlers-on-elements,-document-objects,-and-window-objects\">8.1.7.2 Event handlers on elements, <code>Document</code> objects, and <code>Window</code> objects</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#idl-definitions\">8.1.7.2.1 IDL definitions</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#event-firing\">8.1.7.3 Event firing</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#windoworworkerglobalscope-mixin\">8.2 The <code>WindowOrWorkerGlobalScope</code> mixin</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#atob\">8.3 Base64 utility methods</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#dynamic-markup-insertion\">8.4 Dynamic markup insertion</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#opening-the-input-stream\">8.4.1 Opening the input stream</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#closing-the-input-stream\">8.4.2 Closing the input stream</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#document.write()\">8.4.3 <code>document.write()</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#document.writeln()\">8.4.4 <code>document.writeln()</code></a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#dom-parsing-and-serialization\">8.5 DOM parsing</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#timers\">8.6 Timers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#microtask-queuing\">8.7 Microtask queuing</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#user-prompts\">8.8 User prompts</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#simple-dialogs\">8.8.1 Simple dialogs</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#printing\">8.8.2 Printing</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#system-state-and-capabilities\">8.9 System state and capabilities</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-navigator-object\">8.9.1 The <code>Navigator</code> object</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#client-identification\">8.9.1.1 Client identification</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#language-preferences\">8.9.1.2 Language preferences</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#navigator.online\">8.9.1.3 Browser state</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#custom-handlers\">8.9.1.4 Custom scheme handlers: the <code>registerProtocolHandler()</code> method</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#security-and-privacy\">8.9.1.4.1 Security and privacy</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#cookies\">8.9.1.5 Cookies</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#pdf-viewing-support\">8.9.1.6 PDF viewing support</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#images-2\">8.10 Images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#animation-frames\">8.11 Animation frames</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#comms\">9 Communication</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-messageevent-interface\">9.1 The <code>MessageEvent</code> interface</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#server-sent-events\">9.2 Server-sent events</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#server-sent-events-intro\">9.2.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-eventsource-interface\">9.2.2 The <code>EventSource</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sse-processing-model\">9.2.3 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-an-event-stream\">9.2.4 Parsing an event stream</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#event-stream-interpretation\">9.2.5 Interpreting an event stream</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#authoring-notes\">9.2.6 Authoring notes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#eventsource-push\">9.2.7 Connectionless push and other features</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#garbage-collection\">9.2.8 Garbage collection</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#implementation-advice\">9.2.9 Implementation advice</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#network\">9.3 Web sockets</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#network-intro\">9.3.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-websocket-interface\">9.3.2 The <code>WebSocket</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#feedback-from-the-protocol\">9.3.3 Feedback from the protocol</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ping-and-pong-frames\">9.3.4 Ping and Pong frames</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-closeevent-interface\">9.3.5 The <code>CloseEvent</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#garbage-collection-2\">9.3.6 Garbage collection</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#web-messaging\">9.4 Cross-document messaging</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-12\">9.4.1 Introduction</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#security-postmsg\">9.4.2 Security</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#authors\">9.4.2.1 Authors</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#user-agents\">9.4.2.2 User agents</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#posting-messages\">9.4.3 Posting messages</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#channel-messaging\">9.5 Channel messaging</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#introduction-13\">9.5.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#examples-5\">9.5.1.1 Examples</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ports-as-the-basis-of-an-object-capability-model-on-the-web\">9.5.1.2 Ports as the basis of an object-capability model on the web</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ports-as-the-basis-of-abstracting-out-service-implementations\">9.5.1.3 Ports as the basis of abstracting out service implementations</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#message-channels\">9.5.2 Message channels</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#message-ports\">9.5.3 Message ports</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#broadcasting-to-many-ports\">9.5.4 Broadcasting to many ports</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ports-and-garbage-collection\">9.5.5 Ports and garbage collection</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#broadcasting-to-other-browsing-contexts\">9.6 Broadcasting to other browsing contexts</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#workers\">10 Web workers</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#introduction-14\">10.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#scope-2\">10.1.1 Scope</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#examples-6\">10.1.2 Examples</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#a-background-number-crunching-worker\">10.1.2.1 A background number-crunching worker</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#module-worker-example\">10.1.2.2 Using a JavaScript module as a worker</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shared-workers-introduction\">10.1.2.3 Shared workers introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shared-state-using-a-shared-worker\">10.1.2.4 Shared state using a shared worker</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#delegation\">10.1.2.5 Delegation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#providing-libraries\">10.1.2.6 Providing libraries</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#tutorials\">10.1.3 Tutorials</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#creating-a-dedicated-worker\">10.1.3.1 Creating a dedicated worker</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#communicating-with-a-dedicated-worker\">10.1.3.2 Communicating with a dedicated worker</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shared-workers\">10.1.3.3 Shared workers</a></li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#infrastructure-2\">10.2 Infrastructure</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-global-scope\">10.2.1 The global scope</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-workerglobalscope-common-interface\">10.2.1.1 The <code>WorkerGlobalScope</code> common interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dedicated-workers-and-the-dedicatedworkerglobalscope-interface\">10.2.1.2 Dedicated workers and the <code>DedicatedWorkerGlobalScope</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shared-workers-and-the-sharedworkerglobalscope-interface\">10.2.1.3 Shared workers and the <code>SharedWorkerGlobalScope</code> interface</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#worker-event-loop\">10.2.2 The event loop</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-worker&#x27;s-lifetime\">10.2.3 The worker's lifetime</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worker-processing-model\">10.2.4 Processing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#runtime-script-errors-2\">10.2.5 Runtime script errors</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#creating-workers\">10.2.6 Creating workers</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-abstractworker-mixin\">10.2.6.1 The <code>AbstractWorker</code> mixin</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-settings-for-workers\">10.2.6.2 Script settings for workers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#dedicated-workers-and-the-worker-interface\">10.2.6.3 Dedicated workers and the <code>Worker</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#shared-workers-and-the-sharedworker-interface\">10.2.6.4 Shared workers and the <code>SharedWorker</code> interface</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#navigator.hardwareconcurrency\">10.2.7 Concurrent hardware capabilities</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#apis-available-to-workers\">10.3 APIs available to workers</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#importing-scripts-and-libraries\">10.3.1 Importing scripts and libraries</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-workernavigator-object\">10.3.2 The <code>WorkerNavigator</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worker-locations\">10.3.3 The <code>WorkerLocation</code> interface</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets\">11 Worklets</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#worklets-intro\">11.1 Introduction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-motivations\">11.1.1 Motivations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-idempotent\">11.1.2 Code idempotence</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-speculative\">11.1.3 Speculative evaluation</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#worklets-examples\">11.2 Examples</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-examples-loading\">11.2.1 Loading scripts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-example-registering\">11.2.2 Registering a class and invoking its methods</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#worklets-infrastructure\">11.3 Infrastructure</a></p>\n<ol>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#worklets-global\">11.3.1 The global scope</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#worklet-agents-and-event-loops\">11.3.1.1 Agents and event loops</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-creation-termination\">11.3.1.2 Creation and termination</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-settings-for-worklets\">11.3.1.3 Script settings for worklets</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-worklet\">11.3.2 The <code>Worklet</code> class</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#worklets-lifetime\">11.3.3 The worklet's lifetime</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#webstorage\">12 Web storage</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-15\">12.1 Introduction</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#storage\">12.2 The API</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-storage-interface\">12.2.1 The <code>Storage</code> interface</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-sessionstorage-attribute\">12.2.2 The <code>sessionStorage</code> getter</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-localstorage-attribute\">12.2.3 The <code>localStorage</code> getter</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-storageevent-interface\">12.2.4 The <code>StorageEvent</code> interface</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#privacy\">12.3 Privacy</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#user-tracking\">12.3.1 User tracking</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sensitivity-of-data\">12.3.2 Sensitivity of data</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#security-storage\">12.4 Security</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#dns-spoofing-attacks\">12.4.1 DNS spoofing attacks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cross-directory-attacks\">12.4.2 Cross-directory attacks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#implementation-risks\">12.4.3 Implementation risks</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#syntax\">13 The HTML syntax</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#writing\">13.1 Writing HTML documents</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-doctype\">13.1.1 The DOCTYPE</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#elements-2\">13.1.2 Elements</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#start-tags\">13.1.2.1 Start tags</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#end-tags\">13.1.2.2 End tags</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attributes-2\">13.1.2.3 Attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#optional-tags\">13.1.2.4 Optional tags</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#element-restrictions\">13.1.2.5 Restrictions on content models</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cdata-rcdata-restrictions\">13.1.2.6 Restrictions on the contents of raw text and escapable raw text elements</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#text-2\">13.1.3 Text</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#newlines\">13.1.3.1 Newlines</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#character-references\">13.1.4 Character references</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cdata-sections\">13.1.5 CDATA sections</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comments\">13.1.6 Comments</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#parsing\">13.2 Parsing HTML documents</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#overview-of-the-parsing-model\">13.2.1 Overview of the parsing model</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parse-errors\">13.2.2 Parse errors</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#the-input-byte-stream\">13.2.3 The input byte stream</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-with-a-known-character-encoding\">13.2.3.1 Parsing with a known character encoding</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#determining-the-character-encoding\">13.2.3.2 Determining the character encoding</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#character-encodings\">13.2.3.3 Character encodings</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#changing-the-encoding-while-parsing\">13.2.3.4 Changing the encoding while parsing</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#preprocessing-the-input-stream\">13.2.3.5 Preprocessing the input stream</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#parse-state\">13.2.4 Parse state</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-insertion-mode\">13.2.4.1 The insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-stack-of-open-elements\">13.2.4.2 The stack of open elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-list-of-active-formatting-elements\">13.2.4.3 The list of active formatting elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-element-pointers\">13.2.4.4 The element pointers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#other-parsing-state-flags\">13.2.4.5 Other parsing state flags</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#tokenization\">13.2.5 Tokenization</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#data-state\">13.2.5.1 Data state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rcdata-state\">13.2.5.2 RCDATA state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rawtext-state\">13.2.5.3 RAWTEXT state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-state\">13.2.5.4 Script data state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#plaintext-state\">13.2.5.5 PLAINTEXT state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#tag-open-state\">13.2.5.6 Tag open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#end-tag-open-state\">13.2.5.7 End tag open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#tag-name-state\">13.2.5.8 Tag name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rcdata-less-than-sign-state\">13.2.5.9 RCDATA less-than sign state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rcdata-end-tag-open-state\">13.2.5.10 RCDATA end tag open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rcdata-end-tag-name-state\">13.2.5.11 RCDATA end tag name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rawtext-less-than-sign-state\">13.2.5.12 RAWTEXT less-than sign state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rawtext-end-tag-open-state\">13.2.5.13 RAWTEXT end tag open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rawtext-end-tag-name-state\">13.2.5.14 RAWTEXT end tag name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-less-than-sign-state\">13.2.5.15 Script data less-than sign state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-end-tag-open-state\">13.2.5.16 Script data end tag open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-end-tag-name-state\">13.2.5.17 Script data end tag name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escape-start-state\">13.2.5.18 Script data escape start state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escape-start-dash-state\">13.2.5.19 Script data escape start dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escaped-state\">13.2.5.20 Script data escaped state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escaped-dash-state\">13.2.5.21 Script data escaped dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escaped-dash-dash-state\">13.2.5.22 Script data escaped dash dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escaped-less-than-sign-state\">13.2.5.23 Script data escaped less-than sign state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escaped-end-tag-open-state\">13.2.5.24 Script data escaped end tag open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-escaped-end-tag-name-state\">13.2.5.25 Script data escaped end tag name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-double-escape-start-state\">13.2.5.26 Script data double escape start state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-double-escaped-state\">13.2.5.27 Script data double escaped state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-double-escaped-dash-state\">13.2.5.28 Script data double escaped dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-double-escaped-dash-dash-state\">13.2.5.29 Script data double escaped dash dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-double-escaped-less-than-sign-state\">13.2.5.30 Script data double escaped less-than sign state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#script-data-double-escape-end-state\">13.2.5.31 Script data double escape end state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#before-attribute-name-state\">13.2.5.32 Before attribute name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attribute-name-state\">13.2.5.33 Attribute name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-attribute-name-state\">13.2.5.34 After attribute name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#before-attribute-value-state\">13.2.5.35 Before attribute value state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state\">13.2.5.36 Attribute value (double-quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state\">13.2.5.37 Attribute value (single-quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attribute-value-(unquoted)-state\">13.2.5.38 Attribute value (unquoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-attribute-value-(quoted)-state\">13.2.5.39 After attribute value (quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#self-closing-start-tag-state\">13.2.5.40 Self-closing start tag state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#bogus-comment-state\">13.2.5.41 Bogus comment state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#markup-declaration-open-state\">13.2.5.42 Markup declaration open state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-start-state\">13.2.5.43 Comment start state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-start-dash-state\">13.2.5.44 Comment start dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-state\">13.2.5.45 Comment state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-less-than-sign-state\">13.2.5.46 Comment less-than sign state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-less-than-sign-bang-state\">13.2.5.47 Comment less-than sign bang state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-less-than-sign-bang-dash-state\">13.2.5.48 Comment less-than sign bang dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-less-than-sign-bang-dash-dash-state\">13.2.5.49 Comment less-than sign bang dash dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-end-dash-state\">13.2.5.50 Comment end dash state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-end-state\">13.2.5.51 Comment end state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#comment-end-bang-state\">13.2.5.52 Comment end bang state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#doctype-state\">13.2.5.53 DOCTYPE state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#before-doctype-name-state\">13.2.5.54 Before DOCTYPE name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#doctype-name-state\">13.2.5.55 DOCTYPE name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-doctype-name-state\">13.2.5.56 After DOCTYPE name state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-doctype-public-keyword-state\">13.2.5.57 After DOCTYPE public keyword state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#before-doctype-public-identifier-state\">13.2.5.58 Before DOCTYPE public identifier state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state\">13.2.5.59 DOCTYPE public identifier (double-quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state\">13.2.5.60 DOCTYPE public identifier (single-quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-doctype-public-identifier-state\">13.2.5.61 After DOCTYPE public identifier state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state\">13.2.5.62 Between DOCTYPE public and system identifiers state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-doctype-system-keyword-state\">13.2.5.63 After DOCTYPE system keyword state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#before-doctype-system-identifier-state\">13.2.5.64 Before DOCTYPE system identifier state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state\">13.2.5.65 DOCTYPE system identifier (double-quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state\">13.2.5.66 DOCTYPE system identifier (single-quoted) state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#after-doctype-system-identifier-state\">13.2.5.67 After DOCTYPE system identifier state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#bogus-doctype-state\">13.2.5.68 Bogus DOCTYPE state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cdata-section-state\">13.2.5.69 CDATA section state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cdata-section-bracket-state\">13.2.5.70 CDATA section bracket state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cdata-section-end-state\">13.2.5.71 CDATA section end state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#character-reference-state\">13.2.5.72 Character reference state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#named-character-reference-state\">13.2.5.73 Named character reference state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ambiguous-ampersand-state\">13.2.5.74 Ambiguous ampersand state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#numeric-character-reference-state\">13.2.5.75 Numeric character reference state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hexadecimal-character-reference-start-state\">13.2.5.76 Hexadecimal character reference start state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#decimal-character-reference-start-state\">13.2.5.77 Decimal character reference start state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#hexadecimal-character-reference-state\">13.2.5.78 Hexadecimal character reference state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#decimal-character-reference-state\">13.2.5.79 Decimal character reference state</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#numeric-character-reference-end-state\">13.2.5.80 Numeric character reference end state</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#tree-construction\">13.2.6 Tree construction</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#creating-and-inserting-nodes\">13.2.6.1 Creating and inserting nodes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-elements-that-contain-only-text\">13.2.6.2 Parsing elements that contain only text</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#closing-elements-that-have-implied-end-tags\">13.2.6.3 Closing elements that have implied end tags</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#parsing-main-inhtml\">13.2.6.4 The rules for parsing tokens in HTML content</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-initial-insertion-mode\">13.2.6.4.1 The \"initial\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-before-html-insertion-mode\">13.2.6.4.2 The \"before html\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-before-head-insertion-mode\">13.2.6.4.3 The \"before head\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inhead\">13.2.6.4.4 The \"in head\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inheadnoscript\">13.2.6.4.5 The \"in head noscript\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-after-head-insertion-mode\">13.2.6.4.6 The \"after head\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inbody\">13.2.6.4.7 The \"in body\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-incdata\">13.2.6.4.8 The \"text\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-intable\">13.2.6.4.9 The \"in table\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-intabletext\">13.2.6.4.10 The \"in table text\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-incaption\">13.2.6.4.11 The \"in caption\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-incolgroup\">13.2.6.4.12 The \"in column group\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-intbody\">13.2.6.4.13 The \"in table body\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-intr\">13.2.6.4.14 The \"in row\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-intd\">13.2.6.4.15 The \"in cell\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inselect\">13.2.6.4.16 The \"in select\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inselectintable\">13.2.6.4.17 The \"in select in table\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-intemplate\">13.2.6.4.18 The \"in template\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-afterbody\">13.2.6.4.19 The \"after body\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inframeset\">13.2.6.4.20 The \"in frameset\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-afterframeset\">13.2.6.4.21 The \"after frameset\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-after-after-body-insertion-mode\">13.2.6.4.22 The \"after after body\" insertion mode</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode\">13.2.6.4.23 The \"after after frameset\" insertion mode</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-main-inforeign\">13.2.6.5 The rules for parsing tokens in foreign content</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#the-end\">13.2.7 The end</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#speculative-html-parsing\">13.2.8 Speculative HTML parsing</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#coercing-an-html-dom-into-an-infoset\">13.2.9 Coercing an HTML DOM into an infoset</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#an-introduction-to-error-handling-and-strange-cases-in-the-parser\">13.2.10 An introduction to error handling and strange cases in the parser</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#misnested-tags:-b-i-/b-/i\">13.2.10.1 Misnested tags: <b><i></b></i></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#misnested-tags:-b-p-/b-/p\">13.2.10.2 Misnested tags: <b><p></b></p></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#unexpected-markup-in-tables\">13.2.10.3 Unexpected markup in tables</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#scripts-that-modify-the-page-as-it-is-being-parsed\">13.2.10.4 Scripts that modify the page as it is being parsed</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-execution-of-scripts-that-are-moving-across-multiple-documents\">13.2.10.5 The execution of scripts that are moving across multiple documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#unclosed-formatting-elements\">13.2.10.6 Unclosed formatting elements</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#serialising-html-fragments\">13.3 Serializing HTML fragments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-html-fragments\">13.4 Parsing HTML fragments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#named-character-references\">13.5 Named character references</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-xhtml-syntax\">14 The XML syntax</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#writing-xhtml-documents\">14.1 Writing documents in the XML syntax</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-xhtml-documents\">14.2 Parsing XML documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#serialising-xhtml-fragments\">14.3 Serializing XML fragments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#parsing-xhtml-fragments\">14.4 Parsing XML fragments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#rendering\">15 Rendering</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-16\">15.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-css-user-agent-style-sheet-and-presentational-hints\">15.2 The CSS user agent style sheet and presentational hints</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#non-replaced-elements\">15.3 Non-replaced elements</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#hidden-elements\">15.3.1 Hidden elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-page\">15.3.2 The page</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#flow-content-3\">15.3.3 Flow content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#phrasing-content-3\">15.3.4 Phrasing content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#bidi-rendering\">15.3.5 Bidirectional text</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#sections-and-headings\">15.3.6 Sections and headings</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#lists\">15.3.7 Lists</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#tables-2\">15.3.8 Tables</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#margin-collapsing-quirks\">15.3.9 Margin collapsing quirks</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#form-controls\">15.3.10 Form controls</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-hr-element-2\">15.3.11 The <code>hr</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-fieldset-and-legend-elements\">15.3.12 The <code>fieldset</code> and <code>legend</code> elements</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#replaced-elements\">15.4 Replaced elements</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#embedded-content-rendering-rules\">15.4.1 Embedded content</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#images-3\">15.4.2 Images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attributes-for-embedded-content-and-images\">15.4.3 Attributes for embedded content and images</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#image-maps-2\">15.4.4 Image maps</a></li>\n</ol>\n</li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#widgets\">15.5 Widgets</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#introduction-17\">15.5.1 Introduction</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#button-layout\">15.5.2 Button layout</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-button-element-2\">15.5.3 The <code>button</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-details-and-summary-elements\">15.5.4 The <code>details</code> and <code>summary</code> elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-a-text-entry-widget\">15.5.5 The <code>input</code> element as a text entry widget</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-domain-specific-widgets\">15.5.6 The <code>input</code> element as domain-specific widgets</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-a-range-control\">15.5.7 The <code>input</code> element as a range control</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-a-colour-well\">15.5.8 The <code>input</code> element as a color well</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-a-checkbox-and-radio-button-widgets\">15.5.9 The <code>input</code> element as a checkbox and radio button widgets</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-a-file-upload-control\">15.5.10 The <code>input</code> element as a file upload control</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-input-element-as-a-button\">15.5.11 The <code>input</code> element as a button</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-marquee-element-2\">15.5.12 The <code>marquee</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-meter-element-2\">15.5.13 The <code>meter</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-progress-element-2\">15.5.14 The <code>progress</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-select-element-2\">15.5.15 The <code>select</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-textarea-element-2\">15.5.16 The <code>textarea</code> element</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#frames-and-framesets\">15.6 Frames and framesets</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#interactive-media\">15.7 Interactive media</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#links,-forms,-and-navigation\">15.7.1 Links, forms, and navigation</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#the-title-attribute-2\">15.7.2 The <code>title</code> attribute</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#editing-hosts\">15.7.3 Editing hosts</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text-rendered-in-native-user-interfaces\">15.7.4 Text rendered in native user interfaces</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#print-media\">15.8 Print media</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#unstyled-xml-documents\">15.9 Unstyled XML documents</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#obsolete\">16 Obsolete features</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#obsolete-but-conforming-features\">16.1 Obsolete but conforming features</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#warnings-for-obsolete-but-conforming-features\">16.1.1 Warnings for obsolete but conforming features</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#non-conforming-features\">16.2 Non-conforming features</a></li>\n<li>\n<p><a href=\"https://html.spec.whatwg.org/#requirements-for-implementations\">16.3 Requirements for implementations</a></p>\n<ol>\n<li><a href=\"https://html.spec.whatwg.org/#the-marquee-element\">16.3.1 The <code>marquee</code> element</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#frames\">16.3.2 Frames</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\">16.3.3 Other elements, attributes and APIs</a></li>\n</ol>\n</li>\n<li><a href=\"https://html.spec.whatwg.org/#iana\">17 IANA considerations</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text/html\">17.1 <code>text/html</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#multipart/x-mixed-replace\">17.2 <code>multipart/x-mixed-replace</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#application/xhtml+xml\">17.3 <code>application/xhtml+xml</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text/ping\">17.4 <code>text/ping</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#application/microdata+json\">17.5 <code>application/microdata+json</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#text/event-stream\">17.6 <code>text/event-stream</code></a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cross-origin-embedder-policy\">17.7 `<code>Cross-Origin-Embedder-Policy</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cross-origin-embedder-policy-report-only\">17.8 `<code>Cross-Origin-Embedder-Policy-Report-Only</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cross-origin-opener-policy-2\">17.9 `<code>Cross-Origin-Opener-Policy</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#cross-origin-opener-policy-report-only\">17.10 `<code>Cross-Origin-Opener-Policy-Report-Only</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#origin-agent-cluster\">17.11 `<code>Origin-Agent-Cluster</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ping-from\">17.12 `<code>Ping-From</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ping-to\">17.13 `<code>Ping-To</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#refresh\">17.14 `<code>Refresh</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#last-event-id\">17.15 `<code>Last-Event-ID</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#x-frame-options\">17.16 `<code>X-Frame-Options</code>`</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#web+-scheme-prefix\">17.17 <code>web+</code> scheme prefix</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#index\">Index</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#elements-3\">Elements</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#element-content-categories\">Element content categories</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#attributes-3\">Attributes</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#element-interfaces\">Element Interfaces</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#all-interfaces\">All Interfaces</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#events-2\">Events</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#mime-types-2\">MIME Types</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#references\">References</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#acknowledgments\">Acknowledgments</a></li>\n<li><a href=\"https://html.spec.whatwg.org/#ipr\">Intellectual property rights</a></li>\n</ol>"},{"url":"/docs/docs/no-whiteboarding/","relativePath":"docs/docs/no-whiteboarding.md","relativeDir":"docs/docs","base":"no-whiteboarding.md","name":"no-whiteboarding","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>A - C\n\n</h2>\n<ul>\n<li><a href=\"https://www.ableton.com/en/about\">Ableton</a> | Berlin, Germany | Take-home programming task (discussed via Skype), then pair programming and debugging session on-site</li>\n<li><a href=\"https://angel.co/abstract/jobs\">Abstract</a> | San Francisco, CA</li>\n<li><a href=\"https://www.accenture.com/us-en/careers\">Accenture</a> | San Francisco, CA / Los Angeles, CA / New York, NY | Technical phone discussion with architecture manager, followed by behavioral interview focusing on soft skills</li>\n<li><a href=\"https://www.accredible.com/careers\">Accredible</a> | Cambridge, UK / San Francisco, CA / Remote | Take home project, then a pair-programming and discussion onsite / Skype round.</li>\n<li><a href=\"https://acko.com/\">Acko</a> | Mumbai, India | Phone interview, followed by a small take home problem. Finally a F2F or skype pair programming session</li>\n<li><a href=\"http://www.acumenci.com/joinourteam\">Acumen</a> | London, UK | Small take home test, and sit in on some sprint rituals on-site</li>\n<li><a href=\"https://www.addstones.com/\">Addstones</a> | Paris, FR / Singapore, SG / Bucharest, RO / London, UK | Multiple interviews, discussion of technical background and experiences. Sometimes we do a on-site unsupervised small exercise.</li>\n<li><a href=\"https://adnymics.com/\">Adnymics</a> | Munich, DE | Take home project, then work with the team for a day</li>\n<li><a href=\"http://adthena.com/\">Adthena</a> | London, UK | Takehome project and discussion on-site</li>\n<li><a href=\"https://angel.co/adwyze/jobs\">AdWyze</a> | Bangalore, India | Short takehome project + (for fulltime) onsite pairing</li>\n<li><a href=\"https://www.aerofs.com/company/careers\">AeroFS</a> | San Francisco, CA | Short takehome project + phone interview</li>\n<li><a href=\"https://affinity.recruiterbox.com/#content\">Affinity</a> | San Francisco, CA | Implementation of a children's game, then take-home project OR real-world design questions</li>\n<li><a href=\"https://ageno.pl/\">Ageno</a> | Bielsko-Biala, Poland | Simple Magento Take-home project and discussion on the real world problems.</li>\n<li><a href=\"https://angel.co/agilemd/jobs\">AgileMD</a> | San Francisco, CA | Takehome project</li>\n<li><a href=\"https://careersatagoda.com/departments/technology\">Agoda</a> | Bangkok, Thailand | Take-home project, then a discussion onsite round.</li>\n<li><a href=\"https://agrilyst.com/\">Agrilyst</a> | New York, NY / Remote | Short takehome project &#x26; remote pairing</li>\n<li><a href=\"https://airbrake.io/\">Airbrake</a> | San Francisco, CA / Remote | Take-home project &#x26; pair on a problem similar to daily work</li>\n<li><a href=\"http://aiwip.com/\">Aiwip</a> | London, UK | Skype/phone interview followed by takehome project or worksample (or whiteboard)</li>\n<li><a href=\"http://ajira.tech/\">Ajira</a> | Chennai, India / Austin, TX | Take home project, then pair programming, technical discussions, cultural fit</li>\n<li><a href=\"https://www.algolia.com/careers\">Algolia</a> | Paris, France / San Francisco, CA | Takehome project &#x26; Onsite discussions and presentation</li>\n<li><a href=\"https://www.allaboutapps.at/jobs\">all about apps GmbH</a> | Vienna, Austria | 2-phase technical discussion &#x26; examination with department heads and management.</li>\n<li><a href=\"https://allegro.pl/praca\">Allegro</a> | Warsaw, Poland; Poznan, Poland; Torun, Poland; Wroclaw, Poland; Krakow, Poland | Take home, simple project. Series of 2 technical interviews (how to build things, how to solve specific, real world problem) and meeting with a team leader.</li>\n<li><a href=\"https://alluvium.io/\">Alluvium</a> | Brooklyn, NY | Take-home assignment, on-site review dovetailing into collaborative project planning for extension.</li>\n<li><a href=\"https://engineering.alphasights.com/\">AlphaSights</a> | London, UK / New York, NY / Remote | Initial interview, pair programming then final round with general technical questions</li>\n<li><a href=\"https://amagi.io/\">AMAGI</a> | Makati, Philippines | 1) Review of your resume, portfolio, and/or GitHub profile; 2) 1 hour discussion (in-person or Skype) about your goals, experience, personal culture, and how to apply technical solutions to real problems;</li>\n<li><a href=\"https://gastrograph.com/\">Analytical Flavor Systems</a> | Manhattan, New York | Code sample or take-home project, both with discussion.</li>\n<li><a href=\"https://apolloagriculture.com/\">Apollo Agriculture</a> | Nairobi, Kenya/Remote | Takehome project or Worksample (or whiteboard)</li>\n<li><a href=\"https://www.beapplied.com/\">Applied</a> | London, UK | Situational judgement tests focusing on real-world soft skills (online then in structured interview)</li>\n<li><a href=\"https://angel.co/arachnys/jobs/220465-software-engineer\">Arachnys</a> | London, UK | Take home test, real world pair programming</li>\n<li><a href=\"https://articulate.com/company/careers\">Articulate</a> | Remote | Take-home project &#x26; pair program on a problem similar to daily work</li>\n<li><a href=\"https://www.artsy.net/jobs#engineering\">Artsy</a> | New York, NY / London, UK / Berlin, Germany / Los Angeles, CA / Hong Kong, Hong Kong / Remote | Our process: 1) Informal chat 2) Application 3) Phone screen 4) In-person interview with 1 lead, 2 individual contributors and 1 non-engineer (30-45 mins each), focusing on your work habits and expertise as demonstrated in your previous work 5) ~4 in-depth professional reference calls (30-45 mins each).</li>\n<li><a href=\"https://www.asidatascience.com/careers\">ASI Data Science</a> | London, UK | Project to work at home, general technical questions, pair programming with engineers</li>\n<li><a href=\"https://jobs.asos.com/epostings/index.cfm?fuseaction=app.jobsearch&#x26;company_id=30071&#x26;version=1&#x26;byBusinessUnit=5\">ASOS</a> | London, UK | Take home or in-person code refactoring exercise, in-person walk-though of solution including software crafstmanship principles and design decisions, in-person freestyle architecture walk-through</li>\n<li><a href=\"https://jobs.ataccama.com/\">Ataccama</a> | Prague, Czech Republic | Face to face interview (skype or onsite), coding task for 30 min, meeting with team members</li>\n<li><a href=\"https://atech.media/\">aTech Media</a> | London, UK | Face to face interview, review of existing open source contributions or, if none are available, asked to write a library for something that interests them</li>\n<li><a href=\"https://auraframes.com/jobs?gh_src=2ef5cfa32\">Aura Frames</a> | New York, NY / San Francisco, CA | Simplified real-world coding task on Coderpad.io, followed by a few hours onsite writing code in our actual codebase.</li>\n<li><a href=\"https://www.aurorasolar.com/careers\">Aurora Solar</a> | San Francisco, CA | Our process: 1) Initial phone call 2) 1 hour take home project in CoderPad along with a few essay questions relating to JavaScript, testing, etc. 3) Remote pairing session solving a problem similar to day to day work. 4) In-person interview with additional pairing exercise done on a laptop as well as culture interviews.</li>\n<li><a href=\"https://auth0.com/blog/how-we-hire-engineers\">Auth0</a> | Bellevue, WA / Buenos Aires, Argentina / Remote | Series of interviews, go over technical background and past experiences, take-home project</li>\n<li><a href=\"https://www.auto1-group.com/jobs\">Auto1</a> | Berlin, DE | Series of Skype interviews which covers general technical questions, followed by a take-home assignment</li>\n<li><a href=\"https://automattic.com/work-with-us\">Automattic</a> | Remote | short take-home real-world task, then a few weeks-long real-world, part-time, and paid project on production code</li>\n<li><a href=\"https://github.com/AutoScout24/hiring\">AutoScout24</a> | Munich, Germany | Skype interview followed by home assignment from our day-to-day business and then on-site interview including lunch with a team</li>\n<li><a href=\"https://avant.com/jobs\">Avant</a> | Chicago, IL | Pair programming interviews.</li>\n<li><a href=\"https://www.avarteq.com/career\">Avarteq GmbH</a> | Berlin, Germany / Saarbrücken, Germany | Technical interview with our developers on-site or remote followed by a work sample in a pair programming session or a previous take-home project with a follow-up discussion and detailed feedback.</li>\n<li><a href=\"https://www.avocarrot.com/company\">Avocarrot</a> | Athens, Greece | on-site real world problem discussion and pair programming</li>\n<li><a href=\"https://www.axelerant.com/careers\">Axelerant</a> | Remote | Take-home project, interviews with hr and engineering team.</li>\n<li><a href=\"https://axiacore.com/\">Axiacore</a> | Bogota, Colombia | We talk about on how is your process when solving problems.</li>\n<li><a href=\"https://www.axios.com/about#jobs\">Axios</a> | Arlington, VA / New York, NY / San Francisco, CA / Remote | Take-home project, with discussion.</li>\n<li><a href=\"https://boards.greenhouse.io/b12#.WMlLfRIrJTa\">B12</a> | New York, NY | Take-home exercises and pair-programming with the team.</li>\n<li><a href=\"http://somos.b2wdigital.com/bit\">B2W Digital</a> | Rio de Janeiro, Brazil; São Paulo, Brazil | Time-boxed coding exercise at home, on-site pair programming with engineers and live software architecture challenges based on real situations.</li>\n<li><a href=\"https://github.com/Babylonpartners/iOS-Interview-Demo\">Babylon Health iOS Team</a> | London, UK | Take-home project, on-site presentation and discussion, design and product interview.</li>\n<li><a href=\"http://careers.backbase.com/\">Backbase</a> | Amsterdam, Netherlands; Cardiff, Wales; London, UK; Atlanta, GA | Takehome project, interviews</li>\n<li><a href=\"https://jobs.badi.com/\">Badi</a> | Barcelona, Spain | Phone Screen, Take-home project, then a discussion onsite round.</li>\n<li><a href=\"https://team.badoo.com/jobs\">Badoo</a> | London, UK | Take-home project, then a discussion onsite round.</li>\n<li><a href=\"https://career012.successfactors.eu/sfcareer/jobreqcareer?jobId=46145&#x26;company=BAE\">BAE Systems Applied Intelligence</a> | London, UK | Initial interview with experience based technical questions, second interview pair programming on problem similar to daily work</li>\n<li><a href=\"https://bakkenbaeck.com/jobs\">Bakken &#x26; Bæck</a> | Oslo, Norway; Amsterdam, Netherlands; Bonn, Germany | Skype interview followed by take-home assignment and a visit to one of our offices</li>\n<li><a href=\"https://career.balabit.com/\">Balabit</a> | Budapest, Hungary | Take-home project (medium size, with restrictions, e.g. only stdlib may be used), then discussion on-site</li>\n<li><a href=\"https://www.barracuda.com/company/careers\">Barracuda View Team</a> | Chelmsford, MA / Remote | Phone screen, remote pair programming session, technical discussion interview, culture fit interview</li>\n<li><a href=\"https://basecamp.com/about/jobs\">Basecamp</a> | Chicago, IL / Remote</li>\n<li><a href=\"https://beam.dental/jobs\">Beam Dental</a> | Columbus, OH | Phone Screen, Take Home Project, In-Person Pairing and Cross-Functional Interview</li>\n<li><a href=\"http://belka.us/lavora-con-no\">Belka</a> | Trento, Italy; Munich, Germany | We give you a small task that you can do alone and then we evaluate your work with you</li>\n<li><a href=\"https://bemind.recruitee.com/\">Bemind Interactive</a> | Biella, Italy / Latina, Italy / Remote | Series of interviews, discussion about technical background and past experiences, take-home project &#x26; pair programming</li>\n<li><a href=\"https://bendyworks.com/careers\">Bendyworks</a> | Madison, WI | Interviews and pair programming on personal projects</li>\n<li><a href=\"https://www.betterment.com/careers\">Betterment</a> | New York, NY | Phone interview followed by on-site pair programming to simulate a Betterment feature build.</li>\n<li><a href=\"https://www.betterpt.com/\">BetterPT</a> | New York, NY | Initial phone interview, project using our tech stack, on-site code review/pair programming and \"meet the team\".</li>\n<li><a href=\"https://www.bignerdranch.com/about/careers\">Big Nerd Ranch</a> | Atlanta, GA &#x26; Remote | Interviews and pair programming on an internal project or problem.</li>\n<li><a href=\"https://www.bioconnect.com/company/careers\">BioConnect</a> | Toronto, Canada | Take-home assignment &#x26; discussion</li>\n<li><a href=\"https://www.bitexpert.de/karriere\">bitExpert AG</a> | Mannheim, Germany | Interview with experience based technical questions</li>\n<li><a href=\"https://www.bitsoflove.be/careers\">Bits of Love</a> | Bruges, Belgium | In-person interview to evaluate experience and motivation, potentially followed by take-home project.</li>\n<li><a href=\"http://blackdotsolutions.com/\">Blackdot Solutions</a> | Cambridge, UK | Take-home project followed by on-site face-to-face walkthru of your code focusing on decisions/reasoning/technology used.</li>\n<li><a href=\"http://bleacherreport.com/\">Bleacher Report</a> | San Francisco, CA, USA | Take-home project; on-site discussion about the project and meeting with different teams</li>\n<li><a href=\"https://blendle.homerun.co/?lang=en\">Blendle</a> | Utrecht, The Netherlands | Take-home project &#x26; pair program on a problem similar to daily work</li>\n<li><a href=\"https://github.com/blogfoster/join-the-engineering-team\">blogfoster</a> | Berlin, Germany | Take-home project, discussion on-site</li>\n<li><a href=\"https://www.bluebottlecoffee.com/careers\">Blue Bottle Coffee</a> | Oakland, CA | Technical Phone Screen, Take Home Challenge, Technical in-persons.</li>\n<li><a href=\"http://www.bluesoft.com.br/\">Bluesoft</a> | São Paulo, Brazil | Takehome project and an interview to evaluate the candidate's previous experience.</li>\n<li><a href=\"https://bocoup.com/careers\">Bocoup</a> | Boston, MA / Remote | Pair programming with personal laptop on typical problem seen at work</li>\n<li><a href=\"http://careers.bolste.com/\">Bolste</a> | Phoenix, AZ | Conversational in-person interviews with team members and pair programming through real world problems</li>\n<li><a href=\"https://www.bookingsync.com/en/jobs\">BookingSync</a> | Remote | Small takehome project, interviews over skype with team members.</li>\n<li><a href=\"http://boomtownroi.com/\">BoomTown</a> | Charleston, SC / Atlanta, GA / Remote | Conversational in-person interviews with potential team members and managers that revolve around past experience and how that could be applied to future work</li>\n<li><a href=\"http://www.bouvet.no/\">Bouvet</a> | Bergen, Norway | Pair programming with senior engineers</li>\n<li><a href=\"https://brainn.co/\">brainn.co</a> | São Paulo, BR | Zoom/On-site interview, take-home project and interview with a team leader.</li>\n<li><a href=\"http://brainstation-23.com/\">BrainStation-23</a> | Dhaka, BD | A practical project followed by series of in-person interview sessions</li>\n<li><a href=\"https://breather.com/jobs\">Breather</a> | Montreal, Canada | Series of interviews including a conversation about the candidate's experience and a technical discussion involving real world problems</li>\n<li><a href=\"http://www.brightbytes.net/careers\">BrightBytes</a> | San Francisco, CA | Time-boxed coding exercise at home and on-site pair programming with engineers</li>\n<li><a href=\"https://www.brighthr.com/careers\">BrightHR</a> | Manchester, UK | Telephone conversation, coding exercise at home, on-site pairing with a cultural interview, meet the team.</li>\n<li><a href=\"https://angel.co/brightwheel/jobs\">brightwheel</a> | San Francisco, CA | Take home exercise, and systems design.</li>\n<li><a href=\"https://www.broadinstitute.org/data-sciences-platform\">Broad Institute's Data Sciences Platform</a> | Cambridge, MA | Phone screen, small take home project, both a technical and non-technical discussion panel, and a panel following up on the take home project walking through the solution and making a modification to the original code</li>\n<li><a href=\"https://www.bubbl.in/about\">Bubblin Superbooks</a> | Remote | View code, projects, libraries or any other open source story that you have been a part of, a small take-home project with real code occasionally.</li>\n<li><a href=\"https://buffer.com/journey\">Buffer</a> | Remote | Interviews over video call, code walkthrough of real code focussing on decisions and reasoning, then a 45 day full time, fully paid contract project working on production code.</li>\n<li><a href=\"https://www.bugcrowd.com/about/careers/\">Bugcrowd</a> | San Francisco, CA / Sydney, NSW | Take home exercise, half-day onsite walking through code, and pair programming.</li>\n<li><a href=\"http://www.buhlergroup.com/\">Buhler Group</a> | Prague, CZ | Interview with a couple of technical questions. No task needed. Depending on the team there is another round with the guys in the HQ via skype.</li>\n<li><a href=\"https://www.bulb.co.uk/\">Bulb</a> | London, UK | Phone screening, followed by a 2-4 hours take home task. If successful, on-site interview to discuss and extend with the reviewer and one other engineer, followed by 2x informal \"Meet the team\" interviews.</li>\n<li><a href=\"https://www.busbud.com/en/careers\">Busbud</a> | Montreal, Canada | Phone screening, followed by a 2-4 hours take home assignment. If the challenge is a success, on-site or remote interview with team members, including someone who reviewed it, to talk about it and potential next steps if the challenge was a real life task.</li>\n<li><a href=\"https://www.bustle.com/labs\">Bustle</a> | New York City, Ny / Remote | Half day pair programming on a task for production or one of our Open Source projects. We'll also buy you lunch with the team.</li>\n<li><a href=\"https://www.busuu.com/jobs\">busuu</a> | London, UK | Video call to show real code as first stage. In office pair programming, white board real world problem that we've encountered before, and history/experience discussion.</li>\n<li><a href=\"https://buttercms.com/\">ButterCMS</a> | Chicago, IL; Remote | Take home exercise and half-day of pair programming</li>\n<li><a href=\"https://www.bybox.com/company/careers/\">ByBox</a> | Remote | Phone interview followed by interview with devs (ideally in person but sometimes Skype) covering technical experience and coding exercise with real code.</li>\n<li><a href=\"http://careers.caci.com/ListJobs/All/Search/location/rome/state/ny/country/us\">CACI Rome</a> | Rome, NY; Remote | Phone interview followed by in-person or Skype screen sharing interview with a coding exercise in either Java, web (Node.js + frontend), or both. Interview format is exclusive to the Rome, NY office and may not be shared by other regional CACI offices.</li>\n<li><a href=\"http://www.cakesolutions.net/careers\">Cake Solutions</a> | Manchester, UK; London, UK; New York, NY | Skype / Hangouts / phone call to explain the technical background, current position and set expectations about the salary, relocation, etc; if all good, what to expect next. Then take-home exercise for roughly 4 hours to demonstrate good thinking and ability to pick up new things, explain &#x26; document the solution, finishing with pair programming with senior developers (remote or in person); use the code as a talking point around the more difficult things after getting through the simple starter tasks.</li>\n<li><a href=\"https://www.uk.capgemini.com/\">Capgemini UK Java Team</a> | London, UK; Woking, UK; Bristol, UK; Cardiff, Wales; Birmingham, UK; Manchester, UK; Leeds, UK; Rotherham, UK; Liverpool, UK; Newcastle, UK; Edinburgh, Scotland; Glasgow, Scotland | Technical telephone interview (30 minutes), take-home non-CompSci coding exercise (3-4 hours), face-to-face role-played consulting scenario involving a solution architecture and a delivery plan (two hours)</li>\n<li><a href=\"http://www.caravelo.com/softdev\">Caravelo</a> | Barcelona, Spain | Take home project, then technical discussion about the code in-person or Skype and hang out with the team.</li>\n<li><a href=\"http://www.cartegraph.com/company/careers/\">Cartegraph</a> | Dubuque, IA / Remote | Phone screen, hiring manager interview, small take-home coding project, and team code review/interview</li>\n<li><a href=\"http://www.carto.com/careers/\">CARTO</a> | Madrid, Spain | Phone screen, take-home project, team code review/interview, hiring manager interview</li>\n<li><a href=\"https://casetext.com/jobs\">Casetext</a> | San Francisco, CA | Submit code sample for review/discussion, contract for one full day (paid)</li>\n<li><a href=\"https://cashlink.de/\">CASHLINK</a> | Frankfurt, Germany | Skype/phone interview, take-home project</li>\n<li><a href=\"http://www.causeway.com/content/opportunity\">Causeway</a> | United Kingdom, India | Skype or Telephonic discussion on approaches and experience in regards to solve projects related work, then face to face round to write small solutions to common problems in related field.</li>\n<li><a href=\"https://centroida.co/contact.html\">Centroida</a> | Sofia, Bulgaria | Series of interviews, pair programming and take-home projects</li>\n<li><a href=\"http://chainreaction.io/\">Chain.Reaction</a> | Budapest, Hungary | Partnership-fit discussion, code-review and trial days.</li>\n<li><a href=\"https://chargify.com/jobs\">Chargify</a> | San Antonio, TX / Remote | Take-home project &#x26; pair on a problem similar to daily work</li>\n<li><a href=\"https://checkout51.com/jobs\">Checkout 51</a> | Toronto, Canada | Phone conversation (15-20 minutes) followed by on-site pair programming and discussion focused on understanding decisions made during on-site work</li>\n<li><a href=\"http://ctic-inc.com/careers/\">Chesapeake Technology</a> | Denver, CO / Santa Barbara, CA / Camarillo, CA / Dulles, VA / California, MD / Remote | Phone screen (30 minutes), take home at leisure question based on real development followed by in person review of solution and general technical questions with actual team and opportunity for you to ask questions and provide feedback ( 2-3 hours)</li>\n<li><a href=\"https://circleci.com/\">CircleCI</a> | San Francisco, CA / Remote | Take-home project and discussion, followed by on-site interview that includes pair programming on actual CircleCI bugs/feature requests.</li>\n<li><a href=\"https://boston.gov/analytics\">City of Boston's Analytics Team</a> | Boston, MA | Take-home project and in-person or phone/Skype interviews</li>\n<li><a href=\"https://beta.phila.gov/departments/office-of-open-data-and-digital-transformation/jobs\">City of Philadelphia's Office of Open Data &#x26; Digital Transformation</a> | Philadelphia, PA | Take-home project</li>\n<li><a href=\"https://www.civisanalytics.com/careers\">Civis Analytics</a> | Chicago, IL | Take-home project and discussion via Skype, followed by pair programming exercise</li>\n<li><a href=\"http://jobs.cj.com/jobs/category/engineering/\">CJ Affiliate</a> | Los Angeles, CA &#x26; Westlake Village, CA | Phone coding design exercise (no algorithms), followed by an on-site final interview that includes pair programming on a realistic object-oriented design problem</li>\n<li><a href=\"https://clara.com/careers\">Clara Lending</a> | San Francisco, CA | Phone conversation around technical background and experience, followed by take-home project, pair programming and discussion</li>\n<li><a href=\"https://angel.co/clerkie/jobs\">Clerkie</a> | San Francisco, CA | Phone conversation followed by take-home project</li>\n<li><a href=\"https://www.clickmagick.com/\">ClickMagick</a> | Austin, TX / Remote | Phone conversations and examples of Free Software/Open Source work</li>\n<li><a href=\"https://clippings.com/\">Clippings</a> | Sofia, Bulgaria | Video screening first, then send us code they've recently wrote, then technical interview. We could ask questions about the code they wrote at home.</li>\n<li><a href=\"https://www.cwconsult.dk/\">Clockwork Consulting</a> | Copenhagen, Denmark | Interviews, discussion of technical background and experiences.</li>\n<li><a href=\"https://www.cloudistics.com/careers\">Cloudistics</a> | Reston, VA | Multiple interviews, discussion of technical background and experiences.</li>\n<li><a href=\"https://www.clubhouse.io/hiring\">Clubhouse</a> | New York, NY &#x26; Remote | Phone interview, followed by onsite discussions and pair programming</li>\n<li><a href=\"https://www.cogent.co.jp/\">Cogent Labs</a> | Tokyo, Japan | On-site or video call conversation around technical background and experience, followed by take-home project that resembles a problem Cogent Labs solves for. This project will serve as the base of discussion with the developers for the second interview.</li>\n<li><a href=\"https://www.cognitect.com/jobs\">Cognitect, Inc.</a> | Remote | Phone interview followed by pair programming.</li>\n<li><a href=\"http://www.cognitran.com/employment-opportunities\">Cognitran</a> | Essex, UK / Szczecin, Poland / Detroit, MI | Skype/phone interview followed by pair programming.</li>\n<li><a href=\"https://www.collabora.com/careers.html\">Collabora</a> | Cambridge, UK / Montreal, Canada / Remote | On-site or video interview, discussion of technical experience and sometimes approach for tackling a hypothetical problem.</li>\n<li><a href=\"https://www.compeon.de/karriere\">COMPEON</a> | Duesseldorf, Germany | Phone interview, followed by onsite discussions and pair programming with our developers</li>\n<li><a href=\"http://about.cph.org/careers.html\">Concordia Publishing House</a> | St Louis, MO | Take-home project followed by discussion of it on-site with future teammates.</li>\n<li><a href=\"http://contactlab.com/en/careers\">Contactlab</a> | Milan, Italy | Recruiter interview, tech interview (technical background and experiences), both on-site.</li>\n<li><a href=\"https://www.contentful.com/careers\">Contentful</a> | Berlin, Germany &#x26; SF, USA | Multiple interviews, discussion of technical background &#x26; live coding challenge (you can use the internet).</li>\n<li><a href=\"https://www.contentsquare.com/careers\">ContentSquare</a> | Paris, France | Real-world challenges with open discussions.</li>\n<li><a href=\"https://cookpad.com/us\">Cookpad</a> | Tokyo, Japan; Bristol, UK | Interviews, discussion of technical background and experiences, remotely pair with devs.</li>\n<li><a href=\"https://www.coorpacademy.com/\">Coorp Academy</a> | Paris, France | Technical interview as an open discussion</li>\n<li><a href=\"https://www.coverhound.com/\">CoverHound, Inc.</a> | San Francisco, CA | Open technical discussion, short on-site coding challenge.</li>\n<li><a href=\"https://creditkudos.com/jobs\">Credit Kudos</a> | London, UK | Take-home project and pair programming via Skype or on-site.</li>\n<li><a href=\"https://crossbrowsertesting.com/\">CrossBrowserTesting</a> | Memphis, TN | Take home project that resembles a problem support engineers deal with on a daily basis. On-Site interviews in a comfortable environement with a focus on hiring talented people vs exact skill-sets.</li>\n<li><a href=\"https://jobs.jobvite.com/careers/crowdstrike/jobs\">Crowdstrike</a> | Remote | Multiple interviews onsite or remote as appropriate followed by small take-home project.</li>\n<li><a href=\"https://crownstone.rocks/jobs\">Crownstone</a> | Rotterdam, Netherlands | Technical interaction using previously created Github projects, followed by in-person interview with a focus on someone's professional ambition in the short and long term.</li>\n<li><a href=\"https://www.cube19.com/work-with-us/\">cube19</a> | London, UK | Take-home project, then an on-site discussion about the code and previous experience.</li>\n<li><a href=\"https://cultivatehq.com/\">Cultivate</a> | Edinburgh, UK | 30 minute pair-programming screening interview on a simple exercise (remote or in-person). Half day pair programming, with 3 or 4 different team members plus informal chat, typically on-site.</li>\n<li><a href=\"https://www.culturefoundry.com/\">Culture Foundry</a> | Austin, TX | Paid take-home project</li>\n<li><a href=\"https://www.currencytransfer.com/\">CurrencyTransfer</a> | London, UK &#x26; Remote | Take-home project</li>\n</ul>\n<h2>D - F</h2>\n<ul>\n<li><a href=\"https://darksky.net/jobs\">Dark Sky</a> | Cambridge, MA | Phone interviews and a very short, real paid project</li>\n<li><a href=\"http://www.datatheorem.com/\">Data Theorem</a> | Palo Alto, CA; Paris, Fr; Bangladesh, India | Phone interview, then a take home project and finally in-person interview.</li>\n<li><a href=\"https://datalogue.github.io/recruiting\">Datalogue</a> | Montreal, Canada | We Ask candidates to contribute meaningfully to an Open source project that reflects the stack they will be working with and send us a link to the PR.</li>\n<li><a href=\"https://datamade.us/\">DataMade</a> | Chicago, IL | After submitting an application, selected applicants are moved on to a round of interviews and will be asked to submit a piece of code for review. If you don't have any code you can share, DataMade will provide a short exercise for you to complete. An in-person (or remote) interview will be scheduled to go over your background, what draws you to DataMade, and your code sample.</li>\n<li><a href=\"https://datascope.co/careers\">Datascope</a> | Chicago, IL | Take home exploratory data project with public data, discussion about the project via video chat, and in-person office visit.</li>\n<li><a href=\"http://www.datlinq.com/en/vacancies\">Datlinq</a> | Rotterdam, Netherlands | Take-home project based on actual work on data done by the team and in-person or Skype interviews</li>\n<li><a href=\"https://dealtap.ca/\">DealTap</a> | Toronto, Canada | Technical Interview, Solution Design, Take Home Assignment, then Culture fit interview with the team, and optional pair programming.</li>\n<li><a href=\"https://www.defmethod.com/\">Def Method</a> | NYC, NY | Take home test, pair programming with dev on test and client work, receive offer same day as pairing interview</li>\n<li><a href=\"https://deliveroo.co.uk/careers\">Deliveroo</a> | London, UK &#x26; Remote | Short take-home project and pair programming</li>\n<li><a href=\"https://angel.co/dentolo\">Dentolo</a> | Berlin, Germany | Phone interview with the HR department, take-home project and technical interview to discuss your skill set + general questions</li>\n<li><a href=\"https://www.deskbookers.com/en-gb/jobs\">Deskbookers</a> | Amsterdam, Netherlands | Phone screen, take-home project, on-site interview</li>\n<li><a href=\"https://www.desmart.com/\">DeSmart</a> | Gdynia, Poland | Technical interview, take-home project and talk about your experience</li>\n<li><a href=\"https://despark.com/\">Despark</a> | Sofia, Bulgaria &#x26; Remote | Culture add interview, sample code review and paid pair programming with team member or take-home project.</li>\n<li><a href=\"https://www.detroitlabs.com/careers\">Detroit Labs</a> | Detroit, MI | Our technical interview starts with a take-home assignment that we will look at during the interview. You'll walk us though your thought process, add functionality if applicable to the interview, and talk about your experience. We believe that showing us your work in a practical setting is more telling of your abilities and what you will bring to the table, than writing code on a whiteboard.</li>\n<li><a href=\"https://www.devmynd.com/\">DevMynd</a> | Chicago, IL; San Francisco, CA | Take-home project, take-home project phone review, a few hour-long pairing sessions on real projects.</li>\n<li><a href=\"https://www.dg-i.net/\">DG-i</a> | Cologne, Germany | Take-home project and/or discussion on-site about past experiences</li>\n<li><a href=\"http://www.dice.se/\">DICE</a> | Stockholm, Sweden | Take-home project and code review at the on-site</li>\n<li><a href=\"http://www.di.fm/jobs\">Digitally Imported</a> | Denver, Colorado &#x26; Remote | Video meetings on past experience and high level tech questions, take-home project</li>\n<li><a href=\"https://www.dollarshaveclub.com/\">Dollar Shave Club</a> | Venice, California | Phone interview, take-home projects, on-site interview</li>\n<li><a href=\"http://door2door.io/\">door2door</a> | Berlin, Germany | Take home challenge + on-site interview + trial day</li>\n<li><a href=\"https://doordash.com/careers\">DoorDash 🏃💨</a> | San Francisco, CA | Take home project + an on-site interview building off the project!</li>\n<li><a href=\"https://docs.google.com/document/d/1fC_-liTPpYQOoE_5iKj0O3AwSdPggQGnOsjUKahfbkQ/edit?usp=sharing\">Draft Fantasy</a> | Tel Aviv, Israel | Talk about past experience and what the developer has actually built as well as pair programming or a programming exercise.</li>\n<li><a href=\"https://www.drawbotics.com/en/join-us\">Drawbotics</a> | Brussels, Belgium | Take-home project, bootcamp on-site</li>\n<li><a href=\"https://www.drchrono.com/careers\">drchrono</a> | Mountain View, CA | Hackerrank test (but not CS trivia, it's real product problems) &#x26; on-site/take-home project w/ presentation</li>\n<li><a href=\"https://www.drivy.com/\">Drivy</a> | Paris, France | Phone screening followed by a take-home assignment, \"Resume\" interview, technical interview, product interview, interview with another team, finalizing the hire</li>\n<li><a href=\"https://www.dronedeploy.com/careers.html\">DroneDeploy</a> | San Francisco, CA | Pair program on a problem similar to daily work</li>\n<li><a href=\"https://www.droneseed.co/jobs/\">DroneSeed</a> | Seattle, WA | Take home assignment of a real problem we've worked on, group code review in subsequent interview.</li>\n<li><a href=\"http://blog.dubizzle.com/uae/job-vacancies\">dubizzle</a> | Dubai, UAE | Take home assignment, general technical questions, pair programming with engineers or tech leads</li>\n<li><a href=\"https://www.e-accent.com/\">E-accent</a> | Hilversum, Netherlands; Remote | Skype conversation, take-home assignment</li>\n<li><a href=\"http://easytaxi.com.br/\">Easy Taxi</a> | São Paulo, Brazil | Take-home project, interview to evaluate the candidate's previous experience.</li>\n<li><a href=\"https://eaze.com/careers\">Eaze</a> | San Francisco, CA | Take home project, on-site interview building off of the project</li>\n<li><a href=\"https://careers.ebayinc.com/join-our-team/start-your-search/find-jobs-by-location/detail/germany\">eBay Kleinanzeigen</a> | Berlin, Germany | 45 mins technical phone interview, take-home project/review, on-site interview including pair programming with team lead and agile interview with product manager.</li>\n<li><a href=\"https://echobind.com/careers\">Echobind</a> | Boston, MA; Remote | Meet the entire team, share examples of previous work and pair with one team member</li>\n<li><a href=\"https://jobs.edenspiekermann.com/\">Edenspiekermann</a> | Amsterdam, Netherlands / Berlin, Germany / Los Angeles, CA / San Francisco, CA / Singapore, Singapore | On-site chat about skills and past experiences, review some code samples or a take-home assignment</li>\n<li><a href=\"https://careers.ef.com/\">EF Education First</a> | London, UK; Boston, MA | Short phone interview, take-home project, discussion of project and real world engineering problems, meet the team.</li>\n<li><a href=\"http://eidu.com/\">Eidu</a> | Berlin, Germany | Take-home project, discussion of results with team, and test days with pair programming</li>\n<li><a href=\"http://www.elpassion.com/\">El Passion</a> | Warsaw, Poland | Take-home project, interview to 1) discuss delivered solution and 2) previous projects</li>\n<li><a href=\"https://www.electricpulp.com/\">Electric Pulp</a> | Sioux Falls, SD, USA | Phone interviews with leadership team and technical team leads. We are a tight knit team, so emphasis on a great personal fit is as important as technical prowess.</li>\n<li><a href=\"https://www.elements.nl/careers\">Elements Interactive</a> | Almere, The Netherlands &#x26; Barcelona, Spain | Take-home project &#x26; discussion via Skype or on-site</li>\n<li><a href=\"https://www.ellucian.com/About-Us/Careers/\">Ellucian</a> | Reston, VA, USA | Discussion of real world problems (from resume, if possible)</li>\n<li><a href=\"https://elmah.io/\">elmah.io</a> | Aarhus, Denmark / Remote | Discussion about code and looking at hobby projects (if any)</li>\n<li><a href=\"https://www.elvie.com/\">Elvie</a> | London, England | Discussing real code, pairing and a paid day to see how you work with the team. No coding for free or time-restricted take-home projects, code challenges or abstract algorithm tests</li>\n<li><a href=\"https://goo.gl/N7SMKl\">eMarketer</a> | New York, NY | Short phone interview, then come in and meet the team, check out our space, and have a discussion with team members about real-world problems</li>\n<li><a href=\"https://www.emarsys.com/\">Emarsys</a> | Budapest, Hungary | Take-home project (small, 1-2 days to solve), then discussion on-site</li>\n<li><a href=\"http://www.endava.com/en/Careers\">Endava</a> | Belgrade, Serbia; Bucharest, Romania; Chisinau, Moldova; Cluj-Napoca, Romania; Iasi, Romania; Pitesti, Romania; Skopje, Macedonia; Sofia, Bulgaria; Frankfurt, Germany; Glasgow, Scotland; Hilversum, Netherlands; London, UK; Oxford, UK; Bogota, Colombia; Atlanta, GA; New Jersey, NJ; New York, NY | On-site discussion about previous experience and technical questions about the target technologies.</li>\n<li><a href=\"https://www.engelvoelkers.com/en/tech/\">Engel &#x26; Völkers Technology</a> | Hamburg, Germany | Remote technical interview with an Engineering Manager, followed by a practical coding challenge implemented in 5 hours, ending with a technical discussion with the team on the produced code either remotely or on-site based on geographical practicality.</li>\n<li><a href=\"https://enhancv.com/about.html\">Enhancv</a> | Sofia, Bulgaria | Talk is cheap, show us your code: github profile or other project examples. Explain them in person / remotely. Discuss habits and interests to see if we have a culture fit.</li>\n<li><a href=\"https://www.enigma.com/\">Enigma</a> | New York, NY | 2-part takehome project, followed by a pair programming exercise</li>\n<li><a href=\"https://enki.com/\">Enki</a> | London, UK | Skype/phone interview followed by takehome project</li>\n<li><a href=\"https://ento.com/blog/ento-interview-process-101\">Ento.com</a> | Melbourne, Australia | On-site interview to talk about your experiences and what you're looking for in your next role, followed by a take-home practical test relevant to the work you'll be undertaking at Ento.</li>\n<li><a href=\"https://www.equalexperts.com/\">Equal Experts</a> | London, UK; Manchester, UK; New York, NY; Pune, India; Lisbon, Portugal; Calgary, Canada | Fizzbuzz test done at home followed by Pair Programming session at office and finally face to face technical and attitude interview.</li>\n<li><a href=\"https://www.ericsson.com/\">Ericsson</a> | Dublin, Ireland | Skype/phone interview followed by Face 2 Face interview, discussions and architecture questions followed by final small project on a problem similar to daily work.</li>\n<li><a href=\"https://esharesinc.com/jobs\">eShares, Inc</a> | San Francisco, CA; Palo Alto, CA; Seattle, WA; Rio de Janeiro, Brazil; London, UK; New York, NY | Phone call, practical technical screen, on site to meet the team &#x26; explore the company</li>\n<li><a href=\"https://www.etixeverywhere.com/en/job-offers\">Etix Everywhere</a> | Luxembourg City, Luxembourg</li>\n<li><a href=\"https://euranova.eu/\">EURA NOVA</a> | Mont-Saint-Guibert, Belgium; Marseille, France; Tunis, Tunisia | attitude interview, unpaid take-home project, technical discussion with 1 or 2 technical employees (remote or face 2 face), face 2 face discussion with HR, partner, and technical staff to have a foretaste of the collaboration</li>\n<li><a href=\"http://www.europaymentgroup.com/\">Euro Payment Group</a> | Frankfurt, Germany | Take-home project followed by face to face interview</li>\n<li><a href=\"https://exoscale.ch/\">Exoscale</a> | Bern, Switzerland | Take-home project. Discussion and presentation. Then entire team meet.</li>\n<li><a href=\"https://fdex.com.br/\">F(x)</a> | São Paulo, Brazil | Skype interview, Take-home project and onsite interview to evaluate the candidate</li>\n<li><a href=\"https://www.falcon.io/jobs/\">Falcon.io</a> | Copenhagen, Denmark | Initial call/Skype culture interview. Take-home tech assignment (game) and code review. On-site Interview about your experience and meeting the team.</li>\n<li><a href=\"https://www.fatmap.com/\">FATMAP</a> | London, UK; Berlin, Germany; Vilnius, Lithuania | Skype discussion, Take-home project, Face to face</li>\n<li><a href=\"https://fauna.com/\">Fauna</a> | San Francisco, CA / Remote | Take home project, then follow up with interviews on-site or remote. Interviews are both technical and non-technical. Technical interviews comprehend the scope of the home project.</li>\n<li><a href=\"https://feather-cfm.com/\">Feather</a> | Remote | Take-home challenge, portfolio discussion &#x26; team meeting</li>\n<li><a href=\"https://blog.findy.us/findy-saiyo\">Findy</a> | Tokyo, Japan | Tech interview + On-site discussion</li>\n<li><a href=\"https://www.wearefine.com/careers\">FINE</a> | Portland, OR | Small take-home challenge + follow-up discussion</li>\n<li><a href=\"https://www.firemind.io/\">Firemind</a> | Maidstone, UK; London, UK; Remote | Small pre-interview challenge on github + discussion face to face in person or via video</li>\n<li><a href=\"https://thefitbot.com/careers.html\">Fitbot</a> | Boulder, CO | Pairing &#x26; writing code with the founders for a few hours</li>\n<li><a href=\"https://flatfox.ch/\">Flatfox</a> | Zurich, Switzerland | Informal conversation to check mutual fit, small (4h) take-home assignment, discussion in team</li>\n<li><a href=\"https://fluidly.com/\">Fluidly</a> | London, UK | Casual 30min phone call. ~1hr take home tech exercise (not pass or fail). 1 stage onsite interview - discussion about experience, 1 hour pair programming on the real code base, then your turn to interview us!</li>\n<li><a href=\"https://food52.com/jobs\">Food52</a> | New York, NY; Remote | Take-home project, discussion on-site or remote, interviews with both technical and non-technical staff</li>\n<li><a href=\"https://fooji.com/\">Fooji</a> | Lexington, KY; Remote | Take-home project</li>\n<li><a href=\"https://www.formidable.com/careers\">Formidable Labs</a> | Seattle, WA; London, UK; Remote | Take-home project, remote pair programming, discussion on-site or remote</li>\n<li><a href=\"https://fortumo.com/careers\">Fortumo</a> | Tallinn, Estonia; Tartu, Estonia | After a 30-min call you get a simplified version of a task that has recently been a challenge for the engineering team</li>\n<li><a href=\"https://founders.as/joinus\">Founders</a> | Copenhagen, Denmark | Take Home project + Interviews</li>\n<li><a href=\"http://www.foundryinteractive.com/contact\">Foundry Interactive</a> | Seattle, WA | On-site or remote discussion, paid trial project with pairing and code reviews</li>\n<li><a href=\"https://www.fournova.com/jobs\">fournova</a> | Remote | Take-home project, discussion via video call</li>\n<li><a href=\"https://www.freeagent.com/company/careers\">FreeAgent</a> | Edinburgh, UK | Take-home project, pair programming, discussion and interviews</li>\n<li><a href=\"https://www.freeletics.com/en/corporate/jobs\">Freeletics</a> | Munich, Germany | Small real-world challenge, multiple interviews on-site/remote and social gathering with team.</li>\n<li><a href=\"https://www.freetrade.io/careers\">Freetrade</a> | London, England | Initial hangout with fizz buzz style question followed by an on-site real world coding question and systems design conversation.</li>\n<li><a href=\"https://friday-jobs.personio.de/\">FRIDAY</a> | Berlin, Germany | Take-home real-world challenge, interview on-site or remote</li>\n<li><a href=\"https://frontside.io/careers\">Frontside</a> | Austin, Texas | Phone interview with remote pairing session. Followed by in person pairing (paid for the day) and lunch with the team.</li>\n<li><a href=\"https://www.funda.nl/vacatures\">Funda</a> | Amsterdam, The Netherlands | Take Home test + Discussion On-Site/Remote</li>\n<li><a href=\"https://www.fundapps.co/about-us/join-our-team\">FundApps</a> | London, UK | Coffee with an Engineer; take-home kata; code review + on-site pair programming exercise.</li>\n</ul>\n<h2>G - I</h2>\n<ul>\n<li><a href=\"https://www.gamevycareers.com/\">Gamevy</a> | London, UK; Bilbao, ES; Remote | Informal culture discussions, pair programming with our engineers</li>\n<li><a href=\"https://www.garnercorp.com/\">Garner</a> | Toronto, Canada | step 1: online chat with hiring manager, step 2: at home assignment solving real-life problem, step 3: on-site pair programming with engineers, step 4: offer</li>\n<li><a href=\"https://gathercontent.com/careers/designer\">GatherContent</a> | Remote | Culture-first interviews, pair programming and remote, informal technical discussions</li>\n<li><a href=\"https://generalui.com/\">GeneralUI</a> | Seattle, WA | A short phone screen with questions regarding general knowledge related to the open position, then a half day pair programming interview.</li>\n<li><a href=\"http://jobs.ginetta.net/\">Ginetta</a> | Zurich, Switzerland; Braga, Portugal | Culture-first interviews, take home assignment that resembles a real-world problem we often solve, then discussion about the assignment in-person with pair-programming improvement sessions with our developers.</li>\n<li><a href=\"https://github.com/about/careers\">GitHub</a> | Remote; San Francisco, CA; Boulder, CO| Take-home exercise, code review and technical discussions.</li>\n<li><a href=\"https://www.gitprime.com/\">GitPrime</a> | Denver, CO; Remote | small short term real-world project, paid project on production code</li>\n<li><a href=\"https://glints.com/sg/inside/careers/\">Glints</a> | Singapore, Singapore; Jakarta, Indonesia | Culture fit interview, take home assignment that resembles a real-world problem, walkthrough about the assignment</li>\n<li><a href=\"https://gocardless.com/about/jobs\">GoCardless</a> | London, UK | Project to work at home, general technical questions, pair programming with engineers</li>\n<li><a href=\"https://www.godaddy.com/careers/overview\">GoDaddy</a> | Sunnyvale, CA | Pair programming with senior engineers</li>\n<li><a href=\"https://www.gojek.io/\">GoJek</a> | Bangalore, India; Jakarta, Indonesia; Singapore, SG; Bangkok, Thailand | Take-home exercise, Pair programming with senior engineer, Techinal problem solving and discussion, Cultural Fit</li>\n<li><a href=\"http://gower.st/\">Gower Street Analytics</a> | Remote; London, UK | Initial telephone chat, then either a) work with us, fully paid, for a day on real code with the team; or b) pair-programming on a code kata with the team members for four pomodoros. Your choice.</li>\n<li><a href=\"https://www.graffino.com/\">Graffino</a> | Sibiu, Romania | Take-home project, discussion on-site</li>\n<li><a href=\"https://graftonstudio.com/\">Grafton Studio</a> | Boston, MA | Take-home project, discussion on-site</li>\n<li><a href=\"http://www.gramercytech.com/\">Gramercy Tech</a> | New York, NY | Pair programming &#x26; discussion on-site</li>\n<li><a href=\"https://www.grandcentrix.net/jobs\">grandcentrix</a> | Cologne, Germany | Take-home project, discussion on-site</li>\n<li><a href=\"https://www.chatgrape.com/jobs/\">Grape</a> | Vienna, Austria / Remote | Github or code samples -> Pair programming -> Skype/phone interview</li>\n<li><a href=\"https://www.graph.cool/\">Graphcool</a> | Berlin, Germany | On-site pair programming of a small, isolated real world task</li>\n<li><a href=\"http://www.graphicacy.com/\">Graphicacy</a> | Washington, DC | Phone interview; in-person or virtual interview depending on location and availability; two brief technical assignments focused on flexibility, creativity, and general competency</li>\n<li><a href=\"https://www.graphistry.com/careers\">Graphistry</a> | Oakland, CA; San Francisco, CA; Remote | Engineering, culture, and product discussions, and for junior developers, choice of take home or code review.</li>\n<li><a href=\"https://www.grok-interactive.com/\">Grok Interactive</a> | San Antonio, TX | Take-home project with code review and a follow-up in-person interview.</li>\n<li><a href=\"http://www.gruntwork.io/\">Gruntwork</a> | Remote | Paid, take-home project with pair coding</li>\n<li><a href=\"https://gtmsportswear.com/careers\">GTM Sportswear</a> | Manhattan, KS / Remote | Remote pairing session, then a take-home test.</li>\n<li><a href=\"https://happyteam.io/\">Happy Team</a> | Warsaw, Poland; Remote | General technical questions, takehome paid exercise with feedback/discussion during implementation</li>\n<li><a href=\"http://www.happypie.com/\">Happypie</a> | Uppsala, Sweden | Takehome excercise with code review after, in-person interview</li>\n<li><a href=\"https://www.hash.com.br/index.html\">Hash</a> | Sao Paulo, Brazil | Take-home project and/or discussion (on-site or remote)</li>\n<li><a href=\"https://hashrocket.com/\">Hashrocket</a> | Chicago, IL/Jacksonville Beach, FL | Remote pairing session, paid week pair programming with everyone on the team</li>\n<li><a href=\"https://headspring.com/about/careers\">Headspring</a> | Austin, TX; Houston, TX; Monterrey, Mexico | Take-home situational questionnaire and code exercise, with in-person follow up to discuss and pair for changes</li>\n<li><a href=\"https://healthify.us/\">Healthify</a> | Remote &#x26; New York City, NY | Take-home project, discussion via Zoom, pair programming with us on our app for a day.</li>\n<li><a href=\"https://www.heetch.com/\">Heetch</a> | Paris, France | Values-fit interview (via zoom.us), Take-home project with review, Team Discussions (via zoom.us), on-site day</li>\n<li><a href=\"https://helabs.com/\">HE:labs</a> | Rio de Janeiro, Brazil &#x26; Remote | Take-home project and discussion via Skype.</li>\n<li><a href=\"https://www.hellofresh.com/jobs\">HelloFresh</a> | Berlin, Germany | Take-home project, discussion via Skype or on-site</li>\n<li><a href=\"https://www.heptio.com/jobs\">Heptio</a> | Seattle, WA; Remote | Take-home project, discussion on-site</li>\n<li><a href=\"http://www.hhcc.com/careers\">Hill Holliday</a> | Boston, MA | Take-home project on GitHub, in-person interview / culture fit interview</li>\n<li><a href=\"http://www.hireology.com/careers\">Hireology</a> | Chicago, IL; Remote | Walk through personal/work projects and discuss experience</li>\n<li><a href=\"https://www.hiventive.com/\">Hiventive</a> | Pessac, France | Phone interview, home coding challenge, on-site interview with general programming questions, discussion of proposed solutions and personal experience.</li>\n<li><a href=\"https://holidaypirates.group/en/jobs\">HolidayPirates</a> | Berlin, Germany | Take-home project, discussion via Skype or on-site</li>\n<li><a href=\"https://www.holobuilder.com/\">HoloBuilder</a> | Aachen, Germany | Take-home project, discussion via Skype or on-site</li>\n<li><a href=\"https://www.homechef.com/careers\">Home Chef</a> | Chicago, IL; Remote | Get-to-know-you meeting with the team, followed by a half-day collaborative coding session</li>\n<li><a href=\"https://www.homelight.com/engineering\">HomeLight</a> | San Francisco, CA; Scottsdale, AZ; Seattle, WA | Phone screen, take home that is close to production code, onsite with pair programming</li>\n<li><a href=\"https://jobs.hoxhunt.com/\">HoxHunt</a> | Helsinki, Finland | Take-home project, pair programming on-site</li>\n<li><a href=\"http://humanapi.co/company/careers\">Human API</a> | Redwood City, CA | Technical phone interview, then on-site pair programming and design discussion</li>\n<li><a href=\"https://io.co.za/opportunities\">I|O</a> | Cape Town, South Africa</li>\n<li><a href=\"http://icalialabs.com/\">Icalia Labs</a> | Monterrey, Mexico | Pair programming, cultural fit session</li>\n<li><a href=\"http://iconstituent.com/careers/\">iConstituent</a> | Washington, DC | Take-home project and code review in-person</li>\n<li><a href=\"https://ideamotive.co/\">Ideamotive</a> | Warsaw, Poland &#x26; Remote | Take-home project, technical interview with developer</li>\n<li><a href=\"https://www.ideo.com/jobs\">IDEO</a> | San Francisco, CA; New York, NY; Chicago, IL; Cambridge, MA | Take home project that resembles a problem IDEO solves for, then pairing session in person or over video chat.</li>\n<li><a href=\"https://boards.greenhouse.io/scout24\">ImmobilienScout24</a> | Berlin, Germany | Take-home project, discussion on-site</li>\n<li><a href=\"http://jobs.impraise.com/\">Impraise</a> | Amsterdam, The Netherlands | Take home test, real world pair programming</li>\n<li><a href=\"https://jobs.incloud.de/\">Incloud</a> | Darmstadt, Germany | Technical interview with developers, followed by a full day on site with a practical project</li>\n<li><a href=\"http://www.indellient.com/careers\">Indellient</a> | Oakville, Canada | Series of interviews both technical and non-technical</li>\n<li><a href=\"https://www.influxdata.com/careers\">InfluxData</a> | San Francisco, CA &#x26; Remote | Technical and non-technical interviews, pair programming, with prospective manager and multiple prospective teammates</li>\n<li><a href=\"https://www.infosum.com/\">InfoSum</a> | Basingstoke, UK | On-site unsupervised exercise &#x26; discussion.</li>\n<li><a href=\"https://inkindcapital.com/\">inKind Capital</a> | Boulder, CO | Discussing real-world problems, pair programming, dinner &#x26; drinks with the team</li>\n<li><a href=\"https://www.inmar.com/careers\">Inmar</a> | Winston-Salem, NC; Austin, TX &#x26; Remote | Take-home project and conversation-style interviews</li>\n<li><a href=\"https://www.innoplexus.com/careers/\">Innoplexus</a> | Pune, India; Frankfurt, Germany | Take-home projects and On-site pair programming assignment.</li>\n<li><a href=\"https://careers.instacart.com/\">Instacart</a> | San Francisco, CA | Take-home real world project, pair programming on-site</li>\n<li><a href=\"https://internshala.com/internships/internship-at-InstantPost\">InstantPost</a> | Bangaluru, India | Remote assignment followed by Technical and Team round interview</li>\n<li><a href=\"https://www.integral.io/\">Integral.</a> | Detroit, MI | Initial remote technical screen featuring test-driven development &#x26; pair programming, then on-site full day interview that involves pair programming on production code using test-driven development.</li>\n<li><a href=\"https://www.intelipost.com.br/\">Intelipost</a> | São Paulo, BR | Take-home project, on-site code review and presentation (skype available if needed), discussion involving real world problems and interviews with different teams</li>\n<li><a href=\"https://www.intercom.com/careers\">Intercom</a> | San Francisco, CA; Chicago, IL; Dublin, Ireland | Real-world technical design and problem discussion, pair programming on-site</li>\n<li><a href=\"https://interset.com/careers\">Interset</a> | Ottawa, Canada | Discussion of technical background and past experience. Relevant take-home project for junior developers</li>\n<li><a href=\"https://www.ithaka.travel/\">Ithaka</a> | Mumbai, India | Phone interview followed by a small development task. Finally a phone interview with CEO.</li>\n<li><a href=\"http://itrellis.com/\">iTrellis</a> | Seattle, WA | Phone screen, then a take-home project, then pairing (remote or on-site) with 3 developers on the take-home project.</li>\n<li><a href=\"https://jobs.izettle.com/jobs\">iZettle</a> | Stockholm, Sweden | Remote pair programming exercise, propose an architecture for an application and discuss about it in an informal format.</li>\n</ul>\n<h2>J - L</h2>\n<ul>\n<li><a href=\"http://www.jamasoftware.com/\">Jamasoftware</a> | Portland, OR | Initial phone screen with hiring manager. In person pairing on project similar to day-to-day work with a separate cultural interview</li>\n<li><a href=\"https://jamitlabs.com/jobs\">Jamit Labs</a> | Karlsruhe, Germany | Phone interview or on-site interview &#x26; take-home code challenge or on-site programming session</li>\n<li><a href=\"https://www.jiminny.com/\">Jiminny</a> | Sofia, Bulgaria | Phone screen. Take-home exercise. Follow-up discussion.</li>\n<li><a href=\"https://www.jitbit.com/\">Jitbit</a> | Remote; London, UK; Tel-Aviv, Israel | Take-home real-world task</li>\n<li><a href=\"https://weare.jobtome.com/careers\">Jobtome</a> | Stabio, Switzerland | Phone screen introduction with hiring manager. In site (or screen call) with Engineer Manager for a talk on skills and cultural fit.</li>\n<li><a href=\"https://journaltech.com/jobs\">Journal Tech</a> | Los Angeles, CA | Mini take-home project, phone interview, discussion on-site</li>\n<li><a href=\"http://www.jplusplus.org/\">Journalism++</a> | Berlin, Germany | Apply through a <a href=\"http://internship.jplusplus.org/\">relevant online challenge</a> to show your technical skills and your capacity to investigate</li>\n<li><a href=\"https://www.justwatch.com/us/talent\">JustWatch</a> | Berlin, Germany | Take-Home project, discussion on-site</li>\n<li><a href=\"https://www.khealth.ai/\">K Health</a> | Tel Aviv, Israel | Phone screening to discuss technical background and past experience. Take-home assignment followed by on-site code review and interview. Cultural fit assessment</li>\n<li><a href=\"https://www.getkahoot.com/jobs\">Kahoot!</a> | London, UK / Oslo, Norway | Phone screening to discuss technical background and past experience. Take-home assignment followed by on-site code review and interview. Cultural fit assessment</li>\n<li><a href=\"https://kata.ai/\">Kata.ai</a> | Malang, Indonesia / Jakarta, Indonesia | Take-home assignment, then invited to discuss the assignment and interview.</li>\n<li><a href=\"https://www.kayako.com/\">Kayako</a> | London, UK / Gurgaon, India | Take-home assignment, series of experience based interviews, cultural fit assessment</li>\n<li><a href=\"https://www.kentik.com/careers\">Kentik</a> | San Francisco, CA | Phone screening to discuss technical background and past experience. Take-home assignment followed by on-site code review and interview. Cultural fit assessment</li>\n<li><a href=\"https://keymetrics.io/\">Keymetrics</a> | Paris, France | Phone Interview, Take-home project based on our <a href=\"https://github.com/keymetrics/keymetrics-api\">API</a>, IRL meeting with the whole team</li>\n<li><a href=\"https://careers.kindredplc.com/\">Kindred Group, Native Apps Team</a> | Stockholm SE, London UK | On-site/Skype programming task, Interview</li>\n<li><a href=\"https://www.kinnek.com/jointeam\">Kinnek</a> | New York, NY | Phone screen, on-site pairing session, take-home project</li>\n<li><a href=\"https://code.kiwi.com/\">Kiwi.com</a> | Brno, Czech Republic | Phone Interview, Take-home projects, On-site code review &#x26; interview</li>\n<li><a href=\"https://knplabs.com/\">KNPLabs</a> | Nantes, France | First step: screening call directly with the CEO, to discuss company vision, assess cultural fit and experience. Second step: call or IRL interview with a developer and a project facilitator , technical discussions with focus on soft skills. The goal of the interview is for the 2 KNPeers to be able to answer: “Do I want to work with this person ?” If both say yes, the person is hired. If even at least one says no, the person is not hired.</li>\n<li><a href=\"http://www.koddi.com/open-positions\">Koddi Inc.</a> | Fort Worth, TX | Phone Interview(s), take-home project, on-site interview</li>\n<li><a href=\"https://www.konghq.com/careers\">Kong</a> | San Francisco, CA | Phone interview. Pairing and technical interviews. Take home assigment.</li>\n<li><a href=\"http://www.kongregate.com/jobs\">Kongregate</a> | Portland, OR | Phone screening. Take home project. On-site pairing and conversational technical interviews.</li>\n<li><a href=\"https://www.korbit.co.kr/about/jobs\">Korbit</a> | Seoul, South Korea | Take home assignment followed by on-site code review and interview</li>\n<li><a href=\"http://lab.coop/\">Lab.Coop</a> | Budapest, Hungary | Partnership-fit discussion, code-review and trial days.</li>\n<li><a href=\"https://landing.jobs/at/landing-jobs\">Landing.jobs</a> | Lisbon, Portugal | Interviews (in-person or remote), Take home coding project</li>\n<li><a href=\"http://engineering.lanetix.com/\">Lanetix</a> | San Francisco, CA | <a href=\"https://engineering.lanetix.com/2015-10-20/hiring-process\">Our Hiring Process</a></li>\n<li><a href=\"http://careers.laterooms.com/\">LateRooms</a> | Manchester, UK | Telephone interview followed by coding problem at home. Suitable submissions proceed to an onsite interview.</li>\n<li><a href=\"https://launchacademy.com/careers\">Launch Academy</a> | Boston, Philadelphia | Nontechnical phone screen, pair programming with team member, and potentially a \"guest lecture\" for our students</li>\n<li><a href=\"https://launchdarkly.com/careers\">LaunchDarkly</a> | Oakland, CA | Informational phone screen with Eng leadership, take home project, onsite interviews</li>\n<li><a href=\"https://learningbank.dk/\">Learningbank</a> | Copenhagen, DK | Take home assignment, followed by on-site code review.</li>\n<li><a href=\"https://www.legalstart.fr/\">Legalstart.fr</a> | Paris, France | Telephone interview followed by take-home challenges. Suitable applicants are asked to do further on-pair interviews on site.</li>\n<li><a href=\"https://www.leverton.ai/\">Leverton</a> | Berlin, Germany | Initial chat with the HR continued with 1-2 rounds chat with the team; followed by a technical test and finally a chat with the CTO/MD. <a href=\"http://leverton-jobs.personio.de/\">Jobs page</a></li>\n<li><a href=\"https://www.libertymutualgroup.com/careers\">Liberty Mutual</a> | Seattle, WA; Boston, MA; Indianapolis, IN | Initial interview, discussion on-site, interview with peers</li>\n<li><a href=\"https://www.librato.com/jobs\">Librato</a> | San Francisco, CA; Boston, MA; Austin, TX; Vancouver, Canada; Krakow, Poland | Take home coding project, conversational technical interviews on-site</li>\n<li><a href=\"http://lightningjar.agency/\">Lightning Jar</a> | San Antonio, Tx | Remote pairing session, Initial interview,discussion on-site</li>\n<li><a href=\"http://www.lightricks.com/\">Lightricks</a> | Jerusalem, Israel | Initial interview, Take home project, discussion on-site</li>\n<li><a href=\"http://jobs.linkresearchtools.com/job-offers\">LinkResearchTools</a> | Vienna, Austria | Skype interview, mini take-home exercise, discussion on-site / personal interview</li>\n<li><a href=\"https://listium.com/jobs\">Listium</a> | Melbourne, Australia | Design and code proof of concept features with the team</li>\n<li><a href=\"https://litmus.com/careers#openings\">Litmus</a> | Remote | General technical questions, take-home code challenge, discussion, on-site programming session, meet &#x26; greet with the team</li>\n<li><a href=\"https://www.littlethings.com/careers.html\">LittleThings</a> | New York, NY | Take home code challenge, Discussion</li>\n<li><a href=\"https://loanzen.in/team.html#Career\">LoanZen</a> | Bengaluru, India | Initial phone interview about experience, a solve-at-home project based on the kind of work we do at our company, on-site interview discussing the submitted solution and a general discussion with the whole team</li>\n<li><a href=\"https://lob.com/careers\">Lob</a> | San Francisco, CA | Initial phone screen followed by an on-site interview. Technical problems discussed during the interview are all simplified versions of problems we've had to solve in production. Our entire interview process and what we're looking for is described in our blog post <a href=\"https://lob.com/blog/how-we-interview-engineers\">How We Interview Engineers</a>.</li>\n<li><a href=\"https://www.locastic.com/posao\">Locastic</a> | Split, Croatia | Take-home code challenge, tehnical discussion &#x26; on-site programming session, meet &#x26; greet with the team</li>\n<li><a href=\"https://www.locaweb.com.br/carreira\">Locaweb</a> | São Paulo, Brazil | Skype interview, take-home project and discussion on-site</li>\n<li><a href=\"https://logiball.de/en/jobs/\">LOGIBALL GmbH</a> | Berlin, Hannover and Herne in Germany | Interviews and discussion</li>\n<li><a href=\"https://logicsoft.co.in/\">Logic Soft</a> | Chennai, India | Phone discussion, F2F pair programming exercise + discussion</li>\n<li><a href=\"https://www.lonres.com/public/working-us\">LonRes</a> | London, United Kingdom | Quick introduction call with tech (Skype), coding task for ≈1 hour, face-to-face interview (or via Skype) and meeting with team members.</li>\n<li><a href=\"http://www.lookbookhq.com/about/careers\">LookBookHQ</a> | Toronto, Canada | On-site discussion, pair programming exercise</li>\n<li><a href=\"https://www.useloom.com/careers\">Loom</a> | San Francisco, CA | Google Hangouts resume dive on past experience, take-home project OR architectural phone screen, on-site interviews (2 technical architecture related to work, 1 or 2 non-technical)</li>\n<li><a href=\"https://lydia-app.com/en/company/jobs\">Lydia</a> | Paris, FR | Mini take-home project, phone interview, discussion on-site</li>\n<li><a href=\"https://lyft.com/jobs\">Lyft</a> | San Francisco, CA | Pair programming on-site with your own personal laptop</li>\n<li><a href=\"http://www.lyoness-corporate.com/de-AT/Karriere/Jobangebote\">Lyoness Austria GmbH</a> | Graz, Austria | Take-Home project, discussion on-site</li>\n</ul>\n<h2>M - O</h2>\n<ul>\n<li><a href=\"https://www.madetech.com/careers\">Made Tech</a> | London, UK | <a href=\"https://github.com/madetech/handbook/tree/master/guides/hiring#20-minute-phone-conversation\">Our hiring process</a></li>\n<li><a href=\"https://magnetis.workable.com/\">Magnetis</a> | São Paulo, Brazil &#x26; Remote | Phone interview + take home assignment, followed by pair programming and informal meeting with the team.</li>\n<li><a href=\"https://careers-mlssoccer.icims.com/jobs/search?ss=1&#x26;searchCategory=20285\">Major League Soccer</a> | New York, NY | Phone interview + short take home project, which is daily work focused. In person interview could involve discussing past projects or pair programming.</li>\n<li><a href=\"http://www.makemusic.com/careers/\">MakeMusic</a> | Boulder, CO; Denver, CO | Phone screen, take home project, remote and on-site interviews for technical and cultural fit</li>\n<li><a href=\"https://maketime.workable.com/\">MakeTime</a> | Lexington, KY | Practical exercise and/or a pairing session on site</li>\n<li><a href=\"http://www.mango-solutions.com/wp/about-mango/team\">Mango Solutions</a> | London (UK), Chippenham (UK) | Initial phone interview, followed by on-site interview with take-home assignment</li>\n<li><a href=\"https://www.mapbox.com/jobs\">Mapbox</a> | San Francisco, CA; Washington, DC; Ayacucho, Peru; Bangalore, India; Berlin, Germany; Remote | Conversational interviews, paid onsite project with team.</li>\n<li><a href=\"https://www.mavenlink.com/careers\">Mavenlink</a> | San Francisco, CA; Irvine, CA; Salt Lake City, UT | On-site pairing with multiple engineers. Pairing exercises and pairing on company code.</li>\n<li><a href=\"https://www.maxwellhealth.com/careers\">Maxwell Health</a> | Boston, MA | Take-home exercise or pairing session with team. Then conversational meetings with members of the team.</li>\n<li><a href=\"https://me-company.de/jobs/\">Me &#x26; Company</a> | Düsseldorf, Germany | You join us for one or two paid trial days to work on an assignment and to meet the team.</li>\n<li><a href=\"https://mediapop.co/\">Media Pop</a> | Singapore, Singapore | Take-home or unsupervised (onsite) real-world assignment</li>\n<li><a href=\"https://www.meetrics.com/\">Meetrics</a> | Berlin, Germany | Initial interview, take-home code challenge and review</li>\n<li><a href=\"http://underthehood.meltwater.com/jobs\">Meltwater</a> | Manchester, NH | Small take home exercise that will be presented to the team during a QA style interview</li>\n<li><a href=\"https://mention.workable.com/\">Mention</a> | Paris, FR | Take-home small exercise followed up by on site meetings with your future coworkers</li>\n<li><a href=\"https://www.mercatus.com/company/careers\">Mercatus</a> | Toronto, Canada | Practical on-site project similar to daily work</li>\n<li><a href=\"https://www.mfind.pl/dolacz-do-nas/\">mfind</a> | Warsaw, PL | Phone call about technical experience, Take-home project or technical test(depends on experience), Onsite interview with technical lead.</li>\n<li><a href=\"https://midrive.com/careers\">miDrive</a> | London, UK | Phone screen, Take-home project / technical test, Onsite interview with senior and peer.</li>\n<li><a href=\"https://www.milchundzucker.de/\">milch &#x26; zucker</a> | Gießen, Germany | Interview with direct feedback, applicants providing working sample, code review (product code or personal code of applications)</li>\n<li><a href=\"https://mimirhq.com/jobs/\">Mimir</a> | Indianapolis, Indiana | Take home interview, phone screen, in person interview where you decide how you want to be interviewed (questions, pair programming, etc.)</li>\n<li><a href=\"http://www.minutemedia.com/careers/\">Minute Media</a> | Tel-Aviv, Israel | Phone screening with engineer. On-site real-world challenge questions with two engineers. Sometimes a take-home assignment or existing code sample submission.</li>\n<li><a href=\"https://mirumee.com/jobs\">Mirumee</a> | Wroclaw, Poland; Remote | Pair programming and code review using one of the issues (or Pull Requests) in our open-source Saleor project, general discussion about programming, technology and candidate's experience</li>\n<li><a href=\"https://mixmax.com/careers\">Mixmax</a> | San Francisco, CA | Takehome assignment purely based on their platform, followed by phone interview</li>\n<li><a href=\"https://www.mobilecashout.com/\">MobileCashout</a> | Barcelona, Spain; Valencia, Spain | Quick introduction video call with a tech (less than 10-15 minutes). On-site open source contribution to a project of candidates choosing, paired with a tech from the team. Interview and a short questionaire about software design and relevant technologies. Interview and presentation of the company with a HR rep.</li>\n<li><a href=\"https://mobilethinking.ch/\">Mobilethinking</a> | Geneva, Switzerland | 1 hour discussion about technical background and past experiences, preferably in-person</li>\n<li><a href=\"https://about.modeanalytics.com/careers\">Mode</a> | San Francisco, CA | Phone interview followed by onsite pair-architecting and discussion</li>\n<li><a href=\"http://mokahr.com/\">MokaHR</a> | Beijing, China | Take home project/challenge, then on-site programming session taken from problems we encounter at work</li>\n<li><a href=\"https://moneytree.jp/\">Moneytree Front-end Web Team</a> | Tokyo, Japan | Pair programming exercise and social gathering with team</li>\n<li><a href=\"https://monzo.com/\">Monzo</a> | London, UK &#x26; Remote | Phone interview with another engineer. Take-home assignment. Call to debrief on take-home assignment. Half-day interview (on-site or Hangouts) with three conversational sessions: (1) building on take-home test &#x26; real-world system design (verbal and collaborative); (2) digging into knowledge &#x26; understanding in 1-2 other relevant technical areas; (3) general background, teams and ways of working.</li>\n<li><a href=\"https://www.moteefe.com/jobs\">Moteefe</a> | London, UK &#x26; Remote | Interview with CTO. Take home project/challenge.</li>\n<li><a href=\"https://mutualmobile.com/careers\">Mutual Mobile</a> | Austin, TX; Hyderabad, India | Technical discussion, code test based on actual work you'll be doing, panel style discussions for cross-functional and culture-fit.</li>\n<li><a href=\"http://www.mutualofomaha.com/careers\">Mutual of Omaha</a> | Omaha, NE, USA | Panel Style Interviews analyzing problem solving, ability to adapt well to change, and interpersonal communication skills.</li>\n<li><a href=\"https://www.mutuallyhuman.com/\">Mutually Human Software</a> | MI, OH, WA | Collaborative problem analysis and design exercise, pairing exercise</li>\n<li><a href=\"https://nanobox.io/\">Nanobox</a> | Lehi, UT; Remote | A phone/video/person-to-person interview with a look at past projects (github, bitbucket, source code, etc.)</li>\n<li><a href=\"https://www.native-instruments.com/\">Native Instruments</a> | Berlin, Germany | Takehome programming assignment and personal interviews with part of the hiring team.</li>\n<li><a href=\"https://nearsoft.com/join-us/\">Nearsoft Inc</a> | Hermosillo, Mexico; Chihuahua, Mexico; Mexico City, Mexico | Takehome <a href=\"https://nearsoft.com/blog/the-logic-behind-nearsofts-logic-test/\">logic test</a>, english interview to check communication skills, short technical interview about experience, long technical discussion about languages/tools/practices you will use on daily basis, pair programming session.</li>\n<li><a href=\"http://lifeatnedap.com/vacatures\">Nedap</a> | Groenlo, Netherlands / Remote | A simple conversation, human to human and a small on-site project</li>\n<li><a href=\"https://neoteric.eu/career/\">Neoteric</a> | Gdańsk, Warsaw Poland; Remote | Face2Face conversation, take home exercise &#x26; pair programming session</li>\n<li><a href=\"https://jobs.netflix.com/jobs/867042\">Netflix</a> | Los Gatos, CA | Takehome exercise, series of real-world interviews with engineers, HR, engineering managers and our director</li>\n<li><a href=\"https://www.netguru.co/career\">Netguru</a> | Warsaw, Poland; Remote | Takehome exercise &#x26; pair programming session</li>\n<li><a href=\"https://www.netlandish.com/\">Netlandish</a> | Los Angeles, CA; Remote | Takehome exercise, chat interview, video interview</li>\n<li><a href=\"https://www.netlify.com/careers\">Netlify</a> | San Francisco, CA | Paid takehome project and online/onsite discussion</li>\n<li><a href=\"https://newrelic.com/about/careers\">New Relic</a> | San Francisco, CA | Takehome exercise &#x26;/ or pair programming session depending on the team</li>\n<li><a href=\"https://www.newstore.com/careers/\">NewStore</a> | Berlin, Germany; Hannover, Germany; Erfurt, Germany; Boston, MA | Telephone technical interview, code sample submission or takeaway coding exercise, on-site pair programming, design session (1/2 day)</li>\n<li><a href=\"https://www.newvoicemedia.com/about-newvoicemedia/careers\">NewVoiceMedia</a> | Basingstoke, England; Wroclaw, Poland | Telephone interview, takeaway coding exercise, on-site pair programming, code review &#x26; technical discussion (1/2 day)</li>\n<li><a href=\"https://nexcess.net/\">Nexcess.net</a> | Southfield, MI | We mostly chat to get a feel on both ends if there's a good cultural fit. We ask questions to see what experience you have and how you think as a programmer. At some point we look at some of your code or have you work on some of ours (1 hour).</li>\n<li><a href=\"https://www.workhiro.com/companies/nimbl3\">Nimbl3</a> | Bangkok, Thailand | Takehome exercise and specific role discussion</li>\n<li><a href=\"http://www.niteoweb.com/careers\">Niteoweb</a> | Ljubljana, Slovenia | Join us for a week to see if we fit</li>\n<li><a href=\"https://www.gonitro.com/about/jobs\">Nitro</a> | Dublin, Ireland; San Francisco, CA | Phone Call, Take Home Test, Hiring Manager Phone Interview followed by an onsite discussion</li>\n<li><a href=\"https://www.noa.one/\">Noa</a> | Berlin, Germany; San Francisco, CA | 1 technical chat, 2-3 cultural chats with colleagues from different departments in the team, if these work a pair programming exercise</li>\n<li><a href=\"http://nodesource.com/careers\">NodeSource</a> | Remote | A person-to-person walk through of a past project of yours</li>\n<li><a href=\"https://www.nomoko.world/jobs\">Nomoko,camera</a> | Zurich, Switzerland | Three interrogations</li>\n<li><a href=\"https://www.nordsoftware.com/en/jobs\">Nord Software</a> | Helsinki, Finland; Tampere, Finland; Stockholm, Sweden | Take-home exercise &#x26; interview with CEO and senior developer</li>\n<li><a href=\"https://www.noredink.com/jobs\">NoRedInk</a> | San Francisco, CA | Take-home exercise &#x26; pair programming session</li>\n<li><a href=\"https://novicap.com/en/careers.html\">NoviCap</a> | Barcelona, Spain | Takehome exercise &#x26; discussion on-site</li>\n<li><a href=\"https://novoda.com/hiring\">Novoda</a> | London, UK; Liverpool, UK; Berlin, Germany; Barcelona, Spain; Remote | 2 x Pairing sessions &#x26; conversational interviews <a href=\"https://github.com/novoda/dojos\">(public repo)</a></li>\n<li><a href=\"https://www.novus.com/jobs\">Novus Partners</a> | New York, NY | Take-home exercise &#x26; on-site exercises (choice of laptop or whiteboard)</li>\n<li><a href=\"https://nozbe.com/jobs\">Nozbe</a> | Remote | Take-home exercise &#x26; interview with the team</li>\n<li><a href=\"https://npmjs.com/jobs\">npm, Inc</a> | Oakland, CA / Remote | No technical challenges. Just interview conversations.</li>\n<li><a href=\"https://nubank.workable.com/\">Nubank</a> | São Paulo, BR | Phone conversation, take-home exercise, code walkthrough, on-site code pairing.</li>\n<li><a href=\"https://www.numberly.com/\">numberly</a> | Paris, France | Series of interviews, that go over technical background, past experiences and cultural knowledge</li>\n<li><a href=\"https://angel.co/numerai/jobs\">numer.ai</a> | San Francisco, CA</li>\n<li><a href=\"https://www.nutshell.com/jobs\">Nutshell</a> | Ann Arbor, MI, US | Email screen / take-home programming excercise (<a href=\"https://github.com/nutshellcrm/join-the-team\">public repo</a>)</li>\n<li><a href=\"https://www.nyon.nl/vacatures\">Nyon</a> | Amsterdam, The Netherlands | 1. Skype (or real life) interview 2. Take home exercise (3-4 hours) 3. Meet entire team and pair programming sessions</li>\n<li><a href=\"https://oreilly.com/jobs\">O'Reilly Media</a> | Sebastopol, CA; Boston, MA; Remote | Phone conversation, take-home exercise or pair programming session, team interview, all via Google Hangout</li>\n<li><a href=\"https://objectpartners.com/careers/\">Object Partners, Inc.</a> | Minneapolis, MN; Omaha, NE | Phone interview to gauge mutual interest, followed by a slightly more in-depth technical round-table interview</li>\n<li><a href=\"https://www.objectiveinc.com/careers\">Objective, Inc.</a> | Salt Lake City, UT | Take-home programming exercise, then onsite friendly chat with team</li>\n<li><a href=\"http://rejoins.octo.com/\">OCTO Technology</a> | Paris, France | HR interview to go over your experiences and cultural knowledge. Then more or less informal discussion with two future team members about architecture design, agile practices, take-home project, pair programming...</li>\n<li><a href=\"https://olist.com/\">Olist</a> | Curitiba, Brazil | Take-home project and remote or on-site interviews</li>\n<li><a href=\"https://www.omadahealth.com/jobs\">Omada Health</a> | San Francisco, CA | Take home exercise and/or pair programming session.</li>\n<li><a href=\"https://onfido.com/jobs\">Onfido</a> | London, UK; Lisbon, Portugal | Take-home exercise and on-site interview/discussion with potential team</li>\n<li><a href=\"https://ontame.io/\">Ontame.io</a> | Copenhagen, Denmark | Take home exercise and specific role discussion</li>\n<li><a href=\"https://opbeat.com/jobs#seniorbackendengineer\">Opbeat</a> | Copenhagen, Denmark | Pairing on a real-world problem</li>\n<li><a href=\"https://www.openmindonline.it/\">Openmind</a> | Monza, Italy | On-site interviews</li>\n<li><a href=\"http://www.optoro.com/open_position_item/?oid=134960\">Optoro</a> | Washington, DC | Take home exercise. Review your code onsite.</li>\n<li><a href=\"http://www.ostmodern.co.uk/\">Ostmodern</a> | London, UK | Take-home exercise &#x26; discussion on-site</li>\n<li><a href=\"https://www.outbrain.com/jobs\">Outbrain</a> | NYC, Israel | Take-home exercise &#x26; discussion</li>\n<li><a href=\"https://outlandish.com/\">Outlandish</a> | London, UK | Take-home exercise, real-world pair programming session, friendly chat with team</li>\n<li><a href=\"https://github.com/outlook/jobs\">Outlook iOS &#x26; Android</a> | San Francisco, CA / New York, NY | Take-home project &#x26; online / onsite discussion</li>\n<li><a href=\"https://www.nerdery.com/careers\">The Nerdery</a> | Minneapolis, MN; Chicago, IL; Phoenix, AZ; Kansas City, KS | Take-home exercise</li>\n<li><a href=\"https://boards.greenhouse.io/theoutline\">The Outline</a> | New York, NY | Take-home exercise</li>\n</ul>\n<h2>P - R</h2>\n<ul>\n<li><a href=\"https://www.pace.car/jobs\">PACE Telematics</a> | Karlsruhe, Germany | Culture and mindset check, on-site meet and great, small code challenge to see development style and strategy</li>\n<li><a href=\"https://www.paessler.com/company/career/jobs\">Paessler AG</a> | Nuremberg, Germany | Pairing with different engineers on a real problem</li>\n<li><a href=\"https://pagar.me/\">Pagar.me</a> | São Paulo, BR | Skype interview, on-site pairing task and-or real world problem solving process / presentation</li>\n<li><a href=\"https://pager.com/\">Pager</a> | New York, NY; Remote | Short phone interview, conversational interviews, take-home exercise &#x26; discussion</li>\n<li><a href=\"https://pagerduty.com/careers\">PagerDuty</a> | San Francisco, CA / Toronto, Canada / Atlanta, GA | Zoom / on-site pair programming and tasks</li>\n<li><a href=\"https://tech.palatinategroup.com/\">Palatinate Tech</a> | London, UK | Hangout/Skype/phone followed by (normally) on-site pairing task</li>\n<li><a href=\"http://parabol.co/\">Parabol</a> | New York, NY; Los Angeles, CA; Remote | Culture check followed by compensated, <a href=\"https://github.com/ParabolInc/action/projects\">open-source contribution</a> skills evaluation</li>\n<li><a href=\"http://parivedasolutions.com/\">Pariveda Solutions</a> | Dallas, TX / Houston, TX / Atlana, GA / Washington, DC / New York, NY / Chicago, IL / San Francisco, CA / Seattle, WA / Los Angeles, CA | Personality assessment (Predictive Index) and case study. Programming aptitude test (language independent) for college hires.</li>\n<li><a href=\"https://passfort.com/about#jobs\">PassFort</a> | London, UK | Skype interview, and on-site pairing task</li>\n<li><a href=\"https://paws.com/careers\">Paws</a> | London, UK | Phone screening, take-home project, on-site pairing/discussion on your solution and meet the team.</li>\n<li><a href=\"https://paybase.io/\">Paybase</a> | London, UK | Phone screening, Take home project, On-site interview for technical and culture fit, Open Q&#x26;A session with team</li>\n<li><a href=\"https://www.paybyphone.com/careers\">PayByPhone</a> | Vancouver, Canada | Remote programming interview, on-site \"meet the team\"</li>\n<li><a href=\"https://peaksware.com/\">Peaksware Companies (TrainingPeaks, TrainHeroic, MakeMusic)</a> | Boulder, CO; Denver, CO | Phone screen, take home project, remote and on-site interviews for technical and cultural fit</li>\n<li><a href=\"https://info.peerstreet.com/careers\">PeerStreet</a> | Los Angeles, CA | Phone, take home project &#x26; on-site to meet the team</li>\n<li><a href=\"https://angel.co/pento/jobs\">Pento</a> | Remote | Quick personal interview, take home project</li>\n<li><a href=\"https://www.persgroep.nl/werken-bij-it\">Persgroep, de</a> | Amsterdam, Netherlands | Tech interview (technical background and experiences) and culture fit, both on-site</li>\n<li><a href=\"https://angel.co/pexeso/jobs\">Pex</a> | Los Angeles, CA; Remote | 3 sessions: brief phone conversation (30 min); take home assignment (2 hours); on-site or video discussion without any coding (2 hours)</li>\n<li><a href=\"https://www.phoodster.com/\">Phoodster</a> | Stockholm, Sweden | Take-home exercise + on-site discussion</li>\n<li><a href=\"http://pillartechnology.com/careers\">Pillar Technology</a> | Ann Arbor, MI; Columbus, OH; Des Moines, IA | Phone, take home exercise, in-person pairing session and site visit.</li>\n<li><a href=\"https://pilot.co/become-a-partner\">Pilot</a> | Remote | Two calls. Introduction one (30m) + verification of communication skills and remote work experience (15m)</li>\n<li><a href=\"https://pivotal.io/careers\">Pivotal</a> | San Francisco, CA; Los Angeles, CA; New York, NY; Boston, MA; Denver, CO; Atlanta, GA; Chicago, IL; Seattle, WA; Washington, D.C.; London, UK; Sydney, Australia; Toronto, Canada; Paris, France; Berlin, Germany; Tokyo, Japan | Initial remote technical screen featuring pair programming; on-site pair programming interview, generally a full day pairing on production code using test-driven development.</li>\n<li><a href=\"https://platform.sh/\">Platform.sh</a> | Paris, International | Remote Interview, Wide-Ranging discussions on many diverse subjects. Remote interviews with team members.</li>\n<li><a href=\"https://platform45.com/\">Platform45</a> | Johannesburg, South Africa; Cape Town, South Africa | On-site interview, take-home project and culture fit day</li>\n<li><a href=\"https://getcatalyst.in/careers\">Playlyfe</a> | Bangalore, India | Short personal interview, on-site demonstration of programming in browser devtools followed by discussion about the problem</li>\n<li><a href=\"https://www.pluralsight.com/careers\">Pluralsight</a> | Salt Lake City, UT; San Francisco, CA; Boston, MA; Orlando, FL | Takehome exercise &#x26; pair programming session</li>\n<li><a href=\"http://pointman.bamboohr.com/jobs/\">Pointman</a> | Buffalo, NY | Takehome exercise + on-site discussion</li>\n<li><a href=\"http://jobs.poki.com/\">Poki</a> | Amsterdam, The Netherlands | Pair programming on-site w/ two engineers where we focus on teamwork, googling relevant documentation and fixing things together.</li>\n<li><a href=\"http://polar.me/company/careers\">Polar</a> | Toronto, Canada | Phone interview, followed by 1-2 onsite pair-programming interviews based on their platform</li>\n<li><a href=\"http://www.popstand.com/\">Popstand</a> | Los Angeles, CA | Build MVPs for startups</li>\n<li><a href=\"http://www.popularpays.com/\">Popular Pays</a> | Chicago, IL | Phone chat/coffee to determine what will be worked on during a day of pair-programming on a real problem that the candidate thinks best demonstrates their skills.</li>\n<li><a href=\"https://pragma.team/talent\">Pragmateam</a> | Sydney, Australia | Engineering Consultancy And Delivery - Takehome exercise &#x26; discussion</li>\n<li><a href=\"https://www.premiumbeat.com/careers\">PremiumBeat</a> | Montreal, Canada | Discussion and general, high level questions</li>\n<li><a href=\"https://www.primary.com/jobs\">Primary</a> | New York, NY / Remote | Phone chat, take home exercise, pair program and discuss onsite.</li>\n<li><a href=\"https://www.promptworks.com/jobs\">PromptWorks</a> | Philadelphia, PA | Take-home project, pair programming, discussion on-site</li>\n<li><a href=\"https://pusher.com/jobs\">Pusher</a> | London, UK | Solve a real-world problem through a design session with our engineers</li>\n<li><a href=\"http://pygmalios.com/en\">Pygmalios</a> | Bratislava, Slovakia | Take-home project related to business and discussion with our engineers.</li>\n<li><a href=\"https://quietlightcom.com/positions-web.php\">Quiet Light Communications</a> | Rockford, IL, USA | Discussion, work samples and/or small freelance project</li>\n<li><a href=\"http://www.workatquintype.com/\">Quintype</a> | Bengaluru, India / San Mateo, USA | Take home project, pair programming, discussion on-site</li>\n<li><a href=\"https://quizizz.com/\">Quizizz</a> | Bengaluru, India | Phone chat, real world assignment, discussion w/ developers, pair programming, discussion on-site</li>\n<li><a href=\"https://ragnarson.com/\">Ragnarson</a> | Lodz, Poland; Remote | Take-home exercise &#x26; pair programming session</li>\n<li><a href=\"https://www.railslove.com/\">Railslove</a> | Cologne, Germany | Have a coffee in our office, casual chat with us, pair programming on a real project</li>\n<li><a href=\"https://www.raisingit.com/\">Raising IT</a> | London, UK | Coffee with a team member, on-site pair programming and discussion</li>\n<li><a href=\"https://jobs.rakuten.careers/careersection/rakuten_ext_cs/jobdetail.ftl?job=00000751&#x26;tz=GMT%2B09%3A00\">Rakuten</a> | Tokyo, Japan | Discuss about relevant experience</li>\n<li><a href=\"http://www.rapyuta-robotics.com/pages/jobs.html\">Rapyuta Robotics</a> | Bengaluru, India / Tokyo, Japan / Zurich, Switzerland | Take-home assignment related to our ongoing projects, series of technical / experience based interviews, candidate presentation</li>\n<li><a href=\"https://rayfeed.com/\">Rayfeed</a> | Vancouver, Warsaw | Video-call interview followed by a take-home exercise</li>\n<li><a href=\"https://razorpay.com/jobs\">Razorpay</a> | Bangalore, India | Phone screen, On-site pair programming, and ocassionally a take home project.</li>\n<li><a href=\"https://reactiveops.com/careers\">ReactiveOps</a> | Remote | Start with a brief talk with CTO or VP of Engineering, take home coding challenge, then remote interviews with several people on the engineering team</li>\n<li><a href=\"https://reaktor.com/careers\">Reaktor</a> | New York, NY; Amsterdam, Netherlands; Helsinki, Finland; Tokyo, Japan | Discussion, work samples from previous projects (work or hobby), take-home exercise if needed for further info</li>\n<li><a href=\"https://realhq.com/jobs\">Real HQ</a> | Austin, TX / Chicago, IL / Remote | Phone/video interviews, a take-home coding exercise, and a remote pair programming session.</li>\n<li><a href=\"https://realync.com/careers\">Realync</a> | Chicago, IL / Carmel, IN / Remote | Quick phone interview, then a take home project and finally in person interview (open discussions instead of quizzes - anything technical are real-world problems).</li>\n<li><a href=\"https://red-badger.com/about-us/join-us\">Red Badger</a> | London, UK | Phone &#x26; Skype interview, take home exercise, On-site interview</li>\n<li><a href=\"https://www.redcarpetup.com/jobs\">RedCarpet</a> | New Delhi, India | Interview, work sample/take-home project and discussion/code reviews</li>\n<li><a href=\"https://www.reflektive.com/careers/\">Reflektive</a> | San Francisco, CA; Bengaluru, India | A short take home project/assignment, followed by a couple of technical and non-technical discussions online and offline.</li>\n<li><a href=\"https://relabe.com/\">Relabe</a> | San Juan, PR | First we screen for cultural fit then check for technical proficiency. 2-3 Interviews max in SJ</li>\n<li><a href=\"https://www.rentify.com/jobs\">Rentify</a> | London, UK | Phone call, take home real-world project, on-site pair programming, product discussion</li>\n<li><a href=\"https://www.rentomojo.com/about/careers\">RentoMojo</a> | Bangalore, India | Short takehome project + phone interview</li>\n<li><a href=\"https://resin.io/\">Resin.io</a> | Remote | Take home real-world project and a couple of technical and non-technical discussions</li>\n<li><a href=\"https://www.respark.co.uk/\">ReSpark</a> | London, UK | Phone conversation followed by on-site interview w/ task relevant to daily role.</li>\n<li><a href=\"https://www.restaurantops.co/\">RestaurantOps</a> | Scottsdale, AZ | Take Home Project &#x26; pair programming session</li>\n<li><a href=\"https://revlv.net/\">Revlv</a> | Manila, Philippines | Discussion about developer skills, previous projects and experiences.</li>\n<li><a href=\"https://www.rexsoftware.com/careers\">Rex Software</a> | Brisbane, Australia | Take home project, feedback + interview</li>\n<li><a href=\"https://rizk.com/\">Rizk.com</a> | Ta' Xbiex, Malta | Take-home assignment, discussion w/ developers</li>\n<li><a href=\"http://www.rockode.com/\">Rockode</a> | Bangalore, India | Real world assignment, group hack session, discussions</li>\n<li><a href=\"http://rosedigital.co/\">Rose Digital</a> | New York, NY | Phone conversation followed by pair coding components that mirror day to day work, in person discussion about code, take home project if needed for more info</li>\n<li><a href=\"https://rubygarage.org/\">RubyGarage</a> | Dnipro, UA | Take-home project, code review and discussion on-site</li>\n<li><a href=\"https://www.runtastic.com/\">Runtastic</a> | Linz, Austria; Vienna, Austria | Video call with recruiting staff, take home project, video call for code review, discussion, questions</li>\n</ul>\n<h2>S - U</h2>\n<ul>\n<li><a href=\"https://www.sahajsoft.com/\">Sahaj Software Solutions</a> | Bangalore, India; Chennai, India; San Jose, CA | Take home code + Pairing + Discussion</li>\n<li><a href=\"http://www.salesforce.org/\">Salesforce.org Tech &#x26; Products</a> | Remote | Phone screen, hands-on programming test solving real-world problems, Google Hangouts video sessions with engineers</li>\n<li><a href=\"https://salesloft.com/\">Salesloft</a> | Atlanta, GA | Phone interview, take-home project, cultural-fit interview, technical interview where candidate modifies take-home project</li>\n<li><a href=\"https://www.samsara.com/jobs\">Samsara</a> | San Francisco, CA; Atlanta, GA; London, UK | Phone interview, onsite interview (technical challenges based on real problems we've faced at Samsara)</li>\n<li><a href=\"https://sc5.io/careers\">SC5 Online</a> | Helsinki, Finland; Jyväskylä, Finland | Take-home assignment (intentionally short, takes at most an hour to complete), discussion and review assignments</li>\n<li><a href=\"https://segment.com/\">Segment</a> | San Francisco, CA; Vancouver, Canada | Phone interview, take-home assignment (small fun project), onsite interview (technical + core/culture) -> intended to set you up for success</li>\n<li><a href=\"https://sensortower.com/jobs\">Sensor Tower</a> | San Francisco, CA | Phone call, on-site interview including discussion about projects/skills and a short real-world programming challenge</li>\n<li><a href=\"https://sensu.io/\">Sensu</a> | Remote | Video call, choice of pairing session or take home programming assignment</li>\n<li><a href=\"http://sentisis.com/trabaja-con-nosotros\">Séntisis</a> | Madrid, Spain; Mexico City, Mexico; Bogotá, Colombia; Santiago de Chile, Chile; Remote | Phone call, on-site/remote interview including discussion about projects/skills and a short real-world pair-programming exercise</li>\n<li><a href=\"https://serpapi.com/\">SerpApi</a> | Austin, TX / Remote | Skype core value and culture interview, review of contributions on GitHub or other platforms, and take-home project if online contributions are not enough.</li>\n<li><a href=\"https://sertiscorp.com/\">Sertis</a> | Bangkok, Thailand | Technical &#x26; culture fit interview, take-home project, follow-up discussion</li>\n<li><a href=\"https://setapp.pl/career\">Setapp Sp. z o.o.</a> | Poznan, Poland | Online/face-to-face discussion with developers about everyday programming dilemmas &#x26; reviewing your own code</li>\n<li><a href=\"https://www.sharoo.com/jobs/\">Sharoo</a> | Zurich, Switzerland; Remote | Soft skills interview, take home project, technical interview based on take home project.</li>\n<li><a href=\"https://getshogun.com/\">Shogun</a> | Remote | Discussion about software development and past experience, code samples, paid trial period.</li>\n<li><a href=\"https://blog.showmax.com/engineering-careers\">Showmax</a> | Beroun, Czechia; Prague, Czechia; Remote | Take home project, then a pair-programming and discussion onsite / Hangouts round.</li>\n<li><a href=\"https://shuttlecloud.com/jobs\">ShuttleCloud</a> | Chicago, IL / Madrid, Spain | Take-home project, then on-site code walk through and a real world problem discussion.</li>\n<li><a href=\"https://www.signal-ai.com/about-us/careers\">Signal AI</a> | London, UK | Phone screen; take home code exercise; on-site code extension with pair programming and discussion</li>\n<li><a href=\"https://www.simple.com/\">Simple</a> | Portland, OR | Discussion about software development and architecture skills and experience.</li>\n<li><a href=\"https://www.simpli.fi/about-us/careers\">Simpli.fi</a> | Fort Worth, TX, USA | Takehome code challenge and review</li>\n<li><a href=\"http://www.welcometothejungle.co/companies/simplifield/jobs\">SimpliField</a> | Lille, France | Interview with the CTO and the developer team</li>\n<li><a href=\"https://www.simplybusiness.co.uk/about-us/careers/tech\">Simply Business</a> | London, UK / Remote | Three stage, one day interview with quick feedback. One of the stages is 1.5h pair-programming session, where interviewee is assigned a task and interviewing developer plays role of Product Owner.</li>\n<li><a href=\"https://www.skyrisepro.com/\">Skyrise Pro</a> | Chicago, IL | Take-home coding project, on-site interview including coding enhancements to the take-home project, offsite group activity</li>\n<li><a href=\"https://slack.com/jobs\">Slack</a> | San Francisco, CA | Call with recruiter, 1 week take-home project, call with hiring manager, on-site interview covering high-level system design, best software development practices and culture-fit</li>\n<li><a href=\"https://www.small-improvements.com/careers\">Small Improvements</a> | Berlin, Germany</li>\n<li><a href=\"http://www.socialtables.com/\">Social Tables</a> | Washington, DC | Chat about skills and past experiences + bring in a code sample from previous work or side project to discuss</li>\n<li><a href=\"http://www.socialcops.com/\">SocialCops</a> | New Delhi, India | A mini project (to be done within 8 days), followed by a discussion with the team you're applying to. Then as the final step, a call with one of the founders.</li>\n<li><a href=\"http://nl.softwear.nl/vacatures\">Softwear</a> | Amsterdam, Netherlands | Writing software for the fashion industry - remotely - in an international team.</li>\n<li><a href=\"http://sogilis.com/\">Sogilis</a> | Grenoble, France | Discussion about interests, practices, and motivation. Presentation/code review/pair programming on a personal or professional project.</li>\n<li><a href=\"https://about.sourcegraph.com/jobs\">Sourcegraph</a> | San Francisco, CA &#x26; Remote | Tailored to the candidate, often consists of take-home work, discussion of real-world eng challenges, and product familiarity.</li>\n<li><a href=\"https://jobs.splice.com/\">Splice</a> | New York, NY; Remote | Call with recruiter, 4 hr take-home project, video interview w two engs on take-home exercise, video call with hiring manager, video call w VPE &#x26; principal eng to talk about architecture.</li>\n<li><a href=\"https://www.spreedly.com/jobs\">Spreedly</a> | Durham, NC | Take-home project <a href=\"https://engineering.spreedly.com/blog/programming-puzzles-are-not-the-answer-how-spreedly-does-work-samples.html\">related to business</a></li>\n<li><a href=\"https://www.natureasia.com/\">Springer Nature (Asia)</a> | Tokyo, Japan | Discussion &#x26; Pair programming session</li>\n<li><a href=\"https://sndigital.springernature.com/\">Springer Nature Digital</a> | Berlin, Germany; London, UK | Phone chat; take-home project; then a pairing session based on the project, a technical chat, and a chat with non-technical team members</li>\n<li><a href=\"https://www.spronq.nl/\">SpronQ</a> | Amsterdam, Netherlands | Takehome coding challenge</li>\n<li><a href=\"https://squareup.com/careers\">Square</a> | San Francisco, CA | Pair programming in a work environment</li>\n<li><a href=\"http://srijan.net/\">Srijan Technologies</a> | Delhi, India | General high level questions/discussion followed by Pair programming OR take-home coding challenge</li>\n<li><a href=\"http://stardog.com/\">Stardog Union</a> | Washington, DC; Remote | Technical discussion and general interest conversations</li>\n<li><a href=\"http://statflo.com/\">Statflo</a> | Toronto, Canada | Phone screening, take home project, on-site interview discussing the take home project, high-level architectural brainstorm, and questions about career and team work.</li>\n<li><a href=\"https://www.store2be.com/de/jobs/tech\">store2be</a> | Berlin, Germany | Skype/on-site interview, take-home project</li>\n<li><a href=\"https://www.stormx.io/about#jobs\">Storm</a> | Seattle, WA; Remote | Phone/skype screen --> Take-home coding assignment --> on-site/skype interview loop to discuss assignment; meet-and-greet with other teams --> +1/-1 based on team consensus</li>\n<li><a href=\"http://www.stylabs.in/\">STYLABS</a> | Mumbai, India | Phone Screen, Take-home project and discussion on-site</li>\n<li><a href=\"https://verticalchange.com/job_posts\">Subvertical (VerticalChange)</a> | Remote | Phone screening, live pair programming &#x26; personal project code review</li>\n<li><a href=\"https://sulvo.com/careers\">Sulvo</a> | New York, NY / Remote | Interview over video call for cultural fit first, if you pass we proceed with technical interview that doesn't include coding games or challenges</li>\n<li><a href=\"https://superplayer.fm/\">Superplayer</a> | Porto Alegre, Brazil | Skype/On-site interview, take-home project and interview with CTO and CEO</li>\n<li><a href=\"https://surveysparrow.com/careers\">SurveySparrow</a> | Kochi, India | Skype interview, take home project and code review, interview with CTO and CEO</li>\n<li><a href=\"http://svti.svt.se/\">SVTi (Sveriges Television)</a> | Stockholm, Sweden | On-site interview, take-home project, follow up interview where you walk through how you chose to solve the task.</li>\n<li><a href=\"https://sweetiq.com/about/careers\">SweetIQ</a> | Montreal, Canada | Discussion and general, high level questions</li>\n<li><a href=\"https://www.symphonycommerce.com/careers\">Symphony Commerce</a> | San Francisco, CA / Remote | Take-home project (phone), design discussion, review and critique <em>our</em> code, debugging questions</li>\n<li><a href=\"https://www.symplicity.com/about/join-us\">Symplicity</a> | Arlington, VA | Take-home project and code review in-person</li>\n<li><a href=\"http://sysgarage.com/\">SysGarage</a> | Buenos Aires, Argentina | Take-home project and real world pair programming</li>\n<li><a href=\"https://corp.tablecheck.com/en/jobs\">TableCheck</a> | Tokyo, Japan | Show us your code! Brief Skype interview and take-home project or pairing for those without code.</li>\n<li><a href=\"https://tailorbrands.com/jobs\">Tailor Brands</a> | Tel Aviv-Yafo, Israel | Discuss knowledge and interests, explore previous work experience, during the technical interview we discuss real-life problems.</li>\n<li><a href=\"https://tails.com/careers\">tails.com</a> | Richmond (London), UK | Live pair programming or take home project with review</li>\n<li><a href=\"http://tanookilabs.com/\">Tanooki Labs</a> | New York, NY | Paid half-day take home project with followup review and discussion</li>\n<li><a href=\"https://www.tattoodo.com/\">Tattoodo</a> | Copenhagen, Denmark | Takehome exercise</li>\n<li><a href=\"https://labs.telus.com/\">Telus Digital</a> | Toronto, Canada; Vancouver, Canada | Discuss knowledge and interest, explore previous work, pair with developers when possible, alternatively take home project.</li>\n<li><a href=\"https://tenthousandcoffees.com/\">Ten Thousand Coffees</a> | Toronto, Canada | Take home project, then explain how you solved the project</li>\n<li><a href=\"https://engineering.tes.com/recruitment/\">Tes</a> | Remote; London, UK | Remote pair programming session on React/Node kata with small takehome exercise as prep. Remote interview with senior engineers about previous experience, technical knowledge and interests.</li>\n<li><a href=\"https://www.tesco.com/\">Tesco PLC</a> | London, United Kingdom | Pair programming and casual hypothetical system design discussion</li>\n<li><a href=\"https://testdouble.com/join/developer\">Test Double</a> | Remote | Initial conversation, Consulting interview, Technical interview, Pair programming, Takehome exercise.</li>\n<li><a href=\"https://textio.com/careers/?utm_source=github&#x26;utm_medium=forum&#x26;utm_campaign=textio-careers-engineering&#x26;utm_content=poteto-hiring-without-whiteboards\">Textio</a> | Seattle, WA | Initial screen to discuss experience and interest in a role at Textio; then a take-home programming task is discussed during a 1-hour tech screen (on-site or remote); finally a larger take-home project, simulating real work, is discussed during an on-site presentation plus 1-1s; <a href=\"https://textio.ai/how-we-hire-a74cdbadd1e8\">How we hire</a></li>\n<li><a href=\"https://thebookofeveryone.workable.com/\">The Book of Everyone</a> | Barcelona, Spain | Quick interview, meet the team, pairing with developers on your own project</li>\n<li><a href=\"http://mobile.thescore.com/careers\">theScore</a> | Toronto, Canada | Coding challenge &#x26; systems design challenge</li>\n<li><a href=\"https://www.thinkmill.com.au/\">Thinkmill</a> | Sydney, Australia | Initial meet and greet interview with Thinkmillers from the relevant team, take home assignment followed by tech review on a followup interview.</li>\n<li><a href=\"http://www.thinslices.com/\">Thinslices</a> | Iasi, Romania | Takehome exercise &#x26; in person pair programming on a simple Kata.</li>\n<li><a href=\"https://thoughtbot.com/jobs\">thoughtbot</a> | San Francisco, CA; London, UK | <a href=\"https://thoughtbot.com/playbook/our-company/hiring#interviewing\">Our interview process</a></li>\n<li><a href=\"https://www.thoughtworks.com/careers\">ThoughtWorks</a> | San Francisco, CA | Interviews with ThoughtWorkers of diverse backgrounds and roles; take home assignment followed by in person pairing session.</li>\n<li><a href=\"https://www.thread.com/jobs\">Thread</a> | London, UK | Take home test, real world architecture design, real world pair programming.</li>\n<li><a href=\"https://www.threatspike.com/\">ThreatSpike Labs</a> | London, UK | Take home computing and security related challenges to be completed over a week.</li>\n<li><a href=\"http://www.tilde.io/\">Tilde</a> | Portland, OR | Pair programming sessions with each member of the team, working on problems similar to daily work.</li>\n<li><a href=\"https://www.timbuktutravel.com/\">Timbuktu</a> | Cape Town, South Africa | On site interview and pair programming exercise</li>\n<li><a href=\"https://titanium.codes/\">Titanium</a> | Moldova, Chisinau | High level review of public activity on GitHub/BitBucket/Gitlab (if applicable) and screening via phone, On-site technical &#x26; Team fit interview, Formal \"Meet the Team\" meeting</li>\n<li><a href=\"https://toggl.com/jobs\">Toggl</a> | Remote / Tallinn, Estonia | Online test on basic programming skills, followed by interview (typically includes get-to-know questions and technical skill testing). Depending on the team, there may be a take-home or live coding assignment. <strong>Paid test week</strong> to work with the team on actual bugs/features.</li>\n<li><a href=\"https://jobs.jointorii.co/\">Torii</a> | Raanana, Israel | Take-home fun full-stack-app exercise followed by an on-site review</li>\n<li><a href=\"http://toucantoco.com/fr/team#jobs\">Toucan Toco</a> | Paris, France | Pair-programming and TDD</li>\n<li><a href=\"https://gotouche.com/\">Touché</a> | Singapore, Singapore; Barcelona, Spain | Skype / Phone / on-site interview, take-home project, technical interview to discuss the project, team interview.</li>\n<li><a href=\"https://trademark.vision/\">TrademarkVision</a> | Brisbane, Australia | On site interview and quick take-home excercise</li>\n<li><a href=\"http://trainheroic.com/careers/\">TrainHeroic</a> | Boulder, CO; Denver, CO | Phone screen, take home project, remote and on-site interviews for technical and cultural fit</li>\n<li><a href=\"http://www.trainingpeaks.com/careers.html\">TrainingPeaks</a> | Boulder, CO; Denver, CO | Phone screen, take home project, remote and on-site interviews for technical and cultural fit</li>\n<li><a href=\"http://www.tripstack.com/company/careers/\">TripStack</a> | Toronto, Canada | Take-home assignment, followed up by a face to face code walk through</li>\n<li><a href=\"https://www.trivago.com/\">Trivago</a> | Düsseldorf, Germany | Case Study, Skype Interview, On site Interview with some code review exercises</li>\n<li><a href=\"https://boards.greenhouse.io/trov\">Trōv</a> | Remote | Take-home project with followup interview from actual prospective teammates</li>\n<li><a href=\"https://truefit.io/about/\">Truefit</a> | Pittsburgh, PA | Phone screen, Take-home project, In-person interview with the team that you would join</li>\n<li><a href=\"https://truora.com/\">Truora</a> | Bogotá, Colombia; Cali, Colombia; Remote | Take-home project, followed by phone interview with tech leads to discuss the project.</li>\n<li><a href=\"https://truss.works/jobs\">Truss</a> | San Francisco, CA; Remote | Phone screen/ Take-home project that resembles a problem Truss has seen many times before / Followup interview about the project / Closing Interview, all interviews done remotely</li>\n<li><a href=\"https://www.twistlock.com/\">Twistlock</a> | Tel Aviv, Israel | Takehome</li>\n<li><a href=\"https://uberall.com/en/careers\">uberall</a> | Berlin, Germany | 30-min coding on-site, then a trial day</li>\n<li><a href=\"https://ubiome.com/careers\">uBiome</a> | San Francisco, CA / Santiago, Chile | High level screening over the phone or on-site, take home project, code review and discussion</li>\n<li><a href=\"http://ubots.com.br/\">Ubots</a> | Porto Alegre, Brazil | Skype/On-site interview, take-home project, technical interview</li>\n<li><a href=\"https://unbounce.com/\">Unbounce</a> | Vancouver, BC | Phone screen, take-home project, project discussion, technical interview</li>\n<li><a href=\"https://unboxed.co/\">Unboxed</a> | London, UK | Take home feature requests, pairing with developers to extend solution, team-fit interviews, chat with a director</li>\n<li><a href=\"http://www.unearthlabs.com/careers\">Unearth</a> | Seattle, WA | Take home project, team-fit interviews, technical discussion</li>\n<li><a href=\"https://unito.io/careers/\">Unito</a> | Montreal, Canada | Team-fit interviews, technical discussion, take home project</li>\n<li><a href=\"https://www.untappd.com/\">Untappd</a> | Wilmington, NC; New York, NY; Los Angeles, CA | Review portfolio - What projects have you worked on? + personality assessment, + interview</li>\n<li><a href=\"http://www.updater.com/jobs/openings\">Updater</a> | New York, NY | Begin-at-home assignment highly relevant to role, presented and discussed during on-site.</li>\n<li><a href=\"http://uprise.se/\">Uprise</a> | Uppsala, Sweden | Take-home assignment, code review and discussion on-site</li>\n<li><a href=\"https://www.urbanmassage.com/jobs\">Urban Massage</a> | London, UK | Project done at home, in-person walk through. Meeting the team is an integral part.</li>\n<li><a href=\"https://www.usertesting.com/about-us/jobs\">UserTesting</a> | Atlanta, GA; San Francisco, CA; Mountain View, CA | Initial interview, pair programming, and offer</li>\n<li><a href=\"https://www.uswitch.com/vacancies\">uSwitch</a> | London, UK | Take-home project related to our business area, followed by pairing with developers to extend it</li>\n</ul>\n<h2>V - X</h2>\n<ul>\n<li><a href=\"http://www.valassis.com/digital-advertising\">Valassis Digital</a> | Seattle, WA; San Francisco, CA; Lansing, MI; Hamburg, Germany | Phone screen, on-site interview with group, paired whiteboard problem solving and discussion, take-home project and follow-up review</li>\n<li><a href=\"https://valuemotive.com/en/career\">Valuemotive</a> | Helsinki, Finland | Code examples from previous projects (work or hobby) or take-home exercise</li>\n<li><a href=\"https://www.varsitytutors.com/\">Varsity Tutors</a> | Remote | Take home assignment, presentation of assignment, live code review with team. Advanced / high-level chat with team based on skillset and role.</li>\n<li><a href=\"http://vayu.com.au/\">Vayu Technology</a> | Sydney, Australia; Kathmandu, Nepal | Short interview, general programming questions and short take home challenge.</li>\n<li><a href=\"https://www.venminder.com/\">Venminder, Inc.</a> | Elizabethtown, KY; Louisville, KY | Initial phone screen to explain position. If candidate interested they get a take home assignment followed by a non-scripted in-person interview with team members to judge personality fit.</li>\n<li><a href=\"https://verve.co/careers\">Verve</a> | London, UK | An intentionally short, take home exercise that mirrors real project work and incorporates code review elements</li>\n<li><a href=\"https://careers.vingle.net/\">Vingle</a> | Seoul, Korea | Written interview, takehome project, in-person, conversational code review and interviews with engineers and engineering managers</li>\n<li><a href=\"http://virtual7.de/de/karriere\">virtual7</a> | Kalrsruhe, Germany | Phone interview and on-site interview based on personal experience.</li>\n<li><a href=\"https://www.e-conomic.dk/om/job\">Visma e-conomic</a> | Copenhagen, Denmark | Take home assignment, assignment presentation and discussion</li>\n<li><a href=\"https://voltra.co/\">Voltra Co.</a> | Amsterdam, Netherlands / New York, NY / Remote | Show us your github account, tell us what you know. Let's pair on an OSS PR!</li>\n<li><a href=\"https://https//vsx.net/jobs\">VSX</a> | Dresden, Germany | On-site interview, home coding challenge, presentation/discussion of proposed solutions</li>\n<li><a href=\"http://lab.vtex.com/careers\">VTEX</a> | Rio de Janeiro, Brazil | Take-home project, Skype interview and then in-person talk.</li>\n<li><a href=\"https://buildingvts.com/\">VTS</a> | New York City, New York | Technical Phone Screen, Pair programming on-site &#x26; in-person talks with multiple engineers</li>\n<li><a href=\"https://waymark.com/jobs\">Waymark</a> | Detroit, MI | Technical phone screen, take-home project, going over the project in person, follow up day in the office</li>\n<li><a href=\"https://www.wealthsimple.com/work-with-us\">Wealthsimple</a> | Toronto, Canada | Pair programming on a problem similar to daily work, discussion of system design</li>\n<li><a href=\"http://www.wearehive.co.uk/\">WeAreHive</a> | London, UK | Just walk us through your best code or we give you a small real-world exercise to do at home.</li>\n<li><a href=\"https://webantic.co.uk/careers\">Webantic</a> | Manchester, UK | Basic TNA self-assessment and real-world problem-solving</li>\n<li><a href=\"https://webflow.com/\">Webflow</a> | San Francisco, CA &#x26; Remote | Short take-home challenge, followed by a paid 3-5 day freelance contract project</li>\n<li><a href=\"http://careers.weebly.com/\">Weebly</a> | San Francisco, CA; Scottsdale, AZ; New York, NY | Phone screens (30 min to 1 hour) by a recruiter, an engineering manager (focused on your past experiences), an engineer (focused on system / db / api design). Followed by a paid 3 day onsite where you work on a project and then present it to a team of engineers.</li>\n<li><a href=\"https://weedmaps.com/careers\">Weedmaps</a> | Irvine, CA; Denver, CO; Tucson, AZ; Madrid, Spain; Remote | Phone screen, Group interview, and possible code review</li>\n<li><a href=\"https://wemake.services/\">wemake.services</a> | Remote | Short unpaid take-home challenge, code review, portfolio discussion</li>\n<li><a href=\"https://www.weployapp.com/join-our-team/\">Weploy</a> | Melbourne, Australia; Sydney, Australia | Phase 1: Face to face interview to get to know the candidate. Phase 2: Problem solving session that involves designing a solution to a real-world problem followed by 1/2 day of pairing with a senior dev on implementing the proposed solution.</li>\n<li><a href=\"https://wetransfer.homerun.co/\">WeTransfer</a> | Amsterdam, Netherlands | Culture fit and fundamentals chat, skills interview - no whiteboarding! - and take-home project, communication and collaboration interview, meet with the VP of Engineering</li>\n<li><a href=\"https://wheely.com/en/careers\">Wheely</a> | Moscow, Russia | Get to know each other in under 30 minutes on-site or via Skype, take-home challenge, on-site review and interview with the team.</li>\n<li><a href=\"https://wildbit.com/\">Wildbit</a> | Philadelphia, PA &#x26; Remote | Take-home project followed by interviews.</li>\n<li><a href=\"https://wirecardbrasil.workable.com/\">Wirecard Brasil</a> | São Paulo, Brazil | Phone or on-site Cultural Fit interview, take-home coding challenge, code review and discussing in-person.</li>\n<li><a href=\"https://worldgaming.com/\">WorldGaming</a> | Toronto, Canada | Technical Interview, Solution Design, Take Home Assignment, then Culture fit interview with the team</li>\n<li><a href=\"https://woumedia.com/\">woumedia</a> | Remote | Getting to know each other and aligning expectations. Talking about past experiences, projects you are proud of and latest challenges you faced. It's followed by a use case study from one of our current projects.</li>\n<li><a href=\"https://wyeworks.com/\">WyeWorks</a> | Montevideo, Uruguay | Take-home project and discussion on-site</li>\n<li><a href=\"http://x-team.com/\">X-Team</a> | Remote | A short, fun Node.js challenge, followed by a series of culture-based interview questions, followed by a creative mock project with tons of freedom on how to approach, and follow-up questions about the approach they chose to discuss the tradeoffs. Usually a 10-30 day paid training is rewarded to top candidates to prep them for remote communication skills needed to join a team.</li>\n<li><a href=\"https://www.xing.com/\">XING</a> | Hamburg, Germany | Take-home coding challenge, on-site review and short interviews with future team.</li>\n</ul>\n<h2>Y -</h2>\n<ul>\n<li><a href=\"http://www.1000mercis.com/#!/careers/?lang=en\">1000mercis group</a> | Paris, France | Series of interviews, that go over technical background, past experiences and cultural knowledge</li>\n<li><a href=\"https://18f.gsa.gov/join/\">18F</a> | Remote; Washington, DC; New York, NY; Chicago, IL; San Francisco, CA | take-home coding exercise (2-4 hours), technical and values-match interviews over video chat</li>\n<li><a href=\"https://3dhubs.com/jobs\">3D Hubs</a> | Amsterdam, The Netherlands | Take-home code challenge from our product's domain followed by discussion remote/on-site, sometimes do an additional on-site pair programming session.</li>\n<li><a href=\"http://500friends.com/who-we-are/careers\">500friends</a> | San Francisco, CA; Remote | Take home challenge followed by onsite expansion of the submission and high level discussions (design exercise or overview of past projects)</li>\n<li><a href=\"https://500tech.com/\">500Tech</a> | Tel Aviv, Israel | Pair programming on a laptop in working env</li>\n<li><a href=\"https://8thlight.com/\">8th Light</a> | Chicago, IL; London, UK; Los Angeles, CA; New York, NY | Take home code challenge, discussion, pair programming session</li>\n<li><a href=\"https://www.yhat.com/jobs\">Yhat</a> | Brooklyn, NY | Demo something cool you built and walk us thru the code + design decisions</li>\n<li><a href=\"https://yld.breezy.hr/\">YLD</a> | London, UK | Take home-code challenge, pair-programming session and discussion about past experience</li>\n<li><a href=\"https://yodas.com/\">Yodas</a> | Binyamina, Israel | Coding tasks over github repository</li>\n<li><a href=\"http://yoyowallet.com/\">Yoyo Wallet</a> | London, UK | Take home code challenge, discussion of the code challenge, and general, high level questions</li>\n<li><a href=\"http://www.yunojuno.com/\">YunoJuno</a> | London, UK | Code challenge based on a realistic feature request on a real open-source package created and used at YunoJuno; phone/video interview with members of the Product team to explore technical background, experiences, interests, cultural fit; on-site interview, usually with Product Manager and CTO</li>\n<li><a href=\"https://jobs.kenoby.com/grupozap/\">ZAP Group</a> | São Paulo, Brazil | Takehome exercise, series of real-world interviews with engineers, HR, engineering managers and product managers on site.</li>\n<li><a href=\"https://www.zencargo.com/careers\">Zencargo</a> | London, UK | Initial interview with CTO, covering professional experience interests and expectations, followed by one technical interview focused on fundamentals and familiarity with best practices. A further short chat with co-founders to get to know each other - - either onsite or remote.</li>\n<li><a href=\"https://www.zenefits.com/careers\">Zenefits (UI Team)</a> | San Francisco, CA | One technical phone screen focused on JS fundamentals and/or one timeboxed take-home challenge. The onsite is a series of interviews designed to test your understanding of JS, HTML/CSS, design, etc.</li>\n<li><a href=\"https://zerodha.com/careers\">Zerodha</a> | Bengaluru, India | Technical call at the beginning and one take home programming task.</li>\n<li><a href=\"https://boards.greenhouse.io/zype\">Zype</a> | New York, NY &#x26; Remote | Skype/Video call with VP of Product and a take-home challenge.</li>\n</ul>"},{"url":"/docs/docs/snippets/","relativePath":"docs/docs/snippets.md","relativeDir":"docs/docs","base":"snippets.md","name":"snippets","frontmatter":{"title":"Useful Snippets","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h3>A list of all of my articles to link to future posts</h3>\n<p><a href=\"https://bryanguner.medium.com/scope-closures-context-in-javascript-f126f1523104\" title=\"https://bryanguner.medium.com/scope-closures-context-in-javascript-f126f1523104\"><strong>Scope, Closures &#x26; Context In JavaScript</strong><br>\n<em>\"JavaScript's global scope is like a public toilet. You can't avoid going in there, but try to limit your contact with...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/scope-closures-context-in-javascript-f126f1523104\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/fundamental-javascript-concepts-you-should-understand-81c4d839b827\" title=\"https://bryanguner.medium.com/fundamental-javascript-concepts-you-should-understand-81c4d839b827\"><strong>Fundamental Javascript Concepts You Should Understand</strong><br>\n<em>Plain Old JS Object Lesson Concepts</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/fundamental-javascript-concepts-you-should-understand-81c4d839b827\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/mutability-and-reference-vs-privative-types-in-javascript-5294422db4b0\" title=\"https://bryanguner.medium.com/mutability-and-reference-vs-privative-types-in-javascript-5294422db4b0\"><strong>Mutability And Reference VS Privative Types in JavaScript</strong><br>\n<em>Mutability &#x26;&#x26; Primitive &#x26;&#x26; Reference Examples</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/mutability-and-reference-vs-privative-types-in-javascript-5294422db4b0\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/array-callback-methods-implemented-with-for-loops-d08875df6777\" title=\"https://javascript.plainenglish.io/array-callback-methods-implemented-with-for-loops-d08875df6777\"><strong>Array Callback Methods Implemented With For Loops</strong><br>\n<em>How to implement array callback methods in JavaScript</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/array-callback-methods-implemented-with-for-loops-d08875df6777\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/\" title=\"https://javascript.plainenglish.io\"><strong>JavaScript in Plain English</strong><br>\n<em>New JavaScript and Web Development articles every day.</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/introductory-react-part-2-cda01615a186\" title=\"https://bryanguner.medium.com/introductory-react-part-2-cda01615a186\"><strong>Beginner's Guide To React Part 2</strong><br>\n<em>As I learn to build web applications in React I will blog about it in this series in an attempt to capture the...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/introductory-react-part-2-cda01615a186\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/a-very-quick-guide-to-calculating-big-o-computational-complexity-eb1557e85fa3\" title=\"https://bryanguner.medium.com/a-very-quick-guide-to-calculating-big-o-computational-complexity-eb1557e85fa3\"><strong>A Very Quick Guide To Calculating Big O Computational Complexity</strong><br>\n<em>Big O: big picture, broad strokes, not details</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/a-very-quick-guide-to-calculating-big-o-computational-complexity-eb1557e85fa3\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/introduction-to-react-for-complete-beginners-8021738aa1ad\" title=\"https://javascript.plainenglish.io/introduction-to-react-for-complete-beginners-8021738aa1ad\"><strong>Introduction to React for Complete Beginners</strong><br>\n<em>All of the code examples below will be included a second time at the bottom of this article as an embedded gist.</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/introduction-to-react-for-complete-beginners-8021738aa1ad\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/scheduling-settimeout-and-setinterval-fcb2f40d16f7\" title=\"https://javascript.plainenglish.io/scheduling-settimeout-and-setinterval-fcb2f40d16f7\"><strong>Scheduling: setTimeout and setInterval</strong><br>\n<em>We may decide to execute a function not right now, but at a later time. That's called \"scheduling a call\".</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/scheduling-settimeout-and-setinterval-fcb2f40d16f7\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/css-animations-d196a20099a5\" title=\"https://bryanguner.medium.com/css-animations-d196a20099a5\"><strong>LocalStorage VS SessionStorage</strong><br>\n<em>Web storage objects localStorage and sessionStorage allow to save key/value pairs in the browser.</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/css-animations-d196a20099a5\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/these-are-the-bash-shell-commands-that-stand-between-me-and-insanity-984865ba5d1b\" title=\"https://bryanguner.medium.com/these-are-the-bash-shell-commands-that-stand-between-me-and-insanity-984865ba5d1b\"><strong>These Are The Bash Shell Commands That Stand Between Me And Insanity.</strong><br>\n<em>I will not profess to be a bash shell wizard... but I have managed to scour some pretty helpful little scripts from Stack...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/these-are-the-bash-shell-commands-that-stand-between-me-and-insanity-984865ba5d1b\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/how-to-implement-native-es6-data-structures-using-arrays-objects-ce953b9f6a07\" title=\"https://bryanguner.medium.com/how-to-implement-native-es6-data-structures-using-arrays-objects-ce953b9f6a07\"><strong>How To Implement Native(ES6) Data Structures Using Arrays &#x26; Objects</strong><br>\n<em>Smart data structures and dumb code works better than the other way around -\"Eric S. Raymond\"</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/how-to-implement-native-es6-data-structures-using-arrays-objects-ce953b9f6a07\"></a></p>\n<p><a href=\"https://medium.com/codex/objects-in-javascript-cc578a781e1d\" title=\"https://medium.com/codex/objects-in-javascript-cc578a781e1d\"><strong>Objects in Javascript</strong><br>\n<em>Codepen with examples for you to practice with below!</em>medium.com</a><a href=\"https://medium.com/codex/objects-in-javascript-cc578a781e1d\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/absolute-beginners-guide-to-javascript-part-1-e222d166b6e1\" title=\"https://javascript.plainenglish.io/absolute-beginners-guide-to-javascript-part-1-e222d166b6e1\"><strong>The Beginner's Guide To JavaScript</strong><br>\n<em>Part 1</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/absolute-beginners-guide-to-javascript-part-1-e222d166b6e1\"></a></p>\n<p><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-4-fd686892b9eb\" title=\"https://medium.com/star-gazers/web-developer-resource-list-part-4-fd686892b9eb\"><strong>Web Developer Resource List Part 4</strong><br>\n<em>A all encompassing list of tools and resources for web developers</em>medium.com</a><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-4-fd686892b9eb\"></a></p>\n<p><a href=\"https://medium.com/star-gazers\" title=\"https://medium.com/star-gazers\"><strong>Star Gazers</strong><br>\n<em>The place that enthusiastic and stargazer to everything.</em>medium.com</a><a href=\"https://medium.com/star-gazers\"></a></p>\n<p><a href=\"https://medium.com/codex/vscode-extensions-specifically-for-javascript-development-ea91305cbd4a\" title=\"https://medium.com/codex/vscode-extensions-specifically-for-javascript-development-ea91305cbd4a\"><strong>VSCode Extensions Specifically for JavaScript Development</strong><br>\n<em>VSCode Extensions that are indispensable in JavaScript development</em>medium.com</a><a href=\"https://medium.com/codex/vscode-extensions-specifically-for-javascript-development-ea91305cbd4a\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/lists-stacks-and-queues-in-javascript-88466fae0fbb\" title=\"https://javascript.plainenglish.io/lists-stacks-and-queues-in-javascript-88466fae0fbb\"><strong>Fundamental Data Structures in JavaScript</strong><br>\n<em>A simple to follow guide to Lists Stacks and Queues, with animated gifs, diagrams, and code examples!</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/lists-stacks-and-queues-in-javascript-88466fae0fbb\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a\" title=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a\"><strong>Web Development Resources Part 3</strong><br>\n<em>I'm the psychological equivalent of a physical hoarder only instead of empty soda cans and dead racoons it's lists of...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a\"></a></p>\n<p><a href=\"https://medium.com/codex/web-development-interview-part-3-826ae81a9107\" title=\"https://medium.com/codex/web-development-interview-part-3-826ae81a9107\"><strong>Web Development Interview Part 3💻</strong><br>\n<em>This installment is going to be the least technically demanding thus far however these questions are a more realistic...</em>medium.com</a><a href=\"https://medium.com/codex/web-development-interview-part-3-826ae81a9107\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24\" title=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24\"><strong>The Best Cloud-Based Code Playgrounds of 2021 (Part 1)</strong><br>\n<em>A plethora of front-end code playgrounds have appeared over the years. They offer a convenient way to experiment with...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24\"></a></p>\n<p><a href=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443\" title=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443\"><strong>Front End Interview Questions Part 2</strong><br>\n<em>These will focus more on vocabulary and concepts than the application driven approach in my last post!</em>medium.com</a><a href=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443\"></a></p>\n<p><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263\" title=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263\"><strong>Web Developer Resource List Part 2</strong><br>\n<em>Because I compile these things compulsively anyway...</em>medium.com</a><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a\" title=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a\"><strong>HTTP Basics</strong><br>\n<em>\"If you want to build a ship, don't drum up the men and women to gather wood, divide the work, and give orders...</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35\" title=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35\"><strong>JavaScript Frameworks &#x26; Libraries</strong><br>\n<em>My Awesome JavaScript List Part 2</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74\" title=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74\"><strong>My 'awesome' list of JavaScript resources</strong><br>\n<em>Everyone's seen the 'Awesome' lists on GitHub... and they are indeed awesome... so today I am going to attempt to curate my...</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\" title=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\"><strong>Everything You Need to Get Started With VSCode + Extensions &#x26; Resources</strong><br>\n<em>Commands:</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f\" title=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f\"><strong>My Favorite VSCode <em>Themes</em></strong><br>\nThemeslevelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/object-oriented-programming-in-javascript-d45007d06333\" title=\"https://levelup.gitconnected.com/object-oriented-programming-in-javascript-d45007d06333\"><strong>Object Oriented Programming in JavaScript</strong><br>\n<em>Object-Oriented Programming</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/object-oriented-programming-in-javascript-d45007d06333\"></a></p>\n<p><a href=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1\" title=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1\"><strong>JavaScript Rotate (Array) ProblemWalkthrough</strong><br>\n<em>Explanation for Rotate Right</em>medium.com</a><a href=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/\" title=\"https://bryanguner.medium.com/\"><strong>Bryan Guner - Medium</strong><br>\n<em>A plethora of front-end code playgrounds have appeared over the years. They offer a convenient way to experiment with...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/\"></a></p>\n<p><a href=\"https://medium.com/codex/postgresql-cheat-sheet-718b813d3e31\" title=\"https://medium.com/codex/postgresql-cheat-sheet-718b813d3e31\"><strong>Postgresql Cheat Sheet</strong><br>\n<em>PostgreSQL commands</em>medium.com</a><a href=\"https://medium.com/codex/postgresql-cheat-sheet-718b813d3e31\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\" title=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\"><strong>Everything You Need to Get Started With VSCode + Extensions &#x26; Resources</strong><br>\n<em>Commands:</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/super-simple-intro-to-html-651d695f9bc\" title=\"https://levelup.gitconnected.com/super-simple-intro-to-html-651d695f9bc\"><strong>Super Simple Intro To HTML</strong><br>\n<em>What is HTML, CSS &#x26; JS and why do we need all three?</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/super-simple-intro-to-html-651d695f9bc\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/understanding-git-a-beginners-guide-containing-cheat-sheets-resources-b50c9c01a107\" title=\"https://levelup.gitconnected.com/understanding-git-a-beginners-guide-containing-cheat-sheets-resources-b50c9c01a107\"><strong>Understanding Git (A Beginners Guide Containing Cheat Sheets &#x26; Resources)</strong><br>\n<em>Basic Git Work Flow.</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/understanding-git-a-beginners-guide-containing-cheat-sheets-resources-b50c9c01a107\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/git-tricks-57e8d0292285\" title=\"https://bryanguner.medium.com/git-tricks-57e8d0292285\"><strong>Git-Tricks</strong><br>\n<em>Refs</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/git-tricks-57e8d0292285\"></a></p>\n<p><a href=\"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522\" title=\"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522\"><strong>A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example</strong><br>\n<em>Curating Complexity: A Guide to Big-O Notation</em>medium.com</a><a href=\"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb\" title=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb\"><strong>Python Study Guide for a JavaScript Programmer</strong><br>\n<em>A guide to commands in Python from what you know in JavaScript</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/python-study-guide-for-a-native-javascript-developer-5cfdf3d2bdfb\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/lists-stacks-and-queues-in-javascript-88466fae0fbb\" title=\"https://bryanguner.medium.com/lists-stacks-and-queues-in-javascript-88466fae0fbb\"><strong>Lists Stacks and Queue's In JavaScript</strong><br>\n<em>A simple to follow guide to these fundamental data structures with animated gifs, diagrams, and code examples!</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/lists-stacks-and-queues-in-javascript-88466fae0fbb\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a\" title=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a\"><strong>Web Development Resources Part 3</strong><br>\n<em>I'm the psychological equivalent of a physical hoarder only instead of empty soda cans and dead racoons it's lists of...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74\" title=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74\"><strong>My 'awesome' list of JavaScript resources</strong><br>\n<em>Everyone's seen the 'Awesome' lists on GitHub... and they are indeed awesome... so today I am going to attempt to curate my...</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74\"></a></p>\n<p><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263\" title=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263\"><strong>Web Developer Resource List Part 2</strong><br>\n<em>Because I compile these things compulsively anyway...</em>medium.com</a><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/web-development-interview-part-3-826ae81a9107\" title=\"https://bryanguner.medium.com/web-development-interview-part-3-826ae81a9107\"><strong>Web Development Interview Part 3💻</strong><br>\n<em>This installment is going to be the least technically demanding thus far however these questions are a more realistic...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/web-development-interview-part-3-826ae81a9107\"></a></p>\n<p><a href=\"https://medium.com/star-gazers/the-web-developers-technical-interview-e347d7db3822\" title=\"https://medium.com/star-gazers/the-web-developers-technical-interview-e347d7db3822\"><strong>The Web Developer's Technical Interview</strong><br>\n<em>Questions....Answers... and links to the missing pieces.</em>medium.com</a><a href=\"https://medium.com/star-gazers/the-web-developers-technical-interview-e347d7db3822\"></a></p>\n<p><a href=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443\" title=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443\"><strong>Front End Interview Questions Part 2</strong><br>\n<em>These will focus more on vocabulary and concepts than the application driven approach in my last post!</em>medium.com</a><a href=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/running-list-of-interesting-articles-tools-and-ideas-as-i-explore-them-b87a2f04d9a6\" title=\"https://bryanguner.medium.com/running-list-of-interesting-articles-tools-and-ideas-as-i-explore-them-b87a2f04d9a6\"><strong>Running List Of Interesting Articles, Tools and Ideas... as I Explore Them</strong><br>\n<em>Translation if you read this today (3/21/2021) it will be exceedingly short... because it's just gonna accumulate entries...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/running-list-of-interesting-articles-tools-and-ideas-as-i-explore-them-b87a2f04d9a6\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24\" title=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24\"><strong>The Best Cloud-Based Code Playgrounds of 2021 (Part 1)</strong><br>\n<em>A plethora of front-end code playgrounds have appeared over the years. They offer a convenient way to experiment with...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24\"></a></p>\n<p><a href=\"https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4\" title=\"https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4\"><strong>Fundamental Data Structures In JavaScript</strong><br>\n<em>Data structures in JavaScript</em>medium.com</a><a href=\"https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a\" title=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a\"><strong>HTTP Basics</strong><br>\n<em>\"If you want to build a ship, don't drum up the men and women to gather wood, divide the work, and give orders...</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35\" title=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35\"><strong>JavaScript Frameworks &#x26; Libraries</strong><br>\n<em>My Awesome JavaScript List Part 2</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35\"></a></p>\n<p><a href=\"https://github.com/bgoonz/Cumulative-Resource-List/tree/master/README-s\" title=\"https://github.com/bgoonz/Cumulative-Resource-List/tree/master/README-s\"><strong>bgoonz/Cumulative-Resource-List</strong><br>\n<em>List of useful cheatsheets Inspired by @sindresorhus awesome and improved by these amazing contributors . If you see a...</em>github.com</a><a href=\"https://github.com/bgoonz/Cumulative-Resource-List/tree/master/README-s\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f\" title=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f\"><strong>My Favorite VSCode <em>Themes</em></strong><br>\nThemeslevelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f\"></a></p>\n<p><a href=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1\" title=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1\"><strong>JavaScript Rotate (Array) ProblemWalkthrough</strong><br>\n<em>Explanation for Rotate Right</em>medium.com</a><a href=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/everything-you-need-to-know-about-relational-databases-sql-postgresql-and-sequelize-to-build-8acb68284a98\" title=\"https://bryanguner.medium.com/everything-you-need-to-know-about-relational-databases-sql-postgresql-and-sequelize-to-build-8acb68284a98\"><strong>Everything You Need To Know About Relational Databases, SQL, PostgreSQL and Sequelize To Build...</strong><br>\n<em>For Front end developers who like myself struggle with making the jump to fullstack.</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/everything-you-need-to-know-about-relational-databases-sql-postgresql-and-sequelize-to-build-8acb68284a98\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/complete-javascript-reference-guide-64306cd6b0db\" title=\"https://javascript.plainenglish.io/complete-javascript-reference-guide-64306cd6b0db\"><strong>The Complete JavaScript Reference Guide</strong><br>\n<em>You will want to bookmark this</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/complete-javascript-reference-guide-64306cd6b0db\"></a></p>\n<p><a href=\"https://medium.com/geekculture/modules-in-javascript-a55333e35978\" title=\"https://medium.com/geekculture/modules-in-javascript-a55333e35978\"><strong>Modules in Javascript</strong><br>\n<em>Differences between Node.js and browsers</em>medium.com</a><a href=\"https://medium.com/geekculture/modules-in-javascript-a55333e35978\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/an-introduction-to-markdown-bonus-markdown-templates-included-3497ce56de3\" title=\"https://levelup.gitconnected.com/an-introduction-to-markdown-bonus-markdown-templates-included-3497ce56de3\"><strong>An Introduction to Markdown (Bonus Markdown Templates Included)</strong><br>\n<em>Basic Syntax Guide</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/an-introduction-to-markdown-bonus-markdown-templates-included-3497ce56de3\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/web-dev-resources-ec1975773d7d\" title=\"https://levelup.gitconnected.com/web-dev-resources-ec1975773d7d\"><strong>Web Dev Resources</strong><br>\n<em>Web Development</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/web-dev-resources-ec1975773d7d\"></a></p>\n<p><a href=\"https://medium.com/codex/regular-expressions-4d8fb3eb146b\" title=\"https://medium.com/codex/regular-expressions-4d8fb3eb146b\"><strong>Regular Expressions</strong><br>\n<em>description:</em>medium.com</a><a href=\"https://medium.com/codex/regular-expressions-4d8fb3eb146b\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/a-collection-of-my-most-useful-gist-entries-f4314f3ba3ab\" title=\"https://bryanguner.medium.com/a-collection-of-my-most-useful-gist-entries-f4314f3ba3ab\"><strong>A Collection of my most useful Gist Entries</strong><br>\n<em>This list is in no particular order!</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/a-collection-of-my-most-useful-gist-entries-f4314f3ba3ab\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/vscode-extension-readme-compilation-92c60342cc8a\" title=\"https://bryanguner.medium.com/vscode-extension-readme-compilation-92c60342cc8a\"><strong>VsCode Extension Readme Compilation</strong><br>\n<em>Markdown PDF</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/vscode-extension-readme-compilation-92c60342cc8a\"></a></p>\n<p><a href=\"https://javascript.plainenglish.io/learn-css-so-that-your-site-doesnt-look-like-garbage-938871b4521a\" title=\"https://javascript.plainenglish.io/learn-css-so-that-your-site-doesnt-look-like-garbage-938871b4521a\"><strong>Learn CSS So That Your Site Doesn't Look Like Garbage</strong><br>\n<em>CSS Selectors</em>javascript.plainenglish.io</a><a href=\"https://javascript.plainenglish.io/learn-css-so-that-your-site-doesnt-look-like-garbage-938871b4521a\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/postgresql-setup-for-windows-wsl-ubuntu-801672ab7089\" title=\"https://bryanguner.medium.com/postgresql-setup-for-windows-wsl-ubuntu-801672ab7089\"><strong>PostgreSQL Setup For Windows &#x26; WSL/Ubuntu</strong><br>\n<em>If you follow this guide to a tee... you will install PostgreSQL itself on your Windows installation. Then, you will...</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/postgresql-setup-for-windows-wsl-ubuntu-801672ab7089\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/emmet-cheat-sheet-24758e628d37\" title=\"https://bryanguner.medium.com/emmet-cheat-sheet-24758e628d37\"><strong>Emmet Cheat Sheet</strong><br>\n<em>EMMET</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/emmet-cheat-sheet-24758e628d37\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/express-quick-sheet-8f93762c59ca\" title=\"https://bryanguner.medium.com/express-quick-sheet-8f93762c59ca\"><strong>Express Quick Sheet</strong><br>\n<em>Settings</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/express-quick-sheet-8f93762c59ca\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/deploy-react-app-to-heroku-using-postgres-express-70b7ea807986\" title=\"https://bryanguner.medium.com/deploy-react-app-to-heroku-using-postgres-express-70b7ea807986\"><strong>Deploy React App To Heroku Using Postgres &#x26; Express</strong><br>\n<em>Heroku is an web application that makes deploying applications easy for a beginner.</em>bryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/deploy-react-app-to-heroku-using-postgres-express-70b7ea807986\"></a></p>\n<p><a href=\"https://levelup.gitconnected.com/basic-web-development-environment-setup-9f36c3f15afe\" title=\"https://levelup.gitconnected.com/basic-web-development-environment-setup-9f36c3f15afe\"><strong>Basic Web Development Environment Setup</strong><br>\n<em>Windows Subsystem for Linux (WSL) and Ubuntu</em>levelup.gitconnected.com</a><a href=\"https://levelup.gitconnected.com/basic-web-development-environment-setup-9f36c3f15afe\"></a></p>\n<p><a href=\"https://bryanguner.medium.com/fetch-quick-sheet-8872650742b4\" title=\"https://bryanguner.medium.com/fetch-quick-sheet-8872650742b4\"><strong><em>Fetch</em> Quick Sheet</strong><br>\nFetchbryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/fetch-quick-sheet-8872650742b4\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\">Bryan Guner</a> on <a href=\"https://medium.com/p/1f6f88ebdf5b\">March 22, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com/\">Medium</a> on July 13, 2021.</p>\n<p><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821/raw/6df51b57737eabd32d1c68c57e110600f471619a/A-list-of-my-articles.md\">view raw</a><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821#file-a-list-of-my-articles-md\">A-list-of-my-articles.md</a> hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h1>A Very Quick Guide To Calculating Big O Computational Complexity</h1>\n<p>Big O: big picture, broad strokes, not details</p>\n<hr>\n<h3>A Very Quick Guide To Calculating Big O Computational Complexity</h3>\n<p><strong>Big O</strong>: big picture, broad strokes, not details</p>\n<p>For a more complete guide... checkout :</p>\n<p><a href=\"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522\" title=\"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522\"><strong>A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example</strong><br>\n<em>Curating Complexity: A Guide to Big-O Notation</em>medium.com</a><a href=\"https://medium.com/star-gazers/a-quick-guide-to-big-o-notation-memoization-tabulation-and-sorting-algorithms-by-example-803ff193c522\"></a></p>\n<p><a href=\"https://camo.githubusercontent.com/6413d09083755e2f7dcdfb53580fbc57ca8ce5cda09b970995c4f6442a2ef120/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6c746538316d457667455059586f64422e706e67\"><img src=\"https://camo.githubusercontent.com/6413d09083755e2f7dcdfb53580fbc57ca8ce5cda09b970995c4f6442a2ef120/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6c746538316d457667455059586f64422e706e67\"></a></p>\n<ul>\n<li>way we analyze how efficient algorithms are without getting too mired in details - can model how much time any function will take given <code>n</code> inputs - interested in order of magnitude of number of the exact figure - O absorbs all fluff and n = biggest term - Big O of <code>3x^2 +x + 1</code> = <code>O(n^2)</code></li>\n</ul>\n<h3>Time Complexity</h3>\n<p>no loops or exit &#x26; return = O(1)</p>\n<p>0 nested loops = <code>O(n)</code><br>\n1 nested loops = <code>O(n^2)</code><br>\n2 nested loops = <code>O(n^3)</code><br>\n3 nested loops = <code>O(n^4)</code></p>\n<p><strong>recursive</strong>: as you add more terms, increase in time as you add input diminishes<br>\n<strong>recursion</strong>: when you define something in terms of itself, a function that calls itself</p>\n<ul>\n<li>used because of ability to maintain state at diffferent levels of recursion</li>\n<li>inherently carries large footprint</li>\n<li>every time function called, you add call to stack</li>\n</ul>\n<p><strong>iterative</strong>: use loops instead of recursion (preferred)</p>\n<ul>\n<li>favor readability over performance</li>\n</ul>\n<p><code>O(n log(n))</code> &#x26; <code>O(log(n))</code>: dividing/halving</p>\n<ul>\n<li>if code employs recursion/divide-and-conquer strategy</li>\n<li>what power do i need to power my base to get n</li>\n</ul>\n<h3>Time Definitions</h3>\n<ul>\n<li><strong>constant</strong>: does not scale with input, will take same amount of time</li>\n<li>for any input size n, constant time performs same number of operations every time</li>\n<li><strong>logarithmic</strong>: increases number of operations it performs as logarithmic function of input size n</li>\n<li>function log n grows very slowly, so as n gets longer, number of operations the algorithm needs to perform doesn't increase very much</li>\n<li>halving</li>\n<li><strong>linear</strong>: increases number of operations it performs as linear function of input size n</li>\n<li>number of additional operations needed to perform grows in direct proportion to increase in input size n</li>\n<li><strong>log-linear</strong>: increases number of operations it performs as log-linear function of input size n</li>\n<li>looking over every element and doing work on each one</li>\n<li><strong>quadratic</strong>: increases number of operations it performs as quadratic function of input size n</li>\n<li><strong>exponential</strong>: increases number of operations it performs as exponential function of input size n</li>\n<li>number of nested loops increases as function of n</li>\n<li><strong>polynomial</strong>: as size of input increases, runtime/space used will grow at a faster rate</li>\n<li><strong>factorial</strong>: as size of input increases, runtime/space used will grow astronomically even with relatively small inputs</li>\n<li><strong>rate of growth</strong>: how fast a function grows with input size</li>\n</ul>\n<p><a href=\"https://camo.githubusercontent.com/ef0eac5be0b1dfbf2b062560dc14031c3d971790e74f827eed32ac7643c1a526/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a35743275386e31754b68696f497a5a495858327a62672e706e67\"><img src=\"https://camo.githubusercontent.com/ef0eac5be0b1dfbf2b062560dc14031c3d971790e74f827eed32ac7643c1a526/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a35743275386e31754b68696f497a5a495858327a62672e706e67\"></a></p>\n<h3>Space Complexity</h3>\n<ul>\n<li>How does the space usage scale/change as input gets very large?</li>\n<li>What auxiliary space does your algorithm use or is it in place (constant)?</li>\n<li>Runtime stack space counts as part of space complexity unless told otherwise.</li>\n</ul>\n<h3>Sorting Algorithms</h3>\n<p><a href=\"https://camo.githubusercontent.com/3b0a3eba225e72bbd6f86cb081b8696137f089fcda73495a5a07645fb05f150e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a4868586d4732634e64673879345a43435147547975512e706e67\"><img src=\"https://camo.githubusercontent.com/3b0a3eba225e72bbd6f86cb081b8696137f089fcda73495a5a07645fb05f150e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a4868586d4732634e64673879345a43435147547975512e706e67\"></a></p>\n<p><a href=\"https://camo.githubusercontent.com/abfb2575e02cdc2fd9e9a4f1742e317c864f4fe15e584a980948ae5319680c42/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a554c6558785643446b4637334777687378794d5f32672e706e67\"><img src=\"https://camo.githubusercontent.com/abfb2575e02cdc2fd9e9a4f1742e317c864f4fe15e584a980948ae5319680c42/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a554c6558785643446b4637334777687378794d5f32672e706e67\"></a></p>\n<h3>Data Structures</h3>\n<p><a href=\"https://camo.githubusercontent.com/a5aa2e2f1b4f1e079dbec74d0c22a1527c41b79b05c5aa78082368c952632cb3/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a686b5a576c556746794f53614c443555736b763074512e706e67\"><img src=\"https://camo.githubusercontent.com/a5aa2e2f1b4f1e079dbec74d0c22a1527c41b79b05c5aa78082368c952632cb3/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a686b5a576c556746794f53614c443555736b763074512e706e67\"></a></p>\n<p><a href=\"https://camo.githubusercontent.com/dd60451585672884f84cc3381ab7ace9b426c0f462e69ce4ebf80028d9969558/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f323536302f312a434f6a7a756e6a302d46734d4a30643776375a2d36672e706e67\"><img src=\"https://camo.githubusercontent.com/dd60451585672884f84cc3381ab7ace9b426c0f462e69ce4ebf80028d9969558/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f323536302f312a434f6a7a756e6a302d46734d4a30643776375a2d36672e706e67\"></a></p>\n<p>For similar content check out my GitHub:</p>\n<p><a href=\"https://github.com/bgoonz\" title=\"https://github.com/bgoonz\"><strong>bgoonz - Overview</strong><br>\n<em>Web Developer, Electrical Engineer</em></a><em><a href=\"https://bryanguner.medium.com/\">https://bryanguner.medium.com/</a> <a href=\"https://portfolio42.netlify.app/%E2%80%A6\">https://portfolio42.netlify.app/...</a></em>github.com<a href=\"https://github.com/bgoonz\"></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\">Bryan Guner</a> on <a href=\"https://medium.com/p/eb1557e85fa3\">May 19, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/a-very-quick-guide-to-calculating-big-o-computational-complexity-eb1557e85fa3\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com/\">Medium</a> on July 13, 2021.</p>\n<p><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821/raw/6df51b57737eabd32d1c68c57e110600f471619a/A-Very-Qui.md\">view raw</a><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821#file-a-very-qui-md\">A-Very-Qui.md</a> hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h1>Array Callback Methods Implemented With For Loops</h1>\n<p>How to implement array callback methods in JavaScript</p>\n<hr>\n<h3>Array Callback Methods Implemented With For Loops</h3>\n<h4>How to implement array callback methods in JavaScript</h4>\n<p><a href=\"https://camo.githubusercontent.com/66698fc55382cdcada06a280bbd01030f2d8b3a1f6590aa4b380086ac26537b3/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a57704b714f6454735450687661707557\"><img src=\"https://camo.githubusercontent.com/66698fc55382cdcada06a280bbd01030f2d8b3a1f6590aa4b380086ac26537b3/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a57704b714f6454735450687661707557\"></a></p>\n<h4>Functions are called \"First Class Objects\" in JavaScript because</h4>\n<ul>\n<li>A function is an instance of the Object type</li>\n<li>A function can have properties and has a link back to its constructor method</li>\n<li>You can store the function in a variable</li>\n<li>You can pass the function as a parameter to another function</li>\n<li>You can return the function from a function</li>\n</ul>\n<p>What do you think will be printed in the following:</p>\n<h4>Anonymous callback, a named callback</h4>\n<pre><code>function foo(callback) {\n    console.log('grape');\n    callback();\n}\n\nfunction bar() {\n    console.log('banana');\n}\n\nconst fruitBasket = function() {\n    console.log('apple');\n    bar();\n    foo(bar);\n    foo(function() {\n        console.log('orange');\n    });\n    console.log('pear');\n};\n\nfruitBasket();\n</code></pre>\n<h4>Function that takes in a value and two callbacks. The function should return the result of the callback who's invocation results in a larger value</h4>\n<pre><code>function greaterValue(value, cb1, cb2) {\n    // compare cb1 invoked with value to cb2 invoked with value\n    // return the greater result\n\n    let res1 = cb1(value);\n    let res2 = cb2(value);\n    if (res1 > res2) {\n        // if this is false, we move out of if statement\n        return res1;\n    }\n    return res2;\n}\n\nlet negate = function(num) {\n    return num * -1;\n};\n\nlet addOne = function(num) {\n    return num + 1;\n};\n\nconsole.log(greaterValue(3, negate, addOne));\nconsole.log(greaterValue(-2, negate, addOne));\n</code></pre>\n<p><em>Note: we do not invoke</em> <code>negate</code> <em>or</em> <code>addOne</code> <em>(by using</em> <code>()</code> <em>to call them), we are passing the function itself.</em></p>\n<h4>Write a function, myMap, that takes in an array and a callback as arguments. The function should mimic the behavior of Array.prototype.map</h4>\n<pre><code>function myMap(arr, callback) {\n    // iterate through the array, perform the cb on each element\n    // return a new array with those new values\n    let mapped = [];\n\n    for (let i = 0; i &#x3C; arr.length; i++) {\n        // remember that map passes three args with each element.\n        let val = callback(arr[i], i, arr);\n        mapped.push(val);\n    }\n\n    return mapped;\n}\n\nlet double = function(num) {\n    return num * 2;\n};\nconsole.log(myMap([1, 2, 3], double));\n</code></pre>\n<h4>Write a function, myFilter, that takes in an array and a callback as arguments. The function should mimic the behavior of Array.prototype.filter</h4>\n<pre><code>function myFilter(arr, callback) {\n    let filtered = [];\n\n    for (let i = 0; i &#x3C; arr.length; i++) {\n        let element = arr[i];\n\n        if (callback(element, i, arr)) {\n            filtered.push(element);\n        }\n    }\n\n    return filtered;\n}\n</code></pre>\n<h4>Write a function, myEvery, that takes in an array and a callback as arguments. The function should mimic the behavior of Array.prototype.every</h4>\n<pre><code>function myEvery(arr, callback) {\n    for (let i = 0; i &#x3C; arr.length; i++) {\n        let element = arr[i];\n\n        if (callback(element, i, arr) === false) {\n            return false;\n        }\n    }\n    return true;\n}\n</code></pre>\n<h3>Further Examples of the above concepts</h3>\n<pre><code>const createMeowValue = () => {\n  console.log(this.name);\n  let meow = function () {\n    console.log(this);\n    console.log(this.name + ' meows');\n  }\n  meow = meow.bind(this);\n  return meow;\n};\n\nconst name = 'Fluffy';\n\nconst cat = {\n  name: name,\n  age: 12,\n  createMeow: function () {\n    console.log(this.name);\n    let meow = () => {\n      const hello = 'hello';\n      console.log(this.name + ' meows');\n    };\n    let world = '';\n    if (true) {\n      world = 'world';\n    }\n    console.log(world);\n    // meow = meow.bind(this);\n    return meow;\n  }\n};\n\ncat.newKey = function () {\n  const outermostContext = this;\n  const innerFunc = () => {\n    secondContext = this;\n    console.log(secondContext === outermostContext)\n    return function () {\n      innermostContext = this;\n    }\n  };\n  return innerFunc.bind(outermostContext);\n};\n\nconst meow = cat.createMeow(); // method-style invocation\nmeow(); // function-style invocation\n\nconsole.log('-------')\n\nconst createMeow = cat.createMeow;\nconst globalMeow = createMeow(); // function-style\nglobalMeow(); // function-style\n\nfunction createSmoothie(ingredient) {\n  const ingredients = [ingredient];\n  return ingredients;\n}\n\n// console.log(createSmoothie('banana'));\n// console.log(createSmoothie('apple'));\n\n// one parameter only\n// first argument is a string\n// return an array\n// DO NOT USE forEach\n</code></pre>\n<p>References:</p>\n<p><a href=\"https://open.appacademy.io/learn\" title=\"https://open.appacademy.io/learn\"><strong>App Academy Open</strong><br>\n<em>App Academy Open is the first free, online web development course that's meant to get you hired as a developer. Get...</em>open.appacademy.io</a><a href=\"https://open.appacademy.io/learn\"></a></p>\n<p><a href=\"https://developer.mozilla.org/en-US/\" title=\"https://developer.mozilla.org/en-US/\"><strong>MDN Web Docs</strong><br>\n<em>Read more at hacks.mozilla.org Roughly a year ago at Mozilla we started an effort to improve Firefox stability on...</em>developer.mozilla.org</a><a href=\"https://developer.mozilla.org/en-US/\"></a></p>\n<p><a href=\"https://javascript.info/callbacks\" title=\"https://javascript.info/callbacks\"><strong>Introduction: callbacks</strong><br>\n<em>To demonstrate the use of callbacks, promises and other abstract concepts, we'll be using some browser methods...</em>javascript.info</a><a href=\"https://javascript.info/callbacks\"></a></p>\n<p><em>More content at</em> <a href=\"http://plainenglish.io/\"><strong><em>plainenglish.io</em></strong></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\">Bryan Guner</a> on <a href=\"https://medium.com/p/d08875df6777\">May 27, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/array-callback-methods-implemented-with-for-loops-d08875df6777\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com/\">Medium</a> on July 13, 2021.</p>\n<p><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821/raw/6df51b57737eabd32d1c68c57e110600f471619a/Array-Call.md\">view raw</a><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821#file-array-call-md\">Array-Call.md</a> hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h1>Bash Commands That Save Me Time and Frustration</h1>\n<p>Here's a list of bash commands that stand between me and insanity.</p>\n<hr>\n<h3>Bash Commands That Save Me Time and Frustration</h3>\n<h4>Here's a list of bash commands that stand between me and insanity</h4>\n<p><a href=\"https://camo.githubusercontent.com/22b34f635d2c806b42121947a66b17cb69fe0b64d935cbdeabe81c3bccc74e8e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a77304a3875366a5754696b59565a7a572e6a7067\"><img src=\"https://camo.githubusercontent.com/22b34f635d2c806b42121947a66b17cb69fe0b64d935cbdeabe81c3bccc74e8e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a77304a3875366a5754696b59565a7a572e6a7067\"></a></p>\n<p><strong>This article will be accompanied by the following</strong> <a href=\"https://github.com/bgoonz/bash-commands-walkthrough\"><strong>github repository</strong></a> <strong>which will contain all the commands listed as well as folders that demonstrate before and after usage!</strong></p>\n<p><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\" title=\"https://github.com/bgoonz/bash-commands-walkthrough\"><strong>bgoonz/bash-commands-walkthrough</strong><br>\n<em>to accompany the medium article I am writing. Contribute to bgoonz/bash-commands-walkthrough development by creating an...</em>github.com</a><a href=\"https://github.com/bgoonz/bash-commands-walkthrough\"></a></p>\n<blockquote>\n<p>The <a href=\"https://github.com/bgoonz/bash-commands-walkthrough#readme\">readme</a> for this git repo will provide a much more condensed list... whereas this article will break up the commands with explanations... images &#x26; links!</p>\n</blockquote>\n<p><strong>I will include the code examples as both github gists (for proper syntax highlighting) and as code snippets adjacent to said gists so that they can easily be copied and pasted... or ... if you're like me for instance; and like to use an extension to grab the markdown content of a page... the code will be included rather than just a link to the gist!</strong></p>\n<p><a href=\"https://camo.githubusercontent.com/a3dd21a18d0fcf7ac3c80b09877c193ba4f84657dcebde6487aea381d9aba9bf/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a336d5f5563514f41794b7449704851366a394a7a5a772e676966\"><img src=\"https://camo.githubusercontent.com/a3dd21a18d0fcf7ac3c80b09877c193ba4f84657dcebde6487aea381d9aba9bf/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a336d5f5563514f41794b7449704851366a394a7a5a772e676966\"></a></p>\n<h3>Here's a Cheatsheet</h3>\n<h3>Getting Started (Advanced Users Skip Section)</h3>\n<hr>\n<h4>✔ Check the Current Directory ➡ <code>pwd</code></h4>\n<p>On the command line, it's important to know the directory we are currently working on. For that, we can use <code>pwd</code> command.</p>\n<p><a href=\"https://camo.githubusercontent.com/ede56713024434b9c0c8008f54475a7f4fcdcd15427580cbc504793e43a15b6d/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a64696d7a4c55726d44493455666576362e676966\"><img src=\"https://camo.githubusercontent.com/ede56713024434b9c0c8008f54475a7f4fcdcd15427580cbc504793e43a15b6d/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a64696d7a4c55726d44493455666576362e676966\"></a></p>\n<p>It shows that I'm working on my Desktop directory.</p>\n<h4>✔ Display List of Files ➡ <code>ls</code></h4>\n<p>To see the list of files and directories in the current directory use <code>ls</code> command in your CLI.</p>\n<p><a href=\"https://camo.githubusercontent.com/e9cfe3bfa6f8d2ff3cc9f7959a7896facb58708e7e707d012ad989edb589b6ec/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a48487a56724b324374545077546459542e676966\"><img src=\"https://camo.githubusercontent.com/e9cfe3bfa6f8d2ff3cc9f7959a7896facb58708e7e707d012ad989edb589b6ec/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a48487a56724b324374545077546459542e676966\"></a></p>\n<p>Shows all of my files and directories of my Desktop directory.</p>\n<ul>\n<li>To show the contents of a directory pass the directory name to the <code>ls</code> command i.e. <code>ls directory_name</code>.</li>\n<li>Some useful <code>ls</code> command options:-</li>\n</ul>\n<p>OptionDescriptionls -alist all files including hidden file starting with '.'ls -llist with the long formatls -lalist long format including hidden files</p>\n<h4>✔ Create a Directory ➡ <code>mkdir</code></h4>\n<p>We can create a new folder using the <code>mkdir</code> command. To use it type <code>mkdir folder_name</code>.</p>\n<p><a href=\"https://camo.githubusercontent.com/8c10a898b8f52be59dc0723ab2dd0784c22c12a325ffe5cc64a38f07341ef90e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6d33644479433976524a42555a5378522e676966\"><img src=\"https://camo.githubusercontent.com/8c10a898b8f52be59dc0723ab2dd0784c22c12a325ffe5cc64a38f07341ef90e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6d33644479433976524a42555a5378522e676966\"></a></p>\n<p>Use <code>ls</code> command to see the directory is created or not.</p>\n<p>I created a cli-practice directory in my working directory i.e. Desktop directory.</p>\n<h4>✔ Move Between Directories ➡ <code>cd</code></h4>\n<p>It's used to change directory or to move other directories. To use it type <code>cd directory_name</code>.</p>\n<p><a href=\"https://camo.githubusercontent.com/d78e325dda59d59be4bd151dd85d3b1966324cb205da2eb540f1372e8195b280/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a33344b4778543247386f4e4d446e49632e676966\"><img src=\"https://camo.githubusercontent.com/d78e325dda59d59be4bd151dd85d3b1966324cb205da2eb540f1372e8195b280/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a33344b4778543247386f4e4d446e49632e676966\"></a></p>\n<p>Can use <code>pwd</code> command to confirm your directory name.</p>\n<p>Changed my directory to the cli-practice directory. And the rest of the tutorial I'm gonna work within this directory.</p>\n<h4>✔ Parent Directory ➡ <code>..</code></h4>\n<p>We have seen <code>cd</code> command to change directory but if we want to move back or want to move to the parent directory we can use a special symbol <code>..</code> after <code>cd</code> command, like <code>cd ..</code></p>\n<h4>✔ Create Files ➡ <code>touch</code></h4>\n<p>We can create an empty file by typing <code>touch file_name</code>. It's going to create a new file in the current directory (the directory you are currently in) with your provided name.</p>\n<p><a href=\"https://camo.githubusercontent.com/97e82f91cb8cfcf342cf97e8b572b49d1bc264cbe9929c7e23d0f72589d6708d/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a78753177747637674a324e4d765036302e676966\"><img src=\"https://camo.githubusercontent.com/97e82f91cb8cfcf342cf97e8b572b49d1bc264cbe9929c7e23d0f72589d6708d/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a78753177747637674a324e4d765036302e676966\"></a></p>\n<p>I created a hello.txt file in my current working directory. Again you can use <code>ls</code> command to see the file is created or not.</p>\n<p>Now open your hello.txt file in your text editor and write <em>Hello Everyone!</em> into your hello.txt file and save it.</p>\n<h4>✔ Display the Content of a File ➡ <code>cat</code></h4>\n<p>We can display the content of a file using the <code>cat</code> command. To use it type <code>cat file_name</code>.</p>\n<p><a href=\"https://camo.githubusercontent.com/ffe71e48a1a9bd9b118265c18a81e0b49a515cf40453416134dfca52567bb82c/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a694b6635773951464e43654c527638612e676966\"><img src=\"https://camo.githubusercontent.com/ffe71e48a1a9bd9b118265c18a81e0b49a515cf40453416134dfca52567bb82c/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a694b6635773951464e43654c527638612e676966\"></a></p>\n<p>Shows the content of my hello.txt file.</p>\n<h4>✔ Move Files &#x26; Directories ➡ <code>mv</code></h4>\n<p>To move a file and directory, we use <code>mv</code> command.</p>\n<p>By typing <code>mv file_to_move destination_directory</code>, you can move a file to the specified directory.</p>\n<p>By entering <code>mv directory_to_move destination_directory</code>, you can move all the files and directories under that directory.</p>\n<p>Before using this command, we are going to create two more directories and another txt file in our cli-practice directory.</p>\n<p><code>mkdir html css touch bye.txt</code></p>\n<p><a href=\"https://camo.githubusercontent.com/7197994733b63ae597fb12ba8c29509ed3c714f274d4e51542c64a942c069336/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a70696141517a5f4d51707a6f374450482e676966\"><img src=\"https://camo.githubusercontent.com/7197994733b63ae597fb12ba8c29509ed3c714f274d4e51542c64a942c069336/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a70696141517a5f4d51707a6f374450482e676966\"></a></p>\n<p>Yes, we can use multiple directories &#x26; files names one after another to create multiple directories &#x26; files in one command.</p>\n<p><a href=\"https://camo.githubusercontent.com/5db5a79472f5bffa91c5bfd8c892437523b68072d930c7b4334c8b622ecb55de/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a356a6d6a5f5a794e7a34364775514b7a2e676966\"><img src=\"https://camo.githubusercontent.com/5db5a79472f5bffa91c5bfd8c892437523b68072d930c7b4334c8b622ecb55de/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a356a6d6a5f5a794e7a34364775514b7a2e676966\"></a></p>\n<p>Moved my bye.txt file into my css directory and then moved my css directory into my html directory.</p>\n<h4>✔ Rename Files &#x26; Directories ➡ <code>mv</code></h4>\n<p><code>mv</code> command can also be used to rename a file and a directory.</p>\n<p>You can rename a file by typing <code>mv old_file_name new_file_name</code> &#x26; also rename a directory by typing <code>mv old_directory_name new_directory_name</code>.</p>\n<p><a href=\"https://camo.githubusercontent.com/3feb1289a79b907796c1d736e119730dc3d2dbcd60c6ba072ee226cc8cb69b75/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a575456753164643667722d6e6d5768442e676966\"><img src=\"https://camo.githubusercontent.com/3feb1289a79b907796c1d736e119730dc3d2dbcd60c6ba072ee226cc8cb69b75/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a575456753164643667722d6e6d5768442e676966\"></a></p>\n<p>Renamed my hello.txt file to the hi.txt file and html directory to the folder directory.</p>\n<h4>✔ Copy Files &#x26; Directories ➡ <code>cp</code></h4>\n<p>To do this, we use the <code>cp</code> command.</p>\n<ul>\n<li>You can copy a file by entering <code>cp file_to_copy new_file_name</code>.</li>\n</ul>\n<p><a href=\"https://camo.githubusercontent.com/9b67b2ef374ba0f1457b24007824ea5b65ca861a100397322d1a13f30a70818f/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6b434c56744b4e396f4b5062486652462e676966\"><img src=\"https://camo.githubusercontent.com/9b67b2ef374ba0f1457b24007824ea5b65ca861a100397322d1a13f30a70818f/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6b434c56744b4e396f4b5062486652462e676966\"></a></p>\n<p>Copied my hi.txt file content into hello.txt file. For confirmation open your hello.txt file in your text editor.</p>\n<ul>\n<li>You can also copy a directory by adding the <code>-r</code> option, like <code>cp -r directory_to_copy new_directory_name</code>.</li>\n</ul>\n<p><em>The</em> <code>-r</code> <em>option for \"recursive\" means that it will copy all of the files including the files inside of subfolders.</em></p>\n<p><a href=\"https://camo.githubusercontent.com/b914824b683c77cb019300487919155d05a805fb82b0a743ecdce67fd22bab55/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a4d6e6d7a4d69696f495943754b3932422e676966\"><img src=\"https://camo.githubusercontent.com/b914824b683c77cb019300487919155d05a805fb82b0a743ecdce67fd22bab55/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a4d6e6d7a4d69696f495943754b3932422e676966\"></a></p>\n<p>Here I copied all of the files from the folder to folder-copy.</p>\n<h4>✔ Remove Files &#x26; Directories ➡ <code>rm</code></h4>\n<p>To do this, we use the <code>rm</code> command.</p>\n<ul>\n<li>To remove a file, you can use the command like <code>rm file_to_remove</code>.</li>\n</ul>\n<p><a href=\"https://camo.githubusercontent.com/e35ef5a179966ed8271639d381b997455862bb77794f0b8c219f7ffada7168da/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6f68436d6474686439325f4841365a652e676966\"><img src=\"https://camo.githubusercontent.com/e35ef5a179966ed8271639d381b997455862bb77794f0b8c219f7ffada7168da/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a6f68436d6474686439325f4841365a652e676966\"></a></p>\n<p>Here I removed my hi.txt file.</p>\n<ul>\n<li>To remove a directory, use the command like <code>rm -r directory_to_remove</code>.</li>\n</ul>\n<p><a href=\"https://camo.githubusercontent.com/5622af09767bfd626db8e52f5e040afeaf16be692b75a3069f7b01d74c1c4ee6/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a766f44627a7753707732344132526a512e676966\"><img src=\"https://camo.githubusercontent.com/5622af09767bfd626db8e52f5e040afeaf16be692b75a3069f7b01d74c1c4ee6/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a766f44627a7753707732344132526a512e676966\"></a></p>\n<p>I removed my folder-copy directory from my cli-practice directory i.e. current working directory.</p>\n<h4>✔ Clear Screen ➡ <code>clear</code></h4>\n<p>Clear command is used to clear the terminal screen.</p>\n<h4>✔ Home Directory ➡ <code>~</code></h4>\n<p>The Home directory is represented by <code>~</code>. The Home directory refers to the base directory for the user. If we want to move to the Home directory we can use <code>cd ~</code> command. Or we can only use <code>cd</code> command.</p>\n<hr>\n<h3>MY COMMANDS</h3>\n<h3>1.) Recursively unzip zip files and then delete the archives when finished</h3>\n<p><strong>here is a</strong> <a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/1-recursive-unzip\"><strong>folde</strong></a><strong>r containing the before and after... I had to change folder names slightly due to a limit on the length of file-paths in a github repo.</strong></p>\n<pre><code>find . -name \"*.zip\" | while read filename; do unzip -o -d \"`dirname \"$filename\"`\" \"$filename\"; done;\n\nfind . -name \"*.zip\" -type f -print -delete\n</code></pre>\n<hr>\n<h3>2.) Install node modules recursively</h3>\n<pre><code>npm i -g recursive-install\n\nnpm-recursive-install\n</code></pre>\n<hr>\n<h3>3.) Clean up unnecessary files/folders in git repo</h3>\n<pre><code>find . -empty -type f -print -delete #Remove empty files\n\n# -------------------------------------------------------\nfind . -empty -type d -print -delete #Remove empty folders\n\n# -------------------------------------------------------\n\n# This will remove .git folders...    .gitmodule files as well as .gitattributes and .gitignore files.\n\nfind . \\( -name \".git\" -o -name \".gitignore\" -o -name \".gitmodules\" -o -name \".gitattributes\" \\) -exec rm -rf -- {} +\n\n# -------------------------------------------------------\n\n# This will remove the filenames you see listed below that just take up space if a repo has been downloaded for use exclusively in your personal file system (in which case the following files just take up space)# Disclaimer... you should not use this command in a repo that you intend to use with your work as it removes files that attribute the work to their original creators!\n\nfind . \\( -name \"*SECURITY.txt\" -o -name \"*RELEASE.txt\" -o -name \"*CHANGELOG.txt\" -o -name \"*LICENSE.txt\" -o -name \"*CONTRIBUTING.txt\" -name \"*HISTORY.md\" -o -name \"*LICENSE\" -o -name \"*SECURITY.md\" -o -name \"*RELEASE.md\" -o -name \"*CHANGELOG.md\" -o -name \"*LICENSE.md\" -o -name \"*CODE_OF_CONDUCT.md\" -o -name \"\\*CONTRIBUTING.md\" \\) -exec rm -rf -- {} +\n</code></pre>\n<h4>In Action</h4>\n<p>The following output from my bash shell corresponds to the directory:</p>\n<p><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\" title=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\"><strong>bgoonz/bash-commands-walkthrough</strong><br>\n<em>Deployment github-pages Navigation Big O notation is the language we use for talking about how long an algorithm takes...</em>github.com</a><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\"></a></p>\n<h4>which was created by running the aforementioned commands in in a perfect copy of this directory</h4>\n<p><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\" title=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><strong>bgoonz/DS-ALGO-OFFICIAL</strong><br>\n<em>Deployment github-pages Navigation Big O notation is the language we use for talking about how long an algorithm takes...</em>github.com</a><a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"></a></p>\n<blockquote>\n<p><strong>.....below is the terminal output for the following commands:</strong></p>\n</blockquote>\n<pre><code>pwd\n/mnt/c/Users/bryan/Downloads/bash-commands/steps/3-clean-up-fluf/DS-ALGO-OFFICIAL-master\n</code></pre>\n<blockquote>\n<p><strong>After printing the working directory for good measure:</strong></p>\n</blockquote>\n<pre><code>find . -empty -type f -print -delete\n</code></pre>\n<blockquote>\n<p><strong>The above command deletes empty files recursively starting from the directory in which it was run:</strong></p>\n</blockquote>\n<pre><code>./CONTENT/DS-n-Algos/File-System/file-utilities/node_modules/line-reader/test/data/empty_file.txt\n./CONTENT/DS-n-Algos/_Extra-Practice/free-code-camp/nodejs/http-collect.js\n./CONTENT/Resources/Comments/node_modules/mime/.npmignore\n./markdown/tree2.md\n./node_modules/loadashes6/lodash/README.md\n./node_modules/loadashes6/lodash/release.md\n./node_modules/web-dev-utils/Markdown-Templates/Markdown-Templates-master/filled-out-readme.md\n|01:33:16|bryan@LAPTOP-9LGJ3JGS:[DS-ALGO-OFFICIAL-master] DS-ALGO-OFFICIAL-master_exitstatus:0[╗___________o>\n</code></pre>\n<blockquote>\n<p><strong>The command seen below deletes empty folders recursively starting from the directory in which it was run:</strong></p>\n</blockquote>\n<pre><code>find . -empty -type d -print -delete\n</code></pre>\n<blockquote>\n<p>The resulting directories....</p>\n</blockquote>\n<pre><code>|01:33:16|bryan@LAPTOP-9LGJ3JGS:[DS-ALGO-OFFICIAL-master] DS-ALGO-OFFICIAL-master_exitstatus:0[╗___________o>\n\nfind . -empty -type d -print -delete\n./.git/branches\n./.git/objects/info\n./.git/refs/tags\n|01:33:31|bryan@LAPTOP-9LGJ3JGS:[DS-ALGO-OFFICIAL-master] DS-ALGO-OFFICIAL-master_exitstatus:0[╗___________o>\n</code></pre>\n<blockquote>\n<p><strong>The command seen below deletes .git folders as well as .gitignore, .gitattributes, .gitmodule files</strong></p>\n</blockquote>\n<pre><code>find . \\( -name \".git\" -o -name \".gitignore\" -o -name \".gitmodules\" -o -name \".gitattributes\" \\) -exec rm -rf -- {} +\n</code></pre>\n<p><strong>The command seen below deletes most SECURITY, RELEASE, CHANGELOG, LICENSE, CONTRIBUTING, &#x26; HISTORY files that take up pointless space in repo's you wish to keep exclusively for your own reference.</strong></p>\n<h3>!!!Use with caution as this command removes the attribution of the work from it's original authors</h3>\n<p><a href=\"https://camo.githubusercontent.com/ea68eea425581d8683031170810ceb578f8bafb975c1d5323100965dd912a3fa/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a72356447687462655a3456644f353455\"><img src=\"https://camo.githubusercontent.com/ea68eea425581d8683031170810ceb578f8bafb975c1d5323100965dd912a3fa/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a72356447687462655a3456644f353455\" alt=\"!!!Use with caution as this command removes the attribution of the work from it&#x27;s original authors!!!!!\"></a></p>\n<p>!!!Use with caution as this command removes the attribution of the work from it's original authors!!!!!find . ( -name \"<em>SECURITY.txt\" -o -name \"</em>RELEASE.txt\" -o -name \"<em>CHANGELOG.txt\" -o -name \"</em>LICENSE.txt\" -o -name \"<em>CONTRIBUTING.txt\" -name \"</em>HISTORY.md\" -o -name \"<em>LICENSE\" -o -name \"</em>SECURITY.md\" -o -name \"<em>RELEASE.md\" -o -name \"</em>CHANGELOG.md\" -o -name \"<em>LICENSE.md\" -o -name \"</em>CODE<em>OF</em>CONDUCT.md\" -o -name \"*CONTRIBUTING.md\" ) -exec rm -rf -- {} +</p>\n<hr>\n<h3>4.) Generate index.html file that links to all other files in working directory</h3>\n<pre><code>#!/bin/sh\n# find ./ | grep -i \"\\.*$\" >files\nfind ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i \"\\.*$\">files\nlisting=\"files\"\nout=\"\"\nhtml=\"index.html\"\nout=\"basename $out.html\"\nhtml=\"index.html\"\ncmd() {\n  echo '  &#x3C;!DOCTYPE html>'\n  echo '&#x3C;html>'\n  echo '&#x3C;head>'\n  echo '  &#x3C;meta http-equiv=\"Content-Type\" content=\"text/html\">'\n  echo '  &#x3C;meta name=\"Author\" content=\"Bryan Guner\">'\n  echo '&#x3C;link rel=\"stylesheet\" href=\"./assets/prism.css\">'\n  echo ' &#x3C;link rel=\"stylesheet\" href=\"./assets/style.css\">'\n  echo ' &#x3C;script async defer src=\"./assets/prism.js\">&#x3C;/script>'\n  echo \"  &#x3C;title> directory &#x3C;/title>\"\n  echo \"\"\n  echo '&#x3C;style>'\necho '    a {'\necho '      color: black;'\necho '    }'\necho ''\necho '    li {'\necho '      border: 1px solid black !important;'\necho '      font-size: 20px;'\necho '      letter-spacing: 0px;'\necho '      font-weight: 700;'\necho '      line-height: 16px;'\necho '      text-decoration: none !important;'\necho '      text-transform: uppercase;'\necho '      background: #194ccdaf !important;'\necho '      color: black !important;'\necho '      border: none;'\necho '      cursor: pointer;'\necho '      justify-content: center;'\necho '      padding: 30px 60px;'\necho '      height: 48px;'\necho '      text-align: center;'\necho '      white-space: normal;'\necho '      border-radius: 10px;'\necho '      min-width: 45em;'\necho '      padding: 1.2em 1em 0;'\necho '      box-shadow: 0 0 5px;'\necho '      margin: 1em;'\necho '      display: grid;'\necho '      -webkit-border-radius: 10px;'\necho '      -moz-border-radius: 10px;'\necho '      -ms-border-radius: 10px;'\necho '      -o-border-radius: 10px;'\necho '    }'\necho '  &#x3C;/style>'\n  echo '&#x3C;/head>'\n  echo '&#x3C;body>'\n  echo \"\"\n  # continue with the HTML stuff\n  echo \"\"\n  echo \"\"\n  echo \"&#x3C;ul>\"\n  awk '{print \"&#x3C;li>&#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x26;nbsp;&#x3C;/a>&#x3C;/li>\"}' $listing\n  # awk '{print \"&#x3C;li>\"};\n  #  {print \" &#x3C;a href=\\\"\"$1\"\\\">\",$1,\"&#x3C;/a>&#x3C;/li>&#x26;nbsp;\"}' \\ $listing\n  echo \"\"\n  echo \"&#x3C;/ul>\"\n  echo \"&#x3C;/body>\"\n  echo \"&#x3C;/html>\"\n}\ncmd $listing --sort=extension >>$html\n</code></pre>\n<h4>In Action</h4>\n<p><strong>I will use this copy of my Data Structures Practice Site to demonstrate the result:</strong></p>\n<p><a href=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\" title=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\"><strong>side-projects-42/DS-Bash-Examples-Deploy</strong><br>\n<em>Deployment github-pages Navigation Big O notation is the language we use for talking about how long an algorithm takes...</em>github.com</a><a href=\"https://github.com/side-projects-42/DS-Bash-Examples-Deploy\"></a></p>\n<p><a href=\"https://camo.githubusercontent.com/0f97bdb9d1167b14f340044bcdca3eb0472acc4c80dcc9c1db4f13ad6900bf20/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a5075754454557669583547366d6a612d35654b5549772e706e67\"><img src=\"https://camo.githubusercontent.com/0f97bdb9d1167b14f340044bcdca3eb0472acc4c80dcc9c1db4f13ad6900bf20/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a5075754454557669583547366d6a612d35654b5549772e706e67\"></a></p>\n<h4>The result is a index.html file that contains a list of links to each file in the directory</h4>\n<blockquote>\n<p>here is a link to and photo of the resulting html file:</p>\n</blockquote>\n<p><a href=\"https://quirky-meninsky-4181b5.netlify.app/\" title=\"https://quirky-meninsky-4181b5.netlify.app/\"><strong>index.html</strong><br>\n<em>CONTENT/DS-n-Algos/</em>quirky-meninsky-4181b5.netlify.app</a><a href=\"https://quirky-meninsky-4181b5.netlify.app/\"></a></p>\n<p><a href=\"https://camo.githubusercontent.com/ce04a06e4fc2c23c62fd6a9dbea96125b5920b8c53a1c62434325989768cd1a7/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a414f5962577655474e39794a3463654e7a41474773772e706e67\"><img src=\"https://camo.githubusercontent.com/ce04a06e4fc2c23c62fd6a9dbea96125b5920b8c53a1c62434325989768cd1a7/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a414f5962577655474e39794a3463654e7a41474773772e706e67\"></a></p>\n<hr>\n<h3>5.) Download all links to a files of a specified extension on a user provided (url) webpage</h3>\n<pre><code>wget -r -A.pdf https://overapi.com/gitwget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off\n</code></pre>\n<blockquote>\n<p>The result is stored in <a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/5-download-all-pdf\">this directory:</a></p>\n</blockquote>\n<p><a href=\"https://camo.githubusercontent.com/02861c1b49280db7ab6c017bc4dc93f0d22b7385e2b33e2154fc3e734b1da3c7/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a38657656504f5f7a2d5f5441547a6b634454703135512e706e67\"><img src=\"https://camo.githubusercontent.com/02861c1b49280db7ab6c017bc4dc93f0d22b7385e2b33e2154fc3e734b1da3c7/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a38657656504f5f7a2d5f5441547a6b634454703135512e706e67\"></a></p>\n<hr>\n<h3>6.)Recursively remove lines of text containing the string badFolder from files in the working directory</h3>\n<pre><code>find . -type f -exec sed -i '/badFolder/d' ./* {} \\;\n\n# OR\n\nfind . -name 'result.md'  -type f -exec sed -i '/badFolder/d' ./* {} \\;\n</code></pre>\n<p><strong>As an example I will run this command on a file containing the text:</strong></p>\n<pre><code>Hacks Blog\n\nRead more at hacks.mozilla.org\n\nbadFolder\n\nbadFolder Implementing Private Fields for JavaScript\n\nWhen implementing a language feature for JavaScript, an implementer must make decisions about how the language in the specification maps to the implementation. Private fields is an example of where the specification language and implementation reality diverge, at least in SpiderMonkey-- the JavaScript engine which powers Firefox. To understand more, I'll explain what private fields are, a couple of models for thinking about them, and explain why our implementation diverges from the specification language.The post Implementing Private Fields for JavaScript appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, June 8, 2021 by Matthew Gaudet\n\nLooking fine with Firefox 89\n\nFirefox 89 has smartened up and brings with it a slimmed-down, slightly more minimalist interface.badFolder Along with this new look, we get some great styling features including a force-colours feature for media queries and better control over how fonts are displayed. The long-awaited top-level await keyword for JavaScript modules is now enabled, as well as the PerformanceEventTiming interface, which is another addition to the performance suite of APIs: 89 really has been working out!The post Looking fine with Firefox 89 appeared first on Mozilla Hacks - the Web developer blog.\n\nbadFolder\n\nPosted Tuesday, June 1, 2021 by Chris Mills\n\nbadFolder\n\nImproving Firefox stability on Linux\n\nRoughly a year ago at Mozilla we started an effort to improve Firefox stability on Linux. This effort quickly became an example of good synergies between FOSS projects.The post Improving Firefox stability on Linux appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Wednesday, May 19, 2021 by Gabriele Svelto badFolder\n\nIntroducing Firefox's new Site Isolation Security Architecture\n\nLike any web browser, Firefox loads code from untrusted and potentially hostile websites and runs it on your computer. To protect you against new types of attacks from malicious sites and to meet the security principles of Mozilla, we set out to redesign Firefox on desktop.The post Introducing Firefox's new Site Isolation Security Architecture appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, May 18, 2021 by Anny Gakhokidze\n\nPyodide Spin Out and 0.17 Release\n\nWe are happy to announce that Pyodide has become an independent and community-driven project. We are also pleased to announce the 0.17 release for Pyodide with many new features and improvements. Pyodide consists of the CPython 3.8 interpreter compiled to WebAssembly which allows Python to run in the browser.The post Pyodide Spin Out and 0.17 Release appeared first on Mozilla Hacks - the Web developer blog. badFolder\n\nPosted Thursday, April 22, 2021 by Teon Brooks\n</code></pre>\n<p><strong><em>I modified the command slightly to apply only to files called 'result.md':</em></strong></p>\n<blockquote>\n<p>The result is :</p>\n</blockquote>\n<pre><code>Hacks Blog\n\nRead more at hacks.mozilla.org\n\nWhen implementing a language feature for JavaScript, an implementer must make decisions about how the language in the specification maps to the implementation. Private fields is an example of where the specification language and implementation reality diverge, at least in SpiderMonkey-- the JavaScript engine which powers Firefox. To understand more, I'll explain what private fields are, a couple of models for thinking about them, and explain why our implementation diverges from the specification language.The post Implementing Private Fields for JavaScript appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, June 8, 2021 by Matthew Gaudet\n\nLooking fine with Firefox 89\n\nPosted Tuesday, June 1, 2021 by Chris Mills\n\nImproving Firefox stability on Linux\n\nRoughly a year ago at Mozilla we started an effort to improve Firefox stability on Linux. This effort quickly became an example of good synergies between FOSS projects.The post Improving Firefox stability on Linux appeared first on Mozilla Hacks - the Web developer blog.\n\nIntroducing Firefox's new Site Isolation Security Architecture\n\nLike any web browser, Firefox loads code from untrusted and potentially hostile websites and runs it on your computer. To protect you against new types of attacks from malicious sites and to meet the security principles of Mozilla, we set out to redesign Firefox on desktop.The post Introducing Firefox's new Site Isolation Security Architecture appeared first on Mozilla Hacks - the Web developer blog.\n\nPosted Tuesday, May 18, 2021 by Anny Gakhokidze\n\nPyodide Spin Out and 0.17 Release\n\nPosted Thursday, April 22, 2021 by Teon Brooks\n</code></pre>\n<p><a href=\"https://camo.githubusercontent.com/4308e370c8f20afdfd06a497dcd7eb257b61b498a18c23a3c9584675b38b1a10/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a55703561732d4d6b4863486276495f715831417150772e706e67\"><img src=\"https://camo.githubusercontent.com/4308e370c8f20afdfd06a497dcd7eb257b61b498a18c23a3c9584675b38b1a10/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a55703561732d4d6b4863486276495f715831417150772e706e67\"></a></p>\n<p><strong>the test.txt and result.md files can be found here:</strong></p>\n<p><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/6-remove-lines-contaning-bad-text\" title=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/6-remove-lines-contaning-bad-text\"><strong>bgoonz/bash-commands-walkthrough</strong><br>\n<em>to accompany the medium article I am writing. Contribute to bgoonz/bash-commands-walkthrough development by creating an...</em>github.com</a><a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/6-remove-lines-contaning-bad-text\"></a></p>\n<hr>\n<h3>7.) Execute command recursively</h3>\n<p><strong>Here I have modified the command I wish to run recursively to account for the fact that the 'find' command already works recursively, by appending the -maxdepth 1 flag...</strong></p>\n<blockquote>\n<p><strong>I am essentially removing the recursive action of the find command...</strong></p>\n</blockquote>\n<p><strong>That way, if the command affects the more deeply nested folders we know the outer RecurseDirs function we are using to run the <em>find/pandoc</em> line once in every subfolder of the working directory... is working properly!</strong></p>\n<p><a href=\"https://camo.githubusercontent.com/b514da1e3cfcfeda7a09f9d691618ee89526a7ebe8ded7dd7140a5c88f5f9d3e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3630302f312a35435f757a4c6e7543536c5469696f693245746e55412e706e67\"><img src=\"https://camo.githubusercontent.com/b514da1e3cfcfeda7a09f9d691618ee89526a7ebe8ded7dd7140a5c88f5f9d3e/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3630302f312a35435f757a4c6e7543536c5469696f693245746e55412e706e67\"></a></p>\n<p><strong>Run in the folder shown to the left... we would expect every .md file to be accompanied by a newly generated html file by the same name.</strong></p>\n<p><strong>The results of said operation can be found in the</strong> <a href=\"https://github.com/bgoonz/bash-commands-walkthrough/tree/master/steps/7-recursive-run\"><strong>following directory</strong></a></p>\n<h4>In Action</h4>\n<p>🢃 Below 🢃</p>\n<p><a href=\"https://camo.githubusercontent.com/5f6bdf3692deea17ec807a6bb770b7474de94190813abae568dde34f9f8b5422/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a6b39633151524b593037544c4a6e7039536538396c512e676966\"><img src=\"https://camo.githubusercontent.com/5f6bdf3692deea17ec807a6bb770b7474de94190813abae568dde34f9f8b5422/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a6b39633151524b593037544c4a6e7039536538396c512e676966\"></a></p>\n<h4>The final result is</h4>\n<p><a href=\"https://camo.githubusercontent.com/1d5d06c2c92fbb7a3f42080beacb2ae8e3e0e9887220cfe81ba851eff627c753/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a6a71726a4e654275526d5472447433766d5135304c512e706e67\"><img src=\"https://camo.githubusercontent.com/1d5d06c2c92fbb7a3f42080beacb2ae8e3e0e9887220cfe81ba851eff627c753/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f313230302f312a6a71726a4e654275526d5472447433766d5135304c512e706e67\"></a></p>\n<p><em>If you want to run any bash script recursively all you have to do is substitue out line #9 with the command you want to run once in every sub-folder.</em></p>\n<pre><code>function RecurseDirs ()\n{\n    oldIFS=$IFS\n    IFS=$'\\n'\n    for f in \"$@\"\n    do\n\n#Replace the line below with your own command!\n\n#find ./ -iname \"*.md\" -maxdepth 1 -type f -exec sh -c 'pandoc --standalone \"${0}\" -o \"${0%.md}.html\"' {} \\;\n\n#####################################################\n# YOUR CODE BELOW!\n\n#####################################################\n\nif [[ -d \"${f}\" ]]; then\n            cd \"${f}\"\n            RecurseDirs $(ls -1 \".\")\n            cd ..\n        fi\n    done\n    IFS=$oldIFS\n}\nRecurseDirs \"./\"\n</code></pre>\n<hr>\n<h3>TBC</h3>\n<p><strong>Here are some of the other commands I will cover in greater detail... at a later time:</strong></p>\n<h3>9. Copy any text between <script> tags in a file called example.html to be inserted into a new file: out.js</h3>\n<pre><code>sed -n -e '/&#x3C;script>/,/&#x3C;\\/script>/p' example.html >out.js\n</code></pre>\n<hr>\n<h3>10. Recursively Delete node_modules folders</h3>\n<pre><code>find . -name 'node_modules' -type d -print -prune -exec rm -rf '{}' +\n</code></pre>\n<hr>\n<h3>11. Sanatize file and folder names to remove illegal characters and reserved words</h3>\n<pre><code>sanitize() {\n  shopt -s extglob;\n\n  filename=$(basename \"$1\")\n  directory=$(dirname \"$1\")\n\n  filename_clean=$(echo \"$filename\" | sed -e 's/[\\\\/:\\*\\?\"&#x3C;>\\|\\x01-\\x1F\\x7F]//g' -e 's/^\\(nul\\|prn\\|con\\|lpt[0-9]\\|com[0-9]\\|aux\\)\\(\\.\\|$\\)//i' -e 's/^\\.*$//' -e 's/^$/NONAME/')\n\n  if (test \"$filename\" != \"$filename_clean\")\n  then\n    mv -v \"$1\" \"$directory/$filename_clean\"\n  fi\n}\n\nexport -f sanitize\n\nsanitize_dir() {\n  find \"$1\" -depth -exec bash -c 'sanitize \"$0\"' {} \\;\n\n}\n\nsanitize_dir '/path/to/somewhere'\n</code></pre>\n<hr>\n<h3>12. Start postgresql in terminal</h3>\n<pre><code>sudo -u postgres psql\n</code></pre>\n<hr>\n<h3>13. Add closing body and script tags to each html file in working directory</h3>\n<pre><code>for f in * ; do\n  mv \"$f\" \"$f.html\"\ndoneecho \"&#x3C;form>\n &#x3C;input type=\"button\" value=\"Go back!\" onclick=\"history.back()\">\n&#x3C;/form>\n  &#x3C;/body>&#x3C;/html>\" | tee -a *.html\n</code></pre>\n<hr>\n<h3>14. Batch Download Videos</h3>\n<pre><code>#!/bin/bash\n\nlink=\"#insert url here#\"\n#links were a set of strings with just the index of the video as the variable\n\nnum=3\n#first video was numbered 3 - weird.\n\next=\".mp4\"\n\nwhile [ $num -le 66 ]\ndo\n      wget $link$num$ext -P ~/Downloads/\n      num=$(($num+1))\ndone\n</code></pre>\n<hr>\n<h3>15. Change File Extension from '.txt' to .doc for all files in working directory</h3>\n<pre><code>sudo apt install rename\n\nrename 's/\\.txt$/.doc/' *.txt\n</code></pre>\n<h3>16. Recursivley change any file with extension .js.download to .js</h3>\n<pre><code>find . -name \"*.\\.js\\.download\" -exec rename 's/\\.js\\.download$/.js/' '{}' +\n</code></pre>\n<hr>\n<h3>17. Copy folder structure including only files of a specific extension into an ouput Folder</h3>\n<pre><code>find . -name '*.md' | cpio -pdm './../outputFolder'\n</code></pre>\n<hr>\n<h3>Discover More</h3>\n<p><a href=\"https://bgoonz-blog.netlify.app/\" title=\"https://bgoonz-blog.netlify.app/\"><strong>Web-Dev-Hub</strong><br>\n<em>Memoization, Tabulation, and Sorting Algorithms by Example Why is looking at runtime not a reliable method of...</em>bgoonz-blog.netlify.app</a><a href=\"https://bgoonz-blog.netlify.app/\"></a></p>\n<h3>Part 2 of this series</h3>\n<p><a href=\"https://medium.com/@bryanguner/life-saving-bash-scripts-part-2-b40c8ee22682\" title=\"https://medium.com/@bryanguner/life-saving-bash-scripts-part-2-b40c8ee22682\"><strong>Medium</strong><br>\n<em>Continued!!!medium.com</em></a><a href=\"https://medium.com/@bryanguner/life-saving-bash-scripts-part-2-b40c8ee22682\"></a></p>\n<hr>\n<p>By <a href=\"https://medium.com/@bryanguner\">Bryan Guner</a> on <a href=\"https://medium.com/p/920fb6ab9d0a\">June 29, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/bash-commands-that-save-time-920fb6ab9d0a\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com/\">Medium</a> on July 13, 2021.</p>\n<p><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821/raw/6df51b57737eabd32d1c68c57e110600f471619a/Bash-Comma.md\">view raw</a><a href=\"https://gist.github.com/bgoonz/674c3f169d75d5ab9453d4c7ffbdd821#file-bash-comma-md\">Bash-Comma.md</a> hosted with ❤ by <a href=\"https://github.com/\">GitHub</a></p>\n<h1>Basic Web Development Environment Setup</h1>\n<p>Windows Subsystem for Linux (WSL) and Ubuntu</p>\n<hr>\n<h3>Basic Web Development Environment Setup</h3>\n<h4>Windows Subsystem for Linux (WSL) and Ubuntu</h4>\n<p><a href=\"https://camo.githubusercontent.com/305c753492ee50b499a95b10c6a817c07821f73ff6c734b45b073b8a7aeafebd/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a61714b503164724e486d4e6d33347a7a2e6a7067\"><img src=\"https://camo.githubusercontent.com/305c753492ee50b499a95b10c6a817c07821f73ff6c734b45b073b8a7aeafebd/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f302a61714b503164724e486d4e6d33347a7a2e6a7067\"></a></p>\n<p>Test if you have Ubuntu installed by typing \"Ubuntu\" in the search box in the bottom app bar that reads \"Type here to search\". If you see a search result that reads <strong>\"Ubuntu 20.04 LTS\"</strong> with \"App\" under it, then you have it installed.</p>\n<ol>\n<li>In the application search box in the bottom bar, type \"PowerShell\" to find the application named \"Windows PowerShell\"</li>\n<li>Right-click on \"Windows PowerShell\" and choose \"Run as administrator\" from the popup menu</li>\n<li>In the blue PowerShell window, type the following: <code>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux</code></li>\n<li>Restart your computer</li>\n<li>In the application search box in the bottom bar, type \"Store\" to find the application named \"Microsoft Store\"</li>\n<li>Click \"Microsoft Store\"</li>\n<li>Click the \"Search\" button in the upper-right corner of the window</li>\n<li>Type in \"Ubuntu\"</li>\n<li>Click \"Run Linux on Windows (Get the apps)\"</li>\n<li>Click the orange tile labeled <strong>\"Ubuntu\"</strong> Note that there are 3 versions in the Microsoft Store... you want the one just entitled 'Ubuntu'</li>\n<li>Click \"Install\"</li>\n<li>After it downloads, click \"Launch\"</li>\n<li>If you get the option, pin the application to the task bar. Otherwise, right-click on the orange Ubuntu icon in the task bar and choose \"Pin to taskbar\"</li>\n<li>When prompted to \"Enter new UNIX username\", type your first name with no spaces</li>\n<li>When prompted, enter and retype a password for this UNIX user (it can be the same as your Windows password)</li>\n<li>Confirm your installation by typing the command <code>whoami 'as in who-am-i'</code>followed by Enter at the prompt (it should print your first name)</li>\n<li>You need to update your packages, so type <code>sudo apt update</code> (if prompted for your password, enter it)</li>\n<li>You need to upgrade your packages, so type <code>sudo apt upgrade</code> (if prompted for your password, enter it)</li>\n</ol>\n<h3>Git</h3>\n<p>Git comes with Ubuntu, so there's nothing to install. However, you should configure it using the following instructions.</p>\n<p>‌Open an Ubuntu terminal if you don't have one open already.</p>\n<ol>\n<li>You need to configure Git, so type <code>git config --global user.name \"Your Name\"</code> with replacing \"Your Name\" with your real name.</li>\n<li>You need to configure Git, so type <code>git config --global user.email your@email.com</code> with replacing \"<a href=\"mailto:your@email.com\"></a><a href=\"mailto:your@email.com\">your@email.com</a>\" with your real email.</li>\n</ol>\n<p><strong>Note: if you want git to remember your login credentials type:</strong></p>\n<pre><code>git config --global credential.helper store\n</code></pre>\n<h3>Google Chrome</h3>\n<p>Test if you have Chrome installed by typing \"Chrome\" in the search box in the bottom app bar that reads \"Type here to search\". If you see a search result that reads \"Chrome\" with \"App\" under it, then you have it installed. Otherwise, follow these instructions to install Google Chrome.</p>\n<ol>\n<li>Open Microsoft Edge, the blue \"e\" in the task bar, and type in <a href=\"http://chrome.google.com/\"></a><a href=\"http://chrome.google.com/\">http://chrome.google.com</a>. Click the \"Download Chrome\" button. Click the \"Accept and Install\" button after reading the terms of service. Click \"Save\" in the \"What do you want to do with ChromeSetup.exe\" dialog at the bottom of the window. When you have the option to \"Run\" it, do so. Answer the questions as you'd like. Set it as the default browser.</li>\n<li>Right-click on the Chrome icon in the task bar and choose \"Pin to taskbar\".</li>\n</ol>\n<h3>Node.js</h3>\n<p>Test if you have Node.js installed by opening an Ubuntu terminal and typing <code>node --version</code>. If it reports \"Command 'node' not found\", then you need to follow these directions.</p>\n<ol>\n<li>In the Ubuntu terminal, type <code>sudo apt update</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>sudo apt install build-essential</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>. ./.bashrc</code> and press Enter</li>\n<li>In the Ubuntu terminal, type <code>nvm install --lts</code> and press Enter</li>\n<li>Confirm that <strong>node</strong> is installed by typing <code>node --version</code> and seeing it print something that is not \"Command not found\"!</li>\n</ol>\n<h3>Unzip</h3>\n<p>You will often have to download a zip file and unzip it. It is easier to do this from the command line. So we need to install a linux unzip utility.</p>\n<p>‌In the Ubuntu terminal type: <code>sudo apt install unzip</code> and press Enter</p>\n<p>‌Mocha.js</p>\n<p>Test if you have Mocha.js installed by opening an Ubuntu terminal and typing <code>which mocha</code>. If it prints a path, then you're good. Otherwise, if it prints nothing, install Mocha.js by typing <code>npm install -g mocha</code>.</p>\n<h3>Python 3</h3>\n<p>Ubuntu does not come with Python 3. Install it using the command <code>sudo apt install python3</code>. Test it by typing <code>python3 --version</code> and seeing it print a number.</p>\n<h3>Note about WSL</h3>\n<p>As of the time of writing of this document, WSL has an issue renaming or deleting files if Visual Studio Code is open. So before doing any linux commands which manipulate files, make sure you <strong>close</strong> Visual Studio Code before running those commands in the Ubuntu terminal.</p>\n<p>‌</p>"},{"url":"/docs/python/snippets/","relativePath":"docs/python/snippets.md","relativeDir":"docs/python","base":"snippets.md","name":"snippets","frontmatter":{"title":"Python Snippets","weight":0,"excerpt":"Snippets","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Python Snippets</h1>\n<hr>\n<hr>\n<h3>Calculates the date of <code>n</code> days from the given date.</h3>\n<ul>\n<li>Use <code>datetime.timedelta</code> and the <code>+</code> operator to calculate the new <code>datetime.datetime</code> value after adding <code>n</code> days to <code>d</code>.</li>\n<li>Omit the second argument, <code>d</code>, to use a default value of <code>datetime.today()</code>.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import datetime, timedelta\n\ndef add_days(n, d = datetime.today()):\n  return d + timedelta(n)\n</code></pre>\n<pre><code class=\"language-py\">from datetime import date\n\nadd_days(5, date(2020, 10, 25)) # date(2020, 10, 30)\nadd_days(-5, date(2020, 10, 25)) # date(2020, 10, 20)\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if all elements in a list are equal.</h3>\n<ul>\n<li>Use <code>set()</code> to eliminate duplicate elements and then use <code>len()</code> to check if length is <code>1</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def all_equal(lst):\n  return len(set(lst)) == 1\n</code></pre>\n<pre><code class=\"language-py\">all_equal([1, 2, 3, 4, 5, 6]) # False\nall_equal([1, 1, 1, 1]) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if all the values in a list are unique.</h3>\n<ul>\n<li>Use <code>set()</code> on the given list to keep only unique occurrences.</li>\n<li>Use <code>len()</code> to compare the length of the unique values to the original list.</li>\n</ul>\n<pre><code class=\"language-py\">def all_unique(lst):\n  return len(lst) == len(set(lst))\n</code></pre>\n<pre><code class=\"language-py\">x = [1, 2, 3, 4, 5, 6]\ny = [1, 2, 2, 3, 4, 5]\nall_unique(x) # True\nall_unique(y) # False\n</code></pre>\n<hr>\n<hr>\n<h3>Generates a list of numbers in the arithmetic progression starting with the given positive integer and up to the specified limit.</h3>\n<ul>\n<li>Use <code>range()</code> and <code>list()</code> with the appropriate start, step and end values.</li>\n</ul>\n<pre><code class=\"language-py\">def arithmetic_progression(n, lim):\n  return list(range(n, lim + 1, n))\n</code></pre>\n<pre><code class=\"language-py\">arithmetic_progression(5, 25) # [5, 10, 15, 20, 25]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the average of two or more numbers.</h3>\n<ul>\n<li>Use <code>sum()</code> to sum all of the <code>args</code> provided, divide by <code>len()</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def average(*args):\n  return sum(args, 0.0) / len(args)\n</code></pre>\n<pre><code class=\"language-py\">average(*[1, 2, 3]) # 2.0\naverage(1, 2, 3) # 2.0\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the average of a list, after mapping each element to a value using the provided function.</h3>\n<ul>\n<li>Use <code>map()</code> to map each element to the value returned by <code>fn</code>.</li>\n<li>Use <code>sum()</code> to sum all of the mapped values, divide by <code>len(lst)</code>.</li>\n<li>Omit the last argument, <code>fn</code>, to use the default identity function.</li>\n</ul>\n<pre><code class=\"language-py\">def average_by(lst, fn = lambda x: x):\n  return sum(map(fn, lst), 0.0) / len(lst)\n</code></pre>\n<pre><code class=\"language-py\">average_by([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], lambda x: x['n'])\n# 5.0\n</code></pre>\n<hr>\n<hr>\n<h3>Splits values into two groups, based on the result of the given <code>filter</code> list.</h3>\n<ul>\n<li>Use a list comprehension and <code>zip()</code> to add elements to groups, based on <code>filter</code>.</li>\n<li>If <code>filter</code> has a truthy value for any element, add it to the first group, otherwise add it to the second group.</li>\n</ul>\n<pre><code class=\"language-py\">def bifurcate(lst, filter):\n  return [\n    [x for x, flag in zip(lst, filter) if flag],\n    [x for x, flag in zip(lst, filter) if not flag]\n  ]\n</code></pre>\n<pre><code class=\"language-py\">bifurcate(['beep', 'boop', 'foo', 'bar'], [True, True, False, True])\n# [ ['beep', 'boop', 'bar'], ['foo'] ]\n</code></pre>\n<hr>\n<hr>\n<h3>Splits values into two groups, based on the result of the given filtering function.</h3>\n<ul>\n<li>Use a list comprehension to add elements to groups, based on the value returned by <code>fn</code> for each element.</li>\n<li>If <code>fn</code> returns a truthy value for any element, add it to the first group, otherwise add it to the second group.</li>\n</ul>\n<pre><code class=\"language-py\">def bifurcate_by(lst, fn):\n  return [\n    [x for x in lst if fn(x)],\n    [x for x in lst if not fn(x)]\n  ]\n</code></pre>\n<pre><code class=\"language-py\">bifurcate_by(['beep', 'boop', 'foo', 'bar'], lambda x: x[0] == 'b')\n# [ ['beep', 'boop', 'bar'], ['foo'] ]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the number of ways to choose <code>k</code> items from <code>n</code> items without repetition and without order.</h3>\n<ul>\n<li>Use <code>math.comb()</code> to calculate the binomial coefficient.</li>\n</ul>\n<pre><code class=\"language-py\">from math import comb\n\ndef binomial_coefficient(n, k):\n  return comb(n, k)\n</code></pre>\n<pre><code class=\"language-py\">binomial_coefficient(8, 2) # 28\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the length of a string in bytes.</h3>\n<ul>\n<li>Use <code>str.encode('utf-8')</code> to encode the given string and return its length.</li>\n</ul>\n<pre><code class=\"language-py\">def byte_size(s):\n  return len(s.encode('utf-8'))\n</code></pre>\n<pre><code class=\"language-py\">byte_size('😀') # 4\nbyte_size('Hello World') # 11\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a string to camelcase.</h3>\n<ul>\n<li>Use <code>re.sub()</code> to replace any <code>-</code> or <code>_</code> with a space, using the regexp <code>r\"(_|-)+\"</code>.</li>\n<li>Use <code>str.title()</code> to capitalize the first letter of each word and convert the rest to lowercase.</li>\n<li>Finally, use <code>str.replace()</code> to remove spaces between words.</li>\n</ul>\n<pre><code class=\"language-py\">from re import sub\n\ndef camel(s):\n  s = sub(r\"(_|-)+\", \" \", s).title().replace(\" \", \"\")\n  return ''.join([s[0].lower(), s[1:]])\n</code></pre>\n<pre><code class=\"language-py\">camel('some_database_field_name') # 'someDatabaseFieldName'\ncamel('Some label that needs to be camelized')\n# 'someLabelThatNeedsToBeCamelized'\ncamel('some-javascript-property') # 'someJavascriptProperty'\ncamel('some-mixed_string with spaces_underscores-and-hyphens')\n# 'someMixedStringWithSpacesUnderscoresAndHyphens'\n</code></pre>\n<hr>\n<hr>\n<h3>Capitalizes the first letter of a string.</h3>\n<ul>\n<li>Use list slicing and <code>str.upper()</code> to capitalize the first letter of the string.</li>\n<li>Use <code>str.join()</code> to combine the capitalized first letter with the rest of the characters.</li>\n<li>Omit the <code>lower_rest</code> parameter to keep the rest of the string intact, or set it to <code>True</code> to convert to lowercase.</li>\n</ul>\n<pre><code class=\"language-py\">def capitalize(s, lower_rest = False):\n  return ''.join([s[:1].upper(), (s[1:].lower() if lower_rest else s[1:])])\n</code></pre>\n<pre><code class=\"language-py\">capitalize('fooBar') # 'FooBar'\ncapitalize('fooBar', True) # 'Foobar'\n</code></pre>\n<hr>\n<hr>\n<h3>Capitalizes the first letter of every word in a string.</h3>\n<ul>\n<li>Use <code>str.title()</code> to capitalize the first letter of every word in the string.</li>\n</ul>\n<pre><code class=\"language-py\">def capitalize_every_word(s):\n  return s.title()\n</code></pre>\n<pre><code class=\"language-py\">capitalize_every_word('hello world!') # 'Hello World!'\n</code></pre>\n<hr>\n<hr>\n<h3>Casts the provided value as a list if it's not one.</h3>\n<ul>\n<li>Use <code>isinstance()</code> to check if the given value is enumerable.</li>\n<li>Return it by using <code>list()</code> or encapsulated in a list accordingly.</li>\n</ul>\n<pre><code class=\"language-py\">def cast_list(val):\n  return list(val) if isinstance(val, (tuple, list, set, dict)) else [val]\n</code></pre>\n<pre><code class=\"language-py\">cast_list('foo') # ['foo']\ncast_list([1]) # [1]\ncast_list(('foo', 'bar')) # ['foo', 'bar']\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Converts Celsius to Fahrenheit.</p>\n<ul>\n<li>Follow the conversion formula <code>F = 1.8 * C + 32</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def celsius_to_fahrenheit(degrees):\n  return ((degrees * 1.8) + 32)\n</code></pre>\n<pre><code class=\"language-py\">celsius_to_fahrenheit(180) # 356.0\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a function that will invoke a predicate function for the specified property on a given object.</h3>\n<ul>\n<li>Return a <code>lambda</code> function that takes an object and applies the predicate function, <code>fn</code> to the specified property.</li>\n</ul>\n<pre><code class=\"language-py\">def check_prop(fn, prop):\n  return lambda obj: fn(obj[prop])\n</code></pre>\n<pre><code class=\"language-py\">check_age = check_prop(lambda x: x >= 18, 'age')\nuser = {'name': 'Mark', 'age': 18}\ncheck_age(user) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Chunks a list into smaller lists of a specified size.</h3>\n<ul>\n<li>Use <code>list()</code> and <code>range()</code> to create a list of the desired <code>size</code>.</li>\n<li>Use <code>map()</code> on the list and fill it with splices of the given list.</li>\n<li>Finally, return the created list.</li>\n</ul>\n<pre><code class=\"language-py\">from math import ceil\n\ndef chunk(lst, size):\n  return list(\n    map(lambda x: lst[x * size:x * size + size],\n      list(range(ceil(len(lst) / size)))))\n</code></pre>\n<pre><code class=\"language-py\">chunk([1, 2, 3, 4, 5], 2) # [[1, 2], [3, 4], [5]]\n</code></pre>\n<hr>\n<hr>\n<h3>Chunks a list into <code>n</code> smaller lists.</h3>\n<ul>\n<li>Use <code>math.ceil()</code> and <code>len()</code> to get the size of each chunk.</li>\n<li>Use <code>list()</code> and <code>range()</code> to create a new list of size <code>n</code>.</li>\n<li>Use <code>map()</code> to map each element of the new list to a chunk the length of <code>size</code>.</li>\n<li>If the original list can't be split evenly, the final chunk will contain the remaining elements.</li>\n</ul>\n<pre><code class=\"language-py\">from math import ceil\n\ndef chunk_into_n(lst, n):\n  size = ceil(len(lst) / n)\n  return list(\n    map(lambda x: lst[x * size:x * size + size],\n    list(range(n)))\n  )\n</code></pre>\n<pre><code class=\"language-py\">chunk_into_n([1, 2, 3, 4, 5, 6, 7], 4) # [[1, 2], [3, 4], [5, 6], [7]]\n</code></pre>\n<hr>\n<hr>\n<h3>Clamps <code>num</code> within the inclusive range specified by the boundary values.</h3>\n<ul>\n<li>If <code>num</code> falls within the range (<code>a</code>, <code>b</code>), return <code>num</code>.</li>\n<li>Otherwise, return the nearest number in the range.</li>\n</ul>\n<pre><code class=\"language-py\">def clamp_number(num, a, b):\n  return max(min(num, max(a, b)), min(a, b))\n</code></pre>\n<pre><code class=\"language-py\">clamp_number(2, 3, 5) # 3\nclamp_number(1, -1, -5) # -1\n</code></pre>\n<hr>\n<hr>\n<h3>Inverts a dictionary with non-unique hashable values.</h3>\n<ul>\n<li>Create a <code>collections.defaultdict</code> with <code>list</code> as the default value for each key.</li>\n<li>Use <code>dictionary.items()</code> in combination with a loop to map the values of the dictionary to keys using <code>dict.append()</code>.</li>\n<li>Use <code>dict()</code> to convert the <code>collections.defaultdict</code> to a regular dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import defaultdict\n\ndef collect_dictionary(obj):\n  inv_obj = defaultdict(list)\n  for key, value in obj.items():\n    inv_obj[value].append(key)\n  return dict(inv_obj)\n</code></pre>\n<pre><code class=\"language-py\">ages = {\n  'Peter': 10,\n  'Isabel': 10,\n  'Anna': 9,\n}\ncollect_dictionary(ages) # { 10: ['Peter', 'Isabel'], 9: ['Anna'] }\n</code></pre>\n<hr>\n<hr>\n<h3>Combines two or more dictionaries, creating a list of values for each key.</h3>\n<ul>\n<li>Create a new <code>collections.defaultdict</code> with <code>list</code> as the default value for each key and loop over <code>dicts</code>.</li>\n<li>Use <code>dict.append()</code> to map the values of the dictionary to keys.</li>\n<li>Use <code>dict()</code> to convert the <code>collections.defaultdict</code> to a regular dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import defaultdict\n\ndef combine_values(*dicts):\n  res = defaultdict(list)\n  for d in dicts:\n    for key in d:\n      res[key].append(d[key])\n  return dict(res)\n</code></pre>\n<pre><code class=\"language-py\">d1 = {'a': 1, 'b': 'foo', 'c': 400}\nd2 = {'a': 3, 'b': 200, 'd': 400}\n\ncombine_values(d1, d2) # {'a': [1, 3], 'b': ['foo', 200], 'c': [400], 'd': [400]}\n</code></pre>\n<hr>\n<hr>\n<h3>Removes falsy values from a list.</h3>\n<ul>\n<li>Use <code>filter()</code> to filter out falsy values (<code>False</code>, <code>None</code>, <code>0</code>, and <code>\"\"</code>).</li>\n</ul>\n<pre><code class=\"language-py\">def compact(lst):\n  return list(filter(None, lst))\n</code></pre>\n<pre><code class=\"language-py\">compact([0, 1, False, 2, '', 3, 'a', 's', 34]) # [ 1, 2, 3, 'a', 's', 34 ]\n</code></pre>\n<hr>\n<hr>\n<h3>Performs right-to-left function composition.</h3>\n<ul>\n<li>Use <code>functools.reduce()</code> to perform right-to-left function composition.</li>\n<li>The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.</li>\n</ul>\n<pre><code class=\"language-py\">from functools import reduce\n\ndef compose(*fns):\n  return reduce(lambda f, g: lambda *args: f(g(*args)), fns)\n</code></pre>\n<pre><code class=\"language-py\">add5 = lambda x: x + 5\nmultiply = lambda x, y: x * y\nmultiply_and_add_5 = compose(add5, multiply)\nmultiply_and_add_5(5, 2) # 15\n</code></pre>\n<hr>\n<hr>\n<h3>Performs left-to-right function composition.</h3>\n<ul>\n<li>Use <code>functools.reduce()</code> to perform left-to-right function composition.</li>\n<li>The first (leftmost) function can accept one or more arguments; the remaining functions must be unary.</li>\n</ul>\n<pre><code class=\"language-py\">from functools import reduce\n\ndef compose_right(*fns):\n  return reduce(lambda f, g: lambda *args: g(f(*args)), fns)\n</code></pre>\n<pre><code class=\"language-py\">add = lambda x, y: x + y\nsquare = lambda x: x * x\nadd_and_square = compose_right(add, square)\nadd_and_square(1, 2) # 9\n</code></pre>\n<hr>\n<hr>\n<h3>Groups the elements of a list based on the given function and returns the count of elements in each group.</h3>\n<ul>\n<li>Use <code>collections.defaultdict</code> to initialize a dictionary.</li>\n<li>Use <code>map()</code> to map the values of the given list using the given function.</li>\n<li>Iterate over the map and increase the element count each time it occurs.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import defaultdict\n\ndef count_by(lst, fn = lambda x: x):\n  count = defaultdict(int)\n  for val in map(fn, lst):\n    count[val] += 1\n  return dict(count)\n</code></pre>\n<pre><code class=\"language-py\">from math import floor\n\ncount_by([6.1, 4.2, 6.3], floor) # {6: 2, 4: 1}\ncount_by(['one', 'two', 'three'], len) # {3: 2, 5: 1}\n</code></pre>\n<hr>\n<hr>\n<h3>Counts the occurrences of a value in a list.</h3>\n<ul>\n<li>Use <code>list.count()</code> to count the number of occurrences of <code>val</code> in <code>lst</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def count_occurrences(lst, val):\n  return lst.count(val)\n</code></pre>\n<pre><code class=\"language-py\">count_occurrences([1, 1, 2, 1, 2, 3], 1) # 3\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a list of partial sums.</h3>\n<ul>\n<li>Use <code>itertools.accumulate()</code> to create the accumulated sum for each element.</li>\n<li>Use <code>list()</code> to convert the result into a list.</li>\n</ul>\n<pre><code class=\"language-py\">from itertools import accumulate\n\ndef cumsum(lst):\n  return list(accumulate(lst))\n</code></pre>\n<pre><code class=\"language-py\">cumsum(range(0, 15, 3)) # [0, 3, 9, 18, 30]\n</code></pre>\n<hr>\n<hr>\n<h3>Curries a function.</h3>\n<ul>\n<li>Use <code>functools.partial()</code> to return a new partial object which behaves like <code>fn</code> with the given arguments, <code>args</code>, partially applied.</li>\n</ul>\n<pre><code class=\"language-py\">from functools import partial\n\ndef curry(fn, *args):\n  return partial(fn, *args)\n</code></pre>\n<pre><code class=\"language-py\">add = lambda x, y: x + y\nadd10 = curry(add, 10)\nadd10(20) # 30\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a list of dates between <code>start</code> (inclusive) and <code>end</code> (not inclusive).</h3>\n<ul>\n<li>Use <code>datetime.timedelta.days</code> to get the days between <code>start</code> and <code>end</code>.</li>\n<li>Use <code>int()</code> to convert the result to an integer and <code>range()</code> to iterate over each day.</li>\n<li>Use a list comprehension and <code>datetime.timedelta()</code> to create a list of <code>datetime.date</code> objects.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import timedelta, date\n\ndef daterange(start, end):\n  return [start + timedelta(n) for n in range(int((end - start).days))]\n</code></pre>\n<pre><code class=\"language-py\">from datetime import date\n\ndaterange(date(2020, 10, 1), date(2020, 10, 5))\n# [date(2020, 10, 1), date(2020, 10, 2), date(2020, 10, 3), date(2020, 10, 4)]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the date of <code>n</code> days ago from today.</h3>\n<ul>\n<li>Use <code>datetime.date.today()</code> to get the current day.</li>\n<li>Use <code>datetime.timedelta</code> to subtract <code>n</code> days from today's date.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import timedelta, date\n\ndef days_ago(n):\n  return date.today() - timedelta(n)\n</code></pre>\n<pre><code class=\"language-py\">days_ago(5) # date(2020, 10, 23)\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the day difference between two dates.</h3>\n<ul>\n<li>Subtract <code>start</code> from <code>end</code> and use <code>datetime.timedelta.days</code> to get the day difference.</li>\n</ul>\n<pre><code class=\"language-py\">def days_diff(start, end):\n  return (end - start).days\n</code></pre>\n<pre><code class=\"language-py\">from datetime import date\n\ndays_diff(date(2020, 10, 25), date(2020, 10, 28)) # 3\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the date of <code>n</code> days from today.</h3>\n<ul>\n<li>Use <code>datetime.date.today()</code> to get the current day.</li>\n<li>Use <code>datetime.timedelta</code> to add <code>n</code> days from today's date.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import timedelta, date\n\ndef days_from_now(n):\n  return date.today() + timedelta(n)\n</code></pre>\n<pre><code class=\"language-py\">days_from_now(5) # date(2020, 11, 02)\n</code></pre>\n<hr>\n<hr>\n<h3>Decapitalizes the first letter of a string.</h3>\n<ul>\n<li>Use list slicing and <code>str.lower()</code> to decapitalize the first letter of the string.</li>\n<li>Use <code>str.join()</code> to combine the lowercase first letter with the rest of the characters.</li>\n<li>Omit the <code>upper_rest</code> parameter to keep the rest of the string intact, or set it to <code>True</code> to convert to uppercase.</li>\n</ul>\n<pre><code class=\"language-py\">def decapitalize(s, upper_rest = False):\n  return ''.join([s[:1].lower(), (s[1:].upper() if upper_rest else s[1:])])\n</code></pre>\n<pre><code class=\"language-py\">decapitalize('FooBar') # 'fooBar'\ndecapitalize('FooBar', True) # 'fOOBAR'\n</code></pre>\n<hr>\n<hr>\n<h3>Deep flattens a list.</h3>\n<ul>\n<li>Use recursion.</li>\n<li>Use <code>isinstance()</code> with <code>collections.abc.Iterable</code> to check if an element is iterable.</li>\n<li>If it is iterable, apply <code>deep_flatten()</code> recursively, otherwise return <code>[lst]</code>.</li>\n</ul>\n<pre><code class=\"language-py\">from collections.abc import Iterable\n\ndef deep_flatten(lst):\n  return ([a for i in lst for a in\n          deep_flatten(i)] if isinstance(lst, Iterable) else [lst])\n</code></pre>\n<pre><code class=\"language-py\">deep_flatten([1, [2], [[3], 4], 5]) # [1, 2, 3, 4, 5]\n</code></pre>\n<hr>\n<hr>\n<h3>Converts an angle from degrees to radians.</h3>\n<ul>\n<li>Use <code>math.pi</code> and the degrees to radians formula to convert the angle from degrees to radians.</li>\n</ul>\n<pre><code class=\"language-py\">from math import pi\n\ndef degrees_to_rads(deg):\n  return (deg * pi) / 180.0\n</code></pre>\n<pre><code class=\"language-py\">degrees_to_rads(180) # ~3.1416\n</code></pre>\n<hr>\n<hr>\n<h3>Invokes the provided function after <code>ms</code> milliseconds.</h3>\n<ul>\n<li>Use <code>time.sleep()</code> to delay the execution of <code>fn</code> by <code>ms / 1000</code> seconds.</li>\n</ul>\n<pre><code class=\"language-py\">from time import sleep\n\ndef delay(fn, ms, *args):\n  sleep(ms / 1000)\n  return fn(*args)\n</code></pre>\n<pre><code class=\"language-py\">delay(lambda x: print(x), 1000, 'later') # prints 'later' after one second\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a dictionary to a list of tuples.</h3>\n<ul>\n<li>Use <code>dict.items()</code> and <code>list()</code> to get a list of tuples from the given dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">def dict_to_list(d):\n  return list(d.items())\n</code></pre>\n<pre><code class=\"language-py\">d = {'one': 1, 'three': 3, 'five': 5, 'two': 2, 'four': 4}\ndict_to_list(d)\n# [('one', 1), ('three', 3), ('five', 5), ('two', 2), ('four', 4)]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the difference between two iterables, without filtering duplicate values.</h3>\n<ul>\n<li>Create a <code>set</code> from <code>b</code>.</li>\n<li>Use a list comprehension on <code>a</code> to only keep values not contained in the previously created set, <code>_b</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def difference(a, b):\n  _b = set(b)\n  return [item for item in a if item not in _b]\n</code></pre>\n<pre><code class=\"language-py\">difference([1, 2, 3], [1, 2, 4]) # [3]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the difference between two lists, after applying the provided function to each list element of both.</h3>\n<ul>\n<li>Create a <code>set</code>, using <code>map()</code> to apply <code>fn</code> to each element in <code>b</code>.</li>\n<li>Use a list comprehension in combination with <code>fn</code> on <code>a</code> to only keep values not contained in the previously created set, <code>_b</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def difference_by(a, b, fn):\n  _b = set(map(fn, b))\n  return [item for item in a if fn(item) not in _b]\n</code></pre>\n<pre><code class=\"language-py\">from math import floor\n\ndifference_by([2.1, 1.2], [2.3, 3.4], floor) # [1.2]\ndifference_by([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], lambda v : v['x'])\n# [ { x: 2 } ]\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a number to a list of digits.</h3>\n<ul>\n<li>Use <code>map()</code> combined with <code>int</code> on the string representation of <code>n</code> and return a list from the result.</li>\n</ul>\n<pre><code class=\"language-py\">def digitize(n):\n  return list(map(int, str(n)))\n</code></pre>\n<pre><code class=\"language-py\">digitize(123) # [1, 2, 3]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list with <code>n</code> elements removed from the left.</h3>\n<ul>\n<li>Use slice notation to remove the specified number of elements from the left.</li>\n<li>Omit the last argument, <code>n</code>, to use a default value of <code>1</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def drop(a, n = 1):\n  return a[n:]\n</code></pre>\n<pre><code class=\"language-py\">drop([1, 2, 3]) # [2, 3]\ndrop([1, 2, 3], 2) # [3]\ndrop([1, 2, 3], 42) # []\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list with <code>n</code> elements removed from the right.</h3>\n<ul>\n<li>Use slice notation to remove the specified number of elements from the right.</li>\n<li>Omit the last argument, <code>n</code>, to use a default value of <code>1</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def drop_right(a, n = 1):\n  return a[:-n]\n</code></pre>\n<pre><code class=\"language-py\">drop_right([1, 2, 3]) # [1, 2]\ndrop_right([1, 2, 3], 2) # [1]\ndrop_right([1, 2, 3], 42) # []\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the provided function returns <code>True</code> for every element in the list.</h3>\n<ul>\n<li>Use <code>all()</code> in combination with <code>map()</code> and <code>fn</code> to check if <code>fn</code> returns <code>True</code> for all elements in the list.</li>\n</ul>\n<pre><code class=\"language-py\">def every(lst, fn = lambda x: x):\n  return all(map(fn, lst))\n</code></pre>\n<pre><code class=\"language-py\">every([4, 2, 3], lambda x: x > 1) # True\nevery([1, 2, 3]) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Returns every <code>nth</code> element in a list.</h3>\n<ul>\n<li>Use slice notation to create a new list that contains every <code>nth</code> element of the given list.</li>\n</ul>\n<pre><code class=\"language-py\">def every_nth(lst, nth):\n  return lst[nth - 1::nth]\n</code></pre>\n<pre><code class=\"language-py\">every_nth([1, 2, 3, 4, 5, 6], 2) # [ 2, 4, 6 ]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the factorial of a number.</h3>\n<ul>\n<li>Use recursion.</li>\n<li>If <code>num</code> is less than or equal to <code>1</code>, return <code>1</code>.</li>\n<li>Otherwise, return the product of <code>num</code> and the factorial of <code>num - 1</code>.</li>\n<li>Throws an exception if <code>num</code> is a negative or a floating point number.</li>\n</ul>\n<pre><code class=\"language-py\">def factorial(num):\n  if not ((num >= 0) and (num % 1 == 0)):\n    raise Exception(\"Number can't be floating point or negative.\")\n  return 1 if num == 0 else num * factorial(num - 1)\n</code></pre>\n<pre><code class=\"language-py\">factorial(6) # 720\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Converts Fahrenheit to Celsius.</p>\n<ul>\n<li>Follow the conversion formula <code>C = (F - 32) * 5/9</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def fahrenheit_to_celsius(degrees):\n  return ((degrees - 32) * 5/9)\n</code></pre>\n<pre><code class=\"language-py\">fahrenheit_to_celsius(77) # 25.0\n</code></pre>\n<hr>\n<hr>\n<h3>Generates a list, containing the Fibonacci sequence, up until the nth term.</h3>\n<ul>\n<li>Starting with <code>0</code> and <code>1</code>, use <code>list.append()</code> to add the sum of the last two numbers of the list to the end of the list, until the length of the list reaches <code>n</code>.</li>\n<li>If <code>n</code> is less or equal to <code>0</code>, return a list containing <code>0</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def fibonacci(n):\n  if n &#x3C;= 0:\n    return [0]\n  sequence = [0, 1]\n  while len(sequence) &#x3C;= n:\n    next_value = sequence[len(sequence) - 1] + sequence[len(sequence) - 2]\n    sequence.append(next_value)\n  return sequence\n</code></pre>\n<pre><code class=\"language-py\">fibonacci(7) # [0, 1, 1, 2, 3, 5, 8, 13]\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a list with the non-unique values filtered out.</h3>\n<ul>\n<li>Use <code>collections.Counter</code> to get the count of each value in the list.</li>\n<li>Use a list comprehension to create a list containing only the unique values.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import Counter\n\ndef filter_non_unique(lst):\n  return [item for item, count in Counter(lst).items() if count == 1]\n</code></pre>\n<pre><code class=\"language-py\">filter_non_unique([1, 2, 2, 3, 4, 4, 5]) # [1, 3, 5]\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a list with the unique values filtered out.</h3>\n<ul>\n<li>Use <code>collections.Counter</code> to get the count of each value in the list.</li>\n<li>Use a list comprehension to create a list containing only the non-unique values.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import Counter\n\ndef filter_unique(lst):\n  return [item for item, count in Counter(lst).items() if count > 1]\n</code></pre>\n<pre><code class=\"language-py\">filter_unique([1, 2, 2, 3, 4, 4, 5]) # [2, 4]\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the value of the first element in the given list that satisfies the provided testing function.</h3>\n<ul>\n<li>Use a list comprehension and <code>next()</code> to return the first element in <code>lst</code> for which <code>fn</code> returns <code>True</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find(lst, fn):\n  return next(x for x in lst if fn(x))\n</code></pre>\n<pre><code class=\"language-py\">find([1, 2, 3, 4], lambda n: n % 2 == 1) # 1\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the index of the first element in the given list that satisfies the provided testing function.</h3>\n<ul>\n<li>Use a list comprehension, <code>enumerate()</code> and <code>next()</code> to return the index of the first element in <code>lst</code> for which <code>fn</code> returns <code>True</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find_index(lst, fn):\n  return next(i for i, x in enumerate(lst) if fn(x))\n</code></pre>\n<pre><code class=\"language-py\">find_index([1, 2, 3, 4], lambda n: n % 2 == 1) # 0\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the indexes of all elements in the given list that satisfy the provided testing function.</h3>\n<ul>\n<li>Use <code>enumerate()</code> and a list comprehension to return the indexes of the all element in <code>lst</code> for which <code>fn</code> returns <code>True</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find_index_of_all(lst, fn):\n  return [i for i, x in enumerate(lst) if fn(x)]\n</code></pre>\n<pre><code class=\"language-py\">find_index_of_all([1, 2, 3, 4], lambda n: n % 2 == 1) # [0, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the first key in the provided dictionary that has the given value.</h3>\n<ul>\n<li>Use <code>dictionary.items()</code> and <code>next()</code> to return the first key that has a value equal to <code>val</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find_key(dict, val):\n  return next(key for key, value in dict.items() if value == val)\n</code></pre>\n<pre><code class=\"language-py\">ages = {\n  'Peter': 10,\n  'Isabel': 11,\n  'Anna': 9,\n}\nfind_key(ages, 11) # 'Isabel'\n</code></pre>\n<hr>\n<hr>\n<h3>Finds all keys in the provided dictionary that have the given value.</h3>\n<ul>\n<li>Use <code>dictionary.items()</code>, a generator and <code>list()</code> to return all keys that have a value equal to <code>val</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find_keys(dict, val):\n  return list(key for key, value in dict.items() if value == val)\n</code></pre>\n<pre><code class=\"language-py\">ages = {\n  'Peter': 10,\n  'Isabel': 11,\n  'Anna': 10,\n}\nfind_keys(ages, 10) # [ 'Peter', 'Anna' ]\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the value of the last element in the given list that satisfies the provided testing function.</h3>\n<ul>\n<li>Use a list comprehension and <code>next()</code> to return the last element in <code>lst</code> for which <code>fn</code> returns <code>True</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find_last(lst, fn):\n  return next(x for x in lst[::-1] if fn(x))\n</code></pre>\n<pre><code class=\"language-py\">find_last([1, 2, 3, 4], lambda n: n % 2 == 1) # 3\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the index of the last element in the given list that satisfies the provided testing function.</h3>\n<ul>\n<li>Use a list comprehension, <code>enumerate()</code> and <code>next()</code> to return the index of the last element in <code>lst</code> for which <code>fn</code> returns <code>True</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def find_last_index(lst, fn):\n  return len(lst) - 1 - next(i for i, x in enumerate(lst[::-1]) if fn(x))\n</code></pre>\n<pre><code class=\"language-py\">find_last_index([1, 2, 3, 4], lambda n: n % 2 == 1) # 2\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the items that are parity outliers in a given list.</h3>\n<ul>\n<li>Use <code>collections.Counter</code> with a list comprehension to count even and odd values in the list.</li>\n<li>Use <code>collections.Counter.most_common()</code> to get the most common parity.</li>\n<li>Use a list comprehension to find all elements that do not match the most common parity.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import Counter\n\ndef find_parity_outliers(nums):\n  return [\n    x for x in nums\n    if x % 2 != Counter([n % 2 for n in nums]).most_common()[0][0]\n  ]\n</code></pre>\n<pre><code class=\"language-py\">find_parity_outliers([1, 2, 3, 4, 6]) # [1, 3]\n</code></pre>\n<hr>\n<hr>\n<h3>Flattens a list of lists once.</h3>\n<ul>\n<li>Use a list comprehension to extract each value from sub-lists in order.</li>\n</ul>\n<pre><code class=\"language-py\">def flatten(lst):\n  return [x for y in lst for x in y]\n</code></pre>\n<pre><code class=\"language-py\">flatten([[1, 2, 3, 4], [5, 6, 7, 8]]) # [1, 2, 3, 4, 5, 6, 7, 8]\n</code></pre>\n<hr>\n<hr>\n<h3>Executes the provided function once for each list element.</h3>\n<ul>\n<li>Use a <code>for</code> loop to execute <code>fn</code> for each element in <code>itr</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def for_each(itr, fn):\n  for el in itr:\n    fn(el)\n</code></pre>\n<pre><code class=\"language-py\">for_each([1, 2, 3], print) # 1 2 3\n</code></pre>\n<hr>\n<hr>\n<h3>Executes the provided function once for each list element, starting from the list's last element.</h3>\n<ul>\n<li>Use a <code>for</code> loop in combination with slice notation to execute <code>fn</code> for each element in <code>itr</code>, starting from the last one.</li>\n</ul>\n<pre><code class=\"language-py\">def for_each_right(itr, fn):\n  for el in itr[::-1]:\n    fn(el)\n</code></pre>\n<pre><code class=\"language-py\">for_each_right([1, 2, 3], print) # 3 2 1\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a dictionary with the unique values of a list as keys and their frequencies as the values.</h3>\n<ul>\n<li>Use <code>collections.defaultdict()</code> to store the frequencies of each unique element.</li>\n<li>Use <code>dict()</code> to return a dictionary with the unique elements of the list as keys and their frequencies as the values.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import defaultdict\n\ndef frequencies(lst):\n  freq = defaultdict(int)\n  for val in lst:\n    freq[val] += 1\n  return dict(freq)\n</code></pre>\n<pre><code class=\"language-py\">frequencies(['a', 'b', 'a', 'c', 'a', 'a', 'b']) # { 'a': 4, 'b': 2, 'c': 1 }\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a date from its ISO-8601 representation.</h3>\n<ul>\n<li>Use <code>datetime.datetime.fromisoformat()</code> to convert the given ISO-8601 date to a <code>datetime.datetime</code> object.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import datetime\n\ndef from_iso_date(d):\n  return datetime.fromisoformat(d)\n</code></pre>\n<pre><code class=\"language-py\">from_iso_date('2020-10-28T12:30:59.000000') # 2020-10-28 12:30:59\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the greatest common divisor of a list of numbers.</h3>\n<ul>\n<li>Use <code>functools.reduce()</code> and <code>math.gcd()</code> over the given list.</li>\n</ul>\n<pre><code class=\"language-py\">from functools import reduce\nfrom math import gcd as _gcd\n\ndef gcd(numbers):\n  return reduce(_gcd, numbers)\n</code></pre>\n<pre><code class=\"language-py\">gcd([8, 36, 28]) # 4\n</code></pre>\n<hr>\n<hr>\n<h3>Initializes a list containing the numbers in the specified range where <code>start</code> and <code>end</code> are inclusive and the ratio between two terms is <code>step</code>.</h3>\n<p>Returns an error if <code>step</code> equals <code>1</code>.</p>\n<ul>\n<li>Use <code>range()</code>, <code>math.log()</code> and <code>math.floor()</code> and a list comprehension to create a list of the appropriate length, applying the step for each element.</li>\n<li>Omit the second argument, <code>start</code>, to use a default value of <code>1</code>.</li>\n<li>Omit the third argument, <code>step</code>, to use a default value of <code>2</code>.</li>\n</ul>\n<pre><code class=\"language-py\">from math import floor, log\n\ndef geometric_progression(end, start=1, step=2):\n  return [start * step ** i for i in range(floor(log(end / start)\n          / log(step)) + 1)]\n</code></pre>\n<pre><code class=\"language-py\">geometric_progression(256) # [1, 2, 4, 8, 16, 32, 64, 128, 256]\ngeometric_progression(256, 3) # [3, 6, 12, 24, 48, 96, 192]\ngeometric_progression(256, 1, 4) # [1, 4, 16, 64, 256]\n</code></pre>\n<hr>\n<hr>\n<h3>Retrieves the value of the nested key indicated by the given selector list from a dictionary or list.</h3>\n<ul>\n<li>Use <code>functools.reduce()</code> to iterate over the <code>selectors</code> list.</li>\n<li>Apply <code>operator.getitem()</code> for each key in <code>selectors</code>, retrieving the value to be used as the iteratee for the next iteration.</li>\n</ul>\n<pre><code class=\"language-py\">from functools import reduce\nfrom operator import getitem\n\ndef get(d, selectors):\n  return reduce(getitem, selectors, d)\n</code></pre>\n<pre><code class=\"language-py\">users = {\n  'freddy': {\n    'name': {\n      'first': 'fred',\n      'last': 'smith'\n    },\n    'postIds': [1, 2, 3]\n  }\n}\nget(users, ['freddy', 'name', 'last']) # 'smith'\nget(users, ['freddy', 'postIds', 1]) # 2\n</code></pre>\n<hr>\n<hr>\n<h3>Groups the elements of a list based on the given function.</h3>\n<ul>\n<li>Use <code>collections.defaultdict</code> to initialize a dictionary.</li>\n<li>Use <code>fn</code> in combination with a <code>for</code> loop and <code>dict.append()</code> to populate the dictionary.</li>\n<li>Use <code>dict()</code> to convert it to a regular dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import defaultdict\n\ndef group_by(lst, fn):\n  d = defaultdict(list)\n  for el in lst:\n    d[fn(el)].append(el)\n  return dict(d)\n</code></pre>\n<pre><code class=\"language-py\">from math import floor\n\ngroup_by([6.1, 4.2, 6.3], floor) # {4: [4.2], 6: [6.1, 6.3]}\ngroup_by(['one', 'two', 'three'], len) # {3: ['one', 'two'], 5: ['three']}\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the Hamming distance between two values.</h3>\n<ul>\n<li>Use the XOR operator (<code>^</code>) to find the bit difference between the two numbers.</li>\n<li>Use <code>bin()</code> to convert the result to a binary string.</li>\n<li>Convert the string to a list and use <code>count()</code> of <code>str</code> class to count and return the number of <code>1</code>s in it.</li>\n</ul>\n<pre><code class=\"language-py\">def hamming_distance(a, b):\n  return bin(a ^ b).count('1')\n</code></pre>\n<pre><code class=\"language-py\">hamming_distance(2, 3) # 1\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if there are duplicate values in a flat list.</h3>\n<ul>\n<li>Use <code>set()</code> on the given list to remove duplicates, compare its length with the length of the list.</li>\n</ul>\n<pre><code class=\"language-py\">def has_duplicates(lst):\n  return len(lst) != len(set(lst))\n</code></pre>\n<pre><code class=\"language-py\">x = [1, 2, 3, 4, 5, 5]\ny = [1, 2, 3, 4, 5]\nhas_duplicates(x) # True\nhas_duplicates(y) # False\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if two lists contain the same elements regardless of order.</h3>\n<ul>\n<li>Use <code>set()</code> on the combination of both lists to find the unique values.</li>\n<li>Iterate over them with a <code>for</code> loop comparing the <code>count()</code> of each unique value in each list.</li>\n<li>Return <code>False</code> if the counts do not match for any element, <code>True</code> otherwise.</li>\n</ul>\n<pre><code class=\"language-py\">def have_same_contents(a, b):\n  for v in set(a + b):\n    if a.count(v) != b.count(v):\n      return False\n  return True\n</code></pre>\n<pre><code class=\"language-py\">have_same_contents([1, 2, 4], [2, 4, 1]) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the head of a list.</h3>\n<ul>\n<li>Use <code>lst[0]</code> to return the first element of the passed list.</li>\n</ul>\n<pre><code class=\"language-py\">def head(lst):\n  return lst[0]\n</code></pre>\n<pre><code class=\"language-py\">head([1, 2, 3]) # 1\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a hexadecimal color code to a tuple of integers corresponding to its RGB components.</h3>\n<ul>\n<li>Use a list comprehension in combination with <code>int()</code> and list slice notation to get the RGB components from the hexadecimal string.</li>\n<li>Use <code>tuple()</code> to convert the resulting list to a tuple.</li>\n</ul>\n<pre><code class=\"language-py\">def hex_to_rgb(hex):\n  return tuple(int(hex[i:i+2], 16) for i in (0, 2, 4))\n</code></pre>\n<pre><code class=\"language-py\">hex_to_rgb('FFA501') # (255, 165, 1)\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the given number falls within the given range.</h3>\n<ul>\n<li>Use arithmetic comparison to check if the given number is in the specified range.</li>\n<li>If the second parameter, <code>end</code>, is not specified, the range is considered to be from <code>0</code> to <code>start</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def in_range(n, start, end = 0):\n  return start &#x3C;= n &#x3C;= end if end >= start else end &#x3C;= n &#x3C;= start\n</code></pre>\n<pre><code class=\"language-py\">in_range(3, 2, 5) # True\nin_range(3, 4) # True\nin_range(2, 3, 5) # False\nin_range(3, 2) # False\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if all the elements in <code>values</code> are included in <code>lst</code>.</h3>\n<ul>\n<li>Check if every value in <code>values</code> is contained in <code>lst</code> using a <code>for</code> loop.</li>\n<li>Return <code>False</code> if any one value is not found, <code>True</code> otherwise.</li>\n</ul>\n<pre><code class=\"language-py\">def includes_all(lst, values):\n  for v in values:\n    if v not in lst:\n      return False\n  return True\n</code></pre>\n<pre><code class=\"language-py\">includes_all([1, 2, 3, 4], [1, 4]) # True\nincludes_all([1, 2, 3, 4], [1, 5]) # False\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if any element in <code>values</code> is included in <code>lst</code>.</h3>\n<ul>\n<li>Check if any value in <code>values</code> is contained in <code>lst</code> using a <code>for</code> loop.</li>\n<li>Return <code>True</code> if any one value is found, <code>False</code> otherwise.</li>\n</ul>\n<pre><code class=\"language-py\">def includes_any(lst, values):\n  for v in values:\n    if v in lst:\n      return True\n  return False\n</code></pre>\n<pre><code class=\"language-py\">includes_any([1, 2, 3, 4], [2, 9]) # True\nincludes_any([1, 2, 3, 4], [8, 9]) # False\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list of indexes of all the occurrences of an element in a list.</h3>\n<ul>\n<li>Use <code>enumerate()</code> and a list comprehension to check each element for equality with <code>value</code> and adding <code>i</code> to the result.</li>\n</ul>\n<pre><code class=\"language-py\">def index_of_all(lst, value):\n  return [i for i, x in enumerate(lst) if x == value]\n</code></pre>\n<pre><code class=\"language-py\">index_of_all([1, 2, 1, 4, 5, 1], 1) # [0, 2, 5]\nindex_of_all([1, 2, 3, 4], 6) # []\n</code></pre>\n<hr>\n<hr>\n<h3>Returns all the elements of a list except the last one.</h3>\n<ul>\n<li>Use <code>lst[:-1]</code> to return all but the last element of the list.</li>\n</ul>\n<pre><code class=\"language-py\">def initial(lst):\n  return lst[:-1]\n</code></pre>\n<pre><code class=\"language-py\">initial([1, 2, 3]) # [1, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Initializes a 2D list of given width and height and value.</h3>\n<ul>\n<li>Use a list comprehension and <code>range()</code> to generate <code>h</code> rows where each is a list with length <code>h</code>, initialized with <code>val</code>.</li>\n<li>Omit the last argument, <code>val</code>, to set the default value to <code>None</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def initialize_2d_list(w, h, val = None):\n  return [[val for x in range(w)] for y in range(h)]\n</code></pre>\n<pre><code class=\"language-py\">initialize_2d_list(2, 2, 0) # [[0, 0], [0, 0]]\n</code></pre>\n<hr>\n<hr>\n<h3>Initializes a list containing the numbers in the specified range where <code>start</code> and <code>end</code> are inclusive with their common difference <code>step</code>.</h3>\n<ul>\n<li>Use <code>list()</code> and <code>range()</code> to generate a list of the appropriate length, filled with the desired values in the given range.</li>\n<li>Omit <code>start</code> to use the default value of <code>0</code>.</li>\n<li>Omit <code>step</code> to use the default value of <code>1</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def initialize_list_with_range(end, start = 0, step = 1):\n  return list(range(start, end + 1, step))\n</code></pre>\n<pre><code class=\"language-py\">initialize_list_with_range(5) # [0, 1, 2, 3, 4, 5]\ninitialize_list_with_range(7, 3) # [3, 4, 5, 6, 7]\ninitialize_list_with_range(9, 0, 2) # [0, 2, 4, 6, 8]\n</code></pre>\n<hr>\n<hr>\n<h3>Initializes and fills a list with the specified value.</h3>\n<ul>\n<li>Use a list comprehension and <code>range()</code> to generate a list of length equal to <code>n</code>, filled with the desired values.</li>\n<li>Omit <code>val</code> to use the default value of <code>0</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def initialize_list_with_values(n, val = 0):\n  return [val for x in range(n)]\n</code></pre>\n<pre><code class=\"language-py\">initialize_list_with_values(5, 2) # [2, 2, 2, 2, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list of elements that exist in both lists.</h3>\n<ul>\n<li>Create a <code>set</code> from <code>a</code> and <code>b</code>.</li>\n<li>Use the built-in set operator <code>&#x26;</code> to only keep values contained in both sets, then transform the <code>set</code> back into a <code>list</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def intersection(a, b):\n  _a, _b = set(a), set(b)\n  return list(_a &#x26; _b)\n</code></pre>\n<pre><code class=\"language-py\">intersection([1, 2, 3], [4, 3, 2]) # [2, 3]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list of elements that exist in both lists, after applying the provided function to each list element of both.</h3>\n<ul>\n<li>Create a <code>set</code>, using <code>map()</code> to apply <code>fn</code> to each element in <code>b</code>.</li>\n<li>Use a list comprehension in combination with <code>fn</code> on <code>a</code> to only keep values contained in both lists.</li>\n</ul>\n<pre><code class=\"language-py\">def intersection_by(a, b, fn):\n  _b = set(map(fn, b))\n  return [item for item in a if fn(item) in _b]\n</code></pre>\n<pre><code class=\"language-py\">from math import floor\n\nintersection_by([2.1, 1.2], [2.3, 3.4], floor) # [2.1]\n</code></pre>\n<hr>\n<hr>\n<h3>Inverts a dictionary with unique hashable values.</h3>\n<ul>\n<li>Use <code>dictionary.items()</code> in combination with a list comprehension to create a new dictionary with the values and keys inverted.</li>\n</ul>\n<pre><code class=\"language-py\">def invert_dictionary(obj):\n  return { value: key for key, value in obj.items() }\n</code></pre>\n<pre><code class=\"language-py\">ages = {\n  'Peter': 10,\n  'Isabel': 11,\n  'Anna': 9,\n}\ninvert_dictionary(ages) # { 10: 'Peter', 11: 'Isabel', 9: 'Anna' }\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters).</h3>\n<ul>\n<li>Use <code>str.isalnum()</code> to filter out non-alphanumeric characters, <code>str.lower()</code> to transform each character to lowercase.</li>\n<li>Use <code>collections.Counter</code> to count the resulting characters for each string and compare the results.</li>\n</ul>\n<pre><code class=\"language-py\">from collections import Counter\n\ndef is_anagram(s1, s2):\n  return Counter(\n    c.lower() for c in s1 if c.isalnum()\n  ) == Counter(\n    c.lower() for c in s2 if c.isalnum()\n  )\n</code></pre>\n<pre><code class=\"language-py\">is_anagram('#anagram', 'Nag a ram!')  # True\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the elements of the first list are contained in the second one regardless of order.</h3>\n<ul>\n<li>Use <code>count()</code> to check if any value in <code>a</code> has more occurrences than it has in <code>b</code>.</li>\n<li>Return <code>False</code> if any such value is found, <code>True</code> otherwise.</li>\n</ul>\n<pre><code class=\"language-py\">def is_contained_in(a, b):\n  for v in set(a):\n    if a.count(v) > b.count(v):\n      return False\n  return True\n</code></pre>\n<pre><code class=\"language-py\">is_contained_in([1, 4], [2, 4, 1]) # True\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Checks if the first numeric argument is divisible by the second one.</p>\n<ul>\n<li>Use the modulo operator (<code>%</code>) to check if the remainder is equal to <code>0</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def is_divisible(dividend, divisor):\n  return dividend % divisor == 0\n</code></pre>\n<pre><code class=\"language-py\">is_divisible(6, 3) # True\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Checks if the given number is even.</p>\n<ul>\n<li>Check whether a number is odd or even using the modulo (<code>%</code>) operator.</li>\n<li>Return <code>True</code> if the number is even, <code>False</code> if the number is odd.</li>\n</ul>\n<pre><code class=\"language-py\">def is_even(num):\n  return num % 2 == 0\n</code></pre>\n<pre><code class=\"language-py\">is_even(3) # False\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Checks if the given number is odd.</p>\n<ul>\n<li>Checks whether a number is even or odd using the modulo (<code>%</code>) operator.</li>\n<li>Returns <code>True</code> if the number is odd, <code>False</code> if the number is even.</li>\n</ul>\n<pre><code class=\"language-py\">def is_odd(num):\n  return num % 2 != 0\n</code></pre>\n<pre><code class=\"language-py\">is_odd(3) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the provided integer is a prime number.</h3>\n<ul>\n<li>Return <code>False</code> if the number is <code>0</code>, <code>1</code>, a negative number or a multiple of <code>2</code>.</li>\n<li>Use <code>all()</code> and <code>range()</code> to check numbers from <code>3</code> to the square root of the given number.</li>\n<li>Return <code>True</code> if none divides the given number, <code>False</code> otherwise.</li>\n</ul>\n<pre><code class=\"language-py\">from math import sqrt\n\ndef is_prime(n):\n  if n &#x3C;= 1 or (n % 2 == 0 and n > 2):\n    return False\n  return all(n % i for i in range(3, int(sqrt(n)) + 1, 2))\n</code></pre>\n<pre><code class=\"language-py\">is_prime(11) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the given date is a weekday.</h3>\n<ul>\n<li>Use <code>datetime.datetime.weekday()</code> to get the day of the week as an integer.</li>\n<li>Check if the day of the week is less than or equal to <code>4</code>.</li>\n<li>Omit the second argument, <code>d</code>, to use a default value of <code>datetime.today()</code>.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import datetime\n\ndef is_weekday(d = datetime.today()):\n  return d.weekday() &#x3C;= 4\n</code></pre>\n<pre><code class=\"language-py\">from datetime import date\n\nis_weekday(date(2020, 10, 25)) # False\nis_weekday(date(2020, 10, 28)) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the given date is a weekend.</h3>\n<ul>\n<li>Use <code>datetime.datetime.weekday()</code> to get the day of the week as an integer.</li>\n<li>Check if the day of the week is greater than <code>4</code>.</li>\n<li>Omit the second argument, <code>d</code>, to use a default value of <code>datetime.today()</code>.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import datetime\n\ndef is_weekend(d = datetime.today()):\n  return d.weekday() > 4\n</code></pre>\n<pre><code class=\"language-py\">from datetime import date\n\nis_weekend(date(2020, 10, 25)) # True\nis_weekend(date(2020, 10, 28)) # False\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a string to kebab case.</h3>\n<ul>\n<li>Use <code>re.sub()</code> to replace any <code>-</code> or <code>_</code> with a space, using the regexp <code>r\"(_|-)+\"</code>.</li>\n<li>Use <code>re.sub()</code> to match all words in the string, <code>str.lower()</code> to lowercase them.</li>\n<li>Finally, use <code>str.join()</code> to combine all word using <code>-</code> as the separator.</li>\n</ul>\n<pre><code class=\"language-py\">from re import sub\n\ndef kebab(s):\n  return '-'.join(\n    sub(r\"(\\s|_|-)+\",\" \",\n    sub(r\"[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+\",\n    lambda mo: ' ' + mo.group(0).lower(), s)).split())\n</code></pre>\n<pre><code class=\"language-py\">kebab('camelCase') # 'camel-case'\nkebab('some text') # 'some-text'\nkebab('some-mixed_string With spaces_underscores-and-hyphens')\n# 'some-mixed-string-with-spaces-underscores-and-hyphens'\nkebab('AllThe-small Things') # 'all-the-small-things'\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the given key exists in a dictionary.</h3>\n<ul>\n<li>Use the <code>in</code> operator to check if <code>d</code> contains <code>key</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def key_in_dict(d, key):\n  return (key in d)\n</code></pre>\n<pre><code class=\"language-py\">d = {'one': 1, 'three': 3, 'five': 5, 'two': 2, 'four': 4}\nkey_in_dict(d, 'three') # True\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the key of the maximum value in a dictionary.</h3>\n<ul>\n<li>Use <code>max()</code> with the <code>key</code> parameter set to <code>dict.get()</code> to find and return the key of the maximum value in the given dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">def key_of_max(d):\n  return max(d, key = d.get)\n</code></pre>\n<pre><code class=\"language-py\">key_of_max({'a':4, 'b':0, 'c':13}) # c\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the key of the minimum value in a dictionary.</h3>\n<ul>\n<li>Use <code>min()</code> with the <code>key</code> parameter set to <code>dict.get()</code> to find and return the key of the minimum value in the given dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">def key_of_min(d):\n  return min(d, key = d.get)\n</code></pre>\n<pre><code class=\"language-py\">key_of_min({'a':4, 'b':0, 'c':13}) # b\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a flat list of all the keys in a flat dictionary.</h3>\n<ul>\n<li>Use <code>dict.keys()</code> to return the keys in the given dictionary.</li>\n<li>Return a <code>list()</code> of the previous result.</li>\n</ul>\n<pre><code class=\"language-py\">def keys_only(flat_dict):\n  return list(flat_dict.keys())\n</code></pre>\n<pre><code class=\"language-py\">ages = {\n  'Peter': 10,\n  'Isabel': 11,\n  'Anna': 9,\n}\nkeys_only(ages) # ['Peter', 'Isabel', 'Anna']\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Converts kilometers to miles.</p>\n<ul>\n<li>Follows the conversion formula <code>mi = km * 0.621371</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def km_to_miles(km):\n  return km * 0.621371\n</code></pre>\n<pre><code class=\"language-py\">km_to_miles(8.1) # 5.0331051\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the last element in a list.</h3>\n<ul>\n<li>Use <code>lst[-1]</code> to return the last element of the passed list.</li>\n</ul>\n<pre><code class=\"language-py\">def last(lst):\n  return lst[-1]\n</code></pre>\n<pre><code class=\"language-py\">last([1, 2, 3]) # 3\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the least common multiple of a list of numbers.</h3>\n<ul>\n<li>Use <code>functools.reduce()</code>, <code>math.gcd()</code> and <code>lcm(x,y) = x * y / gcd(x,y)</code> over the given list.</li>\n</ul>\n<pre><code class=\"language-py\">from functools import reduce\nfrom math import gcd\n\ndef lcm(numbers):\n  return reduce((lambda x, y: int(x * y / gcd(x, y))), numbers)\n</code></pre>\n<pre><code class=\"language-py\">lcm([12, 7]) # 84\nlcm([1, 3, 4, 5]) # 60\n</code></pre>\n<hr>\n<hr>\n<h3>Takes any number of iterable objects or objects with a length property and returns the longest one.</h3>\n<ul>\n<li>Use <code>max()</code> with <code>len()</code> as the <code>key</code> to return the item with the greatest length.</li>\n<li>If multiple objects have the same length, the first one will be returned.</li>\n</ul>\n<pre><code class=\"language-py\">def longest_item(*args):\n  return max(args, key = len)\n</code></pre>\n<pre><code class=\"language-py\">longest_item('this', 'is', 'a', 'testcase') # 'testcase'\nlongest_item([1, 2, 3], [1, 2], [1, 2, 3, 4, 5]) # [1, 2, 3, 4, 5]\nlongest_item([1, 2, 3], 'foobar') # 'foobar'\n</code></pre>\n<hr>\n<hr>\n<h3>Maps the values of a list to a dictionary using a function, where the key-value pairs consist of the original value as the key and the result of the function as the value.</h3>\n<ul>\n<li>Use <code>map()</code> to apply <code>fn</code> to each value of the list.</li>\n<li>Use <code>zip()</code> to pair original values to the values produced by <code>fn</code>.</li>\n<li>Use <code>dict()</code> to return an appropriate dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">def map_dictionary(itr, fn):\n  return dict(zip(itr, map(fn, itr)))\n</code></pre>\n<pre><code class=\"language-py\">map_dictionary([1, 2, 3], lambda x: x * x) # { 1: 1, 2: 4, 3: 9 }\n</code></pre>\n<hr>\n<hr>\n<h3>Creates a dictionary with the same keys as the provided dictionary and values generated by running the provided function for each value.</h3>\n<ul>\n<li>Use <code>dict.items()</code> to iterate over the dictionary, assigning the values produced by <code>fn</code> to each key of a new dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">def map_values(obj, fn):\n  return dict((k, fn(v)) for k, v in obj.items())\n</code></pre>\n<pre><code class=\"language-py\">users = {\n  'fred': { 'user': 'fred', 'age': 40 },\n  'pebbles': { 'user': 'pebbles', 'age': 1 }\n}\nmap_values(users, lambda u : u['age']) # {'fred': 40, 'pebbles': 1}\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the maximum value of a list, after mapping each element to a value using the provided function.</h3>\n<ul>\n<li>Use <code>map()</code> with <code>fn</code> to map each element to a value using the provided function.</li>\n<li>Use <code>max()</code> to return the maximum value.</li>\n</ul>\n<pre><code class=\"language-py\">def max_by(lst, fn):\n  return max(map(fn, lst))\n</code></pre>\n<pre><code class=\"language-py\">max_by([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], lambda v : v['n']) # 8\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the index of the element with the maximum value in a list.</h3>\n<ul>\n<li>Use <code>max()</code> and <code>list.index()</code> to get the maximum value in the list and return its index.</li>\n</ul>\n<pre><code class=\"language-py\">def max_element_index(arr):\n  return arr.index(max(arr))\n</code></pre>\n<pre><code class=\"language-py\">max_element_index([5, 8, 9, 7, 10, 3, 0]) # 4\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the <code>n</code> maximum elements from the provided list.</h3>\n<ul>\n<li>Use <code>sorted()</code> to sort the list.</li>\n<li>Use slice notation to get the specified number of elements.</li>\n<li>Omit the second argument, <code>n</code>, to get a one-element list.</li>\n<li>If <code>n</code> is greater than or equal to the provided list's length, then return the original list (sorted in descending order).</li>\n</ul>\n<pre><code class=\"language-py\">def max_n(lst, n = 1):\n  return sorted(lst, reverse = True)[:n]\n</code></pre>\n<pre><code class=\"language-py\">max_n([1, 2, 3]) # [3]\nmax_n([1, 2, 3], 2) # [3, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Finds the median of a list of numbers.</h3>\n<ul>\n<li>Sort the numbers of the list using <code>list.sort()</code>.</li>\n<li>Find the median, which is either the middle element of the list if the list length is odd or the average of the two middle elements if the list length is even.</li>\n<li><a href=\"https://docs.python.org/3/library/statistics.html#statistics.median\"><code>statistics.median()</code></a> provides similar functionality to this snippet.</li>\n</ul>\n<pre><code class=\"language-py\">def median(list):\n  list.sort()\n  list_length = len(list)\n  if list_length % 2 == 0:\n    return (list[int(list_length / 2) - 1] + list[int(list_length / 2)]) / 2\n  return float(list[int(list_length / 2)])\n</code></pre>\n<pre><code class=\"language-py\">median([1, 2, 3]) # 2.0\nmedian([1, 2, 3, 4]) # 2.5\n</code></pre>\n<hr>\n<hr>\n<h3>Merges two or more lists into a list of lists, combining elements from each of the input lists based on their positions.</h3>\n<ul>\n<li>Use <code>max()</code> combined with a list comprehension to get the length of the longest list in the arguments.</li>\n<li>Use <code>range()</code> in combination with the <code>max_length</code> variable to loop as many times as there are elements in the longest list.</li>\n<li>If a list is shorter than <code>max_length</code>, use <code>fill_value</code> for the remaining items (defaults to <code>None</code>).</li>\n<li><a href=\"https://docs.python.org/3/library/functions.html#zip\"><code>zip()</code></a> and <a href=\"https://docs.python.org/3/library/itertools.html#itertools.zip_longest\"><code>itertools.zip_longest()</code></a> provide similar functionality to this snippet.</li>\n</ul>\n<pre><code class=\"language-py\">def merge(*args, fill_value = None):\n  max_length = max([len(lst) for lst in args])\n  result = []\n  for i in range(max_length):\n    result.append([\n      args[k][i] if i &#x3C; len(args[k]) else fill_value for k in range(len(args))\n    ])\n  return result\n</code></pre>\n<pre><code class=\"language-py\">merge(['a', 'b'], [1, 2], [True, False]) # [['a', 1, True], ['b', 2, False]]\nmerge(['a'], [1, 2], [True, False]) # [['a', 1, True], [None, 2, False]]\nmerge(['a'], [1, 2], [True, False], fill_value = '_')\n# [['a', 1, True], ['_', 2, False]]\n</code></pre>\n<hr>\n<hr>\n<h3>Merges two or more dictionaries.</h3>\n<ul>\n<li>Create a new <code>dict</code> and loop over <code>dicts</code>, using <code>dictionary.update()</code> to add the key-value pairs from each one to the result.</li>\n</ul>\n<pre><code class=\"language-py\">def merge_dictionaries(*dicts):\n  res = dict()\n  for d in dicts:\n    res.update(d)\n  return res\n</code></pre>\n<pre><code class=\"language-py\">ages_one = {\n  'Peter': 10,\n  'Isabel': 11,\n}\nages_two = {\n  'Anna': 9\n}\nmerge_dictionaries(ages_one, ages_two)\n# { 'Peter': 10, 'Isabel': 11, 'Anna': 9 }\n</code></pre>\n<hr>\n<h2>unlisted: true</h2>\n<p>Converts miles to kilometers.</p>\n<ul>\n<li>Follows the conversion formula <code>km = mi * 1.609344</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def miles_to_km(miles):\n  return miles * 1.609344\n</code></pre>\n<pre><code class=\"language-py\">miles_to_km(5.03) # 8.09500032\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the minimum value of a list, after mapping each element to a value using the provided function.</h3>\n<ul>\n<li>Use <code>map()</code> with <code>fn</code> to map each element to a value using the provided function.</li>\n<li>Use <code>min()</code> to return the minimum value.</li>\n</ul>\n<pre><code class=\"language-py\">def min_by(lst, fn):\n  return min(map(fn, lst))\n</code></pre>\n<pre><code class=\"language-py\">min_by([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], lambda v : v['n']) # 2\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the index of the element with the minimum value in a list.</h3>\n<ul>\n<li>Use <code>min()</code> and <code>list.index()</code> to obtain the minimum value in the list and then return its index.</li>\n</ul>\n<pre><code class=\"language-py\">def min_element_index(arr):\n  return arr.index(min(arr))\n</code></pre>\n<pre><code class=\"language-py\">min_element_index([3, 5, 2, 6, 10, 7, 9]) # 2\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the <code>n</code> minimum elements from the provided list.</h3>\n<ul>\n<li>Use <code>sorted()</code> to sort the list.</li>\n<li>Use slice notation to get the specified number of elements.</li>\n<li>Omit the second argument, <code>n</code>, to get a one-element list.</li>\n<li>If <code>n</code> is greater than or equal to the provided list's length, then return the original list (sorted in ascending order).</li>\n</ul>\n<pre><code class=\"language-py\">def min_n(lst, n = 1):\n  return sorted(lst, reverse = False)[:n]\n</code></pre>\n<pre><code class=\"language-py\">min_n([1, 2, 3]) # [1]\nmin_n([1, 2, 3], 2) # [1, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the month difference between two dates.</h3>\n<ul>\n<li>Subtract <code>start</code> from <code>end</code> and use <code>datetime.timedelta.days</code> to get the day difference.</li>\n<li>Divide by <code>30</code> and use <code>math.ceil()</code> to get the difference in months (rounded up).</li>\n</ul>\n<pre><code class=\"language-py\">from math import ceil\n\ndef months_diff(start, end):\n  return ceil((end - start).days / 30)\n</code></pre>\n<pre><code class=\"language-py\">from datetime import date\n\nmonths_diff(date(2020, 10, 28), date(2020, 11, 25)) # 1\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the most frequent element in a list.</h3>\n<ul>\n<li>Use <code>set()</code> to get the unique values in <code>lst</code>.</li>\n<li>Use <code>max()</code> to find the element that has the most appearances.</li>\n</ul>\n<pre><code class=\"language-py\">def most_frequent(lst):\n  return max(set(lst), key = lst.count)\n</code></pre>\n<pre><code class=\"language-py\">most_frequent([1, 2, 1, 2, 3, 2, 1, 4, 2]) #2\n</code></pre>\n<hr>\n<hr>\n<h3>Generates a string with the given string value repeated <code>n</code> number of times.</h3>\n<ul>\n<li>Repeat the string <code>n</code> times, using the <code>*</code> operator.</li>\n</ul>\n<pre><code class=\"language-py\">def n_times_string(s, n):\n  return (s * n)\n</code></pre>\n<pre><code class=\"language-py\">n_times_string('py', 4) #'pypypypy'\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the provided function returns <code>True</code> for at least one element in the list.</h3>\n<ul>\n<li>Use <code>all()</code> and <code>fn</code> to check if <code>fn</code> returns <code>False</code> for all the elements in the list.</li>\n</ul>\n<pre><code class=\"language-py\">def none(lst, fn = lambda x: x):\n  return all(not fn(x) for x in lst)\n</code></pre>\n<pre><code class=\"language-py\">none([0, 1, 2, 0], lambda x: x >= 2 ) # False\nnone([0, 0, 0]) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Maps a number from one range to another range.</h3>\n<ul>\n<li>Return <code>num</code> mapped between <code>outMin</code>-<code>outMax</code> from <code>inMin</code>-<code>inMax</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def num_to_range(num, inMin, inMax, outMin, outMax):\n  return outMin + (float(num - inMin) / float(inMax - inMin) * (outMax\n                  - outMin))\n</code></pre>\n<pre><code class=\"language-py\">num_to_range(5, 0, 10, 0, 100) # 50.0\n</code></pre>\n<hr>\n<hr>\n<h3>Moves the specified amount of elements to the end of the list.</h3>\n<ul>\n<li>Use slice notation to get the two slices of the list and combine them before returning.</li>\n</ul>\n<pre><code class=\"language-py\">def offset(lst, offset):\n  return lst[offset:] + lst[:offset]\n</code></pre>\n<pre><code class=\"language-py\">offset([1, 2, 3, 4, 5], 2) # [3, 4, 5, 1, 2]\noffset([1, 2, 3, 4, 5], -2) # [4, 5, 1, 2, 3]\n</code></pre>\n<hr>\n<hr>\n<h3>Pads a string on both sides with the specified character, if it's shorter than the specified length.</h3>\n<ul>\n<li>Use <code>str.ljust()</code> and <code>str.rjust()</code> to pad both sides of the given string.</li>\n<li>Omit the third argument, <code>char</code>, to use the whitespace character as the default padding character.</li>\n</ul>\n<pre><code class=\"language-py\">from math import floor\n\ndef pad(s, length, char = ' '):\n  return s.rjust(floor((len(s) + length)/2), char).ljust(length, char)\n</code></pre>\n<pre><code class=\"language-py\">pad('cat', 8) # '  cat   '\npad('42', 6, '0') # '004200'\npad('foobar', 3) # 'foobar'\n</code></pre>\n<hr>\n<hr>\n<h3>Pads a given number to the specified length.</h3>\n<ul>\n<li>Use <code>str.zfill()</code> to pad the number to the specified length, after converting it to a string.</li>\n</ul>\n<pre><code class=\"language-py\">def pad_number(n, l):\n  return str(n).zfill(l)\n</code></pre>\n<pre><code class=\"language-py\">pad_number(1234, 6); # '001234'\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the given string is a palindrome.</h3>\n<ul>\n<li>Use <code>str.lower()</code> and <code>re.sub()</code> to convert to lowercase and remove non-alphanumeric characters from the given string.</li>\n<li>Then, compare the new string with its reverse, using slice notation.</li>\n</ul>\n<pre><code class=\"language-py\">from re import sub\n\ndef palindrome(s):\n  s = sub('[\\W_]', '', s.lower())\n  return s == s[::-1]\n</code></pre>\n<pre><code class=\"language-py\">palindrome('taco cat') # True\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a list of dictionaries into a list of values corresponding to the specified <code>key</code>.</h3>\n<ul>\n<li>Use a list comprehension and <code>dict.get()</code> to get the value of <code>key</code> for each dictionary in <code>lst</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def pluck(lst, key):\n  return [x.get(key) for x in lst]\n</code></pre>\n<pre><code class=\"language-py\">simpsons = [\n  { 'name': 'lisa', 'age': 8 },\n  { 'name': 'homer', 'age': 36 },\n  { 'name': 'marge', 'age': 34 },\n  { 'name': 'bart', 'age': 10 }\n]\npluck(simpsons, 'age') # [8, 36, 34, 10]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the powerset of a given iterable.</h3>\n<ul>\n<li>Use <code>list()</code> to convert the given value to a list.</li>\n<li>Use <code>range()</code> and <code>itertools.combinations()</code> to create a generator that returns all subsets.</li>\n<li>Use <code>itertools.chain.from_iterable()</code> and <code>list()</code> to consume the generator and return a list.</li>\n</ul>\n<pre><code class=\"language-py\">from itertools import chain, combinations\n\ndef powerset(iterable):\n  s = list(iterable)\n  return list(chain.from_iterable(combinations(s, r) for r in range(len(s)+1)))\n</code></pre>\n<pre><code class=\"language-py\">powerset([1, 2]) # [(), (1,), (2,), (1, 2)]\n</code></pre>\n<hr>\n<hr>\n<h3>Converts an angle from radians to degrees.</h3>\n<ul>\n<li>Use <code>math.pi</code> and the radian to degree formula to convert the angle from radians to degrees.</li>\n</ul>\n<pre><code class=\"language-py\">from math import pi\n\ndef rads_to_degrees(rad):\n  return (rad * 180.0) / pi\n</code></pre>\n<pre><code class=\"language-py\">from math import pi\n\nrads_to_degrees(pi / 2) # 90.0\n</code></pre>\n<hr>\n<hr>\n<h3>Reverses a list or a string.</h3>\n<ul>\n<li>Use slice notation to reverse the list or string.</li>\n</ul>\n<pre><code class=\"language-py\">def reverse(itr):\n  return itr[::-1]\n</code></pre>\n<pre><code class=\"language-py\">reverse([1, 2, 3]) # [3, 2, 1]\nreverse('snippet') # 'teppins'\n</code></pre>\n<hr>\n<hr>\n<h3>Reverses a number.</h3>\n<ul>\n<li>Use <code>str()</code> to convert the number to a string, slice notation to reverse it and <code>str.replace()</code> to remove the sign.</li>\n<li>Use <code>float()</code> to convert the result to a number and <code>math.copysign()</code> to copy the original sign.</li>\n</ul>\n<pre><code class=\"language-py\">from math import copysign\n\ndef reverse_number(n):\n  return copysign(float(str(n)[::-1].replace('-', '')), n)\n</code></pre>\n<pre><code class=\"language-py\">reverse_number(981) # 189\nreverse_number(-500) # -5\nreverse_number(73.6) # 6.37\nreverse_number(-5.23) # -32.5\n</code></pre>\n<hr>\n<hr>\n<h3>Converts the values of RGB components to a hexadecimal color code.</h3>\n<ul>\n<li>Create a placeholder for a zero-padded hexadecimal value using <code>'{:02X}'</code> and copy it three times.</li>\n<li>Use <code>str.format()</code> on the resulting string to replace the placeholders with the given values.</li>\n</ul>\n<pre><code class=\"language-py\">def rgb_to_hex(r, g, b):\n  return ('{:02X}' * 3).format(r, g, b)\n</code></pre>\n<pre><code class=\"language-py\">rgb_to_hex(255, 165, 1) # 'FFA501'\n</code></pre>\n<hr>\n<hr>\n<h3>Moves the specified amount of elements to the start of the list.</h3>\n<ul>\n<li>Use slice notation to get the two slices of the list and combine them before returning.</li>\n</ul>\n<pre><code class=\"language-py\">def roll(lst, offset):\n  return lst[-offset:] + lst[:-offset]\n</code></pre>\n<pre><code class=\"language-py\">roll([1, 2, 3, 4, 5], 2) # [4, 5, 1, 2, 3]\nroll([1, 2, 3, 4, 5], -2) # [3, 4, 5, 1, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a random element from a list.</h3>\n<ul>\n<li>Use <code>random.choice()</code> to get a random element from <code>lst</code>.</li>\n</ul>\n<pre><code class=\"language-py\">from random import choice\n\ndef sample(lst):\n  return choice(lst)\n</code></pre>\n<pre><code class=\"language-py\">sample([3, 7, 9, 11]) # 9\n</code></pre>\n<hr>\n<hr>\n<h3>Randomizes the order of the values of an list, returning a new list.</h3>\n<ul>\n<li>Uses the <a href=\"https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle\">Fisher-Yates algorithm</a> to reorder the elements of the list.</li>\n<li><a href=\"https://docs.python.org/3/library/random.html#random.shuffle\"><code>random.shuffle</code></a> provides similar functionality to this snippet.</li>\n</ul>\n<pre><code class=\"language-py\">from copy import deepcopy\nfrom random import randint\n\ndef shuffle(lst):\n  temp_lst = deepcopy(lst)\n  m = len(temp_lst)\n  while (m):\n    m -= 1\n    i = randint(0, m)\n    temp_lst[m], temp_lst[i] = temp_lst[i], temp_lst[m]\n  return temp_lst\n</code></pre>\n<pre><code class=\"language-py\">foo = [1, 2, 3]\nshuffle(foo) # [2, 3, 1], foo = [1, 2, 3]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list of elements that exist in both lists.</h3>\n<ul>\n<li>Use a list comprehension on <code>a</code> to only keep values contained in both lists.</li>\n</ul>\n<pre><code class=\"language-py\">def similarity(a, b):\n  return [item for item in a if item in b]\n</code></pre>\n<pre><code class=\"language-py\">similarity([1, 2, 3], [1, 2, 4]) # [1, 2]\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a string to a URL-friendly slug.</h3>\n<ul>\n<li>Use <code>str.lower()</code> and <code>str.strip()</code> to normalize the input string.</li>\n<li>Use <code>re.sub()</code> to to replace spaces, dashes and underscores with <code>-</code> and remove special characters.</li>\n</ul>\n<pre><code class=\"language-py\">import re\n\ndef slugify(s):\n  s = s.lower().strip()\n  s = re.sub(r'[^\\w\\s-]', '', s)\n  s = re.sub(r'[\\s_-]+', '-', s)\n  s = re.sub(r'^-+|-+$', '', s)\n  return s\n</code></pre>\n<pre><code class=\"language-py\">slugify('Hello World!') # 'hello-world'\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a string to snake case.</h3>\n<ul>\n<li>Use <code>re.sub()</code> to match all words in the string, <code>str.lower()</code> to lowercase them.</li>\n<li>Use <code>re.sub()</code> to replace any <code>-</code> characters with spaces.</li>\n<li>Finally, use <code>str.join()</code> to combine all words using <code>-</code> as the separator.</li>\n</ul>\n<pre><code class=\"language-py\">from re import sub\n\ndef snake(s):\n  return '_'.join(\n    sub('([A-Z][a-z]+)', r' \\1',\n    sub('([A-Z]+)', r' \\1',\n    s.replace('-', ' '))).split()).lower()\n</code></pre>\n<pre><code class=\"language-py\">snake('camelCase') # 'camel_case'\nsnake('some text') # 'some_text'\nsnake('some-mixed_string With spaces_underscores-and-hyphens')\n# 'some_mixed_string_with_spaces_underscores_and_hyphens'\nsnake('AllThe-small Things') # 'all_the_small_things'\n</code></pre>\n<hr>\n<hr>\n<h3>Checks if the provided function returns <code>True</code> for at least one element in the list.</h3>\n<ul>\n<li>Use <code>any()</code> in combination with <code>map()</code> to check if <code>fn</code> returns <code>True</code> for any element in the list.</li>\n</ul>\n<pre><code class=\"language-py\">def some(lst, fn = lambda x: x):\n  return any(map(fn, lst))\n</code></pre>\n<pre><code class=\"language-py\">some([0, 1, 2, 0], lambda x: x >= 2 ) # True\nsome([0, 0, 1, 0]) # True\n</code></pre>\n<hr>\n<hr>\n<h3>Sorts one list based on another list containing the desired indexes.</h3>\n<ul>\n<li>Use <code>zip()</code> and <code>sorted()</code> to combine and sort the two lists, based on the values of <code>indexes</code>.</li>\n<li>Use a list comprehension to get the first element of each pair from the result.</li>\n<li>Use the <code>reverse</code> parameter in <code>sorted()</code> to sort the dictionary in reverse order, based on the third argument.</li>\n</ul>\n<pre><code class=\"language-py\">def sort_by_indexes(lst, indexes, reverse=False):\n  return [val for (_, val) in sorted(zip(indexes, lst), key=lambda x: \\\n          x[0], reverse=reverse)]\n</code></pre>\n<pre><code class=\"language-py\">a = ['eggs', 'bread', 'oranges', 'jam', 'apples', 'milk']\nb = [3, 2, 6, 4, 1, 5]\nsort_by_indexes(a, b) # ['apples', 'bread', 'eggs', 'jam', 'milk', 'oranges']\nsort_by_indexes(a, b, True)\n# ['oranges', 'milk', 'jam', 'eggs', 'bread', 'apples']\n</code></pre>\n<hr>\n<hr>\n<h3>Sorts the given dictionary by key.</h3>\n<ul>\n<li>Use <code>dict.items()</code> to get a list of tuple pairs from <code>d</code> and sort it using <code>sorted()</code>.</li>\n<li>Use <code>dict()</code> to convert the sorted list back to a dictionary.</li>\n<li>Use the <code>reverse</code> parameter in <code>sorted()</code> to sort the dictionary in reverse order, based on the second argument.</li>\n</ul>\n<pre><code class=\"language-py\">def sort_dict_by_key(d, reverse = False):\n  return dict(sorted(d.items(), reverse = reverse))\n</code></pre>\n<pre><code class=\"language-py\">d = {'one': 1, 'three': 3, 'five': 5, 'two': 2, 'four': 4}\nsort_dict_by_key(d) # {'five': 5, 'four': 4, 'one': 1, 'three': 3, 'two': 2}\nsort_dict_by_key(d, True)\n# {'two': 2, 'three': 3, 'one': 1, 'four': 4, 'five': 5}\n</code></pre>\n<hr>\n<hr>\n<h3>Sorts the given dictionary by value.</h3>\n<ul>\n<li>Use <code>dict.items()</code> to get a list of tuple pairs from <code>d</code> and sort it using a lambda function and <code>sorted()</code>.</li>\n<li>Use <code>dict()</code> to convert the sorted list back to a dictionary.</li>\n<li>Use the <code>reverse</code> parameter in <code>sorted()</code> to sort the dictionary in reverse order, based on the second argument.</li>\n<li><strong>⚠️ NOTICE:</strong> Dictionary values must be of the same type.</li>\n</ul>\n<pre><code class=\"language-py\">def sort_dict_by_value(d, reverse = False):\n  return dict(sorted(d.items(), key = lambda x: x[1], reverse = reverse))\n</code></pre>\n<pre><code class=\"language-py\">d = {'one': 1, 'three': 3, 'five': 5, 'two': 2, 'four': 4}\nsort_dict_by_value(d) # {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5}\nsort_dict_by_value(d, True)\n# {'five': 5, 'four': 4, 'three': 3, 'two': 2, 'one': 1}\n</code></pre>\n<hr>\n<hr>\n<h3>Splits a multiline string into a list of lines.</h3>\n<ul>\n<li>Use <code>str.split()</code> and <code>'\\n'</code> to match line breaks and create a list.</li>\n<li><a href=\"https://docs.python.org/3/library/stdtypes.html#str.splitlines\"><code>str.splitlines()</code></a> provides similar functionality to this snippet.</li>\n</ul>\n<pre><code class=\"language-py\">def split_lines(s):\n  return s.split('\\n')\n</code></pre>\n<pre><code class=\"language-py\">split_lines('This\\nis a\\nmultiline\\nstring.\\n')\n# ['This', 'is a', 'multiline', 'string.' , '']\n</code></pre>\n<hr>\n<hr>\n<h3>Flattens a list, by spreading its elements into a new list.</h3>\n<ul>\n<li>Loop over elements, use <code>list.extend()</code> if the element is a list, <code>list.append()</code> otherwise.</li>\n</ul>\n<pre><code class=\"language-py\">def spread(arg):\n  ret = []\n  for i in arg:\n    ret.extend(i) if isinstance(i, list) else ret.append(i)\n  return ret\n</code></pre>\n<pre><code class=\"language-py\">spread([1, 2, 3, [4, 5, 6], [7], 8, 9]) # [1, 2, 3, 4, 5, 6, 7, 8, 9]\n</code></pre>\n<hr>\n<hr>\n<h3>Calculates the sum of a list, after mapping each element to a value using the provided function.</h3>\n<ul>\n<li>Use <code>map()</code> with <code>fn</code> to map each element to a value using the provided function.</li>\n<li>Use <code>sum()</code> to return the sum of the values.</li>\n</ul>\n<pre><code class=\"language-py\">def sum_by(lst, fn):\n  return sum(map(fn, lst))\n</code></pre>\n<pre><code class=\"language-py\">sum_by([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], lambda v : v['n']) # 20\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the sum of the powers of all the numbers from <code>start</code> to <code>end</code> (both inclusive).</h3>\n<ul>\n<li>Use <code>range()</code> in combination with a list comprehension to create a list of elements in the desired range raised to the given <code>power</code>.</li>\n<li>Use <code>sum()</code> to add the values together.</li>\n<li>Omit the second argument, <code>power</code>, to use a default power of <code>2</code>.</li>\n<li>Omit the third argument, <code>start</code>, to use a default starting value of <code>1</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def sum_of_powers(end, power = 2, start = 1):\n  return sum([(i) ** power for i in range(start, end + 1)])\n</code></pre>\n<pre><code class=\"language-py\">sum_of_powers(10) # 385\nsum_of_powers(10, 3) # 3025\nsum_of_powers(10, 3, 5) # 2925\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the symmetric difference between two iterables, without filtering out duplicate values.</h3>\n<ul>\n<li>Create a <code>set</code> from each list.</li>\n<li>Use a list comprehension on each of them to only keep values not contained in the previously created set of the other.</li>\n</ul>\n<pre><code class=\"language-py\">def symmetric_difference(a, b):\n  (_a, _b) = (set(a), set(b))\n  return [item for item in a if item not in _b] + [item for item in b\n          if item not in _a]\n</code></pre>\n<pre><code class=\"language-py\">symmetric_difference([1, 2, 3], [1, 2, 4]) # [3, 4]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the symmetric difference between two lists, after applying the provided function to each list element of both.</h3>\n<ul>\n<li>Create a <code>set</code> by applying <code>fn</code> to each element in every list.</li>\n<li>Use a list comprehension in combination with <code>fn</code> on each of them to only keep values not contained in the previously created set of the other.</li>\n</ul>\n<pre><code class=\"language-py\">def symmetric_difference_by(a, b, fn):\n  (_a, _b) = (set(map(fn, a)), set(map(fn, b)))\n  return [item for item in a if fn(item) not in _b] + [item\n          for item in b if fn(item) not in _a]\n</code></pre>\n<pre><code class=\"language-py\">from math import floor\n\nsymmetric_difference_by([2.1, 1.2], [2.3, 3.4], floor) # [1.2, 3.4]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns all elements in a list except for the first one.</h3>\n<ul>\n<li>Use slice notation to return the last element if the list's length is more than <code>1</code>.</li>\n<li>Otherwise, return the whole list.</li>\n</ul>\n<pre><code class=\"language-py\">def tail(lst):\n  return lst[1:] if len(lst) > 1 else lst\n</code></pre>\n<pre><code class=\"language-py\">tail([1, 2, 3]) # [2, 3]\ntail([1]) # [1]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list with <code>n</code> elements removed from the beginning.</h3>\n<ul>\n<li>Use slice notation to create a slice of the list with <code>n</code> elements taken from the beginning.</li>\n</ul>\n<pre><code class=\"language-py\">def take(itr, n = 1):\n  return itr[:n]\n</code></pre>\n<pre><code class=\"language-py\">take([1, 2, 3], 5) # [1, 2, 3]\ntake([1, 2, 3], 0) # []\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a list with <code>n</code> elements removed from the end.</h3>\n<ul>\n<li>Use slice notation to create a slice of the list with <code>n</code> elements taken from the end.</li>\n</ul>\n<pre><code class=\"language-py\">def take_right(itr, n = 1):\n  return itr[-n:]\n</code></pre>\n<pre><code class=\"language-py\">take_right([1, 2, 3], 2) # [2, 3]\ntake_right([1, 2, 3]) # [3]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the binary representation of the given number.</h3>\n<ul>\n<li>Use <code>bin()</code> to convert a given decimal number into its binary equivalent.</li>\n</ul>\n<pre><code class=\"language-py\">def to_binary(n):\n  return bin(n)\n</code></pre>\n<pre><code class=\"language-py\">to_binary(100) # 0b1100100\n</code></pre>\n<hr>\n<hr>\n<h3>Combines two lists into a dictionary, where the elements of the first one serve as the keys and the elements of the second one serve as the values.</h3>\n<p>The values of the first list need to be unique and hashable.</p>\n<ul>\n<li>Use <code>zip()</code> in combination with <code>dict()</code> to combine the values of the two lists into a dictionary.</li>\n</ul>\n<pre><code class=\"language-py\">def to_dictionary(keys, values):\n  return dict(zip(keys, values))\n</code></pre>\n<pre><code class=\"language-py\">to_dictionary(['a', 'b'], [1, 2]) # { a: 1, b: 2 }\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the hexadecimal representation of the given number.</h3>\n<ul>\n<li>Use <code>hex()</code> to convert a given decimal number into its hexadecimal equivalent.</li>\n</ul>\n<pre><code class=\"language-py\">def to_hex(dec):\n  return hex(dec)\n</code></pre>\n<pre><code class=\"language-py\">to_hex(41) # 0x29\nto_hex(332) # 0x14c\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a date to its ISO-8601 representation.</h3>\n<ul>\n<li>Use <code>datetime.datetime.isoformat()</code> to convert the given <code>datetime.datetime</code> object to an ISO-8601 date.</li>\n</ul>\n<pre><code class=\"language-py\">from datetime import datetime\n\ndef to_iso_date(d):\n  return d.isoformat()\n</code></pre>\n<pre><code class=\"language-py\">from datetime import datetime\n\nto_iso_date(datetime(2020, 10, 25)) # 2020-10-25T00:00:00\n</code></pre>\n<hr>\n<hr>\n<h3>Converts an integer to its roman numeral representation.</h3>\n<p>Accepts value between <code>1</code> and <code>3999</code> (both inclusive).</p>\n<ul>\n<li>Create a lookup list containing tuples in the form of (roman value, integer).</li>\n<li>Use a <code>for</code> loop to iterate over the values in <code>lookup</code>.</li>\n<li>Use <code>divmod()</code> to update <code>num</code> with the remainder, adding the roman numeral representation to the result.</li>\n</ul>\n<pre><code class=\"language-py\">def to_roman_numeral(num):\n  lookup = [\n    (1000, 'M'),\n    (900, 'CM'),\n    (500, 'D'),\n    (400, 'CD'),\n    (100, 'C'),\n    (90, 'XC'),\n    (50, 'L'),\n    (40, 'XL'),\n    (10, 'X'),\n    (9, 'IX'),\n    (5, 'V'),\n    (4, 'IV'),\n    (1, 'I'),\n  ]\n  res = ''\n  for (n, roman) in lookup:\n    (d, num) = divmod(num, n)\n    res += roman * d\n  return res\n</code></pre>\n<pre><code class=\"language-py\">to_roman_numeral(3) # 'III'\nto_roman_numeral(11) # 'XI'\nto_roman_numeral(1998) # 'MCMXCVIII'\n</code></pre>\n<hr>\n<hr>\n<h3>Transposes a two-dimensional list.</h3>\n<ul>\n<li>Use <code>*lst</code> to get the provided list as tuples.</li>\n<li>Use <code>zip()</code> in combination with <code>list()</code> to create the transpose of the given two-dimensional list.</li>\n</ul>\n<pre><code class=\"language-py\">def transpose(lst):\n  return list(zip(*lst))\n</code></pre>\n<pre><code class=\"language-py\">transpose([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]])\n# [(1, 4, 7, 10), (2, 5, 8, 11), (3, 6, 9, 12)]\n</code></pre>\n<hr>\n<hr>\n<h3>Builds a list, using an iterator function and an initial seed value.</h3>\n<ul>\n<li>The iterator function accepts one argument (<code>seed</code>) and must always return a list with two elements ([<code>value</code>, <code>nextSeed</code>]) or <code>False</code> to terminate.</li>\n<li>Use a generator function, <code>fn_generator</code>, that uses a <code>while</code> loop to call the iterator function and <code>yield</code> the <code>value</code> until it returns <code>False</code>.</li>\n<li>Use a list comprehension to return the list that is produced by the generator, using the iterator function.</li>\n</ul>\n<pre><code class=\"language-py\">def unfold(fn, seed):\n  def fn_generator(val):\n    while True:\n      val = fn(val[1])\n      if val == False: break\n      yield val[0]\n  return [i for i in fn_generator([None, seed])]\n</code></pre>\n<pre><code class=\"language-py\">f = lambda n: False if n > 50 else [-n, n + 10]\nunfold(f, 10) # [-10, -20, -30, -40, -50]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns every element that exists in any of the two lists once.</h3>\n<ul>\n<li>Create a <code>set</code> with all values of <code>a</code> and <code>b</code> and convert to a <code>list</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def union(a, b):\n  return list(set(a + b))\n</code></pre>\n<pre><code class=\"language-py\">union([1, 2, 3], [4, 3, 2]) # [1, 2, 3, 4]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns every element that exists in any of the two lists once, after applying the provided function to each element of both.</h3>\n<ul>\n<li>Create a <code>set</code> by applying <code>fn</code> to each element in <code>a</code>.</li>\n<li>Use a list comprehension in combination with <code>fn</code> on <code>b</code> to only keep values not contained in the previously created set, <code>_a</code>.</li>\n<li>Finally, create a <code>set</code> from the previous result and <code>a</code> and transform it into a <code>list</code></li>\n</ul>\n<pre><code class=\"language-py\">def union_by(a, b, fn):\n  _a = set(map(fn, a))\n  return list(set(a + [item for item in b if fn(item) not in _a]))\n</code></pre>\n<pre><code class=\"language-py\">from math import floor\n\nunion_by([2.1], [1.2, 2.3], floor) # [2.1, 1.2]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the unique elements in a given list.</h3>\n<ul>\n<li>Create a <code>set</code> from the list to discard duplicated values, then return a <code>list</code> from it.</li>\n</ul>\n<pre><code class=\"language-py\">def unique_elements(li):\n  return list(set(li))\n</code></pre>\n<pre><code class=\"language-py\">unique_elements([1, 2, 2, 3, 4, 3]) # [1, 2, 3, 4]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns a flat list of all the values in a flat dictionary.</h3>\n<ul>\n<li>Use <code>dict.values()</code> to return the values in the given dictionary.</li>\n<li>Return a <code>list()</code> of the previous result.</li>\n</ul>\n<pre><code class=\"language-py\">def values_only(flat_dict):\n  return list(flat_dict.values())\n</code></pre>\n<pre><code class=\"language-py\">ages = {\n  'Peter': 10,\n  'Isabel': 11,\n  'Anna': 9,\n}\nvalues_only(ages) # [10, 11, 9]\n</code></pre>\n<hr>\n<hr>\n<h3>Returns the weighted average of two or more numbers.</h3>\n<ul>\n<li>Use <code>sum()</code> to sum the products of the numbers by their weight and to sum the weights.</li>\n<li>Use <code>zip()</code> and a list comprehension to iterate over the pairs of values and weights.</li>\n</ul>\n<pre><code class=\"language-py\">def weighted_average(nums, weights):\n  return sum(x * y for x, y in zip(nums, weights)) / sum(weights)\n</code></pre>\n<pre><code class=\"language-py\">weighted_average([1, 2, 3], [0.6, 0.2, 0.3]) # 1.72727\n</code></pre>\n<hr>\n<hr>\n<h3>Tests a value, <code>x</code>, against a testing function, conditionally applying a function.</h3>\n<ul>\n<li>Check if the value of <code>predicate(x)</code> is <code>True</code> and if so return <code>when_true(x)</code>, otherwise return <code>x</code>.</li>\n</ul>\n<pre><code class=\"language-py\">def when(predicate, when_true):\n  return lambda x: when_true(x) if predicate(x) else x\n</code></pre>\n<pre><code class=\"language-py\">double_even_numbers = when(lambda x: x % 2 == 0, lambda x : x * 2)\ndouble_even_numbers(2) # 4\ndouble_even_numbers(1) # 1\n</code></pre>\n<hr>\n<hr>\n<h3>Converts a given string into a list of words.</h3>\n<ul>\n<li>Use <code>re.findall()</code> with the supplied <code>pattern</code> to find all matching substrings.</li>\n<li>Omit the second argument to use the default regexp, which matches alphanumeric and hyphens.</li>\n</ul>\n<pre><code class=\"language-py\">import re\n\ndef words(s, pattern = '[a-zA-Z-]+'):\n  return re.findall(pattern, s)\n</code></pre>\n<pre><code class=\"language-py\">words('I love Python!!') # ['I', 'love', 'Python']\nwords('python, javaScript &#x26; coffee') # ['python', 'javaScript', 'coffee']\nwords('build -q --out one-item', r'\\b[a-zA-Z-]+\\b')\n# ['build', 'q', 'out', 'one-item']\n</code></pre>"},{"url":"/docs/python/cheat-sheet/","relativePath":"docs/python/cheat-sheet.md","relativeDir":"docs/python","base":"cheat-sheet.md","name":"cheat-sheet","frontmatter":{"title":"Python Cheat Sheet","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"python cheat sheet","description":"cheat sheet for python developers","robots":[],"extra":[{"name":"og:image","value":"images/py-code.png","keyName":"property","relativeUrl":true},{"name":"twitter:title","value":"python cheat sheet","keyName":"name","relativeUrl":false}]},"template":"docs"},"html":"<h2>Lorem ipsum</h2>\n<h1>Python Cheat Sheet</h1>\n<h2>Python Basics</h2>\n<h3>Math Operators</h3>\n<p>From <strong>Highest</strong> to <strong>Lowest</strong> precedence:</p>\n<table>\n<thead>\n<tr>\n<th>Operators</th>\n<th>Operation</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>**</td>\n<td>Exponent</td>\n<td><code>2 ** 3 = 8</code></td>\n</tr>\n<tr>\n<td>%</td>\n<td>Modulus/Remaider</td>\n<td><code>22 % 8 = 6</code></td>\n</tr>\n<tr>\n<td>//</td>\n<td>Integer division</td>\n<td><code>22 // 8 = 2</code></td>\n</tr>\n<tr>\n<td>/</td>\n<td>Division</td>\n<td><code>22 / 8 = 2.75</code></td>\n</tr>\n<tr>\n<td>*</td>\n<td>Multiplication</td>\n<td><code>3 * 3 = 9</code></td>\n</tr>\n<tr>\n<td>-</td>\n<td>Subtraction</td>\n<td><code>5 - 2 = 3</code></td>\n</tr>\n<tr>\n<td>+</td>\n<td>Addition</td>\n<td><code>2 + 2 = 4</code></td>\n</tr>\n</tbody>\n</table>\n<p>Examples of expressions in the interactive shell:</p>\n<pre><code class=\"language-python\">2 + 3 * 6\n</code></pre>\n<pre><code class=\"language-python\">(2 + 3) * 6\n</code></pre>\n<pre><code class=\"language-python\">2 ** 8\n</code></pre>\n<pre><code class=\"language-python\">23 // 7\n</code></pre>\n<pre><code class=\"language-python\">23 % 7\n</code></pre>\n<pre><code class=\"language-python\">(5 - 1) * ((7 + 1) / (3 - 1))\n</code></pre>\n<h3>Data Types</h3>\n<table>\n<thead>\n<tr>\n<th>Data Type</th>\n<th>Examples</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Integers</td>\n<td><code>-2, -1, 0, 1, 2, 3, 4, 5</code></td>\n</tr>\n<tr>\n<td>Floating-point numbers</td>\n<td><code>-1.25, -1.0, --0.5, 0.0, 0.5, 1.0, 1.25</code></td>\n</tr>\n<tr>\n<td>Strings</td>\n<td><code>'a', 'aa', 'aaa', 'Hello!', '11 cats'</code></td>\n</tr>\n</tbody>\n</table>\n<h3>String Concatenation and Replication</h3>\n<p>String concatenation:</p>\n<pre><code class=\"language-python\">'Alice' 'Bob'\n</code></pre>\n<p>Note: Avoid <code>+</code> operator for string concatenation. Prefer string formatting.</p>\n<p>String Replication:</p>\n<pre><code class=\"language-python\">'Alice' * 5\n</code></pre>\n<h3>Variables</h3>\n<p>You can name a variable anything as long as it obeys the following three rules:</p>\n<ol>\n<li>It can be only one word.</li>\n<li>It can use only letters, numbers, and the underscore (<code>_</code>) character.</li>\n<li>It can't begin with a number.</li>\n<li>Variable name starting with an underscore (<code>_</code>) are considered as \"unuseful`.</li>\n</ol>\n<p>Example:</p>\n<pre><code class=\"language-python\">spam = 'Hello'\n</code></pre>\n<pre><code class=\"language-python\">_spam = 'Hello'\n</code></pre>\n<p><code>_spam</code> should not be used again in the code.</p>\n<h3>Comments</h3>\n<p>Inline comment:</p>\n<pre><code class=\"language-python\"># This is a comment\n</code></pre>\n<p>Multiline comment:</p>\n<pre><code class=\"language-Python\"># This is a\n# multiline comment\n</code></pre>\n<p>Code with a comment:</p>\n<pre><code class=\"language-python\">a = 1  # initialization\n</code></pre>\n<p>Please note the two spaces in front of the comment.</p>\n<p>Function docstring:</p>\n<pre><code class=\"language-python\">def foo():\n    \"\"\"\n    This is a function docstring\n    You can also use:\n    ''' Function Docstring '''\n    \"\"\"\n</code></pre>\n<h3>The print Function</h3>\n<pre><code class=\"language-python\">print('Hello world!')\n</code></pre>\n<pre><code class=\"language-python\">a = 1\nprint('Hello world!', a)\n</code></pre>\n<h3>The input Function</h3>\n<p>Example Code:</p>\n<pre><code class=\"language-python\">print('What is your name?')   # ask for their name\nmyName = input()\nprint('It is good to meet you, {}'.format(myName))\n</code></pre>\n<h3>The len Function</h3>\n<p>Evaluates to the integer value of the number of characters in a string:</p>\n<pre><code class=\"language-python\">len('hello')\n</code></pre>\n<p>Note: test of emptiness of strings, lists, dictionary, etc, should <strong>not</strong> use len, but prefer direct\nboolean evaluation.</p>\n<pre><code class=\"language-python\">a = [1, 2, 3]\nif a:\n    print(\"the list is not empty!\")\n</code></pre>\n<h3>The str, int, and float Functions</h3>\n<p>Integer to String or Float:</p>\n<pre><code class=\"language-python\">str(29)\n</code></pre>\n<pre><code class=\"language-python\">print('I am {} years old.'.format(str(29)))\n</code></pre>\n<pre><code class=\"language-python\">str(-3.14)\n</code></pre>\n<p>Float to Integer:</p>\n<pre><code class=\"language-python\">int(7.7)\n</code></pre>\n<pre><code class=\"language-python\">int(7.7) + 1\n</code></pre>\n<h2>Flow Control</h2>\n<h3>Comparison Operators</h3>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>==</code></td>\n<td>Equal to</td>\n</tr>\n<tr>\n<td><code>!=</code></td>\n<td>Not equal to</td>\n</tr>\n<tr>\n<td><code>&#x3C;</code></td>\n<td>Less than</td>\n</tr>\n<tr>\n<td><code>></code></td>\n<td>Greater Than</td>\n</tr>\n<tr>\n<td><code>&#x3C;=</code></td>\n<td>Less than or Equal to</td>\n</tr>\n<tr>\n<td><code>>=</code></td>\n<td>Greater than or Equal to</td>\n</tr>\n</tbody>\n</table>\n<p>These operators evaluate to True or False depending on the values you give them.</p>\n<p>Examples:</p>\n<pre><code class=\"language-python\">42 == 42\n</code></pre>\n<pre><code class=\"language-python\">40 == 42\n</code></pre>\n<pre><code class=\"language-python\">'hello' == 'hello'\n</code></pre>\n<pre><code class=\"language-python\">'hello' == 'Hello'\n</code></pre>\n<pre><code class=\"language-python\">'dog' != 'cat'\n</code></pre>\n<pre><code class=\"language-python\">42 == 42.0\n</code></pre>\n<pre><code class=\"language-python\">42 == '42'\n</code></pre>\n<h3>Boolean evaluation</h3>\n<p>Never use <code>==</code> or <code>!=</code> operator to evaluate boolean operation. Use the <code>is</code> or <code>is not</code> operators,\nor use implicit boolean evaluation.</p>\n<p>NO (even if they are valid Python):</p>\n<pre><code class=\"language-python\">True == True\n</code></pre>\n<pre><code class=\"language-python\">True != False\n</code></pre>\n<p>YES (even if they are valid Python):</p>\n<pre><code class=\"language-python\">True is True\n</code></pre>\n<pre><code class=\"language-python\">True is not False\n</code></pre>\n<p>These statements are equivalent:</p>\n<pre><code class=\"language-Python\">if a is True:\n   pass\nif a is not False:\n   pass\nif a:\n   pass\n</code></pre>\n<p>And these as well:</p>\n<pre><code class=\"language-Python\">if a is False:\n   pass\nif a is not True:\n   pass\nif not a:\n   pass\n</code></pre>\n<h3>Boolean Operators</h3>\n<p>There are three Boolean operators: and, or, and not.</p>\n<p>The <em>and</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>True and True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>True and False</td>\n<td>False</td>\n</tr>\n<tr>\n<td>False and True</td>\n<td>False</td>\n</tr>\n<tr>\n<td>False and False</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n<p>The <em>or</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>True or True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>True or False</td>\n<td>True</td>\n</tr>\n<tr>\n<td>False or True</td>\n<td>True</td>\n</tr>\n<tr>\n<td>False or False</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n<p>The <em>not</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>not True</td>\n<td>False</td>\n</tr>\n<tr>\n<td>not False</td>\n<td>True</td>\n</tr>\n</tbody>\n</table>\n<h3>Mixing Boolean and Comparison Operators</h3>\n<pre><code class=\"language-python\">(4 &#x3C; 5) and (5 &#x3C; 6)\n</code></pre>\n<pre><code class=\"language-python\">(4 &#x3C; 5) and (9 &#x3C; 6)\n</code></pre>\n<pre><code class=\"language-python\">(1 == 2) or (2 == 2)\n</code></pre>\n<p>You can also use multiple Boolean operators in an expression, along with the comparison operators:</p>\n<pre><code class=\"language-python\">2 + 2 == 4 and not 2 + 2 == 5 and 2 * 2 == 2 + 2\n</code></pre>\n<h3>if Statements</h3>\n<pre><code class=\"language-python\">if name == 'Alice':\n    print('Hi, Alice.')\n</code></pre>\n<h3>else Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelse:\n    print('Hello, stranger.')\n</code></pre>\n<h3>elif Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 5\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\n</code></pre>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 30\n\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\nelse:\n    print('You are neither Alice nor a little kid.')\n</code></pre>\n<h3>while Loop Statements</h3>\n<pre><code class=\"language-python\">spam = 0\n\nwhile spam &#x3C; 5:\n    print('Hello, world.')\n    spam = spam + 1\n</code></pre>\n<h3>break Statements</h3>\n<p>If the execution reaches a break statement, it immediately exits the while loop's clause:</p>\n<pre><code class=\"language-python\">while True:\n    print('Please type your name.')\n    name = input()\n    if name == 'your name':\n        break\n\nprint('Thank you!')\n</code></pre>\n<h3>continue Statements</h3>\n<p>When the program execution reaches a continue statement, the program execution immediately jumps back to the start of the loop.</p>\n<pre><code class=\"language-python\">while True:\n    print('Who are you?')\n    name = input()\n    if name != 'Joe':\n        continue\n    print('Hello, Joe. What is the password? (It is a fish.)')\n    password = input()\n    if password == 'swordfish':\n        break\n\nprint('Access granted.')\n</code></pre>\n<h3>for Loops and the range() Function</h3>\n<pre><code class=\"language-python\">print('My name is')\nfor i in range(5):\n    print('Jimmy Five Times ({})'.format(str(i)))\n</code></pre>\n<p>The <em>range()</em> function can also be called with three arguments. The first two arguments will be the start and stop values, and the third will be the step argument. The step is the amount that the variable is increased by after each iteration.</p>\n<pre><code class=\"language-python\">for i in range(0, 10, 2):\n   print(i)\n</code></pre>\n<p>You can even use a negative number for the step argument to make the for loop count down instead of up.</p>\n<pre><code class=\"language-python\">for i in range(5, -1, -1):\n    print(i)\n</code></pre>\n<h3>For else statement</h3>\n<p>This allows to specify a statement to execute in case of the full loop has been executed. Only\nuseful when a <code>break</code> condition can occur in the loop:</p>\n<pre><code class=\"language-python\">for i in [1, 2, 3, 4, 5]:\n   if i == 3:\n       break\nelse:\n   print(\"only executed when no item of the list is equal to 3\")\n</code></pre>\n<h3>Importing Modules</h3>\n<pre><code class=\"language-python\">import random\n\nfor i in range(5):\n    print(random.randint(1, 10))\n</code></pre>\n<pre><code class=\"language-python\">import random, sys, os, math\n</code></pre>\n<pre><code class=\"language-python\">from random import *.\n</code></pre>\n<h3>Ending a Program with sys.exit</h3>\n<pre><code class=\"language-python\">import sys\n\nwhile True:\n    print('Type exit to exit.')\n    response = input()\n    if response == 'exit':\n        sys.exit()\n    print('You typed {}.'.format(response))\n</code></pre>\n<h2>Functions</h2>\n<pre><code class=\"language-python\">def hello(name):\n    print('Hello {}'.format(name))\n</code></pre>\n<h3>Return Values and return Statements</h3>\n<p>When creating a function using the def statement, you can specify what the return value should be with a return statement. A return statement consists of the following:</p>\n<ul>\n<li>The return keyword.</li>\n<li>The value or expression that the function should return.</li>\n</ul>\n<pre><code class=\"language-python\">import random\ndef getAnswer(answerNumber):\n    if answerNumber == 1:\n        return 'It is certain'\n    elif answerNumber == 2:\n        return 'It is decidedly so'\n    elif answerNumber == 3:\n        return 'Yes'\n    elif answerNumber == 4:\n        return 'Reply hazy try again'\n    elif answerNumber == 5:\n        return 'Ask again later'\n    elif answerNumber == 6:\n        return 'Concentrate and ask again'\n    elif answerNumber == 7:\n        return 'My reply is no'\n    elif answerNumber == 8:\n        return 'Outlook not so good'\n    elif answerNumber == 9:\n        return 'Very doubtful'\n\nr = random.randint(1, 9)\nfortune = getAnswer(r)\nprint(fortune)\n</code></pre>\n<h3>The None Value</h3>\n<pre><code class=\"language-python\">spam = print('Hello!')\nspam is None\n</code></pre>\n<p>Note: never compare to <code>None</code> with the <code>==</code> operator. Always use <code>is</code>.</p>\n<h3>print Keyword Arguments</h3>\n<pre><code class=\"language-python\">print('Hello', end='')\nprint('World')\n</code></pre>\n<pre><code class=\"language-python\">print('cats', 'dogs', 'mice')\n</code></pre>\n<pre><code class=\"language-python\">print('cats', 'dogs', 'mice', sep=',')\n</code></pre>\n<h3>Local and Global Scope</h3>\n<ul>\n<li>Code in the global scope cannot use any local variables.</li>\n<li>However, a local scope can access global variables.</li>\n<li>Code in a function's local scope cannot use variables in any other local scope.</li>\n<li>You can use the same name for different variables if they are in different scopes. That is, there can be a local variable named spam and a global variable also named spam.</li>\n</ul>\n<h3>The global Statement</h3>\n<p>If you need to modify a global variable from within a function, use the global statement:</p>\n<pre><code class=\"language-python\">def spam():\n    global eggs\n    eggs = 'spam'\n\neggs = 'global'\nspam()\nprint(eggs)\n</code></pre>\n<p>There are four rules to tell whether a variable is in a local scope or global scope:</p>\n<ol>\n<li>If a variable is being used in the global scope (that is, outside of all functions), then it is always a global variable.</li>\n<li>If there is a global statement for that variable in a function, it is a global variable.</li>\n<li>Otherwise, if the variable is used in an assignment statement in the function, it is a local variable.</li>\n<li>But if the variable is not used in an assignment statement, it is a global variable.</li>\n</ol>\n<h2>Exception Handling</h2>\n<h3>Basic exception handling</h3>\n<pre><code class=\"language-python\">def spam(divideBy):\n    try:\n        return 42 / divideBy\n    except ZeroDivisionError as e:\n        print('Error: Invalid argument: {}'.format(e))\n\nprint(spam(2))\nprint(spam(12))\nprint(spam(0))\nprint(spam(1))\n</code></pre>\n<h3>Final code in exception handling</h3>\n<p>Code inside the <code>finally</code> section is always executed, no matter if an exception has been raised or\nnot, and even if an exception is not caught.</p>\n<pre><code class=\"language-python\">def spam(divideBy):\n    try:\n        return 42 / divideBy\n    except ZeroDivisionError as e:\n        print('Error: Invalid argument: {}'.format(e))\n    finally:\n        print(\"-- division finished --\")\n\nprint(spam(12))\nprint(spam(0))\n</code></pre>\n<h2>Lists</h2>\n<pre><code class=\"language-python\">['cat', 'bat', 'rat', 'elephant']\n</code></pre>\n<h3>Getting Individual Values in a List with Indexes</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\nspam[0]\n</code></pre>\n<pre><code class=\"language-python\">spam[1]\n</code></pre>\n<pre><code class=\"language-python\">spam[2]\n</code></pre>\n<pre><code class=\"language-python\">spam[3]\n</code></pre>\n<h3>Negative Indexes</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\nspam[-1]\n</code></pre>\n<pre><code class=\"language-python\">spam[-3]\n</code></pre>\n<pre><code class=\"language-python\">'The {} is afraid of the {}.'.format(spam[-1], spam[-3])\n</code></pre>\n<h3>Getting Sublists with Slices</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\nspam[0:4]\n</code></pre>\n<pre><code class=\"language-python\">spam[1:3]\n</code></pre>\n<pre><code class=\"language-python\">spam[0:-1]\n</code></pre>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\nspam[:2]\n</code></pre>\n<pre><code class=\"language-python\">spam[1:]\n</code></pre>\n<pre><code class=\"language-python\">spam[:]\n</code></pre>\n<h3>Getting a list Length with len</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'dog', 'moose']\nlen(spam)\n</code></pre>\n<h3>Changing Values in a List with Indexes</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\nspam[1] = 'aardvark'\nspam\n</code></pre>\n<pre><code class=\"language-python\">spam[2] = spam[1]\nspam\n</code></pre>\n<pre><code class=\"language-python\">spam[-1] = 12345\nspam\n</code></pre>\n<h3>List Concatenation and List Replication</h3>\n<pre><code class=\"language-python\">[1, 2, 3] + ['A', 'B', 'C']\n</code></pre>\n<pre><code class=\"language-python\">['X', 'Y', 'Z'] * 3\n</code></pre>\n<pre><code class=\"language-python\">spam = [1, 2, 3]\nspam = spam + ['A', 'B', 'C']\nspam\n</code></pre>\n<h3>Removing Values from Lists with del Statements</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\ndel spam[2]\nspam\n</code></pre>\n<pre><code class=\"language-python\">del spam[2]\nspam\n</code></pre>\n<h3>Using for Loops with Lists</h3>\n<pre><code class=\"language-python\">supplies = ['pens', 'staplers', 'flame-throwers', 'binders']\n\nfor i, supply in enumerate(supplies):\n    print('Index {} in supplies is: {}'.format(str(i), supply))\n</code></pre>\n<h3>Looping Through Multiple Lists with zip</h3>\n<pre><code class=\"language-python\">name = ['Pete', 'John', 'Elizabeth']\nage = [6, 23, 44]\n\nfor n, a in zip(name, age):\n    print('{} is {} years old'.format(n, a))\n</code></pre>\n<h3>The in and not in Operators</h3>\n<pre><code class=\"language-python\">'howdy' in ['hello', 'hi', 'howdy', 'heyas']\n</code></pre>\n<pre><code class=\"language-python\">spam = ['hello', 'hi', 'howdy', 'heyas']\nFalse\n</code></pre>\n<pre><code class=\"language-python\">'howdy' not in spam\n</code></pre>\n<pre><code class=\"language-python\">'cat' not in spam\n</code></pre>\n<h3>The Multiple Assignment Trick</h3>\n<p>The multiple assignment trick is a shortcut that lets you assign multiple variables with the values in a list in one line of code. So instead of doing this:</p>\n<pre><code class=\"language-python\">cat = ['fat', 'orange', 'loud']\nsize = cat[0]\ncolor = cat[1]\ndisposition = cat[2]\n</code></pre>\n<p>You could type this line of code:</p>\n<pre><code class=\"language-python\">cat = ['fat', 'orange', 'loud']\nsize, color, disposition = cat\n</code></pre>\n<p>The multiple assignment trick can also be used to swap the values in two variables:</p>\n<pre><code class=\"language-python\">a, b = 'Alice', 'Bob'\na, b = b, a\nprint(a)\n</code></pre>\n<pre><code class=\"language-python\">print(b)\n</code></pre>\n<h3>Augmented Assignment Operators</h3>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Equivalent</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>spam += 1</code></td>\n<td><code>spam = spam + 1</code></td>\n</tr>\n<tr>\n<td><code>spam -= 1</code></td>\n<td><code>spam = spam - 1</code></td>\n</tr>\n<tr>\n<td><code>spam *= 1</code></td>\n<td><code>spam = spam * 1</code></td>\n</tr>\n<tr>\n<td><code>spam /= 1</code></td>\n<td><code>spam = spam / 1</code></td>\n</tr>\n<tr>\n<td><code>spam %= 1</code></td>\n<td><code>spam = spam % 1</code></td>\n</tr>\n</tbody>\n</table>\n<p>Examples:</p>\n<pre><code class=\"language-python\">spam = 'Hello'\nspam += ' world!'\nspam\n</code></pre>\n<pre><code class=\"language-python\">bacon = ['Zophie']\nbacon *= 3\nbacon\n</code></pre>\n<h3>Finding a Value in a List with the index Method</h3>\n<pre><code class=\"language-python\">spam = ['Zophie', 'Pooka', 'Fat-tail', 'Pooka']\nspam.index('Pooka')\n</code></pre>\n<h3>Adding Values to Lists with append and insert</h3>\n<p><strong>append()</strong>:</p>\n<pre><code class=\"language-python\">spam = ['cat', 'dog', 'bat']\nspam.append('moose')\nspam\n</code></pre>\n<p><strong>insert()</strong>:</p>\n<pre><code class=\"language-python\">spam = ['cat', 'dog', 'bat']\nspam.insert(1, 'chicken')\nspam\n</code></pre>\n<h3>Removing Values from Lists with remove</h3>\n<pre><code class=\"language-python\">spam = ['cat', 'bat', 'rat', 'elephant']\nspam.remove('bat')\nspam\n</code></pre>\n<p>If the value appears multiple times in the list, only the first instance of the value will be removed.</p>\n<h3>Sorting the Values in a List with sort</h3>\n<pre><code class=\"language-python\">spam = [2, 5, 3.14, 1, -7]\nspam.sort()\nspam\n</code></pre>\n<pre><code class=\"language-python\">spam = ['ants', 'cats', 'dogs', 'badgers', 'elephants']\nspam.sort()\nspam\n</code></pre>\n<p>You can also pass True for the reverse keyword argument to have sort() sort the values in reverse order:</p>\n<pre><code class=\"language-python\">spam.sort(reverse=True)\nspam\n</code></pre>\n<p>If you need to sort the values in regular alphabetical order, pass str. lower for the key keyword argument in the sort() method call:</p>\n<pre><code class=\"language-python\">spam = ['a', 'z', 'A', 'Z']\nspam.sort(key=str.lower)\nspam\n</code></pre>\n<p>You can use the built-in function <code>sorted</code> to return a new list:</p>\n<pre><code class=\"language-python\">spam = ['ants', 'cats', 'dogs', 'badgers', 'elephants']\nsorted(spam)\n</code></pre>\n<h2>Tuple Data Type</h2>\n<pre><code class=\"language-python\">eggs = ('hello', 42, 0.5)\neggs[0]\n</code></pre>\n<pre><code class=\"language-python\">eggs[1:3]\n</code></pre>\n<pre><code class=\"language-python\">len(eggs)\n</code></pre>\n<p>The main way that tuples are different from lists is that tuples, like strings, are immutable.</p>\n<h2>Converting Types with the list and tuple Functions</h2>\n<pre><code class=\"language-python\">tuple(['cat', 'dog', 5])\n</code></pre>\n<pre><code class=\"language-python\">list(('cat', 'dog', 5))\n</code></pre>\n<pre><code class=\"language-python\">list('hello')\n</code></pre>\n<h2>Dictionaries and Structuring Data</h2>\n<p>Example Dictionary:</p>\n<pre><code class=\"language-python\">myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}\n</code></pre>\n<h3>The keys, values, and items Methods</h3>\n<p>values():</p>\n<pre><code class=\"language-python\">spam = {'color': 'red', 'age': 42}\n\nfor v in spam.values():\n    print(v)\n</code></pre>\n<p>keys():</p>\n<pre><code class=\"language-python\">for k in spam.keys():\n    print(k)\n</code></pre>\n<p>items():</p>\n<pre><code class=\"language-python\">for i in spam.items():\n    print(i)\n</code></pre>\n<p>Using the keys(), values(), and items() methods, a for loop can iterate over the keys, values, or key-value pairs in a dictionary, respectively.</p>\n<pre><code class=\"language-python\">spam = {'color': 'red', 'age': 42}\n\nfor k, v in spam.items():\n    print('Key: {} Value: {}'.format(k, str(v)))\n</code></pre>\n<h3>Checking if a Key or Value Exists in a Dictionary</h3>\n<pre><code class=\"language-python\">spam = {'name': 'Zophie', 'age': 7}\n'name' in spam.keys()\n</code></pre>\n<pre><code class=\"language-python\">'Zophie' in spam.values()\n</code></pre>\n<pre><code class=\"language-python\"># You can omit the call to keys() when checking for a key\n'color' in spam\n</code></pre>\n<pre><code class=\"language-python\">'color' not in spam\n</code></pre>\n<pre><code class=\"language-python\">'color' in spam\n</code></pre>\n<h3>The get Method</h3>\n<pre><code class=\"language-python\">picnic_items = {'apples': 5, 'cups': 2}\n'I am bringing {} cups.'.format(str(picnic_items.get('cups', 0)))\n</code></pre>\n<pre><code class=\"language-python\">'I am bringing {} eggs.'.format(str(picnic_items.get('eggs', 0)))\n</code></pre>\n<h3>The setdefault Method</h3>\n<p>Let's consider this code:</p>\n<pre><code class=\"language-python\">spam = {'name': 'Pooka', 'age': 5}\nif 'color' not in spam:\n    spam['color'] = 'black'\n</code></pre>\n<p>Using <code>setdefault</code> we could make the same code more shortly:</p>\n<pre><code class=\"language-python\">spam = {'name': 'Pooka', 'age': 5}\nspam.setdefault('color', 'black')\n</code></pre>\n<pre><code class=\"language-python\">spam\n</code></pre>\n<pre><code class=\"language-python\">spam.setdefault('color', 'white')\n</code></pre>\n<pre><code class=\"language-python\">spam\n</code></pre>\n<h3>Pretty Printing</h3>\n<pre><code class=\"language-python\">import pprint\n\nmessage = 'It was a bright cold day in April, and the clocks were striking thirteen.'\ncount = {}\n\nfor character in message:\n    count.setdefault(character, 0)\n    count[character] = count[character] + 1\n\npprint.pprint(count)\n</code></pre>\n<h3>Merge two dictionaries</h3>\n<pre><code class=\"language-python\"># in Python 3.5+:\nx = {'a': 1, 'b': 2}\ny = {'b': 3, 'c': 4}\nz = {**x, **y}\nz\n</code></pre>\n<h2>sets</h2>\n<p>From the Python 3 <a href=\"https://docs.python.org/3/tutorial/datastructures.html\">documentation</a></p>\n<blockquote>\n<p>A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support mathematical operations like union, intersection, difference, and symmetric difference.</p>\n</blockquote>\n<h3>Initializing a set</h3>\n<p>There are two ways to create sets: using curly braces <code>{}</code> and the bult-in function <code>set()</code></p>\n<pre><code class=\"language-python\">s = {1, 2, 3}\ns = set([1, 2, 3])\n</code></pre>\n<p>When creating an empty set, be sure to not use the curly braces <code>{}</code> or you will get an empty dictionary instead.</p>\n<pre><code class=\"language-python\">s = {}\ntype(s)\n</code></pre>\n<h3>sets: unordered collections of unique elements</h3>\n<p>A set automatically remove all the duplicate values.</p>\n<pre><code class=\"language-python\">s = {1, 2, 3, 2, 3, 4}\ns\n</code></pre>\n<p>And as an unordered data type, they can't be indexed.</p>\n<pre><code class=\"language-python\">s = {1, 2, 3}\ns(0)\n</code></pre>\n<h3>set add and update</h3>\n<p>Using the <code>add()</code> method we can add a single element to the set.</p>\n<pre><code class=\"language-python\">s = {1, 2, 3}\ns.add(4)\ns\n</code></pre>\n<p>And with <code>update()</code>, multiple ones .</p>\n<pre><code class=\"language-python\">s = {1, 2, 3}\ns.update([2, 3, 4, 5, 6])\ns  # remember, sets automatically remove duplicates\n</code></pre>\n<h3>set remove and discard</h3>\n<p>Both methods will remove an element from the set, but <code>remove()</code> will raise a <code>key error</code> if the value doesn't exist.</p>\n<pre><code class=\"language-python\">s = {1, 2, 3}\ns.remove(3)\ns\n</code></pre>\n<pre><code class=\"language-python\">s.remove(3)\n</code></pre>\n<p><code>discard()</code> won't raise any errors.</p>\n<pre><code class=\"language-python\">s = {1, 2, 3}\ns.discard(3)\ns\n</code></pre>\n<pre><code class=\"language-python\">s.discard(3)\n</code></pre>\n<h3>set union</h3>\n<p><code>union()</code> or <code>|</code> will create a new set that contains all the elements from the sets provided.</p>\n<pre><code class=\"language-python\">s1 = {1, 2, 3}\ns2 = {3, 4, 5}\ns1.union(s2)  # or 's1 | s2'\n</code></pre>\n<h3>set intersection</h3>\n<p><code>intersection</code> or <code>&#x26;</code> will return a set containing only the elements that are common to all of them.</p>\n<pre><code class=\"language-python\">s1 = {1, 2, 3}\ns2 = {2, 3, 4}\ns3 = {3, 4, 5}\ns1.intersection(s2, s3)  # or 's1 &#x26; s2 &#x26; s3'\n</code></pre>\n<h3>set difference</h3>\n<p><code>difference</code> or <code>-</code> will return only the elements that are in one of the sets.</p>\n<pre><code class=\"language-python\">s1 = {1, 2, 3}\ns2 = {2, 3, 4}\ns1.difference(s2)  # or 's1 - s2'\n</code></pre>\n<h3>set symetric_difference</h3>\n<p><code>symetric_difference</code> or <code>^</code> will return all the elements that are not common between them.</p>\n<pre><code class=\"language-python\">s1 = {1, 2, 3}\ns2 = {2, 3, 4}\ns1.symmetric_difference(s2)  # or 's1 ^ s2'\n</code></pre>\n<h2>itertools Module</h2>\n<p>The <em>itertools</em> module is a collection of tools intented to be fast and use memory efficiently when handling iterators (like <a href=\"#lists\">lists</a> or <a href=\"#dictionaries-and-structuring-data\">dictionaries</a>).</p>\n<p>From the official <a href=\"https://docs.python.org/3/library/itertools.html\">Python 3.x documentation</a>:</p>\n<blockquote>\n<p>The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an “iterator algebra” making it possible to construct specialized tools succinctly and efficiently in pure Python.</p>\n</blockquote>\n<p>The <em>itertools</em> module comes in the standard library and must be imported.</p>\n<p>The <a href=\"https://docs.python.org/3/library/operator.html\">operator</a> module will also be used. This module is not necessary when using itertools, but needed for some of the examples below.</p>\n<pre><code class=\"language-python\">import itertools\nimport operator\n</code></pre>\n<h3>accumulate</h3>\n<p>Makes an iterator that returns the results of a function.</p>\n<pre><code class=\"language-python\">itertools.accumulate(iterable[, func])\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">data = [1, 2, 3, 4, 5]\nresult = itertools.accumulate(data, operator.mul)\nfor each in result:\n   print(each)\n</code></pre>\n<p>The operator.mul takes two numbers and multiplies them:</p>\n<pre><code class=\"language-python\">operator.mul(1, 2)\n</code></pre>\n<pre><code class=\"language-python\">operator.mul(2, 3)\n</code></pre>\n<pre><code class=\"language-python\">operator.mul(6, 4)\n</code></pre>\n<pre><code class=\"language-python\">operator.mul(24, 5)\n</code></pre>\n<p>Passing a function is optional:</p>\n<pre><code class=\"language-python\">data = [5, 2, 6, 4, 5, 9, 1]\nresult = itertools.accumulate(data)\n\nfor each in result:\n   print(each)\n</code></pre>\n<p>If no function is designated the items will be summed:</p>\n<pre><code class=\"language-python\">5\n5 + 2 = 7\n7 + 6 = 13\n13 + 4 = 17\n17 + 5 = 22\n22 + 9 = 31\n31 + 1 = 32\n</code></pre>\n<h3>combinations</h3>\n<p>Takes an iterable and a integer. This will create all the unique combination that have r members.</p>\n<pre><code class=\"language-python\">itertools.combinations(iterable, r)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">shapes = ['circle', 'triangle', 'square',]\nresult = itertools.combinations(shapes, 2)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>combinations<em>with</em>replacement</h3>\n<p>Just like combinations(), but allows individual elements to be repeated more than once.</p>\n<pre><code class=\"language-python\">itertools.combinations_with_replacement(iterable, r)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">shapes = ['circle', 'triangle', 'square']\nresult = itertools.combinations_with_replacement(shapes, 2)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>count</h3>\n<p>Makes an iterator that returns evenly spaced values starting with number start.</p>\n<pre><code class=\"language-python\">itertools.count(start=0, step=1)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">for i in itertools.count(10,3):\n   print(i)\n   if i > 20:\n       break\n</code></pre>\n<h3>cycle</h3>\n<p>This function cycles through an iterator endlessly.</p>\n<pre><code class=\"language-python\">itertools.cycle(iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">colors = ['red', 'orange', 'yellow', 'green', 'blue', 'violet']\nfor color in itertools.cycle(colors):\n   print(color)\n</code></pre>\n<p>When reached the end of the iterable it start over again from the beginning.</p>\n<h3>chain</h3>\n<p>Take a series of iterables and return them as one long iterable.</p>\n<pre><code class=\"language-python\">itertools.chain(*iterables)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">colors = ['red', 'orange', 'yellow', 'green', 'blue']\nshapes = ['circle', 'triangle', 'square', 'pentagon']\nresult = itertools.chain(colors, shapes)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>compress</h3>\n<p>Filters one iterable with another.</p>\n<pre><code class=\"language-python\">itertools.compress(data, selectors)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">shapes = ['circle', 'triangle', 'square', 'pentagon']\nselections = [True, False, True, False]\nresult = itertools.compress(shapes, selections)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>dropwhile</h3>\n<p>Make an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every element.</p>\n<pre><code class=\"language-python\">itertools.dropwhile(predicate, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]\nresult = itertools.dropwhile(lambda x: x&#x3C;5, data)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>filterfalse</h3>\n<p>Makes an iterator that filters elements from iterable returning only those for which the predicate is False.</p>\n<pre><code class=\"language-python\">itertools.filterfalse(predicate, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nresult = itertools.filterfalse(lambda x: x&#x3C;5, data)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>groupby</h3>\n<p>Simply put, this function groups things together.</p>\n<pre><code class=\"language-python\">itertools.groupby(iterable, key=None)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">robots = [{\n    'name': 'blaster',\n    'faction': 'autobot'\n}, {\n    'name': 'galvatron',\n    'faction': 'decepticon'\n}, {\n    'name': 'jazz',\n    'faction': 'autobot'\n}, {\n    'name': 'metroplex',\n    'faction': 'autobot'\n}, {\n    'name': 'megatron',\n    'faction': 'decepticon'\n}, {\n    'name': 'starcream',\n    'faction': 'decepticon'\n}]\n\nfor key, group in itertools.groupby(robots, key=lambda x: x['faction']):\n   print(key)\n   print(list(group))\n</code></pre>\n<h3>islice</h3>\n<p>This function is very much like slices. This allows you to cut out a piece of an iterable.</p>\n<pre><code class=\"language-python\">itertools.islice(iterable, start, stop[, step])\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">colors = ['red', 'orange', 'yellow', 'green', 'blue',]\nfew_colors = itertools.islice(colors, 2)\n\nfor each in few_colors:\n   print(each)\n</code></pre>\n<h3>permutations</h3>\n<pre><code class=\"language-python\">itertools.permutations(iterable, r=None)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">alpha_data = ['a', 'b', 'c']\nresult = itertools.permutations(alpha_data)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>product</h3>\n<p>Creates the cartesian products from a series of iterables.</p>\n<pre><code class=\"language-python\">num_data = [1, 2, 3]\nalpha_data = ['a', 'b', 'c']\nresult = itertools.product(num_data, alpha_data)\n\nfor each in result:\n    print(each)\n</code></pre>\n<h3>repeat</h3>\n<p>This function will repeat an object over and over again. Unless, there is a times argument.</p>\n<pre><code class=\"language-python\">itertools.repeat(object[, times])\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">for i in itertools.repeat(\"spam\", 3):\n    print(i)\n</code></pre>\n<h3>starmap</h3>\n<p>Makes an iterator that computes the function using arguments obtained from the iterable.</p>\n<pre><code class=\"language-python\">itertools.starmap(function, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">data = [(2, 6), (8, 4), (7, 3)]\nresult = itertools.starmap(operator.mul, data)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>takewhile</h3>\n<p>The opposite of dropwhile(). Makes an iterator and returns elements from the iterable as long as the predicate is true.</p>\n<pre><code class=\"language-python\">itertools.takewhile(predicate, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]\nresult = itertools.takewhile(lambda x: x&#x3C;5, data)\n\nfor each in result:\n   print(each)\n</code></pre>\n<h3>tee</h3>\n<p>Return n independent iterators from a single iterable.</p>\n<pre><code class=\"language-python\">itertools.tee(iterable, n=2)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">colors = ['red', 'orange', 'yellow', 'green', 'blue']\nalpha_colors, beta_colors = itertools.tee(colors)\n\nfor each in alpha_colors:\n   print(each)\n</code></pre>\n<pre><code class=\"language-python\">colors = ['red', 'orange', 'yellow', 'green', 'blue']\nalpha_colors, beta_colors = itertools.tee(colors)\n\nfor each in beta_colors:\n   print(each)\n</code></pre>\n<h3>zip_longest</h3>\n<p>Makes an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, missing values are filled-in with fillvalue. Iteration continues until the longest iterable is exhausted.</p>\n<pre><code class=\"language-python\">itertools.zip_longest(*iterables, fillvalue=None)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">colors = ['red', 'orange', 'yellow', 'green', 'blue',]\ndata = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,]\n\nfor each in itertools.zip_longest(colors, data, fillvalue=None):\n   print(each)\n</code></pre>\n<h2>Comprehensions</h2>\n<h3>List comprehension</h3>\n<pre><code class=\"language-python\">a = [1, 3, 5, 7, 9, 11]\n[i - 1 for i in a]\n</code></pre>\n<h3>Set comprehension</h3>\n<pre><code class=\"language-python\">b = {\"abc\", \"def\"}\n{s.upper() for s in b}\n</code></pre>\n<h3>Dict comprehension</h3>\n<pre><code class=\"language-python\">c = {'name': 'Pooka', 'age': 5}\n{v, k for k, v in c.items()}\n</code></pre>\n<p>A List comprehension can be generated from a dictionary:</p>\n<pre><code class=\"language-python\">c = {'name': 'Pooka', 'first_name': 'Oooka'}\n[\"{}:{}\".format(k.upper(), v.upper()) for k, v in c.items()]\n</code></pre>\n<h2>Manipulating Strings</h2>\n<h3>Escape Characters</h3>\n<table>\n<thead>\n<tr>\n<th>Escape character</th>\n<th>Prints as</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>\\'</code></td>\n<td>Single quote</td>\n</tr>\n<tr>\n<td><code>\\\"</code></td>\n<td>Double quote</td>\n</tr>\n<tr>\n<td><code>\\t</code></td>\n<td>Tab</td>\n</tr>\n<tr>\n<td><code>\\n</code></td>\n<td>Newline (line break)</td>\n</tr>\n<tr>\n<td><code>\\\\</code></td>\n<td>Backslash</td>\n</tr>\n</tbody>\n</table>\n<p>Example:</p>\n<pre><code class=\"language-python\">print(\"Hello there!\\nHow are you?\\nI\\'m doing fine.\")\nHello there!\nHow are you?\n</code></pre>\n<h3>Raw Strings</h3>\n<p>A raw string completely ignores all escape characters and prints any backslash that appears in the string.</p>\n<pre><code class=\"language-python\">print(r'That is Carol\\'s cat.')\n</code></pre>\n<p>Note: mostly used for regular expression definition (see <code>re</code> package)</p>\n<h3>Multiline Strings with Triple Quotes</h3>\n<pre><code class=\"language-python\">print('''Dear Alice,\n\nEve's cat has been arrested for catnapping, cat burglary, and extortion.\n\nSincerely,\nBob''')\n</code></pre>\n<p>To keep a nicer flow in your code, you can use the <code>dedent</code> function from the <code>textwrap</code> standard package.</p>\n<pre><code class=\"language-python\">from textwrap import dedent\n\ndef my_function():\n    print('''\n        Dear Alice,\n\n        Eve's cat has been arrested for catnapping, cat burglary, and extortion.\n\n        Sincerely,\n        Bob\n        ''').strip()\n</code></pre>\n<p>This generates the same string than before.</p>\n<h3>Indexing and Slicing Strings</h3>\n<pre><code>H   e   l   l   o       w   o   r   l   d    !\n0   1   2   3   4   5   6   7   8   9   10   11\n</code></pre>\n<pre><code class=\"language-python\">spam = 'Hello world!'\nspam[0]\n</code></pre>\n<pre><code class=\"language-python\">spam[4]\n</code></pre>\n<pre><code class=\"language-python\">spam[-1]\n</code></pre>\n<p>Slicing:</p>\n<pre><code class=\"language-python\">spam[0:5]\n</code></pre>\n<pre><code class=\"language-python\">spam[:5]\n</code></pre>\n<pre><code class=\"language-python\">spam[6:]\n</code></pre>\n<pre><code class=\"language-python\">spam[6:-1]\n</code></pre>\n<pre><code class=\"language-python\">spam[:-1]\n</code></pre>\n<pre><code class=\"language-python\">spam[::-1]\n</code></pre>\n<pre><code class=\"language-python\">spam = 'Hello world!'\nfizz = spam[0:5]\nfizz\n</code></pre>\n<h3>The in and not in Operators with Strings</h3>\n<pre><code class=\"language-python\">'Hello' in 'Hello World'\n</code></pre>\n<pre><code class=\"language-python\">'Hello' in 'Hello'\n</code></pre>\n<pre><code class=\"language-python\">'HELLO' in 'Hello World'\n</code></pre>\n<pre><code class=\"language-python\">'' in 'spam'\n</code></pre>\n<pre><code class=\"language-python\">'cats' not in 'cats and dogs'\n</code></pre>\n<h3>The in and not in Operators with list</h3>\n<pre><code class=\"language-python\">a = [1, 2, 3, 4]\n5 in a\n</code></pre>\n<pre><code class=\"language-python\">2 in a\n</code></pre>\n<h3>The upper, lower, isupper, and islower String Methods</h3>\n<p><code>upper()</code> and <code>lower()</code>:</p>\n<pre><code class=\"language-python\">spam = 'Hello world!'\nspam = spam.upper()\nspam\n</code></pre>\n<pre><code class=\"language-python\">spam = spam.lower()\nspam\n</code></pre>\n<p>isupper() and islower():</p>\n<pre><code class=\"language-python\">spam = 'Hello world!'\nspam.islower()\n</code></pre>\n<pre><code class=\"language-python\">spam.isupper()\n</code></pre>\n<pre><code class=\"language-python\">'HELLO'.isupper()\n</code></pre>\n<pre><code class=\"language-python\">'abc12345'.islower()\n</code></pre>\n<pre><code class=\"language-python\">'12345'.islower()\n</code></pre>\n<pre><code class=\"language-python\">'12345'.isupper()\n</code></pre>\n<h3>The isX String Methods</h3>\n<ul>\n<li><strong>isalpha()</strong> returns True if the string consists only of letters and is not blank.</li>\n<li><strong>isalnum()</strong> returns True if the string consists only of lettersand numbers and is not blank.</li>\n<li><strong>isdecimal()</strong> returns True if the string consists only ofnumeric characters and is not blank.</li>\n<li><strong>isspace()</strong> returns True if the string consists only of spaces,tabs, and new-lines and is not blank.</li>\n<li><strong>istitle()</strong> returns True if the string consists only of wordsthat begin with an uppercase letter followed by onlylowercase letters.</li>\n</ul>\n<h3>The startswith and endswith String Methods</h3>\n<pre><code class=\"language-python\">'Hello world!'.startswith('Hello')\n</code></pre>\n<pre><code class=\"language-python\">'Hello world!'.endswith('world!')\n</code></pre>\n<pre><code class=\"language-python\">'abc123'.startswith('abcdef')\n</code></pre>\n<pre><code class=\"language-python\">'abc123'.endswith('12')\n</code></pre>\n<pre><code class=\"language-python\">'Hello world!'.startswith('Hello world!')\n</code></pre>\n<pre><code class=\"language-python\">'Hello world!'.endswith('Hello world!')\n</code></pre>\n<h3>The join and split String Methods</h3>\n<p>join():</p>\n<pre><code class=\"language-python\">', '.join(['cats', 'rats', 'bats'])\n</code></pre>\n<pre><code class=\"language-python\">' '.join(['My', 'name', 'is', 'Simon'])\n</code></pre>\n<pre><code class=\"language-python\">'ABC'.join(['My', 'name', 'is', 'Simon'])\n</code></pre>\n<p>split():</p>\n<pre><code class=\"language-python\">'My name is Simon'.split()\n</code></pre>\n<pre><code class=\"language-python\">'MyABCnameABCisABCSimon'.split('ABC')\n</code></pre>\n<pre><code class=\"language-python\">'My name is Simon'.split('m')\n</code></pre>\n<h3>Justifying Text with rjust, ljust, and center</h3>\n<p>rjust() and ljust():</p>\n<pre><code class=\"language-python\">'Hello'.rjust(10)\n</code></pre>\n<pre><code class=\"language-python\">'Hello'.rjust(20)\n</code></pre>\n<pre><code class=\"language-python\">'Hello World'.rjust(20)\n</code></pre>\n<pre><code class=\"language-python\">'Hello'.ljust(10)\n</code></pre>\n<p>An optional second argument to rjust() and ljust() will specify a fill character other than a space character. Enter the following into the interactive shell:</p>\n<pre><code class=\"language-python\">'Hello'.rjust(20, '*')\n</code></pre>\n<pre><code class=\"language-python\">'Hello'.ljust(20, '-')\n</code></pre>\n<p>center():</p>\n<pre><code class=\"language-python\">'Hello'.center(20)\n</code></pre>\n<pre><code class=\"language-python\">'Hello'.center(20, '=')\n</code></pre>\n<h3>Removing Whitespace with strip, rstrip, and lstrip</h3>\n<pre><code class=\"language-python\">spam = '    Hello World     '\nspam.strip()\n</code></pre>\n<pre><code class=\"language-python\">spam.lstrip()\n</code></pre>\n<pre><code class=\"language-python\">spam.rstrip()\n</code></pre>\n<pre><code class=\"language-python\">spam = 'SpamSpamBaconSpamEggsSpamSpam'\nspam.strip('ampS')\n</code></pre>\n<h3>Copying and Pasting Strings with the pyperclip Module</h3>\n<p>First, install <code>pypeerclip</code> with pip:</p>\n<pre><code class=\"language-shell\">pip install pyperclip\n</code></pre>\n<pre><code class=\"language-python\">import pyperclip\n\npyperclip.copy('Hello world!')\npyperclip.paste()\n</code></pre>\n<h2>String Formatting</h2>\n<h3>% operator</h3>\n<pre><code class=\"language-python\">name = 'Pete'\n'Hello %s' % name\n</code></pre>\n<p>We can use the <code>%x</code> format specifier to convert an int value to a string:</p>\n<pre><code class=\"language-python\">num = 5\n'I have %x apples' % num\n</code></pre>\n<p>Note: For new code, using str.format or f-strings is strongly recommended over the <code>%</code> operator.</p>\n<h3>str.format</h3>\n<p>Python 3 introduced a new way to do string formatting that was later back-ported to Python 2.7. This makes the syntax for string formatting more regular.</p>\n<pre><code class=\"language-python\">name = 'John'\nage = 20'\n\n\"Hello I'm {}, my age is {}\".format(name, age)\n</code></pre>\n<pre><code class=\"language-python\">\"Hello I'm {0}, my age is {1}\".format(name, age)\n</code></pre>\n<p>The official <a href=\"https://docs.python.org/3/library/stdtypes.html?highlight=sprintf#printf-style-string-formatting\">Python 3.x documentation</a> recommend <code>str.format</code> over the <code>%</code> operator:</p>\n<blockquote>\n<p>The formatting operations described here exhibit a variety of quirks that lead to a number of common errors (such as failing to display tuples and dictionaries correctly). Using the newer formatted string literals or the str.format() interface helps avoid these errors. These alternatives also provide more powerful, flexible and extensible approaches to formatting text.</p>\n</blockquote>\n<h3>Lazy string formatting</h3>\n<p>You would only use <code>%s</code> string formatting on functions that can do lazy parameters evaluation,\nthe most common being logging:</p>\n<p>Prefer:</p>\n<pre><code class=\"language-python\">name = \"alice\"\nlogging.debug(\"User name: %s\", name)\n</code></pre>\n<p>Over:</p>\n<pre><code class=\"language-python\">logging.debug(\"User name: {}\".format(name))\n</code></pre>\n<p>Or:</p>\n<pre><code class=\"language-python\">logging.debug(\"User name: \" + name)\n</code></pre>\n<h3>Formatted String Literals or f-strings</h3>\n<p>Python 3.6+</p>\n<pre><code class=\"language-python\">name = 'Elizabeth'\nf'Hello {name}!'\n</code></pre>\n<p>It is even possible to do inline arithmetic with it:</p>\n<pre><code class=\"language-python\">a = 5\nb = 10\nf'Five plus ten is {a + b} and not {2 * (a + b)}.'\n</code></pre>\n<h3>Template Strings</h3>\n<p>A simpler and less powerful mechanism, but it is recommended when handling format strings generated by users. Due to their reduced complexity template strings are a safer choice.</p>\n<pre><code class=\"language-python\">from string import Template\n\nname = 'Elizabeth'\nt = Template('Hey $name!')\nt.substitute(name=name)\n</code></pre>\n<h2>Regular Expressions</h2>\n<ol>\n<li>Import the regex module with <code>import re</code>.</li>\n<li>Create a Regex object with the <code>re.compile()</code> function. (Remember to use a raw string.)</li>\n<li>Pass the string you want to search into the Regex object's <code>search()</code> method. This returns a <code>Match</code> object.</li>\n<li>Call the Match object's <code>group()</code> method to return a string of the actual matched text.</li>\n</ol>\n<p>All the regex functions in Python are in the re module:</p>\n<pre><code class=\"language-python\">import re\n</code></pre>\n<h3>Matching Regex Objects</h3>\n<pre><code class=\"language-python\">phone_num_regex = re.compile(r'\\d\\d\\d-\\d\\d\\d-\\d\\d\\d\\d')\nmo = phone_num_regex.search('My number is 415-555-4242.')\nprint('Phone number found: {}'.format(mo.group()))\n</code></pre>\n<h3>Grouping with Parentheses</h3>\n<pre><code class=\"language-python\">phone_num_regex = re.compile(r'(\\d\\d\\d)-(\\d\\d\\d-\\d\\d\\d\\d)')\nmo = phone_num_regex.search('My number is 415-555-4242.')\nmo.group(1)\n</code></pre>\n<pre><code class=\"language-python\">mo.group(2)\n</code></pre>\n<pre><code class=\"language-python\">mo.group(0)\n</code></pre>\n<pre><code class=\"language-python\">mo.group()\n</code></pre>\n<p>To retrieve all the groups at once: use the groups() method—note the plural form for the name.</p>\n<pre><code class=\"language-python\">mo.groups()\narea_code, main_number = mo.groups()\n</code></pre>\n<pre><code class=\"language-python\">print(area_code)\n</code></pre>\n<pre><code class=\"language-python\">print(main_number)\n</code></pre>\n<h3>Matching Multiple Groups with the Pipe</h3>\n<p>The | character is called a pipe. You can use it anywhere you want to match one of many expressions. For example, the regular expression r'Batman|Tina Fey' will match either 'Batman' or 'Tina Fey'.</p>\n<pre><code class=\"language-python\">hero_regex = re.compile (r'Batman|Tina Fey')\nmo1 = hero_regex.search('Batman and Tina Fey.')\nmo1.group()\n</code></pre>\n<pre><code class=\"language-python\">mo2 = hero_regex.search('Tina Fey and Batman.')\nmo2.group()\n</code></pre>\n<p>You can also use the pipe to match one of several patterns as part of your regex:</p>\n<pre><code class=\"language-python\">bat_regex = re.compile(r'Bat(man|mobile|copter|bat)')\nmo = bat_regex.search('Batmobile lost a wheel')\nmo.group()\n</code></pre>\n<pre><code class=\"language-python\">mo.group(1)\n</code></pre>\n<h3>Optional Matching with the Question Mark</h3>\n<p>The ? character flags the group that precedes it as an optional part of the pattern.</p>\n<pre><code class=\"language-python\">bat_regex = re.compile(r'Bat(wo)?man')\nmo1 = bat_regex.search('The Adventures of Batman')\nmo1.group()\n</code></pre>\n<pre><code class=\"language-python\">mo2 = bat_regex.search('The Adventures of Batwoman')\nmo2.group()\n</code></pre>\n<h3>Matching Zero or More with the Star</h3>\n<p>The * (called the star or asterisk) means “match zero or more”—the group that precedes the star can occur any number of times in the text.</p>\n<pre><code class=\"language-python\">bat_regex = re.compile(r'Bat(wo)*man')\nmo1 = bat_regex.search('The Adventures of Batman')\nmo1.group()\n</code></pre>\n<pre><code class=\"language-python\">mo2 = bat_regex.search('The Adventures of Batwoman')\nmo2.group()\n</code></pre>\n<pre><code class=\"language-python\">mo3 = bat_regex.search('The Adventures of Batwowowowoman')\nmo3.group()\n</code></pre>\n<h3>Matching One or More with the Plus</h3>\n<p>While * means “match zero or more,” the + (or plus) means “match one or more”. The group preceding a plus must appear at least once. It is not optional:</p>\n<pre><code class=\"language-python\">bat_regex = re.compile(r'Bat(wo)+man')\nmo1 = bat_regex.search('The Adventures of Batwoman')\nmo1.group()\n</code></pre>\n<pre><code class=\"language-python\">mo2 = bat_regex.search('The Adventures of Batwowowowoman')\nmo2.group()\n</code></pre>\n<pre><code class=\"language-python\">mo3 = bat_regex.search('The Adventures of Batman')\nmo3 is None\n</code></pre>\n<h3>Matching Specific Repetitions with Curly Brackets</h3>\n<p>If you have a group that you want to repeat a specific number of times, follow the group in your regex with a number in curly brackets. For example, the regex (Ha){3} will match the string 'HaHaHa', but it will not match 'HaHa', since the latter has only two repeats of the (Ha) group.</p>\n<p>Instead of one number, you can specify a range by writing a minimum, a comma, and a maximum in between the curly brackets. For example, the regex (Ha){3,5} will match 'HaHaHa', 'HaHaHaHa', and 'HaHaHaHaHa'.</p>\n<pre><code class=\"language-python\">ha_regex = re.compile(r'(Ha){3}')\nmo1 = ha_regex.search('HaHaHa')\nmo1.group()\n</code></pre>\n<pre><code class=\"language-python\">mo2 = ha_regex.search('Ha')\nmo2 is None\n</code></pre>\n<h3>Greedy and Nongreedy Matching</h3>\n<p>Python's regular expressions are greedy by default, which means that in ambiguous situations they will match the longest string possible. The non-greedy version of the curly brackets, which matches the shortest string possible, has the closing curly bracket followed by a question mark.</p>\n<pre><code class=\"language-python\">greedy_ha_regex = re.compile(r'(Ha){3,5}')\nmo1 = greedy_ha_regex.search('HaHaHaHaHa')\nmo1.group()\n</code></pre>\n<pre><code class=\"language-python\">nongreedy_ha_regex = re.compile(r'(Ha){3,5}?')\nmo2 = nongreedy_ha_regex.search('HaHaHaHaHa')\nmo2.group()\n</code></pre>\n<h3>The findall Method</h3>\n<p>In addition to the search() method, Regex objects also have a findall() method. While search() will return a Match object of the first matched text in the searched string, the findall() method will return the strings of every match in the searched string.</p>\n<pre><code class=\"language-python\">phone_num_regex = re.compile(r'\\d\\d\\d-\\d\\d\\d-\\d\\d\\d\\d') # has no groups\nphone_num_regex.findall('Cell: 415-555-9999 Work: 212-555-0000')\n</code></pre>\n<p>To summarize what the findall() method returns, remember the following:</p>\n<ul>\n<li>When called on a regex with no groups, such as \\d-\\d\\d\\d-\\d\\d\\d\\d, the method findall() returns a list of ng matches, such as ['415-555-9999', '212-555-0000'].</li>\n<li>When called on a regex that has groups, such as (\\d\\d\\d)-d\\d)-(\\d\\ d\\d\\d), the method findall() returns a list of es of strings (one string for each group), such as [('415', ', '9999'), ('212', '555', '0000')].</li>\n</ul>\n<h3>Making Your Own Character Classes</h3>\n<p>There are times when you want to match a set of characters but the shorthand character classes (\\d, \\w, \\s, and so on) are too broad. You can define your own character class using square brackets. For example, the character class [aeiouAEIOU] will match any vowel, both lowercase and uppercase.</p>\n<pre><code class=\"language-python\">vowel_regex = re.compile(r'[aeiouAEIOU]')\nvowel_regex.findall('Robocop eats baby food. BABY FOOD.')\n</code></pre>\n<p>You can also include ranges of letters or numbers by using a hyphen. For example, the character class [a-zA-Z0-9] will match all lowercase letters, uppercase letters, and numbers.</p>\n<p>By placing a caret character (^) just after the character class's opening bracket, you can make a negative character class. A negative character class will match all the characters that are not in the character class. For example, enter the following into the interactive shell:</p>\n<pre><code class=\"language-python\">consonant_regex = re.compile(r'[^aeiouAEIOU]')\nconsonant_regex.findall('Robocop eats baby food. BABY FOOD.')\n</code></pre>\n<h3>The Caret and Dollar Sign Characters</h3>\n<ul>\n<li>You can also use the caret symbol (^) at the start of a regex to indicate that a match must occur at the beginning of the searched text.</li>\n<li>Likewise, you can put a dollar sign ($) at the end of the regex to indicate the string must end with this regex pattern.</li>\n<li>And you can use the ^ and $ together to indicate that the entire string must match the regex—that is, it's not enough for a match to be made on some subset of the string.</li>\n</ul>\n<p>The r'^Hello' regular expression string matches strings that begin with 'Hello':</p>\n<pre><code class=\"language-python\">begins_with_hello = re.compile(r'^Hello')\nbegins_with_hello.search('Hello world!')\n</code></pre>\n<pre><code class=\"language-python\">begins_with_hello.search('He said hello.') is None\n</code></pre>\n<p>The r'\\d$' regular expression string matches strings that end with a numeric character from 0 to 9:</p>\n<pre><code class=\"language-python\">whole_string_is_num = re.compile(r'^\\d+$')\nwhole_string_is_num.search('1234567890')\n</code></pre>\n<pre><code class=\"language-python\">whole_string_is_num.search('12345xyz67890') is None\n</code></pre>\n<pre><code class=\"language-python\">whole_string_is_num.search('12 34567890') is None\n</code></pre>\n<h3>The Wildcard Character</h3>\n<p>The . (or dot) character in a regular expression is called a wildcard and will match any character except for a newline:</p>\n<pre><code class=\"language-python\">at_regex = re.compile(r'.at')\nat_regex.findall('The cat in the hat sat on the flat mat.')\n</code></pre>\n<h3>Matching Everything with Dot-Star</h3>\n<pre><code class=\"language-python\">name_regex = re.compile(r'First Name: (.*) Last Name: (.*)')\nmo = name_regex.search('First Name: Some Last Name: One')\nmo.group(1)\n</code></pre>\n<pre><code class=\"language-python\">mo.group(2)\n</code></pre>\n<p>The dot-star uses greedy mode: It will always try to match as much text as possible. To match any and all text in a nongreedy fashion, use the dot, star, and question mark (.*?). The question mark tells Python to match in a nongreedy way:</p>\n<pre><code class=\"language-python\">nongreedy_regex = re.compile(r'&#x3C;.*?>')\nmo = nongreedy_regex.search('&#x3C;To serve man> for dinner.>')\nmo.group()\n</code></pre>\n<pre><code class=\"language-python\">greedy_regex = re.compile(r'&#x3C;.*>')\nmo = greedy_regex.search('&#x3C;To serve man> for dinner.>')\nmo.group()\n</code></pre>\n<h3>Matching Newlines with the Dot Character</h3>\n<p>The dot-star will match everything except a newline. By passing re.DOTALL as the second argument to re.compile(), you can make the dot character match all characters, including the newline character:</p>\n<pre><code class=\"language-python\">no_newline_regex = re.compile('.*')\nno_newline_regex.search('Serve the public trust.\\nProtect the innocent.\\nUphold the law.').group()\n</code></pre>\n<pre><code class=\"language-python\">newline_regex = re.compile('.*', re.DOTALL)\nnewline_regex.search('Serve the public trust.\\nProtect the innocent.\\nUphold the law.').group()\n</code></pre>\n<h3>Review of Regex Symbols</h3>\n<table>\n<thead>\n<tr>\n<th>Symbol</th>\n<th>Matches</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>?</code></td>\n<td>zero or one of the preceding group.</td>\n</tr>\n<tr>\n<td><code>*</code></td>\n<td>zero or more of the preceding group.</td>\n</tr>\n<tr>\n<td><code>+</code></td>\n<td>one or more of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{n}</code></td>\n<td>exactly n of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{n,}</code></td>\n<td>n or more of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{,m}</code></td>\n<td>0 to m of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{n,m}</code></td>\n<td>at least n and at most m of the preceding p.</td>\n</tr>\n<tr>\n<td><code>{n,m}?</code> or <code>*?</code> or <code>+?</code></td>\n<td>performs a nongreedy match of the preceding p.</td>\n</tr>\n<tr>\n<td><code>^spam</code></td>\n<td>means the string must begin with spam.</td>\n</tr>\n<tr>\n<td><code>spam$</code></td>\n<td>means the string must end with spam.</td>\n</tr>\n<tr>\n<td><code>.</code></td>\n<td>any character, except newline characters.</td>\n</tr>\n<tr>\n<td><code>\\d</code>, <code>\\w</code>, and <code>\\s</code></td>\n<td>a digit, word, or space character, resectively.</td>\n</tr>\n<tr>\n<td><code>\\D</code>, <code>\\W</code>, and <code>\\S</code></td>\n<td>anything except a digit, word, or space acter, respectively.</td>\n</tr>\n<tr>\n<td><code>[abc]</code></td>\n<td>any character between the brackets (such as a, b, ).</td>\n</tr>\n<tr>\n<td><code>[^abc]</code></td>\n<td>any character that isn't between the brackets.</td>\n</tr>\n</tbody>\n</table>\n<h3>Case-Insensitive Matching</h3>\n<p>To make your regex case-insensitive, you can pass re.IGNORECASE or re.I as a second argument to re.compile():</p>\n<pre><code class=\"language-python\">robocop = re.compile(r'robocop', re.I)\nrobocop.search('Robocop is part man, part machine, all cop.').group()\n</code></pre>\n<pre><code class=\"language-python\">robocop.search('ROBOCOP protects the innocent.').group()\n</code></pre>\n<pre><code class=\"language-python\">robocop.search('Al, why does your programming book talk about robocop so much?').group()\n</code></pre>\n<h3>Substituting Strings with the sub() Method</h3>\n<p>The sub() method for Regex objects is passed two arguments:</p>\n<ol>\n<li>The first argument is a string to replace any matches.</li>\n<li>The second is the string for the regular expression.</li>\n</ol>\n<p>The sub() method returns a string with the substitutions applied:</p>\n<pre><code class=\"language-python\">names_regex = re.compile(r'Agent \\w+')\nnames_regex.sub('CENSORED', 'Agent Alice gave the secret documents to Agent Bob.')\n</code></pre>\n<p>Another example:</p>\n<pre><code class=\"language-python\">agent_names_regex = re.compile(r'Agent (\\w)\\w*')\nagent_names_regex.sub(r'\\1****', 'Agent Alice told Agent Carol that Agent Eve knew Agent Bob was a double agent.')\n</code></pre>\n<h3>Managing Complex Regexes</h3>\n<p>To tell the re.compile() function to ignore whitespace and comments inside the regular expression string, “verbose mode” can be enabled by passing the variable re.VERBOSE as the second argument to re.compile().</p>\n<p>Now instead of a hard-to-read regular expression like this:</p>\n<pre><code class=\"language-python\">phone_regex = re.compile(r'((\\d{3}|\\(\\d{3}\\))?(\\s|-|\\.)?\\d{3}(\\s|-|\\.)\\d{4}(\\s*(ext|x|ext.)\\s*\\d{2,5})?)')\n</code></pre>\n<p>you can spread the regular expression over multiple lines with comments like this:</p>\n<pre><code class=\"language-python\">phone_regex = re.compile(r'''(\n    (\\d{3}|\\(\\d{3}\\))?            # area code\n    (\\s|-|\\.)?                    # separator\n    \\d{3}                         # first 3 digits\n    (\\s|-|\\.)                     # separator\n    \\d{4}                         # last 4 digits\n    (\\s*(ext|x|ext.)\\s*\\d{2,5})?  # extension\n    )''', re.VERBOSE)\n</code></pre>\n<h2>Handling File and Directory Paths</h2>\n<p>There are two main modules in Python that deals with path manipulation.\nOne is the <code>os.path</code> module and the other is the <code>pathlib</code> module.\nThe <code>pathlib</code> module was added in Python 3.4, offering an object-oriented way\nto handle file system paths.</p>\n<h3>Backslash on Windows and Forward Slash on OS X and Linux</h3>\n<p>On Windows, paths are written using backslashes () as the separator between\nfolder names. On Unix based operating system such as macOS, Linux, and BSDs,\nthe forward slash (/) is used as the path separator. Joining paths can be\na headache if your code needs to work on different platforms.</p>\n<p>Fortunately, Python provides easy ways to handle this. We will showcase\nhow to deal with this with both <code>os.path.join</code> and <code>pathlib.Path.joinpath</code></p>\n<p>Using <code>os.path.join</code> on Windows:</p>\n<pre><code class=\"language-python\">import os\n\nos.path.join('usr', 'bin', 'spam')\n</code></pre>\n<p>And using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nprint(Path('usr').joinpath('bin').joinpath('spam'))\n</code></pre>\n<p><code>pathlib</code> also provides a shortcut to joinpath using the <code>/</code> operator:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nprint(Path('usr') / 'bin' / 'spam')\n</code></pre>\n<p>Notice the path separator is different between Windows and Unix based operating\nsystem, that's why you want to use one of the above methods instead of\nadding strings together to join paths together.</p>\n<p>Joining paths is helpful if you need to create different file paths under\nthe same directory.</p>\n<p>Using <code>os.path.join</code> on Windows:</p>\n<pre><code class=\"language-python\">my_files = ['accounts.txt', 'details.csv', 'invite.docx']\n\nfor filename in my_files:\n    print(os.path.join('C:\\\\Users\\\\asweigart', filename))\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">my_files = ['accounts.txt', 'details.csv', 'invite.docx']\nhome = Path.home()\nfor filename in my_files:\n    print(home / filename)\n</code></pre>\n<h3>The Current Working Directory</h3>\n<p>Using <code>os</code> on Windows:</p>\n<pre><code class=\"language-python\">import os\n\nos.getcwd()\n</code></pre>\n<pre><code class=\"language-python\">os.chdir('C:\\\\Windows\\\\System32')\nos.getcwd()\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\nfrom os import chdir\n\nprint(Path.cwd())\n</code></pre>\n<pre><code class=\"language-python\">chdir('/usr/lib/python3.6')\nprint(Path.cwd())\n</code></pre>\n<h3>Creating New Folders</h3>\n<p>Using <code>os</code> on Windows:</p>\n<pre><code class=\"language-python\">import os\n\nos.makedirs('C:\\\\delicious\\\\walnut\\\\waffles')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\ncwd = Path.cwd()\n(cwd / 'delicious' / 'walnut' / 'waffles').mkdir()\n</code></pre>\n<p>Oh no, we got a nasty error! The reason is that the 'delicious' directory does\nnot exist, so we cannot make the 'walnut' and the 'waffles' directories under\nit. To fix this, do:</p>\n<pre><code class=\"language-python\">from pathlib import Path\ncwd = Path.cwd()\n(cwd / 'delicious' / 'walnut' / 'waffles').mkdir(parents=True)\n</code></pre>\n<p>And all is good :)</p>\n<h3>Absolute vs. Relative Paths</h3>\n<p>There are two ways to specify a file path.</p>\n<ul>\n<li>An absolute path, which always begins with the root folder</li>\n<li>A relative path, which is relative to the program's current working directory</li>\n</ul>\n<p>There are also the dot (.) and dot-dot (..) folders. These are not real folders but special names that can be used in a path. A single period (“dot”) for a folder name is shorthand for “this directory.” Two periods (“dot-dot”) means “the parent folder.”</p>\n<h3>Handling Absolute and Relative Paths</h3>\n<p>To see if a path is an absolute path:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\n\nos.path.isabs('/')\n</code></pre>\n<pre><code class=\"language-python\">os.path.isabs('..')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\nPath('/').is_absolute()\n</code></pre>\n<pre><code class=\"language-python\">Path('..').is_absolute()\n</code></pre>\n<p>You can extract an absolute path with both <code>os.path</code> and <code>pathlib</code></p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\n\nos.getcwd()\n</code></pre>\n<pre><code class=\"language-python\">os.path.abspath('..')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nprint(Path.cwd())\n</code></pre>\n<pre><code class=\"language-python\">print(Path('..').resolve())\n</code></pre>\n<p>You can get a relative path from a starting path to another path.</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\n\nos.path.relpath('/etc/passwd', '/')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nprint(Path('/etc/passwd').relative_to('/'))\n</code></pre>\n<h3>Checking Path Validity</h3>\n<p>Checking if a file/directory exists:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\nos.path.exists('.')\n</code></pre>\n<pre><code class=\"language-python\">os.path.exists('setup.py')\n</code></pre>\n<pre><code class=\"language-python\">os.path.exists('/etc')\n</code></pre>\n<pre><code class=\"language-python\">os.path.exists('nonexistentfile')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\nPath('.').exists()\n</code></pre>\n<pre><code class=\"language-python\">Path('setup.py').exists()\n</code></pre>\n<pre><code class=\"language-python\">Path('/etc').exists()\n</code></pre>\n<pre><code class=\"language-python\">Path('nonexistentfile').exists()\n</code></pre>\n<p>Checking if a path is a file:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\nos.path.isfile('setup.py')\n</code></pre>\n<pre><code class=\"language-python\">os.path.isfile('/home')\n</code></pre>\n<pre><code class=\"language-python\">os.path.isfile('nonexistentfile')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nPath('setup.py').is_file()\n</code></pre>\n<pre><code class=\"language-python\">Path('/home').is_file()\n</code></pre>\n<pre><code class=\"language-python\">Path('nonexistentfile').is_file()\n</code></pre>\n<p>Checking if a path is a directory:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\nos.path.isdir('/')\n</code></pre>\n<pre><code class=\"language-python\">os.path.isdir('setup.py')\n</code></pre>\n<pre><code class=\"language-python\">os.path.isdir('/spam')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nPath('/').is_dir()\n</code></pre>\n<pre><code class=\"language-python\">Path('setup.py').is_dir()\n</code></pre>\n<pre><code class=\"language-python\">Path('/spam').is_dir()\n</code></pre>\n<h3>Finding File Sizes and Folder Contents</h3>\n<p>Getting a file's size in bytes:</p>\n<p>Using <code>os.path</code> on Windows:</p>\n<pre><code class=\"language-python\">import os\nos.path.getsize('C:\\\\Windows\\\\System32\\\\calc.exe')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nstat = Path('/bin/python3.6').stat()\nprint(stat) # stat contains some other information about the file as well\n</code></pre>\n<pre><code class=\"language-python\">print(stat.st_size) # size in bytes\n</code></pre>\n<p>Listing directory contents using <code>os.listdir</code> on Windows:</p>\n<pre><code class=\"language-python\">import os\nos.listdir('C:\\\\Windows\\\\System32')\n</code></pre>\n<p>Listing directory contents using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n\nfor f in Path('/usr/bin').iterdir():\n    print(f)\n</code></pre>\n<p>To find the total size of all the files in this directory:</p>\n<p><strong>WARNING</strong>: Directories themselves also have a size! So you might want to\ncheck for whether a path is a file or directory using the methods in the methods discussed in the above section!</p>\n<p>Using <code>os.path.getsize()</code> and <code>os.listdir()</code> together on Windows:</p>\n<pre><code class=\"language-python\">import os\n\ntotal_size = 0\n\nfor filename in os.listdir('C:\\\\Windows\\\\System32'):\n      total_size = total_size + os.path.getsize(os.path.join('C:\\\\Windows\\\\System32', filename))\n\nprint(total_size)\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\ntotal_size = 0\n\nfor sub_path in Path('/usr/bin').iterdir():\n    total_size += sub_path.stat().st_size\n\nprint(total_size)\n</code></pre>\n<h3>Copying Files and Folders</h3>\n<p>The shutil module provides functions for copying files, as well as entire folders.</p>\n<pre><code class=\"language-python\">import shutil, os\n\nos.chdir('C:\\\\')\n\nshutil.copy('C:\\\\spam.txt', 'C:\\\\delicious')\n</code></pre>\n<pre><code class=\"language-python\">shutil.copy('eggs.txt', 'C:\\\\delicious\\\\eggs2.txt')\n   'C:\\\\delicious\\\\eggs2.txt'\n</code></pre>\n<p>While shutil.copy() will copy a single file, shutil.copytree() will copy an entire folder and every folder and file contained in it:</p>\n<pre><code class=\"language-python\">import shutil, os\n\nos.chdir('C:\\\\')\nshutil.copytree('C:\\\\bacon', 'C:\\\\bacon_backup')\n</code></pre>\n<h3>Moving and Renaming Files and Folders</h3>\n<pre><code class=\"language-python\">import shutil\n\nshutil.move('C:\\\\bacon.txt', 'C:\\\\eggs')\n</code></pre>\n<p>The destination path can also specify a filename. In the following example, the source file is moved and renamed:</p>\n<pre><code class=\"language-python\">shutil.move('C:\\\\bacon.txt', 'C:\\\\eggs\\\\new_bacon.txt')\n</code></pre>\n<p>If there is no eggs folder, then move() will rename bacon.txt to a file named eggs.</p>\n<pre><code class=\"language-python\">shutil.move('C:\\\\bacon.txt', 'C:\\\\eggs')\n</code></pre>\n<h3>Permanently Deleting Files and Folders</h3>\n<ul>\n<li>Calling os.unlink(path) or Path.unlink() will delete the file at path.</li>\n<li>Calling os.rmdir(path) or Path.rmdir() will delete the folder at path. This folder must be empty of any files or folders.</li>\n<li>Calling shutil.rmtree(path) will remove the folder at path, and all files and folders it contains will also be deleted.</li>\n</ul>\n<h3>Safe Deletes with the send2trash Module</h3>\n<p>You can install this module by running pip install send2trash from a Terminal window.</p>\n<pre><code class=\"language-python\">import send2trash\n\nwith open('bacon.txt', 'a') as bacon_file: # creates the file\n    bacon_file.write('Bacon is not a vegetable.')\n\nsend2trash.send2trash('bacon.txt')\n</code></pre>\n<h3>Walking a Directory Tree</h3>\n<pre><code class=\"language-python\">import os\n\nfor folder_name, subfolders, filenames in os.walk('C:\\\\delicious'):\n    print('The current folder is {}'.format(folder_name))\n\n    for subfolder in subfolders:\n        print('SUBFOLDER OF {}: {}'.format(folder_name, subfolder))\n    for filename in filenames:\n        print('FILE INSIDE {}: {}'.format(folder_name, filename))\n\n    print('')\n</code></pre>\n<p><code>pathlib</code> provides a lot more functionality than the ones listed above,\nlike getting file name, getting file extension, reading/writing a file without\nmanually opening it, etc. Check out the\n<a href=\"https://docs.python.org/3/library/pathlib.html\">official documentation</a>\nif you want to know more!</p>\n<h2>Reading and Writing Files</h2>\n<h3>The File Reading/Writing Process</h3>\n<p>To read/write to a file in Python, you will want to use the <code>with</code>\nstatement, which will close the file for you after you are done.</p>\n<h3>Opening and reading files with the open function</h3>\n<pre><code class=\"language-python\">with open('C:\\\\Users\\\\your_home_folder\\\\hello.txt') as hello_file:\n    hello_content = hello_file.read()\n\nhello_content\n</code></pre>\n<p>Alternatively, you can use the <em>readlines()</em> method to get a list of string values from the file, one string for each line of text:</p>\n<pre><code class=\"language-python\">with open('sonnet29.txt') as sonnet_file:\n    sonnet_file.readlines()\n</code></pre>\n<p>You can also iterate through the file line by line:</p>\n<pre><code class=\"language-python\">with open('sonnet29.txt') as sonnet_file:\n    for line in sonnet_file: # note the new line character will be included in the line\n        print(line, end='')\n</code></pre>\n<h3>Writing to Files</h3>\n<pre><code class=\"language-python\">with open('bacon.txt', 'w') as bacon_file:\n    bacon_file.write('Hello world!\\n')\n</code></pre>\n<pre><code class=\"language-python\">with open('bacon.txt', 'a') as bacon_file:\n    bacon_file.write('Bacon is not a vegetable.')\n</code></pre>\n<pre><code class=\"language-python\">with open('bacon.txt') as bacon_file:\n    content = bacon_file.read()\n\nprint(content)\n</code></pre>\n<h3>Saving Variables with the shelve Module</h3>\n<p>To save variables:</p>\n<pre><code class=\"language-python\">import shelve\n\ncats = ['Zophie', 'Pooka', 'Simon']\nwith shelve.open('mydata') as shelf_file:\n    shelf_file['cats'] = cats\n</code></pre>\n<p>To open and read variables:</p>\n<pre><code class=\"language-python\">with shelve.open('mydata') as shelf_file:\n    print(type(shelf_file))\n    print(shelf_file['cats'])\n</code></pre>\n<p>Just like dictionaries, shelf values have keys() and values() methods that will return list-like values of the keys and values in the shelf. Since these methods return list-like values instead of true lists, you should pass them to the list() function to get them in list form.</p>\n<pre><code class=\"language-python\">with shelve.open('mydata') as shelf_file:\n    print(list(shelf_file.keys()))\n    print(list(shelf_file.values()))\n</code></pre>\n<h3>Saving Variables with pprint.pformat</h3>\n<pre><code class=\"language-python\">import pprint\n\ncats = [{'name': 'Zophie', 'desc': 'chubby'}, {'name': 'Pooka', 'desc': 'fluffy'}]\npprint.pformat(cats)\n</code></pre>\n<pre><code class=\"language-python\">with open('myCats.py', 'w') as file_obj:\n    file_obj.write('cats = {}\\n'.format(pprint.pformat(cats)))\n</code></pre>\n<h3>Reading ZIP Files</h3>\n<pre><code class=\"language-python\">import zipfile, os\n\nos.chdir('C:\\\\')    # move to the folder with example.zip\nwith zipfile.ZipFile('example.zip') as example_zip:\n    print(example_zip.namelist())\n    spam_info = example_zip.getinfo('spam.txt')\n    print(spam_info.file_size)\n    print(spam_info.compress_size)\n    print('Compressed file is %sx smaller!' % (round(spam_info.file_size / spam_info.compress_size, 2)))\n</code></pre>\n<h3>Extracting from ZIP Files</h3>\n<p>The extractall() method for ZipFile objects extracts all the files and folders from a ZIP file into the current working directory.</p>\n<pre><code class=\"language-python\">import zipfile, os\n\nos.chdir('C:\\\\')    # move to the folder with example.zip\n\nwith zipfile.ZipFile('example.zip') as example_zip:\n    example_zip.extractall()\n</code></pre>\n<p>The extract() method for ZipFile objects will extract a single file from the ZIP file. Continue the interactive shell example:</p>\n<pre><code class=\"language-python\">with zipfile.ZipFile('example.zip') as example_zip:\n    print(example_zip.extract('spam.txt'))\n    print(example_zip.extract('spam.txt', 'C:\\\\some\\\\new\\\\folders'))\n</code></pre>\n<h3>Creating and Adding to ZIP Files</h3>\n<pre><code class=\"language-python\">import zipfile\n\nwith zipfile.ZipFile('new.zip', 'w') as new_zip:\n    new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)\n</code></pre>\n<p>This code will create a new ZIP file named new.zip that has the compressed contents of spam.txt.</p>\n<h2>JSON, YAML and configuration files</h2>\n<h3>JSON</h3>\n<p>Open a JSON file with:</p>\n<pre><code class=\"language-python\">import json\nwith open(\"filename.json\", \"r\") as f:\n    content = json.loads(f.read())\n</code></pre>\n<p>Write a JSON file with:</p>\n<pre><code class=\"language-python\">import json\n\ncontent = {\"name\": \"Joe\", \"age\": 20}\nwith open(\"filename.json\", \"w\") as f:\n    f.write(json.dumps(content, indent=2))\n</code></pre>\n<h3>YAML</h3>\n<p>Compared to JSON, YAML allows a much better humain maintainance and gives ability to add comments.\nIt is a convinient choice for configuration files where human will have to edit.</p>\n<p>There are two main librairies allowing to access to YAML files:</p>\n<ul>\n<li><a href=\"https://pypi.python.org/pypi/PyYAML\">PyYaml</a></li>\n<li><a href=\"https://pypi.python.org/pypi/ruamel.yaml\">Ruamel.yaml</a></li>\n</ul>\n<p>Install them using <code>pip install</code> in your virtual environment.</p>\n<p>The first one it easier to use but the second one, Ruamel, implements much better the YAML\nspecification, and allow for example to modify a YAML content without altering comments.</p>\n<p>Open a YAML file with:</p>\n<pre><code class=\"language-python\">from ruamel.yaml import YAML\n\nwith open(\"filename.yaml\") as f:\n    yaml=YAML()\n    yaml.load(f)\n</code></pre>\n<h3>Anyconfig</h3>\n<p><a href=\"https://pypi.python.org/pypi/anyconfig\">Anyconfig</a> is a very handy package allowing to abstract completly the underlying configuration file format. It allows to load a Python dictionary from JSON, YAML, TOML, and so on.</p>\n<p>Install it with:</p>\n<pre><code class=\"language-bash\">pip install anyconfig\n</code></pre>\n<p>Usage:</p>\n<pre><code class=\"language-python\">import anyconfig\n\nconf1 = anyconfig.load(\"/path/to/foo/conf.d/a.yml\")\n</code></pre>\n<h2>Debugging</h2>\n<h3>Raising Exceptions</h3>\n<p>Exceptions are raised with a raise statement. In code, a raise statement consists of the following:</p>\n<ul>\n<li>The raise keyword</li>\n<li>A call to the Exception() function</li>\n<li>A string with a helpful error message passed to the Exception() function</li>\n</ul>\n<pre><code class=\"language-python\">raise Exception('This is the error message.')\nTraceback (most recent call last):\n  File \"&#x3C;pyshell#191>\", line 1, in &#x3C;module>\n    raise Exception('This is the error message.')\nException: This is the error message.\n</code></pre>\n<p>Often it's the code that calls the function, not the function itself, that knows how to handle an expection. So you will commonly see a raise statement inside a function and the try and except statements in the code calling the function.</p>\n<pre><code class=\"language-python\">def box_print(symbol, width, height):\n    if len(symbol) != 1:\n      raise Exception('Symbol must be a single character string.')\n    if width &#x3C;= 2:\n      raise Exception('Width must be greater than 2.')\n    if height &#x3C;= 2:\n      raise Exception('Height must be greater than 2.')\n    print(symbol * width)\n    for i in range(height - 2):\n        print(symbol + (' ' * (width - 2)) + symbol)\n    print(symbol * width)\nfor sym, w, h in (('*', 4, 4), ('O', 20, 5), ('x', 1, 3), ('ZZ', 3, 3)):\n    try:\n        box_print(sym, w, h)\n    except Exception as err:\n        print('An exception happened: ' + str(err))\n</code></pre>\n<h3>Getting the Traceback as a String</h3>\n<p>The traceback is displayed by Python whenever a raised exception goes unhandled. But can also obtain it as a string by calling traceback.format_exc(). This function is useful if you want the information from an exception's traceback but also want an except statement to gracefully handle the exception. You will need to import Python's traceback module before calling this function.</p>\n<pre><code class=\"language-python\">import traceback\n\ntry:\n     raise Exception('This is the error message.')\nexcept:\n     with open('errorInfo.txt', 'w') as error_file:\n         error_file.write(traceback.format_exc())\n     print('The traceback info was written to errorInfo.txt.')\n</code></pre>\n<p>The 116 is the return value from the write() method, since 116 characters were written to the file. The traceback text was written to errorInfo.txt.</p>\n<pre><code>Traceback (most recent call last):\n  File \"&#x3C;pyshell#28>\", line 2, in &#x3C;module>\nException: This is the error message.\n</code></pre>\n<h3>Assertions</h3>\n<p>An assertion is a sanity check to make sure your code isn't doing something obviously wrong. These sanity checks are performed by assert statements. If the sanity check fails, then an AssertionError exception is raised. In code, an assert statement consists of the following:</p>\n<ul>\n<li>The assert keyword</li>\n<li>A condition (that is, an expression that evaluates to True or False)</li>\n<li>A comma</li>\n<li>A string to display when the condition is False</li>\n</ul>\n<pre><code class=\"language-python\">pod_bay_door_status = 'open'\n\nassert pod_bay_door_status == 'open', 'The pod bay doors need to be \"open\".'\n\npod_bay_door_status = 'I\\'m sorry, Dave. I\\'m afraid I can\\'t do that.'\n\nassert pod_bay_door_status == 'open', 'The pod bay doors need to be \"open\".'\n</code></pre>\n<p>In plain English, an assert statement says, “I assert that this condition holds true, and if not, there is a bug somewhere in the program.” Unlike exceptions, your code should not handle assert statements with try and except; if an assert fails, your program should crash. By failing fast like this, you shorten the time between the original cause of the bug and when you first notice the bug. This will reduce the amount of code you will have to check before finding the code that's causing the bug.</p>\n<p>Disabling Assertions</p>\n<p>Assertions can be disabled by passing the -O option when running Python.</p>\n<h3>Logging</h3>\n<p>To enable the logging module to display log messages on your screen as your program runs, copy the following to the top of your program (but under the #! python shebang line):</p>\n<pre><code class=\"language-python\">import logging\n\nlogging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s- %(message)s')\n</code></pre>\n<p>Say you wrote a function to calculate the factorial of a number. In mathematics, factorial 4 is 1 × 2 × 3 × 4, or 24. Factorial 7 is 1 × 2 × 3 × 4 × 5 × 6 × 7, or 5,040. Open a new file editor window and enter the following code. It has a bug in it, but you will also enter several log messages to help yourself figure out what is going wrong. Save the program as factorialLog.py.</p>\n<pre><code class=\"language-python\">import logging\n\nlogging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s- %(message)s')\n\nlogging.debug('Start of program')\n\ndef factorial(n):\n\n    logging.debug('Start of factorial(%s)' % (n))\n    total = 1\n\n    for i in range(1, n + 1):\n        total *= i\n        logging.debug('i is ' + str(i) + ', total is ' + str(total))\n\n    logging.debug('End of factorial(%s)' % (n))\n\n    return total\n\nprint(factorial(5))\nlogging.debug('End of program')\n</code></pre>\n<h3>Logging Levels</h3>\n<p>Logging levels provide a way to categorize your log messages by importance. There are five logging levels, described in Table 10-1 from least to most important. Messages can be logged at each level using a different logging function.</p>\n<table>\n<thead>\n<tr>\n<th>Level</th>\n<th>Logging Function</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>DEBUG</code></td>\n<td><code>logging.debug()</code></td>\n<td>The lowest level. Used for small details. Usually you care about these messages only when diagnosing problems.</td>\n</tr>\n<tr>\n<td><code>INFO</code></td>\n<td><code>logging.info()</code></td>\n<td>Used to record information on general events in your program or confirm that things are working at their point in the program.</td>\n</tr>\n<tr>\n<td><code>WARNING</code></td>\n<td><code>logging.warning()</code></td>\n<td>Used to indicate a potential problem that doesn't prevent the program from working but might do so in the future.</td>\n</tr>\n<tr>\n<td><code>ERROR</code></td>\n<td><code>logging.error()</code></td>\n<td>Used to record an error that caused the program to fail to do something.</td>\n</tr>\n<tr>\n<td><code>CRITICAL</code></td>\n<td><code>logging.critical()</code></td>\n<td>The highest level. Used to indicate a fatal error that has caused or is about to cause the program to stop running entirely.</td>\n</tr>\n</tbody>\n</table>\n<h3>Disabling Logging</h3>\n<p>After you've debugged your program, you probably don't want all these log messages cluttering the screen. The logging.disable() function disables these so that you don't have to go into your program and remove all the logging calls by hand.</p>\n<pre><code class=\"language-python\">import logging\n\nlogging.basicConfig(level=logging.INFO, format=' %(asctime)s -%(levelname)s - %(message)s')\nlogging.critical('Critical error! Critical error!')\nlogging.disable(logging.CRITICAL)\nlogging.critical('Critical error! Critical error!')\nlogging.error('Error! Error!')\n</code></pre>\n<h3>Logging to a File</h3>\n<p>Instead of displaying the log messages to the screen, you can write them to a text file. The logging.basicConfig() function takes a filename keyword argument, like so:</p>\n<pre><code class=\"language-python\">import logging\n\nlogging.basicConfig(filename='myProgramLog.txt', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')\n</code></pre>\n<h2>Lambda Functions</h2>\n<p>This function:</p>\n<pre><code class=\"language-python\">def add(x, y):\n        return x + y\n\nadd(5, 3)\n</code></pre>\n<p>Is equivalent to the <em>lambda</em> function:</p>\n<pre><code class=\"language-python\">add = lambda x, y: x + y\nadd(5, 3)\n</code></pre>\n<p>It's not even need to bind it to a name like add before:</p>\n<pre><code class=\"language-python\">(lambda x, y: x + y)(5, 3)\n</code></pre>\n<p>Like regular nested functions, lambdas also work as lexical closures:</p>\n<pre><code class=\"language-python\">def make_adder(n):\n        return lambda x: x + n\n\nplus_3 = make_adder(3)\nplus_5(4)\n</code></pre>\n<p>Note: lambda can only evaluate an expression, like a single line of code.</p>\n<h2>Ternary Conditional Operator</h2>\n<p>Many programming languages have a ternary operator, which define a conditional expression. The most common usage is to make a terse simple conditional assignment statement. In other words, it offers one-line code to evaluate the first expression if the condition is true, otherwise it evaluates the second expression.</p>\n<pre><code>&#x3C;expression1> if &#x3C;condition> else &#x3C;expression2>\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">age = 15\n\nprint('kid' if age &#x3C; 18 else 'adult')\n</code></pre>\n<p>Ternary operators can be changed:</p>\n<pre><code class=\"language-python\">age = 15\nprint('kid' if age &#x3C; 13 else 'teenager' if age &#x3C; 18 else 'adult')\n</code></pre>\n<p>The code above is equivalent to:</p>\n<pre><code class=\"language-python\">if age &#x3C; 18:\n    if age &#x3C; 12:\n        print('kid')\n    else:\n        print('teenager')\nelse:\n    print('adult')\n</code></pre>\n<h2>args and kwargs</h2>\n<p>The names <code>args and kwargs</code> are arbitrary - the important thing are the <code>*</code> and <code>**</code> operators. They can mean:</p>\n<ol>\n<li>In a function declaration, <code>*</code> means “pack all remaining positional arguments into a tuple named <code>&#x3C;name></code>”, while <code>**</code> is the same for keyword arguments (except it uses a dictionary, not a tuple).</li>\n<li>In a function call, <code>*</code> means “unpack tuple or list named <code>&#x3C;name></code> to positional arguments at this position”, while <code>**</code> is the same for keyword arguments.</li>\n</ol>\n<p>For example you can make a function that you can use to call any other function, no matter what parameters it has:</p>\n<pre><code class=\"language-python\">def forward(f, *args, **kwargs):\n    return f(*args, **kwargs)\n</code></pre>\n<p>Inside forward, args is a tuple (of all positional arguments except the first one, because we specified it - the f), kwargs is a dict. Then we call f and unpack them so they become normal arguments to f.</p>\n<p>You use <code>*args</code> when you have an indefinite amount of positional arguments.</p>\n<pre><code class=\"language-python\">def fruits(*args):\n   for fruit in args:\n      print(fruit)\n\nfruits(\"apples\", \"bananas\", \"grapes\")\n</code></pre>\n<p>Similarly, you use <code>**kwargs</code> when you have an indefinite number of keyword arguments.</p>\n<pre><code class=\"language-python\">def fruit(**kwargs):\n   for key, value in kwargs.items():\n       print(\"{0}: {1}\".format(key, value))\n\nfruit(name = \"apple\", color = \"red\")\n</code></pre>\n<pre><code class=\"language-python\">def show(arg1, arg2, *args, kwarg1=None, kwarg2=None, **kwargs):\n  print(arg1)\n  print(arg2)\n  print(args)\n  print(kwarg1)\n  print(kwarg2)\n  print(kwargs)\n\ndata1 = [1,2,3]\ndata2 = [4,5,6]\ndata3 = {'a':7,'b':8,'c':9}\n\nshow(*data1,*data2, kwarg1=\"python\",kwarg2=\"cheatsheet\",**data3)\n</code></pre>\n<pre><code class=\"language-python\">show(*data1, *data2, **data3)\n</code></pre>\n<p>If you do not specify ** for kwargs</p>\n<pre><code class=\"language-python\">show(*data1, *data2, *data3)\n</code></pre>\n<h3>Thinks to Remember(args)</h3>\n<ol>\n<li>Functions can accept a variable number of positional arguments by using <code>*args</code> in the def statement.</li>\n<li>You can use the items from a sequence as the positional arguments for a function with the <code>*</code> operator.</li>\n<li>Using the <code>*</code> operator with a generator may cause your program to run out of memory and crash.</li>\n<li>Adding new positional parameters to functions that accept <code>*args</code> can introduce hard-to-find bugs.</li>\n</ol>\n<h3>Thinks to remember(kwargs)</h3>\n<ol>\n<li>Function arguments can be specified by position or by keyword.</li>\n<li>Keywords make it clear what the purpose of each argument is when it would be confusing with only positional arguments.</li>\n<li>Keyword arguments with default values make it easy to add new behaviors to a function, especially when the function has existing callers.</li>\n<li>Optional keyword arguments should always be passed by keyword instead of by position.</li>\n</ol>\n<h2>Context Manager</h2>\n<p>While Python's context managers are widely used, few understand the purpose behind their use. These statements, commonly used with reading and writing files, assist the application in conserving system memory and improve resource management by ensuring specific resources are only in use for certain processes.</p>\n<h3>with statement</h3>\n<p>A context manager is an object that is notified when a context (a block of code) starts and ends. You commonly use one with the with statement. It takes care of the notifying.</p>\n<p>For example, file objects are context managers. When a context ends, the file object is closed automatically:</p>\n<pre><code class=\"language-python\">with open(filename) as f:\n    file_contents = f.read()\n\n# the open_file object has automatically been closed.\n</code></pre>\n<p>Anything that ends execution of the block causes the context manager's exit method to be called. This includes exceptions, and can be useful when an error causes you to prematurely exit from an open file or connection. Exiting a script without properly closing files/connections is a bad idea, that may cause data loss or other problems. By using a context manager you can ensure that precautions are always taken to prevent damage or loss in this way.</p>\n<h3>Writing your own contextmanager using generator syntax</h3>\n<p>It is also possible to write a context manager using generator syntax thanks to the <code>contextlib.contextmanager</code> decorator:</p>\n<pre><code class=\"language-python\">import contextlib\n\n@contextlib.contextmanager\ndef context_manager(num):\n    print('Enter')\n    yield num + 1\n    print('Exit')\nwith context_manager(2) as cm:\n    # the following instructions are run when the 'yield' point of the context\n    # manager is reached.\n    # 'cm' will have the value that was yielded\n    print('Right in the middle with cm = {}'.format(cm))\n</code></pre>\n<h2><code>__main__</code> Top-level script environment</h2>\n<p><code>__main__</code> is the name of the scope in which top-level code executes.\nA module's <strong>name</strong> is set equal to <code>__main__</code> when read from standard input, a script, or from an interactive prompt.</p>\n<p>A module can discover whether or not it is running in the main scope by checking its own <code>__name__</code>, which allows a common idiom for conditionally executing code in a module when it is run as a script or with <code>python -m</code> but not when it is imported:</p>\n<pre><code class=\"language-python\">if __name__ == \"__main__\":\n    # execute only if run as a script\n    main()\n</code></pre>\n<p>For a package, the same effect can be achieved by including a <strong>main</strong>.py module, the contents of which will be executed when the module is run with -m.</p>\n<p>For example we are developing script which is designed to be used as module, we should do:</p>\n<pre><code class=\"language-python\"># Python program to execute function directly\ndef add(a, b):\n    return a+b\n\nadd(10, 20) # we can test it by calling the function save it as calculate.py\n</code></pre>\n<pre><code class=\"language-python\"># Now if we want to use that module by importing we have to comment out our call,\n# Instead we can write like this in calculate.py\nif __name__ == \"__main__\":\n    add(3, 5)\n</code></pre>\n<pre><code class=\"language-python\">import calculate\n\ncalculate.add(3, 5)\n</code></pre>\n<h3>Advantages</h3>\n<ol>\n<li>Every Python module has it's <code>__name__</code> defined and if this is <code>__main__</code>, it implies that the module is being run standalone by the user and we can do corresponding appropriate actions.</li>\n<li>If you import this script as a module in another script, the <strong>name</strong> is set to the name of the script/module.</li>\n<li>Python files can act as either reusable modules, or as standalone programs.</li>\n<li>if <code>__name__ == “main”:</code> is used to execute some code only if the file was run directly, and not imported.</li>\n</ol>\n<h2>setup.py</h2>\n<p>The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the setup script is to describe your module distribution to the Distutils, so that the various commands that operate on your modules do the right thing.</p>\n<p>The <code>setup.py</code> file is at the heart of a Python project. It describes all of the metadata about your project. There a quite a few fields you can add to a project to give it a rich set of metadata describing the project. However, there are only three required fields: name, version, and packages. The name field must be unique if you wish to publish your package on the Python Package Index (PyPI). The version field keeps track of different releases of the project. The packages field describes where you've put the Python source code within your project.</p>\n<p>This allows you to easily install Python packages. Often it's enough to write:</p>\n<pre><code class=\"language-bash\">python setup.py install\n</code></pre>\n<p>and module will install itself.</p>\n<p>Our initial setup.py will also include information about the license and will re-use the README.txt file for the long_description field. This will look like:</p>\n<pre><code class=\"language-python\">from distutils.core import setup\nsetup(\n   name='pythonCheatsheet',\n   version='0.1',\n   packages=['pipenv',],\n   license='MIT',\n   long_description=open('README.txt').read(),\n)\n</code></pre>\n<p>Find more information visit <a href=\"http://docs.python.org/install/index.html\">http://docs.python.org/install/index.html</a>.</p>\n<h2>Dataclasses</h2>\n<p><code>Dataclasses</code> are python classes but are suited for storing data objects.\nThis module provides a decorator and functions for automatically adding generated special methods such as <code>__init__()</code> and <code>__repr__()</code> to user-defined classes.</p>\n<h3>Features</h3>\n<ol>\n<li>They store data and represent a certain data type. Ex: A number. For people familiar with ORMs, a model instance is a data object. It represents a specific kind of entity. It holds attributes that define or represent the entity.</li>\n<li>They can be compared to other objects of the same type. Ex: A number can be greater than, less than, or equal to another number.</li>\n</ol>\n<p>Python 3.7 provides a decorator dataclass that is used to convert a class into a dataclass.</p>\n<p>python 2.7</p>\n<pre><code class=\"language-python\">class Number:\n    def __init__(self, val):\n        self.val = val\n\nobj = Number(2)\nobj.val\n</code></pre>\n<p>with dataclass</p>\n<pre><code class=\"language-python\">from dataclasses import dataclass\n\n@dataclass\nclass Number:\n    val: int\n\nobj = Number(2)\nobj.val\n</code></pre>\n<h3>Default values</h3>\n<p>It is easy to add default values to the fields of your data class.</p>\n<pre><code class=\"language-python\">from dataclasses import dataclass\n\n@dataclass\nclass Product:\n    name: str\n    count: int = 0\n    price: float = 0.0\n\nobj = Product(\"Python\")\nobj.name\n</code></pre>\n<pre><code class=\"language-python\">obj.count\n</code></pre>\n<pre><code class=\"language-python\">obj.price\n</code></pre>\n<h3>Type hints</h3>\n<p>It is mandatory to define the data type in dataclass. However, If you don't want specify the datatype then, use <code>typing.Any</code>.</p>\n<pre><code class=\"language-python\">from dataclasses import dataclass\nfrom typing import Any\n\n@dataclass\nclass WithoutExplicitTypes:\n   name: Any\n   value: Any = 42\n</code></pre>\n<hr>\n<hr>\n<hr>\n<hr>\n<h1>PART 2:</h1>\n<h1>Single line comments start with a number symbol.</h1>\n<p>\"\"\" Multiline strings can be written\nusing three \"s, and are often used\nas documentation.\n\"\"\"</p>\n<p>####################################################</p>\n<h2>1. Primitive Datatypes and Operators</h2>\n<p>####################################################</p>\n<h1>You have numbers</h1>\n<p>3 # => 3</p>\n<h1>Math is what you would expect</h1>\n<p>1 + 1 # => 2\n8 - 1 # => 7\n10 * 2 # => 20\n35 / 5 # => 7.0</p>\n<h1>Integer division rounds down for both positive and negative numbers.</h1>\n<p>5 // 3 # => 1\n-5 // 3 # => -2\n5.0 // 3.0 # => 1.0 # works on floats too\n-5.0 // 3.0 # => -2.0</p>\n<h1>The result of division is always a float</h1>\n<p>10.0 / 3 # => 3.3333333333333335</p>\n<h1>Modulo operation</h1>\n<p>7 % 3 # => 1</p>\n<h1>Exponentiation (x**y, x to the yth power)</h1>\n<p>2**3 # => 8</p>\n<h1>Enforce precedence with parentheses</h1>\n<p>(1 + 3) * 2 # => 8</p>\n<h1>Boolean values are primitives (Note: the capitalization)</h1>\n<p>True\nFalse</p>\n<h1>negate with not</h1>\n<p>not True # => False\nnot False # => True</p>\n<h1>Boolean Operators</h1>\n<h1>Note \"and\" and \"or\" are case-sensitive</h1>\n<p>True and False # => False\nFalse or True # => True</p>\n<h1>True and False are actually 1 and 0 but with different keywords</h1>\n<p>True + True # => 2\nTrue * 8 # => 8\nFalse - 5 # => -5</p>\n<h1>Comparison operators look at the numerical value of True and False</h1>\n<p>0 == False # => True\n1 == True # => True\n2 == True # => False\n-5 != False # => True</p>\n<h1>Using boolean logical operators on ints casts them to booleans for evaluation, but their non-cast value is returned</h1>\n<h1>Don't mix up with bool(ints) and bitwise and/or (&#x26;,|)</h1>\n<p>bool(0) # => False\nbool(4) # => True\nbool(-6) # => True\n0 and 2 # => 0\n-5 or 0 # => -5</p>\n<h1>Equality is ==</h1>\n<p>1 == 1 # => True\n2 == 1 # => False</p>\n<h1>Inequality is !=</h1>\n<p>1 != 1 # => False\n2 != 1 # => True</p>\n<h1>More comparisons</h1>\n<p>1 &#x3C; 10 # => True\n1 > 10 # => False\n2 &#x3C;= 2 # => True\n2 >= 2 # => True</p>\n<h1>Seeing whether a value is in a range</h1>\n<p>1 &#x3C; 2 and 2 &#x3C; 3 # => True\n2 &#x3C; 3 and 3 &#x3C; 2 # => False</p>\n<h1>Chaining makes this look nicer</h1>\n<p>1 &#x3C; 2 &#x3C; 3 # => True\n2 &#x3C; 3 &#x3C; 2 # => False</p>\n<h1>(is vs. ==) is checks if two variables refer to the same object, but == checks</h1>\n<h1>if the objects pointed to have the same values.</h1>\n<p>a = [1, 2, 3, 4] # Point a at a new list, [1, 2, 3, 4]\nb = a # Point b at what a is pointing to\nb is a # => True, a and b refer to the same object\nb == a # => True, a's and b's objects are equal\nb = [1, 2, 3, 4] # Point b at a new list, [1, 2, 3, 4]\nb is a # => False, a and b do not refer to the same object\nb == a # => True, a's and b's objects are equal</p>\n<h1>Strings are created with \" or '</h1>\n<p>\"This is a string.\"\n'This is also a string.'</p>\n<h1>Strings can be added too! But try not to do this.</h1>\n<p>\"Hello \" + \"world!\" # => \"Hello world!\"</p>\n<h1>String literals (but not variables) can be concatenated without using '+'</h1>\n<p>\"Hello \" \"world!\" # => \"Hello world!\"</p>\n<h1>A string can be treated like a list of characters</h1>\n<p>\"This is a string\"[0] # => 'T'</p>\n<h1>You can find the length of a string</h1>\n<p>len(\"This is a string\") # => 16</p>\n<h1>.format can be used to format strings, like this:</h1>\n<p>\"{} can be {}\".format(\"Strings\", \"interpolated\") # => \"Strings can be interpolated\"</p>\n<h1>You can repeat the formatting arguments to save some typing.</h1>\n<p>\"{0} be nimble, {0} be quick, {0} jump over the {1}\".format(\"Jack\", \"candle stick\")</p>\n<h1>=> \"Jack be nimble, Jack be quick, Jack jump over the candle stick\"</h1>\n<h1>You can use keywords if you don't want to count.</h1>\n<p>\"{name} wants to eat {food}\".format(name=\"Bob\", food=\"lasagna\") # => \"Bob wants to eat lasagna\"</p>\n<h1>If your Python 3 code also needs to run on Python 2.5 and below, you can also</h1>\n<h1>still use the old style of formatting:</h1>\n<p>\"%s can be %s the %s way\" % (\"Strings\", \"interpolated\", \"old\") # => \"Strings can be interpolated the old way\"</p>\n<h1>You can also format using f-strings or formatted string literals (in Python 3.6+)</h1>\n<p>name = \"Reiko\"\nf\"She said her name is {name}.\" # => \"She said her name is Reiko\"</p>\n<h1>You can basically put any Python statement inside the braces and it will be output in the string.</h1>\n<p>f\"{name} is {len(name)} characters long.\" # => \"Reiko is 5 characters long.\"</p>\n<h1>None is an object</h1>\n<p>None # => None</p>\n<h1>Don't use the equality \"==\" symbol to compare objects to None</h1>\n<h1>Use \"is\" instead. This checks for equality of object identity.</h1>\n<p>\"etc\" is None # => False\nNone is None # => True</p>\n<h1>None, 0, and empty strings/lists/dicts/tuples all evaluate to False.</h1>\n<h1>All other values are True</h1>\n<p>bool(0) # => False\nbool(\"\") # => False\nbool([]) # => False\nbool({}) # => False\nbool(()) # => False</p>\n<p>####################################################</p>\n<h2>2. Variables and Collections</h2>\n<p>####################################################</p>\n<h1>Python has a print function</h1>\n<p>print(\"I'm Python. Nice to meet you!\") # => I'm Python. Nice to meet you!</p>\n<h1>By default the print function also prints out a newline at the end.</h1>\n<h1>Use the optional argument end to change the end string.</h1>\n<p>print(\"Hello, World\", end=\"!\") # => Hello, World!</p>\n<h1>Simple way to get input data from console</h1>\n<p>input<em>string</em>var = input(\"Enter some data: \") # Returns the data as a string</p>\n<h1>Note: In earlier versions of Python, input() method was named as raw_input()</h1>\n<h1>There are no declarations, only assignments.</h1>\n<h1>Convention is to use lower<em>case</em>with_underscores</h1>\n<p>some<em>var = 5\nsome</em>var # => 5</p>\n<h1>Accessing a previously unassigned variable is an exception.</h1>\n<h1>See Control Flow to learn more about exception handling.</h1>\n<p>some<em>unknown</em>var # Raises a NameError</p>\n<h1>if can be used as an expression</h1>\n<h1>Equivalent of C's '?:' ternary operator</h1>\n<p>\"yahoo!\" if 3 > 2 else 2 # => \"yahoo!\"</p>\n<h1>Lists store sequences</h1>\n<p>li = []</p>\n<h1>You can start with a prefilled list</h1>\n<p>other_li = [4, 5, 6]</p>\n<h1>Add stuff to the end of a list with append</h1>\n<p>li.append(1) # li is now [1]\nli.append(2) # li is now [1, 2]\nli.append(4) # li is now [1, 2, 4]\nli.append(3) # li is now [1, 2, 4, 3]</p>\n<h1>Remove from the end with pop</h1>\n<p>li.pop() # => 3 and li is now [1, 2, 4]</p>\n<h1>Let's put it back</h1>\n<p>li.append(3) # li is now [1, 2, 4, 3] again.</p>\n<h1>Access a list like you would any array</h1>\n<p>li[0] # => 1</p>\n<h1>Look at the last element</h1>\n<p>li[-1] # => 3</p>\n<h1>Looking out of bounds is an IndexError</h1>\n<p>li[4] # Raises an IndexError</p>\n<h1>You can look at ranges with slice syntax.</h1>\n<h1>The start index is included, the end index is not</h1>\n<h1>(It's a closed/open range for you mathy types.)</h1>\n<p>li[1:3] # Return list from index 1 to 3 => [2, 4]\nli[2:] # Return list starting from index 2 => [4, 3]\nli[:3] # Return list from beginning until index 3 => [1, 2, 4]\nli[::2] # Return list selecting every second entry => [1, 4]\nli[::-1] # Return list in reverse order => [3, 4, 2, 1]</p>\n<h1>Use any combination of these to make advanced slices</h1>\n<h1>li[start:end:step]</h1>\n<h1>Make a one layer deep copy using slices</h1>\n<p>li2 = li[:] # => li2 = [1, 2, 4, 3] but (li2 is li) will result in false.</p>\n<h1>Remove arbitrary elements from a list with \"del\"</h1>\n<p>del li[2] # li is now [1, 2, 3]</p>\n<h1>Remove first occurrence of a value</h1>\n<p>li.remove(2) # li is now [1, 3]\nli.remove(2) # Raises a ValueError as 2 is not in the list</p>\n<h1>Insert an element at a specific index</h1>\n<p>li.insert(1, 2) # li is now [1, 2, 3] again</p>\n<h1>Get the index of the first item found matching the argument</h1>\n<p>li.index(2) # => 1\nli.index(4) # Raises a ValueError as 4 is not in the list</p>\n<h1>You can add lists</h1>\n<h1>Note: values for li and for other_li are not modified.</h1>\n<p>li + other_li # => [1, 2, 3, 4, 5, 6]</p>\n<h1>Concatenate lists with \"extend()\"</h1>\n<p>li.extend(other_li) # Now li is [1, 2, 3, 4, 5, 6]</p>\n<h1>Check for existence in a list with \"in\"</h1>\n<p>1 in li # => True</p>\n<h1>Examine the length with \"len()\"</h1>\n<p>len(li) # => 6</p>\n<h1>Tuples are like lists but are immutable.</h1>\n<p>tup = (1, 2, 3)\ntup[0] # => 1\ntup[0] = 3 # Raises a TypeError</p>\n<h1>Note that a tuple of length one has to have a comma after the last element but</h1>\n<h1>tuples of other lengths, even zero, do not.</h1>\n<p>type((1)) # => &#x3C;class 'int'>\ntype((1,)) # => &#x3C;class 'tuple'>\ntype(()) # => &#x3C;class 'tuple'></p>\n<h1>You can do most of the list operations on tuples too</h1>\n<p>len(tup) # => 3\ntup + (4, 5, 6) # => (1, 2, 3, 4, 5, 6)\ntup[:2] # => (1, 2)\n2 in tup # => True</p>\n<h1>You can unpack tuples (or lists) into variables</h1>\n<p>a, b, c = (1, 2, 3) # a is now 1, b is now 2 and c is now 3</p>\n<h1>You can also do extended unpacking</h1>\n<p>a, *b, c = (1, 2, 3, 4) # a is now 1, b is now [2, 3] and c is now 4</p>\n<h1>Tuples are created by default if you leave out the parentheses</h1>\n<p>d, e, f = 4, 5, 6 # tuple 4, 5, 6 is unpacked into variables d, e and f</p>\n<h1>respectively such that d = 4, e = 5 and f = 6</h1>\n<h1>Now look how easy it is to swap two values</h1>\n<p>e, d = d, e # d is now 5 and e is now 4</p>\n<h1>Dictionaries store mappings from keys to values</h1>\n<p>empty_dict = {}</p>\n<h1>Here is a prefilled dictionary</h1>\n<p>filled_dict = {\"one\": 1, \"two\": 2, \"three\": 3}</p>\n<h1>Note keys for dictionaries have to be immutable types. This is to ensure that</h1>\n<h1>the key can be converted to a constant hash value for quick look-ups.</h1>\n<h1>Immutable types include ints, floats, strings, tuples.</h1>\n<p>invalid<em>dict = {[1,2,3]: \"123\"} # => Raises a TypeError: unhashable type: 'list'\nvalid</em>dict = {(1,2,3):[1,2,3]} # Values can be of any type, however.</p>\n<h1>Look up values with []</h1>\n<p>filled_dict[\"one\"] # => 1</p>\n<h1>Get all keys as an iterable with \"keys()\". We need to wrap the call in list()</h1>\n<h1>to turn it into a list. We'll talk about those later. Note - for Python</h1>\n<h1>versions &#x3C;3.7, dictionary key ordering is not guaranteed. Your results might</h1>\n<h1>not match the example below exactly. However, as of Python 3.7, dictionary</h1>\n<h1>items maintain the order at which they are inserted into the dictionary.</h1>\n<p>list(filled<em>dict.keys()) # => [\"three\", \"two\", \"one\"] in Python &#x3C;3.7\nlist(filled</em>dict.keys()) # => [\"one\", \"two\", \"three\"] in Python 3.7+</p>\n<h1>Get all values as an iterable with \"values()\". Once again we need to wrap it</h1>\n<h1>in list() to get it out of the iterable. Note - Same as above regarding key</h1>\n<h1>ordering.</h1>\n<p>list(filled<em>dict.values()) # => [3, 2, 1] in Python &#x3C;3.7\nlist(filled</em>dict.values()) # => [1, 2, 3] in Python 3.7+</p>\n<h1>Check for existence of keys in a dictionary with \"in\"</h1>\n<p>\"one\" in filled<em>dict # => True\n1 in filled</em>dict # => False</p>\n<h1>Looking up a non-existing key is a KeyError</h1>\n<p>filled_dict[\"four\"] # KeyError</p>\n<h1>Use \"get()\" method to avoid the KeyError</h1>\n<p>filled<em>dict.get(\"one\") # => 1\nfilled</em>dict.get(\"four\") # => None</p>\n<h1>The get method supports a default argument when the value is missing</h1>\n<p>filled<em>dict.get(\"one\", 4) # => 1\nfilled</em>dict.get(\"four\", 4) # => 4</p>\n<h1>\"setdefault()\" inserts into a dictionary only if the given key isn't present</h1>\n<p>filled<em>dict.setdefault(\"five\", 5) # filled</em>dict[\"five\"] is set to 5\nfilled<em>dict.setdefault(\"five\", 6) # filled</em>dict[\"five\"] is still 5</p>\n<h1>Adding to a dictionary</h1>\n<p>filled<em>dict.update({\"four\":4}) # => {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\nfilled</em>dict[\"four\"] = 4 # another way to add to dict</p>\n<h1>Remove keys from a dictionary with del</h1>\n<p>del filled_dict[\"one\"] # Removes the key \"one\" from filled dict</p>\n<h1>From Python 3.5 you can also use the additional unpacking options</h1>\n<p>{'a': 1, **{'b': 2}} # => {'a': 1, 'b': 2}\n{'a': 1, **{'a': 2}} # => {'a': 2}</p>\n<h1>Sets store ... well sets</h1>\n<p>empty_set = set()</p>\n<h1>Initialize a set with a bunch of values. Yeah, it looks a bit like a dict. Sorry.</h1>\n<p>some<em>set = {1, 1, 2, 2, 3, 4} # some</em>set is now {1, 2, 3, 4}</p>\n<h1>Similar to keys of a dictionary, elements of a set have to be immutable.</h1>\n<p>invalid<em>set = {[1], 1} # => Raises a TypeError: unhashable type: 'list'\nvalid</em>set = {(1,), 1}</p>\n<h1>Add one more item to the set</h1>\n<p>filled<em>set = some</em>set\nfilled<em>set.add(5) # filled</em>set is now {1, 2, 3, 4, 5}</p>\n<h1>Sets do not have duplicate elements</h1>\n<p>filled_set.add(5) # it remains as before {1, 2, 3, 4, 5}</p>\n<h1>Do set intersection with &#x26;</h1>\n<p>other<em>set = {3, 4, 5, 6}\nfilled</em>set &#x26; other_set # => {3, 4, 5}</p>\n<h1>Do set union with |</h1>\n<p>filled<em>set | other</em>set # => {1, 2, 3, 4, 5, 6}</p>\n<h1>Do set difference with -</h1>\n<p>{1, 2, 3, 4} - {2, 3, 5} # => {1, 4}</p>\n<h1>Do set symmetric difference with ^</h1>\n<p>{1, 2, 3, 4} ^ {2, 3, 5} # => {1, 4, 5}</p>\n<h1>Check if set on the left is a superset of set on the right</h1>\n<p>{1, 2} >= {1, 2, 3} # => False</p>\n<h1>Check if set on the left is a subset of set on the right</h1>\n<p>{1, 2} &#x3C;= {1, 2, 3} # => True</p>\n<h1>Check for existence in a set with in</h1>\n<p>2 in filled<em>set # => True\n10 in filled</em>set # => False</p>\n<p>####################################################</p>\n<h2>3. Control Flow and Iterables</h2>\n<p>####################################################</p>\n<h1>Let's just make a variable</h1>\n<p>some_var = 5</p>\n<h1>Here is an if statement. Indentation is significant in Python!</h1>\n<h1>Convention is to use four spaces, not tabs.</h1>\n<h1>This prints \"some_var is smaller than 10\"</h1>\n<p>if some<em>var > 10:\nprint(\"some</em>var is totally bigger than 10.\")\nelif some<em>var &#x3C; 10: # This elif clause is optional.\nprint(\"some</em>var is smaller than 10.\")\nelse: # This is optional too.\nprint(\"some_var is indeed 10.\")</p>\n<p>\"\"\"\nFor loops iterate over lists\nprints:\ndog is a mammal\ncat is a mammal\nmouse is a mammal\n\"\"\"\nfor animal in [\"dog\", \"cat\", \"mouse\"]: # You can use format() to interpolate formatted strings\nprint(\"{} is a mammal\".format(animal))</p>\n<p>\"\"\"\n\"range(number)\" returns an iterable of numbers\nfrom zero to the given number\nprints:\n0\n1\n2\n3\n\"\"\"\nfor i in range(4):\nprint(i)</p>\n<p>\"\"\"\n\"range(lower, upper)\" returns an iterable of numbers\nfrom the lower number to the upper number\nprints:\n4\n5\n6\n7\n\"\"\"\nfor i in range(4, 8):\nprint(i)</p>\n<p>\"\"\"\n\"range(lower, upper, step)\" returns an iterable of numbers\nfrom the lower number to the upper number, while incrementing\nby step. If step is not indicated, the default value is 1.\nprints:\n4\n6\n\"\"\"\nfor i in range(4, 8, 2):\nprint(i)</p>\n<p>\"\"\"\nTo loop over a list, and retrieve both the index and the value of each item in the list\nprints:\n0 dog\n1 cat\n2 mouse\n\"\"\"\nlist = [\"dog\", \"cat\", \"mouse\"]\nfor i, value in enumerate(list):\nprint(i, value)</p>\n<p>\"\"\"\nWhile loops go until a condition is no longer met.\nprints:\n0\n1\n2\n3\n\"\"\"\nx = 0\nwhile x &#x3C; 4:\nprint(x)\nx += 1 # Shorthand for x = x + 1</p>\n<h1>Handle exceptions with a try/except block</h1>\n<p>try: # Use \"raise\" to raise an error\nraise IndexError(\"This is an index error\")\nexcept IndexError as e:\npass # Pass is just a no-op. Usually you would do recovery here.\nexcept (TypeError, NameError):\npass # Multiple exceptions can be handled together, if required.\nelse: # Optional clause to the try/except block. Must follow all except blocks\nprint(\"All good!\") # Runs only if the code in try raises no exceptions\nfinally: # Execute under all circumstances\nprint(\"We can clean up resources here\")</p>\n<h1>Instead of try/finally to cleanup resources you can use a with statement</h1>\n<p>with open(\"myfile.txt\") as f:\nfor line in f:\nprint(line)</p>\n<h1>Writing to a file</h1>\n<p>contents = {\"aa\": 12, \"bb\": 21}\nwith open(\"myfile1.txt\", \"w+\") as file:\nfile.write(str(contents)) # writes a string to a file</p>\n<p>with open(\"myfile2.txt\", \"w+\") as file:\nfile.write(json.dumps(contents)) # writes an object to a file</p>\n<h1>Reading from a file</h1>\n<p>with open('myfile1.txt', \"r+\") as file:\ncontents = file.read() # reads a string from a file\nprint(contents)</p>\n<h1>print: {\"aa\": 12, \"bb\": 21}</h1>\n<p>with open('myfile2.txt', \"r+\") as file:\ncontents = json.load(file) # reads a json object from a file\nprint(contents)</p>\n<h1>print: {\"aa\": 12, \"bb\": 21}</h1>\n<h1>Python offers a fundamental abstraction called the Iterable.</h1>\n<h1>An iterable is an object that can be treated as a sequence.</h1>\n<h1>The object returned by the range function, is an iterable.</h1>\n<p>filled<em>dict = {\"one\": 1, \"two\": 2, \"three\": 3}\nour</em>iterable = filled<em>dict.keys()\nprint(our</em>iterable) # => dict_keys(['one', 'two', 'three']). This is an object that implements our Iterable interface.</p>\n<h1>We can loop over it.</h1>\n<p>for i in our_iterable:\nprint(i) # Prints one, two, three</p>\n<h1>However we cannot address elements by index.</h1>\n<p>our_iterable[1] # Raises a TypeError</p>\n<h1>An iterable is an object that knows how to create an iterator.</h1>\n<p>our<em>iterator = iter(our</em>iterable)</p>\n<h1>Our iterator is an object that can remember the state as we traverse through it.</h1>\n<h1>We get the next object with \"next()\".</h1>\n<p>next(our_iterator) # => \"one\"</p>\n<h1>It maintains state as we iterate.</h1>\n<p>next(our<em>iterator) # => \"two\"\nnext(our</em>iterator) # => \"three\"</p>\n<h1>After the iterator has returned all of its data, it raises a StopIteration exception</h1>\n<p>next(our_iterator) # Raises StopIteration</p>\n<h1>We can also loop over it, in fact, \"for\" does this implicitly!</h1>\n<p>our<em>iterator = iter(our</em>iterable)\nfor i in our_iterator:\nprint(i) # Prints one, two, three</p>\n<h1>You can grab all the elements of an iterable or iterator by calling list() on it.</h1>\n<p>list(our<em>iterable) # => Returns [\"one\", \"two\", \"three\"]\nlist(our</em>iterator) # => Returns [] because state is saved</p>\n<p>####################################################</p>\n<h2>4. Functions</h2>\n<p>####################################################</p>\n<h1>Use \"def\" to create new functions</h1>\n<p>def add(x, y):\nprint(\"x is {} and y is {}\".format(x, y))\nreturn x + y # Return values with a return statement</p>\n<h1>Calling functions with parameters</h1>\n<p>add(5, 6) # => prints out \"x is 5 and y is 6\" and returns 11</p>\n<h1>Another way to call functions is with keyword arguments</h1>\n<p>add(y=6, x=5) # Keyword arguments can arrive in any order.</p>\n<h1>You can define functions that take a variable number of</h1>\n<h1>positional arguments</h1>\n<p>def varargs(*args):\nreturn args</p>\n<p>varargs(1, 2, 3) # => (1, 2, 3)</p>\n<h1>You can define functions that take a variable number of</h1>\n<h1>keyword arguments, as well</h1>\n<p>def keyword_args(**kwargs):\nreturn kwargs</p>\n<h1>Let's call it to see what happens</h1>\n<p>keyword_args(big=\"foot\", loch=\"ness\") # => {\"big\": \"foot\", \"loch\": \"ness\"}</p>\n<h1>You can do both at once, if you like</h1>\n<p>def all<em>the</em>args(*args, **kwargs):\nprint(args)\nprint(kwargs)\n\"\"\"\nall<em>the</em>args(1, 2, a=3, b=4) prints:\n(1, 2)\n{\"a\": 3, \"b\": 4}\n\"\"\"</p>\n<h1>When calling functions, you can do the opposite of args/kwargs!</h1>\n<h1>Use * to expand tuples and use ** to expand kwargs.</h1>\n<p>args = (1, 2, 3, 4)\nkwargs = {\"a\": 3, \"b\": 4}\nall<em>the</em>args(<em>args) # equivalent to all<em>the</em>args(1, 2, 3, 4)\nall<em>the</em>args(\\</em>*kwargs) # equivalent to all<em>the</em>args(a=3, b=4)\nall<em>the</em>args(<em>args, \\</em>*kwargs) # equivalent to all<em>the</em>args(1, 2, 3, 4, a=3, b=4)</p>\n<h1>Returning multiple values (with tuple assignments)</h1>\n<p>def swap(x, y):\nreturn y, x # Return multiple values as a tuple without the parenthesis. # (Note: parenthesis have been excluded but can be included)</p>\n<p>x = 1\ny = 2\nx, y = swap(x, y) # => x = 2, y = 1</p>\n<h1>(x, y) = swap(x,y) # Again parenthesis have been excluded but can be included.</h1>\n<h1>Function Scope</h1>\n<p>x = 5</p>\n<p>def set_x(num): # Local var x not the same as global variable x\nx = num # => 43\nprint(x) # => 43</p>\n<p>def set<em>global</em>x(num):\nglobal x\nprint(x) # => 5\nx = num # global var x is now set to 6\nprint(x) # => 6</p>\n<p>set<em>x(43)\nset</em>global_x(6)</p>\n<h1>Python has first class functions</h1>\n<p>def create_adder(x):\ndef adder(y):\nreturn x + y\nreturn adder</p>\n<p>add<em>10 = create</em>adder(10)\nadd_10(3) # => 13</p>\n<h1>There are also anonymous functions</h1>\n<p>(lambda x: x > 2)(3) # => True\n(lambda x, y: x ** 2 + y ** 2)(2, 1) # => 5</p>\n<h1>There are built-in higher order functions</h1>\n<p>list(map(add_10, [1, 2, 3])) # => [11, 12, 13]\nlist(map(max, [1, 2, 3], [4, 2, 1])) # => [4, 2, 3]</p>\n<p>list(filter(lambda x: x > 5, [3, 4, 5, 6, 7])) # => [6, 7]</p>\n<h1>We can use list comprehensions for nice maps and filters</h1>\n<h1>List comprehension stores the output as a list which can itself be a nested list</h1>\n<p>[add_10(i) for i in [1, 2, 3]] # => [11, 12, 13]\n[x for x in [3, 4, 5, 6, 7] if x > 5] # => [6, 7]</p>\n<h1>You can construct set and dict comprehensions as well.</h1>\n<p>{x for x in 'abcddeef' if x not in 'abc'} # => {'d', 'e', 'f'}\n{x: x**2 for x in range(5)} # => {0: 0, 1: 1, 2: 4, 3: 9, 4: 16}</p>\n<p>####################################################</p>\n<h2>5. Modules</h2>\n<p>####################################################</p>\n<h1>You can import modules</h1>\n<p>import math\nprint(math.sqrt(16)) # => 4.0</p>\n<h1>You can get specific functions from a module</h1>\n<p>from math import ceil, floor\nprint(ceil(3.7)) # => 4.0\nprint(floor(3.7)) # => 3.0</p>\n<h1>You can import all functions from a module.</h1>\n<h1>Warning: this is not recommended</h1>\n<p>from math import *</p>\n<h1>You can shorten module names</h1>\n<p>import math as m\nmath.sqrt(16) == m.sqrt(16) # => True</p>\n<h1>Python modules are just ordinary Python files. You</h1>\n<h1>can write your own, and import them. The name of the</h1>\n<h1>module is the same as the name of the file.</h1>\n<h1>You can find out which functions and attributes</h1>\n<h1>are defined in a module.</h1>\n<p>import math\ndir(math)</p>\n<h1>If you have a Python script named math.py in the same</h1>\n<h1>folder as your current script, the file math.py will</h1>\n<h1>be loaded instead of the built-in Python module.</h1>\n<h1>This happens because the local folder has priority</h1>\n<h1>over Python's built-in libraries.</h1>\n<p>####################################################</p>\n<h2>6. Classes</h2>\n<p>####################################################</p>\n<h1>We use the \"class\" statement to create a class</h1>\n<p>class Human:</p>\n<pre><code># A class attribute. It is shared by all instances of this class\nspecies = \"H. sapiens\"\n\n# Basic initializer, this is called when this class is instantiated.\n# Note that the double leading and trailing underscores denote objects\n# or attributes that are used by Python but that live in user-controlled\n# namespaces. Methods(or objects or attributes) like: __init__, __str__,\n# __repr__ etc. are called special methods (or sometimes called dunder methods)\n# You should not invent such names on your own.\ndef __init__(self, name):\n    # Assign the argument to the instance's name attribute\n    self.name = name\n\n    # Initialize property\n    self._age = 0\n\n# An instance method. All methods take \"self\" as the first argument\ndef say(self, msg):\n    print(\"{name}: {message}\".format(name=self.name, message=msg))\n\n# Another instance method\ndef sing(self):\n    return 'yo... yo... microphone check... one two... one two...'\n\n# A class method is shared among all instances\n# They are called with the calling class as the first argument\n@classmethod\ndef get_species(cls):\n    return cls.species\n\n# A static method is called without a class or instance reference\n@staticmethod\ndef grunt():\n    return \"*grunt*\"\n\n# A property is just like a getter.\n# It turns the method age() into an read-only attribute of the same name.\n# There's no need to write trivial getters and setters in Python, though.\n@property\ndef age(self):\n    return self._age\n\n# This allows the property to be set\n@age.setter\ndef age(self, age):\n    self._age = age\n\n# This allows the property to be deleted\n@age.deleter\ndef age(self):\n    del self._age\n</code></pre>\n<h1>When a Python interpreter reads a source file it executes all its code.</h1>\n<h1>This <strong>name</strong> check makes sure this code block is only executed when this</h1>\n<h1>module is the main program.</h1>\n<p>if <strong>name</strong> == '<strong>main</strong>': # Instantiate a class\ni = Human(name=\"Ian\")\ni.say(\"hi\") # \"Ian: hi\"\nj = Human(\"Joel\")\nj.say(\"hello\") # \"Joel: hello\" # i and j are instances of type Human, or in other words: they are Human objects</p>\n<pre><code># Call our class method\ni.say(i.get_species())          # \"Ian: H. sapiens\"\n# Change the shared attribute\nHuman.species = \"H. neanderthalensis\"\ni.say(i.get_species())          # => \"Ian: H. neanderthalensis\"\nj.say(j.get_species())          # => \"Joel: H. neanderthalensis\"\n\n# Call the static method\nprint(Human.grunt())            # => \"*grunt*\"\n\n# Cannot call static method with instance of object\n# because i.grunt() will automatically put \"self\" (the object i) as an argument\nprint(i.grunt())                # => TypeError: grunt() takes 0 positional arguments but 1 was given\n\n# Update the property for this instance\ni.age = 42\n# Get the property\ni.say(i.age)                    # => \"Ian: 42\"\nj.say(j.age)                    # => \"Joel: 0\"\n# Delete the property\ndel i.age\n# i.age                         # => this would raise an AttributeError\n</code></pre>\n<p>####################################################</p>\n<h2>6.1 Inheritance</h2>\n<p>####################################################</p>\n<h1>Inheritance allows new child classes to be defined that inherit methods and</h1>\n<h1>variables from their parent class.</h1>\n<h1>Using the Human class defined above as the base or parent class, we can</h1>\n<h1>define a child class, Superhero, which inherits the class variables like</h1>\n<h1>\"species\", \"name\", and \"age\", as well as methods, like \"sing\" and \"grunt\"</h1>\n<h1>from the Human class, but can also have its own unique properties.</h1>\n<h1>To take advantage of modularization by file you could place the classes above in their own files,</h1>\n<h1>say, human.py</h1>\n<h1>To import functions from other files use the following format</h1>\n<h1>from \"filename-without-extension\" import \"function-or-class\"</h1>\n<p>from human import Human</p>\n<h1>Specify the parent class(es) as parameters to the class definition</h1>\n<p>class Superhero(Human):</p>\n<pre><code># If the child class should inherit all of the parent's definitions without\n# any modifications, you can just use the \"pass\" keyword (and nothing else)\n# but in this case it is commented out to allow for a unique child class:\n# pass\n\n# Child classes can override their parents' attributes\nspecies = 'Superhuman'\n\n# Children automatically inherit their parent class's constructor including\n# its arguments, but can also define additional arguments or definitions\n# and override its methods such as the class constructor.\n# This constructor inherits the \"name\" argument from the \"Human\" class and\n# adds the \"superpower\" and \"movie\" arguments:\ndef __init__(self, name, movie=False,\n             superpowers=[\"super strength\", \"bulletproofing\"]):\n\n    # add additional class attributes:\n    self.fictional = True\n    self.movie = movie\n    # be aware of mutable default values, since defaults are shared\n    self.superpowers = superpowers\n\n    # The \"super\" function lets you access the parent class's methods\n    # that are overridden by the child, in this case, the __init__ method.\n    # This calls the parent class constructor:\n    super().__init__(name)\n\n# override the sing method\ndef sing(self):\n    return 'Dun, dun, DUN!'\n\n# add an additional instance method\ndef boast(self):\n    for power in self.superpowers:\n        print(\"I wield the power of {pow}!\".format(pow=power))\n</code></pre>\n<p>if <strong>name</strong> == '<strong>main</strong>':\nsup = Superhero(name=\"Tick\")</p>\n<pre><code># Instance type checks\nif isinstance(sup, Human):\n    print('I am human')\nif type(sup) is Superhero:\n    print('I am a superhero')\n\n# Get the Method Resolution search Order used by both getattr() and super()\n# This attribute is dynamic and can be updated\nprint(Superhero.__mro__)    # => (&#x3C;class '__main__.Superhero'>,\n                            # => &#x3C;class 'human.Human'>, &#x3C;class 'object'>)\n\n# Calls parent method but uses its own class attribute\nprint(sup.get_species())    # => Superhuman\n\n# Calls overridden method\nprint(sup.sing())           # => Dun, dun, DUN!\n\n# Calls method from Human\nsup.say('Spoon')            # => Tick: Spoon\n\n# Call method that exists only in Superhero\nsup.boast()                 # => I wield the power of super strength!\n                            # => I wield the power of bulletproofing!\n\n# Inherited class attribute\nsup.age = 31\nprint(sup.age)              # => 31\n\n# Attribute that only exists within Superhero\nprint('Am I Oscar eligible? ' + str(sup.movie))\n</code></pre>\n<p>####################################################</p>\n<h2>6.2 Multiple Inheritance</h2>\n<p>####################################################</p>\n<h1>Another class definition</h1>\n<h1>bat.py</h1>\n<p>class Bat:</p>\n<pre><code>species = 'Baty'\n\ndef __init__(self, can_fly=True):\n    self.fly = can_fly\n\n# This class also has a say method\ndef say(self, msg):\n    msg = '... ... ...'\n    return msg\n\n# And its own method as well\ndef sonar(self):\n    return '))) ... ((('\n</code></pre>\n<p>if <strong>name</strong> == '<strong>main</strong>':\nb = Bat()\nprint(b.say('hello'))\nprint(b.fly)</p>\n<h1>And yet another class definition that inherits from Superhero and Bat</h1>\n<h1>superhero.py</h1>\n<p>from superhero import Superhero\nfrom bat import Bat</p>\n<h1>Define Batman as a child that inherits from both Superhero and Bat</h1>\n<p>class Batman(Superhero, Bat):</p>\n<pre><code>def __init__(self, *args, **kwargs):\n    # Typically to inherit attributes you have to call super:\n    # super(Batman, self).__init__(*args, **kwargs)\n    # However we are dealing with multiple inheritance here, and super()\n    # only works with the next base class in the MRO list.\n    # So instead we explicitly call __init__ for all ancestors.\n    # The use of *args and **kwargs allows for a clean way to pass arguments,\n    # with each parent \"peeling a layer of the onion\".\n    Superhero.__init__(self, 'anonymous', movie=True,\n                       superpowers=['Wealthy'], *args, **kwargs)\n    Bat.__init__(self, *args, can_fly=False, **kwargs)\n    # override the value for the name attribute\n    self.name = 'Sad Affleck'\n\ndef sing(self):\n    return 'nan nan nan nan nan batman!'\n</code></pre>\n<p>if <strong>name</strong> == '<strong>main</strong>':\nsup = Batman()</p>\n<pre><code># Get the Method Resolution search Order used by both getattr() and super().\n# This attribute is dynamic and can be updated\nprint(Batman.__mro__)       # => (&#x3C;class '__main__.Batman'>,\n                            # => &#x3C;class 'superhero.Superhero'>,\n                            # => &#x3C;class 'human.Human'>,\n                            # => &#x3C;class 'bat.Bat'>, &#x3C;class 'object'>)\n\n# Calls parent method but uses its own class attribute\nprint(sup.get_species())    # => Superhuman\n\n# Calls overridden method\nprint(sup.sing())           # => nan nan nan nan nan batman!\n\n# Calls method from Human, because inheritance order matters\nsup.say('I agree')          # => Sad Affleck: I agree\n\n# Call method that exists only in 2nd ancestor\nprint(sup.sonar())          # => ))) ... (((\n\n# Inherited class attribute\nsup.age = 100\nprint(sup.age)              # => 100\n\n# Inherited attribute from 2nd ancestor whose default value was overridden.\nprint('Can I fly? ' + str(sup.fly)) # => Can I fly? False\n</code></pre>\n<p>####################################################</p>\n<h2>7. Advanced</h2>\n<p>####################################################</p>\n<h1>Generators help you make lazy code.</h1>\n<p>def double_numbers(iterable):\nfor i in iterable:\nyield i + i</p>\n<h1>Generators are memory-efficient because they only load the data needed to</h1>\n<h1>process the next value in the iterable. This allows them to perform</h1>\n<h1>operations on otherwise prohibitively large value ranges.</h1>\n<h1>NOTE: <code>range</code> replaces <code>xrange</code> in Python 3.</h1>\n<p>for i in double_numbers(range(1, 900000000)): # <code>range</code> is a generator.\nprint(i)\nif i >= 30:\nbreak</p>\n<h1>Just as you can create a list comprehension, you can create generator</h1>\n<h1>comprehensions as well.</h1>\n<p>values = (-x for x in [1,2,3,4,5])\nfor x in values:\nprint(x) # prints -1 -2 -3 -4 -5 to console/terminal</p>\n<h1>You can also cast a generator comprehension directly to a list.</h1>\n<p>values = (-x for x in [1,2,3,4,5])\ngen<em>to</em>list = list(values)\nprint(gen<em>to</em>list) # => [-1, -2, -3, -4, -5]</p>\n<h1>Decorators</h1>\n<h1>In this example <code>beg</code> wraps <code>say</code>. If say_please is True then it</h1>\n<h1>will change the returned message.</h1>\n<p>from functools import wraps</p>\n<p>def beg(target<em>function):\n@wraps(target</em>function)\ndef wrapper(<em>args, \\</em>*kwargs):\nmsg, say<em>please = target</em>function(<em>args, \\</em>*kwargs)\nif say_please:\nreturn \"{} {}\".format(msg, \"Please! I am poor :(\")\nreturn msg</p>\n<pre><code>return wrapper\n</code></pre>\n<p>@beg\ndef say(say<em>please=False):\nmsg = \"Can you buy me a beer?\"\nreturn msg, say</em>please</p>\n<p>print(say()) # Can you buy me a beer?\nprint(say(say_please=True)) # Can you buy me a beer? Please! I am poor :(</p>"},{"url":"/docs/python/comprehensive-guide/","relativePath":"docs/python/comprehensive-guide.md","relativeDir":"docs/python","base":"comprehensive-guide.md","name":"comprehensive-guide","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Comprehensive Python Guide</h2>\n<ul>\n<li>\n<p><a href=\"#about\">About</a></p>\n<ul>\n<li><a href=\"#contribute\">Contribute</a></li>\n<li><a href=\"#read-it\">Read It</a></li>\n<li><a href=\"#python-cheatsheet\">Python Cheatsheet</a></li>\n<li><a href=\"#the-zen-of-python\">The Zen of Python</a></li>\n<li>\n<p><a href=\"#python-basics\">Python Basics</a></p>\n<ul>\n<li><a href=\"#math-operators\">Math Operators</a></li>\n<li><a href=\"#data-types\">Data Types</a></li>\n<li><a href=\"#string-concatenation-and-replication\">String Concatenation and Replication</a></li>\n<li><a href=\"#variables\">Variables</a></li>\n<li><a href=\"#comments\">Comments</a></li>\n<li><a href=\"#the-print-function\">The print() Function</a></li>\n<li><a href=\"#the-input-function\">The input() Function</a></li>\n<li><a href=\"#the-len-function\">The len() Function</a></li>\n<li><a href=\"#the-str-int-and-float-functions\">The str(), int(), and float() Functions</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#flow-control\">Flow Control</a></p>\n<ul>\n<li><a href=\"#comparison-operators\">Comparison Operators</a></li>\n<li><a href=\"#boolean-evaluation\">Boolean evaluation</a></li>\n<li><a href=\"#boolean-operators\">Boolean Operators</a></li>\n<li><a href=\"#mixing-boolean-and-comparison-operators\">Mixing Boolean and Comparison Operators</a></li>\n<li><a href=\"#if-statements\">if Statements</a></li>\n<li><a href=\"#else-statements\">else Statements</a></li>\n<li><a href=\"#elif-statements\">elif Statements</a></li>\n<li><a href=\"#while-loop-statements\">while Loop Statements</a></li>\n<li><a href=\"#break-statements\">break Statements</a></li>\n<li><a href=\"#continue-statements\">continue Statements</a></li>\n<li><a href=\"#for-loops-and-the-range-function\">for Loops and the range() Function</a></li>\n<li><a href=\"#for-else-statement\">For else statement</a></li>\n<li><a href=\"#importing-modules\">Importing Modules</a></li>\n<li><a href=\"#ending-a-program-early-with-sysexit\">Ending a Program Early with sys.exit()</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#functions\">Functions</a></p>\n<ul>\n<li><a href=\"#return-values-and-return-statements\">Return Values and return Statements</a></li>\n<li><a href=\"#the-none-value\">The None Value</a></li>\n<li><a href=\"#keyword-arguments-and-print\">Keyword Arguments and print()</a></li>\n<li><a href=\"#local-and-global-scope\">Local and Global Scope</a></li>\n<li><a href=\"#the-global-statement\">The global Statement</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#exception-handling\">Exception Handling</a></p>\n<ul>\n<li><a href=\"#basic-exception-handling\">Basic exception handling</a></li>\n<li><a href=\"#final-code-in-exception-handling\">Final code in exception handling</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#lists\">Lists</a></p>\n<ul>\n<li><a href=\"#getting-individual-values-in-a-list-with-indexes\">Getting Individual Values in a List with Indexes</a></li>\n<li><a href=\"#negative-indexes\">Negative Indexes</a></li>\n<li><a href=\"#getting-sublists-with-slices\">Getting Sublists with Slices</a></li>\n<li><a href=\"#getting-a-lists-length-with-len\">Getting a List's Length with len()</a></li>\n<li><a href=\"#changing-values-in-a-list-with-indexes\">Changing Values in a List with Indexes</a></li>\n<li><a href=\"#list-concatenation-and-list-replication\">List Concatenation and List Replication</a></li>\n<li><a href=\"#removing-values-from-lists-with-del-statements\">Removing Values from Lists with del Statements</a></li>\n<li><a href=\"#using-for-loops-with-lists\">Using for Loops with Lists</a></li>\n<li><a href=\"#looping-through-multiple-lists-with-zip\">Looping Through Multiple Lists with zip()</a></li>\n<li><a href=\"#the-in-and-not-in-operators\">The in and not in Operators</a></li>\n<li><a href=\"#the-multiple-assignment-trick\">The Multiple Assignment Trick</a></li>\n<li><a href=\"#augmented-assignment-operators\">Augmented Assignment Operators</a></li>\n<li><a href=\"#finding-a-value-in-a-list-with-the-index-method\">Finding a Value in a List with the index() Method</a></li>\n<li><a href=\"#adding-values-to-lists-with-the-append-and-insert-methods\">Adding Values to Lists with the append() and insert() Methods</a></li>\n<li><a href=\"#removing-values-from-lists-with-remove\">Removing Values from Lists with remove()</a></li>\n<li><a href=\"#removing-values-from-lists-with-pop\">Removing Values from Lists with pop()</a></li>\n<li><a href=\"#sorting-the-values-in-a-list-with-the-sort-method\">Sorting the Values in a List with the sort() Method</a></li>\n<li><a href=\"#tuple-data-type\">Tuple Data Type</a></li>\n<li><a href=\"#converting-types-with-the-list-and-tuple-functions\">Converting Types with the list() and tuple() Functions</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#dictionaries-and-structuring-data\">Dictionaries and Structuring Data</a></p>\n<ul>\n<li><a href=\"#the-keys-values-and-items-methods\">The keys(), values(), and items() Methods</a></li>\n<li><a href=\"#checking-whether-a-key-or-value-exists-in-a-dictionary\">Checking Whether a Key or Value Exists in a Dictionary</a></li>\n<li><a href=\"#the-get-method\">The get() Method</a></li>\n<li><a href=\"#the-setdefault-method\">The setdefault() Method</a></li>\n<li><a href=\"#pretty-printing\">Pretty Printing</a></li>\n<li><a href=\"#merge-two-dictionaries\">Merge two dictionaries</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#sets\">sets</a></p>\n<ul>\n<li><a href=\"#initializing-a-set\">Initializing a set</a></li>\n<li><a href=\"#sets-unordered-collections-of-unique-elements\">sets: unordered collections of unique elements</a></li>\n<li><a href=\"#set-add-and-update\">set add() and update()</a></li>\n<li><a href=\"#set-remove-and-discard\">set remove() and discard()</a></li>\n<li><a href=\"#set-union\">set union()</a></li>\n<li><a href=\"#set-intersection\">set intersection</a></li>\n<li><a href=\"#set-difference\">set difference</a></li>\n<li><a href=\"#set-symetric_difference\">set symetric_difference</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#itertools-module\">itertools Module</a></p>\n<ul>\n<li><a href=\"#accumulate\">accumulate()</a></li>\n<li><a href=\"#combinations\">combinations()</a></li>\n<li><a href=\"#combinations_with_replacement\">combinations<em>with</em>replacement()</a></li>\n<li><a href=\"#count\">count()</a></li>\n<li><a href=\"#cycle\">cycle()</a></li>\n<li><a href=\"#chain\">chain()</a></li>\n<li><a href=\"#compress\">compress()</a></li>\n<li><a href=\"#dropwhile\">dropwhile()</a></li>\n<li><a href=\"#filterfalse\">filterfalse()</a></li>\n<li><a href=\"#groupby\">groupby()</a></li>\n<li><a href=\"#islice\">islice()</a></li>\n<li><a href=\"#permutations\">permutations()</a></li>\n<li><a href=\"#product\">product()</a></li>\n<li><a href=\"#repeat\">repeat()</a></li>\n<li><a href=\"#starmap\">starmap()</a></li>\n<li><a href=\"#takewhile\">takewhile()</a></li>\n<li><a href=\"#tee\">tee()</a></li>\n<li><a href=\"#zip_longest\">zip_longest()</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#comprehensions\">Comprehensions</a></p>\n<ul>\n<li><a href=\"#list-comprehension\">List comprehension</a></li>\n<li><a href=\"#set-comprehension\">Set comprehension</a></li>\n<li><a href=\"#dict-comprehension\">Dict comprehension</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#manipulating-strings\">Manipulating Strings</a></p>\n<ul>\n<li><a href=\"#escape-characters\">Escape Characters</a></li>\n<li><a href=\"#raw-strings\">Raw Strings</a></li>\n<li><a href=\"#multiline-strings-with-triple-quotes\">Multiline Strings with Triple Quotes</a></li>\n<li><a href=\"#indexing-and-slicing-strings\">Indexing and Slicing Strings</a></li>\n<li><a href=\"#the-in-and-not-in-operators-with-strings\">The in and not in Operators with Strings</a></li>\n<li><a href=\"#the-in-and-not-in-operators-with-list\">The in and not in Operators with list</a></li>\n<li><a href=\"#the-upper-lower-isupper-and-islower-string-methods\">The upper(), lower(), isupper(), and islower() String Methods</a></li>\n<li><a href=\"#the-isx-string-methods\">The isX String Methods</a></li>\n<li><a href=\"#the-startswith-and-endswith-string-methods\">The startswith() and endswith() String Methods</a></li>\n<li><a href=\"#the-join-and-split-string-methods\">The join() and split() String Methods</a></li>\n<li><a href=\"#justifying-text-with-rjust-ljust-and-center\">Justifying Text with rjust(), ljust(), and center()</a></li>\n<li><a href=\"#removing-whitespace-with-strip-rstrip-and-lstrip\">Removing Whitespace with strip(), rstrip(), and lstrip()</a></li>\n<li><a href=\"#copying-and-pasting-strings-with-the-pyperclip-module-need-pip-install\">Copying and Pasting Strings with the pyperclip Module (need pip install)</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#string-formatting\">String Formatting</a></p>\n<ul>\n<li><a href=\"#-operator\">% operator</a></li>\n<li><a href=\"#string-formatting-strformat\">String Formatting (str.format)</a></li>\n<li><a href=\"#lazy-string-formatting\">Lazy string formatting</a></li>\n<li><a href=\"#formatted-string-literals-or-f-strings-python-36\">Formatted String Literals or f-strings (Python 3.6+)</a></li>\n<li><a href=\"#template-strings\">Template Strings</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#regular-expressions\">Regular Expressions</a></p>\n<ul>\n<li><a href=\"#matching-regex-objects\">Matching Regex Objects</a></li>\n<li><a href=\"#grouping-with-parentheses\">Grouping with Parentheses</a></li>\n<li><a href=\"#matching-multiple-groups-with-the-pipe\">Matching Multiple Groups with the Pipe</a></li>\n<li><a href=\"#optional-matching-with-the-question-mark\">Optional Matching with the Question Mark</a></li>\n<li><a href=\"#matching-zero-or-more-with-the-star\">Matching Zero or More with the Star</a></li>\n<li><a href=\"#matching-one-or-more-with-the-plus\">Matching One or More with the Plus</a></li>\n<li><a href=\"#matching-specific-repetitions-with-curly-brackets\">Matching Specific Repetitions with Curly Brackets</a></li>\n<li><a href=\"#greedy-and-nongreedy-matching\">Greedy and Nongreedy Matching</a></li>\n<li><a href=\"#the-findall-method\">The findall() Method</a></li>\n<li><a href=\"#making-your-own-character-classes\">Making Your Own Character Classes</a></li>\n<li><a href=\"#the-caret-and-dollar-sign-characters\">The Caret and Dollar Sign Characters</a></li>\n<li><a href=\"#the-wildcard-character\">The Wildcard Character</a></li>\n<li><a href=\"#matching-everything-with-dot-star\">Matching Everything with Dot-Star</a></li>\n<li><a href=\"#matching-newlines-with-the-dot-character\">Matching Newlines with the Dot Character</a></li>\n<li><a href=\"#review-of-regex-symbols\">Review of Regex Symbols</a></li>\n<li><a href=\"#case-insensitive-matching\">Case-Insensitive Matching</a></li>\n<li><a href=\"#substituting-strings-with-the-sub-method\">Substituting Strings with the sub() Method</a></li>\n<li><a href=\"#managing-complex-regexes\">Managing Complex Regexes</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#handling-file-and-directory-paths\">Handling File and Directory Paths</a></p>\n<ul>\n<li><a href=\"#backslash-on-windows-and-forward-slash-on-os-x-and-linux\">Backslash on Windows and Forward Slash on OS X and Linux</a></li>\n<li><a href=\"#the-current-working-directory\">The Current Working Directory</a></li>\n<li><a href=\"#creating-new-folders\">Creating New Folders</a></li>\n<li><a href=\"#absolute-vs-relative-paths\">Absolute vs. Relative Paths</a></li>\n<li><a href=\"#handling-absolute-and-relative-paths\">Handling Absolute and Relative Paths</a></li>\n<li><a href=\"#checking-path-validity\">Checking Path Validity</a></li>\n<li><a href=\"#finding-file-sizes-and-folder-contents\">Finding File Sizes and Folder Contents</a></li>\n<li><a href=\"#copying-files-and-folders\">Copying Files and Folders</a></li>\n<li><a href=\"#moving-and-renaming-files-and-folders\">Moving and Renaming Files and Folders</a></li>\n<li><a href=\"#permanently-deleting-files-and-folders\">Permanently Deleting Files and Folders</a></li>\n<li><a href=\"#safe-deletes-with-the-send2trash-module\">Safe Deletes with the send2trash Module</a></li>\n<li><a href=\"#walking-a-directory-tree\">Walking a Directory Tree</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#reading-and-writing-files\">Reading and Writing Files</a></p>\n<ul>\n<li><a href=\"#the-file-readingwriting-process\">The File Reading/Writing Process</a></li>\n<li><a href=\"#opening-and-reading-files-with-the-open-function\">Opening and reading files with the open() function</a></li>\n<li><a href=\"#writing-to-files\">Writing to Files</a></li>\n<li><a href=\"#saving-variables-with-the-shelve-module\">Saving Variables with the shelve Module</a></li>\n<li><a href=\"#saving-variables-with-the-pprintpformat-function\">Saving Variables with the pprint.pformat() Function</a></li>\n<li><a href=\"#reading-zip-files\">Reading ZIP Files</a></li>\n<li><a href=\"#extracting-from-zip-files\">Extracting from ZIP Files</a></li>\n<li><a href=\"#creating-and-adding-to-zip-files\">Creating and Adding to ZIP Files</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#json-yaml-and-configuration-files\">JSON, YAML and configuration files</a></p>\n<ul>\n<li><a href=\"#json\">JSON</a></li>\n<li><a href=\"#yaml\">YAML</a></li>\n<li><a href=\"#anyconfig\">Anyconfig</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#debugging\">Debugging</a></p>\n<ul>\n<li><a href=\"#raising-exceptions\">Raising Exceptions</a></li>\n<li><a href=\"#getting-the-traceback-as-a-string\">Getting the Traceback as a String</a></li>\n<li><a href=\"#assertions\">Assertions</a></li>\n<li><a href=\"#logging\">Logging</a></li>\n<li><a href=\"#logging-levels\">Logging Levels</a></li>\n<li><a href=\"#disabling-logging\">Disabling Logging</a></li>\n<li><a href=\"#logging-to-a-file\">Logging to a File</a></li>\n</ul>\n</li>\n<li><a href=\"#lambda-functions\">Lambda Functions</a></li>\n<li><a href=\"#ternary-conditional-operator\">Ternary Conditional Operator</a></li>\n<li>\n<p><a href=\"#args-and-kwargs\">args and kwargs</a></p>\n<ul>\n<li><a href=\"#things-to-rememberargs\">Things to Remember(args)</a></li>\n<li><a href=\"#things-to-rememberkwargs\">Things to Remember(kwargs)</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#context-manager\">Context Manager</a></p>\n<ul>\n<li><a href=\"#with-statement\">with statement</a></li>\n<li><a href=\"#writing-your-own-contextmanager-using-generator-syntax\">Writing your own contextmanager using generator syntax</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#__main__-top-level-script-environment\"><code>__main__</code> Top-level script environment</a></p>\n<ul>\n<li><a href=\"#advantages\">Advantages</a></li>\n</ul>\n</li>\n<li><a href=\"#setuppy\">setup.py</a></li>\n<li>\n<p><a href=\"#dataclasses\">Dataclasses</a></p>\n<ul>\n<li><a href=\"#features\">Features</a></li>\n<li><a href=\"#default-values\">Default values</a></li>\n<li><a href=\"#type-hints\">Type hints</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"#virtual-environment\">Virtual Environment</a></p>\n<ul>\n<li><a href=\"#virtualenv\">virtualenv</a></li>\n<li><a href=\"#poetry\">poetry</a></li>\n<li><a href=\"#pipenv\">pipenv</a></li>\n<li><a href=\"#anaconda\">anaconda</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h2>The Zen of Python</h2>\n<p>From the <a href=\"https://www.python.org/dev/peps/pep-0020/\">PEP 20 -- The Zen of Python</a>:</p>\n<blockquote>\n<p>Long time Pythoneer Tim Peters succinctly channels the BDFL's guiding principles for Python's design into 20 aphorisms, only 19 of which have been written down.</p>\n</blockquote>\n<pre><code class=\"language-python\">>>> import this\nThe Zen of Python, by Tim Peters\n\nBeautiful is better than ugly.\nExplicit is better than implicit.\nSimple is better than complex.\nComplex is better than complicated.\nFlat is better than nested.\nSparse is better than dense.\nReadability counts.\nSpecial cases aren't special enough to break the rules.\nAlthough practicality beats purity.\nErrors should never pass silently.\nUnless explicitly silenced.\nIn the face of ambiguity, refuse the temptation to guess.\nThere should be one-- and preferably only one --obvious way to do it.\nAlthough that way may not be obvious at first unless you're Dutch.\nNow is better than never.\nAlthough never is often better than *right* now.\nIf the implementation is hard to explain, it's a bad idea.\nIf the implementation is easy to explain, it may be a good idea.\nNamespaces are one honking great idea -- let's do more of those!\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Python Basics</h2>\n<h3>Math Operators</h3>\n<p>From <strong>Highest</strong> to <strong>Lowest</strong> precedence:</p>\n<table>\n<thead>\n<tr>\n<th>Operators</th>\n<th>Operation</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>**</td>\n<td>Exponent</td>\n<td><code>2 ** 3 = 8</code></td>\n</tr>\n<tr>\n<td>%</td>\n<td>Modulus/Remainder</td>\n<td><code>22 % 8 = 6</code></td>\n</tr>\n<tr>\n<td>//</td>\n<td>Integer division</td>\n<td><code>22 // 8 = 2</code></td>\n</tr>\n<tr>\n<td>/</td>\n<td>Division</td>\n<td><code>22 / 8 = 2.75</code></td>\n</tr>\n<tr>\n<td>*</td>\n<td>Multiplication</td>\n<td><code>3 * 3 = 9</code></td>\n</tr>\n<tr>\n<td>-</td>\n<td>Subtraction</td>\n<td><code>5 - 2 = 3</code></td>\n</tr>\n<tr>\n<td>+</td>\n<td>Addition</td>\n<td><code>2 + 2 = 4</code></td>\n</tr>\n</tbody>\n</table>\n<p>Examples of expressions in the interactive shell:</p>\n<pre><code class=\"language-python\">>>> 2 + 3 * 6\n20\n</code></pre>\n<pre><code class=\"language-python\">>>> (2 + 3) * 6\n30\n</code></pre>\n<pre><code class=\"language-python\">>>> 2 ** 8\n256\n</code></pre>\n<pre><code class=\"language-python\">>>> 23 // 7\n3\n</code></pre>\n<pre><code class=\"language-python\">>>> 23 % 7\n2\n</code></pre>\n<pre><code class=\"language-python\">>>> (5 - 1) * ((7 + 1) / (3 - 1))\n16.0\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Data Types</h3>\n<table>\n<thead>\n<tr>\n<th>Data Type</th>\n<th>Examples</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Integers</td>\n<td><code>-2, -1, 0, 1, 2, 3, 4, 5</code></td>\n</tr>\n<tr>\n<td>Floating-point numbers</td>\n<td><code>-1.25, -1.0, --0.5, 0.0, 0.5, 1.0, 1.25</code></td>\n</tr>\n<tr>\n<td>Strings</td>\n<td><code>'a', 'aa', 'aaa', 'Hello!', '11 cats'</code></td>\n</tr>\n</tbody>\n</table>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>String Concatenation and Replication</h3>\n<p>String concatenation:</p>\n<pre><code class=\"language-python\">>>> 'Alice' 'Bob'\n'AliceBob'\n</code></pre>\n<p>Note: Avoid <code>+</code> operator for string concatenation. Prefer string formatting.</p>\n<p>String Replication:</p>\n<pre><code class=\"language-python\">>>> 'Alice' * 5\n'AliceAliceAliceAliceAlice'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Variables</h3>\n<p>You can name a variable anything as long as it obeys the following rules:</p>\n<ol>\n<li>It can be only one word.</li>\n<li>It can use only letters, numbers, and the underscore (<code>_</code>) character.</li>\n<li>It can't begin with a number.</li>\n<li>Variable name starting with an underscore (<code>_</code>) are considered as \"unuseful`.</li>\n</ol>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> spam = 'Hello'\n>>> spam\n'Hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> _spam = 'Hello'\n</code></pre>\n<p><code>_spam</code> should not be used again in the code.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Comments</h3>\n<p>Inline comment:</p>\n<pre><code class=\"language-python\"># This is a comment\n</code></pre>\n<p>Multiline comment:</p>\n<pre><code class=\"language-Python\"># This is a\n# multiline comment\n</code></pre>\n<p>Code with a comment:</p>\n<pre><code class=\"language-python\">a = 1  # initialization\n</code></pre>\n<p>Please note the two spaces in front of the comment.</p>\n<p>Function docstring:</p>\n<pre><code class=\"language-python\">def foo():\n    \"\"\"\n    This is a function docstring\n    You can also use:\n    ''' Function Docstring '''\n    \"\"\"\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The print() Function</h3>\n<pre><code class=\"language-python\">>>> print('Hello world!')\nHello world!\n</code></pre>\n<pre><code class=\"language-python\">>>> a = 1\n>>> print('Hello world!', a)\nHello world! 1\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The input() Function</h3>\n<p>Example Code:</p>\n<pre><code class=\"language-python\">>>> print('What is your name?')   # ask for their name\n>>> myName = input()\n>>> print('It is good to meet you, {}'.format(myName))\nWhat is your name?\nAl\nIt is good to meet you, Al\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The len() Function</h3>\n<p>Evaluates to the integer value of the number of characters in a string:</p>\n<pre><code class=\"language-python\">>>> len('hello')\n5\n</code></pre>\n<p>Note: test of emptiness of strings, lists, dictionary, etc, should <strong>not</strong> use len, but prefer direct\nboolean evaluation.</p>\n<pre><code class=\"language-python\">>>> a = [1, 2, 3]\n>>> if a:\n>>>     print(\"the list is not empty!\")\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The str(), int(), and float() Functions</h3>\n<p>Integer to String or Float:</p>\n<pre><code class=\"language-python\">>>> str(29)\n'29'\n</code></pre>\n<pre><code class=\"language-python\">>>> print('I am {} years old.'.format(str(29)))\nI am 29 years old.\n</code></pre>\n<pre><code class=\"language-python\">>>> str(-3.14)\n'-3.14'\n</code></pre>\n<p>Float to Integer:</p>\n<pre><code class=\"language-python\">>>> int(7.7)\n7\n</code></pre>\n<pre><code class=\"language-python\">>>> int(7.7) + 1\n8\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Flow Control</h2>\n<h3>Comparison Operators</h3>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>==</code></td>\n<td>Equal to</td>\n</tr>\n<tr>\n<td><code>!=</code></td>\n<td>Not equal to</td>\n</tr>\n<tr>\n<td><code>&#x3C;</code></td>\n<td>Less than</td>\n</tr>\n<tr>\n<td><code>></code></td>\n<td>Greater Than</td>\n</tr>\n<tr>\n<td><code>&#x3C;=</code></td>\n<td>Less than or Equal to</td>\n</tr>\n<tr>\n<td><code>>=</code></td>\n<td>Greater than or Equal to</td>\n</tr>\n</tbody>\n</table>\n<p>These operators evaluate to True or False depending on the values you give them.</p>\n<p>Examples:</p>\n<pre><code class=\"language-python\">>>> 42 == 42\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 40 == 42\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'hello' == 'hello'\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'hello' == 'Hello'\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'dog' != 'cat'\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 42 == 42.0\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 42 == '42'\nFalse\n</code></pre>\n<h3>Boolean evaluation</h3>\n<p>Never use <code>==</code> or <code>!=</code> operator to evaluate boolean operation. Use the <code>is</code> or <code>is not</code> operators,\nor use implicit boolean evaluation.</p>\n<p>NO (even if they are valid Python):</p>\n<pre><code class=\"language-python\">>>> True == True\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> True != False\nTrue\n</code></pre>\n<p>YES (even if they are valid Python):</p>\n<pre><code class=\"language-python\">>>> True is True\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> True is not False\nTrue\n</code></pre>\n<p>These statements are equivalent:</p>\n<pre><code class=\"language-Python\">>>> if a is True:\n>>>    pass\n>>> if a is not False:\n>>>    pass\n>>> if a:\n>>>    pass\n</code></pre>\n<p>And these as well:</p>\n<pre><code class=\"language-Python\">>>> if a is False:\n>>>    pass\n>>> if a is not True:\n>>>    pass\n>>> if not a:\n>>>    pass\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Boolean Operators</h3>\n<p>There are three Boolean operators: and, or, and not.</p>\n<p>The <em>and</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>True and True</code></td>\n<td><code>True</code></td>\n</tr>\n<tr>\n<td><code>True and False</code></td>\n<td><code>False</code></td>\n</tr>\n<tr>\n<td><code>False and True</code></td>\n<td><code>False</code></td>\n</tr>\n<tr>\n<td><code>False and False</code></td>\n<td><code>False</code></td>\n</tr>\n</tbody>\n</table>\n<p>The <em>or</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>True or True</code></td>\n<td><code>True</code></td>\n</tr>\n<tr>\n<td><code>True or False</code></td>\n<td><code>True</code></td>\n</tr>\n<tr>\n<td><code>False or True</code></td>\n<td><code>True</code></td>\n</tr>\n<tr>\n<td><code>False or False</code></td>\n<td><code>False</code></td>\n</tr>\n</tbody>\n</table>\n<p>The <em>not</em> Operator's <em>Truth</em> Table:</p>\n<table>\n<thead>\n<tr>\n<th>Expression</th>\n<th>Evaluates to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>not True</code></td>\n<td><code>False</code></td>\n</tr>\n<tr>\n<td><code>not False</code></td>\n<td><code>True</code></td>\n</tr>\n</tbody>\n</table>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Mixing Boolean and Comparison Operators</h3>\n<pre><code class=\"language-python\">>>> (4 &#x3C; 5) and (5 &#x3C; 6)\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> (4 &#x3C; 5) and (9 &#x3C; 6)\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> (1 == 2) or (2 == 2)\nTrue\n</code></pre>\n<p>You can also use multiple Boolean operators in an expression, along with the comparison operators:</p>\n<pre><code class=\"language-python\">>>> 2 + 2 == 4 and not 2 + 2 == 5 and 2 * 2 == 2 + 2\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>if Statements</h3>\n<pre><code class=\"language-python\">if name == 'Alice':\n    print('Hi, Alice.')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>else Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\nif name == 'Alice':\n    print('Hi, Alice.')\nelse:\n    print('Hello, stranger.')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>elif Statements</h3>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 5\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\n</code></pre>\n<pre><code class=\"language-python\">name = 'Bob'\nage = 30\nif name == 'Alice':\n    print('Hi, Alice.')\nelif age &#x3C; 12:\n    print('You are not Alice, kiddo.')\nelse:\n    print('You are neither Alice nor a little kid.')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>while Loop Statements</h3>\n<pre><code class=\"language-python\">spam = 0\nwhile spam &#x3C; 5:\n    print('Hello, world.')\n    spam = spam + 1\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>break Statements</h3>\n<p>If the execution reaches a break statement, it immediately exits the while loop's clause:</p>\n<pre><code class=\"language-python\">while True:\n    print('Please type your name.')\n    name = input()\n    if name == 'your name':\n        break\nprint('Thank you!')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>continue Statements</h3>\n<p>When the program execution reaches a continue statement, the program execution immediately jumps back to the start of the loop.</p>\n<pre><code class=\"language-python\">while True:\n    print('Who are you?')\n    name = input()\n    if name != 'Joe':\n        continue\n    print('Hello, Joe. What is the password? (It is a fish.)')\n    password = input()\n    if password == 'swordfish':\n        break\nprint('Access granted.')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>for Loops and the range() Function</h3>\n<pre><code class=\"language-python\">>>> print('My name is')\n>>> for i in range(5):\n>>>     print('Jimmy Five Times ({})'.format(str(i)))\nMy name is\nJimmy Five Times (0)\nJimmy Five Times (1)\nJimmy Five Times (2)\nJimmy Five Times (3)\nJimmy Five Times (4)\n</code></pre>\n<p>The <em>range()</em> function can also be called with three arguments. The first two arguments will be the start and stop values, and the third will be the step argument. The step is the amount that the variable is increased by after each iteration.</p>\n<pre><code class=\"language-python\">>>> for i in range(0, 10, 2):\n>>>    print(i)\n0\n2\n4\n6\n8\n</code></pre>\n<p>You can even use a negative number for the step argument to make the for loop count down instead of up.</p>\n<pre><code class=\"language-python\">>>> for i in range(5, -1, -1):\n>>>     print(i)\n5\n4\n3\n2\n1\n0\n</code></pre>\n<h3>For else statement</h3>\n<p>This allows to specify a statement to execute in case of the full loop has been executed. Only\nuseful when a <code>break</code> condition can occur in the loop:</p>\n<pre><code class=\"language-python\">>>> for i in [1, 2, 3, 4, 5]:\n>>>    if i == 3:\n>>>        break\n>>> else:\n>>>    print(\"only executed when no item of the list is equal to 3\")\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Importing Modules</h3>\n<pre><code class=\"language-python\">import random\nfor i in range(5):\n    print(random.randint(1, 10))\n</code></pre>\n<pre><code class=\"language-python\">import random, sys, os, math\n</code></pre>\n<pre><code class=\"language-python\">from random import *\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Ending a Program Early with sys.exit()</h3>\n<pre><code class=\"language-python\">import sys\n\nwhile True:\n    print('Type exit to exit.')\n    response = input()\n    if response == 'exit':\n        sys.exit()\n    print('You typed {}.'.format(response))\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Functions</h2>\n<pre><code class=\"language-python\">>>> def hello(name):\n>>>     print('Hello {}'.format(name))\n>>>\n>>> hello('Alice')\n>>> hello('Bob')\nHello Alice\nHello Bob\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Return Values and return Statements</h3>\n<p>When creating a function using the def statement, you can specify what the return value should be with a return statement. A return statement consists of the following:</p>\n<ul>\n<li>The return keyword.</li>\n<li>The value or expression that the function should return.</li>\n</ul>\n<pre><code class=\"language-python\">import random\ndef getAnswer(answerNumber):\n    if answerNumber == 1:\n        return 'It is certain'\n    elif answerNumber == 2:\n        return 'It is decidedly so'\n    elif answerNumber == 3:\n        return 'Yes'\n    elif answerNumber == 4:\n        return 'Reply hazy try again'\n    elif answerNumber == 5:\n        return 'Ask again later'\n    elif answerNumber == 6:\n        return 'Concentrate and ask again'\n    elif answerNumber == 7:\n        return 'My reply is no'\n    elif answerNumber == 8:\n        return 'Outlook not so good'\n    elif answerNumber == 9:\n        return 'Very doubtful'\n\nr = random.randint(1, 9)\nfortune = getAnswer(r)\nprint(fortune)\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The None Value</h3>\n<pre><code class=\"language-python\">>>> spam = print('Hello!')\nHello!\n</code></pre>\n<pre><code class=\"language-python\">>>> spam is None\nTrue\n</code></pre>\n<p>Note: never compare to <code>None</code> with the <code>==</code> operator. Always use <code>is</code>.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Keyword Arguments and print()</h3>\n<pre><code class=\"language-python\">>>> print('Hello', end='')\n>>> print('World')\nHelloWorld\n</code></pre>\n<pre><code class=\"language-python\">>>> print('cats', 'dogs', 'mice')\ncats dogs mice\n</code></pre>\n<pre><code class=\"language-python\">>>> print('cats', 'dogs', 'mice', sep=',')\ncats,dogs,mice\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Local and Global Scope</h3>\n<ul>\n<li>Code in the global scope cannot use any local variables.</li>\n<li>However, a local scope can access global variables.</li>\n<li>Code in a function's local scope cannot use variables in any other local scope.</li>\n<li>You can use the same name for different variables if they are in different scopes. That is, there can be a local variable named spam and a global variable also named spam.</li>\n</ul>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The global Statement</h3>\n<p>If you need to modify a global variable from within a function, use the global statement:</p>\n<pre><code class=\"language-python\">>>> def spam():\n>>>     global eggs\n>>>     eggs = 'spam'\n>>>\n>>> eggs = 'global'\n>>> spam()\n>>> print(eggs)\nspam\n</code></pre>\n<p>There are four rules to tell whether a variable is in a local scope or global scope:</p>\n<ol>\n<li>If a variable is being used in the global scope (that is, outside of all functions), then it is always a global variable.</li>\n<li>If there is a global statement for that variable in a function, it is a global variable.</li>\n<li>Otherwise, if the variable is used in an assignment statement in the function, it is a local variable.</li>\n<li>But if the variable is not used in an assignment statement, it is a global variable.</li>\n</ol>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Exception Handling</h2>\n<h3>Basic exception handling</h3>\n<pre><code class=\"language-python\">>>> def spam(divideBy):\n>>>     try:\n>>>         return 42 / divideBy\n>>>     except ZeroDivisionError as e:\n>>>         print('Error: Invalid argument: {}'.format(e))\n>>>\n>>> print(spam(2))\n>>> print(spam(12))\n>>> print(spam(0))\n>>> print(spam(1))\n21.0\n3.5\nError: Invalid argument: division by zero\nNone\n42.0\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Final code in exception handling</h3>\n<p>Code inside the <code>finally</code> section is always executed, no matter if an exception has been raised or\nnot, and even if an exception is not caught.</p>\n<pre><code class=\"language-python\">>>> def spam(divideBy):\n>>>     try:\n>>>         return 42 / divideBy\n>>>     except ZeroDivisionError as e:\n>>>         print('Error: Invalid argument: {}'.format(e))\n>>>     finally:\n>>>         print(\"-- division finished --\")\n>>> print(spam(2))\n-- division finished --\n21.0\n>>> print(spam(12))\n-- division finished --\n3.5\n>>> print(spam(0))\nError: Invalid Argument division by zero\n-- division finished --\nNone\n>>> print(spam(1))\n-- division finished --\n42.0\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Lists</h2>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n\n>>> spam\n['cat', 'bat', 'rat', 'elephant']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Getting Individual Values in a List with Indexes</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n>>> spam[0]\n'cat'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[1]\n'bat'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[2]\n'rat'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[3]\n'elephant'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Negative Indexes</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n>>> spam[-1]\n'elephant'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[-3]\n'bat'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'The {} is afraid of the {}.'.format(spam[-1], spam[-3])\n'The elephant is afraid of the bat.'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Getting Sublists with Slices</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n>>> spam[0:4]\n['cat', 'bat', 'rat', 'elephant']\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[1:3]\n['bat', 'rat']\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[0:-1]\n['cat', 'bat', 'rat']\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n>>> spam[:2]\n['cat', 'bat']\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[1:]\n['bat', 'rat', 'elephant']\n</code></pre>\n<p>Slicing the complete list will perform a copy:</p>\n<pre><code class=\"language-python\">>>> spam2 = spam[:]\n['cat', 'bat', 'rat', 'elephant']\n>>> spam.append('dog')\n>>> spam\n['cat', 'bat', 'rat', 'elephant', 'dog']\n>>> spam2\n['cat', 'bat', 'rat', 'elephant']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Getting a List's Length with len()</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'dog', 'moose']\n>>> len(spam)\n3\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Changing Values in a List with Indexes</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n>>> spam[1] = 'aardvark'\n\n>>> spam\n['cat', 'aardvark', 'rat', 'elephant']\n\n>>> spam[2] = spam[1]\n\n>>> spam\n['cat', 'aardvark', 'aardvark', 'elephant']\n\n>>> spam[-1] = 12345\n\n>>> spam\n['cat', 'aardvark', 'aardvark', 12345]\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>List Concatenation and List Replication</h3>\n<pre><code class=\"language-python\">>>> [1, 2, 3] + ['A', 'B', 'C']\n[1, 2, 3, 'A', 'B', 'C']\n\n>>> ['X', 'Y', 'Z'] * 3\n['X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z']\n\n>>> spam = [1, 2, 3]\n\n>>> spam = spam + ['A', 'B', 'C']\n\n>>> spam\n[1, 2, 3, 'A', 'B', 'C']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Removing Values from Lists with del Statements</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n>>> del spam[2]\n>>> spam\n['cat', 'bat', 'elephant']\n</code></pre>\n<pre><code class=\"language-python\">>>> del spam[2]\n>>> spam\n['cat', 'bat']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Using for Loops with Lists</h3>\n<pre><code class=\"language-python\">>>> supplies = ['pens', 'staplers', 'flame-throwers', 'binders']\n>>> for i, supply in enumerate(supplies):\n>>>     print('Index {} in supplies is: {}'.format(str(i), supply))\nIndex 0 in supplies is: pens\nIndex 1 in supplies is: staplers\nIndex 2 in supplies is: flame-throwers\nIndex 3 in supplies is: binders\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Looping Through Multiple Lists with zip()</h3>\n<pre><code class=\"language-python\">>>> name = ['Pete', 'John', 'Elizabeth']\n>>> age = [6, 23, 44]\n>>> for n, a in zip(name, age):\n>>>     print('{} is {} years old'.format(n, a))\nPete is 6 years old\nJohn is 23 years old\nElizabeth is 44 years old\n</code></pre>\n<h3>The in and not in Operators</h3>\n<pre><code class=\"language-python\">>>> 'howdy' in ['hello', 'hi', 'howdy', 'heyas']\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = ['hello', 'hi', 'howdy', 'heyas']\n>>> 'cat' in spam\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'howdy' not in spam\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'cat' not in spam\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The Multiple Assignment Trick</h3>\n<p>The multiple assignment trick is a shortcut that lets you assign multiple variables with the values in a list in one line of code. So instead of doing this:</p>\n<pre><code class=\"language-python\">>>> cat = ['fat', 'orange', 'loud']\n\n>>> size = cat[0]\n\n>>> color = cat[1]\n\n>>> disposition = cat[2]\n</code></pre>\n<p>You could type this line of code:</p>\n<pre><code class=\"language-python\">>>> cat = ['fat', 'orange', 'loud']\n\n>>> size, color, disposition = cat\n</code></pre>\n<p>The multiple assignment trick can also be used to swap the values in two variables:</p>\n<pre><code class=\"language-python\">>>> a, b = 'Alice', 'Bob'\n>>> a, b = b, a\n>>> print(a)\n'Bob'\n</code></pre>\n<pre><code class=\"language-python\">>>> print(b)\n'Alice'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Augmented Assignment Operators</h3>\n<table>\n<thead>\n<tr>\n<th>Operator</th>\n<th>Equivalent</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>spam += 1</code></td>\n<td><code>spam = spam + 1</code></td>\n</tr>\n<tr>\n<td><code>spam -= 1</code></td>\n<td><code>spam = spam - 1</code></td>\n</tr>\n<tr>\n<td><code>spam *= 1</code></td>\n<td><code>spam = spam * 1</code></td>\n</tr>\n<tr>\n<td><code>spam /= 1</code></td>\n<td><code>spam = spam / 1</code></td>\n</tr>\n<tr>\n<td><code>spam %= 1</code></td>\n<td><code>spam = spam % 1</code></td>\n</tr>\n</tbody>\n</table>\n<p>Examples:</p>\n<pre><code class=\"language-python\">>>> spam = 'Hello'\n>>> spam += ' world!'\n>>> spam\n'Hello world!'\n\n>>> bacon = ['Zophie']\n>>> bacon *= 3\n>>> bacon\n['Zophie', 'Zophie', 'Zophie']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Finding a Value in a List with the index() Method</h3>\n<pre><code class=\"language-python\">>>> spam = ['Zophie', 'Pooka', 'Fat-tail', 'Pooka']\n\n>>> spam.index('Pooka')\n1\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Adding Values to Lists with the append() and insert() Methods</h3>\n<p><strong>append()</strong>:</p>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'dog', 'bat']\n\n>>> spam.append('moose')\n\n>>> spam\n['cat', 'dog', 'bat', 'moose']\n</code></pre>\n<p><strong>insert()</strong>:</p>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'dog', 'bat']\n\n>>> spam.insert(1, 'chicken')\n\n>>> spam\n['cat', 'chicken', 'dog', 'bat']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Removing Values from Lists with remove()</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n\n>>> spam.remove('bat')\n\n>>> spam\n['cat', 'rat', 'elephant']\n</code></pre>\n<p>If the value appears multiple times in the list, only the first instance of the value will be removed.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Removing Values from Lists with pop()</h3>\n<pre><code class=\"language-python\">>>> spam = ['cat', 'bat', 'rat', 'elephant']\n\n>>> spam.pop()\n'elephant'\n\n>>> spam\n['cat', 'bat', 'rat']\n\n>>> spam.pop(0)\n'cat'\n\n>>> spam\n['bat', 'rat']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Sorting the Values in a List with the sort() Method</h3>\n<pre><code class=\"language-python\">>>> spam = [2, 5, 3.14, 1, -7]\n>>> spam.sort()\n>>> spam\n[-7, 1, 2, 3.14, 5]\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = ['ants', 'cats', 'dogs', 'badgers', 'elephants']\n>>> spam.sort()\n>>> spam\n['ants', 'badgers', 'cats', 'dogs', 'elephants']\n</code></pre>\n<p>You can also pass True for the reverse keyword argument to have sort() sort the values in reverse order:</p>\n<pre><code class=\"language-python\">>>> spam.sort(reverse=True)\n>>> spam\n['elephants', 'dogs', 'cats', 'badgers', 'ants']\n</code></pre>\n<p>If you need to sort the values in regular alphabetical order, pass str. lower for the key keyword argument in the sort() method call:</p>\n<pre><code class=\"language-python\">>>> spam = ['a', 'z', 'A', 'Z']\n>>> spam.sort(key=str.lower)\n>>> spam\n['a', 'A', 'z', 'Z']\n</code></pre>\n<p>You can use the built-in function <code>sorted</code> to return a new list:</p>\n<pre><code class=\"language-python\">>>> spam = ['ants', 'cats', 'dogs', 'badgers', 'elephants']\n>>> sorted(spam)\n['ants', 'badgers', 'cats', 'dogs', 'elephants']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Tuple Data Type</h3>\n<pre><code class=\"language-python\">>>> eggs = ('hello', 42, 0.5)\n>>> eggs[0]\n'hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> eggs[1:3]\n(42, 0.5)\n</code></pre>\n<pre><code class=\"language-python\">>>> len(eggs)\n3\n</code></pre>\n<p>The main way that tuples are different from lists is that tuples, like strings, are immutable.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Converting Types with the list() and tuple() Functions</h3>\n<pre><code class=\"language-python\">>>> tuple(['cat', 'dog', 5])\n('cat', 'dog', 5)\n</code></pre>\n<pre><code class=\"language-python\">>>> list(('cat', 'dog', 5))\n['cat', 'dog', 5]\n</code></pre>\n<pre><code class=\"language-python\">>>> list('hello')\n['h', 'e', 'l', 'l', 'o']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Dictionaries and Structuring Data</h2>\n<p>Example Dictionary:</p>\n<pre><code class=\"language-python\">myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The keys(), values(), and items() Methods</h3>\n<p>values():</p>\n<pre><code class=\"language-python\">>>> spam = {'color': 'red', 'age': 42}\n>>> for v in spam.values():\n>>>     print(v)\nred\n42\n</code></pre>\n<p>keys():</p>\n<pre><code class=\"language-python\">>>> for k in spam.keys():\n>>>     print(k)\ncolor\nage\n</code></pre>\n<p>items():</p>\n<pre><code class=\"language-python\">>>> for i in spam.items():\n>>>     print(i)\n('color', 'red')\n('age', 42)\n</code></pre>\n<p>Using the keys(), values(), and items() methods, a for loop can iterate over the keys, values, or key-value pairs in a dictionary, respectively.</p>\n<pre><code class=\"language-python\">>>> spam = {'color': 'red', 'age': 42}\n>>>\n>>> for k, v in spam.items():\n>>>     print('Key: {} Value: {}'.format(k, str(v)))\nKey: age Value: 42\nKey: color Value: red\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Checking Whether a Key or Value Exists in a Dictionary</h3>\n<pre><code class=\"language-python\">>>> spam = {'name': 'Zophie', 'age': 7}\n</code></pre>\n<pre><code class=\"language-python\">>>> 'name' in spam.keys()\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Zophie' in spam.values()\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> # You can omit the call to keys() when checking for a key\n>>> 'color' in spam\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'color' not in spam\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The get() Method</h3>\n<p>Get has two parameters: key and default value if the key did not exist</p>\n<pre><code class=\"language-python\">>>> picnic_items = {'apples': 5, 'cups': 2}\n\n>>> 'I am bringing {} cups.'.format(str(picnic_items.get('cups', 0)))\n'I am bringing 2 cups.'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'I am bringing {} eggs.'.format(str(picnic_items.get('eggs', 0)))\n'I am bringing 0 eggs.'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The setdefault() Method</h3>\n<p>Let's consider this code:</p>\n<pre><code class=\"language-python\">spam = {'name': 'Pooka', 'age': 5}\n\nif 'color' not in spam:\n    spam['color'] = 'black'\n</code></pre>\n<p>Using <code>setdefault</code> we could write the same code more succinctly:</p>\n<pre><code class=\"language-python\">>>> spam = {'name': 'Pooka', 'age': 5}\n>>> spam.setdefault('color', 'black')\n'black'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam\n{'color': 'black', 'age': 5, 'name': 'Pooka'}\n</code></pre>\n<pre><code class=\"language-python\">>>> spam.setdefault('color', 'white')\n'black'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam\n{'color': 'black', 'age': 5, 'name': 'Pooka'}\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Pretty Printing</h3>\n<pre><code class=\"language-python\">>>> import pprint\n>>>\n>>> message = 'It was a bright cold day in April, and the clocks were striking\n>>> thirteen.'\n>>> count = {}\n>>>\n>>> for character in message:\n>>>     count.setdefault(character, 0)\n>>>     count[character] = count[character] + 1\n>>>\n>>> pprint.pprint(count)\n{' ': 13,\n ',': 1,\n '.': 1,\n 'A': 1,\n 'I': 1,\n 'a': 4,\n 'b': 1,\n 'c': 3,\n 'd': 3,\n 'e': 5,\n 'g': 2,\n 'h': 3,\n 'i': 6,\n 'k': 2,\n 'l': 3,\n 'n': 4,\n 'o': 2,\n 'p': 1,\n 'r': 5,\n 's': 3,\n 't': 6,\n 'w': 2,\n 'y': 1}\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Merge two dictionaries</h3>\n<pre><code class=\"language-python\"># in Python 3.5+:\n>>> x = {'a': 1, 'b': 2}\n>>> y = {'b': 3, 'c': 4}\n>>> z = {**x, **y}\n>>> z\n{'c': 4, 'a': 1, 'b': 3}\n\n# in Python 2.7\n>>> z = dict(x, **y)\n>>> z\n{'c': 4, 'a': 1, 'b': 3}\n</code></pre>\n<h2>sets</h2>\n<p>From the Python 3 <a href=\"https://docs.python.org/3/tutorial/datastructures.html\">documentation</a></p>\n<blockquote>\n<p>A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support mathematical operations like union, intersection, difference, and symmetric difference.</p>\n</blockquote>\n<h3>Initializing a set</h3>\n<p>There are two ways to create sets: using curly braces <code>{}</code> and the built-in function <code>set()</code></p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3}\n>>> s = set([1, 2, 3])\n</code></pre>\n<p>When creating an empty set, be sure to not use the curly braces <code>{}</code> or you will get an empty dictionary instead.</p>\n<pre><code class=\"language-python\">>>> s = {}\n>>> type(s)\n&#x3C;class 'dict'>\n</code></pre>\n<h3>sets: unordered collections of unique elements</h3>\n<p>A set automatically remove all the duplicate values.</p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3, 2, 3, 4}\n>>> s\n{1, 2, 3, 4}\n</code></pre>\n<p>And as an unordered data type, they can't be indexed.</p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3}\n>>> s[0]\nTraceback (most recent call last):\n  File \"&#x3C;stdin>\", line 1, in &#x3C;module>\nTypeError: 'set' object does not support indexing\n>>>\n</code></pre>\n<h3>set add() and update()</h3>\n<p>Using the <code>add()</code> method we can add a single element to the set.</p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3}\n>>> s.add(4)\n>>> s\n{1, 2, 3, 4}\n</code></pre>\n<p>And with <code>update()</code>, multiple ones .</p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3}\n>>> s.update([2, 3, 4, 5, 6])\n>>> s\n{1, 2, 3, 4, 5, 6}  # remember, sets automatically remove duplicates\n</code></pre>\n<h3>set remove() and discard()</h3>\n<p>Both methods will remove an element from the set, but <code>remove()</code> will raise a <code>key error</code> if the value doesn't exist.</p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3}\n>>> s.remove(3)\n>>> s\n{1, 2}\n>>> s.remove(3)\nTraceback (most recent call last):\n  File \"&#x3C;stdin>\", line 1, in &#x3C;module>\nKeyError: 3\n</code></pre>\n<p><code>discard()</code> won't raise any errors.</p>\n<pre><code class=\"language-python\">>>> s = {1, 2, 3}\n>>> s.discard(3)\n>>> s\n{1, 2}\n>>> s.discard(3)\n>>>\n</code></pre>\n<h3>set union()</h3>\n<p><code>union()</code> or <code>|</code> will create a new set that contains all the elements from the sets provided.</p>\n<pre><code class=\"language-python\">>>> s1 = {1, 2, 3}\n>>> s2 = {3, 4, 5}\n>>> s1.union(s2)  # or 's1 | s2'\n{1, 2, 3, 4, 5}\n</code></pre>\n<h3>set intersection</h3>\n<p><code>intersection</code> or <code>&#x26;</code> will return a set containing only the elements that are common to all of them.</p>\n<pre><code class=\"language-python\">>>> s1 = {1, 2, 3}\n>>> s2 = {2, 3, 4}\n>>> s3 = {3, 4, 5}\n>>> s1.intersection(s2, s3)  # or 's1 &#x26; s2 &#x26; s3'\n{3}\n</code></pre>\n<h3>set difference</h3>\n<p><code>difference</code> or <code>-</code> will return only the elements that are unique to the first set (invoked set).</p>\n<pre><code class=\"language-python\">>>> s1 = {1, 2, 3}\n>>> s2 = {2, 3, 4}\n>>> s1.difference(s2)  # or 's1 - s2'\n{1}\n>>> s2.difference(s1) # or 's2 - s1'\n{4}\n</code></pre>\n<h3>set symetric_difference</h3>\n<p><code>symetric_difference</code> or <code>^</code> will return all the elements that are not common between them.</p>\n<pre><code class=\"language-python\">>>> s1 = {1, 2, 3}\n>>> s2 = {2, 3, 4}\n>>> s1.symmetric_difference(s2)  # or 's1 ^ s2'\n{1, 4}\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>itertools Module</h2>\n<p>The <em>itertools</em> module is a collection of tools intended to be fast and use memory efficiently when handling iterators (like <a href=\"#lists\">lists</a> or <a href=\"#dictionaries-and-structuring-data\">dictionaries</a>).</p>\n<p>From the official <a href=\"https://docs.python.org/3/library/itertools.html\">Python 3.x documentation</a>:</p>\n<blockquote>\n<p>The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an “iterator algebra” making it possible to construct specialized tools succinctly and efficiently in pure Python.</p>\n</blockquote>\n<p>The <em>itertools</em> module comes in the standard library and must be imported.</p>\n<p>The <a href=\"https://docs.python.org/3/library/operator.html\">operator</a> module will also be used. This module is not necessary when using itertools, but needed for some of the examples below.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>accumulate()</h3>\n<p>Makes an iterator that returns the results of a function.</p>\n<pre><code class=\"language-python\">itertools.accumulate(iterable[, func])\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> data = [1, 2, 3, 4, 5]\n>>> result = itertools.accumulate(data, operator.mul)\n>>> for each in result:\n>>>    print(each)\n1\n2\n6\n24\n120\n</code></pre>\n<p>The operator.mul takes two numbers and multiplies them:</p>\n<pre><code class=\"language-python\">operator.mul(1, 2)\n2\noperator.mul(2, 3)\n6\noperator.mul(6, 4)\n24\noperator.mul(24, 5)\n120\n</code></pre>\n<p>Passing a function is optional:</p>\n<pre><code class=\"language-python\">>>> data = [5, 2, 6, 4, 5, 9, 1]\n>>> result = itertools.accumulate(data)\n>>> for each in result:\n>>>    print(each)\n5\n7\n13\n17\n22\n31\n32\n</code></pre>\n<p>If no function is designated the items will be summed:</p>\n<pre><code class=\"language-python\">5\n5 + 2 = 7\n7 + 6 = 13\n13 + 4 = 17\n17 + 5 = 22\n22 + 9 = 31\n31 + 1 = 32\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>combinations()</h3>\n<p>Takes an iterable and a integer. This will create all the unique combination that have r members.</p>\n<pre><code class=\"language-python\">itertools.combinations(iterable, r)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> shapes = ['circle', 'triangle', 'square',]\n>>> result = itertools.combinations(shapes, 2)\n>>> for each in result:\n>>>    print(each)\n('circle', 'triangle')\n('circle', 'square')\n('triangle', 'square')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>combinations<em>with</em>replacement()</h3>\n<p>Just like combinations(), but allows individual elements to be repeated more than once.</p>\n<pre><code class=\"language-python\">itertools.combinations_with_replacement(iterable, r)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> shapes = ['circle', 'triangle', 'square']\n>>> result = itertools.combinations_with_replacement(shapes, 2)\n>>> for each in result:\n>>>    print(each)\n('circle', 'circle')\n('circle', 'triangle')\n('circle', 'square')\n('triangle', 'triangle')\n('triangle', 'square')\n('square', 'square')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>count()</h3>\n<p>Makes an iterator that returns evenly spaced values starting with number start.</p>\n<pre><code class=\"language-python\">itertools.count(start=0, step=1)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> for i in itertools.count(10,3):\n>>>    print(i)\n>>>    if i > 20:\n>>>        break\n10\n13\n16\n19\n22\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>cycle()</h3>\n<p>This function cycles through an iterator endlessly.</p>\n<pre><code class=\"language-python\">itertools.cycle(iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> colors = ['red', 'orange', 'yellow', 'green', 'blue', 'violet']\n>>> for color in itertools.cycle(colors):\n>>>    print(color)\nred\norange\nyellow\ngreen\nblue\nviolet\nred\norange\n</code></pre>\n<p>When reached the end of the iterable it start over again from the beginning.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>chain()</h3>\n<p>Take a series of iterables and return them as one long iterable.</p>\n<pre><code class=\"language-python\">itertools.chain(*iterables)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> colors = ['red', 'orange', 'yellow', 'green', 'blue']\n>>> shapes = ['circle', 'triangle', 'square', 'pentagon']\n>>> result = itertools.chain(colors, shapes)\n>>> for each in result:\n>>>    print(each)\nred\norange\nyellow\ngreen\nblue\ncircle\ntriangle\nsquare\npentagon\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>compress()</h3>\n<p>Filters one iterable with another.</p>\n<pre><code class=\"language-python\">itertools.compress(data, selectors)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> shapes = ['circle', 'triangle', 'square', 'pentagon']\n>>> selections = [True, False, True, False]\n>>> result = itertools.compress(shapes, selections)\n>>> for each in result:\n>>>    print(each)\ncircle\nsquare\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>dropwhile()</h3>\n<p>Make an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every element.</p>\n<pre><code class=\"language-python\">itertools.dropwhile(predicate, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]\n>>> result = itertools.dropwhile(lambda x: x&#x3C;5, data)\n>>> for each in result:\n>>>    print(each)\n5\n6\n7\n8\n9\n10\n1\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>filterfalse()</h3>\n<p>Makes an iterator that filters elements from iterable returning only those for which the predicate is False.</p>\n<pre><code class=\"language-python\">itertools.filterfalse(predicate, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]\n>>> result = itertools.filterfalse(lambda x: x&#x3C;5, data)\n>>> for each in result:\n>>>    print(each)\n5\n6\n7\n8\n9\n10\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>groupby()</h3>\n<p>Simply put, this function groups things together.</p>\n<pre><code class=\"language-python\">itertools.groupby(iterable, key=None)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> robots = [{\n    'name': 'blaster',\n    'faction': 'autobot'\n}, {\n    'name': 'galvatron',\n    'faction': 'decepticon'\n}, {\n    'name': 'jazz',\n    'faction': 'autobot'\n}, {\n    'name': 'metroplex',\n    'faction': 'autobot'\n}, {\n    'name': 'megatron',\n    'faction': 'decepticon'\n}, {\n    'name': 'starcream',\n    'faction': 'decepticon'\n}]\n>>> for key, group in itertools.groupby(robots, key=lambda x: x['faction']):\n>>>    print(key)\n>>>    print(list(group))\nautobot\n[{'name': 'blaster', 'faction': 'autobot'}]\ndecepticon\n[{'name': 'galvatron', 'faction': 'decepticon'}]\nautobot\n[{'name': 'jazz', 'faction': 'autobot'}, {'name': 'metroplex', 'faction': 'autobot'}]\ndecepticon\n[{'name': 'megatron', 'faction': 'decepticon'}, {'name': 'starcream', 'faction': 'decepticon'}]\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>islice()</h3>\n<p>This function is very much like slices. This allows you to cut out a piece of an iterable.</p>\n<pre><code class=\"language-python\">itertools.islice(iterable, start, stop[, step])\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> colors = ['red', 'orange', 'yellow', 'green', 'blue',]\n>>> few_colors = itertools.islice(colors, 2)\n>>> for each in few_colors:\n>>>    print(each)\nred\norange\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>permutations()</h3>\n<pre><code class=\"language-python\">itertools.permutations(iterable, r=None)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> alpha_data = ['a', 'b', 'c']\n>>> result = itertools.permutations(alpha_data)\n>>> for each in result:\n>>>    print(each)\n('a', 'b', 'c')\n('a', 'c', 'b')\n('b', 'a', 'c')\n('b', 'c', 'a')\n('c', 'a', 'b')\n('c', 'b', 'a')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>product()</h3>\n<p>Creates the cartesian products from a series of iterables.</p>\n<pre><code class=\"language-python\">>>> num_data = [1, 2, 3]\n>>> alpha_data = ['a', 'b', 'c']\n>>> result = itertools.product(num_data, alpha_data)\n>>> for each in result:\n    print(each)\n(1, 'a')\n(1, 'b')\n(1, 'c')\n(2, 'a')\n(2, 'b')\n(2, 'c')\n(3, 'a')\n(3, 'b')\n(3, 'c')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>repeat()</h3>\n<p>This function will repeat an object over and over again. Unless, there is a times argument.</p>\n<pre><code class=\"language-python\">itertools.repeat(object[, times])\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> for i in itertools.repeat(\"spam\", 3):\n    print(i)\nspam\nspam\nspam\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>starmap()</h3>\n<p>Makes an iterator that computes the function using arguments obtained from the iterable.</p>\n<pre><code class=\"language-python\">itertools.starmap(function, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> data = [(2, 6), (8, 4), (7, 3)]\n>>> result = itertools.starmap(operator.mul, data)\n>>> for each in result:\n>>>    print(each)\n12\n32\n21\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>takewhile()</h3>\n<p>The opposite of dropwhile(). Makes an iterator and returns elements from the iterable as long as the predicate is true.</p>\n<pre><code class=\"language-python\">itertools.takewhile(predicate, iterable)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]\n>>> result = itertools.takewhile(lambda x: x&#x3C;5, data)\n>>> for each in result:\n>>>    print(each)\n1\n2\n3\n4\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>tee()</h3>\n<p>Return n independent iterators from a single iterable.</p>\n<pre><code class=\"language-python\">itertools.tee(iterable, n=2)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> colors = ['red', 'orange', 'yellow', 'green', 'blue']\n>>> alpha_colors, beta_colors = itertools.tee(colors)\n>>> for each in alpha_colors:\n>>>    print(each)\nred\norange\nyellow\ngreen\nblue\n</code></pre>\n<pre><code class=\"language-python\">>>> colors = ['red', 'orange', 'yellow', 'green', 'blue']\n>>> alpha_colors, beta_colors = itertools.tee(colors)\n>>> for each in beta_colors:\n>>>    print(each)\nred\norange\nyellow\ngreen\nblue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>zip_longest()</h3>\n<p>Makes an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, missing values are filled-in with fillvalue. Iteration continues until the longest iterable is exhausted.</p>\n<pre><code class=\"language-python\">itertools.zip_longest(*iterables, fillvalue=None)\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> colors = ['red', 'orange', 'yellow', 'green', 'blue',]\n>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,]\n>>> for each in itertools.zip_longest(colors, data, fillvalue=None):\n>>>    print(each)\n('red', 1)\n('orange', 2)\n('yellow', 3)\n('green', 4)\n('blue', 5)\n(None, 6)\n(None, 7)\n(None, 8)\n(None, 9)\n(None, 10)\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Comprehensions</h2>\n<h3>List comprehension</h3>\n<pre><code class=\"language-python\">>>> a = [1, 3, 5, 7, 9, 11]\n\n>>> [i - 1 for i in a]\n[0, 2, 4, 6, 8, 10]\n</code></pre>\n<h3>Set comprehension</h3>\n<pre><code class=\"language-python\">>>> b = {\"abc\", \"def\"}\n>>> {s.upper() for s in b}\n{\"ABC\", \"DEF\"}\n</code></pre>\n<h3>Dict comprehension</h3>\n<pre><code class=\"language-python\">>>> c = {'name': 'Pooka', 'age': 5}\n>>> {v: k for k, v in c.items()}\n{'Pooka': 'name', 5: 'age'}\n</code></pre>\n<p>A List comprehension can be generated from a dictionary:</p>\n<pre><code class=\"language-python\">>>> c = {'name': 'Pooka', 'first_name': 'Oooka'}\n>>> [\"{}:{}\".format(k.upper(), v.upper()) for k, v in c.items()]\n['NAME:POOKA', 'FIRST_NAME:OOOKA']\n</code></pre>\n<h2>Manipulating Strings</h2>\n<h3>Escape Characters</h3>\n<table>\n<thead>\n<tr>\n<th>Escape character</th>\n<th>Prints as</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>\\'</code></td>\n<td>Single quote</td>\n</tr>\n<tr>\n<td><code>\\\"</code></td>\n<td>Double quote</td>\n</tr>\n<tr>\n<td><code>\\t</code></td>\n<td>Tab</td>\n</tr>\n<tr>\n<td><code>\\n</code></td>\n<td>Newline (line break)</td>\n</tr>\n<tr>\n<td><code>\\\\</code></td>\n<td>Backslash</td>\n</tr>\n<tr>\n<td><code>\\b</code></td>\n<td>Backspace</td>\n</tr>\n<tr>\n<td><code>\\ooo</code></td>\n<td>Octal value</td>\n</tr>\n<tr>\n<td><code>\\r</code></td>\n<td>Carriage Return</td>\n</tr>\n</tbody>\n</table>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> print(\"Hello there!\\nHow are you?\\nI\\'m doing fine.\")\nHello there!\nHow are you?\nI'm doing fine.\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Raw Strings</h3>\n<p>A raw string completely ignores all escape characters and prints any backslash that appears in the string.</p>\n<pre><code class=\"language-python\">>>> print(r'That is Carol\\'s cat.')\nThat is Carol\\'s cat.\n</code></pre>\n<p>Note: mostly used for regular expression definition (see <code>re</code> package)</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Multiline Strings with Triple Quotes</h3>\n<pre><code class=\"language-python\">>>> print('''Dear Alice,\n>>>\n>>> Eve's cat has been arrested for catnapping, cat burglary, and extortion.\n>>>\n>>> Sincerely,\n>>> Bob''')\nDear Alice,\n\nEve's cat has been arrested for catnapping, cat burglary, and extortion.\n\nSincerely,\nBob\n</code></pre>\n<p>To keep a nicer flow in your code, you can use the <code>dedent</code> function from the <code>textwrap</code> standard package.</p>\n<pre><code class=\"language-python\">>>> from textwrap import dedent\n>>>\n>>> def my_function():\n>>>     print('''\n>>>         Dear Alice,\n>>>\n>>>         Eve's cat has been arrested for catnapping, cat burglary, and extortion.\n>>>\n>>>         Sincerely,\n>>>         Bob\n>>>         ''').strip()\n</code></pre>\n<p>This generates the same string than before.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Indexing and Slicing Strings</h3>\n<pre><code>H   e   l   l   o       w   o   r   l   d    !\n0   1   2   3   4   5   6   7   8   9   10   11\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = 'Hello world!'\n\n>>> spam[0]\n'H'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[4]\n'o'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[-1]\n'!'\n</code></pre>\n<p>Slicing:</p>\n<pre><code class=\"language-python\">>>> spam[0:5]\n'Hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[:5]\n'Hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[6:]\n'world!'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[6:-1]\n'world'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[:-1]\n'Hello world'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam[::-1]\n'!dlrow olleH'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = 'Hello world!'\n>>> fizz = spam[0:5]\n>>> fizz\n'Hello'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The in and not in Operators with Strings</h3>\n<pre><code class=\"language-python\">>>> 'Hello' in 'Hello World'\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello' in 'Hello'\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'HELLO' in 'Hello World'\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> '' in 'spam'\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'cats' not in 'cats and dogs'\nFalse\n</code></pre>\n<h3>The in and not in Operators with list</h3>\n<pre><code class=\"language-python\">>>> a = [1, 2, 3, 4]\n>>> 5 in a\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 2 in a\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The upper(), lower(), isupper(), and islower() String Methods</h3>\n<p><code>upper()</code> and <code>lower()</code>:</p>\n<pre><code class=\"language-python\">>>> spam = 'Hello world!'\n>>> spam = spam.upper()\n>>> spam\n'HELLO WORLD!'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = spam.lower()\n>>> spam\n'hello world!'\n</code></pre>\n<p>isupper() and islower():</p>\n<pre><code class=\"language-python\">>>> spam = 'Hello world!'\n>>> spam.islower()\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> spam.isupper()\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'HELLO'.isupper()\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'abc12345'.islower()\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> '12345'.islower()\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> '12345'.isupper()\nFalse\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The isX String Methods</h3>\n<ul>\n<li><strong>isalpha()</strong> returns True if the string consists only of letters and is not blank.</li>\n<li><strong>isalnum()</strong> returns True if the string consists only of letters and numbers and is not blank.</li>\n<li><strong>isdecimal()</strong> returns True if the string consists only of numeric characters and is not blank.</li>\n<li><strong>isspace()</strong> returns True if the string consists only of spaces,tabs, and new-lines and is not blank.</li>\n<li><strong>istitle()</strong> returns True if the string consists only of words that begin with an uppercase letter followed by only lowercase letters.</li>\n</ul>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The startswith() and endswith() String Methods</h3>\n<pre><code class=\"language-python\">>>> 'Hello world!'.startswith('Hello')\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello world!'.endswith('world!')\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'abc123'.startswith('abcdef')\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'abc123'.endswith('12')\nFalse\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello world!'.startswith('Hello world!')\nTrue\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello world!'.endswith('Hello world!')\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The join() and split() String Methods</h3>\n<p>join():</p>\n<pre><code class=\"language-python\">>>> ', '.join(['cats', 'rats', 'bats'])\n'cats, rats, bats'\n</code></pre>\n<pre><code class=\"language-python\">>>> ' '.join(['My', 'name', 'is', 'Simon'])\n'My name is Simon'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'ABC'.join(['My', 'name', 'is', 'Simon'])\n'MyABCnameABCisABCSimon'\n</code></pre>\n<p>split():</p>\n<pre><code class=\"language-python\">>>> 'My name is Simon'.split()\n['My', 'name', 'is', 'Simon']\n</code></pre>\n<pre><code class=\"language-python\">>>> 'MyABCnameABCisABCSimon'.split('ABC')\n['My', 'name', 'is', 'Simon']\n</code></pre>\n<pre><code class=\"language-python\">>>> 'My name is Simon'.split('m')\n['My na', 'e is Si', 'on']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Justifying Text with rjust(), ljust(), and center()</h3>\n<p>rjust() and ljust():</p>\n<pre><code class=\"language-python\">>>> 'Hello'.rjust(10)\n'     Hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello'.rjust(20)\n'               Hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello World'.rjust(20)\n'         Hello World'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello'.ljust(10)\n'Hello     '\n</code></pre>\n<p>An optional second argument to rjust() and ljust() will specify a fill character other than a space character. Enter the following into the interactive shell:</p>\n<pre><code class=\"language-python\">>>> 'Hello'.rjust(20, '*')\n'***************Hello'\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello'.ljust(20, '-')\n'Hello---------------'\n</code></pre>\n<p>center():</p>\n<pre><code class=\"language-python\">>>> 'Hello'.center(20)\n'       Hello       '\n</code></pre>\n<pre><code class=\"language-python\">>>> 'Hello'.center(20, '=')\n'=======Hello========'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Removing Whitespace with strip(), rstrip(), and lstrip()</h3>\n<pre><code class=\"language-python\">>>> spam = '    Hello World     '\n>>> spam.strip()\n'Hello World'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam.lstrip()\n'Hello World '\n</code></pre>\n<pre><code class=\"language-python\">>>> spam.rstrip()\n'    Hello World'\n</code></pre>\n<pre><code class=\"language-python\">>>> spam = 'SpamSpamBaconSpamEggsSpamSpam'\n>>> spam.strip('ampS')\n'BaconSpamEggs'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Copying and Pasting Strings with the pyperclip Module (need pip install)</h3>\n<pre><code class=\"language-python\">>>> import pyperclip\n\n>>> pyperclip.copy('Hello world!')\n\n>>> pyperclip.paste()\n'Hello world!'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>String Formatting</h2>\n<h3>% operator</h3>\n<pre><code class=\"language-python\">>>> name = 'Pete'\n>>> 'Hello %s' % name\n\"Hello Pete\"\n</code></pre>\n<p>We can use the <code>%x</code> format specifier to convert an int value to a string:</p>\n<pre><code class=\"language-python\">>>> num = 5\n>>> 'I have %x apples' % num\n\"I have 5 apples\"\n</code></pre>\n<p>Note: For new code, using <a href=\"#string-formatting-strformat\">str.format</a> or <a href=\"#formatted-string-literals-or-f-strings-python-36\">f-strings</a> (Python 3.6+) is strongly recommended over the <code>%</code> operator.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>String Formatting (str.format)</h3>\n<p>Python 3 introduced a new way to do string formatting that was later back-ported to Python 2.7. This makes the syntax for string formatting more regular.</p>\n<pre><code class=\"language-python\">>>> name = 'John'\n>>> age = 20'\n\n>>> \"Hello I'm {}, my age is {}\".format(name, age)\n\"Hello I'm John, my age is 20\"\n</code></pre>\n<pre><code class=\"language-python\">>>> \"Hello I'm {0}, my age is {1}\".format(name, age)\n\"Hello I'm John, my age is 20\"\n</code></pre>\n<p>The official <a href=\"https://docs.python.org/3/library/stdtypes.html?highlight=sprintf#printf-style-string-formatting\">Python 3.x documentation</a> recommend <code>str.format</code> over the <code>%</code> operator:</p>\n<blockquote>\n<p>The formatting operations described here exhibit a variety of quirks that lead to a number of common errors (such as failing to display tuples and dictionaries correctly). Using the newer formatted string literals or the str.format() interface helps avoid these errors. These alternatives also provide more powerful, flexible and extensible approaches to formatting text.</p>\n</blockquote>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Lazy string formatting</h3>\n<p>You would only use <code>%s</code> string formatting on functions that can do lazy parameters evaluation,\nthe most common being logging:</p>\n<p>Prefer:</p>\n<pre><code class=\"language-python\">>>> name = \"alice\"\n>>> logging.debug(\"User name: %s\", name)\n</code></pre>\n<p>Over:</p>\n<pre><code class=\"language-python\">>>> logging.debug(\"User name: {}\".format(name))\n</code></pre>\n<p>Or:</p>\n<pre><code class=\"language-python\">>>> logging.debug(\"User name: \" + name)\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Formatted String Literals or f-strings (Python 3.6+)</h3>\n<pre><code class=\"language-python\">>>> name = 'Elizabeth'\n>>> f'Hello {name}!'\n'Hello Elizabeth!\n</code></pre>\n<p>It is even possible to do inline arithmetic with it:</p>\n<pre><code class=\"language-python\">>>> a = 5\n>>> b = 10\n>>> f'Five plus ten is {a + b} and not {2 * (a + b)}.'\n'Five plus ten is 15 and not 30.'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Template Strings</h3>\n<p>A simpler and less powerful mechanism, but it is recommended when handling format strings generated by users. Due to their reduced complexity template strings are a safer choice.</p>\n<pre><code class=\"language-python\">>>> from string import Template\n>>> name = 'Elizabeth'\n>>> t = Template('Hey $name!')\n>>> t.substitute(name=name)\n'Hey Elizabeth!'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Regular Expressions</h2>\n<ol>\n<li>Import the regex module with <code>import re</code>.</li>\n<li>Create a Regex object with the <code>re.compile()</code> function. (Remember to use a raw string.)</li>\n<li>Pass the string you want to search into the Regex object's <code>search()</code> method. This returns a <code>Match</code> object.</li>\n<li>Call the Match object's <code>group()</code> method to return a string of the actual matched text.</li>\n</ol>\n<p>All the regex functions in Python are in the re module:</p>\n<pre><code class=\"language-python\">>>> import re\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching Regex Objects</h3>\n<pre><code class=\"language-python\">>>> phone_num_regex = re.compile(r'\\d\\d\\d-\\d\\d\\d-\\d\\d\\d\\d')\n\n>>> mo = phone_num_regex.search('My number is 415-555-4242.')\n\n>>> print('Phone number found: {}'.format(mo.group()))\nPhone number found: 415-555-4242\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Grouping with Parentheses</h3>\n<pre><code class=\"language-python\">>>> phone_num_regex = re.compile(r'(\\d\\d\\d)-(\\d\\d\\d-\\d\\d\\d\\d)')\n\n>>> mo = phone_num_regex.search('My number is 415-555-4242.')\n\n>>> mo.group(1)\n'415'\n\n>>> mo.group(2)\n'555-4242'\n\n>>> mo.group(0)\n'415-555-4242'\n\n>>> mo.group()\n'415-555-4242'\n</code></pre>\n<p>To retrieve all the groups at once: use the groups() method—note the plural form for the name.</p>\n<pre><code class=\"language-python\">>>> mo.groups()\n('415', '555-4242')\n\n>>> area_code, main_number = mo.groups()\n\n>>> print(area_code)\n415\n\n>>> print(main_number)\n555-4242\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching Multiple Groups with the Pipe</h3>\n<p>The | character is called a pipe. You can use it anywhere you want to match one of many expressions. For example, the regular expression r'Batman|Tina Fey' will match either 'Batman' or 'Tina Fey'.</p>\n<pre><code class=\"language-python\">>>> hero_regex = re.compile (r'Batman|Tina Fey')\n\n>>> mo1 = hero_regex.search('Batman and Tina Fey.')\n\n>>> mo1.group()\n'Batman'\n\n>>> mo2 = hero_regex.search('Tina Fey and Batman.')\n\n>>> mo2.group()\n'Tina Fey'\n</code></pre>\n<p>You can also use the pipe to match one of several patterns as part of your regex:</p>\n<pre><code class=\"language-python\">>>> bat_regex = re.compile(r'Bat(man|mobile|copter|bat)')\n\n>>> mo = bat_regex.search('Batmobile lost a wheel')\n\n>>> mo.group()\n'Batmobile'\n\n>>> mo.group(1)\n'mobile'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Optional Matching with the Question Mark</h3>\n<p>The ? character flags the group that precedes it as an optional part of the pattern.</p>\n<pre><code class=\"language-python\">>>> bat_regex = re.compile(r'Bat(wo)?man')\n>>> mo1 = bat_regex.search('The Adventures of Batman')\n>>> mo1.group()\n'Batman'\n\n>>> mo2 = bat_regex.search('The Adventures of Batwoman')\n>>> mo2.group()\n'Batwoman'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching Zero or More with the Star</h3>\n<p>The * (called the star or asterisk) means “match zero or more”—the group that precedes the star can occur any number of times in the text.</p>\n<pre><code class=\"language-python\">>>> bat_regex = re.compile(r'Bat(wo)*man')\n>>> mo1 = bat_regex.search('The Adventures of Batman')\n>>> mo1.group()\n'Batman'\n\n>>> mo2 = bat_regex.search('The Adventures of Batwoman')\n>>> mo2.group()\n'Batwoman'\n\n>>> mo3 = bat_regex.search('The Adventures of Batwowowowoman')\n>>> mo3.group()\n'Batwowowowoman'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching One or More with the Plus</h3>\n<p>While * means “match zero or more,” the + (or plus) means “match one or more”. The group preceding a plus must appear at least once. It is not optional:</p>\n<pre><code class=\"language-python\">>>> bat_regex = re.compile(r'Bat(wo)+man')\n>>> mo1 = bat_regex.search('The Adventures of Batwoman')\n>>> mo1.group()\n'Batwoman'\n</code></pre>\n<pre><code class=\"language-python\">>>> mo2 = bat_regex.search('The Adventures of Batwowowowoman')\n>>> mo2.group()\n'Batwowowowoman'\n</code></pre>\n<pre><code class=\"language-python\">>>> mo3 = bat_regex.search('The Adventures of Batman')\n>>> mo3 is None\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching Specific Repetitions with Curly Brackets</h3>\n<p>If you have a group that you want to repeat a specific number of times, follow the group in your regex with a number in curly brackets. For example, the regex (Ha){3} will match the string 'HaHaHa', but it will not match 'HaHa', since the latter has only two repeats of the (Ha) group.</p>\n<p>Instead of one number, you can specify a range by writing a minimum, a comma, and a maximum in between the curly brackets. For example, the regex (Ha){3,5} will match 'HaHaHa', 'HaHaHaHa', and 'HaHaHaHaHa'.</p>\n<pre><code class=\"language-python\">>>> ha_regex = re.compile(r'(Ha){3}')\n>>> mo1 = ha_regex.search('HaHaHa')\n>>> mo1.group()\n'HaHaHa'\n</code></pre>\n<pre><code class=\"language-python\">>>> mo2 = ha_regex.search('Ha')\n>>> mo2 is None\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Greedy and Nongreedy Matching</h3>\n<p>Python's regular expressions are greedy by default, which means that in ambiguous situations they will match the longest string possible. The non-greedy version of the curly brackets, which matches the shortest string possible, has the closing curly bracket followed by a question mark.</p>\n<pre><code class=\"language-python\">>>> greedy_ha_regex = re.compile(r'(Ha){3,5}')\n>>> mo1 = greedy_ha_regex.search('HaHaHaHaHa')\n>>> mo1.group()\n'HaHaHaHaHa'\n</code></pre>\n<pre><code class=\"language-python\">>>> nongreedy_ha_regex = re.compile(r'(Ha){3,5}?')\n>>> mo2 = nongreedy_ha_regex.search('HaHaHaHaHa')\n>>> mo2.group()\n'HaHaHa'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The findall() Method</h3>\n<p>In addition to the search() method, Regex objects also have a findall() method. While search() will return a Match object of the first matched text in the searched string, the findall() method will return the strings of every match in the searched string.</p>\n<pre><code class=\"language-python\">>>> phone_num_regex = re.compile(r'\\d\\d\\d-\\d\\d\\d-\\d\\d\\d\\d') # has no groups\n\n>>> phone_num_regex.findall('Cell: 415-555-9999 Work: 212-555-0000')\n['415-555-9999', '212-555-0000']\n</code></pre>\n<p>To summarize what the findall() method returns, remember the following:</p>\n<ul>\n<li>When called on a regex with no groups, such as \\d-\\d\\d\\d-\\d\\d\\d\\d, the method findall() returns a list of ng matches, such as ['415-555-9999', '212-555-0000'].</li>\n<li>When called on a regex that has groups, such as (\\d\\d\\d)-(d\\d)-(\\d\\d\\d\\d), the method findall() returns a list of es of strings (one string for each group), such as [('415', '555', '9999'), ('212', '555', '0000')].</li>\n</ul>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Making Your Own Character Classes</h3>\n<p>There are times when you want to match a set of characters but the shorthand character classes (\\d, \\w, \\s, and so on) are too broad. You can define your own character class using square brackets. For example, the character class [aeiouAEIOU] will match any vowel, both lowercase and uppercase.</p>\n<pre><code class=\"language-python\">>>> vowel_regex = re.compile(r'[aeiouAEIOU]')\n\n>>> vowel_regex.findall('Robocop eats baby food. BABY FOOD.')\n['o', 'o', 'o', 'e', 'a', 'a', 'o', 'o', 'A', 'O', 'O']\n</code></pre>\n<p>You can also include ranges of letters or numbers by using a hyphen. For example, the character class [a-zA-Z0-9] will match all lowercase letters, uppercase letters, and numbers.</p>\n<p>By placing a caret character (^) just after the character class's opening bracket, you can make a negative character class. A negative character class will match all the characters that are not in the character class. For example, enter the following into the interactive shell:</p>\n<pre><code class=\"language-python\">>>> consonant_regex = re.compile(r'[^aeiouAEIOU]')\n\n>>> consonant_regex.findall('Robocop eats baby food. BABY FOOD.')\n['R', 'b', 'c', 'p', ' ', 't', 's', ' ', 'b', 'b', 'y', ' ', 'f', 'd', '.', '\n', 'B', 'B', 'Y', ' ', 'F', 'D', '.']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The Caret and Dollar Sign Characters</h3>\n<ul>\n<li>You can also use the caret symbol (^) at the start of a regex to indicate that a match must occur at the beginning of the searched text.</li>\n<li>Likewise, you can put a dollar sign ($) at the end of the regex to indicate the string must end with this regex pattern.</li>\n<li>And you can use the ^ and $ together to indicate that the entire string must match the regex—that is, it's not enough for a match to be made on some subset of the string.</li>\n</ul>\n<p>The r'^Hello' regular expression string matches strings that begin with 'Hello':</p>\n<pre><code class=\"language-python\">>>> begins_with_hello = re.compile(r'^Hello')\n\n>>> begins_with_hello.search('Hello world!')\n&#x3C;_sre.SRE_Match object; span=(0, 5), match='Hello'>\n\n>>> begins_with_hello.search('He said hello.') is None\nTrue\n</code></pre>\n<p>The r'\\d$' regular expression string matches strings that end with a numeric character from 0 to 9:</p>\n<pre><code class=\"language-python\">>>> whole_string_is_num = re.compile(r'^\\d+$')\n\n>>> whole_string_is_num.search('1234567890')\n&#x3C;_sre.SRE_Match object; span=(0, 10), match='1234567890'>\n\n>>> whole_string_is_num.search('12345xyz67890') is None\nTrue\n\n>>> whole_string_is_num.search('12 34567890') is None\nTrue\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The Wildcard Character</h3>\n<p>The . (or dot) character in a regular expression is called a wildcard and will match any character except for a newline:</p>\n<pre><code class=\"language-python\">>>> at_regex = re.compile(r'.at')\n\n>>> at_regex.findall('The cat in the hat sat on the flat mat.')\n['cat', 'hat', 'sat', 'lat', 'mat']\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching Everything with Dot-Star</h3>\n<pre><code class=\"language-python\">>>> name_regex = re.compile(r'First Name: (.*) Last Name: (.*)')\n\n>>> mo = name_regex.search('First Name: Al Last Name: Sweigart')\n\n>>> mo.group(1)\n'Al'\n</code></pre>\n<pre><code class=\"language-python\">>>> mo.group(2)\n'Sweigart'\n</code></pre>\n<p>The dot-star uses greedy mode: It will always try to match as much text as possible. To match any and all text in a nongreedy fashion, use the dot, star, and question mark (.*?). The question mark tells Python to match in a nongreedy way:</p>\n<pre><code class=\"language-python\">>>> nongreedy_regex = re.compile(r'&#x3C;.*?>')\n>>> mo = nongreedy_regex.search('&#x3C;To serve man> for dinner.>')\n>>> mo.group()\n'&#x3C;To serve man>'\n</code></pre>\n<pre><code class=\"language-python\">>>> greedy_regex = re.compile(r'&#x3C;.*>')\n>>> mo = greedy_regex.search('&#x3C;To serve man> for dinner.>')\n>>> mo.group()\n'&#x3C;To serve man> for dinner.>'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Matching Newlines with the Dot Character</h3>\n<p>The dot-star will match everything except a newline. By passing re.DOTALL as the second argument to re.compile(), you can make the dot character match all characters, including the newline character:</p>\n<pre><code class=\"language-python\">>>> no_newline_regex = re.compile('.*')\n>>> no_newline_regex.search('Serve the public trust.\\nProtect the innocent.\\nUphold the law.').group()\n'Serve the public trust.'\n</code></pre>\n<pre><code class=\"language-python\">>>> newline_regex = re.compile('.*', re.DOTALL)\n>>> newline_regex.search('Serve the public trust.\\nProtect the innocent.\\nUphold the law.').group()\n'Serve the public trust.\\nProtect the innocent.\\nUphold the law.'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Review of Regex Symbols</h3>\n<table>\n<thead>\n<tr>\n<th>Symbol</th>\n<th>Matches</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>?</code></td>\n<td>zero or one of the preceding group.</td>\n</tr>\n<tr>\n<td><code>*</code></td>\n<td>zero or more of the preceding group.</td>\n</tr>\n<tr>\n<td><code>+</code></td>\n<td>one or more of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{n}</code></td>\n<td>exactly n of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{n,}</code></td>\n<td>n or more of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{,m}</code></td>\n<td>0 to m of the preceding group.</td>\n</tr>\n<tr>\n<td><code>{n,m}</code></td>\n<td>at least n and at most m of the preceding p.</td>\n</tr>\n<tr>\n<td><code>{n,m}?</code> or <code>*?</code> or <code>+?</code></td>\n<td>performs a nongreedy match of the preceding p.</td>\n</tr>\n<tr>\n<td><code>^spam</code></td>\n<td>means the string must begin with spam.</td>\n</tr>\n<tr>\n<td><code>spam$</code></td>\n<td>means the string must end with spam.</td>\n</tr>\n<tr>\n<td><code>.</code></td>\n<td>any character, except newline characters.</td>\n</tr>\n<tr>\n<td><code>\\d</code>, <code>\\w</code>, and <code>\\s</code></td>\n<td>a digit, word, or space character, respectively.</td>\n</tr>\n<tr>\n<td><code>\\D</code>, <code>\\W</code>, and <code>\\S</code></td>\n<td>anything except a digit, word, or space, respectively.</td>\n</tr>\n<tr>\n<td><code>[abc]</code></td>\n<td>any character between the brackets (such as a, b, ).</td>\n</tr>\n<tr>\n<td><code>[^abc]</code></td>\n<td>any character that isn't between the brackets.</td>\n</tr>\n</tbody>\n</table>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Case-Insensitive Matching</h3>\n<p>To make your regex case-insensitive, you can pass re.IGNORECASE or re.I as a second argument to re.compile():</p>\n<pre><code class=\"language-python\">>>> robocop = re.compile(r'robocop', re.I)\n\n>>> robocop.search('Robocop is part man, part machine, all cop.').group()\n'Robocop'\n</code></pre>\n<pre><code class=\"language-python\">>>> robocop.search('ROBOCOP protects the innocent.').group()\n'ROBOCOP'\n</code></pre>\n<pre><code class=\"language-python\">>>> robocop.search('Al, why does your programming book talk about robocop so much?').group()\n'robocop'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Substituting Strings with the sub() Method</h3>\n<p>The sub() method for Regex objects is passed two arguments:</p>\n<ol>\n<li>The first argument is a string to replace any matches.</li>\n<li>The second is the string for the regular expression.</li>\n</ol>\n<p>The sub() method returns a string with the substitutions applied:</p>\n<pre><code class=\"language-python\">>>> names_regex = re.compile(r'Agent \\w+')\n\n>>> names_regex.sub('CENSORED', 'Agent Alice gave the secret documents to Agent Bob.')\n'CENSORED gave the secret documents to CENSORED.'\n</code></pre>\n<p>Another example:</p>\n<pre><code class=\"language-python\">>>> agent_names_regex = re.compile(r'Agent (\\w)\\w*')\n\n>>> agent_names_regex.sub(r'\\1****', 'Agent Alice told Agent Carol that Agent Eve knew Agent Bob was a double agent.')\nA**** told C**** that E**** knew B**** was a double agent.'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Managing Complex Regexes</h3>\n<p>To tell the re.compile() function to ignore whitespace and comments inside the regular expression string, “verbose mode” can be enabled by passing the variable re.VERBOSE as the second argument to re.compile().</p>\n<p>Now instead of a hard-to-read regular expression like this:</p>\n<pre><code class=\"language-python\">phone_regex = re.compile(r'((\\d{3}|\\(\\d{3}\\))?(\\s|-|\\.)?\\d{3}(\\s|-|\\.)\\d{4}(\\s*(ext|x|ext.)\\s*\\d{2,5})?)')\n</code></pre>\n<p>you can spread the regular expression over multiple lines with comments like this:</p>\n<pre><code class=\"language-python\">phone_regex = re.compile(r'''(\n    (\\d{3}|\\(\\d{3}\\))?            # area code\n    (\\s|-|\\.)?                    # separator\n    \\d{3}                         # first 3 digits\n    (\\s|-|\\.)                     # separator\n    \\d{4}                         # last 4 digits\n    (\\s*(ext|x|ext.)\\s*\\d{2,5})?  # extension\n    )''', re.VERBOSE)\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Handling File and Directory Paths</h2>\n<p>There are two main modules in Python that deals with path manipulation.\nOne is the <code>os.path</code> module and the other is the <code>pathlib</code> module.\nThe <code>pathlib</code> module was added in Python 3.4, offering an object-oriented way\nto handle file system paths.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Backslash on Windows and Forward Slash on OS X and Linux</h3>\n<p>On Windows, paths are written using backslashes (<code>\\</code>) as the separator between\nfolder names. On Unix based operating system such as macOS, Linux, and BSDs,\nthe forward slash (<code>/</code>) is used as the path separator. Joining paths can be\na headache if your code needs to work on different platforms.</p>\n<p>Fortunately, Python provides easy ways to handle this. We will showcase\nhow to deal with this with both <code>os.path.join</code> and <code>pathlib.Path.joinpath</code></p>\n<p>Using <code>os.path.join</code> on Windows:</p>\n<pre><code class=\"language-python\">>>> import os\n\n>>> os.path.join('usr', 'bin', 'spam')\n'usr\\\\bin\\\\spam'\n</code></pre>\n<p>And using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n\n>>> print(Path('usr').joinpath('bin').joinpath('spam'))\nusr/bin/spam\n</code></pre>\n<p><code>pathlib</code> also provides a shortcut to joinpath using the <code>/</code> operator:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n\n>>> print(Path('usr') / 'bin' / 'spam')\nusr/bin/spam\n</code></pre>\n<p>Notice the path separator is different between Windows and Unix based operating\nsystem, that's why you want to use one of the above methods instead of\nadding strings together to join paths together.</p>\n<p>Joining paths is helpful if you need to create different file paths under\nthe same directory.</p>\n<p>Using <code>os.path.join</code> on Windows:</p>\n<pre><code class=\"language-python\">>>> my_files = ['accounts.txt', 'details.csv', 'invite.docx']\n\n>>> for filename in my_files:\n>>>     print(os.path.join('C:\\\\Users\\\\asweigart', filename))\nC:\\Users\\asweigart\\accounts.txt\nC:\\Users\\asweigart\\details.csv\nC:\\Users\\asweigart\\invite.docx\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> my_files = ['accounts.txt', 'details.csv', 'invite.docx']\n>>> home = Path.home()\n>>> for filename in my_files:\n>>>     print(home / filename)\n/home/asweigart/accounts.txt\n/home/asweigart/details.csv\n/home/asweigart/invite.docx\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>The Current Working Directory</h3>\n<p>Using <code>os</code> on Windows:</p>\n<pre><code class=\"language-python\">>>> import os\n\n>>> os.getcwd()\n'C:\\\\Python34'\n>>> os.chdir('C:\\\\Windows\\\\System32')\n\n>>> os.getcwd()\n'C:\\\\Windows\\\\System32'\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> from os import chdir\n\n>>> print(Path.cwd())\n/home/asweigart\n\n>>> chdir('/usr/lib/python3.6')\n>>> print(Path.cwd())\n/usr/lib/python3.6\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Creating New Folders</h3>\n<p>Using <code>os</code> on Windows:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.makedirs('C:\\\\delicious\\\\walnut\\\\waffles')\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> cwd = Path.cwd()\n>>> (cwd / 'delicious' / 'walnut' / 'waffles').mkdir()\nTraceback (most recent call last):\n  File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n  File \"/usr/lib/python3.6/pathlib.py\", line 1226, in mkdir\n    self._accessor.mkdir(self, mode)\n  File \"/usr/lib/python3.6/pathlib.py\", line 387, in wrapped\n    return strfunc(str(pathobj), *args)\nFileNotFoundError: [Errno 2] No such file or directory: '/home/asweigart/delicious/walnut/waffles'\n</code></pre>\n<p>Oh no, we got a nasty error! The reason is that the 'delicious' directory does\nnot exist, so we cannot make the 'walnut' and the 'waffles' directories under\nit. To fix this, do:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> cwd = Path.cwd()\n>>> (cwd / 'delicious' / 'walnut' / 'waffles').mkdir(parents=True)\n</code></pre>\n<p>And all is good :)</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Absolute vs. Relative Paths</h3>\n<p>There are two ways to specify a file path.</p>\n<ul>\n<li>An absolute path, which always begins with the root folder</li>\n<li>A relative path, which is relative to the program's current working directory</li>\n</ul>\n<p>There are also the dot (.) and dot-dot (..) folders. These are not real folders but special names that can be used in a path. A single period (“dot”) for a folder name is shorthand for “this directory.” Two periods (“dot-dot”) means “the parent folder.”</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Handling Absolute and Relative Paths</h3>\n<p>To see if a path is an absolute path:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.path.isabs('/')\nTrue\n>>> os.path.isabs('..')\nFalse\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> Path('/').is_absolute()\nTrue\n>>> Path('..').is_absolute()\nFalse\n</code></pre>\n<p>You can extract an absolute path with both <code>os.path</code> and <code>pathlib</code></p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.getcwd()\n'/home/asweigart'\n>>> os.path.abspath('..')\n'/home'\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\nprint(Path.cwd())\n/home/asweigart\nprint(Path('..').resolve())\n/home\n</code></pre>\n<p>You can get a relative path from a starting path to another path.</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.path.relpath('/etc/passwd', '/')\n'etc/passwd'\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> print(Path('/etc/passwd').relative_to('/'))\netc/passwd\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Checking Path Validity</h3>\n<p>Checking if a file/directory exists:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">import os\n>>> os.path.exists('.')\nTrue\n>>> os.path.exists('setup.py')\nTrue\n>>> os.path.exists('/etc')\nTrue\n>>> os.path.exists('nonexistentfile')\nFalse\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">from pathlib import Path\n>>> Path('.').exists()\nTrue\n>>> Path('setup.py').exists()\nTrue\n>>> Path('/etc').exists()\nTrue\n>>> Path('nonexistentfile').exists()\nFalse\n</code></pre>\n<p>Checking if a path is a file:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.path.isfile('setup.py')\nTrue\n>>> os.path.isfile('/home')\nFalse\n>>> os.path.isfile('nonexistentfile')\nFalse\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> Path('setup.py').is_file()\nTrue\n>>> Path('/home').is_file()\nFalse\n>>> Path('nonexistentfile').is_file()\nFalse\n</code></pre>\n<p>Checking if a path is a directory:</p>\n<p>Using <code>os.path</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.path.isdir('/')\nTrue\n>>> os.path.isdir('setup.py')\nFalse\n>>> os.path.isdir('/spam')\nFalse\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> Path('/').is_dir()\nTrue\n>>> Path('setup.py').is_dir()\nFalse\n>>> Path('/spam').is_dir()\nFalse\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Finding File Sizes and Folder Contents</h3>\n<p>Getting a file's size in bytes:</p>\n<p>Using <code>os.path</code> on Windows:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.path.getsize('C:\\\\Windows\\\\System32\\\\calc.exe')\n776192\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> stat = Path('/bin/python3.6').stat()\n>>> print(stat) # stat contains some other information about the file as well\nos.stat_result(st_mode=33261, st_ino=141087, st_dev=2051, st_nlink=2, st_uid=0,\n--snip--\nst_gid=0, st_size=10024, st_atime=1517725562, st_mtime=1515119809, st_ctime=1517261276)\n>>> print(stat.st_size) # size in bytes\n10024\n</code></pre>\n<p>Listing directory contents using <code>os.listdir</code> on Windows:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> os.listdir('C:\\\\Windows\\\\System32')\n['0409', '12520437.cpx', '12520850.cpx', '5U877.ax', 'aaclient.dll',\n--snip--\n'xwtpdui.dll', 'xwtpw32.dll', 'zh-CN', 'zh-HK', 'zh-TW', 'zipfldr.dll']\n</code></pre>\n<p>Listing directory contents using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> for f in Path('/usr/bin').iterdir():\n>>>     print(f)\n...\n/usr/bin/tiff2rgba\n/usr/bin/iconv\n/usr/bin/ldd\n/usr/bin/cache_restore\n/usr/bin/udiskie\n/usr/bin/unix2dos\n/usr/bin/t1reencode\n/usr/bin/epstopdf\n/usr/bin/idle3\n...\n</code></pre>\n<p>To find the total size of all the files in this directory:</p>\n<p><strong>WARNING</strong>: Directories themselves also have a size! So you might want to\ncheck for whether a path is a file or directory using the methods in the methods discussed in the above section!</p>\n<p>Using <code>os.path.getsize()</code> and <code>os.listdir()</code> together on Windows:</p>\n<pre><code class=\"language-python\">>>> import os\n>>> total_size = 0\n\n>>> for filename in os.listdir('C:\\\\Windows\\\\System32'):\n      total_size = total_size + os.path.getsize(os.path.join('C:\\\\Windows\\\\System32', filename))\n\n>>> print(total_size)\n1117846456\n</code></pre>\n<p>Using <code>pathlib</code> on *nix:</p>\n<pre><code class=\"language-python\">>>> from pathlib import Path\n>>> total_size = 0\n\n>>> for sub_path in Path('/usr/bin').iterdir():\n...     total_size += sub_path.stat().st_size\n>>>\n>>> print(total_size)\n1903178911\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Copying Files and Folders</h3>\n<p>The shutil module provides functions for copying files, as well as entire folders.</p>\n<pre><code class=\"language-python\">>>> import shutil, os\n\n>>> os.chdir('C:\\\\')\n\n>>> shutil.copy('C:\\\\spam.txt', 'C:\\\\delicious')\n   'C:\\\\delicious\\\\spam.txt'\n\n>>> shutil.copy('eggs.txt', 'C:\\\\delicious\\\\eggs2.txt')\n   'C:\\\\delicious\\\\eggs2.txt'\n</code></pre>\n<p>While shutil.copy() will copy a single file, shutil.copytree() will copy an entire folder and every folder and file contained in it:</p>\n<pre><code class=\"language-python\">>>> import shutil, os\n\n>>> os.chdir('C:\\\\')\n\n>>> shutil.copytree('C:\\\\bacon', 'C:\\\\bacon_backup')\n'C:\\\\bacon_backup'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Moving and Renaming Files and Folders</h3>\n<pre><code class=\"language-python\">>>> import shutil\n>>> shutil.move('C:\\\\bacon.txt', 'C:\\\\eggs')\n'C:\\\\eggs\\\\bacon.txt'\n</code></pre>\n<p>The destination path can also specify a filename. In the following example, the source file is moved and renamed:</p>\n<pre><code class=\"language-python\">>>> shutil.move('C:\\\\bacon.txt', 'C:\\\\eggs\\\\new_bacon.txt')\n'C:\\\\eggs\\\\new_bacon.txt'\n</code></pre>\n<p>If there is no eggs folder, then move() will rename bacon.txt to a file named eggs.</p>\n<pre><code class=\"language-python\">>>> shutil.move('C:\\\\bacon.txt', 'C:\\\\eggs')\n'C:\\\\eggs'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Permanently Deleting Files and Folders</h3>\n<ul>\n<li>Calling os.unlink(path) or Path.unlink() will delete the file at path.</li>\n<li>Calling os.rmdir(path) or Path.rmdir() will delete the folder at path. This folder must be empty of any files or folders.</li>\n<li>Calling shutil.rmtree(path) will remove the folder at path, and all files and folders it contains will also be deleted.</li>\n</ul>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Safe Deletes with the send2trash Module</h3>\n<p>You can install this module by running pip install send2trash from a Terminal window.</p>\n<pre><code class=\"language-python\">>>> import send2trash\n\n>>> with open('bacon.txt', 'a') as bacon_file: # creates the file\n...     bacon_file.write('Bacon is not a vegetable.')\n25\n\n>>> send2trash.send2trash('bacon.txt')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Walking a Directory Tree</h3>\n<pre><code class=\"language-python\">>>> import os\n>>>\n>>> for folder_name, subfolders, filenames in os.walk('C:\\\\delicious'):\n>>>     print('The current folder is {}'.format(folder_name))\n>>>\n>>>     for subfolder in subfolders:\n>>>         print('SUBFOLDER OF {}: {}'.format(folder_name, subfolder))\n>>>     for filename in filenames:\n>>>         print('FILE INSIDE {}: {}'.format(folder_name, filename))\n>>>\n>>>     print('')\nThe current folder is C:\\delicious\nSUBFOLDER OF C:\\delicious: cats\nSUBFOLDER OF C:\\delicious: walnut\nFILE INSIDE C:\\delicious: spam.txt\n\nThe current folder is C:\\delicious\\cats\nFILE INSIDE C:\\delicious\\cats: catnames.txt\nFILE INSIDE C:\\delicious\\cats: zophie.jpg\n\nThe current folder is C:\\delicious\\walnut\nSUBFOLDER OF C:\\delicious\\walnut: waffles\n\nThe current folder is C:\\delicious\\walnut\\waffles\nFILE INSIDE C:\\delicious\\walnut\\waffles: butter.txt\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<p><code>pathlib</code> provides a lot more functionality than the ones listed above,\nlike getting file name, getting file extension, reading/writing a file without\nmanually opening it, etc. Check out the\n<a href=\"https://docs.python.org/3/library/pathlib.html\">official documentation</a>\nif you want to know more!</p>\n<h2>Reading and Writing Files</h2>\n<h3>The File Reading/Writing Process</h3>\n<p>To read/write to a file in Python, you will want to use the <code>with</code>\nstatement, which will close the file for you after you are done.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Opening and reading files with the open() function</h3>\n<pre><code class=\"language-python\">>>> with open('C:\\\\Users\\\\your_home_folder\\\\hello.txt') as hello_file:\n...     hello_content = hello_file.read()\n>>> hello_content\n'Hello World!'\n\n>>> # Alternatively, you can use the *readlines()* method to get a list of string values from the file, one string for each line of text:\n\n>>> with open('sonnet29.txt') as sonnet_file:\n...     sonnet_file.readlines()\n[When, in disgrace with fortune and men's eyes,\\n', ' I all alone beweep my\noutcast state,\\n', And trouble deaf heaven with my bootless cries,\\n', And\nlook upon myself and curse my fate,']\n\n>>> # You can also iterate through the file line by line:\n>>> with open('sonnet29.txt') as sonnet_file:\n...     for line in sonnet_file: # note the new line character will be included in the line\n...         print(line, end='')\n\nWhen, in disgrace with fortune and men's eyes,\nI all alone beweep my outcast state,\nAnd trouble deaf heaven with my bootless cries,\nAnd look upon myself and curse my fate,\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Writing to Files</h3>\n<pre><code class=\"language-python\">>>> with open('bacon.txt', 'w') as bacon_file:\n...     bacon_file.write('Hello world!\\n')\n13\n\n>>> with open('bacon.txt', 'a') as bacon_file:\n...     bacon_file.write('Bacon is not a vegetable.')\n25\n\n>>> with open('bacon.txt') as bacon_file:\n...     content = bacon_file.read()\n\n>>> print(content)\nHello world!\nBacon is not a vegetable.\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Saving Variables with the shelve Module</h3>\n<p>To save variables:</p>\n<pre><code class=\"language-python\">>>> import shelve\n\n>>> cats = ['Zophie', 'Pooka', 'Simon']\n>>> with shelve.open('mydata') as shelf_file:\n...     shelf_file['cats'] = cats\n</code></pre>\n<p>To open and read variables:</p>\n<pre><code class=\"language-python\">>>> with shelve.open('mydata') as shelf_file:\n...     print(type(shelf_file))\n...     print(shelf_file['cats'])\n&#x3C;class 'shelve.DbfilenameShelf'>\n['Zophie', 'Pooka', 'Simon']\n</code></pre>\n<p>Just like dictionaries, shelf values have keys() and values() methods that will return list-like values of the keys and values in the shelf. Since these methods return list-like values instead of true lists, you should pass them to the list() function to get them in list form.</p>\n<pre><code class=\"language-python\">>>> with shelve.open('mydata') as shelf_file:\n...     print(list(shelf_file.keys()))\n...     print(list(shelf_file.values()))\n['cats']\n[['Zophie', 'Pooka', 'Simon']]\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Saving Variables with the pprint.pformat() Function</h3>\n<pre><code class=\"language-python\">>>> import pprint\n\n>>> cats = [{'name': 'Zophie', 'desc': 'chubby'}, {'name': 'Pooka', 'desc': 'fluffy'}]\n\n>>> pprint.pformat(cats)\n\"[{'desc': 'chubby', 'name': 'Zophie'}, {'desc': 'fluffy', 'name': 'Pooka'}]\"\n\n>>> with open('myCats.py', 'w') as file_obj:\n...     file_obj.write('cats = {}\\n'.format(pprint.pformat(cats)))\n83\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Reading ZIP Files</h3>\n<pre><code class=\"language-python\">>>> import zipfile, os\n\n>>> os.chdir('C:\\\\')    # move to the folder with example.zip\n>>> with zipfile.ZipFile('example.zip') as example_zip:\n...     print(example_zip.namelist())\n...     spam_info = example_zip.getinfo('spam.txt')\n...     print(spam_info.file_size)\n...     print(spam_info.compress_size)\n...     print('Compressed file is %sx smaller!' % (round(spam_info.file_size / spam_info.compress_size, 2)))\n\n['spam.txt', 'cats/', 'cats/catnames.txt', 'cats/zophie.jpg']\n13908\n3828\n'Compressed file is 3.63x smaller!'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Extracting from ZIP Files</h3>\n<p>The extractall() method for ZipFile objects extracts all the files and folders from a ZIP file into the current working directory.</p>\n<pre><code class=\"language-python\">>>> import zipfile, os\n\n>>> os.chdir('C:\\\\')    # move to the folder with example.zip\n\n>>> with zipfile.ZipFile('example.zip') as example_zip:\n...     example_zip.extractall()\n</code></pre>\n<p>The extract() method for ZipFile objects will extract a single file from the ZIP file. Continue the interactive shell example:</p>\n<pre><code class=\"language-python\">>>> with zipfile.ZipFile('example.zip') as example_zip:\n...     print(example_zip.extract('spam.txt'))\n...     print(example_zip.extract('spam.txt', 'C:\\\\some\\\\new\\\\folders'))\n'C:\\\\spam.txt'\n'C:\\\\some\\\\new\\\\folders\\\\spam.txt'\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Creating and Adding to ZIP Files</h3>\n<pre><code class=\"language-python\">>>> import zipfile\n\n>>> with zipfile.ZipFile('new.zip', 'w') as new_zip:\n...     new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)\n</code></pre>\n<p>This code will create a new ZIP file named new.zip that has the compressed contents of spam.txt.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>JSON, YAML and configuration files</h2>\n<h3>JSON</h3>\n<p>Open a JSON file with:</p>\n<pre><code class=\"language-python\">import json\nwith open(\"filename.json\", \"r\") as f:\n    content = json.loads(f.read())\n</code></pre>\n<p>Write a JSON file with:</p>\n<pre><code class=\"language-python\">import json\n\ncontent = {\"name\": \"Joe\", \"age\": 20}\nwith open(\"filename.json\", \"w\") as f:\n    f.write(json.dumps(content, indent=2))\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>YAML</h3>\n<p>Compared to JSON, YAML allows for much better human maintainability and gives you the option to add comments.\nIt is a convenient choice for configuration files where humans will have to edit it.</p>\n<p>There are two main libraries allowing to access to YAML files:</p>\n<ul>\n<li><a href=\"https://pypi.python.org/pypi/PyYAML\">PyYaml</a></li>\n<li><a href=\"https://pypi.python.org/pypi/ruamel.yaml\">Ruamel.yaml</a></li>\n</ul>\n<p>Install them using <code>pip install</code> in your virtual environment.</p>\n<p>The first one it easier to use but the second one, Ruamel, implements much better the YAML\nspecification, and allow for example to modify a YAML content without altering comments.</p>\n<p>Open a YAML file with:</p>\n<pre><code class=\"language-python\">from ruamel.yaml import YAML\n\nwith open(\"filename.yaml\") as f:\n    yaml=YAML()\n    yaml.load(f)\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Anyconfig</h3>\n<p><a href=\"https://pypi.python.org/pypi/anyconfig\">Anyconfig</a> is a very handy package allowing to abstract completely the underlying configuration file format. It allows to load a Python dictionary from JSON, YAML, TOML, and so on.</p>\n<p>Install it with:</p>\n<pre><code class=\"language-bash\">pip install anyconfig\n</code></pre>\n<p>Usage:</p>\n<pre><code class=\"language-python\">import anyconfig\n\nconf1 = anyconfig.load(\"/path/to/foo/conf.d/a.yml\")\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Debugging</h2>\n<h3>Raising Exceptions</h3>\n<p>Exceptions are raised with a raise statement. In code, a raise statement consists of the following:</p>\n<ul>\n<li>The raise keyword</li>\n<li>A call to the Exception() function</li>\n<li>A string with a helpful error message passed to the Exception() function</li>\n</ul>\n<pre><code class=\"language-python\">>>> raise Exception('This is the error message.')\nTraceback (most recent call last):\n  File \"&#x3C;pyshell#191>\", line 1, in &#x3C;module>\n    raise Exception('This is the error message.')\nException: This is the error message.\n</code></pre>\n<p>Often it's the code that calls the function, not the function itself, that knows how to handle an exception. So you will commonly see a raise statement inside a function and the try and except statements in the code calling the function.</p>\n<pre><code class=\"language-python\">def box_print(symbol, width, height):\n    if len(symbol) != 1:\n      raise Exception('Symbol must be a single character string.')\n    if width &#x3C;= 2:\n      raise Exception('Width must be greater than 2.')\n    if height &#x3C;= 2:\n      raise Exception('Height must be greater than 2.')\n    print(symbol * width)\n    for i in range(height - 2):\n        print(symbol + (' ' * (width - 2)) + symbol)\n    print(symbol * width)\nfor sym, w, h in (('*', 4, 4), ('O', 20, 5), ('x', 1, 3), ('ZZ', 3, 3)):\n    try:\n        box_print(sym, w, h)\n    except Exception as err:\n        print('An exception happened: ' + str(err))\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Getting the Traceback as a String</h3>\n<p>The traceback is displayed by Python whenever a raised exception goes unhandled. But can also obtain it as a string by calling traceback.format_exc(). This function is useful if you want the information from an exception's traceback but also want an except statement to gracefully handle the exception. You will need to import Python's traceback module before calling this function.</p>\n<pre><code class=\"language-python\">>>> import traceback\n\n>>> try:\n>>>      raise Exception('This is the error message.')\n>>> except:\n>>>      with open('errorInfo.txt', 'w') as error_file:\n>>>          error_file.write(traceback.format_exc())\n>>>      print('The traceback info was written to errorInfo.txt.')\n116\nThe traceback info was written to errorInfo.txt.\n</code></pre>\n<p>The 116 is the return value from the write() method, since 116 characters were written to the file. The traceback text was written to errorInfo.txt.</p>\n<pre><code>Traceback (most recent call last):\n  File \"&#x3C;pyshell#28>\", line 2, in &#x3C;module>\nException: This is the error message.\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Assertions</h3>\n<p>An assertion is a sanity check to make sure your code isn't doing something obviously wrong. These sanity checks are performed by assert statements. If the sanity check fails, then an AssertionError exception is raised. In code, an assert statement consists of the following:</p>\n<ul>\n<li>The assert keyword</li>\n<li>A condition (that is, an expression that evaluates to True or False)</li>\n<li>A comma</li>\n<li>A string to display when the condition is False</li>\n</ul>\n<pre><code class=\"language-python\">>>> pod_bay_door_status = 'open'\n\n>>> assert pod_bay_door_status == 'open', 'The pod bay doors need to be \"open\".'\n\n>>> pod_bay_door_status = 'I\\'m sorry, Dave. I\\'m afraid I can\\'t do that.'\n\n>>> assert pod_bay_door_status == 'open', 'The pod bay doors need to be \"open\".'\n\nTraceback (most recent call last):\n  File \"&#x3C;pyshell#10>\", line 1, in &#x3C;module>\n    assert pod_bay_door_status == 'open', 'The pod bay doors need to be \"open\".'\nAssertionError: The pod bay doors need to be \"open\".\n</code></pre>\n<p>In plain English, an assert statement says, “I assert that this condition holds true, and if not, there is a bug somewhere in the program.” Unlike exceptions, your code should not handle assert statements with try and except; if an assert fails, your program should crash. By failing fast like this, you shorten the time between the original cause of the bug and when you first notice the bug. This will reduce the amount of code you will have to check before finding the code that's causing the bug.</p>\n<p>Disabling Assertions</p>\n<p>Assertions can be disabled by passing the -O option when running Python.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Logging</h3>\n<p>To enable the logging module to display log messages on your screen as your program runs, copy the following to the top of your program (but under the #! python shebang line):</p>\n<pre><code class=\"language-python\">import logging\n\nlogging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s- %(message)s')\n</code></pre>\n<p>Say you wrote a function to calculate the factorial of a number. In mathematics, factorial 4 is 1 × 2 × 3 × 4, or 24. Factorial 7 is 1 × 2 × 3 × 4 × 5 × 6 × 7, or 5,040. Open a new file editor window and enter the following code. It has a bug in it, but you will also enter several log messages to help yourself figure out what is going wrong. Save the program as factorialLog.py.</p>\n<pre><code class=\"language-python\">>>> import logging\n>>>\n>>> logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s- %(message)s')\n>>>\n>>> logging.debug('Start of program')\n>>>\n>>> def factorial(n):\n>>>\n>>>     logging.debug('Start of factorial(%s)' % (n))\n>>>     total = 1\n>>>\n>>>     for i in range(1, n + 1):\n>>>         total *= i\n>>>         logging.debug('i is ' + str(i) + ', total is ' + str(total))\n>>>\n>>>     logging.debug('End of factorial(%s)' % (n))\n>>>\n>>>     return total\n>>>\n>>> print(factorial(5))\n>>> logging.debug('End of program')\n2015-05-23 16:20:12,664 - DEBUG - Start of program\n2015-05-23 16:20:12,664 - DEBUG - Start of factorial(5)\n2015-05-23 16:20:12,665 - DEBUG - i is 0, total is 0\n2015-05-23 16:20:12,668 - DEBUG - i is 1, total is 0\n2015-05-23 16:20:12,670 - DEBUG - i is 2, total is 0\n2015-05-23 16:20:12,673 - DEBUG - i is 3, total is 0\n2015-05-23 16:20:12,675 - DEBUG - i is 4, total is 0\n2015-05-23 16:20:12,678 - DEBUG - i is 5, total is 0\n2015-05-23 16:20:12,680 - DEBUG - End of factorial(5)\n0\n2015-05-23 16:20:12,684 - DEBUG - End of program\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Logging Levels</h3>\n<p>Logging levels provide a way to categorize your log messages by importance. There are five logging levels, described in Table 10-1 from least to most important. Messages can be logged at each level using a different logging function.</p>\n<table>\n<thead>\n<tr>\n<th>Level</th>\n<th>Logging Function</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>DEBUG</code></td>\n<td><code>logging.debug()</code></td>\n<td>The lowest level. Used for small details. Usually you care about these messages only when diagnosing problems.</td>\n</tr>\n<tr>\n<td><code>INFO</code></td>\n<td><code>logging.info()</code></td>\n<td>Used to record information on general events in your program or confirm that things are working at their point in the program.</td>\n</tr>\n<tr>\n<td><code>WARNING</code></td>\n<td><code>logging.warning()</code></td>\n<td>Used to indicate a potential problem that doesn't prevent the program from working but might do so in the future.</td>\n</tr>\n<tr>\n<td><code>ERROR</code></td>\n<td><code>logging.error()</code></td>\n<td>Used to record an error that caused the program to fail to do something.</td>\n</tr>\n<tr>\n<td><code>CRITICAL</code></td>\n<td><code>logging.critical()</code></td>\n<td>The highest level. Used to indicate a fatal error that has caused or is about to cause the program to stop running entirely.</td>\n</tr>\n</tbody>\n</table>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Disabling Logging</h3>\n<p>After you've debugged your program, you probably don't want all these log messages cluttering the screen. The logging.disable() function disables these so that you don't have to go into your program and remove all the logging calls by hand.</p>\n<pre><code class=\"language-python\">>>> import logging\n\n>>> logging.basicConfig(level=logging.INFO, format=' %(asctime)s -%(levelname)s - %(message)s')\n\n>>> logging.critical('Critical error! Critical error!')\n2015-05-22 11:10:48,054 - CRITICAL - Critical error! Critical error!\n\n>>> logging.disable(logging.CRITICAL)\n\n>>> logging.critical('Critical error! Critical error!')\n\n>>> logging.error('Error! Error!')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Logging to a File</h3>\n<p>Instead of displaying the log messages to the screen, you can write them to a text file. The logging.basicConfig() function takes a filename keyword argument, like so:</p>\n<pre><code class=\"language-python\">import logging\n\nlogging.basicConfig(filename='myProgramLog.txt', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Lambda Functions</h2>\n<p>This function:</p>\n<pre><code class=\"language-python\">>>> def add(x, y):\n        return x + y\n\n>>> add(5, 3)\n8\n</code></pre>\n<p>Is equivalent to the <em>lambda</em> function:</p>\n<pre><code class=\"language-python\">>>> add = lambda x, y: x + y\n>>> add(5, 3)\n8\n</code></pre>\n<p>It's not even need to bind it to a name like add before:</p>\n<pre><code class=\"language-python\">>>> (lambda x, y: x + y)(5, 3)\n8\n</code></pre>\n<p>Like regular nested functions, lambdas also work as lexical closures:</p>\n<pre><code class=\"language-python\">>>> def make_adder(n):\n        return lambda x: x + n\n\n>>> plus_3 = make_adder(3)\n>>> plus_5 = make_adder(5)\n\n>>> plus_3(4)\n7\n>>> plus_5(4)\n9\n</code></pre>\n<p>Note: lambda can only evaluate an expression, like a single line of code.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Ternary Conditional Operator</h2>\n<p>Many programming languages have a ternary operator, which define a conditional expression. The most common usage is to make a terse simple conditional assignment statement. In other words, it offers one-line code to evaluate the first expression if the condition is true, otherwise it evaluates the second expression.</p>\n<pre><code>&#x3C;expression1> if &#x3C;condition> else &#x3C;expression2>\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-python\">>>> age = 15\n\n>>> print('kid' if age &#x3C; 18 else 'adult')\nkid\n</code></pre>\n<p>Ternary operators can be chained:</p>\n<pre><code class=\"language-python\">>>> age = 15\n\n>>> print('kid' if age &#x3C; 13 else 'teenager' if age &#x3C; 18 else 'adult')\nteenager\n</code></pre>\n<p>The code above is equivalent to:</p>\n<pre><code class=\"language-python\">if age &#x3C; 18:\n    if age &#x3C; 13:\n        print('kid')\n    else:\n        print('teenager')\nelse:\n    print('adult')\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>args and kwargs</h2>\n<p>The names <code>args and kwargs</code> are arbitrary - the important thing are the <code>*</code> and <code>**</code> operators. They can mean:</p>\n<ol>\n<li>In a function declaration, <code>*</code> means “pack all remaining positional arguments into a tuple named <code>&#x3C;name></code>”, while <code>**</code> is the same for keyword arguments (except it uses a dictionary, not a tuple).</li>\n<li>In a function call, <code>*</code> means “unpack tuple or list named <code>&#x3C;name></code> to positional arguments at this position”, while <code>**</code> is the same for keyword arguments.</li>\n</ol>\n<p>For example you can make a function that you can use to call any other function, no matter what parameters it has:</p>\n<pre><code class=\"language-python\">def forward(f, *args, **kwargs):\n    return f(*args, **kwargs)\n</code></pre>\n<p>Inside forward, args is a tuple (of all positional arguments except the first one, because we specified it - the f), kwargs is a dict. Then we call f and unpack them so they become normal arguments to f.</p>\n<p>You use <code>*args</code> when you have an indefinite amount of positional arguments.</p>\n<pre><code class=\"language-python\">>>> def fruits(*args):\n>>>    for fruit in args:\n>>>       print(fruit)\n\n>>> fruits(\"apples\", \"bananas\", \"grapes\")\n\n\"apples\"\n\"bananas\"\n\"grapes\"\n</code></pre>\n<p>Similarly, you use <code>**kwargs</code> when you have an indefinite number of keyword arguments.</p>\n<pre><code class=\"language-python\">>>> def fruit(**kwargs):\n>>>    for key, value in kwargs.items():\n>>>        print(\"{0}: {1}\".format(key, value))\n\n>>> fruit(name = \"apple\", color = \"red\")\n\nname: apple\ncolor: red\n</code></pre>\n<pre><code class=\"language-python\">>>> def show(arg1, arg2, *args, kwarg1=None, kwarg2=None, **kwargs):\n>>>   print(arg1)\n>>>   print(arg2)\n>>>   print(args)\n>>>   print(kwarg1)\n>>>   print(kwarg2)\n>>>   print(kwargs)\n\n>>> data1 = [1,2,3]\n>>> data2 = [4,5,6]\n>>> data3 = {'a':7,'b':8,'c':9}\n\n>>> show(*data1,*data2, kwarg1=\"python\",kwarg2=\"cheatsheet\",**data3)\n1\n2\n(3, 4, 5, 6)\npython\ncheatsheet\n{'a': 7, 'b': 8, 'c': 9}\n\n>>> show(*data1, *data2, **data3)\n1\n2\n(3, 4, 5, 6)\nNone\nNone\n{'a': 7, 'b': 8, 'c': 9}\n\n# If you do not specify ** for kwargs\n>>> show(*data1, *data2, *data3)\n1\n2\n(3, 4, 5, 6, \"a\", \"b\", \"c\")\nNone\nNone\n{}\n</code></pre>\n<h3>Things to Remember(args)</h3>\n<ol>\n<li>Functions can accept a variable number of positional arguments by using <code>*args</code> in the def statement.</li>\n<li>You can use the items from a sequence as the positional arguments for a function with the <code>*</code> operator.</li>\n<li>Using the <code>*</code> operator with a generator may cause your program to run out of memory and crash.</li>\n<li>Adding new positional parameters to functions that accept <code>*args</code> can introduce hard-to-find bugs.</li>\n</ol>\n<h3>Things to Remember(kwargs)</h3>\n<ol>\n<li>Function arguments can be specified by position or by keyword.</li>\n<li>Keywords make it clear what the purpose of each argument is when it would be confusing with only positional arguments.</li>\n<li>Keyword arguments with default values make it easy to add new behaviors to a function, especially when the function has existing callers.</li>\n<li>Optional keyword arguments should always be passed by keyword instead of by position.</li>\n</ol>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Context Manager</h2>\n<p>While Python's context managers are widely used, few understand the purpose behind their use. These statements, commonly used with reading and writing files, assist the application in conserving system memory and improve resource management by ensuring specific resources are only in use for certain processes.</p>\n<h3>with statement</h3>\n<p>A context manager is an object that is notified when a context (a block of code) starts and ends. You commonly use one with the with statement. It takes care of the notifying.</p>\n<p>For example, file objects are context managers. When a context ends, the file object is closed automatically:</p>\n<pre><code class=\"language-python\">>>> with open(filename) as f:\n>>>     file_contents = f.read()\n\n# the open_file object has automatically been closed.\n</code></pre>\n<p>Anything that ends execution of the block causes the context manager's exit method to be called. This includes exceptions, and can be useful when an error causes you to prematurely exit from an open file or connection. Exiting a script without properly closing files/connections is a bad idea, that may cause data loss or other problems. By using a context manager you can ensure that precautions are always taken to prevent damage or loss in this way.</p>\n<h3>Writing your own contextmanager using generator syntax</h3>\n<p>It is also possible to write a context manager using generator syntax thanks to the <code>contextlib.contextmanager</code> decorator:</p>\n<pre><code class=\"language-python\">>>> import contextlib\n>>> @contextlib.contextmanager\n... def context_manager(num):\n...     print('Enter')\n...     yield num + 1\n...     print('Exit')\n>>> with context_manager(2) as cm:\n...     # the following instructions are run when the 'yield' point of the context\n...     # manager is reached.\n...     # 'cm' will have the value that was yielded\n...     print('Right in the middle with cm = {}'.format(cm))\nEnter\nRight in the middle with cm = 3\nExit\n\n>>>\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2><code>__main__</code> Top-level script environment</h2>\n<p><code>__main__</code> is the name of the scope in which top-level code executes.\nA module's <strong>name</strong> is set equal to <code>__main__</code> when read from standard input, a script, or from an interactive prompt.</p>\n<p>A module can discover whether or not it is running in the main scope by checking its own <code>__name__</code>, which allows a common idiom for conditionally executing code in a module when it is run as a script or with <code>python -m</code> but not when it is imported:</p>\n<pre><code class=\"language-python\">>>> if __name__ == \"__main__\":\n...     # execute only if run as a script\n...     main()\n</code></pre>\n<p>For a package, the same effect can be achieved by including a <strong>main</strong>.py module, the contents of which will be executed when the module is run with -m</p>\n<p>For example we are developing script which is designed to be used as module, we should do:</p>\n<pre><code class=\"language-python\">>>> # Python program to execute function directly\n>>> def add(a, b):\n...     return a+b\n...\n>>> add(10, 20) # we can test it by calling the function save it as calculate.py\n30\n>>> # Now if we want to use that module by importing we have to comment out our call,\n>>> # Instead we can write like this in calculate.py\n>>> if __name__ == \"__main__\":\n...     add(3, 5)\n...\n>>> import calculate\n>>> calculate.add(3, 5)\n8\n</code></pre>\n<h3>Advantages</h3>\n<ol>\n<li>Every Python module has it's <code>__name__</code> defined and if this is <code>__main__</code>, it implies that the module is being run standalone by the user and we can do corresponding appropriate actions.</li>\n<li>If you import this script as a module in another script, the <strong>name</strong> is set to the name of the script/module.</li>\n<li>Python files can act as either reusable modules, or as standalone programs.</li>\n<li>if <code>__name__ == “main”:</code> is used to execute some code only if the file was run directly, and not imported.</li>\n</ol>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>setup.py</h2>\n<p>The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the setup script is to describe your module distribution to the Distutils, so that the various commands that operate on your modules do the right thing.</p>\n<p>The <code>setup.py</code> file is at the heart of a Python project. It describes all of the metadata about your project. There a quite a few fields you can add to a project to give it a rich set of metadata describing the project. However, there are only three required fields: name, version, and packages. The name field must be unique if you wish to publish your package on the Python Package Index (PyPI). The version field keeps track of different releases of the project. The packages field describes where you've put the Python source code within your project.</p>\n<p>This allows you to easily install Python packages. Often it's enough to write:</p>\n<pre><code class=\"language-bash\">python setup.py install\n</code></pre>\n<p>and module will install itself.</p>\n<p>Our initial setup.py will also include information about the license and will re-use the README.txt file for the long_description field. This will look like:</p>\n<pre><code class=\"language-python\">>>> from distutils.core import setup\n>>> setup(\n...    name='pythonCheatsheet',\n...    version='0.1',\n...    packages=['pipenv',],\n...    license='MIT',\n...    long_description=open('README.txt').read(),\n... )\n</code></pre>\n<p>Find more information visit <a href=\"http://docs.python.org/install/index.html\">http://docs.python.org/install/index.html</a>.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Dataclasses</h2>\n<p><code>Dataclasses</code> are python classes but are suited for storing data objects.\nThis module provides a decorator and functions for automatically adding generated special methods such as <code>__init__()</code> and <code>__repr__()</code> to user-defined classes.</p>\n<h3>Features</h3>\n<ol>\n<li>They store data and represent a certain data type. Ex: A number. For people familiar with ORMs, a model instance is a data object. It represents a specific kind of entity. It holds attributes that define or represent the entity.</li>\n<li>They can be compared to other objects of the same type. Ex: A number can be greater than, less than, or equal to another number.</li>\n</ol>\n<p>Python 3.7 provides a decorator dataclass that is used to convert a class into a dataclass.</p>\n<p>python 2.7</p>\n<pre><code class=\"language-python\">>>> class Number:\n...     def __init__(self, val):\n...         self.val = val\n...\n>>> obj = Number(2)\n>>> obj.val\n2\n</code></pre>\n<p>with dataclass</p>\n<pre><code class=\"language-python\">>>> @dataclass\n... class Number:\n...     val: int\n...\n>>> obj = Number(2)\n>>> obj.val\n2\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>Default values</h3>\n<p>It is easy to add default values to the fields of your data class.</p>\n<pre><code class=\"language-python\">>>> @dataclass\n... class Product:\n...     name: str\n...     count: int = 0\n...     price: float = 0.0\n...\n>>> obj = Product(\"Python\")\n>>> obj.name\nPython\n>>> obj.count\n0\n>>> obj.price\n0.0\n</code></pre>\n<h3>Type hints</h3>\n<p>It is mandatory to define the data type in dataclass. However, If you don't want specify the datatype then, use <code>typing.Any</code>.</p>\n<pre><code class=\"language-python\">>>> from dataclasses import dataclass\n>>> from typing import Any\n\n>>> @dataclass\n... class WithoutExplicitTypes:\n...    name: Any\n...    value: Any = 42\n...\n</code></pre>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h2>Virtual Environment</h2>\n<p>The use of a Virtual Environment is to test python code in encapsulated environments and to also avoid filling the base Python installation with libraries we might use for only one project.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>virtualenv</h3>\n<ol>\n<li>\n<p>Install virtualenv</p>\n<pre><code>pip install virtualenv\n</code></pre>\n</li>\n<li>\n<p>Install virtualenvwrapper-win (Windows)</p>\n<pre><code>pip install virtualenvwrapper-win\n</code></pre>\n</li>\n</ol>\n<p>Usage:</p>\n<ol>\n<li>\n<p>Make a Virtual Environment</p>\n<pre><code>mkvirtualenv HelloWold\n</code></pre>\n<p>Anything we install now will be specific to this project. And available to the projects we connect to this environment.</p>\n</li>\n<li>\n<p>Set Project Directory</p>\n<p>To bind our virtualenv with our current working directory we simply enter:</p>\n<pre><code>setprojectdir .\n</code></pre>\n</li>\n<li>\n<p>Deactivate</p>\n<p>To move onto something else in the command line type 'deactivate' to deactivate your environment.</p>\n<pre><code>deactivate\n</code></pre>\n<p>Notice how the parenthesis disappear.</p>\n</li>\n<li>\n<p>Workon</p>\n<p>Open up the command prompt and type 'workon HelloWold' to activate the environment and move into your root project folder</p>\n<pre><code>workon HelloWold\n</code></pre>\n</li>\n</ol>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>poetry</h3>\n<blockquote>\n<p><a href=\"https://poetry.eustace.io/\">Poetry</a> is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.</p>\n</blockquote>\n<ol>\n<li>\n<p>Install Poetry</p>\n<pre><code>pip install --user poetry\n</code></pre>\n</li>\n<li>\n<p>Create a new project</p>\n<pre><code>poetry new my-project\n</code></pre>\n<p>This will create a my-project directory:</p>\n<pre><code>my-project\n├── pyproject.toml\n├── README.rst\n├── poetry_demo\n│   └── __init__.py\n└── tests\n    ├── __init__.py\n    └── test_poetry_demo.py\n</code></pre>\n<p>The pyproject.toml file will orchestrate your project and its dependencies:</p>\n<pre><code>[tool.poetry]\nname = \"my-project\"\nversion = \"0.1.0\"\ndescription = \"\"\nauthors = [\"your name &#x3C;your@mail.com>\"]\n\n[tool.poetry.dependencies]\npython = \"*\"\n\n[tool.poetry.dev-dependencies]\npytest = \"^3.4\"\n</code></pre>\n</li>\n<li>\n<p>Packages</p>\n<p>To add dependencies to your project, you can specify them in the tool.poetry.dependencies section:</p>\n<pre><code>[tool.poetry.dependencies]\npendulum = \"^1.4\"\n</code></pre>\n<p>Also, instead of modifying the pyproject.toml file by hand, you can use the add command and it will automatically find a suitable version constraint.</p>\n<pre><code>$ poetry add pendulum\n</code></pre>\n<p>To install the dependencies listed in the pyproject.toml:</p>\n<pre><code>poetry install\n</code></pre>\n<p>To remove dependencies:</p>\n<pre><code>poetry remove pendulum\n</code></pre>\n</li>\n</ol>\n<p>For more information, check the <a href=\"https://poetry.eustace.io/docs/\">documentation</a>.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>pipenv</h3>\n<blockquote>\n<p><a href=\"https://pipenv.readthedocs.io/en/latest/\">Pipenv</a> is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world. Windows is a first-class citizen, in our world.</p>\n</blockquote>\n<ol>\n<li>\n<p>Install pipenv</p>\n<pre><code>pip install pipenv\n</code></pre>\n</li>\n<li>\n<p>Enter your Project directory and install the Packages for your project</p>\n<pre><code>cd my_project\npipenv install &#x3C;package>\n</code></pre>\n<p>Pipenv will install your package and create a Pipfile for you in your project's directory. The Pipfile is used to track which dependencies your project needs in case you need to re-install them.</p>\n</li>\n<li>\n<p>Uninstall Packages</p>\n<pre><code>pipenv uninstall &#x3C;package>\n</code></pre>\n</li>\n<li>\n<p>Activate the Virtual Environment associated with your Python project</p>\n<pre><code>pipenv shell\n</code></pre>\n</li>\n<li>\n<p>Exit the Virtual Environment</p>\n<pre><code>exit\n</code></pre>\n</li>\n</ol>\n<p>Find more information and a video in <a href=\"https://docs.pipenv.org/\">docs.pipenv.org</a>.</p>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>\n<h3>anaconda</h3>\n<p><a href=\"https://anaconda.org/\">Anaconda</a> is another popular tool to manage python packages.</p>\n<blockquote>\n<p>Where packages, notebooks, projects and environments are shared.\nYour place for free public conda package hosting.</p>\n</blockquote>\n<p>Usage:</p>\n<ol>\n<li>\n<p>Make a Virtual Environment</p>\n<pre><code>conda create -n HelloWorld\n</code></pre>\n</li>\n<li>\n<p>To use the Virtual Environment, activate it by:</p>\n<pre><code>conda activate HelloWorld\n</code></pre>\n<p>Anything installed now will be specific to the project HelloWorld</p>\n</li>\n<li>\n<p>Exit the Virtual Environment</p>\n<pre><code>conda deactivate\n</code></pre>\n</li>\n</ol>\n<p><a href=\"#python-cheatsheet\"><em>Return to the Top</em></a></p>"},{"url":"/docs/reference/awesome-nodejs/","relativePath":"docs/reference/awesome-nodejs.md","relativeDir":"docs/reference","base":"awesome-nodejs.md","name":"awesome-nodejs","frontmatter":{"title":"Awesome NodeJS","weight":0,"excerpt":"this is an awesome list of awesome NodeJS","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Official</h2>\n<ul>\n<li><a href=\"https://nodejs.org\">Website</a></li>\n<li><a href=\"https://nodejs.org/dist/latest/docs/api/\">Documentation</a></li>\n<li><a href=\"https://github.com/nodejs/node\">Repository</a></li>\n</ul>\n<h2>Packages</h2>\n<h3>Mad science</h3>\n<ul>\n<li><a href=\"https://github.com/feross/webtorrent\">webtorrent</a> - Streaming torrent client for Node.js and the browser.</li>\n<li><a href=\"https://github.com/mafintosh/peerflix\">peerflix</a> - Streaming torrent client.</li>\n<li><a href=\"https://github.com/datproject/dat-node\">dat</a> - Real-time replication and versioning for data sets.</li>\n<li><a href=\"https://github.com/ipfs/js-ipfs\">ipfs</a> - Distributed file system that seeks to connect all computing devices with the same system of files.</li>\n<li><a href=\"https://github.com/stackgl\">stackgl</a> - Open software ecosystem for WebGL, built on top of browserify and npm.</li>\n<li><a href=\"https://github.com/mafintosh/peerwiki\">peerwiki</a> - All of Wikipedia on BitTorrent.</li>\n<li><a href=\"https://github.com/mafintosh/peercast\">peercast</a> - Stream a torrent video to Chromecast.</li>\n<li><a href=\"https://github.com/bitcoinjs/bitcoinjs-lib\">BitcoinJS</a> - Clean, readable, proven Bitcoin library.</li>\n<li><a href=\"https://github.com/bitpay/bitcore\">Bitcore</a> - Pure and powerful Bitcoin library.</li>\n<li><a href=\"https://github.com/devongovett/pdfkit\">PDFKit</a> - PDF generation library.</li>\n<li><a href=\"https://github.com/Turfjs/turf\">turf</a> - Modular geospatial processing and analysis engine.</li>\n<li><a href=\"https://github.com/mafintosh/webcat\">webcat</a> - p2p pipe across the web using WebRTC that uses your GitHub private/public key for authentication.</li>\n<li><a href=\"https://github.com/NodeOS/NodeOS\">NodeOS</a> - The first operating system powered by npm.</li>\n<li><a href=\"https://github.com/yodaos-project/yodaos\">YodaOS</a> - AI operating system.</li>\n<li><a href=\"https://github.com/BrainJS/brain.js\">Brain.js</a> - Machine-learning framework.</li>\n<li><a href=\"https://github.com/alibaba/pipcook\">Pipcook</a> - Front-end algorithm framework to create a machine learning pipeline.</li>\n<li><a href=\"https://github.com/cytoscape/cytoscape.js\">Cytoscape.js</a> - Graph theory (a.k.a. network) modeling and analysis.</li>\n<li><a href=\"https://gitlab.com/deadcanaries/kadence\">Kadence</a> - Kademlia distributed hash table.</li>\n<li><a href=\"https://github.com/twobucks/seedshot\">seedshot</a> - Temporary P2P screenshot sharing from your browser.</li>\n<li><a href=\"https://github.com/creationix/js-git\">js-git</a> - JavaScript implementation of Git.</li>\n<li><a href=\"https://github.com/skale-me/skale-engine\">skale</a> - High performance distributed data processing engine.</li>\n<li><a href=\"https://github.com/sheetjs/js-xlsx\">xlsx</a> - Pure JS Excel spreadsheet reader and writer.</li>\n<li><a href=\"https://github.com/isomorphic-git/isomorphic-git\">isomorphic-git</a> - Pure JavaScript implementation of Git.</li>\n</ul>\n<h3>Command-line apps</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/np\">np</a> - Better <code>npm publish</code>.</li>\n<li><a href=\"https://github.com/sindresorhus/npm-name\">npm-name</a> - Check a package name's availability on npm.</li>\n<li><a href=\"https://github.com/sindresorhus/gh-home\">gh-home</a> - Open the GitHub page of the repo in the current directory.</li>\n<li><a href=\"https://github.com/sindresorhus/npm-home\">npm-home</a> - Open the npm page of a package.</li>\n<li><a href=\"https://github.com/sindresorhus/trash\">trash</a> - Safer alternative to <code>rm</code>.</li>\n<li><a href=\"https://github.com/sindresorhus/speed-test\">speed-test</a> - Test your internet connection speed and ping.</li>\n<li><a href=\"https://github.com/sindresorhus/emoj\">emoj</a> - Find relevant emoji from text on the command-line.</li>\n<li><a href=\"https://github.com/sindresorhus/pageres\">pageres</a> - Capture website screenshots.</li>\n<li><a href=\"https://github.com/sindresorhus/cpy\">cpy</a> - Copy files.</li>\n<li><a href=\"https://github.com/MrRio/vtop\">vtop</a> - More better top, with nice charts.</li>\n<li><a href=\"https://github.com/sindresorhus/empty-trash\">empty-trash</a> - Empty the trash.</li>\n<li><a href=\"https://github.com/sindresorhus/is-up\">is-up</a> - Check whether a website is up or down.</li>\n<li><a href=\"https://github.com/sindresorhus/is-online\">is-online</a> - Check if the internet connection is up.</li>\n<li><a href=\"https://github.com/sindresorhus/public-ip\">public-ip</a> - Get your public IP address.</li>\n<li><a href=\"https://github.com/sindresorhus/clipboard-cli\">clipboard-cli</a> - Copy &#x26; paste on the terminal.</li>\n<li><a href=\"https://github.com/xojs/xo\">XO</a> - Enforce strict code style using the JavaScript happiness style.</li>\n<li><a href=\"https://github.com/feross/standard\">Standard</a> - JavaScript Standard Style — One style to rule them all.</li>\n<li><a href=\"https://github.com/eslint/eslint\">ESLint</a> - The pluggable linting utility for JavaScript.</li>\n<li><a href=\"https://github.com/samverschueren/dev-time-cli\">dev-time</a> - Get the current local time of a GitHub user.</li>\n<li><a href=\"https://github.com/alanshaw/david\">David</a> - Tells you when your package npm dependencies are out of date.</li>\n<li><a href=\"https://github.com/indexzero/http-server\">http-server</a> - Simple, zero-config command-line HTTP server.</li>\n<li><a href=\"https://github.com/tapio/live-server\">Live Server</a> - Development HTTP-server with livereload capability.</li>\n<li><a href=\"https://github.com/kessler/node-bcat\">bcat</a> - Pipe command output to web browsers.</li>\n<li><a href=\"https://github.com/pawurb/normit\">normit</a> - Google Translate with speech synthesis in your terminal.</li>\n<li><a href=\"https://github.com/sindresorhus/fkill-cli\">fkill</a> - Fabulously kill processes. Cross-platform.</li>\n<li><a href=\"https://github.com/danielstjules/pjs\">pjs</a> - Pipeable JavaScript. Quickly filter, map, and reduce from the terminal.</li>\n<li><a href=\"https://github.com/davglass/license-checker\">license-checker</a> - Check licenses of your app's dependencies.</li>\n<li><a href=\"https://github.com/juliangruber/browser-run\">browser-run</a> - Easily run code in a browser environment.</li>\n<li><a href=\"https://github.com/sindresorhus/tmpin\">tmpin</a> - Adds stdin support to any CLI app that accepts file input.</li>\n<li><a href=\"https://github.com/kevva/wifi-password-cli\">wifi-password</a> - Get the current wifi password.</li>\n<li><a href=\"https://github.com/sindresorhus/wallpaper\">wallpaper</a> - Change the desktop wallpaper.</li>\n<li><a href=\"https://github.com/kevva/brightness-cli\">brightness</a> - Change the screen brightness.</li>\n<li><a href=\"https://github.com/maxogden/torrent\">torrent</a> - Download torrents.</li>\n<li><a href=\"https://github.com/sindresorhus/kill-tabs\">kill-tabs</a> - Kill all Chrome tabs to improve performance, decrease battery usage, and save memory.</li>\n<li><a href=\"https://github.com/wooorm/alex\">alex</a> - Catch insensitive, inconsiderate writing.</li>\n<li><a href=\"https://github.com/noraesae/pen\">pen</a> - Live Markdown preview in the browser from your favorite editor.</li>\n<li><a href=\"https://github.com/beatfreaker/subdownloader\">subdownloader</a> - Subtitle downloader for movies and TV series.</li>\n<li><a href=\"https://github.com/sindresorhus/dark-mode\">dark-mode</a> - Toggle the macOS Dark Mode.</li>\n<li><a href=\"https://github.com/nogizhopaboroda/iponmap\">iponmap</a> - IP location finder.</li>\n<li><a href=\"https://github.com/Javascipt/Jsome\">Jsome</a> - Pretty prints JSON with configurable colors and indentation.</li>\n<li><a href=\"https://github.com/mischah/itunes-remote\">itunes-remote</a> - Interactively control iTunes.</li>\n<li><a href=\"https://github.com/samverschueren/mobicon-cli\">mobicon</a> - Mobile app icon generator.</li>\n<li><a href=\"https://github.com/samverschueren/mobisplash-cli\">mobisplash</a> - Mobile app splash screen generator.</li>\n<li><a href=\"https://github.com/rtfpessoa/diff2html-cli\">diff2html-cli</a> - Pretty git diff to HTML generator.</li>\n<li><a href=\"https://github.com/dthree/cash\">Cash</a> - Cross-platform Unix shell commands in pure JavaScript.</li>\n<li><a href=\"https://github.com/VictorBjelkholm/trymodule\">trymodule</a> - Try out npm packages in the terminal.</li>\n<li><a href=\"https://github.com/kucherenko/jscpd\">jscpd</a> - Copy/paste detector for source code.</li>\n<li><a href=\"https://github.com/Raathigesh/Atmo\">atmo</a> - Server-side API mocking.</li>\n<li><a href=\"https://github.com/siddharthkp/auto-install\">auto-install</a> - Auto installs dependencies as you code.</li>\n<li><a href=\"https://github.com/linuxenko/lessmd\">lessmd</a> - Markdown in the terminal.</li>\n<li><a href=\"https://github.com/siddharthkp/cost-of-modules\">cost-of-modules</a> - Find out which dependencies are slowing you down.</li>\n<li><a href=\"https://github.com/localtunnel/localtunnel\">localtunnel</a> - Expose your localhost to the world.</li>\n<li><a href=\"https://github.com/marionebl/svg-term-cli\">svg-term-cli</a> - Share terminal sessions via SVG.</li>\n<li><a href=\"https://github.com/aksakalli/gtop\">gtop</a> - System monitoring dashboard for the terminal.</li>\n<li><a href=\"https://github.com/mjswensen/themer\">themer</a> - Generate themes for your editor, terminal, wallpaper, Slack, and more.</li>\n<li><a href=\"https://github.com/mixn/carbon-now-cli\">carbon-now-cli</a> - Beautiful images of your code — from right inside your terminal.</li>\n<li><a href=\"https://github.com/xxczaki/cash-cli\">cash-cli</a> - Convert between 170 currencies.</li>\n<li><a href=\"https://github.com/klauscfhq/taskbook\">taskbook</a> - Tasks, boards &#x26; notes for the command-line habitat.</li>\n<li><a href=\"https://github.com/brandonweiss/discharge\">discharge</a> - Easily deploy static websites to Amazon S3.</li>\n<li><a href=\"https://github.com/voidcosmos/npkill\">npkill</a> - Easily find and remove old and heavy node_modules folders.</li>\n</ul>\n<h3>Functional programming</h3>\n<ul>\n<li><a href=\"https://github.com/lodash/lodash\">lodash</a> - Utility library delivering consistency, customization, performance, &#x26; extras. A better and faster Underscore.js.</li>\n<li><a href=\"https://github.com/facebook/immutable-js\">immutable</a> - Immutable data collections.</li>\n<li><a href=\"https://github.com/ramda/ramda\">Ramda</a> - Utility library with a focus on flexible functional composition enabled by automatic currying and reversed argument order. Avoids mutating data.</li>\n<li><a href=\"https://github.com/origamitower/folktale\">Folktale</a> - Suite of libraries for generic functional programming in JavaScript that allows you to write elegant, modular applications with fewer bugs, and more reuse.</li>\n<li><a href=\"https://github.com/mout/mout\">Mout</a> - Utility library with the biggest difference between other existing solutions is that you can choose to load only the modules/functions that you need, no extra overhead.</li>\n<li><a href=\"https://github.com/baconjs/bacon.js\">Bacon.js</a> - Functional reactive programming.</li>\n<li><a href=\"https://github.com/reactivex/rxjs\">RxJS</a> - Functional reactive library for transforming, composing, and querying various kinds of data.</li>\n<li><a href=\"https://github.com/dtao/lazy.js\">Lazy.js</a> - Utility library similar to lodash/Underscore but with lazy evaluation, which can translate to superior performance in many cases.</li>\n<li><a href=\"https://github.com/kefirjs/kefir\">Kefir.js</a> - Reactive library with focus on high performance and low memory usage.</li>\n</ul>\n<h3>HTTP</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/got\">got</a> - Nicer interface to the built-in <code>http</code> module.</li>\n<li><a href=\"https://github.com/sindresorhus/gh-got\">gh-got</a> - Convenience wrapper for <code>got</code> to interact with the GitHub API.</li>\n<li><a href=\"https://github.com/mzabriskie/axios\">axios</a> - Promise based HTTP client (works in the browser too).</li>\n<li><a href=\"https://github.com/hapijs/wreck\">wreck</a> - HTTP Client Utilities.</li>\n<li><a href=\"https://github.com/kevva/download\">download</a> - Download and extract files effortlessly.</li>\n<li><a href=\"https://github.com/nodejitsu/node-http-proxy\">http-proxy</a> - HTTP proxy.</li>\n<li><a href=\"https://github.com/visionmedia/superagent\">superagent</a> - HTTP request library.</li>\n<li><a href=\"https://github.com/bitinn/node-fetch\">node-fetch</a> - <code>window.fetch</code> for Node.js.</li>\n<li><a href=\"https://github.com/bbc/flashheart\">flashheart</a> - REST client.</li>\n<li><a href=\"https://github.com/micromata/http-fake-backend\">http-fake-backend</a> - Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.</li>\n<li><a href=\"https://github.com/lukechilds/cacheable-request\">cacheable-request</a> - Wrap native HTTP requests with RFC compliant cache support.</li>\n<li><a href=\"https://github.com/khaosdoctor/gotql\">gotql</a> - GraphQL request library built on <a href=\"https://github.com/sindresorhus/got\">got</a>.</li>\n<li><a href=\"https://github.com/gajus/global-agent\">global-agent</a> - Global HTTP/HTTPS proxy agent that is configurable using environment variables.</li>\n<li><a href=\"https://github.com/sinedied/smoke\">smoke</a> - File-based HTTP mock server with recording abilities.</li>\n<li><a href=\"https://github.com/nodejs/undici\">undici</a> - High performance HTTP client written from scratch with zero dependencies.</li>\n</ul>\n<h3>Debugging / Profiling</h3>\n<ul>\n<li><a href=\"https://github.com/GoogleChromeLabs/ndb\">ndb</a> - Improved debugging experience, enabled by Chrome DevTools.</li>\n<li><a href=\"https://github.com/s-a/iron-node\">ironNode</a> - Node.js debugger supporting ES2015 out of the box.</li>\n<li><a href=\"https://github.com/node-inspector/node-inspector\">node-inspector</a> - Debugger based on Blink Developer Tools.</li>\n<li><a href=\"https://github.com/visionmedia/debug\">debug</a> - Tiny debugging utility.</li>\n<li><a href=\"https://github.com/mafintosh/why-is-node-running\">why-is-node-running</a> - Node.js is running but you don't know why?</li>\n<li><a href=\"https://github.com/valyouw/njstrace\">njsTrace</a> - Instrument and trace your code, see all function calls, arguments, return values, as well as the time spent in each function.</li>\n<li><a href=\"https://github.com/joyent/node-vstream\">vstream</a> - Instrumentable streams mix-ins to inspect a pipeline of streams.</li>\n<li><a href=\"https://github.com/watson/stackman\">stackman</a> - Enhance an error stacktrace with code excerpts and other goodies.</li>\n<li><a href=\"https://github.com/alidavut/locus\">locus</a> - Starts a REPL at runtime that has access to all variables.</li>\n<li><a href=\"https://github.com/davidmarkclements/0x\">0x</a> - Flamegraph profiling.</li>\n<li><a href=\"https://github.com/automation-stack/ctrace\">ctrace</a> - Well-formatted and improved trace system calls and signals.</li>\n<li><a href=\"https://github.com/andywer/leakage\">leakage</a> - Write memory leak tests.</li>\n<li><a href=\"https://github.com/nodejs/llnode\">llnode</a> - Post-mortem analysis tool which allows you to inspect objects and get insights from a crashed Node.js process.</li>\n<li><a href=\"https://github.com/sfninja/thetool\">thetool</a> - Capture different CPU, memory, and other profiles for your app in Chrome DevTools friendly format.</li>\n<li><a href=\"https://github.com/slanatech/swagger-stats\">swagger-stats</a> - Trace API calls and monitor API performance, health, and usage metrics.</li>\n<li><a href=\"https://github.com/june07/nim\">NiM</a> - Manages DevTools debugging workflow.</li>\n</ul>\n<h3>Logging</h3>\n<ul>\n<li><a href=\"https://github.com/pinojs/pino\">pino</a> - Extremely fast logger inspired by Bunyan.</li>\n<li><a href=\"https://github.com/winstonjs/winston\">winston</a> - Multi-transport async logging library.</li>\n<li><a href=\"https://github.com/watson/console-log-level\">console-log-level</a> - The most simple logger imaginable with support for log levels and custom prefixes.</li>\n<li><a href=\"https://github.com/guigrpa/storyboard\">storyboard</a> - End-to-end, hierarchical, real-time, colorful logs and stories.</li>\n<li><a href=\"https://github.com/klauscfhq/signale\">signale</a> - Console logger.</li>\n<li><a href=\"https://github.com/nuxt/consola\">consola</a> - Console logger.</li>\n</ul>\n<h3>Command-line utilities</h3>\n<ul>\n<li><a href=\"https://github.com/chalk/chalk\">chalk</a> - Terminal string styling done right.</li>\n<li><a href=\"https://github.com/sindresorhus/meow\">meow</a> - CLI app helper.</li>\n<li><a href=\"https://github.com/yargs/yargs\">yargs</a> - Command-line parser that automatically generates an elegant user-interface.</li>\n<li><a href=\"https://github.com/sindresorhus/ora\">ora</a> - Elegant terminal spinner.</li>\n<li><a href=\"https://github.com/sindresorhus/get-stdin\">get-stdin</a> - Easier stdin.</li>\n<li><a href=\"https://github.com/sindresorhus/log-update\">log-update</a> - Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.</li>\n<li><a href=\"https://github.com/vadimdemedes/ink\">Ink</a> - React for interactive command-line apps.</li>\n<li><a href=\"https://github.com/samverschueren/listr\">listr</a> - Terminal task list.</li>\n<li><a href=\"https://github.com/sindresorhus/conf\">conf</a> - Simple config handling for your app or module.</li>\n<li><a href=\"https://github.com/sindresorhus/ansi-escapes\">ansi-escapes</a> - ANSI escape codes for manipulating the terminal.</li>\n<li><a href=\"https://github.com/sindresorhus/log-symbols\">log-symbols</a> - Colored symbols for various log levels.</li>\n<li><a href=\"https://github.com/sindresorhus/figures\">figures</a> - Unicode symbols with Windows CMD fallbacks.</li>\n<li><a href=\"https://github.com/sindresorhus/boxen\">boxen</a> - Create boxes in the terminal.</li>\n<li><a href=\"https://github.com/sindresorhus/terminal-link\">terminal-link</a> - Create clickable links in the terminal.</li>\n<li><a href=\"https://github.com/sindresorhus/terminal-image\">terminal-image</a> - Display images in the terminal.</li>\n<li><a href=\"https://github.com/sindresorhus/string-width\">string-width</a> - Get the visual width of a string - the number of columns required to display it.</li>\n<li><a href=\"https://github.com/sindresorhus/cli-truncate\">cli-truncate</a> - Truncate a string to a specific width in the terminal.</li>\n<li><a href=\"https://github.com/sindresorhus/first-run\">first-run</a> - Check if it's the first time the process is run.</li>\n<li><a href=\"https://github.com/chjj/blessed\">blessed</a> - Curses-like library.</li>\n<li><a href=\"https://github.com/SBoudrias/Inquirer.js\">Inquirer.js</a> - Interactive command-line prompt.</li>\n<li><a href=\"https://github.com/sindresorhus/yn\">yn</a> - Parse yes/no like values.</li>\n<li><a href=\"https://github.com/cli-table/cli-table3\">cli-table3</a> - Pretty unicode tables.</li>\n<li><a href=\"https://github.com/madbence/node-drawille\">drawille</a> - Draw on the terminal with unicode braille characters.</li>\n<li><a href=\"https://github.com/yeoman/update-notifier\">update-notifier</a> - Update notifications for your CLI app.</li>\n<li><a href=\"https://github.com/jstrace/chart\">ascii-charts</a> - ASCII bar chart in the terminal.</li>\n<li><a href=\"https://github.com/tj/node-progress\">progress</a> - Flexible ascii progress bar.</li>\n<li><a href=\"https://github.com/yeoman/insight\">insight</a> - Helps you understand how your tool is being used by anonymously reporting usage metrics to Google Analytics.</li>\n<li><a href=\"https://github.com/sindresorhus/cli-cursor\">cli-cursor</a> - Toggle the CLI cursor.</li>\n<li><a href=\"https://github.com/timoxley/columnify\">columnify</a> - Create text-based columns suitable for console output. Supports cell wrapping.</li>\n<li><a href=\"https://github.com/shannonmoeller/cli-columns\">cli-columns</a> - Columnated unicode and ansi-safe text lists.</li>\n<li><a href=\"https://github.com/dominikwilkowski/cfonts\">cfonts</a> - Sexy ASCII fonts for the console.</li>\n<li><a href=\"https://github.com/codekirei/node-multispinner\">multispinner</a> - Multiple, simultaneous, individually controllable CLI spinners.</li>\n<li><a href=\"https://github.com/f/omelette\">omelette</a> - Shell autocompletion helper.</li>\n<li><a href=\"https://github.com/kentcdodds/cross-env\">cross-env</a> - Set environment variables cross-platform.</li>\n<li><a href=\"https://github.com/shelljs/shelljs\">shelljs</a> - Portable Unix shell commands.</li>\n<li><a href=\"https://github.com/sindresorhus/sudo-block\">sudo-block</a> - Block users from running your app with root permissions.</li>\n<li><a href=\"https://github.com/sindresorhus/loud-rejection\">loud-rejection</a> - Make unhandled promise rejections fail loudly instead of the default silent fail.</li>\n<li><a href=\"https://github.com/sindresorhus/sparkly\">sparkly</a> - Generate sparklines <code>▁▂▃▅▂▇</code>.</li>\n<li><a href=\"https://github.com/teambit/bit\">Bit</a> - Create, maintain, find and use small modules and components across repositories.</li>\n<li><a href=\"https://github.com/bokub/gradient-string\">gradient-string</a> - Beautiful color gradients in terminal output.</li>\n<li><a href=\"https://github.com/oclif/oclif\">oclif</a> - CLI framework complete with parser, automatic documentation, testing, and plugins.</li>\n<li><a href=\"https://github.com/sindresorhus/term-size\">term-size</a> - Reliably get the terminal window size.</li>\n<li><a href=\"https://github.com/drew-y/cliffy\">Cliffy</a> - Framework for interactive CLIs.</li>\n</ul>\n<h3>Build tools</h3>\n<ul>\n<li><a href=\"https://github.com/parcel-bundler/parcel\">parcel</a> - Blazing fast, zero config web app bundler.</li>\n<li><a href=\"https://github.com/webpack/webpack\">webpack</a> - Packs modules and assets for the browser.</li>\n<li><a href=\"https://github.com/rollup/rollup\">rollup</a> - Next-generation ES2015 module bundler.</li>\n<li><a href=\"https://github.com/gulpjs/gulp\">gulp</a> - Streaming and fast build system that favors code over config.</li>\n<li><a href=\"https://github.com/broccolijs/broccoli\">Broccoli</a> - Fast, reliable asset pipeline, supporting constant-time rebuilds and compact build definitions.</li>\n<li><a href=\"https://github.com/brunch/brunch\">Brunch</a> - Front-end web app build tool with simple declarative config, fast incremental compilation, and an opinionated workflow.</li>\n<li><a href=\"https://github.com/deepsweet/start\">Start</a> - Functional task runner with shareable presets.</li>\n<li><a href=\"https://github.com/shannonmoeller/ygor\">ygor</a> - Promising task runner for when <code>npm run</code> isn't enough and everything else is too much.</li>\n<li><a href=\"https://github.com/fuse-box/fuse-box\">FuseBox</a> - Fast build system that combines the power of webpack, JSPM and SystemJS, with first-class TypeScript support.</li>\n<li><a href=\"https://github.com/zeit/pkg\">pkg</a> - Package your Node.js project into an executable.</li>\n</ul>\n<h3>Hardware</h3>\n<ul>\n<li><a href=\"https://github.com/rwaldron/johnny-five\">johnny-five</a> - Firmata based Arduino Framework.</li>\n<li><a href=\"https://github.com/voodootikigod/node-serialport\">serialport</a> - Access serial ports for reading and writing.</li>\n<li><a href=\"https://github.com/nonolith/node-usb\">usb</a> - USB library.</li>\n<li><a href=\"https://github.com/fivdi/i2c-bus\">i2c-bus</a> - I2C serial bus access.</li>\n<li><a href=\"https://github.com/fivdi/onoff\">onoff</a> - GPIO access and interrupt detection.</li>\n<li><a href=\"https://github.com/fivdi/spi-device\">spi-device</a> - SPI serial bus access.</li>\n<li><a href=\"https://github.com/fivdi/pigpio\">pigpio</a> - Fast GPIO, PWM, servo control, state change notification, and interrupt handling on the Raspberry Pi.</li>\n<li><a href=\"https://github.com/infusion/GPS.js\">gps</a> - NMEA parser for handling GPS receivers.</li>\n</ul>\n<h3>Templating</h3>\n<ul>\n<li><a href=\"https://github.com/marko-js/marko\">marko</a> - HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags.</li>\n<li><a href=\"https://github.com/mozilla/nunjucks\">nunjucks</a> - Templating engine with inheritance, asynchronous control, and more (jinja2 inspired).</li>\n<li><a href=\"https://github.com/wycats/handlebars.js\">handlebars.js</a> - Superset of Mustache templates which adds powerful features like helpers and more advanced blocks.</li>\n<li><a href=\"https://github.com/mde/ejs\">EJS</a> - Simple unopinionated templating language.</li>\n<li><a href=\"https://github.com/pugjs/pug\">Pug</a> - High-performance template engine heavily influenced by Haml.</li>\n</ul>\n<h3>Web frameworks</h3>\n<ul>\n<li><a href=\"https://github.com/hapijs/hapi\">Hapi</a> - Framework for building applications and services.</li>\n<li><a href=\"https://github.com/koajs/koa\">Koa</a> - Framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.</li>\n<li><a href=\"https://github.com/expressjs/express\">Express</a> - Web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.</li>\n<li><a href=\"https://github.com/feathersjs/feathers\">Feathers</a> - Microservice framework built in the spirit of Express.</li>\n<li><a href=\"https://github.com/strongloop/loopback-next\">LoopBack</a> - Powerful framework for creating REST APIs and easily connecting to backend data sources.</li>\n<li><a href=\"https://github.com/meteor/meteor\">Meteor</a> - An ultra-simple, database-everywhere, data-on-the-wire, pure-Javascript web framework. <em>(You might like <a href=\"https://github.com/Urigo/awesome-meteor\">awesome-meteor</a>)</em></li>\n<li><a href=\"https://github.com/restify/node-restify\">Restify</a> - Enables you to build correct REST web services.</li>\n<li><a href=\"https://github.com/thinkjs/thinkjs\">ThinkJS</a> - Framework with ES2015+ support, WebSockets, REST API.</li>\n<li><a href=\"https://github.com/actionhero/actionhero\">ActionHero</a> - Framework for making reusable &#x26; scalable APIs for TCP sockets, WebSockets, and HTTP clients.</li>\n<li><a href=\"https://github.com/zeit/next.js\">Next.js</a> - Minimalistic framework for server-rendered universal JavaScript web apps.</li>\n<li><a href=\"https://github.com/nuxt/nuxt.js\">Nuxt.js</a> - Minimalistic framework for server-rendered Vue.js apps.</li>\n<li><a href=\"https://github.com/senecajs/seneca\">seneca</a> - Toolkit for writing microservices.</li>\n<li><a href=\"http://adonisjs.com\">AdonisJs</a> - A true MVC framework for Node.js built on solid foundations of Dependency Injection and IoC container.</li>\n<li><a href=\"https://github.com/hemerajs/hemera\">Hemera</a> - Write reliable and fault-tolerant microservices with <a href=\"https://nats.io\">NATS</a>.</li>\n<li><a href=\"https://github.com/zeit/micro\">Micro</a> - Minimalistic microservice framework with an async approach.</li>\n<li><a href=\"https://moleculer.services\">Moleculer</a> - Fast &#x26; powerful microservices framework.</li>\n<li><a href=\"https://github.com/fastify/fastify\">Fastify</a> - Fast and low overhead web framework.</li>\n<li><a href=\"https://github.com/nestjs/nest\">Nest</a> - Angular-inspired framework for building efficient and scalable server-side apps.</li>\n<li><a href=\"https://github.com/19majkel94/type-graphql\">TypeGraphQL</a> - Modern framework for creating GraphQL APIs with TypeScript, using classes and decorators.</li>\n<li><a href=\"https://github.com/talentlessguy/tinyhttp\">Tinyhttp</a> - Modern and fast Express-like web framework.</li>\n<li><a href=\"https://github.com/marblejs/marble\">Marble.js</a> - Functional reactive framework for building server-side apps, based on TypeScript and RxJS.</li>\n<li><a href=\"https://github.com/ladjs/lad\">Lad</a> - Framework made by a former Express TC and Koa member that bundles web, API, job, and proxy servers.</li>\n</ul>\n<h3>Documentation</h3>\n<ul>\n<li><a href=\"https://github.com/documentationjs/documentation\">documentation.js</a> - API documentation generator with support for ES2015+ and flow annotation.</li>\n<li><a href=\"https://github.com/esdoc/esdoc\">ESDoc</a> - Documentation generator targeting ES2015, attaching test code and measuring documentation coverage.</li>\n<li><a href=\"https://github.com/jashkenas/docco\">Docco</a> - Documentation generator which produces an HTML document that displays your comments intermingled with your code.</li>\n<li><a href=\"https://github.com/jsdoc3/jsdoc\">JSDoc</a> - API documentation generator similar to JavaDoc or PHPDoc.</li>\n<li><a href=\"https://github.com/facebook/docusaurus\">Docusaurus</a> - Documentation website generator that leverages React and Markdown, and comes with translation and versioning features.</li>\n</ul>\n<h3>Filesystem</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/del\">del</a> - Delete files/folders using globs.</li>\n<li><a href=\"https://github.com/sindresorhus/globby\">globby</a> - Glob files with support for multiple patterns.</li>\n<li><a href=\"https://github.com/sindresorhus/cpy\">cpy</a> - Copy files.</li>\n<li><a href=\"https://github.com/isaacs/rimraf\">rimraf</a> - Recursively delete files like <code>rm -rf</code>.</li>\n<li><a href=\"https://github.com/sindresorhus/make-dir\">make-dir</a> - Recursively create directories like <code>mkdir -p</code>.</li>\n<li><a href=\"https://github.com/isaacs/node-graceful-fs\">graceful-fs</a> - Drop-in replacement for the <code>fs</code> module with various improvements.</li>\n<li><a href=\"https://github.com/paulmillr/chokidar\">chokidar</a> - Filesystem watcher which stabilizes events from <code>fs.watch</code> and <code>fs.watchFile</code> as well as using native <code>fsevents</code> on macOS.</li>\n<li><a href=\"https://github.com/sindresorhus/find-up\">find-up</a> - Find a file by walking up parent directories.</li>\n<li><a href=\"https://github.com/IndigoUnited/node-proper-lockfile\">proper-lockfile</a> - Inter-process and inter-machine lockfile utility.</li>\n<li><a href=\"https://github.com/sindresorhus/load-json-file\">load-json-file</a> - Read and parse a JSON file.</li>\n<li><a href=\"https://github.com/sindresorhus/write-json-file\">write-json-file</a> - Stringify and write JSON to a file atomically.</li>\n<li><a href=\"https://github.com/npm/fs-write-stream-atomic\">fs-write-stream-atomic</a> - Like <code>fs.createWriteStream()</code>, but atomic.</li>\n<li><a href=\"https://github.com/sindresorhus/filenamify\">filenamify</a> - Convert a string to a valid filename.</li>\n<li><a href=\"https://github.com/kevva/lnfs\">lnfs</a> - Force create symlinks like <code>ln -fs</code>.</li>\n<li><a href=\"https://github.com/bevry/istextorbinary\">istextorbinary</a> - Check if a file is text or binary.</li>\n<li><a href=\"https://github.com/szwacz/fs-jetpack\">fs-jetpack</a> - Completely redesigned file system API for convenience in everyday use.</li>\n<li><a href=\"https://github.com/jprichardson/node-fs-extra\">fs-extra</a> - Extra methods for the <code>fs</code> module.</li>\n<li><a href=\"https://github.com/sindresorhus/pkg-dir\">pkg-dir</a> - Find the root directory of an npm package.</li>\n<li><a href=\"https://github.com/nspragg/filehound\">filehound</a> - Flexible and fluent interface for searching the file system.</li>\n<li><a href=\"https://github.com/sindresorhus/move-file\">move-file</a> - Move a file, even works across devices.</li>\n<li><a href=\"https://github.com/sindresorhus/tempy\">tempy</a> - Get a random temporary file or directory path.</li>\n</ul>\n<h3>Control flow</h3>\n<ul>\n<li>\n<p>Promises</p>\n<ul>\n<li><a href=\"https://github.com/petkaantonov/bluebird\">Bluebird</a> - Promise library with focus on innovative features and performance.</li>\n<li><a href=\"https://github.com/sindresorhus/pify\">pify</a> - Promisify a callback-style function.</li>\n<li><a href=\"https://github.com/sindresorhus/delay\">delay</a> - Delay a promise a specified amount of time.</li>\n<li><a href=\"https://github.com/nodeca/promise-memoize\">promise-memoize</a> - Memoize promise-returning functions, with expire and prefetch.</li>\n<li><a href=\"https://github.com/lpinca/valvelet\">valvelet</a> - Limit the execution rate of a promise-returning function.</li>\n<li><a href=\"https://github.com/sindresorhus/p-map\">p-map</a> - Map over promises concurrently.</li>\n<li><a href=\"https://github.com/sindresorhus/promise-fun\">More…</a></li>\n</ul>\n</li>\n<li>\n<p>Observables</p>\n<ul>\n<li><a href=\"https://github.com/zenparsing/zen-observable\">zen-observable</a> - Implementation of Observables.</li>\n<li><a href=\"https://github.com/ReactiveX/RxJS\">RxJS</a> - Reactive programming.</li>\n<li><a href=\"https://github.com/sindresorhus/awesome-observables\">observable-to-promise</a> - Convert an Observable to a Promise.</li>\n<li><a href=\"https://github.com/sindresorhus/awesome-observables\">More…</a></li>\n</ul>\n</li>\n<li>\n<p>Streams</p>\n<ul>\n<li><a href=\"https://github.com/caolan/highland\">Highland.js</a> - Manages synchronous and asynchronous code easily, using nothing more than standard JavaScript and Node-like Streams.</li>\n</ul>\n</li>\n<li>\n<p>Callbacks</p>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/each-async\">each-async</a> - Async concurrent iterator like forEach.</li>\n<li><a href=\"https://github.com/caolan/async\">async</a> - Provides straight-forward, powerful functions for working with asynchronicity.</li>\n</ul>\n</li>\n<li>\n<p>Channels</p>\n<ul>\n<li><a href=\"https://github.com/ubolonton/js-csp\">js-csp</a> - Communicating sequential processes for JavaScript (like Clojurescript core.async, or Go).</li>\n</ul>\n</li>\n</ul>\n<h3>Streams</h3>\n<ul>\n<li><a href=\"https://github.com/rvagg/through2\">through2</a> - Tiny wrapper around streams2 Transform to avoid explicit subclassing noise.</li>\n<li><a href=\"https://github.com/hughsk/from2\">from2</a> - Convenience wrapper for ReadableStream, inspired by <code>through2</code>.</li>\n<li><a href=\"https://github.com/sindresorhus/get-stream\">get-stream</a> - Get a stream as a string or buffer.</li>\n<li><a href=\"https://github.com/sindresorhus/into-stream\">into-stream</a> - Convert a buffer/string/array/object into a stream.</li>\n<li><a href=\"https://github.com/mafintosh/duplexify\">duplexify</a> - Turn a writeable and readable stream into a single streams2 duplex stream.</li>\n<li><a href=\"https://github.com/mafintosh/pumpify\">pumpify</a> - Combine an array of streams into a single duplex stream.</li>\n<li><a href=\"https://github.com/mafintosh/peek-stream\">peek-stream</a> - Transform stream that lets you peek the first line before deciding how to parse it.</li>\n<li><a href=\"https://github.com/maxogden/binary-split\">binary-split</a> - Newline (or any delimiter) splitter stream.</li>\n<li><a href=\"https://github.com/jahewson/node-byline\">byline</a> - Super-simple line-by-line Stream reader.</li>\n<li><a href=\"https://github.com/sindresorhus/first-chunk-stream\">first-chunk-stream</a> - Transform the first chunk in a stream.</li>\n<li><a href=\"https://github.com/sindresorhus/pad-stream\">pad-stream</a> - Pad each line in a stream.</li>\n<li><a href=\"https://github.com/feross/multistream\">multistream</a> - Combine multiple streams into a single stream.</li>\n<li><a href=\"https://github.com/substack/stream-combiner2\">stream-combiner2</a> - Turn a pipeline into a single stream.</li>\n<li><a href=\"https://github.com/nodejs/readable-stream\">readable-stream</a> - Mirror of Streams2 and Streams3 implementations in core.</li>\n<li><a href=\"https://github.com/almost/through2-concurrent\">through2-concurrent</a> - Transform object streams concurrently.</li>\n</ul>\n<h3>Real-time</h3>\n<ul>\n<li><a href=\"https://github.com/uWebSockets/uWebSockets\">µWebSockets</a> - Highly scalable WebSocket server &#x26; client library.</li>\n<li><a href=\"https://github.com/socketio/socket.io\">Socket.io</a> - Enables real-time bidirectional event-based communication.</li>\n<li><a href=\"https://github.com/faye/faye\">Faye</a> - Real-time client-server message bus, based on Bayeux protocol.</li>\n<li><a href=\"https://github.com/SocketCluster/socketcluster\">SocketCluster</a> - Scalable HTTP + WebSocket engine which can run on multiple CPU cores.</li>\n<li><a href=\"https://github.com/primus/primus\">Primus</a> - An abstraction layer for real-time frameworks to prevent module lock-in.</li>\n<li><a href=\"https://github.com/deepstreamIO/deepstream.io-client-js\">deepstream.io</a> - Scalable real-time microservice framework.</li>\n<li><a href=\"https://github.com/kalm/kalm.js\">Kalm</a> - Low-level socket router and middleware framework.</li>\n<li><a href=\"https://github.com/mqttjs/MQTT.js\">MQTT.js</a> - Client for MQTT - Pub-sub based messaging protocol for use on top of TCP/IP.</li>\n<li><a href=\"https://github.com/elpheria/rpc-websockets\">rpc-websockets</a> - JSON-RPC 2.0 implementation over WebSockets.</li>\n<li><a href=\"https://github.com/mcollina/aedes\">Aedes</a> - Barebone MQTT server that can run on any stream server.</li>\n</ul>\n<h3>Image</h3>\n<ul>\n<li><a href=\"https://github.com/lovell/sharp\">sharp</a> - The fastest module for resizing JPEG, PNG, WebP and TIFF images.</li>\n<li><a href=\"https://github.com/sindresorhus/image-type\">image-type</a> - Detect the image type of a Buffer/Uint8Array.</li>\n<li><a href=\"https://github.com/aheckmann/gm\">gm</a> - GraphicsMagick and ImageMagick wrapper.</li>\n<li><a href=\"https://github.com/EyalAr/lwip\">lwip</a> - Lightweight image processor which does not require ImageMagick.</li>\n<li><a href=\"https://github.com/nodeca/pica\">pica</a> - High quality &#x26; fast resize (lanczos3) in pure JS. Alternative to canvas drawImage(), when no pixelation allowed.</li>\n<li><a href=\"https://github.com/oliver-moran/jimp\">jimp</a> - Image processing in pure JavaScript.</li>\n<li><a href=\"https://github.com/nodeca/probe-image-size\">probe-image-size</a> - Get the size of most image formats without a full download.</li>\n<li><a href=\"https://github.com/soldair/node-qrcode\">qrcode</a> - QR code and bar code generator.</li>\n<li><a href=\"https://github.com/matmen/ImageScript\">ImageScript</a> - Image processing in JavaScript, utilizing WebAssembly for performance.</li>\n</ul>\n<h3>Text</h3>\n<ul>\n<li><a href=\"https://github.com/ashtuchkin/iconv-lite\">iconv-lite</a> - Convert character encodings.</li>\n<li><a href=\"https://github.com/sindresorhus/string-length\">string-length</a> - Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes.</li>\n<li><a href=\"https://github.com/sindresorhus/camelcase\">camelcase</a> - Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar.</li>\n<li><a href=\"https://github.com/sindresorhus/escape-string-regexp\">escape-string-regexp</a> - Escape RegExp special characters.</li>\n<li><a href=\"https://github.com/sindresorhus/execall\">execall</a> - Find multiple RegExp matches in a string.</li>\n<li><a href=\"https://github.com/sindresorhus/splice-string\">splice-string</a> - Remove or replace part of a string like <code>Array#splice</code>.</li>\n<li><a href=\"https://github.com/sindresorhus/indent-string\">indent-string</a> - Indent each line in a string.</li>\n<li><a href=\"https://github.com/sindresorhus/strip-indent\">strip-indent</a> - Strip leading whitespace from every line in a string.</li>\n<li><a href=\"https://github.com/sindresorhus/detect-indent\">detect-indent</a> - Detect the indentation of code.</li>\n<li><a href=\"https://github.com/mathiasbynens/he\">he</a> - HTML entity encoder/decoder.</li>\n<li><a href=\"https://github.com/mashpie/i18n-node\">i18n-node</a> - Simple translation module with dynamic JSON storage.</li>\n<li><a href=\"https://github.com/nodeca/babelfish\">babelfish</a> - i18n with very easy syntax for plurals.</li>\n<li><a href=\"https://github.com/sindresorhus/matcher\">matcher</a> - Simple wildcard matching.</li>\n<li><a href=\"https://github.com/nodeca/unhomoglyph\">unhomoglyph</a> - Normalize visually similar unicode characters.</li>\n<li><a href=\"https://github.com/i18next/i18next\">i18next</a> - Internationalization framework.</li>\n<li><a href=\"https://github.com/ai/nanoid\">nanoid</a> - Tiny, secure, URL-friendly, unique string ID generator.</li>\n<li><a href=\"https://github.com/kurolabs/stegcloak\">StegCloak</a> - Conceal secrets within strings, in plain sight.</li>\n</ul>\n<h3>Number</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/random-int\">random-int</a> - Generate a random integer.</li>\n<li><a href=\"https://github.com/sindresorhus/random-float\">random-float</a> - Generate a random float.</li>\n<li><a href=\"https://github.com/sindresorhus/unique-random\">unique-random</a> - Generate random numbers that are consecutively unique.</li>\n<li><a href=\"https://github.com/sindresorhus/round-to\">round-to</a> - Round a number to a specific number of decimal places: <code>1.234</code> → <code>1.2</code>.</li>\n</ul>\n<h3>Math</h3>\n<ul>\n<li><a href=\"https://github.com/scijs/ndarray\">ndarray</a> - Multidimensional arrays.</li>\n<li><a href=\"https://github.com/josdejong/mathjs\">mathjs</a> - An extensive math library.</li>\n<li><a href=\"https://github.com/sindresorhus/math-clamp\">math-clamp</a> - Clamp a number.</li>\n<li><a href=\"https://github.com/fibo/algebra\">algebra</a> - Algebraic structures.</li>\n<li><a href=\"https://github.com/nodeca/multimath\">multimath</a> - Core to create fast image math in WebAssembly and JS.</li>\n</ul>\n<h3>Date</h3>\n<ul>\n<li><a href=\"https://github.com/moment/luxon\">Luxon</a> - Library for working with dates and times.</li>\n<li><a href=\"https://github.com/date-fns/date-fns\">date-fns</a> - Modern date utility.</li>\n<li><a href=\"http://momentjs.com\">Moment.js</a> - Parse, validate, manipulate, and display dates.</li>\n<li><a href=\"https://github.com/iamkun/dayjs\">Day.js</a> - Immutable date library alternative to Moment.js.</li>\n<li><a href=\"https://github.com/felixge/node-dateformat\">dateformat</a> - Date formatting.</li>\n<li><a href=\"https://github.com/samverschueren/tz-format\">tz-format</a> - Format a date with timezone: <code>2015-11-30T10:40:35+01:00</code>.</li>\n<li><a href=\"https://github.com/floatdrop/node-cctz\">cctz</a> - Fast parsing, formatting, and timezone conversation for dates.</li>\n</ul>\n<h3>URL</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/normalize-url\">normalize-url</a> - Normalize a URL.</li>\n<li><a href=\"https://github.com/sindresorhus/humanize-url\">humanize-url</a> - Humanize a URL: <a href=\"http://sindresorhus.com\">http://sindresorhus.com</a> → sindresorhus.com.</li>\n<li><a href=\"https://github.com/nodeca/url-unshort\">url-unshort</a> - Expand shortened URLs.</li>\n<li><a href=\"https://github.com/pid/speakingurl\">speakingurl</a> - Generate a slug from a string with transliteration.</li>\n<li><a href=\"https://github.com/markdown-it/linkify-it\">linkify-it</a> - Link patterns detector with full unicode support.</li>\n<li><a href=\"https://github.com/snd/url-pattern\">url-pattern</a> - Easier than regex string matching patterns for URLs and other strings.</li>\n<li><a href=\"https://github.com/nodeca/embedza\">embedza</a> - Create HTML snippets/embeds from URLs using info from oEmbed, Open Graph, meta tags.</li>\n</ul>\n<h3>Data validation</h3>\n<ul>\n<li><a href=\"https://github.com/hapijs/joi\">joi</a> - Object schema description language and validator for JavaScript objects.</li>\n<li><a href=\"https://github.com/mafintosh/is-my-json-valid\">is-my-json-valid</a> - JSON Schema validator that uses code generation to be extremely fast.</li>\n<li><a href=\"https://github.com/nettofarah/property-validator\">property-validator</a> - Easy property validation for Express.</li>\n<li><a href=\"https://github.com/Atinux/schema-inspector\">schema-inspector</a> - JSON API sanitization and validation.</li>\n<li><a href=\"https://github.com/epoberezkin/ajv\">ajv</a> - The fastest JSON Schema validator. Supports v5, v6 and v7 proposals.</li>\n<li><a href=\"https://github.com/ianstormtaylor/superstruct\">Superstruct</a> - Simple and composable way to validate data in JavaScript (and TypeScript).</li>\n</ul>\n<h3>Parsing</h3>\n<ul>\n<li><a href=\"https://github.com/wooorm/remark\">remark</a> - Markdown processor powered by plugins.</li>\n<li><a href=\"https://github.com/markdown-it/markdown-it\">markdown-it</a> - Markdown parser with 100% CommonMark support, extensions and syntax plugins.</li>\n<li><a href=\"https://github.com/inikulin/parse5\">parse5</a> - Fast full-featured spec compliant HTML parser.</li>\n<li><a href=\"https://github.com/sindresorhus/strip-json-comments\">strip-json-comments</a> - Strip comments from JSON.</li>\n<li><a href=\"https://github.com/sindresorhus/strip-css-comments\">strip-css-comments</a> - Strip comments from CSS.</li>\n<li><a href=\"https://github.com/sindresorhus/parse-json\">parse-json</a> - Parse JSON with more helpful errors.</li>\n<li><a href=\"https://github.com/medialize/URI.js\">URI.js</a> - URL mutation.</li>\n<li><a href=\"https://github.com/postcss/postcss\">PostCSS</a> - CSS parser / stringifier.</li>\n<li><a href=\"https://github.com/dominictarr/JSONStream\">JSONStream</a> - Streaming JSON.parse and stringify.</li>\n<li><a href=\"https://github.com/sindresorhus/neat-csv\">neat-csv</a> - Fast CSV parser. Callback interface for the above.</li>\n<li><a href=\"https://github.com/mafintosh/csv-parser\">csv-parser</a> - Streaming CSV parser that aims to be faster than everyone else.</li>\n<li><a href=\"https://github.com/pegjs/pegjs\">PEG.js</a> - Simple parser generator that produces fast parsers with excellent error reporting.</li>\n<li><a href=\"https://github.com/lapwinglabs/x-ray\">x-ray</a> - Web scraping utility.</li>\n<li><a href=\"https://github.com/Hardmath123/nearley\">nearley</a> - Simple, fast, powerful parsing for JavaScript.</li>\n<li><a href=\"https://github.com/juliangruber/binary-extract\">binary-extract</a> - Extract a value from a buffer of JSON without parsing the whole thing.</li>\n<li><a href=\"https://github.com/stylecow/stylecow\">Stylecow</a> - Parse, manipulate and convert modern CSS to make it compatible with all browsers. Extensible with plugins.</li>\n<li><a href=\"https://github.com/nodeca/js-yaml\">js-yaml</a> - Very fast YAML parser.</li>\n<li><a href=\"https://github.com/Leonidas-from-XIV/node-xml2js\">xml2js</a> - XML to JavaScript object converter.</li>\n<li><a href=\"https://github.com/zaach/jison\">Jison</a> - Friendly JavaScript parser generator. It shares genes with Bison, Yacc and family.</li>\n<li><a href=\"https://github.com/seegno/google-libphonenumber\">google-libphonenumber</a> - Parse, format, store and validate phone numbers.</li>\n<li><a href=\"https://github.com/TooTallNate/ref\">ref</a> - Read/write structured binary data in Buffers.</li>\n<li><a href=\"https://github.com/dtjohnson/xlsx-populate\">xlsx-populate</a> - Read/write Excel XLSX.</li>\n<li><a href=\"https://github.com/Chevrotain/chevrotain\">Chevrotain</a> - Very fast and feature rich parser building toolkit for JavaScript.</li>\n<li><a href=\"https://github.com/NaturalIntelligence/fast-xml-parser\">fast-xml-parser</a> - Validate and parse XML.</li>\n</ul>\n<h3>Humanize</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/pretty-bytes\">pretty-bytes</a> - Convert bytes to a human readable string: <code>1337</code> → <code>1.34 kB</code>.</li>\n<li><a href=\"https://github.com/sindresorhus/pretty-ms\">pretty-ms</a> - Convert milliseconds to a human readable string: <code>1337000000</code> → <code>15d 11h 23m 20s</code>.</li>\n<li><a href=\"https://github.com/rauchg/ms.js\">ms</a> - Tiny millisecond conversion utility.</li>\n<li><a href=\"https://github.com/AriaMinaei/pretty-error\">pretty-error</a> - Errors with less clutter.</li>\n<li><a href=\"https://github.com/Tjatse/node-readability\">read-art</a> - Extract readable content from any page.</li>\n</ul>\n<h3>Compression</h3>\n<ul>\n<li><a href=\"https://github.com/thejoshwolfe/yazl\">yazl</a> - Zip.</li>\n<li><a href=\"https://github.com/thejoshwolfe/yauzl\">yauzl</a> - Unzip.</li>\n<li><a href=\"https://github.com/archiverjs/node-archiver\">Archiver</a> - Streaming interface for archive generation, supporting ZIP and TAR.</li>\n<li><a href=\"https://github.com/nodeca/pako\">pako</a> - High speed zlib port to pure js (deflate, inflate, gzip).</li>\n<li><a href=\"https://github.com/mafintosh/tar-stream\">tar-stream</a> - Streaming tar parser and generator. Also see <a href=\"https://github.com/mafintosh/tar-fs\">tar-fs</a>.</li>\n<li><a href=\"https://github.com/kevva/decompress\">decompress</a> - Decompression module with support for <code>tar</code>, <code>tar.gz</code> and <code>zip</code> files out of the box.</li>\n</ul>\n<h3>Network</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/get-port\">get-port</a> - Get an available port.</li>\n<li><a href=\"https://github.com/sindresorhus/ipify\">ipify</a> - Get your public IP address.</li>\n<li><a href=\"https://github.com/bevry/getmac\">getmac</a> - Get the computer MAC address.</li>\n<li><a href=\"https://github.com/infusion/node-dhcp\">DHCP</a> - DHCP client and server.</li>\n<li><a href=\"https://github.com/roccomuso/netcat\">netcat</a> - Netcat port in pure JS.</li>\n</ul>\n<h3>Database</h3>\n<ul>\n<li>\n<p>Drivers</p>\n<ul>\n<li><a href=\"https://github.com/brianc/node-postgres\">PostgreSQL</a> - PostgreSQL client. Pure JavaScript and native libpq bindings.</li>\n<li><a href=\"https://github.com/luin/ioredis\">Redis</a> - Redis client.</li>\n<li><a href=\"https://github.com/Level/levelup\">LevelUP</a> - LevelDB.</li>\n<li><a href=\"https://github.com/mysqljs/mysql\">MySQL</a> - MySQL client.</li>\n<li><a href=\"https://github.com/apache/couchdb-nano\">couchdb-nano</a> - CouchDB client.</li>\n<li><a href=\"https://github.com/aerospike/aerospike-client-nodejs\">Aerospike</a> - Aerospike client.</li>\n<li><a href=\"https://github.com/couchbase/couchnode\">Couchbase</a> - Couchbase client.</li>\n<li><a href=\"https://github.com/mongodb/node-mongodb-native\">MongoDB</a> - MongoDB driver.</li>\n</ul>\n</li>\n<li>\n<p>ODM / ORM</p>\n<ul>\n<li><a href=\"https://github.com/sequelize/sequelize\">Sequelize</a> - Multi-dialect ORM. Supports PostgreSQL, SQLite, MySQL, and more.</li>\n<li><a href=\"https://github.com/bookshelf/bookshelf\">Bookshelf</a> - ORM for PostgreSQL, MySQL and SQLite3 in the style of Backbone.js.</li>\n<li><a href=\"https://github.com/robconery/massive-js\">Massive</a> - PostgreSQL data access tool.</li>\n<li><a href=\"https://github.com/Automattic/mongoose\">Mongoose</a> - Elegant MongoDB object modeling.</li>\n<li><a href=\"https://github.com/balderdashy/waterline\">Waterline</a> - Datastore-agnostic tool that dramatically simplifies interaction with one or more databases.</li>\n<li><a href=\"https://github.com/PhilWaldmann/openrecord\">OpenRecord</a> - ORM for PostgreSQL, MySQL, SQLite3 and RESTful datastores. Similar to ActiveRecord.</li>\n<li><a href=\"https://github.com/vitaly-t/pg-promise\">pg-promise</a> - PostgreSQL framework for native SQL using promises.</li>\n<li><a href=\"https://github.com/gajus/slonik\">slonik</a> - PostgreSQL client with strict types, detailed logging and assertions.</li>\n<li><a href=\"https://github.com/Vincit/objection.js\">Objection.js</a> - Lightweight ORM built on the SQL query builder Knex.</li>\n<li><a href=\"https://github.com/typeorm/typeorm\">TypeORM</a> - ORM for PostgreSQL, MariaDB, MySQL, SQLite, and more.</li>\n<li><a href=\"https://github.com/mikro-orm/mikro-orm\">MikroORM</a> - TypeScript ORM based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, PostgreSQL, MySQL and SQLite.</li>\n<li><a href=\"https://github.com/prisma/prisma\">Prisma</a> - Modern database access (ORM alternative). Auto-generated and type-safe query builder in TypeScript. Supports PostgreSQL, MySQL &#x26; SQLite.</li>\n</ul>\n</li>\n<li>\n<p>Query builder</p>\n<ul>\n<li><a href=\"https://github.com/tgriesser/knex\">Knex</a> - Query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.</li>\n</ul>\n</li>\n<li>\n<p>Other</p>\n<ul>\n<li><a href=\"https://github.com/louischatriot/nedb\">NeDB</a> - Embedded persistent database written in JavaScript.</li>\n<li><a href=\"https://github.com/typicode/lowdb\">Lowdb</a> - Small JavaScript database powered by Lodash.</li>\n<li><a href=\"https://github.com/lukechilds/keyv\">Keyv</a> - Simple key-value storage with support for multiple backends.</li>\n<li><a href=\"https://github.com/tommybananas/finale\">Finale</a> - RESTful endpoint generator for your Sequelize models.</li>\n<li><a href=\"https://github.com/mlaanderson/database-js\">database-js</a> - Wrapper for multiple databases with a JDBC-like connection.</li>\n<li><a href=\"https://github.com/pkosiec/mongo-seeding\">Mongo Seeding</a> - Populate MongoDB databases with JavaScript and JSON files.</li>\n<li><a href=\"https://github.com/ForbesLindesay/atdatabases\">@databases</a> - Query PostgreSQL, MySQL and SQLite3 with plain SQL without risking SQL injection.</li>\n<li><a href=\"https://github.com/oguimbal/pg-mem\">pg-mem</a> - In-memory PostgreSQL instance for your tests.</li>\n</ul>\n</li>\n</ul>\n<h3>Testing</h3>\n<ul>\n<li><a href=\"https://github.com/avajs/ava\">AVA</a> - Futuristic test runner.</li>\n<li><a href=\"https://github.com/mochajs/mocha\">Mocha</a> - Feature-rich test framework making asynchronous testing simple and fun.</li>\n<li><a href=\"https://github.com/bcoe/nyc\">nyc</a> - Code coverage tool built on istanbul that works with subprocesses.</li>\n<li><a href=\"https://github.com/isaacs/node-tap\">tap</a> - TAP test framework.</li>\n<li><a href=\"https://github.com/substack/tape\">tape</a> - TAP-producing test harness.</li>\n<li><a href=\"https://github.com/power-assert-js/power-assert\">power-assert</a> - Provides descriptive assertion messages through the standard assert interface.</li>\n<li><a href=\"https://github.com/mantoni/mochify.js\">Mochify</a> - TDD with Browserify, Mocha, PhantomJS and WebDriver.</li>\n<li><a href=\"https://github.com/vdemedes/trevor\">trevor</a> - Run tests against multiple versions of Node.js without switching versions manually or pushing to Travis CI.</li>\n<li><a href=\"https://github.com/alexfernandez/loadtest\">loadtest</a> - Run load tests for your web application, with an API for automation.</li>\n<li><a href=\"https://github.com/sinonjs/sinon\">Sinon.JS</a> - Test spies, stubs and mocks.</li>\n<li><a href=\"https://github.com/nodeca/navit\">navit</a> - PhantomJS / SlimerJS wrapper to simplify browser test scripting.</li>\n<li><a href=\"https://github.com/pgte/nock\">Nock</a> - HTTP mocking and expectations.</li>\n<li><a href=\"https://github.com/theintern/intern\">intern</a> - Code testing stack.</li>\n<li><a href=\"https://github.com/h2non/toxy\">toxy</a> - Hackable HTTP proxy to simulate failure scenarios and network conditions.</li>\n<li><a href=\"https://github.com/sindresorhus/hook-std\">hook-std</a> - Hook and modify stdout/stderr.</li>\n<li><a href=\"https://github.com/egoist/testen\">testen</a> - Run tests for multiple versions of Node.js locally with NVM.</li>\n<li><a href=\"https://github.com/nightwatchjs/nightwatch\">Nightwatch</a> - Automated UI testing framework based on Selenium WebDriver.</li>\n<li><a href=\"https://github.com/webdriverio/webdriverio\">WebdriverIO</a> - Automated testing based on the WebDriver protocol.</li>\n<li><a href=\"https://github.com/facebook/jest\">Jest</a> - Painless JavaScript testing.</li>\n<li><a href=\"https://github.com/DevExpress/testcafe\">TestCafe</a> - Automated browser testing.</li>\n<li><a href=\"https://github.com/bleenco/abstruse\">abstruse</a> - Continuous Integration server.</li>\n<li><a href=\"https://github.com/Codeception/CodeceptJS\">CodeceptJS</a> - End-to-end testing.</li>\n<li><a href=\"https://github.com/GoogleChrome/puppeteer\">Puppeteer</a> - Headless Chrome.</li>\n<li><a href=\"https://github.com/microsoft/playwright\">Playwright</a> - Headless Chromium, WebKit, and Firefox with a single API.</li>\n<li><a href=\"https://github.com/ehmicky/nve\">nve</a> - Run any command on multiple versions of Node.js locally.</li>\n<li><a href=\"https://github.com/dequelabs/axe-core\">axe-core</a> - Accessibility engine for automated Web UI testing.</li>\n<li><a href=\"https://github.com/testcontainers/testcontainers-node\">testcontainers-node</a> - Provides lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.</li>\n</ul>\n<h3>Security</h3>\n<ul>\n<li><a href=\"https://github.com/simonepri/upash\">upash</a> - Unified API for all password hashing algorithms.</li>\n<li><a href=\"https://github.com/cossacklabs/themis\">themis</a> - Multilanguage framework for making typical encryption schemes easy to use: data at rest, authenticated data exchange, transport protection, authentication, and so on.</li>\n<li><a href=\"https://github.com/apps/guardrails\">GuardRails</a> - GitHub app that provides security feedback in pull requests.</li>\n<li><a href=\"https://github.com/animir/node-rate-limiter-flexible\">rate-limiter-flexible</a> - Brute-force and DDoS attack protection.</li>\n<li><a href=\"https://github.com/sindresorhus/crypto-hash\">crypto-hash</a> - Async non-blocking hashing.</li>\n<li><a href=\"https://github.com/davesag/jose-simple\">jose-simple</a> - Encryption and decryption of data using the JOSE (JSON Object Signing and Encryption) standard.</li>\n</ul>\n<h3>Benchmarking</h3>\n<ul>\n<li><a href=\"https://github.com/bestiejs/benchmark.js\">Benchmark.js</a> - Benchmarking library that supports high-resolution timers and returns statistically significant results.</li>\n<li><a href=\"https://github.com/logicalparadox/matcha\">matcha</a> - Simplistic approach to benchmarking.</li>\n</ul>\n<h3>Minifiers</h3>\n<ul>\n<li><a href=\"https://github.com/babel/babili\">babili</a> - ES2015+ aware minifier based on the Babel toolchain.</li>\n<li><a href=\"https://github.com/mishoo/UglifyJS2\">UglifyJS2</a> - JavaScript minifier.</li>\n<li><a href=\"https://github.com/jakubpawlowicz/clean-css\">clean-css</a> - CSS minifier.</li>\n<li><a href=\"https://github.com/Swaagie/minimize\">minimize</a> - HTML minifier.</li>\n<li><a href=\"https://github.com/imagemin/imagemin\">imagemin</a> - Image minifier.</li>\n</ul>\n<h3>Authentication</h3>\n<ul>\n<li><a href=\"https://github.com/jaredhanson/passport\">Passport</a> - Simple, unobtrusive authentication.</li>\n<li><a href=\"https://github.com/simov/grant\">Grant</a> - OAuth providers for Express, Koa, Hapi, Fastify, AWS Lambda, Azure, Google Cloud, Vercel, and many more.</li>\n</ul>\n<h3>Authorization</h3>\n<ul>\n<li><a href=\"https://github.com/stalniy/casl\">CASL</a> - Isomorphic authorization for UI and API.</li>\n<li><a href=\"https://github.com/casbin/node-casbin\">node-casbin</a> - Authorization library that supports access control models like ACL, RBAC and ABAC.</li>\n</ul>\n<h3>Email</h3>\n<ul>\n<li><a href=\"https://github.com/andris9/Nodemailer\">Nodemailer</a> - The fastest way to handle email.</li>\n<li><a href=\"https://github.com/eleith/emailjs\">emailjs</a> - Send text/HTML emails with attachments to any SMTP server.</li>\n<li><a href=\"https://github.com/niftylettuce/email-templates\">email-templates</a> - Create, preview, and send custom email templates.</li>\n<li><a href=\"https://github.com/mjmlio/mjml\">MJML</a> - Markup language designed to reduce the pain of creating responsive emails.</li>\n</ul>\n<h3>Job queues</h3>\n<ul>\n<li><a href=\"https://github.com/OptimalBits/bull\">bull</a> - Persistent job and message queue.</li>\n<li><a href=\"https://github.com/rschmukler/agenda\">agenda</a> - MongoDB-backed job scheduling.</li>\n<li><a href=\"https://github.com/nodeca/idoit\">idoit</a> - Redis-backed job queue engine with advanced job control.</li>\n<li><a href=\"https://github.com/taskrabbit/node-resque\">node-resque</a> - Redis-backed job queue.</li>\n<li><a href=\"https://github.com/smrchy/rsmq\">rsmq</a> - Redis-backed message queue.</li>\n<li><a href=\"https://github.com/bee-queue/bee-queue\">bee-queue</a> - High-performance Redis-backed job queue.</li>\n<li><a href=\"https://github.com/weyoss/redis-smq\">RedisSMQ</a> - Simple high-performance Redis message queue with real-time monitoring.</li>\n<li><a href=\"https://github.com/bbc/sqs-consumer\">sqs-consumer</a> - Build Amazon Simple Queue Service (SQS) based apps without the boilerplate.</li>\n<li><a href=\"https://github.com/diamondio/better-queue\">better-queue</a> - Simple and efficient job queue when you cannot use Redis.</li>\n</ul>\n<h3>Node.js management</h3>\n<ul>\n<li><a href=\"https://github.com/tj/n\">n</a> - Node.js version management.</li>\n<li><a href=\"https://github.com/isaacs/nave\">nave</a> - Virtual Environments for Node.js.</li>\n<li><a href=\"https://github.com/ekalinin/nodeenv\">nodeenv</a> - Node.js virtual environment compatible to Python's virtualenv.</li>\n<li><a href=\"https://github.com/coreybutler/nvm-windows\">nvm for Windows</a> - Version management for Windows.</li>\n<li><a href=\"https://github.com/nodenv/nodenv\">nodenv</a> - Version manager that is similar to Ruby's rbenv. It supports auto version switching.</li>\n<li><a href=\"https://github.com/Schniz/fnm\">fnm</a> - Cross-platform Node.js version manager built in Rust.</li>\n</ul>\n<h3>Natural language processing</h3>\n<ul>\n<li><a href=\"https://github.com/wooorm/retext\">retext</a> - An extensible natural language system.</li>\n<li><a href=\"https://github.com/wooorm/franc\">franc</a> - Detect the language of text.</li>\n<li><a href=\"https://github.com/sindresorhus/leven\">leven</a> - Measure the difference between two strings using the Levenshtein distance algorithm.</li>\n<li><a href=\"https://github.com/NaturalNode/natural\">natural</a> - Natural language facility.</li>\n<li><a href=\"https://github.com/axa-group/nlp.js\">nlp.js</a> - Building bots, with entity extraction, sentiment analysis, automatic language identify, and more.</li>\n</ul>\n<h3>Process management</h3>\n<ul>\n<li><a href=\"https://github.com/Unitech/pm2\">PM2</a> - Advanced Process Manager.</li>\n<li><a href=\"https://github.com/remy/nodemon\">nodemon</a> - Monitor for changes in your app and automatically restart the server.</li>\n<li><a href=\"https://github.com/coreybutler/node-mac\">node-mac</a> - Run scripts as a native Mac daemon and log to the console app.</li>\n<li><a href=\"https://github.com/coreybutler/node-linux\">node-linux</a> - Run scripts as native system service and log to syslog.</li>\n<li><a href=\"https://github.com/coreybutler/node-windows\">node-windows</a> - Run scripts as a native Windows service and log to the Event viewer.</li>\n<li><a href=\"https://github.com/petruisfan/node-supervisor\">supervisor</a> - Restart scripts when they crash or restart when a <code>*.js</code> file changes.</li>\n<li><a href=\"https://github.com/phusion/passenger\">Phusion Passenger</a> - Friendly process manager that integrates directly into Nginx.</li>\n</ul>\n<h3>Automation</h3>\n<ul>\n<li><a href=\"https://github.com/octalmage/robotjs\">robotjs</a> - Desktop Automation: control the mouse, keyboard and read the screen.</li>\n<li><a href=\"https://github.com/nut-tree/nut.js\">nut.js</a> - Cross-platform native GUI automation / testing framework with image matching capabilities which integrates with Jest.</li>\n</ul>\n<h3>AST</h3>\n<ul>\n<li><a href=\"https://github.com/ternjs/acorn\">Acorn</a> - Tiny, fast JavaScript parser.</li>\n<li><a href=\"https://github.com/babel/babel/tree/master/packages/babel-parser\">babel-parser</a> - JavaScript parser used in Babel.</li>\n<li><a href=\"https://github.com/cherow/cherow\">cherow</a> - JavaScript parser with focus on performance and stability.</li>\n</ul>\n<h3>Static site generators</h3>\n<ul>\n<li><a href=\"https://github.com/jnordberg/wintersmith\">Wintersmith</a> - Flexible, minimalistic, multi-platform static site generator.</li>\n<li><a href=\"https://github.com/assemble/assemble/\">Assemble</a> - Static site generator for Node.js, Grunt.js, and Yeoman.</li>\n<li><a href=\"https://github.com/docpad/docpad\">DocPad</a> - Static site generator with dynamic abilities and huge plugin ecosystem.</li>\n<li><a href=\"https://github.com/phenomic/phenomic\">Phenomic</a> - Modern static website generator based on the React and Webpack ecosystem.</li>\n<li><a href=\"https://github.com/QingWei-Li/docsify\">docsify</a> - Markdown documentation site generator with no statically built HTML files.</li>\n<li><a href=\"https://github.com/brandonweiss/charge\">Charge</a> - Opinionated, zero-config static site generator using JSX and MDX.</li>\n</ul>\n<h3>Content management systems</h3>\n<ul>\n<li><a href=\"https://github.com/keystonejs/keystone\">KeystoneJS</a> - CMS and web application platform built on Express and MongoDB.</li>\n<li><a href=\"https://github.com/apostrophecms/apostrophe\">ApostropheCMS</a> - Content management system with an emphasis on intuitive front end content editing and administration built on Express and MongoDB.</li>\n<li><a href=\"https://github.com/strapi/strapi\">Strapi</a> - Content Management Framework (headless-CMS) to build powerful APIs.</li>\n<li><a href=\"https://github.com/tipeio/tipe\">Tipe</a> - Developer-first content management system with GraphQL and REST API from a schema file.</li>\n<li><a href=\"https://github.com/fiction-com/factor\">Factor</a> - Vue.js dashboard framework and headless CMS.</li>\n<li><a href=\"https://github.com/SoftwareBrothers/admin-bro\">AdminBro</a> - Auto-generated admin panel with CRUD for all your resources.</li>\n</ul>\n<h3>Forum</h3>\n<ul>\n<li><a href=\"https://github.com/NodeBB/NodeBB\">nodeBB</a> - Forum platform for the modern web.</li>\n</ul>\n<h3>Blogging</h3>\n<ul>\n<li><a href=\"https://github.com/TryGhost/Ghost\">Ghost</a> - Simple, powerful publishing platform.</li>\n<li><a href=\"https://github.com/hexojs/hexo\">Hexo</a> - Fast, simple and powerful blogging framework.</li>\n</ul>\n<h3>Weird</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/cows\">cows</a> - ASCII cows.</li>\n<li><a href=\"https://github.com/sindresorhus/superb\">superb</a> - Get superb like words.</li>\n<li><a href=\"https://github.com/sindresorhus/cat-names\">cat-names</a> - Get popular cat names.</li>\n<li><a href=\"https://github.com/sindresorhus/dog-names\">dog-names</a> - Get popular dog names.</li>\n<li><a href=\"https://github.com/sindresorhus/superheroes\">superheroes</a> - Get superhero names.</li>\n<li><a href=\"https://github.com/sindresorhus/supervillains\">supervillains</a> - Get supervillain names.</li>\n<li><a href=\"https://github.com/maxogden/cool-ascii-faces\">cool-ascii-faces</a> - Get some cool ascii faces.</li>\n<li><a href=\"https://github.com/melaniecebula/cat-ascii-faces\">cat-ascii-faces</a> - <code>₍˄·͈༝·͈˄₎◞ ̑̑ෆ⃛ (=ↀωↀ=)✧ (^･o･^)ﾉ”</code>.</li>\n<li><a href=\"https://github.com/SkyHacks/nerds\">nerds</a> - Get data from nerdy topics like Harry Potter, Star Wars, and Pokémon.</li>\n</ul>\n<h3>Serialization</h3>\n<ul>\n<li><a href=\"https://github.com/kesla/node-snappy\">snappy</a> - Native bindings for Google's Snappy compression library.</li>\n<li><a href=\"https://github.com/dcodeIO/protobuf.js\">protobuf</a> - Implementation of Protocol Buffers.</li>\n<li><a href=\"https://github.com/compactr/compactr.js\">compactr</a> - Implementation of the Compactr protocol.</li>\n</ul>\n<h3>Miscellaneous</h3>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/execa\">execa</a> - Better <code>child_process</code>.</li>\n<li><a href=\"https://github.com/cheeriojs/cheerio\">cheerio</a> - Fast, flexible, and lean implementation of core jQuery designed specifically for the server.</li>\n<li><a href=\"https://github.com/atom/electron\">Electron</a> - Build cross platform desktop apps with web technologies. <em>(You might like <a href=\"https://github.com/sindresorhus/awesome-electron\">awesome-electron</a>)</em></li>\n<li><a href=\"https://github.com/sindresorhus/open\">open</a> - Opens stuff like websites, files, executables.</li>\n<li><a href=\"https://github.com/sindresorhus/hasha\">hasha</a> - Hashing made simple. Get the hash of a buffer/string/stream/file.</li>\n<li><a href=\"https://github.com/sindresorhus/dot-prop\">dot-prop</a> - Get a property from a nested object using a dot path.</li>\n<li><a href=\"https://github.com/sindresorhus/onetime\">onetime</a> - Only run a function once.</li>\n<li><a href=\"https://github.com/sindresorhus/mem\">mem</a> - Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical input.</li>\n<li><a href=\"https://github.com/sindresorhus/import-fresh\">import-fresh</a> - Import a module while bypassing the cache.</li>\n<li><a href=\"https://github.com/sindresorhus/strip-bom\">strip-bom</a> - Strip UTF-8 byte order mark (BOM) from a string/buffer/stream.</li>\n<li><a href=\"https://github.com/sindresorhus/os-locale\">os-locale</a> - Get the system locale.</li>\n<li><a href=\"https://github.com/mscdex/ssh2\">ssh2</a> - SSH2 client and server module.</li>\n<li><a href=\"https://github.com/markelog/adit\">adit</a> - SSH tunneling made simple.</li>\n<li><a href=\"https://github.com/sindresorhus/import-lazy\">import-lazy</a> - Import a module lazily.</li>\n<li><a href=\"https://github.com/sindresorhus/file-type\">file-type</a> - Detect the file type of a Buffer.</li>\n<li><a href=\"https://github.com/SGrondin/bottleneck\">Bottleneck</a> - Rate limiter that makes throttling easy.</li>\n<li><a href=\"https://github.com/sindresorhus/ow\">ow</a> - Function argument validation for humans.</li>\n<li><a href=\"https://github.com/audreyt/node-webworker-threads\">webworker-threads</a> - Lightweight Web Worker API implementation with native threads.</li>\n<li><a href=\"https://github.com/sindresorhus/clipboardy\">clipboardy</a> - Access the system clipboard (copy/paste).</li>\n<li><a href=\"https://github.com/mapbox/node-pre-gyp\">node-pre-gyp</a> - Makes it easy to publish and install Node.js C++ addons from binaries.</li>\n<li><a href=\"https://github.com/peterbraden/node-opencv\">opencv</a> - Bindings for OpenCV. The defacto computer vision library.</li>\n<li><a href=\"https://github.com/motdotla/dotenv\">dotenv</a> - Load environment variables from .env file.</li>\n<li><a href=\"https://github.com/sindresorhus/remote-git-tags\">remote-git-tags</a> - Get tags from a remote git repo.</li>\n<li><a href=\"https://github.com/npm/node-semver\">semver</a> - Semantic version parser.</li>\n<li><a href=\"https://github.com/Marak/Faker.js\">Faker.js</a> - Generate massive amounts of fake data.</li>\n<li><a href=\"https://github.com/nodegit/nodegit\">nodegit</a> - Native bindings to Git.</li>\n<li><a href=\"https://github.com/pigulla/json-strictify\">json-strictify</a> - Safely serialize a value to JSON without data loss or going into an infinite loop.</li>\n<li><a href=\"https://github.com/sindresorhus/resolve-from\">resolve-from</a> - Resolve the path of a module like <code>require.resolve()</code> but from a given path.</li>\n<li><a href=\"https://github.com/cgiffard/node-simplecrawler\">simplecrawler</a> - Event driven web crawler.</li>\n<li><a href=\"https://github.com/tmpvar/jsdom\">jsdom</a> - JavaScript implementation of HTML and the DOM.</li>\n<li><a href=\"https://github.com/airbnb/hypernova\">hypernova</a> - Server-side rendering your JavaScript views.</li>\n<li><a href=\"https://github.com/sindresorhus/is\">@sindresorhus/is</a> - Type check values.</li>\n<li><a href=\"https://github.com/simonepri/env-dot-prop\">env-dot-prop</a> - Get, set, or delete nested properties of process.env using a dot path.</li>\n<li><a href=\"https://github.com/sindresorhus/emittery\">emittery</a> - Simple and modern async event emitter.</li>\n<li><a href=\"https://github.com/gkozlenko/node-video-lib\">node-video-lib</a> - Pure JavaScript library for working with MP4 and FLV video files and creating MPEG-TS chunks for HLS streaming.</li>\n<li><a href=\"https://github.com/patrickjuchli/basic-ftp\">basic-ftp</a> - FTP/FTPS client.</li>\n<li><a href=\"https://github.com/xxczaki/cashify\">cashify</a> - Currency conversion.</li>\n<li><a href=\"https://github.com/Geode-solutions/genepi\">genepi</a> - Automatically generate a native Node.js addon from C++ code.</li>\n<li><a href=\"https://github.com/typicode/husky\">husky</a> - Create Git hook scripts.</li>\n<li><a href=\"https://github.com/ds300/patch-package\">patch-package</a> - Make and preserve fixes to npm dependencies.</li>\n<li><a href=\"https://github.com/mifi/editly\">editly</a> - Declarative video editing API.</li>\n</ul>\n<h2>Resources</h2>\n<h3>Tutorials</h3>\n<ul>\n<li><a href=\"https://github.com/i0natan/nodebestpractices\">Node.js Best Practices</a> - Summary and curation of the top-ranked content on Node.js best practices, available in multiple languages.</li>\n<li><a href=\"https://github.com/nodeschool\">Nodeschool</a> - Learn Node.js with interactive lessons.</li>\n<li><a href=\"https://github.com/maxogden/art-of-node/#the-art-of-node\">The Art of Node</a> - An introduction to Node.js.</li>\n<li><a href=\"https://github.com/substack/stream-handbook\">stream-handbook</a> - How to write Node.js programs with streams.</li>\n<li><a href=\"https://github.com/mattdesl/module-best-practices\">module-best-practices</a> - Some good practices when writing new npm modules.</li>\n<li><a href=\"http://thenodeway.io\">The Node Way</a> - An entire philosophy of Node.js best practices and guiding principles exists for writing maintainable modules, scalable applications, and code that is actually pleasant to read.</li>\n<li><a href=\"https://github.com/azat-co/you-dont-know-node\">You Don't Know Node.js</a> - Introduction to Node.js core features and asynchronous JavaScript.</li>\n<li><a href=\"https://github.com/ehmicky/portable-node-guide\">Portable Node.js guide</a> - Practical guide on how to write portable/cross-platform Node.js code.</li>\n<li><a href=\"https://frameworkless.js.org/course\">Build a real web app with no frameworks</a> - A set of video tutorials/livestreams to help you build and deploy a real, live web app using a handful of simple libraries and the core Node.js modules.</li>\n</ul>\n<h3>Discovery</h3>\n<ul>\n<li><a href=\"https://npms.io\">npms</a> - Superb package search with deep analysis of package quality using a <a href=\"https://npms.io/about\">myriad of metrics</a>.</li>\n<li><a href=\"https://npmaddict.com\">npm addict</a> - Your daily injection of npm packages.</li>\n<li><a href=\"https://npmcompare.com\">npmcompare.com</a> - Compare and discover npm packages.</li>\n</ul>\n<h3>Articles</h3>\n<ul>\n<li><a href=\"https://www.joyent.com/node-js/production/design/errors\">Error Handling in Node.js</a></li>\n<li><a href=\"https://ponyfoo.com/articles/teach-yourself-nodejs-in-10-steps\">Teach Yourself Node.js in 10 Steps</a></li>\n<li><a href=\"https://medium.com/@yoshuawuyts/mastering-the-filesystem-in-node-js-4706b7cb0801\">Mastering the filesystem in Node.js</a></li>\n<li><a href=\"https://nodesource.com/blog/semver-a-primer/\">Semver: A Primer</a></li>\n<li><a href=\"https://nodesource.com/blog/semver-tilde-and-caret/\">Semver: Tilde and Caret</a></li>\n<li><a href=\"https://nodesource.com/blog/why-asynchronous/\">Why Asynchronous?</a></li>\n<li><a href=\"https://nodesource.com/blog/understanding-the-nodejs-event-loop/\">Understanding the Node.js Event Loop</a></li>\n<li><a href=\"https://nodesource.com/blog/understanding-object-streams/\">Understanding Object Streams</a></li>\n<li><a href=\"https://github.com/noffle/art-of-readme\">Art of README</a> - Learn the art of writing quality READMEs.</li>\n<li><a href=\"https://snipcart.com/blog/graphql-nodejs-express-tutorial\">Using Express to Quickly Build a GraphQL Server</a></li>\n</ul>\n<h3>Newsletters</h3>\n<ul>\n<li><a href=\"http://nodeweekly.com\">Node Weekly</a> - Weekly e-mail round-up of Node.js news and articles.</li>\n<li><a href=\"https://nmotw.in\">Node Module Of The Week!</a> - Weekly dose of hand picked node modules.</li>\n</ul>\n<h3>Videos</h3>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=jo_B4LTHi3I\">Introduction to Node.js with Ryan Dahl</a></li>\n<li><a href=\"https://learn.bevry.me/hands-on-with-node.js/preface\">Hands on with Node.js</a></li>\n<li><a href=\"http://nodetuts.com\">Nodetuts</a> - Series of talks, including TCP &#x26; HTTP API servers, async programming, and more.</li>\n<li><a href=\"https://v8.dev/blog/trash-talk\">V8 Garbage Collector</a> - Trash talk about the V8 garbage collector.</li>\n<li><a href=\"https://www.youtube.com/watch?v=M3BM9TB-8yA\">10 Things I Regret About Node.js by Ryan Dahl</a> - Insightful talk by the creator of Node.js about some of its limitions.</li>\n<li><a href=\"https://www.manning.com/livevideo/mastering-rest-apis-in-nodejs\">Mastering REST APIs in Node.js: Zero-To-Hero</a> - Video course on how to make REST APIs using Node.js.</li>\n<li><a href=\"https://www.youtube.com/watch?v=_1xa8Bsho6A\">Make a vanilla Node.js REST API</a> - Building a REST API without using a framework like Express.</li>\n<li><a href=\"https://www.youtube.com/watch?v=FrufJFBSoQY\">Google I/O 2009 - V8: High Performance JavaScript Engine</a> - The basics of V8 architecture and how it optimizes JavaScript execution.</li>\n<li><a href=\"https://www.youtube.com/watch?v=UJPdhx5zTaw\">Google I/O 2012 - Breaking the JavaScript Speed Limit with V8</a> - How V8 optimizes JavaScript execution.</li>\n<li><a href=\"https://www.youtube.com/watch?v=VhpdsjBUS3g\">Google I/O 2013 - Accelerating Oz with V8: Follow the Yellow Brick Road to JavaScript Performance</a> - How to detect app bottlenecks and optimize performance with V8 knowledge.</li>\n<li><a href=\"https://www.youtube.com/watch?v=OCjvhCFFPTw\">Node.js Internal Architecture | Ignition, Turbofan, Libuv</a> - How Node.js works internally, with a focus on V8 and libuv.</li>\n<li><a href=\"https://www.youtube.com/watch?v=_c51fcXRLGw\">Introduction to libuv: What's a Unicorn Velociraptor?</a> - <code>libuv</code> architecture, thread pool, and event loop, with its source code.</li>\n<li><a href=\"https://www.youtube.com/watch?v=kCJ3PFU8Ke8\">libuv Cross platform asynchronous i/o</a> - <code>libuv</code> architecture in detail, such as where it's actually using threads.</li>\n<li><a href=\"https://www.youtube.com/watch?v=oPo4EQmkjvY\">You Don't Know Node - ForwardJS San Francisco</a> - Explaining Node.js internals with quizzes about V8, libuv, event loop, module, stream, and cluster.</li>\n</ul>\n<h3>Books</h3>\n<ul>\n<li><a href=\"https://www.manning.com/books/node-js-in-action-second-edition\">Node.js in Action</a></li>\n<li><a href=\"http://www.amazon.com/Node-js-Practice-Alex-R-Young/dp/1617290939\">Node.js in Practice</a></li>\n<li><a href=\"http://visionmedia.github.io/masteringnode/\">Mastering Node</a></li>\n<li><a href=\"https://pragprog.com/book/jwnode2/node-js-8-the-right-way\">Node.js 8 the Right Way</a></li>\n<li><a href=\"http://www.amazon.com/Professional-Node-js-Building-Javascript-Scalable-ebook/dp/B009L7QETY/\">Professional Node.js: Building JavaScript Based Scalable Software</a></li>\n<li><a href=\"http://practicalnodebook.com\">Practical Node.js: Building Real-World Scalable Web Apps</a></li>\n<li><a href=\"http://book.mixu.net/node/\">Mixu's Node book</a></li>\n<li><a href=\"http://proexpressjs.com\">Pro Express.js</a></li>\n<li><a href=\"http://www.amazon.com/Secure-Your-Node-js-Web-Application/dp/1680500856\">Secure Your Node.js Web Application</a></li>\n<li><a href=\"https://www.manning.com/books/express-in-action\">Express in Action</a></li>\n<li><a href=\"https://www.amazon.com/Practical-Modern-JavaScript-Dive-Future/dp/149194353X\">Practical Modern JavaScript</a></li>\n<li><a href=\"https://www.amazon.com/Mastering-Modular-JavaScript-Nicolas-Bevacqua/dp/1491955686/\">Mastering Modular JavaScript</a></li>\n<li><a href=\"https://www.manning.com/books/get-programming-with-node-js\">Get Programming with Node.js</a></li>\n<li><a href=\"https://www.amazon.com/dp/1838558756\">Node.js Cookbook</a></li>\n<li><a href=\"https://www.nodejsdesignpatterns.com\">Node.js Design Patterns</a></li>\n</ul>\n<h3>Blogs</h3>\n<ul>\n<li><a href=\"https://nodejs.org/en/blog/\">Node.js blog</a></li>\n<li><a href=\"http://webapplog.com/tag/node-js/\">webapplog.com</a> - Blog posts on Node.js and JavaScript from the author of Practical Node.js and Pro Express.js Azat Mardan.</li>\n</ul>\n<h3>Courses</h3>\n<ul>\n<li><a href=\"https://learnnode.com/friend/AWESOME\">Learn to build apps and APIs with Node.js</a> - Video course by Wes Bos.</li>\n<li><a href=\"https://www.codeschool.com/courses/real-time-web-with-node-js\">Real Time Web with Node.js</a></li>\n<li><a href=\"https://www.udemy.com/understand-nodejs\">Learn and Understand Node.js</a></li>\n</ul>\n<h3>Cheatsheets</h3>\n<ul>\n<li><a href=\"https://github.com/azat-co/cheatsheets/blob/master/express4\">Express.js</a></li>\n<li><a href=\"https://github.com/stephenplusplus/stream-faqs\">Stream FAQs</a> - Answering common questions about streams, covering pagination, events, and more.</li>\n<li><a href=\"https://github.com/jesusprubio/strong-node\">Strong Node.js</a> - Checklist for source code security analysis of a Node.js web service.</li>\n</ul>\n<h3>Tools</h3>\n<ul>\n<li><a href=\"https://chrome.google.com/webstore/detail/octolinker/jlmafbaeoofdegohdhinkhilhclaklkp\">OctoLinker</a> - Chrome extension that linkifies dependencies in package.json, .js, .jsx, .coffee and .md files on GitHub.</li>\n<li><a href=\"https://chrome.google.com/webstore/detail/npm-hub/kbbbjimdjbjclaebffknlabpogocablj\">npm-hub</a> - Chrome extension to display npm dependencies at the bottom of a repo's readme.</li>\n<li><a href=\"http://blog.tonicdev.com/2015/09/30/embedded-tonic.html\">RunKit</a> - Embed a Node.js environment on any website.</li>\n<li><a href=\"https://chrome.google.com/webstore/detail/github-npm-stats/oomfflokggoffaiagenekchfnpighcef\">github-npm-stats</a> - Chrome extension that displays npm download stats on GitHub.</li>\n<li><a href=\"https://semver.npmjs.com\">npm semver calculator</a> - Visually explore what versions of a package a semver range matches.</li>\n<li><a href=\"https://codesandbox.io/s/node-http-server-node\">CodeSandbox</a> - Online IDE and prototyping.</li>\n</ul>\n<h3>Community</h3>\n<ul>\n<li><a href=\"https://gitter.im/nodejs/node\">Gitter</a></li>\n<li><a href=\"http://webchat.freenode.net/?channels=node.js\"><code>#node.js</code> on Freenode</a></li>\n<li><a href=\"http://stackoverflow.com/questions/tagged/node.js\">Stack Overflow</a></li>\n<li><a href=\"https://www.reddit.com/r/node\">Reddit</a></li>\n<li><a href=\"https://twitter.com/nodejs\">Twitter</a></li>\n<li><a href=\"https://hashnode.com/n/nodejs\">Hashnode</a></li>\n<li><a href=\"https://discordapp.com/invite/96WGtJt\">Discord</a></li>\n</ul>\n<h3>Miscellaneous</h3>\n<ul>\n<li><a href=\"http://nodebots.io\">nodebots</a> - Robots powered by JavaScript.</li>\n<li><a href=\"https://github.com/sindresorhus/node-module-boilerplate\">node-module-boilerplate</a> - Boilerplate to kickstart creating a node module.</li>\n<li><a href=\"https://github.com/sheerun/modern-node\">modern-node</a> - Toolkit for creating node modules with Jest, Prettier, ESLint, and Standard.</li>\n<li><a href=\"https://github.com/sindresorhus/generator-nm\">generator-nm</a> - Scaffold out a node module.</li>\n<li><a href=\"https://github.com/Microsoft/nodejs-guidelines\">Microsoft Node.js Guidelines</a> - Tips, tricks, and resources for working with Node.js on Microsoft platforms.</li>\n<li><a href=\"https://github.com/sindresorhus/module-requests\">Module Requests &#x26; Ideas</a> - Request a JavaScript module you wish existed or get ideas for modules.</li>\n<li><a href=\"https://github.com/thlorenz/v8-perf\">v8-perf</a> - Notes and resources related to V8 and thus Node.js performance.</li>\n</ul>\n<h2>Related lists</h2>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/awesome-npm\">awesome-npm</a> - Resources and tips for using npm.</li>\n<li><a href=\"https://github.com/bcoe/awesome-cross-platform-nodejs\">awesome-cross-platform-nodejs</a> - Resources for writing and testing cross-platform code.</li>\n</ul>"},{"url":"/docs/react/react-docs/","relativePath":"docs/react/react-docs.md","relativeDir":"docs/react","base":"react-docs.md","name":"react-docs","frontmatter":{"title":"React Docs","weight":0,"excerpt":"\nIn this guide, we will examine the building blocks of React apps: elements and\ncomponents. Once you master them, you can create complex apps from small\nreusable pieces.","seo":{"title":"React","description":"\nWe will examine the building blocks of React apps: elements and components.\nOnce you master them, you can create complex apps from small reusable\npieces.","robots":[],"extra":[{"name":"og:description","value":"\nWe will examine the building blocks of React apps: elements and\ncomponents. Once you master them, you can create complex apps from small\nreusable pieces.","keyName":"property","relativeUrl":false},{"name":"og:image","value":"images/react2-1cfd4b21.jpg","keyName":"property","relativeUrl":true},{"name":"og:type","value":"website","keyName":"property","relativeUrl":false},{"name":"twitter:title","value":"React Docs","keyName":"name","relativeUrl":false},{"name":"twitter:image","value":"images/react2-b4316710.jpg","keyName":"property","relativeUrl":true},{"name":"twitter:card","value":"summary_image","keyName":"name","relativeUrl":false}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>React:</h1>\n<p><img src=\"https://i.imgur.com/3fhEosP.png\" alt=\"React Lifecycles\"></p>\n<h1><strong>Hello World</strong></h1>\n<h1>The smallest React example looks like this:</h1>\n<pre><code class=\"language-js\">ReactDOM.render(&#x3C;h1>Hello, world!&#x3C;/h1>, document.getElementById('root'));\n</code></pre>\n<p>It displays a heading saying \"Hello, world!\" on the page.</p>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/hello-world\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/wveBJBM\"></a><a href=\"https://codepen.io/bgoonz/pen/wveBJBM\">https://codepen.io/bgoonz/pen/wveBJBM</a></p>\n<p>Click the link above to open an online editor. Feel free to make some changes, and see how they affect the output. Most pages in this guide will have editable examples like this one.</p>\n<h1>How to Read This Guide</h1>\n<p>In this guide, we will examine the building blocks of React apps: elements and components. Once you master them, you can create complex apps from small reusable pieces.</p>\n<blockquote>\n<p>TipThis guide is designed for people who prefer learning concepts step by step. If you prefer to learn by doing, check out our practical tutorial. You might find this guide and the tutorial complementary to each other.</p>\n</blockquote>\n<p>This is the first chapter in a step-by-step guide about main React concepts. You can find a list of all its chapters in the navigation sidebar. If you're reading this from a mobile device, you can access the navigation by pressing the button in the bottom right corner of your screen.</p>\n<p>Every chapter in this guide builds on the knowledge introduced in earlier chapters. <strong>You can learn most of React by reading the \"Main Concepts\" guide chapters in the order they appear in the sidebar.</strong> For example, <a href=\"https://reactjs.org/docs/introducing-jsx.html\">\"Introducing JSX\"</a> is the next chapter after this one.</p>\n<h1>Knowledge Level Assumptions</h1>\n<p>React is a JavaScript library, and so we'll assume you have a basic understanding of the JavaScript language. <strong>If you don't feel very confident, we recommend <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript\">going through a JavaScript tutorial</a> to check your knowledge level</strong> and enable you to follow along this guide without getting lost. It might take you between 30 minutes and an hour, but as a result you won't have to feel like you're learning both React and JavaScript at the same time.</p>\n<blockquote>\n<p>NoteThis guide occasionally uses some newer JavaScript syntax in the examples. If you haven't worked with JavaScript in the last few years, these three points should get you most of the way.</p>\n</blockquote>\n<h1><strong>Introducing JSX</strong></h1>\n<h1>Consider this variable declaration:</h1>\n<pre><code class=\"language-js\">const element = &#x3C;h1>Hello, world!&#x3C;/h1>;\n</code></pre>\n<p>This funny tag syntax is neither a string nor HTML.</p>\n<p>It is called JSX, and it is a syntax extension to JavaScript. We recommend using it with React to describe what the UI should look like. JSX may remind you of a template language, but it comes with the full power of JavaScript.</p>\n<p>JSX produces React \"elements\". We will explore rendering them to the DOM in the <a href=\"https://reactjs.org/docs/rendering-elements.html\">next section</a>. Below, you can find the basics of JSX necessary to get you started.</p>\n<h1>Why JSX?</h1>\n<p>React embraces the fact that rendering logic is inherently coupled with other UI logic: how events are handled, how the state changes over time, and how the data is prepared for display.</p>\n<p>Instead of artificially separating <em>technologies</em> by putting markup and logic in separate files, React <a href=\"https://en.wikipedia.org/wiki/Separation_of_concerns\">separates <em>concerns</em></a> with loosely coupled units called \"components\" that contain both. We will come back to components in a <a href=\"https://reactjs.org/docs/components-and-props.html\">further section</a>, but if you're not yet comfortable putting markup in JS, <a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">this talk</a> might convince you otherwise.</p>\n<p>React <a href=\"https://reactjs.org/docs/react-without-jsx.html\">doesn't require</a> using JSX, but most people find it helpful as a visual aid when working with UI inside the JavaScript code. It also allows React to show more useful error and warning messages.</p>\n<p>With that out of the way, let's get started!</p>\n<h1>Embedding Expressions in JSX</h1>\n<p>In the example below, we declare a variable called <code>name</code> and then use it inside JSX by wrapping it in curly braces:</p>\n<pre><code class=\"language-js\">const name = 'Josh Perez';\nconst element = &#x3C;h1>Hello, {name}&#x3C;/h1>;\nReactDOM.render(element, document.getElementById('root'));\n</code></pre>\n<p>You can put any valid <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions\">JavaScript expression</a> inside the curly braces in JSX. For example, <code>2 + 2</code>, <code>user.firstName</code>, or <code>formatName(user)</code> are all valid JavaScript expressions.</p>\n<p>In the example below, we embed the result of calling a JavaScript function, <code>formatName(user)</code>, into an <code>&#x3C;h1></code> element.</p>\n<pre><code class=\"language-js\">function formatName(user) {\n    return user.firstName + ' ' + user.lastName;\n}\n\nconst user = {\n    firstName: 'Harper',\n    lastName: 'Perez'\n};\n\nconst element = &#x3C;h1> Hello, {formatName(user)}! &#x3C;/h1>;\n\nReactDOM.render(element, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/introducing-jsx\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/oNwgZgm\"></a><a href=\"https://codepen.io/bgoonz/pen/oNwgZgm\">https://codepen.io/bgoonz/pen/oNwgZgm</a></p>\n<p>We split JSX over multiple lines for readability. While it isn't required, when doing this, we also recommend wrapping it in parentheses to avoid the pitfalls of <a href=\"https://stackoverflow.com/q/2846283\">automatic semicolon insertion</a>.</p>\n<h1>JSX is an Expression Too</h1>\n<p>After compilation, JSX expressions become regular JavaScript function calls and evaluate to JavaScript objects.</p>\n<p>This means that you can use JSX inside of <code>if</code> statements and <code>for</code> loops, assign it to variables, accept it as arguments, and return it from functions:</p>\n<pre><code class=\"language-js\">function getGreeting(user) {\n    if (user) {\n        return &#x3C;h1>Hello, {formatName(user)}!&#x3C;/h1>;\n    }\n    return &#x3C;h1>Hello, Stranger.&#x3C;/h1>;\n}\n</code></pre>\n<h1>Specifying Attributes with JSX</h1>\n<p>You may use quotes to specify string literals as attributes:</p>\n<pre><code class=\"language-js\">const element = &#x3C;div tabIndex=\"0\">&#x3C;/div>;\n</code></pre>\n<p>You may also use curly braces to embed a JavaScript expression in an attribute:</p>\n<pre><code class=\"language-js\">const element = &#x3C;img src={user.avatarUrl}>&#x3C;/img>;\n</code></pre>\n<p>Don't put quotes around curly braces when embedding a JavaScript expression in an attribute. You should either use quotes (for string values) or curly braces (for expressions), but not both in the same attribute.</p>\n<blockquote>\n<p>Warning:Since JSX is closer to JavaScript than to HTML, React DOM uses camelCase property naming convention instead of HTML attribute names.For example, class becomes className in JSX, and tabindex becomes tabIndex.</p>\n</blockquote>\n<h1>Specifying Children with JSX</h1>\n<p>If a tag is empty, you may close it immediately with <code>/></code>, like XML:</p>\n<pre><code class=\"language-js\">const element = &#x3C;img src={user.avatarUrl} />;\n</code></pre>\n<p>JSX tags may contain children:</p>\n<pre><code class=\"language-js\">const element = (\n    &#x3C;div>\n        &#x3C;h1>Hello!&#x3C;/h1>\n        &#x3C;h2>Good to see you here.&#x3C;/h2>\n    &#x3C;/div>\n);\n</code></pre>\n<h1>JSX Prevents Injection Attacks</h1>\n<p>It is safe to embed user input in JSX:</p>\n<pre><code class=\"language-js\">const title = response.potentiallyMaliciousInput;\n// This is safe:\nconst element = &#x3C;h1>{title}&#x3C;/h1>;\n</code></pre>\n<p>By default, React DOM <a href=\"https://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html\">escapes</a> any values embedded in JSX before rendering them. Thus it ensures that you can never inject anything that's not explicitly written in your application. Everything is converted to a string before being rendered. This helps prevent <a href=\"https://en.wikipedia.org/wiki/Cross-site_scripting\">XSS (cross-site-scripting)</a> attacks.</p>\n<h1>JSX Represents Objects</h1>\n<p>Babel compiles JSX down to <code>React.createElement()</code> calls.</p>\n<p>These two examples are identical:</p>\n<pre><code class=\"language-js\">const element = &#x3C;h1 className=\"greeting\">Hello, world!&#x3C;/h1>;\n</code></pre>\n<pre><code class=\"language-js\">const element = React.createElement('h1', { className: 'greeting' }, 'Hello, world!');\n</code></pre>\n<p><code>React.createElement()</code> performs a few checks to help you write bug-free code but essentially it creates an object like this:</p>\n<pre><code class=\"language-js\">// Note: this structure is simplified\nconst element = {\n    type: 'h1',\n    props: {\n        className: 'greeting',\n        children: 'Hello, world!'\n    }\n};\n</code></pre>\n<p>These objects are called \"React elements\". You can think of them as descriptions of what you want to see on the screen. React reads these objects and uses them to construct the DOM and keep it up to date.</p>\n<p>We will explore rendering React elements to the DOM in the <a href=\"https://reactjs.org/docs/rendering-elements.html\">next section</a>.</p>\n<blockquote>\n<p>Tip:We recommend using the \"Babel\" language definition for your editor of choice so that both ES6 and JSX code is properly highlighted.</p>\n</blockquote>\n<h1><strong>Rendering Elements</strong></h1>\n<h1>Elements are the smallest building blocks of React apps.</h1>\n<p>An element describes what you want to see on the screen:</p>\n<p><code>const element = &#x3C;h1>Hello, world&#x3C;/h1>;</code></p>\n<p>Unlike browser DOM elements, React elements are plain objects, and are cheap to create. React DOM takes care of updating the DOM to match the React elements.</p>\n<blockquote>\n<p>Note:One might confuse elements with a more widely known concept of \"components\". We will introduce components in the next section. Elements are what components are \"made of\", and we encourage you to read this section before jumping ahead.</p>\n</blockquote>\n<h1>Rendering an Element into the DOM</h1>\n<p>Let's say there is a <code>&#x3C;div></code> somewhere in your HTML file:</p>\n<pre><code class=\"language-js\">&#x3C;div id=\"root\">&#x3C;/div>\n</code></pre>\n<p>We call this a \"root\" DOM node because everything inside it will be managed by React DOM.</p>\n<p>Applications built with just React usually have a single root DOM node. If you are integrating React into an existing app, you may have as many isolated root DOM nodes as you like.</p>\n<p>To render a React element into a root DOM node, pass both to <code>[ReactDOM.render()](&#x3C;https://reactjs.org/docs/react-dom.html#render>)</code>:</p>\n<pre><code class=\"language-js\">const element = &#x3C;h1>Hello, world&#x3C;/h1>;\nReactDOM.render(element, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/rendering-elements/render-an-element\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/mdwyWeb?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/mdwyWeb?editors=0010\">https://codepen.io/bgoonz/pen/mdwyWeb?editors=0010</a></p>\n<p>It displays \"Hello, world\" on the page.</p>\n<h1>Updating the Rendered Element</h1>\n<p>React elements are <a href=\"https://en.wikipedia.org/wiki/Immutable_object\">immutable</a>. Once you create an element, you can't change its children or attributes. An element is like a single frame in a movie: it represents the UI at a certain point in time.</p>\n<p>With our knowledge so far, the only way to update the UI is to create a new element, and pass it to <code>[ReactDOM.render()](&#x3C;https://reactjs.org/docs/react-dom.html#render>)</code>.</p>\n<p>Consider this ticking clock example:</p>\n<pre><code class=\"language-js\">function tick() {\n    const element = (\n        &#x3C;div>\n            {' '}\n            &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {new Date().toLocaleTimeString()}.&#x3C;/h2>{' '}\n        &#x3C;/div>\n    );\n    ReactDOM.render(element, document.getElementById('root'));\n}\n\nsetInterval(tick, 1000);\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/rendering-elements/update-rendered-element\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/eYRmvNy?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/eYRmvNy?editors=0010\">https://codepen.io/bgoonz/pen/eYRmvNy?editors=0010</a></p>\n<p>It calls <code>[ReactDOM.render()](&#x3C;https://reactjs.org/docs/react-dom.html#render>)</code> every second from a <code>[setInterval()](&#x3C;https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval>)</code> callback.</p>\n<blockquote>\n<p>Note:In practice, most React apps only call ReactDOM.render() once. In the next sections we will learn how such code gets encapsulated into stateful components.We recommend that you don't skip topics because they build on each other.</p>\n</blockquote>\n<h1>React Only Updates What's Necessary</h1>\n<p>React DOM compares the element and its children to the previous one, and only applies the DOM updates necessary to bring the DOM to the desired state.</p>\n<p>You can verify by inspecting the <a href=\"https://reactjs.org/redirect-to-codepen/rendering-elements/update-rendered-element\">last example</a> with the browser tools:</p>\n<p><img src=\"https://reactjs.org/c158617ed7cc0eac8f58330e49e48224/granular-dom-updates.gif\" alt=\"https://reactjs.org/c158617ed7cc0eac8f58330e49e48224/granular-dom-updates.gif\"></p>\n<p>Even though we create an element describing the whole UI tree on every tick, only the text node whose contents have changed gets updated by React DOM.</p>\n<p>In our experience, thinking about how the UI should look at any given moment, rather than how to change it over time, eliminates a whole class of bugs.</p>\n<h1><strong>Components and Props</strong></h1>\n<h1>Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to the idea of components. You can find a <a href=\"https://reactjs.org/docs/react-component.html\">detailed component API reference here</a>.</h1>\n<p>Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called \"props\") and return React elements describing what should appear on the screen.</p>\n<h1>Function and Class Components</h1>\n<p>The simplest way to define a component is to write a JavaScript function:</p>\n<pre><code class=\"language-js\">function Welcome(props) {\n    return &#x3C;h1>Hello, {props.name}&#x3C;/h1>;\n}\n</code></pre>\n<p>This function is a valid React component because it accepts a single \"props\" (which stands for properties) object argument with data and returns a React element. We call such components \"function components\" because they are literally JavaScript functions.</p>\n<p>You can also use an <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes\">ES6 class</a> to define a component:</p>\n<pre><code class=\"language-js\">class Welcome extends React.Component {\n    render() {\n        return &#x3C;h1>Hello, {this.props.name}&#x3C;/h1>;\n    }\n}\n</code></pre>\n<p>The above two components are equivalent from React's point of view.</p>\n<p>Function and Class components both have some additional features that we will discuss in the <a href=\"https://reactjs.org/docs/state-and-lifecycle.html\">next sections</a>.</p>\n<h1>Rendering a Component</h1>\n<p>Previously, we only encountered React elements that represent DOM tags:</p>\n<pre><code class=\"language-js\">const element = &#x3C;div />;\n</code></pre>\n<p>However, elements can also represent user-defined components:</p>\n<pre><code class=\"language-js\">const element = &#x3C;Welcome name=\"Sara\" />;\n</code></pre>\n<p>When React sees an element representing a user-defined component, it passes JSX attributes and children to this component as a single object. We call this object \"props\".</p>\n<p>For example, this code renders \"Hello, Sara\" on the page:</p>\n<pre><code class=\"language-js\">function Welcome(props) {\n    return &#x3C;h1>Hello, {props.name}&#x3C;/h1>;\n}\n\nconst element = &#x3C;Welcome name=\"Sara\" />;\nReactDOM.render(element, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/components-and-props/rendering-a-component\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/QWgwpjd?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/QWgwpjd?editors=0010\">https://codepen.io/bgoonz/pen/QWgwpjd?editors=0010</a></p>\n<p>Let's recap what happens in this example:</p>\n<ol>\n<li>We call <code>ReactDOM.render()</code> with the <code>&#x3C;Welcome name=\"Sara\" /></code> element.</li>\n<li>React calls the <code>Welcome</code> component with <code>{name: 'Sara'}</code> as the props.</li>\n<li>Our <code>Welcome</code> component returns a <code>&#x3C;h1>Hello, Sara&#x3C;/h1></code> element as the result.</li>\n<li>React DOM efficiently updates the DOM to match <code>&#x3C;h1>Hello, Sara&#x3C;/h1></code>.</li>\n</ol>\n<blockquote>\n<p>Note: Always start component names with a capital letter.React treats components starting with lowercase letters as DOM tags. For example, <div /> represents an HTML div tag, but <Welcome /> represents a component and requires Welcome to be in <a href=\"http://scope.To\">scope.To</a> learn more about the reasoning behind this convention, please read JSX In Depth.</p>\n</blockquote>\n<h1>Composing Components</h1>\n<p>Components can refer to other components in their output. This lets us use the same component abstraction for any level of detail. A button, a form, a dialog, a screen: in React apps, all those are commonly expressed as components.</p>\n<p>For example, we can create an <code>App</code> component that renders <code>Welcome</code> many times:</p>\n<pre><code class=\"language-js\">function Welcome(props) {\n    return &#x3C;h1>Hello, {props.name}&#x3C;/h1>;\n}\n\nfunction App() {\n    return (\n        &#x3C;div>\n            {' '}\n            &#x3C;Welcome name=\"Sara\" /> &#x3C;Welcome name=\"Cahal\" /> &#x3C;Welcome name=\"Edite\" />{' '}\n        &#x3C;/div>\n    );\n}\n\nReactDOM.render(&#x3C;App />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/components-and-props/composing-components\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/LYLEWNq?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/LYLEWNq?editors=0010\">https://codepen.io/bgoonz/pen/LYLEWNq?editors=0010</a></p>\n<p>Typically, new React apps have a single <code>App</code> component at the very top. However, if you integrate React into an existing app, you might start bottom-up with a small component like <code>Button</code> and gradually work your way to the top of the view hierarchy.</p>\n<h1>Extracting Components</h1>\n<p>Don't be afraid to split components into smaller components.</p>\n<p>For example, consider this <code>Comment</code> component:</p>\n<pre><code class=\"language-js\">function Comment(props) {\n    return (\n        &#x3C;div className=\"Comment\">\n            &#x3C;div className=\"UserInfo\">\n                &#x3C;img className=\"Avatar\" src={props.author.avatarUrl} alt={props.author.name} />\n                &#x3C;div className=\"UserInfo-name\">{props.author.name}&#x3C;/div>\n            &#x3C;/div>\n            &#x3C;div className=\"Comment-text\">{props.text}&#x3C;/div>\n            &#x3C;div className=\"Comment-date\">{formatDate(props.date)}&#x3C;/div>\n        &#x3C;/div>\n    );\n}\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/components-and-props/extracting-components\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/PojwpzP?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/PojwpzP?editors=0010\">https://codepen.io/bgoonz/pen/PojwpzP?editors=0010</a></p>\n<p>It accepts <code>author</code> (an object), <code>text</code> (a string), and <code>date</code> (a date) as props, and describes a comment on a social media website.</p>\n<p>This component can be tricky to change because of all the nesting, and it is also hard to reuse individual parts of it. Let's extract a few components from it.</p>\n<p>First, we will extract <code>Avatar</code>:</p>\n<pre><code class=\"language-js\">function Avatar(props) {\n    return &#x3C;img className=\"Avatar\" src={props.user.avatarUrl} alt={props.user.name} />;\n}\n</code></pre>\n<p>The <code>Avatar</code> doesn't need to know that it is being rendered inside a <code>Comment</code>. This is why we have given its prop a more generic name: <code>user</code> rather than <code>author</code>.</p>\n<p>We recommend naming props from the component's own point of view rather than the context in which it is being used.</p>\n<p>We can now simplify <code>Comment</code> a tiny bit:</p>\n<pre><code class=\"language-js\">function Comment(props) {\n    return (\n        &#x3C;div className=\"Comment\">\n            {' '}\n            &#x3C;div className=\"UserInfo\">\n                {' '}\n                &#x3C;Avatar user={props.author} /> &#x3C;div className=\"UserInfo-name\"> {props.author.name}&#x3C;/div>{' '}\n            &#x3C;/div> &#x3C;div className=\"Comment-text\"> {props.text}&#x3C;/div> &#x3C;div className=\"Comment-date\"> {formatDate(props.date)}&#x3C;/div>{' '}\n        &#x3C;/div>\n    );\n}\n</code></pre>\n<p>Next, we will extract a <code>UserInfo</code> component that renders an <code>Avatar</code> next to the user's name:</p>\n<p><code>function UserInfo(props) { return ( &#x3C;div className=\"UserInfo\"> &#x3C;Avatar user={props.user} /> &#x3C;div className=\"UserInfo-name\"> {props.user.name} &#x3C;/div> &#x3C;/div> ); }</code></p>\n<p>This lets us simplify <code>Comment</code> even further:</p>\n<pre><code class=\"language-js\">function Comment(props) {\n    return (\n        &#x3C;div className=\"Comment\">\n            {' '}\n            &#x3C;UserInfo user={props.author} /> &#x3C;div className=\"Comment-text\"> {props.text}&#x3C;/div> &#x3C;div className=\"Comment-date\">\n                {' '}\n                {formatDate(props.date)}\n            &#x3C;/div>{' '}\n        &#x3C;/div>\n    );\n}\n</code></pre>\n<p><strong><a href=\"https://reactjs.org/redirect-to-codepen/components-and-props/extracting-components-continued\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/eYRmvzV?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/eYRmvzV?editors=0010\">https://codepen.io/bgoonz/pen/eYRmvzV?editors=0010</a></p>\n<p>Extracting components might seem like grunt work at first, but having a palette of reusable components pays off in larger apps. A good rule of thumb is that if a part of your UI is used several times (<code>Button</code>, <code>Panel</code>, <code>Avatar</code>), or is complex enough on its own (<code>App</code>, <code>FeedStory</code>, <code>Comment</code>), it is a good candidate to be extracted to a separate component.</p>\n<h1>Props are Read-Only</h1>\n<p>Whether you declare a component <a href=\"https://reactjs.org/docs/components-and-props.html#function-and-class-components\">as a function or a class</a>, it must never modify its own props. Consider this <code>sum</code> function:</p>\n<pre><code class=\"language-js\">function sum(a, b) {\n    return a + b;\n}\n</code></pre>\n<p>Such functions are called <a href=\"https://en.wikipedia.org/wiki/Pure_function\">\"pure\"</a> because they do not attempt to change their inputs, and always return the same result for the same inputs.</p>\n<p>In contrast, this function is impure because it changes its own input:</p>\n<pre><code class=\"language-js\">function withdraw(account, amount) {\n  account.total -= amount;\n}\n\n```js\n\nReact is pretty flexible but it has a single strict rule:\n\n**All React components must act like pure functions with respect to their props.**\n\nOf course, application UIs are dynamic and change over time. In the [next section](https://reactjs.org/docs/state-and-lifecycle.html), we will introduce a new concept of \"state\". State allows React components to change their output over time in response to user actions, network responses, and anything else, without violating this rule.\n\n**State and Lifecycle**\n=======================\n\nThis page introduces the concept of state and lifecycle in a React component. You can find a [detailed component API reference here](https://reactjs.org/docs/react-component.html).\n====================================================================================================================================================================================\n\nConsider the ticking clock example from [one of the previous sections](https://reactjs.org/docs/rendering-elements.html#updating-the-rendered-element). In [Rendering Elements](https://reactjs.org/docs/rendering-elements.html#rendering-an-element-into-the-dom), we have only learned one way to update the UI. We call `ReactDOM.render()` to change the rendered output:\n\n```js\nfunction tick() {\n  const element = (\n    &#x3C;div>      &#x3C;h1>Hello, world!&#x3C;/h1>      &#x3C;h2>It is {new Date().toLocaleTimeString()}.&#x3C;/h2>    &#x3C;/div>);\n  ReactDOM.render(    element,    document.getElementById('root')  );}\n\nsetInterval(tick, 1000);\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/gwoJZk?editors=0010\">Try it on CodePen</a></strong></p>\n<p>In this section, we will learn how to make the <code>Clock</code> component truly reusable and encapsulated. It will set up its own timer and update itself every second.</p>\n<p>We can start by encapsulating how the clock looks:</p>\n<pre><code class=\"language-js\">function Clock(props) {\n    return (\n        &#x3C;div>\n            {' '}\n            &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {props.date.toLocaleTimeString()}.&#x3C;/h2>{' '}\n        &#x3C;/div>\n    );\n}\n\nfunction tick() {\n    ReactDOM.render(&#x3C;Clock date={new Date()} />, document.getElementById('root'));\n}\n\nsetInterval(tick, 1000);\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/dpdoYR?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/powvegw?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/powvegw?editors=0010\">https://codepen.io/bgoonz/pen/powvegw?editors=0010</a></p>\n<p>However, it misses a crucial requirement: the fact that the <code>Clock</code> sets up a timer and updates the UI every second should be an implementation detail of the <code>Clock</code>.</p>\n<p>Ideally we want to write this once and have the <code>Clock</code> update itself:</p>\n<pre><code class=\"language-js\">ReactDOM.render(&#x3C;Clock />, document.getElementById('root'));\n</code></pre>\n<p>To implement this, we need to add \"state\" to the <code>Clock</code> component.</p>\n<p>State is similar to props, but it is private and fully controlled by the component.</p>\n<h1>Converting a Function to a Class</h1>\n<p>You can convert a function component like <code>Clock</code> to a class in five steps:</p>\n<ol>\n<li>Create an <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes\">ES6 class</a>, with the same name, that extends <code>React.Component</code>.</li>\n<li>Add a single empty method to it called <code>render()</code>.</li>\n<li>Move the body of the function into the <code>render()</code> method.</li>\n<li>Replace <code>props</code> with <code>this.props</code> in the <code>render()</code> body.</li>\n<li>Delete the remaining empty function declaration.</li>\n</ol>\n<pre><code class=\"language-js\">class Clock extends React.Component {\n    render() {\n        return (\n            &#x3C;div>\n                &#x3C;h1>Hello, world!&#x3C;/h1>\n                &#x3C;h2>It is {this.props.date.toLocaleTimeString()}.&#x3C;/h2>\n            &#x3C;/div>\n        );\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/zKRGpo?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/eYRmvJV?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/eYRmvJV?editors=0010\">https://codepen.io/bgoonz/pen/eYRmvJV?editors=0010</a></p>\n<p><code>Clock</code> is now defined as a class rather than a function.</p>\n<p>The <code>render</code> method will be called each time an update happens, but as long as we render <code>&#x3C;Clock /></code> into the same DOM node, only a single instance of the <code>Clock</code> class will be used. This lets us use additional features such as local state and lifecycle methods.</p>\n<h1>Adding Local State to a Class</h1>\n<p>We will move the <code>date</code> from props to state in three steps:</p>\n<ol>\n<li>Replace <code>this.props.date</code> with <code>this.state.date</code> in the <code>render()</code> method:</li>\n</ol>\n<pre><code class=\"language-js\">class Clock extends React.Component {\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {this.state.date.toLocaleTimeString()}.&#x3C;/h2>{' '}\n            &#x3C;/div>\n        );\n    }\n}\n</code></pre>\n<ol>\n<li>Add a <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes#Constructor\">class constructor</a> that assigns the initial <code>this.state</code>:</li>\n</ol>\n<pre><code class=\"language-js\">class Clock extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { date: new Date() };\n    }\n\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {this.state.date.toLocaleTimeString()}.&#x3C;/h2>{' '}\n            &#x3C;/div>\n        );\n    }\n}\n</code></pre>\n<p>Note how we pass <code>props</code> to the base constructor:</p>\n<pre><code class=\"language-js\"> constructor(props) {\n    super(props);    this.state = {date: new Date()};\n  }\n</code></pre>\n<p>Class components should always call the base constructor with <code>props</code>.</p>\n<ol>\n<li>Remove the <code>date</code> prop from the <code>&#x3C;Clock /></code> element:</li>\n</ol>\n<pre><code class=\"language-js\">ReactDOM.render(&#x3C;Clock />, document.getElementById('root'));\n</code></pre>\n<p>We will later add the timer code back to the component itself.</p>\n<p>The result looks like this:</p>\n<pre><code class=\"language-js\">class Clock extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { date: new Date() };\n    }\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {this.state.date.toLocaleTimeString()}.&#x3C;/h2>{' '}\n            &#x3C;/div>\n        );\n    }\n}\n\nReactDOM.render(&#x3C;Clock />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/KgQpJd?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/oNwgZbV?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/oNwgZbV?editors=0010\">https://codepen.io/bgoonz/pen/oNwgZbV?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/KgQpJd?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Next, we'll make the <code>Clock</code> set up its own timer and update itself every second.</p>\n<h1>Adding Lifecycle Methods to a Class</h1>\n<p>In applications with many components, it's very important to free up resources taken by the components when they are destroyed.</p>\n<p>We want to <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval\">set up a timer</a> whenever the <code>Clock</code> is rendered to the DOM for the first time. This is called \"mounting\" in React.</p>\n<p>We also want to <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval\">clear that timer</a> whenever the DOM produced by the <code>Clock</code> is removed. This is called \"unmounting\" in React.</p>\n<p>We can declare special methods on the component class to run some code when a component mounts and unmounts:</p>\n<pre><code class=\"language-js\">class Clock extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { date: new Date() };\n    }\n\n    componentDidMount() {}\n    componentWillUnmount() {}\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {this.state.date.toLocaleTimeString()}.&#x3C;/h2>{' '}\n            &#x3C;/div>\n        );\n    }\n}\n</code></pre>\n<p>These methods are called \"lifecycle methods\".</p>\n<p>The <code>componentDidMount()</code> method runs after the component output has been rendered to the DOM. This is a good place to set up a timer:</p>\n<pre><code class=\"language-js\">  componentDidMount() {\n    this.timerID = setInterval(      () => this.tick(),      1000    );  }\n</code></pre>\n<p>Note how we save the timer ID right on <code>this</code> (<code>this.timerID</code>).</p>\n<p>While <code>this.props</code> is set up by React itself and <code>this.state</code> has a special meaning, you are free to add additional fields to the class manually if you need to store something that doesn't participate in the data flow (like a timer ID).</p>\n<p>We will tear down the timer in the <code>componentWillUnmount()</code> lifecycle method:</p>\n<pre><code class=\"language-js\">  componentWillUnmount() {\n    clearInterval(this.timerID);  }\n</code></pre>\n<p>Finally, we will implement a method called <code>tick()</code> that the <code>Clock</code> component will run every second.</p>\n<p>It will use <code>this.setState()</code> to schedule updates to the component local state:</p>\n<pre><code class=\"language-js\">class Clock extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { date: new Date() };\n    }\n\n    componentDidMount() {\n        this.timerID = setInterval(() => this.tick(), 1000);\n    }\n\n    componentWillUnmount() {\n        clearInterval(this.timerID);\n    }\n\n    tick() {\n        this.setState({ date: new Date() });\n    }\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;h1>Hello, world!&#x3C;/h1> &#x3C;h2>It is {this.state.date.toLocaleTimeString()}.&#x3C;/h2>{' '}\n            &#x3C;/div>\n        );\n    }\n}\n\nReactDOM.render(&#x3C;Clock />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/amqdNA?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/amqdNA?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Now the clock ticks every second.</p>\n<p>Let's quickly recap what's going on and the order in which the methods are called:</p>\n<ol>\n<li>When <code>&#x3C;Clock /></code> is passed to <code>ReactDOM.render()</code>, React calls the constructor of the <code>Clock</code> component. Since <code>Clock</code> needs to display the current time, it initializes <code>this.state</code> with an object including the current time. We will later update this state.</li>\n<li>React then calls the <code>Clock</code> component's <code>render()</code> method. This is how React learns what should be displayed on the screen. React then updates the DOM to match the <code>Clock</code>'s render output.</li>\n<li>When the <code>Clock</code> output is inserted in the DOM, React calls the <code>componentDidMount()</code> lifecycle method. Inside it, the <code>Clock</code> component asks the browser to set up a timer to call the component's <code>tick()</code> method once a second.</li>\n<li>Every second the browser calls the <code>tick()</code> method. Inside it, the <code>Clock</code> component schedules a UI update by calling <code>setState()</code> with an object containing the current time. Thanks to the <code>setState()</code> call, React knows the state has changed, and calls the <code>render()</code> method again to learn what should be on the screen. This time, <code>this.state.date</code> in the <code>render()</code> method will be different, and so the render output will include the updated time. React updates the DOM accordingly.</li>\n<li>If the <code>Clock</code> component is ever removed from the DOM, React calls the <code>componentWillUnmount()</code> lifecycle method so the timer is stopped.</li>\n</ol>\n<h1>Using State Correctly</h1>\n<p>There are three things you should know about <code>setState()</code>.</p>\n<h1>Do Not Modify State Directly</h1>\n<p>For example, this will not re-render a component:</p>\n<pre><code class=\"language-js\">// Wrong\nthis.state.comment = 'Hello';\n</code></pre>\n<p>Instead, use <code>setState()</code>:</p>\n<pre><code class=\"language-js\">// Correct\nthis.setState({ comment: 'Hello' });\n</code></pre>\n<p>The only place where you can assign <code>this.state</code> is the constructor.</p>\n<h1>State Updates May Be Asynchronous</h1>\n<p>React may batch multiple <code>setState()</code> calls into a single update for performance.</p>\n<p>Because <code>this.props</code> and <code>this.state</code> may be updated asynchronously, you should not rely on their values for calculating the next state.</p>\n<p>For example, this code may fail to update the counter:</p>\n<pre><code class=\"language-js\">// Wrong\nthis.setState({\n    counter: this.state.counter + this.props.increment\n});\n</code></pre>\n<p>To fix it, use a second form of <code>setState()</code> that accepts a function rather than an object. That function will receive the previous state as the first argument, and the props at the time the update is applied as the second argument:</p>\n<pre><code class=\"language-js\">// Correct\nthis.setState((state, props) => ({\n    counter: state.counter + props.increment\n}));\n</code></pre>\n<p>We used an <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow function</a> above, but it also works with regular functions:</p>\n<pre><code class=\"language-js\">// Correct\nthis.setState(function (state, props) {\n    return {\n        counter: state.counter + props.increment\n    };\n});\n</code></pre>\n<h1>State Updates are Merged</h1>\n<p>When you call <code>setState()</code>, React merges the object you provide into the current state.</p>\n<p>For example, your state may contain several independent variables:</p>\n<pre><code class=\"language-js\">  constructor(props) {\n    super(props);\n    this.state = {\n      posts: [],      comments: []    };\n  }\n</code></pre>\n<p>Then you can update them independently with separate <code>setState()</code> calls:</p>\n<pre><code class=\"language-js\">  componentDidMount() {\n    fetchPosts().then(response => {\n      this.setState({\n        posts: response.posts      });\n    });\n\n    fetchComments().then(response => {\n      this.setState({\n        comments: response.comments      });\n    });\n  }\n</code></pre>\n<p>The merging is shallow, so <code>this.setState({comments})</code> leaves <code>this.state.posts</code> intact, but completely replaces <code>this.state.comments</code>.</p>\n<h1>The Data Flows Down</h1>\n<p>Neither parent nor child components can know if a certain component is stateful or stateless, and they shouldn't care whether it is defined as a function or a class.</p>\n<p>This is why state is often called local or encapsulated. It is not accessible to any component other than the one that owns and sets it.</p>\n<p>A component may choose to pass its state down as props to its child components:</p>\n<pre><code class=\"language-js\">&#x3C;FormattedDate date={this.state.date} />\n</code></pre>\n<p>The <code>FormattedDate</code> component would receive the <code>date</code> in its props and wouldn't know whether it came from the <code>Clock</code>'s state, from the <code>Clock</code>'s props, or was typed by hand:</p>\n<pre><code class=\"language-js\">function FormattedDate(props) {\n    return &#x3C;h2>It is {props.date.toLocaleTimeString()}.&#x3C;/h2>;\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/zKRqNB?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/GREgWEp?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/GREgWEp?editors=0010\">https://codepen.io/bgoonz/pen/GREgWEp?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/zKRqNB?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>This is commonly called a \"top-down\" or \"unidirectional\" data flow. Any state is always owned by some specific component, and any data or UI derived from that state can only affect components \"below\" them in the tree.</p>\n<p>If you imagine a component tree as a waterfall of props, each component's state is like an additional water source that joins it at an arbitrary point but also flows down.</p>\n<p>To show that all components are truly isolated, we can create an <code>App</code> component that renders three <code>&#x3C;Clock></code>s:</p>\n<pre><code class=\"language-js\">function App() {\n    return (\n        &#x3C;div>\n            {' '}\n            &#x3C;Clock /> &#x3C;Clock /> &#x3C;Clock />{' '}\n        &#x3C;/div>\n    );\n}\n\nReactDOM.render(&#x3C;App />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/vXdGmd?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/YzQPZQK?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/YzQPZQK?editors=0010\">https://codepen.io/bgoonz/pen/YzQPZQK?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/vXdGmd?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Each <code>Clock</code> sets up its own timer and updates independently.</p>\n<p>In React apps, whether a component is stateful or stateless is considered an implementation detail of the component that may change over time. You can use stateless components inside stateful components, and vice versa.</p>\n<h1><strong>Handling Events</strong></h1>\n<h1>Handling events with React elements is very similar to handling events on DOM elements. There are some syntax differences:</h1>\n<ul>\n<li>React events are named using camelCase, rather than lowercase.</li>\n<li>With JSX you pass a function as the event handler, rather than a string.</li>\n</ul>\n<p>For example, the HTML:</p>\n<pre><code class=\"language-js\">&#x3C;button onclick=\"activateLasers()\">Activate Lasers&#x3C;/button>\n</code></pre>\n<p>is slightly different in React:</p>\n<pre><code class=\"language-js\">&#x3C;button onClick={activateLasers}> Activate Lasers&#x3C;/button>\n</code></pre>\n<p>Another difference is that you cannot return <code>false</code> to prevent default behavior in React. You must call <code>preventDefault</code> explicitly. For example, with plain HTML, to prevent the default form behavior of submitting, you can write:</p>\n<pre><code class=\"language-js\">&#x3C;form onsubmit=\"console.log('You clicked submit.'); return false\">\n    &#x3C;button type=\"submit\">Submit&#x3C;/button>\n&#x3C;/form>\n</code></pre>\n<p>In React, this could instead be:</p>\n<pre><code class=\"language-js\">function Form() {\n    function handleSubmit(e) {\n        e.preventDefault();\n        console.log('You clicked submit.');\n    }\n\n    return (\n        &#x3C;form onSubmit={handleSubmit}>\n            {' '}\n            &#x3C;button type=\"submit\">Submit&#x3C;/button>{' '}\n        &#x3C;/form>\n    );\n}\n</code></pre>\n<p>Here, <code>e</code> is a synthetic event. React defines these synthetic events according to the <a href=\"https://www.w3.org/TR/DOM-Level-3-Events/\">W3C spec</a>, so you don't need to worry about cross-browser compatibility. React events do not work exactly the same as native events. See the <code>[SyntheticEvent](&#x3C;https://reactjs.org/docs/events.html>)</code> reference guide to learn more.</p>\n<p>When using React, you generally don't need to call <code>addEventListener</code> to add listeners to a DOM element after it is created. Instead, just provide a listener when the element is initially rendered.</p>\n<p>When you define a component using an <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes\">ES6 class</a>, a common pattern is for an event handler to be a method on the class. For example, this <code>Toggle</code> component renders a button that lets the user toggle between \"ON\" and \"OFF\" states:</p>\n<pre><code class=\"language-js\">class Toggle extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {isToggleOn: true};\n\n    // This binding is necessary to make `this` work in the callback    this.handleClick = this.handleClick.bind(this);  }\n\n  handleClick() {    this.setState(prevState => ({      isToggleOn: !prevState.isToggleOn    }));  }render() {\n    return (\n      &#x3C;button onClick={this.handleClick}>        {this.state.isToggleOn ? 'ON' : 'OFF'}\n      &#x3C;/button>);\n  }\n}\n\nReactDOM.render(\n  &#x3C;Toggle />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/xEmzGg?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/xEmzGg?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>You have to be careful about the meaning of <code>this</code> in JSX callbacks. In JavaScript, class methods are not <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\">bound</a> by default. If you forget to bind <code>this.handleClick</code> and pass it to <code>onClick</code>, <code>this</code> will be <code>undefined</code> when the function is actually called.</p>\n<p>This is not React-specific behavior; it is a part of <a href=\"https://www.smashingmagazine.com/2014/01/understanding-javascript-function-prototype-bind/\">how functions work in JavaScript</a>. Generally, if you refer to a method without <code>()</code> after it, such as <code>onClick={this.handleClick}</code>, you should bind that method.</p>\n<p>If calling <code>bind</code> annoys you, there are two ways you can get around this. If you are using the experimental <a href=\"https://babeljs.io/docs/plugins/transform-class-properties/\">public class fields syntax</a>, you can use class fields to correctly bind callbacks:</p>\n<pre><code class=\"language-js\">class LoggingButton extends React.Component {\n  // This syntax ensures `this` is bound within handleClick.  // Warning: this is *experimental* syntax.  handleClick = () => {    console.log('this is:', this);  }render() {\n    return (\n      &#x3C;button onClick={this.handleClick}>        Click me\n      &#x3C;/button>);\n  }\n}\n</code></pre>\n<p>This syntax is enabled by default in <a href=\"https://github.com/facebookincubator/create-react-app\">Create React App</a>.</p>\n<p>If you aren't using class fields syntax, you can use an <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow function</a> in the callback:</p>\n<pre><code class=\"language-js\">class LoggingButton extends React.Component {\n  handleClick() {\n    console.log('this is:', this);\n  }\n\n  render() {\n    // This syntax ensures `this` is bound within handleClick    return (      &#x3C;button onClick={() => this.handleClick()}>        Click me\n      &#x3C;/button>);\n  }\n}\n</code></pre>\n<p>The problem with this syntax is that a different callback is created each time the <code>LoggingButton</code> renders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering. We generally recommend binding in the constructor or using the class fields syntax, to avoid this sort of performance problem.</p>\n<h1>Passing Arguments to Event Handlers</h1>\n<p>Inside a loop, it is common to want to pass an extra parameter to an event handler. For example, if <code>id</code> is the row ID, either of the following would work:</p>\n<p><code>&#x3C;button onClick={(e) => this.deleteRow(id, e)}>Delete Row&#x3C;/button>&#x3C;button onClick={this.deleteRow.bind(this, id)}>Delete Row&#x3C;/button></code></p>\n<p>The above two lines are equivalent, and use <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow functions</a> and <code>[Function.prototype.bind](&#x3C;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind>)</code> respectively.</p>\n<p>In both cases, the <code>e</code> argument representing the React event will be passed as a second argument after the ID. With an arrow function, we have to pass it explicitly, but with <code>bind</code> any further arguments are automatically forwarded.</p>\n<h1><strong>Conditional Rendering</strong></h1>\n<h1>In React, you can create distinct components that encapsulate behavior you need. Then, you can render only some of them, depending on the state of your application.</h1>\n<p>Conditional rendering in React works the same way conditions work in JavaScript. Use JavaScript operators like <code>[if](&#x3C;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else>)</code> or the <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator\">conditional operator</a> to create elements representing the current state, and let React update the UI to match them.</p>\n<p>Consider these two components:</p>\n<pre><code class=\"language-js\">function UserGreeting(props) {\n    return &#x3C;h1>Welcome back!&#x3C;/h1>;\n}\n\nfunction GuestGreeting(props) {\n    return &#x3C;h1>Please sign up.&#x3C;/h1>;\n}\n</code></pre>\n<p>We'll create a <code>Greeting</code> component that displays either of these components depending on whether a user is logged in:</p>\n<pre><code class=\"language-js\">function Greeting(props) {\n    const isLoggedIn = props.isLoggedIn;\n    if (isLoggedIn) {\n        return &#x3C;UserGreeting />;\n    }\n    return &#x3C;GuestGreeting />;\n}\nReactDOM.render(\n    // Try changing to isLoggedIn={true}:\n    &#x3C;Greeting isLoggedIn={false} />,\n    document.getElementById('root')\n);\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/ZpVxNq?editors=0011\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/mdwyWmJ?editors=0011\"></a><a href=\"https://codepen.io/bgoonz/pen/mdwyWmJ?editors=0011\">https://codepen.io/bgoonz/pen/mdwyWmJ?editors=0011</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/ZpVxNq?editors=0011\" height=\"900px\" width=\"100%\"> </iframe>\n<p>This example renders a different greeting depending on the value of <code>isLoggedIn</code> prop.</p>\n<h1>Element Variables</h1>\n<p>You can use variables to store elements. This can help you conditionally render a part of the component while the rest of the output doesn't change.</p>\n<p>Consider these two new components representing Logout and Login buttons:</p>\n<pre><code class=\"language-js\">function LoginButton(props) {\n    return &#x3C;button onClick={props.onClick}>Login&#x3C;/button>;\n}\n\nfunction LogoutButton(props) {\n    return &#x3C;button onClick={props.onClick}>Logout&#x3C;/button>;\n}\n</code></pre>\n<p>In the example below, we will create a <a href=\"https://reactjs.org/docs/state-and-lifecycle.html#adding-local-state-to-a-class\">stateful component</a> called <code>LoginControl</code>.</p>\n<p>It will render either <code>&#x3C;LoginButton /></code> or <code>&#x3C;LogoutButton /></code> depending on its current state. It will also render a <code>&#x3C;Greeting /></code> from the previous example:</p>\n<pre><code class=\"language-js\">class LoginControl extends React.Component {\n    constructor(props) {\n        super(props);\n        this.handleLoginClick = this.handleLoginClick.bind(this);\n        this.handleLogoutClick = this.handleLogoutClick.bind(this);\n        this.state = { isLoggedIn: false };\n    }\n\n    handleLoginClick() {\n        this.setState({ isLoggedIn: true });\n    }\n\n    handleLogoutClick() {\n        this.setState({ isLoggedIn: false });\n    }\n\n    render() {\n        const isLoggedIn = this.state.isLoggedIn;\n        let button;\n        if (isLoggedIn) {\n            button = &#x3C;LogoutButton onClick={this.handleLogoutClick} />;\n        } else {\n            button = &#x3C;LoginButton onClick={this.handleLoginClick} />;\n        }\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;Greeting isLoggedIn={isLoggedIn} /> {button}{' '}\n            &#x3C;/div>\n        );\n    }\n}\n\nReactDOM.render(&#x3C;LoginControl />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/QKzAgB?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/QKzAgB?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>While declaring a variable and using an <code>if</code> statement is a fine way to conditionally render a component, sometimes you might want to use a shorter syntax. There are a few ways to inline conditions in JSX, explained below.</p>\n<h1>Inline If with Logical &#x26;&#x26; Operator</h1>\n<p>You may <a href=\"https://reactjs.org/docs/introducing-jsx.html#embedding-expressions-in-jsx\">embed expressions in JSX</a> by wrapping them in curly braces. This includes the JavaScript logical <code>&#x26;&#x26;</code> operator. It can be handy for conditionally including an element:</p>\n<pre><code class=\"language-js\">function Mailbox(props) {\n    const unreadMessages = props.unreadMessages;\n    return (\n        &#x3C;div>\n            {' '}\n            &#x3C;h1>Hello!&#x3C;/h1> {unreadMessages.length > 0 &#x26;&#x26; &#x3C;h2> You have {unreadMessages.length} unread messages. &#x3C;/h2>}{' '}\n        &#x3C;/div>\n    );\n}\n\nconst messages = ['React', 'Re: React', 'Re:Re: React'];\nReactDOM.render(&#x3C;Mailbox unreadMessages={messages} />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/ozJddz?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/VwWYppo?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/VwWYppo?editors=0010\">https://codepen.io/bgoonz/pen/VwWYppo?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/ozJddz?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>It works because in JavaScript, <code>true &#x26;&#x26; expression</code> always evaluates to <code>expression</code>, and <code>false &#x26;&#x26; expression</code> always evaluates to <code>false</code>.</p>\n<p>Therefore, if the condition is <code>true</code>, the element right after <code>&#x26;&#x26;</code> will appear in the output. If it is <code>false</code>, React will ignore and skip it.</p>\n<p>Note that returning a falsy expression will still cause the element after <code>&#x26;&#x26;</code> to be skipped but will return the falsy expression. In the example below, <code>&#x3C;div>0&#x3C;/div></code> will be returned by the render method.</p>\n<pre><code class=\"language-js\">render() {\n  const count = 0;  return (\n    &#x3C;div>      { count &#x26;&#x26; &#x3C;h1>Messages: {count}&#x3C;/h1>}    &#x3C;/div>);\n}\n</code></pre>\n<h1>Inline If-Else with Conditional Operator</h1>\n<p>Another method for conditionally rendering elements inline is to use the JavaScript conditional operator <code>[condition ? true : false](&#x3C;https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator>)</code>.</p>\n<p>In the example below, we use it to conditionally render a small block of text.</p>\n<pre><code class=\"language-js\">render() {\n  const isLoggedIn = this.state.isLoggedIn;\n  return (\n    &#x3C;div>      The user is &#x3C;b>{isLoggedIn ? 'currently' : 'not'}&#x3C;/b> logged in.    &#x3C;/div>);\n}\n</code></pre>\n<p>It can also be used for larger expressions although it is less obvious what's going on:</p>\n<pre><code class=\"language-js\">render() {\n  const isLoggedIn = this.state.isLoggedIn;\n  return (\n    &#x3C;div>      {isLoggedIn        ? &#x3C;LogoutButton onClick={this.handleLogoutClick} />        : &#x3C;LoginButton onClick={this.handleLoginClick} />      }\n    &#x3C;/div>  );\n}\n</code></pre>\n<p>Just like in JavaScript, it is up to you to choose an appropriate style based on what you and your team consider more readable. Also remember that whenever conditions become too complex, it might be a good time to <a href=\"https://reactjs.org/docs/components-and-props.html#extracting-components\">extract a component</a>.</p>\n<h1>Preventing Component from Rendering</h1>\n<p>In rare cases you might want a component to hide itself even though it was rendered by another component. To do this return <code>null</code> instead of its render output.</p>\n<p>In the example below, the <code>&#x3C;WarningBanner /></code> is rendered depending on the value of the prop called <code>warn</code>. If the value of the prop is <code>false</code>, then the component does not render:</p>\n<pre><code class=\"language-js\">function WarningBanner(props) {\n    if (!props.warn) {\n        return null;\n    }\n    return &#x3C;div className=\"warning\"> Warning!&#x3C;/div>;\n}\n\nclass Page extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { showWarning: true };\n        this.handleToggleClick = this.handleToggleClick.bind(this);\n    }\n\n    handleToggleClick() {\n        this.setState((state) => ({\n            showWarning: !state.showWarning\n        }));\n    }\n\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;WarningBanner warn={this.state.showWarning} /> &#x3C;button onClick={this.handleToggleClick}>\n                    {' '}\n                    {this.state.showWarning ? 'Hide' : 'Show'}\n                &#x3C;/button>{' '}\n            &#x3C;/div>\n        );\n    }\n}\n\nReactDOM.render(&#x3C;Page />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/Xjoqwm?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/Xjoqwm?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Returning <code>null</code> from a component's <code>render</code> method does not affect the firing of the component's lifecycle methods. For instance <code>componentDidUpdate</code> will still be called.</p>\n<h1><strong>Lists and Keys</strong></h1>\n<h1>First, let's review how you transform lists in JavaScript.</h1>\n<p>Given the code below, we use the <code>[map()](&#x3C;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map>)</code> function to take an array of <code>numbers</code> and double their values. We assign the new array returned by <code>map()</code> to the variable <code>doubled</code> and log it:</p>\n<pre><code class=\"language-js\">const numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map((number) => number * 2);\nconsole.log(doubled);\n</code></pre>\n<p>This code logs <code>[2, 4, 6, 8, 10]</code> to the console.</p>\n<p>In React, transforming arrays into lists of <a href=\"https://reactjs.org/docs/rendering-elements.html\">elements</a> is nearly identical.</p>\n<h1>Rendering Multiple Components</h1>\n<p>You can build collections of elements and <a href=\"https://reactjs.org/docs/introducing-jsx.html#embedding-expressions-in-jsx\">include them in JSX</a> using curly braces <code>{}</code>.</p>\n<p>Below, we loop through the <code>numbers</code> array using the JavaScript <code>[map()](&#x3C;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map>)</code> function. We return a <code>&#x3C;li></code> element for each item. Finally, we assign the resulting array of elements to <code>listItems</code>:</p>\n<pre><code class=\"language-js\">const numbers = [1, 2, 3, 4, 5];\nconst listItems = numbers.map((number) => &#x3C;li>{number}&#x3C;/li>);\n</code></pre>\n<p>We include the entire <code>listItems</code> array inside a <code>&#x3C;ul></code> element, and <a href=\"https://reactjs.org/docs/rendering-elements.html#rendering-an-element-into-the-dom\">render it to the DOM</a>:</p>\n<pre><code class=\"language-js\">ReactDOM.render(&#x3C;ul>{listItems}&#x3C;/ul>, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/GjPyQr?editors=0011\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/eYRmvvr?editors=0011\"></a><a href=\"https://codepen.io/bgoonz/pen/eYRmvvr?editors=0011\">https://codepen.io/bgoonz/pen/eYRmvvr?editors=0011</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/GjPyQr?editors=0011\" height=\"900px\" width=\"100%\"> </iframe>\n<p>This code displays a bullet list of numbers between 1 and 5.</p>\n<h1>Basic List Component</h1>\n<p>Usually you would render lists inside a <a href=\"https://reactjs.org/docs/components-and-props.html\">component</a>.</p>\n<p>We can refactor the previous example into a component that accepts an array of <code>numbers</code> and outputs a list of elements.</p>\n<pre><code class=\"language-js\">function NumberList(props) {\n    const numbers = props.numbers;\n    const listItems = numbers.map((number) => &#x3C;li>{number}&#x3C;/li>);\n    return &#x3C;ul>{listItems}&#x3C;/ul>;\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(&#x3C;NumberList numbers={numbers} />, document.getElementById('root'));\n</code></pre>\n<p>When you run this code, you'll be given a warning that a key should be provided for list items. A \"key\" is a special string attribute you need to include when creating lists of elements. We'll discuss why it's important in the next section.</p>\n<p>Let's assign a <code>key</code> to our list items inside <code>numbers.map()</code> and fix the missing key issue.</p>\n<pre><code class=\"language-js\">function NumberList(props) {\n    const numbers = props.numbers;\n    const listItems = numbers.map((number) => &#x3C;li key={number.toString()}> {number}&#x3C;/li>);\n    return &#x3C;ul>{listItems}&#x3C;/ul>;\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(&#x3C;NumberList numbers={numbers} />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/jrXYRR?editors=0011\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/yLXyMMP?editors=0011\"></a><a href=\"https://codepen.io/bgoonz/pen/yLXyMMP?editors=0011\">https://codepen.io/bgoonz/pen/yLXyMMP?editors=0011</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/jrXYRR?editors=0011\" height=\"900px\" width=\"100%\"> </iframe>\n<h1>Keys</h1>\n<p>Keys help React identify which items have changed, are added, or are removed. Keys should be given to the elements inside the array to give the elements a stable identity:</p>\n<pre><code class=\"language-js\">const numbers = [1, 2, 3, 4, 5];\nconst listItems = numbers.map((number) => &#x3C;li key={number.toString()}> {number}&#x3C;/li>);\n</code></pre>\n<p>The best way to pick a key is to use a string that uniquely identifies a list item among its siblings. Most often you would use IDs from your data as keys:</p>\n<pre><code class=\"language-js\">const todoItems = todos.map((todo) => &#x3C;li key={todo.id}> {todo.text}&#x3C;/li>);\n</code></pre>\n<p>When you don't have stable IDs for rendered items, you may use the item index as a key as a last resort:</p>\n<pre><code class=\"language-js\">const todoItems = todos.map((todo, index) =>\n  // Only do this if items have no stable IDs  &#x3C;li key={index}>    {todo.text}\n  &#x3C;/li>);\n</code></pre>\n<p>We don't recommend using indexes for keys if the order of items may change. This can negatively impact performance and may cause issues with component state. Check out Robin Pokorny's article for an <a href=\"https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318\">in-depth explanation on the negative impacts of using an index as a key</a>. If you choose not to assign an explicit key to list items then React will default to using indexes as keys.</p>\n<p>Here is an <a href=\"https://reactjs.org/docs/reconciliation.html#recursing-on-children\">in-depth explanation about why keys are necessary</a> if you're interested in learning more.</p>\n<h1>Extracting Components with Keys</h1>\n<p>Keys only make sense in the context of the surrounding array.</p>\n<p>For example, if you <a href=\"https://reactjs.org/docs/components-and-props.html#extracting-components\">extract</a> a <code>ListItem</code> component, you should keep the key on the <code>&#x3C;ListItem /></code> elements in the array rather than on the <code>&#x3C;li></code> element in the <code>ListItem</code> itself.</p>\n<p><strong>Example: Incorrect Key Usage</strong></p>\n<pre><code class=\"language-js\">function ListItem(props) {\n  const value = props.value;\n  return (\n    // Wrong! There is no need to specify the key here:    &#x3C;li key={value.toString()}>      {value}\n    &#x3C;/li>);\n}\n\nfunction NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>\n    // Wrong! The key should have been specified here:    &#x3C;ListItem value={number} />  );\n  return (\n    &#x3C;ul>      {listItems}\n    &#x3C;/ul>);\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(\n  &#x3C;NumberList numbers={numbers} />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><strong>Example: Correct Key Usage</strong></p>\n<pre><code class=\"language-js\">function ListItem(props) {\n  // Correct! There is no need to specify the key here:  return &#x3C;li>{props.value}&#x3C;/li>;}\n\nfunction NumberList(props) {\n  const numbers = props.numbers;\n  const listItems = numbers.map((number) =>\n    // Correct! Key should be specified inside the array.    &#x3C;ListItem key={number.toString()} value={number} />  );\n  return (\n    &#x3C;ul>      {listItems}\n    &#x3C;/ul>);\n}\n\nconst numbers = [1, 2, 3, 4, 5];\nReactDOM.render(\n  &#x3C;NumberList numbers={numbers} />,\n  document.getElementById('root')\n);\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/ZXeOGM?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/ZXeOGM?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>A good rule of thumb is that elements inside the <code>map()</code> call need keys.</p>\n<h1>Keys Must Only Be Unique Among Siblings</h1>\n<p>Keys used within arrays should be unique among their siblings. However, they don't need to be globally unique. We can use the same keys when we produce two different arrays:</p>\n<pre><code class=\"language-js\">function Blog(props) {\n    const sidebar = (\n        &#x3C;ul>\n            {' '}\n            {props.posts.map((post) => (\n                &#x3C;li key={post.id}> {post.title}&#x3C;/li>\n            ))}\n        &#x3C;/ul>\n    );\n    const content = props.posts.map((post) => (\n        &#x3C;div key={post.id}>\n            {' '}\n            &#x3C;h3>{post.title}&#x3C;/h3> &#x3C;p>{post.content}&#x3C;/p>{' '}\n        &#x3C;/div>\n    ));\n    return (\n        &#x3C;div>\n            {' '}\n            {sidebar} &#x3C;hr /> {content}{' '}\n        &#x3C;/div>\n    );\n}\n\nconst posts = [\n    { id: 1, title: 'Hello World', content: 'Welcome to learning React!' },\n    { id: 2, title: 'Installation', content: 'You can install React from npm.' }\n];\nReactDOM.render(&#x3C;Blog posts={posts} />, document.getElementById('root'));\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/NRZYGN?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/mdwyWWy?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/mdwyWWy?editors=0010\">https://codepen.io/bgoonz/pen/mdwyWWy?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/NRZYGN?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Keys serve as a hint to React but they don't get passed to your components. If you need the same value in your component, pass it explicitly as a prop with a different name:</p>\n<pre><code class=\"language-js\">const content = posts.map((post) => &#x3C;Post key={post.id} id={post.id} title={post.title} />);\n</code></pre>\n<p>With the example above, the <code>Post</code> component can read <code>props.id</code>, but not <code>props.key</code>.</p>\n<h1>Embedding map() in JSX</h1>\n<p>In the examples above we declared a separate <code>listItems</code> variable and included it in JSX:</p>\n<pre><code class=\"language-js\">function NumberList(props) {\n    const numbers = props.numbers;\n    const listItems = numbers.map((number) => &#x3C;ListItem key={number.toString()} value={number} />);\n    return &#x3C;ul> {listItems}&#x3C;/ul>;\n}\n</code></pre>\n<p>JSX allows <a href=\"https://reactjs.org/docs/introducing-jsx.html#embedding-expressions-in-jsx\">embedding any expression</a> in curly braces so we could inline the <code>map()</code> result:</p>\n<pre><code class=\"language-js\">function NumberList(props) {\n    const numbers = props.numbers;\n    return (\n        &#x3C;ul>\n            {' '}\n            {numbers.map((number) => (\n                &#x3C;ListItem key={number.toString()} value={number} />\n            ))}{' '}\n        &#x3C;/ul>\n    );\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/BLvYrB?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/JjJoWEw?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/JjJoWEw?editors=0010\">https://codepen.io/bgoonz/pen/JjJoWEw?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/BLvYrB?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Sometimes this results in clearer code, but this style can also be abused. Like in JavaScript, it is up to you to decide whether it is worth extracting a variable for readability. Keep in mind that if the <code>map()</code> body is too nested, it might be a good time to <a href=\"https://reactjs.org/docs/components-and-props.html#extracting-components\">extract a component</a>.</p>\n<h1><strong>Forms</strong></h1>\n<h1>HTML form elements work a bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name:</h1>\n<pre><code class=\"language-js\">&#x3C;form>\n    &#x3C;label>\n        Name:\n        &#x3C;input type=\"text\" name=\"name\" />\n    &#x3C;/label>\n    &#x3C;input type=\"submit\" value=\"Submit\" />\n&#x3C;/form>\n</code></pre>\n<p>This form has the default HTML form behavior of browsing to a new page when the user submits the form. If you want this behavior in React, it just works. But in most cases, it's convenient to have a JavaScript function that handles the submission of the form and has access to the data that the user entered into the form. The standard way to achieve this is with a technique called \"controlled components\".</p>\n<h1>Controlled Components</h1>\n<p>In HTML, form elements such as <code>&#x3C;input></code>, <code>&#x3C;textarea></code>, and <code>&#x3C;select></code> typically maintain their own state and update it based on user input. In React, mutable state is typically kept in the state property of components, and only updated with <code>[setState()](&#x3C;https://reactjs.org/docs/react-component.html#setstate>)</code>.</p>\n<p>We can combine the two by making the React state be the \"single source of truth\". Then the React component that renders a form also controls what happens in that form on subsequent user input. An input form element whose value is controlled by React in this way is called a \"controlled component\".</p>\n<p>For example, if we want to make the previous example log the name when it is submitted, we can write the form as a controlled component:</p>\n<pre><code class=\"language-js\">class NameForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { value: '' };\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n    }\n\n    handleChange(event) {\n        this.setState({ value: event.target.value });\n    }\n    handleSubmit(event) {\n        alert('A name was submitted: ' + this.state.value);\n        event.preventDefault();\n    }\n\n    render() {\n        return (\n            &#x3C;form onSubmit={this.handleSubmit}>\n                {' '}\n                &#x3C;label>\n                    {' '}\n                    Name:\n                    &#x3C;input type=\"text\" value={this.state.value} onChange={this.handleChange} />{' '}\n                &#x3C;/label> &#x3C;input type=\"submit\" value=\"Submit\" />{' '}\n            &#x3C;/form>\n        );\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/VmmPgp?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/rNwayjv?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/rNwayjv?editors=0010\">https://codepen.io/bgoonz/pen/rNwayjv?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/VmmPgp?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Since the <code>value</code> attribute is set on our form element, the displayed value will always be <code>this.state.value</code>, making the React state the source of truth. Since <code>handleChange</code> runs on every keystroke to update the React state, the displayed value will update as the user types.</p>\n<p>With a controlled component, the input's value is always driven by the React state. While this means you have to type a bit more code, you can now pass the value to other UI elements too, or reset it from other event handlers.</p>\n<h1>The textarea Tag</h1>\n<p>In HTML, a <code>&#x3C;textarea></code> element defines its text by its children:</p>\n<pre><code class=\"language-js\">&#x3C;textarea>Hello there, this is some text in a text area&#x3C;/textarea>\n</code></pre>\n<p>In React, a <code>&#x3C;textarea></code> uses a <code>value</code> attribute instead. This way, a form using a <code>&#x3C;textarea></code> can be written very similarly to a form that uses a single-line input:</p>\n<pre><code class=\"language-js\">class EssayForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { value: 'Please write an essay about your favorite DOM element.' };\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n    }\n\n    handleChange(event) {\n        this.setState({ value: event.target.value });\n    }\n    handleSubmit(event) {\n        alert('An essay was submitted: ' + this.state.value);\n        event.preventDefault();\n    }\n\n    render() {\n        return (\n            &#x3C;form onSubmit={this.handleSubmit}>\n                {' '}\n                &#x3C;label>\n                    {' '}\n                    Essay:\n                    &#x3C;textarea value={this.state.value} onChange={this.handleChange} />{' '}\n                &#x3C;/label> &#x3C;input type=\"submit\" value=\"Submit\" />{' '}\n            &#x3C;/form>\n        );\n    }\n}\n</code></pre>\n<p>Notice that <code>this.state.value</code> is initialized in the constructor, so that the text area starts off with some text in it.</p>\n<h1>The select Tag</h1>\n<p>In HTML, <code>&#x3C;select></code> creates a drop-down list. For example, this HTML creates a drop-down list of flavors:</p>\n<p><code>&#x3C;select>&#x3C;option value=\"grapefruit\">Grapefruit&#x3C;/option>&#x3C;option value=\"lime\">Lime&#x3C;/option>&#x3C;option selected value=\"coconut\">Coconut&#x3C;/option>&#x3C;option value=\"mango\">Mango&#x3C;/option>&#x3C;/select></code></p>\n<p>Note that the Coconut option is initially selected, because of the <code>selected</code> attribute. React, instead of using this <code>selected</code> attribute, uses a <code>value</code> attribute on the root <code>select</code> tag. This is more convenient in a controlled component because you only need to update it in one place. For example:</p>\n<pre><code class=\"language-js\">class FlavorForm extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = { value: 'coconut' };\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSubmit = this.handleSubmit.bind(this);\n    }\n\n    handleChange(event) {\n        this.setState({ value: event.target.value });\n    }\n    handleSubmit(event) {\n        alert('Your favorite flavor is: ' + this.state.value);\n        event.preventDefault();\n    }\n\n    render() {\n        return (\n            &#x3C;form onSubmit={this.handleSubmit}>\n                {' '}\n                &#x3C;label>\n                    {' '}\n                    Pick your favorite flavor:\n                    &#x3C;select value={this.state.value} onChange={this.handleChange}>\n                        {' '}\n                        &#x3C;option value=\"grapefruit\">Grapefruit&#x3C;/option> &#x3C;option value=\"lime\">Lime&#x3C;/option> &#x3C;option value=\"coconut\">Coconut&#x3C;/option> &#x3C;option value=\"mango\">\n                            Mango\n                        &#x3C;/option>{' '}\n                    &#x3C;/select>{' '}\n                &#x3C;/label> &#x3C;input type=\"submit\" value=\"Submit\" />{' '}\n            &#x3C;/form>\n        );\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/JbbEzX?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/JbbEzX?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Overall, this makes it so that <code>&#x3C;input type=\"text\"></code>, <code>&#x3C;textarea></code>, and <code>&#x3C;select></code> all work very similarly - they all accept a <code>value</code> attribute that you can use to implement a controlled component.</p>\n<blockquote>\n<p>NoteYou can pass an array into the value attribute, allowing you to select multiple options in a select tag:&#x3C;select multiple={true} value={['B', 'C']}></p>\n</blockquote>\n<h1>The file input Tag</h1>\n<p>In HTML, an <code>&#x3C;input type=\"file\"></code> lets the user choose one or more files from their device storage to be uploaded to a server or manipulated by JavaScript via the <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications\">File API</a>.</p>\n<p><code>&#x3C;input type=\"file\" /></code></p>\n<p>Because its value is read-only, it is an <strong>uncontrolled</strong> component in React. It is discussed together with other uncontrolled components <a href=\"https://reactjs.org/docs/uncontrolled-components.html#the-file-input-tag\">later in the documentation</a>.</p>\n<h1>Handling Multiple Inputs</h1>\n<p>When you need to handle multiple controlled <code>input</code> elements, you can add a <code>name</code> attribute to each element and let the handler function choose what to do based on the value of <code>event.target.name</code>.</p>\n<p>For example:</p>\n<pre><code class=\"language-js\">class Reservation extends React.Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            isGoing: true,\n            numberOfGuests: 2\n        };\n\n        this.handleInputChange = this.handleInputChange.bind(this);\n    }\n\n    handleInputChange(event) {\n        const target = event.target;\n        const value = target.type === 'checkbox' ? target.checked : target.value;\n        const name = target.name;\n        this.setState({\n            [name]: value\n        });\n    }\n\n    render() {\n        return (\n            &#x3C;form>\n                {' '}\n                &#x3C;label>\n                    {' '}\n                    Is going:\n                    &#x3C;input name=\"isGoing\" type=\"checkbox\" checked={this.state.isGoing} onChange={this.handleInputChange} />{' '}\n                &#x3C;/label> &#x3C;br /> &#x3C;label>\n                    {' '}\n                    Number of guests:\n                    &#x3C;input name=\"numberOfGuests\" type=\"number\" value={this.state.numberOfGuests} onChange={this.handleInputChange} />{' '}\n                &#x3C;/label>{' '}\n            &#x3C;/form>\n        );\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/wgedvV?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/wgedvV?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Note how we used the ES6 <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Object_initializer#Computed_property_names\">computed property name</a> syntax to update the state key corresponding to the given input name:</p>\n<pre><code class=\"language-js\">this.setState({\n    [name]: value\n});\n</code></pre>\n<p>It is equivalent to this ES5 code:</p>\n<pre><code class=\"language-js\">var partialState = {};\npartialState[name] = value;\nthis.setState(partialState);\n</code></pre>\n<p>Also, since <code>setState()</code> automatically <a href=\"https://reactjs.org/docs/state-and-lifecycle.html#state-updates-are-merged\">merges a partial state into the current state</a>, we only needed to call it with the changed parts.</p>\n<h1>Controlled Input Null Value</h1>\n<p>Specifying the value prop on a <a href=\"https://reactjs.org/docs/forms.html#controlled-components\">controlled component</a> prevents the user from changing the input unless you desire so. If you've specified a <code>value</code> but the input is still editable, you may have accidentally set <code>value</code> to <code>undefined</code> or <code>null</code>.</p>\n<p>The following code demonstrates this. (The input is locked at first but becomes editable after a short delay.)</p>\n<pre><code class=\"language-js\">ReactDOM.render(&#x3C;input value=\"hi\" />, mountNode);\n\nsetTimeout(function () {\n    ReactDOM.render(&#x3C;input value={null} />, mountNode);\n}, 1000);\n</code></pre>\n<h1>Alternatives to Controlled Components</h1>\n<p>It can sometimes be tedious to use controlled components, because you need to write an event handler for every way your data can change and pipe all of the input state through a React component. This can become particularly annoying when you are converting a preexisting codebase to React, or integrating a React application with a non-React library. In these situations, you might want to check out <a href=\"https://reactjs.org/docs/uncontrolled-components.html\">uncontrolled components</a>, an alternative technique for implementing input forms.</p>\n<h1>Fully-Fledged Solutions</h1>\n<p>If you're looking for a complete solution including validation, keeping track of the visited fields, and handling form submission, <a href=\"https://jaredpalmer.com/formik\">Formik</a> is one of the popular choices. However, it is built on the same principles of controlled components and managing state --- so don't neglect to learn them.</p>\n<h1><strong>Lifting State Up</strong></h1>\n<h1>Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor. Let's see how this works in action.</h1>\n<p>In this section, we will create a temperature calculator that calculates whether the water would boil at a given temperature.</p>\n<p>We will start with a component called <code>BoilingVerdict</code>. It accepts the <code>celsius</code> temperature as a prop, and prints whether it is enough to boil the water:</p>\n<pre><code class=\"language-js\">function BoilingVerdict(props) {\n    if (props.celsius >= 100) {\n        return &#x3C;p>The water would boil.&#x3C;/p>;\n    }\n    return &#x3C;p>The water would not boil.&#x3C;/p>;\n}\n</code></pre>\n<p>Next, we will create a component called <code>Calculator</code>. It renders an <code>&#x3C;input></code> that lets you enter the temperature, and keeps its value in <code>this.state.temperature</code>.</p>\n<p>Additionally, it renders the <code>BoilingVerdict</code> for the current input value.</p>\n<pre><code class=\"language-js\">class Calculator extends React.Component {\n    constructor(props) {\n        super(props);\n        this.handleChange = this.handleChange.bind(this);\n        this.state = { temperature: '' };\n    }\n\n    handleChange(e) {\n        this.setState({ temperature: e.target.value });\n    }\n\n    render() {\n        const temperature = this.state.temperature;\n        return (\n            &#x3C;fieldset>\n                {' '}\n                &#x3C;legend>Enter temperature in Celsius:&#x3C;/legend> &#x3C;input value={temperature} onChange={this.handleChange} /> &#x3C;BoilingVerdict\n                    celsius={parseFloat(temperature)}\n                />{' '}\n            &#x3C;/fieldset>\n        );\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/ZXeOBm?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/zYzxZoL?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/zYzxZoL?editors=0010\">https://codepen.io/bgoonz/pen/zYzxZoL?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/ZXeOBm?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<h1>Adding a Second Input</h1>\n<p>Our new requirement is that, in addition to a Celsius input, we provide a Fahrenheit input, and they are kept in sync.</p>\n<p>We can start by extracting a <code>TemperatureInput</code> component from <code>Calculator</code>. We will add a new <code>scale</code> prop to it that can either be <code>\"c\"</code> or <code>\"f\"</code>:</p>\n<pre><code class=\"language-js\">const scaleNames = { c: 'Celsius', f: 'Fahrenheit' };\nclass TemperatureInput extends React.Component {\n    constructor(props) {\n        super(props);\n        this.handleChange = this.handleChange.bind(this);\n        this.state = { temperature: '' };\n    }\n\n    handleChange(e) {\n        this.setState({ temperature: e.target.value });\n    }\n\n    render() {\n        const temperature = this.state.temperature;\n        const scale = this.props.scale;\n        return (\n            &#x3C;fieldset>\n                {' '}\n                &#x3C;legend>Enter temperature in {scaleNames[scale]}:&#x3C;/legend> &#x3C;input value={temperature} onChange={this.handleChange} />{' '}\n            &#x3C;/fieldset>\n        );\n    }\n}\n</code></pre>\n<p>We can now change the <code>Calculator</code> to render two separate temperature inputs:</p>\n<pre><code class=\"language-js\">class Calculator extends React.Component {\n    render() {\n        return (\n            &#x3C;div>\n                {' '}\n                &#x3C;TemperatureInput scale=\"c\" /> &#x3C;TemperatureInput scale=\"f\" />{' '}\n            &#x3C;/div>\n        );\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/jGBryx?editors=0010\">Try it on CodePen</a></strong></p>\n<p><a href=\"https://codepen.io/bgoonz/pen/QWgwpGv?editors=0010\"></a><a href=\"https://codepen.io/bgoonz/pen/QWgwpGv?editors=0010\">https://codepen.io/bgoonz/pen/QWgwpGv?editors=0010</a></p>\n<iframe src=\"https://codepen.io/gaearon/pen/jGBryx?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>We have two inputs now, but when you enter the temperature in one of them, the other doesn't update. This contradicts our requirement: we want to keep them in sync.</p>\n<p>We also can't display the <code>BoilingVerdict</code> from <code>Calculator</code>. The <code>Calculator</code> doesn't know the current temperature because it is hidden inside the <code>TemperatureInput</code>.</p>\n<h1>Writing Conversion Functions</h1>\n<p>First, we will write two functions to convert from Celsius to Fahrenheit and back:</p>\n<pre><code class=\"language-js\">function toCelsius(fahrenheit) {\n    return ((fahrenheit - 32) * 5) / 9;\n}\n\nfunction toFahrenheit(celsius) {\n    return (celsius * 9) / 5 + 32;\n}\n</code></pre>\n<p>These two functions convert numbers. We will write another function that takes a string <code>temperature</code> and a converter function as arguments and returns a string. We will use it to calculate the value of one input based on the other input.</p>\n<p>It returns an empty string on an invalid <code>temperature</code>, and it keeps the output rounded to the third decimal place:</p>\n<pre><code class=\"language-js\">function tryConvert(temperature, convert) {\n    const input = parseFloat(temperature);\n    if (Number.isNaN(input)) {\n        return '';\n    }\n    const output = convert(input);\n    const rounded = Math.round(output * 1000) / 1000;\n    return rounded.toString();\n}\n</code></pre>\n<p>For example, <code>tryConvert('abc', toCelsius)</code> returns an empty string, and <code>tryConvert('10.22', toFahrenheit)</code> returns <code>'50.396'</code>.</p>\n<h1>Lifting State Up</h1>\n<p>Currently, both <code>TemperatureInput</code> components independently keep their values in the local state:</p>\n<pre><code class=\"language-js\">class TemperatureInput extends React.Component {\n  constructor(props) {\n    super(props);\n    this.handleChange = this.handleChange.bind(this);\n    this.state = {temperature: ''};  }\n\n  handleChange(e) {\n    this.setState({temperature: e.target.value});  }\n\n  render() {\n    const temperature = this.state.temperature;    // ...\n</code></pre>\n<p>However, we want these two inputs to be in sync with each other. When we update the Celsius input, the Fahrenheit input should reflect the converted temperature, and vice versa.</p>\n<p>In React, sharing state is accomplished by moving it up to the closest common ancestor of the components that need it. This is called \"lifting state up\". We will remove the local state from the <code>TemperatureInput</code> and move it into the <code>Calculator</code> instead.</p>\n<p>If the <code>Calculator</code> owns the shared state, it becomes the \"source of truth\" for the current temperature in both inputs. It can instruct them both to have values that are consistent with each other. Since the props of both <code>TemperatureInput</code> components are coming from the same parent <code>Calculator</code> component, the two inputs will always be in sync.</p>\n<p>Let's see how this works step by step.</p>\n<p>First, we will replace <code>this.state.temperature</code> with <code>this.props.temperature</code> in the <code>TemperatureInput</code> component. For now, let's pretend <code>this.props.temperature</code> already exists, although we will need to pass it from the <code>Calculator</code> in the future:</p>\n<pre><code class=\"language-js\">  render() {\n    // Before: const temperature = this.state.temperature;\n    const temperature = this.props.temperature;    // ...\n</code></pre>\n<p>We know that <a href=\"https://reactjs.org/docs/components-and-props.html#props-are-read-only\">props are read-only</a>. When the <code>temperature</code> was in the local state, the <code>TemperatureInput</code> could just call <code>this.setState()</code> to change it. However, now that the <code>temperature</code> is coming from the parent as a prop, the <code>TemperatureInput</code> has no control over it.</p>\n<p>In React, this is usually solved by making a component \"controlled\". Just like the DOM <code>&#x3C;input></code> accepts both a <code>value</code> and an <code>onChange</code> prop, so can the custom <code>TemperatureInput</code> accept both <code>temperature</code> and <code>onTemperatureChange</code> props from its parent <code>Calculator</code>.</p>\n<p>Now, when the <code>TemperatureInput</code> wants to update its temperature, it calls <code>this.props.onTemperatureChange</code>:</p>\n<pre><code class=\"language-js\">  handleChange(e) {\n    // Before: this.setState({temperature: e.target.value});\n    this.props.onTemperatureChange(e.target.value);    // ...\n</code></pre>\n<blockquote>\n<p>Note:There is no special meaning to either temperature or onTemperatureChange prop names in custom components. We could have called them anything else, like name them value and onChange which is a common convention.</p>\n</blockquote>\n<p>The <code>onTemperatureChange</code> prop will be provided together with the <code>temperature</code> prop by the parent <code>Calculator</code> component. It will handle the change by modifying its own local state, thus re-rendering both inputs with the new values. We will look at the new <code>Calculator</code> implementation very soon.</p>\n<p>Before diving into the changes in the <code>Calculator</code>, let's recap our changes to the <code>TemperatureInput</code> component. We have removed the local state from it, and instead of reading <code>this.state.temperature</code>, we now read <code>this.props.temperature</code>. Instead of calling <code>this.setState()</code> when we want to make a change, we now call <code>this.props.onTemperatureChange()</code>, which will be provided by the <code>Calculator</code>:</p>\n<pre><code class=\"language-js\">class TemperatureInput extends React.Component {\n    constructor(props) {\n        super(props);\n        this.handleChange = this.handleChange.bind(this);\n    }\n\n    handleChange(e) {\n        this.props.onTemperatureChange(e.target.value);\n    }\n\n    render() {\n        const temperature = this.props.temperature;\n        const scale = this.props.scale;\n        return (\n            &#x3C;fieldset>\n                {' '}\n                &#x3C;legend>Enter temperature in {scaleNames[scale]}:&#x3C;/legend> &#x3C;input value={temperature} onChange={this.handleChange} />{' '}\n            &#x3C;/fieldset>\n        );\n    }\n}\n</code></pre>\n<p>Now let's turn to the <code>Calculator</code> component.</p>\n<p>We will store the current input's <code>temperature</code> and <code>scale</code> in its local state. This is the state we \"lifted up\" from the inputs, and it will serve as the \"source of truth\" for both of them. It is the minimal representation of all the data we need to know in order to render both inputs.</p>\n<p>For example, if we enter 37 into the Celsius input, the state of the <code>Calculator</code> component will be:</p>\n<pre><code class=\"language-js\">{\n  temperature: '37',\n  scale: 'c'\n}\n</code></pre>\n<p>If we later edit the Fahrenheit field to be 212, the state of the <code>Calculator</code> will be:</p>\n<pre><code class=\"language-js\">{\n  temperature: '212',\n  scale: 'f'\n}\n</code></pre>\n<p>We could have stored the value of both inputs but it turns out to be unnecessary. It is enough to store the value of the most recently changed input, and the scale that it represents. We can then infer the value of the other input based on the current <code>temperature</code> and <code>scale</code> alone.</p>\n<p>The inputs stay in sync because their values are computed from the same state:</p>\n<pre><code class=\"language-js\">class Calculator extends React.Component {\n  constructor(props) {\n    super(props);\n    this.handleCelsiusChange = this.handleCelsiusChange.bind(this);\n    this.handleFahrenheitChange = this.handleFahrenheitChange.bind(this);\n    this.state = {temperature: '', scale: 'c'};  }\n\n  handleCelsiusChange(temperature) {\n    this.setState({scale: 'c', temperature});  }\n\n  handleFahrenheitChange(temperature) {\n    this.setState({scale: 'f', temperature});  }\n\n  render() {\n    const scale = this.state.scale;    const temperature = this.state.temperature;    const celsius = scale === 'f' ? tryConvert(temperature, toCelsius) : temperature;    const fahrenheit = scale === 'c' ? tryConvert(temperature, toFahrenheit) : temperature;return (\n      &#x3C;div>        &#x3C;TemperatureInputscale=\"c\"          temperature={celsius}          onTemperatureChange={this.handleCelsiusChange} />        &#x3C;TemperatureInputscale=\"f\"          temperature={fahrenheit}          onTemperatureChange={this.handleFahrenheitChange} />        &#x3C;BoilingVerdict          celsius={parseFloat(celsius)} />      &#x3C;/div>);\n  }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/WZpxpz?editors=0010\">Try it on CodePen</a></strong></p>\n<iframe src=\"https://codepen.io/gaearon/pen/WZpxpz?editors=0010\" height=\"900px\" width=\"100%\"> </iframe>\n<p>Now, no matter which input you edit, <code>this.state.temperature</code> and <code>this.state.scale</code> in the <code>Calculator</code> get updated. One of the inputs gets the value as is, so any user input is preserved, and the other input value is always recalculated based on it.</p>\n<p>Let's recap what happens when you edit an input:</p>\n<ul>\n<li>React calls the function specified as <code>onChange</code> on the DOM <code>&#x3C;input></code>. In our case, this is the <code>handleChange</code> method in the <code>TemperatureInput</code> component.</li>\n<li>The <code>handleChange</code> method in the <code>TemperatureInput</code> component calls <code>this.props.onTemperatureChange()</code> with the new desired value. Its props, including <code>onTemperatureChange</code>, were provided by its parent component, the <code>Calculator</code>.</li>\n<li>When it previously rendered, the <code>Calculator</code> had specified that <code>onTemperatureChange</code> of the Celsius <code>TemperatureInput</code> is the <code>Calculator</code>'s <code>handleCelsiusChange</code> method, and <code>onTemperatureChange</code> of the Fahrenheit <code>TemperatureInput</code> is the <code>Calculator</code>'s <code>handleFahrenheitChange</code> method. So either of these two <code>Calculator</code> methods gets called depending on which input we edited.</li>\n<li>Inside these methods, the <code>Calculator</code> component asks React to re-render itself by calling <code>this.setState()</code> with the new input value and the current scale of the input we just edited.</li>\n<li>React calls the <code>Calculator</code> component's <code>render</code> method to learn what the UI should look like. The values of both inputs are recomputed based on the current temperature and the active scale. The temperature conversion is performed here.</li>\n<li>React calls the <code>render</code> methods of the individual <code>TemperatureInput</code> components with their new props specified by the <code>Calculator</code>. It learns what their UI should look like.</li>\n<li>React calls the <code>render</code> method of the <code>BoilingVerdict</code> component, passing the temperature in Celsius as its props.</li>\n<li>React DOM updates the DOM with the boiling verdict and to match the desired input values. The input we just edited receives its current value, and the other input is updated to the temperature after conversion.</li>\n</ul>\n<p>Every update goes through the same steps so the inputs stay in sync.</p>\n<h1>Lessons Learned</h1>\n<p>There should be a single \"source of truth\" for any data that changes in a React application. Usually, the state is first added to the component that needs it for rendering. Then, if other components also need it, you can lift it up to their closest common ancestor. Instead of trying to sync the state between different components, you should rely on the <a href=\"https://reactjs.org/docs/state-and-lifecycle.html#the-data-flows-down\">top-down data flow</a>.</p>\n<p>Lifting state involves writing more \"boilerplate\" code than two-way binding approaches, but as a benefit, it takes less work to find and isolate bugs. Since any state \"lives\" in some component and that component alone can change it, the surface area for bugs is greatly reduced. Additionally, you can implement any custom logic to reject or transform user input.</p>\n<p>If something can be derived from either props or state, it probably shouldn't be in the state. For example, instead of storing both <code>celsiusValue</code> and <code>fahrenheitValue</code>, we store just the last edited <code>temperature</code> and its <code>scale</code>. The value of the other input can always be calculated from them in the <code>render()</code> method. This lets us clear or apply rounding to the other field without losing any precision in the user input.</p>\n<p>When you see something wrong in the UI, you can use <a href=\"https://github.com/facebook/react/tree/main/packages/react-devtools\">React Developer Tools</a> to inspect the props and move up the tree until you find the component responsible for updating the state. This lets you trace the bugs to their source:</p>\n<p><img src=\"https://reactjs.org/ef94afc3447d75cdc245c77efb0d63be/react-devtools-state.gif\" alt=\"https://reactjs.org/ef94afc3447d75cdc245c77efb0d63be/react-devtools-state.gif\"></p>\n<h1><strong>Composition vs Inheritance</strong></h1>\n<h1>React has a powerful composition model, and we recommend using composition instead of inheritance to reuse code between components.</h1>\n<p>In this section, we will consider a few problems where developers new to React often reach for inheritance, and show how we can solve them with composition.</p>\n<h1>Containment</h1>\n<p>Some components don't know their children ahead of time. This is especially common for components like <code>Sidebar</code> or <code>Dialog</code> that represent generic \"boxes\".</p>\n<p>We recommend that such components use the special <code>children</code> prop to pass children elements directly into their output:</p>\n<pre><code class=\"language-js\">function FancyBorder(props) {\n    return &#x3C;div className={'FancyBorder FancyBorder-' + props.color}> {props.children} &#x3C;/div>;\n}\n</code></pre>\n<p>This lets other components pass arbitrary children to them by nesting the JSX:</p>\n<pre><code class=\"language-js\">function WelcomeDialog() {\n    return (\n        &#x3C;FancyBorder color=\"blue\">\n            {' '}\n            &#x3C;h1 className=\"Dialog-title\"> Welcome &#x3C;/h1> &#x3C;p className=\"Dialog-message\"> Thank you for visiting our spacecraft! &#x3C;/p>{' '}\n        &#x3C;/FancyBorder>\n    );\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/ozqNOV?editors=0010\">Try it on CodePen</a></strong></p>\n<p>Anything inside the <code>&#x3C;FancyBorder></code> JSX tag gets passed into the <code>FancyBorder</code> component as a <code>children</code> prop. Since <code>FancyBorder</code> renders <code>{props.children}</code> inside a <code>&#x3C;div></code>, the passed elements appear in the final output.</p>\n<p>While this is less common, sometimes you might need multiple \"holes\" in a component. In such cases you may come up with your own convention instead of using <code>children</code>:</p>\n<pre><code class=\"language-js\">function SplitPane(props) {\n  return (\n    &#x3C;div className=\"SplitPane\">      &#x3C;div className=\"SplitPane-left\">        {props.left}      &#x3C;/div>      &#x3C;div className=\"SplitPane-right\">        {props.right}      &#x3C;/div>    &#x3C;/div>);\n}\n\nfunction App() {\n  return (\n    &#x3C;SplitPaneleft={\n        &#x3C;Contacts />      }right={\n        &#x3C;Chat />      } />);\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/gwZOJp?editors=0010\">Try it on CodePen</a></strong></p>\n<p>React elements like <code>&#x3C;Contacts /></code> and <code>&#x3C;Chat /></code> are just objects, so you can pass them as props like any other data. This approach may remind you of \"slots\" in other libraries but there are no limitations on what you can pass as props in React.</p>\n<h1>Specialization</h1>\n<p>Sometimes we think about components as being \"special cases\" of other components. For example, we might say that a <code>WelcomeDialog</code> is a special case of <code>Dialog</code>.</p>\n<p>In React, this is also achieved by composition, where a more \"specific\" component renders a more \"generic\" one and configures it with props:</p>\n<pre><code class=\"language-js\">function Dialog(props) {\n    return (\n        &#x3C;FancyBorder color=\"blue\">\n            {' '}\n            &#x3C;h1 className=\"Dialog-title\"> {props.title} &#x3C;/h1> &#x3C;p className=\"Dialog-message\"> {props.message} &#x3C;/p>{' '}\n        &#x3C;/FancyBorder>\n    );\n}\n\nfunction WelcomeDialog() {\n    return &#x3C;Dialog title=\"Welcome\" message=\"Thank you for visiting our spacecraft!\" />;\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/kkEaOZ?editors=0010\">Try it on CodePen</a></strong></p>\n<p>Composition works equally well for components defined as classes:</p>\n<pre><code class=\"language-js\">function Dialog(props) {\n    return (\n        &#x3C;FancyBorder color=\"blue\">\n            {' '}\n            &#x3C;h1 className=\"Dialog-title\"> {props.title}&#x3C;/h1> &#x3C;p className=\"Dialog-message\"> {props.message}&#x3C;/p> {props.children}{' '}\n        &#x3C;/FancyBorder>\n    );\n}\n\nclass SignUpDialog extends React.Component {\n    constructor(props) {\n        super(props);\n        this.handleChange = this.handleChange.bind(this);\n        this.handleSignUp = this.handleSignUp.bind(this);\n        this.state = { login: '' };\n    }\n\n    render() {\n        return (\n            &#x3C;Dialog title=\"Mars Exploration Program\" message=\"How should we refer to you?\">\n                {' '}\n                &#x3C;input value={this.state.login} onChange={this.handleChange} /> &#x3C;button onClick={this.handleSignUp}> Sign Me Up! &#x3C;/button>{' '}\n            &#x3C;/Dialog>\n        );\n    }\n\n    handleChange(e) {\n        this.setState({ login: e.target.value });\n    }\n\n    handleSignUp() {\n        alert(`Welcome aboard, ${this.state.login}!`);\n    }\n}\n</code></pre>\n<p><strong><a href=\"https://codepen.io/gaearon/pen/gwZbYa?editors=0010\">Try it on CodePen</a></strong></p>\n<h1>So What About Inheritance?</h1>\n<p>At Facebook, we use React in thousands of components, and we haven't found any use cases where we would recommend creating component inheritance hierarchies.</p>\n<p>Props and composition give you all the flexibility you need to customize a component's look and behavior in an explicit and safe way. Remember that components may accept arbitrary props, including primitive values, React elements, or functions.</p>\n<p>If you want to reuse non-UI functionality between components, we suggest extracting it into a separate JavaScript module. The components may import it and use that function, object, or a class, without extending it.</p>\n<h1><strong>Thinking in React</strong></h1>\n<h1>React is, in our opinion, the premier way to build big, fast Web apps with JavaScript. It has scaled very well for us at Facebook and Instagram.</h1>\n<p>One of the many great parts of React is how it makes you think about apps as you build them. In this document, we'll walk you through the thought process of building a searchable product data table using React.</p>\n<h1>Start With A Mock</h1>\n<p>Imagine that we already have a JSON API and a mock from our designer. The mock looks like this:</p>\n<p><img src=\"https://reactjs.org/static/1071fbcc9eed01fddc115b41e193ec11/d4770/thinking-in-react-mock.png\" alt=\"https://reactjs.org/static/1071fbcc9eed01fddc115b41e193ec11/d4770/thinking-in-react-mock.png\"></p>\n<p>Our JSON API returns some data that looks like this:</p>\n<pre><code class=\"language-js\">[\n    { category: 'Sporting Goods', price: '$49.99', stocked: true, name: 'Football' },\n    { category: 'Sporting Goods', price: '$9.99', stocked: true, name: 'Baseball' },\n    { category: 'Sporting Goods', price: '$29.99', stocked: false, name: 'Basketball' },\n    { category: 'Electronics', price: '$99.99', stocked: true, name: 'iPod Touch' },\n    { category: 'Electronics', price: '$399.99', stocked: false, name: 'iPhone 5' },\n    { category: 'Electronics', price: '$199.99', stocked: true, name: 'Nexus 7' }\n];\n</code></pre>\n<h1>Step 1: Break The UI Into A Component Hierarchy</h1>\n<p>The first thing you'll want to do is to draw boxes around every component (and subcomponent) in the mock and give them all names. If you're working with a designer, they may have already done this, so go talk to them! Their Photoshop layer names may end up being the names of your React components!</p>\n<p>But how do you know what should be its own component? Use the same techniques for deciding if you should create a new function or object. One such technique is the <a href=\"https://en.wikipedia.org/wiki/Single_responsibility_principle\">single responsibility principle</a>, that is, a component should ideally only do one thing. If it ends up growing, it should be decomposed into smaller subcomponents.</p>\n<p>Since you're often displaying a JSON data model to a user, you'll find that if your model was built correctly, your UI (and therefore your component structure) will map nicely. That's because UI and data models tend to adhere to the same <em>information architecture</em>. Separate your UI into components, where each component matches one piece of your data model.</p>\n<p><img src=\"https://reactjs.org/static/eb8bda25806a89ebdc838813bdfa3601/6b2ea/thinking-in-react-components.png\" alt=\"https://reactjs.org/static/eb8bda25806a89ebdc838813bdfa3601/6b2ea/thinking-in-react-components.png\"></p>\n<p>You'll see here that we have five components in our app. We've italicized the data each component represents.</p>\n<ol>\n<li><strong><code>FilterableProductTable</code> (orange):</strong> contains the entirety of the example</li>\n<li><strong><code>SearchBar</code> (blue):</strong> receives all <em>user input</em></li>\n<li><strong><code>ProductTable</code> (green):</strong> displays and filters the <em>data collection</em> based on <em>user input</em></li>\n<li><strong><code>ProductCategoryRow</code> (turquoise):</strong> displays a heading for each <em>category</em></li>\n<li><strong><code>ProductRow</code> (red):</strong> displays a row for each <em>product</em></li>\n</ol>\n<p>If you look at <code>ProductTable</code>, you'll see that the table header (containing the \"Name\" and \"Price\" labels) isn't its own component. This is a matter of preference, and there's an argument to be made either way. For this example, we left it as part of <code>ProductTable</code> because it is part of rendering the <em>data collection</em> which is <code>ProductTable</code>'s responsibility. However, if this header grows to be complex (e.g., if we were to add affordances for sorting), it would certainly make sense to make this its own <code>ProductTableHeader</code> component.</p>\n<p>Now that we've identified the components in our mock, let's arrange them into a hierarchy. Components that appear within another component in the mock should appear as a child in the hierarchy:</p>\n<ul>\n<li>\n<p><code>FilterableProductTable</code></p>\n<ul>\n<li><code>SearchBar</code></li>\n<li>\n<p><code>ProductTable</code></p>\n<ul>\n<li><code>ProductCategoryRow</code></li>\n<li><code>ProductRow</code></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h1>Step 2: Build A Static Version in React</h1>\n<p>See the Pen <a href=\"https://codepen.io/gaearon/pen/BwWzwm\">Thinking In React: Step 2</a> on <a href=\"https://codepen.io/\">CodePen</a>.</p>\n<p>Now that you have your component hierarchy, it's time to implement your app. The easiest way is to build a version that takes your data model and renders the UI but has no interactivity. It's best to decouple these processes because building a static version requires a lot of typing and no thinking, and adding interactivity requires a lot of thinking and not a lot of typing. We'll see why.</p>\n<p>To build a static version of your app that renders your data model, you'll want to build components that reuse other components and pass data using <em>props</em>. <em>props</em> are a way of passing data from parent to child. If you're familiar with the concept of <em>state</em>, <strong>don't use state at all</strong> to build this static version. State is reserved only for interactivity, that is, data that changes over time. Since this is a static version of the app, you don't need it.</p>\n<p>You can build top-down or bottom-up. That is, you can either start with building the components higher up in the hierarchy (i.e. starting with <code>FilterableProductTable</code>) or with the ones lower in it (<code>ProductRow</code>). In simpler examples, it's usually easier to go top-down, and on larger projects, it's easier to go bottom-up and write tests as you build.</p>\n<p>At the end of this step, you'll have a library of reusable components that render your data model. The components will only have <code>render()</code> methods since this is a static version of your app. The component at the top of the hierarchy (<code>FilterableProductTable</code>) will take your data model as a prop. If you make a change to your underlying data model and call <code>ReactDOM.render()</code> again, the UI will be updated. You can see how your UI is updated and where to make changes. React's <strong>one-way data flow</strong> (also called <em>one-way binding</em>) keeps everything modular and fast.</p>\n<p>Refer to the <a href=\"https://reactjs.org/docs/\">React docs</a> if you need help executing this step.</p>\n<h1>A Brief Interlude: Props vs State</h1>\n<p>There are two types of \"model\" data in React: props and state. It's important to understand the distinction between the two; skim <a href=\"https://reactjs.org/docs/state-and-lifecycle.html\">the official React docs</a> if you aren't sure what the difference is. See also <a href=\"https://reactjs.org/docs/faq-state.html#what-is-the-difference-between-state-and-props\">FAQ: What is the difference between state and props?</a></p>\n<h1>Step 3: Identify The Minimal (but complete) Representation Of UI State</h1>\n<p>To make your UI interactive, you need to be able to trigger changes to your underlying data model. React achieves this with <strong>state</strong>.</p>\n<p>To build your app correctly, you first need to think of the minimal set of mutable state that your app needs. The key here is <a href=\"https://en.wikipedia.org/wiki/Don%27t_repeat_yourself\">DRY: <em>Don't Repeat Yourself</em></a>. Figure out the absolute minimal representation of the state your application needs and compute everything else you need on-demand. For example, if you're building a TODO list, keep an array of the TODO items around; don't keep a separate state variable for the count. Instead, when you want to render the TODO count, take the length of the TODO items array.</p>\n<p>Think of all the pieces of data in our example application. We have:</p>\n<ul>\n<li>The original list of products</li>\n<li>The search text the user has entered</li>\n<li>The value of the checkbox</li>\n<li>The filtered list of products</li>\n</ul>\n<p>Let's go through each one and figure out which one is state. Ask three questions about each piece of data:</p>\n<ol>\n<li>Is it passed in from a parent via props? If so, it probably isn't state.</li>\n<li>Does it remain unchanged over time? If so, it probably isn't state.</li>\n<li>Can you compute it based on any other state or props in your component? If so, it isn't state.</li>\n</ol>\n<p>The original list of products is passed in as props, so that's not state. The search text and the checkbox seem to be state since they change over time and can't be computed from anything. And finally, the filtered list of products isn't state because it can be computed by combining the original list of products with the search text and value of the checkbox.</p>\n<p>So finally, our state is:</p>\n<ul>\n<li>The search text the user has entered</li>\n<li>The value of the checkbox</li>\n</ul>\n<h1>Step 4: Identify Where Your State Should Live</h1>\n<p>See the Pen <a href=\"https://codepen.io/gaearon/pen/qPrNQZ\">Thinking In React: Step 4</a> on <a href=\"https://codepen.io/\">CodePen</a>.</p>\n<p>OK, so we've identified what the minimal set of app state is. Next, we need to identify which component mutates, or <em>owns</em>, this state.</p>\n<p>Remember: React is all about one-way data flow down the component hierarchy. It may not be immediately clear which component should own what state. <strong>This is often the most challenging part for newcomers to understand,</strong> so follow these steps to figure it out:</p>\n<p>For each piece of state in your application:</p>\n<ul>\n<li>Identify every component that renders something based on that state.</li>\n<li>Find a common owner component (a single component above all the components that need the state in the hierarchy).</li>\n<li>Either the common owner or another component higher up in the hierarchy should own the state.</li>\n<li>If you can't find a component where it makes sense to own the state, create a new component solely for holding the state and add it somewhere in the hierarchy above the common owner component.</li>\n</ul>\n<p>Let's run through this strategy for our application:</p>\n<ul>\n<li><code>ProductTable</code> needs to filter the product list based on state and <code>SearchBar</code> needs to display the search text and checked state.</li>\n<li>The common owner component is <code>FilterableProductTable</code>.</li>\n<li>It conceptually makes sense for the filter text and checked value to live in <code>FilterableProductTable</code></li>\n</ul>\n<p>Cool, so we've decided that our state lives in <code>FilterableProductTable</code>. First, add an instance property <code>this.state = {filterText: '', inStockOnly: false}</code> to <code>FilterableProductTable</code>'s <code>constructor</code> to reflect the initial state of your application. Then, pass <code>filterText</code> and <code>inStockOnly</code> to <code>ProductTable</code> and <code>SearchBar</code> as a prop. Finally, use these props to filter the rows in <code>ProductTable</code> and set the values of the form fields in <code>SearchBar</code>.</p>\n<p>You can start seeing how your application will behave: set <code>filterText</code> to <code>\"ball\"</code> and refresh your app. You'll see that the data table is updated correctly.</p>\n<h1>Step 5: Add Inverse Data Flow</h1>\n<p>See the Pen <a href=\"https://codepen.io/gaearon/pen/LzWZvb\">Thinking In React: Step 5</a> on <a href=\"https://codepen.io/\">CodePen</a>.</p>\n<p>So far, we've built an app that renders correctly as a function of props and state flowing down the hierarchy. Now it's time to support data flowing the other way: the form components deep in the hierarchy need to update the state in <code>FilterableProductTable</code>.</p>\n<p>React makes this data flow explicit to help you understand how your program works, but it does require a little more typing than traditional two-way data binding.</p>\n<p>If you try to type or check the box in the current version of the example, you'll see that React ignores your input. This is intentional, as we've set the <code>value</code> prop of the <code>input</code> to always be equal to the <code>state</code> passed in from <code>FilterableProductTable</code>.</p>\n<p>Let's think about what we want to happen. We want to make sure that whenever the user changes the form, we update the state to reflect the user input. Since components should only update their own state, <code>FilterableProductTable</code> will pass callbacks to <code>SearchBar</code> that will fire whenever the state should be updated. We can use the <code>onChange</code> event on the inputs to be notified of it. The callbacks passed by <code>FilterableProductTable</code> will call <code>setState()</code>, and the app will be updated.</p>\n<h1>And That's It</h1>\n<p>Hopefully, this gives you an idea of how to think about building components and applications with React. While it may be a little more typing than you're used to, remember that code is read far more than it's written, and it's less difficult to read this modular, explicit code. As you start to build large libraries of components, you'll appreciate this explicitness and modularity, and with code reuse, your lines of code will start to shrink. :)</p>\n<p><a href=\"https://www.notion.so/Advanced-Content-fbe1ec3ca3544951b5763b051b843949\">Advanced Content</a></p>\n<p><a href=\"https://www.notion.so/React-Component-3dc17bc49a8e4d7e89efcc1281e747d9\">React Component</a></p>"},{"url":"/docs/reference/awesome-lists/","relativePath":"docs/reference/awesome-lists.md","relativeDir":"docs/reference","base":"awesome-lists.md","name":"awesome-lists","frontmatter":{"title":"Awesome Lists","weight":0,"excerpt":"this is an awesome list of awesome lists","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Awesome Lists:</h2>\n<iframe src=\"https://search-awesome.vercel.app/\" height=\"1000px\" width=\"1400px\" scrolling=\"yes\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"  frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n<ul>\n<li><a href=\"https://github.com/sindresorhus/awesome-nodejs\"><strong>sindresorhus/awesome-nodejs</strong></a></li>\n<li><a href=\"https://github.com/bcoe/awesome-cross-platform-nodejs\"><strong>bcoe/awesome-cross-platform-nodejs</strong></a></li>\n<li><a href=\"https://github.com/dypsilon/frontend-dev-bookmarks\"><strong>dypsilon/frontend-dev-bookmarks</strong></a></li>\n<li><a href=\"https://github.com/vsouza/awesome-ios\"><strong>vsouza/awesome-ios</strong></a></li>\n<li><a href=\"https://github.com/JStumpp/awesome-android\"><strong>JStumpp/awesome-android</strong></a></li>\n<li><a href=\"https://github.com/weblancaster/awesome-IoT-hybrid\"><strong>weblancaster/awesome-IoT-hybrid</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-electron\"><strong>sindresorhus/awesome-electron</strong></a></li>\n<li><a href=\"https://github.com/busterc/awesome-cordova\"><strong>busterc/awesome-cordova</strong></a></li>\n<li><a href=\"https://github.com/jondot/awesome-react-native\"><strong>jondot/awesome-react-native</strong></a></li>\n<li><a href=\"https://github.com/XamSome/awesome-xamarin\"><strong>XamSome/awesome-xamarin</strong></a></li>\n<li><a href=\"https://github.com/inputsh/awesome-linux\"><strong>inputsh/awesome-linux</strong></a></li>\n<li><a href=\"https://github.com/Friz-zy/awesome-linux-containers\"><strong>Friz-zy/awesome-linux-containers</strong></a></li>\n<li><a href=\"https://github.com/zoidbergwill/awesome-ebpf\"><strong>zoidbergwill/awesome-ebpf</strong></a></li>\n<li><a href=\"https://github.com/PandaFoss/Awesome-Arch\"><strong>PandaFoss/Awesome-Arch</strong></a></li>\n<li><a href=\"https://github.com/iCHAIT/awesome-macOS\"><strong>iCHAIT/awesome-macOS</strong></a></li>\n<li><a href=\"https://github.com/herrbischoff/awesome-macos-command-line\"><strong>herrbischoff/awesome-macos-command-line</strong></a></li>\n<li><a href=\"https://github.com/agarrharr/awesome-macos-screensavers\"><strong>agarrharr/awesome-macos-screensavers</strong></a></li>\n<li><a href=\"https://github.com/jaywcjlove/awesome-mac\"><strong>jaywcjlove/awesome-mac</strong></a></li>\n<li><a href=\"https://github.com/serhii-londar/open-source-mac-os-apps\"><strong>serhii-londar/open-source-mac-os-apps</strong></a></li>\n<li><a href=\"https://github.com/yenchenlin/awesome-watchos\"><strong>yenchenlin/awesome-watchos</strong></a></li>\n<li><a href=\"https://github.com/deephacks/awesome-jvm\"><strong>deephacks/awesome-jvm</strong></a></li>\n<li><a href=\"https://github.com/mailtoharshit/awesome-salesforce\"><strong>mailtoharshit/awesome-salesforce</strong></a></li>\n<li><a href=\"https://github.com/donnemartin/awesome-aws\"><strong>donnemartin/awesome-aws</strong></a></li>\n<li><a href=\"https://github.com/Awesome-Windows/Awesome\"><strong>Awesome-Windows/Awesome</strong></a></li>\n<li><a href=\"https://github.com/ipfs/awesome-ipfs\"><strong>ipfs/awesome-ipfs</strong></a></li>\n<li><a href=\"https://github.com/fuse-compound/awesome-fuse\"><strong>fuse-compound/awesome-fuse</strong></a></li>\n<li><a href=\"https://github.com/ianstormtaylor/awesome-heroku\"><strong>ianstormtaylor/awesome-heroku</strong></a></li>\n<li><a href=\"https://github.com/thibmaek/awesome-raspberry-pi\"><strong>thibmaek/awesome-raspberry-pi</strong></a></li>\n<li><a href=\"https://github.com/JesseTG/awesome-qt\"><strong>JesseTG/awesome-qt</strong></a></li>\n<li><a href=\"https://github.com/fregante/Awesome-WebExtensions\"><strong>fregante/Awesome-WebExtensions</strong></a></li>\n<li><a href=\"https://github.com/motion-open-source/awesome-rubymotion\"><strong>motion-open-source/awesome-rubymotion</strong></a></li>\n<li><a href=\"https://github.com/vitalets/awesome-smart-tv\"><strong>vitalets/awesome-smart-tv</strong></a></li>\n<li><a href=\"https://github.com/Kazhnuz/awesome-gnome\"><strong>Kazhnuz/awesome-gnome</strong></a></li>\n<li><a href=\"https://github.com/francoism90/awesome-kde\"><strong>francoism90/awesome-kde</strong></a></li>\n<li><a href=\"https://github.com/quozd/awesome-dotnet\"><strong>quozd/awesome-dotnet</strong></a></li>\n<li><a href=\"https://github.com/thangchung/awesome-dotnet-core\"><strong>thangchung/awesome-dotnet-core</strong></a></li>\n<li><a href=\"https://github.com/ironcev/awesome-roslyn\"><strong>ironcev/awesome-roslyn</strong></a></li>\n<li><a href=\"https://github.com/miguelmota/awesome-amazon-alexa\"><strong>miguelmota/awesome-amazon-alexa</strong></a></li>\n<li><a href=\"https://github.com/jonleibowitz/awesome-digitalocean\"><strong>jonleibowitz/awesome-digitalocean</strong></a></li>\n<li><a href=\"https://github.com/Solido/awesome-flutter\"><strong>Solido/awesome-flutter</strong></a></li>\n<li><a href=\"https://github.com/frenck/awesome-home-assistant\"><strong>frenck/awesome-home-assistant</strong></a></li>\n<li><a href=\"https://github.com/victorshinya/awesome-ibmcloud\"><strong>victorshinya/awesome-ibmcloud</strong></a></li>\n<li><a href=\"https://github.com/jthegedus/awesome-firebase\"><strong>jthegedus/awesome-firebase</strong></a></li>\n<li><a href=\"https://github.com/fkromer/awesome-ros2\"><strong>fkromer/awesome-ros2</strong></a></li>\n<li><a href=\"https://github.com/adafruit/awesome-adafruitio\"><strong>adafruit/awesome-adafruitio</strong></a></li>\n<li><a href=\"https://github.com/irazasyed/awesome-cloudflare\"><strong>irazasyed/awesome-cloudflare</strong></a></li>\n<li><a href=\"https://github.com/ravirupareliya/awesome-actions-on-google\"><strong>ravirupareliya/awesome-actions-on-google</strong></a></li>\n<li><a href=\"https://github.com/agucova/awesome-esp\"><strong>agucova/awesome-esp</strong></a></li>\n<li><a href=\"https://github.com/denolib/awesome-deno\"><strong>denolib/awesome-deno</strong></a></li>\n<li><a href=\"https://github.com/balintkissdev/awesome-dos\"><strong>balintkissdev/awesome-dos</strong></a></li>\n<li><a href=\"https://github.com/nix-community/awesome-nix\"><strong>nix-community/awesome-nix</strong></a></li>\n<li><a href=\"https://github.com/sorrycc/awesome-javascript\"><strong>sorrycc/awesome-javascript</strong></a></li>\n<li><a href=\"https://github.com/wbinnssmith/awesome-promises\"><strong>wbinnssmith/awesome-promises</strong></a></li>\n<li><a href=\"https://github.com/standard/awesome-standard\"><strong>standard/awesome-standard</strong></a></li>\n<li><a href=\"https://github.com/bolshchikov/js-must-watch\"><strong>bolshchikov/js-must-watch</strong></a></li>\n<li><a href=\"https://github.com/loverajoel/jstips\"><strong>loverajoel/jstips</strong></a></li>\n<li><a href=\"https://github.com/Kikobeats/awesome-network-js\"><strong>Kikobeats/awesome-network-js</strong></a></li>\n<li><a href=\"https://github.com/parro-it/awesome-micro-npm-packages\"><strong>parro-it/awesome-micro-npm-packages</strong></a></li>\n<li><a href=\"https://github.com/feross/awesome-mad-science\"><strong>feross/awesome-mad-science</strong></a></li>\n<li><a href=\"https://github.com/maxogden/maintenance-modules\"><strong>maxogden/maintenance-modules</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-npm\"><strong>sindresorhus/awesome-npm</strong></a></li>\n<li><a href=\"https://github.com/avajs/awesome-ava\"><strong>avajs/awesome-ava</strong></a></li>\n<li><a href=\"https://github.com/dustinspecker/awesome-eslint\"><strong>dustinspecker/awesome-eslint</strong></a></li>\n<li><a href=\"https://github.com/stoeffel/awesome-fp-js\"><strong>stoeffel/awesome-fp-js</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-observables\"><strong>sindresorhus/awesome-observables</strong></a></li>\n<li><a href=\"https://github.com/RyanZim/awesome-npm-scripts\"><strong>RyanZim/awesome-npm-scripts</strong></a></li>\n<li><a href=\"https://github.com/30-seconds/30-seconds-of-code\"><strong>30-seconds/30-seconds-of-code</strong></a></li>\n<li><a href=\"https://github.com/Richienb/awesome-ponyfills\"><strong>Richienb/awesome-ponyfills</strong></a></li>\n<li><a href=\"https://github.com/matteocrippa/awesome-swift\"><strong>matteocrippa/awesome-swift</strong></a></li>\n<li><a href=\"https://github.com/hsavit1/Awesome-Swift-Education\"><strong>hsavit1/Awesome-Swift-Education</strong></a></li>\n<li><a href=\"https://github.com/uraimo/Awesome-Swift-Playgrounds\"><strong>uraimo/Awesome-Swift-Playgrounds</strong></a></li>\n<li><a href=\"https://github.com/vinta/awesome-python\"><strong>vinta/awesome-python</strong></a></li>\n<li><a href=\"https://github.com/timofurrer/awesome-asyncio\"><strong>timofurrer/awesome-asyncio</strong></a></li>\n<li><a href=\"https://github.com/faroit/awesome-python-scientific-audio\"><strong>faroit/awesome-python-scientific-audio</strong></a></li>\n<li><a href=\"https://github.com/adafruit/awesome-circuitpython\"><strong>adafruit/awesome-circuitpython</strong></a></li>\n<li><a href=\"https://github.com/krzjoa/awesome-python-data-science\"><strong>krzjoa/awesome-python-data-science</strong></a></li>\n<li><a href=\"https://github.com/typeddjango/awesome-python-typing\"><strong>typeddjango/awesome-python-typing</strong></a></li>\n<li><a href=\"https://github.com/mcauser/awesome-micropython\"><strong>mcauser/awesome-micropython</strong></a></li>\n<li><a href=\"https://github.com/rust-unofficial/awesome-rust\"><strong>rust-unofficial/awesome-rust</strong></a></li>\n<li><a href=\"https://github.com/krispo/awesome-haskell\"><strong>krispo/awesome-haskell</strong></a></li>\n<li><a href=\"https://github.com/passy/awesome-purescript\"><strong>passy/awesome-purescript</strong></a></li>\n<li><a href=\"https://github.com/avelino/awesome-go\"><strong>avelino/awesome-go</strong></a></li>\n<li><a href=\"https://github.com/lauris/awesome-scala\"><strong>lauris/awesome-scala</strong></a></li>\n<li><a href=\"https://github.com/tindzk/awesome-scala-native\"><strong>tindzk/awesome-scala-native</strong></a></li>\n<li><a href=\"https://github.com/markets/awesome-ruby\"><strong>markets/awesome-ruby</strong></a></li>\n<li><a href=\"https://github.com/razum2um/awesome-clojure\"><strong>razum2um/awesome-clojure</strong></a></li>\n<li><a href=\"https://github.com/hantuzun/awesome-clojurescript\"><strong>hantuzun/awesome-clojurescript</strong></a></li>\n<li><a href=\"https://github.com/h4cc/awesome-elixir\"><strong>h4cc/awesome-elixir</strong></a></li>\n<li><a href=\"https://github.com/sporto/awesome-elm\"><strong>sporto/awesome-elm</strong></a></li>\n<li><a href=\"https://github.com/drobakowski/awesome-erlang\"><strong>drobakowski/awesome-erlang</strong></a></li>\n<li><a href=\"https://github.com/svaksha/Julia.jl\"><strong>svaksha/Julia.jl</strong></a></li>\n<li><a href=\"https://github.com/LewisJEllis/awesome-lua\"><strong>LewisJEllis/awesome-lua</strong></a></li>\n<li><a href=\"https://github.com/inputsh/awesome-c\"><strong>inputsh/awesome-c</strong></a></li>\n<li><a href=\"https://github.com/fffaraz/awesome-cpp\"><strong>fffaraz/awesome-cpp</strong></a></li>\n<li><a href=\"https://github.com/qinwf/awesome-R\"><strong>qinwf/awesome-R</strong></a></li>\n<li><a href=\"https://github.com/iamericfletcher/awesome-r-learning-resources\"><strong>iamericfletcher/awesome-r-learning-resources</strong></a></li>\n<li><a href=\"https://github.com/dlang-community/awesome-d\"><strong>dlang-community/awesome-d</strong></a></li>\n<li><a href=\"https://github.com/CodyReichert/awesome-cl\"><strong>CodyReichert/awesome-cl</strong></a></li>\n<li><a href=\"https://github.com/GustavBertram/awesome-common-lisp-learning\"><strong>GustavBertram/awesome-common-lisp-learning</strong></a></li>\n<li><a href=\"https://github.com/hachiojipm/awesome-perl\"><strong>hachiojipm/awesome-perl</strong></a></li>\n<li><a href=\"https://github.com/kdabir/awesome-groovy\"><strong>kdabir/awesome-groovy</strong></a></li>\n<li><a href=\"https://github.com/yissachar/awesome-dart\"><strong>yissachar/awesome-dart</strong></a></li>\n<li><a href=\"https://github.com/akullpp/awesome-java\"><strong>akullpp/awesome-java</strong></a></li>\n<li><a href=\"https://github.com/eleventigers/awesome-rxjava\"><strong>eleventigers/awesome-rxjava</strong></a></li>\n<li><a href=\"https://github.com/KotlinBy/awesome-kotlin\"><strong>KotlinBy/awesome-kotlin</strong></a></li>\n<li><a href=\"https://github.com/ocaml-community/awesome-ocaml\"><strong>ocaml-community/awesome-ocaml</strong></a></li>\n<li><a href=\"https://github.com/seancoyne/awesome-coldfusion\"><strong>seancoyne/awesome-coldfusion</strong></a></li>\n<li><a href=\"https://github.com/rabbiabram/awesome-fortran\"><strong>rabbiabram/awesome-fortran</strong></a></li>\n<li><a href=\"https://github.com/ziadoz/awesome-php\"><strong>ziadoz/awesome-php</strong></a></li>\n<li><a href=\"https://github.com/jakoch/awesome-composer\"><strong>jakoch/awesome-composer</strong></a></li>\n<li><a href=\"https://github.com/Fr0sT-Brutal/awesome-pascal\"><strong>Fr0sT-Brutal/awesome-pascal</strong></a></li>\n<li><a href=\"https://github.com/ahkscript/awesome-AutoHotkey\"><strong>ahkscript/awesome-AutoHotkey</strong></a></li>\n<li><a href=\"https://github.com/J2TeaM/awesome-AutoIt\"><strong>J2TeaM/awesome-AutoIt</strong></a></li>\n<li><a href=\"https://github.com/veelenga/awesome-crystal\"><strong>veelenga/awesome-crystal</strong></a></li>\n<li><a href=\"https://github.com/sfischer13/awesome-frege\"><strong>sfischer13/awesome-frege</strong></a></li>\n<li><a href=\"https://github.com/onqtam/awesome-cmake\"><strong>onqtam/awesome-cmake</strong></a></li>\n<li><a href=\"https://github.com/robinrodricks/awesome-actionscript3\"><strong>robinrodricks/awesome-actionscript3</strong></a></li>\n<li><a href=\"https://github.com/sfischer13/awesome-eta\"><strong>sfischer13/awesome-eta</strong></a></li>\n<li><a href=\"https://github.com/joaomilho/awesome-idris\"><strong>joaomilho/awesome-idris</strong></a></li>\n<li><a href=\"https://github.com/ohenley/awesome-ada\"><strong>ohenley/awesome-ada</strong></a></li>\n<li><a href=\"https://github.com/ebraminio/awesome-qsharp\"><strong>ebraminio/awesome-qsharp</strong></a></li>\n<li><a href=\"https://github.com/koolamusic/awesome-imba\"><strong>koolamusic/awesome-imba</strong></a></li>\n<li><a href=\"https://github.com/desiderantes/awesome-vala\"><strong>desiderantes/awesome-vala</strong></a></li>\n<li><a href=\"https://github.com/coq-community/awesome-coq\"><strong>coq-community/awesome-coq</strong></a></li>\n<li><a href=\"https://github.com/vlang/awesome-v\"><strong>vlang/awesome-v</strong></a></li>\n<li><a href=\"https://github.com/addyosmani/es6-tools\"><strong>addyosmani/es6-tools</strong></a></li>\n<li><a href=\"https://github.com/davidsonfellipe/awesome-wpo\"><strong>davidsonfellipe/awesome-wpo</strong></a></li>\n<li><a href=\"https://github.com/lvwzhen/tools\"><strong>lvwzhen/tools</strong></a></li>\n<li><a href=\"https://github.com/awesome-css-group/awesome-css\"><strong>awesome-css-group/awesome-css</strong></a></li>\n<li><a href=\"https://github.com/addyosmani/critical-path-css-tools\"><strong>addyosmani/critical-path-css-tools</strong></a></li>\n<li><a href=\"https://github.com/davidtheclark/scalable-css-reading-list\"><strong>davidtheclark/scalable-css-reading-list</strong></a></li>\n<li><a href=\"https://github.com/AllThingsSmitty/must-watch-css\"><strong>AllThingsSmitty/must-watch-css</strong></a></li>\n<li><a href=\"https://github.com/AllThingsSmitty/css-protips\"><strong>AllThingsSmitty/css-protips</strong></a></li>\n<li><a href=\"https://github.com/troxler/awesome-css-frameworks\"><strong>troxler/awesome-css-frameworks</strong></a></li>\n<li><a href=\"https://github.com/enaqx/awesome-react\"><strong>enaqx/awesome-react</strong></a></li>\n<li><a href=\"https://github.com/expede/awesome-relay\"><strong>expede/awesome-relay</strong></a></li>\n<li><a href=\"https://github.com/glauberfc/awesome-react-hooks\"><strong>glauberfc/awesome-react-hooks</strong></a></li>\n<li><a href=\"https://github.com/mateusortiz/webcomponents-the-right-way\"><strong>mateusortiz/webcomponents-the-right-way</strong></a></li>\n<li><a href=\"https://github.com/Granze/awesome-polymer\"><strong>Granze/awesome-polymer</strong></a></li>\n<li><a href=\"https://github.com/PatrickJS/awesome-angular\"><strong>PatrickJS/awesome-angular</strong></a></li>\n<li><a href=\"https://github.com/sadcitizen/awesome-backbone\"><strong>sadcitizen/awesome-backbone</strong></a></li>\n<li><a href=\"https://github.com/diegocard/awesome-html5\"><strong>diegocard/awesome-html5</strong></a></li>\n<li><a href=\"https://github.com/willianjusten/awesome-svg\"><strong>willianjusten/awesome-svg</strong></a></li>\n<li><a href=\"https://github.com/raphamorim/awesome-canvas\"><strong>raphamorim/awesome-canvas</strong></a></li>\n<li><a href=\"https://github.com/dnbard/awesome-knockout\"><strong>dnbard/awesome-knockout</strong></a></li>\n<li><a href=\"https://github.com/petk/awesome-dojo\"><strong>petk/awesome-dojo</strong></a></li>\n<li><a href=\"https://github.com/NoahBuscher/Inspire\"><strong>NoahBuscher/Inspire</strong></a></li>\n<li><a href=\"https://github.com/ember-community-russia/awesome-ember\"><strong>ember-community-russia/awesome-ember</strong></a></li>\n<li><a href=\"https://github.com/wasabeef/awesome-android-ui\"><strong>wasabeef/awesome-android-ui</strong></a></li>\n<li><a href=\"https://github.com/cjwirth/awesome-ios-ui\"><strong>cjwirth/awesome-ios-ui</strong></a></li>\n<li><a href=\"https://github.com/Urigo/awesome-meteor\"><strong>Urigo/awesome-meteor</strong></a></li>\n<li><a href=\"https://github.com/sturobson/BEM-resources\"><strong>sturobson/BEM-resources</strong></a></li>\n<li><a href=\"https://github.com/afonsopacifer/awesome-flexbox\"><strong>afonsopacifer/awesome-flexbox</strong></a></li>\n<li><a href=\"https://github.com/deanhume/typography\"><strong>deanhume/typography</strong></a></li>\n<li><a href=\"https://github.com/brunopulis/awesome-a11y\"><strong>brunopulis/awesome-a11y</strong></a></li>\n<li><a href=\"https://github.com/sachin1092/awesome-material\"><strong>sachin1092/awesome-material</strong></a></li>\n<li><a href=\"https://github.com/wbkd/awesome-d3\"><strong>wbkd/awesome-d3</strong></a></li>\n<li><a href=\"https://github.com/jonathandion/awesome-emails\"><strong>jonathandion/awesome-emails</strong></a></li>\n<li><a href=\"https://github.com/petk/awesome-jquery\"><strong>petk/awesome-jquery</strong></a></li>\n<li><a href=\"https://github.com/AllThingsSmitty/jquery-tips-everyone-should-know\"><strong>AllThingsSmitty/jquery-tips-everyone-should-know</strong></a></li>\n<li><a href=\"https://github.com/notthetup/awesome-webaudio\"><strong>notthetup/awesome-webaudio</strong></a></li>\n<li><a href=\"https://github.com/pazguille/offline-first\"><strong>pazguille/offline-first</strong></a></li>\n<li><a href=\"https://github.com/agarrharr/awesome-static-website-services\"><strong>agarrharr/awesome-static-website-services</strong></a></li>\n<li><a href=\"https://github.com/cyclejs-community/awesome-cyclejs\"><strong>cyclejs-community/awesome-cyclejs</strong></a></li>\n<li><a href=\"https://github.com/dok/awesome-text-editing\"><strong>dok/awesome-text-editing</strong></a></li>\n<li><a href=\"https://github.com/fliptheweb/motion-ui-design\"><strong>fliptheweb/motion-ui-design</strong></a></li>\n<li><a href=\"https://github.com/vuejs/awesome-vue\"><strong>vuejs/awesome-vue</strong></a></li>\n<li><a href=\"https://github.com/sadcitizen/awesome-marionette\"><strong>sadcitizen/awesome-marionette</strong></a></li>\n<li><a href=\"https://github.com/aurelia-contrib/awesome-aurelia\"><strong>aurelia-contrib/awesome-aurelia</strong></a></li>\n<li><a href=\"https://github.com/zingchart/awesome-charting\"><strong>zingchart/awesome-charting</strong></a></li>\n<li><a href=\"https://github.com/candelibas/awesome-ionic\"><strong>candelibas/awesome-ionic</strong></a></li>\n<li><a href=\"https://github.com/ChromeDevTools/awesome-chrome-devtools\"><strong>ChromeDevTools/awesome-chrome-devtools</strong></a></li>\n<li><a href=\"https://github.com/jdrgomes/awesome-postcss\"><strong>jdrgomes/awesome-postcss</strong></a></li>\n<li><a href=\"https://github.com/nikgraf/awesome-draft-js\"><strong>nikgraf/awesome-draft-js</strong></a></li>\n<li><a href=\"https://github.com/TalAter/awesome-service-workers\"><strong>TalAter/awesome-service-workers</strong></a></li>\n<li><a href=\"https://github.com/TalAter/awesome-progressive-web-apps\"><strong>TalAter/awesome-progressive-web-apps</strong></a></li>\n<li><a href=\"https://github.com/choojs/awesome-choo\"><strong>choojs/awesome-choo</strong></a></li>\n<li><a href=\"https://github.com/brillout/awesome-redux\"><strong>brillout/awesome-redux</strong></a></li>\n<li><a href=\"https://github.com/webpack-contrib/awesome-webpack\"><strong>webpack-contrib/awesome-webpack</strong></a></li>\n<li><a href=\"https://github.com/browserify/awesome-browserify\"><strong>browserify/awesome-browserify</strong></a></li>\n<li><a href=\"https://github.com/Famolus/awesome-sass\"><strong>Famolus/awesome-sass</strong></a></li>\n<li><a href=\"https://github.com/websemantics/awesome-ant-design\"><strong>websemantics/awesome-ant-design</strong></a></li>\n<li><a href=\"https://github.com/LucasBassetti/awesome-less\"><strong>LucasBassetti/awesome-less</strong></a></li>\n<li><a href=\"https://github.com/sjfricke/awesome-webgl\"><strong>sjfricke/awesome-webgl</strong></a></li>\n<li><a href=\"https://github.com/preactjs/awesome-preact\"><strong>preactjs/awesome-preact</strong></a></li>\n<li><a href=\"https://github.com/jbmoelker/progressive-enhancement-resources\"><strong>jbmoelker/progressive-enhancement-resources</strong></a></li>\n<li><a href=\"https://github.com/unicodeveloper/awesome-nextjs\"><strong>unicodeveloper/awesome-nextjs</strong></a></li>\n<li><a href=\"https://github.com/web-padawan/awesome-lit-html\"><strong>web-padawan/awesome-lit-html</strong></a></li>\n<li><a href=\"https://github.com/automata/awesome-jamstack\"><strong>automata/awesome-jamstack</strong></a></li>\n<li><a href=\"https://github.com/henrikwirth/awesome-wordpress-gatsby\"><strong>henrikwirth/awesome-wordpress-gatsby</strong></a></li>\n<li><a href=\"https://github.com/myshov/awesome-mobile-web-development\"><strong>myshov/awesome-mobile-web-development</strong></a></li>\n<li><a href=\"https://github.com/lauthieb/awesome-storybook\"><strong>lauthieb/awesome-storybook</strong></a></li>\n<li><a href=\"https://github.com/AdrienTorris/awesome-blazor\"><strong>AdrienTorris/awesome-blazor</strong></a></li>\n<li><a href=\"https://github.com/csabapalfi/awesome-pagespeed-metrics\"><strong>csabapalfi/awesome-pagespeed-metrics</strong></a></li>\n<li><a href=\"https://github.com/aniftyco/awesome-tailwindcss\"><strong>aniftyco/awesome-tailwindcss</strong></a></li>\n<li><a href=\"https://github.com/seed-rs/awesome-seed-rs\"><strong>seed-rs/awesome-seed-rs</strong></a></li>\n<li><a href=\"https://github.com/pajaydev/awesome-web-performance-budget\"><strong>pajaydev/awesome-web-performance-budget</strong></a></li>\n<li><a href=\"https://github.com/sergey-pimenov/awesome-web-animation\"><strong>sergey-pimenov/awesome-web-animation</strong></a></li>\n<li><a href=\"https://github.com/jetli/awesome-yew\"><strong>jetli/awesome-yew</strong></a></li>\n<li><a href=\"https://github.com/nadunindunil/awesome-material-ui\"><strong>nadunindunil/awesome-material-ui</strong></a></li>\n<li><a href=\"https://github.com/componently-com/awesome-building-blocks-for-web-apps\"><strong>componently-com/awesome-building-blocks-for-web-apps</strong></a></li>\n<li><a href=\"https://github.com/TheComputerM/awesome-svelte\"><strong>TheComputerM/awesome-svelte</strong></a></li>\n<li><a href=\"https://github.com/klaufel/awesome-design-systems\"><strong>klaufel/awesome-design-systems</strong></a></li>\n<li><a href=\"https://github.com/innocenzi/awesome-inertiajs\"><strong>innocenzi/awesome-inertiajs</strong></a></li>\n<li><a href=\"https://github.com/mdbootstrap/awesome-mdbootstrap\"><strong>mdbootstrap/awesome-mdbootstrap</strong></a></li>\n<li><a href=\"https://github.com/mjhea0/awesome-flask\"><strong>mjhea0/awesome-flask</strong></a></li>\n<li><a href=\"https://github.com/veggiemonk/awesome-docker\"><strong>veggiemonk/awesome-docker</strong></a></li>\n<li><a href=\"https://github.com/iJackUA/awesome-vagrant\"><strong>iJackUA/awesome-vagrant</strong></a></li>\n<li><a href=\"https://github.com/uralbash/awesome-pyramid\"><strong>uralbash/awesome-pyramid</strong></a></li>\n<li><a href=\"https://github.com/PerfectCarl/awesome-play1\"><strong>PerfectCarl/awesome-play1</strong></a></li>\n<li><a href=\"https://github.com/friendsofcake/awesome-cakephp\"><strong>friendsofcake/awesome-cakephp</strong></a></li>\n<li><a href=\"https://github.com/sitepoint-editors/awesome-symfony\"><strong>sitepoint-editors/awesome-symfony</strong></a></li>\n<li><a href=\"https://github.com/pehapkari/awesome-symfony-education\"><strong>pehapkari/awesome-symfony-education</strong></a></li>\n<li><a href=\"https://github.com/chiraggude/awesome-laravel\"><strong>chiraggude/awesome-laravel</strong></a></li>\n<li><a href=\"https://github.com/fukuball/Awesome-Laravel-Education\"><strong>fukuball/Awesome-Laravel-Education</strong></a></li>\n<li><a href=\"https://github.com/blade-ui-kit/awesome-tall-stack\"><strong>blade-ui-kit/awesome-tall-stack</strong></a></li>\n<li><a href=\"https://github.com/gramantin/awesome-rails\"><strong>gramantin/awesome-rails</strong></a></li>\n<li><a href=\"https://github.com/hothero/awesome-rails-gem\"><strong>hothero/awesome-rails-gem</strong></a></li>\n<li><a href=\"https://github.com/phalcon/awesome-phalcon\"><strong>phalcon/awesome-phalcon</strong></a></li>\n<li><a href=\"https://github.com/phanan/htaccess\"><strong>phanan/htaccess</strong></a></li>\n<li><a href=\"https://github.com/fcambus/nginx-resources\"><strong>fcambus/nginx-resources</strong></a></li>\n<li><a href=\"https://github.com/stve/awesome-dropwizard\"><strong>stve/awesome-dropwizard</strong></a></li>\n<li><a href=\"https://github.com/ramitsurana/awesome-kubernetes\"><strong>ramitsurana/awesome-kubernetes</strong></a></li>\n<li><a href=\"https://github.com/unicodeveloper/awesome-lumen\"><strong>unicodeveloper/awesome-lumen</strong></a></li>\n<li><a href=\"https://github.com/pmuens/awesome-serverless\"><strong>pmuens/awesome-serverless</strong></a></li>\n<li><a href=\"https://github.com/PhantomYdn/awesome-wicket\"><strong>PhantomYdn/awesome-wicket</strong></a></li>\n<li><a href=\"https://github.com/vert-x3/vertx-awesome\"><strong>vert-x3/vertx-awesome</strong></a></li>\n<li><a href=\"https://github.com/shuaibiyy/awesome-terraform\"><strong>shuaibiyy/awesome-terraform</strong></a></li>\n<li><a href=\"https://github.com/Cellane/awesome-vapor\"><strong>Cellane/awesome-vapor</strong></a></li>\n<li><a href=\"https://github.com/ucg8j/awesome-dash\"><strong>ucg8j/awesome-dash</strong></a></li>\n<li><a href=\"https://github.com/mjhea0/awesome-fastapi\"><strong>mjhea0/awesome-fastapi</strong></a></li>\n<li><a href=\"https://github.com/kolomied/awesome-cdk\"><strong>kolomied/awesome-cdk</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-iam\"><strong>kdeldycke/awesome-iam</strong></a></li>\n<li><a href=\"https://github.com/prakhar1989/awesome-courses\"><strong>prakhar1989/awesome-courses</strong></a></li>\n<li><a href=\"https://github.com/academic/awesome-datascience\"><strong>academic/awesome-datascience</strong></a></li>\n<li><a href=\"https://github.com/siboehm/awesome-learn-datascience\"><strong>siboehm/awesome-learn-datascience</strong></a></li>\n<li><a href=\"https://github.com/josephmisiti/awesome-machine-learning\"><strong>josephmisiti/awesome-machine-learning</strong></a></li>\n<li><a href=\"https://github.com/ujjwalkarn/Machine-Learning-Tutorials\"><strong>ujjwalkarn/Machine-Learning-Tutorials</strong></a></li>\n<li><a href=\"https://github.com/arbox/machine-learning-with-ruby\"><strong>arbox/machine-learning-with-ruby</strong></a></li>\n<li><a href=\"https://github.com/likedan/Awesome-CoreML-Models\"><strong>likedan/Awesome-CoreML-Models</strong></a></li>\n<li><a href=\"https://github.com/h2oai/awesome-h2o\"><strong>h2oai/awesome-h2o</strong></a></li>\n<li><a href=\"https://github.com/SE-ML/awesome-seml\"><strong>SE-ML/awesome-seml</strong></a></li>\n<li><a href=\"https://github.com/georgezouq/awesome-ai-in-finance\"><strong>georgezouq/awesome-ai-in-finance</strong></a></li>\n<li><a href=\"https://github.com/n2cholas/awesome-jax\"><strong>n2cholas/awesome-jax</strong></a></li>\n<li><a href=\"https://github.com/altamiracorp/awesome-xai\"><strong>altamiracorp/awesome-xai</strong></a></li>\n<li><a href=\"https://github.com/edobashira/speech-language-processing\"><strong>edobashira/speech-language-processing</strong></a></li>\n<li><a href=\"https://github.com/dav009/awesome-spanish-nlp\"><strong>dav009/awesome-spanish-nlp</strong></a></li>\n<li><a href=\"https://github.com/arbox/nlp-with-ruby\"><strong>arbox/nlp-with-ruby</strong></a></li>\n<li><a href=\"https://github.com/seriousran/awesome-qa\"><strong>seriousran/awesome-qa</strong></a></li>\n<li><a href=\"https://github.com/tokenmill/awesome-nlg\"><strong>tokenmill/awesome-nlg</strong></a></li>\n<li><a href=\"https://github.com/theimpossibleastronaut/awesome-linguistics\"><strong>theimpossibleastronaut/awesome-linguistics</strong></a></li>\n<li><a href=\"https://github.com/sobolevn/awesome-cryptography\"><strong>sobolevn/awesome-cryptography</strong></a></li>\n<li><a href=\"https://github.com/pFarb/awesome-crypto-papers\"><strong>pFarb/awesome-crypto-papers</strong></a></li>\n<li><a href=\"https://github.com/jbhuang0604/awesome-computer-vision\"><strong>jbhuang0604/awesome-computer-vision</strong></a></li>\n<li><a href=\"https://github.com/ChristosChristofidis/awesome-deep-learning\"><strong>ChristosChristofidis/awesome-deep-learning</strong></a></li>\n<li><a href=\"https://github.com/jtoy/awesome-tensorflow\"><strong>jtoy/awesome-tensorflow</strong></a></li>\n<li><a href=\"https://github.com/aaronhma/awesome-tensorflow-js\"><strong>aaronhma/awesome-tensorflow-js</strong></a></li>\n<li><a href=\"https://github.com/margaretmz/awesome-tensorflow-lite\"><strong>margaretmz/awesome-tensorflow-lite</strong></a></li>\n<li><a href=\"https://github.com/terryum/awesome-deep-learning-papers\"><strong>terryum/awesome-deep-learning-papers</strong></a></li>\n<li><a href=\"https://github.com/guillaume-chevalier/awesome-deep-learning-resources\"><strong>guillaume-chevalier/awesome-deep-learning-resources</strong></a></li>\n<li><a href=\"https://github.com/kjw0612/awesome-deep-vision\"><strong>kjw0612/awesome-deep-vision</strong></a></li>\n<li><a href=\"https://github.com/ossu/computer-science\"><strong>ossu/computer-science</strong></a></li>\n<li><a href=\"https://github.com/lucasviola/awesome-functional-programming\"><strong>lucasviola/awesome-functional-programming</strong></a></li>\n<li><a href=\"https://github.com/dspinellis/awesome-msr\"><strong>dspinellis/awesome-msr</strong></a></li>\n<li><a href=\"https://github.com/analysis-tools-dev/static-analysis\"><strong>analysis-tools-dev/static-analysis</strong></a></li>\n<li><a href=\"https://github.com/harpribot/awesome-information-retrieval\"><strong>harpribot/awesome-information-retrieval</strong></a></li>\n<li><a href=\"https://github.com/desireevl/awesome-quantum-computing\"><strong>desireevl/awesome-quantum-computing</strong></a></li>\n<li><a href=\"https://github.com/mostafatouny/awesome-theoretical-computer-science\"><strong>mostafatouny/awesome-theoretical-computer-science</strong></a></li>\n<li><a href=\"https://github.com/onurakpolat/awesome-bigdata\"><strong>onurakpolat/awesome-bigdata</strong></a></li>\n<li><a href=\"https://github.com/awesomedata/awesome-public-datasets\"><strong>awesomedata/awesome-public-datasets</strong></a></li>\n<li><a href=\"https://github.com/youngwookim/awesome-hadoop\"><strong>youngwookim/awesome-hadoop</strong></a></li>\n<li><a href=\"https://github.com/igorbarinov/awesome-data-engineering\"><strong>igorbarinov/awesome-data-engineering</strong></a></li>\n<li><a href=\"https://github.com/manuzhang/awesome-streaming\"><strong>manuzhang/awesome-streaming</strong></a></li>\n<li><a href=\"https://github.com/awesome-spark/awesome-spark\"><strong>awesome-spark/awesome-spark</strong></a></li>\n<li><a href=\"https://github.com/ambster-public/awesome-qlik\"><strong>ambster-public/awesome-qlik</strong></a></li>\n<li><a href=\"https://github.com/sduff/awesome-splunk\"><strong>sduff/awesome-splunk</strong></a></li>\n<li><a href=\"https://github.com/papers-we-love/papers-we-love\"><strong>papers-we-love/papers-we-love</strong></a></li>\n<li><a href=\"https://github.com/JanVanRyswyck/awesome-talks\"><strong>JanVanRyswyck/awesome-talks</strong></a></li>\n<li><a href=\"https://github.com/tayllan/awesome-algorithms\"><strong>tayllan/awesome-algorithms</strong></a></li>\n<li><a href=\"https://github.com/gaerae/awesome-algorithms-education\"><strong>gaerae/awesome-algorithms-education</strong></a></li>\n<li><a href=\"https://github.com/enjalot/algovis\"><strong>enjalot/algovis</strong></a></li>\n<li><a href=\"https://github.com/owainlewis/awesome-artificial-intelligence\"><strong>owainlewis/awesome-artificial-intelligence</strong></a></li>\n<li><a href=\"https://github.com/marcobiedermann/search-engine-optimization\"><strong>marcobiedermann/search-engine-optimization</strong></a></li>\n<li><a href=\"https://github.com/lnishan/awesome-competitive-programming\"><strong>lnishan/awesome-competitive-programming</strong></a></li>\n<li><a href=\"https://github.com/rossant/awesome-math\"><strong>rossant/awesome-math</strong></a></li>\n<li><a href=\"https://github.com/passy/awesome-recursion-schemes\"><strong>passy/awesome-recursion-schemes</strong></a></li>\n<li><a href=\"https://github.com/EbookFoundation/free-programming-books\"><strong>EbookFoundation/free-programming-books</strong></a></li>\n<li><a href=\"https://github.com/dariubs/GoBooks\"><strong>dariubs/GoBooks</strong></a></li>\n<li><a href=\"https://github.com/RomanTsegelskyi/rbooks\"><strong>RomanTsegelskyi/rbooks</strong></a></li>\n<li><a href=\"https://github.com/hackerkid/Mind-Expanding-Books\"><strong>hackerkid/Mind-Expanding-Books</strong></a></li>\n<li><a href=\"https://github.com/TalAter/awesome-book-authoring\"><strong>TalAter/awesome-book-authoring</strong></a></li>\n<li><a href=\"https://github.com/sger/ElixirBooks\"><strong>sger/ElixirBooks</strong></a></li>\n<li><a href=\"https://github.com/dreikanter/sublime-bookmarks\"><strong>dreikanter/sublime-bookmarks</strong></a></li>\n<li><a href=\"https://github.com/mhinz/vim-galore\"><strong>mhinz/vim-galore</strong></a></li>\n<li><a href=\"https://github.com/emacs-tw/awesome-emacs\"><strong>emacs-tw/awesome-emacs</strong></a></li>\n<li><a href=\"https://github.com/mehcode/awesome-atom\"><strong>mehcode/awesome-atom</strong></a></li>\n<li><a href=\"https://github.com/viatsko/awesome-vscode\"><strong>viatsko/awesome-vscode</strong></a></li>\n<li><a href=\"https://github.com/ellisonleao/magictools\"><strong>ellisonleao/magictools</strong></a></li>\n<li><a href=\"https://github.com/hzoo/awesome-gametalks\"><strong>hzoo/awesome-gametalks</strong></a></li>\n<li><a href=\"https://github.com/godotengine/awesome-godot\"><strong>godotengine/awesome-godot</strong></a></li>\n<li><a href=\"https://github.com/leereilly/games\"><strong>leereilly/games</strong></a></li>\n<li><a href=\"https://github.com/RyanNielson/awesome-unity\"><strong>RyanNielson/awesome-unity</strong></a></li>\n<li><a href=\"https://github.com/hkirat/awesome-chess\"><strong>hkirat/awesome-chess</strong></a></li>\n<li><a href=\"https://github.com/love2d-community/awesome-love2d\"><strong>love2d-community/awesome-love2d</strong></a></li>\n<li><a href=\"https://github.com/pico-8/awesome-PICO-8\"><strong>pico-8/awesome-PICO-8</strong></a></li>\n<li><a href=\"https://github.com/gbdev/awesome-gbdev\"><strong>gbdev/awesome-gbdev</strong></a></li>\n<li><a href=\"https://github.com/WebCreationClub/awesome-construct\"><strong>WebCreationClub/awesome-construct</strong></a></li>\n<li><a href=\"https://github.com/stetso/awesome-gideros\"><strong>stetso/awesome-gideros</strong></a></li>\n<li><a href=\"https://github.com/bs-community/awesome-minecraft\"><strong>bs-community/awesome-minecraft</strong></a></li>\n<li><a href=\"https://github.com/leomaurodesenv/game-datasets\"><strong>leomaurodesenv/game-datasets</strong></a></li>\n<li><a href=\"https://github.com/Dvergar/awesome-haxe-gamedev\"><strong>Dvergar/awesome-haxe-gamedev</strong></a></li>\n<li><a href=\"https://github.com/rafaskb/awesome-libgdx\"><strong>rafaskb/awesome-libgdx</strong></a></li>\n<li><a href=\"https://github.com/playcanvas/awesome-playcanvas\"><strong>playcanvas/awesome-playcanvas</strong></a></li>\n<li><a href=\"https://github.com/radek-sprta/awesome-game-remakes\"><strong>radek-sprta/awesome-game-remakes</strong></a></li>\n<li><a href=\"https://github.com/flame-engine/awesome-flame\"><strong>flame-engine/awesome-flame</strong></a></li>\n<li><a href=\"https://github.com/mhxion/awesome-discord-communities\"><strong>mhxion/awesome-discord-communities</strong></a></li>\n<li><a href=\"https://github.com/tobiasvl/awesome-chip-8\"><strong>tobiasvl/awesome-chip-8</strong></a></li>\n<li><a href=\"https://github.com/michelpereira/awesome-games-of-coding\"><strong>michelpereira/awesome-games-of-coding</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/quick-look-plugins\"><strong>sindresorhus/quick-look-plugins</strong></a></li>\n<li><a href=\"https://github.com/jondot/awesome-devenv\"><strong>jondot/awesome-devenv</strong></a></li>\n<li><a href=\"https://github.com/webpro/awesome-dotfiles\"><strong>webpro/awesome-dotfiles</strong></a></li>\n<li><a href=\"https://github.com/alebcay/awesome-shell\"><strong>alebcay/awesome-shell</strong></a></li>\n<li><a href=\"https://github.com/jorgebucaran/awsm.fish\"><strong>jorgebucaran/awsm.fish</strong></a></li>\n<li><a href=\"https://github.com/agarrharr/awesome-cli-apps\"><strong>agarrharr/awesome-cli-apps</strong></a></li>\n<li><a href=\"https://github.com/unixorn/awesome-zsh-plugins\"><strong>unixorn/awesome-zsh-plugins</strong></a></li>\n<li><a href=\"https://github.com/phillipadsmith/awesome-github\"><strong>phillipadsmith/awesome-github</strong></a></li>\n<li><a href=\"https://github.com/stefanbuck/awesome-browser-extensions-for-github\"><strong>stefanbuck/awesome-browser-extensions-for-github</strong></a></li>\n<li><a href=\"https://github.com/tiimgreen/github-cheat-sheet\"><strong>tiimgreen/github-cheat-sheet</strong></a></li>\n<li><a href=\"https://github.com/matchai/awesome-pinned-gists\"><strong>matchai/awesome-pinned-gists</strong></a></li>\n<li><a href=\"https://github.com/arslanbilal/git-cheat-sheet\"><strong>arslanbilal/git-cheat-sheet</strong></a></li>\n<li><a href=\"https://github.com/git-tips/tips\"><strong>git-tips/tips</strong></a></li>\n<li><a href=\"https://github.com/stevemao/awesome-git-addons\"><strong>stevemao/awesome-git-addons</strong></a></li>\n<li><a href=\"https://github.com/compscilauren/awesome-git-hooks\"><strong>compscilauren/awesome-git-hooks</strong></a></li>\n<li><a href=\"https://github.com/moul/awesome-ssh\"><strong>moul/awesome-ssh</strong></a></li>\n<li><a href=\"https://github.com/tvvocold/FOSS-for-Dev\"><strong>tvvocold/FOSS-for-Dev</strong></a></li>\n<li><a href=\"https://github.com/bnb/awesome-hyper\"><strong>bnb/awesome-hyper</strong></a></li>\n<li><a href=\"https://github.com/janikvonrotz/awesome-powershell\"><strong>janikvonrotz/awesome-powershell</strong></a></li>\n<li><a href=\"https://github.com/alfred-workflows/awesome-alfred-workflows\"><strong>alfred-workflows/awesome-alfred-workflows</strong></a></li>\n<li><a href=\"https://github.com/k4m4/terminals-are-sexy\"><strong>k4m4/terminals-are-sexy</strong></a></li>\n<li><a href=\"https://github.com/sdras/awesome-actions\"><strong>sdras/awesome-actions</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-scifi\"><strong>sindresorhus/awesome-scifi</strong></a></li>\n<li><a href=\"https://github.com/RichardLitt/awesome-fantasy\"><strong>RichardLitt/awesome-fantasy</strong></a></li>\n<li><a href=\"https://github.com/ayr-ton/awesome-geek-podcasts\"><strong>ayr-ton/awesome-geek-podcasts</strong></a></li>\n<li><a href=\"https://github.com/zudochkin/awesome-newsletters\"><strong>zudochkin/awesome-newsletters</strong></a></li>\n<li><a href=\"https://github.com/victorlaerte/awesome-it-quotes\"><strong>victorlaerte/awesome-it-quotes</strong></a></li>\n<li><a href=\"https://github.com/numetriclabz/awesome-db\"><strong>numetriclabz/awesome-db</strong></a></li>\n<li><a href=\"https://github.com/shlomi-noach/awesome-mysql\"><strong>shlomi-noach/awesome-mysql</strong></a></li>\n<li><a href=\"https://github.com/dahlia/awesome-sqlalchemy\"><strong>dahlia/awesome-sqlalchemy</strong></a></li>\n<li><a href=\"https://github.com/mark-rushakoff/awesome-influxdb\"><strong>mark-rushakoff/awesome-influxdb</strong></a></li>\n<li><a href=\"https://github.com/neueda/awesome-neo4j\"><strong>neueda/awesome-neo4j</strong></a></li>\n<li><a href=\"https://github.com/ramnes/awesome-mongodb\"><strong>ramnes/awesome-mongodb</strong></a></li>\n<li><a href=\"https://github.com/d3viant0ne/awesome-rethinkdb\"><strong>d3viant0ne/awesome-rethinkdb</strong></a></li>\n<li><a href=\"https://github.com/mohataher/awesome-tinkerpop\"><strong>mohataher/awesome-tinkerpop</strong></a></li>\n<li><a href=\"https://github.com/dhamaniasad/awesome-postgres\"><strong>dhamaniasad/awesome-postgres</strong></a></li>\n<li><a href=\"https://github.com/quangv/awesome-couchdb\"><strong>quangv/awesome-couchdb</strong></a></li>\n<li><a href=\"https://github.com/rayokota/awesome-hbase\"><strong>rayokota/awesome-hbase</strong></a></li>\n<li><a href=\"https://github.com/erictleung/awesome-nosql-guides\"><strong>erictleung/awesome-nosql-guides</strong></a></li>\n<li><a href=\"https://github.com/chrislatorres/awesome-contexture\"><strong>chrislatorres/awesome-contexture</strong></a></li>\n<li><a href=\"https://github.com/mgramin/awesome-db-tools\"><strong>mgramin/awesome-db-tools</strong></a></li>\n<li><a href=\"https://github.com/vaticle/typedb-awesome\"><strong>vaticle/typedb-awesome</strong></a></li>\n<li><a href=\"https://github.com/Anant/awesome-cassandra\"><strong>Anant/awesome-cassandra</strong></a></li>\n<li><a href=\"https://github.com/shime/creative-commons-media\"><strong>shime/creative-commons-media</strong></a></li>\n<li><a href=\"https://github.com/brabadu/awesome-fonts\"><strong>brabadu/awesome-fonts</strong></a></li>\n<li><a href=\"https://github.com/chrissimpkins/codeface\"><strong>chrissimpkins/codeface</strong></a></li>\n<li><a href=\"https://github.com/neutraltone/awesome-stock-resources\"><strong>neutraltone/awesome-stock-resources</strong></a></li>\n<li><a href=\"https://github.com/davisonio/awesome-gif\"><strong>davisonio/awesome-gif</strong></a></li>\n<li><a href=\"https://github.com/ciconia/awesome-music\"><strong>ciconia/awesome-music</strong></a></li>\n<li><a href=\"https://github.com/44bits/awesome-opensource-documents\"><strong>44bits/awesome-opensource-documents</strong></a></li>\n<li><a href=\"https://github.com/willianjusten/awesome-audio-visualization\"><strong>willianjusten/awesome-audio-visualization</strong></a></li>\n<li><a href=\"https://github.com/ebu/awesome-broadcasting\"><strong>ebu/awesome-broadcasting</strong></a></li>\n<li><a href=\"https://github.com/Siilwyn/awesome-pixel-art\"><strong>Siilwyn/awesome-pixel-art</strong></a></li>\n<li><a href=\"https://github.com/transitive-bullshit/awesome-ffmpeg\"><strong>transitive-bullshit/awesome-ffmpeg</strong></a></li>\n<li><a href=\"https://github.com/notlmn/awesome-icons\"><strong>notlmn/awesome-icons</strong></a></li>\n<li><a href=\"https://github.com/stingalleman/awesome-audiovisual\"><strong>stingalleman/awesome-audiovisual</strong></a></li>\n<li><a href=\"https://github.com/mfkl/awesome-vlc\"><strong>mfkl/awesome-vlc</strong></a></li>\n<li><a href=\"https://github.com/therebelrobot/awesome-workshopper\"><strong>therebelrobot/awesome-workshopper</strong></a></li>\n<li><a href=\"https://github.com/karlhorky/learn-to-program\"><strong>karlhorky/learn-to-program</strong></a></li>\n<li><a href=\"https://github.com/matteofigus/awesome-speaking\"><strong>matteofigus/awesome-speaking</strong></a></li>\n<li><a href=\"https://github.com/lucasviola/awesome-tech-videos\"><strong>lucasviola/awesome-tech-videos</strong></a></li>\n<li><a href=\"https://github.com/hangtwenty/dive-into-machine-learning\"><strong>hangtwenty/dive-into-machine-learning</strong></a></li>\n<li><a href=\"https://github.com/watson/awesome-computer-history\"><strong>watson/awesome-computer-history</strong></a></li>\n<li><a href=\"https://github.com/HollyAdele/awesome-programming-for-kids\"><strong>HollyAdele/awesome-programming-for-kids</strong></a></li>\n<li><a href=\"https://github.com/yrgo/awesome-educational-games\"><strong>yrgo/awesome-educational-games</strong></a></li>\n<li><a href=\"https://github.com/micromata/awesome-javascript-learning\"><strong>micromata/awesome-javascript-learning</strong></a></li>\n<li><a href=\"https://github.com/micromata/awesome-css-learning\"><strong>micromata/awesome-css-learning</strong></a></li>\n<li><a href=\"https://github.com/dend/awesome-product-management\"><strong>dend/awesome-product-management</strong></a></li>\n<li><a href=\"https://github.com/liuchong/awesome-roadmaps\"><strong>liuchong/awesome-roadmaps</strong></a></li>\n<li><a href=\"https://github.com/JoseDeFreitas/awesome-youtubers\"><strong>JoseDeFreitas/awesome-youtubers</strong></a></li>\n<li><a href=\"https://github.com/paragonie/awesome-appsec\"><strong>paragonie/awesome-appsec</strong></a></li>\n<li><a href=\"https://github.com/sbilly/awesome-security\"><strong>sbilly/awesome-security</strong></a></li>\n<li><a href=\"https://github.com/apsdehal/awesome-ctf\"><strong>apsdehal/awesome-ctf</strong></a></li>\n<li><a href=\"https://github.com/rshipp/awesome-malware-analysis\"><strong>rshipp/awesome-malware-analysis</strong></a></li>\n<li><a href=\"https://github.com/ashishb/android-security-awesome\"><strong>ashishb/android-security-awesome</strong></a></li>\n<li><a href=\"https://github.com/carpedm20/awesome-hacking\"><strong>carpedm20/awesome-hacking</strong></a></li>\n<li><a href=\"https://github.com/paralax/awesome-honeypots\"><strong>paralax/awesome-honeypots</strong></a></li>\n<li><a href=\"https://github.com/meirwah/awesome-incident-response\"><strong>meirwah/awesome-incident-response</strong></a></li>\n<li><a href=\"https://github.com/jaredthecoder/awesome-vehicle-security\"><strong>jaredthecoder/awesome-vehicle-security</strong></a></li>\n<li><a href=\"https://github.com/qazbnm456/awesome-web-security\"><strong>qazbnm456/awesome-web-security</strong></a></li>\n<li><a href=\"https://github.com/fabacab/awesome-lockpicking\"><strong>fabacab/awesome-lockpicking</strong></a></li>\n<li><a href=\"https://github.com/fabacab/awesome-cybersecurity-blueteam\"><strong>fabacab/awesome-cybersecurity-blueteam</strong></a></li>\n<li><a href=\"https://github.com/cpuu/awesome-fuzzing\"><strong>cpuu/awesome-fuzzing</strong></a></li>\n<li><a href=\"https://github.com/fkie-cad/awesome-embedded-and-iot-security\"><strong>fkie-cad/awesome-embedded-and-iot-security</strong></a></li>\n<li><a href=\"https://github.com/bakke92/awesome-gdpr\"><strong>bakke92/awesome-gdpr</strong></a></li>\n<li><a href=\"https://github.com/TaptuIT/awesome-devsecops\"><strong>TaptuIT/awesome-devsecops</strong></a></li>\n<li><a href=\"https://github.com/umbraco-community/awesome-umbraco\"><strong>umbraco-community/awesome-umbraco</strong></a></li>\n<li><a href=\"https://github.com/refinerycms-contrib/awesome-refinerycms\"><strong>refinerycms-contrib/awesome-refinerycms</strong></a></li>\n<li><a href=\"https://github.com/springload/awesome-wagtail\"><strong>springload/awesome-wagtail</strong></a></li>\n<li><a href=\"https://github.com/drmonkeyninja/awesome-textpattern\"><strong>drmonkeyninja/awesome-textpattern</strong></a></li>\n<li><a href=\"https://github.com/nirgn975/awesome-drupal\"><strong>nirgn975/awesome-drupal</strong></a></li>\n<li><a href=\"https://github.com/craftcms/awesome\"><strong>craftcms/awesome</strong></a></li>\n<li><a href=\"https://github.com/MartinMiles/Awesome-Sitecore\"><strong>MartinMiles/Awesome-Sitecore</strong></a></li>\n<li><a href=\"https://github.com/wernerkrauss/awesome-silverstripe-cms\"><strong>wernerkrauss/awesome-silverstripe-cms</strong></a></li>\n<li><a href=\"https://github.com/Kiloreux/awesome-robotics\"><strong>Kiloreux/awesome-robotics</strong></a></li>\n<li><a href=\"https://github.com/HQarroum/awesome-iot\"><strong>HQarroum/awesome-iot</strong></a></li>\n<li><a href=\"https://github.com/kitspace/awesome-electronics\"><strong>kitspace/awesome-electronics</strong></a></li>\n<li><a href=\"https://github.com/rabschi/awesome-beacon\"><strong>rabschi/awesome-beacon</strong></a></li>\n<li><a href=\"https://github.com/gitfrage/guitarspecs\"><strong>gitfrage/guitarspecs</strong></a></li>\n<li><a href=\"https://github.com/beardicus/awesome-plotters\"><strong>beardicus/awesome-plotters</strong></a></li>\n<li><a href=\"https://github.com/protontypes/awesome-robotic-tooling\"><strong>protontypes/awesome-robotic-tooling</strong></a></li>\n<li><a href=\"https://github.com/szenergy/awesome-lidar\"><strong>szenergy/awesome-lidar</strong></a></li>\n<li><a href=\"https://github.com/opencompany/awesome-open-company\"><strong>opencompany/awesome-open-company</strong></a></li>\n<li><a href=\"https://github.com/mmccaff/PlacesToPostYourStartup\"><strong>mmccaff/PlacesToPostYourStartup</strong></a></li>\n<li><a href=\"https://github.com/domenicosolazzo/awesome-okr\"><strong>domenicosolazzo/awesome-okr</strong></a></li>\n<li><a href=\"https://github.com/LappleApple/awesome-leading-and-managing\"><strong>LappleApple/awesome-leading-and-managing</strong></a></li>\n<li><a href=\"https://github.com/mezod/awesome-indie\"><strong>mezod/awesome-indie</strong></a></li>\n<li><a href=\"https://github.com/cjbarber/ToolsOfTheTrade\"><strong>cjbarber/ToolsOfTheTrade</strong></a></li>\n<li><a href=\"https://github.com/nglgzz/awesome-clean-tech\"><strong>nglgzz/awesome-clean-tech</strong></a></li>\n<li><a href=\"https://github.com/wardley-maps-community/awesome-wardley-maps\"><strong>wardley-maps-community/awesome-wardley-maps</strong></a></li>\n<li><a href=\"https://github.com/RayBB/awesome-social-enterprise\"><strong>RayBB/awesome-social-enterprise</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-engineering-team-management\"><strong>kdeldycke/awesome-engineering-team-management</strong></a></li>\n<li><a href=\"https://github.com/agamm/awesome-developer-first\"><strong>agamm/awesome-developer-first</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-billing\"><strong>kdeldycke/awesome-billing</strong></a></li>\n<li><a href=\"https://github.com/matiassingers/awesome-slack\"><strong>matiassingers/awesome-slack</strong></a></li>\n<li><a href=\"https://github.com/filipelinhares/awesome-slack\"><strong>filipelinhares/awesome-slack</strong></a></li>\n<li><a href=\"https://github.com/lukasz-madon/awesome-remote-job\"><strong>lukasz-madon/awesome-remote-job</strong></a></li>\n<li><a href=\"https://github.com/jyguyomarch/awesome-productivity\"><strong>jyguyomarch/awesome-productivity</strong></a></li>\n<li><a href=\"https://github.com/tramcar/awesome-job-boards\"><strong>tramcar/awesome-job-boards</strong></a></li>\n<li><a href=\"https://github.com/DopplerHQ/awesome-interview-questions\"><strong>DopplerHQ/awesome-interview-questions</strong></a></li>\n<li><a href=\"https://github.com/joho/awesome-code-review\"><strong>joho/awesome-code-review</strong></a></li>\n<li><a href=\"https://github.com/j0hnm4r5/awesome-creative-technology\"><strong>j0hnm4r5/awesome-creative-technology</strong></a></li>\n<li><a href=\"https://github.com/lodthe/awesome-internships\"><strong>lodthe/awesome-internships</strong></a></li>\n<li><a href=\"https://github.com/sdnds-tw/awesome-sdn\"><strong>sdnds-tw/awesome-sdn</strong></a></li>\n<li><a href=\"https://github.com/briatte/awesome-network-analysis\"><strong>briatte/awesome-network-analysis</strong></a></li>\n<li><a href=\"https://github.com/caesar0301/awesome-pcaptools\"><strong>caesar0301/awesome-pcaptools</strong></a></li>\n<li><a href=\"https://github.com/rtckit/awesome-rtc\"><strong>rtckit/awesome-rtc</strong></a></li>\n<li><a href=\"https://github.com/igorbarinov/awesome-bitcoin\"><strong>igorbarinov/awesome-bitcoin</strong></a></li>\n<li><a href=\"https://github.com/vhpoet/awesome-ripple\"><strong>vhpoet/awesome-ripple</strong></a></li>\n<li><a href=\"https://github.com/machinomy/awesome-non-financial-blockchain\"><strong>machinomy/awesome-non-financial-blockchain</strong></a></li>\n<li><a href=\"https://github.com/tleb/awesome-mastodon\"><strong>tleb/awesome-mastodon</strong></a></li>\n<li><a href=\"https://github.com/ttumiel/Awesome-Ethereum\"><strong>ttumiel/Awesome-Ethereum</strong></a></li>\n<li><a href=\"https://github.com/steven2358/awesome-blockchain-ai\"><strong>steven2358/awesome-blockchain-ai</strong></a></li>\n<li><a href=\"https://github.com/DanailMinchev/awesome-eosio\"><strong>DanailMinchev/awesome-eosio</strong></a></li>\n<li><a href=\"https://github.com/chainstack/awesome-corda\"><strong>chainstack/awesome-corda</strong></a></li>\n<li><a href=\"https://github.com/msmolyakov/awesome-waves\"><strong>msmolyakov/awesome-waves</strong></a></li>\n<li><a href=\"https://github.com/substrate-developer-hub/awesome-substrate\"><strong>substrate-developer-hub/awesome-substrate</strong></a></li>\n<li><a href=\"https://github.com/golemfactory/awesome-golem\"><strong>golemfactory/awesome-golem</strong></a></li>\n<li><a href=\"https://github.com/friedger/awesome-stacks-chain\"><strong>friedger/awesome-stacks-chain</strong></a></li>\n<li><a href=\"https://github.com/eselkin/awesome-computational-neuroscience\"><strong>eselkin/awesome-computational-neuroscience</strong></a></li>\n<li><a href=\"https://github.com/maehr/awesome-digital-history\"><strong>maehr/awesome-digital-history</strong></a></li>\n<li><a href=\"https://github.com/writing-resources/awesome-scientific-writing\"><strong>writing-resources/awesome-scientific-writing</strong></a></li>\n<li><a href=\"https://github.com/danvoyce/awesome-creative-tech-events\"><strong>danvoyce/awesome-creative-tech-events</strong></a></li>\n<li><a href=\"https://github.com/ildoc/awesome-italy-events\"><strong>ildoc/awesome-italy-events</strong></a></li>\n<li><a href=\"https://github.com/awkward/awesome-netherlands-events\"><strong>awkward/awesome-netherlands-events</strong></a></li>\n<li><a href=\"https://github.com/TheJambo/awesome-testing\"><strong>TheJambo/awesome-testing</strong></a></li>\n<li><a href=\"https://github.com/mojoaxel/awesome-regression-testing\"><strong>mojoaxel/awesome-regression-testing</strong></a></li>\n<li><a href=\"https://github.com/christian-bromann/awesome-selenium\"><strong>christian-bromann/awesome-selenium</strong></a></li>\n<li><a href=\"https://github.com/SrinivasanTarget/awesome-appium\"><strong>SrinivasanTarget/awesome-appium</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-tap\"><strong>sindresorhus/awesome-tap</strong></a></li>\n<li><a href=\"https://github.com/aliesbelik/awesome-jmeter\"><strong>aliesbelik/awesome-jmeter</strong></a></li>\n<li><a href=\"https://github.com/k6io/awesome-k6\"><strong>k6io/awesome-k6</strong></a></li>\n<li><a href=\"https://github.com/mxschmitt/awesome-playwright\"><strong>mxschmitt/awesome-playwright</strong></a></li>\n<li><a href=\"https://github.com/fityanos/awesome-quality-assurance-roadmap\"><strong>fityanos/awesome-quality-assurance-roadmap</strong></a></li>\n<li><a href=\"https://github.com/burningtree/awesome-json\"><strong>burningtree/awesome-json</strong></a></li>\n<li><a href=\"https://github.com/tmcw/awesome-geojson\"><strong>tmcw/awesome-geojson</strong></a></li>\n<li><a href=\"https://github.com/jdorfman/awesome-json-datasets\"><strong>jdorfman/awesome-json-datasets</strong></a></li>\n<li><a href=\"https://github.com/secretGeek/awesomeCSV\"><strong>secretGeek/awesomeCSV</strong></a></li>\n<li><a href=\"https://github.com/AchoArnold/discount-for-student-dev\"><strong>AchoArnold/discount-for-student-dev</strong></a></li>\n<li><a href=\"https://github.com/kyleterry/awesome-radio\"><strong>kyleterry/awesome-radio</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome\"><strong>sindresorhus/awesome</strong></a></li>\n<li><a href=\"https://github.com/onurakpolat/awesome-analytics\"><strong>onurakpolat/awesome-analytics</strong></a></li>\n<li><a href=\"https://github.com/marmelab/awesome-rest\"><strong>marmelab/awesome-rest</strong></a></li>\n<li><a href=\"https://github.com/cicdops/awesome-ciandcd\"><strong>cicdops/awesome-ciandcd</strong></a></li>\n<li><a href=\"https://github.com/mmcgrana/services-engineering\"><strong>mmcgrana/services-engineering</strong></a></li>\n<li><a href=\"https://github.com/ripienaar/free-for-dev\"><strong>ripienaar/free-for-dev</strong></a></li>\n<li><a href=\"https://github.com/cyberglot/awesome-answers\"><strong>cyberglot/awesome-answers</strong></a></li>\n<li><a href=\"https://github.com/diessica/awesome-sketch\"><strong>diessica/awesome-sketch</strong></a></li>\n<li><a href=\"https://github.com/melvin0008/awesome-projects-boilerplates\"><strong>melvin0008/awesome-projects-boilerplates</strong></a></li>\n<li><a href=\"https://github.com/matiassingers/awesome-readme\"><strong>matiassingers/awesome-readme</strong></a></li>\n<li><a href=\"https://github.com/NARKOZ/guides\"><strong>NARKOZ/guides</strong></a></li>\n<li><a href=\"https://github.com/kilimchoi/engineering-blogs\"><strong>kilimchoi/engineering-blogs</strong></a></li>\n<li><a href=\"https://github.com/awesome-selfhosted/awesome-selfhosted\"><strong>awesome-selfhosted/awesome-selfhosted</strong></a></li>\n<li><a href=\"https://github.com/DataDaoDe/awesome-foss-apps\"><strong>DataDaoDe/awesome-foss-apps</strong></a></li>\n<li><a href=\"https://github.com/alferov/awesome-gulp\"><strong>alferov/awesome-gulp</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/amas\"><strong>sindresorhus/amas</strong></a></li>\n<li><a href=\"https://github.com/stoeffel/awesome-ama-answers\"><strong>stoeffel/awesome-ama-answers</strong></a></li>\n<li><a href=\"https://github.com/ibaaj/awesome-OpenSourcePhotography\"><strong>ibaaj/awesome-OpenSourcePhotography</strong></a></li>\n<li><a href=\"https://github.com/eug/awesome-opengl\"><strong>eug/awesome-opengl</strong></a></li>\n<li><a href=\"https://github.com/chentsulin/awesome-graphql\"><strong>chentsulin/awesome-graphql</strong></a></li>\n<li><a href=\"https://github.com/APA-Technology-Division/urban-and-regional-planning-resources\"><strong>APA-Technology-Division/urban-and-regional-planning-resources</strong></a></li>\n<li><a href=\"https://github.com/CUTR-at-USF/awesome-transit\"><strong>CUTR-at-USF/awesome-transit</strong></a></li>\n<li><a href=\"https://github.com/emptymalei/awesome-research\"><strong>emptymalei/awesome-research</strong></a></li>\n<li><a href=\"https://github.com/fasouto/awesome-dataviz\"><strong>fasouto/awesome-dataviz</strong></a></li>\n<li><a href=\"https://github.com/vinkla/shareable-links\"><strong>vinkla/shareable-links</strong></a></li>\n<li><a href=\"https://github.com/mfornos/awesome-microservices\"><strong>mfornos/awesome-microservices</strong></a></li>\n<li><a href=\"https://github.com/jagracey/Awesome-Unicode\"><strong>jagracey/Awesome-Unicode</strong></a></li>\n<li><a href=\"https://github.com/Codepoints/awesome-codepoints\"><strong>Codepoints/awesome-codepoints</strong></a></li>\n<li><a href=\"https://github.com/MunGell/awesome-for-beginners\"><strong>MunGell/awesome-for-beginners</strong></a></li>\n<li><a href=\"https://github.com/gamontal/awesome-katas\"><strong>gamontal/awesome-katas</strong></a></li>\n<li><a href=\"https://github.com/drewrwilson/toolsforactivism\"><strong>drewrwilson/toolsforactivism</strong></a></li>\n<li><a href=\"https://github.com/dylanrees/citizen-science\"><strong>dylanrees/citizen-science</strong></a></li>\n<li><a href=\"https://github.com/hobbyquaker/awesome-mqtt\"><strong>hobbyquaker/awesome-mqtt</strong></a></li>\n<li><a href=\"https://github.com/daviddias/awesome-hacking-locations\"><strong>daviddias/awesome-hacking-locations</strong></a></li>\n<li><a href=\"https://github.com/cristianoliveira/awesome4girls\"><strong>cristianoliveira/awesome4girls</strong></a></li>\n<li><a href=\"https://github.com/vorpaljs/awesome-vorpal\"><strong>vorpaljs/awesome-vorpal</strong></a></li>\n<li><a href=\"https://github.com/vinjn/awesome-vulkan\"><strong>vinjn/awesome-vulkan</strong></a></li>\n<li><a href=\"https://github.com/egeerardyn/awesome-LaTeX\"><strong>egeerardyn/awesome-LaTeX</strong></a></li>\n<li><a href=\"https://github.com/antontarasenko/awesome-economics\"><strong>antontarasenko/awesome-economics</strong></a></li>\n<li><a href=\"https://github.com/sublimino/awesome-funny-markov\"><strong>sublimino/awesome-funny-markov</strong></a></li>\n<li><a href=\"https://github.com/danielecook/Awesome-Bioinformatics\"><strong>danielecook/Awesome-Bioinformatics</strong></a></li>\n<li><a href=\"https://github.com/hsiaoyi0504/awesome-cheminformatics\"><strong>hsiaoyi0504/awesome-cheminformatics</strong></a></li>\n<li><a href=\"https://github.com/Siddharth11/Colorful\"><strong>Siddharth11/Colorful</strong></a></li>\n<li><a href=\"https://github.com/scholtzm/awesome-steam\"><strong>scholtzm/awesome-steam</strong></a></li>\n<li><a href=\"https://github.com/hackerkid/bots\"><strong>hackerkid/bots</strong></a></li>\n<li><a href=\"https://github.com/dastergon/awesome-sre\"><strong>dastergon/awesome-sre</strong></a></li>\n<li><a href=\"https://github.com/KimberlyMunoz/empathy-in-engineering\"><strong>KimberlyMunoz/empathy-in-engineering</strong></a></li>\n<li><a href=\"https://github.com/xen0l/awesome-dtrace\"><strong>xen0l/awesome-dtrace</strong></a></li>\n<li><a href=\"https://github.com/bvolpato/awesome-userscripts\"><strong>bvolpato/awesome-userscripts</strong></a></li>\n<li><a href=\"https://github.com/tobiasbueschel/awesome-pokemon\"><strong>tobiasbueschel/awesome-pokemon</strong></a></li>\n<li><a href=\"https://github.com/exAspArk/awesome-chatops\"><strong>exAspArk/awesome-chatops</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-falsehood\"><strong>kdeldycke/awesome-falsehood</strong></a></li>\n<li><a href=\"https://github.com/heynickc/awesome-ddd\"><strong>heynickc/awesome-ddd</strong></a></li>\n<li><a href=\"https://github.com/woop/awesome-quantified-self\"><strong>woop/awesome-quantified-self</strong></a></li>\n<li><a href=\"https://github.com/hbokh/awesome-saltstack\"><strong>hbokh/awesome-saltstack</strong></a></li>\n<li><a href=\"https://github.com/nicolesaidy/awesome-web-design\"><strong>nicolesaidy/awesome-web-design</strong></a></li>\n<li><a href=\"https://github.com/terkelg/awesome-creative-coding\"><strong>terkelg/awesome-creative-coding</strong></a></li>\n<li><a href=\"https://github.com/aviaryan/awesome-no-login-web-apps\"><strong>aviaryan/awesome-no-login-web-apps</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-free-software\"><strong>johnjago/awesome-free-software</strong></a></li>\n<li><a href=\"https://github.com/podo/awesome-framer\"><strong>podo/awesome-framer</strong></a></li>\n<li><a href=\"https://github.com/BubuAnabelas/awesome-markdown\"><strong>BubuAnabelas/awesome-markdown</strong></a></li>\n<li><a href=\"https://github.com/mislavcimpersak/awesome-dev-fun\"><strong>mislavcimpersak/awesome-dev-fun</strong></a></li>\n<li><a href=\"https://github.com/kakoni/awesome-healthcare\"><strong>kakoni/awesome-healthcare</strong></a></li>\n<li><a href=\"https://github.com/DavidLambauer/awesome-magento2\"><strong>DavidLambauer/awesome-magento2</strong></a></li>\n<li><a href=\"https://github.com/xiaohanyu/awesome-tikz\"><strong>xiaohanyu/awesome-tikz</strong></a></li>\n<li><a href=\"https://github.com/analyticalmonk/awesome-neuroscience\"><strong>analyticalmonk/awesome-neuroscience</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-ad-free\"><strong>johnjago/awesome-ad-free</strong></a></li>\n<li><a href=\"https://github.com/angrykoala/awesome-esolangs\"><strong>angrykoala/awesome-esolangs</strong></a></li>\n<li><a href=\"https://github.com/roaldnefs/awesome-prometheus\"><strong>roaldnefs/awesome-prometheus</strong></a></li>\n<li><a href=\"https://github.com/homematic-community/awesome-homematic\"><strong>homematic-community/awesome-homematic</strong></a></li>\n<li><a href=\"https://github.com/sfischer13/awesome-ledger\"><strong>sfischer13/awesome-ledger</strong></a></li>\n<li><a href=\"https://github.com/thomasbnt/awesome-web-monetization\"><strong>thomasbnt/awesome-web-monetization</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-uncopyright\"><strong>johnjago/awesome-uncopyright</strong></a></li>\n<li><a href=\"https://github.com/Zheaoli/awesome-coins\"><strong>Zheaoli/awesome-coins</strong></a></li>\n<li><a href=\"https://github.com/folkswhocode/awesome-diversity\"><strong>folkswhocode/awesome-diversity</strong></a></li>\n<li><a href=\"https://github.com/zachflower/awesome-open-source-supporters\"><strong>zachflower/awesome-open-source-supporters</strong></a></li>\n<li><a href=\"https://github.com/robinstickel/awesome-design-principles\"><strong>robinstickel/awesome-design-principles</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-theravada\"><strong>johnjago/awesome-theravada</strong></a></li>\n<li><a href=\"https://github.com/inspectit-labs/awesome-inspectit\"><strong>inspectit-labs/awesome-inspectit</strong></a></li>\n<li><a href=\"https://github.com/nayafia/awesome-maintainers\"><strong>nayafia/awesome-maintainers</strong></a></li>\n<li><a href=\"https://github.com/xxczaki/awesome-calculators\"><strong>xxczaki/awesome-calculators</strong></a></li>\n<li><a href=\"https://github.com/ZYSzys/awesome-captcha\"><strong>ZYSzys/awesome-captcha</strong></a></li>\n<li><a href=\"https://github.com/markusschanta/awesome-jupyter\"><strong>markusschanta/awesome-jupyter</strong></a></li>\n<li><a href=\"https://github.com/andrewda/awesome-frc\"><strong>andrewda/awesome-frc</strong></a></li>\n<li><a href=\"https://github.com/humanetech-community/awesome-humane-tech\"><strong>humanetech-community/awesome-humane-tech</strong></a></li>\n<li><a href=\"https://github.com/karlhorky/awesome-speakers\"><strong>karlhorky/awesome-speakers</strong></a></li>\n<li><a href=\"https://github.com/edm00se/awesome-board-games\"><strong>edm00se/awesome-board-games</strong></a></li>\n<li><a href=\"https://github.com/uraimo/awesome-software-patreons\"><strong>uraimo/awesome-software-patreons</strong></a></li>\n<li><a href=\"https://github.com/ecohealthalliance/awesome-parasite\"><strong>ecohealthalliance/awesome-parasite</strong></a></li>\n<li><a href=\"https://github.com/jzarca01/awesome-food\"><strong>jzarca01/awesome-food</strong></a></li>\n<li><a href=\"https://github.com/dreamingechoes/awesome-mental-health\"><strong>dreamingechoes/awesome-mental-health</strong></a></li>\n<li><a href=\"https://github.com/alexk111/awesome-bitcoin-payment-processors\"><strong>alexk111/awesome-bitcoin-payment-processors</strong></a></li>\n<li><a href=\"https://github.com/nschloe/awesome-scientific-computing\"><strong>nschloe/awesome-scientific-computing</strong></a></li>\n<li><a href=\"https://github.com/ScaleLeap/awesome-amazon-seller\"><strong>ScaleLeap/awesome-amazon-seller</strong></a></li>\n<li><a href=\"https://github.com/brycejohnston/awesome-agriculture\"><strong>brycejohnston/awesome-agriculture</strong></a></li>\n<li><a href=\"https://github.com/matttga/awesome-product-design\"><strong>matttga/awesome-product-design</strong></a></li>\n<li><a href=\"https://github.com/catalinmiron/awesome-prisma\"><strong>catalinmiron/awesome-prisma</strong></a></li>\n<li><a href=\"https://github.com/simskij/awesome-software-architecture\"><strong>simskij/awesome-software-architecture</strong></a></li>\n<li><a href=\"https://github.com/stevesong/awesome-connectivity-info\"><strong>stevesong/awesome-connectivity-info</strong></a></li>\n<li><a href=\"https://github.com/stackshareio/awesome-stacks\"><strong>stackshareio/awesome-stacks</strong></a></li>\n<li><a href=\"https://github.com/cytodata/awesome-cytodata\"><strong>cytodata/awesome-cytodata</strong></a></li>\n<li><a href=\"https://github.com/davisonio/awesome-irc\"><strong>davisonio/awesome-irc</strong></a></li>\n<li><a href=\"https://github.com/cenoura/awesome-ads\"><strong>cenoura/awesome-ads</strong></a></li>\n<li><a href=\"https://github.com/philsturgeon/awesome-earth\"><strong>philsturgeon/awesome-earth</strong></a></li>\n<li><a href=\"https://github.com/gruhn/awesome-naming\"><strong>gruhn/awesome-naming</strong></a></li>\n<li><a href=\"https://github.com/caufieldjh/awesome-bioie\"><strong>caufieldjh/awesome-bioie</strong></a></li>\n<li><a href=\"https://github.com/iipc/awesome-web-archiving\"><strong>iipc/awesome-web-archiving</strong></a></li>\n<li><a href=\"https://github.com/schlessera/awesome-wp-cli\"><strong>schlessera/awesome-wp-cli</strong></a></li>\n<li><a href=\"https://github.com/mourarthur/awesome-credit-modeling\"><strong>mourarthur/awesome-credit-modeling</strong></a></li>\n<li><a href=\"https://github.com/KeyboardInterrupt/awesome-ansible\"><strong>KeyboardInterrupt/awesome-ansible</strong></a></li>\n<li><a href=\"https://github.com/keller-mark/awesome-biological-visualizations\"><strong>keller-mark/awesome-biological-visualizations</strong></a></li>\n<li><a href=\"https://github.com/aureooms/awesome-qr-code\"><strong>aureooms/awesome-qr-code</strong></a></li>\n<li><a href=\"https://github.com/sdassow/awesome-veganism\"><strong>sdassow/awesome-veganism</strong></a></li>\n<li><a href=\"https://github.com/mbiesiad/awesome-translations\"><strong>mbiesiad/awesome-translations</strong></a></li>\n<li><a href=\"https://github.com/dersvenhesse/awesome-scriptable\"><strong>dersvenhesse/awesome-scriptable</strong></a></li>\n<li><a href=\"https://github.com/topics/awesome\"><strong>topics/awesome</strong></a></li>\n<li><a href=\"https://awesome-indexed.mathew-davies.co.uk\"><strong>https://awesome-indexed.mathew-davies.co.uk</strong></a></li>\n<li><a href=\"https://awesomelists.top\"><strong>https://awesomelists.top</strong></a></li>\n<li><a href=\"https://github.com/basharovV/StumbleUponAwesome\"><strong>basharovV/StumbleUponAwesome</strong></a></li>\n<li><a href=\"https://github.com/umutphp/awesome-cli\"><strong>umutphp/awesome-cli</strong></a></li>\n<li><a href=\"http://awesome.digitalbunker.dev\"><strong>http://awesome.digitalbunker.dev</strong></a></li>\n<li><a href=\"https://www.trackawesomelist.com\"><strong>https://www.trackawesomelist.com</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-nodejs\"><strong>sindresorhus/awesome-nodejs</strong></a></li>\n<li><a href=\"https://github.com/bcoe/awesome-cross-platform-nodejs\"><strong>bcoe/awesome-cross-platform-nodejs</strong></a></li>\n<li><a href=\"https://github.com/dypsilon/frontend-dev-bookmarks\"><strong>dypsilon/frontend-dev-bookmarks</strong></a></li>\n<li><a href=\"https://github.com/vsouza/awesome-ios\"><strong>vsouza/awesome-ios</strong></a></li>\n<li><a href=\"https://github.com/JStumpp/awesome-android\"><strong>JStumpp/awesome-android</strong></a></li>\n<li><a href=\"https://github.com/weblancaster/awesome-IoT-hybrid\"><strong>weblancaster/awesome-IoT-hybrid</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-electron\"><strong>sindresorhus/awesome-electron</strong></a></li>\n<li><a href=\"https://github.com/busterc/awesome-cordova\"><strong>busterc/awesome-cordova</strong></a></li>\n<li><a href=\"https://github.com/jondot/awesome-react-native\"><strong>jondot/awesome-react-native</strong></a></li>\n<li><a href=\"https://github.com/XamSome/awesome-xamarin\"><strong>XamSome/awesome-xamarin</strong></a></li>\n<li><a href=\"https://github.com/inputsh/awesome-linux\"><strong>inputsh/awesome-linux</strong></a></li>\n<li><a href=\"https://github.com/Friz-zy/awesome-linux-containers\"><strong>Friz-zy/awesome-linux-containers</strong></a></li>\n<li><a href=\"https://github.com/zoidbergwill/awesome-ebpf\"><strong>zoidbergwill/awesome-ebpf</strong></a></li>\n<li><a href=\"https://github.com/PandaFoss/Awesome-Arch\"><strong>PandaFoss/Awesome-Arch</strong></a></li>\n<li><a href=\"https://github.com/iCHAIT/awesome-macOS\"><strong>iCHAIT/awesome-macOS</strong></a></li>\n<li><a href=\"https://github.com/herrbischoff/awesome-macos-command-line\"><strong>herrbischoff/awesome-macos-command-line</strong></a></li>\n<li><a href=\"https://github.com/agarrharr/awesome-macos-screensavers\"><strong>agarrharr/awesome-macos-screensavers</strong></a></li>\n<li><a href=\"https://github.com/jaywcjlove/awesome-mac\"><strong>jaywcjlove/awesome-mac</strong></a></li>\n<li><a href=\"https://github.com/serhii-londar/open-source-mac-os-apps\"><strong>serhii-londar/open-source-mac-os-apps</strong></a></li>\n<li><a href=\"https://github.com/yenchenlin/awesome-watchos\"><strong>yenchenlin/awesome-watchos</strong></a></li>\n<li><a href=\"https://github.com/deephacks/awesome-jvm\"><strong>deephacks/awesome-jvm</strong></a></li>\n<li><a href=\"https://github.com/mailtoharshit/awesome-salesforce\"><strong>mailtoharshit/awesome-salesforce</strong></a></li>\n<li><a href=\"https://github.com/donnemartin/awesome-aws\"><strong>donnemartin/awesome-aws</strong></a></li>\n<li><a href=\"https://github.com/Awesome-Windows/Awesome\"><strong>Awesome-Windows/Awesome</strong></a></li>\n<li><a href=\"https://github.com/ipfs/awesome-ipfs\"><strong>ipfs/awesome-ipfs</strong></a></li>\n<li><a href=\"https://github.com/fuse-compound/awesome-fuse\"><strong>fuse-compound/awesome-fuse</strong></a></li>\n<li><a href=\"https://github.com/ianstormtaylor/awesome-heroku\"><strong>ianstormtaylor/awesome-heroku</strong></a></li>\n<li><a href=\"https://github.com/thibmaek/awesome-raspberry-pi\"><strong>thibmaek/awesome-raspberry-pi</strong></a></li>\n<li><a href=\"https://github.com/JesseTG/awesome-qt\"><strong>JesseTG/awesome-qt</strong></a></li>\n<li><a href=\"https://github.com/fregante/Awesome-WebExtensions\"><strong>fregante/Awesome-WebExtensions</strong></a></li>\n<li><a href=\"https://github.com/motion-open-source/awesome-rubymotion\"><strong>motion-open-source/awesome-rubymotion</strong></a></li>\n<li><a href=\"https://github.com/vitalets/awesome-smart-tv\"><strong>vitalets/awesome-smart-tv</strong></a></li>\n<li><a href=\"https://github.com/Kazhnuz/awesome-gnome\"><strong>Kazhnuz/awesome-gnome</strong></a></li>\n<li><a href=\"https://github.com/francoism90/awesome-kde\"><strong>francoism90/awesome-kde</strong></a></li>\n<li><a href=\"https://github.com/quozd/awesome-dotnet\"><strong>quozd/awesome-dotnet</strong></a></li>\n<li><a href=\"https://github.com/thangchung/awesome-dotnet-core\"><strong>thangchung/awesome-dotnet-core</strong></a></li>\n<li><a href=\"https://github.com/ironcev/awesome-roslyn\"><strong>ironcev/awesome-roslyn</strong></a></li>\n<li><a href=\"https://github.com/miguelmota/awesome-amazon-alexa\"><strong>miguelmota/awesome-amazon-alexa</strong></a></li>\n<li><a href=\"https://github.com/jonleibowitz/awesome-digitalocean\"><strong>jonleibowitz/awesome-digitalocean</strong></a></li>\n<li><a href=\"https://github.com/Solido/awesome-flutter\"><strong>Solido/awesome-flutter</strong></a></li>\n<li><a href=\"https://github.com/frenck/awesome-home-assistant\"><strong>frenck/awesome-home-assistant</strong></a></li>\n<li><a href=\"https://github.com/victorshinya/awesome-ibmcloud\"><strong>victorshinya/awesome-ibmcloud</strong></a></li>\n<li><a href=\"https://github.com/jthegedus/awesome-firebase\"><strong>jthegedus/awesome-firebase</strong></a></li>\n<li><a href=\"https://github.com/fkromer/awesome-ros2\"><strong>fkromer/awesome-ros2</strong></a></li>\n<li><a href=\"https://github.com/adafruit/awesome-adafruitio\"><strong>adafruit/awesome-adafruitio</strong></a></li>\n<li><a href=\"https://github.com/irazasyed/awesome-cloudflare\"><strong>irazasyed/awesome-cloudflare</strong></a></li>\n<li><a href=\"https://github.com/ravirupareliya/awesome-actions-on-google\"><strong>ravirupareliya/awesome-actions-on-google</strong></a></li>\n<li><a href=\"https://github.com/agucova/awesome-esp\"><strong>agucova/awesome-esp</strong></a></li>\n<li><a href=\"https://github.com/denolib/awesome-deno\"><strong>denolib/awesome-deno</strong></a></li>\n<li><a href=\"https://github.com/balintkissdev/awesome-dos\"><strong>balintkissdev/awesome-dos</strong></a></li>\n<li><a href=\"https://github.com/nix-community/awesome-nix\"><strong>nix-community/awesome-nix</strong></a></li>\n<li><a href=\"https://github.com/sorrycc/awesome-javascript\"><strong>sorrycc/awesome-javascript</strong></a></li>\n<li><a href=\"https://github.com/wbinnssmith/awesome-promises\"><strong>wbinnssmith/awesome-promises</strong></a></li>\n<li><a href=\"https://github.com/standard/awesome-standard\"><strong>standard/awesome-standard</strong></a></li>\n<li><a href=\"https://github.com/bolshchikov/js-must-watch\"><strong>bolshchikov/js-must-watch</strong></a></li>\n<li><a href=\"https://github.com/loverajoel/jstips\"><strong>loverajoel/jstips</strong></a></li>\n<li><a href=\"https://github.com/Kikobeats/awesome-network-js\"><strong>Kikobeats/awesome-network-js</strong></a></li>\n<li><a href=\"https://github.com/parro-it/awesome-micro-npm-packages\"><strong>parro-it/awesome-micro-npm-packages</strong></a></li>\n<li><a href=\"https://github.com/feross/awesome-mad-science\"><strong>feross/awesome-mad-science</strong></a></li>\n<li><a href=\"https://github.com/maxogden/maintenance-modules\"><strong>maxogden/maintenance-modules</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-npm\"><strong>sindresorhus/awesome-npm</strong></a></li>\n<li><a href=\"https://github.com/avajs/awesome-ava\"><strong>avajs/awesome-ava</strong></a></li>\n<li><a href=\"https://github.com/dustinspecker/awesome-eslint\"><strong>dustinspecker/awesome-eslint</strong></a></li>\n<li><a href=\"https://github.com/stoeffel/awesome-fp-js\"><strong>stoeffel/awesome-fp-js</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-observables\"><strong>sindresorhus/awesome-observables</strong></a></li>\n<li><a href=\"https://github.com/RyanZim/awesome-npm-scripts\"><strong>RyanZim/awesome-npm-scripts</strong></a></li>\n<li><a href=\"https://github.com/30-seconds/30-seconds-of-code\"><strong>30-seconds/30-seconds-of-code</strong></a></li>\n<li><a href=\"https://github.com/Richienb/awesome-ponyfills\"><strong>Richienb/awesome-ponyfills</strong></a></li>\n<li><a href=\"https://github.com/matteocrippa/awesome-swift\"><strong>matteocrippa/awesome-swift</strong></a></li>\n<li><a href=\"https://github.com/hsavit1/Awesome-Swift-Education\"><strong>hsavit1/Awesome-Swift-Education</strong></a></li>\n<li><a href=\"https://github.com/uraimo/Awesome-Swift-Playgrounds\"><strong>uraimo/Awesome-Swift-Playgrounds</strong></a></li>\n<li><a href=\"https://github.com/vinta/awesome-python\"><strong>vinta/awesome-python</strong></a></li>\n<li><a href=\"https://github.com/timofurrer/awesome-asyncio\"><strong>timofurrer/awesome-asyncio</strong></a></li>\n<li><a href=\"https://github.com/faroit/awesome-python-scientific-audio\"><strong>faroit/awesome-python-scientific-audio</strong></a></li>\n<li><a href=\"https://github.com/adafruit/awesome-circuitpython\"><strong>adafruit/awesome-circuitpython</strong></a></li>\n<li><a href=\"https://github.com/krzjoa/awesome-python-data-science\"><strong>krzjoa/awesome-python-data-science</strong></a></li>\n<li><a href=\"https://github.com/typeddjango/awesome-python-typing\"><strong>typeddjango/awesome-python-typing</strong></a></li>\n<li><a href=\"https://github.com/mcauser/awesome-micropython\"><strong>mcauser/awesome-micropython</strong></a></li>\n<li><a href=\"https://github.com/rust-unofficial/awesome-rust\"><strong>rust-unofficial/awesome-rust</strong></a></li>\n<li><a href=\"https://github.com/krispo/awesome-haskell\"><strong>krispo/awesome-haskell</strong></a></li>\n<li><a href=\"https://github.com/passy/awesome-purescript\"><strong>passy/awesome-purescript</strong></a></li>\n<li><a href=\"https://github.com/avelino/awesome-go\"><strong>avelino/awesome-go</strong></a></li>\n<li><a href=\"https://github.com/lauris/awesome-scala\"><strong>lauris/awesome-scala</strong></a></li>\n<li><a href=\"https://github.com/tindzk/awesome-scala-native\"><strong>tindzk/awesome-scala-native</strong></a></li>\n<li><a href=\"https://github.com/markets/awesome-ruby\"><strong>markets/awesome-ruby</strong></a></li>\n<li><a href=\"https://github.com/razum2um/awesome-clojure\"><strong>razum2um/awesome-clojure</strong></a></li>\n<li><a href=\"https://github.com/hantuzun/awesome-clojurescript\"><strong>hantuzun/awesome-clojurescript</strong></a></li>\n<li><a href=\"https://github.com/h4cc/awesome-elixir\"><strong>h4cc/awesome-elixir</strong></a></li>\n<li><a href=\"https://github.com/sporto/awesome-elm\"><strong>sporto/awesome-elm</strong></a></li>\n<li><a href=\"https://github.com/drobakowski/awesome-erlang\"><strong>drobakowski/awesome-erlang</strong></a></li>\n<li><a href=\"https://github.com/svaksha/Julia.jl\"><strong>svaksha/Julia.jl</strong></a></li>\n<li><a href=\"https://github.com/LewisJEllis/awesome-lua\"><strong>LewisJEllis/awesome-lua</strong></a></li>\n<li><a href=\"https://github.com/inputsh/awesome-c\"><strong>inputsh/awesome-c</strong></a></li>\n<li><a href=\"https://github.com/fffaraz/awesome-cpp\"><strong>fffaraz/awesome-cpp</strong></a></li>\n<li><a href=\"https://github.com/qinwf/awesome-R\"><strong>qinwf/awesome-R</strong></a></li>\n<li><a href=\"https://github.com/iamericfletcher/awesome-r-learning-resources\"><strong>iamericfletcher/awesome-r-learning-resources</strong></a></li>\n<li><a href=\"https://github.com/dlang-community/awesome-d\"><strong>dlang-community/awesome-d</strong></a></li>\n<li><a href=\"https://github.com/CodyReichert/awesome-cl\"><strong>CodyReichert/awesome-cl</strong></a></li>\n<li><a href=\"https://github.com/GustavBertram/awesome-common-lisp-learning\"><strong>GustavBertram/awesome-common-lisp-learning</strong></a></li>\n<li><a href=\"https://github.com/hachiojipm/awesome-perl\"><strong>hachiojipm/awesome-perl</strong></a></li>\n<li><a href=\"https://github.com/kdabir/awesome-groovy\"><strong>kdabir/awesome-groovy</strong></a></li>\n<li><a href=\"https://github.com/yissachar/awesome-dart\"><strong>yissachar/awesome-dart</strong></a></li>\n<li><a href=\"https://github.com/akullpp/awesome-java\"><strong>akullpp/awesome-java</strong></a></li>\n<li><a href=\"https://github.com/eleventigers/awesome-rxjava\"><strong>eleventigers/awesome-rxjava</strong></a></li>\n<li><a href=\"https://github.com/KotlinBy/awesome-kotlin\"><strong>KotlinBy/awesome-kotlin</strong></a></li>\n<li><a href=\"https://github.com/ocaml-community/awesome-ocaml\"><strong>ocaml-community/awesome-ocaml</strong></a></li>\n<li><a href=\"https://github.com/seancoyne/awesome-coldfusion\"><strong>seancoyne/awesome-coldfusion</strong></a></li>\n<li><a href=\"https://github.com/rabbiabram/awesome-fortran\"><strong>rabbiabram/awesome-fortran</strong></a></li>\n<li><a href=\"https://github.com/ziadoz/awesome-php\"><strong>ziadoz/awesome-php</strong></a></li>\n<li><a href=\"https://github.com/jakoch/awesome-composer\"><strong>jakoch/awesome-composer</strong></a></li>\n<li><a href=\"https://github.com/Fr0sT-Brutal/awesome-pascal\"><strong>Fr0sT-Brutal/awesome-pascal</strong></a></li>\n<li><a href=\"https://github.com/ahkscript/awesome-AutoHotkey\"><strong>ahkscript/awesome-AutoHotkey</strong></a></li>\n<li><a href=\"https://github.com/J2TeaM/awesome-AutoIt\"><strong>J2TeaM/awesome-AutoIt</strong></a></li>\n<li><a href=\"https://github.com/veelenga/awesome-crystal\"><strong>veelenga/awesome-crystal</strong></a></li>\n<li><a href=\"https://github.com/sfischer13/awesome-frege\"><strong>sfischer13/awesome-frege</strong></a></li>\n<li><a href=\"https://github.com/onqtam/awesome-cmake\"><strong>onqtam/awesome-cmake</strong></a></li>\n<li><a href=\"https://github.com/robinrodricks/awesome-actionscript3\"><strong>robinrodricks/awesome-actionscript3</strong></a></li>\n<li><a href=\"https://github.com/sfischer13/awesome-eta\"><strong>sfischer13/awesome-eta</strong></a></li>\n<li><a href=\"https://github.com/joaomilho/awesome-idris\"><strong>joaomilho/awesome-idris</strong></a></li>\n<li><a href=\"https://github.com/ohenley/awesome-ada\"><strong>ohenley/awesome-ada</strong></a></li>\n<li><a href=\"https://github.com/ebraminio/awesome-qsharp\"><strong>ebraminio/awesome-qsharp</strong></a></li>\n<li><a href=\"https://github.com/koolamusic/awesome-imba\"><strong>koolamusic/awesome-imba</strong></a></li>\n<li><a href=\"https://github.com/desiderantes/awesome-vala\"><strong>desiderantes/awesome-vala</strong></a></li>\n<li><a href=\"https://github.com/coq-community/awesome-coq\"><strong>coq-community/awesome-coq</strong></a></li>\n<li><a href=\"https://github.com/vlang/awesome-v\"><strong>vlang/awesome-v</strong></a></li>\n<li><a href=\"https://github.com/addyosmani/es6-tools\"><strong>addyosmani/es6-tools</strong></a></li>\n<li><a href=\"https://github.com/davidsonfellipe/awesome-wpo\"><strong>davidsonfellipe/awesome-wpo</strong></a></li>\n<li><a href=\"https://github.com/lvwzhen/tools\"><strong>lvwzhen/tools</strong></a></li>\n<li><a href=\"https://github.com/awesome-css-group/awesome-css\"><strong>awesome-css-group/awesome-css</strong></a></li>\n<li><a href=\"https://github.com/addyosmani/critical-path-css-tools\"><strong>addyosmani/critical-path-css-tools</strong></a></li>\n<li><a href=\"https://github.com/davidtheclark/scalable-css-reading-list\"><strong>davidtheclark/scalable-css-reading-list</strong></a></li>\n<li><a href=\"https://github.com/AllThingsSmitty/must-watch-css\"><strong>AllThingsSmitty/must-watch-css</strong></a></li>\n<li><a href=\"https://github.com/AllThingsSmitty/css-protips\"><strong>AllThingsSmitty/css-protips</strong></a></li>\n<li><a href=\"https://github.com/troxler/awesome-css-frameworks\"><strong>troxler/awesome-css-frameworks</strong></a></li>\n<li><a href=\"https://github.com/enaqx/awesome-react\"><strong>enaqx/awesome-react</strong></a></li>\n<li><a href=\"https://github.com/expede/awesome-relay\"><strong>expede/awesome-relay</strong></a></li>\n<li><a href=\"https://github.com/glauberfc/awesome-react-hooks\"><strong>glauberfc/awesome-react-hooks</strong></a></li>\n<li><a href=\"https://github.com/mateusortiz/webcomponents-the-right-way\"><strong>mateusortiz/webcomponents-the-right-way</strong></a></li>\n<li><a href=\"https://github.com/Granze/awesome-polymer\"><strong>Granze/awesome-polymer</strong></a></li>\n<li><a href=\"https://github.com/PatrickJS/awesome-angular\"><strong>PatrickJS/awesome-angular</strong></a></li>\n<li><a href=\"https://github.com/sadcitizen/awesome-backbone\"><strong>sadcitizen/awesome-backbone</strong></a></li>\n<li><a href=\"https://github.com/diegocard/awesome-html5\"><strong>diegocard/awesome-html5</strong></a></li>\n<li><a href=\"https://github.com/willianjusten/awesome-svg\"><strong>willianjusten/awesome-svg</strong></a></li>\n<li><a href=\"https://github.com/raphamorim/awesome-canvas\"><strong>raphamorim/awesome-canvas</strong></a></li>\n<li><a href=\"https://github.com/dnbard/awesome-knockout\"><strong>dnbard/awesome-knockout</strong></a></li>\n<li><a href=\"https://github.com/petk/awesome-dojo\"><strong>petk/awesome-dojo</strong></a></li>\n<li><a href=\"https://github.com/NoahBuscher/Inspire\"><strong>NoahBuscher/Inspire</strong></a></li>\n<li><a href=\"https://github.com/ember-community-russia/awesome-ember\"><strong>ember-community-russia/awesome-ember</strong></a></li>\n<li><a href=\"https://github.com/wasabeef/awesome-android-ui\"><strong>wasabeef/awesome-android-ui</strong></a></li>\n<li><a href=\"https://github.com/cjwirth/awesome-ios-ui\"><strong>cjwirth/awesome-ios-ui</strong></a></li>\n<li><a href=\"https://github.com/Urigo/awesome-meteor\"><strong>Urigo/awesome-meteor</strong></a></li>\n<li><a href=\"https://github.com/sturobson/BEM-resources\"><strong>sturobson/BEM-resources</strong></a></li>\n<li><a href=\"https://github.com/afonsopacifer/awesome-flexbox\"><strong>afonsopacifer/awesome-flexbox</strong></a></li>\n<li><a href=\"https://github.com/deanhume/typography\"><strong>deanhume/typography</strong></a></li>\n<li><a href=\"https://github.com/brunopulis/awesome-a11y\"><strong>brunopulis/awesome-a11y</strong></a></li>\n<li><a href=\"https://github.com/sachin1092/awesome-material\"><strong>sachin1092/awesome-material</strong></a></li>\n<li><a href=\"https://github.com/wbkd/awesome-d3\"><strong>wbkd/awesome-d3</strong></a></li>\n<li><a href=\"https://github.com/jonathandion/awesome-emails\"><strong>jonathandion/awesome-emails</strong></a></li>\n<li><a href=\"https://github.com/petk/awesome-jquery\"><strong>petk/awesome-jquery</strong></a></li>\n<li><a href=\"https://github.com/AllThingsSmitty/jquery-tips-everyone-should-know\"><strong>AllThingsSmitty/jquery-tips-everyone-should-know</strong></a></li>\n<li><a href=\"https://github.com/notthetup/awesome-webaudio\"><strong>notthetup/awesome-webaudio</strong></a></li>\n<li><a href=\"https://github.com/pazguille/offline-first\"><strong>pazguille/offline-first</strong></a></li>\n<li><a href=\"https://github.com/agarrharr/awesome-static-website-services\"><strong>agarrharr/awesome-static-website-services</strong></a></li>\n<li><a href=\"https://github.com/cyclejs-community/awesome-cyclejs\"><strong>cyclejs-community/awesome-cyclejs</strong></a></li>\n<li><a href=\"https://github.com/dok/awesome-text-editing\"><strong>dok/awesome-text-editing</strong></a></li>\n<li><a href=\"https://github.com/fliptheweb/motion-ui-design\"><strong>fliptheweb/motion-ui-design</strong></a></li>\n<li><a href=\"https://github.com/vuejs/awesome-vue\"><strong>vuejs/awesome-vue</strong></a></li>\n<li><a href=\"https://github.com/sadcitizen/awesome-marionette\"><strong>sadcitizen/awesome-marionette</strong></a></li>\n<li><a href=\"https://github.com/aurelia-contrib/awesome-aurelia\"><strong>aurelia-contrib/awesome-aurelia</strong></a></li>\n<li><a href=\"https://github.com/zingchart/awesome-charting\"><strong>zingchart/awesome-charting</strong></a></li>\n<li><a href=\"https://github.com/candelibas/awesome-ionic\"><strong>candelibas/awesome-ionic</strong></a></li>\n<li><a href=\"https://github.com/ChromeDevTools/awesome-chrome-devtools\"><strong>ChromeDevTools/awesome-chrome-devtools</strong></a></li>\n<li><a href=\"https://github.com/jdrgomes/awesome-postcss\"><strong>jdrgomes/awesome-postcss</strong></a></li>\n<li><a href=\"https://github.com/nikgraf/awesome-draft-js\"><strong>nikgraf/awesome-draft-js</strong></a></li>\n<li><a href=\"https://github.com/TalAter/awesome-service-workers\"><strong>TalAter/awesome-service-workers</strong></a></li>\n<li><a href=\"https://github.com/TalAter/awesome-progressive-web-apps\"><strong>TalAter/awesome-progressive-web-apps</strong></a></li>\n<li><a href=\"https://github.com/choojs/awesome-choo\"><strong>choojs/awesome-choo</strong></a></li>\n<li><a href=\"https://github.com/brillout/awesome-redux\"><strong>brillout/awesome-redux</strong></a></li>\n<li><a href=\"https://github.com/webpack-contrib/awesome-webpack\"><strong>webpack-contrib/awesome-webpack</strong></a></li>\n<li><a href=\"https://github.com/browserify/awesome-browserify\"><strong>browserify/awesome-browserify</strong></a></li>\n<li><a href=\"https://github.com/Famolus/awesome-sass\"><strong>Famolus/awesome-sass</strong></a></li>\n<li><a href=\"https://github.com/websemantics/awesome-ant-design\"><strong>websemantics/awesome-ant-design</strong></a></li>\n<li><a href=\"https://github.com/LucasBassetti/awesome-less\"><strong>LucasBassetti/awesome-less</strong></a></li>\n<li><a href=\"https://github.com/sjfricke/awesome-webgl\"><strong>sjfricke/awesome-webgl</strong></a></li>\n<li><a href=\"https://github.com/preactjs/awesome-preact\"><strong>preactjs/awesome-preact</strong></a></li>\n<li><a href=\"https://github.com/jbmoelker/progressive-enhancement-resources\"><strong>jbmoelker/progressive-enhancement-resources</strong></a></li>\n<li><a href=\"https://github.com/unicodeveloper/awesome-nextjs\"><strong>unicodeveloper/awesome-nextjs</strong></a></li>\n<li><a href=\"https://github.com/web-padawan/awesome-lit-html\"><strong>web-padawan/awesome-lit-html</strong></a></li>\n<li><a href=\"https://github.com/automata/awesome-jamstack\"><strong>automata/awesome-jamstack</strong></a></li>\n<li><a href=\"https://github.com/henrikwirth/awesome-wordpress-gatsby\"><strong>henrikwirth/awesome-wordpress-gatsby</strong></a></li>\n<li><a href=\"https://github.com/myshov/awesome-mobile-web-development\"><strong>myshov/awesome-mobile-web-development</strong></a></li>\n<li><a href=\"https://github.com/lauthieb/awesome-storybook\"><strong>lauthieb/awesome-storybook</strong></a></li>\n<li><a href=\"https://github.com/AdrienTorris/awesome-blazor\"><strong>AdrienTorris/awesome-blazor</strong></a></li>\n<li><a href=\"https://github.com/csabapalfi/awesome-pagespeed-metrics\"><strong>csabapalfi/awesome-pagespeed-metrics</strong></a></li>\n<li><a href=\"https://github.com/aniftyco/awesome-tailwindcss\"><strong>aniftyco/awesome-tailwindcss</strong></a></li>\n<li><a href=\"https://github.com/seed-rs/awesome-seed-rs\"><strong>seed-rs/awesome-seed-rs</strong></a></li>\n<li><a href=\"https://github.com/pajaydev/awesome-web-performance-budget\"><strong>pajaydev/awesome-web-performance-budget</strong></a></li>\n<li><a href=\"https://github.com/sergey-pimenov/awesome-web-animation\"><strong>sergey-pimenov/awesome-web-animation</strong></a></li>\n<li><a href=\"https://github.com/jetli/awesome-yew\"><strong>jetli/awesome-yew</strong></a></li>\n<li><a href=\"https://github.com/nadunindunil/awesome-material-ui\"><strong>nadunindunil/awesome-material-ui</strong></a></li>\n<li><a href=\"https://github.com/componently-com/awesome-building-blocks-for-web-apps\"><strong>componently-com/awesome-building-blocks-for-web-apps</strong></a></li>\n<li><a href=\"https://github.com/TheComputerM/awesome-svelte\"><strong>TheComputerM/awesome-svelte</strong></a></li>\n<li><a href=\"https://github.com/klaufel/awesome-design-systems\"><strong>klaufel/awesome-design-systems</strong></a></li>\n<li><a href=\"https://github.com/innocenzi/awesome-inertiajs\"><strong>innocenzi/awesome-inertiajs</strong></a></li>\n<li><a href=\"https://github.com/mdbootstrap/awesome-mdbootstrap\"><strong>mdbootstrap/awesome-mdbootstrap</strong></a></li>\n<li><a href=\"https://github.com/mjhea0/awesome-flask\"><strong>mjhea0/awesome-flask</strong></a></li>\n<li><a href=\"https://github.com/veggiemonk/awesome-docker\"><strong>veggiemonk/awesome-docker</strong></a></li>\n<li><a href=\"https://github.com/iJackUA/awesome-vagrant\"><strong>iJackUA/awesome-vagrant</strong></a></li>\n<li><a href=\"https://github.com/uralbash/awesome-pyramid\"><strong>uralbash/awesome-pyramid</strong></a></li>\n<li><a href=\"https://github.com/PerfectCarl/awesome-play1\"><strong>PerfectCarl/awesome-play1</strong></a></li>\n<li><a href=\"https://github.com/friendsofcake/awesome-cakephp\"><strong>friendsofcake/awesome-cakephp</strong></a></li>\n<li><a href=\"https://github.com/sitepoint-editors/awesome-symfony\"><strong>sitepoint-editors/awesome-symfony</strong></a></li>\n<li><a href=\"https://github.com/pehapkari/awesome-symfony-education\"><strong>pehapkari/awesome-symfony-education</strong></a></li>\n<li><a href=\"https://github.com/chiraggude/awesome-laravel\"><strong>chiraggude/awesome-laravel</strong></a></li>\n<li><a href=\"https://github.com/fukuball/Awesome-Laravel-Education\"><strong>fukuball/Awesome-Laravel-Education</strong></a></li>\n<li><a href=\"https://github.com/blade-ui-kit/awesome-tall-stack\"><strong>blade-ui-kit/awesome-tall-stack</strong></a></li>\n<li><a href=\"https://github.com/gramantin/awesome-rails\"><strong>gramantin/awesome-rails</strong></a></li>\n<li><a href=\"https://github.com/hothero/awesome-rails-gem\"><strong>hothero/awesome-rails-gem</strong></a></li>\n<li><a href=\"https://github.com/phalcon/awesome-phalcon\"><strong>phalcon/awesome-phalcon</strong></a></li>\n<li><a href=\"https://github.com/phanan/htaccess\"><strong>phanan/htaccess</strong></a></li>\n<li><a href=\"https://github.com/fcambus/nginx-resources\"><strong>fcambus/nginx-resources</strong></a></li>\n<li><a href=\"https://github.com/stve/awesome-dropwizard\"><strong>stve/awesome-dropwizard</strong></a></li>\n<li><a href=\"https://github.com/ramitsurana/awesome-kubernetes\"><strong>ramitsurana/awesome-kubernetes</strong></a></li>\n<li><a href=\"https://github.com/unicodeveloper/awesome-lumen\"><strong>unicodeveloper/awesome-lumen</strong></a></li>\n<li><a href=\"https://github.com/pmuens/awesome-serverless\"><strong>pmuens/awesome-serverless</strong></a></li>\n<li><a href=\"https://github.com/PhantomYdn/awesome-wicket\"><strong>PhantomYdn/awesome-wicket</strong></a></li>\n<li><a href=\"https://github.com/vert-x3/vertx-awesome\"><strong>vert-x3/vertx-awesome</strong></a></li>\n<li><a href=\"https://github.com/shuaibiyy/awesome-terraform\"><strong>shuaibiyy/awesome-terraform</strong></a></li>\n<li><a href=\"https://github.com/Cellane/awesome-vapor\"><strong>Cellane/awesome-vapor</strong></a></li>\n<li><a href=\"https://github.com/ucg8j/awesome-dash\"><strong>ucg8j/awesome-dash</strong></a></li>\n<li><a href=\"https://github.com/mjhea0/awesome-fastapi\"><strong>mjhea0/awesome-fastapi</strong></a></li>\n<li><a href=\"https://github.com/kolomied/awesome-cdk\"><strong>kolomied/awesome-cdk</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-iam\"><strong>kdeldycke/awesome-iam</strong></a></li>\n<li><a href=\"https://github.com/prakhar1989/awesome-courses\"><strong>prakhar1989/awesome-courses</strong></a></li>\n<li><a href=\"https://github.com/academic/awesome-datascience\"><strong>academic/awesome-datascience</strong></a></li>\n<li><a href=\"https://github.com/siboehm/awesome-learn-datascience\"><strong>siboehm/awesome-learn-datascience</strong></a></li>\n<li><a href=\"https://github.com/josephmisiti/awesome-machine-learning\"><strong>josephmisiti/awesome-machine-learning</strong></a></li>\n<li><a href=\"https://github.com/ujjwalkarn/Machine-Learning-Tutorials\"><strong>ujjwalkarn/Machine-Learning-Tutorials</strong></a></li>\n<li><a href=\"https://github.com/arbox/machine-learning-with-ruby\"><strong>arbox/machine-learning-with-ruby</strong></a></li>\n<li><a href=\"https://github.com/likedan/Awesome-CoreML-Models\"><strong>likedan/Awesome-CoreML-Models</strong></a></li>\n<li><a href=\"https://github.com/h2oai/awesome-h2o\"><strong>h2oai/awesome-h2o</strong></a></li>\n<li><a href=\"https://github.com/SE-ML/awesome-seml\"><strong>SE-ML/awesome-seml</strong></a></li>\n<li><a href=\"https://github.com/georgezouq/awesome-ai-in-finance\"><strong>georgezouq/awesome-ai-in-finance</strong></a></li>\n<li><a href=\"https://github.com/n2cholas/awesome-jax\"><strong>n2cholas/awesome-jax</strong></a></li>\n<li><a href=\"https://github.com/altamiracorp/awesome-xai\"><strong>altamiracorp/awesome-xai</strong></a></li>\n<li><a href=\"https://github.com/edobashira/speech-language-processing\"><strong>edobashira/speech-language-processing</strong></a></li>\n<li><a href=\"https://github.com/dav009/awesome-spanish-nlp\"><strong>dav009/awesome-spanish-nlp</strong></a></li>\n<li><a href=\"https://github.com/arbox/nlp-with-ruby\"><strong>arbox/nlp-with-ruby</strong></a></li>\n<li><a href=\"https://github.com/seriousran/awesome-qa\"><strong>seriousran/awesome-qa</strong></a></li>\n<li><a href=\"https://github.com/tokenmill/awesome-nlg\"><strong>tokenmill/awesome-nlg</strong></a></li>\n<li><a href=\"https://github.com/theimpossibleastronaut/awesome-linguistics\"><strong>theimpossibleastronaut/awesome-linguistics</strong></a></li>\n<li><a href=\"https://github.com/sobolevn/awesome-cryptography\"><strong>sobolevn/awesome-cryptography</strong></a></li>\n<li><a href=\"https://github.com/pFarb/awesome-crypto-papers\"><strong>pFarb/awesome-crypto-papers</strong></a></li>\n<li><a href=\"https://github.com/jbhuang0604/awesome-computer-vision\"><strong>jbhuang0604/awesome-computer-vision</strong></a></li>\n<li><a href=\"https://github.com/ChristosChristofidis/awesome-deep-learning\"><strong>ChristosChristofidis/awesome-deep-learning</strong></a></li>\n<li><a href=\"https://github.com/jtoy/awesome-tensorflow\"><strong>jtoy/awesome-tensorflow</strong></a></li>\n<li><a href=\"https://github.com/aaronhma/awesome-tensorflow-js\"><strong>aaronhma/awesome-tensorflow-js</strong></a></li>\n<li><a href=\"https://github.com/margaretmz/awesome-tensorflow-lite\"><strong>margaretmz/awesome-tensorflow-lite</strong></a></li>\n<li><a href=\"https://github.com/terryum/awesome-deep-learning-papers\"><strong>terryum/awesome-deep-learning-papers</strong></a></li>\n<li><a href=\"https://github.com/guillaume-chevalier/awesome-deep-learning-resources\"><strong>guillaume-chevalier/awesome-deep-learning-resources</strong></a></li>\n<li><a href=\"https://github.com/kjw0612/awesome-deep-vision\"><strong>kjw0612/awesome-deep-vision</strong></a></li>\n<li><a href=\"https://github.com/ossu/computer-science\"><strong>ossu/computer-science</strong></a></li>\n<li><a href=\"https://github.com/lucasviola/awesome-functional-programming\"><strong>lucasviola/awesome-functional-programming</strong></a></li>\n<li><a href=\"https://github.com/dspinellis/awesome-msr\"><strong>dspinellis/awesome-msr</strong></a></li>\n<li><a href=\"https://github.com/analysis-tools-dev/static-analysis\"><strong>analysis-tools-dev/static-analysis</strong></a></li>\n<li><a href=\"https://github.com/harpribot/awesome-information-retrieval\"><strong>harpribot/awesome-information-retrieval</strong></a></li>\n<li><a href=\"https://github.com/desireevl/awesome-quantum-computing\"><strong>desireevl/awesome-quantum-computing</strong></a></li>\n<li><a href=\"https://github.com/mostafatouny/awesome-theoretical-computer-science\"><strong>mostafatouny/awesome-theoretical-computer-science</strong></a></li>\n<li><a href=\"https://github.com/onurakpolat/awesome-bigdata\"><strong>onurakpolat/awesome-bigdata</strong></a></li>\n<li><a href=\"https://github.com/awesomedata/awesome-public-datasets\"><strong>awesomedata/awesome-public-datasets</strong></a></li>\n<li><a href=\"https://github.com/youngwookim/awesome-hadoop\"><strong>youngwookim/awesome-hadoop</strong></a></li>\n<li><a href=\"https://github.com/igorbarinov/awesome-data-engineering\"><strong>igorbarinov/awesome-data-engineering</strong></a></li>\n<li><a href=\"https://github.com/manuzhang/awesome-streaming\"><strong>manuzhang/awesome-streaming</strong></a></li>\n<li><a href=\"https://github.com/awesome-spark/awesome-spark\"><strong>awesome-spark/awesome-spark</strong></a></li>\n<li><a href=\"https://github.com/ambster-public/awesome-qlik\"><strong>ambster-public/awesome-qlik</strong></a></li>\n<li><a href=\"https://github.com/sduff/awesome-splunk\"><strong>sduff/awesome-splunk</strong></a></li>\n<li><a href=\"https://github.com/papers-we-love/papers-we-love\"><strong>papers-we-love/papers-we-love</strong></a></li>\n<li><a href=\"https://github.com/JanVanRyswyck/awesome-talks\"><strong>JanVanRyswyck/awesome-talks</strong></a></li>\n<li><a href=\"https://github.com/tayllan/awesome-algorithms\"><strong>tayllan/awesome-algorithms</strong></a></li>\n<li><a href=\"https://github.com/gaerae/awesome-algorithms-education\"><strong>gaerae/awesome-algorithms-education</strong></a></li>\n<li><a href=\"https://github.com/enjalot/algovis\"><strong>enjalot/algovis</strong></a></li>\n<li><a href=\"https://github.com/owainlewis/awesome-artificial-intelligence\"><strong>owainlewis/awesome-artificial-intelligence</strong></a></li>\n<li><a href=\"https://github.com/marcobiedermann/search-engine-optimization\"><strong>marcobiedermann/search-engine-optimization</strong></a></li>\n<li><a href=\"https://github.com/lnishan/awesome-competitive-programming\"><strong>lnishan/awesome-competitive-programming</strong></a></li>\n<li><a href=\"https://github.com/rossant/awesome-math\"><strong>rossant/awesome-math</strong></a></li>\n<li><a href=\"https://github.com/passy/awesome-recursion-schemes\"><strong>passy/awesome-recursion-schemes</strong></a></li>\n<li><a href=\"https://github.com/EbookFoundation/free-programming-books\"><strong>EbookFoundation/free-programming-books</strong></a></li>\n<li><a href=\"https://github.com/dariubs/GoBooks\"><strong>dariubs/GoBooks</strong></a></li>\n<li><a href=\"https://github.com/RomanTsegelskyi/rbooks\"><strong>RomanTsegelskyi/rbooks</strong></a></li>\n<li><a href=\"https://github.com/hackerkid/Mind-Expanding-Books\"><strong>hackerkid/Mind-Expanding-Books</strong></a></li>\n<li><a href=\"https://github.com/TalAter/awesome-book-authoring\"><strong>TalAter/awesome-book-authoring</strong></a></li>\n<li><a href=\"https://github.com/sger/ElixirBooks\"><strong>sger/ElixirBooks</strong></a></li>\n<li><a href=\"https://github.com/dreikanter/sublime-bookmarks\"><strong>dreikanter/sublime-bookmarks</strong></a></li>\n<li><a href=\"https://github.com/mhinz/vim-galore\"><strong>mhinz/vim-galore</strong></a></li>\n<li><a href=\"https://github.com/emacs-tw/awesome-emacs\"><strong>emacs-tw/awesome-emacs</strong></a></li>\n<li><a href=\"https://github.com/mehcode/awesome-atom\"><strong>mehcode/awesome-atom</strong></a></li>\n<li><a href=\"https://github.com/viatsko/awesome-vscode\"><strong>viatsko/awesome-vscode</strong></a></li>\n<li><a href=\"https://github.com/ellisonleao/magictools\"><strong>ellisonleao/magictools</strong></a></li>\n<li><a href=\"https://github.com/hzoo/awesome-gametalks\"><strong>hzoo/awesome-gametalks</strong></a></li>\n<li><a href=\"https://github.com/godotengine/awesome-godot\"><strong>godotengine/awesome-godot</strong></a></li>\n<li><a href=\"https://github.com/leereilly/games\"><strong>leereilly/games</strong></a></li>\n<li><a href=\"https://github.com/RyanNielson/awesome-unity\"><strong>RyanNielson/awesome-unity</strong></a></li>\n<li><a href=\"https://github.com/hkirat/awesome-chess\"><strong>hkirat/awesome-chess</strong></a></li>\n<li><a href=\"https://github.com/love2d-community/awesome-love2d\"><strong>love2d-community/awesome-love2d</strong></a></li>\n<li><a href=\"https://github.com/pico-8/awesome-PICO-8\"><strong>pico-8/awesome-PICO-8</strong></a></li>\n<li><a href=\"https://github.com/gbdev/awesome-gbdev\"><strong>gbdev/awesome-gbdev</strong></a></li>\n<li><a href=\"https://github.com/WebCreationClub/awesome-construct\"><strong>WebCreationClub/awesome-construct</strong></a></li>\n<li><a href=\"https://github.com/stetso/awesome-gideros\"><strong>stetso/awesome-gideros</strong></a></li>\n<li><a href=\"https://github.com/bs-community/awesome-minecraft\"><strong>bs-community/awesome-minecraft</strong></a></li>\n<li><a href=\"https://github.com/leomaurodesenv/game-datasets\"><strong>leomaurodesenv/game-datasets</strong></a></li>\n<li><a href=\"https://github.com/Dvergar/awesome-haxe-gamedev\"><strong>Dvergar/awesome-haxe-gamedev</strong></a></li>\n<li><a href=\"https://github.com/rafaskb/awesome-libgdx\"><strong>rafaskb/awesome-libgdx</strong></a></li>\n<li><a href=\"https://github.com/playcanvas/awesome-playcanvas\"><strong>playcanvas/awesome-playcanvas</strong></a></li>\n<li><a href=\"https://github.com/radek-sprta/awesome-game-remakes\"><strong>radek-sprta/awesome-game-remakes</strong></a></li>\n<li><a href=\"https://github.com/flame-engine/awesome-flame\"><strong>flame-engine/awesome-flame</strong></a></li>\n<li><a href=\"https://github.com/mhxion/awesome-discord-communities\"><strong>mhxion/awesome-discord-communities</strong></a></li>\n<li><a href=\"https://github.com/tobiasvl/awesome-chip-8\"><strong>tobiasvl/awesome-chip-8</strong></a></li>\n<li><a href=\"https://github.com/michelpereira/awesome-games-of-coding\"><strong>michelpereira/awesome-games-of-coding</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/quick-look-plugins\"><strong>sindresorhus/quick-look-plugins</strong></a></li>\n<li><a href=\"https://github.com/jondot/awesome-devenv\"><strong>jondot/awesome-devenv</strong></a></li>\n<li><a href=\"https://github.com/webpro/awesome-dotfiles\"><strong>webpro/awesome-dotfiles</strong></a></li>\n<li><a href=\"https://github.com/alebcay/awesome-shell\"><strong>alebcay/awesome-shell</strong></a></li>\n<li><a href=\"https://github.com/jorgebucaran/awsm.fish\"><strong>jorgebucaran/awsm.fish</strong></a></li>\n<li><a href=\"https://github.com/agarrharr/awesome-cli-apps\"><strong>agarrharr/awesome-cli-apps</strong></a></li>\n<li><a href=\"https://github.com/unixorn/awesome-zsh-plugins\"><strong>unixorn/awesome-zsh-plugins</strong></a></li>\n<li><a href=\"https://github.com/phillipadsmith/awesome-github\"><strong>phillipadsmith/awesome-github</strong></a></li>\n<li><a href=\"https://github.com/stefanbuck/awesome-browser-extensions-for-github\"><strong>stefanbuck/awesome-browser-extensions-for-github</strong></a></li>\n<li><a href=\"https://github.com/tiimgreen/github-cheat-sheet\"><strong>tiimgreen/github-cheat-sheet</strong></a></li>\n<li><a href=\"https://github.com/matchai/awesome-pinned-gists\"><strong>matchai/awesome-pinned-gists</strong></a></li>\n<li><a href=\"https://github.com/arslanbilal/git-cheat-sheet\"><strong>arslanbilal/git-cheat-sheet</strong></a></li>\n<li><a href=\"https://github.com/git-tips/tips\"><strong>git-tips/tips</strong></a></li>\n<li><a href=\"https://github.com/stevemao/awesome-git-addons\"><strong>stevemao/awesome-git-addons</strong></a></li>\n<li><a href=\"https://github.com/compscilauren/awesome-git-hooks\"><strong>compscilauren/awesome-git-hooks</strong></a></li>\n<li><a href=\"https://github.com/moul/awesome-ssh\"><strong>moul/awesome-ssh</strong></a></li>\n<li><a href=\"https://github.com/tvvocold/FOSS-for-Dev\"><strong>tvvocold/FOSS-for-Dev</strong></a></li>\n<li><a href=\"https://github.com/bnb/awesome-hyper\"><strong>bnb/awesome-hyper</strong></a></li>\n<li><a href=\"https://github.com/janikvonrotz/awesome-powershell\"><strong>janikvonrotz/awesome-powershell</strong></a></li>\n<li><a href=\"https://github.com/alfred-workflows/awesome-alfred-workflows\"><strong>alfred-workflows/awesome-alfred-workflows</strong></a></li>\n<li><a href=\"https://github.com/k4m4/terminals-are-sexy\"><strong>k4m4/terminals-are-sexy</strong></a></li>\n<li><a href=\"https://github.com/sdras/awesome-actions\"><strong>sdras/awesome-actions</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-scifi\"><strong>sindresorhus/awesome-scifi</strong></a></li>\n<li><a href=\"https://github.com/RichardLitt/awesome-fantasy\"><strong>RichardLitt/awesome-fantasy</strong></a></li>\n<li><a href=\"https://github.com/ayr-ton/awesome-geek-podcasts\"><strong>ayr-ton/awesome-geek-podcasts</strong></a></li>\n<li><a href=\"https://github.com/zudochkin/awesome-newsletters\"><strong>zudochkin/awesome-newsletters</strong></a></li>\n<li><a href=\"https://github.com/victorlaerte/awesome-it-quotes\"><strong>victorlaerte/awesome-it-quotes</strong></a></li>\n<li><a href=\"https://github.com/numetriclabz/awesome-db\"><strong>numetriclabz/awesome-db</strong></a></li>\n<li><a href=\"https://github.com/shlomi-noach/awesome-mysql\"><strong>shlomi-noach/awesome-mysql</strong></a></li>\n<li><a href=\"https://github.com/dahlia/awesome-sqlalchemy\"><strong>dahlia/awesome-sqlalchemy</strong></a></li>\n<li><a href=\"https://github.com/mark-rushakoff/awesome-influxdb\"><strong>mark-rushakoff/awesome-influxdb</strong></a></li>\n<li><a href=\"https://github.com/neueda/awesome-neo4j\"><strong>neueda/awesome-neo4j</strong></a></li>\n<li><a href=\"https://github.com/ramnes/awesome-mongodb\"><strong>ramnes/awesome-mongodb</strong></a></li>\n<li><a href=\"https://github.com/d3viant0ne/awesome-rethinkdb\"><strong>d3viant0ne/awesome-rethinkdb</strong></a></li>\n<li><a href=\"https://github.com/mohataher/awesome-tinkerpop\"><strong>mohataher/awesome-tinkerpop</strong></a></li>\n<li><a href=\"https://github.com/dhamaniasad/awesome-postgres\"><strong>dhamaniasad/awesome-postgres</strong></a></li>\n<li><a href=\"https://github.com/quangv/awesome-couchdb\"><strong>quangv/awesome-couchdb</strong></a></li>\n<li><a href=\"https://github.com/rayokota/awesome-hbase\"><strong>rayokota/awesome-hbase</strong></a></li>\n<li><a href=\"https://github.com/erictleung/awesome-nosql-guides\"><strong>erictleung/awesome-nosql-guides</strong></a></li>\n<li><a href=\"https://github.com/chrislatorres/awesome-contexture\"><strong>chrislatorres/awesome-contexture</strong></a></li>\n<li><a href=\"https://github.com/mgramin/awesome-db-tools\"><strong>mgramin/awesome-db-tools</strong></a></li>\n<li><a href=\"https://github.com/vaticle/typedb-awesome\"><strong>vaticle/typedb-awesome</strong></a></li>\n<li><a href=\"https://github.com/Anant/awesome-cassandra\"><strong>Anant/awesome-cassandra</strong></a></li>\n<li><a href=\"https://github.com/shime/creative-commons-media\"><strong>shime/creative-commons-media</strong></a></li>\n<li><a href=\"https://github.com/brabadu/awesome-fonts\"><strong>brabadu/awesome-fonts</strong></a></li>\n<li><a href=\"https://github.com/chrissimpkins/codeface\"><strong>chrissimpkins/codeface</strong></a></li>\n<li><a href=\"https://github.com/neutraltone/awesome-stock-resources\"><strong>neutraltone/awesome-stock-resources</strong></a></li>\n<li><a href=\"https://github.com/davisonio/awesome-gif\"><strong>davisonio/awesome-gif</strong></a></li>\n<li><a href=\"https://github.com/ciconia/awesome-music\"><strong>ciconia/awesome-music</strong></a></li>\n<li><a href=\"https://github.com/44bits/awesome-opensource-documents\"><strong>44bits/awesome-opensource-documents</strong></a></li>\n<li><a href=\"https://github.com/willianjusten/awesome-audio-visualization\"><strong>willianjusten/awesome-audio-visualization</strong></a></li>\n<li><a href=\"https://github.com/ebu/awesome-broadcasting\"><strong>ebu/awesome-broadcasting</strong></a></li>\n<li><a href=\"https://github.com/Siilwyn/awesome-pixel-art\"><strong>Siilwyn/awesome-pixel-art</strong></a></li>\n<li><a href=\"https://github.com/transitive-bullshit/awesome-ffmpeg\"><strong>transitive-bullshit/awesome-ffmpeg</strong></a></li>\n<li><a href=\"https://github.com/notlmn/awesome-icons\"><strong>notlmn/awesome-icons</strong></a></li>\n<li><a href=\"https://github.com/stingalleman/awesome-audiovisual\"><strong>stingalleman/awesome-audiovisual</strong></a></li>\n<li><a href=\"https://github.com/mfkl/awesome-vlc\"><strong>mfkl/awesome-vlc</strong></a></li>\n<li><a href=\"https://github.com/therebelrobot/awesome-workshopper\"><strong>therebelrobot/awesome-workshopper</strong></a></li>\n<li><a href=\"https://github.com/karlhorky/learn-to-program\"><strong>karlhorky/learn-to-program</strong></a></li>\n<li><a href=\"https://github.com/matteofigus/awesome-speaking\"><strong>matteofigus/awesome-speaking</strong></a></li>\n<li><a href=\"https://github.com/lucasviola/awesome-tech-videos\"><strong>lucasviola/awesome-tech-videos</strong></a></li>\n<li><a href=\"https://github.com/hangtwenty/dive-into-machine-learning\"><strong>hangtwenty/dive-into-machine-learning</strong></a></li>\n<li><a href=\"https://github.com/watson/awesome-computer-history\"><strong>watson/awesome-computer-history</strong></a></li>\n<li><a href=\"https://github.com/HollyAdele/awesome-programming-for-kids\"><strong>HollyAdele/awesome-programming-for-kids</strong></a></li>\n<li><a href=\"https://github.com/yrgo/awesome-educational-games\"><strong>yrgo/awesome-educational-games</strong></a></li>\n<li><a href=\"https://github.com/micromata/awesome-javascript-learning\"><strong>micromata/awesome-javascript-learning</strong></a></li>\n<li><a href=\"https://github.com/micromata/awesome-css-learning\"><strong>micromata/awesome-css-learning</strong></a></li>\n<li><a href=\"https://github.com/dend/awesome-product-management\"><strong>dend/awesome-product-management</strong></a></li>\n<li><a href=\"https://github.com/liuchong/awesome-roadmaps\"><strong>liuchong/awesome-roadmaps</strong></a></li>\n<li><a href=\"https://github.com/JoseDeFreitas/awesome-youtubers\"><strong>JoseDeFreitas/awesome-youtubers</strong></a></li>\n<li><a href=\"https://github.com/paragonie/awesome-appsec\"><strong>paragonie/awesome-appsec</strong></a></li>\n<li><a href=\"https://github.com/sbilly/awesome-security\"><strong>sbilly/awesome-security</strong></a></li>\n<li><a href=\"https://github.com/apsdehal/awesome-ctf\"><strong>apsdehal/awesome-ctf</strong></a></li>\n<li><a href=\"https://github.com/rshipp/awesome-malware-analysis\"><strong>rshipp/awesome-malware-analysis</strong></a></li>\n<li><a href=\"https://github.com/ashishb/android-security-awesome\"><strong>ashishb/android-security-awesome</strong></a></li>\n<li><a href=\"https://github.com/carpedm20/awesome-hacking\"><strong>carpedm20/awesome-hacking</strong></a></li>\n<li><a href=\"https://github.com/paralax/awesome-honeypots\"><strong>paralax/awesome-honeypots</strong></a></li>\n<li><a href=\"https://github.com/meirwah/awesome-incident-response\"><strong>meirwah/awesome-incident-response</strong></a></li>\n<li><a href=\"https://github.com/jaredthecoder/awesome-vehicle-security\"><strong>jaredthecoder/awesome-vehicle-security</strong></a></li>\n<li><a href=\"https://github.com/qazbnm456/awesome-web-security\"><strong>qazbnm456/awesome-web-security</strong></a></li>\n<li><a href=\"https://github.com/fabacab/awesome-lockpicking\"><strong>fabacab/awesome-lockpicking</strong></a></li>\n<li><a href=\"https://github.com/fabacab/awesome-cybersecurity-blueteam\"><strong>fabacab/awesome-cybersecurity-blueteam</strong></a></li>\n<li><a href=\"https://github.com/cpuu/awesome-fuzzing\"><strong>cpuu/awesome-fuzzing</strong></a></li>\n<li><a href=\"https://github.com/fkie-cad/awesome-embedded-and-iot-security\"><strong>fkie-cad/awesome-embedded-and-iot-security</strong></a></li>\n<li><a href=\"https://github.com/bakke92/awesome-gdpr\"><strong>bakke92/awesome-gdpr</strong></a></li>\n<li><a href=\"https://github.com/TaptuIT/awesome-devsecops\"><strong>TaptuIT/awesome-devsecops</strong></a></li>\n<li><a href=\"https://github.com/umbraco-community/awesome-umbraco\"><strong>umbraco-community/awesome-umbraco</strong></a></li>\n<li><a href=\"https://github.com/refinerycms-contrib/awesome-refinerycms\"><strong>refinerycms-contrib/awesome-refinerycms</strong></a></li>\n<li><a href=\"https://github.com/springload/awesome-wagtail\"><strong>springload/awesome-wagtail</strong></a></li>\n<li><a href=\"https://github.com/drmonkeyninja/awesome-textpattern\"><strong>drmonkeyninja/awesome-textpattern</strong></a></li>\n<li><a href=\"https://github.com/nirgn975/awesome-drupal\"><strong>nirgn975/awesome-drupal</strong></a></li>\n<li><a href=\"https://github.com/craftcms/awesome\"><strong>craftcms/awesome</strong></a></li>\n<li><a href=\"https://github.com/MartinMiles/Awesome-Sitecore\"><strong>MartinMiles/Awesome-Sitecore</strong></a></li>\n<li><a href=\"https://github.com/wernerkrauss/awesome-silverstripe-cms\"><strong>wernerkrauss/awesome-silverstripe-cms</strong></a></li>\n<li><a href=\"https://github.com/Kiloreux/awesome-robotics\"><strong>Kiloreux/awesome-robotics</strong></a></li>\n<li><a href=\"https://github.com/HQarroum/awesome-iot\"><strong>HQarroum/awesome-iot</strong></a></li>\n<li><a href=\"https://github.com/kitspace/awesome-electronics\"><strong>kitspace/awesome-electronics</strong></a></li>\n<li><a href=\"https://github.com/rabschi/awesome-beacon\"><strong>rabschi/awesome-beacon</strong></a></li>\n<li><a href=\"https://github.com/gitfrage/guitarspecs\"><strong>gitfrage/guitarspecs</strong></a></li>\n<li><a href=\"https://github.com/beardicus/awesome-plotters\"><strong>beardicus/awesome-plotters</strong></a></li>\n<li><a href=\"https://github.com/protontypes/awesome-robotic-tooling\"><strong>protontypes/awesome-robotic-tooling</strong></a></li>\n<li><a href=\"https://github.com/szenergy/awesome-lidar\"><strong>szenergy/awesome-lidar</strong></a></li>\n<li><a href=\"https://github.com/opencompany/awesome-open-company\"><strong>opencompany/awesome-open-company</strong></a></li>\n<li><a href=\"https://github.com/mmccaff/PlacesToPostYourStartup\"><strong>mmccaff/PlacesToPostYourStartup</strong></a></li>\n<li><a href=\"https://github.com/domenicosolazzo/awesome-okr\"><strong>domenicosolazzo/awesome-okr</strong></a></li>\n<li><a href=\"https://github.com/LappleApple/awesome-leading-and-managing\"><strong>LappleApple/awesome-leading-and-managing</strong></a></li>\n<li><a href=\"https://github.com/mezod/awesome-indie\"><strong>mezod/awesome-indie</strong></a></li>\n<li><a href=\"https://github.com/cjbarber/ToolsOfTheTrade\"><strong>cjbarber/ToolsOfTheTrade</strong></a></li>\n<li><a href=\"https://github.com/nglgzz/awesome-clean-tech\"><strong>nglgzz/awesome-clean-tech</strong></a></li>\n<li><a href=\"https://github.com/wardley-maps-community/awesome-wardley-maps\"><strong>wardley-maps-community/awesome-wardley-maps</strong></a></li>\n<li><a href=\"https://github.com/RayBB/awesome-social-enterprise\"><strong>RayBB/awesome-social-enterprise</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-engineering-team-management\"><strong>kdeldycke/awesome-engineering-team-management</strong></a></li>\n<li><a href=\"https://github.com/agamm/awesome-developer-first\"><strong>agamm/awesome-developer-first</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-billing\"><strong>kdeldycke/awesome-billing</strong></a></li>\n<li><a href=\"https://github.com/matiassingers/awesome-slack\"><strong>matiassingers/awesome-slack</strong></a></li>\n<li><a href=\"https://github.com/filipelinhares/awesome-slack\"><strong>filipelinhares/awesome-slack</strong></a></li>\n<li><a href=\"https://github.com/lukasz-madon/awesome-remote-job\"><strong>lukasz-madon/awesome-remote-job</strong></a></li>\n<li><a href=\"https://github.com/jyguyomarch/awesome-productivity\"><strong>jyguyomarch/awesome-productivity</strong></a></li>\n<li><a href=\"https://github.com/tramcar/awesome-job-boards\"><strong>tramcar/awesome-job-boards</strong></a></li>\n<li><a href=\"https://github.com/DopplerHQ/awesome-interview-questions\"><strong>DopplerHQ/awesome-interview-questions</strong></a></li>\n<li><a href=\"https://github.com/joho/awesome-code-review\"><strong>joho/awesome-code-review</strong></a></li>\n<li><a href=\"https://github.com/j0hnm4r5/awesome-creative-technology\"><strong>j0hnm4r5/awesome-creative-technology</strong></a></li>\n<li><a href=\"https://github.com/lodthe/awesome-internships\"><strong>lodthe/awesome-internships</strong></a></li>\n<li><a href=\"https://github.com/sdnds-tw/awesome-sdn\"><strong>sdnds-tw/awesome-sdn</strong></a></li>\n<li><a href=\"https://github.com/briatte/awesome-network-analysis\"><strong>briatte/awesome-network-analysis</strong></a></li>\n<li><a href=\"https://github.com/caesar0301/awesome-pcaptools\"><strong>caesar0301/awesome-pcaptools</strong></a></li>\n<li><a href=\"https://github.com/rtckit/awesome-rtc\"><strong>rtckit/awesome-rtc</strong></a></li>\n<li><a href=\"https://github.com/igorbarinov/awesome-bitcoin\"><strong>igorbarinov/awesome-bitcoin</strong></a></li>\n<li><a href=\"https://github.com/vhpoet/awesome-ripple\"><strong>vhpoet/awesome-ripple</strong></a></li>\n<li><a href=\"https://github.com/machinomy/awesome-non-financial-blockchain\"><strong>machinomy/awesome-non-financial-blockchain</strong></a></li>\n<li><a href=\"https://github.com/tleb/awesome-mastodon\"><strong>tleb/awesome-mastodon</strong></a></li>\n<li><a href=\"https://github.com/ttumiel/Awesome-Ethereum\"><strong>ttumiel/Awesome-Ethereum</strong></a></li>\n<li><a href=\"https://github.com/steven2358/awesome-blockchain-ai\"><strong>steven2358/awesome-blockchain-ai</strong></a></li>\n<li><a href=\"https://github.com/DanailMinchev/awesome-eosio\"><strong>DanailMinchev/awesome-eosio</strong></a></li>\n<li><a href=\"https://github.com/chainstack/awesome-corda\"><strong>chainstack/awesome-corda</strong></a></li>\n<li><a href=\"https://github.com/msmolyakov/awesome-waves\"><strong>msmolyakov/awesome-waves</strong></a></li>\n<li><a href=\"https://github.com/substrate-developer-hub/awesome-substrate\"><strong>substrate-developer-hub/awesome-substrate</strong></a></li>\n<li><a href=\"https://github.com/golemfactory/awesome-golem\"><strong>golemfactory/awesome-golem</strong></a></li>\n<li><a href=\"https://github.com/friedger/awesome-stacks-chain\"><strong>friedger/awesome-stacks-chain</strong></a></li>\n<li><a href=\"https://github.com/eselkin/awesome-computational-neuroscience\"><strong>eselkin/awesome-computational-neuroscience</strong></a></li>\n<li><a href=\"https://github.com/maehr/awesome-digital-history\"><strong>maehr/awesome-digital-history</strong></a></li>\n<li><a href=\"https://github.com/writing-resources/awesome-scientific-writing\"><strong>writing-resources/awesome-scientific-writing</strong></a></li>\n<li><a href=\"https://github.com/danvoyce/awesome-creative-tech-events\"><strong>danvoyce/awesome-creative-tech-events</strong></a></li>\n<li><a href=\"https://github.com/ildoc/awesome-italy-events\"><strong>ildoc/awesome-italy-events</strong></a></li>\n<li><a href=\"https://github.com/awkward/awesome-netherlands-events\"><strong>awkward/awesome-netherlands-events</strong></a></li>\n<li><a href=\"https://github.com/TheJambo/awesome-testing\"><strong>TheJambo/awesome-testing</strong></a></li>\n<li><a href=\"https://github.com/mojoaxel/awesome-regression-testing\"><strong>mojoaxel/awesome-regression-testing</strong></a></li>\n<li><a href=\"https://github.com/christian-bromann/awesome-selenium\"><strong>christian-bromann/awesome-selenium</strong></a></li>\n<li><a href=\"https://github.com/SrinivasanTarget/awesome-appium\"><strong>SrinivasanTarget/awesome-appium</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome-tap\"><strong>sindresorhus/awesome-tap</strong></a></li>\n<li><a href=\"https://github.com/aliesbelik/awesome-jmeter\"><strong>aliesbelik/awesome-jmeter</strong></a></li>\n<li><a href=\"https://github.com/k6io/awesome-k6\"><strong>k6io/awesome-k6</strong></a></li>\n<li><a href=\"https://github.com/mxschmitt/awesome-playwright\"><strong>mxschmitt/awesome-playwright</strong></a></li>\n<li><a href=\"https://github.com/fityanos/awesome-quality-assurance-roadmap\"><strong>fityanos/awesome-quality-assurance-roadmap</strong></a></li>\n<li><a href=\"https://github.com/burningtree/awesome-json\"><strong>burningtree/awesome-json</strong></a></li>\n<li><a href=\"https://github.com/tmcw/awesome-geojson\"><strong>tmcw/awesome-geojson</strong></a></li>\n<li><a href=\"https://github.com/jdorfman/awesome-json-datasets\"><strong>jdorfman/awesome-json-datasets</strong></a></li>\n<li><a href=\"https://github.com/secretGeek/awesomeCSV\"><strong>secretGeek/awesomeCSV</strong></a></li>\n<li><a href=\"https://github.com/AchoArnold/discount-for-student-dev\"><strong>AchoArnold/discount-for-student-dev</strong></a></li>\n<li><a href=\"https://github.com/kyleterry/awesome-radio\"><strong>kyleterry/awesome-radio</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/awesome\"><strong>sindresorhus/awesome</strong></a></li>\n<li><a href=\"https://github.com/onurakpolat/awesome-analytics\"><strong>onurakpolat/awesome-analytics</strong></a></li>\n<li><a href=\"https://github.com/marmelab/awesome-rest\"><strong>marmelab/awesome-rest</strong></a></li>\n<li><a href=\"https://github.com/cicdops/awesome-ciandcd\"><strong>cicdops/awesome-ciandcd</strong></a></li>\n<li><a href=\"https://github.com/mmcgrana/services-engineering\"><strong>mmcgrana/services-engineering</strong></a></li>\n<li><a href=\"https://github.com/ripienaar/free-for-dev\"><strong>ripienaar/free-for-dev</strong></a></li>\n<li><a href=\"https://github.com/cyberglot/awesome-answers\"><strong>cyberglot/awesome-answers</strong></a></li>\n<li><a href=\"https://github.com/diessica/awesome-sketch\"><strong>diessica/awesome-sketch</strong></a></li>\n<li><a href=\"https://github.com/melvin0008/awesome-projects-boilerplates\"><strong>melvin0008/awesome-projects-boilerplates</strong></a></li>\n<li><a href=\"https://github.com/matiassingers/awesome-readme\"><strong>matiassingers/awesome-readme</strong></a></li>\n<li><a href=\"https://github.com/NARKOZ/guides\"><strong>NARKOZ/guides</strong></a></li>\n<li><a href=\"https://github.com/kilimchoi/engineering-blogs\"><strong>kilimchoi/engineering-blogs</strong></a></li>\n<li><a href=\"https://github.com/awesome-selfhosted/awesome-selfhosted\"><strong>awesome-selfhosted/awesome-selfhosted</strong></a></li>\n<li><a href=\"https://github.com/DataDaoDe/awesome-foss-apps\"><strong>DataDaoDe/awesome-foss-apps</strong></a></li>\n<li><a href=\"https://github.com/alferov/awesome-gulp\"><strong>alferov/awesome-gulp</strong></a></li>\n<li><a href=\"https://github.com/sindresorhus/amas\"><strong>sindresorhus/amas</strong></a></li>\n<li><a href=\"https://github.com/stoeffel/awesome-ama-answers\"><strong>stoeffel/awesome-ama-answers</strong></a></li>\n<li><a href=\"https://github.com/ibaaj/awesome-OpenSourcePhotography\"><strong>ibaaj/awesome-OpenSourcePhotography</strong></a></li>\n<li><a href=\"https://github.com/eug/awesome-opengl\"><strong>eug/awesome-opengl</strong></a></li>\n<li><a href=\"https://github.com/chentsulin/awesome-graphql\"><strong>chentsulin/awesome-graphql</strong></a></li>\n<li><a href=\"https://github.com/APA-Technology-Division/urban-and-regional-planning-resources\"><strong>APA-Technology-Division/urban-and-regional-planning-resources</strong></a></li>\n<li><a href=\"https://github.com/CUTR-at-USF/awesome-transit\"><strong>CUTR-at-USF/awesome-transit</strong></a></li>\n<li><a href=\"https://github.com/emptymalei/awesome-research\"><strong>emptymalei/awesome-research</strong></a></li>\n<li><a href=\"https://github.com/fasouto/awesome-dataviz\"><strong>fasouto/awesome-dataviz</strong></a></li>\n<li><a href=\"https://github.com/vinkla/shareable-links\"><strong>vinkla/shareable-links</strong></a></li>\n<li><a href=\"https://github.com/mfornos/awesome-microservices\"><strong>mfornos/awesome-microservices</strong></a></li>\n<li><a href=\"https://github.com/jagracey/Awesome-Unicode\"><strong>jagracey/Awesome-Unicode</strong></a></li>\n<li><a href=\"https://github.com/Codepoints/awesome-codepoints\"><strong>Codepoints/awesome-codepoints</strong></a></li>\n<li><a href=\"https://github.com/MunGell/awesome-for-beginners\"><strong>MunGell/awesome-for-beginners</strong></a></li>\n<li><a href=\"https://github.com/gamontal/awesome-katas\"><strong>gamontal/awesome-katas</strong></a></li>\n<li><a href=\"https://github.com/drewrwilson/toolsforactivism\"><strong>drewrwilson/toolsforactivism</strong></a></li>\n<li><a href=\"https://github.com/dylanrees/citizen-science\"><strong>dylanrees/citizen-science</strong></a></li>\n<li><a href=\"https://github.com/hobbyquaker/awesome-mqtt\"><strong>hobbyquaker/awesome-mqtt</strong></a></li>\n<li><a href=\"https://github.com/daviddias/awesome-hacking-locations\"><strong>daviddias/awesome-hacking-locations</strong></a></li>\n<li><a href=\"https://github.com/cristianoliveira/awesome4girls\"><strong>cristianoliveira/awesome4girls</strong></a></li>\n<li><a href=\"https://github.com/vorpaljs/awesome-vorpal\"><strong>vorpaljs/awesome-vorpal</strong></a></li>\n<li><a href=\"https://github.com/vinjn/awesome-vulkan\"><strong>vinjn/awesome-vulkan</strong></a></li>\n<li><a href=\"https://github.com/egeerardyn/awesome-LaTeX\"><strong>egeerardyn/awesome-LaTeX</strong></a></li>\n<li><a href=\"https://github.com/antontarasenko/awesome-economics\"><strong>antontarasenko/awesome-economics</strong></a></li>\n<li><a href=\"https://github.com/sublimino/awesome-funny-markov\"><strong>sublimino/awesome-funny-markov</strong></a></li>\n<li><a href=\"https://github.com/danielecook/Awesome-Bioinformatics\"><strong>danielecook/Awesome-Bioinformatics</strong></a></li>\n<li><a href=\"https://github.com/hsiaoyi0504/awesome-cheminformatics\"><strong>hsiaoyi0504/awesome-cheminformatics</strong></a></li>\n<li><a href=\"https://github.com/Siddharth11/Colorful\"><strong>Siddharth11/Colorful</strong></a></li>\n<li><a href=\"https://github.com/scholtzm/awesome-steam\"><strong>scholtzm/awesome-steam</strong></a></li>\n<li><a href=\"https://github.com/hackerkid/bots\"><strong>hackerkid/bots</strong></a></li>\n<li><a href=\"https://github.com/dastergon/awesome-sre\"><strong>dastergon/awesome-sre</strong></a></li>\n<li><a href=\"https://github.com/KimberlyMunoz/empathy-in-engineering\"><strong>KimberlyMunoz/empathy-in-engineering</strong></a></li>\n<li><a href=\"https://github.com/xen0l/awesome-dtrace\"><strong>xen0l/awesome-dtrace</strong></a></li>\n<li><a href=\"https://github.com/bvolpato/awesome-userscripts\"><strong>bvolpato/awesome-userscripts</strong></a></li>\n<li><a href=\"https://github.com/tobiasbueschel/awesome-pokemon\"><strong>tobiasbueschel/awesome-pokemon</strong></a></li>\n<li><a href=\"https://github.com/exAspArk/awesome-chatops\"><strong>exAspArk/awesome-chatops</strong></a></li>\n<li><a href=\"https://github.com/kdeldycke/awesome-falsehood\"><strong>kdeldycke/awesome-falsehood</strong></a></li>\n<li><a href=\"https://github.com/heynickc/awesome-ddd\"><strong>heynickc/awesome-ddd</strong></a></li>\n<li><a href=\"https://github.com/woop/awesome-quantified-self\"><strong>woop/awesome-quantified-self</strong></a></li>\n<li><a href=\"https://github.com/hbokh/awesome-saltstack\"><strong>hbokh/awesome-saltstack</strong></a></li>\n<li><a href=\"https://github.com/nicolesaidy/awesome-web-design\"><strong>nicolesaidy/awesome-web-design</strong></a></li>\n<li><a href=\"https://github.com/terkelg/awesome-creative-coding\"><strong>terkelg/awesome-creative-coding</strong></a></li>\n<li><a href=\"https://github.com/aviaryan/awesome-no-login-web-apps\"><strong>aviaryan/awesome-no-login-web-apps</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-free-software\"><strong>johnjago/awesome-free-software</strong></a></li>\n<li><a href=\"https://github.com/podo/awesome-framer\"><strong>podo/awesome-framer</strong></a></li>\n<li><a href=\"https://github.com/BubuAnabelas/awesome-markdown\"><strong>BubuAnabelas/awesome-markdown</strong></a></li>\n<li><a href=\"https://github.com/mislavcimpersak/awesome-dev-fun\"><strong>mislavcimpersak/awesome-dev-fun</strong></a></li>\n<li><a href=\"https://github.com/kakoni/awesome-healthcare\"><strong>kakoni/awesome-healthcare</strong></a></li>\n<li><a href=\"https://github.com/DavidLambauer/awesome-magento2\"><strong>DavidLambauer/awesome-magento2</strong></a></li>\n<li><a href=\"https://github.com/xiaohanyu/awesome-tikz\"><strong>xiaohanyu/awesome-tikz</strong></a></li>\n<li><a href=\"https://github.com/analyticalmonk/awesome-neuroscience\"><strong>analyticalmonk/awesome-neuroscience</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-ad-free\"><strong>johnjago/awesome-ad-free</strong></a></li>\n<li><a href=\"https://github.com/angrykoala/awesome-esolangs\"><strong>angrykoala/awesome-esolangs</strong></a></li>\n<li><a href=\"https://github.com/roaldnefs/awesome-prometheus\"><strong>roaldnefs/awesome-prometheus</strong></a></li>\n<li><a href=\"https://github.com/homematic-community/awesome-homematic\"><strong>homematic-community/awesome-homematic</strong></a></li>\n<li><a href=\"https://github.com/sfischer13/awesome-ledger\"><strong>sfischer13/awesome-ledger</strong></a></li>\n<li><a href=\"https://github.com/thomasbnt/awesome-web-monetization\"><strong>thomasbnt/awesome-web-monetization</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-uncopyright\"><strong>johnjago/awesome-uncopyright</strong></a></li>\n<li><a href=\"https://github.com/Zheaoli/awesome-coins\"><strong>Zheaoli/awesome-coins</strong></a></li>\n<li><a href=\"https://github.com/folkswhocode/awesome-diversity\"><strong>folkswhocode/awesome-diversity</strong></a></li>\n<li><a href=\"https://github.com/zachflower/awesome-open-source-supporters\"><strong>zachflower/awesome-open-source-supporters</strong></a></li>\n<li><a href=\"https://github.com/robinstickel/awesome-design-principles\"><strong>robinstickel/awesome-design-principles</strong></a></li>\n<li><a href=\"https://github.com/johnjago/awesome-theravada\"><strong>johnjago/awesome-theravada</strong></a></li>\n<li><a href=\"https://github.com/inspectit-labs/awesome-inspectit\"><strong>inspectit-labs/awesome-inspectit</strong></a></li>\n<li><a href=\"https://github.com/nayafia/awesome-maintainers\"><strong>nayafia/awesome-maintainers</strong></a></li>\n<li><a href=\"https://github.com/xxczaki/awesome-calculators\"><strong>xxczaki/awesome-calculators</strong></a></li>\n<li><a href=\"https://github.com/ZYSzys/awesome-captcha\"><strong>ZYSzys/awesome-captcha</strong></a></li>\n<li><a href=\"https://github.com/markusschanta/awesome-jupyter\"><strong>markusschanta/awesome-jupyter</strong></a></li>\n<li><a href=\"https://github.com/andrewda/awesome-frc\"><strong>andrewda/awesome-frc</strong></a></li>\n<li><a href=\"https://github.com/humanetech-community/awesome-humane-tech\"><strong>humanetech-community/awesome-humane-tech</strong></a></li>\n<li><a href=\"https://github.com/karlhorky/awesome-speakers\"><strong>karlhorky/awesome-speakers</strong></a></li>\n<li><a href=\"https://github.com/edm00se/awesome-board-games\"><strong>edm00se/awesome-board-games</strong></a></li>\n<li><a href=\"https://github.com/uraimo/awesome-software-patreons\"><strong>uraimo/awesome-software-patreons</strong></a></li>\n<li><a href=\"https://github.com/ecohealthalliance/awesome-parasite\"><strong>ecohealthalliance/awesome-parasite</strong></a></li>\n<li><a href=\"https://github.com/jzarca01/awesome-food\"><strong>jzarca01/awesome-food</strong></a></li>\n<li><a href=\"https://github.com/dreamingechoes/awesome-mental-health\"><strong>dreamingechoes/awesome-mental-health</strong></a></li>\n<li><a href=\"https://github.com/alexk111/awesome-bitcoin-payment-processors\"><strong>alexk111/awesome-bitcoin-payment-processors</strong></a></li>\n<li><a href=\"https://github.com/nschloe/awesome-scientific-computing\"><strong>nschloe/awesome-scientific-computing</strong></a></li>\n<li><a href=\"https://github.com/ScaleLeap/awesome-amazon-seller\"><strong>ScaleLeap/awesome-amazon-seller</strong></a></li>\n<li><a href=\"https://github.com/brycejohnston/awesome-agriculture\"><strong>brycejohnston/awesome-agriculture</strong></a></li>\n<li><a href=\"https://github.com/matttga/awesome-product-design\"><strong>matttga/awesome-product-design</strong></a></li>\n<li><a href=\"https://github.com/catalinmiron/awesome-prisma\"><strong>catalinmiron/awesome-prisma</strong></a></li>\n<li><a href=\"https://github.com/simskij/awesome-software-architecture\"><strong>simskij/awesome-software-architecture</strong></a></li>\n<li><a href=\"https://github.com/stevesong/awesome-connectivity-info\"><strong>stevesong/awesome-connectivity-info</strong></a></li>\n<li><a href=\"https://github.com/stackshareio/awesome-stacks\"><strong>stackshareio/awesome-stacks</strong></a></li>\n<li><a href=\"https://github.com/cytodata/awesome-cytodata\"><strong>cytodata/awesome-cytodata</strong></a></li>\n<li><a href=\"https://github.com/davisonio/awesome-irc\"><strong>davisonio/awesome-irc</strong></a></li>\n<li><a href=\"https://github.com/cenoura/awesome-ads\"><strong>cenoura/awesome-ads</strong></a></li>\n<li><a href=\"https://github.com/philsturgeon/awesome-earth\"><strong>philsturgeon/awesome-earth</strong></a></li>\n<li><a href=\"https://github.com/gruhn/awesome-naming\"><strong>gruhn/awesome-naming</strong></a></li>\n<li><a href=\"https://github.com/caufieldjh/awesome-bioie\"><strong>caufieldjh/awesome-bioie</strong></a></li>\n<li><a href=\"https://github.com/iipc/awesome-web-archiving\"><strong>iipc/awesome-web-archiving</strong></a></li>\n<li><a href=\"https://github.com/schlessera/awesome-wp-cli\"><strong>schlessera/awesome-wp-cli</strong></a></li>\n<li><a href=\"https://github.com/mourarthur/awesome-credit-modeling\"><strong>mourarthur/awesome-credit-modeling</strong></a></li>\n<li><a href=\"https://github.com/KeyboardInterrupt/awesome-ansible\"><strong>KeyboardInterrupt/awesome-ansible</strong></a></li>\n<li><a href=\"https://github.com/keller-mark/awesome-biological-visualizations\"><strong>keller-mark/awesome-biological-visualizations</strong></a></li>\n<li><a href=\"https://github.com/aureooms/awesome-qr-code\"><strong>aureooms/awesome-qr-code</strong></a></li>\n<li><a href=\"https://github.com/sdassow/awesome-veganism\"><strong>sdassow/awesome-veganism</strong></a></li>\n<li><a href=\"https://github.com/mbiesiad/awesome-translations\"><strong>mbiesiad/awesome-translations</strong></a></li>\n<li><a href=\"https://github.com/dersvenhesse/awesome-scriptable\"><strong>dersvenhesse/awesome-scriptable</strong></a></li>\n<li><a href=\"https://github.com/topics/awesome\"><strong>topics/awesome</strong></a></li>\n<li><a href=\"https://awesome-indexed.mathew-davies.co.uk\"><strong>https://awesome-indexed.mathew-davies.co.uk</strong></a></li>\n<li><a href=\"https://awesomelists.top\"><strong>https://awesomelists.top</strong></a></li>\n<li><a href=\"https://github.com/basharovV/StumbleUponAwesome\"><strong>basharovV/StumbleUponAwesome</strong></a></li>\n<li><a href=\"https://github.com/umutphp/awesome-cli\"><strong>umutphp/awesome-cli</strong></a></li>\n<li><a href=\"http://awesome.digitalbunker.dev\"><strong>http://awesome.digitalbunker.dev</strong></a></li>\n<li><a href=\"https://www.trackawesomelist.com\"><strong>https://www.trackawesomelist.com</strong></a></li>\n</ul>"},{"url":"/docs/reference/web-api's/","relativePath":"docs/reference/web-api's.md","relativeDir":"docs/reference","base":"web-api's.md","name":"web-api's","frontmatter":{"title":"Web Apis","weight":0,"excerpt":"When writing code for the Web, there are a large number of Web APIs available. Below is a list of all the APIs and interfaces (object types) that you may be able to use while developing your Web app or site","seo":{"title":"Web Apis","description":"When writing code for the Web, there are a large number of Web APIs available. Below is a list of all the APIs and interfaces (object types) that you may be able to use while developing your Web app or site","robots":[],"extra":[]},"template":"docs"},"html":"<h2></h2>\n<h1>Web APIs</h1>\n<p>When writing code for the Web, there are a large number of Web APIs available. Below is a list of all the APIs and interfaces (object types) that you may be able to use while developing your Web app or site.</p>\n<p>Web APIs are typically used with JavaScript, although this doesn't always have to be the case.</p>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API#specifications\" title=\"Permalink to Specifications\">Specifications</a></h2>\n<p>This is a list of all the APIs that are available.</p>\n<p>B</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Background_Fetch_API\">Background Fetch API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API\">Background Tasks</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API\">Barcode Detection API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API\">Battery API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API\">Beacon</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API\">Bluetooth API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API\">Broadcast Channel API</a></li>\n</ul>\n<p>C</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSS_Counter_Styles\">CSS Counter Styles</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSS_Font_Loading_API\">CSS Font Loading API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSS_Painting_API\">CSS Painting API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API\">CSS Typed Object Model API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model\">CSSOM</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API\">Canvas API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Channel_Messaging_API\">Channel Messaging API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API\">Clipboard API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Console_API\">Console API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Contact_Picker_API\">Contact Picker API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Content_Index_API\">Content Index API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Credential_Management_API\">Credential Management API</a></li>\n</ul>\n<p>D</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model\">DOM</a></li>\n</ul>\n<p>E</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API\">Encoding API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions</a></li>\n</ul>\n<p>F</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\">Fetch API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\">File System Access API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API\">File and Directory Entries API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API\">Fullscreen API</a></li>\n</ul>\n<p>G</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API\">Gamepad API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API\">Geolocation API</a></li>\n</ul>\n<p>H</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API\">HTML Drag and Drop API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API\">HTML Sanitizer API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Performance_API\">High Resolution Time</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History_API\">History API</a></li>\n</ul>\n<p>I</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Image_Capture_API\">Image Capture API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API\">IndexedDB</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API\">Intersection Observer API</a></li>\n</ul>\n<p>L</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Layout_Instability_API\">Layout Instability API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Long_Tasks_API\">Long Tasks API</a></li>\n</ul>\n<p>M</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Media_Capabilities_API\">Media Capabilities API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API\">Media Capture and Streams</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API\">Media Session API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API\">Media Source Extensions</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API\">MediaStream Recording</a></li>\n</ul>\n<p>N</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API\">Navigation Timing</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API\">Network Information API</a></li>\n</ul>\n<p>P</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API\">Page Visibility API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API\">Payment Request API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Performance_API\">Performance API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Performance_Timeline\">Performance Timeline API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Periodic_Background_Synchronization_API\">Periodic Background Sync</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API\">Permissions API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Picture-in-Picture_API\">Picture-in-Picture API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events\">Pointer Events</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API\">Pointer Lock API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Presentation_API\">Presentation API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Proximity_Events\">Proximity Events</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Push_API\">Push API</a></li>\n</ul>\n<p>R</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API\">Resize Observer API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API\">Resource Timing API</a></li>\n</ul>\n<p>S</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API\">Screen Capture API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Screen_Orientation_API\">Screen Orientation API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API\">Screen Wake Lock API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Sensor_APIs\">Sensor API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events\">Server Sent Events</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API\">Service Workers API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Storage_API\">Storage</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API\">Storage Access API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Streams_API\">Streams</a></li>\n</ul>\n<p>T</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Touch_events\">Touch Events</a></li>\n</ul>\n<p>U</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/URL_API\">URL API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API\">URL Pattern API</a></li>\n</ul>\n<p>V</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API\">Vibration API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Visual_Viewport_API\">Visual Viewport</a></li>\n</ul>\n<p>W</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API\">Web Animations</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API\">Web Audio API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API\">Web Authentication API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API\">Web Crypto API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API\">Web MIDI API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API\">Web Notifications</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_API\">Web Share API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API\">Web Speech API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API\">Web Storage API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API\">Web Workers API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API\">WebCodecs API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API\">WebGL</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API\">WebHID API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API\">WebRTC</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebVR_API\">WebVR API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API\">WebVTT</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API\">WebXR Device API</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API\">Websockets API</a></li>\n</ul>\n<p>X</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\">XMLHttpRequest</a></li>\n</ul>\n<h2><a href=\"https://developer.mozilla.org/en-US/docs/Web/API#interfaces\" title=\"Permalink to Interfaces\">Interfaces</a></h2>\n<p>This is a list of all the interfaces (that is, types of objects) that are available.</p>\n<p>A</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AbortController\"><code>AbortController</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\"><code>AbortSignal</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AbsoluteOrientationSensor\"><code>AbsoluteOrientationSensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange\"><code>AbstractRange</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer\"><code>Accelerometer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AddressErrors\"><code>AddressErrors</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AesCbcParams\"><code>AesCbcParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AesCtrParams\"><code>AesCtrParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AesGcmParams\"><code>AesGcmParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AesKeyGenParams\"><code>AesKeyGenParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AmbientLightSensor\"><code>AmbientLightSensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode\"><code>AnalyserNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays\"><code>ANGLE_instanced_arrays</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Animation\"><code>Animation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect\"><code>AnimationEffect</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\"><code>AnimationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent\"><code>AnimationPlaybackEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AnimationTimeline\"><code>AnimationTimeline</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView\"><code>ArrayBufferView</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/atob\"><code>atob()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Attr\"><code>Attr</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer\"><code>AudioBuffer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode\"><code>AudioBufferSourceNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioConfiguration\"><code>AudioConfiguration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\"><code>AudioContext</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioData\"><code>AudioData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder\"><code>AudioDecoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode\"><code>AudioDestinationNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder\"><code>AudioEncoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioListener\"><code>AudioListener</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioNode\"><code>AudioNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioParam\"><code>AudioParam</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioParamDescriptor\"><code>AudioParamDescriptor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioParamMap\"><code>AudioParamMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent\"><code>AudioProcessingEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode\"><code>AudioScheduledSourceNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack\"><code>AudioTrack</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList\"><code>AudioTrackList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet\"><code>AudioWorklet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope\"><code>AudioWorkletGlobalScope</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode\"><code>AudioWorkletNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor\"><code>AudioWorkletProcessor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse\"><code>AuthenticatorAssertionResponse</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse\"><code>AuthenticatorAttestationResponse</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorResponse\"><code>AuthenticatorResponse</code></a></li>\n</ul>\n<p>B</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchEvent\"><code>BackgroundFetchEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchManager\"><code>BackgroundFetchManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchRecord\"><code>BackgroundFetchRecord</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchRegistration\"><code>BackgroundFetchRegistration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent\"><code>BackgroundFetchUpdateUIEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector\"><code>BarcodeDetector</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BarProp\"><code>BarProp</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext\"><code>BaseAudioContext</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager\"><code>BatteryManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent\"><code>BeforeInstallPromptEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent\"><code>BeforeUnloadEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\"><code>BiquadFilterNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Blob\"><code>Blob</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BlobBuilder\"><code>BlobBuilder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BlobEvent\"><code>BlobEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth\"><code>Bluetooth</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothCharacteristicProperties\"><code>BluetoothCharacteristicProperties</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice\"><code>BluetoothDevice</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTCharacteristic\"><code>BluetoothRemoteGATTCharacteristic</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor\"><code>BluetoothRemoteGATTDescriptor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTServer\"><code>BluetoothRemoteGATTServer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService\"><code>BluetoothRemoteGATTService</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BluetoothUUID\"><code>BluetoothUUID</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\"><code>BroadcastChannel</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/btoa\"><code>btoa()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/BufferSource\"><code>BufferSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ByteLengthQueuingStrategy\"><code>ByteLengthQueuingStrategy</code></a></li>\n</ul>\n<p>C</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Cache\"><code>Cache</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/caches\"><code>caches</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage\"><code>CacheStorage</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CanvasCaptureMediaStreamTrack\"><code>CanvasCaptureMediaStreamTrack</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient\"><code>CanvasGradient</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CanvasImageSource\"><code>CanvasImageSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern\"><code>CanvasPattern</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D\"><code>CanvasRenderingContext2D</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition\"><code>CaretPosition</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CDATASection\"><code>CDATASection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ChannelMergerNode\"><code>ChannelMergerNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ChannelSplitterNode\"><code>ChannelSplitterNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CharacterData\"><code>CharacterData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/clearInterval\"><code>clearInterval()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/clearTimeout\"><code>clearTimeout()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Client\"><code>Client</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Clients\"><code>Clients</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Clipboard\"><code>Clipboard</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent\"><code>ClipboardEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem\"><code>ClipboardItem</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent\"><code>CloseEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Comment\"><code>Comment</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\"><code>CompositionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream\"><code>CompressionStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/console\"><code>console</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode\"><code>ConstantSourceNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ContactsManager\"><code>ContactsManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ContentIndex\"><code>ContentIndex</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ContentIndexEvent\"><code>ContentIndexEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode\"><code>ConvolverNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent\"><code>CookieChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CookieStore\"><code>CookieStore</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CookieStoreManager\"><code>CookieStoreManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CountQueuingStrategy\"><code>CountQueuingStrategy</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CrashReportBody\"><code>CrashReportBody</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap\"><code>createImageBitmap()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Credential\"><code>Credential</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer\"><code>CredentialsContainer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated\"><code>crossOriginIsolated</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Crypto\"><code>Crypto</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey\"><code>CryptoKey</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CryptoKeyPair\"><code>CryptoKeyPair</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSS\"><code>CSS</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSAnimation\"><code>CSSAnimation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSConditionRule\"><code>CSSConditionRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSCounterStyleRule\"><code>CSSCounterStyleRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFaceRule\"><code>CSSFontFaceRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSGroupingRule\"><code>CSSGroupingRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSImageValue\"><code>CSSImageValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSImportRule\"><code>CSSImportRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSKeyframeRule\"><code>CSSKeyframeRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSKeyframesRule\"><code>CSSKeyframesRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSKeywordValue\"><code>CSSKeywordValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathInvert\"><code>CSSMathInvert</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathMax\"><code>CSSMathMax</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathMin\"><code>CSSMathMin</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathNegate\"><code>CSSMathNegate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathProduct\"><code>CSSMathProduct</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathSum\"><code>CSSMathSum</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue\"><code>CSSMathValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMatrixComponent\"><code>CSSMatrixComponent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSMediaRule\"><code>CSSMediaRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSNamespaceRule\"><code>CSSNamespaceRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericArray\"><code>CSSNumericArray</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue\"><code>CSSNumericValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSOMString\"><code>CSSOMString</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSPageRule\"><code>CSSPageRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSPerspective\"><code>CSSPerspective</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSPositionValue\"><code>CSSPositionValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSPrimitiveValue\"><code>CSSPrimitiveValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSPropertyRule\"><code>CSSPropertyRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSPseudoElement\"><code>CSSPseudoElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSRotate\"><code>CSSRotate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSRule\"><code>CSSRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSRuleList\"><code>CSSRuleList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSScale\"><code>CSSScale</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSSkew\"><code>CSSSkew</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSSkewX\"><code>CSSSkewX</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSSkewY\"><code>CSSSkewY</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration\"><code>CSSStyleDeclaration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleRule\"><code>CSSStyleRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet\"><code>CSSStyleSheet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleValue\"><code>CSSStyleValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSSupportsRule\"><code>CSSSupportsRule</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSTransformComponent\"><code>CSSTransformComponent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSTransformValue\"><code>CSSTransformValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSTransition\"><code>CSSTransition</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSTranslate\"><code>CSSTranslate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSUnitValue\"><code>CSSUnitValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSUnparsedValue\"><code>CSSUnparsedValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSValue\"><code>CSSValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSValueList\"><code>CSSValueList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CSSVariableReferenceValue\"><code>CSSVariableReferenceValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry\"><code>CustomElementRegistry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent\"><code>CustomEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet\"><code>CustomStateSet</code></a></li>\n</ul>\n<p>D</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer\"><code>DataTransfer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem\"><code>DataTransferItem</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList\"><code>DataTransferItemList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream\"><code>DecompressionStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope\"><code>DedicatedWorkerGlobalScope</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DelayNode\"><code>DelayNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DeprecationReportBody\"><code>DeprecationReportBody</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent\"><code>DeviceMotionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEventAcceleration\"><code>DeviceMotionEventAcceleration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEventRotationRate\"><code>DeviceMotionEventRotationRate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent\"><code>DeviceOrientationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent\"><code>DeviceProximityEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DirectoryEntrySync\"><code>DirectoryEntrySync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReaderSync\"><code>DirectoryReaderSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DisplayMediaStreamConstraints\"><code>DisplayMediaStreamConstraints</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document\"><code>Document</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment\"><code>DocumentFragment</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DocumentTimeline\"><code>DocumentTimeline</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DocumentType\"><code>DocumentType</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMError\"><code>DOMError</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMException\"><code>DOMException</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation\"><code>DOMImplementation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix\"><code>DOMMatrix</code> (WebKitCSSMatrix)</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrixReadOnly\"><code>DOMMatrixReadOnly</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\"><code>DOMParser</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMPoint\"><code>DOMPoint</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMPointReadOnly\"><code>DOMPointReadOnly</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMQuad\"><code>DOMQuad</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMRect\"><code>DOMRect</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly\"><code>DOMRectReadOnly</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMString\"><code>DOMString</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMStringList\"><code>DOMStringList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMStringMap\"><code>DOMStringMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMTimeStamp\"><code>DOMTimeStamp</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList\"><code>DOMTokenList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DragEvent\"><code>DragEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode\"><code>DynamicsCompressorNode</code></a></li>\n</ul>\n<p>E</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EcdhKeyDeriveParams\"><code>EcdhKeyDeriveParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EcdsaParams\"><code>EcdsaParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EcKeyGenParams\"><code>EcKeyGenParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EcKeyImportParams\"><code>EcKeyImportParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Element\"><code>Element</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals\"><code>ElementInternals</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk\"><code>EncodedAudioChunk</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk\"><code>EncodedVideoChunk</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent\"><code>ErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Event\"><code>Event</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EventListener\"><code>EventListener</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EventSource\"><code>EventSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\"><code>EventTarget</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_blend_minmax\"><code>EXT_blend_minmax</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_color_buffer_float\"><code>EXT_color_buffer_float</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_color_buffer_half_float\"><code>EXT_color_buffer_half_float</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_disjoint_timer_query\"><code>EXT_disjoint_timer_query</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_float_blend\"><code>EXT_float_blend</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_frag_depth\"><code>EXT_frag_depth</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_shader_texture_lod\"><code>EXT_shader_texture_lod</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_sRGB\"><code>EXT_sRGB</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_texture_compression_bptc\"><code>EXT_texture_compression_bptc</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_texture_compression_rgtc\"><code>EXT_texture_compression_rgtc</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_texture_filter_anisotropic\"><code>EXT_texture_filter_anisotropic</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/EXT_texture_norm16\"><code>EXT_texture_norm16</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent\"><code>ExtendableCookieChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent\"><code>ExtendableEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ExtendableMessageEvent\"><code>ExtendableMessageEvent</code></a></li>\n</ul>\n<p>F</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FeaturePolicy\"><code>FeaturePolicy</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FederatedCredential\"><code>FederatedCredential</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/fetch\"><code>fetch()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent\"><code>FetchEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/File\"><code>File</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileEntrySync\"><code>FileEntrySync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileException\"><code>FileException</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileList\"><code>FileList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileReader\"><code>FileReader</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync\"><code>FileReaderSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileRequest\"><code>FileRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystem\"><code>FileSystem</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry\"><code>FileSystemDirectoryEntry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle\"><code>FileSystemDirectoryHandle</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader\"><code>FileSystemDirectoryReader</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry\"><code>FileSystemEntry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntrySync\"><code>FileSystemEntrySync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry\"><code>FileSystemFileEntry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle\"><code>FileSystemFileHandle</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFlags\"><code>FileSystemFlags</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle\"><code>FileSystemHandle</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSync\"><code>FileSystemSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream\"><code>FileSystemWritableFileStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent\"><code>FocusEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FontFace\"><code>FontFace</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet\"><code>FontFaceSet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSetLoadEvent\"><code>FontFaceSetLoadEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FormData\"><code>FormData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue\"><code>FormDataEntryValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FormDataEvent\"><code>FormDataEvent</code></a></li>\n</ul>\n<p>G</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GainNode\"><code>GainNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Gamepad\"><code>Gamepad</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GamepadButton\"><code>GamepadButton</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GamepadEvent\"><code>GamepadEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator\"><code>GamepadHapticActuator</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GamepadPose\"><code>GamepadPose</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Geolocation\"><code>Geolocation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates\"><code>GeolocationCoordinates</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition\"><code>GeolocationPosition</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPositionError\"><code>GeolocationPositionError</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent\"><code>GestureEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/getCandidateWindowClientRect\"><code>getCandidateWindowClientRect</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers\"><code>GlobalEventHandlers</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/GravitySensor\"><code>GravitySensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Gyroscope\"><code>Gyroscope</code></a></li>\n</ul>\n<p>H</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent\"><code>HashChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Headers\"><code>Headers</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HID\"><code>HID</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HIDConnectionEvent\"><code>HIDConnectionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice\"><code>HIDDevice</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent\"><code>HIDInputReportEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/History\"><code>History</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HkdfParams\"><code>HkdfParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HmacImportParams\"><code>HmacImportParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HmacKeyGenParams\"><code>HmacKeyGenParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HMDVRDevice\"><code>HMDVRDevice</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\"><code>HTMLAnchorElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAreaElement\"><code>HTMLAreaElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement\"><code>HTMLAudioElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBaseElement\"><code>HTMLBaseElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBaseFontElement\"><code>HTMLBaseFontElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBodyElement\"><code>HTMLBodyElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBRElement\"><code>HTMLBRElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement\"><code>HTMLButtonElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement\"><code>HTMLCanvasElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection\"><code>HTMLCollection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLContentElement\"><code>HTMLContentElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDataElement\"><code>HTMLDataElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDataListElement\"><code>HTMLDataListElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement\"><code>HTMLDetailsElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement\"><code>HTMLDialogElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement\"><code>HTMLDivElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDListElement\"><code>HTMLDListElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument\"><code>HTMLDocument</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\"><code>HTMLElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement\"><code>HTMLEmbedElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFieldSetElement\"><code>HTMLFieldSetElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement\"><code>HTMLFontElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection\"><code>HTMLFormControlsCollection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement\"><code>HTMLFormElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFrameSetElement\"><code>HTMLFrameSetElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadElement\"><code>HTMLHeadElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadingElement\"><code>HTMLHeadingElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement\"><code>HTMLHRElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHtmlElement\"><code>HTMLHtmlElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement\"><code>HTMLIFrameElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement\"><code>HTMLImageElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement\"><code>HTMLInputElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLKeygenElement\"><code>HTMLKeygenElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement\"><code>HTMLLabelElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement\"><code>HTMLLegendElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLIElement\"><code>HTMLLIElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement\"><code>HTMLLinkElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement\"><code>HTMLMapElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMarqueeElement\"><code>HTMLMarqueeElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMenuElement\"><code>HTMLMenuElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMenuItemElement\"><code>HTMLMenuItemElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement\"><code>HTMLMetaElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMeterElement\"><code>HTMLMeterElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement\"><code>HTMLModElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement\"><code>HTMLObjectElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement\"><code>HTMLOListElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptGroupElement\"><code>HTMLOptGroupElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement\"><code>HTMLOptionElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionsCollection\"><code>HTMLOptionsCollection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOutputElement\"><code>HTMLOutputElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement\"><code>HTMLParagraphElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement\"><code>HTMLParamElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLPictureElement\"><code>HTMLPictureElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLPreElement\"><code>HTMLPreElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLProgressElement\"><code>HTMLProgressElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLQuoteElement\"><code>HTMLQuoteElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement\"><code>HTMLScriptElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement\"><code>HTMLSelectElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLShadowElement\"><code>HTMLShadowElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement\"><code>HTMLSlotElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSourceElement\"><code>HTMLSourceElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSpanElement\"><code>HTMLSpanElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement\"><code>HTMLStyleElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCaptionElement\"><code>HTMLTableCaptionElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement\"><code>HTMLTableCellElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableColElement\"><code>HTMLTableColElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement\"><code>HTMLTableElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement\"><code>HTMLTableRowElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableSectionElement\"><code>HTMLTableSectionElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement\"><code>HTMLTemplateElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement\"><code>HTMLTextAreaElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement\"><code>HTMLTimeElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTitleElement\"><code>HTMLTitleElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement\"><code>HTMLTrackElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLUListElement\"><code>HTMLUListElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLUnknownElement\"><code>HTMLUnknownElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement\"><code>HTMLVideoElement</code></a></li>\n</ul>\n<p>I</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor\"><code>IDBCursor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBCursorSync\"><code>IDBCursorSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBCursorWithValue\"><code>IDBCursorWithValue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase\"><code>IDBDatabase</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabaseException\"><code>IDBDatabaseException</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabaseSync\"><code>IDBDatabaseSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBEnvironmentSync\"><code>IDBEnvironmentSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory\"><code>IDBFactory</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBFactorySync\"><code>IDBFactorySync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex\"><code>IDBIndex</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBIndexSync\"><code>IDBIndexSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange\"><code>IDBKeyRange</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBLocaleAwareKeyRange\"><code>IDBLocaleAwareKeyRange</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBMutableFile\"><code>IDBMutableFile</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore\"><code>IDBObjectStore</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStoreSync\"><code>IDBObjectStoreSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBOpenDBRequest\"><code>IDBOpenDBRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest\"><code>IDBRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction\"><code>IDBTransaction</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBTransactionSync\"><code>IDBTransactionSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent\"><code>IDBVersionChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline\"><code>IdleDeadline</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IIRFilterNode\"><code>IIRFilterNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap\"><code>ImageBitmap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapRenderingContext\"><code>ImageBitmapRenderingContext</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture\"><code>ImageCapture</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageData\"><code>ImageData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder\"><code>ImageDecoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageTrack\"><code>ImageTrack</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageTrackList\"><code>ImageTrackList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/indexedDB\"><code>indexedDB</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceCapabilities\"><code>InputDeviceCapabilities</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo\"><code>InputDeviceInfo</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/InputEvent\"><code>InputEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/InstallEvent\"><code>InstallEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver\"><code>IntersectionObserver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry\"><code>IntersectionObserverEntry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/InterventionReportBody\"><code>InterventionReportBody</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/isSecureContext\"><code>isSecureContext</code></a></li>\n</ul>\n<p>K</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Keyboard\"><code>Keyboard</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent\"><code>KeyboardEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardLayoutMap\"><code>KeyboardLayoutMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect\"><code>KeyframeEffect</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KHR_parallel_shader_compile\"><code>KHR_parallel_shader_compile</code></a></li>\n</ul>\n<p>L</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\"><code>LayoutShift</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LinearAccelerationSensor\"><code>LinearAccelerationSensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem\"><code>LocalFileSystem</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystemSync\"><code>LocalFileSystemSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Location\"><code>Location</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Lock\"><code>Lock</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LockedFile\"><code>LockedFile</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/LockManager\"><code>LockManager</code></a></li>\n</ul>\n<p>M</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer\"><code>Magnetometer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MathMLElement\"><code>MathMLElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaCapabilities\"><code>MediaCapabilities</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaConfiguration\"><code>MediaConfiguration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaDecodingConfiguration\"><code>MediaDecodingConfiguration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices\"><code>MediaDevices</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaElementAudioSourceNode\"><code>MediaElementAudioSourceNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaEncodingConfiguration\"><code>MediaEncodingConfiguration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaError\"><code>MediaError</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaImage\"><code>MediaImage</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaKeyMessageEvent\"><code>MediaKeyMessageEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys\"><code>MediaKeys</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession\"><code>MediaKeySession</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySystemAccess\"><code>MediaKeySystemAccess</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaList\"><code>MediaList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaMetadata\"><code>MediaMetadata</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList\"><code>MediaQueryList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent\"><code>MediaQueryListEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder\"><code>MediaRecorder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorderErrorEvent\"><code>MediaRecorderErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaSession\"><code>MediaSession</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaSessionActionDetails\"><code>MediaSessionActionDetails</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaSettingsRange\"><code>MediaSettingsRange</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\"><code>MediaSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream\"><code>MediaStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioDestinationNode\"><code>MediaStreamAudioDestinationNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioSourceOptions\"><code>MediaStreamAudioSourceOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints\"><code>MediaStreamConstraints</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamEvent\"><code>MediaStreamEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackAudioSourceNode\"><code>MediaStreamTrackAudioSourceNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackAudioSourceOptions\"><code>MediaStreamTrackAudioSourceOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackEvent\"><code>MediaStreamTrackEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackGenerator\"><code>MediaStreamTrackGenerator</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackProcessor\"><code>MediaStreamTrackProcessor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MerchantValidationEvent\"><code>MerchantValidationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel\"><code>MessageChannel</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent\"><code>MessageEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MessagePort\"><code>MessagePort</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Metadata\"><code>Metadata</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess\"><code>MIDIAccess</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIConnectionEvent\"><code>MIDIConnectionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIInput\"><code>MIDIInput</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIInputMap\"><code>MIDIInputMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent\"><code>MIDIMessageEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIOutput\"><code>MIDIOutput</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIOutputMap\"><code>MIDIOutputMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort\"><code>MIDIPort</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MimeType\"><code>MimeType</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MimeTypeArray\"><code>MimeTypeArray</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\"><code>MouseEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent\"><code>MouseScrollEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msCaching\"><code>msCaching</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msCachingEnabled\"><code>msCachingEnabled</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSCandidateWindowHide\"><code>MSCandidateWindowHide</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSCandidateWindowShow\"><code>MSCandidateWindowShow</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSCandidateWindowUpdate\"><code>MSCandidateWindowUpdate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msCapsLockWarningOff\"><code>msCapsLockWarningOff</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsFirstPaint\"><code>msFirstPaint</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSGestureEvent\"><code>MSGestureEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msGetPropertyEnabled\"><code>msGetPropertyEnabled</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msGetRegionContent\"><code>msGetRegionContent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSGraphicsTrust\"><code>MSGraphicsTrust</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsGraphicsTrustStatus\"><code>msGraphicsTrustStatus</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsIsBoxed\"><code>msIsBoxed</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSManipulationEvent\"><code>MSManipulationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsPlayToDisabled\"><code>msPlayToDisabled</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsPlayToPreferredSourceUri\"><code>msPlayToPreferredSourceUri</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsPlayToPrimary\"><code>msPlayToPrimary</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsPlayToSource\"><code>msPlayToSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msPutPropertyEnabled\"><code>msPutPropertyEnabled</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSRangeCollection\"><code>MSRangeCollection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsRealTime\"><code>msRealTime</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msRegionOverflow\"><code>msRegionOverflow</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MsSetMediaProtectionManager\"><code>msSetMediaProtectionManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MSSiteModeEvent\"><code>MSSiteModeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/msWriteProfilerMark\"><code>msWriteProfilerMark</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent\"><code>MutationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver\"><code>MutationObserver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord\"><code>MutationRecord</code></a></li>\n</ul>\n<p>N</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Navigator\"><code>Navigator</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NDEFMessage\"><code>NDEFMessage</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NDEFReader\"><code>NDEFReader</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NDEFReadingEvent\"><code>NDEFReadingEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NDEFRecord\"><code>NDEFRecord</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation\"><code>NetworkInformation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Node\"><code>Node</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NodeFilter\"><code>NodeFilter</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NodeIterator\"><code>NodeIterator</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NodeList\"><code>NodeList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Notification\"><code>Notification</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NotificationAction\"><code>NotificationAction</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent\"><code>NotificationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/NotifyAudioAvailableEvent\"><code>NotifyAudioAvailableEvent</code></a></li>\n</ul>\n<p>O</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_element_index_uint\"><code>OES_element_index_uint</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_fbo_render_mipmap\"><code>OES_fbo_render_mipmap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_standard_derivatives\"><code>OES_standard_derivatives</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_float\"><code>OES_texture_float</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_float_linear\"><code>OES_texture_float_linear</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_half_float\"><code>OES_texture_half_float</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_half_float_linear\"><code>OES_texture_half_float_linear</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OES_vertex_array_object\"><code>OES_vertex_array_object</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioCompletionEvent\"><code>OfflineAudioCompletionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas\"><code>OffscreenCanvas</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OrientationSensor\"><code>OrientationSensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/origin\"><code>origin</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode\"><code>OscillatorNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OTPCredential\"><code>OTPCredential</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OverconstrainedError\"><code>OverconstrainedError</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OVR_multiview2\"><code>OVR_multiview2</code></a></li>\n</ul>\n<p>P</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent\"><code>PageTransitionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaintWorklet\"><code>PaintWorklet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PannerNode\"><code>PannerNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PasswordCredential\"><code>PasswordCredential</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Path2D\"><code>Path2D</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentAddress\"><code>PaymentAddress</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentItem\"><code>PaymentItem</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent\"><code>PaymentMethodChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest\"><code>PaymentRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestUpdateEvent\"><code>PaymentRequestUpdateEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse\"><code>PaymentResponse</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PaymentValidationErrors\"><code>PaymentValidationErrors</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Pbkdf2Params\"><code>Pbkdf2Params</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Performance\"><code>Performance</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark\"><code>PerformanceMark</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMeasure\"><code>PerformanceMeasure</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigation\"><code>PerformanceNavigation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserverEntryList\"><code>PerformanceObserverEntryList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming\"><code>PerformancePaintTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceServerTiming\"><code>PerformanceServerTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PeriodicSyncEvent\"><code>PeriodicSyncEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PeriodicSyncManager\"><code>PeriodicSyncManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PeriodicWave\"><code>PeriodicWave</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Permissions\"><code>Permissions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus\"><code>PermissionStatus</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PhotoCapabilities\"><code>PhotoCapabilities</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PictureInPictureEvent\"><code>PictureInPictureEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PictureInPictureWindow\"><code>PictureInPictureWindow</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Plugin\"><code>Plugin</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PluginArray\"><code>PluginArray</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebKitPoint\"><code>Point</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent\"><code>PointerEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent\"><code>PopStateEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PositionSensorVRDevice\"><code>PositionSensorVRDevice</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Presentation\"><code>Presentation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationAvailability\"><code>PresentationAvailability</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection\"><code>PresentationConnection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionAvailableEvent\"><code>PresentationConnectionAvailableEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionCloseEvent\"><code>PresentationConnectionCloseEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionList\"><code>PresentationConnectionList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationReceiver\"><code>PresentationReceiver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest\"><code>PresentationRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ProcessingInstruction\"><code>ProcessingInstruction</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent\"><code>ProgressEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\"><code>PromiseRejectionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialRequestOptions\"><code>PublicKeyCredentialRequestOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PushEvent\"><code>PushEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PushManager\"><code>PushManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData\"><code>PushMessageData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription\"><code>PushSubscription</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/PushSubscriptionOptions\"><code>PushSubscriptionOptions</code></a></li>\n</ul>\n<p>Q</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask\"><code>queueMicrotask()</code></a></li>\n</ul>\n<p>R</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RadioNodeList\"><code>RadioNodeList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Range\"><code>Range</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController\"><code>ReadableByteStreamController</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\"><code>ReadableStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader\"><code>ReadableStreamBYOBReader</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest\"><code>ReadableStreamBYOBRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultController\"><code>ReadableStreamDefaultController</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader\"><code>ReadableStreamDefaultReader</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RelativeOrientationSensor\"><code>RelativeOrientationSensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RemotePlayback\"><code>RemotePlayback</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Report\"><code>Report</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReportBody\"><code>ReportBody</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/reportError\"><code>reportError()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReportingObserver\"><code>ReportingObserver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ReportingObserverOptions\"><code>ReportingObserverOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Request\"><code>Request</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver\"><code>ResizeObserver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry\"><code>ResizeObserverEntry</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverSize\"><code>ResizeObserverSize</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Response\"><code>Response</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RsaHashedImportParams\"><code>RsaHashedImportParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RsaHashedKeyGenParams\"><code>RsaHashedKeyGenParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RsaOaepParams\"><code>RsaOaepParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RsaPssParams\"><code>RsaPssParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCAnswerOptions\"><code>RTCAnswerOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCCertificate\"><code>RTCCertificate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel\"><code>RTCDataChannel</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelEvent\"><code>RTCDataChannelEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCDtlsTransport\"><code>RTCDtlsTransport</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFSender\"><code>RTCDTMFSender</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFToneChangeEvent\"><code>RTCDTMFToneChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCError\"><code>RTCError</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCErrorEvent\"><code>RTCErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate\"><code>RTCIceCandidate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePair\"><code>RTCIceCandidatePair</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats\"><code>RTCIceCandidatePairStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats\"><code>RTCIceCandidateStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCredentialType\"><code>RTCIceCredentialType</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceParameters\"><code>RTCIceParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceRole\"><code>RTCIceRole</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer\"><code>RTCIceServer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransport\"><code>RTCIceTransport</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIceTransportState\"><code>RTCIceTransportState</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCIdentityAssertion\"><code>RTCIdentityAssertion</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats\"><code>RTCInboundRtpStreamStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCNetworkType\"><code>RTCNetworkType</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCOfferAnswerOptions\"><code>RTCOfferAnswerOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCOfferOptions\"><code>RTCOfferOptions</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats\"><code>RTCOutboundRtpStreamStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent\"><code>RTCPeerConnectionIceErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceEvent\"><code>RTCPeerConnectionIceEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats\"><code>RTCRemoteOutboundRtpStreamStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtcpParameters\"><code>RTCRtcpParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpCapabilities\"><code>RTCRtpCapabilities</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpCodecCapability\"><code>RTCRtpCodecCapability</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpCodecParameters\"><code>RTCRtpCodecParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpContributingSource\"><code>RTCRtpContributingSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters\"><code>RTCRtpEncodingParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpParameters\"><code>RTCRtpParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiveParameters\"><code>RTCRtpReceiveParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver\"><code>RTCRtpReceiver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender\"><code>RTCRtpSender</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSendParameters\"><code>RTCRtpSendParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpStreamStats\"><code>RTCRtpStreamStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSynchronizationSource\"><code>RTCRtpSynchronizationSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver\"><code>RTCRtpTransceiver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiverDirection\"><code>RTCRtpTransceiverDirection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport\"><code>RTCSctpTransport</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription\"><code>RTCSessionDescription</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCStats\"><code>RTCStats</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsIceCandidatePairState\"><code>RTCStatsIceCandidatePairState</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport\"><code>RTCStatsReport</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsType\"><code>RTCStatsType</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent\"><code>RTCTrackEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEventInit\"><code>RTCTrackEventInit</code></a></li>\n</ul>\n<p>S</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Sanitizer\"><code>Sanitizer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Screen\"><code>Screen</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation\"><code>ScreenOrientation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode\"><code>ScriptProcessorNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent\"><code>SecurityPolicyViolationEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Selection\"><code>Selection</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/crypto_property\"><code>self.crypto</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/performance_property\"><code>self.performance</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Sensor\"><code>Sensor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SensorErrorEvent\"><code>SensorErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Serial\"><code>Serial</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SerialPort\"><code>SerialPort</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker\"><code>ServiceWorker</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer\"><code>ServiceWorkerContainer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope\"><code>ServiceWorkerGlobalScope</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent\"><code>ServiceWorkerMessageEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration\"><code>ServiceWorkerRegistration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/setInterval\"><code>setInterval()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/setTimeout\"><code>setTimeout()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot\"><code>ShadowRoot</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker\"><code>SharedWorker</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope\"><code>SharedWorkerGlobalScope</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer\"><code>SourceBuffer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SourceBufferList\"><code>SourceBufferList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammar\"><code>SpeechGrammar</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechGrammarList\"><code>SpeechGrammarList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition\"><code>SpeechRecognition</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionAlternative\"><code>SpeechRecognitionAlternative</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError\"><code>SpeechRecognitionError</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionErrorEvent\"><code>SpeechRecognitionErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent\"><code>SpeechRecognitionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionResult\"><code>SpeechRecognitionResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionResultList\"><code>SpeechRecognitionResultList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis\"><code>SpeechSynthesis</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisErrorEvent\"><code>SpeechSynthesisErrorEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent\"><code>SpeechSynthesisEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance\"><code>SpeechSynthesisUtterance</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisVoice\"><code>SpeechSynthesisVoice</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StaticRange\"><code>StaticRange</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StereoPannerNode\"><code>StereoPannerNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Storage\"><code>Storage</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent\"><code>StorageEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StorageManager\"><code>StorageManager</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/structuredClone\"><code>structuredClone()</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StylePropertyMap\"><code>StylePropertyMap</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StylePropertyMapReadOnly\"><code>StylePropertyMapReadOnly</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet\"><code>StyleSheet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/StyleSheetList\"><code>StyleSheetList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent\"><code>SubmitEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto\"><code>SubtleCrypto</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAElement\"><code>SVGAElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAltGlyphDefElement\"><code>SVGAltGlyphDefElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAltGlyphElement\"><code>SVGAltGlyphElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAltGlyphItemElement\"><code>SVGAltGlyphItemElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAngle\"><code>SVGAngle</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimateColorElement\"><code>SVGAnimateColorElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedAngle\"><code>SVGAnimatedAngle</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedBoolean\"><code>SVGAnimatedBoolean</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedEnumeration\"><code>SVGAnimatedEnumeration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedInteger\"><code>SVGAnimatedInteger</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedLength\"><code>SVGAnimatedLength</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedLengthList\"><code>SVGAnimatedLengthList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedNumber\"><code>SVGAnimatedNumber</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedNumberList\"><code>SVGAnimatedNumberList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedPreserveAspectRatio\"><code>SVGAnimatedPreserveAspectRatio</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedRect\"><code>SVGAnimatedRect</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString\"><code>SVGAnimatedString</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedTransformList\"><code>SVGAnimatedTransformList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimateElement\"><code>SVGAnimateElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimateMotionElement\"><code>SVGAnimateMotionElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimateTransformElement\"><code>SVGAnimateTransformElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement\"><code>SVGAnimationElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGCircleElement\"><code>SVGCircleElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGClipPathElement\"><code>SVGClipPathElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGComponentTransferFunctionElement\"><code>SVGComponentTransferFunctionElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGCursorElement\"><code>SVGCursorElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGDefsElement\"><code>SVGDefsElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGDescElement\"><code>SVGDescElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGElement\"><code>SVGElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGEllipseElement\"><code>SVGEllipseElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGEvent\"><code>SVGEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEBlendElement\"><code>SVGFEBlendElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEColorMatrixElement\"><code>SVGFEColorMatrixElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEComponentTransferElement\"><code>SVGFEComponentTransferElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFECompositeElement\"><code>SVGFECompositeElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEConvolveMatrixElement\"><code>SVGFEConvolveMatrixElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEDiffuseLightingElement\"><code>SVGFEDiffuseLightingElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEDisplacementMapElement\"><code>SVGFEDisplacementMapElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEDistantLightElement\"><code>SVGFEDistantLightElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEDropShadowElement\"><code>SVGFEDropShadowElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEFloodElement\"><code>SVGFEFloodElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEFuncAElement\"><code>SVGFEFuncAElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEFuncBElement\"><code>SVGFEFuncBElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEFuncGElement\"><code>SVGFEFuncGElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEFuncRElement\"><code>SVGFEFuncRElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEGaussianBlurElement\"><code>SVGFEGaussianBlurElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEImageElement\"><code>SVGFEImageElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEMergeElement\"><code>SVGFEMergeElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEMergeNodeElement\"><code>SVGFEMergeNodeElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEMorphologyElement\"><code>SVGFEMorphologyElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEOffsetElement\"><code>SVGFEOffsetElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFEPointLightElement\"><code>SVGFEPointLightElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFESpecularLightingElement\"><code>SVGFESpecularLightingElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFESpotLightElement\"><code>SVGFESpotLightElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFETileElement\"><code>SVGFETileElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFETurbulenceElement\"><code>SVGFETurbulenceElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFilterElement\"><code>SVGFilterElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFontElement\"><code>SVGFontElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFontFaceElement\"><code>SVGFontFaceElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFontFaceFormatElement\"><code>SVGFontFaceFormatElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFontFaceNameElement\"><code>SVGFontFaceNameElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFontFaceSrcElement\"><code>SVGFontFaceSrcElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGFontFaceUriElement\"><code>SVGFontFaceUriElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGForeignObjectElement\"><code>SVGForeignObjectElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGGElement\"><code>SVGGElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement\"><code>SVGGeometryElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGGlyphElement\"><code>SVGGlyphElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGGlyphRefElement\"><code>SVGGlyphRefElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGGradientElement\"><code>SVGGradientElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement\"><code>SVGGraphicsElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGHKernElement\"><code>SVGHKernElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGImageElement\"><code>SVGImageElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGLength\"><code>SVGLength</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGLengthList\"><code>SVGLengthList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGLinearGradientElement\"><code>SVGLinearGradientElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGLineElement\"><code>SVGLineElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGMarkerElement\"><code>SVGMarkerElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGMaskElement\"><code>SVGMaskElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix\"><code>SVGMatrix</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGMetadataElement\"><code>SVGMetadataElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGMissingGlyphElement\"><code>SVGMissingGlyphElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGMPathElement\"><code>SVGMPathElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGNumber\"><code>SVGNumber</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGNumberList\"><code>SVGNumberList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPathElement\"><code>SVGPathElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement\"><code>SVGPatternElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPoint\"><code>SVGPoint</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPointList\"><code>SVGPointList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPolygonElement\"><code>SVGPolygonElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPolylineElement\"><code>SVGPolylineElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGPreserveAspectRatio\"><code>SVGPreserveAspectRatio</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGRadialGradientElement\"><code>SVGRadialGradientElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGRect\"><code>SVGRect</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGRectElement\"><code>SVGRectElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGRenderingIntent\"><code>SVGRenderingIntent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGScriptElement\"><code>SVGScriptElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGSetElement\"><code>SVGSetElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGStopElement\"><code>SVGStopElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGStringList\"><code>SVGStringList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGStyleElement\"><code>SVGStyleElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGSVGElement\"><code>SVGSVGElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGSwitchElement\"><code>SVGSwitchElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGSymbolElement\"><code>SVGSymbolElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement\"><code>SVGTextContentElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement\"><code>SVGTextElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTextPathElement\"><code>SVGTextPathElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTextPositioningElement\"><code>SVGTextPositioningElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTitleElement\"><code>SVGTitleElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform\"><code>SVGTransform</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTransformList\"><code>SVGTransformList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTRefElement\"><code>SVGTRefElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGTSpanElement\"><code>SVGTSpanElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGUnitTypes\"><code>SVGUnitTypes</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGUseElement\"><code>SVGUseElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGViewElement\"><code>SVGViewElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SVGVKernElement\"><code>SVGVKernElement</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SyncEvent\"><code>SyncEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/SyncManager\"><code>SyncManager</code></a></li>\n</ul>\n<p>T</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TaskAttributionTiming\"><code>TaskAttributionTiming</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Text\"><code>Text</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder\"><code>TextDecoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream\"><code>TextDecoderStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder\"><code>TextEncoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextEncoderStream\"><code>TextEncoderStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics\"><code>TextMetrics</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\"><code>TextTrack</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue\"><code>TextTrackCue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCueList\"><code>TextTrackCueList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TextTrackList\"><code>TextTrackList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TimeEvent\"><code>TimeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\"><code>TimeRanges</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Touch\"><code>Touch</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent\"><code>TouchEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TouchList\"><code>TouchList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TrackEvent\"><code>TrackEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TransformStream\"><code>TransformStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TransformStreamDefaultController\"><code>TransformStreamDefaultController</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\"><code>TransitionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\"><code>TreeWalker</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TrustedHTML\"><code>TrustedHTML</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TrustedScript\"><code>TrustedScript</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TrustedScriptURL\"><code>TrustedScriptURL</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy\"><code>TrustedTypePolicy</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicyFactory\"><code>TrustedTypePolicyFactory</code></a></li>\n</ul>\n<p>U</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/UIEvent\"><code>UIEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/URL\"><code>URL</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/URLPattern\"><code>URLPattern</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\"><code>URLSearchParams</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USB\"><code>USB</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface\"><code>USBAlternateInterface</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBConfiguration\"><code>USBConfiguration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBConnectionEvent\"><code>USBConnectionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBDevice\"><code>USBDevice</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint\"><code>USBEndpoint</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBInterface\"><code>USBInterface</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult\"><code>USBInTransferResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBIsochronousInTransferPacket\"><code>USBIsochronousInTransferPacket</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBIsochronousInTransferResult\"><code>USBIsochronousInTransferResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBIsochronousOutTransferPacket\"><code>USBIsochronousOutTransferPacket</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBIsochronousOutTransferResult\"><code>USBIsochronousOutTransferResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USBOutTransferResult\"><code>USBOutTransferResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/UserProximityEvent\"><code>UserProximityEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/USVString\"><code>USVString</code></a></li>\n</ul>\n<p>V</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\"><code>ValidityState</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace\"><code>VideoColorSpace</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoConfiguration\"><code>VideoConfiguration</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder\"><code>VideoDecoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder\"><code>VideoEncoder</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame\"><code>VideoFrame</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoPlaybackQuality\"><code>VideoPlaybackQuality</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoTrack\"><code>VideoTrack</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList\"><code>VideoTrackList</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport\"><code>VisualViewport</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay\"><code>VRDisplay</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRDisplayCapabilities\"><code>VRDisplayCapabilities</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRDisplayEvent\"><code>VRDisplayEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VREyeParameters\"><code>VREyeParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRFieldOfView\"><code>VRFieldOfView</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRFrameData\"><code>VRFrameData</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRLayerInit\"><code>VRLayerInit</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRPose\"><code>VRPose</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VRStageParameters\"><code>VRStageParameters</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\"><code>VTTCue</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion\"><code>VTTRegion</code></a></li>\n</ul>\n<p>W</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WakeLock\"><code>WakeLock</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel\"><code>WakeLockSentinel</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode\"><code>WaveShaperNode</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_color_buffer_float\"><code>WEBGL_color_buffer_float</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_astc\"><code>WEBGL_compressed_texture_astc</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_etc\"><code>WEBGL_compressed_texture_etc</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_etc1\"><code>WEBGL_compressed_texture_etc1</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_pvrtc\"><code>WEBGL_compressed_texture_pvrtc</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_s3tc\"><code>WEBGL_compressed_texture_s3tc</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_s3tc_srgb\"><code>WEBGL_compressed_texture_s3tc_srgb</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info\"><code>WEBGL_debug_renderer_info</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_shaders\"><code>WEBGL_debug_shaders</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_depth_texture\"><code>WEBGL_depth_texture</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_draw_buffers\"><code>WEBGL_draw_buffers</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context\"><code>WEBGL_lose_context</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_multi_draw\"><code>WEBGL_multi_draw</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext\"><code>WebGL2RenderingContext</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLActiveInfo\"><code>WebGLActiveInfo</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer\"><code>WebGLBuffer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLContextEvent\"><code>WebGLContextEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLFramebuffer\"><code>WebGLFramebuffer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLProgram\"><code>WebGLProgram</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLQuery\"><code>WebGLQuery</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderbuffer\"><code>WebGLRenderbuffer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext\"><code>WebGLRenderingContext</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLSampler\"><code>WebGLSampler</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLShader\"><code>WebGLShader</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLShaderPrecisionFormat\"><code>WebGLShaderPrecisionFormat</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLSync\"><code>WebGLSync</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLTexture\"><code>WebGLTexture</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLTransformFeedback\"><code>WebGLTransformFeedback</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLUniformLocation\"><code>WebGLUniformLocation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLVertexArrayObject\"><code>WebGLVertexArrayObject</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\"><code>WebSocket</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent\"><code>WheelEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window\"><code>Window</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowClient\"><code>WindowClient</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers\"><code>WindowEventHandlers</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Worker\"><code>Worker</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope\"><code>WorkerGlobalScope</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation\"><code>WorkerLocation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator\"><code>WorkerNavigator</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Worklet\"><code>Worklet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WritableStream\"><code>WritableStream</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultController\"><code>WritableStreamDefaultController</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter\"><code>WritableStreamDefaultWriter</code></a></li>\n</ul>\n<p>X</p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLDocument\"><code>XMLDocument</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\"><code>XMLHttpRequest</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget\"><code>XMLHttpRequestEventTarget</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer\"><code>XMLSerializer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XPathEvaluator\"><code>XPathEvaluator</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XPathException\"><code>XPathException</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression\"><code>XPathExpression</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XPathNSResolver\"><code>XPathNSResolver</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XPathResult\"><code>XPathResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRAnchor\"><code>XRAnchor</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRAnchorSet\"><code>XRAnchorSet</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRBoundedReferenceSpace\"><code>XRBoundedReferenceSpace</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRCompositionLayer\"><code>XRCompositionLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRCPUDepthInformation\"><code>XRCPUDepthInformation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRCubeLayer\"><code>XRCubeLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRCylinderLayer\"><code>XRCylinderLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRDepthInformation\"><code>XRDepthInformation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XREquirectLayer\"><code>XREquirectLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRFrame\"><code>XRFrame</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRHand\"><code>XRHand</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRHitTestResult\"><code>XRHitTestResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRHitTestSource\"><code>XRHitTestSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource\"><code>XRInputSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceArray\"><code>XRInputSourceArray</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent\"><code>XRInputSourceEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent\"><code>XRInputSourcesChangeEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRJointPose\"><code>XRJointPose</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRJointSpace\"><code>XRJointSpace</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRLayer\"><code>XRLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRLayerEvent\"><code>XRLayerEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRLightEstimate\"><code>XRLightEstimate</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRLightProbe\"><code>XRLightProbe</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRMediaBinding\"><code>XRMediaBinding</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRPermissionStatus\"><code>XRPermissionStatus</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRPose\"><code>XRPose</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRProjectionLayer\"><code>XRProjectionLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRQuadLayer\"><code>XRQuadLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRRay\"><code>XRRay</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace\"><code>XRReferenceSpace</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceEvent\"><code>XRReferenceSpaceEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRRenderState\"><code>XRRenderState</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform\"><code>XRRigidTransform</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRSession\"><code>XRSession</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRSessionEvent\"><code>XRSessionEvent</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRSpace\"><code>XRSpace</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRSubImage\"><code>XRSubImage</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRSystem\"><code>XRSystem</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRTransientInputHitTestResult\"><code>XRTransientInputHitTestResult</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRTransientInputHitTestSource\"><code>XRTransientInputHitTestSource</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRView\"><code>XRView</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRViewerPose\"><code>XRViewerPose</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRViewport\"><code>XRViewport</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLBinding\"><code>XRWebGLBinding</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLDepthInformation\"><code>XRWebGLDepthInformation</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer\"><code>XRWebGLLayer</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLSubImage\"><code>XRWebGLSubImage</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcessor\"><code>XSLTProcessor</code></a></li>\n</ul>"},{"url":"/docs/reference/github-search/","relativePath":"docs/reference/github-search.md","relativeDir":"docs/reference","base":"github-search.md","name":"github-search","frontmatter":{"title":"Github Search","weight":0,"excerpt":"The Search API helps you search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. Its designed to help you find the one result youre looking for (or maybe the few results youre looking for). Just like searching on Google, you sometimes want to see a few pages of search results so that you can find the item that best meets your needs. To satisfy that need, the GitHub Search API provides **up to 1,000 results for each search**.","seo":{"title":"The Search API helps you search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. It's designed to help you find the one result you're looking for (or maybe the few results you're looking for). Just like searching on Google, you sometimes want to see a few pages of search results so that you can find the item that best meets your needs. To satisfy that need, the GitHub Search API provides **up to 1,000 results for each search**.:","description":"The Search API helps you search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. It's designed to help you find the one result you're looking for (or maybe the few results you're looking for). Just like searching on Google, you sometimes want to see a few pages of search results so that you can find the item that best meets your needs. To satisfy that need, the GitHub Search API provides **up to 1,000 results for each search**.:","robots":[],"extra":[]},"template":"docs"},"html":"<h1>Search</h1>\n<blockquote>\n<p>The GitHub Search API lets you to search for the specific item efficiently.</p>\n</blockquote>\n<p>The GitHub Search API lets you to search for the specific item efficiently.</p>\n<p>The Search API helps you search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. It's designed to help you find the one result you're looking for (or maybe the few results you're looking for). Just like searching on Google, you sometimes want to see a few pages of search results so that you can find the item that best meets your needs. To satisfy that need, the GitHub Search API provides <strong>up to 1,000 results for each search</strong>.</p>\n<p>You can narrow your search using queries. To learn more about the search query syntax, see \"<a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>.\"</p>\n<h3><a href=\"#ranking-search-results\">Ranking search results</a></h3>\n<p>Unless another sort option is provided as a query parameter, results are sorted by best match in descending order. Multiple factors are combined to boost the most relevant item to the top of the result list.</p>\n<h3><a href=\"#rate-limit\">Rate limit</a></h3>\n<p>The Search API has a custom rate limit. For requests using <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/rest#authentication\">Basic Authentication</a>, <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/rest#authentication\">OAuth</a>, or <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/rest#increasing-the-unauthenticated-rate-limit-for-oauth-applications\">client ID and secret</a>, you can make up to 30 requests per minute. For unauthenticated requests, the rate limit allows you to make up to 10 requests per minute.</p>\n<p>See the <a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/rest/reference/rate-limit\">rate limit documentation</a> for details on determining your current rate limit status.</p>\n<h3><a href=\"#constructing-a-search-query\">Constructing a search query</a></h3>\n<p>Each endpoint in the Search API uses <a href=\"https://en.wikipedia.org/wiki/Query_string\">query parameters</a> to perform searches on GitHub. See the individual endpoint in the Search API for an example that includes the endpoint and query parameters.</p>\n<p>A query can contain any combination of search qualifiers supported on GitHub. The format of the search query is:</p>\n<pre><code>SEARCH_KEYWORD_1 SEARCH_KEYWORD_N QUALIFIER_1 QUALIFIER_N\n</code></pre>\n<p>For example, if you wanted to search for all <em>repositories</em> owned by <code>defunkt</code> that contained the word <code>GitHub</code> and <code>Octocat</code> in the README file, you would use the following query with the <em>search repositories</em> endpoint:</p>\n<pre><code>GitHub Octocat in:readme user:defunkt\n</code></pre>\n<p><strong>Note:</strong> Be sure to use your language's preferred HTML-encoder to construct your query strings. For example:</p>\n<pre><code>const queryString = 'q=' + encodeURIComponent('GitHub Octocat in:readme user:defunkt');\n</code></pre>\n<p>See \"<a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/articles/searching-on-github\">Searching on GitHub</a>\" for a complete list of available qualifiers, their format, and an example of how to use them. For information about how to use operators to match specific quantities, dates, or to exclude results, see \"<a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/articles/understanding-the-search-syntax\">Understanding the search syntax</a>.\"</p>\n<h3><a href=\"#limitations-on-query-length\">Limitations on query length</a></h3>\n<p>The Search API does not support queries that:</p>\n<ul>\n<li>are longer than 256 characters (not including operators or qualifiers).</li>\n<li>have more than five <code>AND</code>, <code>OR</code>, or <code>NOT</code> operators.</li>\n</ul>\n<p>These search queries will return a \"Validation failed\" error message.</p>\n<h3><a href=\"#timeouts-and-incomplete-results\">Timeouts and incomplete results</a></h3>\n<p>To keep the Search API fast for everyone, we limit how long any individual query can run. For queries that <a href=\"https://developer.github.com/changes/2014-04-07-understanding-search-results-and-potential-timeouts/\">exceed the time limit</a>, the API returns the matches that were already found prior to the timeout, and the response has the <code>incomplete_results</code> property set to <code>true</code>.</p>\n<p>Reaching a timeout does not necessarily mean that search results are incomplete. More results might have been found, but also might not.</p>\n<h3><a href=\"#access-errors-or-missing-search-results\">Access errors or missing search results</a></h3>\n<p>You need to successfully authenticate and have access to the repositories in your search queries, otherwise, you'll see a <code>422 Unprocessible Entry</code> error with a \"Validation Failed\" message. For example, your search will fail if your query includes <code>repo:</code>, <code>user:</code>, or <code>org:</code> qualifiers that request resources that you don't have access to when you sign in on GitHub.</p>\n<p>When your search query requests multiple resources, the response will only contain the resources that you have access to and will <strong>not</strong> provide an error message listing the resources that were not returned.</p>\n<p>For example, if your search query searches for the <code>octocat/test</code> and <code>codertocat/test</code> repositories, but you only have access to <code>octocat/test</code>, your response will show search results for <code>octocat/test</code> and nothing for <code>codertocat/test</code>. This behavior mimics how search works on GitHub.</p>\n<h3><a href=\"#search-code\">Search code</a></h3>\n<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4><a href=\"#considerations-for-code-search\">Considerations for code search</a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>\n<p>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&#x26;q=language%3Ago&#x26;type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&#x26;q=amazing+language%3Ago&#x26;type=Code\"><code>amazing language:go</code></a> is.</p>\n<p>get /search/code</p>\n</li>\n</ul>\n<h4><a href=\"#search-code--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>Setting to <code>application/vnd.github.v3+json</code> is recommended.</p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>. See \"<a href=\"https://help.github.com/articles/searching-code/\">Searching code</a>\" for a detailed list of qualifiers.</p>\n<p>|\n| <code>sort</code> | string | query |</p>\n<p>Sorts the results of your query. Can only be <code>indexed</code>, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: <a href=\"https://docs.github.com/rest/reference/search#ranking-search-results\">best match</a></p>\n<p>|\n| <code>order</code> | string | query |</p>\n<p>Determines whether the first search result returned is the highest number of matches (<code>desc</code>) or lowest number of matches (<code>asc</code>). This parameter is ignored unless you provide <code>sort</code>.</p>\n<p>Default: <code>desc</code> |\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-code--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/code\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/code', {\n  q: 'q'\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 7,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"name\": \"classes.js\",\n      \"path\": \"src/attributes/classes.js\",\n      \"sha\": \"d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n      \"url\": \"https://api.github.com/repositories/167174/contents/src/attributes/classes.js?ref=825ac3773694e0cd23ee74895fd5aeb535b27da4\",\n      \"git_url\": \"https://api.github.com/repositories/167174/git/blobs/d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n      \"html_url\": \"https://github.com/jquery/jquery/blob/825ac3773694e0cd23ee74895fd5aeb535b27da4/src/attributes/classes.js\",\n      \"repository\": {\n        \"id\": 167174,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxNjcxNzQ=\",\n        \"name\": \"jquery\",\n        \"full_name\": \"jquery/jquery\",\n        \"owner\": {\n          \"login\": \"jquery\",\n          \"id\": 70142,\n          \"node_id\": \"MDQ6VXNlcjcwMTQy\",\n          \"avatar_url\": \"https://0.gravatar.com/avatar/6906f317a4733f4379b06c32229ef02f?d=https%3A%2F%2Fidenticons.github.com%2Ff426f04f2f9813718fb806b30e0093de.png\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/jquery\",\n          \"html_url\": \"https://github.com/jquery\",\n          \"followers_url\": \"https://api.github.com/users/jquery/followers\",\n          \"following_url\": \"https://api.github.com/users/jquery/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/jquery/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/jquery/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/jquery/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/jquery/orgs\",\n          \"repos_url\": \"https://api.github.com/users/jquery/repos\",\n          \"events_url\": \"https://api.github.com/users/jquery/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/jquery/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/jquery/jquery\",\n        \"description\": \"jQuery JavaScript Library\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/jquery/jquery\",\n        \"forks_url\": \"https://api.github.com/repos/jquery/jquery/forks\",\n        \"keys_url\": \"https://api.github.com/repos/jquery/jquery/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/jquery/jquery/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/jquery/jquery/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/jquery/jquery/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/jquery/jquery/events\",\n        \"assignees_url\": \"https://api.github.com/repos/jquery/jquery/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/jquery/jquery/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/jquery/jquery/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/jquery/jquery/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/jquery/jquery/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/jquery/jquery/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/jquery/jquery/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/jquery/jquery/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/jquery/jquery/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/jquery/jquery/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/jquery/jquery/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/jquery/jquery/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/jquery/jquery/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/jquery/jquery/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/jquery/jquery/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/jquery/jquery/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/jquery/jquery/issues/comments/{number}\",\n        \"contents_url\": \"https://api.github.com/repos/jquery/jquery/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/jquery/jquery/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/jquery/jquery/merges\",\n        \"archive_url\": \"https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/jquery/jquery/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/jquery/jquery/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/jquery/jquery/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/jquery/jquery/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/jquery/jquery/labels{/name}\",\n        \"deployments_url\": \"http://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"releases_url\": \"http://api.github.com/repos/octocat/Hello-World/releases{/id}\"\n      },\n      \"score\": 1\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Forbidden</h4>\n<pre><code>Status: 403 Forbidden\n</code></pre>\n<h4>Validation failed</h4>\n<pre><code>Status: 422 Unprocessable Entity\n</code></pre>\n<h4>Service unavailable</h4>\n<pre><code>Status: 503 Service Unavailable\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<hr>\n<h3><a href=\"#search-commits\">Search commits</a></h3>\n<p>Find commits via various criteria on the default branch (usually <code>master</code>). This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for commits, you can get text match metadata for the <strong>message</strong> field when you provide the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find commits related to CSS in the <a href=\"https://github.com/octocat/Spoon-Knife\">octocat/Spoon-Knife</a> repository. Your query would look something like this:</p>\n<p><code>q=repo:octocat/Spoon-Knife+css</code></p>\n<pre><code>get /search/commits\n</code></pre>\n<h4><a href=\"#search-commits--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>This API is under preview and subject to change.<a href=\"#search-commits-preview-notices\">See preview notice</a></p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>. See \"<a href=\"https://help.github.com/articles/searching-commits/\">Searching commits</a>\" for a detailed list of qualifiers.</p>\n<p>|\n| <code>sort</code> | string | query |</p>\n<p>Sorts the results of your query by <code>author-date</code> or <code>committer-date</code>. Default: <a href=\"https://docs.github.com/rest/reference/search#ranking-search-results\">best match</a></p>\n<p>|\n| <code>order</code> | string | query |</p>\n<p>Determines whether the first search result returned is the highest number of matches (<code>desc</code>) or lowest number of matches (<code>asc</code>). This parameter is ignored unless you provide <code>sort</code>.</p>\n<p>Default: <code>desc</code> |\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-commits--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.cloak-preview+json\" \\\n  https://api.github.com/search/commits\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/commits', {\n  q: 'q',\n  mediaType: {\n    previews: [\n      'cloak'\n    ]\n  }\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 1,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"sha\": \"bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f/comments\",\n      \"commit\": {\n        \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n        \"author\": {\n          \"date\": \"2014-02-04T14:38:36-08:00\",\n          \"name\": \"The Octocat\",\n          \"email\": \"octocat@nowhere.com\"\n        },\n        \"committer\": {\n          \"date\": \"2014-02-12T15:18:55-08:00\",\n          \"name\": \"The Octocat\",\n          \"email\": \"octocat@nowhere.com\"\n        },\n        \"message\": \"Create styles.css and updated README\",\n        \"tree\": {\n          \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees/a639e96f9038797fba6e0469f94a4b0cc459fa68\",\n          \"sha\": \"a639e96f9038797fba6e0469f94a4b0cc459fa68\"\n        },\n        \"comment_count\": 8\n      },\n      \"author\": {\n        \"login\": \"octocat\",\n        \"id\": 583231,\n        \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n        \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"committer\": {},\n      \"parents\": [\n        {\n          \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n          \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n          \"sha\": \"a30c19e3f13765a3b48829788bc1cb8b4e95cee4\"\n        }\n      ],\n      \"repository\": {\n        \"id\": 1300192,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMzAwMTky\",\n        \"name\": \"Spoon-Knife\",\n        \"full_name\": \"octocat/Spoon-Knife\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 583231,\n          \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n          \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Spoon-Knife\",\n        \"description\": \"This repo is for demonstration purposes only.\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/forks\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/events\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/merges\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/deployments\"\n      },\n      \"score\": 1,\n      \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\"\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Preview header missing</h4>\n<pre><code>Status: 415 Unsupported Media Type\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<h4>Preview notice</h4>\n<p>The Commit Search API is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the <a href=\"https://developer.github.com/changes/2017-01-05-commit-search-api/\">blog post</a> for full details.</p>\n<p>To access the API you must provide a custom <a href=\"https://docs.github.com/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code>application/vnd.github.cloak-preview\n</code></pre>\n<p>☝️This header is <strong>required</strong>.</p>\n<hr>\n<h3><a href=\"#search-issues-and-pull-requests\">Search issues and pull requests</a></h3>\n<p>Find issues by state and keyword. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for issues, you can get text match metadata for the issue <strong>title</strong>, issue <strong>body</strong>, and issue <strong>comment body</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.</p>\n<p><code>q=windows+label:bug+language:python+state:open&#x26;sort=created&#x26;order=asc</code></p>\n<p>This query searches for the keyword <code>windows</code>, within any open issue that is labeled as <code>bug</code>. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.</p>\n<p><strong>Note:</strong> For <a href=\"https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests\">user-to-server</a> GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the <code>is:issue</code> or <code>is:pull-request</code> qualifier will receive an HTTP <code>422 Unprocessable Entity</code> response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the <code>is</code> qualifier, see \"<a href=\"https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests\">Searching only issues or pull requests</a>.\"</p>\n<pre><code>get /search/issues\n</code></pre>\n<h4><a href=\"#search-issues-and-pull-requests--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>Setting to <code>application/vnd.github.v3+json</code> is recommended.</p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>. See \"<a href=\"https://help.github.com/articles/searching-issues-and-pull-requests/\">Searching issues and pull requests</a>\" for a detailed list of qualifiers.</p>\n<p>|\n| <code>sort</code> | string | query |</p>\n<p>Sorts the results of your query by the number of <code>comments</code>, <code>reactions</code>, <code>reactions-+1</code>, <code>reactions--1</code>, <code>reactions-smile</code>, <code>reactions-thinking_face</code>, <code>reactions-heart</code>, <code>reactions-tada</code>, or <code>interactions</code>. You can also sort results by how recently the items were <code>created</code> or <code>updated</code>, Default: <a href=\"https://docs.github.com/rest/reference/search#ranking-search-results\">best match</a></p>\n<p>|\n| <code>order</code> | string | query |</p>\n<p>Determines whether the first search result returned is the highest number of matches (<code>desc</code>) or lowest number of matches (<code>asc</code>). This parameter is ignored unless you provide <code>sort</code>.</p>\n<p>Default: <code>desc</code> |\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-issues-and-pull-requests--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/issues\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/issues', {\n  q: 'q'\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 280,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132\",\n      \"repository_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit\",\n      \"labels_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}\",\n      \"comments_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments\",\n      \"events_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events\",\n      \"html_url\": \"https://github.com/batterseapower/pinyin-toolkit/issues/132\",\n      \"id\": 35802,\n      \"node_id\": \"MDU6SXNzdWUzNTgwMg==\",\n      \"number\": 132,\n      \"title\": \"Line Number Indexes Beyond 20 Not Displayed\",\n      \"user\": {\n        \"login\": \"Nick3C\",\n        \"id\": 90254,\n        \"node_id\": \"MDQ6VXNlcjkwMjU0\",\n        \"avatar_url\": \"https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/Nick3C\",\n        \"html_url\": \"https://github.com/Nick3C\",\n        \"followers_url\": \"https://api.github.com/users/Nick3C/followers\",\n        \"following_url\": \"https://api.github.com/users/Nick3C/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/Nick3C/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/Nick3C/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/Nick3C/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/Nick3C/orgs\",\n        \"repos_url\": \"https://api.github.com/users/Nick3C/repos\",\n        \"events_url\": \"https://api.github.com/users/Nick3C/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/Nick3C/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      },\n      \"labels\": [\n        {\n          \"id\": 4,\n          \"node_id\": \"MDU6TGFiZWw0\",\n          \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/labels/bug\",\n          \"name\": \"bug\",\n          \"color\": \"ff0000\"\n        }\n      ],\n      \"state\": \"open\",\n      \"assignee\": null,\n      \"milestone\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n        \"id\": 1002604,\n        \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n        \"number\": 1,\n        \"state\": \"open\",\n        \"title\": \"v1.0\",\n        \"description\": \"Tracking milestone for version 1.0\",\n        \"creator\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"open_issues\": 4,\n        \"closed_issues\": 8,\n        \"created_at\": \"2011-04-10T20:09:31Z\",\n        \"updated_at\": \"2014-03-03T18:58:10Z\",\n        \"closed_at\": \"2013-02-12T13:22:01Z\",\n        \"due_on\": \"2012-10-09T23:39:01Z\"\n      },\n      \"comments\": 15,\n      \"created_at\": \"2009-07-12T20:10:41Z\",\n      \"updated_at\": \"2009-07-19T09:23:43Z\",\n      \"closed_at\": null,\n      \"pull_request\": {\n        \"url\": \"https://api/github.com/repos/octocat/Hello-World/pull/1347\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n        \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n        \"patch_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"body\": \"...\",\n      \"score\": 1,\n      \"locked\": true,\n      \"author_association\": \"COLLABORATOR\"\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Forbidden</h4>\n<pre><code>Status: 403 Forbidden\n</code></pre>\n<h4>Validation failed</h4>\n<pre><code>Status: 422 Unprocessable Entity\n</code></pre>\n<h4>Service unavailable</h4>\n<pre><code>Status: 503 Service Unavailable\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<hr>\n<h3><a href=\"#search-labels\">Search labels</a></h3>\n<p>Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for labels, you can get text match metadata for the label <strong>name</strong> and <strong>description</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find labels in the <code>linguist</code> repository that match <code>bug</code>, <code>defect</code>, or <code>enhancement</code>. Your query might look like this:</p>\n<p><code>q=bug+defect+enhancement&#x26;repository_id=64778136</code></p>\n<p>The labels that best match the query appear first in the search results.</p>\n<pre><code>get /search/labels\n</code></pre>\n<h4><a href=\"#search-labels--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>Setting to <code>application/vnd.github.v3+json</code> is recommended.</p>\n<p>|\n| <code>repository_id</code> | integer | query |</p>\n<p>The id of the repository.</p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>.</p>\n<p>|\n| <code>sort</code> | string | query |</p>\n<p>Sorts the results of your query by when the label was <code>created</code> or <code>updated</code>. Default: <a href=\"https://docs.github.com/rest/reference/search#ranking-search-results\">best match</a></p>\n<p>|\n| <code>order</code> | string | query |</p>\n<p>Determines whether the first search result returned is the highest number of matches (<code>desc</code>) or lowest number of matches (<code>asc</code>). This parameter is ignored unless you provide <code>sort</code>.</p>\n<p>Default: <code>desc</code> |\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-labels--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/labels\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/labels', {\n  repository_id: 42,\n  q: 'q'\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 2,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"id\": 418327088,\n      \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODg=\",\n      \"url\": \"https://api.github.com/repos/octocat/linguist/labels/enhancement\",\n      \"name\": \"enhancement\",\n      \"color\": \"84b6eb\",\n      \"default\": true,\n      \"description\": \"New feature or request.\",\n      \"score\": 1\n    },\n    {\n      \"id\": 418327086,\n      \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODY=\",\n      \"url\": \"https://api.github.com/repos/octocat/linguist/labels/bug\",\n      \"name\": \"bug\",\n      \"color\": \"ee0701\",\n      \"default\": true,\n      \"description\": \"Something isn't working.\",\n      \"score\": 1\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Forbidden</h4>\n<pre><code>Status: 403 Forbidden\n</code></pre>\n<h4>Resource not found</h4>\n<pre><code>Status: 404 Not Found\n</code></pre>\n<h4>Validation failed</h4>\n<pre><code>Status: 422 Unprocessable Entity\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<hr>\n<h3><a href=\"#search-repositories\">Search repositories</a></h3>\n<p>Find repositories via various criteria. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for repositories, you can get text match metadata for the <strong>name</strong> and <strong>description</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:</p>\n<p><code>q=tetris+language:assembly&#x26;sort=stars&#x26;order=desc</code></p>\n<p>This query searches for repositories with the word <code>tetris</code> in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.</p>\n<p>When you include the <code>mercy</code> preview header, you can also search for multiple topics by adding more <code>topic:</code> instances. For example, your query might look like this:</p>\n<p><code>q=topic:ruby+topic:rails</code></p>\n<pre><code>get /search/repositories\n</code></pre>\n<h4><a href=\"#search-repositories--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>Setting to <code>application/vnd.github.v3+json</code> is recommended.<a href=\"#search-repositories-preview-notices\">See preview notice</a></p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>. See \"<a href=\"https://help.github.com/articles/searching-for-repositories/\">Searching for repositories</a>\" for a detailed list of qualifiers.</p>\n<p>|\n| <code>sort</code> | string | query |</p>\n<p>Sorts the results of your query by number of <code>stars</code>, <code>forks</code>, or <code>help-wanted-issues</code> or how recently the items were <code>updated</code>. Default: <a href=\"https://docs.github.com/rest/reference/search#ranking-search-results\">best match</a></p>\n<p>|\n| <code>order</code> | string | query |</p>\n<p>Determines whether the first search result returned is the highest number of matches (<code>desc</code>) or lowest number of matches (<code>asc</code>). This parameter is ignored unless you provide <code>sort</code>.</p>\n<p>Default: <code>desc</code> |\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-repositories--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/repositories\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/repositories', {\n  q: 'q'\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 40,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"id\": 3081286,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkzMDgxMjg2\",\n      \"name\": \"Tetris\",\n      \"full_name\": \"dtrupenn/Tetris\",\n      \"owner\": {\n        \"login\": \"dtrupenn\",\n        \"id\": 872147,\n        \"node_id\": \"MDQ6VXNlcjg3MjE0Nw==\",\n        \"avatar_url\": \"https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/dtrupenn\",\n        \"received_events_url\": \"https://api.github.com/users/dtrupenn/received_events\",\n        \"type\": \"User\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"site_admin\": true\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/dtrupenn/Tetris\",\n      \"description\": \"A C implementation of Tetris using Pennsim through LC4\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/dtrupenn/Tetris\",\n      \"created_at\": \"2012-01-01T00:31:50Z\",\n      \"updated_at\": \"2013-01-05T17:58:47Z\",\n      \"pushed_at\": \"2012-01-01T00:37:02Z\",\n      \"homepage\": \"https://github.com\",\n      \"size\": 524,\n      \"stargazers_count\": 1,\n      \"watchers_count\": 1,\n      \"language\": \"Assembly\",\n      \"forks_count\": 0,\n      \"open_issues_count\": 0,\n      \"master_branch\": \"master\",\n      \"default_branch\": \"master\",\n      \"score\": 1,\n      \"archive_url\": \"https://api.github.com/repos/dtrupenn/Tetris/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/dtrupenn/Tetris/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/dtrupenn/Tetris/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/dtrupenn/Tetris/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/dtrupenn/Tetris/downloads\",\n      \"events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/events\",\n      \"forks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/dtrupenn/Tetris.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/dtrupenn/Tetris/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/dtrupenn/Tetris/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/dtrupenn/Tetris/languages\",\n      \"merges_url\": \"https://api.github.com/repos/dtrupenn/Tetris/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/dtrupenn/Tetris/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/dtrupenn/Tetris/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/dtrupenn/Tetris/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/dtrupenn/Tetris/releases{/id}\",\n      \"ssh_url\": \"git@github.com:dtrupenn/Tetris.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/dtrupenn/Tetris/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/tags\",\n      \"teams_url\": \"https://api.github.com/repos/dtrupenn/Tetris/teams\",\n      \"trees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/dtrupenn/Tetris.git\",\n      \"mirror_url\": \"git:git.example.com/dtrupenn/Tetris\",\n      \"hooks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/hooks\",\n      \"svn_url\": \"https://svn.github.com/dtrupenn/Tetris\",\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_pages\": true,\n      \"has_wiki\": true,\n      \"has_downloads\": true,\n      \"archived\": true,\n      \"disabled\": true,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://api.github.com/licenses/mit\"\n      }\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Validation failed</h4>\n<pre><code>Status: 422 Unprocessable Entity\n</code></pre>\n<h4>Service unavailable</h4>\n<pre><code>Status: 503 Service Unavailable\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<h4>Preview notice</h4>\n<p>The <code>topics</code> property for repositories on GitHub is currently available for developers to preview. To view the <code>topics</code> property in calls that return repository results, you must provide a custom <a href=\"https://docs.github.com/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code>application/vnd.github.mercy-preview+json\n</code></pre>\n<hr>\n<h3><a href=\"#search-topics\">Search topics</a></h3>\n<p>Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>. See \"<a href=\"https://help.github.com/articles/searching-topics/\">Searching topics</a>\" for a detailed list of qualifiers.</p>\n<p>When searching for topics, you can get text match metadata for the topic's <strong>short_description</strong>, <strong>description</strong>, <strong>name</strong>, or <strong>display_name</strong> field when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to search for topics related to Ruby that are featured on <a href=\"https://github.com/topics\">https://github.com/topics</a>. Your query might look like this:</p>\n<p><code>q=ruby+is:featured</code></p>\n<p>This query searches for topics with the keyword <code>ruby</code> and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.</p>\n<pre><code>get /search/topics\n</code></pre>\n<h4><a href=\"#search-topics--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>This API is under preview and subject to change.<a href=\"#search-topics-preview-notices\">See preview notice</a></p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>.</p>\n<p>|\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-topics--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/search/topics\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/topics', {\n  q: 'q',\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 6,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"name\": \"ruby\",\n      \"display_name\": \"Ruby\",\n      \"short_description\": \"Ruby is a scripting language designed for simplified object-oriented programming.\",\n      \"description\": \"Ruby was developed by Yukihiro \\\"Matz\\\" Matsumoto in 1995 with the intent of having an easily readable programming language. It is integrated with the Rails framework to create dynamic web-applications. Ruby's syntax is similar to that of Perl and Python.\",\n      \"created_by\": \"Yukihiro Matsumoto\",\n      \"released\": \"December 21, 1995\",\n      \"created_at\": \"2016-11-28T22:03:59Z\",\n      \"updated_at\": \"2017-10-30T18:16:32Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"rails\",\n      \"display_name\": \"Rails\",\n      \"short_description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby.\",\n      \"description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.\",\n      \"created_by\": \"David Heinemeier Hansson\",\n      \"released\": \"December 13 2005\",\n      \"created_at\": \"2016-12-09T17:03:50Z\",\n      \"updated_at\": \"2017-10-30T16:20:19Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"python\",\n      \"display_name\": \"Python\",\n      \"short_description\": \"Python is a dynamically typed programming language.\",\n      \"description\": \"Python is a dynamically typed programming language designed by Guido Van Rossum. Much like the programming language Ruby, Python was designed to be easily read by programmers. Because of its large following and many libraries, Python can be implemented and used to do anything from webpages to scientific research.\",\n      \"created_by\": \"Guido van Rossum\",\n      \"released\": \"February 20, 1991\",\n      \"created_at\": \"2016-12-07T00:07:02Z\",\n      \"updated_at\": \"2017-10-27T22:45:43Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"jekyll\",\n      \"display_name\": \"Jekyll\",\n      \"short_description\": \"Jekyll is a simple, blog-aware static site generator.\",\n      \"description\": \"Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website.\",\n      \"created_by\": \"Tom Preston-Werner\",\n      \"released\": \"2008\",\n      \"created_at\": \"2016-12-16T21:53:08Z\",\n      \"updated_at\": \"2017-10-27T19:00:24Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"sass\",\n      \"display_name\": \"Sass\",\n      \"short_description\": \"Sass is a stable extension to classic CSS.\",\n      \"description\": \"Sass is a stylesheet language with a main implementation in Ruby. It is an extension of CSS that makes improvements to the old stylesheet format, such as being able to declare variables and using a cleaner nesting syntax.\",\n      \"created_by\": \"Hampton Catlin, Natalie Weizenbaum, Chris Eppstein\",\n      \"released\": \"November 28, 2006\",\n      \"created_at\": \"2016-12-16T21:53:45Z\",\n      \"updated_at\": \"2018-01-16T16:30:40Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"homebrew\",\n      \"display_name\": \"Homebrew\",\n      \"short_description\": \"Homebrew is a package manager for macOS.\",\n      \"description\": \"Homebrew is a package manager for Apple's macOS operating system. It simplifies the installation of software and is popular in the Ruby on Rails community.\",\n      \"created_by\": \"Max Howell\",\n      \"released\": \"2009\",\n      \"created_at\": \"2016-12-17T20:30:44Z\",\n      \"updated_at\": \"2018-02-06T16:14:56Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Preview header missing</h4>\n<pre><code>Status: 415 Unsupported Media Type\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<h4>Preview notice</h4>\n<p>The <code>topics</code> property for repositories on GitHub is currently available for developers to preview. To view the <code>topics</code> property in calls that return repository results, you must provide a custom <a href=\"https://docs.github.com/rest/overview/media-types\">media type</a> in the <code>Accept</code> header:</p>\n<pre><code>application/vnd.github.mercy-preview+json\n</code></pre>\n<p>☝️This header is <strong>required</strong>.</p>\n<hr>\n<h3><a href=\"#search-users\">Search users</a></h3>\n<p>Find users via various criteria. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for users, you can get text match metadata for the issue <strong>login</strong>, <strong>email</strong>, and <strong>name</strong> fields when you pass the <code>text-match</code> media type. For more details about highlighting search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you're looking for a list of popular users, you might try this query:</p>\n<p><code>q=tom+repos:%3E42+followers:%3E1000</code></p>\n<p>This query searches for users with the name <code>tom</code>. The results are restricted to users with more than 42 repositories and over 1,000 followers.</p>\n<pre><code>get /search/users\n</code></pre>\n<h4><a href=\"#search-users--parameters\">Parameters</a></h4>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>In</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>header</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>Setting to <code>application/vnd.github.v3+json</code> is recommended.</p>\n<p>|\n| <code>q</code> | string | query |</p>\n<p>The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see <a href=\"https://docs.github.com/rest/reference/search#constructing-a-search-query\">Constructing a search query</a>. See \"<a href=\"https://help.github.com/articles/searching-users/\">Searching users</a>\" for a detailed list of qualifiers.</p>\n<p>|\n| <code>sort</code> | string | query |</p>\n<p>Sorts the results of your query by number of <code>followers</code> or <code>repositories</code>, or when the person <code>joined</code> GitHub. Default: <a href=\"https://docs.github.com/rest/reference/search#ranking-search-results\">best match</a></p>\n<p>|\n| <code>order</code> | string | query |</p>\n<p>Determines whether the first search result returned is the highest number of matches (<code>desc</code>) or lowest number of matches (<code>asc</code>). This parameter is ignored unless you provide <code>sort</code>.</p>\n<p>Default: <code>desc</code> |\n| <code>per_page</code> | integer | query |</p>\n<p>Results per page (max 100)</p>\n<p>Default: <code>30</code> |\n| <code>page</code> | integer | query |</p>\n<p>Page number of the results to fetch.</p>\n<p>Default: <code>1</code> |</p>\n<h4><a href=\"#search-users--code-samples\">Code samples</a></h4>\n<h5>Shell</h5>\n<pre><code>curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/users\n</code></pre>\n<h5>JavaScript (<a href=\"https://github.com/octokit/core.js#readme\">@octokit/core.js</a>)</h5>\n<pre><code>await octokit.request('GET /search/users', {\n  q: 'q'\n})\n</code></pre>\n<h4>Response</h4>\n<pre><code>Status: 200 OK\n\n{\n  \"total_count\": 12,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"login\": \"mojombo\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/mojombo\",\n      \"html_url\": \"https://github.com/mojombo\",\n      \"followers_url\": \"https://api.github.com/users/mojombo/followers\",\n      \"subscriptions_url\": \"https://api.github.com/users/mojombo/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/mojombo/orgs\",\n      \"repos_url\": \"https://api.github.com/users/mojombo/repos\",\n      \"received_events_url\": \"https://api.github.com/users/mojombo/received_events\",\n      \"type\": \"User\",\n      \"score\": 1,\n      \"following_url\": \"https://api.github.com/users/mojombo/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/mojombo/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/mojombo/starred{/owner}{/repo}\",\n      \"events_url\": \"https://api.github.com/users/mojombo/events{/privacy}\",\n      \"site_admin\": true\n    }\n  ]\n}\n</code></pre>\n<h4>Not modified</h4>\n<pre><code>Status: 304 Not Modified\n</code></pre>\n<h4>Validation failed</h4>\n<pre><code>Status: 422 Unprocessable Entity\n</code></pre>\n<h4>Service unavailable</h4>\n<pre><code>Status: 503 Service Unavailable\n</code></pre>\n<h4>Notes</h4>\n<ul>\n<li><a href=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/en/developers/apps\">Works with GitHub Apps</a></li>\n</ul>\n<hr>\n<h3><a href=\"#text-match-metadata\">Text match metadata</a></h3>\n<p>On GitHub, you can use the context provided by code snippets and highlights in search results. The Search API offers additional metadata that allows you to highlight the matching search terms when displaying search results.</p>\n<p><img src=\"chrome-extension://cjedbglnccaioiolemnfhjncicchinao/assets/images/text-match-search-api.png\" alt=\"code-snippet-highlighting\"></p>\n<p>Requests can opt to receive those text fragments in the response, and every fragment is accompanied by numeric offsets identifying the exact location of each matching search term.</p>\n<p>To get this metadata in your search results, specify the <code>text-match</code> media type in your <code>Accept</code> header.</p>\n<pre><code>application/vnd.github.v3.text-match+json\n</code></pre>\n<p>When you provide the <code>text-match</code> media type, you will receive an extra key in the JSON payload called <code>text_matches</code> that provides information about the position of your search terms within the text and the <code>property</code> that includes the search term. Inside the <code>text_matches</code> array, each object includes the following attributes:</p>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>object_url</code></td>\n<td>The URL for the resource that contains a string property matching one of the search terms.</td>\n</tr>\n<tr>\n<td><code>object_type</code></td>\n<td>The name for the type of resource that exists at the given <code>object_url</code>.</td>\n</tr>\n<tr>\n<td><code>property</code></td>\n<td>The name of a property of the resource that exists at <code>object_url</code>. That property is a string that matches one of the search terms. (In the JSON returned from <code>object_url</code>, the full content for the <code>fragment</code> will be found in the property with this name.)</td>\n</tr>\n<tr>\n<td><code>fragment</code></td>\n<td>A subset of the value of <code>property</code>. This is the text fragment that matches one or more of the search terms.</td>\n</tr>\n<tr>\n<td><code>matches</code></td>\n<td>An array of one or more search terms that are present in <code>fragment</code>. The indices (i.e., \"offsets\") are relative to the fragment. (They are not relative to the <em>full</em> content of <code>property</code>.)</td>\n</tr>\n</tbody>\n</table>\n<h4><a href=\"#example\">Example</a></h4>\n<p>Using cURL, and the <a href=\"#search-issues-and-pull-requests\">example issue search</a> above, our API request would look like this:</p>\n<pre><code>curl -H 'Accept: application/vnd.github.v3.text-match+json' \\\n'https://api.github.com/search/issues?q=windows+label:bug+language:python+state:open&#x26;sort=created&#x26;order=asc'\n</code></pre>\n<p>The response will include a <code>text_matches</code> array for each search result. In the JSON below, we have two objects in the <code>text_matches</code> array.</p>\n<p>The first text match occurred in the <code>body</code> property of the issue. We see a fragment of text from the issue body. The search term (<code>windows</code>) appears twice within that fragment, and we have the indices for each occurrence.</p>\n<p>The second text match occurred in the <code>body</code> property of one of the issue's comments. We have the URL for the issue comment. And of course, we see a fragment of text from the comment body. The search term (<code>windows</code>) appears once within that fragment.</p>\n<pre><code>{\n  \"text_matches\": [\n    {\n      \"object_url\": \"https://api.github.com/repositories/215335/issues/132\",\n      \"object_type\": \"Issue\",\n      \"property\": \"body\",\n      \"fragment\": \"comprehensive windows font I know of).\\n\\nIf we can find a commonly distributed windows font that supports them then no problem (we can use html font tags) but otherwise the '(21)' style is probably better.\\n\",\n      \"matches\": [\n        {\n          \"text\": \"windows\",\n          \"indices\": [\n            14,\n            21\n          ]\n        },\n        {\n          \"text\": \"windows\",\n          \"indices\": [\n            78,\n            85\n          ]\n        }\n      ]\n    },\n    {\n      \"object_url\": \"https://api.github.com/repositories/215335/issues/comments/25688\",\n      \"object_type\": \"IssueComment\",\n      \"property\": \"body\",\n      \"fragment\": \" right after that are a bit broken IMHO :). I suppose we could have some hack that maxes out at whatever the font does...\\n\\nI'll check what the state of play is on Windows.\\n\",\n      \"matches\": [\n        {\n          \"text\": \"Windows\",\n          \"indices\": [\n            163,\n            170\n          ]\n        }\n      ]\n    }\n  ]\n}\n</code></pre>"},{"url":"/docs/career/wed-dev-questions/","relativePath":"docs/career/wed-dev-questions.md","relativeDir":"docs/career","base":"wed-dev-questions.md","name":"wed-dev-questions","frontmatter":{"title":"Javascript Practice","weight":0,"excerpt":"Javascript Practice","seo":{"title":"Javascript Practice","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Inserting an item into an existing array</h2>\n<p>Inserting an item into an existing array is a daily common task. You can add elements to the end of an array using push, to the beginning using unshift, or to the middle using splice.</p>\n<p>Those are known methods, but it doesn't mean there isn't a more performant way. Here we go:</p>\n<h3>Adding an element at the end</h3>\n<p>Adding an element at the end of the array is easy with push(), but it can be done in different ways.</p>\n<pre><code class=\"language-javascript\">var arr = [1, 2, 3, 4, 5];\n\nvar arr2 = [];\n\narr.push(6);\n\narr[arr.length] = 6;\n\narr2 = arr.concat([6]);\n</code></pre>\n<p>Both first methods modify the original array. Don't believe me? Check the <a href=\"http://jsperf.com/push-item-inside-an-array\">jsperf</a></p>\n<h4>Performance on mobile</h4>\n<p><strong>Android (v4.2.2)</strong></p>\n<ol>\n<li><em>arr.push(6);</em> and <em>arr[arr.length] = 6;</em> have the same performance // 3 319 694 ops/sec</li>\n<li><em>arr2 = arr.concat([6]);</em> 50.61 % slower than the other two methods</li>\n</ol>\n<p><strong>Chrome Mobile (v33.0.0)</strong></p>\n<ol>\n<li><em>arr[arr.length] = 6;</em> // 6 125 975 ops/sec</li>\n<li><em>arr.push(6);</em> 66.74 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 87.63 % slower</li>\n</ol>\n<p><strong>Safari Mobile (v9)</strong></p>\n<ol>\n<li><em>arr[arr.length] = 6;</em> // 7 452 898 ops/sec</li>\n<li><em>arr.push(6);</em> 40.19 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 49.78 % slower</li>\n</ol>\n<pre><code class=\"language-javascript\">Final victor\n\n\n\n1. arr[arr.length] = 6; // with an average of 5 632 856 ops/sec\n\n2. arr.push(6); // 35.64 % slower\n\n3. arr2 = arr.concat([6]); // 62.67 % slower\n</code></pre>\n<h4>Performance on desktop</h4>\n<p><strong>Chrome (v48.0.2564)</strong></p>\n<ol>\n<li><em>arr[arr.length] = 6;</em> // 21 602 722 ops/sec</li>\n<li><em>arr.push(6);</em> 61.94 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 87.45 % slower</li>\n</ol>\n<p><strong>Firefox (v44)</strong></p>\n<ol>\n<li><em>arr.push(6);</em> // 56 032 805 ops/sec</li>\n<li><em>arr[arr.length] = 6;</em> 0.52 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 87.36 % slower</li>\n</ol>\n<p><strong>IE (v11)</strong></p>\n<ol>\n<li><em>arr[arr.length] = 6;</em> // 67 197 046 ops/sec</li>\n<li><em>arr.push(6);</em> 39.61 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 93.41 % slower</li>\n</ol>\n<p><strong>Opera (v35.0.2066.68)</strong></p>\n<ol>\n<li><em>arr[arr.length] = 6;</em> // 30 775 071 ops/sec</li>\n<li><em>arr.push(6);</em> 71.60 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 83.70 % slower</li>\n</ol>\n<p><strong>Safari (v9.0.3)</strong></p>\n<ol>\n<li><em>arr.push(6);</em> // 42 670 978 ops/sec</li>\n<li><em>arr[arr.length] = 6;</em> 0.80 % slower</li>\n<li><em>arr2 = arr.concat([6]);</em> 76.07 % slower</li>\n</ol>\n<pre><code class=\"language-javascript\">Final victor\n\n\n\n1. arr[arr.length] = 6; // with an average of 42 345 449 ops/sec\n\n2. arr.push(6); // 34.66 % slower\n\n3. arr2 = arr.concat([6]); // 85.79 % slower\n</code></pre>\n<h3>Add an element at the beginning</h3>\n<p>Now if we are trying to add an item to the beginning of the array:</p>\n<pre><code class=\"language-javascript\">var arr = [1, 2, 3, 4, 5];\n\narr.unshift(0);\n\n[0].concat(arr);\n</code></pre>\n<p>Here is a little more detail: unshift edits the original array; concat returns a new array. <a href=\"http://jsperf.com/unshift-item-inside-an-array\">jsperf</a></p>\n<h4>Performance on mobile</h4>\n<p><strong>Android (v4.2.2)</strong></p>\n<ol>\n<li><em>[0].concat(arr);</em> // 1 808 717 ops/sec</li>\n<li><em>arr.unshift(0);</em> 97.85 % slower</li>\n</ol>\n<p><strong>Chrome Mobile (v33.0.0)</strong></p>\n<ol>\n<li><em>[0].concat(arr);</em> // 1 269 498 ops/sec</li>\n<li><em>arr.unshift(0);</em> 99.86 % slower</li>\n</ol>\n<p><strong>Safari Mobile (v9)</strong></p>\n<ol>\n<li><em>arr.unshift(0);</em> // 3 250 184 ops/sec</li>\n<li><em>[0].concat(arr);</em> 33.67 % slower</li>\n</ol>\n<pre><code class=\"language-javascript\">Final victor\n\n\n\n1. [0].concat(arr); // with an average of 4 972 622 ops/sec\n\n2. arr.unshift(0); // 64.70 % slower\n</code></pre>\n<h4>Performance on desktop</h4>\n<p><strong>Chrome (v48.0.2564)</strong></p>\n<ol>\n<li><em>[0].concat(arr);</em> // 2 656 685 ops/sec</li>\n<li><em>arr.unshift(0);</em> 96.77 % slower</li>\n</ol>\n<p><strong>Firefox (v44)</strong></p>\n<ol>\n<li><em>[0].concat(arr);</em> // 8 039 759 ops/sec</li>\n<li><em>arr.unshift(0);</em> 99.72 % slower</li>\n</ol>\n<p><strong>IE (v11)</strong></p>\n<ol>\n<li><em>[0].concat(arr);</em> // 3 604 226 ops/sec</li>\n<li><em>arr.unshift(0);</em> 98.31 % slower</li>\n</ol>\n<p><strong>Opera (v35.0.2066.68)</strong></p>\n<ol>\n<li><em>[0].concat(arr);</em> // 4 102 128 ops/sec</li>\n<li><em>arr.unshift(0);</em> 97.44 % slower</li>\n</ol>\n<p><strong>Safari (v9.0.3)</strong></p>\n<ol>\n<li><em>arr.unshift(0);</em> // 12 356 477 ops/sec</li>\n<li><em>[0].concat(arr);</em> 15.17 % slower</li>\n</ol>\n<pre><code class=\"language-javascript\">Final victor\n\n\n\n1. [0].concat(arr); // with an average of 6 032 573 ops/sec\n\n2. arr.unshift(0); // 78.65 % slower\n</code></pre>\n<h3>Add an element in the middle</h3>\n<p>Adding items in the middle of an array is easy with splice, and it's the most performant way to do it.</p>\n<pre><code class=\"language-javascript\">var items = ['one', 'two', 'three', 'four'];\n\nitems.splice(items.length / 2, 0, 'hello');\n</code></pre>\n<p>I tried to run these tests in various Browsers and OS and the results were similar. I hope these tips will be useful for you and encourage to perform your own tests!</p>\n<hr>\n<h2>improve-nested-conditionals/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>How can we improve and make a more efficient nested <code>if</code> statement in javascript?</p>\n<pre><code class=\"language-javascript\">if (color) {\n    if (color === 'black') {\n        printBlackBackground();\n    } else if (color === 'red') {\n        printRedBackground();\n    } else if (color === 'blue') {\n        printBlueBackground();\n    } else if (color === 'green') {\n        printGreenBackground();\n    } else {\n        printYellowBackground();\n    }\n}\n</code></pre>\n<p>One way to improve the nested <code>if</code> statement would be using the <code>switch</code> statement. Although it is less verbose and is more ordered, it's not recommended to use it because it's so difficult to debug errors. Here's <a href=\"https://toddmotto.com/deprecating-the-switch-statement-for-object-literals\">why</a>.</p>\n<pre><code class=\"language-javascript\">switch (color) {\n    case 'black':\n        printBlackBackground();\n\n        break;\n\n    case 'red':\n        printRedBackground();\n\n        break;\n\n    case 'blue':\n        printBlueBackground();\n\n        break;\n\n    case 'green':\n        printGreenBackground();\n\n        break;\n\n    default:\n        printYellowBackground();\n}\n</code></pre>\n<p>But what if we have a conditional with several checks in each statement? In this case, if we want it less verbose and more ordered, we can use the conditional <code>switch</code>. If we pass <code>true</code> as a parameter to the <code>switch</code> statement, it allows us to put a conditional in each case.</p>\n<pre><code class=\"language-javascript\">switch (true) {\n    case typeof color === 'string' &#x26;&#x26; color === 'black':\n        printBlackBackground();\n\n        break;\n\n    case typeof color === 'string' &#x26;&#x26; color === 'red':\n        printRedBackground();\n\n        break;\n\n    case typeof color === 'string' &#x26;&#x26; color === 'blue':\n        printBlueBackground();\n\n        break;\n\n    case typeof color === 'string' &#x26;&#x26; color === 'green':\n        printGreenBackground();\n\n        break;\n\n    case typeof color === 'string' &#x26;&#x26; color === 'yellow':\n        printYellowBackground();\n\n        break;\n}\n</code></pre>\n<p>If refactoring is an option, we can try to simplify the functions themselves. For example instead of having a function for each background color we could have an function that takes the color as an argument.</p>\n<pre><code class=\"language-javascript\">function printBackground(color) {\n    if (!color || typeof color !== 'string') {\n        return; // Invalid color, return immediately\n    }\n}\n</code></pre>\n<p>But if refactoring is not an option, we must always avoid having several checks in every condition and avoid using <code>switch</code> as much as possible. We also must take into account that the most efficient way to do this is through an <code>object</code>.</p>\n<pre><code class=\"language-javascript\">var colorObj = {\n    black: printBlackBackground,\n\n    red: printRedBackground,\n\n    blue: printBlueBackground,\n\n    green: printGreenBackground,\n\n    yellow: printYellowBackground\n};\n\nif (color in colorObj) {\n    colorObj[color]();\n}\n</code></pre>\n<p>Here you can find more information about <a href=\"http://www.nicoespeon.com/en/2015/01/oop-revisited-switch-in-js/\">this</a>.</p>\n<hr>\n<h2>sorting-strings-with-accented-characters/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Javascript has a native method <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\"><strong>sort</strong></a> that allows sorting arrays. Doing a simple <code>array.sort()</code> will treat each array entry as a string and sort it alphabetically. Also you can provide your <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters\">own custom sorting</a> function.</p>\n<pre><code class=\"language-javascript\">['Shanghai', 'New York', 'Mumbai', 'Buenos Aires'].sort();\n\n// [\"Buenos Aires\", \"Mumbai\", \"New York\", \"Shanghai\"]\n</code></pre>\n<p>But when you try order an array of non ASCII characters like this <code>['é', 'a', 'ú', 'c']</code>, you will obtain a strange result <code>['c', 'e', 'á', 'ú']</code>. That happens because sort works only with the English language.</p>\n<p>See the next example:</p>\n<pre><code class=\"language-javascript\">// Spanish\n\n['único', 'árbol', 'cosas', 'fútbol'].sort();\n\n// [\"cosas\", \"fútbol\", \"árbol\", \"único\"] // bad order\n\n// German\n\n['Woche', 'wöchentlich', 'wäre', 'Wann'].sort();\n\n// [\"Wann\", \"Woche\", \"wäre\", \"wöchentlich\"] // bad order\n</code></pre>\n<p>Fortunately, there are two ways to overcome this behavior <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare\">localeCompare</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator\">Intl.Collator</a> provided by ECMAScript Internationalization API.</p>\n<blockquote>\n<p>Both methods have their own custom parameters in order to configure it to work adequately.</p>\n</blockquote>\n<h4>Using <code>localeCompare()</code></h4>\n<pre><code class=\"language-javascript\">['único', 'árbol', 'cosas', 'fútbol'].sort(function (a, b) {\n    return a.localeCompare(b);\n});\n\n// [\"árbol\", \"cosas\", \"fútbol\", \"único\"]\n\n['Woche', 'wöchentlich', 'wäre', 'Wann'].sort(function (a, b) {\n    return a.localeCompare(b);\n});\n\n// [\"Wann\", \"wäre\", \"Woche\", \"wöchentlich\"]\n</code></pre>\n<h4>Using <code>Intl.Collator()</code></h4>\n<pre><code class=\"language-javascript\">['único', 'árbol', 'cosas', 'fútbol'].sort(Intl.Collator().compare);\n\n// [\"árbol\", \"cosas\", \"fútbol\", \"único\"]\n\n['Woche', 'wöchentlich', 'wäre', 'Wann'].sort(Intl.Collator().compare);\n\n// [\"Wann\", \"wäre\", \"Woche\", \"wöchentlich\"]\n</code></pre>\n<ul>\n<li>For each method you can customize the location.</li>\n<li>According to <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare#Performance\">Firefox</a> Intl.Collator is faster when comparing large numbers of strings.</li>\n</ul>\n<h3>So when you are working with arrays of strings in a language other than English, remember to use this method to avoid unexpected sorting</h3>\n<h2>differences-between-undefined-and-null/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<ul>\n<li><code>undefined</code> means a variable has not been declared, or has been declared but has not yet been assigned a value</li>\n<li><code>null</code> is an assignment value that means \"no value\"</li>\n<li>Javascript sets unassigned variables with a default value of <code>undefined</code></li>\n<li>Javascript never sets a value to <code>null</code>. It is used by programmers to indicate that a <code>var</code> has no value.</li>\n<li><code>undefined</code> is not valid in JSON while <code>null</code> is</li>\n<li><code>undefined</code> typeof is <code>undefined</code></li>\n<li><code>null</code> typeof is an <code>object</code>. <a href=\"http://www.2ality.com/2013/10/typeof-null.html\">Why?</a></li>\n<li>Both are primitives</li>\n<li>Both are <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Falsy\">falsy</a> (<code>Boolean(undefined) // false</code>, <code>Boolean(null) // false</code>)</li>\n<li>\n<p>You can know if a variable is <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\">undefined</a></p>\n<pre><code class=\"language-javascript\">typeof variable === 'undefined';\n</code></pre>\n</li>\n</ul>\n<pre><code>- You can check if a variable is [null](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null)\n\n\n\n  ```javascript\n\n  variable === null\n</code></pre>\n<ul>\n<li>\n<p>The <strong>equality</strong> operator considers them equal, but the <strong>identity</strong> doesn't</p>\n<pre><code class=\"language-javascript\">null == undefined; // true\n\nnull === undefined; // false\n</code></pre>\n</li>\n</ul>\n<pre><code>---\n\n\n\n\n\n\n\n\n\n# writing-a-single-method-for-arrays-and-a-single-element/\n\n\n\n\n\n    - en\n\n    - javascript\n\n---\n\n\n\nRather than writing separate methods to handle an array and a single element parameter, write your functions so they can handle both. This is similar to how some of jQuery's functions work (`css` will modify everything matched by the selector).\n\n\n\nYou just have to concat everything into an array first. `Array.concat` will accept an array or a single element.\n\n\n\n```javascript\n\nfunction printUpperCase(words) {\n\n  var elements = [].concat(words || []);\n\n  for (var i = 0; i &#x3C; elements.length; i++) {\n\n    console.log(elements[i].toUpperCase());\n\n  }\n\n}\n</code></pre>\n<p><code>printUpperCase</code> is now ready to accept a single node or an array of nodes as its parameter. It also avoids the potential <code>TypeError</code> that would be thrown if no parameter was passed.</p>\n<pre><code class=\"language-javascript\">printUpperCase('cactus');\n\n// => CACTUS\n\nprintUpperCase(['cactus', 'bear', 'potato']);\n\n// => CACTUS\n\n//  BEAR\n\n//  POTATO\n</code></pre>\n<hr>\n<h2>use-strict-and-get-lazy/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Strict-mode JavaScript makes it easier for the developer to write \"secure\" JavaScript.</p>\n<p>By default, JavaScript allows the programmer to be pretty careless, for example, by not requiring us to declare our variables with \"var\" when we first introduce them. While this may seem like a convenience to the unseasoned developer, it's also the source of many errors when a variable name is misspelled or accidentally referred to out of its scope.</p>\n<p>Programmers like to make the computer do the boring stuff for us, and automatically check our work for mistakes. That's what the JavaScript \"use strict\" directive allows us to do, by turning our mistakes into JavaScript errors.</p>\n<p>We add this directive either by adding it at the top of a js file:</p>\n<pre><code class=\"language-javascript\">// Whole-script strict mode syntax\n\n'use strict';\n\nvar v = \"Hi!  I'm a strict mode script!\";\n</code></pre>\n<p>or inside a function:</p>\n<pre><code class=\"language-javascript\">function f() {\n    // Function-level strict mode syntax\n\n    'use strict';\n\n    function nested() {\n        return 'And so am I!';\n    }\n\n    return \"Hi!  I'm a strict mode function!  \" + nested();\n}\n\nfunction f2() {\n    return \"I'm not strict.\";\n}\n</code></pre>\n<p>By including this directive in a JavaScript file or function, we will direct the JavaScript engine to execute in strict mode which disables a bunch of behaviors that are usually undesirable in larger JavaScript projects. Among other things, strict mode changes the following behaviors:</p>\n<ul>\n<li>Variables can only be introduced when they are preceded with \"var\"</li>\n<li>Attempting to write to read-only properties generates a noisy error</li>\n<li>You have to call constructors with the \"new\" keyword</li>\n<li>\"this\" is not implicitly bound to the global object</li>\n<li>Very limited use of eval() allowed</li>\n<li>Protects you from using reserved words or future reserved words as variable names</li>\n</ul>\n<p>Strict mode is great for new projects, but can be challenging to introduce into older projects that don't already use it in most places. It also can be problematic if your build chain concatenates all your js files into one big file, as this may cause all files to execute in strict mode.</p>\n<p>It is not a statement, but a literal expression, ignored by earlier versions of JavaScript. Strict mode is supported in:</p>\n<ul>\n<li>Internet Explorer from version 10.</li>\n<li>Firefox from version 4.</li>\n<li>Chrome from version 13.</li>\n<li>Safari from version 5.1.</li>\n<li>Opera from version 12.</li>\n</ul>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode\">See MDN for a fuller description of strict mode</a></h3>\n<h2>converting-a-node-list-to-an-array/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>The <code>querySelectorAll</code> method returns an array-like object called a node list. These data structures are referred to as \"Array-like\", because they appear as an array, but can not be used with array methods like <code>map</code> and <code>forEach</code>. Here's a quick, safe, and reusable way to convert a node list into an array of DOM elements:</p>\n<pre><code class=\"language-javascript\">const nodelist = document.querySelectorAll('div');\n\nconst nodelistToArray = Array.apply(null, nodelist);\n\n\n\n//later on ..\n\n\n\nnodelistToArray.forEach(...);\n\nnodelistToArray.map(...);\n\nnodelistToArray.slice(...);\n\n\n\n//etc...\n</code></pre>\n<p>The <code>apply</code> method is used to pass an array of arguments to a function with a given <code>this</code> value. <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply\">MDN</a> states that <code>apply</code> will take an array-like object, which is exactly what <code>querySelectorAll</code> returns. Since we don't need to specify a value for <code>this</code> in the context of the function, we pass in <code>null</code> or <code>0</code>. The result is an actual array of DOM elements which contains all of the available array methods.</p>\n<p>Alternatively you can use <code>Array.prototype.slice</code> combined with <code>Function.prototype.call</code> or <code>Function.prototype.apply</code> passing the array-like object as the value of <code>this</code>:</p>\n<pre><code class=\"language-javascript\">const nodelist = document.querySelectorAll('div');\n\nconst nodelistToArray = Array.prototype.slice.call(nodelist); // or equivalently Array.prototype.slice.apply(nodelist);\n\n\n\n//later on ..\n\n\n\nnodelistToArray.forEach(...);\n\nnodelistToArray.map(...);\n\nnodelistToArray.slice(...);\n\n\n\n//etc...\n</code></pre>\n<p>Or if you are using ES2015 you can use the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator\">spread operator <code>...</code></a></p>\n<pre><code class=\"language-js\">const nodelist = [...document.querySelectorAll('div')]; // returns a real array\n\n\n\n//later on ..\n\n\n\nnodelist.forEach(...);\n\nnodelist.map(...);\n\nnodelist.slice(...);\n\n\n\n//etc...\n</code></pre>\n<hr>\n<h2>template-strings/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>As of ES6, JS now has template strings as an alternative to the classic end quotes strings.</p>\n<p>Ex: Normal string</p>\n<pre><code class=\"language-javascript\">var firstName = 'Jake';\n\nvar lastName = 'Rawr';\n\nconsole.log('My name is ' + firstName + ' ' + lastName);\n\n// My name is Jake Rawr\n</code></pre>\n<p>Template String</p>\n<pre><code class=\"language-javascript\">var firstName = 'Jake';\n\nvar lastName = 'Rawr';\n\nconsole.log(`My name is ${firstName} ${lastName}`);\n\n// My name is Jake Rawr\n</code></pre>\n<p>You can do multi-line strings without , perform simple logic (ie 2+3) or even use the <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator\">ternary operator</a> inside <code>${}</code> in template strings.</p>\n<pre><code class=\"language-javascript\">var val1 = 1,\n    val2 = 2;\n\nconsole.log(`${val1} is ${val1 &#x3C; val2 ? 'less than' : 'greater than'} ${val2}`);\n\n// 1 is less than 2\n</code></pre>\n<p>You are also able to modify the output of template strings using a function; they are called <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings#Tagged_template_strings\">tagged template strings</a> for example usages of tagged template strings.</p>\n<p>You may also want to <a href=\"https://hacks.mozilla.org/2015/05/es6-in-depth-template-strings-2\">read</a> to understand template strings more.</p>\n<hr>\n<h2>check-if-a-property-is-in-a-object/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>When you have to check if a property is present in an <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects\">object</a>, you probably are doing something like this:</p>\n<pre><code class=\"language-javascript\">var myObject = {\n\n  name: '@tips_js'\n\n};\n\n\n\nif (myObject.name) { ... }\n</code></pre>\n<p>That's ok, but you have to know that there are two native ways for this kind of thing, the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in\"><code>in</code> operator</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty\"><code>Object.hasOwnProperty</code></a>. Every object descended from <code>Object</code>, has both ways available.</p>\n<h4>See the big Difference</h4>\n<pre><code class=\"language-javascript\">var myObject = {\n    name: '@tips_js'\n};\n\nmyObject.hasOwnProperty('name'); // true\n\n'name' in myObject; // true\n\nmyObject.hasOwnProperty('valueOf'); // false, valueOf is inherited from the prototype chain\n\n'valueOf' in myObject; // true\n</code></pre>\n<p>Both differ in the depth at which they check the properties. In other words, <code>hasOwnProperty</code> will only return true if key is available on that object directly. However, the <code>in</code> operator doesn't discriminate between properties created on an object and properties inherited from the prototype chain.</p>\n<p>Here's another example:</p>\n<pre><code class=\"language-javascript\">var myFunc = function () {\n    this.name = '@tips_js';\n};\n\nmyFunc.prototype.age = '10 days';\n\nvar user = new myFunc();\n\nuser.hasOwnProperty('name'); // true\n\nuser.hasOwnProperty('age'); // false, because age is from the prototype chain\n</code></pre>\n<p>Check the <a href=\"https://jsbin.com/tecoqa/edit?js,console\">live examples here</a>!</p>\n<h3>I also recommend reading <a href=\"https://github.com/loverajoel/jstips/issues/62\">this discussion</a> about common mistakes made when checking a property's existence in objects</h3>\n<h2>hoisting/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Understanding <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var#var_hoisting\">hoisting</a> will help you organize your function scope. Just remember, variable declarations and function definitions are hoisted to the top. Variable definitions are not, even if you declare and define a variable on the same line. Also, a variable <strong>declaration</strong> lets the system know that the variable exists while <strong>definition</strong> assigns it a value.</p>\n<pre><code class=\"language-javascript\">function doTheThing() {\n    // ReferenceError: notDeclared is not defined\n\n    console.log(notDeclared);\n\n    // Outputs: undefined\n\n    console.log(definedLater);\n\n    var definedLater;\n\n    definedLater = 'I am defined!';\n\n    // Outputs: 'I am defined!'\n\n    console.log(definedLater);\n\n    // Outputs: undefined\n\n    console.log(definedSimulateneously);\n\n    var definedSimulateneously = 'I am defined!';\n\n    // Outputs: 'I am defined!'\n\n    console.log(definedSimulateneously);\n\n    // Outputs: 'I did it!'\n\n    doSomethingElse();\n\n    function doSomethingElse() {\n        console.log('I did it!');\n    }\n\n    // TypeError: undefined is not a function\n\n    functionVar();\n\n    var functionVar = function () {\n        console.log('I did it!');\n    };\n}\n</code></pre>\n<p>To make things easier to read, declare all of your variables at the top of your function scope so it is clear which scope the variables are coming from. Define your variables before you need to use them. Define your functions at the bottom of your scope to keep them out of your way.</p>\n<hr>\n<h2>pseudomandatory-parameters-in-es6-functions/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>In many programming languages the parameters of a function are by default mandatory and the developer has to explicitly define that a parameter is optional. In Javascript, every parameter is optional, but we can enforce this behavior without messing with the actual body of a function, taking advantage of [<strong>es6's default values for parameters</strong>] (<a href=\"http://exploringjs.com/es6/ch%5C_parameter-handling.html#sec%5C_parameter-default-values\">http://exploringjs.com/es6/ch\\_parameter-handling.html#sec\\_parameter-default-values</a>) feature.</p>\n<pre><code class=\"language-javascript\">const _err = function (message) {\n    throw new Error(message);\n};\n\nconst getSum = (a = _err('a is not defined'), b = _err('b is not defined')) => a + b;\n\ngetSum(10); // throws Error, b is not defined\n\ngetSum(undefined, 10); // throws Error, a is not defined\n</code></pre>\n<h3><code>_err</code> is a function that immediately throws an Error. If no value is passed for one of the parameters, the default value is going to be used, <code>_err</code> will be called and an Error will be thrown. You can see more examples for the <strong>default parameters feature</strong> on <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/default_parameters\">Mozilla's Developer Network</a></h3>\n<h2>tip-to-measure-performance-of-a-javascript-block/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>For quickly measuring performance of a javascript block, we can use the console functions like <a href=\"https://developer.chrome.com/devtools/docs/console-api#consoletimelabel\"><code>console.time(label)</code></a> and <a href=\"https://developer.chrome.com/devtools/docs/console-api#consoletimeendlabel\"><code>console.timeEnd(label)</code></a></p>\n<pre><code class=\"language-javascript\">console.time('Array initialize');\n\nvar arr = new Array(100),\n    len = arr.length,\n    i;\n\nfor (i = 0; i &#x3C; len; i++) {\n    arr[i] = new Object();\n}\n\nconsole.timeEnd('Array initialize'); // Outputs: Array initialize: 0.711ms\n</code></pre>\n<p>More info: <a href=\"https://github.com/DeveloperToolsWG/console-object\">Console object</a>, <a href=\"https://mathiasbynens.be/notes/javascript-benchmarking\">Javascript benchmarking</a></p>\n<p>Demo: <a href=\"https://jsfiddle.net/meottb62/\">jsfiddle</a> - <a href=\"http://codepen.io/anon/pen/JGJPoa\">codepen</a> (outputs in browser console)</p>\n<blockquote>\n<p>Note: As <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Console/time\">Mozilla</a> suggested don't use this for production sites, use it for development purposes only.</p>\n</blockquote>\n<hr>\n<h2>fat-arrow-functions/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Introduced as a new feature in ES6, fat arrow functions may come as a handy tool to write more code in fewer lines. The name comes from its syntax, <code>=></code>, which is a 'fat arrow', as compared to a thin arrow <code>-></code>. Some programmers might already know this type of function from different languages such as Haskell, as 'lambda expressions', or as 'anonymous functions'. It is called anonymous, as these arrow functions do not have a descriptive function name.</p>\n<h4>What are the benefits?</h4>\n<ul>\n<li>Syntax: fewer LOC; no more typing <code>function</code> keyword over and over again</li>\n<li>Semantics: capturing the keyword <code>this</code> from the surrounding context</li>\n</ul>\n<h4>Simple syntax example</h4>\n<p>Have a look at these two code snippets, which do the exact same job, and you will quickly understand what fat arrow functions do:</p>\n<pre><code class=\"language-javascript\">// general syntax for fat arrow functions\n\nparam => expression\n\n\n\n// may also be written with parentheses\n\n// parentheses are required on multiple params\n\n(param1 [, param2]) => expression\n\n\n\n\n\n// using functions\n\nvar arr = [5,3,2,9,1];\n\nvar arrFunc = arr.map(function(x) {\n\n  return x * x;\n\n});\n\nconsole.log(arr)\n\n\n\n// using fat arrow\n\nvar arr = [5,3,2,9,1];\n\nvar arrFunc = arr.map((x) => x*x);\n\nconsole.log(arr)\n</code></pre>\n<p>As you can see, the fat arrow function in this case can save you time typing out the parentheses as well as the function and return keywords. I would advise you to always write parentheses around the parameter inputs, as the parentheses will be needed for multiple input parameters, such as in <code>(x,y) => x+y</code>. It is just a way to cope with forgetting them in different use cases. But the code above would also work like this: <code>x => x*x</code>. So far, these are only syntactical improvements, which lead to fewer LOC and better readability.</p>\n<h4>Lexically binding <code>this</code></h4>\n<p>There is another good reason to use fat arrow functions. There is the issue with the context of <code>this</code>. With arrow functions, you don't need to worry about <code>.bind(this)</code> or setting <code>that = this</code> anymore, as fat arrow functions pick the context of <code>this</code> from the lexical surrounding. Have a look at the next [example] (<a href=\"https://jsfiddle.net/pklinger/rw94oc11/\">https://jsfiddle.net/pklinger/rw94oc11/</a>):</p>\n<pre><code class=\"language-javascript\">// globally defined this.i\n\nthis.i = 100;\n\nvar counterA = new CounterA();\n\nvar counterB = new CounterB();\n\nvar counterC = new CounterC();\n\nvar counterD = new CounterD();\n\n// bad example\n\nfunction CounterA() {\n    // CounterA's `this` instance (!! gets ignored here)\n\n    this.i = 0;\n\n    setInterval(function () {\n        // `this` refers to global object, not to CounterA's `this`\n\n        // therefore starts counting with 100, not with 0 (local this.i)\n\n        this.i++;\n\n        document.getElementById('counterA').innerHTML = this.i;\n    }, 500);\n}\n\n// manually binding that = this\n\nfunction CounterB() {\n    this.i = 0;\n\n    var that = this;\n\n    setInterval(function () {\n        that.i++;\n\n        document.getElementById('counterB').innerHTML = that.i;\n    }, 500);\n}\n\n// using .bind(this)\n\nfunction CounterC() {\n    this.i = 0;\n\n    setInterval(\n        function () {\n            this.i++;\n\n            document.getElementById('counterC').innerHTML = this.i;\n        }.bind(this),\n        500\n    );\n}\n\n// fat arrow function\n\nfunction CounterD() {\n    this.i = 0;\n\n    setInterval(() => {\n        this.i++;\n\n        document.getElementById('counterD').innerHTML = this.i;\n    }, 500);\n}\n</code></pre>\n<h3>Further information about fat arrow functions may be found at [MDN] (<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow%5C_functions\">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow\\_functions</a>). To see different syntax options visit [this site] (<a href=\"http://jsrocks.org/2014/10/arrow-functions-and-their-scope/\">http://jsrocks.org/2014/10/arrow-functions-and-their-scope/</a>)</h3>\n<h2>even-simpler-way-of-using-indexof-as-a-contains-clause/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>JavaScript by default does not have a contains method. And for checking existence of a substring in a string or an item in an array you may do this:</p>\n<pre><code class=\"language-javascript\">var someText = 'javascript rules';\n\nif (someText.indexOf('javascript') !== -1) {\n}\n\n// or\n\nif (someText.indexOf('javascript') >= 0) {\n}\n</code></pre>\n<p>But let's look at these <a href=\"https://github.com/strongloop/express\">Expressjs</a> code snippets.</p>\n<p><a href=\"https://github.com/strongloop/express/blob/2f8ac6726fa20ab5b4a05c112c886752868ac8ce/examples/mvc/lib/boot.js#L26\">examples/mvc/lib/boot.js</a></p>\n<pre><code class=\"language-javascript\">for (var key in obj) {\n\n  // \"reserved\" exports\n\n  if (~['name', 'prefix', 'engine', 'before'].indexOf(key)) continue;\n</code></pre>\n<p><a href=\"https://github.com/strongloop/express/blob/2f8ac6726fa20ab5b4a05c112c886752868ac8ce/lib/utils.js#L93\">lib/utils.js</a></p>\n<pre><code class=\"language-javascript\">exports.normalizeType = function (type) {\n    return ~type.indexOf('/') ? acceptParams(type) : { value: mime.lookup(type), params: {} };\n};\n</code></pre>\n<p><a href=\"https://github.com/strongloop/express/blob/2f8ac6726fa20ab5b4a05c112c886752868ac8ce/examples/web-service/index.js#L35\">examples/web-service/index.js</a></p>\n<pre><code class=\"language-javascript\">// key is invalid\n\nif (!~apiKeys.indexOf(key)) return next(error(401, 'invalid api key'));\n</code></pre>\n<p>The gotcha is the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators\">bitwise operator</a> <strong>~</strong>, \"Bitwise operators perform their operations on binary representations, but they return standard JavaScript numerical values.\"</p>\n<p>It transforms <code>-1</code> into <code>0</code>, and <code>0</code> evaluates to <code>false</code> in JavaScript:</p>\n<pre><code class=\"language-javascript\">var someText = 'text';\n\n!!~someText.indexOf('tex'); // someText contains \"tex\" - true\n\n!~someText.indexOf('tex'); // someText NOT contains \"tex\" - false\n\n~someText.indexOf('asd'); // someText doesn't contain \"asd\" - false\n\n~someText.indexOf('ext'); // someText contains \"ext\" - true\n</code></pre>\n<h4>String.prototype.includes()</h4>\n<p>ES6 introduced the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\">includes() method</a> and you can use it to determine whether or not a string includes another string:</p>\n<pre><code class=\"language-javascript\">'something'.includes('thing'); // true\n</code></pre>\n<p>With ECMAScript 2016 (ES7) it is even possible to use these techniques with Arrays:</p>\n<pre><code class=\"language-javascript\">!!~[1, 2, 3].indexOf(1); // true\n\n[1, 2, 3].includes(1); // true\n</code></pre>\n<h3><strong>Unfortunately, it is only supported in Chrome, Firefox, Safari 9 or above and Edge; not IE11 or lower.</strong> <strong>It's better used in controlled environments.</strong></h3>\n<h2>passing-arguments-to-callback-functions/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>By default you cannot pass arguments to a callback function. For example:</p>\n<pre><code class=\"language-js\">function callback() {\n    console.log('Hi human');\n}\n\ndocument.getElementById('someelem').addEventListener('click', callback);\n</code></pre>\n<p>You can take advantage of the closure scope in Javascript to pass arguments to callback functions. Check this example:</p>\n<pre><code class=\"language-js\">function callback(a, b) {\n    return function () {\n        console.log('sum = ', a + b);\n    };\n}\n\nvar x = 1,\n    y = 2;\n\ndocument.getElementById('someelem').addEventListener('click', callback(x, y));\n</code></pre>\n<h4>What are closures?</h4>\n<p>Closures are functions that refer to independent (free) variables. In other words, the function defined in the closure 'remembers' the environment in which it was created. <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures\">Check MDN Documentation</a> to learn more.</p>\n<p>So this way the arguments <code>x</code> and <code>y</code> are in scope of the callback function when it is called.</p>\n<p>Another method to do this is using the <code>bind</code> method. For example:</p>\n<pre><code class=\"language-js\">var alertText = function (text) {\n    alert(text);\n};\n\ndocument.getElementById('someelem').addEventListener('click', alertText.bind(this, 'hello'));\n</code></pre>\n<p>There is a very slight difference in performance of both methods, checkout <a href=\"http://jsperf.com/bind-vs-closure-23\">jsperf</a>.</p>\n<hr>\n<h2>nodejs-run-a-module-if-it-is-not-required/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>In node, you can tell your program to do two different things depending on whether the code is run from <code>require('./something.js')</code> or <code>node something.js</code>. This is useful if you want to interact with one of your modules independently.</p>\n<pre><code class=\"language-js\">if (!module.parent) {\n    // ran with `node something.js`\n\n    app.listen(8088, function () {\n        console.log('app listening on port 8088');\n    });\n} else {\n    // used with `require('/.something.js')`\n\n    module.exports = app;\n}\n</code></pre>\n<h3>See <a href=\"https://nodejs.org/api/modules.html#modules_module_parent\">the documentation for modules</a> for more info</h3>\n<h2>rounding-the-fast-way/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>This tip is about performance...with a hidden price tag.</p>\n<p>Have you ever come across the <a href=\"http://stackoverflow.com/questions/5971645/what-is-the-double-tilde-operator-in-javascript\">double tilde <code>~~</code> operator</a>? It's also often called the \"double bitwise NOT\" operator. You can often use it as a faster substitute for <code>Math.trunc()</code>. Why is that?</p>\n<p>One bitwise shift <code>~</code> first truncates <code>input</code> to 32 bits, then transforms it into <code>-(input+1)</code>. The double bitwise shift therefore transforms the input into <code>-(-(input + 1)+1)</code> making it a great tool to round towards zero. For numeric input, it therefore mimics <code>Math.trunc()</code>. On failure, <code>0</code> is returned, which might come in handy sometimes instead of <code>Math.trunc()</code>, which returns <code>NaN</code> on failure.</p>\n<pre><code class=\"language-js\">// single ~\n\nconsole.log(~1337); // -1338\n\n// numeric input\n\nconsole.log(~~47.11); // -> 47\n\nconsole.log(~~1.9999); // -> 1\n\nconsole.log(~~3); // -> 3\n</code></pre>\n<p>However, while <code>~~</code> is probably a better performer, experienced programmers often stick with <code>Math.trunc()</code> instead. To understand why, here's a clinical view on this operator.</p>\n<h4>INDICATIONS</h4>\n<p><strong>When every CPU cycle counts</strong></p>\n<p><code>~~</code> is probably faster than <code>Math.trunc()</code> across the board, though you should <a href=\"https://jsperf.com/jsfvsbitnot/10\">test that assumption</a> on whichever platforms matter to you. Also, you'd generally have to perform millions of such operations to have any visible impact at run time.</p>\n<p><strong>When code clarity is not a concern</strong></p>\n<p>If you're trying to confuse others, or get maximum utility from your minifier/uglifier, this is a relatively cheap way to do it.</p>\n<h4>CONTRAINDICATIONS</h4>\n<p><strong>When your code needs to be maintained</strong></p>\n<p>Code clarity is of great importance in the long term, whether you work in a team, contribute to public code repos, or fly solo. As <a href=\"http://c2.com/cgi/wiki?CodeForTheMaintainer\">the oft-quoted saying</a> goes:</p>\n<blockquote>\n<p>Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.</p>\n</blockquote>\n<p>For a solo programmer, that psychopath is inevitably \"you in six months\".</p>\n<p><strong>When you forget that <code>~~</code> always rounds to zero</strong></p>\n<p>Newbie programmers may fixate on the cleverness of <code>~~</code>, forgetting the significance of \"just drop the fractional portion of this number\". This can easily lead to <strong>fencepost errors</strong> (a.k.a. \"off-by-one\") when transforming floats to array indices or related ordinal values, where a different kind of fractional rounding may actually be called for. (Lack of code clarity usually contributes to this problem.)</p>\n<p>For instance, if you're counting numbers on a \"nearest integer\" basis, you should use <code>Math.round()</code> instead of <code>~~</code>, but programmer laziness and the impact of <em><strong>10 whole characters saved per use</strong></em> on human fingers often triumph over cold logic, leading to incorrect results.</p>\n<p>In contrast, the very names of the <code>Math.xyz()</code> functions clearly communicate their effect, reducing the probability of accidental errors.</p>\n<p><strong>When dealing with large-magnitude numbers</strong></p>\n<p>Because <code>~</code> first does a 32-bit conversion, <code>~~</code> results in bogus values around ±2.15 billion. If you don't properly range-check your input, a user could trigger unexpected behavior when the transformed value ends up being a great distance from the original:</p>\n<pre><code class=\"language-js\">a = 2147483647.123; // maximum positive 32-bit integer, plus a bit more\n\nconsole.log(~~a); // ->  2147483647     (ok)\n\na += 10000; // ->  2147493647.123 (ok)\n\nconsole.log(~~a); // -> -2147483648     (huh?)\n</code></pre>\n<p>One particularly vulnerable area involves dealing with Unix epoch timestamps (measured in seconds from 1 Jan 1970 00:00:00 UTC). A quick way to get such values is:</p>\n<pre><code class=\"language-js\">epoch_int = ~~(+new Date() / 1000); // Date() epochs in milliseconds, so we scale accordingly\n</code></pre>\n<p>However, when dealing with timestamps after 19 Jan 2038 03:14:07 UTC (sometimes called the <strong>Y2038 limit</strong>), this breaks horribly:</p>\n<pre><code class=\"language-js\">// epoch timestamp for 1 Jan 2040 00:00:00.123 UTC\n\nepoch = +new Date('2040-01-01') / 1000 + 0.123; // ->  2208988800.123\n\n// back to the future!\n\nepoch_int = ~~epoch; // -> -2085978496\n\nconsole.log(new Date(epoch_int * 1000)); // ->  Wed Nov 25 1903 17:31:44 UTC\n\n// that was fun, now let's get real\n\nepoch_flr = Math.floor(epoch); // ->  2208988800\n\nconsole.log(new Date(epoch_flr * 1000)); // ->  Sun Jan 01 2040 00:00:00 UTC\n</code></pre>\n<p><strong>When the original input wasn't sanitized</strong></p>\n<p>Because <code>~~</code> transforms every non-number into <code>0</code>:</p>\n<pre><code class=\"language-js\">console.log(~~[]); // -> 0\n\nconsole.log(~~NaN); // -> 0\n\nconsole.log(~~null); // -> 0\n</code></pre>\n<p>some programmers treat it as alternative to proper input validation. However, this can lead to strange logic bugs down the line, since you're no longer distinguishing between invalid inputs and actual <code>0</code> values. This is therefore <em>not</em> a recommended practice.</p>\n<p><strong>When so many people think <code>~~X == Math.floor(X)</code></strong></p>\n<p>Most people who write about \"double bitwise NOT\" incorrectly equate it with <code>Math.floor()</code> for some reason. If you can't write about it accurately, odds are good you'll eventually misuse it.</p>\n<p>Others are more careful to mention <code>Math.floor()</code> for positive inputs and <code>Math.ceil()</code> for negative ones, but that forces you to stop and think about the values you're dealing with. This defeats the purpose of <code>~~</code> as a handy no-gotchas shortcut.</p>\n<h4>DOSAGE</h4>\n<p>Avoid where possible. Use sparingly otherwise.</p>\n<h4>ADMINISTRATION</h4>\n<ol>\n<li>Apply cautiously.</li>\n<li>Sanitize values before applying.</li>\n<li>Carefully document relevant assumptions about the values being transformed.</li>\n<li>\n<p>Review code to deal with, at minimum:</p>\n<ul>\n<li>logic bugs where invalid inputs are instead passed to other code modules as valid <code>0</code> values</li>\n<li>range errors on transformed inputs</li>\n<li>fencepost errors due to incorrect rounding direction</li>\n</ul>\n</li>\n</ol>\n<hr>\n<h2>safe-string-concatenation/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Suppose you have a couple of variables with unknown types and you want to concatenate them in a string. To be sure that the arithmetical operation is not be applied during concatenation, use <code>concat</code>:</p>\n<pre><code class=\"language-javascript\">var one = 1;\n\nvar two = 2;\n\nvar three = '3';\n\nvar result = ''.concat(one, two, three); //\"123\"\n</code></pre>\n<p>This way of concatenting does exactly what you'd expect. In contrast, concatenation with pluses might lead to unexpected results:</p>\n<pre><code class=\"language-javascript\">var one = 1;\n\nvar two = 2;\n\nvar three = '3';\n\nvar result = one + two + three; //\"33\" instead of \"123\"\n</code></pre>\n<p>Speaking about performance, compared to the <code>join</code> <a href=\"http://www.sitepoint.com/javascript-fast-string-concatenation/\">type</a> of concatenation, the speed of <code>concat</code> is pretty much the same.</p>\n<h3>You can read more about the <code>concat</code> function on MDN <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat\">page</a></h3>\n<h2>return-objects-to-enable-chaining-of-functions/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>When creating functions on an object in Object Oriented Javascript, returning the object in the function will enable you to chain functions together.</p>\n<pre><code class=\"language-js\">function Person(name) {\n    this.name = name;\n\n    this.sayName = function () {\n        console.log('Hello my name is: ', this.name);\n\n        return this;\n    };\n\n    this.changeName = function (name) {\n        this.name = name;\n\n        return this;\n    };\n}\n\nvar person = new Person('John');\n\nperson.sayName().changeName('Timmy').sayName();\n</code></pre>\n<hr>\n<h2>shuffle-an-array/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>This snippet here uses <a href=\"https://www.wikiwand.com/en/Fisher%E2%80%93Yates_shuffle\">Fisher-Yates Shuffling</a> Algorithm to shuffle a given array.</p>\n<pre><code class=\"language-javascript\">function shuffle(arr) {\n    var i, j, temp;\n\n    for (i = arr.length - 1; i > 0; i--) {\n        j = Math.floor(Math.random() * (i + 1));\n\n        temp = arr[i];\n\n        arr[i] = arr[j];\n\n        arr[j] = temp;\n    }\n\n    return arr;\n}\n</code></pre>\n<p>An example:</p>\n<pre><code class=\"language-javascript\">var a = [1, 2, 3, 4, 5, 6, 7, 8];\n\nvar b = shuffle(a);\n\nconsole.log(b);\n\n// [2, 7, 8, 6, 5, 3, 1, 4]\n</code></pre>\n<hr>\n<h2>two-ways-to-empty-an-array/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>You define an array and want to empty its contents. Usually, you would do it like this:</p>\n<pre><code class=\"language-javascript\">// define Array\n\nvar list = [1, 2, 3, 4];\n\nfunction empty() {\n    //empty your array\n\n    list = [];\n}\n\nempty();\n</code></pre>\n<p>But there is another way to empty an array that is more performant.</p>\n<p>You should use code like this:</p>\n<pre><code class=\"language-javascript\">var list = [1, 2, 3, 4];\n\nfunction empty() {\n    //empty your array\n\n    list.length = 0;\n}\n\nempty();\n</code></pre>\n<ul>\n<li><code>list = []</code> assigns a reference to a new array to a variable, while any other references are unaffected. which means that references to the contents of the previous array are still kept in memory, leading to memory leaks.</li>\n<li><code>list.length = 0</code> deletes everything in the array, which does hit other references.</li>\n</ul>\n<p>In other words, if you have two references to the same array (<code>a = [1,2,3]; a2 = a;</code>), and you delete the array's contents using <code>list.length = 0</code>, both references (a and a2) will now point to the same empty array. (So don't use this technique if you don't want a2 to hold an empty array!)</p>\n<p>Think about what this will output:</p>\n<pre><code class=\"language-js\">var foo = [1, 2, 3];\n\nvar bar = [1, 2, 3];\n\nvar foo2 = foo;\n\nvar bar2 = bar;\n\nfoo = [];\n\nbar.length = 0;\n\nconsole.log(foo, bar, foo2, bar2);\n\n// [] [] [1, 2, 3] []\n</code></pre>\n<p>Stackoverflow more detail: <a href=\"http://stackoverflow.com/questions/4804235/difference-between-array-length-0-and-array\">difference-between-array-length-0-and-array</a></p>\n<hr>\n<h2>converting-to-number-fast-way/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Converting strings to numbers is extremely common. The easiest and fastest (<a href=\"https://jsperf.com/number-vs-parseint-vs-plus/29\">jsPerf</a>) way to achieve that would be using the <code>+</code> (plus) operator.</p>\n<pre><code class=\"language-javascript\">var one = '1';\n\nvar numberOne = +one; // Number 1\n</code></pre>\n<p>You can also use the <code>-</code> (minus) operator which type-converts the value into number but also negates it.</p>\n<pre><code class=\"language-javascript\">var one = '1';\n\nvar negativeNumberOne = -one; // Number -1\n</code></pre>\n<hr>\n<h2>use_===<em>instead</em>of_==/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>The <code>==</code> (or <code>!=</code>) operator performs an automatic type conversion if needed. The <code>===</code> (or <code>!==</code>) operator will not perform any conversion. It compares the value and the type, which could be considered faster (<a href=\"http://jsperf.com/strictcompare\">jsPref</a>) than <code>==</code>.</p>\n<pre><code class=\"language-js\">[10] ==  10      // is true\n\n[10] === 10      // is false\n\n\n\n'10' ==  10      // is true\n\n'10' === 10      // is false\n\n\n\n []  ==  0       // is true\n\n []  === 0       // is false\n\n\n\n ''  ==  false   // is true but true == \"a\" is false\n\n ''  === false   // is false\n</code></pre>\n<hr>\n<h2></h2>\n<p>Using-immediately-invoked-function-expression/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Called as \"Iffy\" ( IIFE - immediately invoked function expression) is an anonymous function expression that is immediately invoked and has some important uses in Javascript.</p>\n<pre><code class=\"language-javascript\">(function () {\n    // Do something​\n})();\n</code></pre>\n<p>It is an anonymous function expression that is immediately invoked, and it has some particularly important uses in JavaScript.</p>\n<p>The pair of parenthesis surrounding the anonymous function turns the anonymous function into a function expression or variable expression. So instead of a simple anonymous function in the global scope, or wherever it was defined, we now have an unnamed function expression.</p>\n<p>Similarly, we can even create a named, immediately invoked function expression:</p>\n<pre><code class=\"language-javascript\">(someNamedFunction = function(msg) {\n\n console.log(msg || \"Nothing for today !!\")\n\n }) (); // Output --> Nothing for today !!​\n\n​\n\nsomeNamedFunction(\"Javascript rocks !!\"); // Output --> Javascript rocks !!\n\nsomeNamedFunction(); // Output --> Nothing for today !!​\n</code></pre>\n<p>For more details, check the following URL's -</p>\n<ol>\n<li><a href=\"https://blog.mariusschulz.com/2016/01/13/disassembling-javascripts-iife-syntax\">Link 1</a></li>\n<li><a href=\"http://javascriptissexy.com/12-simple-yet-powerful-javascript-tips/\">Link 2</a></li>\n</ol>\n<h3>Performance: <a href=\"http://jsperf.com/iife-with-call\">jsPerf</a></h3>\n<p>c filtering-and-sorting-a-list-of-strings/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>You may have a big list of names you need to filter in order to remove duplicates and sort them alphabetically.</p>\n<p>In our example we are going to use the list of <strong>JavaScript reserved keywords</strong> we can find across the different versions of the language, but as you can notice, there is a lot of duplicated keywords and they are not alphabetically organized. So this is a perfect list (<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\">Array</a>) of strings to test out this JavaScript tip.</p>\n<pre><code class=\"language-js\">var keywords = [\n    'do',\n    'if',\n    'in',\n    'for',\n    'new',\n    'try',\n    'var',\n    'case',\n    'else',\n    'enum',\n    'null',\n    'this',\n    'true',\n    'void',\n    'with',\n    'break',\n    'catch',\n    'class',\n    'const',\n    'false',\n    'super',\n    'throw',\n    'while',\n    'delete',\n    'export',\n    'import',\n    'return',\n    'switch',\n    'typeof',\n    'default',\n    'extends',\n    'finally',\n    'continue',\n    'debugger',\n    'function',\n    'do',\n    'if',\n    'in',\n    'for',\n    'int',\n    'new',\n    'try',\n    'var',\n    'byte',\n    'case',\n    'char',\n    'else',\n    'enum',\n    'goto',\n    'long',\n    'null',\n    'this',\n    'true',\n    'void',\n    'with',\n    'break',\n    'catch',\n    'class',\n    'const',\n    'false',\n    'final',\n    'float',\n    'short',\n    'super',\n    'throw',\n    'while',\n    'delete',\n    'double',\n    'export',\n    'import',\n    'native',\n    'public',\n    'return',\n    'static',\n    'switch',\n    'throws',\n    'typeof',\n    'boolean',\n    'default',\n    'extends',\n    'finally',\n    'package',\n    'private',\n    'abstract',\n    'continue',\n    'debugger',\n    'function',\n    'volatile',\n    'interface',\n    'protected',\n    'transient',\n    'implements',\n    'instanceof',\n    'synchronized',\n    'do',\n    'if',\n    'in',\n    'for',\n    'let',\n    'new',\n    'try',\n    'var',\n    'case',\n    'else',\n    'enum',\n    'eval',\n    'null',\n    'this',\n    'true',\n    'void',\n    'with',\n    'break',\n    'catch',\n    'class',\n    'const',\n    'false',\n    'super',\n    'throw',\n    'while',\n    'yield',\n    'delete',\n    'export',\n    'import',\n    'public',\n    'return',\n    'static',\n    'switch',\n    'typeof',\n    'default',\n    'extends',\n    'finally',\n    'package',\n    'private',\n    'continue',\n    'debugger',\n    'function',\n    'arguments',\n    'interface',\n    'protected',\n    'implements',\n    'instanceof',\n    'do',\n    'if',\n    'in',\n    'for',\n    'let',\n    'new',\n    'try',\n    'var',\n    'case',\n    'else',\n    'enum',\n    'eval',\n    'null',\n    'this',\n    'true',\n    'void',\n    'with',\n    'await',\n    'break',\n    'catch',\n    'class',\n    'const',\n    'false',\n    'super',\n    'throw',\n    'while',\n    'yield',\n    'delete',\n    'export',\n    'import',\n    'public',\n    'return',\n    'static',\n    'switch',\n    'typeof',\n    'default',\n    'extends',\n    'finally',\n    'package',\n    'private',\n    'continue',\n    'debugger',\n    'function',\n    'arguments',\n    'interface',\n    'protected',\n    'implements',\n    'instanceof'\n];\n</code></pre>\n<p>Since we don't want to change our original list, we are going to use a high order function named <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\"><code>filter</code></a>, which will return a new filter array based in a predicate (<em>function</em>) we pass to it. The predicate will compare the index of the current keyword in the original list with its <code>index</code> in the new list and will push it to the new array only if the indexes match.</p>\n<p>Finally we are going to sort the filtered list using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\"><code>sort</code></a> function which takes a comparison function as the only argument, returning a alphabetically sorted list.</p>\n<pre><code class=\"language-js\">var filteredAndSortedKeywords = keywords\n\n    .filter(function (keyword, index) {\n        return keywords.lastIndexOf(keyword) === index;\n    })\n\n    .sort(function (a, b) {\n        return a &#x3C; b ? -1 : 1;\n    });\n</code></pre>\n<p>The <strong>ES6</strong> (ECMAScript 2015) version using <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow functions</a> looks a little simpler:</p>\n<pre><code class=\"language-js\">const filteredAndSortedKeywords = keywords\n\n    .filter((keyword, index) => keywords.lastIndexOf(keyword) === index)\n\n    .sort((a, b) => (a &#x3C; b ? -1 : 1));\n</code></pre>\n<p>And this is the final filtered and sorted list of JavaScript reserved keywords:</p>\n<pre><code class=\"language-js\">console.log(filteredAndSortedKeywords);\n\n// ['abstract', 'arguments', 'await', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum', 'eval', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int', 'interface', 'let', 'long', 'native', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void', 'volatile', 'while', 'with', 'yield']\n</code></pre>\n<p><em>Thanks to</em><a href=\"https://github.com/nikshulipa\"><em>@nikshulipa</em></a><em>,</em><a href=\"https://twitter.com/kirilloid\"><em>@kirilloid</em></a><em>,</em><a href=\"https://twitter.com/lesterzone\"><em>@lesterzone</em></a><em>,</em><a href=\"https://twitter.com/tracker1\"><em>@tracker1</em></a><em>,</em><a href=\"https://twitter.com/manuel_del_pozo\"><em>@manuel</em>del<em>pozo</em></a><em>for all the comments and suggestions!</em></p>\n<hr>\n<h2>short-circuit-evaluation-in-js/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p><a href=\"https://en.wikipedia.org/wiki/Short-circuit_evaluation\">Short-circuit evaluation</a> says, the second argument is executed or evaluated only if the first argument does not suffice to determine the value of the expression: when the first argument of the AND (<code>&#x26;&#x26;</code>) function evaluates to false, the overall value must be false; and when the first argument of the OR (<code>||</code>) function evaluates to true, the overall value must be true.</p>\n<p>For the following <code>test</code> condition and <code>isTrue</code> and <code>isFalse</code> function.</p>\n<pre><code class=\"language-js\">var test = true;\n\nvar isTrue = function () {\n    console.log('Test is true.');\n};\n\nvar isFalse = function () {\n    console.log('Test is false.');\n};\n</code></pre>\n<p>Using logical AND - <code>&#x26;&#x26;</code>.</p>\n<pre><code class=\"language-js\">// A normal if statement.\n\nif (test) {\n    isTrue(); // Test is true\n}\n\n// Above can be done using '&#x26;&#x26;' as -\n\ntest &#x26;&#x26; isTrue(); // Test is true\n</code></pre>\n<p>Using logical OR - <code>||</code>.</p>\n<pre><code class=\"language-js\">test = false;\n\nif (!test) {\n    isFalse(); // Test is false.\n}\n\ntest || isFalse(); // Test is false.\n</code></pre>\n<p>The logical OR could also be used to set a default value for function argument.</p>\n<pre><code class=\"language-js\">function theSameOldFoo(name) {\n    name = name || 'Bar';\n\n    console.log(\"My best friend's name is \" + name);\n}\n\ntheSameOldFoo(); // My best friend's name is Bar\n\ntheSameOldFoo('Bhaskar'); // My best friend's name is Bhaskar\n</code></pre>\n<p>The logical AND could be used to avoid exceptions when using properties of undefined. Example:</p>\n<pre><code class=\"language-js\">var dog = {\n    bark: function () {\n        console.log('Woof Woof');\n    }\n};\n\n// Calling dog.bark();\n\ndog.bark(); // Woof Woof.\n\n// But if dog is not defined, dog.bark() will raise an error \"Cannot read property 'bark' of undefined.\"\n\n// To prevent this, we can use &#x26;&#x26;.\n\ndog &#x26;&#x26; dog.bark(); // This will only call dog.bark(), if dog is defined.\n</code></pre>\n<hr>\n<h2></h2>\n<p>curry-vs-partial-application/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p><strong>Currying</strong></p>\n<p>Currying takes a function</p>\n<p>f: X * Y -> R</p>\n<p>and turns it into a function</p>\n<p>f': X -> (Y -> R)</p>\n<p>Instead of calling f with two arguments, we invoke f' with the first argument. The result is a function that we then call with the second argument to produce the result.</p>\n<p>Thus, if the uncurried f is invoked as</p>\n<p>f(3,5)</p>\n<p>then the curried f' is invoked as</p>\n<p>f(3)(5)</p>\n<p>For example: Uncurried add()</p>\n<pre><code class=\"language-javascript\">function add(x, y) {\n    return x + y;\n}\n\nadd(3, 5); // returns 8\n</code></pre>\n<p>Curried add()</p>\n<pre><code class=\"language-javascript\">function addC(x) {\n    return function (y) {\n        return x + y;\n    };\n}\n\naddC(3)(5); // returns 8\n</code></pre>\n<p><strong>The algorithm for currying.</strong></p>\n<p>Curry takes a binary function and returns a unary function that returns a unary function.</p>\n<p>curry: (X × Y → R) → (X → (Y → R))</p>\n<p>Javascript Code:</p>\n<pre><code class=\"language-javascript\">function curry(f) {\n    return function (x) {\n        return function (y) {\n            return f(x, y);\n        };\n    };\n}\n</code></pre>\n<p><strong>Partial application</strong></p>\n<p>Partial application takes a function</p>\n<p>f: X * Y -> R</p>\n<p>and a fixed value for the first argument to produce a new function</p>\n<p>f`: Y -> R</p>\n<p>f' does the same as f, but only has to fill in the second parameter which is why its arity is one less than the arity of f.</p>\n<p>For example: Binding the first argument of function add to 5 produces the function plus5.</p>\n<pre><code class=\"language-javascript\">function plus5(y) {\n    return 5 + y;\n}\n\nplus5(3); // returns 8\n</code></pre>\n<p><strong>The algorithm of partial application.</strong>*</p>\n<p>partApply takes a binary function and a value and produces a unary function.</p>\n<p>partApply : ((X × Y → R) × X) → (Y → R)</p>\n<p>Javascript Code:</p>\n<pre><code class=\"language-javascript\">function partApply(f, x) {\n    return function (y) {\n        return f(x, y);\n    };\n}\n</code></pre>\n<hr>\n<h2></h2>\n<p>speed-up-recursive-functions-with-memoization/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Fibonacci sequence is very familiar to everybody. We can write the following function in 20 seconds.</p>\n<pre><code class=\"language-js\">var fibonacci = function (n) {\n    return n &#x3C; 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);\n};\n</code></pre>\n<p>It works, but is not efficient. It did lots of duplicate computing works, we can cache its previously computed results to speed it up.</p>\n<pre><code class=\"language-js\">var fibonacci = (function () {\n    var cache = [0, 1]; // cache the value at the n index\n\n    return function (n) {\n        if (cache[n] === undefined) {\n            for (var i = cache.length; i &#x3C;= n; ++i) {\n                cache[i] = cache[i - 1] + cache[i - 2];\n            }\n        }\n\n        return cache[n];\n    };\n})();\n</code></pre>\n<p>Also, we can define a higher-order function that accepts a function as its argument and returns a memoized version of the function.</p>\n<pre><code class=\"language-js\">var memoize = function (func) {\n    var cache = {};\n\n    return function () {\n        var key = JSON.stringify(Array.prototype.slice.call(arguments));\n\n        return key in cache ? cache[key] : (cache[key] = func.apply(this, arguments));\n    };\n};\n\nfibonacci = memoize(fibonacci);\n</code></pre>\n<p>And this is an ES6 version of the memoize function.</p>\n<pre><code class=\"language-js\">var memoize = function (func) {\n    const cache = {};\n\n    return (...args) => {\n        const key = JSON.stringify(args);\n\n        return key in cache ? cache[key] : (cache[key] = func(...args));\n    };\n};\n\nfibonacci = memoize(fibonacci);\n</code></pre>\n<p>we can use <code>memoize()</code> in many other situations</p>\n<ul>\n<li>GCD(Greatest Common Divisor)</li>\n</ul>\n<pre><code class=\"language-js\">var gcd = memoize(function (a, b) {\n    var t;\n\n    if (a &#x3C; b) (t = b), (b = a), (a = t);\n\n    while (b != 0) (t = b), (b = a % b), (a = t);\n\n    return a;\n});\n\ngcd(27, 183); //=> 3\n</code></pre>\n<ul>\n<li>Factorial calculation</li>\n</ul>\n<pre><code class=\"language-js\">var factorial = memoize(function (n) {\n    return n &#x3C;= 1 ? 1 : n * factorial(n - 1);\n});\n\nfactorial(5); //=> 120\n</code></pre>\n<p>Learn more about memoization:</p>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Memoization\">Memoization - Wikipedia</a></li>\n<li><a href=\"https://www.sitepoint.com/implementing-memoization-in-javascript/\">Implementing Memoization in JavaScript</a></li>\n</ul>\n<hr>\n<h2></h2>\n<p>converting-truthy-falsy-values-to-boolean/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>You can convert a <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Truthy\">truthy</a> or <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Falsy\">falsy</a> value to true boolean with the <code>!!</code> operator.</p>\n<pre><code class=\"language-js\">!!''; // false\n\n!!0; // false\n\n!!null; // false\n\n!!undefined; // false\n\n!!NaN; // false\n\n!!'hello'; // true\n\n!!1; // true\n\n!!{}; // true\n\n!![]; // true\n</code></pre>\n<hr>\n<h2></h2>\n<p>avoid-modifying-or-passing-arguments-into-other-functions-it-kills-optimization/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<h3>Background</h3>\n<p>Within JavaScript functions, the variable name <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments\"><code>arguments</code></a> lets you access all of the arguments passed to the function. <code>arguments</code> is an <em>array-like object</em>; <code>arguments</code> can be accessed using array notation, and it has the <em>length</em> property, but it doesn't have many of the built-in methods that arrays have such as <code>filter</code> and <code>map</code> and <code>forEach</code>. Because of this, it is a fairly common practice to convert <code>arguments</code> into an array using the following:</p>\n<pre><code class=\"language-js\">var args = Array.prototype.slice.call(arguments);\n</code></pre>\n<p>This calls the <code>slice</code> method from the <code>Array</code> prototype, passing it <code>arguments</code>; the <code>slice</code> method returns a shallow copy of <code>arguments</code> as a new array object. A common shorthand for this is :</p>\n<pre><code class=\"language-js\">var args = [].slice.call(arguments);\n</code></pre>\n<p>In this case, instead of calling <code>slice</code> from the <code>Array</code> prototype, it is simply being called from an empty array literal.</p>\n<h3>Optimization</h3>\n<p>Unfortunately, passing <code>arguments</code> into any function call will cause the V8 JavaScript engine used in Chrome and Node to skip optimization on the function that does this, which can result in considerably slower performance. See this article on <a href=\"https://github.com/petkaantonov/bluebird/wiki/Optimization-killers\">optimization killers</a>. Passing <code>arguments</code> to any other function is known as <em>leaking <code>arguments</code></em>.</p>\n<p>Instead, if you want an array of the arguments that lets you use you need to resort to this:</p>\n<pre><code class=\"language-js\">var args = new Array(arguments.length);\n\nfor (var i = 0; i &#x3C; args.length; ++i) {\n    args[i] = arguments[i];\n}\n</code></pre>\n<h3>Yes it is more verbose, but in production code, it is worth it for the performance optimization</h3>\n<h2>map-to-the-rescue-adding-order-to-object-properties/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<h3>Object properties order</h3>\n<blockquote>\n<p>An object is a member of the type Object. It is an unordered collection of properties each of which contains a primitive value, object, or function. A function stored in a property of an object is called a method. <a href=\"http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf\">ECMAScript</a></p>\n</blockquote>\n<p>Take a look in action</p>\n<pre><code class=\"language-js\">var myObject = {\n\n z: 1,\n\n '@': 2,\n\n b: 3,\n\n 1: 4,\n\n 5: 5\n\n};\n\nconsole.log(myObject) // Object {1: 4, 5: 5, z: 1, @: 2, b: 3}\n\n\n\nfor (item in myObject) {...\n\n// 1\n\n// 5\n\n// z\n\n// @\n\n// b\n</code></pre>\n<p>Each browser have his own rules about the order in objects bebause technically, order is unspecified.</p>\n<h3>How to solve this?</h3>\n<h4>Map</h4>\n<p>Using a new ES6 feature called Map. A <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\">Map</a> object iterates its elements in insertion order — a <code>for...of</code> loop returns an array of [key, value] for each iteration.</p>\n<pre><code class=\"language-js\">var myObject = new Map();\n\nmyObject.set('z', 1);\n\nmyObject.set('@', 2);\n\nmyObject.set('b', 3);\n\nfor (var [key, value] of myObject) {\n\n  console.log(key, value);\n\n...\n\n// z 1\n\n// @ 2\n\n// b 3\n</code></pre>\n<h4>Hack for old browsers</h4>\n<p>Mozilla suggest:</p>\n<blockquote>\n<p>So, if you want to simulate an ordered associative array in a cross-browser environment, you are forced to either use two separate arrays (one for the keys and the other for the values), or build an array of single-property objects, etc.</p>\n</blockquote>\n<pre><code class=\"language-js\">// Using two separate arrays\n\nvar objectKeys = [z, @, b, 1, 5];\n\nfor (item in objectKeys) {\n\n myObject[item]\n\n...\n\n\n\n// Build an array of single-property objects\n\nvar myData = [{z: 1}, {'@': 2}, {b: 3}, {1: 4}, {5: 5}];\n</code></pre>\n<hr>\n<h2>create-range-0...n-easily-using-one-line/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Here are two compact code sequences to generate the <code>N</code>-element array <code>[0, 1, ..., N-1]</code>:</p>\n<h4>Solution 1 (requires ES5)</h4>\n<pre><code class=\"language-js\">Array.apply(null, { length: N }).map(Function.call, Number);\n</code></pre>\n<p><strong>Brief explanation</strong></p>\n<ol>\n<li><code>Array.apply(null, {length: N})</code> returns an <code>N</code>-element array filled with <code>undefined</code> (i.e. <code>A = [undefined, undefined, ...]</code>).</li>\n<li><code>A.map(Function.call, Number)</code> returns an <code>N</code>-element array, whose index <code>I</code> gets the result of <code>Function.call.call(Number, undefined, I, A)</code></li>\n<li><code>Function.call.call(Number, undefined, I, A)</code> collapses into <code>Number(I)</code>, which is naturally <code>I</code>.</li>\n<li>Result: <code>[0, 1, ..., N-1]</code>.</li>\n</ol>\n<p>For a more thorough explanation, go <a href=\"https://github.com/gromgit/jstips-xe/blob/master/tips/33.md\">here</a>.</p>\n<h4>Solution 2 (requires ES6)</h4>\n<p>It uses <code>Array.from</code> <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from\">https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from</a></p>\n<pre><code class=\"language-js\">Array.from(new Array(N), (val, index) => index);\n</code></pre>\n<h4>Solution 3 (requires ES6)</h4>\n<pre><code class=\"language-js\">Array.from(Array(N).keys());\n</code></pre>\n<p><strong>Brief explanation</strong></p>\n<ol>\n<li><code>A = new Array(N)</code> returns an array with <code>N</code> <em>holes</em> (i.e. <code>A = [,,,...]</code>, but <code>A[x] = undefined</code> for <code>x</code> in <code>0...N-1</code>).</li>\n<li><code>F = (val,index)=>index</code> is simply <code>function F (val, index) { return index; }</code></li>\n<li><code>Array.from(A, F)</code> returns an <code>N</code>-element array, whose index <code>I</code> gets the results of <code>F(A[I], I)</code>, which is simply <code>I</code>.</li>\n<li>Result: <code>[0, 1, ..., N-1]</code>.</li>\n</ol>\n<h4>One More Thing</h4>\n<p>If you actually want the sequence [1, 2, ..., N], <strong>Solution 1</strong> becomes:</p>\n<pre><code class=\"language-js\">Array.apply(null, { length: N }).map(function (value, index) {\n    return index + 1;\n});\n</code></pre>\n<p>and <strong>Solution 2</strong>:</p>\n<pre><code class=\"language-js\">Array.from(new Array(N), (val, index) => index + 1);\n</code></pre>\n<hr>\n<h2>implementing-asynchronous-loops/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Let's try out writing an asynchronous function which prints the value of the loop index every second.</p>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 5; i++) {\n    setTimeout(function () {\n        console.log(i);\n    }, 1000 * (i + 1));\n}\n</code></pre>\n<p>The output of the above programs turns out to be</p>\n<pre><code class=\"language-js\">> 5\n\n> 5\n\n> 5\n\n> 5\n\n> 5\n</code></pre>\n<p>So this definitely doesn't work.</p>\n<p><strong>Reason</strong></p>\n<p>Each timeout refers to the original <code>i</code>, not a copy. So the for loop increments <code>i</code> until it gets to 5, then the timeouts run and use the current value of <code>i</code> (which is 5).</p>\n<p>Well , this problem seems easy. An immediate solution that strikes is to cache the loop index in a temporary variable.</p>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 5; i++) {\n    var temp = i;\n\n    setTimeout(function () {\n        console.log(temp);\n    }, 1000 * (i + 1));\n}\n</code></pre>\n<p>But again the output of the above programs turns out to be</p>\n<pre><code class=\"language-js\">> 4\n\n> 4\n\n> 4\n\n> 4\n\n> 4\n</code></pre>\n<p>So , that doesn't work either , because blocks don't create a scope and variables initializers are hoisted to the top of the scope. In fact, the previous block is the same as:</p>\n<pre><code class=\"language-js\">var temp;\n\nfor (var i = 0; i &#x3C; 5; i++) {\n    temp = i;\n\n    setTimeout(function () {\n        console.log(temp);\n    }, 1000 * (i + 1));\n}\n</code></pre>\n<p><strong>Solution</strong></p>\n<p>There are a few different ways to copy <code>i</code>. The most common way is creating a closure by declaring a function and passing <code>i</code> as an argument. Here we do this as a self-calling function.</p>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 5; i++) {\n    (function (num) {\n        setTimeout(function () {\n            console.log(num);\n        }, 1000 * (i + 1));\n    })(i);\n}\n</code></pre>\n<p>In JavaScript, arguments are passed by value to a function. So primitive types like numbers, dates, and strings are basically copied. If you change them inside the function, it does not affect the outside scope. Objects are special: if the inside function changes a property, the change is reflected in all scopes.</p>\n<p>Another approach for this would be with using <code>let</code>. With ES6 the <code>let</code> keyword is useful since it's block scoped unlike <code>var</code></p>\n<pre><code class=\"language-js\">for (let i = 0; i &#x3C; 5; i++) {\n    setTimeout(function () {\n        console.log(i);\n    }, 1000 * (i + 1));\n}\n</code></pre>\n<hr>\n<h2>assignment-shorthands/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Assigning is very common. Sometimes typing becomes time consuming for us 'Lazy programmers'. So, we can use some tricks to help us and make our code cleaner and simpler.</p>\n<p>This is the similar use of</p>\n<pre><code class=\"language-javascript\">x += 23; // x = x + 23;\n\ny -= 15; // y = y - 15;\n\nz *= 10; // z = z * 10;\n\nk /= 7; // k = k / 7;\n\np %= 3; // p = p % 3;\n\nd **= 2; // d = d ** 2;\n\nm >>= 2; // m = m >> 2;\n\nn &#x3C;&#x3C;= 2; // n = n &#x3C;&#x3C; 2;\n\nn++; // n = n + 1;\n\nn--;\nn = n - 1;\n</code></pre>\n<h4><code>++</code> and <code>--</code> operators</h4>\n<p>There is a special <code>++</code> operator. It's best to explain it with an example:</p>\n<pre><code class=\"language-javascript\">var a = 2;\n\nvar b = a++;\n\n// Now a is 3 and b is 2\n</code></pre>\n<p>The <code>a++</code> statement does this:</p>\n<ol>\n<li>return the value of <code>a</code></li>\n<li>increment <code>a</code> by 1</li>\n</ol>\n<p>But what if we wanted to increment the value first? It's simple:</p>\n<pre><code class=\"language-javascript\">var a = 2;\n\nvar b = ++a;\n\n// Now both a and b are 3\n</code></pre>\n<p>See? I put the operator <em>before</em> the variable.</p>\n<p>The <code>--</code> operator is similar, except it decrements the value.</p>\n<h4>If-else (Using ternary operator)</h4>\n<p>This is what we write on regular basis.</p>\n<pre><code class=\"language-javascript\">var newValue;\n\nif (value > 10) newValue = 5;\nelse newValue = 2;\n</code></pre>\n<p>We can user ternary operator to make it awesome:</p>\n<pre><code class=\"language-javascript\">var newValue = value > 10 ? 5 : 2;\n</code></pre>\n<h4>Null, Undefined, Empty Checks</h4>\n<pre><code class=\"language-javascript\">if (variable1 !== null || variable1 !== undefined || variable1 !== '') {\n    var variable2 = variable1;\n}\n</code></pre>\n<p>Shorthand here:</p>\n<pre><code class=\"language-javascript\">var variable2 = variable1 || '';\n</code></pre>\n<p>P.S.: If variable1 is a number, then first check if it is 0.</p>\n<h4>Object Array Notation</h4>\n<p>Instead of using:</p>\n<pre><code class=\"language-javascript\">var a = new Array();\n\na[0] = 'myString1';\n\na[1] = 'myString2';\n</code></pre>\n<p>Use this:</p>\n<pre><code class=\"language-javascript\">var a = ['myString1', 'myString2'];\n</code></pre>\n<h4>Associative array</h4>\n<p>Instead of using:</p>\n<pre><code class=\"language-javascript\">var skillSet = new Array();\n\nskillSet['Document language'] = 'HTML5';\n\nskillSet['Styling language'] = 'CSS3';\n</code></pre>\n<p>Use this:</p>\n<pre><code class=\"language-javascript\">var skillSet = {\n    'Document language': 'HTML5',\n\n    'Styling language': 'CSS3'\n};\n</code></pre>\n<hr>\n<h2></h2>\n<p>observe-dom-changes/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p><a href=\"https://developer.mozilla.org/en/docs/Web/API/MutationObserver\">MutationObserver</a> is a solution to listen DOM changes and do what you want to do with elements when they changed. In following example there is some emulation of dynamic content loading with help of timers, after first \"target\" element creation goes \"subTarget\". In extension code firstly rootObserver works till targetElement appearance then elementObserver starts. This cascading observing helps finally get moment when subTargetElement found. This useful to develop extensions to complex sites with dynamic content loading.</p>\n<pre><code class=\"language-js\">const observeConfig = {\n    attributes: true,\n\n    childList: true,\n\n    characterData: true,\n\n    subtree: true\n};\n\nfunction initExtension(rootElement, targetSelector, subTargetSelector) {\n    var rootObserver = new MutationObserver(function (mutations) {\n        console.log('Inside root observer');\n\n        targetElement = rootElement.querySelector(targetSelector);\n\n        if (targetElement) {\n            rootObserver.disconnect();\n\n            var elementObserver = new MutationObserver(function (mutations) {\n                console.log('Inside element observer');\n\n                subTargetElement = targetElement.querySelector(subTargetSelector);\n\n                if (subTargetElement) {\n                    elementObserver.disconnect();\n\n                    console.log('subTargetElement found!');\n                }\n            });\n\n            elementObserver.observe(targetElement, observeConfig);\n        }\n    });\n\n    rootObserver.observe(rootElement, observeConfig);\n}\n\n(function () {\n    initExtension(document.body, 'div.target', 'div.subtarget');\n\n    setTimeout(function () {\n        del = document.createElement('div');\n\n        del.innerHTML = \"&#x3C;div class='target'>target&#x3C;/div>\";\n\n        document.body.appendChild(del);\n    }, 3000);\n\n    setTimeout(function () {\n        var el = document.body.querySelector('div.target');\n\n        if (el) {\n            del = document.createElement('div');\n\n            del.innerHTML = \"&#x3C;div class='subtarget'>subtarget&#x3C;/div>\";\n\n            el.appendChild(del);\n        }\n    }, 5000);\n})();\n</code></pre>\n<hr>\n<h2></h2>\n<p>deduplicate-an-array/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<h2>Primitives</h2>\n<p>If an Array only contains primitive values, we can deduplicate it by only using the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\"><code>filter</code></a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\"><code>indexOf</code></a> methods.</p>\n<pre><code class=\"language-javascript\">var deduped = [1, 1, 'a', 'a'].filter(function (el, i, arr) {\n    return arr.indexOf(el) === i;\n});\n\nconsole.log(deduped); // [ 1, 'a' ]\n</code></pre>\n<h3>ES2015</h3>\n<p>We can write this in a more compact way using an <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow function</a>.</p>\n<pre><code class=\"language-javascript\">var deduped = [1, 1, 'a', 'a'].filter((el, i, arr) => arr.indexOf(el) === i);\n\nconsole.log(deduped); // [ 1, 'a' ]\n</code></pre>\n<p>But with the introduction of <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\">Sets</a> and the <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from\"><code>from</code></a> method, we can achieve the same result in a more concise way.</p>\n<pre><code class=\"language-javascript\">var deduped = Array.from(new Set([1, 1, 'a', 'a']));\n\nconsole.log(deduped); // [ 1, 'a' ]\n</code></pre>\n<h2>Objects</h2>\n<p>We can't use the same approach when the elements are Objects, because Objects are stored by reference and primitives are stored by value.</p>\n<pre><code class=\"language-javascript\">1 === 1 // true\n\n\n\n'a' === 'a' // true\n\n\n\n{ a: 1 } === { a: 1 } // false\n</code></pre>\n<p>Therefore we need to change our approach and use a hash table.</p>\n<pre><code class=\"language-javascript\">function dedup(arr) {\n    var hashTable = {};\n\n    return arr.filter(function (el) {\n        var key = JSON.stringify(el);\n\n        var match = Boolean(hashTable[key]);\n\n        return match ? false : (hashTable[key] = true);\n    });\n}\n\nvar deduped = dedup([{ a: 1 }, { a: 1 }, [1, 2], [1, 2]]);\n\nconsole.log(deduped); // [ {a: 1}, [1, 2] ]\n</code></pre>\n<p>Because a hash table in javascript is simply an <code>Object</code>, the keys will always be of the type <code>String</code>. This means that normally we can't distinguish between strings and numbers of the same value, i.e. <code>1</code> and <code>'1'</code>.</p>\n<pre><code class=\"language-javascript\">var hashTable = {};\n\nhashTable[1] = true;\n\nhashTable['1'] = true;\n\nconsole.log(hashTable); // { '1': true }\n</code></pre>\n<p>However, because we're using <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\"><code>JSON.stringify</code></a>, keys that are of the type <code>String</code>, will be stored as an escaped string value, giving us unique keys in our <code>hashTable</code>.</p>\n<pre><code class=\"language-javascript\">var hashTable = {};\n\nhashTable[JSON.stringify(1)] = true;\n\nhashTable[JSON.stringify('1')] = true;\n\nconsole.log(hashTable); // { '1': true, '\\'1\\'': true }\n</code></pre>\n<p>This means duplicate elements of the same value, but of a different type, will still be deduplicated using the same implementation.</p>\n<pre><code class=\"language-javascript\">var deduped = dedup([{ a: 1 }, { a: 1 }, [1, 2], [1, 2], 1, 1, '1', '1']);\n\nconsole.log(deduped); // [ {a: 1}, [1, 2], 1, '1' ]\n</code></pre>\n<h2>Resources</h2>\n<h3>Methods</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\"><code>filter</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\"><code>indexOf</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from\"><code>from</code></a></li>\n<li><a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\"><code>JSON.stringify</code></a></li>\n</ul>\n<h3>ES2015</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">arrow functions</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\">Sets</a></li>\n</ul>\n<h3>Stack overflow</h3>\n<ul>\n<li><a href=\"http://stackoverflow.com/questions/9229645/remove-duplicates-from-javascript-array/9229821#9229821\">remove duplicates from array</a></li>\n</ul>\n<hr>\n<h2></h2>\n<p>flattening-multidimensional-arrays-in-javascript/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>These are the three known ways to merge multidimensional array into a single array.</p>\n<p>Given this array:</p>\n<pre><code class=\"language-js\">var myArray = [\n    [1, 2],\n    [3, 4, 5],\n    [6, 7, 8, 9]\n];\n</code></pre>\n<p>We wanna have this result:</p>\n<pre><code class=\"language-js\">[1, 2, 3, 4, 5, 6, 7, 8, 9];\n</code></pre>\n<h4>Solution 1: Using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat\"><code>concat()</code></a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply\"><code>apply()</code></a></h4>\n<pre><code class=\"language-js\">var myNewArray = [].concat.apply([], myArray);\n\n// [1, 2, 3, 4, 5, 6, 7, 8, 9]\n</code></pre>\n<h4>Solution 2: Using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce#Flatten_an_array_of_arrays\"><code>reduce()</code></a></h4>\n<pre><code class=\"language-js\">var myNewArray = myArray.reduce(function (prev, curr) {\n    return prev.concat(curr);\n});\n\n// [1, 2, 3, 4, 5, 6, 7, 8, 9]\n</code></pre>\n<h4>Solution 3</h4>\n<pre><code class=\"language-js\">var myNewArray3 = [];\n\nfor (var i = 0; i &#x3C; myArray.length; ++i) {\n    for (var j = 0; j &#x3C; myArray[i].length; ++j) myNewArray3.push(myArray[i][j]);\n}\n\nconsole.log(myNewArray3);\n\n// [1, 2, 3, 4, 5, 6, 7, 8, 9]\n</code></pre>\n<h4>Solution 4: Using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator\">spread operator</a> in ES6</h4>\n<pre><code class=\"language-js\">var myNewArray4 = [].concat(...myArray);\n\nconsole.log(myNewArray4);\n\n// [1, 2, 3, 4, 5, 6, 7, 8, 9]\n</code></pre>\n<h4>Solution 5: Using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat\"><code>flat()</code></a> in ES10</h4>\n<pre><code class=\"language-js\">var myNewArray5 = myArray.flat();\n\nconsole.log(myNewArray5);\n\n// [1, 2, 3, 4, 5, 6, 7, 8, 9]\n</code></pre>\n<p>Take a look <a href=\"https://jsbin.com/janana/edit?js,console\">here</a> these 4 algorithms in action.</p>\n<p>For infinitely nested array try Lodash <a href=\"https://lodash.com/docs#flattenDeep\">flattenDeep()</a>.</p>\n<p>If you are curious about performance, <a href=\"http://jsperf.com/flatten-an-array-loop-vs-reduce/6\">here</a> a test for check how it works.</p>\n<hr>\n<h2></h2>\n<p>advanced-properties/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>It is possible to configure object properties in Javascript for example to set properties to be pseudo-private or readonly. This feature is available since ECMAScript 5.1, therefore supported by all recent browsers.</p>\n<p>To do so, you need to use the method <code>defineProperty</code> of the <code>Object</code> prototype like so:</p>\n<pre><code class=\"language-js\">var a = {};\n\nObject.defineProperty(a, 'readonly', {\n    value: 15,\n\n    writable: false\n});\n\na.readonly = 20;\n\nconsole.log(a.readonly); // 15\n</code></pre>\n<p>The syntax is as follows:</p>\n<pre><code class=\"language-js\">Object.defineProperty(dest, propName, options);\n</code></pre>\n<p>or for multiple definitions:</p>\n<pre><code class=\"language-js\">Object.defineProperties(dest, {\n    propA: optionsA,\n\n    propB: optionsB //...\n});\n</code></pre>\n<p>where options include the following attributes:</p>\n<ul>\n<li><em>value</em>: if the property is not a getter (see below), value is a mandatory attribute. <code>{a: 12}</code> === <code>Object.defineProperty(obj, 'a', {value: 12})</code></li>\n<li><em>writable</em>: set the property as readonly. Note that if the property is a nested objects, its properties are still editable.</li>\n<li><em>enumerable</em>: set the property as hidden. That means that <code>for ... of</code> loops and <code>stringify</code> will not include the property in their result, but the property is still there. Note: That doesn't mean that the property is private! It can still be accessible from the outside, it just means that it won't be printed.</li>\n<li><em>configurable</em>: set the property as non modifiable, e.g. protected from deletion or redefinition. Again, if the property is a nested object, its properties are still configurable.</li>\n</ul>\n<p>So in order to create a private constant property, you can define it like so:</p>\n<pre><code class=\"language-js\">Object.defineProperty(obj, 'myPrivateProp', { value: val, enumerable: false, writable: false, configurable: false });\n</code></pre>\n<p>Besides configuring properties, <code>defineProperty</code> allows us to define <em>dynamic properties</em>, thanks to the second parameter being a string. For instance, let's say that I want to create properties according to some external configuration:</p>\n<pre><code class=\"language-js\">var obj = {\n\n  getTypeFromExternal(): true // illegal in ES5.1\n\n}\n\n\n\nObject.defineProperty(obj, getTypeFromExternal(), {value: true}); // ok\n\n\n\n// For the example sake, ES6 introduced a new syntax:\n\nvar obj = {\n\n  [getTypeFromExternal()]: true\n\n}\n</code></pre>\n<p>But that's not all! Advanced properties allows us to create <strong>getters</strong> and <strong>setters</strong>, just like other OOP languages! In that case, one cannot use the <code>writable</code>, <code>enumerable</code> and <code>configurable</code> properties, but instead:</p>\n<pre><code class=\"language-js\">function Foobar () {\n\n  var _foo; //  true private property\n\n\n\n  Object.defineProperty(obj, 'foo', {\n\n    get: function () { return _foo; }\n\n    set: function (value) { _foo = value }\n\n  });\n\n\n\n}\n\n\n\nvar foobar = new Foobar();\n\nfoobar.foo; // 15\n\nfoobar.foo = 20; // _foo = 20\n</code></pre>\n<p>Aside for the obvious advantage of encapsulation and advanced accessors, you will notice that we didn't \"call\" the getter, instead we just \"get\" the property without parentheses! This is awesome! For instance, let's imagine that we have an object with long nested properties, like so:</p>\n<pre><code class=\"language-js\">var obj = { a: { b: { c: [{ d: 10 }, { d: 20 }] } } };\n</code></pre>\n<p>Now instead of doing <code>a.b.c[0].d</code> (where one of the properties can resolve to <code>undefined</code> and throw an error), we can instead create an alias:</p>\n<pre><code class=\"language-js\">Object.defineProperty(obj, 'firstD', {\n    get: function () {\n        return a &#x26;&#x26; a.b &#x26;&#x26; a.b.c &#x26;&#x26; a.b.c[0] &#x26;&#x26; a.b.c[0].d;\n    }\n});\n\nconsole.log(obj.firstD); // 10\n</code></pre>\n<h4>Note</h4>\n<p>If you define a getter without a setter and still try to set a value, you will get an error! This is particularly important when using helper functions such as <code>$.extend</code> or <code>_.merge</code>. Be careful!</p>\n<h4>Links</h4>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\">defineProperty</a></li>\n<li><a href=\"http://bdadam.com/blog/defining-properties-in-javascript.html\">Defining properties in JavaScript</a></li>\n</ul>\n<hr>\n<h2></h2>\n<p>using-json-stringify/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Let's say there is an object with properties \"prop1\", \"prop2\", \"prop3\". We can pass <strong>additional params</strong> to <strong>JSON.stringify</strong> to selectively write properties of the object to string like:</p>\n<pre><code class=\"language-javascript\">var obj = {\n    prop1: 'value1',\n\n    prop2: 'value2',\n\n    prop3: 'value3'\n};\n\nvar selectedProperties = ['prop1', 'prop2'];\n\nvar str = JSON.stringify(obj, selectedProperties);\n\n// str\n\n// {\"prop1\":\"value1\",\"prop2\":\"value2\"}\n</code></pre>\n<p>The <strong>\"str\"</strong> will contain only info on selected properties only.</p>\n<p>Instead of array we can pass a function also.</p>\n<pre><code class=\"language-javascript\">function selectedProperties(key, val) {\n    // the first val will be the entire object, key is empty string\n\n    if (!key) {\n        return val;\n    }\n\n    if (key === 'prop1' || key === 'prop2') {\n        return val;\n    }\n\n    return;\n}\n</code></pre>\n<p>The last optional param it takes is to modify the way it writes the object to string.</p>\n<pre><code class=\"language-javascript\">var str = JSON.stringify(obj, selectedProperties, '\\t\\t');\n\n/* str output with double tabs in every line.\n\n{\n\n        \"prop1\": \"value1\",\n\n        \"prop2\": \"value2\"\n\n}\n\n*/\n</code></pre>\n<hr>\n<h2></h2>\n<p>array-average-and-median/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>The following examples will be based on the following array:</p>\n<pre><code class=\"language-javascript\">let values = [2, 56, 3, 41, 0, 4, 100, 23];\n</code></pre>\n<p>To get the average, we have to sum up numbers and then divide by the number of values. Steps are:</p>\n<ul>\n<li>get the array length</li>\n<li>sum up values</li>\n<li>get the average (<code>sum/length</code>)</li>\n</ul>\n<pre><code class=\"language-javascript\">let values = [2, 56, 3, 41, 0, 4, 100, 23];\n\nlet sum = values.reduce((previous, current) => (current += previous));\n\nlet avg = sum / values.length;\n\n// avg = 28\n</code></pre>\n<p>Or:</p>\n<pre><code class=\"language-javascript\">let values = [2, 56, 3, 41, 0, 4, 100, 23];\n\nlet count = values.length;\n\nvalues = values.reduce((previous, current) => (current += previous));\n\nvalues /= count;\n\n// avg = 28\n</code></pre>\n<p>Now, to get the median steps are:</p>\n<ul>\n<li>sort the array</li>\n<li>get the arethmic mean of the middle values</li>\n</ul>\n<pre><code class=\"language-javascript\">let values = [2, 56, 3, 41, 0, 4, 100, 23];\n\nvalues.sort((a, b) => a - b);\n\nlet lowMiddle = Math.floor((values.length - 1) / 2);\n\nlet highMiddle = Math.ceil((values.length - 1) / 2);\n\nlet median = (values[lowMiddle] + values[highMiddle]) / 2;\n\n// median = 13,5\n</code></pre>\n<p>With a bitwise operator:</p>\n<pre><code class=\"language-javascript\">let values = [2, 56, 3, 41, 0, 4, 100, 23];\n\nvalues.sort((a, b) => a - b);\n\nlet median = (values[(values.length - 1) >> 1] + values[values.length >> 1]) / 2;\n\n// median = 13,5\n</code></pre>\n<hr>\n<h2>preventing-unapply-attacks/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>By overriding the builtin prototypes, external code can cause code to break by rewriting code to expose and change bound arguments. This can be an issue that seriously breaks applications that works by using polyfill es5 methods.</p>\n<pre><code class=\"language-js\">// example bind polyfill\n\nfunction bind(fn) {\n    var prev = Array.prototype.slice.call(arguments, 1);\n\n    return function bound() {\n        var curr = Array.prototype.slice.call(arguments, 0);\n\n        var args = Array.prototype.concat.apply(prev, curr);\n\n        return fn.apply(null, args);\n    };\n}\n\n// unapply-attack\n\nfunction unapplyAttack() {\n    var concat = Array.prototype.concat;\n\n    Array.prototype.concat = function replaceAll() {\n        Array.prototype.concat = concat; // restore the correct version\n\n        var curr = Array.prototype.slice.call(arguments, 0);\n\n        var result = concat.apply([], curr);\n\n        return result;\n    };\n}\n</code></pre>\n<p>The above function discards the <code>prev</code> array from the bind meaning that any <code>.concat</code> the first concat call following using the unapply attack will throw an error.</p>\n<p>By using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\">Object.freeze</a>, making an object immutable, you prevent any overriding of the builtin object prototypes.</p>\n<pre><code class=\"language-js\">(function freezePrototypes() {\n    if (typeof Object.freeze !== 'function') {\n        throw new Error('Missing Object.freeze');\n    }\n\n    Object.freeze(Object.prototype);\n\n    Object.freeze(Array.prototype);\n\n    Object.freeze(Function.prototype);\n})();\n</code></pre>\n<p>You can read more about unapply attacks <a href=\"https://glebbahmutov.com/blog/unapply-attack/\">here</a>. Although this concept is called an 'unapply attack' due to some code being able to access closures that normally wouldn't be in scope, it is mostly wrong to consider this a security feature due to it not preventing an attacker with code execution from extending prototypes before the freezing happens and also still having the potential to read all scopes using various language features. ECMA modules would give realm based isolation which is much stronger than this solution however still doesn't fix the issues of third party scripts.</p>\n<hr>\n<h2>use-destructuring-in-function-parameters/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>I am sure many of you are already familiar with the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment\">ES6 Destructuring Assignment</a>. Did you know that you can also use it in function parameters?</p>\n<pre><code class=\"language-js\">var sayHello = function ({ name, surname }) {\n    console.log(`Hello ${name} ${surname}! How are you?`);\n};\n\nsayHello({ name: 'John', surname: 'Smith' });\n\n// -> Hello John Smith! How are you?\n</code></pre>\n<p>This is great for functions which accept an options object. For this use case, you can also add <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters\">default parameters</a> to fill in whatever values the caller leaves out, or if the caller forgets to pass one at all:</p>\n<pre><code class=\"language-js\">var sayHello2 = function ({ name = 'Anony', surname = 'Moose' } = {}) {\n    console.log(`Hello ${name} ${surname}! How are you?`);\n};\n</code></pre>\n<p>The <code>= {}</code> says that the default object to be destructured for this parameter is <code>{}</code>, in case the caller forgets to pass the parameter, or passes one of the wrong type (more on this below).</p>\n<pre><code class=\"language-js\">sayHello2();\n\n// -> Hello Anony Moose! How are you?\n\nsayHello2({ name: 'Bull' });\n\n// -> Hello Bull Moose! How are you?\n</code></pre>\n<p><strong>Argument Handling</strong></p>\n<p>With plain destructuring assignment, if the the input parameter can't be matched with the function's specified object arguments, all the unmatched arguments are <code>undefined</code>, so you need to add code that handles this properly:</p>\n<pre><code class=\"language-js\">var sayHelloTimes = function ({ name, surname }, times) {\n    console.log(`Hello ${name} ${surname}! I've seen you ${times} times before.`);\n};\n\nsayHelloTimes({ name: 'Pam' }, 5678);\n\n// -> Hello Pam undefined! I've seen you 5678 times before.\n\nsayHelloTimes(5678);\n\n// -> Hello undefined undefined! I've seen you undefined times before.\n</code></pre>\n<p>Worse, if the parameter to be destructured is missing, an exception is thrown, probably bringing your app to a screeching halt:</p>\n<pre><code class=\"language-js\">sayHelloTimes();\n\n// -> Uncaught TypeError: Cannot match against 'undefined' or 'null'...\n</code></pre>\n<p>It's conceptually similar to accessing a property of an undefined object, just with a different exception type.</p>\n<p>Destructuring assignment with default parameters hides all the above to a certain extent:</p>\n<pre><code class=\"language-js\">var sayHelloTimes2 = function ({ name = 'Anony', surname = 'Moose' } = {}, times) {\n    console.log(`Hello ${name} ${surname}! I've seen you ${times} times before.`);\n};\n\nsayHelloTimes2({ name: 'Pam' }, 5678);\n\n// -> Hello Pam Moose! I've seen you 5678 times before.\n\nsayHelloTimes2(5678);\n\n// -> Hello Anony Moose! I've seen you undefined times before.\n\nsayHelloTimes2();\n\n// -> Hello Anony Moose! I've seen you undefined times before.\n</code></pre>\n<p>As for <code>= {}</code>, it covers the case of a missing <em>object</em>, for which individual property defaults won't help at all:</p>\n<pre><code class=\"language-js\">var sayHelloTimes2a = function ({ name = 'Anony', surname = 'Moose' }, times) {\n    console.log(`Hello ${name} ${surname}! I've seen you ${times} times before.`);\n};\n\nsayHelloTimes2a({ name: 'Pam' }, 5678);\n\n// -> Hello Pam Moose! I've seen you 5678 times before.\n\nsayHelloTimes2a(5678);\n\n// -> Hello Anony Moose! I've seen you undefined times before.\n\nsayHelloTimes2a();\n\n// -> Uncaught TypeError: Cannot match against 'undefined' or 'null'.\n</code></pre>\n<p><strong>Availability</strong></p>\n<p>Note that destructuring assignment may not yet be available by default, in the version of Node.js or browser that you're using. For Node.js, you can try using the <code>--harmony-destructuring</code> flag on startup to activate this feature.</p>\n<hr>\n<h2>know-the-passing-mechanism/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>JavaScript is pass-by-value, technically. It is neither pass-by-value nor pass-by-reference, going by the truest sense of these terms. To understand this passing mechanism, take a look at the following two example code snippets and the explanations.</p>\n<h4>Example 1</h4>\n<pre><code class=\"language-js\">var me = {\n    // 1\n\n    partOf: 'A Team'\n};\n\nfunction myTeam(me) {\n    // 2\n\n    me = {\n        // 3\n\n        belongsTo: 'A Group'\n    };\n}\n\nmyTeam(me);\n\nconsole.log(me); // 4  : {'partOf' : 'A Team'}\n</code></pre>\n<p>In above example, when the <code>myTeam</code> gets invoked, JavaScript is <em>passing the reference to</em> <code>me</code> <em>object as value, as it is an object</em> and invocation itself creates two independent references to the same object, (though the name being same here i.e. <code>me</code>, is misleading and gives us an impression that it is the single reference) and hence, the reference variable themselves are independent.</p>\n<p>When we assigned a new object at #<code>3</code>, we are changing this reference value entirely within the <code>myTeam</code> function, and it will not have any impact on the original object outside this function scope, from where it was passed and the reference in the outside scope is going to retain the original object and hence the output from #<code>4</code>.</p>\n<h4>Example 2</h4>\n<pre><code class=\"language-js\">var me = {\n    // 1\n\n    partOf: 'A Team'\n};\n\nfunction myGroup(me) {\n    // 2\n\n    me.partOf = 'A Group'; // 3\n}\n\nmyGroup(me);\n\nconsole.log(me); // 4  : {'partOf' : 'A Group'}\n</code></pre>\n<p>In the case of <code>myGroup</code> invocation, we are passing the object <code>me</code>. But unlike the example 1 scenario, we are not assigning this <code>me</code> variable to any new object, effectively meaning the object reference value within the <code>myGroup</code> function scope still is the original object's reference value and when we are modifying the property within this scope, it is effectively modifying the original object's property. Hence, you get the output from #<code>4</code>.</p>\n<p>So does this later case not prove that javascript is pass-by-reference? No, it does not. Remember, <em>JavaScript passes the reference as value, in case of objects</em>. The confusion arises as we tend not to understand fully what pass by reference is. This is the exact reason, some prefer to call this as <em>call-by-sharing</em>.</p>\n<p><em>Initially posted by the author on</em><a href=\"https://github.com/bmkmanoj/js-by-examples/blob/master/examples/js_pass_by_value_or_reference.md\"><em>js-by-examples</em></a></p>\n<hr>\n<h2>calculate-the-max-min-value-from-an-array/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>The built-in functions <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max\">Math.max()</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min\">Math.min()</a> find the maximum and minimum value of the arguments, respectively.</p>\n<pre><code class=\"language-js\">Math.max(1, 2, 3, 4); // 4\n\nMath.min(1, 2, 3, 4); // 1\n</code></pre>\n<p>These functions will not work as-is with arrays of numbers. However, there are some ways around this.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply\"><code>Function.prototype.apply()</code></a> allows you to call a function with a given <code>this</code> value and an <em>array</em> of arguments.</p>\n<pre><code class=\"language-js\">var numbers = [1, 2, 3, 4];\n\nMath.max.apply(null, numbers); // 4\n\nMath.min.apply(null, numbers); // 1\n</code></pre>\n<p>Passing the <code>numbers</code> array as the second argument of <code>apply()</code> results in the function being called with all values in the array as parameters.</p>\n<p>A simpler, ES2015 way of accomplishing this is with the new <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator\">spread operator</a>.</p>\n<pre><code class=\"language-js\">var numbers = [1, 2, 3, 4];\n\nMath.max(...numbers); // 4\n\nMath.min(...numbers); // 1\n</code></pre>\n<p>This operator causes the values in the array to be expanded, or \"spread\", into the function's arguments.</p>\n<hr>\n<h2>detect-document-ready-in-pure-js/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>The cross-browser way to check if the document has loaded in pure JavaScript is using <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState\"><code>readyState</code></a>.</p>\n<pre><code class=\"language-js\">if (document.readyState === 'complete') {\n    // The page is fully loaded\n}\n</code></pre>\n<p>You can detect when the document is ready...</p>\n<pre><code class=\"language-js\">let stateCheck = setInterval(() => {\n    if (document.readyState === 'complete') {\n        clearInterval(stateCheck);\n\n        // document ready\n    }\n}, 100);\n</code></pre>\n<p>or with <a href=\"https://developer.mozilla.org/en-US/docs/Web/Events/readystatechange\">onreadystatechange</a>...</p>\n<pre><code class=\"language-js\">document.onreadystatechange = () => {\n    if (document.readyState === 'complete') {\n        // document ready\n    }\n};\n</code></pre>\n<p>Use <code>document.readyState === 'interactive'</code> to detect when the DOM is ready.</p>\n<hr>\n<h2>basics-declarations/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Below, different ways to declare variables in JavaScript. Comments and console.log should be enough to explain what's happening here:</p>\n<pre><code class=\"language-js\">var y,\n    x = (y = 1); //== var x; var y; x = y = 1\n\nconsole.log('--> 1:', `x = ${x}, y = ${y}`);\n\n// Will print\n\n//--> 1: x = 1, y = 1\n</code></pre>\n<p>First, we just set two variables. Nothing much here.</p>\n<pre><code class=\"language-js\">(() => {\n    var x = (y = 2); // == var x; x = y = 2;\n\n    console.log('2.0:', `x = ${x}, y = ${y}`);\n})();\n\nconsole.log('--> 2.1:', `x = ${x}, y = ${y}`);\n\n// Will print\n\n//2.0: x = 2, y = 2\n\n//--> 2.1: x = 1, y = 2\n</code></pre>\n<p>As you can see, the code has only changed the global y, as we haven't declared the variable in the closure.</p>\n<pre><code class=\"language-js\">(() => {\n    var x,\n        y = 3; // == var x; var y = 3;\n\n    console.log('3.0:', `x = ${x}, y = ${y}`);\n})();\n\nconsole.log('--> 3.1:', `x = ${x}, y = ${y}`);\n\n// Will print\n\n//3.0: x = undefined, y = 3\n\n//--> 3.1: x = 1, y = 2\n</code></pre>\n<p>Now we declare both variables through var. Meaning they only live in the context of the closure.</p>\n<pre><code class=\"language-js\">(() => {\n    var y,\n        x = (y = 4); // == var x; var y; x = y = 4\n\n    console.log('4.0:', `x = ${x}, y = ${y}`);\n})();\n\nconsole.log('--> 4.1:', `x = ${x}, y = ${y}`);\n\n// Will print\n\n//4.0: x = 4, y = 4\n\n//--> 4.1: x = 1, y = 2\n</code></pre>\n<p>Both variables have been declared using var and only after that we've set their values. As local > global, x and y are local in the closure, meaning the global x and y are untouched.</p>\n<pre><code class=\"language-js\">x = 5; // == x = 5\n\nconsole.log('--> 5:', `x = ${x}, y = ${y}`);\n\n// Will print\n\n//--> 5: x = 5, y = 2\n</code></pre>\n<p>This last line is explicit by itself.</p>\n<p>You can test this and see the result <a href=\"https://babeljs.io/repl/#?experimental=false&#x26;evaluate=true&#x26;loose=false&#x26;spec=false&#x26;code=var%20y%2C%20x%20%3D%20y%20%3D%201%20%2F%2F%3D%3D%20var%20x%3B%20var%20y%3B%20x%20%3D%20y%20%3D%201%0Aconsole.log(&#x27;--%3E%201%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%0A%2F%2F%20Will%20print%0A%2F%2F--%3E%201%3A%20x%20%3D%201%2C%20y%20%3D%201%0A%0A%3B(()%20%3D%3E%20%7B%20%0A%20%20var%20x%20%3D%20y%20%3D%202%20%2F%2F%20%3D%3D%20var%20x%3B%20y%20%3D%202%3B%0A%20%20console.log(&#x27;2.0%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%7D)()%0Aconsole.log(&#x27;--%3E%202.1%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%0A%2F%2F%20Will%20print%0A%2F%2F2.0%3A%20x%20%3D%202%2C%20y%20%3D%202%0A%2F%2F--%3E%202.1%3A%20x%20%3D%201%2C%20y%20%3D%202%0A%0A%3B(()%20%3D%3E%20%7B%20%0A%20%20var%20x%2C%20y%20%3D%203%20%2F%2F%20%3D%3D%20var%20x%3B%20var%20y%20%3D%203%3B%0A%20%20console.log(&#x27;3.0%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%7D)()%0Aconsole.log(&#x27;--%3E%203.1%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%0A%2F%2F%20Will%20print%0A%2F%2F3.0%3A%20x%20%3D%20undefined%2C%20y%20%3D%203%0A%2F%2F--%3E%203.1%3A%20x%20%3D%201%2C%20y%20%3D%202%0A%0A%3B(()%20%3D%3E%20%7B%20%0A%20%20var%20y%2C%20x%20%3D%20y%20%3D%204%20%2F%2F%20%3D%3D%20var%20x%3B%20var%20y%3B%20x%20%3D%20y%20%3D%203%0A%20%20console.log(&#x27;4.0%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%7D)()%0Aconsole.log(&#x27;--%3E%204.1%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%0A%2F%2F%20Will%20print%0A%2F%2F4.0%3A%20x%20%3D%204%2C%20y%20%3D%204%0A%2F%2F--%3E%204.1%3A%20x%20%3D%201%2C%20y%20%3D%202%0A%0Ax%20%3D%205%20%2F%2F%20%3D%3D%20x%20%3D%205%0Aconsole.log(&#x27;--%3E%205%3A&#x27;%2C%20%60x%20%3D%20%24%7Bx%7D%2C%20y%20%3D%20%24%7By%7D%60)%0A%0A%2F%2F%20Will%20print%0A%2F%2F--%3E%205%3A%20x%20%3D%205%2C%20y%20%3D%202\">thanks to babel</a>.</p>\n<p>More informations available on the <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var\">MDN</a>.</p>\n<p>Special thanks to @kurtextrem for his collaboration :)!</p>\n<hr>\n<h2>reminders-about-reduce-function-usage/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>As written in documentation the <code>reduce()</code> method applies a function against an accumulator and each value of the array (from left-to-right) to reduce it to a single value.</p>\n<h4>Signature</h4>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\">reduce()</a> function accepts 2 parameters (M: mandatory, O: optional):</p>\n<ul>\n<li>(M) a callback <strong>reducer function</strong> to be applied that deals with a pair of previous (result of previous computation) and next element until end of the list.</li>\n<li>(O) an <strong>initial value</strong> to be used as the first argument to the first call of the callback.</li>\n</ul>\n<p>So let's see a common usage and later a more sophisticated one.</p>\n<h4>Common usage (accumulation, concatenation)</h4>\n<p>We are on Amazon website (prices in $) and our caddy is quite full, let's compute total.</p>\n<pre><code class=\"language-javascript\">// my current amazon caddy purchases\n\nvar items = [{ price: 10 }, { price: 120 }, { price: 1000 }];\n\n// our reducer function\n\nvar reducer = function add(sumSoFar, item) {\n    return sumSoFar + item.price;\n};\n\n// do the job\n\nvar total = items.reduce(reducer, 0);\n\nconsole.log(total); // 1130\n</code></pre>\n<p>Optional reduce function parameter was primitive integer type 0 in that first case, but it could have been an Object, an Array...instead of a primitive type, but we will see that later.</p>\n<p>Now, cool I received a discount coupon of 20$.</p>\n<pre><code class=\"language-javascript\">var total = items.reduce(reducer, -20);\n\nconsole.log(total); // 1110\n</code></pre>\n<h4>Advanced usage (combination)</h4>\n<p>This second usage example is inspired by Redux <a href=\"http://redux.js.org/docs/api/combineReducers.html\">combineReducers</a> function <a href=\"https://github.com/reactjs/redux/blob/master/src/combineReducers.js#L93\">source</a>.</p>\n<p>Idea behind is to separate reducer function into separate individual functions and at the end compute a new <em>single big reducer function</em>.</p>\n<p>To illustrate this, let's create a single object literal with some reducers function able to compute total prices in different currency $, €...</p>\n<pre><code class=\"language-javascript\">var reducers = {\n    totalInDollar: function (state, item) {\n        // specific statements...\n\n        return (state.dollars += item.price);\n    },\n\n    totalInEuros: function (state, item) {\n        return (state.euros += item.price * 0.897424392);\n    },\n\n    totalInPounds: function (state, item) {\n        return (state.pounds += item.price * 0.692688671);\n    },\n\n    totalInYen: function (state, item) {\n        return (state.yens += item.price * 113.852);\n    }\n\n    // more...\n};\n</code></pre>\n<p>Then, we create a new swiss knife function</p>\n<ul>\n<li>responsible for applying each partial reduce functions.</li>\n<li>that will return a new callback reducer function</li>\n</ul>\n<pre><code class=\"language-javascript\">var combineTotalPriceReducers = function (reducers) {\n    return function (state, item) {\n        return Object.keys(reducers).reduce(\n            function (nextState, key) {\n                reducers[key](state, item);\n\n                return state;\n            },\n\n            {}\n        );\n    };\n};\n</code></pre>\n<p>Now let's see how using it.</p>\n<pre><code class=\"language-javascript\">var bigTotalPriceReducer = combineTotalPriceReducers(reducers);\n\nvar initialState = { dollars: 0, euros: 0, yens: 0, pounds: 0 };\n\nvar totals = items.reduce(bigTotalPriceReducer, initialState);\n\nconsole.log(totals);\n\n/*\n\nObject {dollars: 1130, euros: 1015.11531904, yens: 127524.24, pounds: 785.81131152}\n\n*/\n</code></pre>\n<p>I hope this approach can give you another idea of using reduce() function for your own needs.</p>\n<p>Your reduce function could handle an history of each computation by instance as it is done in Ramdajs with <a href=\"http://ramdajs.com/docs/#scan\">scan</a> function</p>\n<p><a href=\"https://jsfiddle.net/darul75/81tgt0cd/\">JSFiddle to play with</a></p>\n<hr>\n<h2>extract-unix-timestamp-easily/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>We frequently need to calculate with unix timestamp. There are several ways to grab the timestamp. For current unix timestamp easiest and fastest way is</p>\n<pre><code class=\"language-js\">const dateTime = Date.now();\n\nconst timestamp = Math.floor(dateTime / 1000);\n</code></pre>\n<p>or</p>\n<pre><code class=\"language-js\">const dateTime = new Date().getTime();\n\nconst timestamp = Math.floor(dateTime / 1000);\n</code></pre>\n<p>To get unix timestamp of a specific date pass <code>YYYY-MM-DD</code> or <code>YYYY-MM-DDT00:00:00Z</code> as parameter of <code>Date</code> constructor. For example</p>\n<pre><code class=\"language-js\">const dateTime = new Date('2012-06-08').getTime();\n\nconst timestamp = Math.floor(dateTime / 1000);\n</code></pre>\n<p>You can just add a <code>+</code> sign also when declaring a <code>Date</code> object like below</p>\n<pre><code class=\"language-js\">const dateTime = +new Date();\n\nconst timestamp = Math.floor(dateTime / 1000);\n</code></pre>\n<p>or for specific date</p>\n<pre><code class=\"language-js\">const dateTime = +new Date('2012-06-08');\n\nconst timestamp = Math.floor(dateTime / 1000);\n</code></pre>\n<p>Under the hood the runtime calls <code>valueOf</code> method of the <code>Date</code> object. Then the unary <code>+</code> operator calls <code>toNumber()</code> with that returned value. For detailed explanation please check the following links</p>\n<ul>\n<li><a href=\"http://es5.github.io/#x15.9.5.8\">Date.prototype.valueOf</a></li>\n<li><a href=\"http://es5.github.io/#x11.4.6\">Unary + operator</a></li>\n<li><a href=\"http://es5.github.io/#x9.3\">toNumber()</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\">Date Javascript MDN</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse\">Date.parse()</a></li>\n</ul>\n<hr>\n<h2>helpful-console-log-hacks/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<h3>Using conditional breakpoints to log data</h3>\n<p>If you wanted to log to the console a value each time a function is called, you can use conditional break points to do this. Open up your dev tools, find the function where you'd like to log data to the console and set a breakpoint with the following condition:</p>\n<pre><code class=\"language-js\">console.log(data.value) &#x26;&#x26; false;\n</code></pre>\n<p>A conditional breakpoint pauses the page thread only if the condition for the breakpoint evaluates to true. So by using a condition like console.log('foo') &#x26;&#x26; false it's guaranteed to evaluate to false since you're putting the literal false in the AND condition. So this will not pause the page thread when it's hit, but it will log data to the console. This can also be used to count how many times a function or callback is called.</p>\n<p>Here's how you can set a conditional breakpoint in <a href=\"https://dev.windows.com/en-us/microsoft-edge/platform/documentation/f12-devtools-guide/debugger/#setting-and-managing-breakpoints\">Edge</a>, <a href=\"https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints\">Chrome</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Set_a_conditional_breakpoint\">Firefox</a> and <a href=\"https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Debugger/Debugger.html\">Safari</a>.</p>\n<h3>Printing a function variable to console</h3>\n<p>Have you ever logged a function variable to the console and weren't able to just view the function's code? The quickest way to see the function's code is to coerce it to a string using concatenation with an empty string.</p>\n<pre><code class=\"language-js\">console.log(funcVariable + '');\n</code></pre>\n<hr>\n<h2>DOM-event-listening-made-easy/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Many of us are still doing these things:</p>\n<ul>\n<li><code>element.addEventListener('type', obj.method.bind(obj))</code></li>\n<li><code>element.addEventListener('type', function (event) {})</code></li>\n<li><code>element.addEventListener('type', (event) => {})</code></li>\n</ul>\n<p>The above examples all create new anonymous event handlers that can't be removed when no longer needed. This may cause performance problems or unexpected logic bugs, when handlers that you no longer need still get accidentally triggered through unexpected user interactions or <a href=\"http://www.javascripter.net/faq/eventbubbling.htm\">event bubbling</a>.</p>\n<p>Safer event-handling patterns include the following:</p>\n<p>Use a reference:</p>\n<pre><code class=\"language-js\">const handler = function () {\n    console.log('Tada!');\n};\n\nelement.addEventListener('click', handler);\n\n// Later on\n\nelement.removeEventListener('click', handler);\n</code></pre>\n<p>Named function that removes itself:</p>\n<pre><code class=\"language-js\">element.addEventListener('click', function click(e) {\n    if (someCondition) {\n        return e.currentTarget.removeEventListener('click', click);\n    }\n});\n</code></pre>\n<p>A better approach:</p>\n<pre><code class=\"language-js\">function handleEvent(eventName, { onElement, withCallback, useCapture = false } = {}, thisArg) {\n    const element = onElement || document.documentElement;\n\n    function handler(event) {\n        if (typeof withCallback === 'function') {\n            withCallback.call(thisArg, event);\n        }\n    }\n\n    handler.destroy = function () {\n        return element.removeEventListener(eventName, handler, useCapture);\n    };\n\n    element.addEventListener(eventName, handler, useCapture);\n\n    return handler;\n}\n\n// Anytime you need\n\nconst handleClick = handleEvent('click', {\n    onElement: element,\n\n    withCallback: (event) => {\n        console.log('Tada!');\n    }\n});\n\n// And anytime you want to remove it\n\nhandleClick.destroy();\n</code></pre>\n<hr>\n<h2>return-values-with-the-new-operator/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>You're going to run into some instances where you'll be using <code>new</code> to allocate new objects in JavaScript. It's going to blow your mind unless you read this tip to understand what's happening behind the scenes.</p>\n<p>The <code>new</code> operator in JavaScript is an operator that, under reasonable circumstances, returns a new instance of an object. Let's say we have a constructor function:</p>\n<pre><code class=\"language-js\">function Thing() {\n    this.one = 1;\n\n    this.two = 2;\n}\n\nvar myThing = new Thing();\n\nmyThing.one; // 1\n\nmyThing.two; // 2\n</code></pre>\n<p><strong>Note</strong>: <code>this</code> refers to the new object created by <code>new</code>. Otherwise if <code>Thing()</code> is called without <code>new</code>, <strong>no object is created</strong>, and <code>this</code> is going to point to the global object, which is <code>window</code>. This means that:</p>\n<ol>\n<li>You'll suddenly have two new global variables named <code>one</code> and <code>two</code>.</li>\n<li><code>myThing</code> is now undefined, since nothing is returned in <code>Thing()</code>.</li>\n</ol>\n<p>Now that you get that example, here's where things get a little bit wonky. Let's say I add something to the constructor function, a little SPICE:</p>\n<pre><code class=\"language-js\">function Thing() {\n    this.one = 1;\n\n    this.two = 2;\n\n    return 5;\n}\n\nvar myThing = new Thing();\n</code></pre>\n<p>Now, what does myThing equal? Is it 5? is it an object? Is it my crippled sense of self-worth? The world may never know!</p>\n<p>Except the world does know:</p>\n<pre><code class=\"language-js\">myThing.one; // 1\n\nmyThing.two; // 2\n</code></pre>\n<p>Interestingly enough, we never actually see the five that we supposedly 'returned' from our constructor. That's weird, isn't it? What are you doing function? WHERE'S THE FIVE? Let's try it with something else.</p>\n<p>Let's return a non-primitive type instead, something like an object.</p>\n<pre><code class=\"language-js\">function Thing() {\n    this.one = 1;\n\n    this.two = 2;\n\n    return {\n        three: 3,\n\n        four: 4\n    };\n}\n\nvar myThing = new Thing();\n</code></pre>\n<p>Let's check it out. A quick console.log reveals all:</p>\n<pre><code class=\"language-js\">console.log(myThing);\n\n/*\n\n  Object {three: 3, four: 4}\n\n  What happened to this.one and this.two!?\n\n  They've been stomped, my friend.\n\n*/\n</code></pre>\n<p><strong>Here's where we learn:</strong> When you invoke a function with the <code>new</code> keyword, you can set properties on it using the keyword <code>this</code> (but you probably already knew that). Returning a primitive value from a function you called with the <code>new</code> keyword will not return the value you specified, but instead will return the <code>this</code> instance of the function (the one you put properties on, like <code>this.one = 1;</code>).</p>\n<p>However, returning a non-primitive, like an <code>object</code>, <code>array</code>, or <code>function</code> will stomp on the <code>this</code> instance, and return that non-primitive instead, effectively ruining all the hard work you did assigning everything to <code>this</code>.</p>\n<hr>\n<h2>get-file-extension/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<h4>Question: How to get the file extension?</h4>\n<pre><code class=\"language-javascript\">var file1 = '50.xsl';\n\nvar file2 = '30.doc';\n\ngetFileExtension(file1); //returs xsl\n\ngetFileExtension(file2); //returs doc\n\nfunction getFileExtension(filename) {\n    /*TODO*/\n}\n</code></pre>\n<h4>Solution 1: Regular Expression</h4>\n<pre><code class=\"language-js\">function getFileExtension1(filename) {\n    return /[.]/.exec(filename) ? /[^.]+$/.exec(filename)[0] : undefined;\n}\n</code></pre>\n<h4>Solution 2: String <code>split</code> method</h4>\n<pre><code class=\"language-js\">function getFileExtension2(filename) {\n    return filename.split('.').pop();\n}\n</code></pre>\n<p>Those two solutions couldnot handle some edge cases, here is another more robust solution.</p>\n<h4>Solution3: String <code>slice</code>, <code>lastIndexOf</code> methods</h4>\n<pre><code class=\"language-js\">function getFileExtension3(filename) {\n    return filename.slice(((filename.lastIndexOf('.') - 1) >>> 0) + 2);\n}\n\nconsole.log(getFileExtension3('')); // ''\n\nconsole.log(getFileExtension3('filename')); // ''\n\nconsole.log(getFileExtension3('filename.txt')); // 'txt'\n\nconsole.log(getFileExtension3('.hiddenfile')); // ''\n\nconsole.log(getFileExtension3('filename.with.many.dots.ext')); // 'ext'\n</code></pre>\n<p><em>How does it works?</em></p>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf\">String.lastIndexOf()</a> method returns the last occurrence of the specified value (<code>'.'</code> in this case). Returns <code>-1</code> if the value is not found.</li>\n<li>The return values of <code>lastIndexOf</code> for parameter <code>'filename'</code> and <code>'.hiddenfile'</code> are <code>-1</code> and <code>0</code> respectively. <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#%3E%3E%3E_%28Zero-fill_right_shift%29\">Zero-fill right shift operator (>>>)</a> will transform <code>-1</code> to <code>4294967295</code> and <code>-2</code> to <code>4294967294</code>, here is one trick to insure the filename unchanged in those edge cases.</li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice\">String.prototype.slice()</a> extracts file extension from the index that was calculated above. If the index is more than the length of the filename, the result is <code>\"\"</code>.</li>\n</ul>\n<h4>Comparison</h4>\n<p>| Solution | Paramters | Results |</p>\n<p>| ----------------------------------------- | :-----------------------------------------------------------------------------------------: | :-----------------------------------------------------------------: |</p>\n<p>| Solution 1: Regular Expression | <p>''<br>'filename'<br>'filename.txt'<br>'.hiddenfile'<br>'filename.with.many.dots.ext'</p> | <p>undefined<br>undefined<br>'txt'<br>'hiddenfile'<br>'ext'<br></p>\n</p> |\n<p>| Solution 2: String <code>split</code> | <p>''<br>'filename'<br>'filename.txt'<br>'.hiddenfile'<br>'filename.with.many.dots.ext'</p> | <p>''<br>'filename'<br>'txt'<br>'hiddenfile'<br>'ext'<br></p>\n</p>    |\n<p>| Solution 3: String <code>slice</code>, <code>lastIndexOf</code> | <p>''<br>'filename'<br>'filename.txt'<br>'.hiddenfile'<br>'filename.with.many.dots.ext'</p> | <p>''<br>''<br>'txt'<br>''<br>'ext'<br></p>\n</p>             |\n<h4>Live Demo and Performance</h4>\n<p><a href=\"https://jsbin.com/tipofu/edit?js,console\">Here</a> is the live demo of the above codes.</p>\n<p><a href=\"http://jsperf.com/extract-file-extension\">Here</a> is the performance test of those 3 solutions.</p>\n<h4>Source</h4>\n<p><a href=\"http://stackoverflow.com/questions/190852/how-can-i-get-file-extensions-with-javascript\">How can I get file extensions with JavaScript</a></p>\n<hr>\n<h2>use-optional-arguments/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Example function where arguments 2 and 3 are optional</p>\n<pre><code class=\"language-javascript\">function example(err, optionalA, optionalB, callback) {\n    // retrieve arguments as array\n\n    var args = new Array(arguments.length);\n\n    for (var i = 0; i &#x3C; args.length; ++i) {\n        args[i] = arguments[i];\n    }\n\n    // first argument is the error object\n\n    // shift() removes the first item from the\n\n    // array and returns it\n\n    err = args.shift();\n\n    // if last argument is a function then its the callback function.\n\n    // pop() removes the last item in the array\n\n    // and returns it\n\n    if (typeof args[args.length - 1] === 'function') {\n        callback = args.pop();\n    }\n\n    // if args still holds items, these are\n\n    // your optional items which you could\n\n    // retrieve one by one like this:\n\n    if (args.length > 0) optionalA = args.shift();\n    else optionalA = null;\n\n    if (args.length > 0) optionalB = args.shift();\n    else optionalB = null;\n\n    // continue as usual: check for errors\n\n    if (err) {\n        return callback &#x26;&#x26; callback(err);\n    }\n\n    // for tutorial purposes, log the optional parameters\n\n    console.log('optionalA:', optionalA);\n\n    console.log('optionalB:', optionalB);\n\n    console.log('callback:', callback);\n\n    /* do your thing */\n}\n\n// ES6 with shorter, more terse code\n\nfunction example(...args) {\n    // first argument is the error object\n\n    const err = args.shift();\n\n    // if last argument is a function then its the callback function\n\n    const callback = typeof args[args.length - 1] === 'function' ? args.pop() : null;\n\n    // if args still holds items, these are your optional items which you could retrieve one by one like this:\n\n    const optionalA = args.length > 0 ? args.shift() : null;\n\n    const optionalB = args.length > 0 ? args.shift() : null;\n\n    // ... repeat for more items\n\n    if (err &#x26;&#x26; callback) return callback(err);\n\n    /* do your thing */\n}\n\n// invoke example function with and without optional arguments\n\nexample(null, 'AA');\n\nexample(null, function (err) {\n    /* do something */\n});\n\nexample(null, 'AA', function (err) {});\n\nexample(null, 'AAAA', 'BBBB', function (err) {});\n</code></pre>\n<h4>How do you determine if optionalA or optionalB is intended?</h4>\n<p>Design your function to require optionalA in order to accept optionalB</p>\n<hr>\n<h2>make-easy-loop-on-array/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Sometimes, we need to loop endlessly over an array of items, like a carousel of images or an audio playlist. Here's how to take an array and give it \"looping powers\":</p>\n<pre><code class=\"language-js\">var aList = ['A', 'B', 'C', 'D', 'E'];\n\nfunction make_looper(arr) {\n    arr.loop_idx = 0;\n\n    // return current item\n\n    arr.current = function () {\n        if (this.loop_idx &#x3C; 0) {\n            // First verification\n\n            this.loop_idx = this.length - 1; // update loop_idx\n        }\n\n        if (this.loop_idx >= this.length) {\n            // second verification\n\n            this.loop_idx = 0; // update loop_idx\n        }\n\n        return arr[this.loop_idx]; //return item\n    };\n\n    // increment loop_idx AND return new current\n\n    arr.next = function () {\n        this.loop_idx++;\n\n        return this.current();\n    };\n\n    // decrement loop_idx AND return new current\n\n    arr.prev = function () {\n        this.loop_idx--;\n\n        return this.current();\n    };\n}\n\nmake_looper(aList);\n\naList.current(); // -> A\n\naList.next(); // -> B\n\naList.next(); // -> C\n\naList.next(); // -> D\n\naList.next(); // -> E\n\naList.next(); // -> A\n\naList.pop(); // -> E\n\naList.prev(); // -> D\n\naList.prev(); // -> C\n\naList.prev(); // -> B\n\naList.prev(); // -> A\n\naList.prev(); // -> D\n</code></pre>\n<p>Using the <code>%</code> ( Modulus ) operator is prettier.The modulus return division's rest ( <code>2 % 5 = 1</code> and <code>5 % 5 = 0</code>):</p>\n<pre><code class=\"language-js\">var aList = ['A', 'B', 'C', 'D', 'E'];\n\nfunction make_looper(arr) {\n    arr.loop_idx = 0;\n\n    // return current item\n\n    arr.current = function () {\n        this.loop_idx = this.loop_idx % this.length; // no verification !!\n\n        return arr[this.loop_idx];\n    };\n\n    // increment loop_idx AND return new current\n\n    arr.next = function () {\n        this.loop_idx++;\n\n        return this.current();\n    };\n\n    // decrement loop_idx AND return new current\n\n    arr.prev = function () {\n        this.loop_idx += this.length - 1;\n\n        return this.current();\n    };\n}\n\nmake_looper(aList);\n\naList.current(); // -> A\n\naList.next(); // -> B\n\naList.next(); // -> C\n\naList.next(); // -> D\n\naList.next(); // -> E\n\naList.next(); // -> A\n\naList.pop(); // -> E\n\naList.prev(); // -> D\n\naList.prev(); // -> C\n\naList.prev(); // -> B\n\naList.prev(); // -> A\n\naList.prev(); // -> D\n</code></pre>\n<hr>\n<h2>copy-to-clipboard/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>This is a simple tip, this week I had to create a common \"Copy to Clipboard\" button, I've never created one before and I want to share how I made it. It's easy, the bad thing is that we must add an <code>&#x3C;input/></code> with the text to be copied to the DOM. Then, we selected the content and execute the copy command with <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand\">execCommand</a>. <code>execCommand('copy')</code> will copy the actual selected content.</p>\n<p>Also, this command that now is <a href=\"http://caniuse.com/#search=execCommand\">supported</a> by all the latest version of browsers, allows us to execute another system commands like <code>copy</code>, <code>cut</code>, <code>paste</code>, and make changes like fonts color, size, and much more.</p>\n<pre><code class=\"language-js\">document.querySelector('#input').select();\n\ndocument.execCommand('copy');\n</code></pre>\n<p><strong>Playground</strong></p>\n<p><a href=\"http://jsbin.com/huhozu/embed?js,output\">JS Bin on jsbin.com</a></p>\n<hr>\n<h2>comma-operaton-in-js/</h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Apart from being just a delimiter, the comma operator allows you to put multiple statements in a place where one statement is expected. Eg:-</p>\n<pre><code class=\"language-js\">for (var i = 0, j = 0; i &#x3C; 5; i++, j++, j++) {\n    console.log('i:' + i + ', j:' + j);\n}\n</code></pre>\n<p>Output:-</p>\n<pre><code class=\"language-js\">i:0, j:0\n\ni:1, j:2\n\ni:2, j:4\n\ni:3, j:6\n\ni:4, j:8\n</code></pre>\n<p>When placed in an expression, it evaluates every expression from left to right and returns the right most expression.</p>\n<p>Eg:-</p>\n<pre><code class=\"language-js\">function a() {\n    console.log('a');\n    return 'a';\n}\n\nfunction b() {\n    console.log('b');\n    return 'b';\n}\n\nfunction c() {\n    console.log('c');\n    return 'c';\n}\n\nvar x = (a(), b(), c());\n\nconsole.log(x); // Outputs \"c\"\n</code></pre>\n<p>Output:-</p>\n<pre><code class=\"language-js\">'a';\n\n'b';\n\n'c';\n\n'c';\n</code></pre>\n<ul>\n<li>Note: The comma(<code>,</code>) operator has the lowest priority of all javascript operators, so without the parenthesis the expression would become: <code>(x = a()), b(), c();</code>.</li>\n</ul>\n<p><strong>Playground</strong></p>\n<p><a href=\"http://jsbin.com/vimogap/embed?js,console\">JS Bin on jsbin.com</a></p>\n<hr>\n<h2></h2>\n<p>break-continue-loop-functional/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>A common requirement of iteration is cancelation. Using <code>for</code> loops we can <code>break</code> to end iteration early.</p>\n<pre><code class=\"language-javascript\">const a = [0, 1, 2, 3, 4];\n\nfor (var i = 0; i &#x3C; a.length; i++) {\n    if (a[i] === 2) {\n        break; // stop the loop\n    }\n\n    console.log(a[i]);\n}\n\n//> 0, 1\n</code></pre>\n<p>Another common requirement is to close over our variables.</p>\n<p>A quick approach is to use <code>.forEach</code> but then we lack the ability to <code>break</code>. In this situation the closest we get is <code>continue</code> functionality through <code>return</code>.</p>\n<pre><code class=\"language-javascript\">[0, 1, 2, 3, 4].forEach(function (val, i) {\n    if (val === 2) {\n        // how do we stop?\n\n        return true;\n    }\n\n    console.log(val); // your code\n});\n\n//> 0, 1, 3, 4\n</code></pre>\n<p>The <code>.some</code> is a method on Array prototype. It tests whether some element in the array passes the test implemented by the provided function. If any value is returning true, then it stops executing. Here is a <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/some\">MDN link</a> for more details.</p>\n<p>An example quoted from that link</p>\n<pre><code class=\"language-javascript\">const isBiggerThan10 = (numb) => numb > 10;\n\n[2, 5, 8, 1, 4].some(isBiggerThan10); // false\n\n[12, 5, 8, 1, 4].some(isBiggerThan10); // true\n</code></pre>\n<p>Using <code>.some</code> we get iteration functionally similar to <code>.forEach</code> but with the ability to <code>break</code> through <code>return</code> instead.</p>\n<pre><code class=\"language-javascript\">[0, 1, 2, 3, 4].some(function (val, i) {\n    if (val === 2) {\n        return true;\n    }\n\n    console.log(val); // your code\n});\n\n//> 0, 1\n</code></pre>\n<p>You keep returning <code>false</code> to make it <code>continue</code> to next item. When you return <code>true</code>, the loop will <code>break</code> and <code>a.some(..)</code> will <code>return</code> <code>true</code>.</p>\n<pre><code class=\"language-javascript\">// Array contains 2\n\nconst isTwoPresent = [0, 1, 2, 3, 4].some(function (val, i) {\n    if (val === 2) {\n        return true; // break\n    }\n});\n\nconsole.log(isTwoPresent);\n\n//> true\n</code></pre>\n<p>Also there is <code>.every</code>, which can be used. We have to return the opposite boolean compared to <code>.some</code>.</p>\n<p><strong>Playground</strong></p>\n<p><a href=\"http://jsbin.com/jopeji/embed?js,console\">JS Bin on jsbin.com</a></p>\n<hr>\n<h2></h2>\n<p>keyword-var-vs-let/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<h4>Overview</h4>\n<ul>\n<li>The scope of a variable defined with <code>var</code> is function scope or declared outside any function, global.</li>\n<li>The scope of a variable defined with <code>let</code> is block scope.</li>\n</ul>\n<pre><code class=\"language-js\">function varvslet() {\n    console.log(i); // i is undefined due to hoisting\n\n    // console.log(j); // ReferenceError: j is not defined\n\n    for (var i = 0; i &#x3C; 3; i++) {\n        console.log(i); // 0, 1, 2\n    }\n\n    console.log(i); // 3\n\n    // console.log(j); // ReferenceError: j is not defined\n\n    for (let j = 0; j &#x3C; 3; j++) {\n        console.log(j);\n    }\n\n    console.log(i); // 3\n\n    // console.log(j); // ReferenceError: j is not defined\n}\n</code></pre>\n<h4>Difference Details</h4>\n<ul>\n<li>\n<p>Variable Hoisting</p>\n<p><code>let</code> will not hoist to the entire scope of the block they appear in. By contrast, <code>var</code> could hoist as below.</p>\n</li>\n</ul>\n<pre><code class=\"language-js\">{\n    console.log(c); // undefined. Due to hoisting\n\n    var c = 2;\n}\n\n{\n    console.log(b); // ReferenceError: b is not defined\n\n    let b = 3;\n}\n</code></pre>\n<ul>\n<li>\n<p>Closure in Loop</p>\n<p><code>let</code> in the loop can re-binds it to each iteration of the loop, making sure to re-assign it the value from the end of the previous loop iteration, so it can be used to avoid issue with closures.</p>\n</li>\n</ul>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 5; ++i) {\n    setTimeout(function () {\n        console.log(i); // output '5' 5 times\n    }, 100);\n}\n</code></pre>\n<p>After replacing <code>var</code> with <code>let</code></p>\n<pre><code class=\"language-js\">// print 1, 2, 3, 4, 5\n\nfor (let i = 0; i &#x3C; 5; ++i) {\n    setTimeout(function () {\n        console.log(i); // output 0, 1, 2, 3, 4\n    }, 100);\n}\n</code></pre>\n<h4>Should I replace <code>var</code> with <code>let</code>?</h4>\n<blockquote>\n<p>NO, <code>let</code> is the new block scoping <code>var</code>. That statement emphasizes that <code>let</code> should replace <code>var</code> only when <code>var</code> was already signaling block scoping stylistically. Otherwise, leave <code>var</code> alone. <code>let</code> improves scoping options in JS, not replaces. <code>var</code> is still a useful signal for variables that are used throughout the function.</p>\n</blockquote>\n<h4><code>let</code> compatibility</h4>\n<ul>\n<li>In server side, such as Node.js, you can safely use the <code>let</code> statement now.</li>\n<li>In client side, through a transpiler (like <a href=\"https://github.com/google/traceur-compiler\">Traceur</a>), you can safely use the <code>let</code> statement. Otherwise, please consider the browser support <a href=\"http://caniuse.com/#search=let\">here</a></li>\n</ul>\n<h4>Playground</h4>\n<p><a href=\"http://jsbin.com/yumaye/embed?js,console\">JS Bin on jsbin.com</a></p>\n<h4>More info</h4>\n<ul>\n<li><a href=\"http://stackoverflow.com/questions/762011/let-keyword-vs-var-keyword\">Let keyword vs var keyword</a></li>\n<li><a href=\"https://davidwalsh.name/for-and-against-let\">For and against let</a></li>\n<li><a href=\"http://stackoverflow.com/questions/30899612/explanation-of-let-and-block-scoping-with-for-loops/30900289#30900289\">Explanation of <code>let</code> and block scoping with for loops</a>.</li>\n</ul>\n<hr>\n<h2></h2>\n<p>three-useful-hacks/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p><strong>Getting array items from behind to front</strong></p>\n<p>If you want to get the array items from behind to front, just do this:</p>\n<pre><code class=\"language-javascript\">var newArray = [1, 2, 3, 4];\n\nconsole.log(newArray.slice(-1)); // [4]\n\nconsole.log(newArray.slice(-2)); // [3, 4]\n\nconsole.log(newArray.slice(-3)); // [2, 3, 4]\n\nconsole.log(newArray.slice(-4)); // [1, 2, 3, 4]\n</code></pre>\n<p><strong>Short-circuits conditionals</strong></p>\n<p>If you have to execute a function just if a condition is <code>true</code>, like this:</p>\n<pre><code class=\"language-javascript\">if (condition) {\n    dosomething();\n}\n</code></pre>\n<p>You can use a short-circuit just like this:</p>\n<pre><code class=\"language-javascript\">condition &#x26;&#x26; dosomething();\n</code></pre>\n<p><strong>Set variable default values using \"||\"</strong></p>\n<p>If you have to set a default value to variables, you can simple do this:</p>\n<pre><code class=\"language-javascript\">var a;\n\nconsole.log(a); //undefined\n\na = a || 'default value';\n\nconsole.log(a); //default value\n\na = a || 'new value';\n\nconsole.log(a); //default value\n</code></pre>\n<hr>\n<h2></h2>\n<p>binding-objects-to-functions/</p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>More than often, we need to bind an object to a function's this object. JS uses the bind method when this is specified explicitly and we need to invoke desired method.</p>\n<h4>Bind syntax</h4>\n<pre><code class=\"language-js\">fun.bind(thisArg[, arg1[, arg2[, ...]]])\n</code></pre>\n<h3>Parameters</h3>\n<p><strong>thisArg</strong></p>\n<p><code>this</code> parameter value to be passed to target function while calling the <code>bound</code> function.</p>\n<p><strong>arg1, arg2, ...</strong></p>\n<p>Prepended arguments to be passed to the <code>bound</code> function while invoking the target function.</p>\n<p><strong>Return value</strong></p>\n<p>A copy of the given function along with the specified <code>this</code> value and initial arguments.</p>\n<h4>Bind method in action in JS</h4>\n<pre><code class=\"language-js\">const myCar = {\n    brand: 'Ford',\n\n    type: 'Sedan',\n\n    color: 'Red'\n};\n\nconst getBrand = function () {\n    console.log(this.brand);\n};\n\nconst getType = function () {\n    console.log(this.type);\n};\n\nconst getColor = function () {\n    console.log(this.color);\n};\n\ngetBrand(); // object not bind,undefined\n\ngetBrand(myCar); // object not bind,undefined\n\ngetType.bind(myCar)(); // Sedan\n\nlet boundGetColor = getColor.bind(myCar);\n\nboundGetColor(); // Red\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>In case of established websocket connection, server or firewall could timeout and terminate the connection after a period of inactivity. To deal with this situation, we send periodic message to the server. To control the timeout we will add two functions in our code : one to make sure connection keep alive and another one to cancel the keep alive. Also we need a common <code>timerID</code> variable. Let's have a look on implementation-</p>\n<pre><code class=\"language-js\">var timerID = 0;\n\nfunction keepAlive() {\n    var timeout = 20000;\n\n    if (webSocket.readyState == webSocket.OPEN) {\n        webSocket.send('');\n    }\n\n    timerId = setTimeout(keepAlive, timeout);\n}\n\nfunction cancelKeepAlive() {\n    if (timerId) {\n        clearTimeout(timerId);\n    }\n}\n</code></pre>\n<p>Now as we have both of our desired function for the task, we will place <code>keepAlive()</code> function at the end of <code>onOpen()</code> method of websocket connection and <code>cancelKeepAlive()</code> function at the end of <code>onClose()</code> method of websocket connection.</p>\n<p>Yes! We have perfectly implemented hack for websocket timeout problem.</p>\n<hr>\n<h2></h2>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>Arrays are everywhere in JavaScript and with the new <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator\">spread operators</a> introduced in ECMAScript 6, you can do awesome things with them. In this post I will show you 3 useful tricks you can use when programming.</p>\n<h4>1. Iterating through an empty array</h4>\n<p>JavaScript arrays are sparse in nature in that there are a lot of holes in them. Try creating an array using the Array's constructor and you will see what I mean.</p>\n<pre><code class=\"language-javascript\">> const arr = new Array(4);\n\n[undefined, undefined, undefined, undefined]\n</code></pre>\n<p>You may find that iterating over a sparse array to apply a certain transformation is hard.</p>\n<pre><code class=\"language-javascript\">> const arr = new Array(4);\n\n> arr.map((elem, index) => index);\n\n[undefined, undefined, undefined, undefined]\n</code></pre>\n<p>To solve this, you can use <code>Array.apply</code> when creating the array.</p>\n<pre><code class=\"language-javascript\">> const arr = Array.apply(null, new Array(4));\n\n> arr.map((elem, index) => index);\n\n[0, 1, 2, 3]\n</code></pre>\n<h4>2. Passing an empty parameter to a method</h4>\n<p>If you want to call a method and ignore one of its parameters, then JavaScript will complain if you keep it empty.</p>\n<pre><code class=\"language-javascript\">> method('parameter1', , 'parameter3');\n\nUncaught SyntaxError: Unexpected token ,\n</code></pre>\n<p>A workaround that people usually resort to is to pass either <code>null</code> or <code>undefined</code>.</p>\n<pre><code class=\"language-javascript\">> method('parameter1', null, 'parameter3') // or\n\n> method('parameter1', undefined, 'parameter3');\n</code></pre>\n<p>I personally don't like using <code>null</code> since JavaScript treats it as an object and that's just weird. With the introduction of spread operators in ES6, there is a neater way of passing empty parameters to a method. As previously mentioned, arrays are sparse in nature and so passing empty values to it is totally okay. We'll use this to our advantage.</p>\n<pre><code class=\"language-javascript\">> method(...['parameter1', , 'parameter3']); // works!\n</code></pre>\n<h4>3. Unique array values</h4>\n<p>I always wonder why the Array constructor does not have a designated method to facilitate the use of unique array values. Spread operators are here for the rescue. Use spread operators with the <code>Set</code> constructor to generate unique array values.</p>\n<pre><code class=\"language-javascript\">> const arr = [...new Set([1, 2, 3, 3])];\n\n[1, 2, 3]\n</code></pre>\n<hr>\n<p>tip-md-link: <a href=\"https://github.com/loverajoel/jstips/blob/master/%5C_posts/en/javascript/2017-03-16-tapping-for-quick-debugging.md\">https://github.com/loverajoel/jstips/blob/master/\\_posts/en/javascript/2017-03-16-tapping-for-quick-debugging.md</a></p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>This little beastie here is tap. A really useful function for quick-debugging chains of function calls, anonymous functions and, actually, whatever you just want to print.</p>\n<pre><code class=\"language-javascript\">function tap(x) {\n    console.log(x);\n\n    return x;\n}\n</code></pre>\n<p>Why would you use instead of good old <code>console.log</code>? Let me show you an example:</p>\n<pre><code class=\"language-javascript\">bank_totals_by_client(bank_info(1, banks), table)\n    .filter((c) => c.balance > 25000)\n\n    .sort((c1, c2) => (c1.balance &#x3C;= c2.balance ? 1 : -1))\n\n    .map((c) => console.log(`${c.id} | ${c.tax_number} (${c.name}) => ${c.balance}`));\n</code></pre>\n<p>Now, suppose you're getting nothing from this chain (possibly an error). Where is it failing? Maybe <code>bank_info</code> isn't returning anything, so we'll tap it:</p>\n<pre><code class=\"language-javascript\">bank_totals_by_client(tap(bank_info(1, banks)), table);\n</code></pre>\n<p>Depending on our particular implementation, it might print something or not. I'll assume the information that we got from our tapping was correct and therefore, bank_info isn't causing anything.</p>\n<p>We must then move on to the next chain, filter.</p>\n<pre><code class=\"language-javascript\">            .filter(c => tap(c).balance > 25000)\n</code></pre>\n<p>Are we receiving any c's (clients actually)? If so, then bank<em>totals</em>by_client works alright. Maybe it's the condition within the filter?</p>\n<pre><code class=\"language-javascript\">            .filter(c => tap(c.balance > 25000))\n</code></pre>\n<p>Ah! Sweet, we see nothing but <code>false</code> printed, so there's no client with >25000, that's why the function was returning nothing.</p>\n<h3>(Bonus) A more advanced tap</h3>\n<pre><code class=\"language-javascript\">function tap(x, fn = (x) => x) {\n    console.log(fn(x));\n\n    return x;\n}\n</code></pre>\n<p>Now we're talking about a more advanced beast, what if we wanted to perform a certain operation <em>prior</em> to tapping? i.e, we want to access a certain object property, perform a logical operation, etc. with our tapped object? Then we call old good tap with an extra argument, a function to be applied at the moment of tapping.</p>\n<pre><code class=\"language-javascript\">tap(3, (x) => x + 2) === 3; // prints 5, but expression evaluates to true, why :-)?\n</code></pre>\n<hr>\n<p>tip-md-link: <a href=\"https://github.com/loverajoel/jstips/blob/master/%5C_posts/en/javascript/2017-03-29-recursion-iteration-and-tail-calls-in-js.md\">https://github.com/loverajoel/jstips/blob/master/\\_posts/en/javascript/2017-03-29-recursion-iteration-and-tail-calls-in-js.md</a></p>\n<pre><code>- en\n\n- javascript\n</code></pre>\n<hr>\n<p>If you've been on the business for some time, you have, most likely, come across the definition of recursion, for which the factorial of a given number <code>n! = n * (n - 1) * ... * 1</code> is a standard example.</p>\n<pre><code class=\"language-javascript\">function factorial(n) {\n    if (n === 0) {\n        return 1;\n    }\n\n    return n * factorial(n - 1);\n}\n</code></pre>\n<p>The example shown above is but the most naive implementation of the factorial function.</p>\n<p>For the sake of completeness, let's look at how this executes for <code>n = 6</code>:</p>\n<ul>\n<li>\n<p>factorial(6)</p>\n<ul>\n<li>\n<p>6 * factorial(5)</p>\n<ul>\n<li>\n<p>5 * factorial (4)</p>\n<ul>\n<li>\n<p>4 * factorial(3)</p>\n<ul>\n<li>\n<p>3 * factorial(2)</p>\n<ul>\n<li>\n<p>2 * factorial(1)</p>\n<ul>\n<li>\n<p>1 * factorial(0)</p>\n<ul>\n<li>1</li>\n</ul>\n</li>\n<li>(resuming previous execution) 1 * 1 = 1</li>\n</ul>\n</li>\n<li>(resuming...) 2 * 1 = 2</li>\n</ul>\n</li>\n<li>(...) 3 * 2 = 6</li>\n</ul>\n</li>\n<li>... 4 * 6 = 24</li>\n</ul>\n</li>\n<li>5 * 24 = 120</li>\n</ul>\n</li>\n<li>6 * 120 = 720</li>\n</ul>\n</li>\n<li>factorial(6) = 720</li>\n</ul>\n<p>Now, we must be very cautious as to what's happening so we can understand what is to come next.</p>\n<p>When we invoke a function, several things happen at once. The location to which we must return to after calling the function is saved, along with the information of the current frame (i.e, the value of n). Then space is allocated for the new function and a new frame is born.</p>\n<p>This goes on and on, we keep stacking these frames and then we unwind that stack, replacing function calls with values returned by them.</p>\n<p>Another thing to notice is the shape of the process generated by our function. You might not be surprised if I call this shape <em>recursive</em>. We have, thus, a <em>recursive process</em>.</p>\n<p>Let's take a look at a second implementation of this function.</p>\n<pre><code class=\"language-javascript\">function factorial(n, res) {\n    if (n === 0) {\n        return res;\n    }\n\n    return factorial(n - 1, res * n);\n}\n</code></pre>\n<p>We can encapsulate functionality a bit further by defining an inner function.</p>\n<pre><code class=\"language-javascript\">function factorial(n) {\n    function inner_factorial(n, res) {\n        if (n === 0) {\n            return res;\n        }\n\n        return inner_factorial(n - 1, res * n);\n    }\n\n    return inner_factorial(n, 1);\n}\n</code></pre>\n<p>Let's take a look at how this gets executed:</p>\n<ul>\n<li>\n<p>factorial(6)</p>\n<ul>\n<li>\n<p>inner anonymous function (iaf) gets called with (n = 6, res = 1)</p>\n<ul>\n<li>\n<p>iaf(5, 1 * 6)</p>\n<ul>\n<li>\n<p>iaf(4, 6 * 5)</p>\n<ul>\n<li>\n<p>iaf(3, 30 * 4)</p>\n<ul>\n<li>\n<p>iaf(2, 120 * 3)</p>\n<ul>\n<li>\n<p>iaf(1, 360 * 2)</p>\n<ul>\n<li>\n<p>iaf(0, 720)</p>\n<ul>\n<li>720</li>\n</ul>\n</li>\n<li>720</li>\n</ul>\n</li>\n<li>720</li>\n</ul>\n</li>\n<li>720</li>\n</ul>\n</li>\n<li>720</li>\n</ul>\n</li>\n<li>720</li>\n</ul>\n</li>\n<li>720</li>\n</ul>\n</li>\n<li>iaf (6, 1) = 720</li>\n</ul>\n</li>\n<li>factorial(6) = 720</li>\n</ul>\n<p>You might notice that we didn't need to perform any calculation after unwinding the stack. We just returned a value. But, according to our rules, we had to save the state as a stack frame, even if it weren't of any use later in the chain.</p>\n<p>Our rules, however, are not applied to every language out there. In fact, in Scheme it's mandatory for such chains to be optimized with tail call optimization. This ensures that our stack is not filled with unnecessary frames. Our previous calculation would look, thus, this way:</p>\n<ul>\n<li>factorial(6)</li>\n<li>iaf(6, 1)</li>\n<li>iaf(5, 6)</li>\n<li>iaf(4, 30)</li>\n<li>iaf(3, 120)</li>\n<li>iaf(2, 360)</li>\n<li>iaf(1, 720)</li>\n<li>iaf(0, 720)</li>\n<li>720</li>\n</ul>\n<p>Which in turns, looks an awfully lot like</p>\n<pre><code class=\"language-javascript\">res = 1;\n\nn = 6;\n\nwhile (n > 1) {\n    res = res * n;\n\n    n--;\n}\n</code></pre>\n<p>This means, we actually have an <em>iterative process</em>, even if we're using recursion. How cool is that?</p>\n<p>The good news is, this is a feature in ES6. As long as your recursive call is in tail position and your function has strict mode, tail call optimization will kick in and save you from having a <code>maximum stack size exceeded</code> error.</p>\n<p>UPDATE Dec 1, 2017: The only major browser with tail call optimization is Safari.1 V8 has an implentation2 but has not shipped it yet3 for the reasons listed.</p>\n<p>1: <a href=\"https://kangax.github.io/compat-table/es6/#test-proper%5C_tail%5C_calls%5C_(tail%5C_call%5C_optimisation\">https://kangax.github.io/compat-table/es6/#test-proper\\_tail\\_calls\\_(tail\\_call\\_optimisation</a>)</p>\n<p>2: <a href=\"https://bugs.chromium.org/p/v8/issues/detail?id=4698\">https://bugs.chromium.org/p/v8/issues/detail?id=4698</a></p>\n<p>3: <a href=\"https://v8project.blogspot.com/2016/04/es6-es7-and-beyond.html\">https://v8project.blogspot.com/2016/04/es6-es7-and-beyond.html</a></p>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>We all know that JavaScript is loosely typed and in some cases it fall behind specially when it comes to quality comparison with '==', comparing with '==' gives unexpected results due to whats called coercion or casting \"converting one of the 2 operands to the other's type then compare\".</p>\n<pre><code class=\"language-javascript\">0 == ' '; //true\n\n(null ==\n    undefined[1]) == //true\n    true; //true\n</code></pre>\n<p>So they provided us with the triple equal operator '===' which is more strict and does not coerce operands, However comparing with '===' is not the best solution you can get:</p>\n<pre><code class=\"language-javascript\">NaN === NaN; //false\n</code></pre>\n<p>The great news that in ES6 there is the new 'Object.is()' which is better and more precise it has the same features as '===' and moreover it behaves well in some special cases:</p>\n<pre><code class=\"language-javascript\">Object.is(0, ' '); //false\n\nObject.is(null, undefined); //false\n\nObject.is([1], true); //false\n\nObject.is(NaN, NaN); //true\n</code></pre>\n<p>Mozilla team doesn't think that Object.is is \"stricter\" than '===', they say that we should think of how this method deal with NaN, -0 and +0 but overall I think it is now a good practice in real applications.</p>\n<p>Now this table illustrates..</p>\n<p><img src=\"http://i.imgur.com/pCyqkLc.png\" alt=\"differences of operators in equality comparisons javascript\"></p>\n<h3>References</h3>\n<p><a href=\"http://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness\">Equality comparisons and sameness</a></p>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>Sometimes we need to whitelist certain attributes from an object, say we've got an array representation of a database table and we need to <code>select</code> just a few fields for some function:</p>\n<pre><code class=\"language-javascript\">function pick(obj, keys) {\n    return keys\n        .map((k) => (k in obj ? { [k]: obj[k] } : {}))\n\n        .reduce((res, o) => Object.assign(res, o), {});\n}\n\nconst row = {\n    'accounts.id': 1,\n\n    'client.name': 'John Doe',\n\n    'bank.code': 'MDAKW213'\n};\n\nconst table = [row, { 'accounts.id': 3, 'client.name': 'Steve Doe', 'bank.code': 'STV12JB' }];\n\npick(row, ['client.name']); // Get client name\n\ntable.map((row) => pick(row, ['client.name'])); // Get a list of client names\n</code></pre>\n<p>There's a bit of skulduggery going on in pick. First, we <code>map</code> a function over the keys that will return, each time, an object with only the attribute pointed by the current key (or an empty object if there's no such attribute in the object). Then, we <code>reduce</code> this collection of single-attribute objects by merging the objects.</p>\n<p>But what if we want to <code>reject</code> the attributes? Well, the function changes a bit</p>\n<pre><code class=\"language-javascript\">function reject(obj, keys) {\n    return Object.keys(obj)\n\n        .filter((k) => !keys.includes(k))\n\n        .map((k) => Object.assign({}, { [k]: obj[k] }))\n\n        .reduce((res, o) => Object.assign(res, o), {});\n}\n\n// or, reusing pick\n\nfunction reject(obj, keys) {\n    const vkeys = Object.keys(obj)\n    .filter((k) => !keys.includes(k));\n\n    return pick(obj, vkeys);\n}\n\nreject({ a: 2, b: 3, c: 4 }, ['a', 'b']); // => {c: 4}\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>You might have heard about the old ways gaining hype recently, and we don't mean praying to the gods of the north.</p>\n<p>Functional programming is the rediscovered toy which is bringing some sanity to the world of mutable state and global bindings.</p>\n<p>Today we're introducing a feature found in Clojure which allows you to define interfaces for your classes. Let's look at one-off implementation:</p>\n<pre><code class=\"language-javascript\">const protocols = (...ps) => ps.reduce((c, p) => p(c), Object);\n\nconst Mappable = (klass) => {\n    return class extends klass {\n        map() {\n            throw 'Not implemented';\n        }\n    };\n};\n\nconst Foldable = (klass) => {\n    return class extends klass {\n        fold() {\n            throw 'Not implemented';\n        }\n    };\n};\n\nclass NaturalNumbers extends protocols(Mappable, Foldable) {\n    constructor() {\n        super();\n\n        this.elements = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n    }\n\n    map(f) {\n        return this.elements.map(f);\n    }\n\n    fold(f) {\n        return this.elements.reduce(f, this.elements, 0);\n    }\n}\n</code></pre>\n<p>Yes, we're building a chain of class inheritance up there with that reduce boy. It's pretty cool. We're doing it dynamically! You see, each protocol receives a base class (Object) and extends it somehow returning the new class. The idea is similar to that of interfaces.</p>\n<p>We supply method signatures for the protocol and make sure we provide implementations for it on our base classes.</p>\n<p>What's so cool about it? We get to write things like these:</p>\n<pre><code class=\"language-javascript\">const map = (f) => (o) => o.map(f);\n\nconst fold = (f) => (o) => o.fold(f);\n\nconst compose = (...fns) => fns.reduce((acc, f) => (x) => acc(f(x)), id);\n</code></pre>\n<p>Ok, maybe we could have written those two functions without the above fuzz but, now that we know <code>NaturalNumbers</code> are <code>Mappable</code>, we can call <code>map</code> on them and trust it will return the right result. Furthermore, with our third function, we can <em>compose</em> any number of operations defined in protocols cleanly:</p>\n<pre><code class=\"language-javascript\">const plus1 = (x) => x + 1;\n\nconst div5 = (x) => x / 5;\n\nconst plus_then_div = compose(map(div5), map(plus1));\n\nconsole.log(plus_then_div(new NaturalNumbers()));\n\n// => [ 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2 ]\n</code></pre>\n<p>More important, if we know that an object of ours is <code>Mappable</code>, we know <code>map</code> will work on it. Protocols gives us an idea of what we can do with an object and help us abstract common operations between data types, thus reducing the overhead of dealing with a hundred functions.</p>\n<h3>What is easier? To have a hundred functions for every different object or ten functions that work on a hundred objects?</h3>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<blockquote>\n<p>JS shall have but one Thread (in the browser at least)</p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>-- Thus spoke the master programmer.</p>\n</blockquote>\n<p>JS runs in a single thread in the browser, this is the truth.</p>\n<p>Somewhere in its own universe, there exists a Queue which holds messages and functions associated with them.</p>\n<p>Every time an event (i.e, a user clicks a button) is registered, there's a runtime check to see whether there's any listener attached to that event. If there's one, it will enqueue the message. Otherwise, it will be lost forever.</p>\n<p>Now, our event loop processes one message at a time, meaning that if you do some CPU intensive operation (i.e, number crunching) this will indeed 'block' the one Thread, rendering our application useless.</p>\n<p>This is true even for <code>async</code> functions, which will be queued as soon as invoked and executed as soon as possible (immediately given the queue is empty).</p>\n<p>I/O such as requests to external resources are non-blocking though, so you can request a file as large as you want without fear. The associated callback, however, will show the same characteristics of an <code>async</code> function.</p>\n<p>Strategies for processing lots of data vary a lot. You could partition data and set timeouts for processing bits of it a time for example. But to unleash the full power of asynchronous processing, you should use Web Workers.</p>\n<p>To do so, you separate the processing part in a different file (possibly 'my<em>worker.js'), create a worker with `newWorker = new Worker('my</em>worker.js');` and offload the processing to it.</p>\n<pre><code class=\"language-javascript\">// my_worker.js\n\nconst do_a_lot_of_processing = (data) => {\n\n    ....\n\n}\n\n\n\nonmessage = (e) => {\n\n    postMessage(do_a_lot_of_processing(e.data));\n\n}\n\n\n\n// main.js\n\nconst myWorker = new Worker('my_worker.js');\n\n\n\nasync function get_useful_data() {\n\n    const raw_data = await request(some_url);\n\n    myWorker.postmessage(raw_data);\n\n}\n\n\n\nconst show_data => (e) {\n\n    const data = e.data;\n\n    ...\n\n}\n\n\n\nmyWorker.onmessage(show_data);\n\nget_useful_data();\n</code></pre>\n<h3>Your mileage may vary of course, and there are many abstractions that can be built upon this model</h3>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>If you ever come across the likes of</p>\n<pre><code class=\"language-javascript\">var funcs = [];\n\nfor (var i = 0; i &#x3C; 3; i++) {\n    funcs[i] = function () {\n        console.log('i value is ' + i);\n    };\n}\n\nfor (var k = 0; k &#x3C; 3; k++) {\n    funcs[k]();\n}\n</code></pre>\n<p>You will notice that the expected output of</p>\n<pre><code>i value is 0\n\ni value is 1\n\ni value is 2\n</code></pre>\n<p>Doesn't match the actual output which will resemble</p>\n<pre><code>i value is 3\n\ni value is 3\n\ni value is 3\n</code></pre>\n<p>This is because of how the capturing mechanism of closures work and how <code>i</code> is represented internally.</p>\n<p>To solve this situation you can do as follows:</p>\n<pre><code class=\"language-javascript\">for (var i = 0; i &#x3C; 3; i++) {\n    funcs[i] = (function (value) {\n        console.log('i value is ' + i);\n    })(i);\n}\n</code></pre>\n<p>Which effectively copies i by value by handing it to our closure or</p>\n<pre><code class=\"language-javascript\">for (let i = 0; i &#x3C; 3; i++) {\n    funcs[i] = function () {\n        console.log('i value is ' + i);\n    };\n}\n</code></pre>\n<p>Where <code>let</code> scopes the variable to our <code>for</code> loop and produces a new value each iteration, thus <code>i</code> will be bound to different values on our closures as expected.</p>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>Object cloning is a tricky, full of edge-cases, endeavor. The reason is simple enough. Objects maintain internal state, and that is much abused. There are countless techniques, or better phrased, countless derivations of the same technique.</p>\n<p>Cloning an object is an indicator that your application is growing, and that you've got a complex object which you'd want to treat as an immutable value, i.e operate on it while maintaining a previous state.</p>\n<p>If the object is in your control, you're lucky. A bit of refactoring here and there might lead you to a point where you avoid the problem entirely by rethinking your object's structure and behavior.</p>\n<p>With the rediscovering of functional programming techniques, a myriad of debates have been held about immutable structures and how they offer exactly what you seek for. Mutable state is the root of all evil, some might argue.</p>\n<p>We encourage to reach <strong>ImmutableJS</strong> by Facebook which provides a nice set of immutable structures free for use. By rethinking your object's inner workings and separating state from behavior, making each function consume a state to produce a new one - much like the Haskell's <strong>State</strong> monad - you will reduce many nuisances.</p>\n<p>If the object is outside your control, you're partly out of luck. This can be circumvented by creating convoluted computations where you solve for yourself circular references and reach enlightenment. However, as you're using external objects anyways, and they must come, as their name says, from external sources, then you might be more comfortable handling the matter to yet another external library and focus on what matters the most, i.e, your application itself.</p>\n<p>One such library is <a href=\"https://github.com/pvorb/clone\">pvorb/clone</a>, which has a very simple API. To clone an object you only have to</p>\n<pre><code class=\"language-javascript\">var clone = require('clone');\n\nvar a = { foo: { bar: 'baz' } };\n\nvar b = clone(a);\n\na.foo.bar = 'foo';\n\nconsole.log(a); // {foo: {bar: 'foo'}}\n\nconsole.log(b); // {foo: {bar: 'baz'}}\n</code></pre>\n<p>There are, of course, many more libraries that allow you to do the same such as <a href=\"http://ramdajs.com/docs/#clone\">Ramda</a>, <a href=\"https://www.npmjs.com/package/lodash.clonedeep\">lodash.clonedeep</a> and <a href=\"https://www.npmjs.com/package/lodash.clone\">lodash.clone</a>.</p>\n<p>As an end note, if you are serious about dealing with immutable structures, you might want to check <strong>ClojureScript</strong> or (for those that feel that Haskell's worth a shot) <strong>PureScript</strong>.</p>\n<h3>We neither encourage, nor condemn, the use of self made cloning mechanisms. Only noting that considerable work has been done on the area and that you'd probably be better of reusing than reinventing the wheel</h3>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<h2>Looping over arrays</h2>\n<p>There's a few methods for looping over arrays in Javascript. We'll start with the classical ones and move towards additions made to the standard.</p>\n<h3>while</h3>\n<pre><code class=\"language-javascript\">let index = 0;\n\nconst array = [1, 2, 3, 4, 5, 6];\n\nwhile (index &#x3C; array.length) {\n    console.log(array[index]);\n\n    index++;\n}\n</code></pre>\n<h3>for (classical)</h3>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 4, 5, 6];\n\nfor (let index = 0; index &#x3C; array.length; index++) {\n    console.log(array[index]);\n}\n</code></pre>\n<h3>forEach</h3>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 4, 5, 6];\n\narray.forEach(function (current_value, index, array) {\n    console.log(`At index ${index} in array ${array} the value is ${current_value}`);\n});\n\n// => undefined\n</code></pre>\n<h3>map</h3>\n<p>The last construct was useful, however, it doesn't return a new array which might be undesirable for your specific case. <code>map</code> solves this by applying a function over every element and then returning the new array.</p>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 4, 5, 6];\n\nconst square = (x) => Math.pow(x, 2);\n\nconst squares = array.map(square);\n\nconsole.log(`Original array: ${array}`);\n\nconsole.log(`Squared array: ${squares}`);\n</code></pre>\n<p>The full signature for <code>map</code> is <code>.map(current_value, index, array)</code>.</p>\n<h3>reduce</h3>\n<p>From MDN:</p>\n<blockquote>\n<p>The reduce() method applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value.</p>\n</blockquote>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 4, 5, 6];\n\nconst sum = (x, y) => x + y;\n\nconst array_sum = array.reduce(sum, 0);\n\nconsole.log(`The sum of array: ${array} is ${array_sum}`);\n</code></pre>\n<h3>filter</h3>\n<p>Filters elements on an array based on a boolean function.</p>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 4, 5, 6];\n\nconst even = (x) => x % 2 === 0;\n\nconst even_array = array.filter(even);\n\nconsole.log(`Even numbers in array ${array}: ${even_array}`);\n</code></pre>\n<h3>every</h3>\n<p>Got an array and want to test if a given condition is met in every element?</p>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 4, 5, 6];\n\nconst under_seven = (x) => x &#x3C; 7;\n\nif (array.every(under_seven)) {\n    console.log('Every element in the array is less than 7');\n} else {\n    console.log('At least one element in the array was bigger than 7');\n}\n</code></pre>\n<h3>some</h3>\n<p>Test if at least one element matches our boolean function.</p>\n<pre><code class=\"language-javascript\">const array = [1, 2, 3, 9, 5, 6, 4];\n\nconst over_seven = (x) => x > 7;\n\nif (array.some(over_seven)) {\n    console.log('At least one element bigger than 7 was found');\n} else {\n    console.log('No element bigger than 7 was found');\n}\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<h2>Hash maps without side effects</h2>\n<p>When you want to use javascript object as a hash map(purely for storing data), you might want to create it as follows.</p>\n<pre><code class=\"language-javascript\">const map = Object.create(null);\n</code></pre>\n<p>When creating a map using object literal(<code>const map = {}</code>), the map inherits properties from Object by default. It is equivalent to <code>Object.create(Object.prototype)</code>.</p>\n<p>But by doing <code>Object.create(null)</code>, we explicitly specify <code>null</code> as its prototype. So it have absolutely no properties, not even constructor, toString, hasOwnProperty, etc. so you're free to use those keys in your data structure if you need to.</p>\n<h3>Rationale</h3>\n<pre><code class=\"language-javascript\">const dirtyMap = {};\n\nconst cleanMap = Object.create(null);\n\n\n\ndirtyMap.constructor    // function Object() { [native code] }\n\n\n\ncleanMap.constructor    // undefined\n\n\n\n// Iterating maps\n\n\n\nconst key;\n\nfor(key in dirtyMap){\n\n  if (dirtyMap.hasOwnProperty(key)) {   // Check to avoid iterating over inherited properties.\n\n    console.log(key + \" -> \" + dirtyMap[key]);\n\n  }\n\n}\n\n\n\nfor(key in cleanMap){\n\n  console.log(key + \" -> \" + cleanMap[key]);    // No need to add extra checks, as the object will always be clean\n\n}\n</code></pre>\n<h3>Notes</h3>\n<ul>\n<li>Object.create() was introduced in ES5: <a href=\"http://kangax.github.io/compat-table/es5/\">Compatibility</a></li>\n<li>ES6 introduced some new structures: <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map\">Map</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\">WeakMap</a>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\">Set</a> and <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\">Weak Set</a></li>\n</ul>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<h2>Creating immutable objects in native JavaScript</h2>\n<p>Javascript it's a flexible language, you can redefine anything. But when projects get complex we find problems with mutable data structures. With the latest versions of JavaScript this situation changed. Now it's possible to create immutable objects. I'll walk you through how to do it in three different ways.</p>\n<h4>Wait, what means immutable?</h4>\n<blockquote>\n<p>Immutability in object means we don't want our objects to change in any ways once we create them i.e make them read-only type.</p>\n</blockquote>\n<p>Let's suppose we need to define a car <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\">Object</a> and use its properties to perform operations throughout our entire project. We can't allow modifying by mistake any data.</p>\n<pre><code>const myTesla = {\n\n maxSpeed: 250,\n\n batteryLife: 300,\n\n weight: 023\n\n};\n</code></pre>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions\">Object.preventExtensions()</a></h3>\n<p>This method prevents the addition of new properties to our existing object. <code>preventExtensions()</code> is a irreversible operation. We can never add extra properties to the object again.</p>\n<pre><code>Object.isExtensible(myTesla); // true\n\nObject.preventExtensions(myTesla);\n\nObject.isExtensible(myTesla); // false\n\nmyTesla.color = 'blue';\n\nconsole.log(myTesla.color) // undefined\n</code></pre>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal\">Object.seal()</a></h3>\n<p>It prevents additions or deletion of properties. <code>seal()</code> also prevents the modification of property descriptors.</p>\n<pre><code>Object.isSealed(myTesla); // false\n\nObject.seal(myTesla);\n\nObject.isSealed(myTesla); // true\n\n\n\nmyTesla.color = 'blue';\n\nconsole.log(myTesla.color); // undefined\n\n\n\ndelete myTesla.batteryLife; // false\n\nconsole.log(myTesla.batteryLife); // 300\n\n\n\nObject.defineProperty(myTesla, 'batteryLife'); // TypeError: Cannot redefine property: batteryLife\n</code></pre>\n<h3><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\">Object.freeze()</a></h3>\n<p>It does the same that <code>Object.seal()</code> plus it makes the properties non-writable.</p>\n<pre><code>Object.isFrozen(myTesla); // false\n\nObject.freeze(myTesla);\n\nObject.isFrozen(myTesla); // true\n\n\n\nmyTesla.color = 'blue';\n\nconsole.log(myTesla.color); // undefined\n\n\n\ndelete myTesla.batteryLife;\n\nconsole.log(myTesla.batteryLife); // 300\n\n\n\nObject.defineProperty(myTesla, 'batteryLife'); // TypeError: Cannot redefine property: batteryLife\n\n\n\nmyTesla.batteryLife = 400;\n\nconsole.log(myTesla.batteryLife); // 300\n</code></pre>\n<h3>Extra</h3>\n<p>Use <code>strict mode</code> if you want to throw an error when trying to modify an immutable object.</p>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>Functional inheritance is the process of inheriting features by applying an augmenting function to an object instance. The function supplies a closure scope which you can use to keep some data private. The augmenting function uses dynamic object extension to extend the object instance with new properties and methods.</p>\n<p>Functional mixins are composable factory functions that add properties and behaviors to objects like stations in an assembly line.</p>\n<pre><code class=\"language-javascript\">// Base object constructor function\n\nfunction Animal(data) {\n    var that = {}; // Create an empty object\n\n    that.name = data.name; // Add it a \"name\" property\n\n    return that; // Return the object\n}\n\n// Create achild object, inheriting from the base Animal\n\nfunction Cat(data) {\n    // Create the Animal object\n\n    var that = Animal(data);\n\n    // Extend base object\n\n    that.sayHello = function () {\n        return \"Hello, I'm \" + that.name;\n    };\n\n    return that;\n}\n\n// Usage\n\nvar myCat = Cat({ name: 'Rufi' });\n\nconsole.log(myCat.sayHello());\n\n// Output: \"Hello, I'm Rufi\"\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>A currying function is a function that takes multiple arguments and turns it into a sequence of functions having only one argument at a time.</p>\n<p>In this way, an n-ary function becomes a unary function, and the last function returns the result of all the arguments together in a function.</p>\n<pre><code class=\"language-javascript\">// Normal definition\n\nfunction multiply(a, b, c) {\n    return a * b * c;\n}\n\nconsole.log(multiply(1, 2, 3));\n\n// Output: 6\n\n// Simple curry function definition\n\nfunction multiply(a) {\n    return (b) => {\n        return (c) => {\n            return a * b * c;\n        };\n    };\n}\n\nconsole.log(multiply(1)(2)(3));\n\n// Output: 6\n</code></pre>\n<h4>Further readings</h4>\n<ul>\n<li><a href=\"https://dev.to/suprabhasupi/currying-in-javascript-1k3l\">Currying in JavaScript</a></li>\n<li><a href=\"https://lodash.com/docs/#curry\">Lodash curry</a></li>\n<li><a href=\"http://zetcode.com/javascript/currying/\">JavaScript currying</a></li>\n</ul>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>Temporal Dead Zone is a JavaScript behavior while using variables declared using <code>let</code> and <code>const</code> keywords. Since the keywords are block-scoped, the variables declared these keywords could not be accessed before the declaration, and then you will have to witness where variables will be said to be <code>undefined</code>.</p>\n<pre><code class=\"language-javascript\">function myFunc() {\n    console.log(greeting);\n\n    var greeting = 'Hello World!';\n}\n\nmyFunc(); // Output: undefined\n\nfunction myFunc() {\n    console.log(greeting);\n\n    let greeting = 'Hello World!';\n}\n\nmyFunc(); // Output: ReferenceError: greeting is not defined\n\nfunction myFunc() {\n    console.log(greeting);\n\n    const greeting = 'Hello World!';\n}\n\nmyFunc(); // Output: ReferenceError: greeting is not defined\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p><code>target</code> refers to the DOM element that triggers an event. Otherwise, <code>currentTarget</code> refers to the DOM element that the event listener is listening on.</p>\n<pre><code class=\"language-html\">&#x3C;ul class=\"todo-list\">\n    &#x3C;li class=\"item\">Walk your dog&#x3C;/li>\n&#x3C;/ul>\n</code></pre>\n<pre><code class=\"language-js\">const list = document.querySelector(\".todo-list\");\n\n\n\nlist.addEventListener(\"click\", e => {\n\n  console.log(e.target);\n\n  // Output: &#x3C;li class=\"item\">Walk your dog&#x3C;/li>\n\n  console.log(e.currentTarget);\n\n  // Output: &#x3C;ul class=\"todo-list\">\n&#x3C;/ul>\n\n});\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>The spread operator in JavaScript is a useful syntax for adding elements to an array, combining arrays into one larger one, spreading an array inside the arguments of a function, and more.</p>\n<pre><code class=\"language-js\">// Concatenating arrays and objects\n\nlet arr1 = [1, 2, 3];\n\nlet arr2 = [4, 5];\n\nlet newArray = [...arr1, ...arr2];\n\nconsole.log(newArray);\n\n// Output: [ 1, 2, 3, 4, 5 ]\n\n// Copying array elements\n\nlet arr = ['a', 'b', 'c'];\n\nlet newArray = [...arr];\n\nconsole.log(newArray);\n\n// Output: [\"a\", \"b\", \"c\"]\n\n// Expanding arrays\n\nlet arr = ['a', 'b'];\n\nlet newArray = [...arr, 'c', 'd'];\n\nconsole.log(newArray);\n\n// Output: [\"a\", \"b\", \"c\", \"d\"]\n\n// Merging objects\n\nconst userBasic = {\n    name: 'Jen',\n\n    age: 22\n};\n\nconst userMoreInfo = {\n    country: 'Argentina',\n\n    city: 'Córdoba'\n};\n\nconst user = { ...userBasic, ...userMoreInfo };\n\n// Output: {  name: \"Jen\",  age: 22, country: \"Argentina\", city: \"Córdoba\" }\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>The <code>void</code> operator returns an <code>undefined</code> value from an evaluated expression, or in other words; the <code>void</code> operator specifies an expression to be evaluated without returning a value. It is commonly used in client-side JavaScript, where the browser should not display the value.</p>\n<pre><code class=\"language-js\">function getYear() {\n    return 2020;\n}\n\nconsole.log(getYear());\n\n// Output: 2020\n\nconsole.log(void getYear());\n\n// Output: undefined\n\n// Useful use case\n\nbutton.onclick = () => void getYear();\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>All <code>Promise</code> instances accept a method as an argument called the executor. This executor takes two methods as arguments: resolve and reject. Within the executor, if resolve is called, the <code>Promise</code> instance becomes fulfilled. If an exception is thrown, reject is called instead, and the <code>Promise</code> instance becomes rejected.</p>\n<pre><code class=\"language-js\">const executor = (resolve, reject) => {\n    setTimeout(() => resolve(\"I'm done\"), 1000);\n};\n\nnew Promise(executor).then((result) => {\n    console.log(result);\n\n    // Output after 1000ms: I'm done\n});\n</code></pre>\n<hr>\n<h2>- en</h2>\n<pre><code>- javascript\n</code></pre>\n<hr>\n<p>The ternary operator is a shortcut for the <code>if</code> statement. It consists of three operands; a question mark, a condition, and an expression to execute if the condition is true, followed by a colon and another expression to execute if it's false.</p>\n<pre><code class=\"language-js\">let age = 26;\n\n// condition ? expression if true : expression if false\n\nlet drink = age >= 21 ? 'Beer' : 'Juice';\n\nconsole.log(drink); // \"Beer\"\n\n// Equivalent to:\n\nlet drink;\n\nif (age >= 21) {\n    drink = 'Beer';\n} else {\n    drink = 'Juice';\n}\n\nconsole.log(drink); // \"Beer\"\n</code></pre>"},{"url":"/docs/data-structures/ds-algo-interview/","relativePath":"docs/data-structures/ds-algo-interview.md","relativeDir":"docs/data-structures","base":"ds-algo-interview.md","name":"ds-algo-interview","frontmatter":{"title":"Data Structures Interview","weight":0,"excerpt":"Asymptotic Notation is the hardware independent notation used to tell the time and space complexity of an algorithm. Meaning it's a standardized way of measuring how much memory an algorithm uses or how long it runs for given an input.","seo":{"title":"Data Structures Interview","description":"In Javascript","robots":[],"extra":[]},"template":"docs"},"html":"<h1><a id=\"asymptotic-notation\"></a>Asymptotic Notation</h1>\n<h3><span style=\"color:red;\"> Definition:</h3>\n<p>Asymptotic Notation is the hardware independent notation used to tell the time and space complexity of an algorithm. Meaning it's a standardized way of measuring how much memory an algorithm uses or how long it runs for given an input.</p>\n<h3><span style=\"color:red;\"> Complexities</h3>\n<p>The following are the Asymptotic rates of growth from best to worst:</p>\n<ul>\n<li>constant growth - <code>O(1)</code> Runtime is constant and does not grow with <code>n</code></li>\n<li>logarithmic growth - <code>O(log n)</code> Runtime grows logarithmically in proportion to <code>n</code></li>\n<li>linear growth - <code>O(n)</code> Runtime grows directly in proportion to <code>n</code></li>\n<li>superlinear growth - <code>O(n log n)</code> Runtime grows in proportion <em>and</em> logarithmically to <code>n</code></li>\n<li>polynomial growth - <code>O(n^c)</code> Runtime grows quicker than previous all based on <code>n</code></li>\n<li>exponential growth - <code>O(c^n)</code> Runtime grows even faster than polynomial growth based on <code>n</code></li>\n<li>factorial growth - <code>O(n!)</code> Runtime grows the fastest and becomes quickly unusable for even\nsmall values of <code>n</code>\n<a href=\"https://www.geeksforgeeks.org/analysis-algorithms-big-o-analysis/\">(source: Soumyadeep Debnath, <em>Analysis of Algorithms | Big-O analysis</em>)</a>\nVisualized below; the x-axis representing input size and the y-axis representing complexity:\n<img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Comparison_computational_complexity.svg/400px-Comparison_computational_complexity.svg.png\" alt=\"#\">\n<a href=\"https://en.wikipedia.org/wiki/Computational_complexity_of_mathematical_operations\">(source: Wikipedia, <em>Computational Complexity of Mathematical Operations</em>)</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Big-O notation</h3>\n<p>Big-O refers to the upper bound of time or space complexity of an algorithm, meaning it worst case runtime scenario. An easy way to think of it is that runtime could be better than Big-O but it will never be worse.</p>\n<h3><span style=\"color:red;\"> Big-Ω (Big-Omega) notation</h3>\n<p>Big-Omega refers to the lower bound of time or space complexity of an algorithm, meaning it is the best runtime scenario. Or runtime could worse than Big-Omega, but it will never be better.</p>\n<h3><span style=\"color:red;\"> Big-θ (Big-Theta) notation</h3>\n<p>Big-Theta refers to the tight bound of time or space complexity of an algorithm. Another way to think of it is the intersection of Big-O and Big-Omega, or more simply runtime is guaranteed to be a given complexity, such as <code>n log n</code>.</p>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Big-O and Big-Theta are the most common and helpful notations</li>\n<li>Big-O does <em>not</em> mean Worst Case Scenario, Big-Theta does <em>not</em> mean average case, and Big-Omega does <em>not</em> mean Best Case Scenario. They only connote the algorithm's performance for a particular scenario, and all three can be used for any scenario.</li>\n<li>Worst Case means given an unideal input, Average Case means given a typical input, Best case means a ideal input. Ex. Worst case means given an input the algorithm performs particularly bad, or best case an already sorted array for a sorting algorithm.</li>\n<li>Best Case and Big Omega are generally not helpful since Best Cases are rare in the real world and lower bound might be very different than an upper bound.</li>\n<li>Big-O isn't everything. On paper merge sort is faster than quick sort, but in practice quick sort is superior.</li>\n</ul>\n<h1><a id=\"data-structures\"></a>Data Structures</h1>\n<h3><span style=\"color:red;\"> <a id=\"array\"></a> Array</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>Stores data elements based on an sequential, most commonly 0 based, index.</li>\n<li>Based on <a href=\"http://en.wikipedia.org/wiki/Tuple\">tuples</a> from set theory.</li>\n<li>They are one of the oldest, most commonly used data structures.</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Optimal for indexing; bad at searching, inserting, and deleting (except at the end).</li>\n<li>\n<p><strong>Linear arrays</strong>, or one dimensional arrays, are the most basic.</p>\n<ul>\n<li>Are static in size, meaning that they are declared with a fixed size.</li>\n</ul>\n</li>\n<li>\n<p><strong>Dynamic arrays</strong> are like one dimensional arrays, but have reserved space for additional elements.</p>\n<ul>\n<li>If a dynamic array is full, it copies its contents to a larger array.</li>\n</ul>\n</li>\n<li><strong>Multi dimensional arrays</strong> nested arrays that allow for multiple dimensions such as an array of arrays providing a 2 dimensional spacial representation via x, y coordinates.</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Indexing: Linear array: <code>O(1)</code>, Dynamic array: <code>O(1)</code></li>\n<li>Search: Linear array: <code>O(n)</code>, Dynamic array: <code>O(n)</code></li>\n<li>Optimized Search: Linear array: <code>O(log n)</code>, Dynamic array: <code>O(log n)</code></li>\n<li>Insertion: Linear array: n/a, Dynamic array: <code>O(n)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> <a id=\"linked-list\"></a> Linked List</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>Stores data with <strong>nodes</strong> that point to other nodes.</p>\n<ul>\n<li>Nodes, at its most basic it has one datum and one reference (another node).</li>\n<li>A linked list <em>chains</em> nodes together by pointing one node's reference towards another node.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Designed to optimize insertion and deletion, slow at indexing and searching.</li>\n<li><strong>Doubly linked list</strong> has nodes that also reference the previous node.</li>\n<li><strong>Circularly linked list</strong> is simple linked list whose <strong>tail</strong>, the last node, references the <strong>head</strong>, the first node.</li>\n<li>\n<p><strong>Stack</strong>, commonly implemented with linked lists but can be made from arrays too.</p>\n<ul>\n<li>Stacks are <strong>last in, first out</strong> (LIFO) data structures.</li>\n<li>Made with a linked list by having the head be the only place for insertion and removal.</li>\n</ul>\n</li>\n<li>\n<p><strong>Queues</strong>, too can be implemented with a linked list or an array.</p>\n<ul>\n<li>Queues are a <strong>first in, first out</strong> (FIFO) data structure.</li>\n<li>Made with a doubly linked list that only removes from head and adds to tail.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Indexing: Linked Lists: <code>O(n)</code></li>\n<li>Search: Linked Lists: <code>O(n)</code></li>\n<li>Optimized Search: Linked Lists: <code>O(n)</code></li>\n<li>Append: Linked Lists: <code>O(1)</code></li>\n<li>Prepend: Linked Lists: <code>O(1)</code></li>\n<li>Insertion: Linked Lists: <code>O(n)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> <a id=\"hash\"></a> Hash Table or Hash Map</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>Stores data with key value pairs.</li>\n<li>\n<p><strong>Hash functions</strong> accept a key and return an output unique only to that specific key.</p>\n<ul>\n<li>This is known as <strong>hashing</strong>, which is the concept that an input and an output have a one-to-one correspondence to map information.</li>\n<li>Hash functions return a unique address in memory for that data.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Designed to optimize searching, insertion, and deletion.</li>\n<li>\n<p><strong>Hash collisions</strong> are when a hash function returns the same output for two distinct inputs.</p>\n<ul>\n<li>All hash functions have this problem.</li>\n<li>This is often accommodated for by having the hash tables be very large.</li>\n</ul>\n</li>\n<li>Hashes are important for associative arrays and database indexing.</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Indexing: Hash Tables: <code>O(1)</code></li>\n<li>Search: Hash Tables: <code>O(1)</code></li>\n<li>Insertion: Hash Tables: <code>O(1)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> <a id=\"binary-tree\"></a> Binary Tree</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>Is a tree like data structure where every node has at most two children.</p>\n<ul>\n<li>There is one left and right child node.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Designed to optimize searching and sorting.</li>\n<li>A <strong>degenerate tree</strong> is an unbalanced tree, which if entirely one-sided, is essentially a linked list.</li>\n<li>They are comparably simple to implement than other data structures.</li>\n<li>\n<p>Used to make <strong>binary search trees</strong>.</p>\n<ul>\n<li>A binary tree that uses comparable keys to assign which direction a child is.</li>\n<li>Left child has a key smaller than its parent node.</li>\n<li>Right child has a key greater than its parent node.</li>\n<li>There can be no duplicate node.</li>\n<li>Because of the above it is more likely to be used as a data structure than a binary tree.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Indexing: Binary Search Tree: <code>O(log n)</code></li>\n<li>Search: Binary Search Tree: <code>O(log n)</code></li>\n<li>Insertion: Binary Search Tree: <code>O(log n)</code></li>\n</ul>\n<h1><a id=\"algorithms\"></a> Algorithms</h1>\n<h2><a id=\"algorithm-basics\"></a> Algorithm Basics</h2>\n<h3><span style=\"color:red;\"> Recursive Algorithms</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>An algorithm that calls itself in its definition.</p>\n<ul>\n<li><strong>Recursive case</strong> a conditional statement that is used to trigger the recursion.</li>\n<li><strong>Base case</strong> a conditional statement that is used to break the recursion.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>\n<p><strong>Stack level too deep</strong> and <strong>stack overflow</strong>.</p>\n<ul>\n<li>If you've seen either of these from a recursive algorithm, you messed up.</li>\n<li>It means that your base case was never triggered because it was faulty or the problem was so massive you ran out of alloted memory.</li>\n<li>Knowing whether or not you will reach a base case is integral to correctly using recursion.</li>\n<li>Often used in Depth First Search</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Iterative Algorithms</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>An algorithm that is called repeatedly but for a finite number of times, each time being a single iteration.</p>\n<ul>\n<li>Often used to move incrementally through a data set.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Generally you will see iteration as loops, for, while, and until statements.</li>\n<li>Think of iteration as moving one at a time through a set.</li>\n<li>Often used to move through an array.</li>\n</ul>\n<h3><span style=\"color:red;\"> Recursion Vs. Iteration</h3>\n<ul>\n<li>\n<p>The differences between recursion and iteration can be confusing to distinguish since both can be used to implement the other. But know that,</p>\n<ul>\n<li>Recursion is, usually, more expressive and easier to implement.</li>\n<li>Iteration uses less memory.</li>\n</ul>\n</li>\n<li><strong>Functional languages</strong> tend to use recursion. (i.e. Haskell)</li>\n<li><strong>Imperative languages</strong> tend to use iteration. (i.e. Ruby)</li>\n<li>Check out this <a href=\"http://stackoverflow.com/questions/19794739/what-is-the-difference-between-iteration-and-recursion\">Stack Overflow post</a> for more info.</li>\n</ul>\n<h3><span style=\"color:red;\"> Pseudo Code of Moving Through an Array</h3>\n<pre><code>| Recursion                    | Iteration                     |\n| ---------------------------- | ----------------------------- |\n| recursive method (array, n)  | iterative method (array)      |\n| if array[n] is not nil       | for n from 0 to size of array |\n| print array[n]               | print(array[n])               |\n| recursive method(array, n+1) |\n| else                         |\n| exit loop                    |\n</code></pre>\n<h3><span style=\"color:red;\"> Greedy Algorithms</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>An algorithm that, while executing, selects only the information that meets a certain criteria.</li>\n<li>\n<p>The general five components, taken from <a href=\"http://en.wikipedia.org/wiki/Greedy_algorithm#Specifics\">Wikipedia</a>:</p>\n<ul>\n<li>A candidate set, from which a solution is created.</li>\n<li>A selection function, which chooses the best candidate to be added to the solution.</li>\n<li>A feasibility function, that is used to determine if a candidate can be used to contribute to a solution.</li>\n<li>An objective function, which assigns a value to a solution, or a partial solution.</li>\n<li>A solution function, which will indicate when we have discovered a complete solution.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Used to find the expedient, though non-optimal, solution for a given problem.</li>\n<li>Generally used on sets of data where only a small proportion of the information evaluated meets the desired result.</li>\n<li>Often a greedy algorithm can help reduce the Big O of an algorithm.</li>\n</ul>\n<h3><span style=\"color:red;\"> Pseudo Code of a Greedy Algorithm to Find Largest Difference of any Two Numbers in an Array.</h3>\n<pre><code>greedy algorithm (array)\n  let largest difference = 0\n  let new difference = find next difference (array[n], array[n+1])\n  largest difference = new difference if new difference is > largest difference\n  repeat above two steps until all differences have been found\n  return largest difference\n</code></pre>\n<p>This algorithm never needed to compare all the differences to one another, saving it an entire iteration.</p>\n<h2><a id=\"search-algorithms\"></a>Search Algorithms</h2>\n<h3><span style=\"color:red;\"> <a id=\"breadth-first-search\"></a>Breadth First Search</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>An algorithm that searches a tree (or graph) by searching levels of the tree first, starting at the root.</p>\n<ul>\n<li>It finds every node on the same level, most often moving left to right.</li>\n<li>While doing this it tracks the children nodes of the nodes on the current level.</li>\n<li>When finished examining a level it moves to the left most node on the next level.</li>\n<li>The bottom-right most node is evaluated last (the node that is deepest and is farthest right of it's level).</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Optimal for searching a tree that is wider than it is deep.</li>\n<li>\n<p>Uses a queue to store information about the tree while it traverses a tree.</p>\n<ul>\n<li>Because it uses a queue it is more memory intensive than <strong>depth first search</strong>.</li>\n<li>The queue uses more memory because it needs to stores pointers</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Search: Breadth First Search: O(V + E)</li>\n<li>E is number of edges</li>\n<li>V is number of vertices</li>\n</ul>\n<h3><span style=\"color:red;\"> <a id=\"depth-first-search\"></a>Depth First Search</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>An algorithm that searches a tree (or graph) by searching depth of the tree first, starting at the root.</p>\n<ul>\n<li>It traverses left down a tree until it cannot go further.</li>\n<li>Once it reaches the end of a branch it traverses back up trying the right child of nodes on that branch, and if possible left from the right children.</li>\n<li>When finished examining a branch it moves to the node right of the root then tries to go left on all it's children until it reaches the bottom.</li>\n<li>The right most node is evaluated last (the node that is right of all it's ancestors).</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Optimal for searching a tree that is deeper than it is wide.</li>\n<li>\n<p>Uses a stack to push nodes onto.</p>\n<ul>\n<li>Because a stack is LIFO it does not need to keep track of the nodes pointers and is therefore less memory intensive than breadth first search.</li>\n<li>Once it cannot go further left it begins evaluating the stack.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Search: Depth First Search: O(|E| + |V|)</li>\n<li>E is number of edges</li>\n<li>V is number of vertices</li>\n</ul>\n<h3><span style=\"color:red;\"> Breadth First Search Vs. Depth First Search</h3>\n<ul>\n<li>\n<p>The simple answer to this question is that it depends on the size and shape of the tree.</p>\n<ul>\n<li>For wide, shallow trees use Breadth First Search</li>\n<li>For deep, narrow trees use Depth First Search</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Nuances</h3>\n<ul>\n<li>Because BFS uses queues to store information about the nodes and its children, it could use more memory than is available on your computer. (But you probably won't have to worry about this.)</li>\n<li>If using a DFS on a tree that is very deep you might go unnecessarily deep in the search. See <a href=\"http://xkcd.com/761/\">xkcd</a> for more information.</li>\n<li>Breadth First Search tends to be a looping algorithm.</li>\n<li>Depth First Search tends to be a recursive algorithm.</li>\n</ul>\n<h2><a id=\"sorting-algorithms\"></a>Sorting Algorithms</h2>\n<h3><span style=\"color:red;\"> <a id=\"selection-sort\"></a>Selection Sort</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>A comparison based sorting algorithm.</p>\n<ul>\n<li>Starts with the cursor on the left, iterating left to right</li>\n<li>Compares the left side to the right, looking for the smallest known item</li>\n<li>If the left is smaller than the item to the right it continues iterating</li>\n<li>If the left is bigger than the item to the right, the item on the right becomes the known smallest number</li>\n<li>Once it has checked all items, it moves the known smallest to the cursor and advances the cursor to the right and starts over</li>\n<li>As the algorithm processes the data set, it builds a fully sorted left side of the data until the entire data set is sorted</li>\n</ul>\n</li>\n<li>Changes the array in place.</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Inefficient for large data sets.</li>\n<li>Very simple to implement.</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Best Case Sort: Merge Sort: <code>O(n^2)</code></li>\n<li>Average Case Sort: Merge Sort: <code>O(n^2)</code></li>\n<li>Worst Case Sort: Merge Sort: <code>O(n^2)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Space Complexity</h3>\n<ul>\n<li>Worst Case: <code>O(1)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Visualization</h3>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/9/94/Selection-Sort-Animation.gif\" alt=\"#\">\n<a href=\"https://en.wikipedia.org/wiki/Selection_sort\">(source: Wikipedia, <em>Insertion Sort</em>)</a></p>\n<h3><span style=\"color:red;\"> <a id=\"insertion-sort\"></a>Insertion Sort</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>A comparison based sorting algorithm.</p>\n<ul>\n<li>Iterates left to right comparing the current cursor to the previous item.</li>\n<li>If the cursor is smaller than the item on the left it swaps positions and the cursor compares itself again to the left hand side until it is put in its sorted position.</li>\n<li>As the algorithm processes the data set, the left side becomes increasingly sorted until it is fully sorted.</li>\n</ul>\n</li>\n<li>Changes the array in place.</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>Inefficient for large data sets, but can be faster for than other algorithms for small ones.</li>\n<li>Although it has an <code>O(n^2)</code>, in practice it slightly less since its comparison scheme only requires checking place if its smaller than its neighbor.</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Best Case: <code>O(n)</code></li>\n<li>Average Case: <code>O(n^2)</code></li>\n<li>Worst Case: <code>O(n^2)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Space Complexity</h3>\n<ul>\n<li>Worst Case: <code>O(n)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Visualization</h3>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/0/0f/Insertion-sort-example-300px.gif\" alt=\"#\">\n<a href=\"https://en.wikipedia.org/wiki/Insertion_sort\">(source: Wikipedia, <em>Insertion Sort</em>)</a></p>\n<h3><span style=\"color:red;\"> <a id=\"merge-sort\"></a>Merge Sort</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>A divide and conquer algorithm.</p>\n<ul>\n<li>Recursively divides entire array by half into subsets until the subset is one, the base case.</li>\n<li>Once the base case is reached results are returned and sorted ascending left to right.</li>\n<li>Recursive calls are returned and the sorts double in size until the entire array is sorted.</li>\n</ul>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>This is one of the fundamental sorting algorithms.</li>\n<li>Know that it divides all the data into as small possible sets then compares them.</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Worst Case: <code>O(n log n)</code></li>\n<li>Average Case: <code>O(n log n)</code></li>\n<li>Best Case: <code>O(n)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Space Complexity</h3>\n<ul>\n<li>Worst Case: <code>O(1)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Visualization</h3>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Merge_sort_algorithm_diagram.svg/400px-Merge_sort_algorithm_diagram.svg.png\" alt=\"#\">\n<a href=\"https://en.wikipedia.org/wiki/Merge_sort\">(source: Wikipedia, <em>Merge Sort</em>)</a></p>\n<h3><span style=\"color:red;\"> <a id=\"quick-sort\"></a>Quicksort</h3>\n<h3><span style=\"color:red;\"> Definition</h3>\n<ul>\n<li>\n<p>A divide and conquer algorithm</p>\n<ul>\n<li>Partitions entire data set in half by selecting a random pivot element and putting all smaller elements to the left of the element and larger ones to the right.</li>\n<li>It repeats this process on the left side until it is comparing only two elements at which point the left side is sorted.</li>\n<li>When the left side is finished sorting it performs the same operation on the right side.</li>\n</ul>\n</li>\n<li>Computer architecture favors the quicksort process.</li>\n<li>Changes the array in place.</li>\n</ul>\n<h3><span style=\"color:red;\"> What you need to know</h3>\n<ul>\n<li>While it has the same Big O as (or worse in some cases) many other sorting algorithms it is often faster in practice than many other sorting algorithms, such as merge sort.</li>\n</ul>\n<h3><span style=\"color:red;\"> Time Complexity</h3>\n<ul>\n<li>Worst Case: <code>O(n^2)</code></li>\n<li>Average Case: <code>O(n log n)</code></li>\n<li>Best Case: <code>O(n log n)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Space Complexity</h3>\n<ul>\n<li>Worst Case: <code>O(log n)</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Visualization</h3>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/commons/6/6a/Sorting_quicksort_anim.gif\" alt=\"#\">\n<a href=\"https://en.wikipedia.org/wiki/Quicksort\">(source: Wikipedia, <em>Quicksort</em>)</a></p>\n<h3><span style=\"color:red;\"> Merge Sort Vs. Quicksort</h3>\n<ul>\n<li>Quicksort is likely faster in practice, but merge sort is faster on paper.</li>\n<li>Merge Sort divides the set into the smallest possible groups immediately then reconstructs the incrementally as it sorts the groupings.</li>\n<li>Quicksort continually partitions the data set by a pivot, until the set is recursively sorted.</li>\n</ul>\n<h2><a id=\"additional-resources\"></a>Additional Resources</h2>\n<p><a href=\"https://www.khanacademy.org/computing/computer-science/algorithms\">Khan Academy's Algorithm Course</a></p>\n<h3><span style=\"color:red;\"> What is ARIA and when should you use it?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>ARIA stands for \"Accessible Rich Internet Applications\", and is a technical specification created by the World Wide Web Consortium (W3C). Better known as WAI-ARIA, it provides additional HTML attributes in the development of web applications to offer people who use assistive technologies (AT) a more robust and interoperable experience with dynamic components. By providing the component's role, name, and state, AT users can better understand how to interact with the component. WAI-ARIA should only be used when an HTML element equivalent is not available or lacks full browser or AT support. WAI-ARIA's semantic markup coupled with JavaScript works to provide an understandable and interactive experience for people who use AT.\nAn example using ARIA:</p>\n<div\n      role=\"combobox\"\n      aria-expanded=\"false\"\n      aria-owns=\"ex1-grid\"\n      aria-haspopup=\"grid\"\n      id=\"ex1-combobox\">\n...\n</div>\nCredit: W3C's [ARIA 1.1 Combobox with Grid Popup Example](https://w3c.github.io/aria-practices/examples/combobox/aria1.1pattern/grid-combo.html)\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Accessible Rich Internet Applications</li>\n<li>Benefits people who use assistive technologies (AT)</li>\n<li>Provides role, name, and state</li>\n<li>Semantic HTML coupled with JavaScript</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3.org/WAI/standards-guidelines/aria/\">WAI-ARIA Overview</a></li>\n<li><a href=\"https://www.w3.org/TR/wai-aria/\">WAI-ARIA Spec</a></li>\n<li><a href=\"https://youtu.be/4bH57rWPnYo\">ARIA Serious? Eric Eggert presentation</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the minimum recommended ratio of contrast between foreground text and background to comply with WCAG? Why does this matter?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>4.5:1 is the calculated contrast ratio between foreground text and background that is recommended by the Web Content Accessibiity Guidelines (WCAG) success criteria (SC) 1.4.3: Contrast (Minimum). This SC was written by the World Wide Web Consortium (W3C) to ensure that people with low vision or color deficiencies are able to read (perceive) important content on a web page. It goes beyond color choices to ensure text stands out on the background it's placed on.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>At least 4.5:1 contrast ratio between foreground text and background</li>\n<li>Benefits people with low vision or color deficiencies</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.alaskawebdev.com/contact\">Understanding SC 1.4.3</a></li>\n<li><a href=\"https://webaim.org/resources/contrastchecker/\">WebAIM Contrast Checker</a></li>\n<li><a href=\"https://contrast-ratio.com/#\">Contrast Ratio checker</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are some of the tools available to test the accessibility of a website or web application?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>There are multiple tools that can help you to find for accessibility issues in your website or application.\nCheck for issues in your website:</p>\n<ul>\n<li>Lighthouse from Google, it provides an option for accessibility testing, it will check for the compliance of different accessibility standards and give you an score with details on the different issues</li>\n<li>Axe Coconut from DequeLabs, it is a Chrome extension that adds a tab in the Developer tools, it will check for accessibility issues and it will classify them by severity and suggest possible solutions\nCheck for issues in your code: * Jest Axe, you can add unit tests for accessibility * React Axe, test your React application with the axe-core accessibility testing library. Results will show in the Chrome DevTools console. * eslint-plugin-jsx-a11y, pairing this plugin with an editor lint plugin, you can bake accessibility standards into your application in real-time.\nCheck for individual issues: * Color Contrast checkers * Use a screen reader * Use only keyboard to navigate your site</li>\n</ul>\n<details>\n<summary>  See More </summary>   \n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>None of the tools will replace manual testing</li>\n<li>Mention of different ways to test accessibility</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://github.com/nickcolley/jest-axe\">Jest Axe</a></li>\n<li><a href=\"https://www.w3.org/TR/wai-aria/\">eslint-plugin-jsx-a11y</a></li>\n<li><a href=\"https://github.com/dequelabs/react-axe\">React axe</a></li>\n<li><a href=\"http://romeo.elsevier.com/accessibility_checklist/\">Accessibility Checklist</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the Accessibility Tree?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The Accessibility Tree is a structure produced by the browser's Accessibility APIs which provides accessibility information to assistive technologies such as screen readers. It runs parallel to the DOM and is similar to the DOM API, but with much fewer nodes, because a lot of that information is only useful for visual presentation. By writing semantic HTML we can take advantage of this process in creating an accessible experience for our users.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Tree structure exposing information to assistive technologies</li>\n<li>Runs parallel to the DOM</li>\n<li>Semantic HTML is essential in creating accessible experiences</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.smashingmagazine.com/2015/03/web-accessibility-with-accessibility-api/\">Accessibility APIs</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the purpose of the <code>alt</code> attribute on images?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The <code>alt</code> attribute provides alternative information for an image if a user cannot view it. The <code>alt</code> attribute should be used to describe any images except those which only serve a decorative purpose, in which case it should be left empty.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Decorative images should have an empty <code>alt</code> attribute.</li>\n<li>Web crawlers use <code>alt</code> tags to understand image content, so they are considered important for Search Engine Optimization (SEO).</li>\n<li>Put the <code>.</code> at the end of <code>alt</code> tag to improve accessibility.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML\">A good basis for accessibility</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are <code>defer</code> and <code>async</code> attributes on a <code>&#x3C;script></code> tag?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>If neither attribute is present, the script is downloaded and executed synchronously, and will halt parsing of the document until it has finished executing (default behavior). Scripts are downloaded and executed in the order they are encountered.\nThe <code>defer</code> attribute downloads the script while the document is still parsing but waits until the document has finished parsing before executing it, equivalent to executing inside a <code>DOMContentLoaded</code> event listener. <code>defer</code> scripts will execute in order.\nThe <code>async</code> attribute downloads the script during parsing the document but will pause the parser to execute the script before it has fully finished parsing. <code>async</code> scripts will not necessarily execute in order.\nNote: both attributes must only be used if the script has a <code>src</code> attribute (i.e. not an inline script).</p>\n<pre><code class=\"language-html\">&#x3C;script src=\"myscript.js\">&#x3C;/script>\n&#x3C;script src=\"myscript.js\" defer>&#x3C;/script>\n&#x3C;script src=\"myscript.js\" async>&#x3C;/script>\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Placing a <code>defer</code> script in the <code>&#x3C;head></code> allows the browser to download the script while the page is still parsing, and is therefore a better option than placing the script before the end of the body.</li>\n<li>If the scripts rely on each other, use <code>defer</code>.</li>\n<li>If the script is independent, use <code>async</code>.</li>\n<li>Use <code>defer</code> if the DOM must be ready and the contents are not placed within a <code>DOMContentLoaded</code> listener.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html\">async vs defer attributes</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is an <code>async</code> function?</h3>\n<pre><code class=\"language-js\">async function foo() {\n  ...\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>An <code>async</code> function is a function that allows you to pause the function's execution while it waits for (<code>await</code>s) a promise to resolve. It's an abstraction on top of the Promise API that makes asynchronous operations <em>look</em> like they're synchronous.\n<code>async</code> functions automatically return a Promise object. Whatever you <code>return</code> from the <code>async</code> function will be the promise's <em>resolution</em>. If instead you <code>throw</code> from the body of an <code>async</code> function, that will be how your async function <em>rejects</em> the promise it returns.\nMost importantly, <code>async</code> functions are able to use the <code>await</code> keyword in their function body, which <strong>pauses the function</strong> until the operation after the <code>await</code> completes, and allows it to return that operation's result to a variable synchronously.</p>\n<pre><code class=\"language-js\">// Normal promises in regular function:\nfunction foo() {\n  promiseCall().then((result) => {\n    // do something with the result\n  });\n}\n// async functions\nasync function foo() {\n  const result = await promiseCall();\n  // do something with the result\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li><code>async</code> functions are just syntactic sugar on top of Promises.</li>\n<li>They make asynchronous operations look like synchronous operations in your function.</li>\n<li>They implicitly return a promise which resolves to whatever your <code>async</code> function returns, and reject to whatever your <code>async</code> function <code>throw</code>s.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function\">MDN Docs - async function</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await\">MDN Docs - await</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Create a function <code>batches</code> that returns the maximum number of whole batches that can be cooked from a recipe.</h3>\n<pre><code class=\"language-js\">/**\nIt accepts two objects as arguments: the first object is the recipe\nfor the food, while the second object is the available ingredients.\nEach ingredient's value is a number representing how many units there are.\n`batches(recipe, available)`\n*/\n// 0 batches can be made\nbatches(\n  { milk: 100, butter: 50, flour: 5 },\n  { milk: 132, butter: 48, flour: 51 }\n);\nbatches(\n  { milk: 100, flour: 4, sugar: 10, butter: 5 },\n  { milk: 1288, flour: 9, sugar: 95 }\n);\n// 1 batch can be made\nbatches(\n  { milk: 100, butter: 50, cheese: 10 },\n  { milk: 198, butter: 52, cheese: 10 }\n);\n// 2 batches can be made\nbatches(\n  { milk: 2, sugar: 40, butter: 20 },\n  { milk: 5, sugar: 120, butter: 500 }\n);\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>We must have all ingredients of the recipe available, and in quantities that are more than or equal to the number of units required. If just one of the ingredients is not available or lower than needed, we cannot make a single batch.\nUse <code>Object.keys()</code> to return the ingredients of the recipe as an array, then use <code>Array.prototype.map()</code> to map each ingredient to the ratio of available units to the amount required by the recipe. If one of the ingredients required by the recipe is not available at all, the ratio will evaluate to <code>NaN</code>, so the logical OR operator can be used to fallback to <code>0</code> in this case.\nUse the spread <code>...</code> operator to feed the array of all the ingredient ratios into <code>Math.min()</code> to determine the lowest ratio. Passing this entire result into <code>Math.floor()</code> rounds down to return the maximum number of whole batches.</p>\n<pre><code class=\"language-js\">const batches = (recipe, available) =>\n  Math.floor(\n    Math.min(...Object.keys(recipe).map((k) => available[k] / recipe[k] || 0))\n  );\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What is CSS BEM?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The BEM methodology is a naming convention for CSS classes in order to keep CSS more maintainable by defining namespaces to solve scoping issues. BEM stands for Block Element Modifier which is an explanation for its structure. A Block is a standalone component that is reusable across projects and acts as a \"namespace\" for sub components (Elements). Modifiers are used as flags when a Block or Element is in a certain state or is different in structure or style.</p>\n<pre><code class=\"language-{.sourceCode\" data-meta=\".css}\">/* block component */\n.block {\n}\n/* element */\n.block__element {\n}\n/* modifier */\n.block__element--modifier {\n}\n</code></pre>\n<p>Here is an example with the class names on markup:</p>\n<pre><code class=\"language-html\">&#x3C;nav class=\"navbar\">\n  &#x3C;a href=\"/\" class=\"navbar__link navbar__link--active\">&#x3C;/a>\n  &#x3C;a href=\"/\" class=\"navbar__link\">&#x3C;/a>\n  &#x3C;a href=\"/\" class=\"navbar__link\">&#x3C;/a>\n&#x3C;/nav>\n</code></pre>\n<p>In this case, <code>navbar</code> is the Block, <code>navbar__link</code> is an Element that makes no sense outside of the <code>navbar</code> component, and <code>navbar__link--active</code> is a Modifier that indicates a different state for the <code>navbar__link</code> Element.\nSince Modifiers are verbose, many opt to use <code>is-*</code> flags instead as modifiers.</p>\n<pre><code class=\"language-html\">&#x3C;a href=\"/\" class=\"navbar__link is-active\">&#x3C;/a>\n</code></pre>\n<p>These must be chained to the Element and never alone however, or there will be scope issues.</p>\n<pre><code class=\"language-{.sourceCode\" data-meta=\".css}\">.navbar__link.is-active {\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Alternative solutions to scope issues like CSS-in-JS</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://hackernoon.com/writing-clean-and-maintainable-css-using-bem-methodology-1dcbf810a664\">Writing clean and maintainable CSS</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is Big O Notation?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Big O notation is used in Computer Science to describe the time complexity of an algorithm. The best algorithms will execute the fastest and have the simplest complexity.\nAlgorithms don't always perform the same and may vary based on the data they are supplied. While in some cases they will execute quickly, in other cases they will execute slowly, even with the same number of elements to deal with.\nIn these examples, the base time is 1 element = <code>1ms</code>.</p>\n<h3><span style=\"color:red;\"> O(1)</h3>\n<pre><code class=\"language-js\">arr[arr.length - 1];\n</code></pre>\n<ul>\n<li>1000 elements = <code>1ms</code>\nConstant time complexity. No matter how many elements the array has, it will theoretically take (excluding real-world variation) the same amount of time to execute.</li>\n</ul>\n<h3><span style=\"color:red;\"> O(N)</h3>\n<pre><code class=\"language-js\">arr.filter(fn);\n</code></pre>\n<ul>\n<li>1000 elements = <code>1000ms</code>\nLinear time complexity. The execution time will increase linearly with the number of elements the array has. If the array has 1000 elements and the function takes 1ms to execute, 7000 elements will take 7ms to execute. This is because the function must iterate through all elements of the array before returning a result.</li>\n</ul>\n<h3><span style=\"color:red;\"> O([1, N])</h3>\n<pre><code class=\"language-js\">arr.some(fn);\n</code></pre>\n<ul>\n<li>1000 elements = <code>1ms &#x3C;= x &#x3C;= 1000ms</code>\nThe execution time varies depending on the data supplied to the function, it may return very early or very late. The best case here is O(1) and the worst case is O(N).</li>\n</ul>\n<h3><span style=\"color:red;\"> O(NlogN)</h3>\n<pre><code class=\"language-js\">arr.sort(fn);\n</code></pre>\n<ul>\n<li>1000 elements ~= <code>10000ms</code>\nBrowsers usually implement the quicksort algorithm for the <code>sort()</code> method and the average time complexity of quicksort is O(NlgN). This is very efficient for large collections.</li>\n</ul>\n<h3><span style=\"color:red;\"> O(N^2)</h3>\n<pre><code class=\"language-js\">for (let i = 0; i &#x3C; arr.length; i++) {\n  for (let j = 0; j &#x3C; arr.length; j++) {\n    // ...\n  }\n}\n</code></pre>\n<ul>\n<li>1000 elements = <code>1000000ms</code>\nThe execution time rises quadratically with the number of elements. Usually the result of nesting loops.</li>\n</ul>\n<h3><span style=\"color:red;\"> O(N!)</h3>\n<pre><code class=\"language-js\">const permutations = (arr) => {\n  if (arr.length &#x3C;= 2) return arr.length === 2 ? [arr, [arr[1], arr[0]]] : arr;\n  return arr.reduce(\n    (acc, item, i) =>\n      acc.concat(\n        permutations([...arr.slice(0, i), ...arr.slice(i + 1)]).map((val) => [\n          item,\n          ...val,\n        ])\n      ),\n    []\n  );\n};\n</code></pre>\n<ul>\n<li>1000 elements = <code>Infinity</code> (practically) ms\nThe execution time rises extremely fast with even just 1 addition to the array.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Be wary of nesting loops as execution time increases exponentially.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/cesars-tech-insights/big-o-notation-javascript-25c79f50b19b\">Big O Notation in JavaScript</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Create a standalone function <code>bind</code> that is functionally equivalent to the method <code>Function.prototype.bind</code>.</h3>\n<pre><code class=\"language-js\">function example() {\n  console.log(this);\n}\nconst boundExample = bind(example, { a: true });\nboundExample.call({ b: true }); // logs { a: true }\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Return a function that accepts an arbitrary number of arguments by gathering them with the rest <code>...</code> operator. From that function, return the result of calling the <code>fn</code> with <code>Function.prototype.apply</code> to apply the context and the array of arguments to the function.</p>\n<pre><code class=\"language-js\">const bind =\n  (fn, context) =>\n  (...args) =>\n    fn.apply(context, args);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What is the purpose of cache busting and how can you achieve it?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Browsers have a cache to temporarily store files on websites so they don't need to be re-downloaded again when switching between pages or reloading the same page. The server is set up to send headers that tell the browser to store the file for a given amount of time. This greatly increases website speed and preserves bandwidth.\nHowever, it can cause problems when the website has been changed by developers because the user's cache still references old files. This can either leave them with old functionality or break a website if the cached CSS and JavaScript files are referencing elements that no longer exist, have moved or have been renamed.\nCache busting is the process of forcing the browser to download the new files. This is done by naming the file something different to the old file.\nA common technique to force the browser to re-download the file is to append a query string to the end of the file.</p>\n<ul>\n<li><code>src=\"js/script.js\"</code> => <code>src=\"js/script.js?v=2\"</code>\nThe browser considers it a different file but prevents the need to change the file name.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://css-tricks.com/strategies-for-cache-busting-css/\">Strategies for cache-busting CSS</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How can you avoid callback hells?</h3>\n<pre><code class=\"language-js\">getData(function (a) {\n  getMoreData(a, function (b) {\n    getMoreData(b, function (c) {\n      getMoreData(c, function (d) {\n        getMoreData(d, function (e) {\n          // ...\n        });\n      });\n    });\n  });\n});\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Refactoring the functions to return promises and using <code>async/await</code> is usually the best option. Instead of supplying the functions with callbacks that cause deep nesting, they return a promise that can be <code>await</code>ed and will be resolved once the data has arrived, allowing the next line of code to be evaluated in a sync-like fashion.\nThe above code can be restructured like so:</p>\n<pre><code class=\"language-js\">async function asyncAwaitVersion() {\n  const a = await getData();\n  const b = await getMoreData(a);\n  const c = await getMoreData(b);\n  const d = await getMoreData(c);\n  const e = await getMoreData(d);\n  // ...\n}\n</code></pre>\n<p>There are lots of ways to solve the issue of callback hells:</p>\n<ul>\n<li>Modularization: break callbacks into independent functions</li>\n<li>Use a control flow library, like async</li>\n<li>Use generators with Promises</li>\n<li>Use async/await (from v7 on)</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>As an efficient JavaScript developer, you have to avoid the constantly growing indentation level, produce clean and readable code and be able to handle complex flows.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://stackabuse.com/avoiding-callback-hell-in-node-js/\">Avoiding Callback Hell in Node.js</a></li>\n<li><a href=\"https://blog.hellojs.org/asynchronous-javascript-from-callback-hell-to-async-and-await-9b9ceb63c8e8\">Asynchronous JavaScript: From Callback Hell to Async and Await</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the purpose of callback function as an argument of <code>setState</code>?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The callback function is invoked when <code>setState</code> has finished and the component gets rendered. Since <code>setState</code> is asynchronous, the callback function is used for any post action.</p>\n<pre><code class=\"language-js\">setState({ name: \"sudheer\" }, () => {\n  console.log(\"The name has updated and component re-rendered\");\n});\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The callback function is invoked after <code>setState</code> finishes and is used for any post action.</li>\n<li>It is recommended to use lifecycle method rather this callback function.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/react-component.html#setstate\">React docs on <code>setState</code></a></li>\n</ul>\n<h3><span style=\"color:red;\"> Which is the preferred option between callback refs and findDOMNode()?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Callback refs are preferred over the <code>findDOMNode()</code> API, due to the fact that <code>findDOMNode()</code> prevents certain improvements in React in the future.</p>\n<pre><code class=\"language-js\">// Legacy approach using findDOMNode()\nclass MyComponent extends Component {\n  componentDidMount() {\n    findDOMNode(this).scrollIntoView();\n  }\n  render() {\n    return &#x3C;div />;\n  }\n}\n// Recommended approach using callback refs\nclass MyComponent extends Component {\n  componentDidMount() {\n    this.node.scrollIntoView();\n  }\n  render() {\n    return &#x3C;div ref={(node) => (this.node = node)} />;\n  }\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Callback refs are preferred over <code>findDOMNode()</code>.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components\">React docs on Refs and the DOM</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a callback? Can you show an example using one?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Callbacks are functions passed as an argument to another function to be executed once an event has occurred or a certain task is complete, often used in asynchronous code. Callback functions are invoked later by a piece of code but can be declared on initialization without being invoked.\nAs an example, event listeners are asynchronous callbacks that are only executed when a specific event occurs.</p>\n<pre><code class=\"language-js\">function onClick() {\n  console.log(\"The user clicked on the page.\");\n}\ndocument.addEventListener(\"click\", onClick);\n</code></pre>\n<p>However, callbacks can also be synchronous. The following <code>map</code> function takes a callback function that is invoked synchronously for each iteration of the loop (array element).</p>\n<pre><code class=\"language-js\">const map = (arr, callback) => {\n  const result = [];\n  for (let i = 0; i &#x3C; arr.length; i++) {\n    result.push(callback(arr[i], i));\n  }\n  return result;\n};\nmap([1, 2, 3, 4, 5], (n) => n * 2); // [2, 4, 6, 8, 10]\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Functions are first-class objects in JavaScript</li>\n<li>Callbacks vs Promises</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Callback_function\">MDN docs for callbacks</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the <code>children</code> prop?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p><code>children</code> is part of the props object passed to components that allows components to be passed as data to other components, providing the ability to compose components cleanly. There are a number of methods available in the React API to work with this prop, such as <code>React.Children.map</code>, <code>React.Children.forEach</code>, <code>React.Children.count</code>, <code>React.Children.only</code> and <code>React.Children.toArray</code>. A simple usage example of the children prop is as follows:</p>\n<pre><code class=\"language-js\">function GenericBox({ children }) {\n  return &#x3C;div className=\"container\">{children}&#x3C;/div>;\n}\nfunction App() {\n  return (\n    &#x3C;GenericBox>\n      &#x3C;span>Hello&#x3C;/span> &#x3C;span>World&#x3C;/span>\n    &#x3C;/GenericBox>\n  );\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Children is a prop that allows components to be passed as data to other components.</li>\n<li>The React API provides methods to work with this prop.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/jsx-in-depth.html#children-in-jsx\">React docs on Children</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Why does React use <code>className</code> instead of <code>class</code> like in HTML?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>React's philosophy in the beginning was to align with the browser DOM API rather than HTML, since that more closely represents how elements are created. Setting a <code>class</code> on an element meant using the <code>className</code> API:</p>\n<pre><code class=\"language-js\">const element = document.createElement(\"div\");\nelement.className = \"hello\";\n</code></pre>\n<p>Additionally, before ES5, reserved words could not be used in objects:</p>\n<pre><code class=\"language-js\">const element = {\n  attributes: {\n    class: \"hello\",\n  },\n};\n</code></pre>\n<p>In IE8, this will throw an error.\nIn modern environments, destructuring will throw an error if trying to assign to a variable:</p>\n<pre><code class=\"language-js\">const { class } = this.props // Error\nconst { className } = this.props // All good\nconst { class: className } =\n    this.props // All good, but\n        cumbersome!\n</code></pre>\n<p>However, <code>class</code> <em>can</em> be used as a prop without problems, as seen in other libraries like Preact. React currently allows you to use <code>class</code>, but will throw a warning and convert it to <code>className</code> under the hood. There is currently an open thread (as of January 2019) discussing changing <code>className</code> to <code>class</code> to reduce confusion.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> How do you clone an object in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Using the object spread operator <code>...</code>, the object's own enumerable properties can be copied into the new object. This creates a shallow clone of the object.</p>\n<pre><code class=\"language-js\">const obj = { a: 1, b: 2 };\nconst shallowClone = { ...obj };\n</code></pre>\n<p>With this technique, prototypes are ignored. In addition, nested objects are not cloned, but rather their references get copied, so nested objects still refer to the same objects as the original. Deep-cloning is much more complex in order to effectively clone any type of object (Date, RegExp, Function, Set, etc) that may be nested within the object.\nOther alternatives include:</p>\n<ul>\n<li><code>JSON.parse(JSON.stringify(obj))</code> can be used to deep-clone a simple object, but it is CPU-intensive and only accepts valid JSON (therefore it strips functions and does not allow circular references).</li>\n<li><code>Object.assign({}, obj)</code> is another alternative.</li>\n<li><code>Object.keys(obj).reduce((acc, key) => (acc[key] = obj[key], acc), {})</code> is another more verbose alternative that shows the concept in greater depth.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>JavaScript passes objects by reference, meaning that nested objects get their references copied, instead of their values.</li>\n<li>The same method can be used to merge two objects.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\">MDN docs for Object.assign()</a></li>\n<li><a href=\"http://voidcanvas.com/clone-an-object-in-vanilla-js-in-depth/\">Clone an object in vanilla JS</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a closure? Can you give a useful example of one?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A closure is a function defined inside another function and has access to its lexical scope even when it is executing outside its lexical scope. The closure has access to variables in three scopes:</p>\n<ul>\n<li>Variables declared in its own scope</li>\n<li>Variables declared in the scope of the parent function</li>\n<li>Variables declared in the global scope\nIn JavaScript, all functions are closures because they have access to the outer scope, but most functions don't utilise the usefulness of closures: the persistence of state. Closures are also sometimes called stateful functions because of this.\nIn addition, closures are the only way to store private data that can't be accessed from the outside in JavaScript. They are the key to the UMD (Universal Module Definition) pattern, which is frequently used in libraries that only expose a public API but keep the implementation details private, preventing name collisions with other libraries or the user's own code.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Closures are useful because they let you associate data with a function that operates on that data.</li>\n<li>A closure can substitute an object with only a single method.</li>\n<li>Closures can be used to emulate private properties and methods.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures\">MDN docs for closures</a></li>\n<li><a href=\"https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-closure-b2f0d2152b36\">What is a closure</a></li>\n<li><a href=\"https://medium.com/dailyjs/i-never-understood-javascript-closures-9663703368e8\">I never understood JavaScript closures</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How do you compare two objects in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Even though two different objects can have the same properties with equal values, they are not considered equal when compared using <code>==</code> or <code>===</code>. This is because they are being compared by their reference (location in memory), unlike primitive values which are compared by value.\nIn order to test if two objects are equal in structure, a helper function is required. It will iterate through the own properties of each object to test if they have the same values, including nested objects. Optionally, the prototypes of the objects may also be tested for equivalence by passing <code>true</code> as the 3rd argument.\nNote: this technique does not attempt to test equivalence of data structures other than plain objects, arrays, functions, dates and primitive values.</p>\n<pre><code class=\"language-js\">function isDeepEqual(obj1, obj2, testPrototypes = false) {\n  if (obj1 === obj2) {\n    return true;\n  }\n  if (typeof obj1 === \"function\" &#x26;&#x26; typeof obj2 === \"function\") {\n    return obj1.toString() === obj2.toString();\n  }\n  if (obj1 instanceof Date &#x26;&#x26; obj2 instanceof Date) {\n    return obj1.getTime() === obj2.getTime();\n  }\n  if (\n    Object.prototype.toString.call(obj1) !==\n      Object.prototype.toString.call(obj2) ||\n    typeof obj1 !== \"object\"\n  ) {\n    return false;\n  }\n  const prototypesAreEqual = testPrototypes\n    ? isDeepEqual(\n        Object.getPrototypeOf(obj1),\n        Object.getPrototypeOf(obj2),\n        true\n      )\n    : true;\n  const obj1Props = Object.getOwnPropertyNames(obj1);\n  const obj2Props = Object.getOwnPropertyNames(obj2);\n  return (\n    obj1Props.length === obj2Props.length &#x26;&#x26;\n    prototypesAreEqual &#x26;&#x26;\n    obj1Props.every((prop) => isDeepEqual(obj1[prop], obj2[prop]))\n  );\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Primitives like strings and numbers are compared by their value</li>\n<li>Objects on the other hand are compared by their reference (location in memory)</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html\">Object Equality in JavaScript</a></li>\n<li><a href=\"https://30secondsofcode.org/object#equals\">Deep comparison between two values</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is context?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Context provides a way to pass data through the component tree without having to pass props down manually at every level. For example, authenticated user, locale preference, UI theme need to be accessed in the application by many components.</p>\n<pre><code class=\"language-js\">const { Provider, Consumer } = React.createContext(defaultValue);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Context provides a way to pass data through a tree of React components, without having to manually pass props.</li>\n<li>Context is designed to share data that is considered <em>global</em> for a tree of React components.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/context.html\">React docs on Context</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is CORS?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Cross-Origin Resource Sharing or CORS is a mechanism that uses additional HTTP headers to grant a browser permission to access resources from a server at an origin different from the website origin.\nAn example of a cross-origin request is a web application served from <code>http://mydomain.com</code> that uses AJAX to make a request for <code>http://yourdomain.com</code>.\nFor security reasons, browsers restrict cross-origin HTTP requests initiated by JavaScript. <code>XMLHttpRequest</code> and <code>fetch</code> follow the same-origin policy, meaning a web application using those APIs can only request HTTP resources from the same origin the application was accessed, unless the response from the other origin includes the correct CORS headers.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>CORS behavior is not an error,  it's a security mechanism to protect users.</li>\n<li>CORS is designed to prevent a malicious website that a user may unintentionally visit from making a request to a legitimate website to read their personal data or perform actions against their will.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\">MDN docs for CORS</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Describe the layout of the CSS Box Model and briefly describe each component.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p><code>Content</code>: The inner-most part of the box filled with content, such as text, an image, or video player. It has the dimensions <code>content-box width</code> and <code>content-box height</code>.\n<code>Padding</code>: The transparent area surrounding the content. It has dimensions <code>padding-box width</code> and <code>padding-box height</code>.\n<code>Border</code>: The area surrounding the padding (if any) and content. It has dimensions <code>border-box width</code> and <code>border-box height</code>.\n<em>Margin</em>: The transparent outer-most layer that surrounds the border. It separates the element from other elements in the DOM. It has dimensions <code>margin-box width</code> and <code>margin-box height</code>.\n<img src=\"https://www.washington.edu/accesscomputing/webd2/student/unit3/images/boxmodel.gif\" alt=\"alt text\">\nalt text</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>This is a very common question asked during front-end interviews and while it may seem easy, it is critical you know it well!</li>\n<li>Shows a solid understanding of spacing and the DOM</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3schools.com/Css/css_boxmodel.asp\">W3School's CSS Box Model Page</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model\">Mozilla's Intro to the CSS Box Model</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are the advantages of using CSS preprocessors?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>CSS preprocessors add useful functionality that native CSS does not have, and generally make CSS neater and more maintainable by enabling DRY (Don't Repeat Yourself) principles. Their terse syntax for nested selectors cuts down on repeated code. They provide variables for consistent theming (however, CSS variables have largely replaced this functionality) and additional tools like color functions (<code>lighten</code>, <code>darken</code>, <code>transparentize</code>, etc), mixins, and loops that make CSS more like a real programming language and gives the developer more power to generate complex CSS.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>They allow us to write more maintainable and scalable CSS</li>\n<li>Some disadvantages of using CSS preprocessors (setup, re-compilation time can be slow etc.)</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/@garyfagan/css-preprocessors-6f226fa16f27\">CSS Preprocessors</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between '+' and '~' sibling selectors?.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The General Sibling Selector <code>~</code> selects all elements that are siblings of a specified element.\nThe following example selects all <code>&#x3C;p></code> elements that are siblings of <code>&#x3C;div></code> elements:</p>\n<pre><code class=\"language-{.sourceCode\" data-meta=\".css}\">div ~ p {\n  background-color: blue;\n}\n</code></pre>\n<p>The Adjacent Sibling Selector <code>+</code> selects all elements that are the adjacent siblings of a specified element.\nThe following example will select all <code>&#x3C;p></code> elements that are placed immediately after <code>&#x3C;div></code> elements:</p>\n<pre><code class=\"language-{.sourceCode\" data-meta=\".css}\">div + p {\n  background-color: red;\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3schools.com/css/css_combinators.asp\">W3School's CSS Combinators Page</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Combinators_and_multiple_selectors\">Mozilla's Combinators and groups of selectors page</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Can you describe how CSS specificity works?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Assuming the browser has already determined the set of rules for an element, each rule is assigned a matrix of values, which correspond to the following from highest to lowest specificity:</p>\n<ul>\n<li>Inline rules (binary - 1 or 0)</li>\n<li>Number of id selectors</li>\n<li>Number of class, pseudo-class and attribute selectors</li>\n<li>Number of tags and pseudo-element selectors\nWhen two selectors are compared, the comparison is made on a per-column basis (e.g. an id selector will always be higher than any amount of class selectors, as ids have higher specificity than classes). In cases of equal specificity between multiple rules, the rules that comes last in the page's style sheet is deemed more specific and therefore applied to the element.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Specificity matrix: [inline, id, class/pseudo-class/attribute, tag/pseudo-element]</li>\n<li>In cases of equal specificity, last rule is applied</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/\">CSS Specificity</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is debouncing?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Debouncing is a process to add some delay before executing a function. It is commonly used with DOM event listeners to improve the performance of page. It is a technique which allow us to \"group\" multiple sequential calls in a single one. A raw DOM event listeners can easily trigger 20+ events per second. A debounced function will only be called once the delay has passed.</p>\n<pre><code class=\"language-js\">const debounce = (func, delay) => {\n  let debounceTimer;\n  return function () {\n    const context = this;\n    const args = arguments;\n    clearTimeout(debounceTimer);\n    debounceTimer = setTimeout(() => func.apply(context, args), delay);\n  };\n};\nwindow.addEventListere(\n  \"scroll\",\n  debounce(function () {\n    // Do stuff, this function will be called after a delay of 1 second\n  }, 1000)\n);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Common use case is to make API call only when user is finished typing while searching.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://css-tricks.com/debouncing-throttling-explained-examples/\">Debouncing explained</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the DOM?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<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>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The DOM was designed to be independent of any particular programming language, making the structural representation of the document available from a single, consistent API.</li>\n<li>The DOM is constructed progressively in the browser as a page loads, which is why scripts are often placed at the bottom of a page, in the <code>&#x3C;head></code> with a <code>defer</code> attribute, or inside a <code>DOMContentLoaded</code> event listener. Scripts that manipulate DOM nodes should be run after the DOM has been constructed to avoid errors.</li>\n<li><code>document.getElementById()</code> and <code>document.querySelector()</code> are common functions for selecting DOM nodes.</li>\n<li>Setting the <code>innerHTML</code> property to a new value runs the string through the HTML parser, offering an easy way to append dynamic HTML content to a node.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/DOM\">MDN docs for DOM</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between the equality operators <code>==</code> and <code>===</code>?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Triple equals (<code>===</code>) checks for strict equality, which means both the type and value must be the same. Double equals (<code>==</code>) on the other hand first performs type coercion so that both operands are of the same type and then applies strict comparison.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Whenever possible, use triple equals to test equality because loose equality <code>==</code> can have unintuitive results.</li>\n<li>Type coercion means the values are converted into the same type.</li>\n<li>Mention of falsy values and their comparison.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators\">MDN docs for comparison operators</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between an element and a component in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>An element is a plain JavaScript object that represents a DOM node or component. Elements are pure and never mutated, and are cheap to create.\nA component is a function or class. Components can have state and take props as input and return an element tree as output (although they can represent generic containers or wrappers and don't necessarily have to emit DOM). Components can initiate side effects in lifecycle methods (e.g. AJAX requests, DOM mutations, interfacing with 3rd party libraries) and may be expensive to create.</p>\n<pre><code class=\"language-js\">const Component = () => \"Hello\";\nconst componentElement = &#x3C;Component />;\nconst domNodeElement = &#x3C;div />;\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Elements are immutable, plain objects that describe the DOM nodes or components you want to render.</li>\n<li>Components can be either classes or functions, that take props as an input and return an element tree as the output.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/rendering-elements.html\">React docs on Rendering Elements</a></li>\n<li><a href=\"https://reactjs.org/docs/components-and-props.html\">React docs on Components and Props</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between <code>em</code> and <code>rem</code> units?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Both <code>em</code> and <code>rem</code> units are based on the <code>font-size</code> CSS property. The only difference is where they inherit their values from.</p>\n<ul>\n<li><code>em</code> units inherit their value from the <code>font-size</code> of the parent element</li>\n<li><code>rem</code> units inherit their value from the <code>font-size</code> of the root element (<code>html</code>)\nIn most browsers, the <code>font-size</code> of the root element is set to <code>16px</code> by default.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Benefits of using <code>em</code> and <code>rem</code> units</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/code-better/css-units-for-font-size-px-em-rem-79f7e592bb97\">CSS units for font-size: px | em | rem</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are error boundaries in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.\nClass components become error boundaries if they define either (or both) of the lifecycle methods <code>static getDerivedStateFromError()</code> or <code>componentDidCatch().</code></p>\n<pre><code class=\"language-js\">class ErrorBoundary extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = { hasError: false };\n  }\n  // Use componentDidCatch to log the error\n  componentDidCatch(error, info) {\n    // You can also log the error to an error reporting service\n    logErrorToMyService(error, info);\n  }\n  // use getDerivedStateFromError to update state\n  static getDerivedStateFromError(error) {\n    // Display fallback UI\n    return { hasError: true };\n  }\n  render() {\n    if (this.state.hasError) {\n      // You can render any custom fallback UI\n      return &#x3C;h1>Something went wrong.&#x3C;/h1>;\n    }\n    return this.props.children;\n  }\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Error boundaries only catch errors in the components below them in the tree. An error boundary can't catch an error within itself.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<p><a href=\"https://reactjs.org/docs/error-boundaries.html\">https://reactjs.org/docs/error-boundaries.html</a></p>\n<h3><span style=\"color:red;\"> What is event delegation and why is it useful? Can you show an example of how to use it?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Event delegation is a technique of delegating events to a single common ancestor. Due to event bubbling, events \"bubble\" up the DOM tree by executing any handlers progressively on each ancestor element up to the root that may be listening to it.\nDOM events provide useful information about the element that initiated the event via <code>Event.target</code>. This allows the parent element to handle behavior as though the target element was listening to the event, rather than all children of the parent or the parent itself.\nThis provides two main benefits:</p>\n<ul>\n<li>It increases performance and reduces memory consumption by only needing to register a single event listener to handle potentially thousands of elements.</li>\n<li>If elements are dynamically added to the parent, there is no need to register new event listeners for them.\nInstead of:</li>\n</ul>\n<pre><code class=\"language-js\">document.querySelectorAll(\"button\").forEach((button) => {\n  button.addEventListener(\"click\", handleButtonClick);\n});\n</code></pre>\n<p>Event delegation involves using a condition to ensure the child target matches our desired element:</p>\n<pre><code class=\"language-js\">document.addEventListener(\"click\", (e) => {\n  if (e.target.closest(\"button\")) {\n    handleButtonClick();\n  }\n});\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The difference between event bubbling and capturing</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://davidwalsh.name/event-delegate\">Event Delegation</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is event-driven programming?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Event-driven programming is a paradigm that involves building applications that send and receive events. When the program emits events, the program responds by running any callback functions that are registered to that event and context, passing in associated data to the function. With this pattern, events can be emitted into the wild without throwing errors even if no functions are subscribed to it.\nA common example of this is the pattern of elements listening to DOM events such as <code>click</code> and <code>mouseenter</code>, where a callback function is run when the event occurs.</p>\n<pre><code class=\"language-js\">document.addEventListener(\"click\", function (event) {\n  // This callback function is run when the user\n  // clicks on the document.\n});\n</code></pre>\n<p>Without the context of the DOM, the pattern may look like this:</p>\n<pre><code class=\"language-js\">const hub = createEventHub();\nhub.on(\"message\", function (data) {\n  console.log(`${data.username} said ${data.text}`);\n});\nhub.emit(\"message\", {\n  username: \"John\",\n  text: \"Hello?\",\n});\n</code></pre>\n<p>With this implementation, <code>on</code> is the way to <em>subscribe</em> to an event, while <code>emit</code> is the way to <em>publish</em> the event.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Follows a publish-subscribe pattern.</li>\n<li>Responds to events that occur by running any callback functions subscribed to the event.</li>\n<li>Show how to create a simple pub-sub implementation with JavaScript.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Overview_of_Events_and_Handlers\">MDN docs on Events and Handlers</a></li>\n<li><a href=\"https://medium.freecodecamp.org/understanding-node-js-event-driven-architecture-223292fcbc2d\">Understanding Node.js event-driven architecture</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between an expression and a statement in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>There are two main syntactic categories in JavaScript: expressions and statements. A third one is both together, referred to as an expression statement. They are roughly summarized as:</p>\n<ul>\n<li><strong>Expression</strong>: produces a value</li>\n<li><strong>Statement</strong>: performs an action</li>\n<li>\n<p><strong>Expression statement</strong>: produces a value and performs an action\nA general rule of thumb:</p>\n<blockquote>\n<p>If you can print it or assign it to a variable, it's an expression. If you can't, it's a statement.</p>\n</blockquote>\n</li>\n</ul>\n<h3><span style=\"color:red;\"> Statements</h3>\n<pre><code class=\"language-js\">let x = 0;\nfunction declaration() {}\nif (true) {\n}\n</code></pre>\n<p>Statements appear as instructions that do something but don't produce values.</p>\n<pre><code class=\"language-js\">// Assign `x` to the absolute value of `y`.\nvar x;\nif (y >= 0) {\n  x = y;\n} else {\n  x = -y;\n}\n</code></pre>\n<p>The only expression in the above code is <code>y >= 0</code> which produces a value, either <code>true</code> or <code>false</code>. A value is not produced by other parts of the code.</p>\n<h3><span style=\"color:red;\"> Expressions</h3>\n<p>Expressions produce a value. They can be passed around to functions because the interpreter replaces them with the value they resolve to.</p>\n<pre><code class=\"language-js\">5 + 5; // => 10\nlastCharacter(\"input\"); // => \"t\"\ntrue === true; // => true\n</code></pre>\n<h3><span style=\"color:red;\"> Expression statements</h3>\n<p>There is an equivalent version of the set of statements used before as an expression using the conditional operator:</p>\n<pre><code class=\"language-js\">// Assign `x` as the absolute value of `y`.\nvar x = y >= 0 ? y : -y;\n</code></pre>\n<p>This is both an expression and a statement, because we are declaring a variable <code>x</code> (statement) as an evaluation (expression).</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Function declarations vs function expressions</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://stackoverflow.com/questions/12703214/javascript-difference-between-a-statement-and-an-expression\">What is the difference between a statement and an expression?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are truthy and falsy values in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A value is either truthy or falsy depending on how it is evaluated in a Boolean context. Falsy means false-like and truthy means true-like. Essentially, they are values that are coerced to <code>true</code> or <code>false</code> when performing certain operations.\nThere are 6 falsy values in JavaScript. They are:</p>\n<ul>\n<li><code>false</code></li>\n<li><code>undefined</code></li>\n<li><code>null</code></li>\n<li><code>\"\"</code> (empty string)</li>\n<li><code>NaN</code></li>\n<li><code>0</code> (both <code>+0</code> and <code>-0</code>)\nEvery other value is considered truthy.\nA value's truthiness can be examined by passing it into the <code>Boolean</code> function.</li>\n</ul>\n<pre><code class=\"language-js\">Boolean(\"\"); // false\nBoolean([]); // true\n</code></pre>\n<p>There is a shortcut for this using the logical NOT <code>!</code> operator. Using <code>!</code> once will convert a value to its inverse boolean equivalent (i.e. not false is true), and <code>!</code> once more will convert back, thus effectively converting the value to a boolean.</p>\n<pre><code class=\"language-js\">!!\"\"; // false\n!![]; // true\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en/docs/Glossary/Truthy\">Truthy on MDN</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Falsy\">Falsy on MDN</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Generate an array, containing the Fibonacci sequence, up until the nth term.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Initialize an empty array of length <code>n</code>. Use <code>Array.prototype.reduce()</code> to add values into the array, using the sum of the last two values, except for the first two.</p>\n<pre><code class=\"language-js\">const fibonacci = (n) =>\n  [...Array(n)].reduce(\n    (acc, val, i) => acc.concat(i > 1 ? acc[i - 1] + acc[i - 2] : i),\n    []\n  );\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://github.com/Chalarangelo/30-seconds-of-code/blob/master/snippets_archive/fibonacciUntilNum.md\">Similar problem</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Given an array of words, write a method to output matching sets of anagrams.</h3>\n<pre><code class=\"language-js\">const words = [\n  \"rates\",\n  \"rat\",\n  \"stare\",\n  \"taser\",\n  \"tears\",\n  \"art\",\n  \"tabs\",\n  \"tar\",\n  \"bats\",\n  \"state\",\n];\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<pre><code class=\"language-js\">const words = [\n  \"rates\",\n  \"rat\",\n  \"stare\",\n  \"taser\",\n  \"tears\",\n  \"art\",\n  \"tabs\",\n  \"tar\",\n  \"bats\",\n  \"state\",\n];\nfunction anagramGroups(wordAry) {\n  const groupedWords = {};\n  // iterate over each word in the array\n  wordAry.map((word) => {\n    // alphabetize the word and a separate variable\n    alphaWord = word.split(\"\").sort().join(\"\");\n    // if the alphabetize word is already a key, push the actual word value (this is an anagram)\n    if (groupedWords[alphaWord]) {\n      return groupedWords[alphaWord].push(word);\n    }\n    // otherwise add the alphabetize word key and actual word value (may not turn out to be an anagram)\n    groupedWords[alphaWord] = [word];\n  });\n  return groupedWords;\n}\n// call the function and store results in a variable called collectedAnagrams\nconst collectedAnagrams = anagramGroups(words);\n// iterate over groupedAnagrams, printing out group of values\nfor (const sortedWord in collectedAnagrams) {\n  if (collectedAnagrams[sortedWord].length > 1) {\n    console.log(collectedAnagrams[sortedWord].toString());\n  }\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Iterate the array</li>\n<li>Alphabetize each word</li>\n<li>Store alphabetize word as the key value in a groupedWords object with the original word as the value</li>\n<li>Compare alphabetize words to object keys and add additional original words when matches are found</li>\n<li>Iterate over the return object and output the values, when there is more then one. (single values mean no anagram )</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://gist.github.com/tinabme/fe6878f5cff42f60a537262503f9b765\">Find The Anagrams Gist</a></li>\n<li><a href=\"https://www.30secondsofcode.org/snippet/isAnagram\">isAnagram function implementation</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Using flexbox, create a 3-column layout where each column takes up a <code>col-{n} / 12</code> ratio of the container.</h3>\n<pre><code class=\"language-html\">&#x3C;div class=\"row\">\n  &#x3C;div class=\"col-2\">&#x3C;/div>\n  &#x3C;div class=\"col-7\">&#x3C;/div>\n  &#x3C;div class=\"col-3\">&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Set the <code>.row</code> parent to <code>display: flex;</code> and use the <code>flex</code> shorthand property to give the column classes a <code>flex-grow</code> value that corresponds to its ratio value.</p>\n<pre><code class=\"language-{.sourceCode\" data-meta=\".css}\">.row {\n  display: flex;\n}\n.col-2 {\n  flex: 2;\n}\n.col-7 {\n  flex: 7;\n}\n.col-3 {\n  flex: 3;\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox\">MDN docs for basic concepts of flexbox</a></li>\n<li><a href=\"https://css-tricks.com/snippets/css/a-guide-to-flexbox/\">A complete guide to Flexbox</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What does <code>0.1 + 0.2 === 0.3</code> evaluate to?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>It evaluates to <code>false</code> because JavaScript uses the IEEE 754 standard for Math and it makes use of 64-bit floating numbers. This causes precision errors when doing decimal calculations, in short, due to computers working in Base 2 while decimal is Base 10.</p>\n<pre><code class=\"language-js\">0.1 + 0.2; // 0.30000000000000004\n</code></pre>\n<p>A solution to this problem would be to use a function that determines if two numbers are approximately equal by defining an error margin (epsilon) value that the difference between two values should be less than.</p>\n<pre><code class=\"language-js\">const approxEqual = (n1, n2, epsilon = 0.0001) => Math.abs(n1 - n2) &#x3C; epsilon;\napproxEqual(0.1 + 0.2, 0.3); // true\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>A simple solution to this problem</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://github.com/Chalarangelo/30-seconds-of-code#approximatelyequal\">A simple helper function to check equality</a></li>\n<li><a href=\"http://blog.blakesimpson.co.uk/read/61-fix-0-1-0-2-0-300000004-in-javascript\">Fix \"0.1 + 0.2 = 0.300000004\" in JavaScript</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a focus ring? What is the correct solution to handle them?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A focus ring is a visible outline given to focusable elements such as buttons and anchor tags. It varies depending on the vendor, but generally it appears as a blue outline around the element to indicate it is currently focused.\nIn the past, many people specified <code>outline: 0;</code> on the element to remove the focus ring. However, this causes accessibility issues for keyboard users because the focus state may not be clear. When not specified though, it causes an unappealing blue ring to appear around an element.\nIn recent times, frameworks like Bootstrap have opted to use a more appealing <code>box-shadow</code> outline to replace the default focus ring. However, this is still not ideal for mouse users.\nThe best solution is an upcoming pseudo-selector <code>:focus-visible</code> which can be polyfilled today with JavaScript. It will only show a focus ring if the user is using a keyboard and leave it hidden for mouse users. This keeps both aesthetics for mouse use and accessibility for keyboard use.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://css-tricks.com/focus-visible-and-backwards-compatibility/\">:focus-visible</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between the array methods <code>map()</code> and <code>forEach()</code>?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Both methods iterate through the elements of an array. <code>map()</code> maps each element to a new element by invoking the callback function on each element and returning a new array. On the other hand, <code>forEach()</code> invokes the callback function for each element but does not return a new array. <code>forEach()</code> is generally used when causing a side effect on each iteration, whereas <code>map()</code> is a common functional programming technique.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Use <code>forEach()</code> if you need to iterate over an array and cause mutations to the elements without needing to return values to generate a new array.</li>\n<li><code>map()</code> is the right choice to keep data immutable where each value of the original array is mapped to a new array.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\">MDN docs for forEach</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map\">MDN docs for map</a></li>\n<li><a href=\"https://codeburst.io/javascript-map-vs-foreach-f38111822c0f\">JavaScript — Map vs. ForEach</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are fragments?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Fragments allow a React component to return multiple elements without a wrapper, by grouping the children without adding extra elements to the DOM. Fragments offer better performance, lower memory usage, a cleaner DOM and can help in dealing with certain CSS mechanisms (e.g. tables, Flexbox and Grid).</p>\n<pre><code class=\"language-js\">render() {\n  return (\n    &#x3C;React.Fragment>\n      &#x3C;ChildA />\n      &#x3C;ChildB />\n      &#x3C;ChildC />\n    &#x3C;/React.Fragment>\n  );\n}\n// Short syntax supported by Babel 7\nrender() {\n  return (\n    &#x3C;>\n      &#x3C;ChildA />\n      &#x3C;ChildB />\n      &#x3C;ChildC />\n    &#x3C;/>\n  );\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Fragments group multiple elements returned from a component, without adding a DOM element around them.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/fragments.html\">React docs on Fragments</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is functional programming?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<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. Many programmers consider this to be the best approach to software development as it reduces bugs and cognitive load.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Cleaner, more concise development experience</li>\n<li>Simple function composition</li>\n<li>Features of JavaScript that enable functional programming (<code>.map</code>, <code>.reduce</code> etc.)</li>\n<li>JavaScript is multi-paradigm programming language (Object-Oriented Programming and Functional Programming live in harmony)</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://hackernoon.com/javascript-and-functional-programming-an-introduction-286aa625e26d\">Javascript and Functional Programming: An Introduction</a></li>\n<li><a href=\"https://medium.com/javascript-scene/master-the-javascript-interview-what-is-functional-programming-7f218c68b3a0\">Master the JavaScript Interview: What is Functional Programming?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Describe your thoughts on how a single page web app should handle focus when changing routes</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Single page applications make use of client-side rendering. This means that 'examplesite.com' and 'examplesite.com/page2' are actually the same HTML web page, but the client app decides what content to drop into that single page at runtime. Your user never actually \"leaves\" the page, and this causes some accessibility issues in terms of focus.\nUnless focus is explicitly managed in the app, a scenario like this may happen:</p>\n<ol>\n<li>User visits 'examplesite.com'</li>\n<li>User clicks a link to go to another route: 'examplesite.com/product1'</li>\n<li>Client app changes the visible content to show the details for this new route (e.g. some info about Product 1)</li>\n<li>Focus is still on the link that was clicked in step 2</li>\n<li>If a user uses the keyboard or screen reader to now try and read the content, the focused starting point is in the middle of the page on an element no longer visible\nMany strategies have been proposed in handling this situation, all involving explicitly managing the focus when the new page content is rendered. <a href=\"https://www.gatsbyjs.org/blog/2019-07-11-user-testing-accessible-client-routing/\">Recent research by GatsbyJS</a> suggests the best approach is:</li>\n<li>User visits 'examplesite.com'</li>\n<li>User clicks a link to go to another route: 'examplesite.com/product1'</li>\n<li>Client app changes the visible content to show the details for this new route (e.g. some info about Product 1)</li>\n<li>Client app manually places focus on the main header at the top of the page (almost always this will be the H1 element)\nBy doing so, focus is reset to the top of the page, ready for the user to begin exploring the new content. This solution requires inserting the main heading into the start of tabbing order with <code>tabindex=\"-1\"</code>.</li>\n</ol>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Focus issues caused by client-side rendering, instead of server-side</li>\n<li>Focus should not be left on elements no longer visible on the page</li>\n<li>Challenges faced by screen reader users and users utilising keyboard navigation</li>\n<li>Careful manual focus management required</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.upyoura11y.com/handling-focus/\">Handling Focus on Route Change: Up Your A11y</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are higher-order components?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A higher-order component (HOC) is a function that takes a component as an argument and returns a new component. It is a pattern that is derived from React's compositional nature. Higher-order components are like <strong>pure components</strong> because they accept any dynamically provided child component, but they won't modify or copy any behavior from their input components.</p>\n<pre><code class=\"language-js\">const EnhancedComponent = higherOrderComponent(WrappedComponent);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>They can be used for state abstraction and manipulation, props manipulation, render high jacking, etc.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What will the console log in this example?</h3>\n<pre><code class=\"language-js\">var foo = 1;\nvar foobar = function () {\n  console.log(foo);\n  var foo = 2;\n};\nfoobar();\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Due to hoisting, the local variable <code>foo</code> is declared before the <code>console.log</code> method is called. This means the local variable <code>foo</code> is passed as an argument to <code>console.log()</code> instead of the global one declared outside of the function. However, since the value is not hoisted with the variable declaration, the output will be <code>undefined</code>, not <code>2</code>.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Hoisting is JavaScript's default behavior of moving declarations to the top</li>\n<li>Mention of <code>strict</code> mode</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Hoisting\">MDN docs for hoisting</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How does hoisting work in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Hoisting is a JavaScript mechanism where variable and function declarations are put into memory during the compile phase. This means that no matter where functions and variables are declared, they are moved to the top of their scope regardless of whether their scope is global or local.\nHowever, the value is not hoisted with the declaration.\nThe following snippet:</p>\n<pre><code class=\"language-js\">console.log(hoist);\nvar hoist = \"value\";\n</code></pre>\n<p>is equivalent to:</p>\n<pre><code class=\"language-js\">var hoist;\nconsole.log(hoist);\nhoist = \"value\";\n</code></pre>\n<p>Therefore logging <code>hoist</code> outputs <code>undefined</code> to the console, not <code>\"value\"</code>.\nHoisting also allows you to invoke a function declaration before it appears to be declared in a program.</p>\n<pre><code class=\"language-js\">myFunction(); // No error; logs \"hello\"\nfunction myFunction() {\n  console.log(\"hello\");\n}\n</code></pre>\n<p>But be wary of function expressions that are assigned to a variable:</p>\n<pre><code class=\"language-js\">myFunction(); // Error: `myFunction` is not a function\nvar myFunction = function () {\n  console.log(\"hello\");\n};\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Hoisting is JavaScript's default behavior of moving declarations to the top</li>\n<li>Functions declarations are hoisted before variable declarations</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Hoisting\">MDN docs for hoisting</a></li>\n<li><a href=\"https://scotch.io/tutorials/understanding-hoisting-in-javascript\">Understanding Hoisting in JavaScript</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Can a web page contain multiple <code>&#x3C;header></code> elements? What about <code>&#x3C;footer></code> elements?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Yes to both. The W3 documents state that the tags represent the header(<code>&#x3C;header></code>) and footer(<code>&#x3C;footer></code>) areas of their nearest ancestor \"section\". So not only can the page <code>&#x3C;body></code> contain a header and a footer, but so can every <code>&#x3C;article></code> and <code>&#x3C;section></code> element.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>W3 recommends having as many as you want, but only 1 of each for each \"section\" of your page, i.e. body, section etc.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://stackoverflow.com/questions/4837269/html5-using-header-or-footer-tag-twice?utm_medium=organic&#x26;utm_source=google_rich_qa&#x26;utm_campaign=google_rich_qa\">StackOverflow - Using header or footer tag twice</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Discuss the differences between an HTML specification and a browser's implementation thereof.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>HTML specifications such as <code>HTML5</code> define a set of rules that a document must adhere to in order to be \"valid\" according to that specification. In addition, a specification provides instructions on how a browser must interpret and render such a document.\nA browser is said to \"support\" a specification if it handles valid documents according to the rules of the specification. As of yet, no browser supports all aspects of the <code>HTML5</code> specification (although all of the major browser support most of it), and as a result, it is necessary for the developer to confirm whether the aspect they are making use of will be supported by all of the browsers on which they hope to display their content. This is why cross-browser support continues to be a headache for developers, despite the improved specificiations.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li><code>HTML5</code> defines some rules to follow for an invalid <code>HTML5</code> document (i.e., one that contains syntactical errors)</li>\n<li>However, invalid documents may contain anything, so it's impossible for the specification to handle all possibilities comprehensively.</li>\n<li>Thus, many decisions about how to handle malformed documents are left up to the browser.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3.org/TR/html52/\">HTML 5.2 WWW Specifications</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between HTML and React event handling?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>In HTML, the attribute name is in all lowercase and is given a string invoking a function defined somewhere:</p>\n<pre><code class=\"language-html\">&#x3C;button onclick=\"handleClick()\">&#x3C;/button>\n</code></pre>\n<p>In React, the attribute name is camelCase and are passed the function reference inside curly braces:</p>\n<pre><code class=\"language-js\">&#x3C;button onClick={handleClick} />\n</code></pre>\n<p>In HTML, <code>false</code> can be returned to prevent default behavior, whereas in React <code>preventDefault</code> has to be called explicitly.</p>\n<pre><code class=\"language-html\">&#x3C;a href=\"#\" onclick=\"console.log('The link was clicked.'); return false\" />\n</code></pre>\n<pre><code class=\"language-js\">function handleClick(e) {\n  e.preventDefault();\n  console.log(\"The link was clicked.\");\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>HTML uses lowercase, React uses camelCase.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/handling-events.html\">React docs on Handling Events</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are some differences that XHTML has compared to HTML?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Some of the key differences are:</p>\n<ul>\n<li>An XHTML element must have an XHTML <code>&#x3C;DOCTYPE></code></li>\n<li>Attributes values must be enclosed in quotes</li>\n<li>Attribute minimization is forbidden (e.g. one has to use <code>checked=\"checked\"</code> instead of <code>checked</code>)</li>\n<li>Elements must always be properly nested</li>\n<li>Elements must always be closed</li>\n<li>Special characters must be escaped</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Any element can be self-closed</li>\n<li>Tags ands attributes are case-sensitive, usually lowercase</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3schools.com/html/html_xhtml.asp\">W3Schools docs for HTML and XHTML</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Briefly describe the correct usage of the following HTML5 semantic elements: <code>&#x3C;header></code>, <code>&#x3C;article></code>,<code>&#x3C;section></code>, <code>&#x3C;footer></code></h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<ul>\n<li><code>&#x3C;header></code> is used to contain introductory and navigational information about a section of the page. This can include the section heading, the author's name, time and date of publication, table of contents, or other navigational information.</li>\n<li><code>&#x3C;article></code> is meant to house a self-contained composition that can logically be independently recreated outside of the page without losing its meaning. Individual blog posts or news stories are good examples.</li>\n<li><code>&#x3C;section></code> is a flexible container for holding content that shares a common informational theme or purpose.</li>\n<li><code>&#x3C;footer></code> is used to hold information that should appear at the end of a section of content and contain additional information about the section. Author's name, copyright information, and related links are typical examples of such content.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Other semantic elements are <code>&#x3C;form></code> and <code>&#x3C;table></code></li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3schools.com/html/html5_semantic_elements.asp\">HTML 5 Semantic Elements</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is HTML5 Web Storage? Explain <code>localStorage</code> and <code>sessionStorage</code>.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>With HTML5, web pages can store data locally within the user's browser. The data is stored in name/value pairs, and a web page can only access data stored by itself.\n<strong>Differences between <code>localStorage</code> and <code>sessionStorage</code> regarding lifetime:</strong></p>\n<ul>\n<li>Data stored through <code>localStorage</code> is permanent: it does not expire and remains stored on the user's computer until a web app deletes it or the user asks the browser to delete it.</li>\n<li><code>sessionStorage</code> has the same lifetime as the top-level window or browser tab in which the data got stored. When the tab is permanently closed, any data stored through <code>sessionStorage</code> is deleted.\n<strong>Differences between <code>localStorage</code> and <code>sessionStorage</code> regarding storage scope:</strong> Both forms of storage are scoped to the document origin so that documents with different origins will never share the stored objects.</li>\n<li><code>sessionStorage</code> is also scoped on a per-window basis. Two browser tabs with documents from the same origin have separate <code>sessionStorage</code> data.</li>\n<li>Unlike in <code>localStorage</code>, the same scripts from the same origin can't access each other's <code>sessionStorage</code> when opened in different tabs.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Earlier, this was done with cookies.</li>\n<li>The storage limit is far larger (at least 5MB) than with cookies and its faster.</li>\n<li>The data is never transferred to the server and can only be used if the client specifically asks for it.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3schools.com/html/html5_webstorage.asp\">W3Schools - HTML5 Webstorage</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the reason for wrapping the entire contents of a JavaScript source file in a function that is immediately invoked?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>This technique is very common in JavaScript libraries. It creates a closure around the entire contents of the file which creates a private namespace and thereby helps avoid potential name clashes between different JavaScript modules and libraries. The function is immediately invoked so that the namespace (library name) is assigned the return value of the function.</p>\n<pre><code class=\"language-js\">const myLibrary = (function () {\n  var privateVariable = 2;\n  return {\n    publicMethod: () => privateVariable,\n  };\n})();\nprivateVariable; // ReferenceError\nmyLibrary.publicMethod(); // 2\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Used among many popular JavaScript libraries</li>\n<li>Creates a private namespace</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures\">MDN docs for closures</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Explain the differences between imperative and declarative programming.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>These two types of programming can roughly be summarized as:</p>\n<ul>\n<li>Imperative: <strong>how</strong> to achieve something</li>\n<li>Declarative: <strong>what</strong> should be achieved\nA common example of declarative programming is CSS. The developer specifies CSS properties that describe what something should look like rather than how to achieve it. The \"how\" is abstracted away by the browser.\nOn the other hand, imperative programming involves the steps required to achieve something. In JavaScript, the differences can be contrasted like so:</li>\n</ul>\n<h3><span style=\"color:red;\"> Imperative</h3>\n<pre><code class=\"language-js\">const numbers = [1, 2, 3, 4, 5];\nconst numbersDoubled = [];\nfor (let i = 0; i &#x3C; numbers.length; i++) {\n  numbersDoubled[i] = numbers[i] * 2;\n}\n</code></pre>\n<p>We manually loop over the numbers of the array and assign the new index as the number doubled.</p>\n<h3><span style=\"color:red;\"> Declarative</h3>\n<pre><code class=\"language-js\">const numbers = [1, 2, 3, 4, 5];\nconst numbersDoubled = numbers.map((n) => n * 2);\n</code></pre>\n<p>We declare that the new array is mapped to a new one where each value is doubled.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Declarative programming often works with functions and expressions. Imperative programming frequently uses statements and relies on low-level features that cause mutations, while declarative programming has a strong focus on abstraction and purity.</li>\n<li>Declarative programming is more terse and easier to process at a glance.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://codeburst.io/declarative-vs-imperative-programming-a8a7c93d9ad2\">Declarative vs Imperative Programming</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are inline conditional expressions?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Since a JSX element tree is one large expression, you cannot embed statements inside. Conditional expressions act as a replacement for statements to use inside the tree.\nFor example, this won't work:</p>\n<pre><code class=\"language-js\">function App({ messages, isVisible }) {\n  return (\n    &#x3C;div>\n      if (messages.length > 0){\" \"}\n      {&#x3C;h2>You have {messages.length} unread messages.&#x3C;/h2>} else{\" \"}\n      {&#x3C;h2>You have no unread messages.&#x3C;/h2>}\n      if (isVisible) {&#x3C;p>I am visible.&#x3C;/p>}\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<p>Logical AND <code>&#x26;&#x26;</code> and the ternary <code>? :</code> operator replace the <code>if</code>/<code>else</code> statements.</p>\n<pre><code class=\"language-js\">function App({ messages, isVisible }) {\n  return (\n    &#x3C;div>\n      {messages.length > 0 ? (\n        &#x3C;h2>You have {messages.length} unread messages.&#x3C;/h2>\n      ) : (\n        &#x3C;h2>You have no unread messages.&#x3C;/h2>\n      )}\n      {isVisible &#x26;&#x26; &#x3C;p>I am visible.&#x3C;/p>}\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/conditional-rendering.html\">React docs on Conditional Rendering</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a key? What are the benefits of using it in lists?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Keys are a special string attribute that helps React identify which items have been changed, added or removed. They are used when rendering array elements to give them a stable identity. Each element's key must be unique (e.g. IDs from the data or indexes as a last resort).</p>\n<pre><code class=\"language-js\">const todoItems = todos.map((todo) => &#x3C;li key={todo.id}>{todo.text}&#x3C;/li>);\n</code></pre>\n<ul>\n<li>Using indexes as keys is not recommended if the order of items may change, as it might negatively impact performance and may cause issues with component state.</li>\n<li>If you extract list items as a separate component then apply keys on the list component instead of the <code>&#x3C;li></code> tag.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Keys give elements in a collection a stable identity and help React identify changes.</li>\n<li>You should avoid using indexes as keys if the order of items may change.</li>\n<li>You should lift the key up to the component, instead of the <code>&#x3C;li></code> element, if you extract list items as components.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/lists-and-keys.html\">React docs on Lists and Keys</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are landmark roles and how can they be useful?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Landmark roles is a way to identify different sections of a page like the main content or a navigation region. The Landmarks helps assistive technology users to navigate a page, allowing them skip over areas of it.\nFor example,</p>\n<pre><code class=\"language-html\">&#x3C;div id=\"header\" role=\"banner\">Header of the Page&#x3C;/div>\n&#x3C;div id=\"content\" role=\"main\">Main Content Goes Here&#x3C;/div>\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Identify sections of a page</li>\n<li>Assist users in navigating a page</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.washington.edu/accessibility/web/landmarks/\">ARIA Landmark Roles</a></li>\n<li><a href=\"https://www.w3.org/WAI/GL/wiki/Using_ARIA_landmarks_to_identify_regions_of_a_page\">Using ARIA landmarks to identify regions of a page</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between lexical scoping and dynamic scoping?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Lexical scoping refers to when the location of a function's definition determines which variables you have access to. On the other hand, dynamic scoping uses the location of the function's invocation to determine which variables are available.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Lexical scoping is also known as static scoping.</li>\n<li>Lexical scoping in JavaScript allows for the concept of closures.</li>\n<li>Most languages use lexical scoping because it tends to promote source code that is more easily understood.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures\">Mozilla Docs - Closures &#x26; Lexical Scoping</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are the lifecycle methods in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p><code>getDerivedStateFromProps</code>: Executed before rendering on the initial mount and all component updates. Used to update the state based on changes in props over time. Has rare use cases, like tracking component animations during the lifecycle. There are only few cases where this makes sense to use over other lifecycle methods. It expects to return an object that will be the the new state, or null to update nothing. This method does not have access to the component instance either.\n<code>componentDidMount</code>: Executed after first rendering and here all AJAX requests, DOM or state updates, and set up eventListeners should occur.\n<code>shouldComponentUpdate</code>: Determines if the component will be updated or not. By default, it returns true. If you are sure that the component doesn't need to render after state or props are updated, you can return a false value. It is a great place to improve performance as it allows you to prevent a rerender if component receives new prop.\n<code>getSnapshotBeforeUpdate</code>: Invoked right after a component render happens because of an update, before <code>componentDidUpdate</code>. Any value returned from this method will be passed to <code>componentDidUpdate</code>.\n<code>componentDidUpdate</code>: Mostly it is used to update the DOM in response to prop or state changes.\n<code>componentWillUnmount</code>: It will be used to cancel any outgoing network requests, or remove all event listeners associated with the component.\n<code>componentDidCatch</code>: Used in error boundaries, which are components that implement this method. It allows the component to catch JavaScript errors anywhere in the <em>child</em> component tree (below this component), log errors, and display a UI with error information.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What are the different phases of the component lifecycle in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>There are four different phases of component's lifecycle:\n<strong>Initialization</strong>: In this phase, the component prepares setting up the initial state and default props.\n<strong>Mounting</strong>: The react component is ready to mount to the DOM. This phase covers the <code>getDerivedStateFromProps</code> and <code>componentDidMount</code> lifecycle methods.\n<strong>Updating</strong>: In this phase, the component gets updated in two ways, sending the new props and updating the state. This phase covers the <code>getDerivedStateFromProps</code>, <code>shouldComponentUpdate</code>, <code>getSnapshotBeforeUpdate</code> and <code>componentDidUpdate</code> lifecycle methods.\n<strong>Unmounting</strong>: In this last phase, the component is not needed and gets unmounted from the browser DOM. This phase includes the <code>componentWillUnmount</code> lifecycle method.\n<strong>Error Handling</strong>: In this phase, the component is called whenever there's an error during rendering, in a lifecycle method, or in the constructor for any child component. This phase includes the <code>componentDidCatch</code> lifecycle method.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What does lifting state up in React mean?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>When several components need to share the same data, then it is recommended to lift the shared state up to their closest common ancestor. For example, if two child components share the same data, it is recommended to move the shared state to parent instead of maintaining the local state in both child components.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> Create a function that masks a string of characters with <code>#</code> except for the last four (4) characters.</h3>\n<pre><code class=\"language-js\">mask(\"123456789\"); // \"#####6789\"\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<blockquote>\n<p>There are many ways to solve this problem, this is just one one of them.\nUsing <code>String.prototype.slice()</code> we can grab the last 4 characters of the string by passing <code>-4</code> as an argument. Then, using <code>String.prototype.padStart()</code>, we can pad the string to the original length with the repeated mask character.</p>\n</blockquote>\n<pre><code class=\"language-js\">const mask = (str, maskChar = \"#\") =>\n  str.slice(-4).padStart(str.length, maskChar);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Short, one-line functional solutions to problems should be preferred provided they are efficient</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> Can you name the four types of <code>@media</code> properties?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<ul>\n<li><code>all</code>, which applies to all media type devices</li>\n<li><code>print</code>, which only applies to printers</li>\n<li><code>screen</code>, which only applies to screens (desktops, tablets, mobile etc.)</li>\n<li><code>speech</code>, which only applies to screenreaders</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@media\">MDN docs for <code>@media</code> rule</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries\">MDN docs for using media queries</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is memoization?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Memoization is the process of caching the output of function calls so that subsequent calls are faster. Calling the function again with the same input will return the cached output without needing to do the calculation again.\nA basic implementation in JavaScript looks like this:</p>\n<pre><code class=\"language-js\">const memoize = (fn) => {\n  const cache = new Map();\n  return (value) => {\n    const cachedResult = cache.get(value);\n    if (cachedResult !== undefined) return cachedResult;\n    const result = fn(value);\n    cache.set(value, result);\n    return result;\n  };\n};\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The above technique returns a unary function even if the function can take multiple arguments.</li>\n<li>The first function call will be slower than usual because of the overhead created by checking if a cached result exists and setting a result before returning the value.</li>\n<li>Memoization increases performance on subsequent function calls but still needs to do work on the first call.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.sitepoint.com/implementing-memoization-in-javascript/\">Implementing memoization in JavaScript</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How do you ensure methods have the correct <code>this</code> context in React component classes?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>In JavaScript classes, the methods are not bound by default. This means that their <code>this</code> context can be changed (in the case of an event handler, to the element that is listening to the event) and will not refer to the component instance. To solve this, <code>Function.prototype.bind()</code> can be used to enforce the <code>this</code> context as the component instance.</p>\n<pre><code class=\"language-js\">constructor(props) {\n  super(props);\n  this.handleClick = this.handleClick.bind(this);\n}\nhandleClick() {\n  // Perform some logic\n}\n</code></pre>\n<ul>\n<li>The <code>bind</code> approach can be verbose and requires defining a <code>constructor</code>, so the new public class fields syntax is generally preferred:</li>\n</ul>\n<pre><code class=\"language-js\">handleClick = () => {\n  console.log('this is:', this);\n}\nrender() {\n  return (\n    &#x3C;button onClick={this.handleClick}>\n      Click me\n    &#x3C;/button>\n  );\n}\n</code></pre>\n<ul>\n<li>You can also use an inline arrow function, because lexical <code>this</code> (referring to the component instance) is preserved:</li>\n</ul>\n<pre><code class=\"language-js\">&#x3C;button onClick={(e) => this.handleClick(e)}>Click me&#x3C;/button>\n</code></pre>\n<p>Note that extra re-rendering can occur using this technique because a new function reference is created on render, which gets passed down to child components and breaks <code>shouldComponentUpdate</code> / <code>PureComponent</code> shallow equality checks to prevent unnecessary re-renders. In cases where performance is important, it is preferred to go with <code>bind</code> in the constructor, or the public class fields syntax approach, because the function reference remains constant.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>You can either bind methods to the component instance context in the constructor, use public class fields syntax, or use inline arrow functions.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/handling-events.html\">React docs on Handling Events</a></li>\n<li><a href=\"https://reactjs.org/docs/faq-functions.html#how-do-i-bind-a-function-to-a-component-instance\">React docs on Passing Functions to Components</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a MIME type and what is it used for?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p><code>MIME</code> is an acronym for <code>Multi-purpose Internet Mail Extensions</code>. It is used as a standard way of classifying file types over the Internet.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>A <code>MIME type</code> actually has two parts: a type and a subtype that are separated by a slash (/). For example, the <code>MIME type</code> for Microsoft Word files is <code>application/msword</code> (i.e., type is application and the subtype is msword).</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME Type - MDN</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Contrast mutable and immutable values, and mutating vs non-mutating methods.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The two terms can be contrasted as:</p>\n<ul>\n<li>Mutable: subject to change</li>\n<li>Immutable: cannot change\nIn JavaScript, objects are mutable while primitive values are immutable. This means operations performed on objects can change the original reference in some way, while operations performed on a primitive value cannot change the original value.\nAll <code>String.prototype</code> methods do not have an effect on the original string and return a new string. On the other hand, while some methods of <code>Array.prototype</code> do not mutate the original array reference and produce a fresh array, some cause mutations.</li>\n</ul>\n<pre><code class=\"language-js\">const myString = \"hello!\";\nmyString.replace(\"!\", \"\"); // returns a new string, cannot mutate the original value\nconst originalArray = [1, 2, 3];\noriginalArray.push(4); // mutates originalArray, now [1, 2, 3, 4]\noriginalArray.concat(4); // returns a new array, does not mutate the original\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>List of mutating and non-mutating array methods</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://lorenstewart.me/2017/01/22/javascript-array-methods-mutating-vs-non-mutating/\">Mutating vs non-mutating array methods</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the only value not equal to itself in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p><code>NaN</code> (Not-a-Number) is the only value not equal to itself when comparing with any of the comparison operators. <code>NaN</code> is often the result of meaningless math computations, so two <code>NaN</code> values make no sense to be considered equal.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The difference between <code>isNaN()</code> and <code>Number.isNaN()</code></li>\n<li><code>const isNaN = x => x !== x</code></li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\">MDN docs for <code>NaN</code></a></li>\n</ul>\n<h3><span style=\"color:red;\"> NodeJS often uses a callback pattern where if an error is encountered during execution, this error is passed as the first argument to the callback. What are the advantages of this pattern?</h3>\n<pre><code class=\"language-js\">fs.readFile(filePath, function (err, data) {\n  if (err) {\n    // handle the error, the return is important here\n    // so execution stops here\n    return console.log(err);\n  }\n  // use the data object\n  console.log(data);\n});\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Advantages include:</p>\n<ul>\n<li>Not needing to process data if there is no need to even reference it</li>\n<li>Having a consistent API leads to more adoption</li>\n<li>Ability to easily adapt a callback pattern that will lead to more maintainable code\nAs you can see from below example, the callback is called with null as its first argument if there is no error. However, if there is an error, you create an Error object, which then becomes the callback's only parameter. The callback function allows a user to easily know whether or not an error occurred.\nThis practice is also called the <em>Node.js error convention</em>, and this kind of callback implementations are called <em>error-first callbacks</em>.</li>\n</ul>\n<pre><code class=\"language-js\">var isTrue = function (value, callback) {\n  if (value === true) {\n    callback(null, \"Value was true.\");\n  } else {\n    callback(new Error(\"Value is not true!\"));\n  }\n};\nvar callback = function (error, retval) {\n  if (error) {\n    console.log(error);\n    return;\n  }\n  console.log(retval);\n};\nisTrue(false, callback);\nisTrue(true, callback);\n/*\n  { stack: [Getter/Setter],\n    arguments: undefined,\n    type: undefined,\n    message: 'Value is not true!' }\n  Value was true.\n*/\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>This is just a convention. However, you should stick to it.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://fredkschott.com/post/2014/03/understanding-error-first-callbacks-in-node-js/\">The Node.js Way - Understanding Error-First Callbacks</a></li>\n<li><a href=\"https://docs.nodejitsu.com/articles/errors/what-are-the-error-conventions\">What are the error conventions?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the event loop in Node.js?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The event loop handles all async 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.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The event loop allows Node.js to perform non-blocking I/O operations, despite the fact that JavaScript is single-threaded</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/\">Node.js docs on event loop, timers and process.nextTick()</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between <code>null</code> and <code>undefined</code>?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>In JavaScript, two values discretely represent nothing - <code>undefined</code> and <code>null</code>. The concrete difference between them is that <code>null</code> is explicit, while <code>undefined</code> is implicit. When a property does not exist or a variable has not been given a value, the value is <code>undefined</code>. <code>null</code> is set as the value to explicitly indicate \"no value\". In essence, <code>undefined</code> is used when the nothing is not known, and <code>null</code> is used when the nothing is known.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li><code>typeof undefined</code> evaluates to <code>\"undefined\"</code>.</li>\n<li><code>typeof null</code> evaluates <code>\"object\"</code>. However, it is still a primitive value and this is considered an implementation bug in JavaScript.</li>\n<li><code>undefined == null</code> evaluates to <code>true</code>.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\">MDN docs for null</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\">MDN docs for undefined</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Describe the different ways to create an object. When should certain ways be preferred over others?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<h3><span style=\"color:red;\"> Object literal</h3>\n<p>Often used to store one occurrence of data.</p>\n<pre><code class=\"language-js\">const person = {\n  name: \"John\",\n  age: 50,\n  birthday() {\n    this.age++;\n  },\n};\nperson.birthday(); // person.age === 51\n</code></pre>\n<h3><span style=\"color:red;\"> Constructor</h3>\n<p>Often used when you need to create multiple instances of an object, each with their own data that other instances of the class cannot affect. The <code>new</code> operator must be used before invoking the constructor or the global object will be mutated.</p>\n<pre><code class=\"language-js\">function Person(name, age) {\n  this.name = name;\n  this.age = age;\n}\nPerson.prototype.birthday = function () {\n  this.age++;\n};\nconst person1 = new Person(\"John\", 50);\nconst person2 = new Person(\"Sally\", 20);\nperson1.birthday(); // person1.age === 51\nperson2.birthday(); // person2.age === 21\n</code></pre>\n<h3><span style=\"color:red;\"> Factory function</h3>\n<p>Creates a new object similar to a constructor, but can store private data using a closure. There is also no need to use <code>new</code> before invoking the function or the <code>this</code> keyword. Factory functions usually discard the idea of prototypes and keep all properties and methods as own properties of the object.</p>\n<pre><code class=\"language-js\">const createPerson = (name, age) => {\n  const birthday = () => person.age++;\n  const person = { name, age, birthday };\n  return person;\n};\nconst person = createPerson(\"John\", 50);\nperson.birthday(); // person.age === 51\n</code></pre>\n<h3><span style=\"color:red;\"> <code>Object.create()</code></h3>\n<p>Sets the prototype of the newly created object.</p>\n<pre><code class=\"language-js\">const personProto = {\n  birthday() {\n    this.age++;\n  },\n};\nconst person = Object.create(personProto);\nperson.age = 50;\nperson.birthday(); // person.age === 51\n</code></pre>\n<p>A second argument can also be supplied to <code>Object.create()</code> which acts as a descriptor for the new properties to be defined.</p>\n<pre><code class=\"language-js\">Object.create(personProto, {\n  age: {\n    value: 50,\n    writable: true,\n    enumerable: true,\n  },\n});\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Prototypes are objects that other objects inherit properties and methods from.</li>\n<li>Factory functions offer private properties and methods through a closure but increase memory usage as a tradeoff, while classes do not have private properties or methods but reduce memory impact by reusing a single prototype object.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What is the difference between a parameter and an argument?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Parameters are the variable names of the function definition, while arguments are the values given to a function when it is invoked.</p>\n<pre><code class=\"language-js\">function myFunction(parameter1, parameter2) {\n  console.log(arguments[0]); // \"argument1\"\n}\nmyFunction(\"argument1\", \"argument2\");\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li><code>arguments</code> is an array-like object containing information about the arguments supplied to an invoked function.</li>\n<li><code>myFunction.length</code> describes the arity of a function (how many parameters it has, regardless of how many arguments it is supplied).</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> Does JavaScript pass by value or by reference?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>JavaScript always passes by value. However, with objects, the value is a reference to the object.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Difference between pass-by-value and pass-by-reference</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/dailyjs/back-to-roots-javascript-value-vs-reference-8fb69d587a18\">JavaScript Value vs Reference</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How do you pass an argument to an event handler or callback?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>You can use an arrow function to wrap around an event handler and pass arguments, which is equivalent to calling <code>bind</code>:</p>\n<pre><code class=\"language-js\">&#x3C;button onClick={() => this.handleClick(id)} />\n&#x3C;button onClick={this.handleClick.bind(this, id)} />\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/handling-events.html\">React docs on Handling Events</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Create a function <code>pipe</code> that performs left-to-right function composition by returning a function that accepts one argument.</h3>\n<pre><code class=\"language-js\">const square = (v) => v * v;\nconst double = (v) => v * 2;\nconst addOne = (v) => v + 1;\nconst res = pipe(square, double, addOne);\nres(3); // 19; addOne(double(square(3)))\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Gather all supplied arguments using the rest operator <code>...</code> and return a unary function that uses <code>Array.prototype.reduce()</code> to run the value through the series of functions before returning the final value.</p>\n<pre><code class=\"language-js\">const pipe =\n  (...fns) =>\n  (x) =>\n    fns.reduce((v, fn) => fn(v), x);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Function composition is the process of combining two or more functions to produce a new function.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/javascript-scene/master-the-javascript-interview-what-is-function-composition-20dfb109a1a0\">What is function composition?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are portals in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Portal are the recommended way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.</p>\n<pre><code class=\"language-js\">ReactDOM.createPortal(child, container);\n</code></pre>\n<p>The first argument (<code>child</code>) is any renderable React child, such as an element, string, or fragment. The second argument (<code>container</code>) is a DOM element.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/portals.html\">React docs on Portals</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between the postfix <code>i++</code> and prefix <code>++i</code> increment operators?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Both increment the variable value by 1. The difference is what they evaluate to.\nThe postfix increment operator evaluates to the value <em>before</em> it was incremented.</p>\n<pre><code class=\"language-js\">let i = 0;\ni++; // 0\n// i === 1\n</code></pre>\n<p>The prefix increment operator evaluates to the value <em>after</em> it was incremented.</p>\n<pre><code class=\"language-js\">let i = 0;\n++i; // 1\n// i === 1\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> In which states can a Promise be?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A <code>Promise</code> is in one of these states:</p>\n<ul>\n<li>pending: initial state, neither fulfilled nor rejected.</li>\n<li>fulfilled: meaning that the operation completed successfully.</li>\n<li>rejected: meaning that the operation failed.\nA pending promise can either be fulfilled with a value, or rejected with a reason (error). When either of these options happens, the associated handlers queued up by a promise's then method are called.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\">Official Web Docs - Promise</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are Promises?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The <code>Promise</code> object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value. An example can be the following snippet, which after 100ms prints out the result string to the standard output. Also, note the catch, which can be used for error handling. <code>Promise</code>s are chainable.</p>\n<pre><code class=\"language-js\">new Promise((resolve, reject) => {\n  setTimeout(() => {\n    resolve(\"result\");\n  }, 100);\n})\n  .then(console.log)\n  .catch(console.error);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Take a look into the other questions regarding <code>Promise</code>s!</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-promise-27fc71e772618\">Master the JavaScript Interview: What is a Promise?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How to apply prop validation in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>When the application is running in development mode, React will automatically check for all props that we set on components to make sure they are the correct data type. For incorrect data types, it will generate warning messages in the console for development mode. They are stripped in production mode due to their performance impact. Required props are defined with <code>isRequired</code>.\nFor example, we define <code>propTypes</code> for component as below:</p>\n<pre><code class=\"language-js\">import PropTypes from \"prop-types\"\nclass User extends React.Component {\n  static propTypes = {\n    name: PropTypes.string.isRequired,\n    age: PropTypes.number.isRequired\n  }\n  render() {\n    return (\n      &#x3C;h1>Welcome, {this.props.name}&#x3C;/h1>\n      &#x3C;h2>Age, {this.props.age}\n    )\n  }\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>We can define custom <code>propTypes</code></li>\n<li>Using <code>propTypes</code> is not mandatory. However, it is a good practice and can reduce bugs.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> How does prototypal inheritance differ from classical inheritance?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>In the classical inheritance paradigm, object instances inherit their properties and functions from a class, which acts as a blueprint for the object. Object instances are typically created using a constructor and the <code>new</code> keyword.\nIn the prototypal inheritance paradigm, object instances inherit directly from other objects and are typically created using factory functions or <code>Object.create()</code>.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">MDN docs for inheritance and the prototype chain</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a pure function?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A pure function is a function that satisfies these two conditions:</p>\n<ul>\n<li>Given the same input, the function returns the same output.</li>\n<li>The function doesn't cause side effects outside of the function's scope (i.e. mutate data outside the function or data supplied to the function).\nPure functions can mutate local data within the function as long as it satisfies the two conditions above.</li>\n</ul>\n<h3><span style=\"color:red;\"> Pure</h3>\n<pre><code class=\"language-js\">const a = (x, y) => x + y;\nconst b = (arr, value) => arr.concat(value);\nconst c = (arr) => [...arr].sort((a, b) => a - b);\n</code></pre>\n<h3><span style=\"color:red;\"> Impure</h3>\n<pre><code class=\"language-js\">const a = (x, y) => x + y + Math.random();\nconst b = (arr, value) => (arr.push(value), arr);\nconst c = (arr) => arr.sort((a, b) => a - b);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Pure functions are easier to reason about due to their reliability.</li>\n<li>All functions should be pure unless explicitly causing a side effect (i.e. <code>setInnerHTML</code>).</li>\n<li>If a function does not return a value, it is an indication that it is causing side effects.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://www.nicoespeon.com/en/2015/01/pure-functions-javascript/\">Pure functions in JavaScript</a></li>\n</ul>\n<h3><span style=\"color:red;\"> How do you write comments inside a JSX tree in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Comments must be wrapped inside curly braces <code>{}</code> and use the <code>/* */</code> syntax.</p>\n<pre><code class=\"language-jsx\">const tree = (\n  &#x3C;div>\n    {/* Comment */}\n    &#x3C;p>Text&#x3C;/p>\n  &#x3C;/div>\n);\n</code></pre>\n<h3><span style=\"color:red;\"> What is recursion and when is it useful?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<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 data structures that contain nesting where the number of levels deep is unknown.\nFor example, you may have a thread of comments returned from a database that exist in a flat array but need to be nested for display in the UI. Each comment is either a top-level comment (no parent) or is a reply to a parent comment. Comments can be a reply of a reply of a reply… we have no knowledge beforehand the number of levels deep a comment may be. This is where recursion can help.</p>\n<pre><code class=\"language-js\">const nest = (items, id = null, link = \"parent_id\") =>\n  items\n    .filter((item) => item[link] === id)\n    .map((item) => ({ ...item, children: nest(items, item.id) }));\nconst comments = [\n  { id: 1, parent_id: null, text: \"First reply to post.\" },\n  { id: 2, parent_id: 1, text: \"First reply to comment #1.\" },\n  { id: 3, parent_id: 1, text: \"Second reply to comment #1.\" },\n  { id: 4, parent_id: 3, text: \"First reply to comment #3.\" },\n  { id: 5, parent_id: 4, text: \"First reply to comment #4.\" },\n  { id: 6, parent_id: null, text: \"Second reply to post.\" },\n];\nnest(comments);\n/*\n[\n  { id: 1, parent_id: null, text: \"First reply to post.\", children: [...] },\n  { id: 6, parent_id: null, text: \"Second reply to post.\", children: [] }\n]\n*/\n</code></pre>\n<p>In the above example, the base condition is met if <code>filter()</code> returns an empty array. The chained <code>map()</code> won't invoke the callback function which contains the recursive call, thereby breaking the loop.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Recursion is useful when working with data structures containing an unknown number of nested structures.</li>\n<li>Recursion must have a base condition to be met that breaks out of the loop or it will call itself indefinitely.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://softwareengineering.stackexchange.com/questions/25052/in-plain-english-what-is-recursion\">In plain English, what is recursion?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the output of the following code?</h3>\n<pre><code class=\"language-js\">const a = [1, 2, 3];\nconst b = [1, 2, 3];\nconst c = \"1,2,3\";\nconsole.log(a == c);\nconsole.log(a == b);\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The first <code>console.log</code> outputs <code>true</code> because JavaScript's compiler performs type conversion and therefore it compares to strings by their value. On the other hand, the second <code>console.log</code> outputs <code>false</code> because Arrays are Objects and Objects are compared by reference.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>JavaScript performs automatic type conversion</li>\n<li>Objects are compared by reference</li>\n<li>Primitives are compared by value</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/dailyjs/back-to-roots-javascript-value-vs-reference-8fb69d587a18\">JavaScript Value vs Reference</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are refs in React? When should they be used?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Refs provide a way to access DOM nodes or React elements created in the render method. Refs should be used sparringly, but there are some good use cases for refs, such as:</p>\n<ul>\n<li>Managing focus, text selection, or media playback.</li>\n<li>Triggering imperative animations.</li>\n<li>Integrating with third-party DOM libraries.\nRefs are created using <code>React.createRef()</code> method and attached to React elements via the <code>ref</code> attribute. In order to use refs throughout the component, assign the <code>ref</code> to the instance property within the constructor:</li>\n</ul>\n<pre><code class=\"language-js\">class MyComponent extends React.Component {\n  constructor(props) {\n    super(props);\n    this.myRef = React.createRef();\n  }\n  render() {\n    return &#x3C;div ref={this.myRef} />;\n  }\n}\n</code></pre>\n<p>Refs can also be used in functional components with the help of closures.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Refs are used to return a reference to an element.</li>\n<li>Refs shouldn't be overused.</li>\n<li>You can create a ref using <code>React.createRef()</code> and attach to elements via the <code>ref</code> attribute.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/refs-and-the-dom.html\">React docs on Refs and the DOM</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Where and why is the <code>rel=\"noopener\"</code> attribute used?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The <code>rel=\"noopener\"</code> is an attribute used in <code>&#x3C;a></code> elements (hyperlinks). It prevents pages from having a <code>window.opener</code> property, which would otherwise point to the page from where the link was opened and would allow the page opened from the hyperlink to manipulate the page where the hyperlink is.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li><code>rel=\"noopener\"</code> is applied to hyperlinks.</li>\n<li><code>rel=\"noopener\"</code> prevents opened links from manipulating the source page.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developers.google.com/web/tools/lighthouse/audits/noopener\">Open external anchors using rel=\"noopener\"</a></li>\n<li><a href=\"https://mathiasbynens.github.io/rel-noopener/\">About rel=\"noopener\"</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is REST?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>REST (REpresentational State Transfer) is a software design pattern for network architecture. A RESTful web application exposes data in the form of information about its resources.\nGenerally, this concept is used in web applications to manage state. With most applications, there is a common theme of reading, creating, updating, and destroying data. Data is modularized into separate tables like <code>posts</code>, <code>users</code>, <code>comments</code>, and a RESTful API exposes access to this data with:</p>\n<ul>\n<li>An identifier for the resource. This is known as the endpoint or URL for the resource.</li>\n<li>The operation the server should perform on that resource in the form of an HTTP method or verb. The common HTTP methods are GET, POST, PUT, and DELETE.\nHere is an example of the URL and HTTP method with a <code>posts</code> resource:</li>\n<li>Reading: <code>/posts/</code> => GET</li>\n<li>Creating: <code>/posts/new</code> => POST</li>\n<li>Updating: <code>/posts/:id</code> => PUT</li>\n<li>Destroying: <code>/posts/:id</code> => DELETE</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Alternatives to this pattern like GraphQL</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f\">What is REST — A Simple Explanation for Beginners, Part 1: Introduction</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What does the following function return?</h3>\n<pre><code class=\"language-js\">function greet() {\n  return;\n  {\n    message: \"hello\";\n  }\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Because of JavaScript's automatic semicolon insertion (ASI), the compiler places a semicolon after <code>return</code> keyword and therefore it returns <code>undefined</code> without an error being thrown.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Automatic semicolon placement can lead to time-consuming bugs</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://2ality.com/2011/05/semicolon-insertion.html\">Automatic semicolon insertion in JavaScript</a>\n<strong>Folders</strong>\n<a href=\"../right.html\">&#x3C;parent></a>\n| <strong>File</strong>                                                               | <strong>File</strong>                                                                                           | <strong>File</strong>                                                                             | <strong>File</strong>                                                           | <strong>File</strong>                                                                                       | <strong>File</strong>                                                                         |\n| :--------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :----------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------- |\n| <a href=\"accessibility-aria.html\">accessibility-aria.html</a>                     | <a href=\"fibonacci.html\">fibonacci.html</a>                                                                   | <a href=\"object-creation.html\">object-creation.html</a>                                         | <a href=\"accessibility-contrast.md\">accessibility-contrast.md</a>             | <a href=\"fibonacci.md\">fibonacci.md</a>                                                                   | <a href=\"null-vs-undefined.md\">null-vs-undefined.md</a>                                     |\n| <a href=\"accessibility-contrast.html\">accessibility-contrast.html</a>             | <a href=\"find-the-anagrams.html\">find-the-anagrams.html</a>                                                   | <a href=\"parameter-vs-argument.html\">parameter-vs-argument.html</a>                             | <a href=\"accessibility-testing.md\">accessibility-testing.md</a>               | <a href=\"find-the-anagrams.md\">find-the-anagrams.md</a>                                                   | <a href=\"object-creation.md\">object-creation.md</a>                                         |\n| <a href=\"accessibility-testing.html\">accessibility-testing.html</a>               | <a href=\"flex-layout.html\">flex-layout.html</a>                                                               | <a href=\"pass-by-value-reference.html\">pass-by-value-reference.html</a>                         | <a href=\"accessibility-tree.md\">accessibility-tree.md</a>                     | <a href=\"flex-layout.md\">flex-layout.md</a>                                                               | <a href=\"parameter-vs-argument.md\">parameter-vs-argument.md</a>                             |\n| <a href=\"accessibility-tree.html\">accessibility-tree.html</a>                     | <a href=\"floating-point.html\">floating-point.html</a>                                                         | <a href=\"passing-arguments-to-event-handlers.html\">passing-arguments-to-event-handlers.html</a> | <a href=\"alt-attribute.md\">alt-attribute.md</a>                               | <a href=\"floating-point.md\">floating-point.md</a>                                                         | <a href=\"pass-by-value-reference.md\">pass-by-value-reference.md</a>                         |\n| <a href=\"alt-attribute.html\">alt-attribute.html</a>                               | <a href=\"focus-ring.html\">focus-ring.html</a>                                                                 | <a href=\"pipe.html\">pipe.html</a>                                                               | <a href=\"async-defer-attributes.md\">async-defer-attributes.md</a>             | <a href=\"focus-ring.md\">focus-ring.md</a>                                                                 | <a href=\"passing-arguments-to-event-handlers.md\">passing-arguments-to-event-handlers.md</a> |\n| <a href=\"async-defer-attributes.html\">async-defer-attributes.html</a>             | <a href=\"for-each-map.html\">for-each-map.html</a>                                                             | <a href=\"portals.html\">portals.html</a>                                                         | <a href=\"async-functions.md\">async-functions.md</a>                           | <a href=\"for-each-map.md\">for-each-map.md</a>                                                             | <a href=\"pipe.md\">pipe.md</a>                                                               |\n| <a href=\"async-functions.html\">async-functions.html</a>                           | <a href=\"fragments.html\">fragments.html</a>                                                                   | <a href=\"postfix-vs-prefix-increment.html\">postfix-vs-prefix-increment.html</a>                 | <a href=\"batches.md\">batches.md</a>                                           | <a href=\"fragments.md\">fragments.md</a>                                                                   | <a href=\"portals.md\">portals.md</a>                                                         |\n| <a href=\"batches.html\">batches.html</a>                                           | <a href=\"functional-programming.html\">functional-programming.html</a>                                         | <a href=\"promise-states.html\">promise-states.html</a>                                           | <a href=\"bem.md\">bem.md</a>                                                   | <a href=\"functional-programming.md\">functional-programming.md</a>                                         | <a href=\"postfix-vs-prefix-increment.md\">postfix-vs-prefix-increment.md</a>                 |\n| <a href=\"bem.html\">bem.html</a>                                                   | <a href=\"handling-route-changes-in-single-page-apps.html\">handling-route-changes-in-single-page-apps.html</a> | <a href=\"promises.html\">promises.html</a>                                                       | <a href=\"big-o-notation.md\">big-o-notation.md</a>                             | <a href=\"handling-route-changes-in-single-page-apps.md\">handling-route-changes-in-single-page-apps.md</a> | <a href=\"promise-states.md\">promise-states.md</a>                                           |\n| <a href=\"big-o-notation.html\">big-o-notation.html</a>                             | <a href=\"hoc-component.html\">hoc-component.html</a>                                                           | <a href=\"prop-validation.html\">prop-validation.html</a>                                         | <a href=\"bind-function.md\">bind-function.md</a>                               | <a href=\"hoc-component.md\">hoc-component.md</a>                                                           | <a href=\"promises.md\">promises.md</a>                                                       |\n| <a href=\"bind-function.html\">bind-function.html</a>                               | <a href=\"hoisting-example.html\">hoisting-example.html</a>                                                     | <a href=\"prototypal-inheritance.html\">prototypal-inheritance.html</a>                           | <a href=\"cache-busting.md\">cache-busting.md</a>                               | <a href=\"hoisting-example.md\">hoisting-example.md</a>                                                     | <a href=\"prop-validation.md\">prop-validation.md</a>                                         |\n| <a href=\"cache-busting.html\">cache-busting.html</a>                               | <a href=\"hoisting.html\">hoisting.html</a>                                                                     | <a href=\"pure-functions.html\">pure-functions.html</a>                                           | <a href=\"callback-hell.md\">callback-hell.md</a>                               | <a href=\"hoisting.md\">hoisting.md</a>                                                                     | <a href=\"prototypal-inheritance.md\">prototypal-inheritance.md</a>                           |\n| <a href=\"callback-hell.html\">callback-hell.html</a>                               | <a href=\"html-multiple-header-footers.html\">html-multiple-header-footers.html</a>                             | <a href=\"react-comments.html\">react-comments.html</a>                                           | <a href=\"callback-in-setState.md\">callback-in-setState.md</a>                 | <a href=\"html-multiple-header-footers.md\">html-multiple-header-footers.md</a>                             | <a href=\"pure-functions.md\">pure-functions.md</a>                                           |\n| <a href=\"callback-in-setState.html\">callback-in-setState.html</a>                 | <a href=\"html-specification-implementation.html\">html-specification-implementation.html</a>                   | <a href=\"recursion.html\">recursion.html</a>                                                     | <a href=\"callback-refs-vs-finddomnode.md\">callback-refs-vs-finddomnode.md</a> | <a href=\"html-specification-implementation.md\">html-specification-implementation.md</a>                   | <a href=\"react-comments.md\">react-comments.md</a>                                           |\n| <a href=\"callback-refs-vs-finddomnode.html\">callback-refs-vs-finddomnode.html</a> | <a href=\"html-vs-react-event-handling.html\">html-vs-react-event-handling.html</a>                             | <a href=\"reference-example.html\">reference-example.html</a>                                     | <a href=\"callbacks.md\">callbacks.md</a>                                       | <a href=\"html-vs-react-event-handling.md\">html-vs-react-event-handling.md</a>                             | <a href=\"recursion.md\">recursion.md</a>                                                     |\n| <a href=\"callbacks.html\">callbacks.html</a>                                       | <a href=\"html-vs-xhtml.html\">html-vs-xhtml.html</a>                                                           | <a href=\"refs.html\">refs.html</a>                                                               | <a href=\"children-prop.md\">children-prop.md</a>                               | <a href=\"html-vs-xhtml.md\">html-vs-xhtml.md</a>                                                           | <a href=\"reference-example.md\">reference-example.md</a>                                     |\n| <a href=\"children-prop.html\">children-prop.html</a>                               | <a href=\"html5-semantic-elements-usage.html\">html5-semantic-elements-usage.html</a>                           | <a href=\"rel-noopener.html\">rel-noopener.html</a>                                               | <a href=\"class-name.md\">class-name.md</a>                                     | <a href=\"html5-semantic-elements-usage.md\">html5-semantic-elements-usage.md</a>                           | <a href=\"refs.md\">refs.md</a>                                                               |\n| <a href=\"class-name.html\">class-name.html</a>                                     | <a href=\"html5-web-storage.html\">html5-web-storage.html</a>                                                   | <a href=\"rest.html\">rest.html</a>                                                               | <a href=\"clone-object.md\">clone-object.md</a>                                 | <a href=\"html5-web-storage.md\">html5-web-storage.md</a>                                                   | <a href=\"rel-noopener.md\">rel-noopener.md</a>                                               |\n| <a href=\"clone-object.html\">clone-object.html</a>                                 | <a href=\"iife.html\">iife.html</a>                                                                             | <a href=\"return-semicolon.html\">return-semicolon.html</a>                                       | <a href=\"closures.md\">closures.md</a>                                         | <a href=\"iife.md\">iife.md</a>                                                                             | <a href=\"rest.md\">rest.md</a>                                                               |\n| <a href=\"closures.html\">closures.html</a>                                         | <a href=\"imperative-vs-declarative.html\">imperative-vs-declarative.html</a>                                   | <a href=\"right.html\">right.html</a>                                                             | <a href=\"comparing-objects.md\">comparing-objects.md</a>                       | <a href=\"imperative-vs-declarative.md\">imperative-vs-declarative.md</a>                                   | <a href=\"return-semicolon.md\">return-semicolon.md</a>                                       |\n| <a href=\"comparing-objects.html\">comparing-objects.html</a>                       | <a href=\"inline-conditional-expressions.html\">inline-conditional-expressions.html</a>                         | <a href=\"semicolons.html\">semicolons.html</a>                                                   | <a href=\"context.md\">context.md</a>                                           | <a href=\"inline-conditional-expressions.md\">inline-conditional-expressions.md</a>                         | <a href=\"semicolons.md\">semicolons.md</a>                                                   |\n| <a href=\"context.html\">context.html</a>                                           | <a href=\"keys.html\">keys.html</a>                                                                             | <a href=\"short-circuit-evaluation.html\">short-circuit-evaluation.html</a>                       | <a href=\"cors.md\">cors.md</a>                                                 | <a href=\"keys.md\">keys.md</a>                                                                             | <a href=\"short-circuit-evaluation.md\">short-circuit-evaluation.md</a>                       |\n| <a href=\"cors.html\">cors.html</a>                                                 | <a href=\"landmark-roles.html\">landmark-roles.html</a>                                                         | <a href=\"sprites.html\">sprites.html</a>                                                         | <a href=\"css-box-model.md\">css-box-model.md</a>                               | <a href=\"landmark-roles.md\">landmark-roles.md</a>                                                         | <a href=\"sprites.md\">sprites.md</a>                                                         |\n| <a href=\"css-box-model.html\">css-box-model.html</a>                               | <a href=\"lexical-vs-dynamic-scoping.html\">lexical-vs-dynamic-scoping.html</a>                                 | <a href=\"stateful-components.html\">stateful-components.html</a>                                 | <a href=\"css-preprocessors.md\">css-preprocessors.md</a>                       | <a href=\"lexical-vs-dynamic-scoping.md\">lexical-vs-dynamic-scoping.md</a>                                 | <a href=\"stateful-components.md\">stateful-components.md</a>                                 |\n| <a href=\"css-preprocessors.html\">css-preprocessors.html</a>                       | <a href=\"lifecycle-methods.html\">lifecycle-methods.html</a>                                                   | <a href=\"stateless-components.html\">stateless-components.html</a>                               | <a href=\"css-sibling-selectors.md\">css-sibling-selectors.md</a>               | <a href=\"lifecycle-methods.md\">lifecycle-methods.md</a>                                                   | <a href=\"stateless-components.md\">stateless-components.md</a>                               |\n| <a href=\"css-sibling-selectors.html\">css-sibling-selectors.html</a>               | <a href=\"lifecycle.html\">lifecycle.html</a>                                                                   | <a href=\"static-vs-instance-method.html\">static-vs-instance-method.html</a>                     | <a href=\"css-specificity.md\">css-specificity.md</a>                           | <a href=\"lifecycle.md\">lifecycle.md</a>                                                                   | <a href=\"static-vs-instance-method.md\">static-vs-instance-method.md</a>                     |\n| <a href=\"css-specificity.html\">css-specificity.html</a>                           | <a href=\"lift-state.html\">lift-state.html</a>                                                                 | <a href=\"sync-vs-async.html\">sync-vs-async.html</a>                                             | <a href=\"debouncing.md\">debouncing.md</a>                                     | <a href=\"lift-state.md\">lift-state.md</a>                                                                 | <a href=\"sync-vs-async.md\">sync-vs-async.md</a>                                             |\n| <a href=\"debouncing.html\">debouncing.html</a>                                     | <a href=\"mask.html\">mask.html</a>                                                                             | <a href=\"this.html\">this.html</a>                                                               | <a href=\"dom.md\">dom.md</a>                                                   | <a href=\"mask.md\">mask.md</a>                                                                             | <a href=\"this.md\">this.md</a>                                                               |\n| <a href=\"dom.html\">dom.html</a>                                                   | <a href=\"media-properties.html\">media-properties.html</a>                                                     | <a href=\"typeof-typeof.html\">typeof-typeof.html</a>                                             | <a href=\"double-vs-triple-equals.md\">double-vs-triple-equals.md</a>           | <a href=\"media-properties.md\">media-properties.md</a>                                                     | <a href=\"typeof-typeof.md\">typeof-typeof.md</a>                                             |\n| <a href=\"double-vs-triple-equals.html\">double-vs-triple-equals.html</a>           | <a href=\"memoize.html\">memoize.html</a>                                                                       | <a href=\"types.html\">types.html</a>                                                             | <a href=\"element-vs-component.md\">element-vs-component.md</a>                 | <a href=\"memoize.md\">memoize.md</a>                                                                       | <a href=\"types.md\">types.md</a>                                                             |\n| <a href=\"element-vs-component.html\">element-vs-component.html</a>                 | <a href=\"methods-context-react-classes.html\">methods-context-react-classes.html</a>                           | <a href=\"ui-library-framework-purpose.html\">ui-library-framework-purpose.html</a>               | <a href=\"em-rem-difference.md\">em-rem-difference.md</a>                       | <a href=\"methods-context-react-classes.md\">methods-context-react-classes.md</a>                           | <a href=\"ui-library-framework-purpose.md\">ui-library-framework-purpose.md</a>               |\n| <a href=\"em-rem-difference.html\">em-rem-difference.html</a>                       | <a href=\"mime.html\">mime.html</a>                                                                             | <a href=\"use-strict.html\">use-strict.html</a>                                                   | <a href=\"error-boundaries.md\">error-boundaries.md</a>                         | <a href=\"mime.md\">mime.md</a>                                                                             | <a href=\"use-strict.md\">use-strict.md</a>                                                   |\n| <a href=\"error-boundaries.html\">error-boundaries.html</a>                         | <a href=\"mutable-vs-immutable.html\">mutable-vs-immutable.html</a>                                             | <a href=\"var-let-const.html\">var-let-const.html</a>                                             | <a href=\"event-delegation.md\">event-delegation.md</a>                         | <a href=\"mutable-vs-immutable.md\">mutable-vs-immutable.md</a>                                             | <a href=\"var-let-const.md\">var-let-const.md</a>                                             |\n| <a href=\"event-delegation.html\">event-delegation.html</a>                         | <a href=\"nan.html\">nan.html</a>                                                                               | <a href=\"virtual-dom.html\">virtual-dom.html</a>                                                 | <a href=\"event-driven-programming.md\">event-driven-programming.md</a>         | <a href=\"nan.md\">nan.md</a>                                                                               | <a href=\"virtual-dom.md\">virtual-dom.md</a>                                                 |\n| <a href=\"event-driven-programming.html\">event-driven-programming.html</a>         | <a href=\"node-error-first-callback.html\">node-error-first-callback.html</a>                                   | <a href=\"wcag.html\">wcag.html</a>                                                               | <a href=\"expression-vs-statement.md\">expression-vs-statement.md</a>           | <a href=\"node-error-first-callback.md\">node-error-first-callback.md</a>                                   | <a href=\"wcag.md\">wcag.md</a>                                                               |\n| <a href=\"expression-vs-statement.html\">expression-vs-statement.html</a>           | <a href=\"node-event-loop.html\">node-event-loop.html</a>                                                       | <a href=\"xss.html\">xss.html</a>                                                                 | <a href=\"falsy-truthy.md\">falsy-truthy.md</a>                                 | <a href=\"node-event-loop.md\">node-event-loop.md</a>                                                       | <a href=\"xss.md\">xss.md</a>                                                                 |\n| <a href=\"falsy-truthy.html\">falsy-truthy.html</a>                                 | <a href=\"null-vs-undefined.html\">null-vs-undefined.html</a>                                                   | <a href=\"accessibility-aria.md\">accessibility-aria.md</a>                                       |                                                                    |                                                                                                |                                                                                  |\nFolders: 1\nFiles: 219\nSize of all files: 461594 K</li>\n</ul>\n<h3><span style=\"color:red;\"> Are semicolons required in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Sometimes. Due to JavaScript's automatic semicolon insertion, the interpreter places semicolons after most statements. This means semicolons can be omitted in most cases.\nHowever, there are some cases where they are required. They are not required at the beginning of a block, but are if they follow a line and:</p>\n<ol>\n<li>The line starts with <code>[</code></li>\n</ol>\n<pre><code class=\"language-js\">const previousLine = 3;\n[1, 2, previousLine].map((n) => n * 2);\n</code></pre>\n<ol>\n<li>The line starts with <code>(</code></li>\n</ol>\n<pre><code class=\"language-js\">const previousLine = 3;\n(function () {\n  // ...\n})();\n</code></pre>\n<p>In the above cases, the interpreter does not insert a semicolon after <code>3</code>, and therefore it will see the <code>3</code> as attempting object property access or being invoked as a function, which will throw errors.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Semicolons are usually optional in JavaScript but have edge cases where they are required.</li>\n<li>If you don't use semicolons, tools like Prettier will insert semicolons for you in the places where they are required on save in a text editor to prevent errors.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What is short-circuit evaluation in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Short-circuit evaluation involves logical operations evaluating from left-to-right and stopping early.</p>\n<pre><code class=\"language-js\">true || false;\n</code></pre>\n<p>In the above sample using logical OR, JavaScript won't look at the second operand <code>false</code>, because the expression evaluates to <code>true</code> regardless. This is known as short-circuit evaluation.\nThis also works for logical AND.</p>\n<pre><code class=\"language-js\">false &#x26;&#x26; true;\n</code></pre>\n<p>This means you can have an expression that throws an error if evaluated, and it won't cause issues.</p>\n<pre><code class=\"language-js\">true || nonexistentFunction();\nfalse &#x26;&#x26; nonexistentFunction();\n</code></pre>\n<p>This remains true for multiple operations because of left-to-right evaluation.</p>\n<pre><code class=\"language-js\">true || nonexistentFunction() || window.nothing.wouldThrowError;\ntrue || window.nothing.wouldThrowError;\ntrue;\n</code></pre>\n<p>A common use case for this behavior is setting default values. If the first operand is falsy the second operand will be evaluated.</p>\n<pre><code class=\"language-js\">const options = {};\nconst setting = options.setting || \"default\";\nsetting; // \"default\"\n</code></pre>\n<p>Another common use case is only evaluating an expression if the first operand is truthy.</p>\n<pre><code class=\"language-js\">// Instead of:\naddEventListener(\"click\", (e) => {\n  if (e.target.closest(\"button\")) {\n    handleButtonClick(e);\n  }\n});\n// You can take advantage of short-circuit evaluation:\naddEventListener(\n  \"click\",\n  (e) => e.target.closest(\"button\") &#x26;&#x26; handleButtonClick(e)\n);\n</code></pre>\n<p>In the above case, if <code>e.target</code> is not or does not contain an element matching the <code>\"button\"</code> selector, the function will not be called. This is because the first operand will be falsy, causing the second operand to not be evaluated.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Logical operations do not produce a boolean unless the operand(s) evaluate to a boolean.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://codeburst.io/javascript-what-is-short-circuit-evaluation-ff22b2f5608c\">JavaScript: What is short-circuit evaluation?</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are the advantages of using CSS sprites and how are they utilized?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>CSS sprites combine multiple images into one image, limiting the number of HTTP requests a browser has to make, thus improving load times. Even under the new HTTP/2 protocol, this remains true.\nUnder HTTP/1.1, at most one request is allowed per TCP connection. With HTTP/1.1, modern browsers open multiple parallel connections (between 2 to 8) but it is limited. With HTTP/2, all requests between the browser and the server are multiplexed on a single TCP connection. This means the cost of opening and closing multiple connections is mitigated, resulting in a better usage of the TCP connection and limits the impact of latency between the client and server. It could then become possible to load tens of images in parallel on the same TCP connection.\nHowever, according to <a href=\"https://blog.octo.com/en/http2-arrives-but-sprite-sets-aint-no-dead/\">benchmark results</a>, although HTTP/2 offers 50% improvement over HTTP/1.1, in most cases the sprite set is still faster to load than individual images.\nTo utilize a spritesheet in CSS, one would use certain properties, such as <code>background-image</code>, <code>background-position</code> and <code>background-size</code> to ultimately alter the <code>background</code> of an element.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li><code>background-image</code>, <code>background-position</code> and <code>background-size</code> can be used to utilize a spritesheet.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://css-tricks.com/css-sprites/\">CSS Sprites explained by CSS Tricks</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a stateful component in React?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A stateful component is a component whose behavior depends on its state. This means that two separate instances of the component if given the same props will not necessarily render the same output, unlike pure function components.</p>\n<pre><code class=\"language-js\">// Stateful class component\nclass App extends Component {\n  constructor(props) {\n    super(props);\n    this.state = { count: 0 };\n  }\n  render() {\n    // ...\n  }\n}\n// Stateful function component\nfunction App() {\n  const [count, setCount] = useState(0);\n  return; // ...\n}\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Stateful components have internal state that they depend on.</li>\n<li>Stateful components are class components or function components that use stateful Hooks.</li>\n<li>Stateful components have their state initialized in the constructor or with <code>useState()</code>.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/state-and-lifecycle.html\">React docs on State and Lifecycle</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a stateless component?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>A stateless component is a component whose behavior does not depend on its state. Stateless components can be either functional or class components. Stateless functional components are easier to maintain and test since they are guaranteed to produce the same output given the same props. Stateless functional components should be preferred when lifecycle hooks don't need to be used.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Stateless components are independent of their state.</li>\n<li>Stateless components can be either class or functional components.</li>\n<li>Stateless functional components avoid the <code>this</code> keyword altogether.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://reactjs.org/docs/state-and-lifecycle.html\">React docs on State and Lifecycle</a></li>\n</ul>\n<h3><span style=\"color:red;\"> Explain the difference between a static method and an instance method.</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Static methods belong to a class and don't act on instances, while instance methods belong to the class prototype which is inherited by all instances of the class and acts on them.</p>\n<pre><code class=\"language-js\">Array.isArray; // static method of Array\nArray.prototype.push; // instance method of Array\n</code></pre>\n<p>In this case, the <code>Array.isArray</code> method does not make sense as an instance method of arrays because we already know the value is an array when working with it.\nInstance methods could technically work as static methods, but provide terser syntax:</p>\n<pre><code class=\"language-js\">const arr = [1, 2, 3];\narr.push(4);\nArray.push(arr, 4);\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>How to create static and instance methods with ES2015 class syntax</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\">Classes on MDN</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the difference between synchronous and asynchronous code in JavaScript?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Synchronous means each operation must wait for the previous one to complete.\nAsynchronous means an operation can occur while another operation is still being processed.\nIn JavaScript, all code is synchronous due to the single-threaded nature of it. However, asynchronous operations not part of the program (such as <code>XMLHttpRequest</code> or <code>setTimeout</code>) are processed outside of the main thread because they are controlled by native code (browser APIs), but callbacks part of the program will still be executed synchronously.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>JavaScript has a concurrency model based on an \"event loop\".</li>\n<li>Functions like <code>alert</code> block the main thread so that no user input is registered until the user closes it.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<h3><span style=\"color:red;\"> What is the <code>this</code> keyword and how does it work?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The <code>this</code> keyword is an object that represents the context of an executing function. Regular functions can have their <code>this</code> value changed with the methods <code>call()</code>, <code>apply()</code> and <code>bind()</code>. Arrow functions implicitly bind <code>this</code> so that it refers to the context of its lexical environment, regardless of whether or not its context is set explicitly with <code>call()</code>.\nHere are some common examples of how <code>this</code> works:</p>\n<h3><span style=\"color:red;\"> Object literals</h3>\n<p><code>this</code> refers to the object itself inside regular functions if the object precedes the invocation of the function.\nProperties set as <code>this</code> do not refer to the object.</p>\n<pre><code class=\"language-js\">var myObject = {\n  property: this,\n  regularFunction: function () {\n    return this;\n  },\n  arrowFunction: () => {\n    return this;\n  },\n  iife: (function () {\n    return this;\n  })(),\n};\nmyObject.regularFunction(); // myObject\nmyObject[\"regularFunction\"](); // my Object\nmyObject.property; // NOT myObject; lexical `this`\nmyObject.arrowFunction(); // NOT myObject; lexical `this`\nmyObject.iife; // NOT myObject; lexical `this`\nconst regularFunction = myObject.regularFunction;\nregularFunction(); // NOT myObject; lexical `this`\n</code></pre>\n<h3><span style=\"color:red;\"> Event listeners</h3>\n<p><code>this</code> refers to the element listening to the event.</p>\n<pre><code class=\"language-js\">document.body.addEventListener(\"click\", function () {\n  console.log(this); // document.body\n});\n</code></pre>\n<h3><span style=\"color:red;\"> Constructors</h3>\n<p><code>this</code> refers to the newly created object.</p>\n<pre><code class=\"language-js\">class Example {\n  constructor() {\n    console.log(this); // myExample\n  }\n}\nconst myExample = new Example();\n</code></pre>\n<h3><span style=\"color:red;\"> Manual</h3>\n<p>With <code>call()</code> and <code>apply()</code>, <code>this</code> refers to the object passed as the first argument.</p>\n<pre><code class=\"language-js\">var myFunction = function () {\n  return this;\n};\nmyFunction.call({ customThis: true }); // { customThis: true }\n</code></pre>\n<h3><span style=\"color:red;\"> Unwanted <code>this</code></h3>\n<p>Because <code>this</code> can change depending on the scope, it can have unexpected values when using regular functions.</p>\n<pre><code class=\"language-js\">var obj = {\n  arr: [1, 2, 3],\n  doubleArr() {\n    return this.arr.map(function (value) {\n      // this is now this.arr\n      return this.double(value);\n    });\n  },\n  double() {\n    return value * 2;\n  },\n};\nobj.doubleArr(); // Uncaught TypeError: this.double is not a function\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>In non-strict mode, global <code>this</code> is the global object (<code>window</code> in browsers), while in strict mode global <code>this</code> is <code>undefined</code>.</li>\n<li><code>Function.prototype.call</code> and <code>Function.prototype.apply</code> set the <code>this</code> context of an executing function as the first argument, with <code>call</code> accepting a variadic number of arguments thereafter, and <code>apply</code> accepting an array as the second argument which are fed to the function in a variadic manner.</li>\n<li><code>Function.prototype.bind</code> returns a new function that enforces the <code>this</code> context as the first argument which cannot be changed by other functions.</li>\n<li>If a function requires its <code>this</code> context to be changed based on how it is called, you must use the <code>function</code> keyword. Use arrow functions when you want <code>this</code> to be the surrounding (lexical) context.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this\"><code>this</code> on MDN</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What does the following code evaluate to?</h3>\n<pre><code class=\"language-js\">typeof typeof 0;\n</code></pre>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>It evaluates to <code>\"string\"</code>.\n<code>typeof 0</code> evaluates to the string <code>\"number\"</code> and therefore <code>typeof \"number\"</code> evaluates to <code>\"string\"</code>.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof\">MDN docs for typeof</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are JavaScript data types?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The latest ECMAScript standard defines seven data types, six of them being primitive: <code>Boolean</code>, <code>Null</code>, <code>Undefined</code>, <code>Number</code>, <code>String</code>, <code>Symbol</code> and one non-primitive data type: <code>Object</code>.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Mention of newly added <code>Symbol</code> data type</li>\n<li><code>Array</code>, <code>Date</code> and <code>function</code> are all of type <code>object</code></li>\n<li>Functions in JavaScript are objects with the capability of being callable</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures\">MDN docs for data types and data structures</a></li>\n<li><a href=\"https://www.digitalocean.com/community/tutorials/understanding-data-types-in-javascript\">Understanding Data Types in JavaScript</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is the purpose of JavaScript UI libraries/frameworks like React, Vue, Angular, Hyperapp, etc?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The main purpose is to avoid manipulating the DOM directly and keep the state of an application in sync with the UI easily. Additionally, they provide the ability to create components that can be reused when they have similar functionality with minor differences, avoiding duplication which would require multiple changes whenever the structure of a component which is reused in multiple places needs to be updated.\nWhen working with DOM manipulation libraries like jQuery, the data of an application is generally kept in the DOM itself, often as class names or <code>data</code> attributes. Manipulating the DOM to update the UI involves many extra steps and can introduce subtle bugs over time. Keeping the state separate and letting a framework handle the UI updates when the state changes reduces cognitive load. Saying you want the UI to look a certain way when the state is a certain value is the declarative way of creating an application, instead of the imperative way of manually updating the UI to reflect the new state.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>The virtual DOM is a representation of the real DOM tree in the form of plain objects, which allows a library to write code as if the entire document is thrown away and rebuilt on each change, while the real DOM only updates what needs to be changed. Comparing the new virtual DOM against the previous one leads to high efficiency as changing real DOM nodes is costly compared to recalculating the virtual DOM.</li>\n<li>JSX is an extension to JavaScript that provides XML-like syntax to create virtual DOM objects which is transformed to function calls by a transpiler. It simplifies control flow (if statements/ternary expressions) compared to tagged template literals.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://github.com/hyperapp/hyperapp#view\">Virtual DOM in Hyperapp</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What does <code>'use strict'</code> do and what are some of the key benefits to using it?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>Including <code>'use strict'</code> at the beginning of your JavaScript source file enables strict mode, which enforces more strict parsing and error handling of JavaScript code. It is considered a good practice and offers a lot of benefits, such as:</p>\n<ul>\n<li>Easier debugging due to eliminating silent errors.</li>\n<li>Disallows variable redefinition.</li>\n<li>Prevents accidental global variables.</li>\n<li>Oftentimes provides increased performance over identical code that is not running in strict mode.</li>\n<li>Simplifies <code>eval()</code> and <code>arguments</code>.</li>\n<li>Helps make JavaScript more secure.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Eliminates <code>this</code> coercion, throwing an error when <code>this</code> references a value of <code>null</code> or <code>undefined</code>.</li>\n<li>Throws an error on invalid usage of <code>delete</code>.</li>\n<li>Prohibits some syntax likely to be defined in future versions of ECMAScript</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode\">MDN docs for strict mode</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What are the differences between <code>var</code>, <code>let</code>, <code>const</code> and no keyword statements?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<h3><span style=\"color:red;\"> No keyword</h3>\n<p>When no keyword exists before a variable assignment, it is either assigning a global variable if one does not exist, or reassigns an already declared variable. In non-strict mode, if the variable has not yet been declared, it will assign the variable as a property of the global object (<code>window</code> in browsers). In strict mode, it will throw an error to prevent unwanted global variables from being created.</p>\n<h3><span style=\"color:red;\"> var</h3>\n<p><code>var</code> was the default statement to declare a variable until ES2015. It creates a function-scoped variable that can be reassigned and redeclared. However, due to its lack of block scoping, it can cause issues if the variable is being reused in a loop that contains an asynchronous callback because the variable will continue to exist outside of the block scope.\nBelow, by the time the the <code>setTimeout</code> callback executes, the loop has already finished and the <code>i</code> variable is <code>10</code>, so all ten callbacks reference the same variable available in the function scope.</p>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 10; i++) {\n  setTimeout(() => {\n    // logs `10` ten times\n    console.log(i);\n  });\n}\n/* Solutions with `var` */\nfor (var i = 0; i &#x3C; 10; i++) {\n  // Passed as an argument will use the value as-is in\n  // that point in time\n  setTimeout(console.log, 0, i);\n}\nfor (var i = 0; i &#x3C; 10; i++) {\n  // Create a new function scope that will use the value\n  // as-is in that point in time\n  ((i) => {\n    setTimeout(() => {\n      console.log(i);\n    });\n  })(i);\n}\n</code></pre>\n<h3><span style=\"color:red;\"> let</h3>\n<p><code>let</code> was introduced in ES2015 and is the new preferred way to declare variables that will be reassigned later. Trying to redeclare a variable again will throw an error. It is block-scoped so that using it in a loop will keep it scoped to the iteration.</p>\n<pre><code class=\"language-js\">for (let i = 0; i &#x3C; 10; i++) {\n  setTimeout(() => {\n    // logs 0, 1, 2, 3, ...\n    console.log(i);\n  });\n}\n</code></pre>\n<h3><span style=\"color:red;\"> const</h3>\n<p><code>const</code> was introduced in ES2015 and is the new preferred default way to declare all variables if they won't be reassigned later, even for objects that will be mutated (as long as the reference to the object does not change). It is block-scoped and cannot be reassigned.</p>\n<pre><code class=\"language-js\">const myObject = {};\nmyObject.prop = \"hello!\"; // No error\nmyObject = \"hello\"; // Error\n</code></pre>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>All declarations are hoisted to the top of their scope.</li>\n<li>However, with <code>let</code> and <code>const</code> there is a concept called the temporal dead zone (TDZ). While the declarations are still hoisted, there is a period between entering scope and being declared where they cannot be accessed.</li>\n<li>Show a common issue with using <code>var</code> and how <code>let</code> can solve it, as well as a solution that keeps <code>var</code>.</li>\n<li><code>var</code> should be avoided whenever possible and prefer <code>const</code> as the default declaration statement for all variables unless they will be reassigned later, then use <code>let</code> if so.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://wesbos.com/let-vs-const/\"><code>let</code> vs <code>const</code></a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a virtual DOM and why is it used in libraries/frameworks?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>The virtual DOM (VDOM) is a representation of the real DOM in the form of plain JavaScript objects. These objects have properties to describe the real DOM nodes they represent: the node name, its attributes, and child nodes.</p>\n<pre><code class=\"language-html\">&#x3C;div class=\"counter\">\n  &#x3C;h1>0&#x3C;/h1>\n  &#x3C;button>-&#x3C;/button>\n  &#x3C;button>+&#x3C;/button>\n&#x3C;/div>\n</code></pre>\n<p>The above markup's virtual DOM representation might look like this:</p>\n<pre><code class=\"language-js\">{\n  nodeName: \"div\",\n  attributes: { class: \"counter\" },\n  children: [\n    {\n      nodeName: \"h1\",\n      attributes: {},\n      children: [0]\n    },\n    {\n      nodeName: \"button\",\n      attributes: {},\n      children: [\"-\"]\n    },\n    {\n      nodeName: \"button\",\n      attributes: {},\n      children: [\"+\"]\n    }\n  ]\n}\n</code></pre>\n<p>The library/framework uses the virtual DOM as a means to improve performance. When the state of an application changes, the real DOM needs to be updated to reflect it. However, changing real DOM nodes is costly compared to recalculating the virtual DOM. The previous virtual DOM can be compared to the new virtual DOM very quickly in comparison.\nOnce the changes between the old VDOM and new VDOM have been calculated by the diffing engine of the framework, the real DOM can be patched efficiently in the least time possible to match the new state of the application.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>Why accessing the DOM can be so costly.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"http://reactkungfu.com/2015/10/the-difference-between-virtual-dom-and-dom/\">The difference between Virtual DOM and DOM</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is WCAG? What are the differences between A, AA, and AAA compliance?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<p>WCAG stands for \"Web Content Accessibility Guidelines\". It is a standard describing how to make web content more accessible to people with disabilities They have 12-13 guidelines and for each one, there are testable success criteria, which are at three levels: A, AA, and AAA. The higher the level, the higher the impact on the design of the web content. The higher the level, the web content is essentially more accessible by more users. Depending on where you live/work, there may be regulations requiring websites to meet certain levels of compliance. For instance, in Ontario, Canada, beginning January 1, 2021 all public websites and web content posted after January 1, 2012 must meet AA compliance.</p>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>A guideline for making web content more accessible</li>\n<li>3 different levels (A, AA, and AAA) of compliance for each guideline</li>\n<li>Governments are starting to require web content to meet a certain level of compliance by law</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.w3.org/WAI/standards-guidelines/wcag/\">Web Content Accessibility Guidelines (WCAG) Overview</a></li>\n<li><a href=\"https://www.w3.org/WAI/WCAG21/quickref/\">How to Meet WCAG</a></li>\n</ul>\n<h3><span style=\"color:red;\"> What is a cross-site scripting attack (XSS) and how do you prevent it?</h3>\n<h3><span style=\"color:red;\"> Answer</h3>\n<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.\nFor example, a comment system will be at risk if it does not validate or escape user input. If the comment contains unescaped HTML, the comment can inject a <code>&#x3C;script></code> tag into the website that other users will execute against their knowledge.</p>\n<ul>\n<li>The malicious script has access to cookies which are often used to store session tokens. If an attacker can obtain a user's session cookie, they can impersonate the user.</li>\n<li>The script can arbitrarily manipulate the DOM of the page the script is executing in, allowing the attacker to insert pieces of content that appear to be a real part of the website.</li>\n<li>The script can use AJAX to send HTTP requests with arbitrary content to arbitrary destinations.</li>\n</ul>\n<h3><span style=\"color:red;\"> Don't forget:</h3>\n<ul>\n<li>On the client, using <code>textContent</code> instead of <code>innerHTML</code> prevents the browser from running the string through the HTML parser which would execute scripts in it.</li>\n<li>On the server, escaping HTML tags will prevent the browser from parsing the user input as actual HTML and therefore won't execute the script.</li>\n</ul>\n<h3><span style=\"color:red;\"> Additional links</h3>\n<ul>\n<li><a href=\"https://www.acunetix.com/websitesecurity/cross-site-scripting/\">Cross-Site Scripting Attack (XSS)</a></li>\n</ul>\n<hr>\n<h1>ALL Prior Code:</h1>\n<pre><code class=\"language-js\">// Normal promises in regular function:\nfunction foo() {\n  promiseCall()\n    .then(result => {\n      // do something with the result\n    })\n}\n// async functions\nasync function foo() {\n  const result = await promiseCall()\n  // do something with the result\n}\n/**\nIt accepts two objects as arguments: the first object is the recipe\nfor the food, while the second object is the available ingredients.\nEach ingredient's value is a number representing how many units there are.\n`batches(recipe, available)`\n*/\n// 0 batches can be made\nbatches(\n  { milk: 100, butter: 50, flour: 5 },\n  { milk: 132, butter: 48, flour: 51 }\n)\nbatches(\n  { milk: 100, flour: 4, sugar: 10, butter: 5 },\n  { milk: 1288, flour: 9, sugar: 95 }\n)\n// 1 batch can be made\nbatches(\n  { milk: 100, butter: 50, cheese: 10 },\n  { milk: 198, butter: 52, cheese: 10 }\n)\n// 2 batches can be made\nbatches(\n  { milk: 2, sugar: 40, butter: 20 },\n  { milk: 5, sugar: 120, butter: 500 }\n)\nconst batches = (recipe, available) =>\n  Math.floor(\n    Math.min(...Object.keys(recipe).map(k => available[k] / recipe[k] || 0))\n  )\narr[arr.length - 1]\narr.filter(fn)\narr.some(fn)\narr.sort(fn)\nfor (let i = 0; i &#x3C; arr.length; i++) {\n  for (let j = 0; j &#x3C; arr.length; j++) {\n    // ...\n  }\n}\nconst permutations = arr => {\n  if (arr.length &#x3C;= 2) return arr.length === 2 ? [arr, [arr[1], arr[0]]] : arr\n  return arr.reduce(\n    (acc, item, i) =>\n      acc.concat(\n        permutations([...arr.slice(0, i), ...arr.slice(i + 1)]).map(val => [\n          item,\n          ...val\n        ])\n      ),\n    []\n  )\n}\nfunction example() {\n  console.log(this)\n}\nconst boundExample = bind(example, { a: true })\nboundExample.call({ b: true }) // logs { a: true }\nconst bind = (fn, context) => (...args) => fn.apply(context, args)\ngetData(function(a) {\n  getMoreData(a, function(b) {\n    getMoreData(b, function(c) {\n      getMoreData(c, function(d) {\n        getMoreData(d, function(e) {\n          // ...\n        })\n      })\n    })\n  })\n})\nasync function asyncAwaitVersion() {\n  const a = await getData()\n  const b = await getMoreData(a)\n  const c = await getMoreData(b)\n  const d = await getMoreData(c)\n  const e = await getMoreData(d)\n  // ...\n}\nsetState({ name: \"sudheer\" }, () => {\n  console.log(\"The name has updated and component re-rendered\")\n})\n// Legacy approach using findDOMNode()\nclass MyComponent extends Component {\n  componentDidMount() {\n    findDOMNode(this).scrollIntoView()\n  }\n  render() {\n    return &#x3C;div />\n  }\n}\n// Recommended approach using callback refs\nclass MyComponent extends Component {\n  componentDidMount() {\n    this.node.scrollIntoView()\n  }\n  render() {\n    return &#x3C;div ref={node => (this.node = node)} />\n  }\n}\nfunction onClick() {\n  console.log(\"The user clicked on the page.\")\n}\ndocument.addEventListener(\"click\",\n    onClick)\nconst map = (arr, callback) => {\n  const result = []\n  for (let i = 0; i &#x3C; arr.length; i++) {\n    result.push(callback(arr[i], i))\n  }\n  return result\n}\nmap([1, 2, 3, 4, 5], n => n * 2) // [2, 4, 6, 8, 10]\nfunction GenericBox({ children }) {\n  return &#x3C;div className=\"container\">{children}&#x3C;/div>\n}\nfunction App() {\n  return (\n    &#x3C;GenericBox>\n      &#x3C;span>Hello&#x3C;/span> &#x3C;span>World&#x3C;/span>\n    &#x3C;/GenericBox>\n  )\n}\nconst element = document.createElement(\"div\")\nelement.className = \"hello\"\nconst element = {\n  attributes: {\n    class: \"hello\"\n  }\n}\nconst { class } = this.props // Error\nconst { className } = this.props // All good\nconst { class: className } =\n    this.props // All good, but\nconst obj = { a: 1, b: 2 }\nconst shallowClone = { ...obj }\nfunction isDeepEqual(obj1, obj2, testPrototypes = false) {\n  if (obj1 === obj2) {\n    return true\n  }\n  if (typeof obj1 === \"function\" &#x26;&#x26; typeof obj2 === \"function\") {\n    return obj1.toString() === obj2.toString()\n  }\n  if (obj1 instanceof Date &#x26;&#x26; obj2 instanceof Date) {\n    return obj1.getTime() === obj2.getTime()\n  }\n  if (\n    Object.prototype.toString.call(obj1) !==\n      Object.prototype.toString.call(obj2) ||\n    typeof obj1 !== \"object\"\n  ) {\n    return false\n  }\n  const prototypesAreEqual = testPrototypes\n    ? isDeepEqual(\n        Object.getPrototypeOf(obj1),\n        Object.getPrototypeOf(obj2),\n        true\n      )\n    : true\n  const obj1Props = Object.getOwnPropertyNames(obj1)\n  const obj2Props = Object.getOwnPropertyNames(obj2)\n  return (\n    obj1Props.length === obj2Props.length &#x26;&#x26;\n    prototypesAreEqual &#x26;&#x26;\n    obj1Props.every(prop => isDeepEqual(obj1[prop], obj2[prop]))\n  )\n}\nconst { Provider, Consumer } = React.createContext(defaultValue)\nconst debounce = (func, delay) => {\n  let debounceTimer;\n  return function() {\n    const context = this;\n    const args = arguments;\n      clearTimeout(debounceTimer);\n        debounceTimer = setTimeout(() => func.apply(context, args), delay);\n  }\n}\nwindow.addEventListere('scroll', debounce(function() {\n  // Do stuff, this function will be called after a delay of 1 second\n}, 1000));\nconst Component = () => \"Hello\"\nconst componentElement = &#x3C;Component />\nconst domNodeElement = &#x3C;div />\nclass ErrorBoundary extends React.Component {\n  constructor(props) {\n    super(props)\n    this.state = { hasError: false }\n  }\n  // Use componentDidCatch to log the error\n  componentDidCatch(error, info) {\n    // You can also log the error to an error reporting service\n    logErrorToMyService(error, info)\n  }\n  // use getDerivedStateFromError to update state\n  static getDerivedStateFromError(error) {\n    // Display fallback UI\n     return { hasError: true };\n  }\n  render() {\n    if (this.state.hasError) {\n      // You can render any custom fallback UI\n      return &#x3C;h1>Something went wrong.&#x3C;/h1>\n    }\n    return this.props.children\n  }\n}\ndocument.querySelectorAll(\"button\").forEach(button => {\n  button.addEventListener(\"click\", handleButtonClick)\n})\ndocument.addEventListener(\"click\", e => {\n  if (e.target.closest(\"button\")) {\n    handleButtonClick()\n  }\n})\ndocument.addEventListener(\"click\", function(event) {\n  // This callback function is run when the user\n  // clicks on the document.\n})\nconst hub = createEventHub()\nhub.on(\"message\", function(data) {\n  console.log(`${data.username} said ${data.text}`)\n})\nhub.emit(\"message\", {\n  username: \"John\",\n  text: \"Hello?\"\n})\nlet x = 0\nfunction declaration() {}\nif (true) {\n}\n// Assign `x` to the absolute value of `y`.\nvar x\nif (y >= 0) {\n  x = y\n} else {\n  x = -y\n}\n5 + 5 // => 10\nlastCharacter(\"input\") // => \"t\"\ntrue === true // => true\n// Assign `x` as the absolute value of `y`.\nvar x = y >= 0 ? y : -y\nBoolean(\"\") // false\nBoolean([]) // true\n!!\"\" // false\n!![] // true\nconst fibonacci = n =>\n  [...Array(n)].reduce(\n    (acc, val, i) => acc.concat(i > 1 ? acc[i - 1] + acc[i - 2] : i),\n    []\n  )\nconst words = ['rates', 'rat', 'stare', 'taser', 'tears', 'art', 'tabs', 'tar', 'bats', 'state'];\nconst words = ['rates', 'rat', 'stare', 'taser', 'tears', 'art', 'tabs', 'tar', 'bats', 'state'];\nfunction anagramGroups(wordAry){\n    const groupedWords = {};\n    // iterate over each word in the array\n    wordAry.map(word => {\n      // alphabetize the word and a separate variable\n      alphaWord = word.split('').sort().join('');\n      // if the alphabetize word is already a key, push the actual word value (this is an anagram)\n      if(groupedWords[alphaWord]) {\n        return groupedWords[alphaWord].push(word);\n      }\n      // otherwise add the alphabetize word key and actual word value (may not turn out to be an anagram)\n      groupedWords[alphaWord] = [word];\n    })\n    return groupedWords;\n}\n// call the function and store results in a variable called collectedAnagrams\nconst collectedAnagrams = anagramGroups(words);\n// iterate over groupedAnagrams, printing out group of values\nfor(const sortedWord in collectedAnagrams) {\n  if(collectedAnagrams[sortedWord].length > 1) {\n    console.log(collectedAnagrams[sortedWord].toString());\n  }\n}\n0.1 + 0.2 // 0.30000000000000004\nconst approxEqual = (n1, n2, epsilon = 0.0001) => Math.abs(n1 - n2) &#x3C; epsilon\napproxEqual(0.1 + 0.2, 0.3) // true\nrender() {\n  return (\n    &#x3C;React.Fragment>\n      &#x3C;ChildA />\n      &#x3C;ChildB />\n      &#x3C;ChildC />\n    &#x3C;/React.Fragment>\n  )\n};\n// Short syntax supported by Babel 7\nrender() {\n return (\n    &#x3C;>\n      &#x3C;ChildA />\n      &#x3C;ChildB />\n      &#x3C;ChildC />\n    &#x3C;/>\n  );\n};\nconst EnhancedComponent = higherOrderComponent(WrappedComponent)\nvar foo = 1\nvar foobar = function() {\n  console.log(foo)\n  var foo = 2\n}\nfoobar()\nconsole.log(hoist)\nvar hoist = \"value\"\nvar hoist\nconsole.log(hoist)\nhoist = \"value\"\nmyFunction() // No error; logs \"hello\"\nfunction myFunction() {\n  console.log(\"hello\")\n}\nmyFunction() // Error: `myFunction` is not a function\nvar myFunction = function() {\n  console.log(\"hello\")\n}\nconst myLibrary = (function() {\n  var privateVariable = 2\n  return {\n    publicMethod: () => privateVariable\n  }\n})()\nprivateVariable // ReferenceError\nmyLibrary.publicMethod() // 2\nconst numbers = [1, 2, 3, 4, 5]\nconst numbersDoubled = []\nfor (let i = 0; i &#x3C; numbers.length; i++) {\n  numbersDoubled[i] = numbers[i] * 2\n}\nconst numbers = [1, 2, 3, 4, 5]\nconst numbersDoubled = numbers.map(n => n * 2)\nfunction App({ messages, isVisible }) {\n  return (\n    &#x3C;div>\n      if (messages.length > 0) {\n        &#x3C;h2>You have {messages.length} unread messages.&#x3C;/h2>\n      } else {\n        &#x3C;h2>You have no unread messages.&#x3C;/h2>\n      }\n      if (isVisible) {\n        &#x3C;p>I am visible.&#x3C;/p>\n      }\n    &#x3C;/div>\n  )\n}\nfunction App({ messages, isVisible }) {\n  return (\n    &#x3C;div>\n      {messages.length > 0 ? (\n        &#x3C;h2>You have {messages.length} unread messages.&#x3C;/h2>\n      ) : (\n        &#x3C;h2>You have no unread messages.&#x3C;/h2>\n      )}\n      {isVisible &#x26;&#x26; &#x3C;p>I am visible.&#x3C;/p>}\n    &#x3C;/div>\n  )\n}\nconst todoItems = todos.map(todo => &#x3C;li key={todo.id}>{todo.text}&#x3C;/li>)\nconst mask = (str, maskChar = \"#\") =>\n  str.slice(-4).padStart(str.length, maskChar)\nconst memoize = fn => {\n  const cache = new Map()\n  return value => {\n    const cachedResult = cache.get(value)\n    if (cachedResult !== undefined) return cachedResult\n    const result = fn(value)\n    cache.set(value, result)\n    return result\n  }\n}\nconstructor(props) {\n  super(props);\n  this.handleClick = this.handleClick.bind(this);\n}\nhandleClick() {\n  // Perform some logic\n}\nhandleClick = () => {\n  console.log('this is:', this);\n}\nrender() {\n  return (\n    &#x3C;button onClick={this.handleClick}>\n      Click me\n    &#x3C;/button>\n  );\n}\n&#x3C;button onClick={e => this.handleClick(e)}>Click me&#x3C;/button>\nconst myString = \"hello!\"\nmyString.replace(\"!\", \"\") // returns a new string, cannot mutate the original value\nconst originalArray = [1, 2, 3]\noriginalArray.push(4) // mutates originalArray, now [1, 2, 3, 4]\noriginalArray.concat(4) // returns a new array, does not mutate the original\nfs.readFile(filePath, function(err, data) {\n  if (err) {\n    // handle the error, the return is important here\n    // so execution stops here\n    return console.log(err)\n  }\n  // use the data object\n  console.log(data)\n})\nvar isTrue = function(value, callback) {\n  if (value === true) {\n    callback(null, \"Value was true.\")\n  } else {\n    callback(new Error(\"Value is not true!\"))\n  }\n}\nvar callback = function(error, retval) {\n  if (error) {\n    console.log(error)\n    return\n  }\n  console.log(retval)\n}\nisTrue(false, callback)\nisTrue(true, callback)\n/*\n  { stack: [Getter/Setter],\n    arguments: undefined,\n    type: undefined,\n    message: 'Value is not true!' }\n  Value was true.\n*/\nconst person = {\n  name: \"John\",\n  age: 50,\n  birthday() {\n    this.age++\n  }\n}\nperson.birthday() // person.age === 51\nfunction Person(name, age) {\n  this.name = name\n  this.age = age\n}\nPerson.prototype.birthday = function() {\n  this.age++\n}\nconst person1 = new Person(\"John\", 50)\nconst person2 = new Person(\"Sally\", 20)\nperson1.birthday() // person1.age === 51\nperson2.birthday() // person2.age === 21\nconst createPerson = (name, age) => {\n  const birthday = () => person.age++\n  const person = { name, age, birthday }\n  return person\n}\nconst person = createPerson(\"John\", 50)\nperson.birthday() // person.age === 51\nconst personProto = {\n  birthday() {\n    this.age++\n  }\n}\nconst person = Object.create(personProto)\nperson.age = 50\nperson.birthday() // person.age === 51\nObject.create(personProto, {\n  age: {\n    value: 50,\n    writable: true,\n    enumerable: true\n  }\n})\nfunction myFunction(parameter1, parameter2) {\n  console.log(arguments[0]) // \"argument1\"\n}\nmyFunction(\"argument1\", \"argument2\")\n&#x3C;button onClick={() => this.handleClick(id)} />\n&#x3C;button onClick={this.handleClick.bind(this, id)} />\nconst square = v => v * v\nconst double = v => v * 2\nconst addOne = v => v + 1\nconst res = pipe(square, double, addOne)\nres(3) // 19; addOne(double(square(3)))\nconst pipe = (...fns) => x => fns.reduce((v, fn) => fn(v), x)\nReactDOM.createPortal(child, container)\nlet i = 0\ni++ // 0\n// i === 1\nlet i = 0\n++i // 1\n// i === 1\nnew Promise((resolve, reject) => {\n  setTimeout(() => {\n    resolve(\"result\")\n  }, 100)\n})\n  .then(console.log)\n  .catch(console.error)\nimport PropTypes from \"prop-types\"\nclass User extends React.Component {\n  static propTypes = {\n    name: PropTypes.string.isRequired,\n    age: PropTypes.number.isRequired\n  }\n//\n//   render() {\n//     return (\n//       &#x3C;h1>Welcome, {this.props.name}&#x3C;/h1>\n//       &#x3C;h2>Age, {this.props.age}\n//     )\n//   }\n// }\nconst a = (x, y) => x + y\nconst b = (arr, value) => arr.concat(value)\nconst c = arr => [...arr].sort((a, b) => a - b)\nconst a = (x, y) => x + y + Math.random()\nconst b = (arr, value) => (arr.push(value), arr)\nconst c = arr => arr.sort((a, b) => a - b)\nconst nest = (items, id = null, link = \"parent_id\") =>\n  items\n    .filter(item => item[link] === id)\n    .map(item => ({ ...item, children: nest(items, item.id) }))\nconst comments = [\n  { id: 1, parent_id: null, text: \"First reply to post.\" },\n  { id: 2, parent_id: 1, text: \"First reply to comment #1.\" },\n  { id: 3, parent_id: 1, text: \"Second reply to comment #1.\" },\n  { id: 4, parent_id: 3, text: \"First reply to comment #3.\" },\n  { id: 5, parent_id: 4, text: \"First reply to comment #4.\" },\n  { id: 6, parent_id: null, text: \"Second reply to post.\" }\n]\nnest(comments)\n/*\n[\n  { id: 1, parent_id: null, text: \"First reply to post.\", children: [...] },\n  { id: 6, parent_id: null, text: \"Second reply to post.\", children: [] }\n]\n*/\nconst a = [1, 2, 3]\nconst b = [1, 2, 3]\nconst c = \"1,2,3\"\nconsole.log(a == c)\nconsole.log(a == b)\nclass MyComponent extends React.Component {\n  constructor(props) {\n    super(props)\n    this.myRef = React.createRef()\n  }\n  render() {\n    return &#x3C;div ref={this.myRef} />\n  }\n}\n>>>>function greet() {\n  return\n  {\n    message: \"hello\"\n  }\n}\nconst previousLine = 3\n;[1, 2, previousLine].map(n => n * 2)\nconst previousLine = 3\n;(function() {\n  // ...\n})()\ntrue || false\nfalse &#x26;&#x26; true\ntrue || nonexistentFunction()\nfalse &#x26;&#x26; nonexistentFunction()\ntrue || nonexistentFunction() || window.nothing.wouldThrowError\ntrue || window.nothing.wouldThrowError\ntrue\nconst options = {}\nconst setting = options.setting || \"default\"\nsetting // \"default\"\n// Instead of:\naddEventListener(\"click\", e => {\n  if (e.target.closest(\"button\")) {\n    handleButtonClick(e)\n  }\n})\n// You can take advantage of short-circuit evaluation:\naddEventListener(\n  \"click\",\n  e => e.target.closest(\"button\") &#x26;&#x26; handleButtonClick(e)\n)\n// Stateful class component\nclass App extends Component {\n  constructor(props) {\n    super(props)\n    this.state = { count: 0 }\n  }\n  render() {\n    // ...\n  }\n}\n// Stateful function component\nfunction App() {\n  const [count, setCount] = useState(0)\n  return // ...\n}\nArray.isArray // static method of Array\nArray.prototype.push // instance method of Array\nconst arr = [1, 2, 3]\narr.push(4)\nArray.push(arr, 4)\nvar myObject = {\n  property: this,\n  regularFunction: function() {\n    return this\n  },\n  arrowFunction: () => {\n    return this\n  },\n  iife: (function() {\n    return this\n  })()\n}\nmyObject.regularFunction() // myObject\nmyObject[\"regularFunction\"]() // my Object\nmyObject.property // NOT myObject; lexical `this`\nmyObject.arrowFunction() // NOT myObject; lexical `this`\nmyObject.iife // NOT myObject; lexical `this`\nconst regularFunction = myObject.regularFunction\nregularFunction() // NOT myObject; lexical `this`\ndocument.body.addEventListener(\"click\", function() {\n  console.log(this) // document.body\n})\nclass Example {\n  constructor() {\n    console.log(this) // myExample\n  }\n}\nconst myExample = new Example()\nvar myFunction = function() {\n  return this\n}\nmyFunction.call({ customThis: true }) // { customThis: true }\nvar obj = {\n  arr: [1, 2, 3],\n  doubleArr() {\n    return this.arr.map(function(value) {\n      // this is now this.arr\n      return this.double(value)\n    })\n  },\n  double() {\n    return value * 2\n  }\n}\nobj.doubleArr() // Uncaught TypeError: this.double is not a function\ntypeof typeof 0\nfor (var i = 0; i &#x3C; 10; i++) {\n  setTimeout(() => {\n    // logs `10` ten times\n    console.log(i)\n  })\n}\n/* Solutions with `var` */\nfor (var i = 0; i &#x3C; 10; i++) {\n  // Passed as an argument will use the value as-is in\n  // that point in time\n  setTimeout(console.log, 0, i)\n}\nfor (var i = 0; i &#x3C; 10; i++) {\n  // Create a new function scope that will use the value\n  // as-is in that point in time\n  ;(i => {\n    setTimeout(() => {\n      console.log(i)\n    })\n  })(i)\n}\nfor (let i = 0; i &#x3C; 10; i++) {\n  setTimeout(() => {\n    // logs 0, 1, 2, 3, ...\n    console.log(i)\n  })\n}\nconst myObject = {}\nmyObject.prop = \"hello!\" // No error\nmyObject = \"hello\" // Error\n</code></pre>\n</details>"},{"url":"/docs/docs/node-docs-complete/","relativePath":"docs/docs/node-docs-complete.md","relativeDir":"docs/docs","base":"node-docs-complete.md","name":"node-docs-complete","frontmatter":{"title":"Node Docs","weight":0,"excerpt":"Node Docs","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h1>How to use the Node.js REPL</h1>\n<p>description: \"REPL stands for Read-Evaluate-Print-Loop, and it's a great way to explore the Node.js features in a quick way\"</p>\n<hr>\n<p>The <code>node</code> command is the one we use to run our Node.js scripts:</p>\n<pre><code class=\"language-bash\">node script.js\n</code></pre>\n<p>If we omit the filename, we use it in REPL mode:</p>\n<pre><code class=\"language-bash\">node\n</code></pre>\n<blockquote>\n<p>Note: REPL also known as Read Evaluate Print Loop is a programming language environment (basically a console window) that takes single expression as user input and returns the result back to the console after execution.</p>\n</blockquote>\n<p>If you try it now in your terminal, this is what happens:</p>\n<pre><code class=\"language-bash\">❯ node\n\n>\n</code></pre>\n<p>the command stays in idle mode and waits for us to enter something.</p>\n<blockquote>\n<p>Tip: if you are unsure how to open your terminal, google \"How to open terminal on &#x3C;your-operating-system>\".</p>\n</blockquote>\n<p>The REPL is waiting for us to enter some JavaScript code, to be more precise.</p>\n<p>Start simple and enter</p>\n<pre><code class=\"language-console\">> console.log('test')\n\ntest\n\nundefined\n\n>\n</code></pre>\n<p>The first value, <code>test</code>, is the output we told the console to print, then we get <code>undefined</code> which is the return value of running <code>console.log()</code>.</p>\n<p>We can now enter a new line of JavaScript.</p>\n<h2>Use the tab to autocomplete</h2>\n<p>The cool thing about the REPL is that it's interactive.</p>\n<p>As you write your code, if you press the <code>tab</code> key the REPL will try to autocomplete what you wrote to match a variable you already defined or a predefined one.</p>\n<h2>Exploring JavaScript objects</h2>\n<p>Try entering the name of a JavaScript class, like <code>Number</code>, add a dot and press <code>tab</code>.</p>\n<p>The REPL will print all the properties and methods you can access on that class:</p>\n<p><img src=\"images/tab.png\" alt=\"Pressing tab reveals object properties\"></p>\n<h2>Explore global objects</h2>\n<p>You can inspect the globals you have access to by typing <code>global.</code> and pressing <code>tab</code>:</p>\n<p><img src=\"images/globals.png\" alt=\"Globals\"></p>\n<h2>The _ special variable</h2>\n<p>If after some code you type <code>_</code>, that is going to print the result of the last operation.</p>\n<h2>Dot commands</h2>\n<p>The REPL has some special commands, all starting with a dot <code>.</code>. They are</p>\n<ul>\n<li><code>.help</code>: shows the dot commands help</li>\n<li><code>.editor</code>: enables editor mode, to write multiline JavaScript code with ease. Once you are in this mode, enter ctrl-D to run the code you wrote.</li>\n<li><code>.break</code>: when inputting a multi-line expression, entering the .break command will abort further input. Same as pressing ctrl-C.</li>\n<li><code>.clear</code>: resets the REPL context to an empty object and clears any multi-line expression currently being input.</li>\n<li><code>.load</code>: loads a JavaScript file, relative to the current working directory</li>\n<li><code>.save</code>: saves all you entered in the REPL session to a file (specify the filename)</li>\n<li><code>.exit</code>: exits the repl (same as pressing ctrl-C two times)</li>\n</ul>\n<p>The REPL knows when you are typing a multi-line statement without the need to invoke <code>.editor</code>.</p>\n<p>For example if you start typing an iteration like this:</p>\n<pre><code class=\"language-js\">[1, 2, 3].forEach(num => {\n</code></pre>\n<p>and you press <code>enter</code>, the REPL will go to a new line that starts with 3 dots, indicating you can now continue to work on that block.</p>\n<pre><code class=\"language-js\">... console.log(num)\n\n... })\n</code></pre>\n<p>If you type <code>.break</code> at the end of a line, the multiline mode will stop and the statement will not be executed.</p>\n<h1>Node.js, accept arguments from the command line</h1>\n<p>description: 'How to accept arguments in a Node.js program passed from the command line'</p>\n<p>You can pass any number of arguments when invoking a Node.js application using</p>\n<pre><code class=\"language-bash\">node app.js\n</code></pre>\n<p>Arguments can be standalone or have a key and a value.</p>\n<p>For example:</p>\n<pre><code class=\"language-bash\">node app.js joe\n</code></pre>\n<p>or</p>\n<pre><code class=\"language-bash\">node app.js name=joe\n</code></pre>\n<p>This changes how you will retrieve this value in the Node.js code.</p>\n<p>The way you retrieve it is using the <code>process</code> object built into Node.js.</p>\n<p>It exposes an <code>argv</code> property, which is an array that contains all the command line invocation arguments.</p>\n<p>The first element is the full path of the <code>node</code> command.</p>\n<p>The second element is the full path of the file being executed.</p>\n<p>All the additional arguments are present from the third position going forward.</p>\n<p>You can iterate over all the arguments (including the node path and the file path) using a loop:</p>\n<pre><code class=\"language-js\">process.argv.forEach((val, index) => {\n    console.log(`${index}: ${val}`);\n});\n</code></pre>\n<p>You can get only the additional arguments by creating a new array that excludes the first 2 params:</p>\n<pre><code class=\"language-js\">const args = process.argv.slice(2);\n</code></pre>\n<p>If you have one argument without an index name, like this:</p>\n<pre><code class=\"language-bash\">node app.js joe\n</code></pre>\n<p>you can access it using</p>\n<pre><code class=\"language-js\">const args = process.argv.slice(2);\n\nargs[0];\n</code></pre>\n<p>In this case:</p>\n<pre><code class=\"language-bash\">node app.js name=joe\n</code></pre>\n<p><code>args[0]</code> is <code>name=joe</code>, and you need to</p>\n<p>parse it. The best way to do so is by using the <a href=\"images/https://www.npmjs.com/package/minimist\"><code>minimist</code></a> library, which helps dealing with arguments:</p>\n<pre><code class=\"language-js\">const args = require('minimist')(process.argv.slice(2));\n\nargs['name']; //joe\n</code></pre>\n<p>Install the required <code>minimist</code> package using <code>npm</code> (lesson about the package manager comes <a href=\"images/https://nodejs.dev/learn/an-introduction-to-the-npm-package-manager\">later on</a>).</p>\n<pre><code class=\"language-bash\">npm install minimist\n</code></pre>\n<p>This time you need to use double dashes before each argument name:</p>\n<pre><code class=\"language-bash\">node app.js --name=joe\n</code></pre>\n<h1>Output to the command line using Node.js</h1>\n<p>description: 'How to print to the command line console using Node.js, from the basic console.log to more complex scenarios'</p>\n<h2>Basic output using the console module</h2>\n<p>Node.js provides a <a href=\"images/https://nodejs.org/api/console.html\"><code>console</code> module</a> which provides tons of very useful ways to interact with the command line.</p>\n<p>It is basically the same as the <code>console</code> object you find in the browser.</p>\n<p>The most basic and most used method is <code>console.log()</code>, which prints the string you pass to it to the console.</p>\n<p>If you pass an object, it will render it as a string.</p>\n<p>You can pass multiple variables to <code>console.log</code>, for example:</p>\n<pre><code class=\"language-js\">const x = 'x';\n\nconst y = 'y';\n\nconsole.log(x, y);\n</code></pre>\n<p>and Node.js will print both.</p>\n<p>We can also format pretty phrases by passing variables and a format specifier.</p>\n<p>For example:</p>\n<pre><code class=\"language-js\">console.log('My %s has %d years', 'cat', 2);\n</code></pre>\n<ul>\n<li><code>%s</code> format a variable as a string</li>\n<li><code>%d</code> format a variable as a number</li>\n<li><code>%i</code> format a variable as its integer part only</li>\n<li><code>%o</code> format a variable as an object</li>\n</ul>\n<p>Example:</p>\n<pre><code class=\"language-js\">console.log('%o', Number);\n</code></pre>\n<h2>Clear the console</h2>\n<p><code>console.clear()</code> clears the console (the behavior might depend on the console used)</p>\n<h2>Counting elements</h2>\n<p><code>console.count()</code> is a handy method.</p>\n<p>Take this code:</p>\n<iframe\n<p>title=\"Output to the command line using Node.js\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0002-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0002-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0002-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--\n\n```js\n\nconst x = 1\n\nconst y = 2\n\nconst z = 3\n\nconsole.count(\n\n  'The value of x is ' + x + ' and has been checked .. how many times?'\n\n)\n\nconsole.count(\n\n  'The value of x is ' + x + ' and has been checked .. how many times?'\n\n)\n\nconsole.count(\n\n  'The value of y is ' + y + ' and has been checked .. how many times?'\n\n)\n\n```\n\n-->\n<p>What happens is that <code>console.count()</code> will count the number of times a string is printed, and print the count next to it:</p>\n<p>You can just count apples and oranges:</p>\n<pre><code class=\"language-js\">const oranges = ['orange', 'orange'];\n\nconst apples = ['just one apple'];\n\noranges.forEach((fruit) => {\n    console.count(fruit);\n});\n\napples.forEach((fruit) => {\n    console.count(fruit);\n});\n</code></pre>\n<h2>Reset counting</h2>\n<p>The console.countReset() method resets counter used with console.count().</p>\n<p>We will use the apples and orange example to demonstrate this.</p>\n<pre><code class=\"language-js\">const oranges = ['orange', 'orange'];\n\nconst apples = ['just one apple'];\n\noranges.forEach((fruit) => {\n    console.count(fruit);\n});\n\napples.forEach((fruit) => {\n    console.count(fruit);\n});\n\nconsole.countReset('orange');\n\noranges.forEach((fruit) => {\n    console.count(fruit);\n});\n</code></pre>\n<p>Notice how the call to <code>console.countReset('orange')</code> resets the value counter to zero.</p>\n<h2>Print the stack trace</h2>\n<p>There might be cases where it's useful to print the call stack trace of a function, maybe to answer the question <em>how did you reach that part of the code?</em></p>\n<p>You can do so using <code>console.trace()</code>:</p>\n<pre><code class=\"language-js\">const function2 = () => console.trace();\n\nconst function1 = () => function2();\n\nfunction1();\n</code></pre>\n<p>This will print the stack trace. This is what's printed if we try this in the Node.js REPL:</p>\n<pre><code class=\"language-bash\">Trace\n\n    at function2 (repl:1:33)\n\n    at function1 (repl:1:25)\n\n    at repl:1:1\n\n    at ContextifyScript.Script.runInThisContext (vm.js:44:33)\n\n    at REPLServer.defaultEval (repl.js:239:29)\n\n    at bound (domain.js:301:14)\n\n    at REPLServer.runBound [as eval] (domain.js:314:12)\n\n    at REPLServer.onLine (repl.js:440:10)\n\n    at emitOne (events.js:120:20)\n\n    at REPLServer.emit (events.js:210:7)\n</code></pre>\n<h2>Calculate the time spent</h2>\n<p>You can easily calculate how much time a function takes to run, using <code>time()</code> and <code>timeEnd()</code></p>\n<pre><code class=\"language-js\">const doSomething = () => console.log('test');\n\nconst measureDoingSomething = () => {\n    console.time('doSomething()');\n\n    //do something, and measure the time it takes\n\n    doSomething();\n\n    console.timeEnd('doSomething()');\n};\n\nmeasureDoingSomething();\n</code></pre>\n<h2>stdout and stderr</h2>\n<p>As we saw console.log is great for printing messages in the Console. This is what's called the standard output, or <code>stdout</code>.</p>\n<p><code>console.error</code> prints to the <code>stderr</code> stream.</p>\n<p>It will not appear in the console, but it will appear in the error log.</p>\n<h2>Color the output</h2>\n<p>You can color the output of your text in the console by using <a href=\"images/https://gist.github.com/iamnewton/8754917\">escape sequences</a>. An escape sequence is a set of characters that identifies a color.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">console.log('\\x1b[33m%s\\x1b[0m', 'hi!');\n</code></pre>\n<p>You can try that in the Node.js REPL, and it will print <code>hi!</code> in yellow.</p>\n<p>However, this is the low-level way to do this. The simplest way to go about coloring the console output is by using a library. <a href=\"images/https://github.com/chalk/chalk\">Chalk</a> is such a library, and in addition to coloring it also helps with other styling facilities, like making text bold, italic or underlined.</p>\n<p>You install it with <code>npm install chalk</code>, then you can use it:</p>\n<pre><code class=\"language-js\">const chalk = require('chalk');\n\nconsole.log(chalk.yellow('hi!'));\n</code></pre>\n<p>Using <code>chalk.yellow</code> is much more convenient than trying to remember the escape codes, and the code is much more readable.</p>\n<p>Check the project link posted above for more usage examples.</p>\n<h2>Create a progress bar</h2>\n<p><a href=\"images/https://www.npmjs.com/package/progress\">Progress</a> is an awesome package to create a progress bar in the console. Install it using <code>npm install progress</code></p>\n<p>This snippet creates a 10-step progress bar, and every 100ms one step is completed. When the bar completes we clear the interval:</p>\n<pre><code class=\"language-js\">const ProgressBar = require('progress');\n\nconst bar = new ProgressBar(':bar', { total: 10 });\n\nconst timer = setInterval(() => {\n    bar.tick();\n\n    if (bar.complete) {\n        clearInterval(timer);\n    }\n}, 100);\n</code></pre>\n<h1>Accept input from the command line in Node.js</h1>\n<p>description: 'How to make a Node.js CLI program interactive using the built-in readline Node.js module'</p>\n<p>How to make a Node.js CLI program interactive?</p>\n<p>Node.js since version 7 provides the <a href=\"images/https://nodejs.org/api/readline.html\"><code>readline</code> module</a> to perform exactly this: get input from a readable stream such as the <code>process.stdin</code> stream, which during the execution of a Node.js program is the terminal input, one line at a time.</p>\n<pre><code class=\"language-js\">const readline = require('readline').createInterface({\n    input: process.stdin,\n\n    output: process.stdout\n});\n\nreadline.question(`What's your name?`, (name) => {\n    console.log(`Hi ${name}!`);\n\n    readline.close();\n});\n</code></pre>\n<p>This piece of code asks the username, and once the text is entered and the user presses enter, we send a greeting.</p>\n<p>The <code>question()</code> method shows the first parameter (a question) and waits for the user input. It calls the callback function once enter is pressed.</p>\n<p>In this callback function, we close the readline interface.</p>\n<p><code>readline</code> offers several other methods, and I'll let you check them out on the package documentation linked above.</p>\n<p>If you need to require a password, it's best not to echo it back, but instead show a <code>*</code> symbol.</p>\n<p>The simplest way is to use the <a href=\"images/https://www.npmjs.com/package/readline-sync\"><code>readline-sync</code> package</a> which is very similar in terms of the API and handles this out of the box.</p>\n<p>A more complete and abstract solution is provided by the <a href=\"images/https://github.com/SBoudrias/Inquirer.js\">Inquirer.js package</a>.</p>\n<p>You can install it using <code>npm install inquirer</code>, and then you can replicate the above code like this:</p>\n<pre><code class=\"language-js\">const inquirer = require('inquirer');\n\nvar questions = [\n    {\n        type: 'input',\n\n        name: 'name',\n\n        message: \"What's your name?\"\n    }\n];\n\ninquirer.prompt(questions).then((answers) => {\n    console.log(`Hi ${answers['name']}!`);\n});\n</code></pre>\n<p>Inquirer.js lets you do many things like asking multiple choices, having radio buttons, confirmations, and more.</p>\n<p>It's worth knowing all the alternatives, especially the built-in ones provided by Node.js, but if you plan to take CLI input to the next level, Inquirer.js is an optimal choice.</p>\n<h1>Expose functionality from a Node.js file using exports</h1>\n<p>description: 'How to use the module.exports API to expose data to other files in your application, or to other applications as well'</p>\n<p>Node.js has a built-in module system.</p>\n<p>A Node.js file can import functionality exposed by other Node.js files.</p>\n<p>When you want to import something you use</p>\n<pre><code class=\"language-js\">const library = require('./library');\n</code></pre>\n<p>to import the functionality exposed in the <code>library.js</code> file that resides in the current file folder.</p>\n<p>In this file, functionality must be exposed before it can be imported by other files.</p>\n<p>Any other object or variable defined in the file by default is private and not exposed to the outer world.</p>\n<p>This is what the <code>module.exports</code> API offered by the <a href=\"images/https://nodejs.org/api/modules.html\"><code>module</code> system</a> allows us to do.</p>\n<p>When you assign an object or a function as a new <code>exports</code> property, that is the thing that's being exposed, and as such, it can be imported in other parts of your app, or in other apps as well.</p>\n<p>You can do so in 2 ways.</p>\n<p>The first is to assign an object to <code>module.exports</code>, which is an object provided out of the box by the module system, and this will make your file export <em>just that object</em>:</p>\n<pre><code class=\"language-js\">// car.js\n\nconst car = {\n    brand: 'Ford',\n\n    model: 'Fiesta'\n};\n\nmodule.exports = car;\n</code></pre>\n<pre><code class=\"language-js\">// index.js\n\nconst car = require('./car');\n</code></pre>\n<p>The second way is to add the exported object as a property of <code>exports</code>. This way allows you to export multiple objects, functions or data:</p>\n<pre><code class=\"language-js\">const car = {\n    brand: 'Ford',\n\n    model: 'Fiesta'\n};\n\nexports.car = car;\n</code></pre>\n<p>or directly</p>\n<pre><code class=\"language-js\">exports.car = {\n    brand: 'Ford',\n\n    model: 'Fiesta'\n};\n</code></pre>\n<p>And in the other file, you'll use it by referencing a property of your import:</p>\n<pre><code class=\"language-js\">const items = require('./items');\n\nconst car = items.car;\n</code></pre>\n<p>or</p>\n<pre><code class=\"language-js\">const car = require('./items').car;\n</code></pre>\n<p>What's the difference between <code>module.exports</code> and <code>exports</code>?</p>\n<p>The first exposes the object it points to.</p>\n<p>The latter exposes <em>the properties</em> of the object it points to.</p>\n<h1>An introduction to the npm package manager</h1>\n<p>description: 'A quick guide to npm, the powerful package manager key to the success of Node.js. In January 2017 over 350000 packages were reported being listed in the npm registry, making it the biggest single language code repository on Earth, and you can be sure there is a package for (almost!) everything.'</p>\n<h2>Introduction to npm</h2>\n<p><code>npm</code> is the standard package manager for Node.js.</p>\n<p>In January 2017 over 350000 packages were reported being listed in the npm registry, making it the biggest single language code repository on Earth, and you can be sure there is a package for (almost!) everything.</p>\n<p>It started as a way to download and manage dependencies of Node.js packages, but it has since become a tool used also in frontend JavaScript.</p>\n<p>There are many things that <code>npm</code> does.</p>\n<blockquote>\n<p><a href=\"images/https://yarnpkg.com/en/\"><strong>Yarn</strong></a> and <a href=\"images/https://pnpm.js.org/\"><strong>pnpm</strong></a> are alternatives to npm cli. You can check them out as well.</p>\n</blockquote>\n<h2>Downloads</h2>\n<p><code>npm</code> manages downloads of dependencies of your project.</p>\n<h3>Installing all dependencies</h3>\n<p>If a project has a <code>package.json</code> file, by running</p>\n<pre><code class=\"language-bash\">npm install\n</code></pre>\n<p>it will install everything the project needs, in the <code>node_modules</code> folder, creating it if it's not existing already.</p>\n<h3>Installing a single package</h3>\n<p>You can also install a specific package by running</p>\n<pre><code class=\"language-bash\">npm install &#x3C;package-name>\n</code></pre>\n<p>Furthermore, since npm 5, this command adds <code>&#x3C;package-name></code> to the <code>package.json</code> file <em>dependencies</em>. Before version 5, you needed to add the flag <code>--save</code>.</p>\n<p>Often you'll see more flags added to this command:</p>\n<ul>\n<li><code>--save-dev</code> installs and adds the entry to the <code>package.json</code> file <em>devDependencies</em></li>\n<li><code>--no-save</code> installs but does not add the entry to the <code>package.json</code> file <em>dependencies</em></li>\n<li><code>--save-optional</code> installs and adds the entry to the <code>package.json</code> file <em>optionalDependencies</em></li>\n<li><code>--no-optional</code> will prevent optional dependencies from being installed</li>\n</ul>\n<p>Shorthands of the flags can also be used:</p>\n<ul>\n<li>-S: --save</li>\n<li>-D: --save-dev</li>\n<li>-O: --save-optional</li>\n</ul>\n<p>The difference between <em>devDependencies</em> and <em>dependencies</em> is that the former contains development tools, like a testing library, while the latter is bundled with the app in production.</p>\n<p>As for the <em>optionalDependencies</em> the difference is that build failure of the dependency will not cause installation to fail. But it is your program's responsibility to handle the lack of the dependency. Read more about <a href=\"images/https://docs.npmjs.com/cli/v7/configuring-npm/package-json#optionaldependencies\">optional dependencies</a>.</p>\n<h3>Updating packages</h3>\n<p>Updating is also made easy, by running</p>\n<pre><code class=\"language-console\">npm update\n</code></pre>\n<p><code>npm</code> will check all packages for a newer version that satisfies your versioning constraints.</p>\n<p>You can specify a single package to update as well:</p>\n<pre><code class=\"language-console\">npm update &#x3C;package-name>\n</code></pre>\n<h2>Versioning</h2>\n<p>In addition to plain downloads, <code>npm</code> also manages <strong>versioning</strong>, so you can specify any specific version of a package, or require a version higher or lower than what you need.</p>\n<p>Many times you'll find that a library is only compatible with a major release of another library.</p>\n<p>Or a bug in the latest release of a lib, still unfixed, is causing an issue.</p>\n<p>Specifying an explicit version of a library also helps to keep everyone on the same exact version of a package, so that the whole team runs the same version until the <code>package.json</code> file is updated.</p>\n<p>In all those cases, versioning helps a lot, and <code>npm</code> follows the semantic versioning (semver) standard.</p>\n<h2>Running Tasks</h2>\n<p>The package.json file supports a format for specifying command line tasks that can be run by using</p>\n<pre><code class=\"language-console\">npm run &#x3C;task-name>\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"language-json\">{\n    \"scripts\": {\n        \"start-dev\": \"node lib/server-development\",\n\n        \"start\": \"node lib/server-production\"\n    }\n}\n</code></pre>\n<p>It's very common to use this feature to run Webpack:</p>\n<pre><code class=\"language-json\">{\n    \"scripts\": {\n        \"watch\": \"webpack --watch --progress --colors --config webpack.conf.js\",\n\n        \"dev\": \"webpack --progress --colors --config webpack.conf.js\",\n\n        \"prod\": \"NODE_ENV=production webpack -p --config webpack.conf.js\"\n    }\n}\n</code></pre>\n<p>So instead of typing those long commands, which are easy to forget or mistype, you can run</p>\n<pre><code class=\"language-console\">$ npm run watch\n\n$ npm run dev\n\n$ npm run prod\n</code></pre>\n<h1>Where does npm install the packages?</h1>\n<p>description: 'How to find out where npm installs the packages'</p>\n<p>When you install a package using <code>npm</code> you can perform 2 types of installation:</p>\n<ul>\n<li>a local install</li>\n<li>a global install</li>\n</ul>\n<p>By default, when you type an <code>npm install</code> command, like:</p>\n<pre><code class=\"language-bash\">npm install lodash\n</code></pre>\n<p>the package is installed in the current file tree, under the <code>node_modules</code> subfolder.</p>\n<p>As this happens, <code>npm</code> also adds the <code>lodash</code> entry in the <code>dependencies</code> property of the <code>package.json</code> file present in the current folder.</p>\n<p>A global installation is performed using the <code>-g</code> flag:</p>\n<pre><code class=\"language-bash\">npm install -g lodash\n</code></pre>\n<p>When this happens, npm won't install the package under the local folder, but instead, it will use a global location.</p>\n<p>Where, exactly?</p>\n<p>The <code>npm root -g</code> command will tell you where that exact location is on your machine.</p>\n<p>On macOS or Linux this location could be <code>/usr/local/lib/node_modules</code>.</p>\n<p>On Windows it could be <code>C:\\Users\\YOU\\AppData\\Roaming\\npm\\node_modules</code></p>\n<p>If you use <code>nvm</code> to manage Node.js versions, however, that location would differ.</p>\n<p>I, for example, use <code>nvm</code> and my packages location was shown as <code>/Users/joe/.nvm/versions/node/v8.9.0/lib/node_modules</code>.</p>\n<h1>How to use or execute a package installed using npm</h1>\n<p>description: 'How to include and use in your code a package installed in your node_modules folder'</p>\n<p>When you install a package into your <code>node_modules</code> folder using <code>npm</code> , or also globally, how do you use it in your Node.js code?</p>\n<p>Say you install <code>lodash</code>, the popular JavaScript utility library, using</p>\n<pre><code class=\"language-bash\">npm install lodash\n</code></pre>\n<p>This is going to install the package in the local <code>node_modules</code> folder.</p>\n<p>To use it in your code, you just need to import it into your program using <code>require</code>:</p>\n<pre><code class=\"language-js\">const _ = require('lodash');\n</code></pre>\n<p>What if your package is an executable?</p>\n<p>In this case, it will put the executable file under the <code>node_modules/.bin/</code> folder.</p>\n<p>One easy way to demonstrate this is <a href=\"images/https://www.npmjs.com/package/cowsay\">cowsay</a>.</p>\n<p>The cowsay package provides a command line program that can be executed to make a cow say something (and other animals as well 🦊).</p>\n<p>When you install the package using <code>npm install cowsay</code>, it will install itself and a few dependencies in the <code>node_modules</code> folder:</p>\n<p><img src=\"images/node_modules-content.png\" alt=\"The node_modules folder content\"></p>\n<p>There is a hidden <code>.bin</code> folder, which contains symbolic links to the cowsay binaries:</p>\n<p><img src=\"images/binary-files.png\" alt=\"The binary files\"></p>\n<p>How do you execute those?</p>\n<p>You can of course type <code>./node_modules/.bin/cowsay</code> to run it, and it works, but <code>npx</code>, included in the recent versions of <code>npm</code> (since 5.2), is a much better option. You just run:</p>\n<pre><code class=\"language-bash\">npx cowsay\n</code></pre>\n<p>and <code>npx</code> will find the package location.</p>\n<p><img src=\"images/cow-say.png\" alt=\"Cow says something\"></p>\n<h1>The package.json guide</h1>\n<p>description: 'The package.json file is a key element in lots of app codebases based on the Node.js ecosystem.'</p>\n<p>If you work with JavaScript, or you've ever interacted with a JavaScript project, Node.js or a frontend project, you surely met the <code>package.json</code> file.</p>\n<p>What's that for? What should you know about it, and what are some of the cool things you can do with it?</p>\n<p>The <code>package.json</code> file is kind of a manifest for your project. It can do a lot of things, completely unrelated. It's a central repository of configuration for tools, for example. It's also where <code>npm</code> and <code>yarn</code> store the names and versions for all the installed packages.</p>\n<h2>The file structure</h2>\n<p>Here's an example package.json file:</p>\n<pre><code class=\"language-json\">{}\n</code></pre>\n<p>It's empty! There are no fixed requirements of what should be in a <code>package.json</code> file, for an application. The only requirement is that it respects the JSON format, otherwise it cannot be read by programs that try to access its properties programmatically.</p>\n<p>If you're building a Node.js package that you want to distribute over <code>npm</code> things change radically, and you must have a set of properties that will help other people use it. We'll see more about this later on.</p>\n<p>This is another package.json:</p>\n<pre><code class=\"language-json\">{\n    \"name\": \"test-project\"\n}\n</code></pre>\n<p>It defines a <code>name</code> property, which tells the name of the app, or package, that's contained in the same folder where this file lives.</p>\n<p>Here's a much more complex example, which was extracted from a sample Vue.js application:</p>\n<pre><code class=\"language-json\">{\n    \"name\": \"test-project\",\n\n    \"version\": \"1.0.0\",\n\n    \"description\": \"A Vue.js project\",\n\n    \"main\": \"src/main.js\",\n\n    \"private\": true,\n\n    \"scripts\": {\n        \"dev\": \"webpack-dev-server --inline --progress --config build/webpack.dev.conf.js\",\n\n        \"start\": \"npm run dev\",\n\n        \"unit\": \"jest --config test/unit/jest.conf.js --coverage\",\n\n        \"test\": \"npm run unit\",\n\n        \"lint\": \"eslint --ext .js,.vue src test/unit\",\n\n        \"build\": \"node build/build.js\"\n    },\n\n    \"dependencies\": {\n        \"vue\": \"^2.5.2\"\n    },\n\n    \"devDependencies\": {\n        \"autoprefixer\": \"^7.1.2\",\n\n        \"babel-core\": \"^6.22.1\",\n\n        \"babel-eslint\": \"^8.2.1\",\n\n        \"babel-helper-vue-jsx-merge-props\": \"^2.0.3\",\n\n        \"babel-jest\": \"^21.0.2\",\n\n        \"babel-loader\": \"^7.1.1\",\n\n        \"babel-plugin-dynamic-import-node\": \"^1.2.0\",\n\n        \"babel-plugin-syntax-jsx\": \"^6.18.0\",\n\n        \"babel-plugin-transform-es2015-modules-commonjs\": \"^6.26.0\",\n\n        \"babel-plugin-transform-runtime\": \"^6.22.0\",\n\n        \"babel-plugin-transform-vue-jsx\": \"^3.5.0\",\n\n        \"babel-preset-env\": \"^1.3.2\",\n\n        \"babel-preset-stage-2\": \"^6.22.0\",\n\n        \"chalk\": \"^2.0.1\",\n\n        \"copy-webpack-plugin\": \"^4.0.1\",\n\n        \"css-loader\": \"^0.28.0\",\n\n        \"eslint\": \"^4.15.0\",\n\n        \"eslint-config-airbnb-base\": \"^11.3.0\",\n\n        \"eslint-friendly-formatter\": \"^3.0.0\",\n\n        \"eslint-import-resolver-webpack\": \"^0.8.3\",\n\n        \"eslint-loader\": \"^1.7.1\",\n\n        \"eslint-plugin-import\": \"^2.7.0\",\n\n        \"eslint-plugin-vue\": \"^4.0.0\",\n\n        \"extract-text-webpack-plugin\": \"^3.0.0\",\n\n        \"file-loader\": \"^1.1.4\",\n\n        \"friendly-errors-webpack-plugin\": \"^1.6.1\",\n\n        \"html-webpack-plugin\": \"^2.30.1\",\n\n        \"jest\": \"^22.0.4\",\n\n        \"jest-serializer-vue\": \"^0.3.0\",\n\n        \"node-notifier\": \"^5.1.2\",\n\n        \"optimize-css-assets-webpack-plugin\": \"^3.2.0\",\n\n        \"ora\": \"^1.2.0\",\n\n        \"portfinder\": \"^1.0.13\",\n\n        \"postcss-import\": \"^11.0.0\",\n\n        \"postcss-loader\": \"^2.0.8\",\n\n        \"postcss-url\": \"^7.2.1\",\n\n        \"rimraf\": \"^2.6.0\",\n\n        \"semver\": \"^5.3.0\",\n\n        \"shelljs\": \"^0.7.6\",\n\n        \"uglifyjs-webpack-plugin\": \"^1.1.1\",\n\n        \"url-loader\": \"^0.5.8\",\n\n        \"vue-jest\": \"^1.0.2\",\n\n        \"vue-loader\": \"^13.3.0\",\n\n        \"vue-style-loader\": \"^3.0.1\",\n\n        \"vue-template-compiler\": \"^2.5.2\",\n\n        \"webpack\": \"^3.6.0\",\n\n        \"webpack-bundle-analyzer\": \"^2.9.0\",\n\n        \"webpack-dev-server\": \"^2.9.1\",\n\n        \"webpack-merge\": \"^4.1.0\"\n    },\n\n    \"engines\": {\n        \"node\": \">= 6.0.0\",\n\n        \"npm\": \">= 3.0.0\"\n    },\n\n    \"browserslist\": [\"> 1%\", \"last 2 versions\", \"not ie &#x3C;= 8\"]\n}\n</code></pre>\n<p>there are <em>lots</em> of things going on here:</p>\n<ul>\n<li><code>version</code> indicates the current version</li>\n<li><code>name</code> sets the application/package name</li>\n<li><code>description</code> is a brief description of the app/package</li>\n<li><code>main</code> sets the entry point for the application</li>\n<li><code>private</code> if set to <code>true</code> prevents the app/package to be accidentally published on <code>npm</code></li>\n<li><code>scripts</code> defines a set of node scripts you can run</li>\n<li><code>dependencies</code> sets a list of <code>npm</code> packages installed as dependencies</li>\n<li><code>devDependencies</code> sets a list of <code>npm</code> packages installed as development dependencies</li>\n<li><code>engines</code> sets which versions of Node.js this package/app works on</li>\n<li><code>browserslist</code> is used to tell which browsers (and their versions) you want to support</li>\n</ul>\n<p>All those properties are used by either <code>npm</code> or other tools that we can use.</p>\n<h2>Properties breakdown</h2>\n<p>Most of those properties are only used on <a href=\"https://www.npmjs.com/\">https://www.npmjs.com/</a>, others by scripts that interact with your code, like <code>npm</code> or others.</p>\n<h3>name</h3>\n<p>Sets the package name.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"name\": \"test-project\"\n</code></pre>\n<p>The name must be less than 214 characters, must not have spaces, it can only contain lowercase letters, hyphens (<code>-</code>) or underscores (<code>_</code>).</p>\n<p>This is because when a package is published on <code>npm</code>, it gets its own URL based on this property.</p>\n<p>If you published this package publicly on GitHub, a good value for this property is the GitHub repository name.</p>\n<h3>author</h3>\n<p>Lists the package author name</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">{\n    \"author\": \"Joe &#x3C;joe@whatever.com> (https://whatever.com)\"\n}\n</code></pre>\n<p>Can also be used with this format:</p>\n<pre><code class=\"language-json\">{\n    \"author\": {\n        \"name\": \"Joe\",\n\n        \"email\": \"joe@whatever.com\",\n\n        \"url\": \"https://whatever.com\"\n    }\n}\n</code></pre>\n<h3>contributors</h3>\n<p>As well as the author, the project can have one or more contributors. This property is an array that lists them.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">{\n    \"contributors\": [\"Joe &#x3C;joe@whatever.com> (https://whatever.com)\"]\n}\n</code></pre>\n<p>Can also be used with this format:</p>\n<pre><code class=\"language-json\">{\n    \"contributors\": [\n        {\n            \"name\": \"Joe\",\n\n            \"email\": \"joe@whatever.com\",\n\n            \"url\": \"https://whatever.com\"\n        }\n    ]\n}\n</code></pre>\n<h3>bugs</h3>\n<p>Links to the package issue tracker, most likely a GitHub issues page</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">{\n    \"bugs\": \"https://github.com/whatever/package/issues\"\n}\n</code></pre>\n<h3>homepage</h3>\n<p>Sets the package homepage</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">{\n    \"homepage\": \"https://whatever.com/package\"\n}\n</code></pre>\n<h3>version</h3>\n<p>Indicates the current version of the package.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"version\": \"1.0.0\"\n</code></pre>\n<p>This property follows the semantic versioning (semver) notation for versions, which means the version is always expressed with 3 numbers: <code>x.x.x</code>.</p>\n<p>The first number is the major version, the second the minor version and the third is the patch version.</p>\n<p>There is a meaning in these numbers: a release that only fixes bugs is a patch release, a release that introduces backward-compatible changes is a minor release, a major release can have breaking changes.</p>\n<h3>license</h3>\n<p>Indicates the license of the package.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"license\": \"MIT\"\n</code></pre>\n<h3>keywords</h3>\n<p>This property contains an array of keywords that associate with what your package does.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"keywords\": [\n\n  \"email\",\n\n  \"machine learning\",\n\n  \"ai\"\n\n]\n</code></pre>\n<p>This helps people find your package when navigating similar packages, or when browsing the <a href=\"https://www.npmjs.com/\">https://www.npmjs.com/</a> website.</p>\n<h3>description</h3>\n<p>This property contains a brief description of the package</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"description\": \"A package to work with strings\"\n</code></pre>\n<p>This is especially useful if you decide to publish your package to <code>npm</code> so that people can find out what the package is about.</p>\n<h3>repository</h3>\n<p>This property specifies where this package repository is located.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"repository\": \"github:whatever/testing\",\n</code></pre>\n<p>Notice the <code>github</code> prefix. There are other popular services baked in:</p>\n<pre><code class=\"language-json\">\"repository\": \"gitlab:whatever/testing\",\n</code></pre>\n<pre><code class=\"language-json\">\"repository\": \"bitbucket:whatever/testing\",\n</code></pre>\n<p>You can explicitly set the version control system:</p>\n<pre><code class=\"language-json\">\"repository\": {\n\n  \"type\": \"git\",\n\n  \"url\": \"https://github.com/whatever/testing.git\"\n\n}\n</code></pre>\n<p>You can use different version control systems:</p>\n<pre><code class=\"language-json\">\"repository\": {\n\n  \"type\": \"svn\",\n\n  \"url\": \"...\"\n\n}\n</code></pre>\n<h3>main</h3>\n<p>Sets the entry point for the package.</p>\n<p>When you import this package in an application, that's where the application will search for the module exports.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"main\": \"src/main.js\"\n</code></pre>\n<h3>private</h3>\n<p>if set to <code>true</code> prevents the app/package to be accidentally published on <code>npm</code></p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"private\": true\n</code></pre>\n<h3>scripts</h3>\n<p>Defines a set of node scripts you can run</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"scripts\": {\n\n  \"dev\": \"webpack-dev-server --inline --progress --config build/webpack.dev.conf.js\",\n\n  \"start\": \"npm run dev\",\n\n  \"unit\": \"jest --config test/unit/jest.conf.js --coverage\",\n\n  \"test\": \"npm run unit\",\n\n  \"lint\": \"eslint --ext .js,.vue src test/unit\",\n\n  \"build\": \"node build/build.js\"\n\n}\n</code></pre>\n<p>These scripts are command line applications. You can run them by calling <code>npm run XXXX</code> or <code>yarn XXXX</code>, where <code>XXXX</code> is the command name. Example: <code>npm run dev</code>.</p>\n<p>You can use any name you want for a command, and scripts can do literally anything you want.</p>\n<h3>dependencies</h3>\n<p>Sets a list of <code>npm</code> packages installed as dependencies.</p>\n<p>When you install a package using npm or yarn:</p>\n<pre><code class=\"language-bash\">npm install &#x3C;PACKAGENAME>\n\nyarn add &#x3C;PACKAGENAME>\n</code></pre>\n<p>that package is automatically inserted in this list.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"dependencies\": {\n\n  \"vue\": \"^2.5.2\"\n\n}\n</code></pre>\n<h3>devDependencies</h3>\n<p>Sets a list of <code>npm</code> packages installed as development dependencies.</p>\n<p>They differ from <code>dependencies</code> because they are meant to be installed only on a development machine, not needed to run the code in production.</p>\n<p>When you install a package using npm or yarn:</p>\n<pre><code class=\"language-bash\">npm install --save-dev &#x3C;PACKAGENAME>\n\nyarn add --dev &#x3C;PACKAGENAME>\n</code></pre>\n<p>that package is automatically inserted in this list.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"devDependencies\": {\n\n  \"autoprefixer\": \"^7.1.2\",\n\n  \"babel-core\": \"^6.22.1\"\n\n}\n</code></pre>\n<h3>engines</h3>\n<p>Sets which versions of Node.js and other commands this package/app work on</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"engines\": {\n\n  \"node\": \">= 6.0.0\",\n\n  \"npm\": \">= 3.0.0\",\n\n  \"yarn\": \"^0.13.0\"\n\n}\n</code></pre>\n<h3>browserslist</h3>\n<p>Is used to tell which browsers (and their versions) you want to support. It's referenced by Babel, Autoprefixer, and other tools, to only add the polyfills and fallbacks needed to the browsers you target.</p>\n<p>Example:</p>\n<pre><code class=\"language-json\">\"browserslist\": [\n\n  \"> 1%\",\n\n  \"last 2 versions\",\n\n  \"not ie &#x3C;= 8\"\n\n]\n</code></pre>\n<p>This configuration means you want to support the last 2 major versions of all browsers with at least 1% of usage (from the <a href=\"images/https://caniuse.com\">CanIUse.com</a> stats), except IE8 and lower.</p>\n<p>(<a href=\"images/https://www.npmjs.com/package/browserslist\">see more</a>)</p>\n<h3>Command-specific properties</h3>\n<p>The <code>package.json</code> file can also host command-specific configuration, for example for Babel, ESLint, and more.</p>\n<p>Each has a specific property, like <code>eslintConfig</code>, <code>babel</code> and others. Those are command-specific, and you can find how to use those in the respective command/project documentation.</p>\n<h2>Package versions</h2>\n<p>You have seen in the description above version numbers like these: <code>~3.0.0</code> or <code>^0.13.0</code>. What do they mean, and which other version specifiers can you use?</p>\n<p>That symbol specifies which updates your package accepts, from that dependency.</p>\n<p>Given that using semver (semantic versioning) all versions have 3 digits, the first being the major release, the second the minor release and the third is the patch release, you have these \"<a href=\"images/https://nodejs.dev/learn/semantic-versioning-using-npm/\">Rules</a>\".</p>\n<p>You can combine most of the versions in ranges, like this: <code>1.0.0 || >=1.1.0 &#x3C;1.2.0</code>, to either use 1.0.0 or one release from 1.1.0 up, but lower than 1.2.0.</p>\n<h1>The package-lock.json file</h1>\n<p>description: \"The package-lock.json file is automatically generated when installing node packages. Learn what it's about\"</p>\n<hr>\n<p>In version 5, npm introduced the <code>package-lock.json</code> file.</p>\n<p>What's that? You probably know about the <code>package.json</code> file, which is much more common and has been around for much longer.</p>\n<p>The goal of <code>package-lock.json</code> file is to keep track of the exact version of every package that is installed so that a product is 100% reproducible in the same way even if packages are updated by their maintainers.</p>\n<p>This solves a very specific problem that <code>package.json</code> left unsolved. In package.json you can set which versions you want to upgrade to (patch or minor), using the <strong>semver</strong> notation, for example:</p>\n<ul>\n<li>if you write <code>~0.13.0</code>, you want to only update patch releases: <code>0.13.1</code> is ok, but <code>0.14.0</code> is not.</li>\n<li>if you write <code>^0.13.0</code>, you want to get updates that do not change the leftmost non-zero number: <code>0.13.1</code>, <code>0.13.2</code> and so on. If you write <code>^1.13.0</code>, you will get patch and minor releases: <code>1.13.1</code>, <code>1.14.0</code> and so on up to <code>2.0.0</code> but not <code>2.0.0</code>.</li>\n<li>if you write <code>0.13.0</code>, that is the exact version that will be used, always</li>\n</ul>\n<p>You don't commit to Git your node_modules folder, which is generally huge, and when you try to replicate the project on another machine by using the <code>npm install</code> command, if you specified the <code>~</code> syntax and a patch release of a package has been released, that one is going to be installed. Same for <code>^</code> and minor releases.</p>\n<blockquote>\n<p>If you specify exact versions, like <code>0.13.0</code> in the example, you are not affected by this problem.</p>\n</blockquote>\n<p>It could be you, or another person trying to initialize the project on the other side of the world by running <code>npm install</code>.</p>\n<p>So your original project and the newly initialized project are actually different. Even if a patch or minor release should not introduce breaking changes, we all know bugs can (and so, they will) slide in.</p>\n<p>The <code>package-lock.json</code> sets your currently installed version of each package <strong>in stone</strong>, and <code>npm</code> will use those exact versions when running <code>npm ci</code>.</p>\n<p>This concept is not new, and other programming languages package managers (like Composer in PHP) use a similar system for years.</p>\n<p>The <code>package-lock.json</code> file needs to be committed to your Git repository, so it can be fetched by other people, if the project is public or you have collaborators, or if you use Git as a source for deployments.</p>\n<p>The dependencies versions will be updated in the <code>package-lock.json</code> file when you run <code>npm update</code>.</p>\n<h2>An example</h2>\n<p>This is an example structure of a <code>package-lock.json</code> file we get when we run <code>npm install cowsay</code> in an empty folder:</p>\n<pre><code class=\"language-json\">{\n\n  \"requires\": true,\n\n  \"lockfileVersion\": 1,\n\n  \"dependencies\": {\n\n    \"ansi-regex\": {\n\n      \"version\": \"3.0.0\",\n\n      \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.\n\n0.0.tgz\",\n\n      \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n\n    },\n\n    \"cowsay\": {\n\n      \"version\": \"1.3.1\",\n\n      \"resolved\": \"https://registry.npmjs.org/cowsay/-/cowsay-1.3.1.tgz\"\n\n,\n\n      \"integrity\": \"sha512-3PVFe6FePVtPj1HTeLin9v8WyLl+VmM1l1H/5P+BTTDkM\n\nAjufp+0F9eLjzRnOHzVAYeIYFF5po5NjRrgefnRMQ==\",\n\n      \"requires\": {\n\n        \"get-stdin\": \"^5.0.1\",\n\n        \"optimist\": \"~0.6.1\",\n\n        \"string-width\": \"~2.1.1\",\n\n        \"strip-eof\": \"^1.0.0\"\n\n      }\n\n    },\n\n    \"get-stdin\": {\n\n      \"version\": \"5.0.1\",\n\n      \"resolved\": \"https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.\n\n1.tgz\",\n\n      \"integrity\": \"sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=\"\n\n    },\n\n    \"is-fullwidth-code-point\": {\n\n      \"version\": \"2.0.0\",\n\n      \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/\n\nis-fullwidth-code-point-2.0.0.tgz\",\n\n      \"integrity\": \"sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=\"\n\n    },\n\n    \"minimist\": {\n\n      \"version\": \"0.0.10\",\n\n      \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.10\n\n.tgz\",\n\n      \"integrity\": \"sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=\"\n\n    },\n\n    \"optimist\": {\n\n      \"version\": \"0.6.1\",\n\n      \"resolved\": \"https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz\",\n\n      \"integrity\": \"sha1-2j6nRob6IaGaERwybpDrFaAZZoY=\",\n\n\n\n      \"requires\": {\n\n        \"minimist\": \"~0.0.1\",\n\n        \"wordwrap\": \"~0.0.2\"\n\n      }\n\n    },\n\n    \"string-width\": {\n\n      \"version\": \"2.1.1\",\n\n      \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz\",\n\n      \"integrity\": \"sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==\",\n\n      \"requires\": {\n\n        \"is-fullwidth-code-point\": \"^2.0.0\",\n\n        \"strip-ansi\": \"^4.0.0\"\n\n      }\n\n    },\n\n    \"strip-ansi\": {\n\n      \"version\": \"4.0.0\",\n\n      \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n\n      \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n\n      \"requires\": {\n\n        \"ansi-regex\": \"^3.0.0\"\n\n      }\n\n    },\n\n    \"strip-eof\": {\n\n      \"version\": \"1.0.0\",\n\n      \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n\n      \"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\"\n\n    },\n\n    \"wordwrap\": {\n\n      \"version\": \"0.0.3\",\n\n      \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz\",\n\n      \"integrity\": \"sha1-o9XabNXAvAAI03I0u68b7WMFkQc=\"\n\n    }\n\n  }\n\n}\n</code></pre>\n<p>We installed <code>cowsay</code>, which depends on</p>\n<ul>\n<li><code>get-stdin</code></li>\n<li><code>optimist</code></li>\n<li><code>string-width</code></li>\n<li><code>strip-eof</code></li>\n</ul>\n<p>In turn, those packages require other packages, as we can see from the <code>requires</code> property that some have:</p>\n<ul>\n<li><code>ansi-regex</code></li>\n<li><code>is-fullwidth-code-point</code></li>\n<li><code>minimist</code></li>\n<li><code>wordwrap</code></li>\n<li><code>strip-eof</code></li>\n</ul>\n<p>They are added in alphabetical order into the file, and each one has a <code>version</code> field, a <code>resolved</code> field that points to the package location, and an <code>integrity</code> string that we can use to verify the package.</p>\n<h1>Computer Networking &#x26; Socket Programming</h1>\n<p>Socket programming is the development of programs for <a href=\"images/https://en.wikipedia.org/wiki/Computer_network\">Computer Networking</a>. Networking applications are loosely based off of the top most layers of the conceptual 7-layer model called the <a href=\"images/https://en.wikipedia.org/wiki/OSI_model\">OSI Model</a>. The layers most relevant to socket programmers is layer 4, the <a href=\"images/https://en.wikipedia.org/wiki/Transport_layer\">Transport layer</a>, and layer 7, the <a href=\"images/https://en.wikipedia.org/wiki/Application_layer\">Application layer</a>. Specific protocols are implemented at each layer, and are instrumental for the functionality of the internet.</p>\n<p>Node.js exposes extensive API's for implementing these protocols so developers can create socket programming applications. The most common example is the <code>http</code> module. <a href=\"images/https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol\">HTTP</a> exists on the Application layer of the OSI Model; if you want to learn more about the <code>http</code> module, read the Node.js <a href=\"images/https://nodejs.org/api/http.html\">http documentation</a> or the Nodejs.dev <a href=\"images/https://nodejs.dev/the-nodejs-http-module\">guide</a>. Another socket programming Node.js module is the <code>dgram</code> module for <a href=\"images/https://en.wikipedia.org/wiki/User_Datagram_Protocol\">UDP</a> communication. UDP exists on the Transport layer; for more information about this technology read the Node.js <a href=\"images/https://nodejs.org/api/dgram.html\">dgram documentaion</a>. More importantly, the <code>net</code> module, which this guide is all about, provides an extensive API for a stream-based TCP server. <a href=\"images/https://en.wikipedia.org/wiki/Transmission_Control_Protocol\">TCP</a> exists on the Transport layer of the OSI Model and is what HTTP is implemented on top of.</p>\n<blockquote>\n<p>TCP is a reliable, ordered, and error-checked delivery of a stream of bytes between applications communicating via an internet protocol (IP) network.</p>\n</blockquote>\n<blockquote>\n</blockquote>\n<blockquote>\n<p>~ <a href=\"images/https://en.wikipedia.org/wiki/Transmission_Control_Protocol\">Wikipedia</a></p>\n</blockquote>\n<h2>Net Module - Getting Started</h2>\n<p>The key part of the <code>net</code> module is the <code>net.Socket</code> class. A socket instance in Node.js is both a <a href=\"images/https://nodejs.org/api/stream.html#stream_duplex_and_transform_streams\">duplex stream</a> and an <a href=\"images/https://nodejs.org/api/events.html#events_class_eventemitter\">event emitter</a>. This means it is readable, writable, and can utilize the event loop. Sockets can be created by the user and by Node.js, and they are the programmatic object for communicating. Sockets must connect to a <code>net.Server</code> class instance; a socket connection to a server is often referred to as a <em>client connection</em>. Every socket connection is considered \"private\" in the sense that the only entities with access to the connection is the server and the client. A server instance <strong>can</strong> have multiple client connections, but will maintain separate communication streams with each connection.</p>\n<p>Lets look at the simplest example of a TCP server, an echo server. An <em>echo server</em> is one which returns the same message sent to it.</p>\n<pre><code class=\"language-js\">const net = require('net');\n\n// Create a TCP server using the `net.createServer()` method\n\n// The callback method is an event listener for the 'connection' event\n\n// This method is passed a single parameter, the client socket connection\n\nconst server = net.createServer((client) => {\n    console.log('Client connected!');\n\n    // The client is a stream, set the data encoding to utf8\n\n    client.setEncoding('utf8');\n\n    // Manual implementation of an echo server:\n\n    client.on('data', (data) => {\n        // data is a UTF-8 string\n\n        console.log(data); // log the message from the client to the server\n\n        client.write(data); // write the same message back to the client\n    });\n\n    // Automatic implementation of an echo server:\n\n    // client is a stream, use the Stream.pipe prototype method to connect it's\n\n    // read stream to it's write stream\n\n    // client.pipe(client)\n});\n\n// Start the server on localhost:8124\n\n// The `http` module, inherits this method for its own http.Server.listen\n\nserver.listen(8124, 'localhost', () => {\n    console.log('Waiting for connection...');\n});\n</code></pre>\n<p>With this server running, connect to it using your system's command-line TCP interface. The two most common are telnet and netcat. If you're unsure which, try both! If neither work, search on Google for \"telnet alternative for &#x3C;your OS>\".</p>\n<p>In another terminal connect to the running TCP server:</p>\n<pre><code class=\"language-bash\">telnet localhost 8124\n\n# or\n\nnc localhost 8124\n</code></pre>\n<p>If you see the message <code>Client connected!</code> in the TCP server terminal, you can begin sending messages from the client connection terminal. Whatever you send should be sent back to you immediatly (if you copy-and-pasted the code from above directly, you'll receive your message twice because their are two echo implementations). Disconnecting is easy; use your terminal's quit keystroke (commonly <code>CTRL+C</code>) or exit the terminal application instance.</p>\n<p>Great work! You have succesfully implemented your first TCP server-client connection.</p>\n<h2>Example using <code>net.createConnection()</code></h2>\n<p>Before starting, open two terminals and startup the Node.js repl (you can also use two files called <code>server.js</code> and <code>client.js</code> respectively). In the following example, we will create a TCP server and a connection to that server using the <code>net</code> module. By doing so, the interactivity is not the same as the previous echo example. In fact, without using other core Node.js modules, this example is completely non-interactive. The client code will disconnect itself at the end of its execution.</p>\n<pre><code class=\"language-js\">// In the first repl, create and start a server\n\nconst net = require('net');\n\nconst server = net.createServer((client) => {\n    console.log('Client connected'); // log the client has connected to the server\n\n    client.setEncoding('utf8'); // set the data encoding\n\n    client.write('Hello from the server!\\n'); // say hello to the new connection\n\n    client.on('data', (data) => {\n        client.write(data.toUpperCase()); // echo the client message in ALL CAPS\n    });\n\n    client.on('end', () => {\n        console.log('Client disconnected'); // log the client has disconnected to the server\n    });\n});\n\nserver.listen(8124, 'localhost', () => {\n    console.log('Waiting for connection...');\n});\n</code></pre>\n<pre><code class=\"language-js\">// In the second repl, create and connect a client\n\nconst net = require('net');\n\nconst client = net.createConnection(8124, 'localhost', () => {\n    console.log('Connected to Server!'); // log the server connection to the client\n\n    client.write('Hello from the client!\\n'); // say hello to the server\n});\n\nclient.setEncoding('utf8'); // set the encoding\n\nclient.on('data', (data) => {\n    console.log(data); // log messages from the server to the client\n\n    client.end(); // end the connection after\n});\n\nclient.on('end', () => {\n    console.log('Disconnected from server'); // log the server disconnection to the client\n});\n</code></pre>\n<p>The second example introduces an additional event listener <code>'end'</code>. This is very useful for determining when a socket connection is terminated. In the client code, the call to <code>client.end()</code> is the programatic way of ending a socket connection.</p>\n<h2>Conclusion</h2>\n<p>Fantastic work! With these two examples you should have what you need to get started building your own TCP communication networks. This guide only brushes the surface of socket programming applications, but the most important take away here is that Node.js implements TCP socket connections as <a href=\"images/https://nodejs.org/api/stream.html#stream_duplex_and_transform_streams\">duplex streams</a> and <a href=\"images/https://nodejs.org/api/events.html#events_class_eventemitter\">event emitters</a>. Understanding those two concepts will benefit your overall understanding of the <code>net</code> module.</p>\n<p>For more capabilities of the <code>net</code> module read the Node.js <a href=\"images/https://nodejs.org/api/net.html\">net documentation</a>.</p>\n<p>To learn more, try completing the following challenges:</p>\n<ul>\n<li>\n<p>Using <code>readline</code> or <code>stream</code> modules, create an interactive client connection script</p>\n<ul>\n<li>this can build on the second example provided in this guide</li>\n</ul>\n</li>\n<li>\n<p>Create a group-chat TCP server</p>\n<ul>\n<li>hint: you can hold multiple client connections in an array</li>\n<li>use multiple arrays for a multi-channel chat server</li>\n<li>for an extra challenge try to implement a basic user-store for authentication of user accounts</li>\n</ul>\n</li>\n<li>\n<p>Create a mini CRUD database server using an idiomatic chat-command interface</p>\n<ul>\n<li>The chat-command interface could use keywords such as <code>create</code>, <code>read</code>, <code>update</code>, and <code>delete</code> so the client can send instructions to the server</li>\n<li>Data can be persisted between sessions using <code>fs</code> to read and write data to files</li>\n</ul>\n</li>\n</ul>\n<h1>Find the installed version of an npm package</h1>\n<p>description: 'How to find out which version of a particular package you have installed in your app'</p>\n<p>To see the version of all installed npm packages, including their dependencies:</p>\n<pre><code class=\"language-bash\">npm list\n</code></pre>\n<p>For example:</p>\n<pre><code class=\"language-bash\">❯ npm list\n\n/Users/joe/dev/node/cowsay\n\n└─┬ cowsay@1.3.1\n\n  ├── get-stdin@5.0.1\n\n  ├─┬ optimist@0.6.1\n\n  │ ├── minimist@0.0.10\n\n  │ └── wordwrap@0.0.3\n\n  ├─┬ string-width@2.1.1\n\n  │ ├── is-fullwidth-code-point@2.0.0\n\n  │ └─┬ strip-ansi@4.0.0\n\n  │   └── ansi-regex@3.0.0\n\n  └── strip-eof@1.0.0\n</code></pre>\n<p>You can also just open the <code>package-lock.json</code> file, but this involves some visual scanning.</p>\n<p><code>npm list -g</code> is the same, but for globally installed packages.</p>\n<p>To get only your top-level packages (basically, the ones you told npm to install and you listed in the <code>package.json</code>), run <code>npm list --depth=0</code>:</p>\n<pre><code class=\"language-bash\">❯ npm list --depth=0\n\n/Users/joe/dev/node/cowsay\n\n└── cowsay@1.3.1\n</code></pre>\n<p>You can get the version of a specific package by specifying its name:</p>\n<pre><code class=\"language-bash\">❯ npm list cowsay\n\n/Users/joe/dev/node/cowsay\n\n└── cowsay@1.3.1\n</code></pre>\n<p>This also works for dependencies of packages you installed:</p>\n<pre><code class=\"language-bash\">❯ npm list minimist\n\n/Users/joe/dev/node/cowsay\n\n└─┬ cowsay@1.3.1\n\n  └─┬ optimist@0.6.1\n\n    └── minimist@0.0.10\n</code></pre>\n<p>If you want to see what's the latest available version of the package on the npm repository, run <code>npm view [package_name] version</code>:</p>\n<pre><code class=\"language-bash\">❯ npm view cowsay version\n\n\n\n1.3.1\n</code></pre>\n<h1>Install an older version of an npm package</h1>\n<p>description: 'Learn how to install an older version of an npm package, something that might be useful to solve a compatibility problem'</p>\n<p>You can install an old version of an npm package using the <code>@</code> syntax:</p>\n<pre><code class=\"language-bash\">npm install &#x3C;package>@&#x3C;version>\n</code></pre>\n<p>Example:</p>\n<pre><code class=\"language-bash\">npm install cowsay\n</code></pre>\n<p>installs version 1.3.1 (at the time of writing).</p>\n<p>Install version 1.2.0 with:</p>\n<pre><code class=\"language-bash\">npm install cowsay@1.2.0\n</code></pre>\n<p>The same can be done with global packages:</p>\n<pre><code class=\"language-bash\">npm install -g webpack@4.16.4\n</code></pre>\n<p>You might also be interested in listing all the previous versions of a package. You can do it with <code>npm view &#x3C;package> versions</code>:</p>\n<pre><code class=\"language-bash\">❯ npm view cowsay versions\n\n\n\n[ '1.0.0',\n\n  '1.0.1',\n\n  '1.0.2',\n\n  '1.0.3',\n\n  '1.1.0',\n\n  '1.1.1',\n\n  '1.1.2',\n\n  '1.1.3',\n\n  '1.1.4',\n\n  '1.1.5',\n\n  '1.1.6',\n\n  '1.1.7',\n\n  '1.1.8',\n\n  '1.1.9',\n\n  '1.2.0',\n\n  '1.2.1',\n\n  '1.3.0',\n\n  '1.3.1' ]\n</code></pre>\n<h1>Update all the Node.js dependencies to their latest version</h1>\n<p>description: 'How do you update all the npm dependencies store in the package.json file, to their latest version available?'</p>\n<p>When you install a package using <code>npm install &#x3C;packagename></code>, the latest available version of the package is downloaded and put in the <code>node_modules</code> folder, and a corresponding entry is added to the <code>package.json</code> and <code>package-lock.json</code> files that are present in your current folder.</p>\n<p>npm calculates the dependencies and installs the latest available version of those as well.</p>\n<p>Let's say you install <a href=\"images/https://www.npmjs.com/package/cowsay\"><code>cowsay</code></a>, a cool command line tool that lets you make a cow say <em>things</em>.</p>\n<p>When you <code>npm install cowsay</code>, this entry is added to the <code>package.json</code> file:</p>\n<pre><code class=\"language-json\">{\n    \"dependencies\": {\n        \"cowsay\": \"^1.3.1\"\n    }\n}\n</code></pre>\n<p>and this is an extract of <code>package-lock.json</code>, where we removed the nested dependencies for clarity:</p>\n<pre><code class=\"language-json\">{\n    \"requires\": true,\n\n    \"lockfileVersion\": 1,\n\n    \"dependencies\": {\n        \"cowsay\": {\n            \"version\": \"1.3.1\",\n\n            \"resolved\": \"https://registry.npmjs.org/cowsay/-/cowsay-1.3.1.tgz\",\n\n            \"integrity\": \"sha512-3PVFe6FePVtPj1HTeLin9v8WyLl+VmM1l1H/5P+BTTDkMAjufp+0F9eLjzRnOHzVAYeIYFF5po5NjRrgefnRMQ==\",\n\n            \"requires\": {\n                \"get-stdin\": \"^5.0.1\",\n\n                \"optimist\": \"~0.6.1\",\n\n                \"string-width\": \"~2.1.1\",\n\n                \"strip-eof\": \"^1.0.0\"\n            }\n        }\n    }\n}\n</code></pre>\n<p>Now those 2 files tell us that we installed version <code>1.3.1</code> of cowsay, and our rule for updates is <code>^1.3.1</code>, which for the npm versioning rules means that npm can update to patch and minor releases: <code>1.3.2</code>, <code>1.4.0</code> and so on.</p>\n<p>If there is a new minor or patch release and we type <code>npm update</code>, the installed version is updated, and the <code>package-lock.json</code> file diligently filled with the new version.</p>\n<p>Since npm version 5.0.0, <code>npm update</code> will update the <code>package.json</code> with the updated version. Use <code>npm update --no-save</code> to not update <code>package.json</code>.</p>\n<p>To discover new releases of the packages, you run <code>npm outdated</code>.</p>\n<p>Here's the list of a few outdated packages in one repository that wasn't updated for quite a while:</p>\n<p><img src=\"images/outdated-packages.png\"></p>\n<p>Some of those updates are major releases. Running <code>npm update</code> won't update the version of those. Major releases are never updated in this way because they (by definition) introduce breaking changes, and <code>npm</code> wants to save you trouble.</p>\n<p>To update all packages to a new major version, install the <code>npm-check-updates</code> package globally:</p>\n<pre><code class=\"language-bash\">npm install -g npm-check-updates\n</code></pre>\n<p>then run it:</p>\n<pre><code class=\"language-bash\">ncu -u\n</code></pre>\n<p>this will upgrade all the version hints in the <code>package.json</code> file, to <code>dependencies</code> and <code>devDependencies</code>, so npm can install the new major version.</p>\n<p>You are now ready to run the update:</p>\n<pre><code class=\"language-bash\">npm update\n</code></pre>\n<p>If you just downloaded the project without the <code>node_modules</code> dependencies and you want to install the shiny new versions first, just run</p>\n<pre><code class=\"language-bash\">npm install\n</code></pre>\n<h1>Semantic Versioning using npm</h1>\n<p>description: 'Semantic Versioning is a convention used to provide a meaning to versions'</p>\n<p>If there's one great thing in Node.js packages, it's that they all agreed on using Semantic Versioning for their version numbering.</p>\n<p>The Semantic Versioning concept is simple: all versions have 3 digits: <code>x.y.z</code>.</p>\n<ul>\n<li>the first digit is the major version</li>\n<li>the second digit is the minor version</li>\n<li>the third digit is the patch version</li>\n</ul>\n<p>When you make a new release, you don't just up a number as you please, but you have rules:</p>\n<ul>\n<li>you up the major version when you make incompatible API changes</li>\n<li>you up the minor version when you add functionality in a backward-compatible manner</li>\n<li>you up the patch version when you make backward-compatible bug fixes</li>\n</ul>\n<p>The convention is adopted all across programming languages, and it is very important that every <code>npm</code> package adheres to it, because the whole system depends on that.</p>\n<p>Why is that so important?</p>\n<p>Because <code>npm</code> set some rules we can use in the <code>package.json</code> file to choose which versions it can update our packages to, when we run <code>npm update</code>.</p>\n<p>The rules use those symbols:</p>\n<ul>\n<li><code>^</code></li>\n<li><code>~</code></li>\n<li><code>></code></li>\n<li><code>>=</code></li>\n<li><code>&#x3C;</code></li>\n<li><code>&#x3C;=</code></li>\n<li><code>=</code></li>\n<li><code>-</code></li>\n<li><code>||</code></li>\n</ul>\n<p>Let's see those rules in detail:</p>\n<ul>\n<li><code>^</code>: It will only do updates that do not change the leftmost non-zero number i.e there can be changes in minor version or patch version but not in major version. If you write <code>^13.1.0</code>, when running <code>npm update</code>, it can update to <code>13.2.0</code>, <code>13.3.0</code> even <code>13.3.1</code>, <code>13.3.2</code> and so on, but not to <code>14.0.0</code> or above.</li>\n<li><code>~</code>: if you write <code>~0.13.0</code> when running <code>npm update</code> it can update to patch releases: <code>0.13.1</code> is ok, but <code>0.14.0</code> is not.</li>\n<li><code>></code>: you accept any version higher than the one you specify</li>\n<li><code>>=</code>: you accept any version equal to or higher than the one you specify</li>\n<li><code>&#x3C;=</code>: you accept any version equal or lower to the one you specify</li>\n<li><code>&#x3C;</code>: you accept any version lower than the one you specify</li>\n<li><code>=</code>: you accept that exact version</li>\n<li><code>-</code>: you accept a range of versions. Example: <code>2.1.0 - 2.6.2</code></li>\n<li><code>||</code>: you combine sets. Example: <code>&#x3C; 2.1 || > 2.6</code></li>\n</ul>\n<p>You can combine some of those notations, for example use <code>1.0.0 || >=1.1.0 &#x3C;1.2.0</code> to either use 1.0.0 or one release from 1.1.0 up, but lower than 1.2.0.</p>\n<p>There are other rules, too:</p>\n<ul>\n<li>no symbol: you accept only that specific version you specify (<code>1.2.1</code>)</li>\n<li><code>latest</code>: you want to use the latest version available</li>\n</ul>\n<h1>Uninstalling npm packages</h1>\n<p>description: 'How to uninstall an npm Node.js package, locally or globally'</p>\n<p>To uninstall a package you have previously installed <strong>locally</strong> (using <code>npm install &#x3C;package-name></code> in the <code>node_modules</code> folder, run</p>\n<pre><code class=\"language-bash\">npm uninstall &#x3C;package-name>\n</code></pre>\n<p>from the project root folder (the folder that contains the node_modules folder).</p>\n<p>Using the <code>-S</code> flag, or <code>--save</code>, this operation will also remove the reference in the <code>package.json</code> file.</p>\n<p>package.json will be automatically updated with devDependency and dependency once you uninstall npm package.</p>\n<p>If the package is installed <strong>globally</strong>, you need to add the <code>-g</code> / <code>--global</code> flag:</p>\n<pre><code class=\"language-bash\">npm uninstall -g &#x3C;package-name>\n</code></pre>\n<p>for example:</p>\n<pre><code class=\"language-bash\">npm uninstall -g webpack\n</code></pre>\n<p>and you can run this command from anywhere you want on your system because the folder where you currently are does not matter.</p>\n<h1>npm global or local packages</h1>\n<p>description: 'When is a package best installed globally? Why?'</p>\n<p>The main difference between local and global packages is this:</p>\n<ul>\n<li><strong>local packages</strong> are installed in the directory where you run <code>npm install &#x3C;package-name></code>, and they are put in the <code>node_modules</code> folder under this directory</li>\n<li><strong>global packages</strong> are all put in a single place in your system (exactly where depends on your setup), regardless of where you run <code>npm install -g &#x3C;package-name></code></li>\n</ul>\n<p>In your code you can only require local packages:</p>\n<pre><code class=\"language-js\">require('package-name');\n</code></pre>\n<p>so when should you install in one way or another?</p>\n<p>In general, <strong>all packages should be installed locally</strong>.</p>\n<p>This makes sure you can have dozens of applications in your computer, all running a different version of each package if needed.</p>\n<p>Updating a global package would make all your projects use the new release, and as you can imagine this might cause nightmares in terms of maintenance, as some packages might break compatibility with further dependencies, and so on.</p>\n<p>All projects have their own local version of a package, even if this might appear like a waste of resources, it's minimal compared to the possible negative consequences.</p>\n<p>A package <strong>should be installed globally</strong> when it provides an executable command that you run from the shell (CLI), and it's reused across projects.</p>\n<p>You can also install executable commands locally and run them using npx, but some packages are just better installed globally.</p>\n<p>Great examples of popular global packages which you might know are</p>\n<ul>\n<li><code>npm</code></li>\n<li><code>create-react-app</code></li>\n<li><code>vue-cli</code></li>\n<li><code>grunt-cli</code></li>\n<li><code>mocha</code></li>\n<li><code>react-native-cli</code></li>\n<li><code>gatsby-cli</code></li>\n<li><code>forever</code></li>\n<li><code>nodemon</code></li>\n</ul>\n<p>You probably have some packages installed globally already on your system. You can see them by running</p>\n<pre><code class=\"language-bash\">npm list -g --depth 0\n</code></pre>\n<p>on your command line.</p>\n<h1>npm dependencies and devDependencies</h1>\n<p>description: 'When is a package a dependency, and when is it a dev dependency?'</p>\n<p>When you install an npm package using <code>npm install &#x3C;package-name></code>, you are installing it as a <strong>dependency</strong>.</p>\n<p>The package is automatically listed in the package.json file, under the <code>dependencies</code> list (as of npm 5: before you had to manually specify <code>--save</code>).</p>\n<p>When you add the <code>-D</code> flag, or <code>--save-dev</code>, you are installing it as a development dependency, which adds it to the <code>devDependencies</code> list.</p>\n<p>Development dependencies are intended as development-only packages, that are unneeded in production. For example testing packages, webpack or Babel.</p>\n<p>When you go in production, if you type <code>npm install</code> and the folder contains a <code>package.json</code> file, they are installed, as npm assumes this is a development deploy.</p>\n<p>You need to set the <code>--production</code> flag (<code>npm install --production</code>) to avoid installing those development dependencies.</p>\n<h1>The npx Node.js Package Runner</h1>\n<p>description: 'npx is a very cool way to run Node.js code, and provides many useful features'</p>\n<p><code>npx</code> is a very powerful command that's been available in <strong>npm</strong> starting version 5.2, released in July 2017.</p>\n<blockquote>\n<p>If you don't want to install npm, you can <a href=\"images/https://www.npmjs.com/package/npx\">install npx as a standalone package</a></p>\n</blockquote>\n<p><code>npx</code> lets you run code built with Node.js and published through the npm registry.</p>\n<h2>Easily run local commands</h2>\n<p>Node.js developers used to publish most of the executable commands as global packages, in order for them to be in the path and executable immediately.</p>\n<p>This was a pain because you could not really install different versions of the same command.</p>\n<p>Running <code>npx commandname</code> automatically finds the correct reference of the command inside the <code>node_modules</code> folder of a project, without needing to know the exact path, and without requiring the package to be installed globally and in the user's path.</p>\n<h2>Installation-less command execution</h2>\n<p>There is another great feature of <code>npx</code>, which is allowing to run commands without first installing them.</p>\n<p>This is pretty useful, mostly because:</p>\n<ol>\n<li>you don't need to install anything</li>\n<li>you can run different versions of the same command, using the syntax @version</li>\n</ol>\n<p>A typical demonstration of using <code>npx</code> is through the <code>cowsay</code> command. <code>cowsay</code> will print a cow saying what you wrote in the command. For example:</p>\n<p><code>cowsay \"Hello\"</code> will print</p>\n<pre><code class=\"language-console\"> _______\n\n&#x3C; Hello >\n\n -------\n\n        \\   ^__^\n\n         \\  (oo)\\_______\n\n            (__)\\       )\\/\\\n\n                ||----w |\n\n                ||     ||\n</code></pre>\n<p>This only works if you have the <code>cowsay</code> command globally installed from npm previously. Otherwise you'll get an error when you try to run the command.</p>\n<p><code>npx</code> allows you to run that npm command without installing it first. If the command isn't found, <code>npx</code> will install it into a central cache:</p>\n<pre><code class=\"language-bash\">npx cowsay \"Hello\"\n</code></pre>\n<p>will do the job.</p>\n<p>Now, this is a funny useless command.</p>\n<p>Other scenarios include:</p>\n<ul>\n<li>running the <code>vue</code> CLI tool to create new applications and run them: <code>npx @vue/cli create my-vue-app</code></li>\n<li>creating a new React app using <code>create-react-app</code>: <code>npx create-react-app my-react-app</code></li>\n</ul>\n<p>and many more.</p>\n<h2>Run some code using a different Node.js version</h2>\n<p>Use the <code>@</code> to specify the version, and combine that with the <a href=\"images/https://www.npmjs.com/package/node\"><code>node</code> npm package</a>:</p>\n<pre><code class=\"language-bash\">npx node@10 -v #v10.18.1\n\nnpx node@12 -v #v12.14.1\n</code></pre>\n<p>This helps to avoid tools like <code>nvm</code> or the other Node.js version management tools.</p>\n<h2>Run arbitrary code snippets directly from a URL</h2>\n<p><code>npx</code> does not limit you to the packages published on the npm registry.</p>\n<p>You can run code that sits in a GitHub gist, for example:</p>\n<pre><code class=\"language-bash\">npx https://gist.github.com/zkat/4bc19503fe9e9309e2bfaa2c58074d32\n</code></pre>\n<p>Of course, you need to be careful when running code that you do not control, as with great power comes great responsibility.</p>\n<h1>'The Node.js Event Loop'</h1>\n<p>description: 'The Event Loop is one of the most important aspects to understand about Node.js'</p>\n<h2>Introduction</h2>\n<p>The <strong>Event Loop</strong> is one of the most important aspects to understand about Node.js.</p>\n<p>Why is this so important? Because it explains how Node.js can be asynchronous and have non-blocking I/O, and so it explains basically the \"killer app\" of Node.js, the thing that made it this successful.</p>\n<p>The Node.js JavaScript code runs on a single thread. There is just one thing happening at a time.</p>\n<p>This is a limitation that's actually very helpful, as it simplifies a lot how you program without worrying about concurrency issues.</p>\n<p>You just need to pay attention to how you write your code and avoid anything that could block the thread, like synchronous network calls or infinite loops.</p>\n<p>In general, in most browsers there is an event loop for every browser tab, to make every process isolated and avoid a web page with infinite loops or heavy processing to block your entire browser.</p>\n<p>The environment manages multiple concurrent event loops, to handle API calls for example. Web Workers run in their own event loop as well.</p>\n<p>You mainly need to be concerned that <em>your code</em> will run on a single event loop, and write code with this thing in mind to avoid blocking it.</p>\n<h2>Blocking the event loop</h2>\n<p>Any JavaScript code that takes too long to return back control to the event loop will block the execution of any JavaScript code in the page, even block the UI thread, and the user cannot click around, scroll the page, and so on.</p>\n<p>Almost all the I/O primitives in JavaScript are non-blocking. Network requests, filesystem operations, and so on. Being blocking is the exception, and this is why JavaScript is based so much on callbacks, and more recently on promises and async/await.</p>\n<h2>The call stack</h2>\n<p>The call stack is a LIFO (Last In, First Out) stack.</p>\n<p>The event loop continuously checks the <strong>call stack</strong> to see if there's any function that needs to run.</p>\n<p>While doing so, it adds any function call it finds to the call stack and executes each one in order.</p>\n<p>You know the error stack trace you might be familiar with, in the debugger or in the browser console? The browser looks up the function names in the call stack to inform you which function originates the current call:</p>\n<p><img src=\"images/exception-call-stack.png\" alt=\"Exception call stack\"></p>\n<h2>A simple event loop explanation</h2>\n<p>Let's pick an example:</p>\n<iframe\n<p>title=\"A simple event loop explanation\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0003-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0003-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0003-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst bar = () => console.log('bar')\n\n\n\nconst baz = () => console.log('baz')\n\n\n\nconst foo = () => {\n\n  console.log('foo')\n\n  bar()\n\n  baz()\n\n}\n\n\n\nfoo()\n\n```\n\n\n\nThis code prints\n\n\n\n```txt\n\nfoo\n\nbar\n\nbaz\n\n```\n\n\n\nas expected.-->\n<p>When this code runs, first <code>foo()</code> is called. Inside <code>foo()</code> we first call <code>bar()</code>, then we call <code>baz()</code>.</p>\n<p>At this point the call stack looks like this:</p>\n<p><img src=\"images/call-stack-first-example.png\" alt=\"Call stack first example\"></p>\n<p>The event loop on every iteration looks if there's something in the call stack, and executes it:</p>\n<p><img src=\"images/execution-order-first-example.png\" alt=\"Execution order first example\"></p>\n<p>until the call stack is empty.</p>\n<h2>Queuing function execution</h2>\n<p>The above example looks normal, there's nothing special about it: JavaScript finds things to execute, runs them in order.</p>\n<p>Let's see how to defer a function until the stack is clear.</p>\n<p>The use case of <code>setTimeout(() => {}, 0)</code> is to call a function, but execute it once every other function in the code has executed.</p>\n<p>Take this example:</p>\n<iframe\n<p>title=\"Queuing function execution\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0004-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0004-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0004-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst bar = () => console.log('bar')\n\n\n\nconst baz = () => console.log('baz')\n\n\n\nconst foo = () => {\n\n  console.log('foo')\n\n  setTimeout(bar, 0)\n\n  baz()\n\n}\n\n\n\nfoo()\n\n```-->\n<p>This code prints, maybe surprisingly:</p>\n<pre><code class=\"language-bash\">foo\n\nbaz\n\nbar\n</code></pre>\n<p>When this code runs, first foo() is called. Inside foo() we first call setTimeout, passing <code>bar</code> as an argument, and we instruct it to run immediately as fast as it can, passing 0 as the timer. Then we call baz().</p>\n<p>At this point the call stack looks like this:</p>\n<p><img src=\"images/call-stack-second-example.png\" alt=\"Call stack second example\"></p>\n<p>Here is the execution order for all the functions in our program:</p>\n<p><img src=\"images/execution-order-second-example.png\" alt=\"Execution order second example\"></p>\n<p>Why is this happening?</p>\n<h2>The Message Queue</h2>\n<p>When setTimeout() is called, the Browser or Node.js starts the timer. Once the timer expires, in this case immediately as we put 0 as the timeout, the callback function is put in the <strong>Message Queue</strong>.</p>\n<p>The Message Queue is also where user-initiated events like click or keyboard events, or fetch responses are queued before your code has the opportunity to react to them. Or also DOM events like <code>onload</code>.</p>\n<p><strong>The loop gives priority to the call stack, and it first processes everything it finds in the call stack, and once there's nothing in there, it goes to pick up things in the message queue.</strong></p>\n<p>We don't have to wait for functions like <code>setTimeout</code>, fetch or other things to do their own work, because they are provided by the browser, and they live on their own threads. For example, if you set the <code>setTimeout</code> timeout to 2 seconds, you don't have to wait 2 seconds - the wait happens elsewhere.</p>\n<h2>ES6 Job Queue</h2>\n<p>ECMAScript 2015 introduced the concept of the Job Queue, which is used by Promises (also introduced in ES6/ES2015). It's a way to execute the result of an async function as soon as possible, rather than being put at the end of the call stack.</p>\n<p>Promises that resolve before the current function ends will be executed right after the current function.</p>\n<p>I find nice the analogy of a rollercoaster ride at an amusement park: the message queue puts you at the back of the queue, behind all the other people, where you will have to wait for your turn, while the job queue is the fastpass ticket that lets you take another ride right after you finished the previous one.</p>\n<p>Example:</p>\n<iframe\n<p>title=\"ECMAScript 2015 Job Queue\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0005-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0005-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0005-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst bar = () => console.log('bar')\n\n\n\nconst baz = () => console.log('baz')\n\n\n\nconst foo = () => {\n\n  console.log('foo')\n\n  setTimeout(bar, 0)\n\n  new Promise((resolve, reject) =>\n\n    resolve('should be right after baz, before bar')\n\n  ).then(resolve => console.log(resolve))\n\n  baz()\n\n}\n\n\n\nfoo()\n\n```\n\n\n\nThis prints\n\n\n\n```txt\n\nfoo\n\nbaz\n\nshould be right after baz, before bar\n\nbar\n\n```-->\n<p>That's a big difference between Promises (and Async/await, which is built on promises) and plain old asynchronous functions through <code>setTimeout()</code> or other platform APIs.</p>\n<p>Finally, here's what the call stack looks like for the example above:</p>\n<p><img src=\"images/call-stack-third-example.png\" alt=\"Call stack third example\"></p>\n<h1>'Understanding process.nextTick()'</h1>\n<p>description: 'The Node.js process.nextTick function interacts with the event loop in a special way'</p>\n<p>As you try to understand the Node.js event loop, one important part of it is <code>process.nextTick()</code>.</p>\n<p>Every time the event loop takes a full trip, we call it a tick.</p>\n<p>When we pass a function to <code>process.nextTick()</code>, we instruct the engine to invoke this function at the end of the current operation, before the next event loop tick starts:</p>\n<pre><code class=\"language-js\">process.nextTick(() => {\n    //do something\n});\n</code></pre>\n<p>The event loop is busy processing the current function code.</p>\n<p>When this operation ends, the JS engine runs all the functions passed to <code>nextTick</code> calls during that operation.</p>\n<p>It's the way we can tell the JS engine to process a function asynchronously (after the current function), but as soon as possible, not queue it.</p>\n<p>Calling <code>setTimeout(() => {}, 0)</code> will execute the function at the end of next tick, much later than when using <code>nextTick()</code> which prioritizes the call and executes it just before the beginning of the next tick.</p>\n<p>Use <code>nextTick()</code> when you want to make sure that in the next event loop iteration that code is already executed.</p>\n<h1>Introduction to Node.js</h1>\n<p>description: \"Getting started guide to Node.js, the server-side JavaScript runtime environment. Node.js is built on top of the Google Chrome V8 JavaScript engine, and it's mainly used to create web servers - but it's not limited to just that.\"</p>\n<hr>\n<p>Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project!</p>\n<p>Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant.</p>\n<p>A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.</p>\n<p>When Node.js performs an I/O operation, like reading from the network, accessing a database or the filesystem, instead of blocking the thread and wasting CPU cycles waiting, Node.js will resume the operations when the response comes back.</p>\n<p>This allows Node.js to handle thousands of concurrent connections with a single server without introducing the burden of managing thread concurrency, which could be a significant source of bugs.</p>\n<p>Node.js has a unique advantage because millions of frontend developers that write JavaScript for the browser are now able to write the server-side code in addition to the client-side code without the need to learn a completely different language.</p>\n<p>In Node.js the new ECMAScript standards can be used without problems, as you don't have to wait for all your users to update their browsers - you are in charge of deciding which ECMAScript version to use by changing the Node.js version, and you can also enable specific experimental features by running Node.js with flags.</p>\n<h2>A Vast Number of Libraries</h2>\n<p>npm with its simple structure helped the ecosystem of Node.js proliferate, and now the npm registry hosts over 1,000,000 open source packages you can freely use.</p>\n<h2>An Example Node.js Application</h2>\n<p>The most common example Hello World of Node.js is a web server:</p>\n<iframe\n<p>title=\"Hello world web server\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0001-01?embed=1&#x26;file=index.js&#x26;zenmode=1\">https://stackblitz.com/edit/nodejs-dev-0001-01?embed=1&#x26;file=index.js&#x26;zenmode=1</a>\"</p>\n<p>alt=\"nodejs-dev-0001-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst http = require('http')\n\n\n\nconst hostname = '127.0.0.1'\n\nconst port = 3000\n\n\n\nconst server = http.createServer((req, res) => {\n\n  res.statusCode = 200\n\n  res.setHeader('Content-Type', 'text/plain')\n\n  res.end('Hello World\\n')\n\n})\n\n\n\nserver.listen(port, hostname, () => {\n\n  console.log(`Server running at http://${hostname}:${port}/`)\n\n})\n\n```\n\n\n\nTo run this snippet, save it as a `server.js` file and run `node server.js` in your terminal.-->\n<p>This code first includes the Node.js <a href=\"images/https://nodejs.org/api/http.html\"><code>http</code> module</a>.</p>\n<p>Node.js has a fantastic <a href=\"images/https://nodejs.org/api/\">standard library</a>, including first-class support for networking.</p>\n<p>The <code>createServer()</code> method of <code>http</code> creates a new HTTP server and returns it.</p>\n<p>The server is set to listen on the specified port and host name. When the server is ready, the callback function is called, in this case informing us that the server is running.</p>\n<p>Whenever a new request is received, the <a href=\"images/https://nodejs.org/api/http.html#http_event_request\"><code>request</code> event</a> is called, providing two objects: a request (an <a href=\"images/https://nodejs.org/api/http.html#http_class_http_incomingmessage\"><code>http.IncomingMessage</code></a> object) and a response (an <a href=\"images/https://nodejs.org/api/http.html#http_class_http_serverresponse\"><code>http.ServerResponse</code></a> object).</p>\n<p>Those 2 objects are essential to handle the HTTP call.</p>\n<p>The first provides the request details. In this simple example, this is not used, but you could access the request headers and request data.</p>\n<p>The second is used to return data to the caller.</p>\n<p>In this case with:</p>\n<pre><code class=\"language-js\">res.statusCode = 200;\n</code></pre>\n<p>we set the statusCode property to 200, to indicate a successful response.</p>\n<p>We set the Content-Type header:</p>\n<pre><code class=\"language-js\">res.setHeader('Content-Type', 'text/plain');\n</code></pre>\n<p>and we close the response, adding the content as an argument to <code>end()</code>:</p>\n<pre><code class=\"language-js\">res.end('Hello World\\n');\n</code></pre>\n<h2>Node.js Frameworks and Tools</h2>\n<p>Node.js is a low-level platform. In order to make things easy and exciting for developers, thousands of libraries were built upon Node.js by the community.</p>\n<p>Many of those established over time as popular options. Here is a non-comprehensive list of the ones worth learning:</p>\n<ul>\n<li><a href=\"images/https://adonisjs.com/\"><strong>AdonisJS</strong></a>: A TypeScript-based fully featured framework highly focused on developer ergonomics, stability, and confidence. Adonis is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"images/https://eggjs.org/en/\"><strong>Egg.js</strong></a>: A framework to build better enterprise frameworks and apps with Node.js &#x26; Koa.</li>\n<li><a href=\"images/https://expressjs.com/\"><strong>Express</strong></a>: It provides one of the most simple yet powerful ways to create a web server. Its minimalist approach, unopinionated, focused on the core features of a server, is key to its success.</li>\n<li><a href=\"images/https://fastify.io/\"><strong>Fastify</strong></a>: A web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. Fastify is one of the fastest Node.js web frameworks.</li>\n<li><a href=\"images/https://feathersjs.com/\"><strong>FeatherJS</strong></a>: Feathers is a lightweight web-framework for creating real-time applications and REST APIs using JavaScript or TypeScript. Build prototypes in minutes and production-ready apps in days.</li>\n<li><a href=\"images/https://www.gatsbyjs.com/\"><strong>Gatsby</strong></a>: A <a href=\"images/https://reactjs.org/\">React</a>-based, <a href=\"images/https://graphql.org/\">GraphQL</a> powered, static site generator with a very rich ecosystem of plugins and starters.</li>\n<li><a href=\"images/https://hapijs.com\"><strong>hapi</strong></a>: A rich framework for building applications and services that enables developers to focus on writing reusable application logic instead of spending time building infrastructure.</li>\n<li><a href=\"images/http://koajs.com/\"><strong>koa</strong></a>: It is built by the same team behind Express, aims to be even simpler and smaller, building on top of years of knowledge. The new project born out of the need to create incompatible changes without disrupting the existing community.</li>\n<li><a href=\"images/https://loopback.io/\"><strong>Loopback.io</strong></a>: Makes it easy to build modern applications that require complex integrations.</li>\n<li><a href=\"images/https://meteor.com\"><strong>Meteor</strong></a>: An incredibly powerful full-stack framework, powering you with an isomorphic approach to building apps with JavaScript, sharing code on the client and the server. Once an off-the-shelf tool that provided everything, now integrates with frontend libs <a href=\"images/https://reactjs.org/\">React</a>, <a href=\"images/https://vuejs.org/\">Vue</a>, and <a href=\"images/https://angular.io\">Angular</a>. Can be used to create mobile apps as well.</li>\n<li><a href=\"images/https://github.com/zeit/micro\"><strong>Micro</strong></a>: It provides a very lightweight server to create asynchronous HTTP microservices.</li>\n<li><a href=\"images/https://nestjs.com/\"><strong>NestJS</strong></a>: A TypeScript based progressive Node.js framework for building enterprise-grade efficient, reliable and scalable server-side applications.</li>\n<li><a href=\"images/https://nextjs.org/\"><strong>Next.js</strong></a>: <a href=\"images/https://reactjs.org\">React</a> framework that gives you the best developer experience with all the features you need for production: hybrid static &#x26; server rendering, TypeScript support, smart bundling, route pre-fetching, and more.</li>\n<li><a href=\"images/https://nx.dev/\"><strong>Nx</strong></a>: A toolkit for full-stack monorepo development using NestJS, Express, <a href=\"images/https://reactjs.org/\">React</a>, <a href=\"images/https://angular.io\">Angular</a>, and more! Nx helps scale your development from one team building one application to many teams collaborating on multiple applications!</li>\n<li><a href=\"images/https://sapper.svelte.dev/\"><strong>Sapper</strong></a>: Sapper is a framework for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing. Offers SSR and more!</li>\n<li><a href=\"images/https://socket.io/\"><strong>Socket.io</strong></a>: A real-time communication engine to build network applications.</li>\n<li><a href=\"images/https://strapi.io/\"><strong>Strapi</strong></a>: Strapi is a flexible, open-source Headless CMS that gives developers the freedom to choose their favorite tools and frameworks while also allowing editors to easily manage and distribute their content. By making the admin panel and API extensible through a plugin system, Strapi enables the world's largest companies to accelerate content delivery while building beautiful digital experiences.</li>\n</ul>\n<h1>'Understanding setImmediate()'</h1>\n<p>description: 'The Node.js setImmediate function interacts with the event loop in a special way'</p>\n<p>When you want to execute some piece of code asynchronously, but as soon as possible, one option is to use the <code>setImmediate()</code> function provided by Node.js:</p>\n<pre><code class=\"language-js\">setImmediate(() => {\n    //run something\n});\n</code></pre>\n<p>Any function passed as the setImmediate() argument is a callback that's executed in the next iteration of the event loop.</p>\n<p>How is <code>setImmediate()</code> different from <code>setTimeout(() => {}, 0)</code> (passing a 0ms timeout), and from <code>process.nextTick()</code>?</p>\n<p>A function passed to <code>process.nextTick()</code> is going to be executed on the current iteration of the event loop, after the current operation ends. This means it will always execute before <code>setTimeout</code> and <code>setImmediate</code>.</p>\n<p>A <code>setTimeout()</code> callback with a 0ms delay is very similar to <code>setImmediate()</code>. The execution order will depend on various factors, but they will be both run in the next iteration of the event loop.</p>\n<h1>Discover JavaScript Timers</h1>\n<p>description: 'When writing JavaScript code, you might want to delay the execution of a function. Learn how to use setTimeout and setInterval to schedule functions in the future'</p>\n<h2><code>setTimeout()</code></h2>\n<p>When writing JavaScript code, you might want to delay the execution of a function.</p>\n<p>This is the job of <code>setTimeout</code>. You specify a callback function to execute later, and a value expressing how later you want it to run, in milliseconds:</p>\n<pre><code class=\"language-js\">setTimeout(() => {\n    // runs after 2 seconds\n}, 2000);\n\nsetTimeout(() => {\n    // runs after 50 milliseconds\n}, 50);\n</code></pre>\n<p>This syntax defines a new function. You can call whatever other function you want in there, or you can pass an existing function name, and a set of parameters:</p>\n<pre><code class=\"language-js\">const myFunction = (firstParam, secondParam) => {\n    // do something\n};\n\n// runs after 2 seconds\n\nsetTimeout(myFunction, 2000, firstParam, secondParam);\n</code></pre>\n<p><code>setTimeout</code> returns the timer id. This is generally not used, but you can store this id, and clear it if you want to delete this scheduled function execution:</p>\n<pre><code class=\"language-js\">const id = setTimeout(() => {\n    // should run after 2 seconds\n}, 2000);\n\n// I changed my mind\n\nclearTimeout(id);\n</code></pre>\n<h3>Zero delay</h3>\n<p>If you specify the timeout delay to <code>0</code>, the callback function will be executed as soon as possible, but after the current function execution:</p>\n<pre><code class=\"language-js\">setTimeout(() => {\n    console.log('after ');\n}, 0);\n\nconsole.log(' before ');\n</code></pre>\n<p>This code will print</p>\n<pre><code class=\"language-bash\">before\n\nafter\n</code></pre>\n<p>This is especially useful to avoid blocking the CPU on intensive tasks and let other functions be executed while performing a heavy calculation, by queuing functions in the scheduler.</p>\n<blockquote>\n<p>Some browsers (IE and Edge) implement a <code>setImmediate()</code> method that does this same exact functionality, but it's not standard and <a href=\"images/https://caniuse.com/#feat=setimmediate\">unavailable on other browsers</a>. But it's a standard function in Node.js.</p>\n</blockquote>\n<h2><code>setInterval()</code></h2>\n<p><code>setInterval</code> is a function similar to <code>setTimeout</code>, with a difference: instead of running the callback function once, it will run it forever, at the specific time interval you specify (in milliseconds):</p>\n<pre><code class=\"language-js\">setInterval(() => {\n    // runs every 2 seconds\n}, 2000);\n</code></pre>\n<p>The function above runs every 2 seconds unless you tell it to stop, using <code>clearInterval</code>, passing it the interval id that <code>setInterval</code> returned:</p>\n<pre><code class=\"language-js\">const id = setInterval(() => {\n    // runs every 2 seconds\n}, 2000);\n\nclearInterval(id);\n</code></pre>\n<p>It's common to call <code>clearInterval</code> inside the setInterval callback function, to let it auto-determine if it should run again or stop. For example this code runs something unless App.somethingIWait has the value <code>arrived</code>:</p>\n<pre><code class=\"language-js\">const interval = setInterval(() => {\n    if (App.somethingIWait === 'arrived') {\n        clearInterval(interval);\n\n        return;\n    }\n\n    // otherwise do things\n}, 100);\n</code></pre>\n<h2>Recursive setTimeout</h2>\n<p><code>setInterval</code> starts a function every n milliseconds, without any consideration about when a function finished its execution.</p>\n<p>If a function always takes the same amount of time, it's all fine:</p>\n<p><img src=\"images/setinterval-ok.png\" alt=\"setInterval working fine\"></p>\n<p>Maybe the function takes different execution times, depending on network conditions for example:</p>\n<p><img src=\"images/setinterval-varying-duration.png\" alt=\"setInterval varying duration\"></p>\n<p>And maybe one long execution overlaps the next one:</p>\n<p><img src=\"images/setinterval-overlapping.png\" alt=\"setInterval overlapping\"></p>\n<p>To avoid this, you can schedule a recursive setTimeout to be called when the callback function finishes:</p>\n<pre><code class=\"language-js\">const myFunction = () => {\n    // do something\n\n    setTimeout(myFunction, 1000);\n};\n\nsetTimeout(myFunction, 1000);\n</code></pre>\n<p>to achieve this scenario:</p>\n<p><img src=\"images/recursive-settimeout.png\" alt=\"Recursive setTimeout\"></p>\n<p><code>setTimeout</code> and <code>setInterval</code> are available in Node.js, through the <a href=\"images/https://nodejs.org/api/timers.html\">Timers module</a>.</p>\n<p>Node.js also provides <code>setImmediate()</code>, which is equivalent to using <code>setTimeout(() => {}, 0)</code>, mostly used to work with the Node.js Event Loop.</p>\n<h1>'JavaScript Asynchronous Programming and Callbacks'</h1>\n<p>description: 'JavaScript is synchronous by default, and is single threaded. This means that code cannot create new threads and run in parallel. Find out what asynchronous code means and how it looks like'</p>\n<h2>Asynchronicity in Programming Languages</h2>\n<p>Computers are asynchronous by design.</p>\n<p>Asynchronous means that things can happen independently of the main program flow.</p>\n<p>In the current consumer computers, every program runs for a specific time slot and then it stops its execution to let another program continue their execution. This thing runs in a cycle so fast that it's impossible to notice. We think our computers run many programs simultaneously, but this is an illusion (except on multiprocessor machines).</p>\n<p>Programs internally use <em>interrupts</em>, a signal that's emitted to the processor to gain the attention of the system.</p>\n<p>I won't go into the internals of this, but just keep in mind that it's normal for programs to be asynchronous and halt their execution until they need attention, allowing the computer to execute other things in the meantime. When a program is waiting for a response from the network, it cannot halt the processor until the request finishes.</p>\n<p>Normally, programming languages are synchronous and some provide a way to manage asynchronicity in the language or through libraries. C, Java, C#, PHP, Go, Ruby, Swift, and Python are all synchronous by default. Some of them handle async by using threads, spawning a new process.</p>\n<h2>JavaScript</h2>\n<p>JavaScript is <strong>synchronous</strong> by default and is single threaded. This means that code cannot create new threads and run in parallel.</p>\n<p>Lines of code are executed in series, one after another, for example:</p>\n<pre><code class=\"language-js\">const a = 1;\n\nconst b = 2;\n\nconst c = a * b;\n\nconsole.log(c);\n\ndoSomething();\n</code></pre>\n<p>But JavaScript was born inside the browser, its main job, in the beginning, was to respond to user actions, like <code>onClick</code>, <code>onMouseOver</code>, <code>onChange</code>, <code>onSubmit</code> and so on. How could it do this with a synchronous programming model?</p>\n<p>The answer was in its environment. The <strong>browser</strong> provides a way to do it by providing a set of APIs that can handle this kind of functionality.</p>\n<p>More recently, Node.js introduced a non-blocking I/O environment to extend this concept to file access, network calls and so on.</p>\n<h2>Callbacks</h2>\n<p>You can't know when a user is going to click a button. So, you <strong>define an event handler for the click event</strong>. This event handler accepts a function, which will be called when the event is triggered:</p>\n<pre><code class=\"language-js\">document.getElementById('button').addEventListener('click', () => {\n    //item clicked\n});\n</code></pre>\n<p>This is the so-called <strong>callback</strong>.</p>\n<p>A callback is a simple function that's passed as a value to another function, and will only be executed when the event happens. We can do this because JavaScript has first-class functions, which can be assigned to variables and passed around to other functions (called <strong>higher-order functions</strong>)</p>\n<p>It's common to wrap all your client code in a <code>load</code> event listener on the <code>window</code> object, which runs the callback function only when the page is ready:</p>\n<pre><code class=\"language-js\">window.addEventListener('load', () => {\n    //window loaded\n    //do what you want\n});\n</code></pre>\n<p>Callbacks are used everywhere, not just in DOM events.</p>\n<p>One common example is by using timers:</p>\n<pre><code class=\"language-js\">setTimeout(() => {\n    // runs after 2 seconds\n}, 2000);\n</code></pre>\n<p>XHR requests also accept a callback, in this example by assigning a function to a property that will be called when a particular event occurs (in this case, the state of the request changes):</p>\n<pre><code class=\"language-js\">const xhr = new XMLHttpRequest();\n\nxhr.onreadystatechange = () => {\n    if (xhr.readyState === 4) {\n        xhr.status === 200 ? console.log(xhr.responseText) : console.error('error');\n    }\n};\n\nxhr.open('GET', 'https://yoursite.com');\n\nxhr.send();\n</code></pre>\n<h2>Handling errors in callbacks</h2>\n<p>How do you handle errors with callbacks? One very common strategy is to use what Node.js adopted: the first parameter in any callback function is the error object: <strong>error-first callbacks</strong></p>\n<p>If there is no error, the object is <code>null</code>. If there is an error, it contains some description of the error and other information.</p>\n<pre><code class=\"language-js\">fs.readFile('/file.json', (err, data) => {\n    if (err) {\n        //handle error\n\n        console.log(err);\n\n        return;\n    }\n\n    //no errors, process data\n\n    console.log(data);\n});\n</code></pre>\n<h2>The problem with callbacks</h2>\n<p>Callbacks are great for simple cases!</p>\n<p>However every callback adds a level of nesting, and when you have lots of callbacks, the code starts to be complicated very quickly:</p>\n<pre><code class=\"language-js\">window.addEventListener('load', () => {\n    document.getElementById('button').addEventListener('click', () => {\n        setTimeout(() => {\n            items.forEach((item) => {\n                //your code here\n            });\n        }, 2000);\n    });\n});\n</code></pre>\n<p>This is just a simple 4-levels code, but I've seen much more levels of nesting and it's not fun.</p>\n<p>How do we solve this?</p>\n<h2>Alternatives to callbacks</h2>\n<p>Starting with ES6, JavaScript introduced several features that help us with asynchronous code that do not involve using callbacks: Promises (ES6) and Async/Await (ES2017).</p>\n<h1>Understanding JavaScript Promises</h1>\n<p>description: 'Promises are one way to deal with asynchronous code in JavaScript, without writing too many callbacks in your code.'</p>\n<h2>Introduction to promises</h2>\n<iframe\n<p>title=\"Introduction to promises\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0006-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0006-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0006-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<p>A promise is commonly defined as <strong>a proxy for a value that will eventually become available</strong>.</p>\n<p>Promises are one way to deal with asynchronous code, without getting stuck in <a href=\"images/http://callbackhell.com/\">callback hell</a>.</p>\n<p>Promises have been part of the language for years (standardized and introduced in ES2015), and have recently become more integrated, with <strong>async</strong> and <strong>await</strong> in ES2017.</p>\n<p><strong>Async functions</strong> use promises behind the scenes, so understanding how promises work is fundamental to understanding how <code>async</code> and <code>await</code> work.</p>\n<h3>How promises work, in brief</h3>\n<p>Once a promise has been called, it will start in a <strong>pending state</strong>. This means that the calling function continues executing, while the promise is pending until it resolves, giving the calling function whatever data was being requested.</p>\n<p>The created promise will eventually end in a <strong>resolved state</strong>, or in a <strong>rejected state</strong>, calling the respective callback functions (passed to <code>then</code> and <code>catch</code>) upon finishing.</p>\n<h3>Which JS APIs use promises?</h3>\n<p>In addition to your own code and libraries code, promises are used by standard modern Web APIs such as:</p>\n<ul>\n<li>the Battery API</li>\n<li>the Fetch API</li>\n<li>Service Workers</li>\n</ul>\n<p>It's unlikely that in modern JavaScript you'll find yourself <em>not</em> using promises, so let's start diving right into them.</p>\n<hr>\n<h2>Creating a promise</h2>\n<p>The Promise API exposes a Promise constructor, which you initialize using <code>new Promise()</code>:</p>\n<pre><code class=\"language-js\">let done = true;\n\nconst isItDoneYet = new Promise((resolve, reject) => {\n    if (done) {\n        const workDone = 'Here is the thing I built';\n\n        resolve(workDone);\n    } else {\n        const why = 'Still working on something else';\n\n        reject(why);\n    }\n});\n</code></pre>\n<p>As you can see, the promise checks the <code>done</code> global constant, and if that's true, the promise goes to a <strong>resolved</strong> state (since the <code>resolve</code> callback was called); otherwise, the <code>reject</code> callback is executed, putting the promise in a rejected state. (If none of these functions is called in the execution path, the promise will remain in a pending state)</p>\n<p>A more common example you may come across is a technique called <strong>Promisifying</strong>. This technique is a way to be able to use a classic JavaScript function that takes a callback, and have it return a promise:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst getFile = (fileName) => {\n    return new Promise((resolve, reject) => {\n        fs.readFile(fileName, (err, data) => {\n            if (err) {\n                reject(err); // calling `reject` will cause the promise to fail with or without the error passed as an argument\n\n                return; // and we don't want to go any further\n            }\n\n            resolve(data);\n        });\n    });\n};\n\ngetFile('/etc/passwd')\n    .then((data) => console.log(data))\n\n    .catch((err) => console.error(err));\n</code></pre>\n<blockquote>\n<p>In recent versions of Node.js, you won't have to do this manual conversion for a lot of the API. There is a promisifying function available in the <a href=\"images/https://nodejs.org/docs/latest-v11.x/api/util.html#util_util_promisify_original\">util module</a> that will do this for you, given that the function you're promisifying has the correct signature.</p>\n</blockquote>\n<hr>\n<h2>Consuming a promise</h2>\n<p>Now let's see how the promise can be <em>consumed</em> or used.</p>\n<pre><code class=\"language-js\">const isItDoneYet = new Promise(/* ... as above ... */);\n\n//...\n\nconst checkIfItsDone = () => {\n    isItDoneYet\n\n        .then((ok) => {\n            console.log(ok);\n        })\n\n        .catch((err) => {\n            console.error(err);\n        });\n};\n</code></pre>\n<p>Running <code>checkIfItsDone()</code> will specify functions to execute when the <code>isItDoneYet</code> promise resolves (in the <code>then</code> call) or rejects (in the <code>catch</code> call).</p>\n<hr>\n<h2>Chaining promises</h2>\n<p>A promise can be returned to another promise, creating a chain of promises.</p>\n<p>A great example of chaining promises is the Fetch API, which we can use to get a resource and queue a chain of promises to execute when the resource is fetched.</p>\n<p>The Fetch API is a promise-based mechanism, and calling <code>fetch()</code> is equivalent to defining our own promise using <code>new Promise()</code>.</p>\n<h3>Example of chaining promises</h3>\n<pre><code class=\"language-js\">const status = (response) => {\n    if (response.status >= 200 &#x26;&#x26; response.status &#x3C; 300) {\n        return Promise.resolve(response);\n    }\n\n    return Promise.reject(new Error(response.statusText));\n};\n\nconst json = (response) => response.json();\n\nfetch('/todos.json')\n    .then(status) // note that the `status` function is actually **called** here, and that it **returns a promise***\n\n    .then(json) // likewise, the only difference here is that the `json` function here returns a promise that resolves with `data`\n\n    .then((data) => {\n        // ... which is why `data` shows up here as the first parameter to the anonymous function\n\n        console.log('Request succeeded with JSON response', data);\n    })\n\n    .catch((error) => {\n        console.log('Request failed', error);\n    });\n</code></pre>\n<blockquote>\n<p><code><a href=\"https://www.npmjs.com/package/node-fetch\">node-fetch</a></code> is minimal code for window.fetch compatible API on Node.js runtime.</p>\n</blockquote>\n<p>In this example, we call <code>fetch()</code> to get a list of TODO items from the <code>todos.json</code> file found in the domain root, and we create a chain of promises.</p>\n<p>Running <code>fetch()</code> returns a <a href=\"images/https://fetch.spec.whatwg.org/#concept-response\">response</a>, which has many properties, and within those we reference:</p>\n<ul>\n<li><code>status</code>, a numeric value representing the HTTP status code</li>\n<li><code>statusText</code>, a status message, which is <code>OK</code> if the request succeeded</li>\n</ul>\n<p><code>response</code> also has a <code>json()</code> method, which returns a promise that will resolve with the content of the body processed and transformed into JSON.</p>\n<p>So given those promises, this is what happens: the first promise in the chain is a function that we defined, called <code>status()</code>, that checks the response status and if it's not a success response (between 200 and 299), it rejects the promise.</p>\n<p>This operation will cause the promise chain to skip all the chained promises listed and will skip directly to the <code>catch()</code> statement at the bottom, logging the <code>Request failed</code> text along with the error message.</p>\n<p>If that succeeds instead, it calls the <code>json()</code> function we defined. Since the previous promise, when successful, returned the <code>response</code> object, we get it as an input to the second promise.</p>\n<p>In this case, we return the data JSON processed, so the third promise receives the JSON directly:</p>\n<pre><code class=\"language-js\">.then((data) => {\n\n  console.log('Request succeeded with JSON response', data)\n\n})\n</code></pre>\n<p>and we simply log it to the console.</p>\n<hr>\n<h2>Handling errors</h2>\n<p>When anything in the chain of promises fails and raises an error or rejects the promise, the control goes to the nearest <code>catch()</code> statement down the chain.</p>\n<pre><code class=\"language-js\">new Promise((resolve, reject) => {\n    throw new Error('Error');\n}).catch((err) => {\n    console.error(err);\n});\n\n// or\n\nnew Promise((resolve, reject) => {\n    reject('Error');\n}).catch((err) => {\n    console.error(err);\n});\n</code></pre>\n<h3>Cascading errors</h3>\n<p>If inside the <code>catch()</code> you raise an error, you can append a second <code>catch()</code> to handle it, and so on.</p>\n<pre><code class=\"language-js\">new Promise((resolve, reject) => {\n    throw new Error('Error');\n})\n\n    .catch((err) => {\n        throw new Error('Error');\n    })\n\n    .catch((err) => {\n        console.error(err);\n    });\n</code></pre>\n<hr>\n<h2>Orchestrating promises</h2>\n<h3><code>Promise.all()</code></h3>\n<p>If you need to synchronize different promises, <code>Promise.all()</code> helps you define a list of promises, and execute something when they are all resolved.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">const f1 = fetch('/something.json');\n\nconst f2 = fetch('/something2.json');\n\nPromise.all([f1, f2])\n\n    .then((res) => {\n        console.log('Array of results', res);\n    })\n\n    .catch((err) => {\n        console.error(err);\n    });\n</code></pre>\n<p>The ES2015 destructuring assignment syntax allows you to also do</p>\n<pre><code class=\"language-js\">Promise.all([f1, f2]).then(([res1, res2]) => {\n    console.log('Results', res1, res2);\n});\n</code></pre>\n<p>You are not limited to using <code>fetch</code> of course, <strong>any promise can be used in this fashion</strong>.</p>\n<h3><code>Promise.race()</code></h3>\n<p><code>Promise.race()</code> runs when the first of the promises you pass to it settles (resolves or rejects), and it runs the attached callback just once, with the result of the first promise settled.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">const first = new Promise((resolve, reject) => {\n    setTimeout(resolve, 500, 'first');\n});\n\nconst second = new Promise((resolve, reject) => {\n    setTimeout(resolve, 100, 'second');\n});\n\nPromise.race([first, second]).then((result) => {\n    console.log(result); // second\n});\n</code></pre>\n<h3><code>Promise.any()</code></h3>\n<p><code>Promise.any()</code> settles when any of the promises you pass to it fulfill or all of the promises get rejected. It returns a single promise that resolves with the value from the first promise that is fulfilled. If all promises are rejected, then the returned promise is rejected with an <code>AggregateError</code>.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">const first = new Promise((resolve, reject) => {\n    setTimeout(reject, 500, 'first');\n});\n\nconst second = new Promise((resolve, reject) => {\n    setTimeout(reject, 100, 'second');\n});\n\nPromise.any([first, second]).catch((error) => {\n    console.log(error); // AggregateError\n});\n</code></pre>\n<h2>Common errors</h2>\n<h3>Uncaught TypeError: undefined is not a promise</h3>\n<p>If you get the <code>Uncaught TypeError: undefined is not a promise</code> error in the console, make sure you use <code>new Promise()</code> instead of just <code>Promise()</code></p>\n<h3>UnhandledPromiseRejectionWarning</h3>\n<p>This means that a promise you called rejected, but there was no <code>catch</code> used to handle the error. Add a <code>catch</code> after the offending <code>then</code> to handle this properly.</p>\n<h1>'Modern Asynchronous JavaScript with Async and Await'</h1>\n<p>description: 'Discover the modern approach to asynchronous functions in JavaScript. JavaScript evolved in a very short time from callbacks to Promises, and since ES2017 asynchronous JavaScript is even simpler with the async/await syntax'</p>\n<h2>Introduction</h2>\n<p>JavaScript evolved in a very short time from callbacks to promises (ES2015), and since ES2017 asynchronous JavaScript is even simpler with the async/await syntax.</p>\n<p>Async functions are a combination of promises and generators, and basically, they are a higher level abstraction over promises. Let me repeat: <strong>async/await is built on promises</strong>.</p>\n<h2>Why were async/await introduced?</h2>\n<p>They reduce the boilerplate around promises, and the \"don't break the chain\" limitation of chaining promises.</p>\n<p>When Promises were introduced in ES2015, they were meant to solve a problem with asynchronous code, and they did, but over the 2 years that separated ES2015 and ES2017, it was clear that <em>promises could not be the ultimate solution</em>.</p>\n<p>Promises were introduced to solve the famous <em>callback hell</em> problem, but they introduced complexity on their own, and syntax complexity.</p>\n<p>They were good primitives around which a better syntax could be exposed to the developers, so when the time was right we got <strong>async functions</strong>.</p>\n<p>They make the code look like it's synchronous, but it's asynchronous and non-blocking behind the scenes.</p>\n<h2>How it works</h2>\n<p>An async function returns a promise, like in this example:</p>\n<pre><code class=\"language-js\">const doSomethingAsync = () => {\n    return new Promise((resolve) => {\n        setTimeout(() => resolve('I did something'), 3000);\n    });\n};\n</code></pre>\n<p>When you want to <strong>call</strong> this function you prepend <code>await</code>, and <strong>the calling code will stop until the promise is resolved or rejected</strong>. One caveat: the client function must be defined as <code>async</code>. Here's an example:</p>\n<pre><code class=\"language-js\">const doSomething = async () => {\n    console.log(await doSomethingAsync());\n};\n</code></pre>\n<h2>A quick example</h2>\n<p>This is a simple example of async/await used to run a function asynchronously:</p>\n<iframe\n<p>title=\"Modern Asynchronous JavaScript with Async and Await\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0007-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0007-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0007-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst doSomethingAsync = () => {\n\n  return new Promise(resolve => {\n\n    setTimeout(() => resolve('I did something'), 3000)\n\n  })\n\n}\n\n\n\nconst doSomething = async () => {\n\n  console.log(await doSomethingAsync())\n\n}\n\n\n\nconsole.log('Before')\n\ndoSomething()\n\nconsole.log('After')\n\n```\n\n\n\nThe above code will print the following to the browser console:\n\n\n\n```\n\nBefore\n\nAfter\n\nI did something //after 3s\n\n```-->\n<h2>Promise all the things</h2>\n<p>Prepending the <code>async</code> keyword to any function means that the function will return a promise.</p>\n<p>Even if it's not doing so explicitly, it will internally make it return a promise.</p>\n<p>This is why this code is valid:</p>\n<pre><code class=\"language-js\">const aFunction = async () => {\n    return 'test';\n};\n\naFunction().then(alert); // This will alert 'test'\n</code></pre>\n<p>and it's the same as:</p>\n<pre><code class=\"language-js\">const aFunction = () => {\n    return Promise.resolve('test');\n};\n\naFunction().then(alert); // This will alert 'test'\n</code></pre>\n<h2>The code is much simpler to read</h2>\n<p>As you can see in the example above, our code looks very simple. Compare it to code using plain promises, with chaining and callback functions.</p>\n<p>And this is a very simple example, the major benefits will arise when the code is much more complex.</p>\n<p>For example here's how you would get a JSON resource, and parse it, using promises:</p>\n<pre><code class=\"language-js\">const getFirstUserData = () => {\n    return fetch('/users.json') // get users list\n        .then((response) => response.json()) // parse JSON\n\n        .then((users) => users[0]) // pick first user\n\n        .then((user) => fetch(`/users/${user.name}`)) // get user data\n\n        .then((userResponse) => userResponse.json()); // parse JSON\n};\n\ngetFirstUserData();\n</code></pre>\n<p>And here is the same functionality provided using await/async:</p>\n<pre><code class=\"language-js\">const getFirstUserData = async () => {\n    const response = await fetch('/users.json'); // get users list\n\n    const users = await response.json(); // parse JSON\n\n    const user = users[0]; // pick first user\n\n    const userResponse = await fetch(`/users/${user.name}`); // get user data\n\n    const userData = await userResponse.json(); // parse JSON\n\n    return userData;\n};\n\ngetFirstUserData();\n</code></pre>\n<h2>Multiple async functions in series</h2>\n<p>Async functions can be chained very easily, and the syntax is much more readable than with plain promises:</p>\n<iframe\n<p>title=\"Multiple async functions in series\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0008-01?index.js&#x26;zenmode=1&#x26;view=editor\">https://stackblitz.com/edit/nodejs-dev-0008-01?index.js&#x26;zenmode=1&#x26;view=editor</a>\"</p>\n<p>alt=\"nodejs-dev-0008-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst promiseToDoSomething = () => {\n\n  return new Promise(resolve => {\n\n    setTimeout(() => resolve('I did something'), 10000)\n\n  })\n\n}\n\n\n\nconst watchOverSomeoneDoingSomething = async () => {\n\n  const something = await promiseToDoSomething()\n\n  return something + ' and I watched'\n\n}\n\n\n\nconst watchOverSomeoneWatchingSomeoneDoingSomething = async () => {\n\n  const something = await watchOverSomeoneDoingSomething()\n\n  return something + ' and I watched as well'\n\n}\n\n\n\nwatchOverSomeoneWatchingSomeoneDoingSomething().then(res => {\n\n  console.log(res)\n\n})\n\n```\n\n\n\nWill print:\n\n\n\n```\n\nI did something and I watched and I watched as well\n\n```-->\n<h2>Easier debugging</h2>\n<p>Debugging promises is hard because the debugger will not step over asynchronous code.</p>\n<p>Async/await makes this very easy because to the compiler it's just like synchronous code.</p>\n<h1>The Node.js Event emitter</h1>\n<p>description: 'How to work with custom events in Node.js'</p>\n<p>If you worked with JavaScript in the browser, you know how much of the interaction of the user is handled through events: mouse clicks, keyboard button presses, reacting to mouse movements, and so on.</p>\n<p>On the backend side, Node.js offers us the option to build a similar system using the <a href=\"images/https://nodejs.org/api/events.html\"><code>events</code> module</a>.</p>\n<p>This module, in particular, offers the <code>EventEmitter</code> class, which we'll use to handle our events.</p>\n<p>You initialize that using</p>\n<pre><code class=\"language-js\">const EventEmitter = require('events');\n\nconst eventEmitter = new EventEmitter();\n</code></pre>\n<p>This object exposes, among many others, the <code>on</code> and <code>emit</code> methods.</p>\n<ul>\n<li><code>emit</code> is used to trigger an event</li>\n<li><code>on</code> is used to add a callback function that's going to be executed when the event is triggered</li>\n</ul>\n<p>For example, let's create a <code>start</code> event, and as a matter of providing a sample, we react to that by just logging to the console:</p>\n<pre><code class=\"language-js\">eventEmitter.on('start', () => {\n    console.log('started');\n});\n</code></pre>\n<p>When we run</p>\n<pre><code class=\"language-js\">eventEmitter.emit('start');\n</code></pre>\n<p>the event handler function is triggered, and we get the console log.</p>\n<p>You can pass arguments to the event handler by passing them as additional arguments to <code>emit()</code>:</p>\n<pre><code class=\"language-js\">eventEmitter.on('start', (number) => {\n    console.log(`started ${number}`);\n});\n\neventEmitter.emit('start', 23);\n</code></pre>\n<p>Multiple arguments:</p>\n<pre><code class=\"language-js\">eventEmitter.on('start', (start, end) => {\n    console.log(`started from ${start} to ${end}`);\n});\n\neventEmitter.emit('start', 1, 100);\n</code></pre>\n<p>The EventEmitter object also exposes several other methods to interact with events, like</p>\n<ul>\n<li><code>once()</code>: add a one-time listener</li>\n<li><code>removeListener()</code> / <code>off()</code>: remove an event listener from an event</li>\n<li><code>removeAllListeners()</code>: remove all listeners for an event</li>\n</ul>\n<p>You can read all their details on the events module page at <a href=\"https://nodejs.org/api/events.html\">https://nodejs.org/api/events.html</a></p>\n<h1>'Build an HTTP Server'</h1>\n<p>description: 'How to build an HTTP server with Node.js'</p>\n<p>Here is a sample Hello World HTTP web server:</p>\n<iframe\n<p>title=\"Build an HTTP Server\"</p>\n<p>src=\"<a href=\"https://stackblitz.com/edit/nodejs-dev-0009-01?index.js&#x26;zenmode=1\">https://stackblitz.com/edit/nodejs-dev-0009-01?index.js&#x26;zenmode=1</a>\"</p>\n<p>alt=\"nodejs-dev-0009-01 on StackBlitz\"</p>\n<p>style=\"height: 400px; width: 100%; border: 0;\"></p>\n</iframe>\n<!--```js\n\nconst http = require('http')\n\n\n\nconst port = process.env.PORT\n\n\n\nconst server = http.createServer((req, res) => {\n\n  res.statusCode = 200\n\n  res.setHeader('Content-Type', 'text/html')\n\n  res.end('<h1>Hello, World!</h1>')\n\n})\n\n\n\nserver.listen(port, () => {\n\n  console.log(`Server running at port ${port}`)\n\n})\n\n```-->\n<p>Let's analyze it briefly. We include the <a href=\"images/https://nodejs.org/api/http.html\"><code>http</code> module</a>.</p>\n<p>We use the module to create an HTTP server.</p>\n<p>The server is set to listen on the specified port, <code>3000</code>. When the server is ready, the <code>listen</code> callback function is called.</p>\n<p>The callback function we pass is the one that's going to be executed upon every request that comes in. Whenever a new request is received, the <a href=\"images/https://nodejs.org/api/http.html#http_event_request\"><code>request</code> event</a> is called, providing two objects: a request (an <a href=\"images/https://nodejs.org/api/http.html#http_class_http_incomingmessage\"><code>http.IncomingMessage</code></a> object) and a response (an <a href=\"images/https://nodejs.org/api/http.html#http_class_http_serverresponse\"><code>http.ServerResponse</code></a> object).</p>\n<p><code>request</code> provides the request details. Through it, we access the request headers and request data.</p>\n<p><code>response</code> is used to populate the data we're going to return to the client.</p>\n<p>In this case with</p>\n<pre><code class=\"language-js\">res.statusCode = 200;\n</code></pre>\n<p>we set the statusCode property to 200, to indicate a successful response.</p>\n<p>We also set the Content-Type header:</p>\n<pre><code class=\"language-js\">res.setHeader('Content-Type', 'text/html');\n</code></pre>\n<p>and we end close the response, adding the content as an argument to <code>end()</code>:</p>\n<pre><code class=\"language-js\">res.end('&#x3C;h1>Hello, World!&#x3C;/h1>');\n</code></pre>\n<h1>'Making HTTP requests with Node.js'</h1>\n<p>description: 'How to perform HTTP requests with Node.js using GET, POST, PUT and DELETE'</p>\n<h2>Perform a GET Request</h2>\n<pre><code class=\"language-js\">const https = require('https');\n\nconst options = {\n    hostname: 'example.com',\n\n    port: 443,\n\n    path: '/todos',\n\n    method: 'GET'\n};\n\nconst req = https.request(options, (res) => {\n    console.log(`statusCode: ${res.statusCode}`);\n\n    res.on('data', (d) => {\n        process.stdout.write(d);\n    });\n});\n\nreq.on('error', (error) => {\n    console.error(error);\n});\n\nreq.end();\n</code></pre>\n<h2>Perform a POST Request</h2>\n<pre><code class=\"language-js\">const https = require('https');\n\nconst data = new TextEncoder().encode(\n    JSON.stringify({\n        todo: 'Buy the milk 🍼'\n    })\n);\n\nconst options = {\n    hostname: 'whatever.com',\n\n    port: 443,\n\n    path: '/todos',\n\n    method: 'POST',\n\n    headers: {\n        'Content-Type': 'application/json',\n\n        'Content-Length': data.length\n    }\n};\n\nconst req = https.request(options, (res) => {\n    console.log(`statusCode: ${res.statusCode}`);\n\n    res.on('data', (d) => {\n        process.stdout.write(d);\n    });\n});\n\nreq.on('error', (error) => {\n    console.error(error);\n});\n\nreq.write(data);\n\nreq.end();\n</code></pre>\n<h2>PUT and DELETE</h2>\n<p>PUT and DELETE requests use the same POST request format - you just need to change the <code>options.method</code> value to the appropriate method.</p>\n<h1>Make an HTTP POST request using Node.js</h1>\n<p>description: 'Find out how to make an HTTP POST request using Node.js'</p>\n<p>There are many ways to perform an HTTP POST request in Node.js, depending on the abstraction level you want to use.</p>\n<p>The simplest way to perform an HTTP request using Node.js is to use the <a href=\"images/https://github.com/axios/axios\">Axios library</a>:</p>\n<pre><code class=\"language-js\">const axios = require('axios');\n\naxios\n\n    .post('https://whatever.com/todos', {\n        todo: 'Buy the milk'\n    })\n\n    .then((res) => {\n        console.log(`statusCode: ${res.status}`);\n\n        console.log(res);\n    })\n\n    .catch((error) => {\n        console.error(error);\n    });\n</code></pre>\n<p>Axios requires the use of a 3rd party library.</p>\n<p>A POST request is possible just using the Node.js standard modules, although it's more verbose than the two preceding options:</p>\n<pre><code class=\"language-js\">const https = require('https');\n\nconst data = JSON.stringify({\n    todo: 'Buy the milk'\n});\n\nconst options = {\n    hostname: 'whatever.com',\n\n    port: 443,\n\n    path: '/todos',\n\n    method: 'POST',\n\n    headers: {\n        'Content-Type': 'application/json',\n\n        'Content-Length': data.length\n    }\n};\n\nconst req = https.request(options, (res) => {\n    console.log(`statusCode: ${res.statusCode}`);\n\n    res.on('data', (d) => {\n        process.stdout.write(d);\n    });\n});\n\nreq.on('error', (error) => {\n    console.error(error);\n});\n\nreq.write(data);\n\nreq.end();\n</code></pre>\n<h1>Get HTTP request body data using Node.js</h1>\n<p>description: 'Find out how to extract the data sent as JSON through an HTTP request body using Node.js'</p>\n<p>Here is how you can extract the data that was sent as JSON in the request body.</p>\n<p>If you are using Express, that's quite simple: use the <code>body-parser</code> Node.js module.</p>\n<p>For example, to get the body of this request:</p>\n<pre><code class=\"language-js\">const axios = require('axios');\n\naxios.post('https://whatever.com/todos', {\n    todo: 'Buy the milk'\n});\n</code></pre>\n<p>This is the matching server-side code:</p>\n<pre><code class=\"language-js\">const express = require('express');\n\nconst app = express();\n\napp.use(\n    express.urlencoded({\n        extended: true\n    })\n);\n\napp.use(express.json());\n\napp.post('/todos', (req, res) => {\n    console.log(req.body.todo);\n});\n</code></pre>\n<p>If you're not using Express and you want to do this in vanilla Node.js, you need to do a bit more work, of course, as Express abstracts a lot of this for you.</p>\n<p>The key thing to understand is that when you initialize the HTTP server using <code>http.createServer()</code>, the callback is called when the server got all the HTTP headers, but not the request body.</p>\n<p>The <code>request</code> object passed in the connection callback is a stream.</p>\n<p>So, we must listen for the body content to be processed, and it's processed in chunks.</p>\n<p>We first get the data by listening to the stream <code>data</code> events, and when the data ends, the stream <code>end</code> event is called, once:</p>\n<pre><code class=\"language-js\">const server = http.createServer((req, res) => {\n    // we can access HTTP headers\n\n    req.on('data', (chunk) => {\n        console.log(`Data chunk available: ${chunk}`);\n    });\n\n    req.on('end', () => {\n        //end of data\n    });\n});\n</code></pre>\n<p>So to access the data, assuming we expect to receive a string, we must concatenate the chunks into a string when listening to the stream <code>data</code>, and when the stream <code>end</code>, we parse the string to JSON:</p>\n<pre><code class=\"language-js\">const server = http.createServer((req, res) => {\n    let data = '';\n\n    req.on('data', (chunk) => {\n        data += chunk;\n    });\n\n    req.on('end', () => {\n        console.log(JSON.parse(data).todo); // 'Buy the milk'\n\n        res.end();\n    });\n});\n</code></pre>\n<p>Starting from Node.js v10 a <code>for await .. of</code> syntax is available for use. It simplifies the example above and makes it look more linear:</p>\n<pre><code class=\"language-js\">const server = http.createServer(async (req, res) => {\n    const buffers = [];\n\n    for await (const chunk of req) {\n        buffers.push(chunk);\n    }\n\n    const data = Buffer.concat(buffers).toString();\n\n    console.log(JSON.parse(data).todo); // 'Buy the milk'\n\n    res.end();\n});\n</code></pre>\n<h1>How to install Node.js</h1>\n<p>description: 'How you can install Node.js on your system: a package manager, the official website installer or nvm'</p>\n<p>Node.js can be installed in different ways. This post highlights the most common and convenient ones.</p>\n<p>Official packages for all the major platforms are available at <a href=\"https://nodejs.dev/download/\">https://nodejs.dev/download/</a>.</p>\n<p>One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own.</p>\n<p>Other package managers for MacOS, Linux, and Windows are listed in <a href=\"https://nodejs.dev/download/package-manager/\">https://nodejs.dev/download/package-manager/</a></p>\n<p><code>nvm</code> is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks, for example.</p>\n<p>It is also very useful to test your code with old Node.js versions.</p>\n<p>See <a href=\"https://github.com/nvm-sh/nvm\">https://github.com/nvm-sh/nvm</a> for more information about this option.</p>\n<p>In any case, when Node.js is installed you'll have access to the <code>node</code> executable program in the command line.</p>\n<h1>'Working with file descriptors in Node.js'</h1>\n<p>description: 'How to interact with file descriptors using Node.js'</p>\n<p>Before you're able to interact with a file that sits in your filesystem, you must get a file descriptor.</p>\n<p>A file descriptor is a reference to an open file, a number (fd) returned by opening the file using the <code>open()</code> method offered by the <code>fs</code> module. This number (<code>fd</code>) uniquely identifies an open file in operating system:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.open('/Users/joe/test.txt', 'r', (err, fd) => {\n    //fd is our file descriptor\n});\n</code></pre>\n<p>Notice the <code>r</code> we used as the second parameter to the <code>fs.open()</code> call.</p>\n<p>That flag means we open the file for reading.</p>\n<p>Other flags you'll commonly use are</p>\n<ul>\n<li><code>r+</code> open the file for reading and writing, if file don't exist it won't be created.</li>\n<li><code>w+</code> open the file for reading and writing, positioning the stream at the beginning of the file. The file is created if not existing</li>\n<li><code>a</code> open the file for writing, positioning the stream at the end of the file. The file is created if not existing</li>\n<li><code>a+</code> open the file for reading and writing, positioning the stream at the end of the file. The file is created if not existing</li>\n</ul>\n<p>You can also open the file by using the <code>fs.openSync</code> method, which returns the file descriptor, instead of providing it in a callback:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    const fd = fs.openSync('/Users/joe/test.txt', 'r');\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>Once you get the file descriptor, in whatever way you choose, you can perform all the operations that require it, like calling <code>fs.close()</code> and many other operations that interact with the filesystem.</p>\n<h1>'Node.js file stats'</h1>\n<p>description: 'How to get the details of a file using Node.js'</p>\n<p>Every file comes with a set of details that we can inspect using Node.js.</p>\n<p>In particular, using the <code>stat()</code> method provided by the <code>fs</code> module.</p>\n<p>You call it passing a file path, and once Node.js gets the file details it will call the callback function you pass, with 2 parameters: an error message, and the file stats:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.stat('/Users/joe/test.txt', (err, stats) => {\n    if (err) {\n        console.error(err);\n\n        return;\n    }\n\n    //we have access to the file stats in `stats`\n});\n</code></pre>\n<p>Node.js provides also a sync method, which blocks the thread until the file stats are ready:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    const stats = fs.statSync('/Users/joe/test.txt');\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>The file information is included in the stats variable. What kind of information can we extract using the stats?</p>\n<p>A lot, including:</p>\n<ul>\n<li>if the file is a directory or a file, using <code>stats.isFile()</code> and <code>stats.isDirectory()</code></li>\n<li>if the file is a symbolic link using <code>stats.isSymbolicLink()</code></li>\n<li>the file size in bytes using <code>stats.size</code>.</li>\n</ul>\n<p>There are other advanced methods, but the bulk of what you'll use in your day-to-day programming is this.</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.stat('/Users/joe/test.txt', (err, stats) => {\n    if (err) {\n        console.error(err);\n\n        return;\n    }\n\n    stats.isFile(); //true\n\n    stats.isDirectory(); //false\n\n    stats.isSymbolicLink(); //false\n\n    stats.size; //1024000 //= 1MB\n});\n</code></pre>\n<h1>'Node.js File Paths'</h1>\n<p>description: 'How to interact with file paths and manipulate them in Node.js'</p>\n<p>Every file in the system has a path.</p>\n<p>On Linux and macOS, a path might look like:</p>\n<p><code>/users/joe/file.txt</code></p>\n<p>while Windows computers are different, and have a structure such as:</p>\n<p><code>C:\\users\\joe\\file.txt</code></p>\n<p>You need to pay attention when using paths in your applications, as this difference must be taken into account.</p>\n<p>You include this module in your files using</p>\n<pre><code class=\"language-js\">const path = require('path');\n</code></pre>\n<p>and you can start using its methods.</p>\n<h2>Getting information out of a path</h2>\n<p>Given a path, you can extract information out of it using those methods:</p>\n<ul>\n<li><code>dirname</code>: get the parent folder of a file</li>\n<li><code>basename</code>: get the filename part</li>\n<li><code>extname</code>: get the file extension</li>\n</ul>\n<p>Example:</p>\n<pre><code class=\"language-js\">const notes = '/users/joe/notes.txt';\n\npath.dirname(notes); // /users/joe\n\npath.basename(notes); // notes.txt\n\npath.extname(notes); // .txt\n</code></pre>\n<p>You can get the file name without the extension by specifying a second argument to <code>basename</code>:</p>\n<pre><code class=\"language-js\">path.basename(notes, path.extname(notes)); //notes\n</code></pre>\n<h2>Working with paths</h2>\n<p>You can join two or more parts of a path by using <code>path.join()</code>:</p>\n<pre><code class=\"language-js\">const name = 'joe';\n\npath.join('/', 'users', name, 'notes.txt'); //'/users/joe/notes.txt'\n</code></pre>\n<p>You can get the absolute path calculation of a relative path using <code>path.resolve()</code>:</p>\n<pre><code class=\"language-js\">path.resolve('joe.txt'); //'/Users/joe/joe.txt' if run from my home folder\n</code></pre>\n<p>In this case Node.js will simply append <code>/joe.txt</code> to the current working directory. If you specify a second parameter folder, <code>resolve</code> will use the first as a base for the second:</p>\n<pre><code class=\"language-js\">path.resolve('tmp', 'joe.txt'); //'/Users/joe/tmp/joe.txt' if run from my home folder\n</code></pre>\n<p>If the first parameter starts with a slash, that means it's an absolute path:</p>\n<pre><code class=\"language-js\">path.resolve('/etc', 'joe.txt'); //'/etc/joe.txt'\n</code></pre>\n<p><code>path.normalize()</code> is another useful function, that will try and calculate the actual path, when it contains relative specifiers like <code>.</code> or <code>..</code>, or double slashes:</p>\n<pre><code class=\"language-js\">path.normalize('/users/joe/..//test.txt'); //'/users/test.txt'\n</code></pre>\n<p><strong>Neither resolve nor normalize will check if the path exists</strong>. They just calculate a path based on the information they got.</p>\n<h1>'Reading files with Node.js'</h1>\n<p>description: 'How to read files using Node.js'</p>\n<p>The simplest way to read a file in Node.js is to use the <code>fs.readFile()</code> method, passing it the file path, encoding and a callback function that will be called with the file data (and the error):</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.readFile('/Users/joe/test.txt', 'utf8', (err, data) => {\n    if (err) {\n        console.error(err);\n\n        return;\n    }\n\n    console.log(data);\n});\n</code></pre>\n<p>Alternatively, you can use the synchronous version <code>fs.readFileSync()</code>:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    const data = fs.readFileSync('/Users/joe/test.txt', 'utf8');\n\n    console.log(data);\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>Both <code>fs.readFile()</code> and <code>fs.readFileSync()</code> read the full content of the file in memory before returning the data.</p>\n<p>This means that big files are going to have a major impact on your memory consumption and speed of execution of the program.</p>\n<p>In this case, a better option is to read the file content using streams.</p>\n<h1>'Writing files with Node.js'</h1>\n<p>description: 'How to write files using Node.js'</p>\n<p>The easiest way to write to files in Node.js is to use the <code>fs.writeFile()</code> API.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst content = 'Some content!';\n\nfs.writeFile('/Users/joe/test.txt', content, (err) => {\n    if (err) {\n        console.error(err);\n\n        return;\n    }\n\n    //file written successfully\n});\n</code></pre>\n<p>Alternatively, you can use the synchronous version <code>fs.writeFileSync()</code>:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst content = 'Some content!';\n\ntry {\n    const data = fs.writeFileSync('/Users/joe/test.txt', content);\n\n    //file written successfully\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>By default, this API will <strong>replace the contents of the file</strong> if it does already exist.</p>\n<p>You can modify the default by specifying a flag:</p>\n<pre><code class=\"language-js\">fs.writeFile('/Users/joe/test.txt', content, { flag: 'a+' }, (err) => {});\n</code></pre>\n<p>The flags you'll likely use are</p>\n<ul>\n<li><code>r+</code> open the file for reading and writing</li>\n<li><code>w+</code> open the file for reading and writing, positioning the stream at the beginning of the file. The file is created if it does not exist</li>\n<li><code>a</code> open the file for writing, positioning the stream at the end of the file. The file is created if it does not exist</li>\n<li><code>a+</code> open the file for reading and writing, positioning the stream at the end of the file. The file is created if it does not exist</li>\n</ul>\n<p>(you can find more flags at <a href=\"https://nodejs.org/api/fs.html#fs_file_system_flags\">https://nodejs.org/api/fs.html#fs_file_system_flags</a>)</p>\n<h2>Append to a file</h2>\n<p>A handy method to append content to the end of a file is <code>fs.appendFile()</code> (and its <code>fs.appendFileSync()</code> counterpart):</p>\n<pre><code class=\"language-js\">const content = 'Some content!';\n\nfs.appendFile('file.log', content, (err) => {\n    if (err) {\n        console.error(err);\n\n        return;\n    }\n\n    //done!\n});\n</code></pre>\n<h2>Using streams</h2>\n<p>All those methods write the full content to the file before returning the control back to your program (in the async version, this means executing the callback)</p>\n<p>In this case, a better option is to write the file content using streams.</p>\n<h1>'Working with folders in Node.js'</h1>\n<p>description: 'How to interact with folders using Node.js'</p>\n<p>The Node.js <code>fs</code> core module provides many handy methods you can use to work with folders.</p>\n<h2>Check if a folder exists</h2>\n<p>Use <code>fs.access()</code> to check if the folder exists and Node.js can access it with its permissions.</p>\n<h2>Create a new folder</h2>\n<p>Use <code>fs.mkdir()</code> or <code>fs.mkdirSync()</code> to create a new folder.</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst folderName = '/Users/joe/test';\n\ntry {\n    if (!fs.existsSync(folderName)) {\n        fs.mkdirSync(folderName);\n    }\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<h2>Read the content of a directory</h2>\n<p>Use <code>fs.readdir()</code> or <code>fs.readdirSync()</code> to read the contents of a directory.</p>\n<p>This piece of code reads the content of a folder, both files and subfolders, and returns their relative path:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nconst folderPath = '/Users/joe';\n\nfs.readdirSync(folderPath);\n</code></pre>\n<p>You can get the full path:</p>\n<pre><code class=\"language-js\">fs.readdirSync(folderPath).map((fileName) => {\n    return path.join(folderPath, fileName);\n});\n</code></pre>\n<p>You can also filter the results to only return the files, and exclude the folders:</p>\n<pre><code class=\"language-js\">const isFile = (fileName) => {\n    return fs.lstatSync(fileName).isFile();\n};\n\nfs.readdirSync(folderPath)\n    .map((fileName) => {\n        return path.join(folderPath, fileName);\n    })\n\n    .filter(isFile);\n</code></pre>\n<h2>Rename a folder</h2>\n<p>Use <code>fs.rename()</code> or <code>fs.renameSync()</code> to rename folder. The first parameter is the current path, the second the new path:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.rename('/Users/joe', '/Users/roger', (err) => {\n    if (err) {\n        console.error(err);\n\n        return;\n    }\n\n    //done\n});\n</code></pre>\n<p><code>fs.renameSync()</code> is the synchronous version:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    fs.renameSync('/Users/joe', '/Users/roger');\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<h2>Remove a folder</h2>\n<p>Use <code>fs.rmdir()</code> or <code>fs.rmdirSync()</code> to remove a folder.</p>\n<p>Removing a folder that has content can be more complicated than you need. You can pass the option <code>{ recursive: true }</code> to recursively remove the contents.</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.rmdir(dir, { recursive: true }, (err) => {\n    if (err) {\n        throw err;\n    }\n\n    console.log(`${dir} is deleted!`);\n});\n</code></pre>\n<blockquote>\n<p><strong>NOTE:</strong> In Node <code>v16.x</code> the option <code>recursive</code> is <strong>deprecated</strong> for <code>fs.rmdir</code> of callback API, instead use <code>fs.rm</code> to delete folders that have content in them:</p>\n</blockquote>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.rm(dir, { recursive: true, force: true }, (err) => {\n    if (err) {\n        throw err;\n    }\n\n    console.log(`${dir} is deleted!`);\n});\n</code></pre>\n<p>Or you can install and make use of the <a href=\"images/https://www.npmjs.com/package/fs-extra\"><code>fs-extra</code></a> module, which is very popular and well maintained. It's a drop-in replacement of the <code>fs</code> module, which provides more features on top of it.</p>\n<p>In this case the <code>remove()</code> method is what you want.</p>\n<p>Install it using</p>\n<pre><code class=\"language-bash\">npm install fs-extra\n</code></pre>\n<p>and use it like this:</p>\n<pre><code class=\"language-js\">const fs = require('fs-extra');\n\nconst folder = '/Users/joe';\n\nfs.remove(folder, (err) => {\n    console.error(err);\n});\n</code></pre>\n<p>It can also be used with promises:</p>\n<pre><code class=\"language-js\">fs.remove(folder)\n\n    .then(() => {\n        //done\n    })\n\n    .catch((err) => {\n        console.error(err);\n    });\n</code></pre>\n<p>or with async/await:</p>\n<pre><code class=\"language-js\">async function removeFolder(folder) {\n    try {\n        await fs.remove(folder);\n\n        //done\n    } catch (err) {\n        console.error(err);\n    }\n}\n\nconst folder = '/Users/joe';\n\nremoveFolder(folder);\n</code></pre>\n<h1>'The Node.js fs module'</h1>\n<p>description: 'The fs module of Node.js provides useful functions to interact with the file system'</p>\n<p>The <code>fs</code> module provides a lot of very useful functionality to access and interact with the file system.</p>\n<p>There is no need to install it. Being part of the Node.js core, it can be used by simply requiring it:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n</code></pre>\n<p>Once you do so, you have access to all its methods, which include:</p>\n<ul>\n<li><code>fs.access()</code>: check if the file exists and Node.js can access it with its permissions</li>\n<li><code>fs.appendFile()</code>: append data to a file. If the file does not exist, it's created</li>\n<li><code>fs.chmod()</code>: change the permissions of a file specified by the filename passed. Related: <code>fs.lchmod()</code>, <code>fs.fchmod()</code></li>\n<li><code>fs.chown()</code>: change the owner and group of a file specified by the filename passed. Related: <code>fs.fchown()</code>, <code>fs.lchown()</code></li>\n<li><code>fs.close()</code>: close a file descriptor</li>\n<li><code>fs.copyFile()</code>: copies a file</li>\n<li><code>fs.createReadStream()</code>: create a readable file stream</li>\n<li><code>fs.createWriteStream()</code>: create a writable file stream</li>\n<li><code>fs.link()</code>: create a new hard link to a file</li>\n<li><code>fs.mkdir()</code>: create a new folder</li>\n<li><code>fs.mkdtemp()</code>: create a temporary directory</li>\n<li><code>fs.open()</code>: set the file mode</li>\n<li><code>fs.readdir()</code>: read the contents of a directory</li>\n<li><code>fs.readFile()</code>: read the content of a file. Related: <code>fs.read()</code></li>\n<li><code>fs.readlink()</code>: read the value of a symbolic link</li>\n<li><code>fs.realpath()</code>: resolve relative file path pointers (<code>.</code>, <code>..</code>) to the full path</li>\n<li><code>fs.rename()</code>: rename a file or folder</li>\n<li><code>fs.rmdir()</code>: remove a folder</li>\n<li><code>fs.stat()</code>: returns the status of the file identified by the filename passed. Related: <code>fs.fstat()</code>, <code>fs.lstat()</code></li>\n<li><code>fs.symlink()</code>: create a new symbolic link to a file</li>\n<li><code>fs.truncate()</code>: truncate to the specified length the file identified by the filename passed. Related: <code>fs.ftruncate()</code></li>\n<li><code>fs.unlink()</code>: remove a file or a symbolic link</li>\n<li><code>fs.unwatchFile()</code>: stop watching for changes on a file</li>\n<li><code>fs.utimes()</code>: change the timestamp of the file identified by the filename passed. Related: <code>fs.futimes()</code></li>\n<li><code>fs.watchFile()</code>: start watching for changes on a file. Related: <code>fs.watch()</code></li>\n<li><code>fs.writeFile()</code>: write data to a file. Related: <code>fs.write()</code></li>\n</ul>\n<p>One peculiar thing about the <code>fs</code> module is that all the methods are asynchronous by default, but they can also work synchronously by appending <code>Sync</code>.</p>\n<p>For example:</p>\n<ul>\n<li><code>fs.rename()</code></li>\n<li><code>fs.renameSync()</code></li>\n<li><code>fs.write()</code></li>\n<li><code>fs.writeSync()</code></li>\n</ul>\n<p>This makes a huge difference in your application flow.</p>\n<blockquote>\n<p>Node.js 10 includes <a href=\"images/https://nodejs.org/api/fs.html#fs_fs_promises_api\">experimental support</a> for a promise based API</p>\n</blockquote>\n<p>For example let's examine the <code>fs.rename()</code> method. The asynchronous API is used with a callback:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\nfs.rename('before.json', 'after.json', (err) => {\n    if (err) {\n        return console.error(err);\n    }\n\n    //done\n});\n</code></pre>\n<p>A synchronous API can be used like this, with a try/catch block to handle errors:</p>\n<pre><code class=\"language-js\">const fs = require('fs');\n\ntry {\n    fs.renameSync('before.json', 'after.json');\n\n    //done\n} catch (err) {\n    console.error(err);\n}\n</code></pre>\n<p>The key difference here is that the execution of your script will block in the second example, until the file operation succeeded.</p>\n<h1>'The Node.js path module'</h1>\n<p>description: 'The path module of Node.js provides useful functions to interact with file paths'</p>\n<p>The <code>path</code> module provides a lot of very useful functionality to access and interact with the file system.</p>\n<p>There is no need to install it. Being part of the Node.js core, it can be used by simply requiring it:</p>\n<pre><code class=\"language-js\">const path = require('path');\n</code></pre>\n<p>This module provides <code>path.sep</code> which provides the path segment separator (<code>\\</code> on Windows, and <code>/</code> on Linux / macOS), and <code>path.delimiter</code> which provides the path delimiter (<code>;</code> on Windows, and <code>:</code> on Linux / macOS).</p>\n<p>These are the <code>path</code> methods:</p>\n<h3><code>path.basename()</code></h3>\n<p>Return the last portion of a path. A second parameter can filter out the file extension:</p>\n<pre><code class=\"language-js\">require('path').basename('/test/something'); //something\n\nrequire('path').basename('/test/something.txt'); //something.txt\n\nrequire('path').basename('/test/something.txt', '.txt'); //something\n</code></pre>\n<h3><code>path.dirname()</code></h3>\n<p>Return the directory part of a path:</p>\n<pre><code class=\"language-js\">require('path').dirname('/test/something'); // /test\n\nrequire('path').dirname('/test/something/file.txt'); // /test/something\n</code></pre>\n<h3><code>path.extname()</code></h3>\n<p>Return the extension part of a path</p>\n<pre><code class=\"language-js\">require('path').extname('/test/something'); // ''\n\nrequire('path').extname('/test/something/file.txt'); // '.txt'\n</code></pre>\n<h3><code>path.format()</code></h3>\n<p>Returns a path string from an object, This is the opposite of <code>path.parse</code><br/></p>\n<p><code>path.format</code> accepts an object as argument with the follwing keys:</p>\n<ul>\n<li><code>root</code>: the root</li>\n<li><code>dir</code>: the folder path starting from the root</li>\n<li><code>base</code>: the file name + extension</li>\n<li><code>name</code>: the file name</li>\n<li><code>ext</code>: the file extension</li>\n</ul>\n<p><code>root</code> is ignored if <code>dir</code> is provided<br/></p>\n<p><code>ext</code> and <code>name</code> are ignored if <code>base</code> exists</p>\n<pre><code class=\"language-js\">// POSIX\n\nrequire('path').format({ dir: '/Users/joe', base: 'test.txt' }); //  '/Users/joe/test.txt'\n\nrequire('path').format({ root: '/Users/joe', name: 'test', ext: 'txt' }); //  '/Users/joe/test.txt'\n\n// WINDOWS\n\nrequire('path').format({ dir: 'C:\\\\Users\\\\joe', base: 'test.txt' }); //  'C:\\\\Users\\\\joe\\\\test.txt'\n</code></pre>\n<h3><code>path.isAbsolute()</code></h3>\n<p>Returns true if it's an absolute path</p>\n<pre><code class=\"language-js\">require('path').isAbsolute('/test/something'); // true\n\nrequire('path').isAbsolute('./test/something'); // false\n</code></pre>\n<h3><code>path.join()</code></h3>\n<p>Joins two or more parts of a path:</p>\n<pre><code class=\"language-js\">const name = 'joe';\n\nrequire('path').join('/', 'users', name, 'notes.txt'); //'/users/joe/notes.txt'\n</code></pre>\n<h3><code>path.normalize()</code></h3>\n<p>Tries to calculate the actual path when it contains relative specifiers like <code>.</code> or <code>..</code>, or double slashes:</p>\n<pre><code class=\"language-js\">require('path').normalize('/users/joe/..//test.txt'); //'/users/test.txt'\n</code></pre>\n<h3><code>path.parse()</code></h3>\n<p>Parses a path to an object with the segments that compose it:</p>\n<ul>\n<li><code>root</code>: the root</li>\n<li><code>dir</code>: the folder path starting from the root</li>\n<li><code>base</code>: the file name + extension</li>\n<li><code>name</code>: the file name</li>\n<li><code>ext</code>: the file extension</li>\n</ul>\n<p>Example:</p>\n<pre><code class=\"language-js\">require('path').parse('/users/test.txt');\n</code></pre>\n<p>results in</p>\n<pre><code class=\"language-js\">{\n\n  root: '/',\n\n  dir: '/users',\n\n  base: 'test.txt',\n\n  ext: '.txt',\n\n  name: 'test'\n\n}\n</code></pre>\n<h3><code>path.relative()</code></h3>\n<p>Accepts 2 paths as arguments. Returns the relative path from the first path to the second, based on the current working directory.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">require('path').relative('/Users/joe', '/Users/joe/test.txt'); //'test.txt'\n\nrequire('path').relative('/Users/joe', '/Users/joe/something/test.txt'); //'something/test.txt'\n</code></pre>\n<h3><code>path.resolve()</code></h3>\n<p>You can get the absolute path calculation of a relative path using <code>path.resolve()</code>:</p>\n<pre><code class=\"language-js\">path.resolve('joe.txt'); //'/Users/joe/joe.txt' if run from my home folder\n</code></pre>\n<p>By specifying a second parameter, <code>resolve</code> will use the first as a base for the second:</p>\n<pre><code class=\"language-js\">path.resolve('tmp', 'joe.txt'); //'/Users/joe/tmp/joe.txt' if run from my home folder\n</code></pre>\n<p>If the first parameter starts with a slash, that means it's an absolute path:</p>\n<pre><code class=\"language-js\">path.resolve('/etc', 'joe.txt'); //'/etc/joe.txt'\n</code></pre>\n<h1>'The Node.js os module'</h1>\n<p>description: 'The os module of Node.js provides useful functions to interact with underlying system'</p>\n<p>This module provides many functions that you can use to retrieve information from the underlying operating system and the computer the program runs on, and interact with it.</p>\n<pre><code class=\"language-js\">const os = require('os');\n</code></pre>\n<p>There are a few useful properties that tell us some key things related to handling files:</p>\n<p><code>os.EOL</code> gives the line delimiter sequence. It's <code>\\n</code> on Linux and macOS, and <code>\\r\\n</code> on Windows.</p>\n<p><code>os.constants.signals</code> tells us all the constants related to handling process signals, like SIGHUP, SIGKILL and so on.</p>\n<p><code>os.constants.errno</code> sets the constants for error reporting, like EADDRINUSE, EOVERFLOW and more.</p>\n<p>You can read them all on <a href=\"https://nodejs.org/api/os.html#os_signal_constants\">https://nodejs.org/api/os.html#os_signal_constants</a>.</p>\n<p>Let's now see the main methods that <code>os</code> provides:</p>\n<h2><code>os.arch()</code></h2>\n<p>Return the string that identifies the underlying architecture, like <code>arm</code>, <code>x64</code>, <code>arm64</code>.</p>\n<h2><code>os.cpus()</code></h2>\n<p>Return information on the CPUs available on your system.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">[\n    {\n        model: 'Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz',\n\n        speed: 2400,\n\n        times: {\n            user: 281685380,\n\n            nice: 0,\n\n            sys: 187986530,\n\n            idle: 685833750,\n\n            irq: 0\n        }\n    },\n\n    {\n        model: 'Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz',\n\n        speed: 2400,\n\n        times: {\n            user: 282348700,\n\n            nice: 0,\n\n            sys: 161800480,\n\n            idle: 703509470,\n\n            irq: 0\n        }\n    }\n];\n</code></pre>\n<h2><code>os.endianness()</code></h2>\n<p>Return <code>BE</code> or <code>LE</code> depending if Node.js was compiled with <a href=\"images/https://en.wikipedia.org/wiki/Endianness\">Big Endian or Little Endian</a>.</p>\n<h2><code>os.freemem()</code></h2>\n<p>Return the number of bytes that represent the free memory in the system.</p>\n<h2><code>os.homedir()</code></h2>\n<p>Return the path to the home directory of the current user.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">'/Users/joe';\n</code></pre>\n<h2><code>os.hostname()</code></h2>\n<p>Return the host name.</p>\n<h2><code>os.loadavg()</code></h2>\n<p>Return the calculation made by the operating system on the load average.</p>\n<p>It only returns a meaningful value on Linux and macOS.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">[3.68798828125, 4.00244140625, 11.1181640625];\n</code></pre>\n<h2><code>os.networkInterfaces()</code></h2>\n<p>Returns the details of the network interfaces available on your system.</p>\n<p>Example:</p>\n<pre><code class=\"language-js\">{ lo0:\n\n   [ { address: '127.0.0.1',\n\n       netmask: '255.0.0.0',\n\n       family: 'IPv4',\n\n       mac: 'fe:82:00:00:00:00',\n\n       internal: true },\n\n     { address: '::1',\n\n       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',\n\n       family: 'IPv6',\n\n       mac: 'fe:82:00:00:00:00',\n\n       scopeid: 0,\n\n       internal: true },\n\n     { address: 'fe80::1',\n\n       netmask: 'ffff:ffff:ffff:ffff::',\n\n       family: 'IPv6',\n\n       mac: 'fe:82:00:00:00:00',\n\n       scopeid: 1,\n\n       internal: true } ],\n\n  en1:\n\n   [ { address: 'fe82::9b:8282:d7e6:496e',\n\n       netmask: 'ffff:ffff:ffff:ffff::',\n\n       family: 'IPv6',\n\n       mac: '06:00:00:02:0e:00',\n\n       scopeid: 5,\n\n       internal: false },\n\n     { address: '192.168.1.38',\n\n       netmask: '255.255.255.0',\n\n       family: 'IPv4',\n\n       mac: '06:00:00:02:0e:00',\n\n       internal: false } ],\n\n  utun0:\n\n   [ { address: 'fe80::2513:72bc:f405:61d0',\n\n       netmask: 'ffff:ffff:ffff:ffff::',\n\n       family: 'IPv6',\n\n       mac: 'fe:80:00:20:00:00',\n\n       scopeid: 8,\n\n       internal: false } ] }\n</code></pre>\n<h2><code>os.platform()</code></h2>\n<p>Return the platform that Node.js was compiled for:</p>\n<ul>\n<li><code>darwin</code></li>\n<li><code>freebsd</code></li>\n<li><code>linux</code></li>\n<li><code>openbsd</code></li>\n<li><code>win32</code></li>\n<li>...more</li>\n</ul>\n<h2><code>os.release()</code></h2>\n<p>Returns a string that identifies the operating system release number</p>\n<h2><code>os.tmpdir()</code></h2>\n<p>Returns the path to the assigned temp folder.</p>\n<h2><code>os.totalmem()</code></h2>\n<p>Returns the number of bytes that represent the total memory available in the system.</p>\n<h2><code>os.type()</code></h2>\n<p>Identifies the operating system:</p>\n<ul>\n<li><code>Linux</code></li>\n<li><code>Darwin</code> on macOS</li>\n<li><code>Windows_NT</code> on Windows</li>\n</ul>\n<h2><code>os.uptime()</code></h2>\n<p>Returns the number of seconds the computer has been running since it was last rebooted.</p>\n<h2><code>os.userInfo()</code></h2>\n<p>Returns an object that contains the current <code>username</code>, <code>uid</code>, <code>gid</code>, <code>shell</code>, and <code>homedir</code></p>\n<h1>'The Node.js events module'</h1>\n<p>description: 'The events module of Node.js provides the EventEmitter class'</p>\n<p>The <code>events</code> module provides us the EventEmitter class, which is key to working with events in Node.js.</p>\n<pre><code class=\"language-js\">const EventEmitter = require('events');\n\nconst door = new EventEmitter();\n</code></pre>\n<p>The event listener has these in-built events:</p>\n<ul>\n<li><code>newListener</code> when a listener is added</li>\n<li><code>removeListener</code> when a listener is removed</li>\n</ul>\n<p>Here's a detailed description of the most useful methods:</p>\n<h2><code>emitter.addListener()</code></h2>\n<p>Alias for <code>emitter.on()</code>.</p>\n<h2><code>emitter.emit()</code></h2>\n<p>Emits an event. It synchronously calls every event listener in the order they were registered.</p>\n<pre><code class=\"language-js\">door.emit('slam'); // emitting the event \"slam\"\n</code></pre>\n<h2><code>emitter.eventNames()</code></h2>\n<p>Return an array of strings that represent the events registered on the current <code>EventEmitter</code> object:</p>\n<pre><code class=\"language-js\">door.eventNames();\n</code></pre>\n<h2><code>emitter.getMaxListeners()</code></h2>\n<p>Get the maximum amount of listeners one can add to an <code>EventEmitter</code> object, which defaults to 10 but can be increased or lowered by using <code>setMaxListeners()</code></p>\n<pre><code class=\"language-js\">door.getMaxListeners();\n</code></pre>\n<h2><code>emitter.listenerCount()</code></h2>\n<p>Get the count of listeners of the event passed as parameter:</p>\n<pre><code class=\"language-js\">door.listenerCount('open');\n</code></pre>\n<h2><code>emitter.listeners()</code></h2>\n<p>Gets an array of listeners of the event passed as parameter:</p>\n<pre><code class=\"language-js\">door.listeners('open');\n</code></pre>\n<h2><code>emitter.off()</code></h2>\n<p>Alias for <code>emitter.removeListener()</code> added in Node.js 10</p>\n<h2><code>emitter.on()</code></h2>\n<p>Adds a callback function that's called when an event is emitted.</p>\n<p>Usage:</p>\n<pre><code class=\"language-js\">door.on('open', () => {\n    console.log('Door was opened');\n});\n</code></pre>\n<h2><code>emitter.once()</code></h2>\n<p>Adds a callback function that's called when an event is emitted for the first time after registering this. This callback is only going to be called once, never again.</p>\n<pre><code class=\"language-js\">const EventEmitter = require('events');\n\nconst ee = new EventEmitter();\n\nee.once('my-event', () => {\n    //call callback function once\n});\n</code></pre>\n<h2><code>emitter.prependListener()</code></h2>\n<p>When you add a listener using <code>on</code> or <code>addListener</code>, it's added last in the queue of listeners, and called last. Using <code>prependListener</code> it's added, and called, before other listeners.</p>\n<h2><code>emitter.prependOnceListener()</code></h2>\n<p>When you add a listener using <code>once</code>, it's added last in the queue of listeners, and called last. Using <code>prependOnceListener</code> it's added, and called, before other listeners.</p>\n<h2><code>emitter.removeAllListeners()</code></h2>\n<p>Removes all listeners of an <code>EventEmitter</code> object listening to a specific event:</p>\n<pre><code class=\"language-js\">door.removeAllListeners('open');\n</code></pre>\n<h2><code>emitter.removeListener()</code></h2>\n<p>Remove a specific listener. You can do this by saving the callback function to a variable, when added, so you can reference it later:</p>\n<pre><code class=\"language-js\">const doSomething = () => {};\n\ndoor.on('open', doSomething);\n\ndoor.removeListener('open', doSomething);\n</code></pre>\n<h2><code>emitter.setMaxListeners()</code></h2>\n<p>Sets the maximum amount of listeners one can add to an <code>EventEmitter</code> object, which defaults to 10 but can be increased or lowered.</p>\n<pre><code class=\"language-js\">door.setMaxListeners(50);\n</code></pre>\n<h1>How much JavaScript do you need to know to use Node.js?</h1>\n<p>description: 'If you are just starting out with JavaScript, how deeply do you need to know the language?'</p>\n<p>As a beginner, it's hard to get to a point where you are confident enough in your programming abilities.</p>\n<p>While learning to code, you might also be confused at where does JavaScript end, and where Node.js begins, and vice versa.</p>\n<p>I would recommend you to have a good grasp of the main JavaScript concepts before diving into Node.js:</p>\n<ul>\n<li>Lexical Structure</li>\n<li>Expressions</li>\n<li>Types</li>\n<li>Classes</li>\n<li>Variables</li>\n<li>Functions</li>\n<li>this</li>\n<li>Arrow Functions</li>\n<li>Loops</li>\n<li>Scopes</li>\n<li>Arrays</li>\n<li>Template Literals</li>\n<li>Semicolons</li>\n<li>Strict Mode</li>\n<li>ECMAScript 6, 2016, 2017</li>\n</ul>\n<p>With those concepts in mind, you are well on your road to become a proficient JavaScript developer, in both the browser and in Node.js.</p>\n<p>The following concepts are also key to understand asynchronous programming, which is one fundamental part of Node.js:</p>\n<ul>\n<li><a href=\"images/https://nodejs.dev/learn/javascript-asynchronous-programming-and-callbacks\">Asynchronous programming and callbacks</a></li>\n<li><a href=\"images/https://nodejs.dev/learn/discover-javascript-timers\">Timers</a></li>\n<li><a href=\"images/https://nodejs.dev/learn/understanding-javascript-promises\">Promises</a></li>\n<li><a href=\"images/https://nodejs.dev/learn/modern-asynchronous-javascript-with-async-and-await\">Async and Await</a></li>\n<li>Closures</li>\n<li><a href=\"images/https://nodejs.dev/learn/the-nodejs-event-loop\">The Event Loop</a></li>\n</ul>\n<h1>'The Node.js http module'</h1>\n<p>description: 'The http module of Node.js provides useful functions and classes to build an HTTP server'</p>\n<p>The HTTP core module is a key module to Node.js networking.</p>\n<p>It can be included using</p>\n<pre><code class=\"language-js\">const http = require('http');\n</code></pre>\n<p>The module provides some properties and methods, and some classes.</p>\n<h2>Properties</h2>\n<h3><code>http.METHODS</code></h3>\n<p>This property lists all the HTTP methods supported:</p>\n<pre><code class=\"language-js\">> require('http').METHODS\n\n[ 'ACL',\n\n  'BIND',\n\n  'CHECKOUT',\n\n  'CONNECT',\n\n  'COPY',\n\n  'DELETE',\n\n  'GET',\n\n  'HEAD',\n\n  'LINK',\n\n  'LOCK',\n\n  'M-SEARCH',\n\n  'MERGE',\n\n  'MKACTIVITY',\n\n  'MKCALENDAR',\n\n  'MKCOL',\n\n  'MOVE',\n\n  'NOTIFY',\n\n  'OPTIONS',\n\n  'PATCH',\n\n  'POST',\n\n  'PROPFIND',\n\n  'PROPPATCH',\n\n  'PURGE',\n\n  'PUT',\n\n  'REBIND',\n\n  'REPORT',\n\n  'SEARCH',\n\n  'SUBSCRIBE',\n\n  'TRACE',\n\n  'UNBIND',\n\n  'UNLINK',\n\n  'UNLOCK',\n\n  'UNSUBSCRIBE' ]\n</code></pre>\n<h3><code>http.STATUS_CODES</code></h3>\n<p>This property lists all the HTTP status codes and their description:</p>\n<pre><code class=\"language-js\">> require('http').STATUS_CODES\n\n{ '100': 'Continue',\n\n  '101': 'Switching Protocols',\n\n  '102': 'Processing',\n\n  '200': 'OK',\n\n  '201': 'Created',\n\n  '202': 'Accepted',\n\n  '203': 'Non-Authoritative Information',\n\n  '204': 'No Content',\n\n  '205': 'Reset Content',\n\n  '206': 'Partial Content',\n\n  '207': 'Multi-Status',\n\n  '208': 'Already Reported',\n\n  '226': 'IM Used',\n\n  '300': 'Multiple Choices',\n\n  '301': 'Moved Permanently',\n\n  '302': 'Found',\n\n  '303': 'See Other',\n\n  '304': 'Not Modified',\n\n  '305': 'Use Proxy',\n\n  '307': 'Temporary Redirect',\n\n  '308': 'Permanent Redirect',\n\n  '400': 'Bad Request',\n\n  '401': 'Unauthorized',\n\n  '402': 'Payment Required',\n\n  '403': 'Forbidden',\n\n  '404': 'Not Found',\n\n  '405': 'Method Not Allowed',\n\n  '406': 'Not Acceptable',\n\n  '407': 'Proxy Authentication Required',\n\n  '408': 'Request Timeout',\n\n  '409': 'Conflict',\n\n  '410': 'Gone',\n\n  '411': 'Length Required',\n\n  '412': 'Precondition Failed',\n\n  '413': 'Payload Too Large',\n\n  '414': 'URI Too Long',\n\n  '415': 'Unsupported Media Type',\n\n  '416': 'Range Not Satisfiable',\n\n  '417': 'Expectation Failed',\n\n  '418': 'I\\'m a teapot',\n\n  '421': 'Misdirected Request',\n\n  '422': 'Unprocessable Entity',\n\n  '423': 'Locked',\n\n  '424': 'Failed Dependency',\n\n  '425': 'Unordered Collection',\n\n  '426': 'Upgrade Required',\n\n  '428': 'Precondition Required',\n\n  '429': 'Too Many Requests',\n\n  '431': 'Request Header Fields Too Large',\n\n  '451': 'Unavailable For Legal Reasons',\n\n  '500': 'Internal Server Error',\n\n  '501': 'Not Implemented',\n\n  '502': 'Bad Gateway',\n\n  '503': 'Service Unavailable',\n\n  '504': 'Gateway Timeout',\n\n  '505': 'HTTP Version Not Supported',\n\n  '506': 'Variant Also Negotiates',\n\n  '507': 'Insufficient Storage',\n\n  '508': 'Loop Detected',\n\n  '509': 'Bandwidth Limit Exceeded',\n\n  '510': 'Not Extended',\n\n  '511': 'Network Authentication Required' }\n</code></pre>\n<h3><code>http.globalAgent</code></h3>\n<p>Points to the global instance of the Agent object, which is an instance of the <code>http.Agent</code> class.</p>\n<p>It's used to manage connections persistence and reuse for HTTP clients, and it's a key component of Node.js HTTP networking.</p>\n<p>More in the <code>http.Agent</code> class description later on.</p>\n<h2>Methods</h2>\n<h3><code>http.createServer()</code></h3>\n<p>Return a new instance of the <code>http.Server</code> class.</p>\n<p>Usage:</p>\n<pre><code class=\"language-js\">const server = http.createServer((req, res) => {\n    //handle every single request with this callback\n});\n</code></pre>\n<h3><code>http.request()</code></h3>\n<p>Makes an HTTP request to a server, creating an instance of the <code>http.ClientRequest</code> class.</p>\n<h3><code>http.get()</code></h3>\n<p>Similar to <code>http.request()</code>, but automatically sets the HTTP method to GET, and calls <code>req.end()</code> automatically.</p>\n<h2>Classes</h2>\n<p>The HTTP module provides 5 classes:</p>\n<ul>\n<li><code>http.Agent</code></li>\n<li><code>http.ClientRequest</code></li>\n<li><code>http.Server</code></li>\n<li><code>http.ServerResponse</code></li>\n<li><code>http.IncomingMessage</code></li>\n</ul>\n<h3><code>http.Agent</code></h3>\n<p>Node.js creates a global instance of the <code>http.Agent</code> class to manage connections persistence and reuse for HTTP clients, a key component of Node.js HTTP networking.</p>\n<p>This object makes sure that every request made to a server is queued and a single socket is reused.</p>\n<p>It also maintains a pool of sockets. This is key for performance reasons.</p>\n<h3><code>http.ClientRequest</code></h3>\n<p>An <code>http.ClientRequest</code> object is created when <code>http.request()</code> or <code>http.get()</code> is called.</p>\n<p>When a response is received, the <code>response</code> event is called with the response, with an <code>http.IncomingMessage</code> instance as argument.</p>\n<p>The returned data of a response can be read in 2 ways:</p>\n<ul>\n<li>you can call the <code>response.read()</code> method</li>\n<li>in the <code>response</code> event handler you can setup an event listener for the <code>data</code> event, so you can listen for the data streamed into.</li>\n</ul>\n<h3><code>http.Server</code></h3>\n<p>This class is commonly instantiated and returned when creating a new server using <code>http.createServer()</code>.</p>\n<p>Once you have a server object, you have access to its methods:</p>\n<ul>\n<li><code>close()</code> stops the server from accepting new connections</li>\n<li><code>listen()</code> starts the HTTP server and listens for connections</li>\n</ul>\n<h3><code>http.ServerResponse</code></h3>\n<p>Created by an <code>http.Server</code> and passed as the second parameter to the <code>request</code> event it fires.</p>\n<p>Commonly known and used in code as <code>res</code>:</p>\n<pre><code class=\"language-js\">const server = http.createServer((req, res) => {\n    //res is an http.ServerResponse object\n});\n</code></pre>\n<p>The method you'll always call in the handler is <code>end()</code>, which closes the response, the message is complete and the server can send it to the client. It must be called on each response.</p>\n<p>These methods are used to interact with HTTP headers:</p>\n<ul>\n<li><code>getHeaderNames()</code> get the list of the names of the HTTP headers already set</li>\n<li><code>getHeaders()</code> get a copy of the HTTP headers already set</li>\n<li><code>setHeader('headername', value)</code> sets an HTTP header value</li>\n<li><code>getHeader('headername')</code> gets an HTTP header already set</li>\n<li><code>removeHeader('headername')</code> removes an HTTP header already set</li>\n<li><code>hasHeader('headername')</code> return true if the response has that header set</li>\n<li><code>headersSent()</code> return true if the headers have already been sent to the client</li>\n</ul>\n<p>After processing the headers you can send them to the client by calling <code>response.writeHead()</code>, which accepts the statusCode as the first parameter, the optional status message, and the headers object.</p>\n<p>To send data to the client in the response body, you use <code>write()</code>. It will send buffered data to the HTTP response stream.</p>\n<p>If the headers were not sent yet using <code>response.writeHead()</code>, it will send the headers first, with the status code and message that's set in the request, which you can edit by setting the <code>statusCode</code> and <code>statusMessage</code> properties values:</p>\n<pre><code class=\"language-js\">response.statusCode = 500;\n\nresponse.statusMessage = 'Internal Server Error';\n</code></pre>\n<h3><code>http.IncomingMessage</code></h3>\n<p>An <code>http.IncomingMessage</code> object is created by:</p>\n<ul>\n<li><code>http.Server</code> when listening to the <code>request</code> event</li>\n<li><code>http.ClientRequest</code> when listening to the <code>response</code> event</li>\n</ul>\n<p>It can be used to access the response:</p>\n<ul>\n<li>status using its <code>statusCode</code> and <code>statusMessage</code> methods</li>\n<li>headers using its <code>headers</code> method or <code>rawHeaders</code></li>\n<li>HTTP method using its <code>method</code> method</li>\n<li>HTTP version using the <code>httpVersion</code> method</li>\n<li>URL using the <code>url</code> method</li>\n<li>underlying socket using the <code>socket</code> method</li>\n</ul>\n<p>The data is accessed using streams, since <code>http.IncomingMessage</code> implements the Readable Stream interface.</p>\n<h1>Node.js Buffers</h1>\n<p>description: 'Learn what Node.js buffers are, what they are used for, how to use them'</p>\n<h2>What is a buffer?</h2>\n<p>A buffer is an area of memory. Most JavaScript developers are much less familiar with this concept, compared to programmers using a system programming languages (like C, C++, or Go), which interact directly with memory every day.</p>\n<p>It represents a fixed-size chunk of memory (can't be resized) allocated outside of the V8 JavaScript engine.</p>\n<p>You can think of a buffer like an array of integers, which each represent a byte of data.</p>\n<p>It is implemented by the Node.js <a href=\"images/https://nodejs.org/api/buffer.html\">Buffer class</a>.</p>\n<h2>Why do we need a buffer?</h2>\n<p>Buffers were introduced to help developers deal with binary data, in an ecosystem that traditionally only dealt with strings rather than binaries.</p>\n<p>Buffers in Node.js are not related to the concept of buffering data. That is what happens when a stream processor receives data faster than it can digest.</p>\n<h2>How to create a buffer</h2>\n<p>A buffer is created using the <a href=\"images/https://nodejs.org/api/buffer.html#buffer_buffer_from_buffer_alloc_and_buffer_allocunsafe\"><code>Buffer.from()</code></a>, <a href=\"images/https://nodejs.org/api/buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding\"><code>Buffer.alloc()</code></a>, and <a href=\"images/https://nodejs.org/api/buffer.html#buffer_class_method_buffer_allocunsafe_size\"><code>Buffer.allocUnsafe()</code></a> methods.</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n</code></pre>\n<ul>\n<li><a href=\"images/https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_array\"><code>Buffer.from(array)</code></a></li>\n<li><a href=\"images/https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a></li>\n<li><a href=\"images/https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_buffer\"><code>Buffer.from(buffer)</code></a></li>\n<li><a href=\"images/https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding\"><code>Buffer.from(string[, encoding])</code></a></li>\n</ul>\n<p>You can also just initialize the buffer passing the size. This creates a 1KB buffer:</p>\n<pre><code class=\"language-js\">const buf = Buffer.alloc(1024);\n\n//or\n\nconst buf = Buffer.allocUnsafe(1024);\n</code></pre>\n<p>While both <code>alloc</code> and <code>allocUnsafe</code> allocate a <code>Buffer</code> of the specified size in bytes, the <code>Buffer</code> created by <code>alloc</code> will be <em>initialized</em> with zeroes and the one created by <code>allocUnsafe</code> will be <em>uninitialized</em>. This means that while <code>allocUnsafe</code> would be quite fast in comparison to <code>alloc</code>, the allocated segment of memory may contain old data which could potentially be sensitive.</p>\n<p>Older data, if present in the memory, can be accessed or leaked when the <code>Buffer</code> memory is read. This is what really makes <code>allocUnsafe</code> unsafe and extra care must be taken while using it.</p>\n<h2>Using a buffer</h2>\n<h3>Access the content of a buffer</h3>\n<p>A buffer, being an array of bytes, can be accessed like an array:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n\nconsole.log(buf[0]); //72\n\nconsole.log(buf[1]); //101\n\nconsole.log(buf[2]); //121\n</code></pre>\n<p>Those numbers are the UTF-8 bytes that identify the characters in the buffer (<code>H</code> → <code>72</code>, <code>e</code> → <code>101</code>, <code>y</code> → <code>121</code>). This happens because <code>Buffer.from()</code> uses UTF-8 by default.</p>\n<p>Keep in mind that some characters may occupy more than one byte in the buffer (<code>é</code> → <code>195 169</code>).</p>\n<p>You can print the full content of the buffer using the <code>toString()</code> method:</p>\n<pre><code class=\"language-js\">console.log(buf.toString());\n</code></pre>\n<p><code>buf.toString()</code> also uses UTF-8 by default.</p>\n<blockquote>\n<p>Notice that if you initialize a buffer with a number that sets its size, you'll get access to pre-initialized memory that will contain random data, not an empty buffer!</p>\n</blockquote>\n<h3>Get the length of a buffer</h3>\n<p>Use the <code>length</code> property:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n\nconsole.log(buf.length);\n</code></pre>\n<h3>Iterate over the contents of a buffer</h3>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n\nfor (const item of buf) {\n    console.log(item); //72 101 121 33\n}\n</code></pre>\n<h3>Changing the content of a buffer</h3>\n<p>You can write to a buffer a whole string of data by using the <code>write()</code> method:</p>\n<pre><code class=\"language-js\">const buf = Buffer.alloc(4);\n\nbuf.write('Hey!');\n</code></pre>\n<p>Just like you can access a buffer with an array syntax, you can also set the contents of the buffer in the same way:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n\nbuf[1] = 111; //o in UTF-8\n\nconsole.log(buf.toString()); //Hoy!\n</code></pre>\n<h3>Slice a buffer</h3>\n<p>If you want to create a partial visualization of a buffer, you can create a slice. A slice is not a copy: the original buffer is still the source of truth. If that changes, your slice changes.</p>\n<p>Use the <code>subarray()</code> method to create it. The first parameter is the starting position, and you can specify an optional second parameter with the end position:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n\nbuf.subarray(0).toString(); //Hey!\n\nconst slice = buf.subarray(0, 2);\n\nconsole.log(slice.toString()); //He\n\nbuf[1] = 111; //o\n\nconsole.log(slice.toString()); //Ho\n</code></pre>\n<h3>Copy a buffer</h3>\n<p>Copying a buffer is possible using the <code>set()</code> method:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey!');\n\nconst bufcopy = Buffer.alloc(4); //allocate 4 bytes\n\nbufcopy.set(buf);\n</code></pre>\n<p>By default you copy the whole buffer. If you only want to copy a part of the buffer, you can use <code>.subarray()</code> and the <code>offset</code> argument that specifies an offset to write to:</p>\n<pre><code class=\"language-js\">const buf = Buffer.from('Hey?');\n\nconst bufcopy = Buffer.from('Moo!');\n\nbufcopy.set(buf.subarray(1, 3), 1);\n\nbufcopy.toString(); //'Mey!'\n</code></pre>\n<h1>Node.js Streams</h1>\n<p>description: 'Learn what streams are for, why are they so important, and how to use them.'</p>\n<h2>What are streams</h2>\n<p>Streams are one of the fundamental concepts that power Node.js applications.</p>\n<p>They are a way to handle reading/writing files, network communications, or any kind of end-to-end information exchange in an efficient way.</p>\n<p>Streams are not a concept unique to Node.js. They were introduced in the Unix operating system decades ago, and programs can interact with each other passing streams through the pipe operator (<code>|</code>).</p>\n<p>For example, in the traditional way, when you tell the program to read a file, the file is read into memory, from start to finish, and then you process it.</p>\n<p>Using streams you read it piece by piece, processing its content without keeping it all in memory.</p>\n<p>The Node.js <a href=\"images/https://nodejs.org/api/stream.html\"><code>stream</code> module</a> provides the foundation upon which all streaming APIs are built.</p>\n<p>All streams are instances of <a href=\"images/https://nodejs.org/api/events.html#events_class_eventemitter\">EventEmitter</a></p>\n<h2>Why streams</h2>\n<p>Streams basically provide two major advantages over using other data handling methods:</p>\n<ul>\n<li><strong>Memory efficiency</strong>: you don't need to load large amounts of data in memory before you are able to process it</li>\n<li><strong>Time efficiency</strong>: it takes way less time to start processing data, since you can start processing as soon as you have it, rather than waiting till the whole data payload is available</li>\n</ul>\n<h2>An example of a stream</h2>\n<p>A typical example is reading files from a disk.</p>\n<p>Using the Node.js <code>fs</code> module, you can read a file, and serve it over HTTP when a new connection is established to your HTTP server:</p>\n<pre><code class=\"language-js\">const http = require('http');\n\nconst fs = require('fs');\n\nconst server = http.createServer(function (req, res) {\n    fs.readFile(__dirname + '/data.txt', (err, data) => {\n        res.end(data);\n    });\n});\n\nserver.listen(3000);\n</code></pre>\n<p><code>readFile()</code> reads the full contents of the file, and invokes the callback function when it's done.</p>\n<p><code>res.end(data)</code> in the callback will return the file contents to the HTTP client.</p>\n<p>If the file is big, the operation will take quite a bit of time. Here is the same thing written using streams:</p>\n<pre><code class=\"language-js\">const http = require('http');\n\nconst fs = require('fs');\n\nconst server = http.createServer((req, res) => {\n    const stream = fs.createReadStream(__dirname + '/data.txt');\n\n    stream.pipe(res);\n});\n\nserver.listen(3000);\n</code></pre>\n<p>Instead of waiting until the file is fully read, we start streaming it to the HTTP client as soon as we have a chunk of data ready to be sent.</p>\n<h2>pipe()</h2>\n<p>The above example uses the line <code>stream.pipe(res)</code>: the <code>pipe()</code> method is called on the file stream.</p>\n<p>What does this code do? It takes the source, and pipes it into a destination.</p>\n<p>You call it on the source stream, so in this case, the file stream is piped to the HTTP response.</p>\n<p>The return value of the <code>pipe()</code> method is the destination stream, which is a very convenient thing that lets us chain multiple <code>pipe()</code> calls, like this:</p>\n<pre><code class=\"language-js\">src.pipe(dest1).pipe(dest2);\n</code></pre>\n<p>This construct is the same as doing</p>\n<pre><code class=\"language-js\">src.pipe(dest1);\n\ndest1.pipe(dest2);\n</code></pre>\n<h2>Streams-powered Node.js APIs</h2>\n<p>Due to their advantages, many Node.js core modules provide native stream handling capabilities, most notably:</p>\n<ul>\n<li><code>process.stdin</code> returns a stream connected to stdin</li>\n<li><code>process.stdout</code> returns a stream connected to stdout</li>\n<li><code>process.stderr</code> returns a stream connected to stderr</li>\n<li><code>fs.createReadStream()</code> creates a readable stream to a file</li>\n<li><code>fs.createWriteStream()</code> creates a writable stream to a file</li>\n<li><code>net.connect()</code> initiates a stream-based connection</li>\n<li><code>http.request()</code> returns an instance of the http.ClientRequest class, which is a writable stream</li>\n<li><code>zlib.createGzip()</code> compress data using gzip (a compression algorithm) into a stream</li>\n<li><code>zlib.createGunzip()</code> decompress a gzip stream.</li>\n<li><code>zlib.createDeflate()</code> compress data using deflate (a compression algorithm) into a stream</li>\n<li><code>zlib.createInflate()</code> decompress a deflate stream</li>\n</ul>\n<h2>Different types of streams</h2>\n<p>There are four classes of streams:</p>\n<ul>\n<li><code>Readable</code>: a stream you can pipe from, but not pipe into (you can receive data, but not send data to it). When you push data into a readable stream, it is buffered, until a consumer starts to read the data.</li>\n<li><code>Writable</code>: a stream you can pipe into, but not pipe from (you can send data, but not receive from it)</li>\n<li><code>Duplex</code>: a stream you can both pipe into and pipe from, basically a combination of a Readable and Writable stream</li>\n<li><code>Transform</code>: a Transform stream is similar to a Duplex, but the output is a transform of its input</li>\n</ul>\n<h2>How to create a readable stream</h2>\n<p>We get the Readable stream from the <a href=\"images/https://nodejs.org/api/stream.html\"><code>stream</code> module</a>, and we initialize it and implement the <code>readable._read()</code> method.</p>\n<p>First create a stream object:</p>\n<pre><code class=\"language-js\">const Stream = require('stream');\n\nconst readableStream = new Stream.Readable();\n</code></pre>\n<p>then implement <code>_read</code>:</p>\n<pre><code class=\"language-js\">readableStream._read = () => {};\n</code></pre>\n<p>You can also implement <code>_read</code> using the <code>read</code> option:</p>\n<pre><code class=\"language-js\">const readableStream = new Stream.Readable({\n    read() {}\n});\n</code></pre>\n<p>Now that the stream is initialized, we can send data to it:</p>\n<pre><code class=\"language-js\">readableStream.push('hi!');\n\nreadableStream.push('ho!');\n</code></pre>\n<h2>How to create a writable stream</h2>\n<p>To create a writable stream we extend the base <code>Writable</code> object, and we implement its _write() method.</p>\n<p>First create a stream object:</p>\n<pre><code class=\"language-js\">const Stream = require('stream');\n\nconst writableStream = new Stream.Writable();\n</code></pre>\n<p>then implement <code>_write</code>:</p>\n<pre><code class=\"language-js\">writableStream._write = (chunk, encoding, next) => {\n    console.log(chunk.toString());\n\n    next();\n};\n</code></pre>\n<p>You can now pipe a</p>\n<p>readable stream in:</p>\n<pre><code class=\"language-js\">process.stdin.pipe(writableStream);\n</code></pre>\n<h2>How to get data from a readable stream</h2>\n<p>How do we read data from a readable stream? Using a writable stream:</p>\n<pre><code class=\"language-js\">const Stream = require('stream');\n\nconst readableStream = new Stream.Readable({\n    read() {}\n});\n\nconst writableStream = new Stream.Writable();\n\nwritableStream._write = (chunk, encoding, next) => {\n    console.log(chunk.toString());\n\n    next();\n};\n\nreadableStream.pipe(writableStream);\n\nreadableStream.push('hi!');\n\nreadableStream.push('ho!');\n</code></pre>\n<p>You can also consume a readable stream directly, using the <code>readable</code> event:</p>\n<pre><code class=\"language-js\">readableStream.on('readable', () => {\n    console.log(readableStream.read());\n});\n</code></pre>\n<h2>How to send data to a writable stream</h2>\n<p>Using the stream <code>write()</code> method:</p>\n<pre><code class=\"language-js\">writableStream.write('hey!\\n');\n</code></pre>\n<h2>Signaling a writable stream that you ended writing</h2>\n<p>Use the <code>end()</code> method:</p>\n<pre><code class=\"language-js\">const Stream = require('stream');\n\nconst readableStream = new Stream.Readable({\n    read() {}\n});\n\nconst writableStream = new Stream.Writable();\n\nwritableStream._write = (chunk, encoding, next) => {\n    console.log(chunk.toString());\n\n    next();\n};\n\nreadableStream.pipe(writableStream);\n\nreadableStream.push('hi!');\n\nreadableStream.push('ho!');\n\nwritableStream.end();\n</code></pre>\n<h2>How to create a transform stream</h2>\n<p>We get the Transform stream from the <a href=\"images/https://nodejs.org/api/stream.html\"><code>stream</code> module</a>, and we initialize it and implement the <code>transform._transform()</code> method.</p>\n<p>First create a transform stream object:</p>\n<pre><code class=\"language-js\">const { Transform } = require('stream');\n\nconst TransformStream = new Transform();\n</code></pre>\n<p>then implement <code>_transform</code>:</p>\n<pre><code class=\"language-js\">TransformStream._transform = (chunk, encoding, callback) => {\n    TransformStream.push(chunk.toString().toUpperCase());\n\n    callback();\n};\n</code></pre>\n<p>Pipe readable stream:</p>\n<pre><code class=\"language-js\">process.stdin.pipe(TransformStream).pipe(process.stdout);\n</code></pre>\n<h1>Node.js, the difference between development and production</h1>\n<p>description: 'Learn how to set up different configurations for production and development environments'</p>\n<p>You can have different configurations for production and development environments.</p>\n<p>Node.js assumes it's always running in a development environment.</p>\n<p>You can signal Node.js that you are running in production by setting the <code>NODE_ENV=production</code> environment variable.</p>\n<p>This is usually done by executing the command</p>\n<pre><code class=\"language-bash\">export NODE_ENV=production\n</code></pre>\n<p>in the shell, but it's better to put it in your shell configuration file (e.g. <code>.bash_profile</code> with the Bash shell) because otherwise the setting does not persist in case of a system restart.</p>\n<p>You can also apply the environment variable by prepending it to your application initialization command:</p>\n<pre><code class=\"language-bash\">NODE_ENV=production node app.js\n</code></pre>\n<p>This environment variable is a convention that is widely used in external libraries as well.</p>\n<p>Setting the environment to <code>production</code> generally ensures that</p>\n<ul>\n<li>logging is kept to a minimum, essential level</li>\n<li>more caching levels take place to optimize performance</li>\n</ul>\n<p>For example Pug, the templating library used by Express, compiles in debug mode if <code>NODE_ENV</code> is not set to <code>production</code>. Express views are compiled in every request in development mode, while in production they are cached. There are many more examples.</p>\n<p>You can use conditional statements to execute code in different environments:</p>\n<pre><code class=\"language-js\">if (process.env.NODE_ENV === \"development\") {\n\n  //...\n\n}\n\nif (process.env.NODE_ENV === \"production\") {\n\n  //...\n\n}\n\nif(['production', 'staging'].indexOf(process.env.NODE_ENV) >= 0) {\n\n  //...\n\n})\n</code></pre>\n<p>For example, in an Express app, you can use this to set different error handlers per environment:</p>\n<pre><code class=\"language-js\">if (process.env.NODE_ENV === \"development\") {\n\n  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))\n\n})\n\n\n\nif (process.env.NODE_ENV === \"production\") {\n\n  app.use(express.errorHandler())\n\n})\n</code></pre>\n<h1>Error handling in Node.js</h1>\n<p>description: 'How to handle errors during the execution of a Node.js application'</p>\n<p>Errors in Node.js are handled through exceptions.</p>\n<h2>Creating exceptions</h2>\n<p>An exception is created using the <code>throw</code> keyword:</p>\n<pre><code class=\"language-js\">throw value;\n</code></pre>\n<p>As soon as JavaScript executes this line, the normal program flow is halted and the control is held back to the nearest <strong>exception handler</strong>.</p>\n<p>Usually in client-side code <code>value</code> can be any JavaScript value including a string, a number or an object.</p>\n<p>In Node.js, we don't throw strings, we just throw Error objects.</p>\n<h2>Error objects</h2>\n<p>An error object is an object that is either an instance of the Error object, or extends the Error class, provided in the <a href=\"images/https://nodejs.org/api/errors.html\">Error core module</a>:</p>\n<pre><code class=\"language-js\">throw new Error('Ran out of coffee');\n</code></pre>\n<p>or</p>\n<pre><code class=\"language-js\">class NotEnoughCoffeeError extends Error {\n    //...\n}\n\nthrow new NotEnoughCoffeeError();\n</code></pre>\n<h2>Handling exceptions</h2>\n<p>An exception handler is a <code>try</code>/<code>catch</code> statement.</p>\n<p>Any exception raised in the lines of code included in the <code>try</code> block is handled in the corresponding <code>catch</code> block:</p>\n<pre><code class=\"language-js\">try {\n    //lines of code\n} catch (e) {}\n</code></pre>\n<p><code>e</code> in this example is the exception value.</p>\n<p>You can add multiple handlers, that can catch different kinds of errors.</p>\n<h2>Catching uncaught exceptions</h2>\n<p>If an uncaught exception gets thrown during the execution of your program, your program will crash.</p>\n<p>To solve this, you listen for the <code>uncaughtException</code> event on the <code>process</code> object:</p>\n<pre><code class=\"language-js\">process.on('uncaughtException', (err) => {\n    console.error('There was an uncaught error', err);\n\n    process.exit(1); //mandatory (as per the Node.js docs)\n});\n</code></pre>\n<p>You don't need to import the <code>process</code> core module for this, as it's automatically injected.</p>\n<h2>Exceptions with promises</h2>\n<p>Using promises you can chain different operations, and handle errors at the end:</p>\n<pre><code class=\"language-js\">doSomething1()\n    .then(doSomething2)\n\n    .then(doSomething3)\n\n    .catch((err) => console.error(err));\n</code></pre>\n<p>How do you know where the error occurred? You don't really know, but you can handle errors in each of the functions you call (<code>doSomethingX</code>), and inside the error handler throw a new error, that's going to call the outside <code>catch</code> handler:</p>\n<pre><code class=\"language-js\">const doSomething1 = () => {\n    //...\n\n    try {\n        //...\n    } catch (err) {\n        //... handle it locally\n\n        throw new Error(err.message);\n    }\n\n    //...\n};\n</code></pre>\n<p>To be able to handle errors locally without handling them in the function we call, we can break the chain. You can create a function in each <code>then()</code> and process the exception:</p>\n<pre><code class=\"language-js\">doSomething1()\n    .then(() => {\n        return doSomething2().catch((err) => {\n            //handle error\n\n            throw err; //break the chain!\n        });\n    })\n\n    .then(() => {\n        return doSomething3().catch((err) => {\n            //handle error\n\n            throw err; //break the chain!\n        });\n    })\n\n    .catch((err) => console.error(err));\n</code></pre>\n<h2>Error handling with async/await</h2>\n<p>Using async/await, you still need to catch errors, and you do it this way:</p>\n<pre><code class=\"language-js\">async function someFunction() {\n    try {\n        await someOtherFunction();\n    } catch (err) {\n        console.error(err.message);\n    }\n}\n</code></pre>\n<h1>How to log an object in Node.js</h1>\n<p>description: 'Logging objects in Node.js'</p>\n<p>When you type <code>console.log()</code> into a JavaScript program that runs in the browser, that is going to create a nice entry in the Browser Console:</p>\n<p><img src=\"images/console-log-browser.png\"></p>\n<p>Once you click the arrow, the log is expanded, and you can clearly see the object properties:</p>\n<p><img src=\"images/console-log-browser-expanded.png\"></p>\n<p>In Node.js, the same happens.</p>\n<p>We don't have such luxury when we log something to the console, because that's going to output the object to the shell if you run the Node.js program manually, or to the log file. You get a string representation of the object.</p>\n<p>Now, all is fine until a certain level of nesting. After two levels of nesting, Node.js gives up and prints <code>[Object]</code> as a placeholder:</p>\n<pre><code class=\"language-js\">const obj = {\n\n  name: 'joe',\n\n  age: 35,\n\n  person1: {\n\n    name: 'Tony',\n\n    age: 50,\n\n    person2: {\n\n      name: 'Albert',\n\n      age: 21,\n\n      person3: {\n\n        name: 'Peter',\n\n        age: 23\n\n      }\n\n    }\n\n  }\n\n}\n\nconsole.log(obj)\n\n\n\n\n\n{\n\n  name: 'joe',\n\n  age: 35,\n\n  person1: {\n\n    name: 'Tony',\n\n    age: 50,\n\n    person2: {\n\n      name: 'Albert',\n\n      age: 21,\n\n      person3: [Object]\n\n    }\n\n  }\n\n}\n</code></pre>\n<p>How can you print the whole object?</p>\n<p>The best way to do so, while preserving the pretty print, is to use</p>\n<pre><code class=\"language-js\">console.log(JSON.stringify(obj, null, 2));\n</code></pre>\n<p>where <code>2</code> is the number of spaces to use for indentation.</p>\n<p>Another option is to use</p>\n<pre><code class=\"language-js\">require('util').inspect.defaultOptions.depth = null;\n\nconsole.log(obj);\n</code></pre>\n<p>but the problem is that the nested objects after level 2 are now flattened, and this might be a problem with complex objects.</p>\n<h1>'Node.js with TypeScript'</h1>\n<p>description: 'Find out why TypeScript is an awesome tool and learn to use it by yourself.'</p>\n<h2>What is TypeScript</h2>\n<p>TypeScript is a very popular open-source language maintained and developed by Microsoft, it's loved and used by a lot of software developers around the world.</p>\n<p>Basically, it's a superset of JavaScript that adds new capabilities to the language. Most notable addition are static type definitions, something that is not present in plain JavaScript. Thanks to types, it's possible, for example, to declare what kind of arguments we are expecting and what is returned exactly in our functions or what's the exact shape of the object that we are creating. TypeScript is a really powerful tool and opens new world of possibilities in JavaScript projects. It makes our code more secure and robust by preventing a lot of bugs before code is even shipped - it catches problems during writing the code and integrates wonderfully with code editors like Visual Studio Code.</p>\n<p>We can talk about other TypeScript benefits later, let's see some examples now!</p>\n<h2>Examples</h2>\n<p>Take a look at this code snippet and then we can unpack it together:</p>\n<pre><code class=\"language-js\">type User = {\n    name: string,\n\n    age: number\n};\n\nfunction isAdult(user: User): boolean {\n    return user.age >= 18;\n}\n\nconst justine: User = {\n    name: 'Justine',\n\n    age: 23\n};\n\nconst isJustineAnAdult: boolean = isAdult(justine);\n</code></pre>\n<p>First part with <code>type</code> keyword is responsible for declaring our custom type of objects representing users. Later we utilize this newly created type to create function <code>isAdult</code> that accepts one argument of type <code>User</code> and returns <code>boolean</code>. After this we create <code>justine</code>, our example data that can be used for calling previously defined function. Finally, we create new variable with information whether <code>justine</code> is an adult or not.</p>\n<p>There are additional things about this example that you should know. Firstly, if we would not comply with declared types, TypeScript would alarm us that something is wrong and prevent misuse. Secondly, not everything must be typed explicitly - TypeScript is very smart and can deduce types for us. For example, variable <code>isJustineAnAdult</code> would be of type <code>boolean</code> even if we didn't type it explicitly or <code>justine</code> would be valid argument for our function even if we didn't declare this variable as of <code>User</code> type.</p>\n<p>Okay, so we have some TypeScript code. Now how do we run it?</p>\n<p>First thing to do is to install TypeScript in our project:</p>\n<pre><code class=\"language-bash\">npm i -D typescript\n</code></pre>\n<p>Now we can compile it to JavaScript using <code>tsc</code> command in the terminal. Let's do it!</p>\n<p>Assuming that our file is named <code>example.ts</code>, the command would look like:</p>\n<pre><code class=\"language-bash\">tsc example.ts\n</code></pre>\n<p>This command will result in a new file named <code>example.js</code> that we can run using Node.js.</p>\n<p>Now when we know how to compile and run TypeScript code let's see TypeScript bug-preventing capabilities in action!</p>\n<p>This is how we will modify our code:</p>\n<pre><code class=\"language-js\">type User = {\n    name: string,\n\n    age: number\n};\n\nfunction isAdult(user: User): boolean {\n    return user.age >= 18;\n}\n\nconst justine: User = {\n    name: 'Justine',\n\n    age: 'Secret!'\n};\n\nconst isJustineAnAdult: string = isAdult(justine, \"I shouldn't be here!\");\n</code></pre>\n<p>And this is what TypeScript has to say about this:</p>\n<pre><code class=\"language-js\">example.ts:12:3 - error TS2322: Type 'string' is not assignable to type 'number'.\n\n\n\n12   age: \"Secret!\",\n\n     ~~~\n\n\n\n  example.ts:3:3\n\n    3   age: number;\n\n        ~~~\n\n    The expected type comes from property 'age' which is declared here on type 'User'\n\n\n\nexample.ts:15:7 - error TS2322: Type 'boolean' is not assignable to type 'string'.\n\n\n\n15 const isJustineAnAdult: string = isAdult(justine, \"I shouldn't be here!\");\n\n         ~~~~~~~~~~~~~~~~\n\n\n\nexample.ts:15:51 - error TS2554: Expected 1 arguments, but got 2.\n\n\n\n15 const isJustineAnAdult: string = isAdult(justine, \"I shouldn't be here!\");\n\n                                                     ~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n\n\nFound 3 errors.\n</code></pre>\n<p>As you can see TypeScript successfully prevents us from shipping code that could work unexpectedly. That's wonderful!</p>\n<h2>More about TypeScript</h2>\n<p>TypeScript offers a whole lot of other great mechanisms like interfaces, classes, utility types and so on. Also, on bigger projects you can declare your TypeScript compiler configuration in a separate file and granularly adjust how it works, how strict it is and where it stores compiled files for example. You can read more about all this awesome stuff in <a href=\"images/https://www.typescriptlang.org/docs\">the official TypeScript docs</a>.</p>\n<p>Some of the other benefits of TypeScript that are worth mentioning are that it can be adopted progressively, it helps making code more readable and understandable and it allows developers to use modern language features while shipping code for older Node.js versions.</p>\n<h2>TypeScript in the Node.js world</h2>\n<p>TypeScript is well-established in the Node.js world and used by many companies, open-source projects, tools and frameworks.</p>\n<p>Some of the notable examples of open-source projects using TypeScript are:</p>\n<ul>\n<li><a href=\"images/https://nestjs.com/\">NestJS</a> - robust and fully-featured framework that makes creating scalable and well-architected systems easy and pleasant</li>\n<li><a href=\"images/https://typeorm.io/#/\">TypeORM</a> - great ORM influenced by other well-known tools from other languages like Hibernate, Doctrine or Entity Framework</li>\n<li><a href=\"images/https://prisma.io/\">Prisma</a> - next-generation ORM featuring a declarative data model, generated migrations and fully type-safe database queries</li>\n<li><a href=\"images/https://rxjs.dev/\">RxJS</a> - widely used library for reactive programming</li>\n<li><a href=\"images/https://adonisjs.com\">AdonisJS</a> - A fully featured web framework with Node.js</li>\n</ul>\n<p>And many, many more great projects... Maybe even your next one!</p>\n<h1>Differences between Node.js and the Browser</h1>\n<p>description: 'How writing JavaScript application in Node.js differs from programming for the Web inside the browser'</p>\n<p>Both the browser and Node.js use JavaScript as their programming language.</p>\n<p>Building apps that run in the browser is a completely different thing than building a Node.js application.</p>\n<p>Despite the fact that it's always JavaScript, there are some key differences that make the experience radically different.</p>\n<p>From the perspective of a frontend developer who extensively uses JavaScript, Node.js apps bring with them a huge advantage: the comfort of programming everything - the frontend and the backend - in a single language.</p>\n<p>You have a huge opportunity because we know how hard it is to fully, deeply learn a programming language, and by using the same language to perform all your work on the web - both on the client and on the server, you're in a unique position of advantage.</p>\n<p>What changes is the ecosystem.</p>\n<p>In the browser, most of the time what you are doing is interacting with the DOM, or other Web Platform APIs like Cookies. Those do not exist in Node.js, of course. You don't have the <code>document</code>, <code>window</code> and all the other objects that are provided by the browser.</p>\n<p>And in the browser, we don't have all the nice APIs that Node.js provides through its modules, like the filesystem access functionality.</p>\n<p>Another big difference is that in Node.js you control the environment. Unless you are building an open source application that anyone can deploy anywhere, you know which version of Node.js you will run the application on. Compared to the browser environment, where you don't get the luxury to choose what browser your visitors will use, this is very convenient.</p>\n<p>This means that you can write all the modern ES6-7-8-9 JavaScript that your Node.js version supports.</p>\n<p>Since JavaScript moves so fast, but browsers can be a bit slow to upgrade, sometimes on the web you are stuck with using older JavaScript / ECMAScript releases.</p>\n<p>You can use Babel to transform your code to be ES5-compatible before shipping it to the browser, but in Node.js, you won't need that.</p>\n<p>Another difference is that Node.js uses the CommonJS module system, while in the browser we are starting to see the ES Modules standard being implemented.</p>\n<p>In practice, this means that for the time being you use <code>require()</code> in Node.js and <code>import</code> in the browser.</p>\n<h1>The V8 JavaScript Engine</h1>\n<p>description: \"V8 is the name of the JavaScript engine that powers Google Chrome. It's the thing that takes our JavaScript and executes it while browsing with Chrome. V8 provides the runtime environment in which JavaScript executes. The DOM and the other Web Platform APIs are provided by the browser.\"</p>\n<hr>\n<p>V8 is the name of the JavaScript engine that powers Google Chrome. It's the thing that takes our JavaScript and executes it while browsing with Chrome.</p>\n<p>V8 provides the runtime environment in which JavaScript executes. The DOM, and the other Web Platform APIs are provided by the browser.</p>\n<p>The cool thing is that the JavaScript engine is independent of the browser in which it's hosted. This key feature enabled the rise of Node.js. V8 was chosen to be the engine that powered Node.js back in 2009, and as the popularity of Node.js exploded, V8 became the engine that now powers an incredible amount of server-side code written in JavaScript.</p>\n<p>The Node.js ecosystem is huge and thanks to V8 which also powers desktop apps, with projects like Electron.</p>\n<h2>Other JS engines</h2>\n<p>Other browsers have their own JavaScript engine:</p>\n<ul>\n<li>Firefox has <a href=\"images/https://spidermonkey.dev\"><strong>SpiderMonkey</strong></a></li>\n<li>Safari has <a href=\"images/https://developer.apple.com/documentation/javascriptcore\"><strong>JavaScriptCore</strong></a> (also called Nitro)</li>\n<li>Edge was originally based on <a href=\"images/https://github.com/Microsoft/ChakraCore\"><strong>Chakra</strong></a> but has more recently been <a href=\"images/https://support.microsoft.com/en-us/help/4501095/download-the-new-microsoft-edge-based-on-chromium\">rebuilt using Chromium</a> and the V8 engine.</li>\n</ul>\n<p>and many others exist as well.</p>\n<p>All those engines implement the <a href=\"images/https://www.ecma-international.org/publications/standards/Ecma-262.htm\">ECMA ES-262 standard</a>, also called ECMAScript, the standard used by JavaScript.</p>\n<h2>The quest for performance</h2>\n<p>V8 is written in C++, and it's continuously improved. It is portable and runs on Mac, Windows, Linux and several other systems.</p>\n<p>In this V8 introduction, we will ignore the implementation details of V8: they can be found on more authoritative sites (e.g. the <a href=\"images/https://v8.dev/\">V8 official site</a>), and they change over time, often radically.</p>\n<p>V8 is always evolving, just like the other JavaScript engines around, to speed up the Web and the Node.js ecosystem.</p>\n<p>On the web, there is a race for performance that's been going on for years, and we (as users and developers) benefit a lot from this competition because we get faster and more optimized machines year after year.</p>\n<h2>Compilation</h2>\n<p>JavaScript is generally considered an interpreted language, but modern JavaScript engines no longer just interpret JavaScript, they compile it.</p>\n<p>This has been happening since 2009, when the SpiderMonkey JavaScript compiler was added to Firefox 3.5, and everyone followed this idea.</p>\n<p>JavaScript is internally compiled by V8 with <strong>just-in-time</strong> (JIT) <strong>compilation</strong> to speed up the execution.</p>\n<p>This might seem counter-intuitive, but since the introduction of Google Maps in 2004, JavaScript has evolved from a language that was generally executing a few dozens of lines of code to complete applications with thousands to hundreds of thousands of lines running in the browser.</p>\n<p>Our applications can now run for hours inside a browser, rather than being just a few form validation rules or simple scripts.</p>\n<p>In this <em>new world</em>, compiling JavaScript makes perfect sense because while it might take a little bit more to have the JavaScript <em>ready</em>, once done it's going to be much more performant than purely interpreted code.</p>\n<h1>Run Node.js scripts from the command line</h1>\n<p>description: 'How to run any Node.js script from the CLI'</p>\n<p>The usual way to run a Node.js program is to run the <code>node</code> globally available command (once you install Node.js) and pass the name of the file you want to execute.</p>\n<p>If your main Node.js application file is <code>app.js</code>, you can call it by typing:</p>\n<pre><code class=\"language-bash\">node app.js\n</code></pre>\n<p>Above, you are explicitly telling the shell to run your script with <code>node</code>. You can also embed this information into your JavaScript file with a \"shebang\" line. The \"shebang\" is the first line in the file, and tells the OS which interpreter to use for running the script. Below is the first line of JavaScript:</p>\n<pre><code class=\"language-bash\">#!/usr/bin/node\n</code></pre>\n<p>Above, we are explicitly giving the absolute path of interpreter. Not all operating systems have <code>node</code> in the bin folder, but all should have <code>env</code>. You can tell the OS to run <code>env</code> with node as parameter:</p>\n<pre><code class=\"language-bash\">#!/usr/bin/env node\n\n\n\n// your code\n</code></pre>\n<p>To use a shebang, your file should have executable permission. You can give <code>app.js</code> the executable permission by running:</p>\n<pre><code class=\"language-bash\">chmod u+x app.js\n</code></pre>\n<p>While running the command, make sure you are in the same directory which contains the <code>app.js</code> file.</p>\n<h1>How to exit from a Node.js program</h1>\n<p>description: 'Learn how to terminate a Node.js app in the best possible way'</p>\n<p>There are various ways to terminate a Node.js application.</p>\n<p>When running a program in the console you can close it with <code>ctrl-C</code>, but what we want to discuss here is programmatically exiting.</p>\n<p>Let's start with the most drastic one, and see why you're better off <em>not</em> using it.</p>\n<p>The <code>process</code> core module provides a handy method that allows you to programmatically exit from a Node.js program: <code>process.exit()</code>.</p>\n<p>When Node.js runs this line, the process is immediately forced to terminate.</p>\n<p>This means that any callback that's pending, any network request still being sent, any filesystem access, or processes writing to <code>stdout</code> or <code>stderr</code> - all is going to be ungracefully terminated right away.</p>\n<p>If this is fine for you, you can pass an integer that signals the operating system the exit code:</p>\n<pre><code class=\"language-js\">process.exit(1);\n</code></pre>\n<p>By default the exit code is <code>0</code>, which means success. Different exit codes have different meaning, which you might want to use in your own system to have the program communicate to other programs.</p>\n<p>You can read more on exit codes at <a href=\"https://nodejs.org/api/process.html#process_exit_codes\">https://nodejs.org/api/process.html#process_exit_codes</a></p>\n<p>You can also set the <code>process.exitCode</code> property:</p>\n<pre><code class=\"language-js\">process.exitCode = 1;\n</code></pre>\n<p>and when the program ends, Node.js will return that exit code.</p>\n<p>A program will gracefully exit when all the processing is done.</p>\n<p>Many times with Node.js we start servers, like this HTTP server:</p>\n<pre><code class=\"language-js\">const express = require('express');\n\nconst app = express();\n\napp.get('/', (req, res) => {\n    res.send('Hi!');\n});\n\napp.listen(3000, () => console.log('Server ready'));\n</code></pre>\n<blockquote>\n<p>Express is a framework that uses the http module under the hood, app.listen() returns an instance of http. You would use https.createServer if you needed to serve your app using HTTPS, as app.listen only uses the http module.</p>\n</blockquote>\n<p>This program is never going to end. If you call <code>process.exit()</code>, any currently pending or running request is going to be aborted. This is <em>not nice</em>.</p>\n<p>In this case you need to send the command a SIGTERM signal, and handle that with the process signal handler:</p>\n<blockquote>\n<p>Note: <code>process</code> does not require a \"require\", it's automatically available.</p>\n</blockquote>\n<pre><code class=\"language-js\">const express = require('express');\n\nconst app = express();\n\napp.get('/', (req, res) => {\n    res.send('Hi!');\n});\n\nconst server = app.listen(3000, () => console.log('Server ready'));\n\nprocess.on('SIGTERM', () => {\n    server.close(() => {\n        console.log('Process terminated');\n    });\n});\n</code></pre>\n<blockquote>\n<p>What are signals? Signals are a POSIX intercommunication system: a notification sent to a process in order to notify it of an event that occurred.</p>\n</blockquote>\n<p><code>SIGKILL</code> is the signal that tells a process to immediately terminate, and would ideally act like <code>process.exit()</code>.</p>\n<p><code>SIGTERM</code> is the signal that tells a process to gracefully terminate. It is the signal that's sent from process managers like <code>upstart</code> or <code>supervisord</code> and many others.</p>\n<p>You can send this signal from inside the program, in another function:</p>\n<pre><code class=\"language-js\">process.kill(process.pid, 'SIGTERM');\n</code></pre>\n<p>Or from another Node.js running program, or any other app running in your system that knows the PID of the process you want to terminate.</p>\n<h1>How to read environment variables from Node.js</h1>\n<p>description: 'Learn how to read and make use of environment variables in a Node.js program'</p>\n<p>The <code>process</code> core module of Node.js provides the <code>env</code> property which hosts all the environment variables that were set at the moment the process was started.</p>\n<p>The below code runs <code>app.js</code> and set <code>USER_ID</code> and <code>USER_KEY</code>.</p>\n<pre><code class=\"language-bash\">USER_ID=239482 USER_KEY=foobar node app.js\n</code></pre>\n<p>That will pass the user <code>USER_ID</code> as <strong>239482</strong> and the <code>USER_KEY</code> as <strong>foobar</strong>. This is suitable for testing, however for production, you will probably be configuring some bash scripts to export variables.</p>\n<blockquote>\n<p>Note: <code>process</code> does not require a \"require\", it's automatically available.</p>\n</blockquote>\n<p>Here is an example that accesses the <code>USER_ID</code> and <code>USER_KEY</code> environment variables, which we set in above code.</p>\n<pre><code class=\"language-js\">process.env.USER_ID; // \"239482\"\n\nprocess.env.USER_KEY; // \"foobar\"\n</code></pre>\n<p>In the same way you can access any custom environment variable you set.</p>\n<p>If you have multiple environment variables in your node project, you can also create an <code>.env</code> file in the root directory of your project, and then use the <a href=\"images/https://www.npmjs.com/package/dotenv\">dotenv</a> package to load them during runtime.</p>\n<pre><code class=\"language-bash\"># .env file\n\nUSER_ID=\"239482\"\n\nUSER_KEY=\"foobar\"\n\nNODE_ENV=\"development\"\n</code></pre>\n<p>In your js file</p>\n<pre><code class=\"language-js\">require('dotenv').config();\n\nprocess.env.USER_ID; // \"239482\"\n\nprocess.env.USER_KEY; // \"foobar\"\n\nprocess.env.NODE_ENV; // \"development\"\n</code></pre>\n<blockquote>\n<p>You can also run your js file with <code>node -r dotenv/config index.js</code> command if you don't want to import the package in your code.</p>\n</blockquote>\n<h1>'Node.js with WebAssembly'</h1>\n<p>description: 'Find out why WebAssembly is an awesome tool and learn to use it by yourself.'</p>\n<p>WebAssembly is a high-performance assembly-like language that can be compiled from a myriad of languages including C/C++, Rust, and AssemblyScript. As of right now, it is supported by Chrome, Firefox, Safari, Edge, and Node.js!</p>\n<p>The WebAssembly specification details two file formats, a binary format called a WebAssembly Module with a <code>.wasm</code> extension and corresponding text representation called WebAssembly Text format with a <code>.wat</code> extension.</p>\n<h2>Key Concepts</h2>\n<ul>\n<li>Module - A compiled WebAssembly binary, ie a <code>.wasm</code> file.</li>\n<li>Memory - A resizable ArrayBuffer.</li>\n<li>Table - A resizable typed array of references not stored in Memory.</li>\n<li>Instance - An instantiation of a Module with its Memory, Table, and variables.</li>\n</ul>\n<p>In order to use WebAssembly, you need a <code>.wasm</code> binary file and a set of APIs to communicate with WebAssembly. Node.js provides the necessary APIs via the global <code>WebAssembly</code> object.</p>\n<pre><code class=\"language-js\">console.log(WebAssembly);\n\n/*\n\nObject [WebAssembly] {\n\n  compile: [Function: compile],\n\n  validate: [Function: validate],\n\n  instantiate: [Function: instantiate]\n\n}\n\n*/\n</code></pre>\n<h2>Generating WebAssembly Modules</h2>\n<p>There are multiple methods available to generate WebAssembly binary files including:</p>\n<ul>\n<li>Writing WebAssembly (<code>.wat</code>) by hand and converting to binary format using tools such as <a href=\"images/https://github.com/webassembly/wabt\">wabt</a></li>\n<li>Using <a href=\"images/https://emscripten.org/\">emscripten</a> with a C/C++ application</li>\n<li>Using <a href=\"images/https://rustwasm.github.io/wasm-pack/book/\">wasm-pack</a> with a Rust application</li>\n<li>Using <a href=\"images/https://www.assemblyscript.org/\">AssemblyScript</a> if you prefer a TypeScript-like experience</li>\n</ul>\n<blockquote>\n<p>Some of these tools generate not only the binary file, but the JavaScript \"glue\" code and corresponding HTML files to run in the browser.</p>\n</blockquote>\n<h2>How to use it</h2>\n<p>Once you have a WebAssembly module, you can use the Node.js <code>WebAssembly</code> object to instantiate it.</p>\n<pre><code class=\"language-js\">// Assume add.wasm file exists that contains a single function adding 2 provided arguments\n\nconst fs = require('fs');\n\nconst wasmBuffer = fs.readFileSync('/path/to/add.wasm');\n\nWebAssembly.instantiate(wasmBuffer).then((wasmModule) => {\n    // Exported function live under instance.exports\n\n    const add = wasmModule.instance.exports.add;\n\n    const sum = add(5, 6);\n\n    console.log(sum); // Outputs: 11\n});\n</code></pre>\n<h2>Interacting with the OS</h2>\n<p>WebAssembly modules cannot directly access OS functionality on its own. A third-party tool <a href=\"images/https://docs.wasmtime.dev/\">Wasmtime</a> can be used to access this functionality. <code>Wasmtime</code> utilizes the <a href=\"images/https://wasi.dev/\">WASI</a> API to access the OS functionality.</p>\n<h2>Resources</h2>\n<ul>\n<li><a href=\"images/https://webassembly.org/\">General WebAssembly Information</a></li>\n<li><a href=\"images/https://developer.mozilla.org/en-US/docs/WebAssembly\">MDN Docs</a></li>\n<li><a href=\"images/https://webassembly.github.io/spec/core/text/index.html\">Write WebAssembly by hand</a></li>\n</ul>"},{"url":"/docs/react/react2/","relativePath":"docs/react/react2.md","relativeDir":"docs/react","base":"react2.md","name":"react2","frontmatter":{"title":"Intro To React","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Introduction to React for Complete Beginners</h1>\n<p>All of the code examples below will be included a second time at the bottom of this article as an embedded gist.</p>\n<hr>\n<h3>Introduction to React for Complete Beginners</h3>\n<p>All of the code examples below will be included a second time at the bottom of this article as an embedded gist, so that it is properly syntax highlighted.</p>\n<p>React uses a syntax extension of JavaScript called JSX that allows you to write HTML directly within JavaScript.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/1200/0*Olfj44MF6WSzvlSM.png\" class=\"graf-image\" /></figure>\n<h3>React</h3>\n<blockquote>\n<p><em>React uses a syntax extension of JavaScript called JSX that allows you to write HTML directly within JavaScript</em></p>\n</blockquote>\n<blockquote>\n<p><em>because JSX is a syntactic extension of JavaScript, you can actually write JavaScript directly within JSX</em></p>\n</blockquote>\n<blockquote>\n<p><em>include the code you want to be treated as JavaScript within curly braces: { 'this is treated as JavaScript code' }</em></p>\n</blockquote>\n<blockquote>\n<p><em>JSX code must be compiled into JavaScript</em></p>\n</blockquote>\n<blockquote>\n<p><em>under the hood the challenges are calling ReactDOM.render (JSX, document.getElementById('root'))</em></p>\n</blockquote>\n<blockquote>\n<p><em>One important thing to know about nested JSX is that it must return a single element.</em></p>\n</blockquote>\n<blockquote>\n<p><em>For instance, several JSX elements written as siblings with no parent wrapper element will not transpile.</em></p>\n</blockquote>\n<hr>\n<h3>From the React Docs:</h3>\n<h3>What is React?</h3>\n<p>React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It lets you compose complex UIs from small and isolated pieces of code called “components”.</p>\n<p>React has a few different kinds of components, but we'll start with <code>React.Component</code> subclasses:</p>\n<pre><code>class ShoppingList extends React.Component {\n  render() {\n    return (\n      &#x3C;div className=\"shopping-list\">\n        &#x3C;h1>Shopping List for {this.props.name}&#x3C;/h1>\n        &#x3C;ul>\n          &#x3C;li>Instagram&#x3C;/li>\n          &#x3C;li>WhatsApp&#x3C;/li>\n          &#x3C;li>Oculus&#x3C;/li>\n        &#x3C;/ul>\n      &#x3C;/div>\n    );\n  }\n}\n\n// Example usage: &#x3C;ShoppingList name=\"Mark\" />\n</code></pre>\n<p>We'll get to the funny XML-like tags soon. We use components to tell React what we want to see on the screen. When our data changes, React will efficiently update and re-render our components.</p>\n<p>Here, ShoppingList is a <strong>React component class</strong>, or <strong>React component type</strong>. A component takes in parameters, called <code>props</code> (short for “properties”), and returns a hierarchy of views to display via the <code>render</code> method.</p>\n<p>The <code>render</code> method returns a <em>description</em> of what you want to see on the screen. React takes the description and displays the result. In particular, <code>render</code> returns a <strong>React element</strong>, which is a lightweight description of what to render. Most React developers use a special syntax called “JSX” which makes these structures easier to write. The <code>&#x3C;div /></code> syntax is transformed at build time to <code>React.createElement('div')</code>. The example above is equivalent to:</p>\n<pre><code>return React.createElement('div', {className: 'shopping-list'},\n  React.createElement('h1', /* ... h1 children ... */),\n  React.createElement('ul', /* ... ul children ... */)\n);\n</code></pre>\n<hr>\n<h3>Valid JSX:</h3>\n<pre><code>&#x3C;div>\n  &#x3C;p>Paragraph One&#x3C;/p>\n  &#x3C;p>Paragraph Two&#x3C;/p>\n  &#x3C;p>Paragraph Three&#x3C;/p>\n&#x3C;/div>\n</code></pre>\n<hr>\n<h3>Invalid JSX:</h3>\n<pre><code>&#x3C;p>Paragraph One&#x3C;/p>\n&#x3C;p>Paragraph Two&#x3C;/p>\n&#x3C;p>Paragraph Three&#x3C;/p>\n</code></pre>\n<h4>To put comments inside JSX, you use the syntax {/* */} to wrap around the comment text.</h4>\n<p>To put comments inside JSX, you use the syntax {/* */} to wrap around the comment text.</p>\n<p>The code editor has a JSX element similar to what you created in the last challenge. Add a comment somewhere within the provided div element, without modifying the existing h1 or p elements.</p>\n<pre><code>const JSX = (\n  &#x3C;div>\n  {/* This is a comment */}\n    &#x3C;h1>This is a block of JSX&#x3C;/h1>\n    &#x3C;p>Here's a subtitle&#x3C;/p>\n  &#x3C;/div>\n);\n</code></pre>\n<hr>\n<blockquote>\n<p><em>With React, we can render this JSX directly to the HTML DOM using React's rendering API known as ReactDOM.</em></p>\n</blockquote>\n<blockquote>\n<p><em>ReactDOM offers a simple method to render React elements to the DOM which looks like this:</em></p>\n</blockquote>\n<p><code>ReactDOM.render(componentToRender, targetNode)</code></p>\n<ul>\n<li><span id=\"f724\">the first argument is the React element or component that you want to render,</span></li>\n<li><span id=\"7093\">and the second argument is the DOM node that you want to render the component to.</span></li>\n</ul>\n<blockquote>\n<p><em>ReactDOM.render() must be called after the JSX element declarations, just like how you must declare variables before using them.</em></p>\n</blockquote>\n<blockquote>\n<p><em>key difference in JSX is that you can no longer use the word class to define HTML classes.</em></p>\n</blockquote>\n<ul>\n<li><span id=\"aafc\">— -> This is because class is a reserved word in JavaScript. Instead, JSX uses className</span></li>\n</ul>\n<blockquote>\n<p><em>the naming convention for all HTML attributes and event references in JSX become camelCase</em></p>\n</blockquote>\n<blockquote>\n<p><em>a click event in JSX is onClick, instead of onclick. Likewise, onchange becomes onChange. While this is a subtle difference, it is an important one to keep in mind moving forward.</em></p>\n</blockquote>\n<h3>Apply a class of myDiv to the div provided in the JSX code.</h3>\n<ul>\n<li><span id=\"9500\">The constant JSX should return a div element.</span></li>\n<li><span id=\"8d42\">The div should have a class of myDiv.</span></li>\n</ul>\n<!-- -->\n<pre><code>const JSX = (\n  &#x3C;div>\n    &#x3C;h1>Add a class to this div&#x3C;/h1>\n  &#x3C;/div>\n);\n</code></pre>\n<h3>Ans:</h3>\n<pre><code>const JSX = (\n  &#x3C;div className=\"myDiv\">\n    &#x3C;h1>Add a class to this div&#x3C;/h1>\n  &#x3C;/div>\n);\n</code></pre>\n<h3>React: Learn About Self-Closing JSX Tags</h3>\n<p>-Another important way in which JSX differs from HTML is in the idea of the self-closing tag.</p>\n<blockquote>\n<p><em>In HTML, almost all tags have both an opening and closing tag:</em> <code>&#x3C;div>&#x3C;/div>;</code> <em>the closing tag always has a forward slash before the tag name that you are closing.</em></p>\n</blockquote>\n<blockquote>\n<p><em>there are special instances in HTML called “self-closing tags”, or tags that don't require both an opening and closing tag before another tag can start.</em></p>\n</blockquote>\n<blockquote>\n<p><em>For example the line-break tag can be written as</em> <code>&#x3C;br></code> <em>or as</em> <code>&#x3C;br />,</code> <em>but should never be written as</em> <code>&#x3C;br>&#x3C;/br></code><em>, since it doesn't contain any content.</em></p>\n</blockquote>\n<blockquote>\n<p><em>In JSX, the rules are a little different. Any JSX element can be written with a self-closing tag, and every element must be closed.<br>\nThe line-break tag, for example, must always be written as</em> <code>&#x3C;br /></code> <em>in order to be valid JSX that can be transpiled.<br>\nA</em> <code>&#x3C;div></code><em>, on the other hand, can be written as</em> <code>&#x3C;div /></code><em>or</em><code>&#x3C;div>&#x3C;/div></code><em>.<br>\nThe difference is that in the first syntax version there is no way to include anything in the</em> <code>&#x3C;div /></code><em>.</em></p>\n</blockquote>\n<h3>Fix the errors in the code editor so that it is valid JSX and successfully transpiles. Make sure you don't change any of the content — you only need to close tags where they are needed.</h3>\n<pre><code>const JSX = (\n  &#x3C;div>\n    &#x3C;h2>Welcome to React!&#x3C;/h2> &#x3C;br >\n    &#x3C;p>Be sure to close all tags!&#x3C;/p>\n    &#x3C;hr >\n  &#x3C;/div>\n);\n</code></pre>\n<h3>Ans:</h3>\n<pre><code>const JSX = (\n  &#x3C;div>\n    &#x3C;h2>Welcome to React!&#x3C;/h2> &#x3C;br />\n    &#x3C;p>Be sure to close all tags!&#x3C;/p>\n    &#x3C;hr />\n  &#x3C;/div>\n);\n</code></pre>\n<hr>\n<h3>React: Create a Stateless Functional Component</h3>\n<blockquote>\n<p><em>There are two ways to create a React component. The first way is to use a JavaScript function.</em></p>\n</blockquote>\n<blockquote>\n<p><em>Defining a component in this way creates a stateless functional component.</em></p>\n</blockquote>\n<blockquote>\n<p><em>think of a stateless component as one that can receive data and render it, but does not manage or track changes to that data.</em></p>\n</blockquote>\n<h4>To create a component with a function, you simply write a JavaScript function that returns either JSX or null</h4>\n<ul>\n<li><span id=\"b514\">React requires your function name to begin with a capital letter.</span></li>\n</ul>\n<blockquote>\n<p><em>Here's an example of a stateless functional component that assigns an HTML class in JSX:</em></p>\n</blockquote>\n<pre><code>// After being transpiled, the &#x3C;div> will have a CSS class of 'customClass'\nconst DemoComponent = function() {\n  return (\n    &#x3C;div className='customClass' />\n  );\n};\n</code></pre>\n<blockquote>\n<p><em>Because a JSX component represents HTML, you could put several components together to create a more complex HTML page.</em></p>\n</blockquote>\n<h3>The code editor has a function called MyComponent. Complete this function so it returns a single div element which contains some string of text.</h3>\n<p>Note: The text is considered a child of the div element, so you will not be able to use a self-closing tag.</p>\n<pre><code>const MyComponent = function() {\n  // Change code below this line\n\n  // Change code above this line\n}\n</code></pre>\n<h3>ANS:</h3>\n<pre><code>const MyComponent = function() {\n  // Change code below this line\n\nreturn (\n   &#x3C;div> Some Text &#x3C;/div >\n  );\n\n  // Change code above this line\n};\n</code></pre>\n<hr>\n<h3>React: Create a React Component</h3>\n<blockquote>\n<p><em>The other way to define a React component is with the ES6 class syntax. In the following example, Kitten extends React.Component:</em></p>\n</blockquote>\n<pre><code>class Kitten extends React.Component {\n  constructor(props) {\n    super(props);\n  }\n\n  render() {\n    return (\n      &#x3C;h1>Hi&#x3C;/h1>\n    );\n  }\n}\n</code></pre>\n<blockquote>\n<p><em>This creates an ES6 class Kitten which extends the React.Component class.</em></p>\n</blockquote>\n<blockquote>\n<p><em>So the Kitten class now has access to many useful React features, such as local state and lifecycle hooks.</em></p>\n</blockquote>\n<blockquote>\n<p><em>Also notice the Kitten class has a constructor defined within it that calls super()</em></p>\n</blockquote>\n<blockquote>\n<p><em>It uses super() to call the constructor of the parent class, in this case React.Component</em></p>\n</blockquote>\n<blockquote>\n<p><em>The constructor is a special method used during the initialization of objects that are created with the class keyword. It is best practice to call a component's constructor with super, and pass props to both.</em></p>\n</blockquote>\n<blockquote>\n<p><em>This makes sure the component is initialized properly. For now, know that it is standard for this code to be included.</em></p>\n</blockquote>\n<h3>MyComponent is defined in the code editor using class syntax. Finish writing the render method so it returns a div element that contains an h1 with the text Hello React!.</h3>\n<pre><code>class MyComponent extends React.Component {\n  constructor(props) {\n    super(props);\n  }\n  render() {\n    // Change code below this line\n\n    // Change code above this line\n  }\n};\n</code></pre>\n<h3>ANS:</h3>\n<pre><code>class MyComponent extends React.Component {\n  constructor(props) {\n    super(props);\n  }\n  render() {\n    // Change code below this line\n return (\n   &#x3C;div>\n      &#x3C;h1>Hello React!&#x3C;/h1>\n      &#x3C;/div>\n    );\n\n    // Change code above this line\n  }\n};\n</code></pre>\n<hr>\n<h3>React: Create a Component with Composition</h3>\n<blockquote>\n<p><em>Imagine you are building an App and have created three components, a Navbar, Dashboard, and Footer.</em></p>\n</blockquote>\n<blockquote>\n<p><em>To compose these components together, you could create an App parent component which renders each of these three components as children. To render a component as a child in a React component, you include the component name written as a custom HTML tag in the JSX.</em></p>\n</blockquote>\n<ul>\n<li><span id=\"000b\">For example, in the render method you could write:</span></li>\n</ul>\n<!-- -->\n<pre><code>return (\n &#x3C;App>\n  &#x3C;Navbar />\n  &#x3C;Dashboard />\n  &#x3C;Footer />\n &#x3C;/App>\n)\n</code></pre>\n<blockquote>\n<p><em>When React encounters a custom HTML tag that references another component (a component name wrapped in &#x3C; /> like in this example), it renders the markup for that component in the location of the tag. This should illustrate the parent/child relationship between the App component and the Navbar, Dashboard, and Footer.</em></p>\n</blockquote>\n<h3>Challenge:</h3>\n<blockquote>\n<p><em>In the code editor, there is a simple functional component called ChildComponent and a class component called ParentComponent. Compose the two together by rendering the ChildComponent within the ParentComponent. Make sure to close the ChildComponent tag with a forward slash.</em></p>\n</blockquote>\n<ul>\n<li><span id=\"2ed5\">Note:<strong>ChildComponent is defined with an ES6 arrow function because this is a very common practice when using React</strong>.</span></li>\n<li><span id=\"fddd\">However, know that this is just a function.</span></li>\n</ul>\n<!-- -->\n<pre><code>const ChildComponent = () => {\n  return (\n    &#x3C;div>\n      &#x3C;p>I am the child&#x3C;/p>\n    &#x3C;/div>\n  );\n};\n\nclass ParentComponent extends React.Component {\n  constructor(props) {\n    super(props);\n  }\n  render() {\n    return (\n      &#x3C;div>\n        &#x3C;h1>I am the parent&#x3C;/h1>\n        { /* Change code below this line */ }\n\n        { /* Change code above this line */ }\n      &#x3C;/div>\n    );\n  }\n};\n</code></pre>\n<p>⌛The React component should return a single div element.<br>\n⌛The component should return two nested elements.<br>\n⌛The component should return the ChildComponent as its second child.</p>\n<h3>Ans:</h3>\n<pre><code>const ChildComponent = () => {\n  return (\n    &#x3C;div>\n      &#x3C;p>I am the child&#x3C;/p>\n    &#x3C;/div>\n  );\n};\n\nclass ParentComponent extends React.Component {\n  constructor(props) {\n    super(props);\n  }\n  render() {\n    return (\n      &#x3C;div>\n        &#x3C;h1>I am the parent&#x3C;/h1>\n        { /* Change code below this line */ }\n\n        { /* Change code above this line */ }\n      &#x3C;/div>\n    );\n  }\n};\n</code></pre>\n<h3>More Examples:</h3>\n<p>For more content follow me on GitHub:</p>\n<p><a href=\"https://github.com/bgoonz\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://github.com/bgoonz\"><strong>bgoonz - Overview</strong><br />\n<em>Web Developer, Electrical Engineer https://bryanguner.medium.com/ https://portfolio42.netlify.app/…</em>github.com</a><a href=\"https://github.com/bgoonz\" class=\"js-mixtapeImage mixtapeImage u-ignoreBlock\"></a></p>\n<p><em>More content at</em> <a href=\"http://plainenglish.io/\" class=\"markup--anchor markup--p-anchor\"><em>plainenglish.io</em></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/8021738aa1ad\">May 19, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/introduction-to-react-for-complete-beginners-8021738aa1ad\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on May 23, 2021.</p>\n<h1>Snippets:</h1>\n<p>Renders an accordion menu with multiple collapsible content elements.</p>\n<ul>\n<li>Define an <code>AccordionItem</code> component, that renders a <code>&lt;button&gt;</code> which is used to update the component and notify its parent via the <code>handleClick</code> callback.</li>\n<li>Use the <code>isCollapsed</code> prop in <code>AccordionItem</code> to determine its appearance and set an appropriate <code>className</code>.</li>\n<li>Define an <code>Accordion</code> component that uses the <code>useState()</code> hook to initialize the value of the <code>bindIndex</code> state variable to <code>defaultIndex</code>.</li>\n<li>Filter <code>children</code> to remove unnecessary nodes except for <code>AccordionItem</code> by identifying the function's name.</li>\n<li>Use <code>Array.prototype.map()</code> on the collected nodes to render the individual collapsible elements.</li>\n<li>Define <code>changeItem</code>, which will be executed when clicking an <code>AccordionItem</code>'s <code>&lt;button&gt;</code>.</li>\n<li><code>changeItem</code> executes the passed callback, <code>onItemClick</code>, and updates <code>bindIndex</code> based on the clicked element.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb1\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb1-1\" title=\"1\"><span class=\"fu\">.accordion-item.collapsed</span> {</a>\n<a class=\"sourceLine\" id=\"cb1-2\" title=\"2\">  <span class=\"kw\">display</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb1-3\" title=\"3\">}</a>\n<a class=\"sourceLine\" id=\"cb1-4\" title=\"4\"></a>\n<a class=\"sourceLine\" id=\"cb1-5\" title=\"5\"><span class=\"fu\">.accordion-item.expanded</span> {</a>\n<a class=\"sourceLine\" id=\"cb1-6\" title=\"6\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb1-7\" title=\"7\">}</a>\n<a class=\"sourceLine\" id=\"cb1-8\" title=\"8\"></a>\n<a class=\"sourceLine\" id=\"cb1-9\" title=\"9\"><span class=\"fu\">.accordion-button</span> {</a>\n<a class=\"sourceLine\" id=\"cb1-10\" title=\"10\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb1-11\" title=\"11\">  <span class=\"kw\">width</span>: <span class=\"dv\">100</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb1-12\" title=\"12\">}</a>\n</div>\n<pre><code class=\"language-js\">const AccordionItem = ({ label, isCollapsed, handleClick, children }) =&#x26;gt; {\n  return (\n    &#x26;lt;&#x26;gt;\n      &#x26;lt;button className=&#x26;quot;accordion-button&#x26;quot; onClick={handleClick}&#x26;gt;\n        {label}\n      &#x26;lt;/button&#x26;gt;\n      &#x26;lt;div\n        className={`accordion-item ${isCollapsed ? &#x26;quot;collapsed&#x26;quot; : &#x26;quot;expanded&#x26;quot;}`}\n        aria-expanded={isCollapsed}\n      &#x26;gt;\n        {children}\n      &#x26;lt;/div&#x26;gt;\n    &#x26;lt;/&#x26;gt;\n  );\n};\n\nconst Accordion = ({ defaultIndex, onItemClick, children }) =&#x26;gt; {\nconst [bindIndex, setBindIndex] = React.useState(defaultIndex);\n\nconst changeItem = (itemIndex) =&#x26;gt; {\nif (typeof onItemClick === &#x26;quot;function&#x26;quot;) onItemClick(itemIndex);\nif (itemIndex !== bindIndex) setBindIndex(itemIndex);\n};\nconst items = children.filter((item) =&#x26;gt; item.type.name === &#x26;quot;AccordionItem&#x26;quot;);\n\nreturn (\n&#x26;lt;&#x26;gt;\n{items.map(({ props }) =&#x26;gt; (\n&#x26;lt;AccordionItem\nisCollapsed={bindIndex !== props.index}\nlabel={props.label}\nhandleClick={() =&#x26;gt; changeItem(props.index)}\nchildren={props.children}\n/&#x26;gt;\n))}\n&#x26;lt;/&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;Accordion defaultIndex=&#x26;quot;1&#x26;quot; onItemClick={console.log}&#x26;gt;\n    &#x26;lt;AccordionItem label=&#x26;quot;A&#x26;quot; index=&#x26;quot;1&#x26;quot;&#x26;gt;\n      Lorem ipsum\n    &#x26;lt;/AccordionItem&#x26;gt;\n    &#x26;lt;AccordionItem label=&#x26;quot;B&#x26;quot; index=&#x26;quot;2&#x26;quot;&#x26;gt;\n      Dolor sit amet\n    &#x26;lt;/AccordionItem&#x26;gt;\n  &#x26;lt;/Accordion&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders an alert component with <code>type</code> prop.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>isShown</code> and <code>isLeaving</code> state variables and set both to <code>false</code> initially.</li>\n<li>Define <code>timeoutId</code> to keep the timer instance for clearing on component unmount.</li>\n<li>Use the <code>useEffect()</code> hook to update the value of <code>isShown</code> to <code>true</code> and clear the interval by using <code>timeoutId</code> when the component is unmounted.</li>\n<li>Define a <code>closeAlert</code> function to set the component as removed from the DOM by displaying a fading out animation and set <code>isShown</code> to <code>false</code> via <code>setTimeout()</code>.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb4\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb4-1\" title=\"1\"><span class=\"im\">@keyframes</span> leave {</a>\n<a class=\"sourceLine\" id=\"cb4-2\" title=\"2\">  <span class=\"dv\">0%</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-3\" title=\"3\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">1</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-4\" title=\"4\">  }</a>\n<a class=\"sourceLine\" id=\"cb4-5\" title=\"5\">  <span class=\"dv\">100%</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-6\" title=\"6\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-7\" title=\"7\">  }</a>\n<a class=\"sourceLine\" id=\"cb4-8\" title=\"8\">}</a>\n<a class=\"sourceLine\" id=\"cb4-9\" title=\"9\"></a>\n<a class=\"sourceLine\" id=\"cb4-10\" title=\"10\"><span class=\"fu\">.alert</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-11\" title=\"11\">  <span class=\"kw\">padding</span>: <span class=\"dv\">0.75</span><span class=\"dt\">rem</span> <span class=\"dv\">0.5</span><span class=\"dt\">rem</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-12\" title=\"12\">  <span class=\"kw\">margin-bottom</span>: <span class=\"dv\">0.5</span><span class=\"dt\">rem</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-13\" title=\"13\">  <span class=\"kw\">text-align</span>: <span class=\"dv\">left</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-14\" title=\"14\">  <span class=\"kw\">padding-right</span>: <span class=\"dv\">40</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-15\" title=\"15\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">4</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-16\" title=\"16\">  <span class=\"kw\">font-size</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-17\" title=\"17\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-18\" title=\"18\">}</a>\n<a class=\"sourceLine\" id=\"cb4-19\" title=\"19\"></a>\n<a class=\"sourceLine\" id=\"cb4-20\" title=\"20\"><span class=\"fu\">.alert.warning</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-21\" title=\"21\">  <span class=\"kw\">color</span>: <span class=\"cn\">#856404</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-22\" title=\"22\">  <span class=\"kw\">background-color</span>: <span class=\"cn\">#fff3cd</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-23\" title=\"23\">  <span class=\"kw\">border-color</span>: <span class=\"cn\">#ffeeba</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-24\" title=\"24\">}</a>\n<a class=\"sourceLine\" id=\"cb4-25\" title=\"25\"></a>\n<a class=\"sourceLine\" id=\"cb4-26\" title=\"26\"><span class=\"fu\">.alert.error</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-27\" title=\"27\">  <span class=\"kw\">color</span>: <span class=\"cn\">#721c24</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-28\" title=\"28\">  <span class=\"kw\">background-color</span>: <span class=\"cn\">#f8d7da</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-29\" title=\"29\">  <span class=\"kw\">border-color</span>: <span class=\"cn\">#f5c6cb</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-30\" title=\"30\">}</a>\n<a class=\"sourceLine\" id=\"cb4-31\" title=\"31\"></a>\n<a class=\"sourceLine\" id=\"cb4-32\" title=\"32\"><span class=\"fu\">.alert.leaving</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-33\" title=\"33\">  <span class=\"kw\">animation</span>: leave <span class=\"dv\">0.5</span><span class=\"dt\">s</span> <span class=\"dv\">forwards</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-34\" title=\"34\">}</a>\n<a class=\"sourceLine\" id=\"cb4-35\" title=\"35\"></a>\n<a class=\"sourceLine\" id=\"cb4-36\" title=\"36\"><span class=\"fu\">.alert</span> <span class=\"fu\">.close</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-37\" title=\"37\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-38\" title=\"38\">  <span class=\"kw\">top</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-39\" title=\"39\">  <span class=\"kw\">right</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-40\" title=\"40\">  <span class=\"kw\">padding</span>: <span class=\"dv\">0</span> <span class=\"dv\">0.75</span><span class=\"dt\">rem</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-41\" title=\"41\">  <span class=\"kw\">color</span>: <span class=\"cn\">#333</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-42\" title=\"42\">  <span class=\"kw\">border</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-43\" title=\"43\">  <span class=\"kw\">height</span>: <span class=\"dv\">100</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-44\" title=\"44\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-45\" title=\"45\">  <span class=\"kw\">background</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-46\" title=\"46\">  <span class=\"kw\">font-weight</span>: <span class=\"dv\">600</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-47\" title=\"47\">  <span class=\"kw\">font-size</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-48\" title=\"48\">}</a>\n<a class=\"sourceLine\" id=\"cb4-49\" title=\"49\"></a>\n<a class=\"sourceLine\" id=\"cb4-50\" title=\"50\"><span class=\"fu\">.alert</span> <span class=\"fu\">.close</span><span class=\"in\">:after</span> {</a>\n<a class=\"sourceLine\" id=\"cb4-51\" title=\"51\">  <span class=\"kw\">content</span>: <span class=\"st\">&quot;x&quot;</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb4-52\" title=\"52\">}</a>\n</div>\n<pre><code class=\"language-js\">const Alert = ({ isDefaultShown = false, timeout = 250, type, message }) =&#x26;gt; {\n  const [isShown, setIsShown] = React.useState(isDefaultShown);\n  const [isLeaving, setIsLeaving] = React.useState(false);\n\nlet timeoutId = null;\n\nReact.useEffect(() =&#x26;gt; {\nsetIsShown(true);\nreturn () =&#x26;gt; {\nclearTimeout(timeoutId);\n};\n}, [isDefaultShown, timeout, timeoutId]);\n\nconst closeAlert = () =&#x26;gt; {\nsetIsLeaving(true);\ntimeoutId = setTimeout(() =&#x26;gt; {\nsetIsLeaving(false);\nsetIsShown(false);\n}, timeout);\n};\n\nreturn (\nisShown &#x26;amp;&#x26;amp; (\n&#x26;lt;div\nclassName={`alert ${type} ${isLeaving ? &#x26;quot;leaving&#x26;quot; : &#x26;quot;&#x26;quot;}`}\nrole=&#x26;quot;alert&#x26;quot;\n&#x26;gt;\n&#x26;lt;button className=&#x26;quot;close&#x26;quot; onClick={closeAlert} /&#x26;gt;\n{message}\n&#x26;lt;/div&#x26;gt;\n)\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;Alert type=&#x26;quot;info&#x26;quot; message=&#x26;quot;This is info&#x26;quot; /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a string as plaintext, with URLs converted to appropriate link elements.</p>\n<ul>\n<li>Use <code>String.prototype.split()</code> and <code>String.prototype.match()</code> with a regular expression to find URLs in a string.</li>\n<li>Return matched URLs rendered as <code>&lt;a&gt;</code> elements, dealing with missing protocol prefixes if necessary.</li>\n<li>Render the rest of the string as plaintext.</li>\n</ul>\n<pre><code class=\"language-js\">const AutoLink = ({ text }) =&#x26;gt; {\n  const delimiter =\n    /((?:https?:\\/\\/)?(?:(?:[a-z0-9]?(?:[a-z0-9\\-]{1,61}[a-z0-9])?\\.[^\\.|\\s])+[a-z\\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\\d{1,5})*[a-z0-9.,_\\/~#&#x26;amp;=;%+?\\-\\\\(\\\\)]*)/gi;\n\nreturn (\n&#x26;lt;&#x26;gt;\n{text.split(delimiter).map((word) =&#x26;gt; {\nconst match = word.match(delimiter);\nif (match) {\nconst url = match[0];\nreturn (\n&#x26;lt;a href={url.startsWith(&#x26;quot;http&#x26;quot;) ? url : `http://${url}`}&#x26;gt;{url}&#x26;lt;/a&#x26;gt;\n);\n}\nreturn word;\n})}\n&#x26;lt;/&#x26;gt;\n);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;AutoLink text=&#x26;quot;foo bar baz http://example.org bar&#x26;quot; /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a link formatted to call a phone number (<code>tel:</code> link).</p>\n<ul>\n<li>Use <code>phone</code> to create a <code>&lt;a&gt;</code> element with an appropriate <code>href</code> attribute.</li>\n<li>Render the link with <code>children</code> as its content.</li>\n</ul>\n<pre><code class=\"language-js\">const Callto = ({ phone, children }) =&#x26;gt; {\n  return &#x26;lt;a href={`tel:${phone}`}&#x26;gt;{children}&#x26;lt;/a&#x26;gt;;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;Callto phone=&#x26;quot;+302101234567&#x26;quot;&#x26;gt;Call me!&#x26;lt;/Callto&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a carousel component.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>active</code> state variable and give it a value of <code>0</code> (index of the first item).</li>\n<li>Use the <code>useEffect()</code> hook to update the value of <code>active</code> to the index of the next item, using <code>setTimeout</code>.</li>\n<li>Compute the <code>className</code> for each carousel item while mapping over them and applying it accordingly.</li>\n<li>Render the carousel items using <code>React.cloneElement()</code> and pass down <code>...rest</code> along with the computed <code>className</code>.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb11\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb11-1\" title=\"1\"><span class=\"fu\">.carousel</span> {</a>\n<a class=\"sourceLine\" id=\"cb11-2\" title=\"2\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb11-3\" title=\"3\">}</a>\n<a class=\"sourceLine\" id=\"cb11-4\" title=\"4\"></a>\n<a class=\"sourceLine\" id=\"cb11-5\" title=\"5\"><span class=\"fu\">.carousel-item</span> {</a>\n<a class=\"sourceLine\" id=\"cb11-6\" title=\"6\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb11-7\" title=\"7\">  <span class=\"kw\">visibility</span>: <span class=\"dv\">hidden</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb11-8\" title=\"8\">}</a>\n<a class=\"sourceLine\" id=\"cb11-9\" title=\"9\"></a>\n<a class=\"sourceLine\" id=\"cb11-10\" title=\"10\"><span class=\"fu\">.carousel-item.visible</span> {</a>\n<a class=\"sourceLine\" id=\"cb11-11\" title=\"11\">  <span class=\"kw\">visibility</span>: <span class=\"dv\">visible</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb11-12\" title=\"12\">}</a>\n</div>\n<pre><code class=\"language-js\">const Carousel = ({ carouselItems, ...rest }) =&#x26;gt; {\n  const [active, setActive] = React.useState(0);\n  let scrollInterval = null;\n\nReact.useEffect(() =&#x26;gt; {\nscrollInterval = setTimeout(() =&#x26;gt; {\nsetActive((active + 1) % carouselItems.length);\n}, 2000);\nreturn () =&#x26;gt; clearTimeout(scrollInterval);\n});\n\nreturn (\n&#x26;lt;div className=&#x26;quot;carousel&#x26;quot;&#x26;gt;\n{carouselItems.map((item, index) =&#x26;gt; {\nconst activeClass = active === index ? &#x26;quot; visible&#x26;quot; : &#x26;quot;&#x26;quot;;\nreturn React.cloneElement(item, {\n...rest,\nclassName: `carousel-item${activeClass}`,\n});\n})}\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;Carousel\n    carouselItems={[\n      &#x26;lt;div&#x26;gt;carousel item 1&#x26;lt;/div&#x26;gt;,\n      &#x26;lt;div&#x26;gt;carousel item 2&#x26;lt;/div&#x26;gt;,\n      &#x26;lt;div&#x26;gt;carousel item 3&#x26;lt;/div&#x26;gt;,\n    ]}\n  /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a component with collapsible content.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>isCollapsed</code> state variable with an initial value of <code>collapsed</code>.</li>\n<li>Use the <code>&lt;button&gt;</code> to change the component's <code>isCollapsed</code> state and the content of the component, passed down via <code>children</code>.</li>\n<li>Determine the appearance of the content, based on <code>isCollapsed</code> and apply the appropriate <code>className</code>.</li>\n<li>Update the value of the <code>aria-expanded</code> attribute based on <code>isCollapsed</code> to make the component accessible.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb14\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb14-1\" title=\"1\"><span class=\"fu\">.collapse-button</span> {</a>\n<a class=\"sourceLine\" id=\"cb14-2\" title=\"2\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb14-3\" title=\"3\">  <span class=\"kw\">width</span>: <span class=\"dv\">100</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb14-4\" title=\"4\">}</a>\n<a class=\"sourceLine\" id=\"cb14-5\" title=\"5\"></a>\n<a class=\"sourceLine\" id=\"cb14-6\" title=\"6\"><span class=\"fu\">.collapse-content.collapsed</span> {</a>\n<a class=\"sourceLine\" id=\"cb14-7\" title=\"7\">  <span class=\"kw\">display</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb14-8\" title=\"8\">}</a>\n<a class=\"sourceLine\" id=\"cb14-9\" title=\"9\"></a>\n<a class=\"sourceLine\" id=\"cb14-10\" title=\"10\"><span class=\"fu\">.collapsed-content.expanded</span> {</a>\n<a class=\"sourceLine\" id=\"cb14-11\" title=\"11\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb14-12\" title=\"12\">}</a>\n</div>\n<pre><code class=\"language-js\">const Collapse = ({ collapsed, children }) =&#x26;gt; {\n  const [isCollapsed, setIsCollapsed] = React.useState(collapsed);\n\nreturn (\n&#x26;lt;&#x26;gt;\n&#x26;lt;button\nclassName=&#x26;quot;collapse-button&#x26;quot;\nonClick={() =&#x26;gt; setIsCollapsed(!isCollapsed)}\n&#x26;gt;\n{isCollapsed ? &#x26;quot;Show&#x26;quot; : &#x26;quot;Hide&#x26;quot;} content\n&#x26;lt;/button&#x26;gt;\n&#x26;lt;div\nclassName={`collapse-content ${isCollapsed ? &#x26;quot;collapsed&#x26;quot; : &#x26;quot;expanded&#x26;quot;}`}\naria-expanded={isCollapsed}\n&#x26;gt;\n{children}\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;/&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;Collapse&#x26;gt;\n    &#x26;lt;h1&#x26;gt;This is a collapse&#x26;lt;/h1&#x26;gt;\n    &#x26;lt;p&#x26;gt;Hello world!&#x26;lt;/p&#x26;gt;\n  &#x26;lt;/Collapse&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a controlled <code>&lt;input&gt;</code> element that uses a callback function to inform its parent about value updates.</p>\n<ul>\n<li>Use the <code>value</code> passed down from the parent as the controlled input field's value.</li>\n<li>Use the <code>onChange</code> event to fire the <code>onValueChange</code> callback and send the new value to the parent.</li>\n<li>The parent must update the input field's <code>value</code> prop in order for its value to change on user input.</li>\n</ul>\n<pre><code class=\"language-js\">const ControlledInput = ({ value, onValueChange, ...rest }) =&#x26;gt; {\n  return (\n    &#x26;lt;input\n      value={value}\n      onChange={({ target: { value } }) =&#x26;gt; onValueChange(value)}\n      {...rest}\n    /&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Form = () =&#x26;gt; {\n  const [value, setValue] = React.useState(&#x26;quot;&#x26;quot;);\n\nreturn (\n&#x26;lt;ControlledInput\ntype=&#x26;quot;text&#x26;quot;\nplaceholder=&#x26;quot;Insert some text here...&#x26;quot;\nvalue={value}\nonValueChange={setValue}\n/&#x26;gt;\n);\n};\n\nReactDOM.render(&#x26;lt;Form /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a countdown timer that prints a message when it reaches zero.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create a state variable to hold the time value, initialize it from the props and destructure it into its components.</li>\n<li>Use the <code>useState()</code> hook to create the <code>paused</code> and <code>over</code> state variables, used to prevent the timer from ticking if it's paused or the time has run out.</li>\n<li>Create a method <code>tick</code>, that updates the time values based on the current value (i.e. decreasing the time by one second).</li>\n<li>Create a method <code>reset</code>, that resets all state variables to their initial states.</li>\n<li>Use the the <code>useEffect()</code> hook to call the <code>tick</code> method every second via the use of <code>setInterval()</code> and use <code>clearInterval()</code> to clean up when the component is unmounted.</li>\n<li>Use <code>String.prototype.padStart()</code> to pad each part of the time array to two characters to create the visual representation of the timer.</li>\n</ul>\n<pre><code class=\"language-js\">const CountDown = ({ hours = 0, minutes = 0, seconds = 0 }) =&#x26;gt; {\n  const [paused, setPaused] = React.useState(false);\n  const [over, setOver] = React.useState(false);\n  const [[h, m, s], setTime] = React.useState([hours, minutes, seconds]);\n\nconst tick = () =&#x26;gt; {\nif (paused || over) return;\nif (h === 0 &#x26;amp;&#x26;amp; m === 0 &#x26;amp;&#x26;amp; s === 0) setOver(true);\nelse if (m === 0 &#x26;amp;&#x26;amp; s === 0) {\nsetTime([h - 1, 59, 59]);\n} else if (s == 0) {\nsetTime([h, m - 1, 59]);\n} else {\nsetTime([h, m, s - 1]);\n}\n};\n\nconst reset = () =&#x26;gt; {\nsetTime([parseInt(hours), parseInt(minutes), parseInt(seconds)]);\nsetPaused(false);\nsetOver(false);\n};\n\nReact.useEffect(() =&#x26;gt; {\nconst timerID = setInterval(() =&#x26;gt; tick(), 1000);\nreturn () =&#x26;gt; clearInterval(timerID);\n});\n\nreturn (\n&#x26;lt;div&#x26;gt;\n&#x26;lt;p&#x26;gt;{`${h.toString().padStart(2, &#x26;quot;0&#x26;quot;)}:${m.toString().padStart(2, &#x26;quot;0&#x26;quot;)}:${s .toString() .padStart(2, &#x26;quot;0&#x26;quot;)}`}&#x26;lt;/p&#x26;gt;\n&#x26;lt;div&#x26;gt;{over ? &#x26;quot;Time&#x26;#39;s up!&#x26;quot; : &#x26;quot;&#x26;quot;}&#x26;lt;/div&#x26;gt;\n&#x26;lt;button onClick={() =&#x26;gt; setPaused(!paused)}&#x26;gt;\n{paused ? &#x26;quot;Resume&#x26;quot; : &#x26;quot;Pause&#x26;quot;}\n&#x26;lt;/button&#x26;gt;\n&#x26;lt;button onClick={() =&#x26;gt; reset()}&#x26;gt;Restart&#x26;lt;/button&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;CountDown hours={1} minutes={45} /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a list of elements from an array of primitives.</p>\n<ul>\n<li>Use the value of the <code>isOrdered</code> prop to conditionally render an <code>&lt;ol&gt;</code> or a <code>&lt;ul&gt;</code> list.</li>\n<li>Use <code>Array.prototype.map()</code> to render every item in <code>data</code> as a <code>&lt;li&gt;</code> element with an appropriate <code>key</code>.</li>\n</ul>\n<pre><code class=\"language-js\">const DataList = ({ isOrdered = false, data }) =&#x26;gt; {\n  const list = data.map((val, i) =&#x26;gt; &#x26;lt;li key={`${i}_${val}`}&#x26;gt;{val}&#x26;lt;/li&#x26;gt;);\n  return isOrdered ? &#x26;lt;ol&#x26;gt;{list}&#x26;lt;/ol&#x26;gt; : &#x26;lt;ul&#x26;gt;{list}&#x26;lt;/ul&#x26;gt;;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const names = [&#x26;quot;John&#x26;quot;, &#x26;quot;Paul&#x26;quot;, &#x26;quot;Mary&#x26;quot;];\nReactDOM.render(&#x26;lt;DataList data={names} /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\nReactDOM.render(\n  &#x26;lt;DataList data={names} isOrdered /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a table with rows dynamically created from an array of primitives.</p>\n<ul>\n<li>Render a <code>&lt;table&gt;</code> element with two columns (<code>ID</code> and <code>Value</code>).</li>\n<li>Use <code>Array.prototype.map()</code> to render every item in <code>data</code> as a <code>&lt;tr&gt;</code> element with an appropriate <code>key</code>.</li>\n</ul>\n<pre><code class=\"language-js\">const DataTable = ({ data }) =&#x26;gt; {\n  return (\n    &#x26;lt;table&#x26;gt;\n      &#x26;lt;thead&#x26;gt;\n        &#x26;lt;tr&#x26;gt;\n          &#x26;lt;th&#x26;gt;ID&#x26;lt;/th&#x26;gt;\n          &#x26;lt;th&#x26;gt;Value&#x26;lt;/th&#x26;gt;\n        &#x26;lt;/tr&#x26;gt;\n      &#x26;lt;/thead&#x26;gt;\n      &#x26;lt;tbody&#x26;gt;\n        {data.map((val, i) =&#x26;gt; (\n          &#x26;lt;tr key={`${i}_${val}`}&#x26;gt;\n            &#x26;lt;td&#x26;gt;{i}&#x26;lt;/td&#x26;gt;\n            &#x26;lt;td&#x26;gt;{val}&#x26;lt;/td&#x26;gt;\n          &#x26;lt;/tr&#x26;gt;\n        ))}\n      &#x26;lt;/tbody&#x26;gt;\n    &#x26;lt;/table&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const people = [&#x26;quot;John&#x26;quot;, &#x26;quot;Jesse&#x26;quot;];\nReactDOM.render(&#x26;lt;DataTable data={people} /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a file drag and drop component for a single file.</p>\n<ul>\n<li>Create a ref, called <code>dropRef</code> and bind it to the component's wrapper.</li>\n<li>Use the <code>useState()</code> hook to create the <code>drag</code> and <code>filename</code> variables, initialized to <code>false</code> and <code>''</code> respectively.</li>\n<li>The variables <code>dragCounter</code> and <code>drag</code> are used to determine if a file is being dragged, while <code>filename</code> is used to store the dropped file's name.</li>\n<li>Create the <code>handleDrag</code>, <code>handleDragIn</code>, <code>handleDragOut</code> and <code>handleDrop</code> methods to handle drag and drop functionality.</li>\n<li><code>handleDrag</code> prevents the browser from opening the dragged file, <code>handleDragIn</code> and <code>handleDragOut</code> handle the dragged file entering and exiting the component, while <code>handleDrop</code> handles the file being dropped and passes it to <code>onDrop</code>.</li>\n<li>Use the <code>useEffect()</code> hook to handle each of the drag and drop events using the previously created methods.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb25\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb25-1\" title=\"1\"><span class=\"fu\">.filedrop</span> {</a>\n<a class=\"sourceLine\" id=\"cb25-2\" title=\"2\">  <span class=\"kw\">min-height</span>: <span class=\"dv\">120</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-3\" title=\"3\">  <span class=\"kw\">border</span>: <span class=\"dv\">3</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#d3d3d3</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-4\" title=\"4\">  <span class=\"kw\">text-align</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-5\" title=\"5\">  <span class=\"kw\">font-size</span>: <span class=\"dv\">24</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-6\" title=\"6\">  <span class=\"kw\">padding</span>: <span class=\"dv\">32</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-7\" title=\"7\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">4</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-8\" title=\"8\">}</a>\n<a class=\"sourceLine\" id=\"cb25-9\" title=\"9\"></a>\n<a class=\"sourceLine\" id=\"cb25-10\" title=\"10\"><span class=\"fu\">.filedrop.drag</span> {</a>\n<a class=\"sourceLine\" id=\"cb25-11\" title=\"11\">  <span class=\"kw\">border</span>: <span class=\"dv\">3</span><span class=\"dt\">px</span> <span class=\"dv\">dashed</span> <span class=\"cn\">#1e90ff</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-12\" title=\"12\">}</a>\n<a class=\"sourceLine\" id=\"cb25-13\" title=\"13\"></a>\n<a class=\"sourceLine\" id=\"cb25-14\" title=\"14\"><span class=\"fu\">.filedrop.ready</span> {</a>\n<a class=\"sourceLine\" id=\"cb25-15\" title=\"15\">  <span class=\"kw\">border</span>: <span class=\"dv\">3</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#32cd32</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb25-16\" title=\"16\">}</a>\n</div>\n<pre><code class=\"language-js\">const FileDrop = ({ onDrop }) =&#x26;gt; {\n  const [drag, setDrag] = React.useState(false);\n  const [filename, setFilename] = React.useState(&#x26;quot;&#x26;quot;);\n  let dropRef = React.createRef();\n  let dragCounter = 0;\n\nconst handleDrag = (e) =&#x26;gt; {\ne.preventDefault();\ne.stopPropagation();\n};\n\nconst handleDragIn = (e) =&#x26;gt; {\ne.preventDefault();\ne.stopPropagation();\ndragCounter++;\nif (e.dataTransfer.items &#x26;amp;&#x26;amp; e.dataTransfer.items.length &#x26;gt; 0) setDrag(true);\n};\n\nconst handleDragOut = (e) =&#x26;gt; {\ne.preventDefault();\ne.stopPropagation();\ndragCounter--;\nif (dragCounter === 0) setDrag(false);\n};\n\nconst handleDrop = (e) =&#x26;gt; {\ne.preventDefault();\ne.stopPropagation();\nsetDrag(false);\nif (e.dataTransfer.files &#x26;amp;&#x26;amp; e.dataTransfer.files.length &#x26;gt; 0) {\nonDrop(e.dataTransfer.files[0]);\nsetFilename(e.dataTransfer.files[0].name);\ne.dataTransfer.clearData();\ndragCounter = 0;\n}\n};\n\nReact.useEffect(() =&#x26;gt; {\nlet div = dropRef.current;\ndiv.addEventListener(&#x26;quot;dragenter&#x26;quot;, handleDragIn);\ndiv.addEventListener(&#x26;quot;dragleave&#x26;quot;, handleDragOut);\ndiv.addEventListener(&#x26;quot;dragover&#x26;quot;, handleDrag);\ndiv.addEventListener(&#x26;quot;drop&#x26;quot;, handleDrop);\nreturn () =&#x26;gt; {\ndiv.removeEventListener(&#x26;quot;dragenter&#x26;quot;, handleDragIn);\ndiv.removeEventListener(&#x26;quot;dragleave&#x26;quot;, handleDragOut);\ndiv.removeEventListener(&#x26;quot;dragover&#x26;quot;, handleDrag);\ndiv.removeEventListener(&#x26;quot;drop&#x26;quot;, handleDrop);\n};\n});\n\nreturn (\n&#x26;lt;div\nref={dropRef}\nclassName={\ndrag ? &#x26;quot;filedrop drag&#x26;quot; : filename ? &#x26;quot;filedrop ready&#x26;quot; : &#x26;quot;filedrop&#x26;quot;\n}\n&#x26;gt;\n{filename &#x26;amp;&#x26;amp; !drag ? &#x26;lt;div&#x26;gt;{filename}&#x26;lt;/div&#x26;gt; : &#x26;lt;div&#x26;gt;Drop a file here!&#x26;lt;/div&#x26;gt;}\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;FileDrop onDrop={console.log} /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a textarea component with a character limit.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>content</code> state variable and set its value to that of <code>value</code> prop, trimmed down to <code>limit</code> characters.</li>\n<li>Create a method <code>setFormattedContent</code>, which trims the content down to <code>limit</code> characters and memoize it, using the <code>useCallback()</code> hook.</li>\n<li>Bind the <code>onChange</code> event of the <code>&lt;textarea&gt;</code> to call <code>setFormattedContent</code> with the value of the fired event.</li>\n</ul>\n<pre><code class=\"language-js\">const LimitedTextarea = ({ rows, cols, value, limit }) =&#x26;gt; {\n  const [content, setContent] = React.useState(value.slice(0, limit));\n\nconst setFormattedContent = React.useCallback(\n(text) =&#x26;gt; {\nsetContent(text.slice(0, limit));\n},\n[limit, setContent]\n);\n\nreturn (\n&#x26;lt;&#x26;gt;\n&#x26;lt;textarea\nrows={rows}\ncols={cols}\nonChange={(event) =&#x26;gt; setFormattedContent(event.target.value)}\nvalue={content}\n/&#x26;gt;\n&#x26;lt;p&#x26;gt;\n{content.length}/{limit}\n&#x26;lt;/p&#x26;gt;\n&#x26;lt;/&#x26;gt;\n);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;LimitedTextarea limit={32} value=&#x26;quot;Hello!&#x26;quot; /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a textarea component with a word limit.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create a state variable, containing <code>content</code> and <code>wordCount</code>, using the <code>value</code> prop and <code>0</code> as the initial values respectively.</li>\n<li>Use the <code>useCallback()</code> hooks to create a memoized function, <code>setFormattedContent</code>, that uses <code>String.prototype.split()</code> to turn the input into an array of words.</li>\n<li>Check if the result of applying <code>Array.prototype.filter()</code> combined with <code>Boolean</code> has a <code>length</code> longer than <code>limit</code> and, if so, trim the input, otherwise return the raw input, updating state accordingly in both cases.</li>\n<li>Use the <code>useEffect()</code> hook to call the <code>setFormattedContent</code> method on the value of the <code>content</code> state variable during the initial render.</li>\n<li>Bind the <code>onChange</code> event of the <code>&lt;textarea&gt;</code> to call <code>setFormattedContent</code> with the value of <code>event.target.value</code>.</li>\n</ul>\n<pre><code class=\"language-js\">const LimitedWordTextarea = ({ rows, cols, value, limit }) =&#x26;gt; {\n  const [{ content, wordCount }, setContent] = React.useState({\n    content: value,\n    wordCount: 0,\n  });\n\nconst setFormattedContent = React.useCallback(\n(text) =&#x26;gt; {\nlet words = text.split(&#x26;quot; &#x26;quot;).filter(Boolean);\nif (words.length &#x26;gt; limit) {\nsetContent({\ncontent: words.slice(0, limit).join(&#x26;quot; &#x26;quot;),\nwordCount: limit,\n});\n} else {\nsetContent({ content: text, wordCount: words.length });\n}\n},\n[limit, setContent]\n);\n\nReact.useEffect(() =&#x26;gt; {\nsetFormattedContent(content);\n}, []);\n\nreturn (\n&#x26;lt;&#x26;gt;\n&#x26;lt;textarea\nrows={rows}\ncols={cols}\nonChange={(event) =&#x26;gt; setFormattedContent(event.target.value)}\nvalue={content}\n/&#x26;gt;\n&#x26;lt;p&#x26;gt;\n{wordCount}/{limit}\n&#x26;lt;/p&#x26;gt;\n&#x26;lt;/&#x26;gt;\n);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;LimitedWordTextarea limit={5} value=&#x26;quot;Hello there!&#x26;quot; /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a spinning loader component.</p>\n<ul>\n<li>Render an SVG, whose <code>height</code> and <code>width</code> are determined by the <code>size</code> prop.</li>\n<li>Use CSS to animate the SVG, creating a spinning animation.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb32\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb32-1\" title=\"1\"><span class=\"fu\">.loader</span> {</a>\n<a class=\"sourceLine\" id=\"cb32-2\" title=\"2\">  <span class=\"kw\">animation</span>: rotate <span class=\"dv\">2</span><span class=\"dt\">s</span> <span class=\"dv\">linear</span> <span class=\"dv\">infinite</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-3\" title=\"3\">}</a>\n<a class=\"sourceLine\" id=\"cb32-4\" title=\"4\"></a>\n<a class=\"sourceLine\" id=\"cb32-5\" title=\"5\"><span class=\"im\">@keyframes</span> rotate {</a>\n<a class=\"sourceLine\" id=\"cb32-6\" title=\"6\">  <span class=\"dv\">100%</span> {</a>\n<a class=\"sourceLine\" id=\"cb32-7\" title=\"7\">    <span class=\"kw\">transform</span>: <span class=\"fu\">rotate(</span><span class=\"dv\">360</span><span class=\"dt\">deg</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-8\" title=\"8\">  }</a>\n<a class=\"sourceLine\" id=\"cb32-9\" title=\"9\">}</a>\n<a class=\"sourceLine\" id=\"cb32-10\" title=\"10\"></a>\n<a class=\"sourceLine\" id=\"cb32-11\" title=\"11\"><span class=\"fu\">.loader</span> circle {</a>\n<a class=\"sourceLine\" id=\"cb32-12\" title=\"12\">  <span class=\"kw\">animation</span>: dash <span class=\"dv\">1.5</span><span class=\"dt\">s</span> <span class=\"dv\">ease-in-out</span> <span class=\"dv\">infinite</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-13\" title=\"13\">}</a>\n<a class=\"sourceLine\" id=\"cb32-14\" title=\"14\"></a>\n<a class=\"sourceLine\" id=\"cb32-15\" title=\"15\"><span class=\"im\">@keyframes</span> dash {</a>\n<a class=\"sourceLine\" id=\"cb32-16\" title=\"16\">  <span class=\"dv\">0%</span> {</a>\n<a class=\"sourceLine\" id=\"cb32-17\" title=\"17\">    stroke-dasharray: <span class=\"dv\">1</span><span class=\"op\">,</span> <span class=\"dv\">150</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-18\" title=\"18\">    stroke-dashoffset: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-19\" title=\"19\">  }</a>\n<a class=\"sourceLine\" id=\"cb32-20\" title=\"20\">  <span class=\"dv\">50%</span> {</a>\n<a class=\"sourceLine\" id=\"cb32-21\" title=\"21\">    stroke-dasharray: <span class=\"dv\">90</span><span class=\"op\">,</span> <span class=\"dv\">150</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-22\" title=\"22\">    stroke-dashoffset: <span class=\"dv\">-35</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-23\" title=\"23\">  }</a>\n<a class=\"sourceLine\" id=\"cb32-24\" title=\"24\">  <span class=\"dv\">100%</span> {</a>\n<a class=\"sourceLine\" id=\"cb32-25\" title=\"25\">    stroke-dasharray: <span class=\"dv\">90</span><span class=\"op\">,</span> <span class=\"dv\">150</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-26\" title=\"26\">    stroke-dashoffset: <span class=\"dv\">-124</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb32-27\" title=\"27\">  }</a>\n<a class=\"sourceLine\" id=\"cb32-28\" title=\"28\">}</a>\n</div>\n<pre><code class=\"language-js\">const Loader = ({ size }) =&#x26;gt; {\n  return (\n    &#x26;lt;svg\n      className=&#x26;quot;loader&#x26;quot;\n      xmlns=&#x26;quot;http://www.w3.org/2000/svg&#x26;quot;\n      width={size}\n      height={size}\n      viewBox=&#x26;quot;0 0 24 24&#x26;quot;\n      fill=&#x26;quot;none&#x26;quot;\n      stroke=&#x26;quot;currentColor&#x26;quot;\n      strokeWidth=&#x26;quot;2&#x26;quot;\n      strokeLinecap=&#x26;quot;round&#x26;quot;\n      strokeLinejoin=&#x26;quot;round&#x26;quot;\n    &#x26;gt;\n      &#x26;lt;circle cx=&#x26;quot;12&#x26;quot; cy=&#x26;quot;12&#x26;quot; r=&#x26;quot;10&#x26;quot; /&#x26;gt;\n    &#x26;lt;/svg&#x26;gt;\n  );\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(&#x26;lt;Loader size={24} /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a link formatted to send an email (<code>mailto:</code> link).</p>\n<ul>\n<li>Use the <code>email</code>, <code>subject</code> and <code>body</code> props to create a <code>&lt;a&gt;</code> element with an appropriate <code>href</code> attribute.</li>\n<li>Use <code>encodeURIcomponent</code> to safely encode the <code>subject</code> and <code>body</code> into the link URL.</li>\n<li>Render the link with <code>children</code> as its content.</li>\n</ul>\n<pre><code class=\"language-js\">const Mailto = ({ email, subject = &#x26;quot;&#x26;quot;, body = &#x26;quot;&#x26;quot;, children }) =&#x26;gt; {\n  let params = subject || body ? &#x26;quot;?&#x26;quot; : &#x26;quot;&#x26;quot;;\n  if (subject) params += `subject=${encodeURIComponent(subject)}`;\n  if (body) params += `${subject ? &#x26;quot;&#x26;amp;&#x26;quot; : &#x26;quot;&#x26;quot;}body=${encodeURIComponent(body)}`;\n\nreturn &#x26;lt;a href={`mailto:${email}${params}`}&#x26;gt;{children}&#x26;lt;/a&#x26;gt;;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;Mailto email=&#x26;quot;foo@bar.baz&#x26;quot; subject=&#x26;quot;Hello &#x26;amp; Welcome&#x26;quot; body=&#x26;quot;Hello world!&#x26;quot;&#x26;gt;\n    Mail me!\n  &#x26;lt;/Mailto&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a table with rows dynamically created from an array of objects and a list of property names.</p>\n<ul>\n<li>Use <code>Object.keys()</code>, <code>Array.prototype.filter()</code>, <code>Array.prototype.includes()</code> and <code>Array.prototype.reduce()</code> to produce a <code>filteredData</code> array, containing all objects with the keys specified in <code>propertyNames</code>.</li>\n<li>Render a <code>&lt;table&gt;</code> element with a set of columns equal to the amount of values in <code>propertyNames</code>.</li>\n<li>Use <code>Array.prototype.map()</code> to render each value in the <code>propertyNames</code> array as a <code>&lt;th&gt;</code> element.</li>\n<li>Use <code>Array.prototype.map()</code> to render each object in the <code>filteredData</code> array as a <code>&lt;tr&gt;</code> element, containing a <code>&lt;td&gt;</code> for each key in the object.</li>\n</ul>\n<p><em>This component does not work with nested objects and will break if there are nested objects inside any of the properties specified in <code>propertyNames</code></em></p>\n<pre><code class=\"language-js\">const MappedTable = ({ data, propertyNames }) =&#x26;gt; {\n  let filteredData = data.map((v) =&#x26;gt;\n    Object.keys(v)\n      .filter((k) =&#x26;gt; propertyNames.includes(k))\n      .reduce((acc, key) =&#x26;gt; ((acc[key] = v[key]), acc), {})\n  );\n  return (\n    &#x26;lt;table&#x26;gt;\n      &#x26;lt;thead&#x26;gt;\n        &#x26;lt;tr&#x26;gt;\n          {propertyNames.map((val) =&#x26;gt; (\n            &#x26;lt;th key={`h_${val}`}&#x26;gt;{val}&#x26;lt;/th&#x26;gt;\n          ))}\n        &#x26;lt;/tr&#x26;gt;\n      &#x26;lt;/thead&#x26;gt;\n      &#x26;lt;tbody&#x26;gt;\n        {filteredData.map((val, i) =&#x26;gt; (\n          &#x26;lt;tr key={`i_${i}`}&#x26;gt;\n            {propertyNames.map((p) =&#x26;gt; (\n              &#x26;lt;td key={`i_${i}_${p}`}&#x26;gt;{val[p]}&#x26;lt;/td&#x26;gt;\n            ))}\n          &#x26;lt;/tr&#x26;gt;\n        ))}\n      &#x26;lt;/tbody&#x26;gt;\n    &#x26;lt;/table&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const people = [\n  { name: &#x26;quot;John&#x26;quot;, surname: &#x26;quot;Smith&#x26;quot;, age: 42 },\n  { name: &#x26;quot;Adam&#x26;quot;, surname: &#x26;quot;Smith&#x26;quot;, gender: &#x26;quot;male&#x26;quot; },\n];\nconst propertyNames = [&#x26;quot;name&#x26;quot;, &#x26;quot;surname&#x26;quot;, &#x26;quot;age&#x26;quot;];\nReactDOM.render(\n  &#x26;lt;MappedTable data={people} propertyNames={propertyNames} /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a Modal component, controllable through events.</p>\n<ul>\n<li>Define <code>keydownHandler</code>, a method which handles all keyboard events and is used to call <code>onClose</code> when the <code>Esc</code> key is pressed.</li>\n<li>Use the <code>useEffect()</code> hook to add or remove the <code>keydown</code> event listener to the <code>document</code>, calling <code>keydownHandler</code> for every event.</li>\n<li>Add a styled <code>&lt;span&gt;</code> element that acts as a close button, calling <code>onClose</code> when clicked.</li>\n<li>Use the <code>isVisible</code> prop passed down from the parent to determine if the modal should be displayed or not.</li>\n<li>To use the component, import <code>Modal</code> only once and then display it by passing a boolean value to the <code>isVisible</code> attribute.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb39\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb39-1\" title=\"1\"><span class=\"fu\">.modal</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-2\" title=\"2\">  <span class=\"kw\">position</span>: <span class=\"dv\">fixed</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-3\" title=\"3\">  <span class=\"kw\">top</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-4\" title=\"4\">  <span class=\"kw\">bottom</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-5\" title=\"5\">  <span class=\"kw\">left</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-6\" title=\"6\">  <span class=\"kw\">right</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-7\" title=\"7\">  <span class=\"kw\">width</span>: <span class=\"dv\">100</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-8\" title=\"8\">  <span class=\"kw\">z-index</span>: <span class=\"dv\">9999</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-9\" title=\"9\">  <span class=\"kw\">display</span>: flex<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-10\" title=\"10\">  <span class=\"kw\">align-items</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-11\" title=\"11\">  <span class=\"kw\">justify-content</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-12\" title=\"12\">  <span class=\"kw\">background-color</span>: <span class=\"fu\">rgba(</span><span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0.25</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-13\" title=\"13\">  <span class=\"kw\">animation-name</span>: appear<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-14\" title=\"14\">  <span class=\"kw\">animation-duration</span>: <span class=\"dv\">300</span><span class=\"dt\">ms</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-15\" title=\"15\">}</a>\n<a class=\"sourceLine\" id=\"cb39-16\" title=\"16\"></a>\n<a class=\"sourceLine\" id=\"cb39-17\" title=\"17\"><span class=\"fu\">.modal-dialog</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-18\" title=\"18\">  <span class=\"kw\">width</span>: <span class=\"dv\">100</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-19\" title=\"19\">  <span class=\"kw\">max-width</span>: <span class=\"dv\">550</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-20\" title=\"20\">  <span class=\"kw\">background</span>: <span class=\"cn\">white</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-21\" title=\"21\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-22\" title=\"22\">  <span class=\"kw\">margin</span>: <span class=\"dv\">0</span> <span class=\"dv\">20</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-23\" title=\"23\">  <span class=\"kw\">max-height</span>: <span class=\"fu\">calc(</span><span class=\"dv\">100</span><span class=\"dt\">vh</span> <span class=\"op\">-</span> <span class=\"dv\">40</span><span class=\"dt\">px</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-24\" title=\"24\">  <span class=\"kw\">text-align</span>: <span class=\"dv\">left</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-25\" title=\"25\">  <span class=\"kw\">display</span>: flex<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-26\" title=\"26\">  <span class=\"kw\">flex-direction</span>: column<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-27\" title=\"27\">  <span class=\"kw\">overflow</span>: <span class=\"dv\">hidden</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-28\" title=\"28\">  <span class=\"kw\">box-shadow</span>: <span class=\"dv\">0</span> <span class=\"dv\">4</span><span class=\"dt\">px</span> <span class=\"dv\">8</span><span class=\"dt\">px</span> <span class=\"dv\">0</span> <span class=\"fu\">rgba(</span><span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0.2</span><span class=\"fu\">)</span><span class=\"op\">,</span> <span class=\"dv\">0</span> <span class=\"dv\">6</span><span class=\"dt\">px</span> <span class=\"dv\">20</span><span class=\"dt\">px</span> <span class=\"dv\">0</span> <span class=\"fu\">rgba(</span><span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0.19</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-29\" title=\"29\">  <span class=\"kw\">-webkit-animation-name</span>: animatetop<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-30\" title=\"30\">  <span class=\"kw\">-webkit-animation-duration</span>: <span class=\"dv\">0.4</span><span class=\"dt\">s</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-31\" title=\"31\">  <span class=\"kw\">animation-name</span>: slide-in<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-32\" title=\"32\">  <span class=\"kw\">animation-duration</span>: <span class=\"dv\">0.5</span><span class=\"dt\">s</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-33\" title=\"33\">}</a>\n<a class=\"sourceLine\" id=\"cb39-34\" title=\"34\"></a>\n<a class=\"sourceLine\" id=\"cb39-35\" title=\"35\"><span class=\"fu\">.modal-header</span><span class=\"op\">,</span></a>\n<a class=\"sourceLine\" id=\"cb39-36\" title=\"36\"><span class=\"fu\">.modal-footer</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-37\" title=\"37\">  <span class=\"kw\">display</span>: flex<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-38\" title=\"38\">  <span class=\"kw\">align-items</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-39\" title=\"39\">  <span class=\"kw\">padding</span>: <span class=\"dv\">1</span><span class=\"dt\">rem</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-40\" title=\"40\">}</a>\n<a class=\"sourceLine\" id=\"cb39-41\" title=\"41\"></a>\n<a class=\"sourceLine\" id=\"cb39-42\" title=\"42\"><span class=\"fu\">.modal-header</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-43\" title=\"43\">  <span class=\"kw\">border-bottom</span>: <span class=\"dv\">1</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#dbdbdb</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-44\" title=\"44\">  <span class=\"kw\">justify-content</span>: space-between<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-45\" title=\"45\">}</a>\n<a class=\"sourceLine\" id=\"cb39-46\" title=\"46\"></a>\n<a class=\"sourceLine\" id=\"cb39-47\" title=\"47\"><span class=\"fu\">.modal-footer</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-48\" title=\"48\">  <span class=\"kw\">border-top</span>: <span class=\"dv\">1</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#dbdbdb</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-49\" title=\"49\">  <span class=\"kw\">justify-content</span>: flex-end<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-50\" title=\"50\">}</a>\n<a class=\"sourceLine\" id=\"cb39-51\" title=\"51\"></a>\n<a class=\"sourceLine\" id=\"cb39-52\" title=\"52\"><span class=\"fu\">.modal-close</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-53\" title=\"53\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-54\" title=\"54\">  <span class=\"kw\">padding</span>: <span class=\"dv\">1</span><span class=\"dt\">rem</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-55\" title=\"55\">  <span class=\"kw\">margin</span>: <span class=\"dv\">-1</span><span class=\"dt\">rem</span> <span class=\"dv\">-1</span><span class=\"dt\">rem</span> <span class=\"dv\">-1</span><span class=\"dt\">rem</span> <span class=\"bu\">auto</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-56\" title=\"56\">}</a>\n<a class=\"sourceLine\" id=\"cb39-57\" title=\"57\"></a>\n<a class=\"sourceLine\" id=\"cb39-58\" title=\"58\"><span class=\"fu\">.modal-body</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-59\" title=\"59\">  <span class=\"kw\">overflow</span>: <span class=\"bu\">auto</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-60\" title=\"60\">}</a>\n<a class=\"sourceLine\" id=\"cb39-61\" title=\"61\"></a>\n<a class=\"sourceLine\" id=\"cb39-62\" title=\"62\"><span class=\"fu\">.modal-content</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-63\" title=\"63\">  <span class=\"kw\">padding</span>: <span class=\"dv\">1</span><span class=\"dt\">rem</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-64\" title=\"64\">}</a>\n<a class=\"sourceLine\" id=\"cb39-65\" title=\"65\"></a>\n<a class=\"sourceLine\" id=\"cb39-66\" title=\"66\"><span class=\"im\">@keyframes</span> appear {</a>\n<a class=\"sourceLine\" id=\"cb39-67\" title=\"67\">  <span class=\"dv\">from</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-68\" title=\"68\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-69\" title=\"69\">  }</a>\n<a class=\"sourceLine\" id=\"cb39-70\" title=\"70\">  <span class=\"dv\">to</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-71\" title=\"71\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">1</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-72\" title=\"72\">  }</a>\n<a class=\"sourceLine\" id=\"cb39-73\" title=\"73\">}</a>\n<a class=\"sourceLine\" id=\"cb39-74\" title=\"74\"></a>\n<a class=\"sourceLine\" id=\"cb39-75\" title=\"75\"><span class=\"im\">@keyframes</span> slide-in {</a>\n<a class=\"sourceLine\" id=\"cb39-76\" title=\"76\">  <span class=\"dv\">from</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-77\" title=\"77\">    <span class=\"kw\">transform</span>: translateY(<span class=\"dv\">-150</span><span class=\"dt\">px</span>)<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-78\" title=\"78\">  }</a>\n<a class=\"sourceLine\" id=\"cb39-79\" title=\"79\">  <span class=\"dv\">to</span> {</a>\n<a class=\"sourceLine\" id=\"cb39-80\" title=\"80\">    <span class=\"kw\">transform</span>: translateY(<span class=\"dv\">0</span>)<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb39-81\" title=\"81\">  }</a>\n<a class=\"sourceLine\" id=\"cb39-82\" title=\"82\">}</a>\n</div>\n<pre><code class=\"language-js\">const Modal = ({ isVisible = false, title, content, footer, onClose }) =&#x26;gt; {\n  const keydownHandler = ({ key }) =&#x26;gt; {\n    switch (key) {\n      case &#x26;quot;Escape&#x26;quot;:\n        onClose();\n        break;\n      default:\n    }\n  };\n\nReact.useEffect(() =&#x26;gt; {\ndocument.addEventListener(&#x26;quot;keydown&#x26;quot;, keydownHandler);\nreturn () =&#x26;gt; document.removeEventListener(&#x26;quot;keydown&#x26;quot;, keydownHandler);\n});\n\nreturn !isVisible ? null : (\n&#x26;lt;div className=&#x26;quot;modal&#x26;quot; onClick={onClose}&#x26;gt;\n&#x26;lt;div className=&#x26;quot;modal-dialog&#x26;quot; onClick={(e) =&#x26;gt; e.stopPropagation()}&#x26;gt;\n&#x26;lt;div className=&#x26;quot;modal-header&#x26;quot;&#x26;gt;\n&#x26;lt;h3 className=&#x26;quot;modal-title&#x26;quot;&#x26;gt;{title}&#x26;lt;/h3&#x26;gt;\n&#x26;lt;span className=&#x26;quot;modal-close&#x26;quot; onClick={onClose}&#x26;gt;\n&#x26;amp;times;\n&#x26;lt;/span&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;div className=&#x26;quot;modal-body&#x26;quot;&#x26;gt;\n&#x26;lt;div className=&#x26;quot;modal-content&#x26;quot;&#x26;gt;{content}&#x26;lt;/div&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n{footer &#x26;amp;&#x26;amp; &#x26;lt;div className=&#x26;quot;modal-footer&#x26;quot;&#x26;gt;{footer}&#x26;lt;/div&#x26;gt;}\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nconst App = () =&#x26;gt; {\n  const [isModal, setModal] = React.useState(false);\n  return (\n    &#x26;lt;&#x26;gt;\n      &#x26;lt;button onClick={() =&#x26;gt; setModal(true)}&#x26;gt;Click Here&#x26;lt;/button&#x26;gt;\n      &#x26;lt;Modal\n        isVisible={isModal}\n        title=&#x26;quot;Modal Title&#x26;quot;\n        content={&#x26;lt;p&#x26;gt;Add your content here&#x26;lt;/p&#x26;gt;}\n        footer={&#x26;lt;button&#x26;gt;Cancel&#x26;lt;/button&#x26;gt;}\n        onClose={() =&#x26;gt; setModal(false)}\n      /&#x26;gt;\n    &#x26;lt;/&#x26;gt;\n  );\n};\n\nReactDOM.render(&#x26;lt;App /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a checkbox list that uses a callback function to pass its selected value/values to the parent component.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>data</code> state variable and use the <code>options</code> prop to initialize its value.</li>\n<li>Create a <code>toggle</code> function that uses the spread operator (<code>...</code>) and <code>Array.prototype.splice()</code> to update the <code>data</code> state variable and call the <code>onChange</code> callback with any <code>checked</code> options.</li>\n<li>Use <code>Array.prototype.map()</code> to map the <code>data</code> state variable to individual <code>&lt;input type=\"checkbox\"&gt;</code> elements, each one wrapped in a <code>&lt;label&gt;</code>, binding the <code>onClick</code> handler to the <code>toggle</code> function.</li>\n</ul>\n<pre><code class=\"language-js\">const MultiselectCheckbox = ({ options, onChange }) =&#x26;gt; {\n  const [data, setData] = React.useState(options);\n\nconst toggle = (index) =&#x26;gt; {\nconst newData = [...data];\nnewData.splice(index, 1, {\nlabel: data[index].label,\nchecked: !data[index].checked,\n});\nsetData(newData);\nonChange(newData.filter((x) =&#x26;gt; x.checked));\n};\n\nreturn (\n&#x26;lt;&#x26;gt;\n{data.map((item, index) =&#x26;gt; (\n&#x26;lt;label key={item.label}&#x26;gt;\n&#x26;lt;input\nreadOnly\ntype=&#x26;quot;checkbox&#x26;quot;\nchecked={item.checked || false}\nonClick={() =&#x26;gt; toggle(index)}\n/&#x26;gt;\n{item.label}\n&#x26;lt;/label&#x26;gt;\n))}\n&#x26;lt;/&#x26;gt;\n);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const options = [{ label: &#x26;quot;Item One&#x26;quot; }, { label: &#x26;quot;Item Two&#x26;quot; }];\n\nReactDOM.render(\n&#x26;lt;MultiselectCheckbox\noptions={options}\nonChange={(data) =&#x26;gt; {\nconsole.log(data);\n}}\n/&#x26;gt;,\ndocument.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a password input field with a reveal button.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>shown</code> state variable and set its value to <code>false</code>.</li>\n<li>When the <code>&lt;button&gt;</code> is clicked, execute <code>setShown</code>, toggling the <code>type</code> of the <code>&lt;input&gt;</code> between <code>\"text\"</code> and <code>\"password\"</code>.</li>\n</ul>\n<pre><code class=\"language-js\">const PasswordRevealer = ({ value }) =&#x26;gt; {\n  const [shown, setShown] = React.useState(false);\n  return (\n    &#x26;lt;&#x26;gt;\n      &#x26;lt;input type={shown ? &#x26;quot;text&#x26;quot; : &#x26;quot;password&#x26;quot;} value={value} /&#x26;gt;\n      &#x26;lt;button onClick={() =&#x26;gt; setShown(!shown)}&#x26;gt;Show/Hide&#x26;lt;/button&#x26;gt;\n    &#x26;lt;/&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(&#x26;lt;PasswordRevealer /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a button that animates a ripple effect when clicked.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>coords</code> and <code>isRippling</code> state variables for the pointer's coordinates and the animation state of the button respectively.</li>\n<li>Use a <code>useEffect()</code> hook to change the value of <code>isRippling</code> every time the <code>coords</code> state variable changes, starting the animation.</li>\n<li>Use <code>setTimeout()</code> in the previous hook to clear the animation after it's done playing.</li>\n<li>Use a <code>useEffect()</code> hook to reset <code>coords</code> whenever the <code>isRippling</code> state variable is <code>false.</code></li>\n<li>Handle the <code>onClick</code> event by updating the <code>coords</code> state variable and calling the passed callback.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb46\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb46-1\" title=\"1\"><span class=\"fu\">.ripple-button</span> {</a>\n<a class=\"sourceLine\" id=\"cb46-2\" title=\"2\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">4</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-3\" title=\"3\">  <span class=\"kw\">border</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-4\" title=\"4\">  <span class=\"kw\">margin</span>: <span class=\"dv\">8</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-5\" title=\"5\">  <span class=\"kw\">padding</span>: <span class=\"dv\">14</span><span class=\"dt\">px</span> <span class=\"dv\">24</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-6\" title=\"6\">  <span class=\"kw\">background</span>: <span class=\"cn\">#1976d2</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-7\" title=\"7\">  <span class=\"kw\">color</span>: <span class=\"cn\">#fff</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-8\" title=\"8\">  <span class=\"kw\">overflow</span>: <span class=\"dv\">hidden</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-9\" title=\"9\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-10\" title=\"10\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-11\" title=\"11\">}</a>\n<a class=\"sourceLine\" id=\"cb46-12\" title=\"12\"></a>\n<a class=\"sourceLine\" id=\"cb46-13\" title=\"13\"><span class=\"fu\">.ripple-button</span> <span class=\"op\">&gt;</span> <span class=\"fu\">.ripple</span> {</a>\n<a class=\"sourceLine\" id=\"cb46-14\" title=\"14\">  <span class=\"kw\">width</span>: <span class=\"dv\">20</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-15\" title=\"15\">  <span class=\"kw\">height</span>: <span class=\"dv\">20</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-16\" title=\"16\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-17\" title=\"17\">  <span class=\"kw\">background</span>: <span class=\"cn\">#63a4ff</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-18\" title=\"18\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-19\" title=\"19\">  <span class=\"kw\">content</span>: <span class=\"st\">&quot;&quot;</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-20\" title=\"20\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">9999</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-21\" title=\"21\">  <span class=\"kw\">opacity</span>: <span class=\"dv\">1</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-22\" title=\"22\">  <span class=\"kw\">animation</span>: <span class=\"dv\">0.9</span><span class=\"dt\">s</span> <span class=\"dv\">ease</span> <span class=\"dv\">1</span> <span class=\"dv\">forwards</span> ripple-effect<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-23\" title=\"23\">}</a>\n<a class=\"sourceLine\" id=\"cb46-24\" title=\"24\"></a>\n<a class=\"sourceLine\" id=\"cb46-25\" title=\"25\"><span class=\"im\">@keyframes</span> ripple-effect {</a>\n<a class=\"sourceLine\" id=\"cb46-26\" title=\"26\">  <span class=\"dv\">0%</span> {</a>\n<a class=\"sourceLine\" id=\"cb46-27\" title=\"27\">    <span class=\"kw\">transform</span>: <span class=\"fu\">scale(</span><span class=\"dv\">1</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-28\" title=\"28\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">1</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-29\" title=\"29\">  }</a>\n<a class=\"sourceLine\" id=\"cb46-30\" title=\"30\">  <span class=\"dv\">50%</span> {</a>\n<a class=\"sourceLine\" id=\"cb46-31\" title=\"31\">    <span class=\"kw\">transform</span>: <span class=\"fu\">scale(</span><span class=\"dv\">10</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-32\" title=\"32\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">0.375</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-33\" title=\"33\">  }</a>\n<a class=\"sourceLine\" id=\"cb46-34\" title=\"34\">  <span class=\"dv\">100%</span> {</a>\n<a class=\"sourceLine\" id=\"cb46-35\" title=\"35\">    <span class=\"kw\">transform</span>: <span class=\"fu\">scale(</span><span class=\"dv\">35</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-36\" title=\"36\">    <span class=\"kw\">opacity</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-37\" title=\"37\">  }</a>\n<a class=\"sourceLine\" id=\"cb46-38\" title=\"38\">}</a>\n<a class=\"sourceLine\" id=\"cb46-39\" title=\"39\"></a>\n<a class=\"sourceLine\" id=\"cb46-40\" title=\"40\"><span class=\"fu\">.ripple-button</span> <span class=\"op\">&gt;</span> <span class=\"fu\">.content</span> {</a>\n<a class=\"sourceLine\" id=\"cb46-41\" title=\"41\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-42\" title=\"42\">  <span class=\"kw\">z-index</span>: <span class=\"dv\">2</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb46-43\" title=\"43\">}</a>\n</div>\n<pre><code class=\"language-js\">const RippleButton = ({ children, onClick }) =&#x26;gt; {\n  const [coords, setCoords] = React.useState({ x: -1, y: -1 });\n  const [isRippling, setIsRippling] = React.useState(false);\n\nReact.useEffect(() =&#x26;gt; {\nif (coords.x !== -1 &#x26;amp;&#x26;amp; coords.y !== -1) {\nsetIsRippling(true);\nsetTimeout(() =&#x26;gt; setIsRippling(false), 300);\n} else setIsRippling(false);\n}, [coords]);\n\nReact.useEffect(() =&#x26;gt; {\nif (!isRippling) setCoords({ x: -1, y: -1 });\n}, [isRippling]);\n\nreturn (\n&#x26;lt;button\nclassName=&#x26;quot;ripple-button&#x26;quot;\nonClick={(e) =&#x26;gt; {\nconst rect = e.target.getBoundingClientRect();\nsetCoords({ x: e.clientX - rect.left, y: e.clientY - rect.top });\nonClick &#x26;amp;&#x26;amp; onClick(e);\n}}\n&#x26;gt;\n{isRippling ? (\n&#x26;lt;span\nclassName=&#x26;quot;ripple&#x26;quot;\nstyle={{\n            left: coords.x,\n            top: coords.y,\n          }}\n/&#x26;gt;\n) : (\n&#x26;quot;&#x26;quot;\n)}\n&#x26;lt;span className=&#x26;quot;content&#x26;quot;&#x26;gt;{children}&#x26;lt;/span&#x26;gt;\n&#x26;lt;/button&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;RippleButton onClick={(e) =&#x26;gt; console.log(e)}&#x26;gt;Click me&#x26;lt;/RippleButton&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders an uncontrolled <code>&lt;select&gt;</code> element that uses a callback function to pass its value to the parent component.</p>\n<ul>\n<li>Use the the <code>selectedValue</code> prop as the <code>defaultValue</code> of the <code>&lt;select&gt;</code> element to set its initial value..</li>\n<li>Use the <code>onChange</code> event to fire the <code>onValueChange</code> callback and send the new value to the parent.</li>\n<li>Use <code>Array.prototype.map()</code> on the <code>values</code> array to create an <code>&lt;option&gt;</code> element for each passed value.</li>\n<li>Each item in <code>values</code> must be a 2-element array, where the first element is the <code>value</code> of the item and the second one is the displayed text for it.</li>\n</ul>\n<pre><code class=\"language-js\">const Select = ({ values, onValueChange, selectedValue, ...rest }) =&#x26;gt; {\n  return (\n    &#x26;lt;select\n      defaultValue={selectedValue}\n      onChange={({ target: { value } }) =&#x26;gt; onValueChange(value)}\n      {...rest}\n    &#x26;gt;\n      {values.map(([value, text]) =&#x26;gt; (\n        &#x26;lt;option key={value} value={value}&#x26;gt;\n          {text}\n        &#x26;lt;/option&#x26;gt;\n      ))}\n    &#x26;lt;/select&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const choices = [\n  [&#x26;quot;grapefruit&#x26;quot;, &#x26;quot;Grapefruit&#x26;quot;],\n  [&#x26;quot;lime&#x26;quot;, &#x26;quot;Lime&#x26;quot;],\n  [&#x26;quot;coconut&#x26;quot;, &#x26;quot;Coconut&#x26;quot;],\n  [&#x26;quot;mango&#x26;quot;, &#x26;quot;Mango&#x26;quot;],\n];\nReactDOM.render(\n  &#x26;lt;Select\n    values={choices}\n    selectedValue=&#x26;quot;lime&#x26;quot;\n    onValueChange={(val) =&#x26;gt; console.log(val)}\n  /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders an uncontrolled range input element that uses a callback function to pass its value to the parent component.</p>\n<ul>\n<li>Set the <code>type</code> of the <code>&lt;input&gt;</code> element to <code>\"range\"</code> to create a slider.</li>\n<li>Use the <code>defaultValue</code> passed down from the parent as the uncontrolled input field's initial value.</li>\n<li>Use the <code>onChange</code> event to fire the <code>onValueChange</code> callback and send the new value to the parent.</li>\n</ul>\n<pre><code class=\"language-js\">const Slider = ({\n  min = 0,\n  max = 100,\n  defaultValue,\n  onValueChange,\n  ...rest\n}) =&#x26;gt; {\n  return (\n    &#x26;lt;input\n      type=&#x26;quot;range&#x26;quot;\n      min={min}\n      max={max}\n      defaultValue={defaultValue}\n      onChange={({ target: { value } }) =&#x26;gt; onValueChange(value)}\n      {...rest}\n    /&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;Slider onValueChange={(val) =&#x26;gt; console.log(val)} /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a star rating component.</p>\n<ul>\n<li>Define a component, called <code>Star</code> that will render each individual star with the appropriate appearance, based on the parent component's state.</li>\n<li>In the <code>StarRating</code> component, use the <code>useState()</code> hook to define the <code>rating</code> and <code>selection</code> state variables with the appropriate initial values.</li>\n<li>Create a method, <code>hoverOver</code>, that updates <code>selected</code> according to the provided <code>event</code>, using the .<code>data-star-id</code> attribute of the event's target or resets it to <code>0</code> if called with a <code>null</code> argument.</li>\n<li>Use <code>Array.from()</code> to create an array of <code>5</code> elements and <code>Array.prototype.map()</code> to create individual <code>&lt;Star&gt;</code> components.</li>\n<li>Handle the <code>onMouseOver</code> and <code>onMouseLeave</code> events of the wrapping element using <code>hoverOver</code> and the <code>onClick</code> event using <code>setRating</code>.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb53\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb53-1\" title=\"1\"><span class=\"fu\">.star</span> {</a>\n<a class=\"sourceLine\" id=\"cb53-2\" title=\"2\">  <span class=\"kw\">color</span>: <span class=\"cn\">#ff9933</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb53-3\" title=\"3\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb53-4\" title=\"4\">}</a>\n</div>\n<pre><code class=\"language-js\">const Star = ({ marked, starId }) =&#x26;gt; {\n  return (\n    &#x26;lt;span data-star-id={starId} className=&#x26;quot;star&#x26;quot; role=&#x26;quot;button&#x26;quot;&#x26;gt;\n      {marked ? &#x26;quot;\\u2605&#x26;quot; : &#x26;quot;\\u2606&#x26;quot;}\n    &#x26;lt;/span&#x26;gt;\n  );\n};\n\nconst StarRating = ({ value }) =&#x26;gt; {\nconst [rating, setRating] = React.useState(parseInt(value) || 0);\nconst [selection, setSelection] = React.useState(0);\n\nconst hoverOver = (event) =&#x26;gt; {\nlet val = 0;\nif (event &#x26;amp;&#x26;amp; event.target &#x26;amp;&#x26;amp; event.target.getAttribute(&#x26;quot;data-star-id&#x26;quot;))\nval = event.target.getAttribute(&#x26;quot;data-star-id&#x26;quot;);\nsetSelection(val);\n};\nreturn (\n&#x26;lt;div\nonMouseOut={() =&#x26;gt; hoverOver(null)}\nonClick={(e) =&#x26;gt;\nsetRating(e.target.getAttribute(&#x26;quot;data-star-id&#x26;quot;) || rating)\n}\nonMouseOver={hoverOver}\n&#x26;gt;\n{Array.from({ length: 5 }, (v, i) =&#x26;gt; (\n&#x26;lt;Star\nstarId={i + 1}\nkey={`star_${i + 1}`}\nmarked={selection ? selection &#x26;gt;= i + 1 : rating &#x26;gt;= i + 1}\n/&#x26;gt;\n))}\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(&#x26;lt;StarRating value={2} /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a tabbed menu and view component.</p>\n<ul>\n<li>Define a <code>Tabs</code> component that uses the <code>useState()</code> hook to initialize the value of the <code>bindIndex</code> state variable to <code>defaultIndex</code>.</li>\n<li>Define a <code>TabItem</code> component and filter <code>children</code> passed to the <code>Tabs</code> component to remove unnecessary nodes except for <code>TabItem</code> by identifying the function's name.</li>\n<li>Define <code>changeTab</code>, which will be executed when clicking a <code>&lt;button&gt;</code> from the menu.</li>\n<li><code>changeTab</code> executes the passed callback, <code>onTabClick</code>, and updates <code>bindIndex</code> based on the clicked element.</li>\n<li>Use <code>Array.prototype.map()</code> on the collected nodes to render the menu and view of the tabs, using the value of <code>binIndex</code> to determine the active tab and apply the correct <code>className</code>.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb56\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb56-1\" title=\"1\"><span class=\"fu\">.tab-menu</span> <span class=\"op\">&gt;</span> button {</a>\n<a class=\"sourceLine\" id=\"cb56-2\" title=\"2\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-3\" title=\"3\">  <span class=\"kw\">padding</span>: <span class=\"dv\">8</span><span class=\"dt\">px</span> <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-4\" title=\"4\">  <span class=\"kw\">border</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-5\" title=\"5\">  <span class=\"kw\">border-bottom</span>: <span class=\"dv\">2</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"dv\">transparent</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-6\" title=\"6\">  <span class=\"kw\">background</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-7\" title=\"7\">}</a>\n<a class=\"sourceLine\" id=\"cb56-8\" title=\"8\"></a>\n<a class=\"sourceLine\" id=\"cb56-9\" title=\"9\"><span class=\"fu\">.tab-menu</span> <span class=\"op\">&gt;</span> button<span class=\"fu\">.focus</span> {</a>\n<a class=\"sourceLine\" id=\"cb56-10\" title=\"10\">  <span class=\"kw\">border-bottom</span>: <span class=\"dv\">2</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#007bef</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-11\" title=\"11\">}</a>\n<a class=\"sourceLine\" id=\"cb56-12\" title=\"12\"></a>\n<a class=\"sourceLine\" id=\"cb56-13\" title=\"13\"><span class=\"fu\">.tab-menu</span> <span class=\"op\">&gt;</span> button<span class=\"in\">:hover</span> {</a>\n<a class=\"sourceLine\" id=\"cb56-14\" title=\"14\">  <span class=\"kw\">border-bottom</span>: <span class=\"dv\">2</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#007bef</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-15\" title=\"15\">}</a>\n<a class=\"sourceLine\" id=\"cb56-16\" title=\"16\"></a>\n<a class=\"sourceLine\" id=\"cb56-17\" title=\"17\"><span class=\"fu\">.tab-content</span> {</a>\n<a class=\"sourceLine\" id=\"cb56-18\" title=\"18\">  <span class=\"kw\">display</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-19\" title=\"19\">}</a>\n<a class=\"sourceLine\" id=\"cb56-20\" title=\"20\"></a>\n<a class=\"sourceLine\" id=\"cb56-21\" title=\"21\"><span class=\"fu\">.tab-content.selected</span> {</a>\n<a class=\"sourceLine\" id=\"cb56-22\" title=\"22\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb56-23\" title=\"23\">}</a>\n</div>\n<pre><code class=\"language-js\">const TabItem = (props) =&#x26;gt; &#x26;lt;div {...props} /&#x26;gt;;\n\nconst Tabs = ({ defaultIndex = 0, onTabClick, children }) =&#x26;gt; {\nconst [bindIndex, setBindIndex] = React.useState(defaultIndex);\nconst changeTab = (newIndex) =&#x26;gt; {\nif (typeof onItemClick === &#x26;quot;function&#x26;quot;) onItemClick(itemIndex);\nsetBindIndex(newIndex);\n};\nconst items = children.filter((item) =&#x26;gt; item.type.name === &#x26;quot;TabItem&#x26;quot;);\n\nreturn (\n&#x26;lt;div className=&#x26;quot;wrapper&#x26;quot;&#x26;gt;\n&#x26;lt;div className=&#x26;quot;tab-menu&#x26;quot;&#x26;gt;\n{items.map(({ props: { index, label } }) =&#x26;gt; (\n&#x26;lt;button\nkey={`tab-btn-${index}`}\nonClick={() =&#x26;gt; changeTab(index)}\nclassName={bindIndex === index ? &#x26;quot;focus&#x26;quot; : &#x26;quot;&#x26;quot;}\n&#x26;gt;\n{label}\n&#x26;lt;/button&#x26;gt;\n))}\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;div className=&#x26;quot;tab-view&#x26;quot;&#x26;gt;\n{items.map(({ props }) =&#x26;gt; (\n&#x26;lt;div\n{...props}\nclassName={`tab-content ${ bindIndex === props.index ? &#x26;quot;selected&#x26;quot; : &#x26;quot;&#x26;quot; }`}\nkey={`tab-content-${props.index}`}\n/&#x26;gt;\n))}\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;Tabs defaultIndex=&#x26;quot;1&#x26;quot; onTabClick={console.log}&#x26;gt;\n    &#x26;lt;TabItem label=&#x26;quot;A&#x26;quot; index=&#x26;quot;1&#x26;quot;&#x26;gt;\n      Lorem ipsum\n    &#x26;lt;/TabItem&#x26;gt;\n    &#x26;lt;TabItem label=&#x26;quot;B&#x26;quot; index=&#x26;quot;2&#x26;quot;&#x26;gt;\n      Dolor sit amet\n    &#x26;lt;/TabItem&#x26;gt;\n  &#x26;lt;/Tabs&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a tag input field.</p>\n<ul>\n<li>Define a <code>TagInput</code> component and use the <code>useState()</code> hook to initialize an array from <code>tags</code>.</li>\n<li>Use <code>Array.prototype.map()</code> on the collected nodes to render the list of tags.</li>\n<li>Define the <code>addTagData</code> method, which will be executed when pressing the <code>Enter</code> key.</li>\n<li>The <code>addTagData</code> method calls <code>setTagData</code> to add the new tag using the spread (<code>...</code>) operator to prepend the existing tags and add the new tag at the end of the <code>tagData</code> array.</li>\n<li>Define the <code>removeTagData</code> method, which will be executed on clicking the delete icon in the tag.</li>\n<li>Use <code>Array.prototype.filter()</code> in the <code>removeTagData</code> method to remove the tag using its <code>index</code> to filter it out from the <code>tagData</code> array.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb59\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb59-1\" title=\"1\"><span class=\"fu\">.tag-input</span> {</a>\n<a class=\"sourceLine\" id=\"cb59-2\" title=\"2\">  <span class=\"kw\">display</span>: flex<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-3\" title=\"3\">  <span class=\"kw\">flex-wrap</span>: wrap<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-4\" title=\"4\">  <span class=\"kw\">min-height</span>: <span class=\"dv\">48</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-5\" title=\"5\">  <span class=\"kw\">padding</span>: <span class=\"dv\">0</span> <span class=\"dv\">8</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-6\" title=\"6\">  <span class=\"kw\">border</span>: <span class=\"dv\">1</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">#d6d8da</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-7\" title=\"7\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">6</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-8\" title=\"8\">}</a>\n<a class=\"sourceLine\" id=\"cb59-9\" title=\"9\"></a>\n<a class=\"sourceLine\" id=\"cb59-10\" title=\"10\"><span class=\"fu\">.tag-input</span> input {</a>\n<a class=\"sourceLine\" id=\"cb59-11\" title=\"11\">  <span class=\"kw\">flex</span>: <span class=\"dv\">1</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-12\" title=\"12\">  <span class=\"kw\">border</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-13\" title=\"13\">  <span class=\"kw\">height</span>: <span class=\"dv\">46</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-14\" title=\"14\">  <span class=\"kw\">font-size</span>: <span class=\"dv\">14</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-15\" title=\"15\">  <span class=\"kw\">padding</span>: <span class=\"dv\">4</span><span class=\"dt\">px</span> <span class=\"dv\">0</span> <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-16\" title=\"16\">}</a>\n<a class=\"sourceLine\" id=\"cb59-17\" title=\"17\"></a>\n<a class=\"sourceLine\" id=\"cb59-18\" title=\"18\"><span class=\"fu\">.tag-input</span> input<span class=\"in\">:focus</span> {</a>\n<a class=\"sourceLine\" id=\"cb59-19\" title=\"19\">  <span class=\"kw\">outline</span>: <span class=\"dv\">transparent</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-20\" title=\"20\">}</a>\n<a class=\"sourceLine\" id=\"cb59-21\" title=\"21\"></a>\n<a class=\"sourceLine\" id=\"cb59-22\" title=\"22\"><span class=\"fu\">.tags</span> {</a>\n<a class=\"sourceLine\" id=\"cb59-23\" title=\"23\">  <span class=\"kw\">display</span>: flex<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-24\" title=\"24\">  <span class=\"kw\">flex-wrap</span>: wrap<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-25\" title=\"25\">  <span class=\"kw\">padding</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-26\" title=\"26\">  <span class=\"kw\">margin</span>: <span class=\"dv\">8</span><span class=\"dt\">px</span> <span class=\"dv\">0</span> <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-27\" title=\"27\">}</a>\n<a class=\"sourceLine\" id=\"cb59-28\" title=\"28\"></a>\n<a class=\"sourceLine\" id=\"cb59-29\" title=\"29\"><span class=\"fu\">.tag</span> {</a>\n<a class=\"sourceLine\" id=\"cb59-30\" title=\"30\">  <span class=\"kw\">width</span>: <span class=\"bu\">auto</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-31\" title=\"31\">  <span class=\"kw\">height</span>: <span class=\"dv\">32</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-32\" title=\"32\">  <span class=\"kw\">display</span>: flex<span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-33\" title=\"33\">  <span class=\"kw\">align-items</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-34\" title=\"34\">  <span class=\"kw\">justify-content</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-35\" title=\"35\">  <span class=\"kw\">color</span>: <span class=\"cn\">#fff</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-36\" title=\"36\">  <span class=\"kw\">padding</span>: <span class=\"dv\">0</span> <span class=\"dv\">8</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-37\" title=\"37\">  <span class=\"kw\">font-size</span>: <span class=\"dv\">14</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-38\" title=\"38\">  <span class=\"kw\">list-style</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-39\" title=\"39\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">6</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-40\" title=\"40\">  <span class=\"kw\">margin</span>: <span class=\"dv\">0</span> <span class=\"dv\">8</span><span class=\"dt\">px</span> <span class=\"dv\">8</span><span class=\"dt\">px</span> <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-41\" title=\"41\">  <span class=\"kw\">background</span>: <span class=\"cn\">#0052cc</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-42\" title=\"42\">}</a>\n<a class=\"sourceLine\" id=\"cb59-43\" title=\"43\"></a>\n<a class=\"sourceLine\" id=\"cb59-44\" title=\"44\"><span class=\"fu\">.tag-title</span> {</a>\n<a class=\"sourceLine\" id=\"cb59-45\" title=\"45\">  <span class=\"kw\">margin-top</span>: <span class=\"dv\">3</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-46\" title=\"46\">}</a>\n<a class=\"sourceLine\" id=\"cb59-47\" title=\"47\"></a>\n<a class=\"sourceLine\" id=\"cb59-48\" title=\"48\"><span class=\"fu\">.tag-close-icon</span> {</a>\n<a class=\"sourceLine\" id=\"cb59-49\" title=\"49\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-50\" title=\"50\">  <span class=\"kw\">width</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-51\" title=\"51\">  <span class=\"kw\">height</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-52\" title=\"52\">  <span class=\"kw\">line-height</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-53\" title=\"53\">  <span class=\"kw\">text-align</span>: <span class=\"dv\">center</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-54\" title=\"54\">  <span class=\"kw\">font-size</span>: <span class=\"dv\">14</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-55\" title=\"55\">  <span class=\"kw\">margin-left</span>: <span class=\"dv\">8</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-56\" title=\"56\">  <span class=\"kw\">color</span>: <span class=\"cn\">#0052cc</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-57\" title=\"57\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">50</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-58\" title=\"58\">  <span class=\"kw\">background</span>: <span class=\"cn\">#fff</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-59\" title=\"59\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb59-60\" title=\"60\">}</a>\n</div>\n<pre><code class=\"language-js\">const TagInput = ({ tags }) =&#x26;gt; {\n  const [tagData, setTagData] = React.useState(tags);\n  const removeTagData = (indexToRemove) =&#x26;gt; {\n    setTagData([...tagData.filter((_, index) =&#x26;gt; index !== indexToRemove)]);\n  };\n  const addTagData = (event) =&#x26;gt; {\n    if (event.target.value !== &#x26;quot;&#x26;quot;) {\n      setTagData([...tagData, event.target.value]);\n      event.target.value = &#x26;quot;&#x26;quot;;\n    }\n  };\n  return (\n    &#x26;lt;div className=&#x26;quot;tag-input&#x26;quot;&#x26;gt;\n      &#x26;lt;ul className=&#x26;quot;tags&#x26;quot;&#x26;gt;\n        {tagData.map((tag, index) =&#x26;gt; (\n          &#x26;lt;li key={index} className=&#x26;quot;tag&#x26;quot;&#x26;gt;\n            &#x26;lt;span className=&#x26;quot;tag-title&#x26;quot;&#x26;gt;{tag}&#x26;lt;/span&#x26;gt;\n            &#x26;lt;span\n              className=&#x26;quot;tag-close-icon&#x26;quot;\n              onClick={() =&#x26;gt; removeTagData(index)}\n            &#x26;gt;\n              x\n            &#x26;lt;/span&#x26;gt;\n          &#x26;lt;/li&#x26;gt;\n        ))}\n      &#x26;lt;/ul&#x26;gt;\n      &#x26;lt;input\n        type=&#x26;quot;text&#x26;quot;\n        onKeyUp={(event) =&#x26;gt; (event.key === &#x26;quot;Enter&#x26;quot; ? addTagData(event) : null)}\n        placeholder=&#x26;quot;Press enter to add a tag&#x26;quot;\n      /&#x26;gt;\n    &#x26;lt;/div&#x26;gt;\n  );\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;TagInput tags={[&#x26;quot;Nodejs&#x26;quot;, &#x26;quot;MongoDB&#x26;quot;]} /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders an uncontrolled <code>&lt;textarea&gt;</code> element that uses a callback function to pass its value to the parent component.</p>\n<ul>\n<li>Use the <code>defaultValue</code> passed down from the parent as the uncontrolled input field's initial value.</li>\n<li>Use the <code>onChange</code> event to fire the <code>onValueChange</code> callback and send the new value to the parent.</li>\n</ul>\n<pre><code class=\"language-js\">const TextArea = ({\n  cols = 20,\n  rows = 2,\n  defaultValue,\n  onValueChange,\n  ...rest\n}) =&#x26;gt; {\n  return (\n    &#x26;lt;textarea\n      cols={cols}\n      rows={rows}\n      defaultValue={defaultValue}\n      onChange={({ target: { value } }) =&#x26;gt; onValueChange(value)}\n      {...rest}\n    /&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;TextArea\n    placeholder=&#x26;quot;Insert some text here...&#x26;quot;\n    onValueChange={(val) =&#x26;gt; console.log(val)}\n  /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a toggle component.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to initialize the <code>isToggleOn</code> state variable to <code>defaultToggled</code>.</li>\n<li>Render an <code>&lt;input&gt;</code> and bind its <code>onClick</code> event to update the <code>isToggledOn</code> state variable, applying the appropriate <code>className</code> to the wrapping <code>&lt;label&gt;</code>.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb64\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb64-1\" title=\"1\"><span class=\"fu\">.toggle</span> input<span class=\"ex\">[type</span><span class=\"op\">=</span><span class=\"st\">&quot;checkbox&quot;</span><span class=\"ex\">]</span> {</a>\n<a class=\"sourceLine\" id=\"cb64-2\" title=\"2\">  <span class=\"kw\">display</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb64-3\" title=\"3\">}</a>\n<a class=\"sourceLine\" id=\"cb64-4\" title=\"4\"></a>\n<a class=\"sourceLine\" id=\"cb64-5\" title=\"5\"><span class=\"fu\">.toggle.on</span> {</a>\n<a class=\"sourceLine\" id=\"cb64-6\" title=\"6\">  <span class=\"kw\">background-color</span>: <span class=\"cn\">green</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb64-7\" title=\"7\">}</a>\n<a class=\"sourceLine\" id=\"cb64-8\" title=\"8\"></a>\n<a class=\"sourceLine\" id=\"cb64-9\" title=\"9\"><span class=\"fu\">.toggle.off</span> {</a>\n<a class=\"sourceLine\" id=\"cb64-10\" title=\"10\">  <span class=\"kw\">background-color</span>: <span class=\"cn\">red</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb64-11\" title=\"11\">}</a>\n</div>\n<pre><code class=\"language-js\">const Toggle = ({ defaultToggled = false }) =&#x26;gt; {\n  const [isToggleOn, setIsToggleOn] = React.useState(defaultToggled);\n\nreturn (\n&#x26;lt;label className={isToggleOn ? &#x26;quot;toggle on&#x26;quot; : &#x26;quot;toggle off&#x26;quot;}&#x26;gt;\n&#x26;lt;input\ntype=&#x26;quot;checkbox&#x26;quot;\nchecked={isToggleOn}\nonChange={() =&#x26;gt; setIsToggleOn(!isToggleOn)}\n/&#x26;gt;\n{isToggleOn ? &#x26;quot;ON&#x26;quot; : &#x26;quot;OFF&#x26;quot;}\n&#x26;lt;/label&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(&#x26;lt;Toggle /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Renders a tooltip component.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>show</code> variable and initialize it to <code>false</code>.</li>\n<li>Render a container element that contains the tooltip element and the <code>children</code> passed to the component.</li>\n<li>Handle the <code>onMouseEnter</code> and <code>onMouseLeave</code> methods, by altering the value of the <code>show</code> variable, toggling the <code>className</code> of the tooltip.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb67\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb67-1\" title=\"1\"><span class=\"fu\">.tooltip-container</span> {</a>\n<a class=\"sourceLine\" id=\"cb67-2\" title=\"2\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-3\" title=\"3\">}</a>\n<a class=\"sourceLine\" id=\"cb67-4\" title=\"4\"></a>\n<a class=\"sourceLine\" id=\"cb67-5\" title=\"5\"><span class=\"fu\">.tooltip-box</span> {</a>\n<a class=\"sourceLine\" id=\"cb67-6\" title=\"6\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-7\" title=\"7\">  <span class=\"kw\">background</span>: <span class=\"fu\">rgba(</span><span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0.7</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-8\" title=\"8\">  <span class=\"kw\">color</span>: <span class=\"cn\">#fff</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-9\" title=\"9\">  <span class=\"kw\">padding</span>: <span class=\"dv\">5</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-10\" title=\"10\">  <span class=\"kw\">border-radius</span>: <span class=\"dv\">5</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-11\" title=\"11\">  <span class=\"kw\">top</span>: <span class=\"fu\">calc(</span><span class=\"dv\">100</span><span class=\"dt\">%</span> <span class=\"op\">+</span> <span class=\"dv\">5</span><span class=\"dt\">px</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-12\" title=\"12\">  <span class=\"kw\">display</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-13\" title=\"13\">}</a>\n<a class=\"sourceLine\" id=\"cb67-14\" title=\"14\"></a>\n<a class=\"sourceLine\" id=\"cb67-15\" title=\"15\"><span class=\"fu\">.tooltip-box.visible</span> {</a>\n<a class=\"sourceLine\" id=\"cb67-16\" title=\"16\">  <span class=\"kw\">display</span>: <span class=\"dv\">block</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-17\" title=\"17\">}</a>\n<a class=\"sourceLine\" id=\"cb67-18\" title=\"18\"></a>\n<a class=\"sourceLine\" id=\"cb67-19\" title=\"19\"><span class=\"fu\">.tooltip-arrow</span> {</a>\n<a class=\"sourceLine\" id=\"cb67-20\" title=\"20\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-21\" title=\"21\">  <span class=\"kw\">top</span>: <span class=\"dv\">-10</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-22\" title=\"22\">  <span class=\"kw\">left</span>: <span class=\"dv\">50</span><span class=\"dt\">%</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-23\" title=\"23\">  <span class=\"kw\">border-width</span>: <span class=\"dv\">5</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-24\" title=\"24\">  <span class=\"kw\">border-style</span>: <span class=\"dv\">solid</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-25\" title=\"25\">  <span class=\"kw\">border-color</span>: <span class=\"dv\">transparent</span> <span class=\"dv\">transparent</span> <span class=\"fu\">rgba(</span><span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0</span><span class=\"op\">,</span> <span class=\"dv\">0.7</span><span class=\"fu\">)</span> <span class=\"dv\">transparent</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb67-26\" title=\"26\">}</a>\n</div>\n<pre><code class=\"language-js\">const Tooltip = ({ children, text, ...rest }) =&#x26;gt; {\n  const [show, setShow] = React.useState(false);\n\nreturn (\n&#x26;lt;div className=&#x26;quot;tooltip-container&#x26;quot;&#x26;gt;\n&#x26;lt;div className={show ? &#x26;quot;tooltip-box visible&#x26;quot; : &#x26;quot;tooltip-box&#x26;quot;}&#x26;gt;\n{text}\n&#x26;lt;span className=&#x26;quot;tooltip-arrow&#x26;quot; /&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;div\nonMouseEnter={() =&#x26;gt; setShow(true)}\nonMouseLeave={() =&#x26;gt; setShow(false)}\n{...rest}\n&#x26;gt;\n{children}\n&#x26;lt;/div&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nReactDOM.render(\n  &#x26;lt;Tooltip text=&#x26;quot;Simple tooltip&#x26;quot;&#x26;gt;\n    &#x26;lt;button&#x26;gt;Hover me!&#x26;lt;/button&#x26;gt;\n  &#x26;lt;/Tooltip&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders a tree view of a JSON object or array with collapsible content.</p>\n<ul>\n<li>Use the value of the <code>toggled</code> prop to determine the initial state of the content (collapsed/expanded).</li>\n<li>Use the <code>useState()</code> hook to create the <code>isToggled</code> state variable and give it the value of the <code>toggled</code> prop initially.</li>\n<li>Render a <code>&lt;span&gt;</code> element and bind its <code>onClick</code> event to alter the component's <code>isToggled</code> state.</li>\n<li>Determine the appearance of the component, based on <code>isParentToggled</code>, <code>isToggled</code>, <code>name</code> and checking for <code>Array.isArray()</code> on <code>data</code>.</li>\n<li>For each child in <code>data</code>, determine if it is an object or array and recursively render a sub-tree or a text element with the appropriate style.</li>\n</ul>\n<div class=\"sourceCode\" id=\"cb70\"><pre class=\"sourceCode css\"><code class=\"sourceCode css\"><a class=\"sourceLine\" id=\"cb70-1\" title=\"1\"><span class=\"fu\">.tree-element</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-2\" title=\"2\">  <span class=\"kw\">margin</span>: <span class=\"dv\">0</span> <span class=\"dv\">0</span> <span class=\"dv\">0</span> <span class=\"dv\">4</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-3\" title=\"3\">  <span class=\"kw\">position</span>: <span class=\"dv\">relative</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-4\" title=\"4\">}</a>\n<a class=\"sourceLine\" id=\"cb70-5\" title=\"5\"></a>\n<a class=\"sourceLine\" id=\"cb70-6\" title=\"6\"><span class=\"fu\">.tree-element.is-child</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-7\" title=\"7\">  <span class=\"kw\">margin-left</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-8\" title=\"8\">}</a>\n<a class=\"sourceLine\" id=\"cb70-9\" title=\"9\"></a>\n<a class=\"sourceLine\" id=\"cb70-10\" title=\"10\">div<span class=\"fu\">.tree-element</span><span class=\"in\">:before</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-11\" title=\"11\">  <span class=\"kw\">content</span>: <span class=\"st\">&quot;&quot;</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-12\" title=\"12\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-13\" title=\"13\">  <span class=\"kw\">top</span>: <span class=\"dv\">24</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-14\" title=\"14\">  <span class=\"kw\">left</span>: <span class=\"dv\">1</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-15\" title=\"15\">  <span class=\"kw\">height</span>: <span class=\"fu\">calc(</span><span class=\"dv\">100</span><span class=\"dt\">%</span> <span class=\"op\">-</span> <span class=\"dv\">48</span><span class=\"dt\">px</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-16\" title=\"16\">  <span class=\"kw\">border-left</span>: <span class=\"dv\">1</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">gray</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-17\" title=\"17\">}</a>\n<a class=\"sourceLine\" id=\"cb70-18\" title=\"18\"></a>\n<a class=\"sourceLine\" id=\"cb70-19\" title=\"19\">p<span class=\"fu\">.tree-element</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-20\" title=\"20\">  <span class=\"kw\">margin-left</span>: <span class=\"dv\">16</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-21\" title=\"21\">}</a>\n<a class=\"sourceLine\" id=\"cb70-22\" title=\"22\"></a>\n<a class=\"sourceLine\" id=\"cb70-23\" title=\"23\"><span class=\"fu\">.toggler</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-24\" title=\"24\">  <span class=\"kw\">position</span>: <span class=\"dv\">absolute</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-25\" title=\"25\">  <span class=\"kw\">top</span>: <span class=\"dv\">10</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-26\" title=\"26\">  <span class=\"kw\">left</span>: <span class=\"dv\">0</span><span class=\"dt\">px</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-27\" title=\"27\">  <span class=\"kw\">width</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-28\" title=\"28\">  <span class=\"kw\">height</span>: <span class=\"dv\">0</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-29\" title=\"29\">  <span class=\"kw\">border-top</span>: <span class=\"dv\">4</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"dv\">transparent</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-30\" title=\"30\">  <span class=\"kw\">border-bottom</span>: <span class=\"dv\">4</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"dv\">transparent</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-31\" title=\"31\">  <span class=\"kw\">border-left</span>: <span class=\"dv\">5</span><span class=\"dt\">px</span> <span class=\"dv\">solid</span> <span class=\"cn\">gray</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-32\" title=\"32\">  <span class=\"kw\">cursor</span>: <span class=\"dv\">pointer</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-33\" title=\"33\">}</a>\n<a class=\"sourceLine\" id=\"cb70-34\" title=\"34\"></a>\n<a class=\"sourceLine\" id=\"cb70-35\" title=\"35\"><span class=\"fu\">.toggler.closed</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-36\" title=\"36\">  <span class=\"kw\">transform</span>: <span class=\"fu\">rotate(</span><span class=\"dv\">90</span><span class=\"dt\">deg</span><span class=\"fu\">)</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-37\" title=\"37\">}</a>\n<a class=\"sourceLine\" id=\"cb70-38\" title=\"38\"></a>\n<a class=\"sourceLine\" id=\"cb70-39\" title=\"39\"><span class=\"fu\">.collapsed</span> {</a>\n<a class=\"sourceLine\" id=\"cb70-40\" title=\"40\">  <span class=\"kw\">display</span>: <span class=\"dv\">none</span><span class=\"op\">;</span></a>\n<a class=\"sourceLine\" id=\"cb70-41\" title=\"41\">}</a>\n</div>\n<pre><code class=\"language-js\">const TreeView = ({\n  data,\n  toggled = true,\n  name = null,\n  isLast = true,\n  isChildElement = false,\n  isParentToggled = true,\n}) =&#x26;gt; {\n  const [isToggled, setIsToggled] = React.useState(toggled);\n  const isDataArray = Array.isArray(data);\n\nreturn (\n&#x26;lt;div\nclassName={`tree-element ${isParentToggled &#x26;amp;&#x26;amp; &#x26;quot;collapsed&#x26;quot;} ${ isChildElement &#x26;amp;&#x26;amp; &#x26;quot;is-child&#x26;quot; }`}\n&#x26;gt;\n&#x26;lt;span\nclassName={isToggled ? &#x26;quot;toggler&#x26;quot; : &#x26;quot;toggler closed&#x26;quot;}\nonClick={() =&#x26;gt; setIsToggled(!isToggled)}\n/&#x26;gt;\n{name ? &#x26;lt;strong&#x26;gt;&#x26;amp;nbsp;&#x26;amp;nbsp;{name}: &#x26;lt;/strong&#x26;gt; : &#x26;lt;span&#x26;gt;&#x26;amp;nbsp;&#x26;amp;nbsp;&#x26;lt;/span&#x26;gt;}\n{isDataArray ? &#x26;quot;[&#x26;quot; : &#x26;quot;{&#x26;quot;}\n{!isToggled &#x26;amp;&#x26;amp; &#x26;quot;...&#x26;quot;}\n{Object.keys(data).map((v, i, a) =&#x26;gt;\ntypeof data[v] === &#x26;quot;object&#x26;quot; ? (\n&#x26;lt;TreeView\nkey={`${name}-${v}-${i}`}\ndata={data[v]}\nisLast={i === a.length - 1}\nname={isDataArray ? null : v}\nisChildElement\nisParentToggled={isParentToggled &#x26;amp;&#x26;amp; isToggled}\n/&#x26;gt;\n) : (\n&#x26;lt;p\nkey={`${name}-${v}-${i}`}\nclassName={isToggled ? &#x26;quot;tree-element&#x26;quot; : &#x26;quot;tree-element collapsed&#x26;quot;}\n&#x26;gt;\n{isDataArray ? &#x26;quot;&#x26;quot; : &#x26;lt;strong&#x26;gt;{v}: &#x26;lt;/strong&#x26;gt;}\n{data[v]}\n{i === a.length - 1 ? &#x26;quot;&#x26;quot; : &#x26;quot;,&#x26;quot;}\n&#x26;lt;/p&#x26;gt;\n)\n)}\n{isDataArray ? &#x26;quot;]&#x26;quot; : &#x26;quot;}&#x26;quot;}\n{!isLast ? &#x26;quot;,&#x26;quot; : &#x26;quot;&#x26;quot;}\n&#x26;lt;/div&#x26;gt;\n);\n};\n\n\n\n&#x3C;hr />\n\n```js\n\nconst data = {\n  lorem: {\n    ipsum: &#x26;quot;dolor sit&#x26;quot;,\n    amet: {\n      consectetur: &#x26;quot;adipiscing&#x26;quot;,\n      elit: [\n        &#x26;quot;duis&#x26;quot;,\n        &#x26;quot;vitae&#x26;quot;,\n        {\n          semper: &#x26;quot;orci&#x26;quot;,\n        },\n        {\n          est: &#x26;quot;sed ornare&#x26;quot;,\n        },\n        &#x26;quot;etiam&#x26;quot;,\n        [&#x26;quot;laoreet&#x26;quot;, &#x26;quot;tincidunt&#x26;quot;],\n        [&#x26;quot;vestibulum&#x26;quot;, &#x26;quot;ante&#x26;quot;],\n      ],\n    },\n    ipsum: &#x26;quot;primis&#x26;quot;,\n  },\n};\nReactDOM.render(\n  &#x26;lt;TreeView data={data} name=&#x26;quot;data&#x26;quot; /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Renders an uncontrolled <code>&lt;input&gt;</code> element that uses a callback function to inform its parent about value updates.</p>\n<ul>\n<li>Use the <code>defaultValue</code> passed down from the parent as the uncontrolled input field's initial value.</li>\n<li>Use the <code>onChange</code> event to fire the <code>onValueChange</code> callback and send the new value to the parent.</li>\n</ul>\n<pre><code class=\"language-js\">const UncontrolledInput = ({ defaultValue, onValueChange, ...rest }) =&#x26;gt; {\n  return (\n    &#x26;lt;input\n      defaultValue={defaultValue}\n      onChange={({ target: { value } }) =&#x26;gt; onValueChange(value)}\n      {...rest}\n    /&#x26;gt;\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">ReactDOM.render(\n  &#x26;lt;UncontrolledInput\n    type=&#x26;quot;text&#x26;quot;\n    placeholder=&#x26;quot;Insert some text here...&#x26;quot;\n    onValueChange={console.log}\n  /&#x26;gt;,\n  document.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Handles asynchronous calls.</p>\n<ul>\n<li>Create a custom hook that takes a handler function, <code>fn</code>.</li>\n<li>Define a reducer function and an initial state for the custom hook's state.</li>\n<li>Use the <code>useReducer()</code> hook to initialize the <code>state</code> variable and the <code>dispatch</code> function.</li>\n<li>Define an asynchronous <code>run</code> function that will run the provided callback, <code>fn</code>, while using <code>dispatch</code> to update <code>state</code> as necessary.</li>\n<li>Return an object containing the properties of <code>state</code> (<code>value</code>, <code>error</code> and <code>loading</code>) and the <code>run</code> function.</li>\n</ul>\n<pre><code class=\"language-js\">const useAsync = (fn) =&#x26;gt; {\n  const initialState = { loading: false, error: null, value: null };\n  const stateReducer = (_, action) =&#x26;gt; {\n    switch (action.type) {\n      case &#x26;quot;start&#x26;quot;:\n        return { loading: true, error: null, value: null };\n      case &#x26;quot;finish&#x26;quot;:\n        return { loading: false, error: null, value: action.value };\n      case &#x26;quot;error&#x26;quot;:\n        return { loading: false, error: action.error, value: null };\n    }\n  };\n\nconst [state, dispatch] = React.useReducer(stateReducer, initialState);\n\nconst run = async (args = null) =&#x26;gt; {\ntry {\ndispatch({ type: &#x26;quot;start&#x26;quot; });\nconst value = await fn(args);\ndispatch({ type: &#x26;quot;finish&#x26;quot;, value });\n} catch (error) {\ndispatch({ type: &#x26;quot;error&#x26;quot;, error });\n}\n};\n\nreturn { ...state, run };\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const RandomImage = (props) =&#x26;gt; {\n  const imgFetch = useAsync((url) =&#x26;gt;\n    fetch(url).then((response) =&#x26;gt; response.json())\n  );\n\nreturn (\n&#x26;lt;div&#x26;gt;\n&#x26;lt;button\nonClick={() =&#x26;gt; imgFetch.run(&#x26;quot;https://dog.ceo/api/breeds/image/random&#x26;quot;)}\ndisabled={imgFetch.isLoading}\n&#x26;gt;\nLoad image\n&#x26;lt;/button&#x26;gt;\n&#x26;lt;br /&#x26;gt;\n{imgFetch.loading &#x26;amp;&#x26;amp; &#x26;lt;div&#x26;gt;Loading...&#x26;lt;/div&#x26;gt;}\n{imgFetch.error &#x26;amp;&#x26;amp; &#x26;lt;div&#x26;gt;Error {imgFetch.error}&#x26;lt;/div&#x26;gt;}\n{imgFetch.value &#x26;amp;&#x26;amp; (\n&#x26;lt;img\nsrc={imgFetch.value.message}\nalt=&#x26;quot;avatar&#x26;quot;\nwidth={400}\nheight=&#x26;quot;auto&#x26;quot;\n/&#x26;gt;\n)}\n&#x26;lt;/div&#x26;gt;\n);\n};\n\nReactDOM.render(&#x26;lt;RandomImage /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Handles the event of clicking inside the wrapped component.</p>\n<ul>\n<li>Create a custom hook that takes a <code>ref</code> and a <code>callback</code> to handle the <code>'click'</code> event.</li>\n<li>Use the <code>useEffect()</code> hook to append and clean up the <code>click</code> event.</li>\n<li>Use the <code>useRef()</code> hook to create a <code>ref</code> for your click component and pass it to the <code>useClickInside</code> hook.</li>\n</ul>\n<pre><code class=\"language-js\">const useClickInside = (ref, callback) =&#x26;gt; {\n  const handleClick = (e) =&#x26;gt; {\n    if (ref.current &#x26;amp;&#x26;amp; ref.current.contains(e.target)) {\n      callback();\n    }\n  };\n  React.useEffect(() =&#x26;gt; {\n    document.addEventListener(&#x26;quot;click&#x26;quot;, handleClick);\n    return () =&#x26;gt; {\n      document.removeEventListener(&#x26;quot;click&#x26;quot;, handleClick);\n    };\n  });\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const ClickBox = ({ onClickInside }) =&#x26;gt; {\n  const clickRef = React.useRef();\n  useClickInside(clickRef, onClickInside);\n  return (\n    &#x26;lt;div\n      className=&#x26;quot;click-box&#x26;quot;\n      ref={clickRef}\n      style={{\n        border: &#x26;quot;2px dashed orangered&#x26;quot;,\n        height: 200,\n        width: 400,\n        display: &#x26;quot;flex&#x26;quot;,\n        justifyContent: &#x26;quot;center&#x26;quot;,\n        alignItems: &#x26;quot;center&#x26;quot;,\n      }}\n    &#x26;gt;\n      &#x26;lt;p&#x26;gt;Click inside this element&#x26;lt;/p&#x26;gt;\n    &#x26;lt;/div&#x26;gt;\n  );\n};\n\nReactDOM.render(\n&#x26;lt;ClickBox onClickInside={() =&#x26;gt; alert(&#x26;quot;click inside&#x26;quot;)} /&#x26;gt;,\ndocument.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Handles the event of clicking outside of the wrapped component.</p>\n<ul>\n<li>Create a custom hook that takes a <code>ref</code> and a <code>callback</code> to handle the <code>click</code> event.</li>\n<li>Use the <code>useEffect()</code> hook to append and clean up the <code>click</code> event.</li>\n<li>Use the <code>useRef()</code> hook to create a <code>ref</code> for your click component and pass it to the <code>useClickOutside</code> hook.</li>\n</ul>\n<pre><code class=\"language-js\">const useClickOutside = (ref, callback) =&#x26;gt; {\n  const handleClick = (e) =&#x26;gt; {\n    if (ref.current &#x26;amp;&#x26;amp; !ref.current.contains(e.target)) {\n      callback();\n    }\n  };\n  React.useEffect(() =&#x26;gt; {\n    document.addEventListener(&#x26;quot;click&#x26;quot;, handleClick);\n    return () =&#x26;gt; {\n      document.removeEventListener(&#x26;quot;click&#x26;quot;, handleClick);\n    };\n  });\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const ClickBox = ({ onClickOutside }) =&#x26;gt; {\n  const clickRef = React.useRef();\n  useClickOutside(clickRef, onClickOutside);\n  return (\n    &#x26;lt;div\n      className=&#x26;quot;click-box&#x26;quot;\n      ref={clickRef}\n      style={{\n        border: &#x26;quot;2px dashed orangered&#x26;quot;,\n        height: 200,\n        width: 400,\n        display: &#x26;quot;flex&#x26;quot;,\n        justifyContent: &#x26;quot;center&#x26;quot;,\n        alignItems: &#x26;quot;center&#x26;quot;,\n      }}\n    &#x26;gt;\n      &#x26;lt;p&#x26;gt;Click out of this element&#x26;lt;/p&#x26;gt;\n    &#x26;lt;/div&#x26;gt;\n  );\n};\n\nReactDOM.render(\n&#x26;lt;ClickBox onClickOutside={() =&#x26;gt; alert(&#x26;quot;click outside&#x26;quot;)} /&#x26;gt;,\ndocument.getElementById(&#x26;quot;root&#x26;quot;)\n);\n</code></pre>\n<hr />\n<p>Executes a callback immediately after a component is mounted.</p>\n<ul>\n<li>Use <code>useEffect()</code> with an empty array as the second argument to execute the provided callback only once when the component is mounted.</li>\n<li>Behaves like the <code>componentDidMount()</code> lifecycle method of class components.</li>\n</ul>\n<pre><code class=\"language-js\">const useComponentDidMount = (onMountHandler) =&#x26;gt; {\n  React.useEffect(() =&#x26;gt; {\n    onMountHandler();\n  }, []);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Mounter = () =&#x26;gt; {\n  useComponentDidMount(() =&#x26;gt; console.log(&#x26;quot;Component did mount&#x26;quot;));\n\nreturn &#x26;lt;div&#x26;gt;Check the console!&#x26;lt;/div&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;Mounter /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Executes a callback immediately before a component is unmounted and destroyed.</p>\n<ul>\n<li>Use <code>useEffect()</code> with an empty array as the second argument and return the provided callback to be executed only once before cleanup.</li>\n<li>Behaves like the <code>componentWillUnmount()</code> lifecycle method of class components.</li>\n</ul>\n<pre><code class=\"language-js\">const useComponentWillUnmount = (onUnmountHandler) =&#x26;gt; {\n  React.useEffect(\n    () =&#x26;gt; () =&#x26;gt; {\n      onUnmountHandler();\n    },\n    []\n  );\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Unmounter = () =&#x26;gt; {\n  useComponentWillUnmount(() =&#x26;gt; console.log(&#x26;quot;Component will unmount&#x26;quot;));\n\nreturn &#x26;lt;div&#x26;gt;Check the console!&#x26;lt;/div&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;Unmounter /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Copies the given text to the clipboard.</p>\n<ul>\n<li>Use the <a href=\"/js/s/copy-to-clipboard/\">copyToClipboard</a> snippet to copy the text to clipboard.</li>\n<li>Use the <code>useState()</code> hook to initialize the <code>copied</code> variable.</li>\n<li>Use the <code>useCallback()</code> hook to create a callback for the <code>copyToClipboard</code> method.</li>\n<li>Use the <code>useEffect()</code> hook to reset the <code>copied</code> state variable if the <code>text</code> changes.</li>\n<li>Return the <code>copied</code> state variable and the <code>copy</code> callback.</li>\n</ul>\n<pre><code class=\"language-js\">const useCopyToClipboard = (text) =&#x26;gt; {\n  const copyToClipboard = (str) =&#x26;gt; {\n    const el = document.createElement(&#x26;quot;textarea&#x26;quot;);\n    el.value = str;\n    el.setAttribute(&#x26;quot;readonly&#x26;quot;, &#x26;quot;&#x26;quot;);\n    el.style.position = &#x26;quot;absolute&#x26;quot;;\n    el.style.left = &#x26;quot;-9999px&#x26;quot;;\n    document.body.appendChild(el);\n    const selected =\n      document.getSelection().rangeCount &#x26;gt; 0\n        ? document.getSelection().getRangeAt(0)\n        : false;\n    el.select();\n    const success = document.execCommand(&#x26;quot;copy&#x26;quot;);\n    document.body.removeChild(el);\n    if (selected) {\n      document.getSelection().removeAllRanges();\n      document.getSelection().addRange(selected);\n    }\n    return success;\n  };\n\nconst [copied, setCopied] = React.useState(false);\n\nconst copy = React.useCallback(() =&#x26;gt; {\nif (!copied) setCopied(copyToClipboard(text));\n}, [text]);\nReact.useEffect(() =&#x26;gt; () =&#x26;gt; setCopied(false), [text]);\n\nreturn [copied, copy];\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const TextCopy = (props) =&#x26;gt; {\n  const [copied, copy] = useCopyToClipboard(&#x26;quot;Lorem ipsum&#x26;quot;);\n  return (\n    &#x26;lt;div&#x26;gt;\n      &#x26;lt;button onClick={copy}&#x26;gt;Click to copy&#x26;lt;/button&#x26;gt;\n      &#x26;lt;span&#x26;gt;{copied &#x26;amp;&#x26;amp; &#x26;quot;Copied!&#x26;quot;}&#x26;lt;/span&#x26;gt;\n    &#x26;lt;/div&#x26;gt;\n  );\n};\n\nReactDOM.render(&#x26;lt;TextCopy /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Debounces the given value.</p>\n<ul>\n<li>Create a custom hook that takes a <code>value</code> and a <code>delay</code>.</li>\n<li>Use the <code>useState()</code> hook to store the debounced value.</li>\n<li>Use the <code>useEffect()</code> hook to update the debounced value every time <code>value</code> is updated.</li>\n<li>Use <code>setTimeout()</code> to create a timeout that delays invoking the setter of the previous state variable by <code>delay</code> ms.</li>\n<li>Use <code>clearTimeout()</code> to clean up when dismounting the component.</li>\n<li>This is particularly useful when dealing with user input.</li>\n</ul>\n<pre><code class=\"language-js\">const useDebounce = (value, delay) =&#x26;gt; {\n  const [debouncedValue, setDebouncedValue] = React.useState(value);\n\nReact.useEffect(() =&#x26;gt; {\nconst handler = setTimeout(() =&#x26;gt; {\nsetDebouncedValue(value);\n}, delay);\n\n    return () =&#x26;gt; {\n      clearTimeout(handler);\n    };\n\n}, [value]);\n\nreturn debouncedValue;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Counter = () =&#x26;gt; {\n  const [value, setValue] = React.useState(0);\n  const lastValue = useDebounce(value, 500);\n\nreturn (\n&#x26;lt;div&#x26;gt;\n&#x26;lt;p&#x26;gt;\nCurrent: {value} - Debounced: {lastValue}\n&#x26;lt;/p&#x26;gt;\n&#x26;lt;button onClick={() =&#x26;gt; setValue(value + 1)}&#x26;gt;Increment&#x26;lt;/button&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n);\n};\n\nReactDOM.render(&#x26;lt;Counter /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Implements <code>fetch</code> in a declarative manner.</p>\n<ul>\n<li>Create a custom hook that takes a <code>url</code> and <code>options</code>.</li>\n<li>Use the <code>useState()</code> hook to initialize the <code>response</code> and <code>error</code> state variables.</li>\n<li>Use the <code>useEffect()</code> hook to asynchronously call <code>fetch()</code> and update the state variables accordingly.</li>\n<li>Return an object containing the <code>response</code> and <code>error</code> state variables.</li>\n</ul>\n<pre><code class=\"language-js\">const useFetch = (url, options) =&#x26;gt; {\n  const [response, setResponse] = React.useState(null);\n  const [error, setError] = React.useState(null);\n\nReact.useEffect(() =&#x26;gt; {\nconst fetchData = async () =&#x26;gt; {\ntry {\nconst res = await fetch(url, options);\nconst json = await res.json();\nsetResponse(json);\n} catch (error) {\nsetError(error);\n}\n};\nfetchData();\n}, []);\n\nreturn { response, error };\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const ImageFetch = (props) =&#x26;gt; {\n  const res = useFetch(&#x26;quot;https://dog.ceo/api/breeds/image/random&#x26;quot;, {});\n  if (!res.response) {\n    return &#x26;lt;div&#x26;gt;Loading...&#x26;lt;/div&#x26;gt;;\n  }\n  const imageUrl = res.response.message;\n  return (\n    &#x26;lt;div&#x26;gt;\n      &#x26;lt;img src={imageUrl} alt=&#x26;quot;avatar&#x26;quot; width={400} height=&#x26;quot;auto&#x26;quot; /&#x26;gt;\n    &#x26;lt;/div&#x26;gt;\n  );\n};\n\nReactDOM.render(&#x26;lt;ImageFetch /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Implements <code>setInterval</code> in a declarative manner.</p>\n<ul>\n<li>Create a custom hook that takes a <code>callback</code> and a <code>delay</code>.</li>\n<li>Use the <code>useRef()</code> hook to create a <code>ref</code> for the callback function.</li>\n<li>Use a <code>useEffect()</code> hook to remember the latest <code>callback</code> whenever it changes.</li>\n<li>Use a <code>useEffect()</code> hook dependent on <code>delay</code> to set up the interval and clean up.</li>\n</ul>\n<pre><code class=\"language-js\">const useInterval = (callback, delay) =&#x26;gt; {\n  const savedCallback = React.useRef();\n\nReact.useEffect(() =&#x26;gt; {\nsavedCallback.current = callback;\n}, [callback]);\n\nReact.useEffect(() =&#x26;gt; {\nfunction tick() {\nsavedCallback.current();\n}\nif (delay !== null) {\nlet id = setInterval(tick, delay);\nreturn () =&#x26;gt; clearInterval(id);\n}\n}, [delay]);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Timer = (props) =&#x26;gt; {\n  const [seconds, setSeconds] = React.useState(0);\n  useInterval(() =&#x26;gt; {\n    setSeconds(seconds + 1);\n  }, 1000);\n\nreturn &#x26;lt;p&#x26;gt;{seconds}&#x26;lt;/p&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;Timer /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Checks if the current environment matches a given media query and returns the appropriate value.</p>\n<ul>\n<li>Check if <code>window</code> and <code>window.matchMedia</code> exist, return <code>whenFalse</code> if not (e.g. SSR environment or unsupported browser).</li>\n<li>Use <code>window.matchMedia()</code> to match the given <code>query</code>, cast its <code>matches</code> property to a boolean and store in a state variable, <code>match</code>, using the <code>useState()</code> hook.</li>\n<li>Use the <code>useEffect()</code> hook to add a listener for changes and to clean up the listeners after the hook is destroyed.</li>\n<li>Return either <code>whenTrue</code> or <code>whenFalse</code> based on the value of <code>match</code>.</li>\n</ul>\n<pre><code class=\"language-js\">const useMediaQuery = (query, whenTrue, whenFalse) =&#x26;gt; {\n  if (typeof window === &#x26;quot;undefined&#x26;quot; || typeof window.matchMedia === &#x26;quot;undefined&#x26;quot;)\n    return whenFalse;\n\nconst mediaQuery = window.matchMedia(query);\nconst [match, setMatch] = React.useState(!!mediaQuery.matches);\n\nReact.useEffect(() =&#x26;gt; {\nconst handler = () =&#x26;gt; setMatch(!!mediaQuery.matches);\nmediaQuery.addListener(handler);\nreturn () =&#x26;gt; mediaQuery.removeListener(handler);\n}, []);\n\nreturn match ? whenTrue : whenFalse;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const ResponsiveText = () =&#x26;gt; {\n  const text = useMediaQuery(\n    &#x26;quot;(max-width: 400px)&#x26;quot;,\n    &#x26;quot;Less than 400px wide&#x26;quot;,\n    &#x26;quot;More than 400px wide&#x26;quot;\n  );\n\nreturn &#x26;lt;span&#x26;gt;{text}&#x26;lt;/span&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;ResponsiveText /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Checks if the client is online or offline.</p>\n<ul>\n<li>Create a function, <code>getOnLineStatus</code>, that uses the <code>NavigatorOnLine</code> web API to get the online status of the client.</li>\n<li>Use the <code>useState()</code> hook to create an appropriate state variable, <code>status</code>, and setter.</li>\n<li>Use the <code>useEffect()</code> hook to add listeners for appropriate events, updating state, and cleanup those listeners when unmounting.</li>\n<li>Finally return the <code>status</code> state variable.</li>\n</ul>\n<pre><code class=\"language-js\">const getOnLineStatus = () =&#x26;gt;\n  typeof navigator !== &#x26;quot;undefined&#x26;quot; &#x26;amp;&#x26;amp; typeof navigator.onLine === &#x26;quot;boolean&#x26;quot;\n    ? navigator.onLine\n    : true;\n\nconst useNavigatorOnLine = () =&#x26;gt; {\nconst [status, setStatus] = React.useState(getOnLineStatus());\n\nconst setOnline = () =&#x26;gt; setStatus(true);\nconst setOffline = () =&#x26;gt; setStatus(false);\n\nReact.useEffect(() =&#x26;gt; {\nwindow.addEventListener(&#x26;quot;online&#x26;quot;, setOnline);\nwindow.addEventListener(&#x26;quot;offline&#x26;quot;, setOffline);\n\n    return () =&#x26;gt; {\n      window.removeEventListener(&#x26;quot;online&#x26;quot;, setOnline);\n      window.removeEventListener(&#x26;quot;offline&#x26;quot;, setOffline);\n    };\n\n}, []);\n\nreturn status;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const StatusIndicator = () =&#x26;gt; {\n  const isOnline = useNavigatorOnLine();\n\nreturn &#x26;lt;span&#x26;gt;You are {isOnline ? &#x26;quot;online&#x26;quot; : &#x26;quot;offline&#x26;quot;}.&#x26;lt;/span&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;StatusIndicator /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Returns a stateful value, persisted in <code>localStorage</code>, and a function to update it.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to initialize the <code>value</code> to <code>defaultValue</code>.</li>\n<li>Use the <code>useRef()</code> hook to create a ref that will hold the <code>name</code> of the value in <code>localStorage</code>.</li>\n<li>Use 3 instances of the <code>useEffect()</code> hook for initialization, <code>value</code> change and <code>name</code> change respectively.</li>\n<li>When the component is first mounted, use <code>Storage.getItem()</code> to update <code>value</code> if there's a stored value or <code>Storage.setItem()</code> to persist the current value.</li>\n<li>When <code>value</code> is updated, use <code>Storage.setItem()</code> to store the new value.</li>\n<li>When <code>name</code> is updated, use <code>Storage.setItem()</code> to create the new key, update the <code>nameRef</code> and use <code>Storage.removeItem()</code> to remove the previous key from <code>localStorage</code>.</li>\n<li><strong>NOTE:</strong> The hook is meant for use with primitive values (i.e. not objects) and doesn't account for changes to <code>localStorage</code> due to other code. Both of these issues can be easily handled (e.g. JSON serialization and handling the <code>'storage'</code> event).</li>\n</ul>\n<pre><code class=\"language-js\">const usePersistedState = (name, defaultValue) =&#x26;gt; {\n  const [value, setValue] = React.useState(defaultValue);\n  const nameRef = React.useRef(name);\n\nReact.useEffect(() =&#x26;gt; {\ntry {\nconst storedValue = localStorage.getItem(name);\nif (storedValue !== null) setValue(storedValue);\nelse localStorage.setItem(name, defaultValue);\n} catch {\nsetValue(defaultValue);\n}\n}, []);\n\nReact.useEffect(() =&#x26;gt; {\ntry {\nlocalStorage.setItem(nameRef.current, value);\n} catch {}\n}, [value]);\n\nReact.useEffect(() =&#x26;gt; {\nconst lastName = nameRef.current;\nif (name !== lastName) {\ntry {\nlocalStorage.setItem(name, value);\nnameRef.current = name;\nlocalStorage.removeItem(lastName);\n} catch {}\n}\n}, [name]);\n\nreturn [value, setValue];\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const MyComponent = ({ name }) =&#x26;gt; {\n  const [val, setVal] = usePersistedState(name, 10);\n  return (\n    &#x26;lt;input\n      value={val}\n      onChange={(e) =&#x26;gt; {\n        setVal(e.target.value);\n      }}\n    /&#x26;gt;\n  );\n};\n\nconst MyApp = () =&#x26;gt; {\nconst [name, setName] = React.useState(&#x26;quot;my-value&#x26;quot;);\nreturn (\n&#x26;lt;&#x26;gt;\n&#x26;lt;MyComponent name={name} /&#x26;gt;\n&#x26;lt;input\nvalue={name}\nonChange={(e) =&#x26;gt; {\nsetName(e.target.value);\n}}\n/&#x26;gt;\n&#x26;lt;/&#x26;gt;\n);\n};\n\nReactDOM.render(&#x26;lt;MyApp /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Stores the previous state or props.</p>\n<ul>\n<li>Create a custom hook that takes a <code>value</code>.</li>\n<li>Use the <code>useRef()</code> hook to create a <code>ref</code> for the <code>value</code>.</li>\n<li>Use the <code>useEffect()</code> hook to remember the latest <code>value</code>.</li>\n</ul>\n<pre><code class=\"language-js\">const usePrevious = (value) =&#x26;gt; {\n  const ref = React.useRef();\n  React.useEffect(() =&#x26;gt; {\n    ref.current = value;\n  });\n  return ref.current;\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Counter = () =&#x26;gt; {\n  const [value, setValue] = React.useState(0);\n  const lastValue = usePrevious(value);\n\nreturn (\n&#x26;lt;div&#x26;gt;\n&#x26;lt;p&#x26;gt;\nCurrent: {value} - Previous: {lastValue}\n&#x26;lt;/p&#x26;gt;\n&#x26;lt;button onClick={() =&#x26;gt; setValue(value + 1)}&#x26;gt;Increment&#x26;lt;/button&#x26;gt;\n&#x26;lt;/div&#x26;gt;\n);\n};\n\nReactDOM.render(&#x26;lt;Counter /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Checks if the code is running on the browser or the server.</p>\n<ul>\n<li>Create a custom hook that returns an appropriate object.</li>\n<li>Use <code>typeof window</code>, <code>window.document</code> and <code>Document.createElement()</code> to check if the code is running on the browser.</li>\n<li>Use the <code>useState()</code> hook to define the <code>inBrowser</code> state variable.</li>\n<li>Use the <code>useEffect()</code> hook to update the <code>inBrowser</code> state variable and clean up at the end.</li>\n<li>Use the <code>useMemo()</code> hook to memoize the return values of the custom hook.</li>\n</ul>\n<pre><code class=\"language-js\">const isDOMavailable = !!(\n  typeof window !== &#x26;quot;undefined&#x26;quot; &#x26;amp;&#x26;amp;\n  window.document &#x26;amp;&#x26;amp;\n  window.document.createElement\n);\n\nconst useSSR = () =&#x26;gt; {\nconst [inBrowser, setInBrowser] = React.useState(isDOMavailable);\n\nReact.useEffect(() =&#x26;gt; {\nsetInBrowser(isDOMavailable);\nreturn () =&#x26;gt; {\nsetInBrowser(false);\n};\n}, []);\n\nconst useSSRObject = React.useMemo(\n() =&#x26;gt; ({\nisBrowser: inBrowser,\nisServer: !inBrowser,\ncanUseWorkers: typeof Worker !== &#x26;quot;undefined&#x26;quot;,\ncanUseEventListeners: inBrowser &#x26;amp;&#x26;amp; !!window.addEventListener,\ncanUseViewport: inBrowser &#x26;amp;&#x26;amp; !!window.screen,\n}),\n[inBrowser]\n);\n\nreturn React.useMemo(\n() =&#x26;gt; Object.assign(Object.values(useSSRObject), useSSRObject),\n[inBrowser]\n);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const SSRChecker = (props) =&#x26;gt; {\n  let { isBrowser, isServer } = useSSR();\n\nreturn &#x26;lt;p&#x26;gt;{isBrowser ? &#x26;quot;Running on browser&#x26;quot; : &#x26;quot;Running on server&#x26;quot;}&#x26;lt;/p&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;SSRChecker /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Implements <code>setTimeout</code> in a declarative manner.</p>\n<ul>\n<li>Create a custom hook that takes a <code>callback</code> and a <code>delay</code>.</li>\n<li>Use the <code>useRef()</code> hook to create a <code>ref</code> for the callback function.</li>\n<li>Use the <code>useEffect()</code> hook to remember the latest callback.</li>\n<li>Use the <code>useEffect()</code> hook to set up the timeout and clean up.</li>\n</ul>\n<pre><code class=\"language-js\">const useTimeout = (callback, delay) =&#x26;gt; {\n  const savedCallback = React.useRef();\n\nReact.useEffect(() =&#x26;gt; {\nsavedCallback.current = callback;\n}, [callback]);\n\nReact.useEffect(() =&#x26;gt; {\nfunction tick() {\nsavedCallback.current();\n}\nif (delay !== null) {\nlet id = setTimeout(tick, delay);\nreturn () =&#x26;gt; clearTimeout(id);\n}\n}, [delay]);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const OneSecondTimer = (props) =&#x26;gt; {\n  const [seconds, setSeconds] = React.useState(0);\n  useTimeout(() =&#x26;gt; {\n    setSeconds(seconds + 1);\n  }, 1000);\n\nreturn &#x26;lt;p&#x26;gt;{seconds}&#x26;lt;/p&#x26;gt;;\n};\n\nReactDOM.render(&#x26;lt;OneSecondTimer /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Provides a boolean state variable that can be toggled between its two states.</p>\n<ul>\n<li>Use the <code>useState()</code> hook to create the <code>value</code> state variable and its setter.</li>\n<li>Create a function that toggles the value of the <code>value</code> state variable and memoize it, using the <code>useCallback()</code> hook.</li>\n<li>Return the <code>value</code> state variable and the memoized toggler function.</li>\n</ul>\n<pre><code class=\"language-js\">const useToggler = (initialState) =&#x26;gt; {\n  const [value, setValue] = React.useState(initialState);\n\nconst toggleValue = React.useCallback(() =&#x26;gt; setValue((prev) =&#x26;gt; !prev), []);\n\nreturn [value, toggleValue];\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const Switch = () =&#x26;gt; {\n  const [val, toggleVal] = useToggler(false);\n  return &#x26;lt;button onClick={toggleVal}&#x26;gt;{val ? &#x26;quot;ON&#x26;quot; : &#x26;quot;OFF&#x26;quot;}&#x26;lt;/button&#x26;gt;;\n};\nReactDOM.render(&#x26;lt;Switch /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />\n<p>Handles the <code>beforeunload</code> window event.</p>\n<ul>\n<li>Use the <code>useRef()</code> hook to create a ref for the callback function, <code>fn</code>.</li>\n<li>Use the <code>useEffect()</code> hook and <code>EventTarget.addEventListener()</code> to handle the <code>'beforeunload'</code> (when the user is about to close the window).</li>\n<li>Use <code>EventTarget.removeEventListener()</code> to perform cleanup after the component is unmounted.</li>\n</ul>\n<pre><code class=\"language-js\">const useUnload = (fn) =&#x26;gt; {\n  const cb = React.useRef(fn);\n\nReact.useEffect(() =&#x26;gt; {\nconst onUnload = cb.current;\nwindow.addEventListener(&#x26;quot;beforeunload&#x26;quot;, onUnload);\nreturn () =&#x26;gt; {\nwindow.removeEventListener(&#x26;quot;beforeunload&#x26;quot;, onUnload);\n};\n}, [cb]);\n};\n</code></pre>\n<hr />\n<pre><code class=\"language-js\">const App = () =&#x26;gt; {\n  useUnload((e) =&#x26;gt; {\n    e.preventDefault();\n    const exit = confirm(&#x26;quot;Are you sure you want to leave?&#x26;quot;);\n    if (exit) window.close();\n  });\n  return &#x26;lt;div&#x26;gt;Try closing the window.&#x26;lt;/div&#x26;gt;;\n};\nReactDOM.render(&#x26;lt;App /&#x26;gt;, document.getElementById(&#x26;quot;root&#x26;quot;));\n</code></pre>\n<hr />"},{"url":"/docs/react/react-in-depth/","relativePath":"docs/react/react-in-depth.md","relativeDir":"docs/react","base":"react-in-depth.md","name":"react-in-depth","frontmatter":{"title":"React In Depth","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"Intro To React","description":"\nReact embraces the fact that rendering logic is inherently coupled with\nother UI logic: how events are handled, how the state changes over time.","robots":[],"extra":[{"name":"og:description","value":"\nReact embraces the fact that rendering logic is inherently coupled with\nother UI logic: how events are handled, how the state changes over time.","keyName":"property","relativeUrl":false},{"name":"og:title","value":"Intro To React","keyName":"property","relativeUrl":false},{"name":"og:image","value":"images/kind-whale.gif","keyName":"property","relativeUrl":true},{"name":"twitter:title","value":"Intro To React","keyName":"name","relativeUrl":false},{"name":"twitter:description","value":"\nReact embraces the fact that rendering logic is inherently coupled with\nother UI logic: how events are handled, how the state changes over time.","keyName":"name","relativeUrl":false},{"name":"twitter:card","value":"react_img_intro","keyName":"name","relativeUrl":false},{"name":"og:type","value":"website","keyName":"property","relativeUrl":false}],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>React In Depth</h1>\n<iframe src=\"https://codesandbox.io/embed/react-gists-4s3ll?fontsize=14&hidenavigation=1&theme=dark\"\n<pre><code> style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\"\n\n title=\"react-gists\"\n\n allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n\n sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n</code></pre>\n<blockquote>\n</iframe>\n</blockquote>\n<h1>Random Things to Remember</h1>\n<p><img src=\"https://miro.medium.com/max/60/0*LHVHf7SPZ1t0UVAj?q=20\"></p>\n<p><img src=\"https://miro.medium.com/max/630/0*LHVHf7SPZ1t0UVAj\"></p>\n<p><img src=\"https://miro.medium.com/max/60/0*wR-lbD4zf45-IHoQ?q=20\"><img src=\"https://miro.medium.com/max/630/0*wR-lbD4zf45-IHoQ\"><img src=\"https://miro.medium.com/max/60/0*7EZESKf0XPbncXAY?q=20\"><img src=\"https://miro.medium.com/max/630/0*7EZESKf0XPbncXAY\"></p>\n<ul>\n<li>Using () implictly returns components.</li>\n<li>Role of index.js is to <em>render</em> your application.</li>\n<li>The reference to root comes from a div in the body of your public HTML file.</li>\n<li>State of a component is simply a regular JS Object.</li>\n<li>Class Components require render() method to return JSX.</li>\n<li>Functional Components directly return JSX.</li>\n<li>Class is className in React.</li>\n<li>When parsing for an integer just chain Number.parseInt(\"123\")</li>\n<li>Use ternary operator if you want to make a conditional inside a fragment.</li>\n</ul>\n<!---->\n<ul>\n<li>Purpose of React.Fragment is to allow you to create groups of children without adding an extra dom element.</li>\n</ul>\n<h1>Front-End History</h1>\n<ul>\n<li>React makes it easier for you to make front-end elements. A front-end timeline</li>\n<li>Some noteworthy front end libraries that have been used in the past few years:</li>\n<li>2005: Script.aculo.us</li>\n<li>2005: Dojo</li>\n<li>2006: YUI</li>\n<li>2010: Knockout</li>\n<li>2011: AngularJS</li>\n<li>2012: Elm</li>\n<li>2013: React (Considered the standard front-end library)</li>\n<li>React manages the creation and updating of DOM nodes in your Web page.</li>\n<li>All it does is dynamically render stuff into your DOM.</li>\n<li>What it doesn't do:</li>\n<li>Ajax</li>\n<li>Services</li>\n<li>Local Storage</li>\n<li>Provide a CSS framework</li>\n<li>React is unopinionated</li>\n<li>Just contains a few rules for developers to follow, and it just works.</li>\n<li>JSX : Javascript Extension is a language invented to help write React Applications (looks like a mixture of JS and HTML)</li>\n<li>Here is an overview of the difference between rendering out vanilla JS to create elements, and JSX:</li>\n</ul>\n<!---->\n<ul>\n<li>This may seem like a lot of code but when you end up building many components, it becomes nice to put each of those functions/classes into their own files to organize your code. Using tools with React</li>\n<li>React DevTools : New tool in your browser to see ow React is working in the browser</li>\n<li>create-react-app : Extensible command-line tool to help generate standard React applications.</li>\n<li>Webpack : In between tool for dealing with the extra build step involved.</li>\n</ul>\n<!---->\n<ul>\n<li>HMR : (Hot Module Replacement) When you make changes to your source code the changes are delivered in real-time.</li>\n<li>React Developers created something called Flux Architecture to moderate how their web page consumes and modifies data received from back-end API's.</li>\n</ul>\n<!---->\n<ul>\n<li>Choosing React</li>\n<li>Basically, React is super important to learn and master.</li>\n</ul>\n<h1>React Concepts and Features</h1>\n<p>There are many benefits to using React over just Vanilla JavaScript.</p>\n<ul>\n<li>Modularity</li>\n<li>To avoid the mess of many event listeners and template strings, React gives you the benefit of a lot of modularity.</li>\n<li>Easy to start</li>\n<li>No specials tools are needed to use Basic React.</li>\n<li>You can start working directly with createElement method in React.</li>\n<li>Declarative Programming</li>\n<li>React is declarative in nature, utilizing either it's built-in createElement method or the higher-level language known as JSX.</li>\n<li>Reusability</li>\n<li>Create elements that can be re-used over and over. One-flow of data</li>\n<li>React apps are built as a combination of parent and child components.</li>\n<li>Parents can have one or more child components, all children have parents.</li>\n<li>Data is never passed from child to the parent.</li>\n<li>Virtual DOM : React provides a Virtual DOM that acts as an agent between the real DOM and the developer to help debug, maintain, and provide general use.</li>\n<li>Due to this usage, React handles web pages much more intelligently; making it one of the speediest Front End Libraries available.</li>\n</ul>\n<h1>ES6 Refresher</h1>\n<p>Exporting one item per file</p>\n<ul>\n<li>Use export default statement in ES6 to export an item. ES6</li>\n</ul>\n<p>CommonJS (Equivalent)</p>\n<p>Exporting multiple items per file</p>\n<ul>\n<li>Use just thw export keyword (without default) to export multiple items per file. ES6 (Better to export them individually like this, rather than bunching them all into an object)</li>\n</ul>\n<p>CommonJS (Equivalent)</p>\n<p>Importing with ES6 vs CommonJS</p>\n<ul>\n<li>Import statements in ES6 modules must always be at the top of the file, because all imports must occur before the rest of the file's code runs. ES6</li>\n</ul>\n<p>CommonJS</p>\n<p>Unnamed default imports</p>\n<ul>\n<li>You can name unnamed items exported with export default any name when you import them.</li>\n</ul>\n<!---->\n<ul>\n<li>Just remember if you use export instead of export default then your import is already named and cannot be renamed.</li>\n</ul>\n<p>Aliasing imports</p>\n<ul>\n<li>Use as asterisk to import an entire module's contents.</li>\n<li>Keep in mind you must use an as keyword to refer to it later.</li>\n</ul>\n<!---->\n<ul>\n<li>You can also name identically named functions or items from different files.</li>\n</ul>\n<p>Browser support for ES6 Modules</p>\n<ul>\n<li>ES6 Modules can only be used when a JS file is specified as a module. &#x3C;script type=\"module\" src=\"./wallet.js\">&#x3C;/script></li>\n<li>You can get browser support for ES6 modules by adding module into your script tag.</li>\n</ul>\n<h1>Notes</h1>\n<h1>JSX In Depth</h1>\n<ul>\n<li>Remember that JSX is just syntactic sugar for the built in React.createElement(component, props, ...children)</li>\n<li>React Library must always be in scope from your JSX code.</li>\n<li>Use Dot Notation for JSX Type</li>\n<li>User-Defined Components Must Be Capitalized &#x3C;Foo /> vs &#x3C;div></li>\n<li>Cannot use a general expression as the React element type. (Incorrect)</li>\n</ul>\n<p>(Corrected)</p>\n<p>Props in JSX</p>\n<ul>\n<li>Several ways to specify props in JSX.</li>\n<li>Javascript Expressions as Props</li>\n</ul>\n<!---->\n<ul>\n<li>String Literals</li>\n</ul>\n<!---->\n<ul>\n<li>Props Default to “True”</li>\n</ul>\n<!---->\n<ul>\n<li>Spread Attributes</li>\n</ul>\n<p>Children in JSX</p>\n<ul>\n<li>props.children : The content between opening and closing tag. JavaScript Expressions as Children</li>\n</ul>\n<p>Functions as Children</p>\n<ul>\n<li>props.children works like any other prop, meaning it can pass any sort of data.</li>\n</ul>\n<p>Booleans, Null, and Undefined Are Ignored</p>\n<ul>\n<li>false, null, undefined, and true are all valid children.</li>\n<li>They will not render.</li>\n<li>You can use these to conditionally render items.</li>\n</ul>\n<!---->\n<ul>\n<li>In this example, the component will only render if showHeader evals to True.</li>\n</ul>\n<!---->\n<ul>\n<li>Note that certain falsy values such as zero will still be rendered by React, you can work around this by ensuring situations like the above eval. into a boolean.</li>\n<li>In the times you want booleans to be rendered out, simply convert it into a string first.</li>\n</ul>\n<h1>Reconciliation</h1>\n<p>The Diffing Algorithm</p>\n<ul>\n<li>Diffing : When the state of a component changes React creates a new virtual DOM tree.</li>\n<li>Elements of Different Types</li>\n<li>Every time the root elements have different types, React tears down the old tree and builds the new tree from scratch.</li>\n<li>DOM Elements Of the Same Type</li>\n<li>When comparing two DOM elements of the same type, React keeps the same underlying DOM node and only updates the changes attributes.</li>\n</ul>\n<!---->\n<ul>\n<li>Component Elements Of The Same Type</li>\n<li>When components update, instances will remain the same, so that state maintains across renders.</li>\n<li>React will only update the props, to match the new element.</li>\n<li>Recursing On Children</li>\n<li>React will iterate both lists of children and generate a mutation whenever there's a difference.</li>\n<li>This is why we use keys.</li>\n<li>Makes it easier for React to match children in the original tree with children in the subsequent tree.</li>\n<li>Tradeoffs</li>\n<li>Important to remember that reconciliation algorithm is an <em>implementation detail</em>.</li>\n<li>Re-rendering only to apply the differences following the rules stated in the previous sections.</li>\n</ul>\n<h1>Typechecking With PropTypes<img src=\"https://miro.medium.com/max/60/0*8ls0PmtREELbf5Wm?q=20\"><img src=\"https://miro.medium.com/max/630/0*8ls0PmtREELbf5Wm\">\n\n\n</h1>\n<ul>\n<li>As your application grows, you can use React's typechecking to catch bugs.</li>\n<li>propTypes is a special property to run typechecking.</li>\n<li>exports range of built in validators to ensure your received data is valid.</li>\n<li>propTypes is only checked in development mode.</li>\n</ul>\n<p>Requiring Single Child</p>\n<ul>\n<li>Use PropTypes.element to specify only a single child can be passed to a component as children.</li>\n</ul>\n<p>Default Prop Values</p>\n<ul>\n<li>Use defaultProps to assign default values for props.</li>\n</ul>\n<h1>Notes</h1>\n<h1>React Router Introduction</h1>\n<ul>\n<li>React Router is the answer for rendering different components for different pages.</li>\n<li>A front-end library that allows you to control which components to display using the browser location.</li>\n<li>Client-side Routing Getting started with routing</li>\n<li>Install React Router with:</li>\n<li>npm install — save react-router-dom@⁵.1.2</li>\n<li>Import Browser Router from package.</li>\n<li>import { BrowserRouter } from “react-router-dom”;</li>\n<li>BrowserRouter is the primary component of the router that wraps your route hierarchy.</li>\n<li>Wrap it around components.</li>\n<li>Creates a React Context that passes routing information down to all its descendant components.</li>\n<li>You can also use HashRouter, where it would generate a hash before the endpoint. Creating frontend routes</li>\n<li>React Router helps your app render specific components based on the URL.</li>\n<li>The most common component is &#x3C;Route></li>\n<li>Wrapped around another component, causing the comp. to only render if the a certain URL is matched.</li>\n<li>Props : path, component, exact, and [render]</li>\n<li>Browser Router can only have a single child component.</li>\n<li>The Browser Router wraps all routes within a parent div element.</li>\n</ul>\n<!---->\n<ul>\n<li>component</li>\n<li>Indicates component to render.</li>\n<li>path</li>\n<li>Indicates path to render a specific component.</li>\n<li>exact</li>\n<li>Tells route to not pattern match and only render a certain route exclusively to it's associated component.</li>\n<li>render</li>\n<li>Optional prop that takes in a function to be called.</li>\n<li>Causes extra work for React.</li>\n<li>Preferred for inline rendering of simple functional components.</li>\n<li>Difference between component and render is that component returns new JSX that be re-mounted, but render returns the JSX that will be mounted only once.</li>\n<li>// This inline rendering will work, but is unnecessarily slow. &#x3C;Route path=”/hello” component={() => &#x3C;h1>Hello!&#x3C;/h1>} /> // This is the preferred way for inline rendering. &#x3C;Route path=”/hello” render={() => &#x3C;h1>Hello!&#x3C;/h1>} /></li>\n<li>Also useful if you need to pass in specific props to a component.</li>\n<li>// `users` to be passed as a prop: const users = { 1: { name: “Andrew” }, 2: { name: “Raymond” }, }; &#x3C;Route path=”/users” render={() => &#x3C;Users users={users} />} />;</li>\n</ul>\n<p>Route path params</p>\n<ul>\n<li>Your component's props can hold information about URL's parameters.</li>\n<li>Will match segments starting at : to the next /, ?, #.</li>\n</ul>\n<!---->\n<ul>\n<li>{...props} spreads out the router's props.</li>\n<li>props.match.params is used to access the match prop's parameters.</li>\n<li>Useful keys on the match object:</li>\n<li>isExact : boolean that tells you whether or not the URL exactly matches the path.</li>\n<li>url : the currentURL</li>\n<li>path : Route path it matched against (w/o wildcards)</li>\n<li>params : Matches for the individual wildcard segments.</li>\n</ul>\n<h1>Navigation</h1>\n<p>React Router Navigation</p>\n<ul>\n<li>Link, NavLink, Redirect, history props of React Router are used to help your user navigate routes. Adding links for navigation</li>\n<li>Issues on-click navigation event to a route defined in app.</li>\n<li>Usage renders an anchor tag with a correctly set href attribute.</li>\n</ul>\n<!---->\n<ul>\n<li>Link takes two properties: to and onClick.</li>\n<li>to : route location that points to an absolute path.</li>\n<li>onClick : clickHandler.</li>\n<li>NavLink works just like Link but has a bit of extra functionality.</li>\n<li>Adds extra styling, when the path it links to matches the current path.</li>\n<li>As it's name suggests, it is used to Nav Bars.</li>\n<li>Takes three props:</li>\n<li>activeClassName : allows you to set a CSS class name for styling. (default set to 'active')</li>\n<li>activeStyle : style object that is applied inline when it's to prop. matches the current URL.</li>\n<li>exact prop is a boolean that defaults to false; you can set it to true to apply requirement of an exact URL match.</li>\n<li>exact can also be used as a flag instead of a reg. property value.</li>\n<li>benefit of adding this is so that you don't trigger other matches. Switching between routes</li>\n<li>&#x3C;Switch> : Component allows you to only render one route even if several match the current URL.</li>\n<li>You may nest as many routes as you wish but only the first match of the current URL will be rendered.</li>\n<li>Very useful if we want a default component to render if none of our routes match.</li>\n</ul>\n<!---->\n<ul>\n<li>DefaultComponent will only render if none of the other URLs match up.</li>\n<li>&#x3C;Redirect> : Helps redirect users.</li>\n<li>Only takes a single prop: to.</li>\n</ul>\n<p>History</p>\n<ul>\n<li>History allows you to update the URL programmatically.</li>\n<li>Contains two useful methods:</li>\n<li>push : Adds a new URL to the end of the history stack.</li>\n<li>replace : Replaces the current URL on the history stack, so the back button won't take you to it.</li>\n</ul>\n<h1>Nested Routes</h1>\n<p>Why nested routes?</p>\n<ul>\n<li>Create routes that tunnel into main components vs getting rendered on the main page as it's own thing. What are nested routes?</li>\n</ul>\n<p>Alt. version using props.match</p>\n<ul>\n<li>As you can see above, our end URL isn't even defined until we apply those flexible values in.</li>\n</ul>\n<h1>React Builds</h1>\n<ul>\n<li>Build : Process of converting code into something that can actually execute or run on the target platform.</li>\n<li>In regards to React, the minimum a build should do is convert JSX to something that browsers can understand. Reviewing common terminology</li>\n<li>Linting : Process of using a tool to analyze your code to catch common errors, bugs, inconsistencies etc...</li>\n<li>Transpilation : Process of converting source code, like JS, from one version to another.</li>\n<li>Minification : Process of removing all unnecessary characters in your code.</li>\n<li>Bundling : Process of combining multiple code files into a single file.</li>\n<li>Tree Shaking : Process of removing unused or dead code from your application before it's bundled. Configuration or code?</li>\n<li>Configuration allows developers to create build tasks by declaring either JSON, XML, or YAML without explicitly writing every step in the process.</li>\n<li>Coding or Scripting simply requires code. Babel and webpack (yes, that's intentionally a lowercase 'w')</li>\n<li>Babel : Code Transpiler that allows you to use all of the latest features and syntax wihtout worrying about what browsers support what.</li>\n<li>webpack : Allows developers to use JS modules w/o requiring users to use a browser that natively supports ES modules.</li>\n<li>Create React App uses webpack and Babel under the hood to build applications. The Create React App build process</li>\n<li>What happens when you run npm start:</li>\n<li>.env variables are loaded.</li>\n<li>list of browsers to support are checked.</li>\n<li>config'd HTTP port checked for availability.</li>\n<li>application compiler is configured and created.</li>\n<li>webpack-dev-starter is started</li>\n<li>webpack-dev-starter compiles app.</li>\n<li>index.html is loaded into browser</li>\n<li>file watcher is started to watch for changes. Ejecting</li>\n<li>There is a script in Create React App called eject that allows you to 'eject' your application and expose all the hidden stuff. Preparing to deploy a React application for production</li>\n<li>Defining Env Variables</li>\n</ul>\n<p>Configuring the supported browsers</p>\n<ul>\n<li>If you specify older browsers it will affect how your code get's transpiled. Creating a production build</li>\n<li>Run npm run build to create a production build.</li>\n<li>Bundles React in production mode and optimizes the build for the best performance.</li>\n</ul>\n<h1>Notes</h1>\n<h1>Introduction to React</h1>\n<ul>\n<li>Simply a nice library that turns data into DOM.</li>\n<li>Tree Diffing : Fast comparison and patching of data by comparing the current virtual DOM and new virtual DOM - updating only the pieces that change.</li>\n<li>It's just a tree with some fancy diffing</li>\n</ul>\n<h1>Create Element</h1>\n<p>From JavaScript To DOM</p>\n<ul>\n<li>The React.createElement function has the following form:</li>\n</ul>\n<!---->\n<ul>\n<li>Type : Type of element to create, i.e. a string for an HTML element or a reference to a function or class that is a React component.</li>\n<li>Props : Object that contains data to render the element.</li>\n<li>Children : Children of the elemet, as many as you want. Creating elements</li>\n<li>Our rendering goal:</li>\n</ul>\n<!---->\n<ul>\n<li>There are five tags to create:</li>\n<li>One ul</li>\n<li>Two li</li>\n<li>Two a</li>\n<li>There are certain attributes we want to appear in the DOM for these tags as well:</li>\n<li>Each li has a class (or className in React)</li>\n<li>Both a ele's have href attributes</li>\n<li>Also keep in mind the parent child relationships happening between the tags.</li>\n<li>ul is the parent of both li</li>\n<li>Each li has an a element as a child</li>\n<li>Each a has a text content child</li>\n</ul>\n<p>Converting to virtual DOM</p>\n<ul>\n<li>After you set up your React.createElement, you use React.render to take the value returned from cE and a DOM node to insert into the conversion of the real DOM.</li>\n</ul>\n<!---->\n<ul>\n<li>JS Code => Virtual DOM => Real Dom Updates</li>\n<li>If you call React.render a second or multiple times it just checks the existing Virtual DOM and it knows which smaller areas to change. Thinking in Components</li>\n<li>Components are pieces of reusable front-end pieces.</li>\n<li>Components should be Single Responsibility Principle compliant.</li>\n</ul>\n<h1>Create Element</h1>\n<p>React.createElement Demo</p>\n<ul>\n<li>Can import non-local dependencies with import 'package-link'</li>\n</ul>\n<!---->\n<ul>\n<li>Remember when importing modules from other files you have to denote the file type in the import statement. HTML Original</li>\n</ul>\n<p>React Version</p>\n<ul>\n<li>Because class is a reserved keyword in JS, in React we can use className to assign a class to an element.</li>\n<li>Remember the data that goes into createElement: element type, data to pass into the element, and then children.</li>\n<li>props : Properties;</li>\n<li>To handle certain values that are initially undefined, we can use defaultProps.</li>\n</ul>\n<!---->\n<ul>\n<li>You can change in the devTools Network tab the internet speed to check for values that may be undefined to hangle with defaultProps.</li>\n<li>If we fetch multiple pieces of data, we can render many things by using map.</li>\n<li>You need to assign a unique key to each of the clues.</li>\n<li>We need to keep track of them individually so that React can easily refer to a specific one if there is an issue. clue => { key:clue.id, ...clue }</li>\n</ul>\n<!---->\n<ul>\n<li>Note: JSX is preferred over React.createElement;</li>\n</ul>\n<h1>Notes from Hello Programmer Exercise</h1>\n<ul>\n<li>When you import modules from websites they must have CORs activated.</li>\n<li>These import statements, import global variables.</li>\n<li>When we want to move our code into production we need to change the imports into the production minified versions.</li>\n</ul>\n<!---->\n<ul>\n<li>While we will never actually be creating full apps with just React.createElement => it is the enginer that is running under the hood!</li>\n</ul>\n<h1>Introduction to JSX<img src=\"https://miro.medium.com/max/60/0*NNxuFMF-sOL8Wvdl?q=20\"><img src=\"https://miro.medium.com/max/630/0*NNxuFMF-sOL8Wvdl\">\n\n</h1>\n<ul>\n<li>JSX : Javascript Extension, a new language created by React developers to have an easier way of interacting with the React API. How to use JSX</li>\n<li>We will use babel to convert version of modern JS into an older version of JS. React Create Element</li>\n</ul>\n<p>JSX Version</p>\n<ul>\n<li>Keep in mind that self closing tags in React must have a forward slash to close it.</li>\n</ul>\n<!---->\n<ul>\n<li>Properties and Data</li>\n</ul>\n<!---->\n<ul>\n<li>Comments in JSX have the following syntax:</li>\n</ul>\n<!---->\n<ul>\n<li>Property Names:</li>\n<li>checked : Attribute of input components such as checkbox or radio, use it to set whether the component is checked or not.</li>\n<li>className : Used to specify a CSS class.</li>\n<li>dangerouslySetInnerHTML : React's equivalent of innerHTML because it is risky to cross-site scripting attacks.</li>\n<li>htmlFor : Because for is protected keyword, React elements use this instead.</li>\n<li>onChange : Event fired whenever a form field is changed.</li>\n<li>style : Accepts a JS object with camelCase properties rather than a CSS string.</li>\n<li>value : Supported by Input, Select, and TextArea components; use it to set the value of the component.</li>\n<li>Note: React uses camel-case!!! The JSX semicolon gotcha</li>\n</ul>\n<p>create Element equivalent</p>\n<ul>\n<li>We wrap what want to return in parenthesis so JS doesn't auto add semi-colons after every line and run the code incorrectly.</li>\n<li>Just remember if you decided to use the return keyword in a function to 'return some JSX', then make sure you wrap the JSX in parenthesis.</li>\n</ul>\n<p>npx create-react-app my-app</p>\n<ul>\n<li>Single line used to initiate a React application.</li>\n<li>React has a great toolchain where you can see changes live as you're editing your application.</li>\n<li>React errors will be rendered directly onto the browser window.</li>\n<li>A downside is that it installs a lot of bloat files.</li>\n<li>Examples of React create Element and JSX equivalent</li>\n</ul>\n<p>More Complex JSX Example</p>\n<h1>Notes</h1>\n<h1>Using Custom CRA Templates</h1>\n<p>Using a Custom Template npx create-react-app my-app --template @appacademy/simple</p>\n<ul>\n<li>Keep in mind that using create-react-app automatically initializes a git repository for you!</li>\n<li>App Academy custom template for creating a react app.</li>\n<li>If using the default react create project you can delete the following files:</li>\n<li>favicon.ico</li>\n<li>robots.txt</li>\n<li>logo192.png</li>\n<li>logo512.png</li>\n<li>manifest.json</li>\n<li>You can also simplify the html file into:</li>\n</ul>\n<p>Simplifying the src folder</p>\n<ul>\n<li>Remove: App.css App.test.js logo.svg serviceWorker.js setupTests.js</li>\n<li>Update the Following Files:</li>\n</ul>\n<h1>React Class Components</h1>\n<p>Class Components</p>\n<ul>\n<li>You can write React components using ES2015 Classes: Function Component</li>\n</ul>\n<p>ES2015 Version</p>\n<ul>\n<li>We can access props within a class component by using this.props</li>\n<li>Keep in mind Class Components are used just like function components.</li>\n</ul>\n<p>Setting and accessing props</p>\n<ul>\n<li>If we define a constructor method in our Class Component, we have to define the super method with props passed through it.</li>\n<li>Side Note: Before React used ES2015 Classes, it used React.createclass function, if you ever need to use this antiquated method make sure you install a module called create-react-class Stateful components</li>\n<li>One of the major reasons why you would choose to use a Class Component over a Function Component is to add and manage local or internal state to your component.</li>\n<li>Second of the major reasons is to be able to use a Class Component's lifecycle methods. What is state?</li>\n<li>Props are data that are provided by the consumer or caller of the component.</li>\n<li>Not meant to be changed by a component.</li>\n<li>State is data that is internal to the component.</li>\n<li>Intended to be updated or mutated. When to use state</li>\n<li><em>Only Use State when it is absolutely necessary</em></li>\n<li>If the data never changes, or if it's needed through an entire application use props instead.</li>\n<li>State is more often used when creating components that retrieve data from APIs or render forms.</li>\n<li>The general rule of thumb: If a component doesn't need to use state or lifecyle methods, it should be prioritized as a function component.</li>\n<li>Functional:Stateless || Class:Stateful Initializing state</li>\n<li>Use a class constructor method to initialize this.state object. // Application Entry Point</li>\n</ul>\n<p>// Class Component: RandomQuote</p>\n<p>Updating State</p>\n<ul>\n<li>Let's say we want to update our state with a new quote.</li>\n<li>We can set up event listeners in React similarly to how we did them before.</li>\n<li>&#x3C;button type=”button” onClick={this.changeQuote}> Change Quote &#x3C;/button></li>\n<li>onClick is the event listener.</li>\n<li>{this.changeQuote} is the event handler method.</li>\n<li>Our Class Component File should now look like this with the new additions:</li>\n</ul>\n<p>Don't modify state directly</p>\n<ul>\n<li>It is important to never modify your state directly!</li>\n<li>ALWAYS use this.setState method to update state.</li>\n<li>This is because when you only use this.state to re-assign, no re-rendering will occur => leaving our component out of sync. Properly updating state from the previous state</li>\n<li>In our current example, the way we have changeQuote set up leaves us with occasionally producing the same index twice in a row.</li>\n<li>One solution is to design a loop but keep in mind that state updates are handled asynchronously in React (your current value is not guaranteed to be the latest)</li>\n<li>A safe method is to pass an anonymous method to this.setState (instead of an object literal) Previous</li>\n</ul>\n<p>Passing w/ Anon Method</p>\n<p>Providing default values for props</p>\n<ul>\n<li>In our current example, we pass in a static array of predefined quotes in our constructor.</li>\n<li>The way it is set up right now leaves our list of quotes unchanged after initialization.</li>\n<li>We can make quotes more dynamic by replacing our static array with a props argument passed into super.</li>\n<li>constructor(props) { super(props); }</li>\n<li>We can now move our quotes array to our application entry point and pass it in as a prop. // Application Entry Point</li>\n</ul>\n<!---->\n<ul>\n<li>One thing to note about this workaround is that the caller of the component <em>must</em> set the quotes prop or the component will throw an error => so use defaultProps!</li>\n</ul>\n<!---->\n<ul>\n<li>A good safety net in case the consumer/caller doesn't provide a value for the quotes array.</li>\n<li>We can even remove it from our index.js now and an error will not be thrown.</li>\n</ul>\n<h1>Handling Events<img src=\"https://miro.medium.com/max/1400/0*c24XQBvqBBg0Eztz\"><img src=\"https://miro.medium.com/max/1400/0*N7KFfhOZZ7UrY8s4\"><img src=\"https://miro.medium.com/max/60/0*ywV6dO4a4QcGJxK5?q=20\"><img src=\"https://miro.medium.com/max/630/0*ywV6dO4a4QcGJxK5\"><img src=\"https://miro.medium.com/max/60/0*Nd73GjTY1PVQtjtQ?q=20\"><img src=\"https://miro.medium.com/max/630/0*Nd73GjTY1PVQtjtQ\">\n\n</h1>\n<ul>\n<li>To add an event listener to an element, just define a method to handle the event and associate that method with the element event you are listening for. Example</li>\n</ul>\n<!---->\n<ul>\n<li>Note that when refering the handler method in onClick we're not invoking showAlert simply just passing a reference. Preventing default behavior</li>\n<li>HTML Elements in the browser often have a lot of default behavior.</li>\n<li>I.E. Clicking on an &#x3C;a> element navigates so a resource denoted by &#x3C;href> property.</li>\n<li>Here is an example of where using e.preventDefault() could come in handy.</li>\n</ul>\n<!---->\n<ul>\n<li>The button contained within the form will end up refreshing the page before this.submitForm method can be completed.</li>\n<li>We can stick an e.preventDefault() into the actual method to get around this problem.</li>\n<li>e : Parameter that references a Synthetic Event object type. Using this in event handlers</li>\n</ul>\n<!---->\n<ul>\n<li>When we console log this we see the AlertButton object.</li>\n<li>If we were to write the showAlert method with a regular class method like:</li>\n</ul>\n<!---->\n<ul>\n<li>We would get undefined => remember that fat arrow binds to the current context! Reviewing class methods and the this keyword</li>\n<li>Let's refresh on binding.</li>\n</ul>\n<!---->\n<ul>\n<li>The first time we use our displayMethod call, it is called directly on the instance of the boyfriend class, which is why Momato Riruru was printed out.</li>\n<li>The second time it was called, the ref of the method is stored as a variable and method is called on that variable instead of the instance; resulting in a type error (it has lost it's context)</li>\n<li>Remember we can use the bind method to rebind context!</li>\n<li>We can refactor to get the second call working like this:</li>\n<li>const displayAgain = Ming.displayName.bind(Ming); displayAgain(); // => Now Momato Riruru will be printed out.</li>\n<li>To continue using function declarations vs fat arrow we can assign context in a constructor within a class component.</li>\n</ul>\n<!---->\n<ul>\n<li>Experimental Syntax : Syntax that has been proposed to add to ECMAScript but hasn't officially been added to the language specification yet.</li>\n<li>It's good to pick one approach and use it consistently, either:</li>\n<li>Class Properties &#x26; Arrow Functions</li>\n<li>Bind Method &#x26; This Keyword The SyntheticEvent object</li>\n<li>Synthetic Event Objects: Cross Browser wrappeds around the browser's native event.</li>\n<li>Includes the use of stopPropagation() and preventDefault();</li>\n<li>Attributes of the Synthetic Event Object:Attributesboolean bubblesboolean cancelableDOMEventTarget currentTargetboolean defaultPreventednumber eventPhaseboolean isTrustedDOMEvent nativeEventvoid preventDefault()boolean isDefaultPrevented()void stopPropagation()boolean isPropagationStopped()void persist()DOMEventTarget targetnumber timeStampstring type</li>\n<li>nativeEvent : property defined in a synthetic event object that gives you access to the underlying native browser event (rarely used!)</li>\n</ul>\n<h1>Forms in React</h1>\n<p><em>Exercise being done in a separate file</em> Random Notes</p>\n<ul>\n<li>onChange : detects when a value of an input element changes.</li>\n<li>Assigning onChange to our input fields makes our component's state update in real time during user input.</li>\n<li>Dont forget to add preventDefault onto form submissions to deal with the default behavior of the browser refreshing the page!</li>\n<li>submittedOn: new Date(), Can be added to a form, most likely will persist into a DB.</li>\n<li>Controlled Components</li>\n<li>We use the onChange event handlers on form fields to keep our component's state as the \"one source of truth\"</li>\n<li>Adding an onChange event handler to every single input can massively bloat your code.</li>\n<li>Try assiging it to it's own method to apply everywhere.</li>\n<li>textarea is handled differently in react: it takes in a value property to handle what the inner text will be.</li>\n</ul>\n<!---->\n<ul>\n<li>We can use validation libraries like validate to make our validation functions more complex.</li>\n</ul>\n<p>Note About Client-side vs server-side validation</p>\n<ul>\n<li>Server-side validation is not optional.</li>\n<li>Tech-savvy users can manipulate client-side validations.</li>\n<li>Sometimes the 'best approach' is to skip implementing validations on the client-side and rely completely on the server-side validation.</li>\n</ul>\n<h1>Component Lifecycle</h1>\n<ul>\n<li>Component Lifecycle is simply a way of describing the key moments in the lifetime of a component.</li>\n<li>Loading (Mounting)</li>\n<li>Updating</li>\n<li>Unloading (Unmounting) The lifecycle of a React component</li>\n<li>Each Class Component has several lifecycle methods that you can add to run code at specific times.</li>\n<li>componentDidMount : Method called after your component has been added to the component tree.</li>\n<li>componentDidUpdate : Method called after your component has been updated.</li>\n<li>componentWillUnmount : Method called just before your component is removed from the component tree.</li>\n<li>Mounting</li>\n<li>constructor method is called</li>\n<li>render method is called</li>\n<li>React updates the DOM</li>\n<li>componentDidMount is called</li>\n<li>Updating</li>\n<li>When component receives new props</li>\n<li>render method is called</li>\n<li>React updates the DOM</li>\n<li>componentDidUpdate is called</li>\n<li>When setState is called</li>\n<li>render method is called</li>\n<li>React updates the DOM</li>\n<li>componentDidUpdate is called</li>\n<li>Unmounting</li>\n<li>The moment before a class component is removed from the component tree:</li>\n<li>componentDidMount will be called. Avoiding the legacy lifecycle methods</li>\n<li>Occasionally you will encounter some deprecated lifecycle methods:</li>\n<li>UNSAFE_componentWillMount</li>\n<li>UNSAFE_componentWillReceiveProps</li>\n<li>UNSAFE_componentWillUpdate</li>\n<li>Just know they will be removed soon from React's API, peace. Using the class component lifecycle methods <em>Exercise done in sep. directory</em></li>\n<li>Assorted Notes:</li>\n<li>Common Use for componentDidMount lifecycle method is for fetching data from an API.</li>\n</ul>\n<p>—</p>\n<h1>Notes</h1>\n<h1>React Context</h1>\n<ul>\n<li>You can use React Context to pass data through a component tree without having to manually thread props.</li>\n<li>Convenient way to share &#x26; update global data. Creating a Context</li>\n</ul>\n<!---->\n<ul>\n<li>We use React.createContext to create context.</li>\n<li>Keep in mind if you invoke this method with aruguments, those arguments will be set as default context. Adding a Provider to the App component</li>\n<li>In order to pass context over to child components we need to wrap them in a provider component.</li>\n<li>The provider component takes in a value property that points to the information that needs to be passed to the children.</li>\n</ul>\n<p>Setting up a Consumer</p>\n<ul>\n<li>Keep in mind that Context.Consumer expects a function as a child.</li>\n<li>The function has a value prop passed in from Context.Provider</li>\n</ul>\n<h1>Notes</h1>\n<h1>Redux Explained</h1>\n<ul>\n<li>JS Framework for managing the frontend state of a web application.</li>\n<li>Gives us ability to store information in an organized manner in a web app and quickly retrieve that information from anywhere in the app.</li>\n<li>Redux</li>\n<li>Client Side Data Management</li>\n<li>Controls “Frontend State”</li>\n<li>NOT Your Database</li>\n<li>NOT Component State</li>\n<li>Just used for managing Data</li>\n</ul>\n<!---->\n<ul>\n<li>Visual of how an app without React manages it's data.</li>\n<li>A lot of prop threading happening.</li>\n<li>Data stored in a sep. location — global data. The Anatomy of Redux</li>\n<li>Store</li>\n<li>Holds the Frontend State</li>\n<li>Provides an API for the Frontend State</li>\n<li>Action</li>\n<li>POJOs</li>\n<li>Outline Changes to Frontend State</li>\n<li>Reducers</li>\n<li>Functions</li>\n<li>Make Changes to Frontend State Where did Redux come from?</li>\n<li>There are three central philosophies of Redux:</li>\n<li>A Single Source of Truth : state is stored in a POJO</li>\n<li>State is Read Only : State is immutable, modified by dispatching actions.</li>\n<li>Changes are Made with Pure Functions : Reducers that receive the actions and return updated state are pure functions of the old state and action. When is it appropriate to use Redux?</li>\n<li>When doing a project with simpler global state requirements, it may be better to choose React's Context API over Redux.</li>\n<li>Redux offers more flexibility and support for middleware along with richer developer tools. Vocabulary</li>\n<li>State</li>\n<li><em>Redux is a State Manager</em></li>\n<li>State is all the information stored by that program at a particular point in time.</li>\n<li>Redux's main job is to store the state and make it directly available to your entire app.</li>\n<li>Store</li>\n<li><em>Redux stores state in a single store</em>.</li>\n<li>Redux store is a single JS object with a couple of methods (not a class!)</li>\n<li>Methods include: getState, dispatch(action), and subscribe(listener)</li>\n<li>Actions</li>\n<li><em>Redux store is updated by dispatching actions</em></li>\n<li>Action is just a POJO that includes a mandatory type property.</li>\n<li>Contain info to update the store.</li>\n<li>We dispatch actions in response to User actions or AJAX requests.</li>\n<li>Pure Functions</li>\n<li><em>Redux Reducers are Pure Functions</em></li>\n<li>Functions are pure when their behavior depends only on it's arguments as has no side effects.</li>\n<li>Simply takes in an argument and outputs a value.</li>\n<li>Reducer</li>\n<li><em>Redux handles actions using reducers</em></li>\n<li>A function that is called each time an action is dispatched.</li>\n<li>Takes in an action and current state</li>\n<li>Required to be pure functions so their behavior is predictable.</li>\n<li>Middleware</li>\n<li><em>Customize response to dispatch actions by using Middleware</em></li>\n<li>Middleware is an optional component of Redus that allows custom responses to dispatched actions.</li>\n<li>Most common use is to dispatch async requests to a server.</li>\n<li>Time Traveling Dev Tools</li>\n<li><em>Redux can time travel wow</em></li>\n<li>Time travel refers to Redux's ability to revert to a previous state because reducers are all pure functions.</li>\n<li>Thunks</li>\n<li><em>Convenient format for taking async actions in Redux</em></li>\n<li>General concept in CS referring to a function who's primary purpose is to call another function.</li>\n<li>Most commonly used to make async API requests.</li>\n</ul>\n<h1>Flux and Redux</h1>\n<p>What is Flux?</p>\n<ul>\n<li>Front-end application architecutre.</li>\n<li>A pattern in which to structure an application.</li>\n<li>Unidirectional Data Flow — offers more predictability.</li>\n<li>Actions : Begins the data flow of data, simple object that contains a type; type indicates the type of change to be performed.</li>\n<li>Dispatcher : Mechanism for distributing actions to the store.</li>\n<li>Store : The entire state of the application, responsible for updating the state of your app.</li>\n<li>View : Unit of code that's responsible for rendering the user interface. Used to re-render the application when actions and changes occur.</li>\n</ul>\n<!---->\n<ul>\n<li>Redux</li>\n</ul>\n<!---->\n<ul>\n<li>Library that facilitates the implementation of Flux.</li>\n<li>Redux Three Principles</li>\n<li>Single Source of Truth</li>\n<li>State is Read-Only</li>\n<li>Only Pure Functions Change State</li>\n</ul>\n<h1>Store</h1>\n<ul>\n<li>Simply an object that holds the application state wrapped in an API.</li>\n<li>Three methods:</li>\n<li>getState() : Returns the store's current state.</li>\n<li>dispatch(action) : Passes an action into the store's reducer to tell it what info to update.</li>\n<li>subscribe(callback) : Registers a callback to be triggered whenever the store updates. Updating the Store</li>\n</ul>\n<p>Subscribing to the store</p>\n<ul>\n<li>Whenever a store process a dispatch(), it triggers all its subscribers.</li>\n<li>Subscribers : callbacks that can be added to the store via subscribe().</li>\n</ul>\n<p>Reviewing a simple example</p>\n<h1>Reducers\n\n\n</h1>\n<ul>\n<li>Reducer function receives the current state and action, updates the state appropriately based on the action.type and returns the following state.</li>\n<li>You can bundles different action types and ensuing logic by using a switch/case statement.</li>\n</ul>\n<p>Reviewing how Array#slice works</p>\n<ul>\n<li>Approach that can be used to remove an element without mutating the original array. Avoiding state mutations</li>\n<li>Your reducer must always return a new object if the state changes. GOOD</li>\n</ul>\n<p>BAD</p>\n<h1>Actions</h1>\n<ul>\n<li>Actions are the only way to trigger changes to the store's state. Using action creators</li>\n</ul>\n<!---->\n<ul>\n<li>fruit is the payload key and orange is the state data</li>\n<li>Action Creators : Functions created from extrapolating the creation of an action object.</li>\n</ul>\n<!---->\n<ul>\n<li>Use parenthesis for implicit return value.</li>\n<li>We can now add whatever fruit we'd like.</li>\n</ul>\n<p>Preventing typos in action type string literals</p>\n<ul>\n<li>Using constant variables helps reduce simple typos in a reducer's case clauses.</li>\n</ul>\n<h1>Debugging Arrow Functions</h1>\n<ul>\n<li>It is important to learn how to use debugger statements with arrow functions to effectively debug Redux cycle. Understanding the limitations of implicit return values</li>\n</ul>\n<!---->\n<ul>\n<li>You must use explicit return statement arrow function to use a debugger.</li>\n</ul>\n<h1>React Router Introduction</h1>\n<p>Now that you know how to render components in a React app, how do you handle rendering different components for different website pages? React Router is the answer!</p>\n<p>Think of how you have created server-side routes in Express. Take the following URL and server-side route. Notice how the /users/:userId path corresponds with the <a href=\"http://localhost:3000/users/2\">http://localhost:3000/users/2</a> URL to render a specific HTML page.</p>\n<p>In the default React setup, you lose the ability to create routes in the same manner as in Express. This is what React Router aims to solve!</p>\n<p><a href=\"https://github.com/ReactTraining/react-router\">React Router</a> is a frontend routing library that allows you to control which components to display using the browser location. A user can also copy and paste a URL and email it to a friend or link to it from their own website.</p>\n<p>When you finish this article, you should be able to use the following from the react-router-dom library:</p>\n<ul>\n<li>&#x3C;BrowserRouter> to provide your application access to the react-router-dom library; and</li>\n<li>&#x3C;Route> to connect specific URL paths to specific components you want rendered; and</li>\n<li>&#x3C;Switch> to wrap several Route elements, rendering only one even if several match the current URL; and</li>\n<li>React Router's match prop to access route path parameters.</li>\n</ul>\n<h1>Getting started with routing</h1>\n<p>Since you are writing single page apps, you don't want to refresh the page each time you change the browser location. Instead, you want to update the browser location and your app's response using JavaScript. This is known as client-side routing. You are using React, so you will use React Router to do this.</p>\n<p>Create a simple react project template:</p>\n<p>Then install React Router:</p>\n<p>Now import BrowserRouter from react-router-dom in your entry file:</p>\n<h1>BrowserRouter</h1>\n<p>BrowserRouter is the primary component of the router that wraps your route hierarchy. It creates a React context that passes routing information down to all its descendent components. For example, if you want to give &#x3C;App> and all its children components access to React Router, you would wrap &#x3C;App> like so:</p>\n<p>Now you can route the rendering of certain components to certain URLs (i.e <a href=\"https://www.website.com/profile).\">https://www.website.com/profile</a><a href=\"https://www.website.com/profile).\">).</a></p>\n<h1>HashRouter</h1>\n<p>Alternatively, you could import and use HashRouter from react-router-dom. Links for applications that use &#x3C;HashRouter> would look like <a href=\"https://www.website.com/#/profile\">https://www.website.com/#/profile</a> (with an # between the domain and path).</p>\n<p>You'll focus on using the &#x3C;BrowserRouter>.</p>\n<h1>Creating frontend routes</h1>\n<p>React Router helps your React application render specific components based on the URL. The React Router component you'll use most often is &#x3C;Route>.</p>\n<p>The &#x3C;Route> component is used to wrap another component, causing that component to only be rendered if a certain URL is matched. The behavior of the &#x3C;Route> component is controlled by the following props: path, component, exact, and render (optional).</p>\n<p>Create a simple Users component that returns &#x3C;h1>This is the users index!&#x3C;/h1>. Now let's refactor your index.js file so that you can create your routes within the component:</p>\n<p>Note that BrowserRouter can only have a single child component, so the snippet above wraps all routes within parent a &#x3C;div> element. Now let's create some routes!</p>\n<h1>component</h1>\n<p>Begin with the component prop. This prop takes a reference to the component to be rendered. Let's render your App component:</p>\n<p>Now you'll need to connect a path to the component!</p>\n<h1>path</h1>\n<p>The wrapped component will only be rendered when the path is matched. The path matches the URL when it matches some initial portion of the URL. For example, a path of / would match both of the following URLs: / and /users. (Because /users begins with a / it matches the path /)</p>\n<p>Take a moment to navigate to <a href=\"http://localhost:3000/users\">http://localhost:3000/users</a> to see how both the App component and Users component are rendering.</p>\n<h1>exact</h1>\n<p>If this exact flag is set, the path will only match when it exactly matches the URL. Then browsing to the /users path would no longer match / and only the Users component will be rendered (instead of both the App component and Users component).</p>\n<h1>render</h1>\n<p>This is an optional prop that takes in a function to be called. The function will be called when the path matches. The function's return value is rendered. You could also define a functional component inside the component prop, but this results in extra, unnecessary work for React. The render prop is preferred for inline rendering of simple functional components.</p>\n<p>The difference between using component and render is that component returns new JSX to be re-mounted every time the route renders, while render simply returns to JSX what will be mounted once and re-rendered. For any given route, you should only use either the component prop, or the render prop. If both are supplied, only the component prop will be used.</p>\n<p>It can be helpful to use render instead of component in your &#x3C;Route> when you need to pass props into the rendered component. For example, imagine that you needed to pass the users object as a prop to your Users component. Then you could pass in props from Root to Users by returning the Users component like so:</p>\n<p>As a reminder, BrowserRouter can only have a single child component. That's why you have wrapped all your routes within parent a &#x3C;div> element.</p>\n<p>With this Root component, you will always render the &#x3C;h1>Hi, I'm Root!&#x3C;/h1>, regardless of the path. Because of the first &#x3C;Route>, you will only render the App component if the path exactly matches /. Because of the second &#x3C;Route>, you will only render the Users component if the path matches /users.</p>\n<h1>Route path params</h1>\n<p>A component's props can also hold information about a URL's parameters. The router will match route segments starting at : up to the next /, ?, or #. Those matched values are then passed to components via their props. Such segments are <em>wildcard</em> values that make up your route parameters.</p>\n<p>For example, take the route below:</p>\n<p>The router would break down the full /users/:userId/photos path to two parts: /users, :userId.</p>\n<p>The Profile component's props would have access to the :userId part of the <a href=\"http://localhost:3000/users/:userId/photos\">http://localhost:3000/users/:userId/photos</a> URL through the props with router parameter information. You would access the the match prop's parameters (props.match.params). If you are using the render prop of the Route component, make sure to spread the props back into the component if you want it to know about the \"match\" parameters.</p>\n<p>The params object would then have a property of userId which would hold the value of the :userId <em>wildcard</em> value. Let's render the userId parameter in a user profile component. Take a moment to create a Profile.js file with the following code:</p>\n<p>Notice how it uses the match prop to access the :userId parameter from the URL. You can use this wildcard to make and AJAX call to fetch the user information from the database and render the return data in the Profile component. Recall that your Profile component was rendered at the path /users/:userId. Thus you can use your userId parameters from match.params to fetch a specific user:</p>\n<h1>Match</h1>\n<p>Now that you've seen your React Router's match prop in action, let's go over more about <a href=\"https://reacttraining.com/react-router/web/api/Route/route-props\">route props</a>! React Router passes information to the components as route props, accessible to all components with access to the React Router. The three props it makes available are location, match and history. You've learned about props.match.params, but now let's review the other properties of the match prop!</p>\n<p>This is an object that contains important information about how the current URL matches the route path. Here are some of the more useful keys on the match object:</p>\n<ul>\n<li>isExact: a boolean that tells you whether or not the URL exactly matches the path</li>\n<li>url: the current URL</li>\n<li>path: the route path it matched against (without wildcards filled in)</li>\n<li>params: the matches for the individual wildcard segments, nested under their names</li>\n</ul>\n<p>When you use React Router, the browser location and history are a part of the state of your app. You can store information about which component should be displayed, which user profile you are currently viewing, or any other piece of state, in the browser location. You can then access that information from anywhere your Router props are passed to in your app.</p>\n<p>Now that you've learned about parameters and route props, let's revisit your Root component to add an exact flag to your /users route so that it does not render with your /users/:userId route. Your component should look something like this:</p>\n<h1>What you learned</h1>\n<p>In this article, you learned how to:</p>\n<ul>\n<li>Use components from the React Router library; and</li>\n<li>Create routes to render specific components; and</li>\n<li>Manage the order of rendered routes; and</li>\n<li>Use the exact flag to ensure that a specific path renders a specific component; and</li>\n<li>Use the React Router match prop to access Router params.</li>\n</ul>\n<h1>React Router Navigation</h1>\n<p>Now that you know how to create front-end routes with React Router, you'll need to implement a way for your users to navigate the routes! This is what using React Router's Link, NavLink, Redirect, and history prop can help you do.</p>\n<p>In this article, you'll be working off of the demo project you built in the React Router Intro reading. When you finish this article, you should be able to use the following components from the react-router-dom library:</p>\n<ul>\n<li>&#x3C;Link> or &#x3C;NavLink> to create links with absolute paths to routes in your application (like \"/users/1\"); and,</li>\n<li>&#x3C;Redirect> to redirect a user to another path (i.e. a login page when the user is not logged in); and</li>\n<li>React Router's history prop to update a browser's URL programmatically.</li>\n</ul>\n<h1>Adding links for navigation</h1>\n<p>React Router's &#x3C;Link> is one way to simplify navigation around your app. It issues an on-click navigation event to a route defined in your app's router. Using &#x3C;Link> renders an anchor tag with a correctly set href attribute.</p>\n<h1>Link</h1>\n<p>To use it, update your imports from the react-router-dom package to include Link:</p>\n<p>Note that &#x3C;Link> can take two props: to and onClick.</p>\n<p>The to prop is a route location description that points to an absolute path, (i.e. /users). Add the following Link components in your index.js file above your routes:</p>\n<p>The onClick prop is just like any other JSX click handler. You can write a function that takes in an event and handles it. Add the following Link before your routes and the following click handler function within your Root component:</p>\n<p>Now, test your routes and links! If you inspect the page, you'll see that your links are now rendered as &#x3C;a> elements. Notice that clicking the App with click handler link logs a message in your console while directing your browser to render the App component.</p>\n<h1>NavLink</h1>\n<p>The &#x3C;NavLink> works just like a &#x3C;Link>, but with a little extra functionality. It has the ability to add extra styling when the path it links to matches the current path. This makes it an ideal choice for a navigation bar, hence the name. This styling can be controlled by three extra props: activeClassName, activeStyle, and exact. To begin using NavLink, update your imports from the react-router-dom package:</p>\n<p>The activeClassName prop of the NavLink component allows you to set a CSS class name for styling the NavLink when its route is active. By default, the activeClassName is already set to active. This means that you simply need to add an .active class to your CSS file to add active styling to your link. A NavLink will be active if its to prop path matches the current URL.</p>\n<p>Let's change your “Users”, “Hello”, and “Andrew's Profile” links to be different colors and have a larger font size when active.</p>\n<p>For example, this is what the rendered HTML &#x3C;a> tag would look like when when the browser is navigated to the / path or the /users path:</p>\n<p>Import NavLink into your index.js file and take a moment to update all your Link elements to NavLink elements. Set an activeClassName prop to an active class. Add the following .active class to your index.css file:</p>\n<p>Test your styled links! Notice how the App and App with click handler links are always bolded. This is because all of your links include the / path, meaning that the link to / will be active when browsing to /users and /users/1 because of how users and users/1 are both prefaced by a /.</p>\n<p>The activeStyle prop is a style object that will be applied inline to the NavLink when its to prop matches the current URL. Add the following activeStyle to your App link and comment out the .active class in your CSS file.</p>\n<p>The following html is rendered when at the / path:</p>\n<p>Notice how your App with click handler is not bolded anymore. This is because the default active class being applied does not have any CSS stylings set to the class. Uncomment your .active class in your CSS file to bring back bolding to this NavLink.</p>\n<p>The exact prop is a boolean that defaults to false. If set to true, then the activeStyle and activeClassName props will only be applied when the current URL exactly matches the to prop. Update your App and App with click handler links with an exact prop set. Just like in your routes, you can use the exact flag instead of exact={true}.</p>\n<p>Now your App and App with click handler links will only be bolded when you have navigated precisely to the / path.</p>\n<h1>Switching between routes</h1>\n<p>You came across styling issues when the /users and /users/1 paths matched the / path. Routing can have this issue as well. This is why you need to control the switching between routes.</p>\n<p>React Router's &#x3C;Switch> component allows you to only render one &#x3C;Route> even if several match the current URL. You can nest as many Routes as you wish between the opening and closing Switch tags, but only the first one that matches the current URL will be rendered.</p>\n<p>This is particularly useful if you want a default component that will only render if none of our other routes match. View the example below. Without the Switch, DefaultComponent would always render. Since there isn't set a path in the DefaultComponent route, it will simply use the default path of /. Now the DefaultComponent will only render when neither of the preceding routes match.</p>\n<p>Import Switch from react-router-dom and add &#x3C;Switch> tags around your routes to take care of ordering and switching between your routes! Begin by adding the following route to the bottom of your routes to render that a 404: Page not found message:</p>\n<p>This is what your Root component should look like at this point:</p>\n<p>Now you have control over the precedence of rendered components! Try navigating to <a href=\"http://localhost:3000/asdf\">http://localhost:3000/asdf</a> or any other route you have not defined. The &#x3C;h1>404: Page not found&#x3C;/h1> JSX of the last &#x3C;Route> will be rendered whenever the browser attempts to visit an undefined route.</p>\n<h1>Redirecting users</h1>\n<p>But what if you want to redirect users to a login page when they aren't logged in? The &#x3C;Redirect> component from React Router helps you redirect users!</p>\n<p>The component takes only one prop: to. When it renders, it replaces the current URL with the value of its to prop. Typically you conditionally render &#x3C;Redirect> to redirect the user away from some page you don't want them to visit. The example below checks whether there is a defined currentUser prop. If so, the &#x3C;Route> will render the Home component. Otherwise, it will redirect the user to the /login path.</p>\n<p>Note: you will learn how to use a more flexible auth pattern — don't directly imitate this example.</p>\n<h1>History</h1>\n<p>You know how to redirect users with a &#x3C;Redirect> component, but what if you need to redirect users programmatically? You've learned about the React Router's match prop, but now let's go over another one of the <a href=\"https://reacttraining.com/react-router/web/api/Route/route-props\">route props</a>: history!</p>\n<p>This prop lets you update the URL programmatically. For example, suppose you want to push a new URL when the user clicks a button. It has two useful methods:</p>\n<ul>\n<li>push - This adds a new URL to the end of the history stack. That means that clicking the back button will take the browser to the previous URL. Note that pushing the same URL multiple times in a row will have no effect; the URL will still only show up on the stack once. In development mode, pushing the same URL twice in a row will generate a console warning. This warning is disabled in production mode.</li>\n<li>replace - This replaces the current URL on the history stack, so the back button won't take you to it. For example:</li>\n</ul>\n<h1>What you learned</h1>\n<p>In this article, you learned how to:</p>\n<ul>\n<li>Create navigation links for your route paths; and</li>\n<li>Redirect users through using the &#x3C;Redirect> component; and</li>\n<li>Update a browser's URL programmatically by using React Router's history prop.</li>\n</ul>\n<h1>React Router Nested Routes<img src=\"https://miro.medium.com/max/60/0*233dNJ6vfgAmEVCD?q=20\"><img src=\"https://miro.medium.com/max/576/0*233dNJ6vfgAmEVCD\"><img src=\"https://miro.medium.com/max/60/0*TKBUkpbL5aSm5PTQ?q=20\"><img src=\"https://miro.medium.com/max/630/0*TKBUkpbL5aSm5PTQ\">\n\n</h1>\n<p>Now you know how to create front-end routes and add navigation with React Router. When initializing Express projects, you declare static routes. Static routes are routes that are declared when an application is initialized. When using React Router in your application's initialization, you can declare dynamic routes. React Router introduces dynamic routing, where your routes are created as your application is rendering. This allows you to create nested routes within components!</p>\n<p>In this article, let's dive into <a href=\"https://reacttraining.com/react-router/core/guides/philosophy/nested-routes\">nested routes</a>! When you finish the article, you should:</p>\n<ul>\n<li>Describe what nested routes are; and</li>\n<li>Be able to use React Router to create and navigate nested routes; and</li>\n<li>Know how to use the React Router match prop to generate links and routes.</li>\n</ul>\n<h1>Why nested routes?</h1>\n<p>Let's begin with why you might need nested routes. As you remember, you are using React to create a single-page application. This means that you'll be organizing your application into different components and sub-components.</p>\n<p>For example, imagine creating a simple front-end application with three main pages: a home welcome page (path of /), a users index page (path of /users), and user profile pages (path of /users/:userId). Now imagine if every user had links to separate posts and photos pages.</p>\n<p>You can create those routes and links within the user profile component, instead of creating the routes and links where the main routes are defined.</p>\n<h1>What are nested routes?</h1>\n<p>Now let's dive into a user profile component to understand what are nested routes! Imagine you have a route in your application's entry file to each user's profile like so:</p>\n<p>This means that upon navigating to <a href=\"http://localhost:3000/users/1\">http://localhost:3000/users/1</a>, you would render the following Profile component and the userId parameter within props.match.params would have the value of \"1\".</p>\n<p>Since this route is not created until the Profile component is rendered, you are dynamically creating your nested /users/:userId/posts and /users/:userId/photos routes. Remember that your match prop also has other helpful properties. You can use match.url instead of /users/${id} in your profile links. You can also use match.path instead of /users/:userId in your profile routes. Remember that you can destructure url, path, and params from your match prop!</p>\n<p>In tomorrow's project, you'll build a rainbow of routes as well as define nested routes. In the future, you may choose to implement nested routes to keep your application's routes organized within related components.</p>\n<h1>What you learned</h1>\n<p>In this article, you learned:</p>\n<ul>\n<li>What nested routes are; and</li>\n<li>About creating and navigating nested routes with React Router; and</li>\n<li>How to use the React Router props to generate nested links and routes.</li>\n</ul>\n<h1>React Builds</h1>\n<p>A “build” is the process of converting code into something that can actually execute or run on the target platform. A “front-end build” is a process of preparing a front-end or client-side application for the browser.</p>\n<p>With React applications, that means (at a minimum) converting JSX to something that browsers can actually understand. When using Create React App, the build process is automatically configured to do that and a lot more.</p>\n<p>When you finish this article, you should be able to:</p>\n<ul>\n<li>Describe what front-end builds are and why they're needed;</li>\n<li>Describe at a high level what happens in a Create React App when you run npm start; and</li>\n<li>Prepare to deploy a React application into a production environment.</li>\n</ul>\n<h1>Understanding front-end builds</h1>\n<p>The need for front-end builds predates React. Over the years, developers have found it helpful to extend the lowest common denominator version of JavaScript and CSS that they could use.</p>\n<p>Sometimes developers extend JavaScript and CSS with something like <a href=\"https://www.typescriptlang.org/\">TypeScript</a> or <a href=\"https://sass-lang.com/\">Sass</a>. Using these non-standard languages and syntaxes require you to use a build process to convert your code into standard JavaScript and CSS that can actually run in the browser.</p>\n<p>Browser-based applications also require a fair amount of optimization to deliver the best, or at least acceptable, experience to end users. Front-end build processes could be configured to lint code, run unit tests, optimize images, minify and bundle code, and more — all automatically at the press of a button (i.e. running a command at the terminal).</p>\n<h1>JavaScript versions and the growth of front-end builds</h1>\n<p>Developers are generally an impatient lot. When new features are added to JavaScript, we don't like to wait for browsers to widely support those features before we start to use them in our code. And we <em>really</em> don't like when we have to support older, legacy versions of browsers.</p>\n<p>In recent years, JavaScript has been updated on a yearly basis and browser vendors do a decent job of updating their browsers to support the new features as they're added to the language. Years ago though, there was an infamous delay between versions 5 and 6 of JavaScript. It took <em>years</em> before ES6 (or ES2015 as it eventually was renamed to) to officially be completed and even longer before browsers supported all of its features.</p>\n<p>In the period of time before ES2015 was broadly supported by browsers, developers used front-end builds to convert or <em>transpile</em> ES2015 features and syntax to an older version of the language that was more broadly supported by browsers (typically ES5). The transpilation from ES2015/ES6 down to ES5 was one of the major drivers for developers to add front-end builds to their client-side projects.</p>\n<h1>Reviewing common terminology</h1>\n<p>When learning about front-end or React builds, you'll encounter a lot of terminology that you may or may not be familiar with. Here's some of the terminology that you'll likely encounter:</p>\n<p>Linting is process of using a tool to analyze your code to catch common programming errors, bugs, stylistic inconsistencies, and suspicious coding patterns. <a href=\"https://eslint.org/\">ESLint</a> is a popular JavaScript linting tool.</p>\n<p>Transpilation is the process of converting source code, like JavaScript, from one version to another version. Usually this means converting newer versions of JavaScript, <a href=\"https://www.ecma-international.org/ecma-262/10.0/index.html\">ES2019</a> or <a href=\"https://tc39.es/ecma262/\">ES2021</a>, to a version that's more widely supported by browsers, like <a href=\"http://www.ecma-international.org/ecma-262/6.0/\">ES2015</a>, or even <a href=\"https://www.ecma-international.org/ecma-262/5.1/\">ES5</a> or <a href=\"https://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf\">ES3</a> (if you need to support the browser that your parents or grandparents use).</p>\n<p>Minification is the process of removing all unnecessary characters in your code (e.g. white space characters, new line characters, comments) to produce an overall smaller file. Minification tools will often also rename identifers in your code (i.e. parameter and variable names) in the quest for smaller and smaller file sizes. Source maps can also be generated to allow debugging tools to cross reference between minified code and the original source code.</p>\n<p>Bundling is the process of combining multiple code files into a single file. Creating a bundle (or a handful of bundles) reduces the number of requests that a client needs to make to the server.</p>\n<p>Tree shaking is the process of removing unused (or dead) code from your application before it's bundled. Tree shaking external dependencies can sometimes have a dramatic positive impact on overall bundled file sizes.</p>\n<h1>Configuration or code?</h1>\n<p>Front-end build tools have come and gone over the years; sometimes very quickly, which helped bring about the phenomenon known as <a href=\"https://sdtimes.com/softwaredev/is-the-javascript-fatigue-real/\">JavaScript fatigue</a>.</p>\n<p>Configuration based tools allow you to create your build tasks by declaring (usually using JSON, XML, or YAML) what you want to be done, without explicitly writing every step in the process. In contrast, coding or scripting based tools allow you to, well, write code to create your build tasks. Configuration based tools <em>can</em> sometimes feel simpler to use while giving up some control (at least initially) while coding based tools <em>can</em> feel more familiar and predictable (since you're describing tasks procedurally). Every generalization is false though (including this one), so there are plenty of exceptions.</p>\n<p><a href=\"https://gruntjs.com/\">Grunt</a> is a JSON configuration based task runner that can be used to orchestrate the various tasks that make up your front-end build. Grunt was very quickly supplanted by <a href=\"https://gulpjs.com/\">Gulp</a>, which allowed developers to write JavaScript to define front-end build tasks. After Gulp, the front-end tooling landscape became a bit more muddled. Some developers preferred the simplicity of using <a href=\"https://docs.npmjs.com/misc/scripts\">npm scripts</a> to define build tasks while others preferred the power of configuration based bundlers like <a href=\"https://webpack.js.org/\">webpack</a>.</p>\n<h1>Babel and webpack (yes, that's intentionally a lowercase 'w')</h1>\n<p>As front-end or client-side applications grew in complexity, developers found themselves wanting to leverage more advanced JavaScript features and newer syntax like classes, arrow functions, destructuring, async/await, etc. Using a code transpiler, like <a href=\"https://babeljs.io/\">Babel</a>, allows you to use all of the latest and greatest features and syntax without worrying about what browsers support what.</p>\n<p>Module loaders and bundlers, like <a href=\"https://webpack.js.org/\">webpack</a>, also allowed developers to use JavaScript modules without requiring users to use a browser that natively supports ES modules. Also, module bundling (along with minification and tree-shaking) helps to reduce the bandwidth that's required to deliver the assets for your application to the client.</p>\n<p>[Create React App][cra] uses webpack (along with Babel) under the covers to build your React applications. Even if you're not using Create React App, webpack and Babel are still very popular choices for building React applications.</p>\n<h1>Pulling back the covers (a bit) on the Create React App build process</h1>\n<p>Running an application created by Create React App using npm start can feel magical. Some stuff happens in the terminal and your application opens into your default browser. Even better, when you make changes to your application, your changes will (usually) automatically appear in the browser!</p>\n<h1>The Create React App build process</h1>\n<p>At a high level, here's what happens when you run npm start:</p>\n<ul>\n<li>Environment variables are loaded (more about this in a bit);</li>\n<li>The list of browsers to support are checked (more about this too in a bit);</li>\n<li>The configured HTTP port is checked to ensure that it's available;</li>\n<li>The application compiler is configured and created;</li>\n<li><a href=\"https://webpack.js.org/configuration/dev-server/\">webpack-dev-server</a> is started;</li>\n<li><a href=\"https://webpack.js.org/configuration/dev-server/\">webpack-dev-server</a> compiles your application;</li>\n<li>The index.html file is loaded into the browser; and</li>\n<li>A file watcher is started to watch your files, waiting for changes.</li>\n</ul>\n<h1>Ejecting</h1>\n<p>Create React App provides a script that you can run to “eject” your application from the Create React App tooling. When you eject your application, all of the hidden stuff is exposed so that you can review and customize it.</p>\n<blockquote>\n<p><em>The need to customize Create React App rarely happens. Also, don't eject an actual project as it's a one-way trip! Once a Create React App project has been ejected, there's no going back (though you could always undo the ejection process by reverting to an earlier commit if you're using source control).</em></p>\n</blockquote>\n<p>To eject your application from Create React App, run the command npm run eject. You'll be prompted if you want to continue; type \"y\" to continue with the ejection process. Once the ejection process has completed, you can review the files that were previously hidden from you.</p>\n<p>In the package.json file, you'll see the following npm scripts:</p>\n<p>You can open the ./scripts/start.js file to see the code that's executed when you run npm start.</p>\n<p>If you're curious about the webpack configuration, you can open and review the ./config/webpack.config.js.</p>\n<h1>Preparing to deploy a React application for production</h1>\n<p>Before you deploy your application to production, you'll want to make sure that you've replaced static values in your code with environment variables and considered what browsers you need to support.</p>\n<h1>Defining environment variables</h1>\n<p>Create React App supports defining environment variables in an .env file. To define an environment variable, add an .env file to your project and define one or more variables that start with the prefix REACT<em>APP\\</em>:</p>\n<p>Environment variables can be used in code like this:</p>\n<p>You can also reference environment variables in your index.html like this:</p>\n<blockquote>\n<p><em>Important: Environment variables are embedded into your HTML, CSS, and JavaScript bundles during the build process. Because of this, it's very important to not store any secrets, like API keys, in your environment variables as anyone can view your bundled code in the browser by inspecting your files.</em></p>\n</blockquote>\n<h1>Configuring the supported browsers</h1>\n<p>In your project's package.json file, you can see the list of targeted browsers:</p>\n<p>Adjusting these targets affect how your code will be transpiled. Specifying older browser versions will result in your code being transpiled to older versions of JavaScript in order to be compatible with the specified browser versions. The production list specifies the browsers to target when creating a production build and the development list specifics the browsers to target when running the application using npm start.</p>\n<p>The <a href=\"https://browserl.ist/\">browserl.ist</a> website can be used to see the browsers supported by your configured browserslist.</p>\n<h1>Creating a production build</h1>\n<p>To create a production build, run the command npm run build. The production build process bundles React in production mode and optimizes the build for the best performance. When the command completes, you'll find your production ready files in the build folder.</p>\n<p>Now your application is ready to be deployed!</p>\n<blockquote>\n<p><em>For more information about how to deploy a Create React App project into production, see _[</em>this page<em>](<a href=\"https://facebook.github.io/create-react-app/docs/deployment\">https://facebook.github.io/create-react-app/docs/deployment</a>)</em> in the official documentation._</p>\n</blockquote>\n<h1>What you learned</h1>\n<p>In this article, you learned how to:</p>\n<ul>\n<li>Describe what front-end builds are and why they're needed;</li>\n<li>Describe at a high level what happens in a Create React App when you run npm start; and</li>\n<li>Prepare to deploy a React application into a production environment.</li>\n</ul>\n<h1>React Router Documentation</h1>\n<p>Now that you've had an introduction to React Router, feel free to explore the official documentation to learn more! As you become a full-fledged software engineer, remember that documentation is your friend. You can take a brief overview for now, as the documentation might include a lot of information at first. The more you learn about React, the more you should revisit the official documentation and learn!</p>\n<h1>Setting up React Router</h1>\n<ul>\n<li><a href=\"https://reacttraining.com/react-router/web/guides/quick-start\">React Router Quick Start</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/HashRouter\">HashRouter</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/BrowserRouter\">BrowserRouter</a></li>\n</ul>\n<h1>Routes and Links</h1>\n<ul>\n<li><a href=\"https://reacttraining.com/react-router/web/api/Route\">Route</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/Link\">Link</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/NavLink\">NavLink</a></li>\n</ul>\n<h1>Switch and Redirect</h1>\n<ul>\n<li><a href=\"https://reacttraining.com/react-router/web/api/Switch\">Switch</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/Redirect\">Redirect</a></li>\n</ul>\n<h1>React Router Params (ownProps)</h1>\n<ul>\n<li><a href=\"https://reacttraining.com/react-router/web/api/history\">props.history</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/location\">props.location</a></li>\n<li><a href=\"https://reacttraining.com/react-router/web/api/match\">props.match</a></li>\n</ul>\n<h1>Rainbow Routes Project</h1>\n<p>Today you're going to get our first experience using React Router. The goal is to create a basic app that displays the colors of the rainbow. This rainbow, however, has something special about it — some of the colors are nested within others.</p>\n<h1>Phase 0: Setup</h1>\n<p>Begin by creating a new React project:</p>\n<p>Now you'll remove all the contents of your src and all the contents from your public directory to build the application architecture from scratch! After you have deleted all your files within the directories, create a new index.html file in your public folder. Use the html:5 emmet shortcut to generate an HTML template. Title your page \"Rainbow Routes\" and create a div with an id of root in your DOM's &#x3C;body> element. Create an index.css file in your src directory with the following code. Now let's create your entry file!</p>\n<p>Create an index.js entry file in the src directory. At the top of the file, make sure to import React from the react package and ReactDOM from the react-dom package. Make sure to also import your the index.css file you just created! This will take care of styling your <em>rainbow routes</em>.</p>\n<p>Now you can use the ReactDOM.render() method to render a &#x3C;Root /> component instead of the DOM element with an id of root. Lastly, wrap your render function with a DOMContentLoaded event listener, like so:</p>\n<p>Let's create your Root component right in your entry file! Your Root component will take care of applying your BrowserRouter to the application. Applying the BrowserRouter to your Root component allows all the child components rendering within &#x3C;BrowserRouter> tags to use and access the Route, Link, and NavLink components within the react-router-dom package.</p>\n<p>Install the react-router-dom package:</p>\n<p>Now import BrowserRouter from the react-router-dom package, like so:</p>\n<p>You're going to be rendering a lot of components, so let's keep your src directory organized by creating a components directory within. Within your new ./src/components directory, create a Rainbow.js file for your Rainbow component with the following code:</p>\n<p>Your Rainbow component will act as the home page or default path (/) of your application. Import the Rainbow component into your entry file and have your Root component render &#x3C;Rainbow /> wrapped within &#x3C;BrowserRouter> tags, like so:</p>\n<p>Within your Rainbow component, you'll be rendering &#x3C;NavLink> and &#x3C;Route> components to add different navigation paths to different components. Let's create all the components you will render!</p>\n<p>Create files for the following components in your ./src/components directory:</p>\n<ul>\n<li>Red</li>\n<li>Blue</li>\n<li>Green</li>\n<li>Indigo</li>\n<li>Orange</li>\n<li>Violet</li>\n<li>Yellow</li>\n</ul>\n<p>Your Red and Blue components will look something like this:</p>\n<p>Your Green, Indigo, Orange, Violet, and Yellow components will look something like this:</p>\n<p>Now start your server and verify you can see the “Rainbow Router!” header from your Rainbow component. Currently there is no functionality. Let's fix that!</p>\n<h1>Phase 1: Routes</h1>\n<p>As a reminder, wrapping the Rainbow component in &#x3C;BrowserRouter> tags makes the router available to all descendent React Router components. Now open the Rainbow.js file. You're going to render some of your color components from here. Ultimately you want your routes to look like this.</p>\n<p>URLComponents/Rainbow/redRainbow -> Red/red/orangeRainbow -> Red -> Orange/red/yellowRainbow -> Red -> Yellow/greenRainbow -> Green/blueRainbow -> Blue/blue/indigoRainbow -> Blue -> Indigo/violetRainbow -> Violet</p>\n<p>This means that the Red, Green, Blue, and Violet components need to render in the Rainbow component, but only when you are at the corresponding URL. You'll do this with Route components. Begin by importing the Red, Green, Blue, and Violet components into your Rainbow.js file. Then add the necessary Route components inside the div with id=\"rainbow\" in the Rainbow component. For example to render the Red component with the /red path, you would use the following Route component:</p>\n<p>Test that your code works! Manually type in each URL you just created, and you should see the color component pop up. Remember, these are React Routes, so the paths you created will come after the /. For example, your default rainbow route will look like <a href=\"http://localhost:3000/\">http://localhost:3000/</a> while your red route will look like <a href=\"http://localhost:3000/red.\">http://localhost:3000/red</a><a href=\"http://localhost:3000/red.\">.</a></p>\n<p>You want to nest the Orange and Yellow components inside the Red component, and the Indigo component inside the Blue component. Remember to import your components to use them in a Route tag. You'll have to go add the corresponding Route tags to the Red.js and Blue.js files. Make sure to use the correct nested paths, such as \"/red/orange\" for the orange Route.</p>\n<h1>Phase 2: Links</h1>\n<p>Manually navigating to our newly created routes is tiresome, so let's add functionality to take care of this process for us. React Router provides the Link and NavLink components for this purpose.</p>\n<p>Add Links to the paths /red, /green, /blue, and /violet in the Rainbow component. For example, your red link should look like</p>\n<p>When you are at blue you want to be able to get to /blue/indigo, and then back to /blue. Add the corresponding Links to the Blue component like this:</p>\n<p>Similarly, add Links to /red, /red/orange and /red/yellow to the Red component. Test all your links. Navigation is so much easier now!</p>\n<h1>Phase 3: NavLinks</h1>\n<p>It would be nice if our links gave us some indication of which route you were at. Fortunately, React Router has a special component for that very purpose: NavLink. NavLinks get an extra CSS class when their to prop matches the current URL. By default this class is called active.</p>\n<p>Go ahead and switch all your Links to NavLinks. If you open the app you won't see any change yet. That's because you haven't added any special styling to the active class. Go ahead and open the index.css file. Create an .active class and add the line font-weight: 700. Now your active links will be bold. Isn't that nice!</p>\n<p>The only problem is that now the Blue only link is active even when the path is /blue/indigo. That doesn't make a lot of sense. Let's add the exact flag to that link so it will only be active when its to exactly matches the current path. Now it should look like:</p>\n<p>Do the same for the Red only link. Everything should be working now.</p>\n<h1>Phase 4 — Changing NavLink's Active Class</h1>\n<p>You've already set up NavLink to bold the link text using the .active class in src/index.css. But what if you wanted this class to be something else? For instance, what if you want your main color links (Red, Green, Blue, Violet) to be styled differently when active than your sub-route links (Red Only, Add Orange, Add Yellow, etc.).</p>\n<p>You can set the class that React Router sets to an active NavLink by adding the activeClassName prop.</p>\n<p>For instance, when we are at a route matching the below NavLink's to prop, the component will have a class of .parent-active applied:</p>\n<p>This allows much more flexibility to style an active NavLink!</p>\n<p>Using the example above, add an activeClassName prop to each of your NavLinks in src/components/Rainbow.js. Now, add some CSS styling for that class in your src/index.css to distinguish your main and your sub-route links.</p>\n<p>Compare your work to the solution and make sure the behavior is the same. Time to celebrate! ✨ 🌈 ✨</p>\n<p>You can also learn more about using the React Router at <a href=\"https://reacttraining.com/react-router/web/guides/quick-start\">reacttraining.com</a>!</p>\n<h1>Exploring React Builds Project</h1>\n<p>In this project, you'll use Create React App to create a simple React application. You'll experiment with some of the features that Create React App provides and deploy a production build of your application to a standalone Express application.</p>\n<h1>Phase 0: Setup</h1>\n<p>Begin by using the <a href=\"https://github.com/facebook/create-react-app\">create-react-app</a> package to create a React application:</p>\n<blockquote>\n<p><em>Remember that using the create-react-app command initializes your project as a Git repository. If you use the ls -a to view the hidden files in your project, you'll see the .git file.</em></p>\n</blockquote>\n<p>Update the App component:</p>\n<ul>\n<li>Wrap the &#x3C;h1> element with a &#x3C;div> element; and</li>\n<li>Change the &#x3C;h1> element content to something like \"Exploring React Builds\".</li>\n</ul>\n<h1>Phase 1: Using CSS modules</h1>\n<p>You've already seen an example of using the import keyword to import a stylesheet into a module so that it'll be included in your application build. That's the technique being used to include the global index.css stylesheet:</p>\n<p>You can also leverage <a href=\"https://github.com/css-modules/css-modules\">CSS modules</a> in your Create React App projects. CSS Modules scope stylesheet class names so that they are unique to a specific React component. This allows you to create class names without having to worry if they might collide with class names used in another component.</p>\n<p>Add a new css-modules folder to the src folder. Within that folder, add the following files:</p>\n<ul>\n<li>HeadingA.js</li>\n<li>HeadingA.module.css</li>\n<li>HeadingB.js</li>\n<li>HeadingB.module.css</li>\n</ul>\n<p>Then update the contents of each file to the following:</p>\n<p>Notice how the .heading CSS class name is being used within each component to set the color of the &#x3C;h1> element. For the HeadingA component, the color is green, and for the HeadingB component, the color is red. Using the file naming convention [name].module.css let's Create React App know that we want these stylesheets to be processed as CSS Modules. Using CSS Modules allows the .heading class name to be reused across components without any issue.</p>\n<p>To see this feature in action, update your App component to render both of your new components:</p>\n<p>Then run your application (npm start) to see \"Heading A\" and \"Heading B\" displayed respectively in green and red. If you use the browser's developer tools to inspect \"Heading A\", you'll see that the .heading class name has been modified so that it's unique to the HeadingA component:</p>\n<p>CSS Modules is an example of how a front-end build process can be used to modify code to enable a feature that's not natively supported by browsers.</p>\n<h1>Phase 2: Using an image in a component</h1>\n<p>Create React App configures webpack with support for loading images (as well as CSS, fonts, and other file types). What this means, for you as the developer, is that you can add an image file to your project, import it directly into a module, and render it in a React component.</p>\n<p>Download any image of off the Web or <a href=\"https://appacademy-open-assets.s3-us-west-1.amazonaws.com/Modular-Curriculum/content/react-redux/topics/react-builds/assets/react-builds-cat.png\">click here</a> to download the below image.</p>\n<p>Then within the src folder add a new folder named image. Within that folder add a new component file named Image.js. Also add your downloaded image file to the image folder (so it's a sibling to the Image.js file).</p>\n<p>Update the contents of the Image.js file to this:</p>\n<p>You can import an image into a component using the import keyword. This tells webpack to include the image in the build. Notice that when you import an image into a module, you'll get a path to the image's location within the build. You can use this path to set the src attribute on an &#x3C;img> element.</p>\n<blockquote>\n<p><em>Be sure to update the image import statement to the correct file name if you're using your own image!</em></p>\n</blockquote>\n<p>Now update the App component to import and render the Image component:</p>\n<p>If you run your application (npm start) you'll see your image displayed on the page! You can also open your browser's developer tools and view the \"Sources\" for the current page. If you can expand the localhost:3000 > static > media node on the left, you can see the image file that webpack copied to your build.</p>\n<h1>Images in stylesheets</h1>\n<p>You can also reference images in your CSS files too. Add a CSS file named Image.css to the ./src/image folder and update its contents to this:</p>\n<p>Then update the Image component to this:</p>\n<p>Now you'll see the image displayed twice on the page!</p>\n<h1>Phase 3: Updating the supported browsers (and its affect on code transpilation)</h1>\n<p>Earlier you learned about the browerslist setting in the package.json file and now adjusting these targets affect how your code will be transpiled:</p>\n<p>The production list specifies the browsers to target when creating a production build and the development list specifics the browsers to target when running the application using npm start. Currently, you're targeting relatively recent versions of the major browsers when creating a development build. Targeting older browser versions results in your code being transpiled to an older version of JavaScript.</p>\n<p>To experiment with this configuration option, let's add a class component to the project. Add a new folder named class-component to the src folder. Within that folder, add a file named ClassComponent.js containing the following code:</p>\n<p>Don't forget to update your App component to render the new component:</p>\n<p>Now run your application using npm start. Open your browser's developer tools and view the \"Sources\" for the current page. Expand the localhost:3000 > static > js node on the left and select the main.chunk.js file. Press CMD+F on macOS or CTRL+F on Windows to search the file for \"Class Component\". Here's what the transpiled code looks like for the ClassComponent class:</p>\n<blockquote>\n<p><em>Have you wondered yet why you need to use the developer tools to view the bundles generated by Create React App? Remember that when you run npm start, Create React App builds your application using _[</em>webpack-dev-server<em>](<a href=\"https://webpack.js.org/configuration/dev-server/\">https://webpack.js.org/configuration/dev-server/</a>)</em>. To keep things as performant as possible, the bundles generated by <em>[</em>webpack-dev-server<em>](<a href=\"https://webpack.js.org/configuration/dev-server/\">https://webpack.js.org/configuration/dev-server/</a>)</em> are stored in memory instead of writing them to the file system._</p>\n</blockquote>\n<p>The JSX in the component's render method has been converted to JavaScript but the ClassComponent ES2015 class is left alone. This makes sense though as JSX isn't natively supported by any browser while ES2015 classes have been natively supported by browsers for awhile now.</p>\n<p>But what if you need to target a version of a browser that doesn't support ES2015 classes? You can use the <a href=\"https://caniuse.com/#feat=es6-class\">“Can I use…”</a> website to see when browsers started supporting ES2105 (or ES6) classes. Starting with version 49, Chrome natively supported classes. But imagine that you need to support Chrome going back to version 30, a version of Chrome that doesn't support classes.</p>\n<p>Change the browserslist.development property in the package.json file to this:</p>\n<p>The query chrome >= 30 specifies that you want to target Chrome version 30 or newer.</p>\n<blockquote>\n<p><em>The _[</em>browserl.ist<em>](<a href=\"https://browserl.ist/\">https://browserl.ist/</a>)</em> website can be used to see the browsers supported by your configured browserslist._</p>\n</blockquote>\n<p>Stop your application if it's currently running. Delete the ./node_modules/.cache folder and run npm start again. Then view the main.chunk.js bundle again in the developer tools:</p>\n<p>Now your ES2015 class component is being converted to a constructor function! Here's the transpiled code for reference:</p>\n<p>Luckily it's very rare that you'll need to read the code in your generated bundles. webpack, by default, is configured to generate sourcemaps. Sourcemaps are a mapping of the code in a generated file, like a bundle file, to the original source code. This gives you access to your original source code in the browser's developer tools:</p>\n<p>You can even set a breakpoint in your source within the developer tools to stop execution on a specific line of code!</p>\n<h1>Phase 4: Adding environment variables</h1>\n<p>Earlier you learned that Create React App supports defining environment variables in an .env file. This gives you a convenient way to avoid hard coding values that vary across environments.</p>\n<p>Let's experiment with this feature so that you can see how the Create React App build process embeds environment variables into your HTML, CSS, and JavaScript bundles.</p>\n<p>Add an .env file to the root of your Create React App project. Define an environment variable named REACT<em>APP</em>TITLE:</p>\n<p>Remember that environment variables need to be prefixed with REACT<em>APP</em> for Create React App to process them. After defining your environment variable, you can refer to it within JSX using an expression and process.env:</p>\n<p>Environment variables can also be referred to in regular JavaScript code:</p>\n<p>You can also reference environment variables in your ./public/index.html file like this:</p>\n<p>Run your application again using npm start. Open your browser's developer tools and view the \"Sources\" for the current page. Expand the localhost:3000 node on the left and select (index). Notice that the text %REACT<em>APP</em>TITLE% within the &#x3C;title> element has been converted to the text literal Exploring React Builds:</p>\n<p>If you expand the localhost:3000 > static > js node on the left and select the main.chunk.js file, you can see how the App component's JSX has been converted to JavaScript:</p>\n<p>Here's a closer look at the relevant React.createElement method call:</p>\n<p>Again, notice how the environment variable has been replaced with a text literal. This has important security implications for you to consider. Because environment variables are embedded into your HTML, CSS, and JavaScript bundles during the build process, it's <em>very important</em> to not store any secrets, like API keys, in your environment variables. Remember, anyone can view your bundled code in the browser by inspecting your files!</p>\n<h1>Phase 5: Deploying a production build</h1>\n<p>In the last phase of this project, let's add routing to the React application, create a production build, and deploy the build to an Express application!</p>\n<h1>Adding routing</h1>\n<p>To add React Router to the application, start by installing the react-router-dom npm package:</p>\n<p>Then update the App component to this code:</p>\n<p>Be sure to run and test your application to ensure that the defined routes work as expected:</p>\n<ul>\n<li>/ - Should display the HeadingA and HeadingB components;</li>\n<li>/image - Should display the Image component; and</li>\n<li>/class-component - Should display the ClassComponent component.</li>\n</ul>\n<h1>Creating a production build</h1>\n<p>To create a production build, run the command npm run build from the root of your project. The output in the terminal should look something like this:</p>\n<p>Ignore the comments about using serve to deploy your application (i.e. npm install -g serve and serve -s build). In the next step, you'll create a simple Express application to server your React application.</p>\n<h1>Serving a React application using Express</h1>\n<p>Create a new folder for your Express application outside of the Create React App project folder.</p>\n<blockquote>\n<p><em>For example, from the root of your project, use cd .. to go up a level and then create a new folder named express-server by running the command mkdir express-server. This makes the express-server folder a sibling to your Create React App project folder.</em></p>\n</blockquote>\n<p>Browse into the express-server folder and initialize it to use npm (i.e. npm init -y). Then install Express by running the command npm install express@^4.0.0.</p>\n<p>App a file named app.js with the following contents:</p>\n<p>This simple Express application will:</p>\n<ul>\n<li>Attempt to match incoming requests to static files located in the public folder; and</li>\n<li>If a matching static file isn't found, then the ./public/index.html file will be served for all other requests.</li>\n</ul>\n<p>Now add a folder named public to the root of your Express project. Copy the files from the build folder in your Create React App project to the public folder in the Express application project. Then run your application using the command node app.js.</p>\n<p>Open a browser and browse to the URL <a href=\"http://localhost:9000/\">http://localhost:9000/</a>. You should see your React application served from your Express application! Be sure to click the navigation links to verify that all of your configured routes work as expected.</p>\n<p>Also, because you configured Express to serve the ./public/index.html file for any request that doesn't match a static file, you can \"deep link\" to any of your React application's routes:</p>\n<ul>\n<li><a href=\"http://localhost:9000/image\">http://localhost:9000/image</a></li>\n<li><a href=\"http://localhost:9000/class-component\">http://localhost:9000/class-component</a></li>\n</ul>\n<h1>A Comprehensive Deep Dive into React</h1>\n<p>An in-depth look into the world of React.</p>\n<hr>\n<h3>React in Depth: A Comprehensive Guide</h3>\n<h4>A deep dive into the world of React.</h4>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*LnugLVhKbiGfSSHr\" alt=\"Photo by Ferenc Almasi on Unsplash\" class=\"graf-image\" /><figcaption>Photo by <a href=\"https://unsplash.com/@flowforfrank?utm_source=medium&amp;utm_medium=referral\" class=\"markup--anchor markup--figure-anchor\">Ferenc Almasi</a> on <a href=\"https://unsplash.com?utm_source=medium&amp;utm_medium=referral\" class=\"markup--anchor markup--figure-anchor\">Unsplash</a></figcaption></figure><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"markup--anchor markup--mixtapeEmbed-anchor\" title=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\"><strong>ALLOFMYOTHERARTICLES</strong><br />\nbryanguner.medium.com</a><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b\" class=\"js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock\"></a>\n<h3>Random Things to Remember</h3>\n<ul>\n<li><span id=\"1e39\">Using <code>()</code> implictly returns components.</span></li>\n<li><span id=\"a547\">Role of <code>index.js</code> is to <em>render</em> your application.</span></li>\n<li><span id=\"c38f\">The reference to <code>root</code> comes from a div in the body of your public HTML file.</span></li>\n<li><span id=\"a364\">State of a component is simply a regular JS Object.</span></li>\n<li><span id=\"d64b\">Class Components require <code>render()</code> method to return JSX.</span></li>\n<li><span id=\"fa3d\">Functional Components directly return JSX.</span></li>\n<li><span id=\"4928\"><code>Class</code> is <code>className</code> in React.</span></li>\n<li><span id=\"e51a\">When parsing for an integer just chain <code>Number.parseInt(\"123\")</code></span></li>\n<li><span id=\"2924\">Use ternary operator if you want to make a conditional inside a fragment.</span></li>\n</ul>\n<!-- -->\n<pre><code>{ x === y ? &#x3C;div>Naisu&#x3C;/div> : &#x3C;div>Not Naisu&#x3C;/div>; }\n</code></pre>\n<ul>\n<li><span id=\"ccda\">Purpose of <code>React.Fragment</code> is to allow you to create groups of children without adding an extra dom element.</span></li>\n</ul>\n<hr>\n<h3>Front-End History</h3>\n<ul>\n<li><span id=\"904c\">React makes it easier for you to make front-end elements. A front-end timeline</span></li>\n<li><span id=\"646a\">Some noteworthy front end libraries that have been used in the past few years:</span></li>\n<li><span id=\"febf\">2005: Script.aculo.us</span></li>\n<li><span id=\"d5ae\">2005: Dojo</span></li>\n<li><span id=\"0657\">2006: YUI</span></li>\n<li><span id=\"c1f9\">2010: Knockout</span></li>\n<li><span id=\"e742\">2011: AngularJS</span></li>\n<li><span id=\"ed7b\">2012: Elm</span></li>\n<li><span id=\"06e4\">2013: React (Considered the standard front-end library)</span></li>\n<li><span id=\"4ff0\">React manages the creation and updating of DOM nodes in your Web page.</span></li>\n<li><span id=\"53cd\">All it does is dynamically render stuff into your DOM.</span></li>\n<li><span id=\"c393\">What it doesn't do:</span></li>\n<li><span id=\"3088\">Ajax</span></li>\n<li><span id=\"54ee\">Services</span></li>\n<li><span id=\"5e4a\">Local Storage</span></li>\n<li><span id=\"a437\">Provide a CSS framework</span></li>\n<li><span id=\"06e5\">React is unopinionated</span></li>\n<li><span id=\"721c\">Just contains a few rules for developers to follow, and it just works.</span></li>\n<li><span id=\"e2c0\">JSX : Javascript Extension is a language invented to help write React Applications (looks like a mixture of JS and HTML)</span></li>\n<li><span id=\"916b\">Here is an overview of the difference between rendering out vanilla JS to create elements, and JSX:</span></li>\n</ul>\n<!-- -->\n<pre><code>fetch(\"https://example.com/api/people\")\n  .then((response) => response.json())\n  .then((people) => {\n    const html = \"&#x3C;ul>\";\n    for (let person of data.people) {\n      html += `&#x3C;li>${person.lastName}, ${person.firstName}&#x3C;/li>`;\n    }\n    html += \"&#x3C;/ul>\";\n    document.querySelector(\"#people-list\").innerHTML = html;\n  });\n\nfunction PeopleList(props) {\n  return (\n    &#x3C;ul>\n      $\n      {props.people.map((person) => (\n        &#x3C;li>\n          {person.lastName}, {person.firstName}\n        &#x3C;/li>\n      ))}\n    &#x3C;/ul>\n  );\n}\nconst peopleListElement = document.querySelector(\"#people-list\");\nfetch(\"https://example.com/api/people\")\n  .then((response) => response.json())\n  .then((people) => {\n    const props = { people };\n    ReactDOM.render(&#x3C;PeopleList props={props} />, peopleListElement);\n  });\n</code></pre>\n<ul>\n<li><span id=\"7ea4\">This may seem like a lot of code but when you end up building many components, it becomes nice to put each of those functions/classes into their own files to organize your code. Using tools with React</span></li>\n<li><span id=\"e220\"><code>React DevTools</code> : New tool in your browser to see ow React is working in the browser</span></li>\n<li><span id=\"9051\"><code>create-react-app</code> : Extensible command-line tool to help generate standard React applications.</span></li>\n<li><span id=\"af96\"><code>Webpack</code> : In between tool for dealing with the extra build step involved.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*LHVHf7SPZ1t0UVAj\" class=\"graf-image\" /></figure>-   <span id=\"e0ad\">HMR : (Hot Module Replacement) When you make changes to your source code the changes are delivered in real-time.</span>\n-   <span id=\"923a\">React Developers created something called `Flux Architecture` to moderate how their web page consumes and modifies data received from back-end API's.</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*wR-lbD4zf45-IHoQ\" class=\"graf-image\" /></figure>-   <span id=\"b16e\">Choosing React</span>\n-   <span id=\"eefd\">Basically, React is super important to learn and master.</span>\n<hr>\n<h3>React Concepts and Features</h3>\n<p>There are many benefits to using React over just Vanilla JavaScript.</p>\n<ul>\n<li><span id=\"8107\"><code>Modularity</code></span></li>\n<li><span id=\"15ac\">To avoid the mess of many event listeners and template strings, React gives you the benefit of a lot of modularity.</span></li>\n<li><span id=\"c1c5\"><code>Easy to start</code></span></li>\n<li><span id=\"90ce\">No specials tools are needed to use Basic React.</span></li>\n<li><span id=\"9ec9\">You can start working directly with <code>createElement</code> method in React.</span></li>\n<li><span id=\"dd3c\"><code>Declarative Programming</code></span></li>\n<li><span id=\"d3e6\">React is declarative in nature, utilizing either it's built-in createElement method or the higher-level language known as JSX.</span></li>\n<li><span id=\"ba8b\"><code>Reusability</code></span></li>\n<li><span id=\"a3c2\">Create elements that can be re-used over and over. One-flow of data</span></li>\n<li><span id=\"27d2\">React apps are built as a combination of parent and child components.</span></li>\n<li><span id=\"6da8\">Parents can have one or more child components, all children have parents.</span></li>\n<li><span id=\"26d8\">Data is never passed from child to the parent.</span></li>\n<li><span id=\"86be\"><code>Virtual DOM</code> : React provides a Virtual DOM that acts as an agent between the real DOM and the developer to help debug, maintain, and provide general use.</span></li>\n<li><span id=\"6747\">Due to this usage, React handles web pages much more intelligently; making it one of the speediest Front End Libraries available.</span></li>\n</ul>\n<h3>ES6 Refresher</h3>\n<p>Exporting one item per file</p>\n<ul>\n<li><span id=\"5538\">Use <code>export default</code> statement in ES6 to export an item. ES6</span></li>\n</ul>\n<!-- -->\n<pre><code>export default class Wallet {\n  // ...\n}\n// sayHello will not be exported\nfunction sayHello() {\n  console.log(\"Hello!\");\n}\n</code></pre>\n<p>CommonJS (Equivalent)</p>\n<pre><code>class Wallet {\n  // ...\n}\n// sayHello will not be exported\nfunction sayHello() {\n  console.log(\"Hello!\");\n}\nmodule.exports = Wallet;\n</code></pre>\n<p>Exporting multiple items per file</p>\n<ul>\n<li><span id=\"9a6e\">Use just thw <code>export</code> keyword (without default) to export multiple items per file. ES6 (Better to export them individually like this, rather than bunching them all into an object)</span></li>\n</ul>\n<!-- -->\n<pre><code>export class Wallet {\n  // ...\n}\nexport function sayHello() {\n  console.log(\"Hello!\");\n}\nexport const sayHi = () => {\n  console.log(\"Hi!\");\n};\nclass Wallet {\n  // ...\n}\nfunction sayHello() {\n  console.log(\"Hello!\");\n}\nconst sayHi = () => {\n  console.log(\"Hi!\");\n};\nexport { Wallet, sayHello, sayHi };\n</code></pre>\n<p>CommonJS (Equivalent)</p>\n<pre><code>class Wallet {\n  // ...\n}\nfunction sayHello() {\n  console.log(\"Hello!\");\n}\nconst sayHi = () => {\n  console.log(\"Hi!\");\n};\nmodule.exports = {\n  Wallet,\n  sayHello,\n  sayHi,\n};\n</code></pre>\n<p>Importing with ES6 vs CommonJS</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*7EZESKf0XPbncXAY\" class=\"graf-image\" /></figure>-   <span id=\"18b1\">Import statements in ES6 modules must always be at the top of the file, because all imports must occur before the rest of the file's code runs. ES6</span>\n<!-- -->\n<pre><code>import { Wallet } from \"./wallet\";\nimport * as fs from \"fs\";\nconst wallet = new Wallet();\n</code></pre>\n<p>CommonJS</p>\n<pre><code>let { Wallet } = require(\"./wallet\");\nconst wallet = new Wallet();\nlet fs = require(\"fs\");\n</code></pre>\n<p>Unnamed default imports</p>\n<ul>\n<li><span id=\"75e2\">You can name unnamed items exported with export default any name when you import them.</span></li>\n</ul>\n<!-- -->\n<pre><code>// exporting\nexport default class Wallet {\n  // ...\n}\n// importing\nimport Money from \"wallet.js\";\nconst wallet = new Money();\n</code></pre>\n<ul>\n<li><span id=\"5042\">Just remember if you use <code>export</code> instead of <code>export default</code> then your import is already named and cannot be renamed.</span></li>\n</ul>\n<!-- -->\n<pre><code>// exporting\nexport class Wallet {\n  // ...\n}\n// importing\nimport { Wallet } from \"wallet.js\";\nconst wallet = new Wallet();\n</code></pre>\n<p>Aliasing imports</p>\n<ul>\n<li><span id=\"3535\">Use as asterisk to import an entire module's contents.</span></li>\n<li><span id=\"3f1c\">Keep in mind you must use an <code>as</code> keyword to refer to it later.</span></li>\n</ul>\n<!-- -->\n<pre><code>// export\nexport function sayHello() {\n  console.log(\"Hello!\");\n}\nexport const sayHi = () => {\n  console.log(\"Hi!\");\n};\n//import\nimport * as Greetings from \"greetings.js\";\nGreetings.sayHello(); // Hello!\nGreetings.sayHi(); // Hi!\n</code></pre>\n<ul>\n<li><span id=\"bfbc\">You can also name identically named functions or items from different files.</span></li>\n</ul>\n<!-- -->\n<pre><code>import { Wallet as W1 } from \"./wallet1\";\nimport { Wallet as W2 } from \"./wallet2\";\nconst w1 = new W1();\nconst w2 = new W2();\n</code></pre>\n<p>Browser support for ES6 Modules</p>\n<ul>\n<li><span id=\"69b4\">ES6 Modules can only be used when a JS file is specified as a module. <code>&#x3C;script type=\"module\" src=\"./wallet.js\">&#x3C;/script></code></span></li>\n<li><span id=\"4f5c\">You can get browser support for ES6 modules by adding module into your script tag.</span></li>\n</ul>\n<hr>\n<h3>Notes</h3>\n<h3>JSX In Depth</h3>\n<ul>\n<li><span id=\"2a0d\">Remember that JSX is just syntactic sugar for the built in <code>React.createElement(component, props, ...children)</code></span></li>\n<li><span id=\"1532\">React Library must always be in scope from your JSX code.</span></li>\n<li><span id=\"72b2\">Use Dot Notation for JSX Type</span></li>\n<li><span id=\"0cbc\">User-Defined Components Must Be Capitalized <code>&#x3C;Foo /></code> vs <code>&#x3C;div></code></span></li>\n<li><span id=\"553a\">Cannot use a general expression as the React element type. (<code>Incorrect</code>)</span></li>\n</ul>\n<!-- -->\n<pre><code>function Story(props) {\n  // Wrong! JSX type can't be an expression.\n    return &#x3C;components[props.storyType] story={props.story} />;\n  };\n</code></pre>\n<p>(<code>Corrected</code>)</p>\n<pre><code>function Story(props) {\n  // Correct! JSX type can be a capitalized variable.\n  const SpecificStory = components[props.storyType];\n  return &#x3C;SpecificStory story={props.story} />;\n}\n</code></pre>\n<p>Props in JSX</p>\n<ul>\n<li><span id=\"e549\">Several ways to specify props in JSX.</span></li>\n<li><span id=\"257d\"><code>Javascript Expressions as Props</code></span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;MyComponent foo={1 + 2 + 3 + 4} />\n</code></pre>\n<ul>\n<li><span id=\"57f8\"><code>String Literals</code></span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;MyComponent message=\"hello world\" /> &#x3C;MyComponent message={'hello world'} /> &#x3C;MyComponent message=\"&#x26;lt;3\" /> &#x3C;MyComponent message={'❤'} />\n</code></pre>\n<ul>\n<li><span id=\"48df\"><code>Props Default to “True”</code></span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;MyTextBox autocomplete /> &#x3C;MyTextBox autocomplete={true} />\n</code></pre>\n<ul>\n<li><span id=\"2072\"><code>Spread Attributes</code></span></li>\n</ul>\n<!-- -->\n<pre><code>function App1() { return &#x3C;Greeting firstName=\"Ben\" lastName=\"Hector\" />; } function App2() { const props = { firstName: \"Ben\", lastName: \"Hector\" }; return &#x3C;Greeting {…props} />; }\n</code></pre>\n<p>Children in JSX</p>\n<ul>\n<li><span id=\"2238\"><code>props.children</code> : The content between opening and closing tag. JavaScript Expressions as Children</span></li>\n</ul>\n<!-- -->\n<pre><code>function Item(props) {\n  return &#x3C;li>{props.message}&#x3C;/li>;\n}\nfunction TodoList() {\n  const todos = [\"finish doc\", \"submit pr\", \"nag dan to review\"];\n  return (\n    &#x3C;ul>\n      {todos.map((message) => (\n        &#x3C;Item key={message} message={message} />\n      ))}\n    &#x3C;/ul>\n  );\n}\n</code></pre>\n<p>Functions as Children</p>\n<ul>\n<li><span id=\"bf0a\"><code>props.children</code> works like any other prop, meaning it can pass any sort of data.</span></li>\n</ul>\n<!-- -->\n<pre><code>// Calls the children callback numTimes to produce a repeated component\nfunction Repeat(props) {\n  let items = [];\n  for (let i = 0; i &#x3C; props.numTimes; i++) {\n    items.push(props.children(i));\n  }\n  return &#x3C;div>{items}&#x3C;/div>;\n}\nfunction ListOfTenThings() {\n  return (\n    &#x3C;Repeat numTimes={10}>\n      {(index) => &#x3C;div key={index}>This is item {index} in the list&#x3C;/div>}\n    &#x3C;/Repeat>\n  );\n}\n</code></pre>\n<p>Booleans, Null, and Undefined Are Ignored</p>\n<ul>\n<li><span id=\"7017\"><code>false</code>, <code>null</code>, <code>undefined</code>, and <code>true</code> are all valid children.</span></li>\n<li><span id=\"5af2\">They will not render.</span></li>\n<li><span id=\"10dc\">You can use these to conditionally render items.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;div>\n  {showHeader &#x26;&#x26; &#x3C;Header />}\n  &#x3C;Content />\n&#x3C;/div>\n</code></pre>\n<ul>\n<li><span id=\"fa28\">In this example, the component will only render if <code>showHeader</code> evals to True.</span></li>\n</ul>\n<!-- -->\n<pre><code>// Before work-around\n&#x3C;div>\n  {props.messages.length &#x26;&#x26;\n    &#x3C;MessageList messages={props.messages} />\n  }\n&#x3C;/div>\n// After work-around\n&#x3C;div>\n  {props.messages.length > 0 &#x26;&#x26;\n    &#x3C;MessageList messages={props.messages} />\n  }\n&#x3C;/div>\n</code></pre>\n<ul>\n<li><span id=\"3701\">Note that certain falsy values such as zero will still be rendered by React, you can work around this by ensuring situations like the above eval. into a boolean.</span></li>\n<li><span id=\"9586\">In the times you want booleans to be rendered out, simply convert it into a string first.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;div>My JavaScript variable is {String(myVariable)}.&#x3C;/div>\n</code></pre>\n<h3>Reconciliation</h3>\n<p>The Diffing Algorithm</p>\n<ul>\n<li><span id=\"76c4\"><code>Diffing</code> : When the state of a component changes React creates a new virtual DOM tree.</span></li>\n<li><span id=\"9a73\">Elements of Different Types</span></li>\n<li><span id=\"d680\">Every time the root elements have different types, React tears down the old tree and builds the new tree from scratch.</span></li>\n<li><span id=\"84a6\">DOM Elements Of the Same Type</span></li>\n<li><span id=\"4b94\">When comparing two DOM elements of the same type, React keeps the same underlying DOM node and only updates the changes attributes.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;div className=”before” title=”stuff” /> &#x3C;div className=”after” title=”stuff” />\n\n&#x3C;div style={{ color: “red”, fontWeight: “bold” }} /> &#x3C;div style={{color: 'green', fontWeight: 'bold'}} />\n</code></pre>\n<ul>\n<li><span id=\"0a0c\">Component Elements Of The Same Type</span></li>\n<li><span id=\"cf3a\">When components update, instances will remain the same, so that state maintains across renders.</span></li>\n<li><span id=\"b8ab\">React will only update the props, to match the new element.</span></li>\n<li><span id=\"82f3\">Recursing On Children</span></li>\n<li><span id=\"4a59\">React will iterate both lists of children and generate a mutation whenever there's a difference.</span></li>\n<li><span id=\"74a8\">This is why we use <code>keys</code>.</span></li>\n<li><span id=\"381c\">Makes it easier for React to match children in the original tree with children in the subsequent tree.</span></li>\n<li><span id=\"f1f5\">Tradeoffs</span></li>\n<li><span id=\"e98a\">Important to remember that reconciliation algorithm is an <em>implementation detail</em>.</span></li>\n<li><span id=\"7f57\">Re-rendering only to apply the differences following the rules stated in the previous sections.</span></li>\n</ul>\n<h3>Typechecking With PropTypes</h3>\n<ul>\n<li><span id=\"0bc0\">As your application grows, you can use React's <code>typechecking</code> to catch bugs.</span></li>\n<li><span id=\"638c\"><code>propTypes</code> is a special property to run typechecking.</span></li>\n<li><span id=\"e725\">exports range of built in validators to ensure your received data is valid.</span></li>\n<li><span id=\"f590\">propTypes is only checked in development mode.</span></li>\n</ul>\n<!-- -->\n<pre><code>import PropTypes from \"prop-types\";\nclass Greeting extends React.Component {\n  render() {\n    return &#x3C;h1>Hello, {this.props.name}&#x3C;/h1>;\n  }\n}\nGreeting.propTypes = {\n  name: PropTypes.string,\n};\n</code></pre>\n<p>Requiring Single Child</p>\n<ul>\n<li><span id=\"e2db\">Use <code>PropTypes.element</code> to specify only a single child can be passed to a component as children.</span></li>\n</ul>\n<!-- -->\n<pre><code>import PropTypes from \"prop-types\";\nclass MyComponent extends React.Component {\n  render() {\n    // This must be exactly one element or it will warn.\n    const children = this.props.children;\n    return &#x3C;div>{children}&#x3C;/div>;\n  }\n}\nMyComponent.propTypes = {\n  children: PropTypes.element.isRequired,\n};\n</code></pre>\n<p>Default Prop Values</p>\n<ul>\n<li><span id=\"7d3d\">Use <code>defaultProps</code> to assign default values for props.</span></li>\n</ul>\n<!-- -->\n<pre><code>class Greeting extends React.Component {\n  render() {\n    return &#x3C;h1>Hello, {this.props.name}&#x3C;/h1>;\n  }\n}\n// Specifies the default values for props:\nGreeting.defaultProps = {\n  name: \"Stranger\",\n};\n// Renders \"Hello, Stranger\":\nReactDOM.render(&#x3C;Greeting />, document.getElementById(\"example\"));\n\nclass Greeting extends React.Component {\n  static defaultProps = {\n    name: 'stranger'\n  }\n  render() {\n    return (\n      &#x3C;div>Hello, {this.props.name}&#x3C;/div>\n    )\n  }\n</code></pre>\n<hr>\n<h3>Notes</h3>\n<h3>React Router Introduction</h3>\n<ul>\n<li><span id=\"48a7\"><code>React Router</code> is the answer for rendering different components for different pages.</span></li>\n<li><span id=\"78b3\">A front-end library that allows you to control which components to display using the browser location.</span></li>\n<li><span id=\"aa2a\"><code>Client-side Routing</code> Getting started with routing</span></li>\n<li><span id=\"0940\">Install React Router with:</span></li>\n<li><span id=\"742a\">npm install — save react-router-dom@⁵.1.2</span></li>\n<li><span id=\"f07f\">Import <code>Browser Router</code> from package.</span></li>\n<li><span id=\"9e4e\">import { BrowserRouter } from “react-router-dom”;</span></li>\n<li><span id=\"cb01\"><code>BrowserRouter</code> is the primary component of the router that wraps your route hierarchy.</span></li>\n<li><span id=\"adfa\">Wrap it around components.</span></li>\n<li><span id=\"0276\">Creates a <code>React Context</code> that passes routing information down to all its descendant components.</span></li>\n<li><span id=\"dd45\">You can also use <code>HashRouter</code>, where it would generate a hash before the endpoint. Creating frontend routes</span></li>\n<li><span id=\"37c2\">React Router helps your app render specific components based on the URL.</span></li>\n<li><span id=\"54c4\">The most common component is <code>&#x3C;Route></code></span></li>\n<li><span id=\"500a\">Wrapped around another component, causing the comp. to only render if the a certain URL is matched.</span></li>\n<li><span id=\"5a94\"><code>Props</code> : path, component, exact, and [render]</span></li>\n<li><span id=\"9f06\">Browser Router can only have a single child component.</span></li>\n<li><span id=\"6305\">The Browser Router wraps all routes within a parent div element.</span></li>\n</ul>\n<!-- -->\n<pre><code>const Root = () => {\n  const users = {\n    1: { name: \"Andrew\" },\n    2: { name: \"Raymond\" },\n  };\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;div>\n        &#x3C;h1>Hi, I'm Root!&#x3C;/h1>\n        &#x3C;Route exact path=\"/\" component={App} />\n        &#x3C;Route path=\"/hello\" render={() => &#x3C;h1>Hello!&#x3C;/h1>} />\n        &#x3C;Route path=\"/users\" render={() => &#x3C;Users users={users} />} />\n      &#x3C;/div>\n    &#x3C;/BrowserRouter>\n  );\n};\n</code></pre>\n<ul>\n<li><span id=\"c057\">component</span></li>\n<li><span id=\"2dcc\">Indicates component to render.</span></li>\n<li><span id=\"740c\">path</span></li>\n<li><span id=\"3030\">Indicates path to render a specific component.</span></li>\n<li><span id=\"0741\">exact</span></li>\n<li><span id=\"52cb\">Tells route to not pattern match and only render a certain route exclusively to it's associated component.</span></li>\n<li><span id=\"cb93\">render</span></li>\n<li><span id=\"c702\">Optional prop that takes in a function to be called.</span></li>\n<li><span id=\"594b\">Causes extra work for React.</span></li>\n<li><span id=\"5320\">Preferred for inline rendering of simple functional components.</span></li>\n<li><span id=\"0d3e\">Difference between <code>component</code> and <code>render</code> is that component returns new JSX that be re-mounted, but render returns the JSX that will be mounted only once.</span></li>\n<li><span id=\"4a08\">// This inline rendering will work, but is unnecessarily slow. &#x3C;Route path=”/hello” component={() => &#x3C;h1>Hello!&#x3C;/h1>} /> // This is the preferred way for inline rendering. &#x3C;Route path=”/hello” render={() => &#x3C;h1>Hello!&#x3C;/h1>} /></span></li>\n<li><span id=\"a2d3\">Also useful if you need to pass in specific props to a component.</span></li>\n<li><span id=\"e09f\">// `users` to be passed as a prop: const users = { 1: { name: “Andrew” }, 2: { name: “Raymond” }, }; &#x3C;Route path=”/users” render={() => &#x3C;Users users={users} />} />;</span></li>\n</ul>\n<p>Route path params</p>\n<ul>\n<li><span id=\"3d09\">Your component's props can hold information about URL's parameters.</span></li>\n<li><span id=\"52f3\">Will match segments starting at <code>:</code> to the next <code>/</code>, <code>?</code>, <code>#</code>.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;Route\n  path=\"/users/:userId\"\n  render={(props) => &#x3C;Profile users={users} {...props} />}\n/>\n</code></pre>\n<ul>\n<li><span id=\"f2b4\"><code>{...props}</code> spreads out the router's props.</span></li>\n<li><span id=\"1edb\"><code>props.match.params</code> is used to access the match prop's parameters.</span></li>\n<li><span id=\"b6a9\">Useful keys on the <code>match</code> object:</span></li>\n<li><span id=\"290f\"><code>isExact</code> : boolean that tells you whether or not the URL exactly matches the path.</span></li>\n<li><span id=\"27ea\"><code>url</code> : the currentURL</span></li>\n<li><span id=\"b979\"><code>path</code> : Route path it matched against (w/o wildcards)</span></li>\n<li><span id=\"6c59\"><code>params</code> : Matches for the individual wildcard segments.</span></li>\n</ul>\n<hr>\n<h3>Navigation</h3>\n<p>React Router Navigation</p>\n<ul>\n<li><span id=\"a548\"><code>Link</code>, <code>NavLink</code>, <code>Redirect</code>, <code>history</code> props of React Router are used to help your user navigate routes. Adding links for navigation</span></li>\n<li><span id=\"643f\">Issues on-click navigation event to a route defined in app.</span></li>\n<li><span id=\"949d\">Usage renders an anchor tag with a correctly set <code>href</code> attribute.</span></li>\n</ul>\n<!-- -->\n<pre><code>import { BrowserRouter, Route, Link } from \"react-router-dom\";\n</code></pre>\n<ul>\n<li><span id=\"b5a5\"><code>Link</code> takes two properties: <code>to</code> and <code>onClick</code>.</span></li>\n<li><span id=\"995b\"><code>to</code> : route location that points to an absolute path.</span></li>\n<li><span id=\"978c\"><code>onClick</code> : clickHandler.</span></li>\n<li><span id=\"b8c0\"><code>NavLink</code> works just like <code>Link</code> but has a bit of extra functionality.</span></li>\n<li><span id=\"6334\">Adds extra styling, when the path it links to matches the current path.</span></li>\n<li><span id=\"07b8\">As it's name suggests, it is used to Nav Bars.</span></li>\n<li><span id=\"8a33\">Takes three props:</span></li>\n<li><span id=\"e501\"><code>activeClassName</code> : allows you to set a CSS class name for styling. (default set to 'active')</span></li>\n<li><span id=\"81da\"><code>activeStyle</code> : style object that is applied inline when it's <code>to</code> prop. matches the current URL.</span></li>\n<li><span id=\"8c71\"><code>exact</code> prop is a boolean that defaults to false; you can set it to true to apply requirement of an exact URL match.</span></li>\n<li><span id=\"755b\">exact can also be used as a flag instead of a reg. property value.</span></li>\n<li><span id=\"dd12\">benefit of adding this is so that you don't trigger other matches. Switching between routes</span></li>\n<li><span id=\"4fb6\"><code>&#x3C;Switch></code> : Component allows you to only render one route even if several match the current URL.</span></li>\n<li><span id=\"7be7\">You may nest as many routes as you wish but only the first match of the current URL will be rendered.</span></li>\n<li><span id=\"3f8a\">Very useful if we want a default component to render if none of our routes match.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;Switch>\n  &#x3C;Route path=\"some/url\" component={SomeComponent} />\n  &#x3C;Route path=\"some/other/url\" component={OtherComponent} />\n  &#x3C;Route component={DefaultComponent} />\n&#x3C;/Switch>\n</code></pre>\n<ul>\n<li><span id=\"b901\"><code>DefaultComponent</code> will only render if none of the other URLs match up.</span></li>\n<li><span id=\"21a3\"><code>&#x3C;Redirect></code> : Helps redirect users.</span></li>\n<li><span id=\"ee88\">Only takes a single prop: <code>to</code>.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;Route\n  exact\n  path=\"/\"\n  render={() => (this.props.currentUser ? &#x3C;Home /> : &#x3C;Redirect to=\"/login\" />)}\n/>\n</code></pre>\n<p>History</p>\n<ul>\n<li><span id=\"6456\"><code>History</code> allows you to update the URL programmatically.</span></li>\n<li><span id=\"bac6\">Contains two useful methods:</span></li>\n<li><span id=\"9b00\"><code>push</code> : Adds a new URL to the end of the history stack.</span></li>\n<li><span id=\"d539\"><code>replace</code> : Replaces the current URL on the history stack, so the back button won't take you to it.</span></li>\n</ul>\n<!-- -->\n<pre><code>// Pushing a new URL (and adding to the end of history stack):\nconst handleClick = () => this.props.history.push(\"/some/url\");\n// Replacing the current URL (won't be tracked in history stack):\nconst redirect = () => this.props.history.replace(\"/some/other/url\");\n</code></pre>\n<hr>\n<h3>Nested Routes</h3>\n<p>Why nested routes?</p>\n<ul>\n<li><span id=\"6403\">Create routes that tunnel into main components vs getting rendered on the main page as it's own thing. What are nested routes?</span></li>\n</ul>\n<!-- -->\n<pre><code>const Profile = (props) => {\n  // Custom call to database to fetch a user by a user ID.\n  const user = fetchUser(props.match.params.userId);\n  const { name, id } = user;\n  return (\n    &#x3C;div>\n      &#x3C;h1>Welcome to the profile of {name}!&#x3C;/h1>\n      &#x3C;Link to={`/users/${id}/posts`}>{name}'s Posts&#x3C;/Link>\n      &#x3C;Link to={`/users/${id}/photos`}>{name}'s Photos&#x3C;/Link>\n      &#x3C;Route path=\"/users/:userId/posts\" component={UserPosts} />\n      &#x3C;Route path=\"/users/:userId/photos\" component={UserPhotos} />\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<p>Alt. version using <code>props.match</code></p>\n<pre><code>// Destructure `match` prop\nconst Profile = ({ match: { url, path, params }) => {\n  // Custom call to database to fetch a user by a user ID.\n  const user = fetchUser(params.userId);\n  const { name, id } = user;\n  return (\n    &#x3C;div>\n      &#x3C;h1>Welcome to the profile of {name}!&#x3C;/h1>\n      &#x3C;Link to={`${url}/posts`}>{name}'s Posts&#x3C;/Link>\n      &#x3C;Link to={`${url}/photos`}>{name}'s Photos&#x3C;/Link>\n      &#x3C;Route path={`${path}/posts`} component={UserPosts} />\n      &#x3C;Route path={`${path}/photos`} component={UserPhotos} />\n    &#x3C;/div>}\n  );\n};\n</code></pre>\n<ul>\n<li><span id=\"03fb\">As you can see above, our end URL isn't even defined until we apply those flexible values in.</span></li>\n</ul>\n<hr>\n<h3>React Builds</h3>\n<ul>\n<li><span id=\"0fae\"><code>Build</code> : Process of converting code into something that can actually execute or run on the target platform.</span></li>\n<li><span id=\"6fdb\">In regards to React, the minimum a build should do is convert JSX to something that browsers can understand. Reviewing common terminology</span></li>\n<li><span id=\"779d\"><code>Linting</code> : Process of using a tool to analyze your code to catch common errors, bugs, inconsistencies etc...</span></li>\n<li><span id=\"f1e5\"><code>Transpilation</code> : Process of converting source code, like JS, from one version to another.</span></li>\n<li><span id=\"9f9f\"><code>Minification</code> : Process of removing all unnecessary characters in your code.</span></li>\n<li><span id=\"57df\"><code>Bundling</code> : Process of combining multiple code files into a single file.</span></li>\n<li><span id=\"d052\"><code>Tree Shaking</code> : Process of removing unused or dead code from your application before it's bundled. Configuration or code?</span></li>\n<li><span id=\"ce13\"><code>Configuration</code> allows developers to create build tasks by declaring either JSON, XML, or YAML without explicitly writing every step in the process.</span></li>\n<li><span id=\"16a6\"><code>Coding</code> or <code>Scripting</code> simply requires code. Babel and webpack (yes, that's intentionally a lowercase 'w')</span></li>\n<li><span id=\"4363\"><code>Babel</code> : Code Transpiler that allows you to use all of the latest features and syntax wihtout worrying about what browsers support what.</span></li>\n<li><span id=\"804b\"><code>webpack</code> : Allows developers to use JS modules w/o requiring users to use a browser that natively supports ES modules.</span></li>\n<li><span id=\"77f2\">Create React App uses webpack and Babel under the hood to build applications. The Create React App build process</span></li>\n<li><span id=\"222f\">What happens when you run <code>npm start</code>:</span></li>\n<li><span id=\"d245\">.env variables are loaded.</span></li>\n<li><span id=\"6209\">list of browsers to support are checked.</span></li>\n<li><span id=\"1c34\">config'd HTTP port checked for availability.</span></li>\n<li><span id=\"950b\">application compiler is configured and created.</span></li>\n<li><span id=\"8e30\"><code>webpack-dev-starter</code> is started</span></li>\n<li><span id=\"48cc\"><code>webpack-dev-starter</code> compiles app.</span></li>\n<li><span id=\"68ad\"><code>index.html</code> is loaded into browser</span></li>\n<li><span id=\"e670\">file watcher is started to watch for changes. Ejecting</span></li>\n<li><span id=\"428b\">There is a script in Create React App called <code>eject</code> that allows you to 'eject' your application and expose all the hidden stuff. Preparing to deploy a React application for production</span></li>\n<li><span id=\"eb79\">Defining Env Variables</span></li>\n</ul>\n<!-- -->\n<pre><code>REACT_APP_FOO: some value\nREACT_APP_BAR: another value\n\nconsole.log(process.env.REACT_APP_FOO);\n\nCan be referenced in your index.html like so: &#x3C;title>%REACT_APP_BAR%&#x3C;/title>\n</code></pre>\n<p>Configuring the supported browsers</p>\n<pre><code>{\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n</code></pre>\n<ul>\n<li><span id=\"8a03\">If you specify older browsers it will affect how your code get's transpiled. Creating a production build</span></li>\n<li><span id=\"fee3\">Run <code>npm run build</code> to create a production build.</span></li>\n<li><span id=\"bdaf\">Bundles React in production mode and optimizes the build for the best performance.</span></li>\n</ul>\n<hr>\n<h3>Notes</h3>\n<h3>Introduction to React</h3>\n<ul>\n<li><span id=\"7224\">Simply a nice library that turns data into DOM.</span></li>\n<li><span id=\"a9de\"><code>Tree Diffing</code> : Fast comparison and patching of data by comparing the current virtual DOM and new virtual DOM - updating only the pieces that change.</span></li>\n<li><span id=\"1bbc\"><code>It's just a tree with some fancy diffing</code></span></li>\n</ul>\n<hr>\n<h3>Create Element</h3>\n<p>From JavaScript To DOM</p>\n<ul>\n<li><span id=\"cae8\">The <code>React.createElement</code> function has the following form:</span></li>\n</ul>\n<!-- -->\n<pre><code>React.createElement(type, [props], [...children]);\n</code></pre>\n<ul>\n<li><span id=\"1688\"><code>Type</code> : Type of element to create, i.e. a string for an HTML element or a reference to a function or class that is a React component.</span></li>\n<li><span id=\"3249\"><code>Props</code> : Object that contains data to render the element.</span></li>\n<li><span id=\"56ab\"><code>Children</code> : Children of the elemet, as many as you want. Creating elements</span></li>\n<li><span id=\"ee64\">Our rendering goal:</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;ul>\n  &#x3C;li class=\"selected\">\n    &#x3C;a href=\"/pets\">Pets&#x3C;/a>\n  &#x3C;/li>\n  &#x3C;li>\n    &#x3C;a href=\"/owners\">Owners&#x3C;/a>\n  &#x3C;/li>\n&#x3C;/ul>\n</code></pre>\n<ul>\n<li><span id=\"eb8b\">There are five tags to create:</span></li>\n<li><span id=\"ea28\">One <code>ul</code></span></li>\n<li><span id=\"a4ba\">Two <code>li</code></span></li>\n<li><span id=\"de01\">Two <code>a</code></span></li>\n<li><span id=\"90b5\">There are certain attributes we want to appear in the DOM for these tags as well:</span></li>\n<li><span id=\"dab5\">Each <code>li</code> has a <code>class</code> (or <code>className</code> in React)</span></li>\n<li><span id=\"e88e\">Both <code>a</code> ele's have <code>href</code> attributes</span></li>\n<li><span id=\"fd8c\">Also keep in mind the parent child relationships happening between the tags.</span></li>\n<li><span id=\"9893\"><code>ul</code> is the parent of both <code>li</code></span></li>\n<li><span id=\"eafa\">Each <code>li</code> has an <code>a</code> element as a child</span></li>\n<li><span id=\"84cc\">Each <code>a</code> has a <code>text content</code> child</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*8ls0PmtREELbf5Wm\" class=\"graf-image\" /></figure>React.createElement(\n      \"ul\",\n      null,\n      React.createElement(\n        \"li\",\n        { className: \"selected\" },\n        React.createElement(\"a\", { href: \"/pets\" }, \"Pets\")\n      ),\n      React.createElement(\n        \"li\",\n        null,\n        React.createElement(\"a\", { href: \"/owners\" }, \"Owners\")\n      )\n    );\n<p>Converting to virtual DOM</p>\n<ul>\n<li><span id=\"e7d4\">After you set up your <code>React.createElement</code>, you use <code>React.render</code> to take the value returned from cE and a DOM node to insert into the conversion of the real DOM.</span></li>\n</ul>\n<!-- -->\n<pre><code>// Put the element tree in a variable\nconst navList = React.createElement(\n  \"ul\",\n  null,\n  React.createElement(\n    \"li\",\n    { className: \"selected\" },\n    React.createElement(\"a\", { href: \"/pets\" }, \"Pets\")\n  ),\n  React.createElement(\n    \"li\",\n    null,\n    React.createElement(\"a\", { href: \"/owners\" }, \"Owners\")\n  )\n);\n// Get a DOM node for React to render to\nconst mainElement = document.querySelector(\"main\");\n// Give React the element tree and the target\nReactDOM.render(navList, mainElement);\n</code></pre>\n<ul>\n<li><span id=\"2cbc\">JS Code => Virtual DOM => Real Dom Updates</span></li>\n<li><span id=\"25d5\">If you call React.render a second or multiple times it just checks the existing Virtual DOM and it knows which smaller areas to change. Thinking in Components</span></li>\n<li><span id=\"fe61\">Components are pieces of reusable front-end pieces.</span></li>\n<li><span id=\"bffa\">Components should be Single Responsibility Principle compliant.</span></li>\n</ul>\n<hr>\n<h3>Create Element</h3>\n<p><code>React.createElement Demo</code></p>\n<ul>\n<li><span id=\"a288\">Can import non-local dependencies with <code>import 'package-link'</code></span></li>\n</ul>\n<!-- -->\n<pre><code>const App = () => React.createElement(\"h1\", null, \"Hello, Programmers!\");\nconst target = document.querySelector(\"main\");\nconst app = React.createElement(App, null);\n// Give React the element tree and the target\nReactDOM.render(app, target);\n</code></pre>\n<ul>\n<li><span id=\"0693\">Remember when importing modules from other files you have to denote the file type in the import statement. HTML Original</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;section class=\"clue\">\n  &#x3C;h1 class=\"clue__title\">Clue$ 268530&#x3C;/h1>\n  &#x3C;div class=\"clue__question\">\n      2009: I dreamed a Dream\n  &#x3C;/div>\n  &#x3C;div class=\"clue__category\">\n      &#x3C;&#x3C;unparsed>>\n  &#x3C;/div>\n  &#x3C;div class=\"clue__amount\">\n      $800\n  &#x3C;/div>\n&#x3C;/section>\n</code></pre>\n<p>React Version</p>\n<pre><code>const Clue = () =>\n  React.createElement(\n    \"section\",\n    { className: \"clue\" },\n    React.createElement(\"h1\", { className: \"clue__title\" }, \"Title\"),\n    React.createElement(\"div\", { className: \"clue__question\" }, \"?\"),\n    React.createElement(\"div\", { className: \"clue__category\" }, \"Category\"),\n    React.createElement(\"div\", { className: \"clue__amount\" }, \"$800\")\n  );\n</code></pre>\n<ul>\n<li><span id=\"f587\">Because <code>class</code> is a reserved keyword in JS, in React we can use <code>className</code> to assign a class to an element.</span></li>\n<li><span id=\"4d51\">Remember the data that goes into createElement: element type, data to pass into the element, and then children.</span></li>\n<li><span id=\"8199\"><code>props</code> : Properties;</span></li>\n<li><span id=\"6b53\">To handle certain values that are initially undefined, we can use <code>defaultProps</code>.</span></li>\n</ul>\n<!-- -->\n<pre><code>Clue.defaultProps = {\n  category: {},\n};\n</code></pre>\n<ul>\n<li><span id=\"4abe\">You can change in the devTools Network tab the internet speed to check for values that may be undefined to hangle with defaultProps.</span></li>\n<li><span id=\"79e3\">If we fetch multiple pieces of data, we can render many things by using <code>map</code>.</span></li>\n<li><span id=\"06f2\">You need to assign a unique key to each of the clues.</span></li>\n<li><span id=\"c12e\">We need to keep track of them individually so that React can easily refer to a specific one if there is an issue. <code>clue => { key:clue.id, ...clue }</code></span></li>\n</ul>\n<!-- -->\n<pre><code>const App = (props) =>\n  React.createElement(\n    \"h1\",\n    null,\n    props.clues.map((clue) =>\n      React.createElement(Clue, { key: clue.id, ...clue })\n    )\n  );\nexport default App;\n</code></pre>\n<ul>\n<li><span id=\"1dd5\">Note: JSX is preferred over React.createElement;</span></li>\n</ul>\n<hr>\n<h3>Notes from Hello Programmer Exercise</h3>\n<ul>\n<li><span id=\"1fb8\">When you import modules from websites they must have CORs activated.</span></li>\n<li><span id=\"1ef6\">These import statements, import <code>global variables</code>.</span></li>\n<li><span id=\"6613\">When we want to move our code into production we need to change the imports into the production minified versions.</span></li>\n</ul>\n<!-- -->\n<pre><code>import \"https://unpkg.com/react@16/umd/react.production.min.js\";\nimport \"https://unpkg.com/react-dom@16.13.1/umd/react-dom.production.min.js\";\n</code></pre>\n<ul>\n<li><span id=\"0046\">While we will never actually be creating full apps with just React.createElement => it is the enginer that is running under the hood!</span></li>\n</ul>\n<!-- -->\n<pre><code>import \"https://unpkg.com/react@16/umd/react.development.js\";\nimport \"https://unpkg.com/react-dom@16/umd/react-dom.development.js\";\nconst Links = () =>\n  React.createElement(\n    \"ul\",\n    { id: \"nav-links\" },\n    React.createElement(\n      \"li\",\n      { className: \"is-selected\" },\n      React.createElement(\"a\", { href: \"http://appacademy.io\" }, \"App Academy\")\n    ),\n    React.createElement(\n      \"li\",\n      null,\n      React.createElement(\"a\", { href: \"https://aaonline.io\" }, \"a/A Open\")\n    )\n  );\n// Set up React Element: Type, Imported Data, Child (Child is Text in this Scenario)\n// HelloWorld is a function based component\nconst HelloWorld = () => React.createElement(\"h1\", null, \"Hello, Programmers\");\nconst AllTogether = () =>\n  React.createElement(\n    \"div\",\n    null,\n    React.createElement(HelloWorld, null),\n    React.createElement(Links, null)\n  );\n// Target the Element to append new Ele\nconst target = document.querySelector(\"main\");\n// Assign your 'App' to your created Elements\n// We are creating an element from the HelloWorld function.\nconst app = React.createElement(AllTogether, null);\n// Render from the Virtual Dom to the Actual Dom\nReactDOM.render(app, target);\n</code></pre>\n<hr>\n<h3>Introduction to JSX</h3>\n<ul>\n<li><span id=\"a5ee\"><code>JSX</code> : Javascript Extension, a new language created by React developers to have an easier way of interacting with the React API. How to use JSX</span></li>\n<li><span id=\"24bf\">We will use <code>babel</code> to convert version of modern JS into an older version of JS. React Create Element</span></li>\n</ul>\n<!-- -->\n<pre><code>const ExampleComponent = (props) =>\n  React.createElement(\n    React.Fragment,\n    null,\n    React.createElement(\"h1\", null, \"Hello!\"),\n    React.createElement(\"img\", { src: \"https://via.placeholder.com/150\" }),\n    React.createElement(\"a\", { href: props.searchUrl }, props.searchText)\n  );\n</code></pre>\n<p>JSX Version</p>\n<pre><code>const ExampleComponent = (props) => (\n  &#x3C;React.Fragment>\n    &#x3C;h1>Hello!&#x3C;/h1>\n    &#x3C;img src=\"https://via.placeholder.com/150\" />\n    &#x3C;a href={props.searchUrl}>{props.searchText}&#x3C;/a>\n  &#x3C;/React.Fragment>\n);\n</code></pre>\n<ul>\n<li><span id=\"b00d\">Keep in mind that self closing tags in React must have a <code>forward slash</code> to close it.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*NNxuFMF-sOL8Wvdl\" class=\"graf-image\" /></figure>-   <span id=\"346d\">Properties and Data</span>\n<!-- -->\n<pre><code>&#x3C;img src=\"https://via.placeholder.com/150\" />;\n// becomes..\nReact.createElement(\"img\", { src: \"https://via.placeholder.com/150\" });\n// if we want to pass in data vs just a string literal\n&#x3C;a href={props.searchUrl}>{props.searchText}&#x3C;/a>;\n// so it becomes..\nReact.createElement(\"a\", { href: props.searchUrl }, props.searchText);\n// if you want the text search uppercase..\n&#x3C;a href={props.searchUrl}>{props.searchText.toUpperCase()}&#x3C;/a>;\n</code></pre>\n<ul>\n<li><span id=\"467c\">Comments in JSX have the following syntax:</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;div>\n  &#x3C;h2>This is JSX&#x3C;/h2>\n  {/* This is a comment in JSX */}\n&#x3C;/div>\n</code></pre>\n<ul>\n<li><span id=\"8cb8\"><code>Property Names</code>:</span></li>\n<li><span id=\"837b\"><code>checked</code> : Attribute of input components such as checkbox or radio, use it to set whether the component is checked or not.</span></li>\n<li><span id=\"aec0\"><code>className</code> : Used to specify a CSS class.</span></li>\n<li><span id=\"2f92\"><code>dangerouslySetInnerHTML</code> : React's equivalent of innerHTML because it is risky to cross-site scripting attacks.</span></li>\n<li><span id=\"3eab\"><code>htmlFor</code> : Because <code>for</code> is protected keyword, React elements use this instead.</span></li>\n<li><span id=\"9194\"><code>onChange</code> : Event fired whenever a form field is changed.</span></li>\n<li><span id=\"014a\"><code>style</code> : Accepts a JS object with camelCase properties rather than a CSS string.</span></li>\n<li><span id=\"76d8\"><code>value</code> : Supported by Input, Select, and TextArea components; use it to set the value of the component.</span></li>\n<li><span id=\"22c2\">Note: React uses camel-case!!! The JSX semicolon gotcha</span></li>\n</ul>\n<!-- -->\n<pre><code>function App() {\n  return (\n    &#x3C;div>\n      &#x3C;h1>Hello!&#x3C;/h1>\n      &#x3C;div>Welcome to JSX.&#x3C;/div>\n    &#x3C;/div>\n  );\n}\n</code></pre>\n<p>create Element equivalent</p>\n<pre><code>is equivalent to\nfunction App() {\n  return (\n    React.createElement(\n      'div',\n      null,\n      React.createElement('h1', null, 'Hello!'),\n      React.createElement('div', null, 'Welcome to JSX.'),\n    )\n  );\n}\n</code></pre>\n<ul>\n<li><span id=\"dbc1\">We wrap what want to return in parenthesis so JS doesn't auto add semi-colons after every line and run the code incorrectly.</span></li>\n<li><span id=\"62c0\">Just remember if you decided to use the return keyword in a function to 'return some JSX', then make sure you wrap the JSX in parenthesis.</span></li>\n</ul>\n<hr>\n<p><code>npx create-react-app my-app</code></p>\n<ul>\n<li><span id=\"8ad9\">Single line used to initiate a React application.</span></li>\n<li><span id=\"3cb1\">React has a great toolchain where you can see changes live as you're editing your application.</span></li>\n<li><span id=\"c1d0\">React errors will be rendered directly onto the browser window.</span></li>\n<li><span id=\"1365\">A downside is that it installs a lot of bloat files.</span></li>\n<li><span id=\"aaed\">Examples of React create Element and JSX equivalent</span></li>\n</ul>\n<!-- -->\n<pre><code>React.createElement(\n  \"a\",\n  {\n    className: \"active\",\n    href: \"https://appacademy.io\",\n  },\n  \"App Academy\"\n);\n// JSX Version\n&#x3C;a className=\"active\" href=\"https://appacademy.io\">\n  App Academy\n&#x3C;/a>;\n\nReact.createElement(\n  OwnerDetails,\n  {\n    owner: props.data.owner,\n    number: props.index + 1,\n  },\n  props.name\n);\n// JSX Version\n&#x3C;OwnerDetails owner={props.data.owner} number={props.index + 1}>\n  {props.name}\n&#x3C;/OwnerDetails>;\n</code></pre>\n<p>More Complex JSX Example</p>\n<pre><code>const BookPanel = (props) => {\n  &#x3C;section className=\"book\" id={`book-${props.id}`}>\n    &#x3C;h1 className=\"book__title\">{props.title}&#x3C;/h1>\n    &#x3C;img src={props.coverUrl} />\n    &#x3C;div className=\"book__desc\">{props.description}&#x3C;/div>\n  &#x3C;/section>;\n};\n</code></pre>\n<hr>\n<h3>Notes</h3>\n<h3>Using Custom CRA Templates</h3>\n<p>Using a Custom Template <code>npx create-react-app my-app --template @appacademy/simple</code></p>\n<ul>\n<li><span id=\"9607\">Keep in mind that using <code>create-react-app</code> automatically initializes a git repository for you!</span></li>\n<li><span id=\"f0fe\">App Academy custom template for creating a react app.</span></li>\n<li><span id=\"1b4e\">If using the default react create project you can delete the following files:</span></li>\n<li><span id=\"ef1c\">favicon.ico</span></li>\n<li><span id=\"627b\">robots.txt</span></li>\n<li><span id=\"3b34\">logo192.png</span></li>\n<li><span id=\"9b50\">logo512.png</span></li>\n<li><span id=\"8101\">manifest.json</span></li>\n<li><span id=\"77db\">You can also simplify the <code>html</code> file into:</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;!DOCTYPE html>\n&#x3C;html lang=\"en\">\n  &#x3C;head>\n    &#x3C;meta charset=\"utf-8\" />\n    &#x3C;title>React App&#x3C;/title>\n  &#x3C;/head>\n  &#x3C;body>\n    &#x3C;div id=\"root\">&#x3C;/div>\n  &#x3C;/body>\n&#x3C;/html>\n</code></pre>\n<p>Simplifying the src folder</p>\n<ul>\n<li><span id=\"ac69\">Remove: App.css App.test.js logo.svg serviceWorker.js setupTests.js</span></li>\n<li><span id=\"064f\">Update the Following Files:</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/App.js\nimport React from \"react\";\nfunction App() {\n  return &#x3C;h1>Hello world!&#x3C;/h1>;\n}\nexport default App;\n``;\n\n// ./src/index.js\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./index.css\";\nimport App from \"./App\";\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;App />\n  &#x3C;/React.StrictMode>,\n  document.getElementById(\"root\")\n);\n</code></pre>\n<hr>\n<h3>React Class Components</h3>\n<p>Class Components</p>\n<ul>\n<li><span id=\"b5e6\">You can write React components using ES2015 Classes: Function Component</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/Message.js\nimport React from \"react\";\nconst Message = (props) => {\n  return &#x3C;div>{props.text}&#x3C;/div>;\n};\nexport default Message;\n</code></pre>\n<p>ES2015 Version</p>\n<pre><code>// ./src/Message.js\nimport React from \"react\";\nclass Message extends React.Component {\n  render() {\n    return &#x3C;div>{this.props.text}&#x3C;/div>;\n  }\n}\nexport default Message;\n</code></pre>\n<ul>\n<li><span id=\"ae33\">We can access props within a <code>class component</code> by using <code>this.props</code></span></li>\n<li><span id=\"0b60\">Keep in mind Class Components are used just like function components.</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/index.js\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport Message from \"./Message\";\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;Message text=\"Hello world!\" />\n  &#x3C;/React.StrictMode>,\n  document.getElementById(\"root\")\n);\n</code></pre>\n<p>Setting and accessing props</p>\n<pre><code>class Message extends React.Component {\n  constructor(props) {\n    super(props);\n    // TODO Initialize state, etc.\n  }\n  render() {\n    return &#x3C;div>{this.props.text}&#x3C;/div>;\n  }\n}\n</code></pre>\n<ul>\n<li><span id=\"cd5a\">If we define a constructor method in our Class Component, we have to define the <code>super</code> method with <code>props</code> passed through it.</span></li>\n<li><span id=\"8bf7\">Side Note: Before React used ES2015 Classes, it used <code>React.createclass</code> function, if you ever need to use this antiquated method make sure you install a module called <code>create-react-class</code> Stateful components</span></li>\n<li><span id=\"4b12\">One of the major reasons why you would choose to use a Class Component over a Function Component is to add and manage local or internal state to your component.</span></li>\n<li><span id=\"8e82\">Second of the major reasons is to be able to use a Class Component's lifecycle methods. What is state?</span></li>\n<li><span id=\"7fab\">Props are data that are provided by the consumer or caller of the component.</span></li>\n<li><span id=\"98f4\">Not meant to be changed by a component.</span></li>\n<li><span id=\"c6a9\">State is data that is <code>internal</code> to the component.</span></li>\n<li><span id=\"3e89\">Intended to be updated or mutated. When to use state</span></li>\n<li><span id=\"c03f\"><em>Only Use State when it is absolutely necessary</em></span></li>\n<li><span id=\"204b\">If the data never changes, or if it's needed through an entire application use props instead.</span></li>\n<li><span id=\"0b53\">State is more often used when creating components that retrieve data from APIs or render forms.</span></li>\n<li><span id=\"1b6b\">The general rule of thumb: If a component doesn't need to use state or lifecyle methods, it should be prioritized as a <code>function component</code>.</span></li>\n<li><span id=\"d708\">Functional:Stateless || Class:Stateful Initializing state</span></li>\n<li><span id=\"e5d5\">Use a class constructor method to initialize <code>this.state</code> object. // Application Entry Point</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/index.js\nimport React from 'react'\nimport ReactDOM from 'react-dom';\nimport RandomQuote from './RandomQuote';\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;RandomQuote />\n  &#x3C;/React.StrictMode>\n  document.getElementById('root');\n)\n</code></pre>\n<p>// Class Component: RandomQuote</p>\n<pre><code>import React from \"react\";\nclass RandomQuote extends React.Component {\n  constructor() {\n    super();\n    const quotes = [\n      \"May the Force be with you.\",\n      \"There's no place like home.\",\n      \"I'm the king of the world!\",\n      \"My mama always said life was like a box of chocolates.\",\n      \"I'll be back.\",\n    ];\n    this.state = {\n      quotes,\n      currentQuoteIndex: this.getRandomInt(quotes.length);\n    }\n  }\n  getRandomInt(max) {\n    return Math.floor(Math.random() * Math.floor(max));\n  }\n  render() {\n    return (\n      &#x3C;div>\n        &#x3C;h2>Random Quote&#x3C;/h2>\n        &#x3C;p>{this.state.quotes[this.state.currentQuoteIndex]}&#x3C;/p>\n      &#x3C;/div>\n    )\n  }\n}\nexport default RandomQuote;\n</code></pre>\n<p>Updating State</p>\n<ul>\n<li><span id=\"3fdc\">Let's say we want to update our state with a new quote.</span></li>\n<li><span id=\"eddc\">We can set up event listeners in React similarly to how we did them before.</span></li>\n<li><span id=\"106c\">&#x3C;button type=”button” onClick={this.changeQuote}> Change Quote &#x3C;/button></span></li>\n<li><span id=\"a77a\"><code>onClick</code> is the event listener.</span></li>\n<li><span id=\"f406\"><code>{this.changeQuote}</code> is the event handler method.</span></li>\n<li><span id=\"7dca\">Our Class Component File should now look like this with the new additions:</span></li>\n</ul>\n<!-- -->\n<pre><code>import React from \"react\";\nclass RandomQuote extends React.Component {\n  constructor() {\n    super();\n    const quotes = [\n      \"May the Force be with you.\",\n      \"There's no place like home.\",\n      \"I'm the king of the world!\",\n      \"My mama always said life was like a box of chocolates.\",\n      \"I'll be back.\",\n    ];\n    this.state = {\n      quotes,\n      currentQuoteIndex: this.getRandomInt(quotes.length);\n    }\n  }\n  changeQuote = () => {\n    const newIndex = this.getRandomInt(this.state.quotes.length);\n    // Setting the 'new state' of currentQuoteIndex state property\n    // to newly generated random index #.\n    this.setState({\n      currentQuoteIndex: newIndex;\n    })\n  }\n  getRandomInt(max) {\n    return Math.floor(Math.random() * Math.floor(max));\n  }\n  render() {\n    return (\n      &#x3C;div>\n        &#x3C;h2>Random Quote&#x3C;/h2>\n        &#x3C;p>{this.state.quotes[this.state.currentQuoteIndex]}&#x3C;/p>\n        &#x3C;button type=\"button\" onClick={this.changeQuote}>\n          Change Quote\n        &#x3C;/button>\n      &#x3C;/div>\n    )\n  }\n}\nexport default RandomQuote;\n</code></pre>\n<p>Don't modify state directly</p>\n<ul>\n<li><span id=\"ca27\">It is important to <code>never</code> modify your state directly!</span></li>\n<li><span id=\"780d\">ALWAYS use <code>this.setState</code> method to update state.</span></li>\n<li><span id=\"1581\">This is because when you only use this.state to re-assign, no re-rendering will occur => leaving our component out of sync. Properly updating state from the previous state</span></li>\n<li><span id=\"dc5a\">In our current example, the way we have <code>changeQuote</code> set up leaves us with occasionally producing the same index twice in a row.</span></li>\n<li><span id=\"0bff\">One solution is to design a loop but keep in mind that state updates are handled asynchronously in React (your current value is not guaranteed to be the latest)</span></li>\n<li><span id=\"39f9\">A safe method is to pass an anonymous method to <code>this.setState</code> (instead of an object literal) Previous</span></li>\n</ul>\n<!-- -->\n<pre><code>changeQuote = () => {\n    const newIndex = this.getRandomInt(this.state.quotes.length);\n    this.setState({\n      currentQuoteIndex: newIndex;\n    })\n  }\n</code></pre>\n<p>Passing w/ Anon Method</p>\n<pre><code>changeQuote = () => {\n  this.setState((state, props) => {\n    const { quotes, currentQuoteIndex } = state;\n    let newIndex = -1;\n    do {\n      newIndex = this.getRandomInt(quote.length);\n    } while (newIndex === currentQuoteIndex);\n    return {\n      currentQuoteIndex: newIndex,\n    };\n  });\n};\n</code></pre>\n<p>Providing default values for props</p>\n<ul>\n<li><span id=\"7e8c\">In our current example, we pass in a static array of predefined quotes in our constructor.</span></li>\n<li><span id=\"3e8f\">The way it is set up right now leaves our list of quotes unchanged after initialization.</span></li>\n<li><span id=\"add0\">We can make quotes more dynamic by replacing our static array with a <code>props</code> argument passed into <code>super</code>.</span></li>\n<li><span id=\"53d6\">constructor(props) { super(props); }</span></li>\n<li><span id=\"918a\">We can now move our quotes array to our application entry point and pass it in as a prop. // Application Entry Point</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/index.js\nimport React from 'react'\nimport ReactDOM from 'react-dom';\nimport RandomQuote from './RandomQuote';\n// Re-assign our array here and pass it in as a prop in Render.\nconst quotes = [\n      \"May the Force be with you.\",\n      \"There's no place like home.\",\n      \"I'm the king of the world!\",\n      \"My mama always said life was like a box of chocolates.\",\n      \"I'll be back.\",\n      \"This way I can define more quotes\",\n    ];\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;RandomQuote quotes={quotes}/>\n  &#x3C;/React.StrictMode>\n  document.getElementById('root');\n)\n</code></pre>\n<ul>\n<li><span id=\"a0bb\">One thing to note about this workaround is that the caller of the component <em>must</em> set the quotes prop or the component will throw an error => so use <code>defaultProps</code>!</span></li>\n</ul>\n<!-- -->\n<pre><code>// At the bottom of RandomQuote.js...\nRandomQuote.defaultProps = {\n  quotes: [\n    \"May the Force be with you.\",\n    \"There's no place like home.\",\n    \"I'm the king of the world!\",\n    \"My mama always said life was like a box of chocolates.\",\n    \"I'll be back.\",\n    \"This way I can define more quotes\",\n  ],\n};\n</code></pre>\n<ul>\n<li><span id=\"c575\">A good safety net in case the consumer/caller doesn't provide a value for the quotes array.</span></li>\n<li><span id=\"3be6\">We can even remove it from our index.js now and an error will not be thrown.</span></li>\n</ul>\n<hr>\n<h3>Handling Events</h3>\n<ul>\n<li><span id=\"a82e\">To add an event listener to an element, just define a method to handle the event and associate that method with the element event you are listening for. Example</span></li>\n</ul>\n<!-- -->\n<pre><code>import React from \"react\";\nclass AlertButton extends React.Component {\n  showAlert = () => {\n    window.alert(\"Button Clicked!\");\n  };\n  render() {\n    return (\n      &#x3C;button type=\"button\" onClick={this.showAlert}>\n        Submit\n      &#x3C;/button>\n    );\n  }\n}\n</code></pre>\n<ul>\n<li><span id=\"a852\">Note that when refering the handler method in onClick we're not invoking showAlert simply just passing a reference. Preventing default behavior</span></li>\n<li><span id=\"5cb0\">HTML Elements in the browser often have a lot of default behavior.</span></li>\n<li><span id=\"df4d\">I.E. Clicking on an <code>&#x3C;a></code> element navigates so a resource denoted by <code>&#x3C;href></code> property.</span></li>\n<li><span id=\"952c\">Here is an example of where using <code>e.preventDefault()</code> could come in handy.</span></li>\n</ul>\n<!-- -->\n<pre><code>import React from \"react\";\nclass NoDefaultSubmitForm extends React.Component {\n  submitForm = (e) => {\n    e.preventDefault();\n    window.alert(\"Handling form submission...\");\n  };\n  render() {\n    return (\n    &#x3C;form onSubmit={this.submitForm}>\n      &#x3C;button>Submit&#x3C;/button>\n    &#x3C;/form>;\n    )}\n}\n</code></pre>\n<ul>\n<li><span id=\"b149\">The button contained within the form will end up refreshing the page before <code>this.submitForm</code> method can be completed.</span></li>\n<li><span id=\"a034\">We can stick an <code>e.preventDefault()</code> into the actual method to get around this problem.</span></li>\n<li><span id=\"004a\"><code>e</code> : Parameter that references a <code>Synthetic Event</code> object type. Using <code>this</code> in event handlers</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/AlertButton.js\nimport React from \"react\";\nclass AlertButton extends React.Component {\n  showAlert = () => {\n    window.alert(\"Button clicked!\");\n    console.log(this);\n  };\n  render() {\n    return (\n      &#x3C;button type=\"button\" onClick={this.showAlert}>\n        Click Me\n      &#x3C;/button>\n    );\n  }\n}\nexport default AlertButton;\n</code></pre>\n<ul>\n<li><span id=\"3c8f\">When we console log <code>this</code> we see the AlertButton object.</span></li>\n<li><span id=\"42a0\">If we were to write the showAlert method with a regular class method like:</span></li>\n</ul>\n<!-- -->\n<pre><code>showAlert() {\n  console.log(this);\n}\n</code></pre>\n<ul>\n<li><span id=\"c081\">We would get <code>undefined</code> => remember that fat arrow binds to the current context! Reviewing class methods and the <code>this</code> keyword</span></li>\n<li><span id=\"e98e\">Let's refresh on binding.</span></li>\n</ul>\n<!-- -->\n<pre><code>class Boyfriend {\n  constructor() {\n    this.name = \"Momato Riruru\";\n  }\n  displayName() {\n    console.log(this.name);\n  }\n}\nconst Ming = new Boyfriend();\nMing.displayName(); // => Momato Riruru\nconst displayAgain = Ming.displayName;\ndisplayAgain(); // => Result in a Type Error: Cannot read property 'name' of undefined.\n</code></pre>\n<ul>\n<li><span id=\"fb85\">The first time we use our <code>displayMethod</code> call, it is called directly on the instance of the boyfriend class, which is why <code>Momato Riruru</code> was printed out.</span></li>\n<li><span id=\"3a9b\">The second time it was called, the ref of the method is stored as a variable and method is called on that variable instead of the instance; resulting in a type error (it has lost it's context)</span></li>\n<li><span id=\"0a2c\">Remember we can use the <code>bind</code> method to rebind context!</span></li>\n<li><span id=\"d6d9\">We can refactor to get the second call working like this:</span></li>\n<li><span id=\"7ead\">const displayAgain = Ming.displayName.bind(Ming); displayAgain(); // => Now Momato Riruru will be printed out.</span></li>\n<li><span id=\"a8b0\">To continue using function declarations vs fat arrow we can assign context in a constructor within a class component.</span></li>\n</ul>\n<!-- -->\n<pre><code>import React from \"react\";\nclass AlertButton extends React.Component {\n  constructor() {\n    super();\n    this.showAlert = this.showAlert.bind(this); // binding context\n  }\n  showAlert() {\n    console.log(this);\n  }\n  render() {\n    return (\n      &#x3C;button type=\"button\" onClick={this.showAlert}>\n        Submit\n      &#x3C;/button>\n    );\n  }\n}\nexport default AlertButton;\n</code></pre>\n<ul>\n<li><span id=\"a4e6\"><code>Experimental Syntax</code> : Syntax that has been proposed to add to ECMAScript but hasn't officially been added to the language specification yet.</span></li>\n<li><span id=\"801d\">It's good to pick one approach and use it consistently, either:</span></li>\n<li><span id=\"2e3e\">Class Properties &#x26; Arrow Functions</span></li>\n<li><span id=\"cc27\">Bind Method &#x26; This Keyword The <code>SyntheticEvent</code> object</span></li>\n<li><span id=\"f177\">Synthetic Event Objects: Cross Browser wrappeds around the browser's native event.</span></li>\n<li><span id=\"418f\">Includes the use of stopPropagation() and preventDefault();</span></li>\n<li><span id=\"b94f\">Attributes of the Synthetic Event Object:Attributesboolean bubblesboolean cancelableDOMEventTarget currentTargetboolean defaultPreventednumber eventPhaseboolean isTrustedDOMEvent nativeEventvoid preventDefault()boolean isDefaultPrevented()void stopPropagation()boolean isPropagationStopped()void persist()DOMEventTarget targetnumber timeStampstring type</span></li>\n<li><span id=\"7484\"><code>nativeEvent</code> : property defined in a synthetic event object that gives you access to the underlying native browser event (rarely used!)</span></li>\n</ul>\n<hr>\n<h3>Forms in React</h3>\n<p><em>Exercise being done in a separate file</em> Random Notes</p>\n<ul>\n<li><span id=\"45ec\"><code>onChange</code> : detects when a value of an input element changes.</span></li>\n<li><span id=\"9ca4\">Assigning <code>onChange</code> to our input fields makes our component's state update in real time during user input.</span></li>\n<li><span id=\"eb83\">Dont forget to add <code>preventDefault</code> onto form submissions to deal with the default behavior of the browser refreshing the page!</span></li>\n<li><span id=\"c413\"><code>submittedOn: new Date(),</code> Can be added to a form, most likely will persist into a DB.</span></li>\n<li><span id=\"b97f\">Controlled Components</span></li>\n<li><span id=\"ac48\">We use the <code>onChange</code> event handlers on form fields to keep our component's state as the <code>\"one source of truth\"</code></span></li>\n<li><span id=\"4685\">Adding an <code>onChange</code> event handler to every single input can massively bloat your code.</span></li>\n<li><span id=\"448c\">Try assiging it to it's own method to apply everywhere.</span></li>\n<li><span id=\"f229\"><code>textarea</code> is handled differently in react: it takes in a value property to handle what the inner text will be.</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/ContactUs.js\nimport React from \"react\";\nclass ContactUs extends React.Component {\n  constructor() {\n    super();\n    this.state = {\n      name: \"\",\n      email: \"\",\n      phone: \"\",\n      phoneType: \"\",\n      comments: \"\",\n      validationErrors: [],\n    };\n  }\n  onChange = (e) => {\n    const { name, value } = e.target;\n    this.setState({ [name]: value });\n  };\n  // Vanilla JS Function for validating inputs\n  validate(name, email) {\n    const validationErrors = [];\n    if (!name) {\n      validationErrors.push(\"Please provide a Name\");\n    }\n    if (!email) {\n      validationErrors.push(\"Please provide an Email\");\n    }\n    return validationErrors;\n  }\n  onSubmit = (e) => {\n    // Prevent the default form behavior\n    // so the page doesn't reload.\n    e.preventDefault();\n    // Retrieve the contact us information from state.\n    const { name, email, phone, phoneType, comments } = this.state;\n    // Get Validation Errors - proceeding destructuring values from this.state.\n    const validationErrors = this.validate(name, email);\n    // If we have errors...\n    if (validationErrors.length > 0) {\n      this.setState({ validationErrors });\n    } else {\n      // Proceed normally\n      // Create a new object for the contact us information.\n      const contactUsInformation = {\n        name,\n        email,\n        phone,\n        phoneType,\n        comments,\n        submittedOn: new Date(),\n      };\n      console.log(contactUsInformation);\n      // Reset the form state.\n      this.setState({\n        name: \"\",\n        email: \"\",\n        phone: \"\",\n        phoneType: \"\",\n        comments: \"\",\n        validationErrors: [],\n      });\n    }\n  };\n  render() {\n    const { name, email, phone, phoneType, comments, validationErrors } =\n      this.state;\n    return (\n      &#x3C;div>\n        &#x3C;h2>Contact Us&#x3C;/h2>\n        {validationErrors.length > 0 &#x26;&#x26; (\n          &#x3C;div>\n            The following errors were found:\n            &#x3C;ul>\n              {validationErrors.map((error) => (\n                &#x3C;li key={error}>{error}&#x3C;/li>\n              ))}\n            &#x3C;/ul>\n          &#x3C;/div>\n        )}\n        &#x3C;form onSubmit={this.onSubmit}>\n          &#x3C;div>\n            &#x3C;label htmlFor=\"name\">Name:&#x3C;/label>\n            &#x3C;input\n              id=\"name\"\n              name=\"name\"\n              type=\"text\"\n              onChange={this.onChange}\n              value={name}\n            />\n          &#x3C;/div>\n          &#x3C;div>\n            &#x3C;label htmlFor=\"email\">Email:&#x3C;/label>\n            &#x3C;input\n              id=\"email\"\n              name=\"email\"\n              type=\"text\"\n              onChange={this.onChange}\n              value={email}\n            />\n          &#x3C;/div>\n          &#x3C;div>\n            &#x3C;label htmlFor=\"phone\">Phone:&#x3C;/label>\n            &#x3C;input\n              id=\"phone\"\n              name=\"phone\"\n              type=\"text\"\n              onChange={this.onChange}\n              value={phone}\n            />\n            &#x3C;select name=\"phoneType\" onChange={this.onChange} value={phoneType}>\n              &#x3C;option value=\"\">Select a phone type...&#x3C;/option>\n              {this.props.phoneTypes.map((phoneType) => (\n                &#x3C;option key={phoneType}>{phoneType}&#x3C;/option>\n              ))}\n            &#x3C;/select>\n          &#x3C;/div>\n          &#x3C;div>\n            &#x3C;label htmlFor=\"comments\">Comments:&#x3C;/label>\n            &#x3C;textarea\n              id=\"comments\"\n              name=\"comments\"\n              onChange={this.onChange}\n              value={comments}\n            />\n          &#x3C;/div>\n          &#x3C;div>\n            &#x3C;button>Submit&#x3C;/button>\n          &#x3C;/div>\n        &#x3C;/form>\n      &#x3C;/div>\n    );\n  }\n}\nContactUs.defaultProps = {\n  phoneTypes: [\"Home\", \"Work\", \"Mobile\"],\n};\nexport default ContactUs;\n</code></pre>\n<ul>\n<li><span id=\"a2da\">We can use validation libraries like <code>validate</code> to make our validation functions more complex.</span></li>\n</ul>\n<!-- -->\n<pre><code>import isEmail from \"validator/es/lib/isEmail\";\n  validate(name, email) {\n    const validationErrors = [];\n    if (!name) {\n      validationErrors.push(\"Please provide a Name\");\n    }\n    if (!email) {\n      validationErrors.push(\"Please provide an Email\");\n    } else if (!isEmail(email)) {\n      validationErrors.push(\"Please provide a valid Email\");\n    }\n    return validationErrors;\n  }\n</code></pre>\n<p>Note About Client-side vs server-side validation</p>\n<ul>\n<li><span id=\"5808\">Server-side validation is not optional.</span></li>\n<li><span id=\"3bb8\">Tech-savvy users can manipulate client-side validations.</span></li>\n<li><span id=\"311f\">Sometimes the 'best approach' is to skip implementing validations on the client-side and rely completely on the server-side validation.</span></li>\n</ul>\n<hr>\n<h3>Component Lifecycle</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*c24XQBvqBBg0Eztz\" class=\"graf-image\" /></figure>-   <span id=\"e1d9\">Component Lifecycle is simply a way of describing the key moments in the lifetime of a component.</span>\n<ol>\n<li><span id=\"8e64\">Loading (Mounting)</span></li>\n<li><span id=\"7e94\">Updating</span></li>\n<li><span id=\"2cd3\">Unloading (Unmounting) The lifecycle of a React component</span></li>\n<li><span id=\"7740\">Each <code>Class Component</code> has several <code>lifecycle methods</code> that you can add to run code at specific times.</span></li>\n<li><span id=\"e7d0\"><code>componentDidMount</code> : Method called after your component has been added to the component tree.</span></li>\n<li><span id=\"6d92\"><code>componentDidUpdate</code> : Method called after your component has been updated.</span></li>\n<li><span id=\"9ee2\"><code>componentWillUnmount</code> : Method called just before your component is removed from the component tree.</span></li>\n<li><span id=\"7bd8\"><code>Mounting</code></span></li>\n<li><span id=\"6f9e\"><code>constructor</code> method is called</span></li>\n<li><span id=\"e9c7\"><code>render</code> method is called</span></li>\n<li><span id=\"eef3\">React updates the <code>DOM</code></span></li>\n<li><span id=\"19bb\"><code>componentDidMount</code> is called</span></li>\n<li><span id=\"85f1\"><code>Updating</code></span></li>\n<li><span id=\"94f5\">When component receives new <code>props</code></span></li>\n<li><span id=\"e635\"><code>render</code> method is called</span></li>\n<li><span id=\"70f9\">React updates the <code>DOM</code></span></li>\n<li><span id=\"9507\"><code>componentDidUpdate</code> is called</span></li>\n<li><span id=\"b00a\">When <code>setState</code> is called</span></li>\n<li><span id=\"6864\"><code>render</code> method is called</span></li>\n<li><span id=\"e13b\">React updates the <code>DOM</code></span></li>\n<li><span id=\"c459\"><code>componentDidUpdate</code> is called</span></li>\n<li><span id=\"bfdd\"><code>Unmounting</code></span></li>\n<li><span id=\"10c1\">The moment before a class component is removed from the component tree:</span></li>\n<li><span id=\"c214\"><code>componentDidMount</code> will be called. Avoiding the legacy lifecycle methods</span></li>\n<li><span id=\"d438\">Occasionally you will encounter some deprecated lifecycle methods:</span></li>\n<li><span id=\"1f6b\">UNSAFE_componentWillMount</span></li>\n<li><span id=\"48ac\">UNSAFE_componentWillReceiveProps</span></li>\n<li><span id=\"df27\">UNSAFE_componentWillUpdate</span></li>\n<li><span id=\"af07\">Just know they will be removed soon from React's API, peace. Using the class component lifecycle methods <em>Exercise done in sep. directory</em></span></li>\n<li><span id=\"344c\">Assorted Notes:</span></li>\n<li><span id=\"d6b1\">Common Use for <code>componentDidMount</code> lifecycle method is for fetching data from an API.</span></li>\n</ol>\n<hr>\n<p>—</p>\n<h3>Notes</h3>\n<h3>React Context</h3>\n<ul>\n<li><span id=\"e968\">You can use <code>React Context</code> to pass data through a component tree without having to manually thread props.</span></li>\n<li><span id=\"89d9\">Convenient way to share &#x26; update <code>global data</code>. Creating a Context</span></li>\n</ul>\n<!-- -->\n<pre><code>// PupContext.js\nimport { createContext } from \"react\";\nconst PupContext = createContext();\nexport default PupContext;\n</code></pre>\n<ul>\n<li><span id=\"a8bf\">We use <code>React.createContext</code> to create context.</span></li>\n<li><span id=\"98b9\">Keep in mind if you invoke this method with aruguments, those arguments will be set as default context. Adding a Provider to the App component</span></li>\n<li><span id=\"a919\">In order to pass context over to child components we need to wrap them in a provider component.</span></li>\n<li><span id=\"9afc\">The provider component takes in a value property that points to the information that needs to be passed to the children.</span></li>\n</ul>\n<!-- -->\n<pre><code>&#x3C;MyContext.Provider value={/* some value */}>\n  &#x3C;ChildComponent />\n&#x3C;/MyContext.Provider>\n</code></pre>\n<p>Setting up a Consumer</p>\n<pre><code>&#x3C;MyContext.Consumer>\n  {(value) => &#x3C;Component value={value} />}\n&#x3C;/MyContext.Consumer>\n</code></pre>\n<ul>\n<li><span id=\"2693\">Keep in mind that <code>Context.Consumer</code> expects a function as a child.</span></li>\n<li><span id=\"19fc\">The function has a value prop passed in from <code>Context.Provider</code></span></li>\n</ul>\n<hr>\n<h3>Notes</h3>\n<h3>Redux Explained</h3>\n<ul>\n<li><span id=\"eab4\">JS Framework for managing the frontend state of a web application.</span></li>\n<li><span id=\"3c8b\">Gives us ability to store information in an organized manner in a web app and quickly retrieve that information from anywhere in the app.</span></li>\n<li><span id=\"695d\"><code>Redux</code></span></li>\n<li><span id=\"00d5\">Client Side Data Management</span></li>\n<li><span id=\"dd41\">Controls “Frontend State”</span></li>\n<li><span id=\"d828\">NOT Your Database</span></li>\n<li><span id=\"855a\">NOT Component State</span></li>\n<li><span id=\"4c1a\">Just used for managing Data</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*N7KFfhOZZ7UrY8s4\" class=\"graf-image\" /></figure>-   <span id=\"04c0\">Visual of how an app without React manages it's data.</span>\n-   <span id=\"bae2\">A lot of prop threading happening.</span>\n-   <span id=\"989f\">Data stored in a sep. location — `global data`. The Anatomy of Redux</span>\n-   <span id=\"cd66\">`Store`</span>\n-   <span id=\"9453\">Holds the Frontend State</span>\n-   <span id=\"cea4\">Provides an API for the Frontend State</span>\n-   <span id=\"c653\">`Action`</span>\n-   <span id=\"7fb4\">POJOs</span>\n-   <span id=\"69a1\">Outline Changes to Frontend State</span>\n-   <span id=\"1a0a\">`Reducers`</span>\n-   <span id=\"a372\">Functions</span>\n-   <span id=\"8bb8\">Make Changes to Frontend State Where did Redux come from?</span>\n-   <span id=\"6d0b\">There are three central philosophies of Redux:</span>\n<ol>\n<li><span id=\"12ac\"><code>A Single Source of Truth</code> : state is stored in a POJO</span></li>\n<li><span id=\"d178\"><code>State is Read Only</code> : State is immutable, modified by dispatching actions.</span></li>\n<li><span id=\"51c5\"><code>Changes are Made with Pure Functions</code> : Reducers that receive the actions and return updated state are pure functions of the old state and action. When is it appropriate to use Redux?</span></li>\n<li><span id=\"117f\">When doing a project with simpler global state requirements, it may be better to choose React's Context API over Redux.</span></li>\n<li><span id=\"5d3d\">Redux offers more flexibility and support for middleware along with richer developer tools. Vocabulary</span></li>\n<li><span id=\"1ceb\"><code>State</code></span></li>\n<li><span id=\"49e7\"><em>Redux is a State Manager</em></span></li>\n<li><span id=\"5018\">State is all the information stored by that program at a particular point in time.</span></li>\n<li><span id=\"8fdb\">Redux's main job is to store the state and make it directly available to your entire app.</span></li>\n<li><span id=\"8bbd\"><code>Store</code></span></li>\n<li><span id=\"f027\"><em>Redux stores state in a single store</em>.</span></li>\n<li><span id=\"c97e\">Redux store is a single JS object with a couple of methods (not a class!)</span></li>\n<li><span id=\"199d\">Methods include: <code>getState</code>, <code>dispatch(action)</code>, and <code>subscribe(listener)</code></span></li>\n<li><span id=\"8bcf\"><code>Actions</code></span></li>\n<li><span id=\"2049\"><em>Redux store is updated by dispatching actions</em></span></li>\n<li><span id=\"cbac\">Action is just a POJO that includes a mandatory <code>type</code> property.</span></li>\n<li><span id=\"f2d5\">Contain info to update the store.</span></li>\n<li><span id=\"1bd9\">We dispatch actions in response to User actions or AJAX requests.</span></li>\n<li><span id=\"1b78\"><code>Pure Functions</code></span></li>\n<li><span id=\"c436\"><em>Redux Reducers are Pure Functions</em></span></li>\n<li><span id=\"e204\">Functions are pure when their behavior depends only on it's arguments as has no side effects.</span></li>\n<li><span id=\"450b\">Simply takes in an argument and outputs a value.</span></li>\n<li><span id=\"e146\"><code>Reducer</code></span></li>\n<li><span id=\"9721\"><em>Redux handles actions using reducers</em></span></li>\n<li><span id=\"c312\">A function that is called each time an action is dispatched.</span></li>\n<li><span id=\"84d8\">Takes in an <code>action</code> and <code>current state</code></span></li>\n<li><span id=\"90a3\">Required to be pure functions so their behavior is predictable.</span></li>\n<li><span id=\"5c36\"><code>Middleware</code></span></li>\n<li><span id=\"6b22\"><em>Customize response to dispatch actions by using Middleware</em></span></li>\n<li><span id=\"9287\">Middleware is an optional component of Redus that allows custom responses to dispatched actions.</span></li>\n<li><span id=\"f953\">Most common use is to dispatch async requests to a server.</span></li>\n<li><span id=\"773e\"><code>Time Traveling Dev Tools</code></span></li>\n<li><span id=\"d703\"><em>Redux can time travel wow</em></span></li>\n<li><span id=\"7187\">Time travel refers to Redux's ability to revert to a previous state because reducers are all pure functions.</span></li>\n<li><span id=\"ada3\"><code>Thunks</code></span></li>\n<li><span id=\"ee0f\"><em>Convenient format for taking async actions in Redux</em></span></li>\n<li><span id=\"586e\">General concept in CS referring to a function who's primary purpose is to call another function.</span></li>\n<li><span id=\"6f45\">Most commonly used to make async API requests.</span></li>\n</ol>\n<hr>\n<h3>Flux and Redux</h3>\n<p>What is Flux?</p>\n<ul>\n<li><span id=\"06d1\">Front-end application architecutre.</span></li>\n<li><span id=\"8311\">A pattern in which to structure an application.</span></li>\n<li><span id=\"05e6\">Unidirectional Data Flow — offers more predictability.</span></li>\n<li><span id=\"751c\"><code>Actions</code> : Begins the data flow of data, simple object that contains a type; type indicates the type of change to be performed.</span></li>\n<li><span id=\"e8e7\"><code>Dispatcher</code> : Mechanism for distributing actions to the store.</span></li>\n<li><span id=\"af4f\"><code>Store</code> : The entire state of the application, responsible for updating the state of your app.</span></li>\n<li><span id=\"d7ff\"><code>View</code> : Unit of code that's responsible for rendering the user interface. Used to re-render the application when actions and changes occur.</span></li>\n</ul>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*ywV6dO4a4QcGJxK5\" class=\"graf-image\" /></figure>-   <span id=\"af94\">Redux</span>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*Nd73GjTY1PVQtjtQ\" class=\"graf-image\" /></figure>-   <span id=\"dc16\">Library that facilitates the implementation of Flux.</span>\n-   <span id=\"623a\">Redux Three Principles</span>\n-   <span id=\"2ac6\">`Single Source of Truth`</span>\n-   <span id=\"a2b9\">`State is Read-Only`</span>\n-   <span id=\"897b\">`Only Pure Functions Change State`</span>\n<hr>\n<h3>Store</h3>\n<ul>\n<li><span id=\"cd1e\">Simply an object that holds the application state wrapped in an API.</span></li>\n<li><span id=\"f57c\"><code>Three methods</code>:</span></li>\n<li><span id=\"354c\"><code>getState()</code> : Returns the store's current state.</span></li>\n<li><span id=\"537c\"><code>dispatch(action)</code> : Passes an action into the store's reducer to tell it what info to update.</span></li>\n<li><span id=\"4539\"><code>subscribe(callback)</code> : Registers a callback to be triggered whenever the store updates. Updating the Store</span></li>\n</ul>\n<!-- -->\n<pre><code>store.dispatch(action);\n// Add Orange Action\nconst addOrange = {\n  type: \"ADD_FRUIT\",\n  fruit: \"orange\",\n};\n// Reducer for Orange Action\nconst fruitReducer = (state = [], action) => {\n  switch (action.type) {\n    case \"ADD_FRUIT\":\n      return [...state, action.fruit];\n    default:\n      return state;\n  }\n};\n// Run the Dispatch\nconsole.log(store.getState()); // []\nstore.dispatch(addOrange);\nconsole.log(store.getState()); // [ 'orange' ]\n</code></pre>\n<p>Subscribing to the store</p>\n<ul>\n<li><span id=\"1a02\">Whenever a store process a dispatch(), it triggers all its subscribers.</span></li>\n<li><span id=\"e667\"><code>Subscribers</code> : callbacks that can be added to the store via subscribe().</span></li>\n</ul>\n<!-- -->\n<pre><code>const display = () => {\n  console.log(store.getState());\n};\nconst unsubscribeDisplay = store.subscribe(display);\nstore.dispatch(addOrange); // [ 'orange', 'orange' ]\n// display will no longer be invoked after store.dispatch()\nunsubscribeDisplay();\nstore.dispatch(addOrange); // no output\n</code></pre>\n<p>Reviewing a simple example</p>\n<pre><code>// app.js\nconst { createStore } = require(\"redux\");\n// Define the store's reducer.\nconst fruitReducer = (state = [], action) => {\n  switch (action.type) {\n    case \"ADD_FRUIT\":\n      return [...state, action.fruit];\n    default:\n      return state;\n  }\n};\n// Create the store.\nconst store = createStore(fruitReducer);\n// Define an 'ADD_FRUIT' action for adding an orange to the store.\nconst addOrange = {\n  type: \"ADD_FRUIT\",\n  fruit: \"orange\",\n};\n// Log to the console the store's state before and after\n// dispatching the 'ADD_FRUIT' action.\nconsole.log(store.getState()); // []\nstore.dispatch(addOrange);\nconsole.log(store.getState()); // [ 'orange' ]\n// Define and register a callback to listen for store updates\n// and console log the store's state.\nconst display = () => {\n  console.log(store.getState());\n};\nconst unsubscribeDisplay = store.subscribe(display);\n// Dispatch the 'ADD_FRUIT' action. This time the `display` callback\n// will be called by the store when its state is updated.\nstore.dispatch(addOrange); // [ 'orange', 'orange' ]\n// Unsubscribe the `display` callback to stop listening for store updates.\nunsubscribeDisplay();\n// Dispatch the 'ADD_FRUIT' action one more time\n// to confirm that the `display` method won't be called\n// when the store state is updated.\nstore.dispatch(addOrange); // no output\n</code></pre>\n<h3>Reducers</h3>\n<ul>\n<li><span id=\"98f3\">Reducer function receives the current <code>state</code> and <code>action</code>, updates the state appropriately based on the <code>action.type</code> and returns the following state.</span></li>\n<li><span id=\"4cee\">You can bundles different action types and ensuing logic by using a switch/case statement.</span></li>\n</ul>\n<!-- -->\n<pre><code>const fruitReducer = (state = [], action) => {\n  switch (action.type) {\n    case \"ADD_FRUIT\":\n      return [...state, action.fruit];\n    case \"ADD_FRUITS\":\n      return [...state, ...action.fruits];\n    case \"SELL_FRUIT\":\n      const index = state.indexOf(action.fruit);\n      if (index !== -1) {\n        // remove first instance of action.fruit\n        return [...state.slice(0, index), ...state.slice(index + 1)];\n      }\n      return state; // if action.fruit is not in state, return previous state\n    case \"SELL_OUT\":\n      return [];\n    default:\n      return state;\n  }\n};\n</code></pre>\n<p>Reviewing how Array#slice works</p>\n<pre><code>const fruits = [\"apple\", \"apple\", \"orange\", \"banana\", \"watermelon\"];\n// The index of the 'orange' element is 2.\nconst index = fruits.indexOf(\"orange\");\n// `...fruits.slice(0, index)` returns the array ['apple', 'apple']\n// `...fruits.slice(index + 1)` returns the array ['banana', 'watermelon']\n// The spread syntax combines the two array slices into the array\n// ['apple', 'apple', 'banana', 'watermelon']\nconst newFruits = [...fruits.slice(0, index), ...fruits.slice(index + 1)];\n</code></pre>\n<ul>\n<li><span id=\"f322\">Approach that can be used to remove an element without mutating the original array. Avoiding state mutations</span></li>\n<li><span id=\"f862\">Your reducer must always return a new object if the state changes. GOOD</span></li>\n</ul>\n<!-- -->\n<pre><code>const goodReducer = (state = { count: 0 }, action) => {\n  switch (action.type) {\n    case \"INCREMENT_COUNTER\":\n      const nextState = Object.assign({}, state);\n      nextState.count++;\n      return nextState;\n    default:\n      return state;\n  }\n};\n</code></pre>\n<p>BAD</p>\n<pre><code>const badReducer = (state = { count: 0 }, action) => {\n  switch (action.type) {\n    case \"INCREMENT_COUNTER\":\n      state.count++;\n      return state;\n    default:\n      return state;\n  }\n};\n</code></pre>\n<hr>\n<h3>Actions</h3>\n<ul>\n<li><span id=\"64b4\">Actions are the only way to trigger changes to the store's state. Using action creators</span></li>\n</ul>\n<!-- -->\n<pre><code>const addOrange = {\n  type: \"ADD_FRUIT\",\n  fruit: \"orange\",\n};\nstore.dispatch(addOrange);\nconsole.log(store.getState()); // [ 'orange' ]\n</code></pre>\n<ul>\n<li><span id=\"c39d\">fruit is the <code>payload key</code> and orange is the <code>state data</code></span></li>\n<li><span id=\"43e2\"><code>Action Creators</code> : Functions created from extrapolating the creation of an action object.</span></li>\n</ul>\n<!-- -->\n<pre><code>const addFruit = (fruit) => ({\n  type: \"ADD_FRUIT\",\n  fruit,\n});\n</code></pre>\n<ul>\n<li><span id=\"11fd\">Use parenthesis for implicit return value.</span></li>\n<li><span id=\"eea8\">We can now add whatever fruit we'd like.</span></li>\n</ul>\n<!-- -->\n<pre><code>store.dispatch(addFruit(\"apple\"));\nstore.dispatch(addFruit(\"strawberry\"));\nstore.dispatch(addFruit(\"lychee\"));\nconsole.log(store.getState()); // [ 'orange', 'apple', 'strawberry', 'lychee' ]\n</code></pre>\n<p>Preventing typos in action type string literals</p>\n<pre><code>const ADD_FRUIT = \"ADD_FRUIT\";\nconst ADD_FRUITS = \"ADD_FRUITS\";\nconst SELL_FRUIT = \"SELL_FRUIT\";\nconst SELL_OUT = \"SELL_OUT\";\nconst addFruit = (fruit) => ({\n  type: ADD_FRUIT,\n  fruit,\n});\nconst addFruits = (fruits) => ({\n  type: ADD_FRUITS,\n  fruits,\n});\nconst sellFruit = (fruit) => ({\n  type: SELL_FRUIT,\n  fruit,\n});\nconst sellOut = () => ({\n  type: SELL_OUT,\n});\n</code></pre>\n<ul>\n<li><span id=\"ae86\">Using constant variables helps reduce simple typos in a reducer's case clauses.</span></li>\n</ul>\n<hr>\n<h3>Debugging Arrow Functions</h3>\n<ul>\n<li><span id=\"43c6\">It is important to learn how to use debugger statements with arrow functions to effectively debug Redux cycle. Understanding the limitations of implicit return values</span></li>\n</ul>\n<!-- -->\n<pre><code>const addFruit = (fruit) => {\n  return {\n    type: \"ADD_FRUIT\",\n    fruit,\n  };\n};\nconst addFruit = (fruit) => {\n  debugger;\n  return {\n    type: \"ADD_FRUIT\",\n    fruit,\n  };\n};\n</code></pre>\n<ul>\n<li><span id=\"2806\">You must use explicit return statement arrow function to use a debugger.</span></li>\n</ul>\n<hr>\n<h3>React Router Introduction</h3>\n<p>Now that you know how to render components in a React app, how do you handle rendering different components for different website pages? React Router is the answer!</p>\n<p>Think of how you have created server-side routes in Express. Take the following URL and server-side route. Notice how the <code>/users/:userId</code> path corresponds with the <code>http://localhost:3000/users/2</code> URL to render a specific HTML page.</p>\n<pre><code>// http://localhost:3000/users/2\napp.get('/users/:userId', (req, res) => {\n  res.render('userProfile.pug');\n});\n</code></pre>\n<p>In the default React setup, you lose the ability to create routes in the same manner as in Express. This is what React Router aims to solve!</p>\n<p><a href=\"https://github.com/ReactTraining/react-router\" class=\"markup--anchor markup--p-anchor\">React Router</a> is a frontend routing library that allows you to control which components to display using the browser location. A user can also copy and paste a URL and email it to a friend or link to it from their own website.</p>\n<p>When you finish this article, you should be able to use the following from the <code>react-router-dom</code> library:</p>\n<ul>\n<li><span id=\"e5d3\"><code>&#x3C;BrowserRouter></code> to provide your application access to the <code>react-router-dom</code> library; and</span></li>\n<li><span id=\"e1cd\"><code>&#x3C;Route></code> to connect specific URL paths to specific components you want rendered; and</span></li>\n<li><span id=\"bf15\"><code>&#x3C;Switch></code> to wrap several <code>Route</code> elements, rendering only one even if several match the current URL; and</span></li>\n<li><span id=\"0318\">React Router's <code>match</code> prop to access route path parameters.</span></li>\n</ul>\n<h3>Getting started with routing</h3>\n<p>Since you are writing single page apps, you don't want to refresh the page each time you change the browser location. Instead, you want to update the browser location and your app's response using JavaScript. This is known as client-side routing. You are using React, so you will use React Router to do this.</p>\n<p>Create a simple react project template:</p>\n<pre><code>npx create-react-app my-app --template @appacademy/simple\n</code></pre>\n<p>Then install React Router:</p>\n<pre><code>npm install --save react-router-dom@^5.1.2\n</code></pre>\n<p>Now import <code>BrowserRouter</code> from <code>react-router-dom</code> in your entry file:</p>\n<pre><code>import { BrowserRouter } from 'react-router-dom`;\n</code></pre>\n<h3>BrowserRouter</h3>\n<p><code>BrowserRouter</code> is the primary component of the router that wraps your route hierarchy. It creates a React context that passes routing information down to all its descendent components. For example, if you want to give <code>&#x3C;App></code> and all its children components access to React Router, you would wrap <code>&#x3C;App></code> like so:</p>\n<pre><code>// ./src/index.js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter } from 'react-router-dom';\nimport App from './App';\n\nconst Root = () => {\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;App />\n    &#x3C;/BrowserRouter>\n  );\n};\n\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;Root />\n  &#x3C;/React.StrictMode>,\n  document.getElementById('root'),\n);\n</code></pre>\n<p>Now you can route the rendering of certain components to certain URLs (i.e <code>https://www.website.com/profile</code><a href=\"https://www.website.com/profile%29.\" class=\"markup--anchor markup--p-anchor\">).</a></p>\n<h3>HashRouter</h3>\n<p>Alternatively, you could import and use <code>HashRouter</code> from <code>react-router-dom</code>. Links for applications that use <code>&#x3C;HashRouter></code> would look like <code>https://www.website.com/#/profile</code> (with an <code>#</code> between the domain and path).</p>\n<p>You'll focus on using the <code>&#x3C;BrowserRouter></code>.</p>\n<h3>Creating frontend routes</h3>\n<p>React Router helps your React application render specific components based on the URL. The React Router component you'll use most often is <code>&#x3C;Route></code>.</p>\n<p>The <code>&#x3C;Route></code> component is used to wrap another component, causing that component to only be rendered if a certain URL is matched. The behavior of the <code>&#x3C;Route></code> component is controlled by the following props: <code>path</code>, <code>component</code>, <code>exact</code>, and <code>render</code> (optional).</p>\n<p>Create a simple <code>Users</code> component that returns <code>&#x3C;h1>This is the users index!&#x3C;/h1></code>. Now let's refactor your <code>index.js</code> file so that you can create your routes within the component:</p>\n<pre><code>// ./src/index.js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter, Route } from 'react-router-dom';\nimport App from './App';\nimport Users from './Users';\n\nconst Root = () => {\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;div>\n        {/* TODO: Routes */}\n      &#x3C;/div>\n    &#x3C;/BrowserRouter>\n  );\n};\n\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;Root />\n  &#x3C;/React.StrictMode>,\n  document.getElementById('root'),\n);\n</code></pre>\n<p>Note that <code>BrowserRouter</code> can only have a single child component, so the snippet above wraps all routes within parent a <code>&#x3C;div></code> element. Now let's create some routes!</p>\n<h3>component</h3>\n<p>Begin with the <code>component</code> prop. This prop takes a reference to the component to be rendered. Let's render your <code>App</code> component:</p>\n<pre><code>const Root = () => {\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;div>\n        &#x3C;Route component={App} />\n      &#x3C;/div>\n    &#x3C;/BrowserRouter>\n  );\n};\n</code></pre>\n<p>Now you'll need to connect a path to the component!</p>\n<h3>path</h3>\n<p>The wrapped component will only be rendered when the path is matched. The path matches the URL when it matches some initial portion of the URL. For example, a path of <code>/</code> would match both of the following URLs: <code>/</code> and <code>/users</code>. (Because <code>/users</code> begins with a <code>/</code> it matches the path <code>/</code>)</p>\n<pre><code>&#x3C;Route path='/' component={App} />\n&#x3C;Route path='/users' component={Users} />\n</code></pre>\n<p>Take a moment to navigate to <code>http://localhost:3000/users</code> to see how both the <code>App</code> component and <code>Users</code> component are rendering.</p>\n<h3>exact</h3>\n<p>If this <code>exact</code> flag is set, the path will only match when it exactly matches the URL. Then browsing to the <code>/users</code> path would no longer match <code>/</code> and only the <code>Users</code> component will be rendered (instead of both the <code>App</code> component and <code>Users</code> component).</p>\n<pre><code>&#x3C;Route exact path='/' component={App} />\n&#x3C;Route path='/users' component={Users} />\n</code></pre>\n<h3>render</h3>\n<p>This is an optional prop that takes in a function to be called. The function will be called when the path matches. The function's return value is rendered. You could also define a functional component inside the <code>component</code> prop, but this results in extra, unnecessary work for React. The <code>render</code> prop is preferred for inline rendering of simple functional components.</p>\n<p>The difference between using <code>component</code> and <code>render</code> is that <code>component</code> returns new JSX to be re-mounted every time the route renders, while <code>render</code> simply returns to JSX what will be mounted once and re-rendered. For any given route, you should only use either the <code>component</code> prop, or the <code>render</code> prop. If both are supplied, only the <code>component</code> prop will be used.</p>\n<pre><code>// This inline rendering will work, but is unnecessarily slow.\n&#x3C;Route path=\"/hello\" component={() => &#x3C;h1>Hello!&#x3C;/h1>} />\n\n// This is the preferred way for inline rendering.\n&#x3C;Route path=\"/hello\" render={() => &#x3C;h1>Hello!&#x3C;/h1>} />\n</code></pre>\n<p>It can be helpful to use <code>render</code> instead of <code>component</code> in your <code>&#x3C;Route></code> when you need to pass props into the rendered component. For example, imagine that you needed to pass the <code>users</code> object as a prop to your <code>Users</code> component. Then you could pass in props from <code>Root</code> to <code>Users</code> by returning the <code>Users</code> component like so:</p>\n<pre><code>// `users` to be passed as a prop:\nconst users = {\n  1: { name: 'Andrew' },\n  2: { name: 'Raymond' }\n};\n\n&#x3C;Route path=\"/users\" render={() => &#x3C;Users users={users} />} />\n</code></pre>\n<p>As a reminder, <code>BrowserRouter</code> can only have a single child component. That's why you have wrapped all your routes within parent a <code>&#x3C;div></code> element.</p>\n<pre><code>const Root = () => {\n  const users = {\n    1: { name: 'Andrew' },\n    2: { name: 'Raymond' }\n  };\n\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;div>\n        &#x3C;h1>Hi, I'm Root!&#x3C;/h1>\n        &#x3C;Route exact path=\"/\" component={App} />\n        &#x3C;Route path=\"/hello\" render={() => &#x3C;h1>Hello!&#x3C;/h1>} />\n        &#x3C;Route path=\"/users\" render={() => &#x3C;Users users={users} />} />\n      &#x3C;/div>\n    &#x3C;/BrowserRouter>\n  );\n};\n</code></pre>\n<p>With this <code>Root</code> component, you will always render the <code>&#x3C;h1>Hi, I'm Root!&#x3C;/h1></code>, regardless of the path. Because of the first <code>&#x3C;Route></code>, you will only render the <code>App</code> component if the path exactly matches <code>/</code>. Because of the second <code>&#x3C;Route></code>, you will only render the <code>Users</code> component if the path matches <code>/users</code>.</p>\n<h3>Route path params</h3>\n<p>A component's props can also hold information about a URL's parameters. The router will match route segments starting at <code>:</code> up to the next <code>/</code>, <code>?</code>, or <code>#</code>. Those matched values are then passed to components via their props. Such segments are <em>wildcard</em> values that make up your route parameters.</p>\n<p>For example, take the route below:</p>\n<pre><code>&#x3C;Route path=\"/users/:userId\"\n       render={(props) => &#x3C;Profile users={users} {...props} />} />\n</code></pre>\n<p>The router would break down the full <code>/users/:userId/photos</code> path to two parts: <code>/users</code>, <code>:userId</code>.</p>\n<p>The <code>Profile</code> component's props would have access to the <code>:userId</code> part of the <code>http://localhost:3000/users/:userId/photos</code> URL through the <code>props</code> with router parameter information. You would access the the <code>match</code> prop's parameters (<code>props.match.params</code>). If you are using the <code>render</code> prop of the <code>Route</code> component, make sure to spread the props back into the component if you want it to know about the \"match\" parameters.</p>\n<pre><code>// Route's `render` prop allows you to pass the `users`\n// prop and spread the router `props`.\nrender={(props) => &#x3C;Profile users={users} {...props} />}\n</code></pre>\n<p>The <code>params</code> object would then have a property of <code>userId</code> which would hold the value of the <code>:userId</code> <em>wildcard</em> value. Let's render the <code>userId</code> parameter in a user profile component. Take a moment to create a <code>Profile.js</code> file with the following code:</p>\n<pre><code>// ./src/Profile.js\nimport React from \"react\";\n\nconst Profile = (props) => (\n  &#x3C;div>\n    The user's id is {props.match.params.userId}.\n  &#x3C;/div>\n);\n\nexport default Profile;\n</code></pre>\n<p>Notice how it uses the <code>match</code> prop to access the <code>:userId</code> parameter from the URL. You can use this wildcard to make and AJAX call to fetch the user information from the database and render the return data in the <code>Profile</code> component. Recall that your <code>Profile</code> component was rendered at the path <code>/users/:userId</code>. Thus you can use your <code>userId</code> parameters from <code>match.params</code> to fetch a specific user:</p>\n<pre><code>// ./src/Profile.js\nimport React from \"react\";\n\nconst Profile = ({ users, match: { params } }) => {\n\n  // In a real-world scenario, you'd make a call to an API to fetch the user,\n  // instead of passing down and keying into a `users` prop.\n  const user = users[params.userId];\n\n  return (\n    &#x3C;div>\n      The user's id is {params.userId} and the user's name is {user.name}.\n    &#x3C;/div>\n  );\n};\n\nexport default Profile;\n</code></pre>\n<h3>Match</h3>\n<p>Now that you've seen your React Router's <code>match</code> prop in action, let's go over more about <a href=\"https://reacttraining.com/react-router/web/api/Route/route-props\" class=\"markup--anchor markup--p-anchor\">route props</a>! React Router passes information to the components as route props, accessible to all components with access to the React Router. The three props it makes available are <code>location</code>, <code>match</code> and <code>history</code>. You've learned about <code>props.match.params</code>, but now let's review the other properties of the <code>match</code> prop!</p>\n<p>This is an object that contains important information about how the current URL matches the route path. Here are some of the more useful keys on the <code>match</code> object:</p>\n<ul>\n<li><span id=\"1d2c\"><code>isExact</code>: a boolean that tells you whether or not the URL exactly matches the path</span></li>\n<li><span id=\"b558\"><code>url</code>: the current URL</span></li>\n<li><span id=\"ab28\"><code>path</code>: the route path it matched against (without wildcards filled in)</span></li>\n<li><span id=\"be5b\"><code>params</code>: the matches for the individual wildcard segments, nested under their names</span></li>\n</ul>\n<p>When you use React Router, the browser <code>location</code> and <code>history</code> are a part of the state of your app. You can store information about which component should be displayed, which user profile you are currently viewing, or any other piece of state, in the browser location. You can then access that information from anywhere your Router props are passed to in your app.</p>\n<p>Now that you've learned about parameters and route props, let's revisit your <code>Root</code> component to add an <code>exact</code> flag to your <code>/users</code> route so that it does not render with your <code>/users/:userId</code> route. Your component should look something like this:</p>\n<pre><code>const Root = () => {\n  const users = {\n    1: { name: 'Andrew' },\n    2: { name: 'Raymond' }\n  };\n\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;h1>Hi, I'm Root!&#x3C;/h1>\n      &#x3C;div>\n        &#x3C;Route exact path=\"/\" component={App} />\n        &#x3C;Route path=\"/hello\" render={() => &#x3C;h1>Hello!&#x3C;/h1>} />\n\n        {/* Render the `Users` page if no ID is included. */}\n        &#x3C;Route exact path=\"/users\" render={() => &#x3C;Users users={users} />} />\n\n        {/* Otherwise, render the profile page for that userId. */}\n        &#x3C;Route path=\"/users/:userId\" component={(props) => &#x3C;Profile users={users} {...props} />} />\n      &#x3C;/div>\n    &#x3C;/BrowserRouter>\n  );\n};\n</code></pre>\n<h3>What you learned</h3>\n<p>In this article, you learned how to:</p>\n<ul>\n<li><span id=\"92fc\">Use components from the React Router library; and</span></li>\n<li><span id=\"19b5\">Create routes to render specific components; and</span></li>\n<li><span id=\"fc9d\">Manage the order of rendered routes; and</span></li>\n<li><span id=\"3281\">Use the <code>exact</code> flag to ensure that a specific path renders a specific component; and</span></li>\n<li><span id=\"3949\">Use the React Router <code>match</code> prop to access Router params.</span></li>\n</ul>\n<hr>\n<h3>React Router Navigation</h3>\n<p>Now that you know how to create front-end routes with React Router, you'll need to implement a way for your users to navigate the routes! This is what using React Router's <code>Link</code>, <code>NavLink</code>, <code>Redirect</code>, and <code>history</code> prop can help you do.</p>\n<p>In this article, you'll be working off of the demo project you built in the React Router Intro reading. When you finish this article, you should be able to use the following components from the <code>react-router-dom</code> library:</p>\n<ul>\n<li><span id=\"76bc\"><code>&#x3C;Link></code> or <code>&#x3C;NavLink></code> to create links with absolute paths to routes in your application (like \"/users/1\"); and,</span></li>\n<li><span id=\"cdc2\"><code>&#x3C;Redirect></code> to redirect a user to another path (i.e. a login page when the user is not logged in); and</span></li>\n<li><span id=\"d8a7\">React Router's <code>history</code> prop to update a browser's URL programmatically.</span></li>\n</ul>\n<h3>Adding links for navigation</h3>\n<p>React Router's <code>&#x3C;Link></code> is one way to simplify navigation around your app. It issues an on-click navigation event to a route defined in your app's router. Using <code>&#x3C;Link></code> renders an anchor tag with a correctly set <code>href</code> attribute.</p>\n<h3>Link</h3>\n<p>To use it, update your imports from the <code>react-router-dom</code> package to include <code>Link</code>:</p>\n<pre><code>import { BrowserRouter, Route, Link } from 'react-router-dom';\n</code></pre>\n<p>Note that <code>&#x3C;Link></code> can take two props: <code>to</code> and <code>onClick</code>.</p>\n<p>The <code>to</code> prop is a route location description that points to an absolute path, (i.e. <code>/users</code>). Add the following <code>Link</code> components in your <code>index.js</code> file above your routes:</p>\n<pre><code>&#x3C;Link to=\"/\">App&#x3C;/Link>\n&#x3C;Link to=\"/users\">Users&#x3C;/Link>\n&#x3C;Link to=\"/users/1\">Andrew's Profile&#x3C;/Link>\n</code></pre>\n<p>The <code>onClick</code> prop is just like any other JSX click handler. You can write a function that takes in an <code>event</code> and handles it. Add the following <code>Link</code> before your routes and the following click handler function within your <code>Root</code> component:</p>\n<pre><code>// Link with onClick prop\n&#x3C;Link to=\"/\" onClick={handleClick}>App with click handler&#x3C;/Link>\n\n// Click handler function\nconst handleClick = () => {\n  console.log('Thanks for clicking!')\n};\n</code></pre>\n<p>Now, test your routes and links! If you inspect the page, you'll see that your links are now rendered as <code>&#x3C;a></code> elements. Notice that clicking the <code>App with click handler</code> link logs a message in your console while directing your browser to render the <code>App</code> component.</p>\n<h3>NavLink</h3>\n<p>The <code>&#x3C;NavLink></code> works just like a <code>&#x3C;Link></code>, but with a little extra functionality. It has the ability to add extra styling when the path it links to matches the current path. This makes it an ideal choice for a navigation bar, hence the name. This styling can be controlled by three extra props: <code>activeClassName</code>, <code>activeStyle</code>, and <code>exact</code>. To begin using <code>NavLink</code>, update your imports from the <code>react-router-dom</code> package:</p>\n<pre><code>import { BrowserRouter, Route, NavLink } from 'react-router-dom';\n</code></pre>\n<p>The <code>activeClassName</code> prop of the <code>NavLink</code> component allows you to set a CSS class name for styling the <code>NavLink</code> when its route is active. By default, the <code>activeClassName</code> is already set to <code>active</code>. This means that you simply need to add an <code>.active</code> class to your CSS file to add active styling to your link. A <code>NavLink</code> will be active if its <code>to</code> prop path matches the current URL.</p>\n<p>Let's change your “Users”, “Hello”, and “Andrew's Profile” links to be different colors and have a larger font size when active.</p>\n<pre><code>&#x3C;NavLink to=\"/\">App&#x3C;/NavLink>\n&#x3C;NavLink activeClassName=\"red\" to=\"/users\">Users&#x3C;/NavLink>\n&#x3C;NavLink activeClassName=\"blue\" to=\"/hello\">Hello&#x3C;/NavLink>\n&#x3C;NavLink activeClassName=\"green\" to=\"/users/1\">Andrew's Profile&#x3C;/NavLink>\n&#x3C;NavLink to=\"/\" onClick={handleClick}>App with click handler&#x3C;/NavLink>\n</code></pre>\n<p>For example, this is what the rendered HTML <code>&#x3C;a></code> tag would look like when when the browser is navigated to the <code>/</code> path or the <code>/users</code> path:</p>\n<pre><code>&#x3C;!-- Navigated to the / path (the activeClassName\n     prop is set to active by default) -->\n&#x3C;a href=\"/\" class=\"active\">App&#x3C;/a>\n\n&#x3C;!-- NOT navigated to the `/` path -->\n&#x3C;a href=\"/\">App&#x3C;/a>\n\n&#x3C;!-- Navigated to the /users path (the activeClassName\n     prop is manually set to red) -->\n&#x3C;a href=\"/users\" class=\"red\">Users&#x3C;/a>\n\n&#x3C;!-- NOT navigated to the `/users` path -->\n&#x3C;a href=\"/users\">Users&#x3C;/a>\n</code></pre>\n<p>Import <code>NavLink</code> into your <code>index.js</code> file and take a moment to update all your <code>Link</code> elements to <code>NavLink</code> elements. Set an <code>activeClassName</code> prop to an <code>active</code> class. Add the following <code>.active</code> class to your <code>index.css</code> file:</p>\n<pre><code>.active {\n  font-weight: bold;\n}\n\n.red {\n  color: red;\n  font-size: 30px;\n}\n\n.blue {\n  color: blue;\n  font-size: 30px;\n}\n\n.green {\n  color: green;\n  font-size: 30px;\n}\n</code></pre>\n<p>Test your styled links! Notice how the <code>App</code> and <code>App with click handler</code> links are always bolded. This is because all of your links include the <code>/</code> path, meaning that the link to <code>/</code> will be active when browsing to <code>/users</code> and <code>/users/1</code> because of how <code>users</code> and <code>users/1</code> are both prefaced by a <code>/</code>.</p>\n<p>The <code>activeStyle</code> prop is a style object that will be applied inline to the <code>NavLink</code> when its <code>to</code> prop matches the current URL. Add the following <code>activeStyle</code> to your <code>App</code> link and comment out the <code>.active</code> class in your CSS file.</p>\n<pre><code>&#x3C;NavLink to=\"/\" activeStyle={{ fontWeight: \"bold\" }}>App&#x3C;/NavLink>\n</code></pre>\n<p>The following html is rendered when at the <code>/</code> path:</p>\n<pre><code>&#x3C;a href=\"/\" style=\"font-weight:bold;\" class=\"active\">App&#x3C;/a>\n</code></pre>\n<p>Notice how your <code>App with click handler</code> is not bolded anymore. This is because the default <code>active</code> class being applied does not have any CSS stylings set to the class. Uncomment your <code>.active</code> class in your CSS file to bring back bolding to this NavLink.</p>\n<p>The <code>exact</code> prop is a boolean that defaults to <code>false</code>. If set to <code>true</code>, then the <code>activeStyle</code> and <code>activeClassName</code> props will only be applied when the current URL exactly matches the <code>to</code> prop. Update your <code>App</code> and <code>App with click handler</code> links with an <code>exact</code> prop set. Just like in your routes, you can use the <code>exact</code> flag instead of <code>exact={true}</code>.</p>\n<pre><code>&#x3C;NavLink to=\"/\" exact={true} activeStyle={{ fontWeight: \"bold\" }}>App&#x3C;/NavLink>\n&#x3C;NavLink to=\"/\" exact onClick={handleClick}>App with click handler&#x3C;/NavLink>\n</code></pre>\n<p>Now your <code>App</code> and <code>App with click handler</code> links will only be bolded when you have navigated precisely to the <code>/</code> path.</p>\n<h3>Switching between routes</h3>\n<p>You came across styling issues when the <code>/users</code> and <code>/users/1</code> paths matched the <code>/</code> path. Routing can have this issue as well. This is why you need to control the switching between routes.</p>\n<p>React Router's <code>&#x3C;Switch></code> component allows you to only render one <code>&#x3C;Route></code> even if several match the current URL. You can nest as many <code>Route</code>s as you wish between the opening and closing <code>Switch</code> tags, but only the first one that matches the current URL will be rendered.</p>\n<p>This is particularly useful if you want a default component that will only render if none of our other routes match. View the example below. Without the Switch, <code>DefaultComponent</code> would always render. Since there isn't set a path in the <code>DefaultComponent</code> route, it will simply use the default path of <code>/</code>. Now the <code>DefaultComponent</code> will only render when neither of the preceding routes match.</p>\n<pre><code>&#x3C;Switch>\n  &#x3C;Route path=\"some/url\" component={SomeComponent} />\n  &#x3C;Route path=\"some/other/url\" component={OtherComponent} />\n  &#x3C;Route component={DefaultComponent} />\n&#x3C;/Switch>\n</code></pre>\n<p>Import <code>Switch</code> from <code>react-router-dom</code> and add <code>&#x3C;Switch></code> tags around your routes to take care of ordering and switching between your routes! Begin by adding the following route to the bottom of your routes to render that a <code>404: Page not found</code> message:</p>\n<pre><code>&#x3C;Route render={() => &#x3C;h1>404: Page not found&#x3C;/h1>} />\n</code></pre>\n<p>This is what your <code>Root</code> component should look like at this point:</p>\n<pre><code>const Root = () => {\n  const users = [\n    { name: 'andrew' },\n    { name: 'raymond' }\n  ];\n\n  const handleClick = () => {\n    console.log('Thanks for clicking!')\n  };\n\n  return (\n    &#x3C;BrowserRouter>\n      &#x3C;h1>Hi, I'm Root!&#x3C;/h1>\n\n      &#x3C;div>\n        &#x3C;NavLink to=\"/\" exact={true} activeStyle={{ fontWeight: \"bold\" }}>App&#x3C;/NavLink>\n        &#x3C;NavLink activeClassName=\"red\" to=\"/users\">Users&#x3C;/NavLink>\n        &#x3C;NavLink activeClassName=\"blue\" to=\"/hello\">Hello&#x3C;/NavLink>\n        &#x3C;NavLink activeClassName=\"green\" to=\"/users/1\">Andrew's Profile&#x3C;/NavLink>\n        &#x3C;NavLink to=\"/\" exact onClick={handleClick}>App with click handler&#x3C;/NavLink>\n\n        &#x3C;Switch>\n          &#x3C;Route path=\"/users/:userId\" component={(props) => &#x3C;Profile users={users} {...props} />} />\n          &#x3C;Route exact path=\"/users\" render={() => &#x3C;Users users={users} />} />\n          &#x3C;Route path=\"/hello\" render={() => &#x3C;h1>Hello!&#x3C;/h1>} />\n          &#x3C;Route exact path=\"/\" component={App} />\n          &#x3C;Route render={() => &#x3C;h1>404: Page not found&#x3C;/h1>} />\n        &#x3C;/Switch>\n      &#x3C;/div>\n    &#x3C;/BrowserRouter>\n  );\n};\n</code></pre>\n<p>Now you have control over the precedence of rendered components! Try navigating to <code>http://localhost:3000/asdf</code> or any other route you have not defined. The <code>&#x3C;h1>404: Page not found&#x3C;/h1></code> JSX of the last <code>&#x3C;Route></code> will be rendered whenever the browser attempts to visit an undefined route.</p>\n<h3>Redirecting users</h3>\n<p>But what if you want to redirect users to a login page when they aren't logged in? The <code>&#x3C;Redirect></code> component from React Router helps you redirect users!</p>\n<p>The component takes only one prop: <code>to</code>. When it renders, it replaces the current URL with the value of its <code>to</code> prop. Typically you conditionally render <code>&#x3C;Redirect></code> to redirect the user away from some page you don't want them to visit. The example below checks whether there is a defined <code>currentUser</code> prop. If so, the <code>&#x3C;Route></code> will render the <code>Home</code> component. Otherwise, it will redirect the user to the <code>/login</code> path.</p>\n<pre><code>&#x3C;Route\n  exact path=\"/\"\n  render={() => (this.props.currentUser ? &#x3C;Home /> : &#x3C;Redirect to=\"/login\" />)}\n/>\n</code></pre>\n<p>Note: you will learn how to use a more flexible auth pattern — don't directly imitate this example.</p>\n<h3>History</h3>\n<p>You know how to redirect users with a <code>&#x3C;Redirect></code> component, but what if you need to redirect users programmatically? You've learned about the React Router's <code>match</code> prop, but now let's go over another one of the <a href=\"https://reacttraining.com/react-router/web/api/Route/route-props\" class=\"markup--anchor markup--p-anchor\">route props</a>: <code>history</code>!</p>\n<pre><code>// Pushing a new URL (and adding to the end of history stack):\nconst handleClick = () => this.props.history.push('/some/url');\n\n// Replacing the current URL (won't be tracked in history stack):\nconst redirect = () => this.props.history.replace('/some/other/url');\n</code></pre>\n<p>This prop lets you update the URL programmatically. For example, suppose you want to push a new URL when the user clicks a button. It has two useful methods:</p>\n<ul>\n<li><span id=\"31f3\"><code>push</code> - This adds a new URL to the end of the history stack. That means that clicking the back button will take the browser to the previous URL. Note that pushing the same URL multiple times in a row will have no effect; the URL will still only show up on the stack once. In development mode, pushing the same URL twice in a row will generate a console warning. This warning is disabled in production mode.</span></li>\n<li><span id=\"90c1\"><code>replace</code> - This replaces the current URL on the history stack, so the back button won't take you to it. For example:</span></li>\n</ul>\n<h3>What you learned</h3>\n<p>In this article, you learned how to:</p>\n<ul>\n<li><span id=\"169b\">Create navigation links for your route paths; and</span></li>\n<li><span id=\"d108\">Redirect users through using the <code>&#x3C;Redirect></code> component; and</span></li>\n<li><span id=\"d090\">Update a browser's URL programmatically by using React Router's <code>history</code> prop.</span></li>\n</ul>\n<hr>\n<h3>React Router Nested Routes</h3>\n<p>Now you know how to create front-end routes and add navigation with React Router. When initializing Express projects, you declare static routes. Static routes are routes that are declared when an application is initialized. When using React Router in your application's initialization, you can declare dynamic routes. React Router introduces dynamic routing, where your routes are created as your application is rendering. This allows you to create nested routes within components!</p>\n<p>In this article, let's dive into <a href=\"https://reacttraining.com/react-router/core/guides/philosophy/nested-routes\" class=\"markup--anchor markup--p-anchor\">nested routes</a>! When you finish the article, you should:</p>\n<ul>\n<li><span id=\"38ee\">Describe what nested routes are; and</span></li>\n<li><span id=\"0559\">Be able to use React Router to create and navigate nested routes; and</span></li>\n<li><span id=\"ce4a\">Know how to use the React Router <code>match</code> prop to generate links and routes.</span></li>\n</ul>\n<h3>Why nested routes?</h3>\n<p>Let's begin with why you might need nested routes. As you remember, you are using React to create a single-page application. This means that you'll be organizing your application into different components and sub-components.</p>\n<p>For example, imagine creating a simple front-end application with three main pages: a home welcome page (path of <code>/</code>), a users index page (path of <code>/users</code>), and user profile pages (path of <code>/users/:userId</code>). Now imagine if every user had links to separate <code>posts</code> and <code>photos</code> pages.</p>\n<p>You can create those routes and links within the user profile component, instead of creating the routes and links where the main routes are defined.</p>\n<h3>What are nested routes?</h3>\n<p>Now let's dive into a user profile component to understand what are nested routes! Imagine you have a route in your application's entry file to each user's profile like so:</p>\n<pre><code>&#x3C;Route path=\"/users/:userId\" component={Profile} />\n</code></pre>\n<p>This means that upon navigating to <code>http://localhost:3000/users/1</code>, you would render the following <code>Profile</code> component and the <code>userId</code> parameter within <code>props.match.params</code> would have the value of <code>\"1\"</code>.</p>\n<pre><code>const Profile = (props) => {\n  // Custom call to database to fetch a user by a user ID.\n  const user = fetchUser(props.match.params.userId);\n  const { name, id } = user;\n\n  return (\n    &#x3C;div>\n      &#x3C;h1>Welcome to the profile of {name}!&#x3C;/h1>\n\n      {/* Links to a specific user's posts and photos */}\n      &#x3C;Link to={`/users/${id}/posts`}>{name}'s Posts&#x3C;/Link>\n      &#x3C;Link to={`/users/${id}/photos`}>{name}'s Photos&#x3C;/Link>\n\n      {/* Routes to a specific user's posts and photos */}\n      &#x3C;Route path='/users/:userId/posts' component={UserPosts} />\n      &#x3C;Route path='/users/:userId/photos' component={UserPhotos} />\n    &#x3C;/div>\n  );\n};\n</code></pre>\n<p>Since this route is not created until the <code>Profile</code> component is rendered, you are dynamically creating your nested <code>/users/:userId/posts</code> and <code>/users/:userId/photos</code> routes. Remember that your <code>match</code> prop also has other helpful properties. You can use <code>match.url</code> instead of <code>/users/${id}</code> in your profile links. You can also use <code>match.path</code> instead of <code>/users/:userId</code> in your profile routes. Remember that you can destructure <code>url</code>, <code>path</code>, and <code>params</code> from your <code>match</code> prop!</p>\n<pre><code>// Destructure `match` prop\nconst Profile = ({ match: { url, path, params }) => {\n\n  // Custom call to database to fetch a user by a user ID.\n  const user = fetchUser(params.userId);\n  const { name, id } = user;\n\n  return (\n    &#x3C;div>\n      &#x3C;h1>Welcome to the profile of {name}!&#x3C;/h1>\n\n      {/* Replaced `/users/${id}` URL with `props.match.url` */}\n      &#x3C;Link to={`${url}/posts`}>{name}'s Posts&#x3C;/Link>\n      &#x3C;Link to={`${url}/photos`}>{name}'s Photos&#x3C;/Link>\n\n      {/* Replaced `/users/:userId` path with `props.match.path` */}\n      &#x3C;Route path={`${path}/posts`} component={UserPosts} />\n      &#x3C;Route path={`${path}/photos`} component={UserPhotos} />\n    &#x3C;/div>}\n  );\n};\n</code></pre>\n<p>In tomorrow's project, you'll build a rainbow of routes as well as define nested routes. In the future, you may choose to implement nested routes to keep your application's routes organized within related components.</p>\n<h3>What you learned</h3>\n<p>In this article, you learned:</p>\n<ul>\n<li><span id=\"2378\">What nested routes are; and</span></li>\n<li><span id=\"e072\">About creating and navigating nested routes with React Router; and</span></li>\n<li><span id=\"c8b8\">How to use the React Router props to generate nested links and routes.</span></li>\n</ul>\n<hr>\n<h3>React Builds</h3>\n<p>A “build” is the process of converting code into something that can actually execute or run on the target platform. A “front-end build” is a process of preparing a front-end or client-side application for the browser.</p>\n<p>With React applications, that means (at a minimum) converting JSX to something that browsers can actually understand. When using Create React App, the build process is automatically configured to do that and a lot more.</p>\n<p>When you finish this article, you should be able to:</p>\n<ul>\n<li><span id=\"2448\">Describe what front-end builds are and why they're needed;</span></li>\n<li><span id=\"efab\">Describe at a high level what happens in a Create React App when you run <code>npm start</code>; and</span></li>\n<li><span id=\"502f\">Prepare to deploy a React application into a production environment.</span></li>\n</ul>\n<h3>Understanding front-end builds</h3>\n<p>The need for front-end builds predates React. Over the years, developers have found it helpful to extend the lowest common denominator version of JavaScript and CSS that they could use.</p>\n<p>Sometimes developers extend JavaScript and CSS with something like <a href=\"https://www.typescriptlang.org/\" class=\"markup--anchor markup--p-anchor\">TypeScript</a> or <a href=\"https://sass-lang.com/\" class=\"markup--anchor markup--p-anchor\">Sass</a>. Using these non-standard languages and syntaxes require you to use a build process to convert your code into standard JavaScript and CSS that can actually run in the browser.</p>\n<p>Browser-based applications also require a fair amount of optimization to deliver the best, or at least acceptable, experience to end users. Front-end build processes could be configured to lint code, run unit tests, optimize images, minify and bundle code, and more — all automatically at the press of a button (i.e. running a command at the terminal).</p>\n<h3>JavaScript versions and the growth of front-end builds</h3>\n<p>Developers are generally an impatient lot. When new features are added to JavaScript, we don't like to wait for browsers to widely support those features before we start to use them in our code. And we <em>really</em> don't like when we have to support older, legacy versions of browsers.</p>\n<p>In recent years, JavaScript has been updated on a yearly basis and browser vendors do a decent job of updating their browsers to support the new features as they're added to the language. Years ago though, there was an infamous delay between versions 5 and 6 of JavaScript. It took <em>years</em> before ES6 (or ES2015 as it eventually was renamed to) to officially be completed and even longer before browsers supported all of its features.</p>\n<p>In the period of time before ES2015 was broadly supported by browsers, developers used front-end builds to convert or <em>transpile</em> ES2015 features and syntax to an older version of the language that was more broadly supported by browsers (typically ES5). The transpilation from ES2015/ES6 down to ES5 was one of the major drivers for developers to add front-end builds to their client-side projects.</p>\n<h3>Reviewing common terminology</h3>\n<p>When learning about front-end or React builds, you'll encounter a lot of terminology that you may or may not be familiar with. Here's some of the terminology that you'll likely encounter:</p>\n<p>Linting is process of using a tool to analyze your code to catch common programming errors, bugs, stylistic inconsistencies, and suspicious coding patterns. <a href=\"https://eslint.org/\" class=\"markup--anchor markup--p-anchor\">ESLint</a> is a popular JavaScript linting tool.</p>\n<p>Transpilation is the process of converting source code, like JavaScript, from one version to another version. Usually this means converting newer versions of JavaScript, <a href=\"https://www.ecma-international.org/ecma-262/10.0/index.html\" class=\"markup--anchor markup--p-anchor\">ES2019</a> or <a href=\"https://tc39.es/ecma262/\" class=\"markup--anchor markup--p-anchor\">ES2021</a>, to a version that's more widely supported by browsers, like <a href=\"http://www.ecma-international.org/ecma-262/6.0/\" class=\"markup--anchor markup--p-anchor\">ES2015</a>, or even <a href=\"https://www.ecma-international.org/ecma-262/5.1/\" class=\"markup--anchor markup--p-anchor\">ES5</a> or <a href=\"https://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf\" class=\"markup--anchor markup--p-anchor\">ES3</a> (if you need to support the browser that your parents or grandparents use).</p>\n<p>Minification is the process of removing all unnecessary characters in your code (e.g. white space characters, new line characters, comments) to produce an overall smaller file. Minification tools will often also rename identifers in your code (i.e. parameter and variable names) in the quest for smaller and smaller file sizes. Source maps can also be generated to allow debugging tools to cross reference between minified code and the original source code.</p>\n<p>Bundling is the process of combining multiple code files into a single file. Creating a bundle (or a handful of bundles) reduces the number of requests that a client needs to make to the server.</p>\n<p>Tree shaking is the process of removing unused (or dead) code from your application before it's bundled. Tree shaking external dependencies can sometimes have a dramatic positive impact on overall bundled file sizes.</p>\n<h3>Configuration or code?</h3>\n<p>Front-end build tools have come and gone over the years; sometimes very quickly, which helped bring about the phenomenon known as <a href=\"https://sdtimes.com/softwaredev/is-the-javascript-fatigue-real/\" class=\"markup--anchor markup--p-anchor\">JavaScript fatigue</a>.</p>\n<p>Configuration based tools allow you to create your build tasks by declaring (usually using JSON, XML, or YAML) what you want to be done, without explicitly writing every step in the process. In contrast, coding or scripting based tools allow you to, well, write code to create your build tasks. Configuration based tools <em>can</em> sometimes feel simpler to use while giving up some control (at least initially) while coding based tools <em>can</em> feel more familiar and predictable (since you're describing tasks procedurally). Every generalization is false though (including this one), so there are plenty of exceptions.</p>\n<p><a href=\"https://gruntjs.com/\" class=\"markup--anchor markup--p-anchor\">Grunt</a> is a JSON configuration based task runner that can be used to orchestrate the various tasks that make up your front-end build. Grunt was very quickly supplanted by <a href=\"https://gulpjs.com/\" class=\"markup--anchor markup--p-anchor\">Gulp</a>, which allowed developers to write JavaScript to define front-end build tasks. After Gulp, the front-end tooling landscape became a bit more muddled. Some developers preferred the simplicity of using <a href=\"https://docs.npmjs.com/misc/scripts\" class=\"markup--anchor markup--p-anchor\">npm scripts</a> to define build tasks while others preferred the power of configuration based bundlers like <a href=\"https://webpack.js.org/\" class=\"markup--anchor markup--p-anchor\">webpack</a>.</p>\n<h3>Babel and webpack (yes, that's intentionally a lowercase 'w')</h3>\n<p>As front-end or client-side applications grew in complexity, developers found themselves wanting to leverage more advanced JavaScript features and newer syntax like classes, arrow functions, destructuring, async/await, etc. Using a code transpiler, like <a href=\"https://babeljs.io/\" class=\"markup--anchor markup--p-anchor\">Babel</a>, allows you to use all of the latest and greatest features and syntax without worrying about what browsers support what.</p>\n<p>Module loaders and bundlers, like <a href=\"https://webpack.js.org/\" class=\"markup--anchor markup--p-anchor\">webpack</a>, also allowed developers to use JavaScript modules without requiring users to use a browser that natively supports ES modules. Also, module bundling (along with minification and tree-shaking) helps to reduce the bandwidth that's required to deliver the assets for your application to the client.</p>\n<p>[Create React App][cra] uses webpack (along with Babel) under the covers to build your React applications. Even if you're not using Create React App, webpack and Babel are still very popular choices for building React applications.</p>\n<h3>Pulling back the covers (a bit) on the Create React App build process</h3>\n<p>Running an application created by Create React App using <code>npm start</code> can feel magical. Some stuff happens in the terminal and your application opens into your default browser. Even better, when you make changes to your application, your changes will (usually) automatically appear in the browser!</p>\n<h3>The Create React App build process</h3>\n<p>At a high level, here's what happens when you run <code>npm start</code>:</p>\n<ul>\n<li><span id=\"2808\">Environment variables are loaded (more about this in a bit);</span></li>\n<li><span id=\"f272\">The list of browsers to support are checked (more about this too in a bit);</span></li>\n<li><span id=\"71b2\">The configured HTTP port is checked to ensure that it's available;</span></li>\n<li><span id=\"f826\">The application compiler is configured and created;</span></li>\n<li><span id=\"c605\"><code>webpack-dev-server</code> is started;</span></li>\n<li><span id=\"a696\"><code>webpack-dev-server</code> compiles your application;</span></li>\n<li><span id=\"c66e\">The <code>index.html</code> file is loaded into the browser; and</span></li>\n<li><span id=\"6add\">A file watcher is started to watch your files, waiting for changes.</span></li>\n</ul>\n<h3>Ejecting</h3>\n<p>Create React App provides a script that you can run to “eject” your application from the Create React App tooling. When you eject your application, all of the hidden stuff is exposed so that you can review and customize it.</p>\n<blockquote>\n<p><em>The need to customize Create React App rarely happens. Also, don't eject an actual project as it's a one-way trip! Once a Create React App project has been ejected, there's no going back (though you could always undo the ejection process by reverting to an earlier commit if you're using source control).</em></p>\n</blockquote>\n<p>To eject your application from Create React App, run the command <code>npm run eject</code>. You'll be prompted if you want to continue; type \"y\" to continue with the ejection process. Once the ejection process has completed, you can review the files that were previously hidden from you.</p>\n<p>In the <code>package.json</code> file, you'll see the following npm scripts:</p>\n<pre><code>{\n  \"scripts\": {\n    \"start\": \"node scripts/start.js\",\n    \"build\": \"node scripts/build.js\",\n    \"test\": \"node scripts/test.js\"\n  }\n}\n</code></pre>\n<p>You can open the <code>./scripts/start.js</code> file to see the code that's executed when you run <code>npm start</code>.</p>\n<p>If you're curious about the webpack configuration, you can open and review the <code>./config/webpack.config.js</code>.</p>\n<h3>Preparing to deploy a React application for production</h3>\n<p>Before you deploy your application to production, you'll want to make sure that you've replaced static values in your code with environment variables and considered what browsers you need to support.</p>\n<h3>Defining environment variables</h3>\n<p>Create React App supports defining environment variables in an <code>.env</code> file. To define an environment variable, add an <code>.env</code> file to your project and define one or more variables that start with the prefix <code>REACT_APP_</code>:</p>\n<pre><code>REACT_APP_FOO: some value\nREACT_APP_BAR: another value\n</code></pre>\n<p>Environment variables can be used in code like this:</p>\n<pre><code>console.log(process.env.REACT_APP_FOO);\n</code></pre>\n<p>You can also reference environment variables in your <code>index.html</code> like this:</p>\n<pre><code>&#x3C;title>%REACT_APP_BAR%&#x3C;/title>\n</code></pre>\n<blockquote>\n<p><em>Important: Environment variables are embedded into your HTML, CSS, and JavaScript bundles during the build process. Because of this, it's</em> very important <em>to not store any secrets, like API keys, in your environment variables as anyone can view your bundled code in the browser by inspecting your files.</em></p>\n</blockquote>\n<h3>Configuring the supported browsers</h3>\n<p>In your project's <code>package.json</code> file, you can see the list of targeted browsers:</p>\n<pre><code>{\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n</code></pre>\n<p>Adjusting these targets affect how your code will be transpiled. Specifying older browser versions will result in your code being transpiled to older versions of JavaScript in order to be compatible with the specified browser versions. The <code>production</code> list specifies the browsers to target when creating a production build and the <code>development</code> list specifics the browsers to target when running the application using <code>npm start</code>.</p>\n<p>The <a href=\"https://browserl.ist/\" class=\"markup--anchor markup--p-anchor\">browserl.ist</a> website can be used to see the browsers supported by your configured <code>browserslist</code>.</p>\n<h3>Creating a production build</h3>\n<p>To create a production build, run the command <code>npm run build</code>. The production build process bundles React in production mode and optimizes the build for the best performance. When the command completes, you'll find your production ready files in the <code>build</code> folder.</p>\n<p>Now your application is ready to be deployed!</p>\n<blockquote>\n<p><em>For more information about how to deploy a Create React App project into production, see</em> <a href=\"https://facebook.github.io/create-react-app/docs/deployment\" class=\"markup--anchor markup--blockquote-anchor\"><em>this page</em></a> <em>in the official documentation.</em></p>\n</blockquote>\n<h3>What you learned</h3>\n<p>In this article, you learned how to:</p>\n<ul>\n<li><span id=\"1ff3\">Describe what front-end builds are and why they're needed;</span></li>\n<li><span id=\"1fc3\">Describe at a high level what happens in a Create React App when you run <code>npm start</code>; and</span></li>\n<li><span id=\"6adc\">Prepare to deploy a React application into a production environment.</span></li>\n</ul>\n<hr>\n<h3>React Router Documentation</h3>\n<p>Now that you've had an introduction to React Router, feel free to explore the official documentation to learn more! As you become a full-fledged software engineer, remember that documentation is your friend. You can take a brief overview for now, as the documentation might include a lot of information at first. The more you learn about React, the more you should revisit the official documentation and learn!</p>\n<h3>Setting up React Router</h3>\n<ul>\n<li><span id=\"bfa4\"><a href=\"https://reacttraining.com/react-router/web/guides/quick-start\" class=\"markup--anchor markup--li-anchor\">React Router Quick Start</a></span></li>\n<li><span id=\"b0cb\"><a href=\"https://reacttraining.com/react-router/web/api/HashRouter\" class=\"markup--anchor markup--li-anchor\">HashRouter</a></span></li>\n<li><span id=\"f48b\"><a href=\"https://reacttraining.com/react-router/web/api/BrowserRouter\" class=\"markup--anchor markup--li-anchor\">BrowserRouter</a></span></li>\n</ul>\n<h3>Routes and Links</h3>\n<ul>\n<li><span id=\"72bd\"><a href=\"https://reacttraining.com/react-router/web/api/Route\" class=\"markup--anchor markup--li-anchor\">Route</a></span></li>\n<li><span id=\"e256\"><a href=\"https://reacttraining.com/react-router/web/api/Link\" class=\"markup--anchor markup--li-anchor\">Link</a></span></li>\n<li><span id=\"1d9d\"><a href=\"https://reacttraining.com/react-router/web/api/NavLink\" class=\"markup--anchor markup--li-anchor\">NavLink</a></span></li>\n</ul>\n<h3>Switch and Redirect</h3>\n<ul>\n<li><span id=\"5240\"><a href=\"https://reacttraining.com/react-router/web/api/Switch\" class=\"markup--anchor markup--li-anchor\">Switch</a></span></li>\n<li><span id=\"b405\"><a href=\"https://reacttraining.com/react-router/web/api/Redirect\" class=\"markup--anchor markup--li-anchor\">Redirect</a></span></li>\n</ul>\n<h3>React Router Params (ownProps)</h3>\n<ul>\n<li><span id=\"e0d6\"><a href=\"https://reacttraining.com/react-router/web/api/history\" class=\"markup--anchor markup--li-anchor\">props.history</a></span></li>\n<li><span id=\"5f4a\"><a href=\"https://reacttraining.com/react-router/web/api/location\" class=\"markup--anchor markup--li-anchor\">props.location</a></span></li>\n<li><span id=\"bd15\"><a href=\"https://reacttraining.com/react-router/web/api/match\" class=\"markup--anchor markup--li-anchor\">props.match</a></span></li>\n</ul>\n<hr>\n<h3>Rainbow Routes Project</h3>\n<p>Today you're going to get our first experience using React Router. The goal is to create a basic app that displays the colors of the rainbow. This rainbow, however, has something special about it — some of the colors are nested within others.</p>\n<h3>Phase 0: Setup</h3>\n<p>Begin by creating a new React project:</p>\n<pre><code>npx create-react-app rainbow-routes --template @appacademy/simple\n</code></pre>\n<p>Now you'll remove all the contents of your <code>src</code> and all the contents from your <code>public</code> directory to build the application architecture from scratch! After you have deleted all your files within the directories, create a new <code>index.html</code> file in your <code>public</code> folder. Use the <code>html:5</code> emmet shortcut to generate an HTML template. Title your page \"Rainbow Routes\" and create a <code>div</code> with an <code>id</code> of <code>root</code> in your DOM's <code>&#x3C;body></code> element. Create an <code>index.css</code> file in your <code>src</code> directory with the following code. Now let's create your entry file!</p>\n<pre><code>h4 {\n  color: darkblue;\n  cursor: pointer;\n}\n\nh4:hover {\n  text-decoration: underline;\n}\n\n#rainbow {\n  position: absolute;\n  top: 0;\n  left: 300px;\n}\n\nh3 {\n  position: absolute;\n  top: 1px;\n}\n\n.red {\n  background-color: red;\n  width: 100px;\n  height: 100px;\n}\n\n.orange {\n  background-color: orange;\n  width: 100px;\n  height: 50px;\n}\n\n.yellow {\n  background-color: yellow;\n  width: 100px;\n  height: 50px;\n}\n\n.green {\n  background-color: green;\n  width: 100px;\n  height: 100px;\n}\n\n.blue {\n  background-color: blue;\n  width: 100px;\n  height: 100px;\n}\n\n.indigo {\n  background-color: mediumslateblue;\n  width: 100px;\n  height: 50px;\n}\n\n.violet {\n  background-color: darkviolet;\n  width: 100px;\n  height: 100px;\n}\n\na {\n  display: block;\n  margin-bottom: 10px;\n}\n</code></pre>\n<p>Create an <code>index.js</code> entry file in the <code>src</code> directory. At the top of the file, make sure to import <code>React</code> from the <code>react</code> package and <code>ReactDOM</code> from the <code>react-dom</code> package. Make sure to also import your the <code>index.css</code> file you just created! This will take care of styling your <em>rainbow routes</em>.</p>\n<p>Now you can use the <code>ReactDOM.render()</code> method to render a <code>&#x3C;Root /></code> component instead of the DOM element with an <code>id</code> of <code>root</code>. Lastly, wrap your render function with a <code>DOMContentLoaded</code> event listener, like so:</p>\n<pre><code>document.addEventListener('DOMContentLoaded', () => {\n  ReactDOM.render(\n    &#x3C;Root />,\n    document.getElementById('root'),\n  );\n});\n</code></pre>\n<p>Let's create your <code>Root</code> component right in your entry file! Your <code>Root</code> component will take care of applying your <code>BrowserRouter</code> to the application. Applying the <code>BrowserRouter</code> to your <code>Root</code> component allows all the child components rendering within <code>&#x3C;BrowserRouter></code> tags to use and access the <code>Route</code>, <code>Link</code>, and <code>NavLink</code> components within the <code>react-router-dom</code> package.</p>\n<pre><code>const Root = () => (\n  // TODO: Apply BrowserRouter\n  // TODO: Render rainbow\n);\n</code></pre>\n<p>Install the <code>react-router-dom</code> package:</p>\n<pre><code>npm install react-router-dom@^5.0.0\n</code></pre>\n<p>Now import <code>BrowserRouter</code> from the <code>react-router-dom</code> package, like so:</p>\n<pre><code>import { BrowserRouter } from 'react-router-dom';\n</code></pre>\n<p>You're going to be rendering a lot of components, so let's keep your <code>src</code> directory organized by creating a <code>components</code> directory within. Within your new <code>./src/components</code> directory, create a <code>Rainbow.js</code> file for your <code>Rainbow</code> component with the following code:</p>\n<pre><code>// ./src/components/Rainbow.js\nimport React from 'react';\nimport { Route, Link, NavLink } from 'react-router-dom';\n\nconst Rainbow = () => (\n  &#x3C;div>\n    &#x3C;h1>Rainbow Router!&#x3C;/h1>\n    {/* Your links should go here */}\n\n    &#x3C;div id=\"rainbow\">\n      {/* Your routes should go here */}\n    &#x3C;/div>\n  &#x3C;/div>\n);\n\nexport default Rainbow;\n</code></pre>\n<p>Your <code>Rainbow</code> component will act as the home page or default path (<code>/</code>) of your application. Import the <code>Rainbow</code> component into your entry file and have your <code>Root</code> component render <code>&#x3C;Rainbow /></code> wrapped within <code>&#x3C;BrowserRouter></code> tags, like so:</p>\n<pre><code>const Root = () => (\n  &#x3C;BrowserRouter>\n    &#x3C;Rainbow />\n  &#x3C;/BrowserRouter>\n);\n</code></pre>\n<p>Within your <code>Rainbow</code> component, you'll be rendering <code>&#x3C;NavLink></code> and <code>&#x3C;Route></code> components to add different navigation paths to different components. Let's create all the components you will render!</p>\n<p>Create files for the following components in your <code>./src/components</code> directory:</p>\n<ul>\n<li><span id=\"1c8e\"><code>Red</code></span></li>\n<li><span id=\"a8dd\"><code>Blue</code></span></li>\n<li><span id=\"6ca3\"><code>Green</code></span></li>\n<li><span id=\"8e44\"><code>Indigo</code></span></li>\n<li><span id=\"f8f2\"><code>Orange</code></span></li>\n<li><span id=\"0f47\"><code>Violet</code></span></li>\n<li><span id=\"8a89\"><code>Yellow</code></span></li>\n</ul>\n<p>Your <code>Red</code> and <code>Blue</code> components will look something like this:</p>\n<pre><code>import React from 'react';\nimport { Route, Link, NavLink } from 'react-router-dom';\n\nconst Color = () => (\n  &#x3C;div>\n    &#x3C;h2 className=\"color\">Color&#x3C;/h2>\n    {/* Links here */}\n\n    {/* Routes here */}\n  &#x3C;/div>\n);\n\nexport default Color;\n</code></pre>\n<p>Your <code>Green</code>, <code>Indigo</code>, <code>Orange</code>, <code>Violet</code>, and <code>Yellow</code> components will look something like this:</p>\n<pre><code>import React from 'react';\n\nconst Color = () => (\n  &#x3C;div>\n    &#x3C;h3 className=\"color\">Color&#x3C;/h3>\n  &#x3C;/div>\n);\n\nexport default Color;\n</code></pre>\n<p>Now start your server and verify you can see the “Rainbow Router!” header from your <code>Rainbow</code> component. Currently there is no functionality. Let's fix that!</p>\n<h3>Phase 1: Routes</h3>\n<p>As a reminder, wrapping the <code>Rainbow</code> component in <code>&#x3C;BrowserRouter></code> tags makes the router available to all descendent React Router components. Now open the <code>Rainbow.js</code> file. You're going to render some of your color components from here. Ultimately you want your routes to look like this.</p>\n<p>URLComponents<code>/Rainbow/redRainbow -> Red/red/orangeRainbow -> Red -> Orange/red/yellowRainbow -> Red -> Yellow/greenRainbow -> Green/blueRainbow -> Blue/blue/indigoRainbow -> Blue -> Indigo/violetRainbow -> Violet</code></p>\n<p>This means that the <code>Red</code>, <code>Green</code>, <code>Blue</code>, and <code>Violet</code> components need to render in the <code>Rainbow</code> component, but only when you are at the corresponding URL. You'll do this with <code>Route</code> components. Begin by importing the <code>Red</code>, <code>Green</code>, <code>Blue</code>, and <code>Violet</code> components into your <code>Rainbow.js</code> file. Then add the necessary <code>Route</code> components inside the <code>div</code> with <code>id=\"rainbow\"</code> in the <code>Rainbow</code> component. For example to render the <code>Red</code> component with the <code>/red</code> path, you would use the following <code>Route</code> component:</p>\n<pre><code>&#x3C;Route path=\"/red\" component={Red} />\n</code></pre>\n<p>Test that your code works! Manually type in each URL you just created, and you should see the color component pop up. Remember, these are React Routes, so the paths you created will come after the <code>/</code>. For example, your default rainbow route will look like <code>http://localhost:3000/</code> while your red route will look like <code>http://localhost:3000/red</code><a href=\"http://localhost:3000/red.\" class=\"markup--anchor markup--p-anchor\">.</a></p>\n<p>You want to nest the <code>Orange</code> and <code>Yellow</code> components inside the <code>Red</code> component, and the <code>Indigo</code> component inside the <code>Blue</code> component. Remember to import your components to use them in a <code>Route</code> tag. You'll have to go add the corresponding <code>Route</code> tags to the <code>Red.js</code> and <code>Blue.js</code> files. Make sure to use the correct nested paths, such as <code>\"/red/orange\"</code> for the orange <code>Route</code>.</p>\n<h3>Phase 2: Links</h3>\n<p>Manually navigating to our newly created routes is tiresome, so let's add functionality to take care of this process for us. React Router provides the <code>Link</code> and <code>NavLink</code> components for this purpose.</p>\n<p>Add <code>Link</code>s to the paths <code>/red</code>, <code>/green</code>, <code>/blue</code>, and <code>/violet</code> in the <code>Rainbow</code> component. For example, your red link should look like</p>\n<pre><code>&#x3C;Link to=\"/red\">Red&#x3C;/NavLink>\n</code></pre>\n<p>When you are at <code>blue</code> you want to be able to get to <code>/blue/indigo</code>, and then back to <code>/blue</code>. Add the corresponding <code>Link</code>s to the <code>Blue</code> component like this:</p>\n<pre><code>&#x3C;Link to='/blue' >Blue only&#x3C;/Link>\n&#x3C;Link to='/blue/indigo' >Add indigo&#x3C;/Link>\n</code></pre>\n<p>Similarly, add <code>Link</code>s to <code>/red</code>, <code>/red/orange</code> and <code>/red/yellow</code> to the <code>Red</code> component. Test all your links. Navigation is so much easier now!</p>\n<h3>Phase 3: NavLinks</h3>\n<p>It would be nice if our links gave us some indication of which route you were at. Fortunately, React Router has a special component for that very purpose: <code>NavLink</code>. NavLinks get an extra CSS class when their <code>to</code> prop matches the current URL. By default this class is called <code>active</code>.</p>\n<p>Go ahead and switch all your <code>Link</code>s to <code>NavLink</code>s. If you open the app you won't see any change yet. That's because you haven't added any special styling to the <code>active</code> class. Go ahead and open the <code>index.css</code> file. Create an <code>.active</code> class and add the line <code>font-weight: 700</code>. Now your active links will be bold. Isn't that nice!</p>\n<p>The only problem is that now the <code>Blue only</code> link is active even when the path is <code>/blue/indigo</code>. That doesn't make a lot of sense. Let's add the <code>exact</code> flag to that link so it will only be active when its <code>to</code> exactly matches the current path. Now it should look like:</p>\n<pre><code>&#x3C;NavLink exact to=\"/blue\">\n  Blue only\n&#x3C;/NavLink>\n</code></pre>\n<p>Do the same for the <code>Red only</code> link. Everything should be working now.</p>\n<h3>Phase 4 — Changing NavLink's Active Class</h3>\n<p>You've already set up <code>NavLink</code> to bold the link text using the <code>.active</code> class in <code>src/index.css</code>. But what if you wanted this class to be something else? For instance, what if you want your main color links (Red, Green, Blue, Violet) to be styled differently when active than your sub-route links (Red Only, Add Orange, Add Yellow, etc.).</p>\n<p>You can set the class that React Router sets to an active <code>NavLink</code> by adding the <code>activeClassName</code> prop.</p>\n<p>For instance, when we are at a route matching the below <code>NavLink</code>'s <code>to</code> prop, the component will have a class of <code>.parent-active</code> applied:</p>\n<pre><code>&#x3C;NavLink to=\"/blue\" activeClassName=\"parent-active\" >\n  Blue\n&#x3C;/NavLink>\n</code></pre>\n<p>This allows much more flexibility to style an active <code>NavLink</code>!</p>\n<p>Using the example above, add an <code>activeClassName</code> prop to each of your <code>NavLink</code>s in <code>src/components/Rainbow.js</code>. Now, add some CSS styling for that class in your <code>src/index.css</code> to distinguish your main and your sub-route links.</p>\n<p>Compare your work to the solution and make sure the behavior is the same. Time to celebrate! ✨ 🌈 ✨</p>\n<p>You can also learn more about using the React Router at <a href=\"https://reacttraining.com/react-router/web/guides/quick-start\" class=\"markup--anchor markup--p-anchor\">reacttraining.com</a>!</p>\n<hr>\n<h3>Exploring React Builds Project</h3>\n<p>In this project, you'll use Create React App to create a simple React application. You'll experiment with some of the features that Create React App provides and deploy a production build of your application to a standalone Express application.</p>\n<h3>Phase 0: Setup</h3>\n<p>Begin by using the <a href=\"https://github.com/facebook/create-react-app\" class=\"markup--anchor markup--p-anchor\">create-react-app</a> package to create a React application:</p>\n<pre><code>npx create-react-app exploring-react-builds --template @appacademy/simple\n</code></pre>\n<blockquote>\n<p><em>Remember that using the</em> <code>create-react-app</code> <em>command initializes your project as a Git repository. If you use the</em> <code>ls -a</code> <em>to view the hidden files in your project, you'll see the _<code>.git</code> _file.</em></p>\n</blockquote>\n<p>Update the <code>App</code> component:</p>\n<ul>\n<li><span id=\"9186\">Wrap the <code>&#x3C;h1></code> element with a <code>&#x3C;div></code> element; and</span></li>\n<li><span id=\"5e97\">Change the <code>&#x3C;h1></code> element content to something like \"Exploring React Builds\".</span></li>\n</ul>\n<!-- -->\n<pre><code>// ./src/App.js\n\nimport React from 'react';\n\nfunction App() {\n  return (\n    &#x3C;div>\n      &#x3C;h1>Exploring React Builds&#x3C;/h1>\n    &#x3C;/div>\n  );\n}\n\nexport default App;\n</code></pre>\n<h3>Phase 1: Using CSS modules</h3>\n<p>You've already seen an example of using the <code>import</code> keyword to import a stylesheet into a module so that it'll be included in your application build. That's the technique being used to include the global <code>index.css</code> stylesheet:</p>\n<pre><code>// ./src/index.js\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(\n  &#x3C;React.StrictMode>\n    &#x3C;App />\n  &#x3C;/React.StrictMode>,\n  document.getElementById('root')\n);\n</code></pre>\n<p>You can also leverage <a href=\"https://github.com/css-modules/css-modules\" class=\"markup--anchor markup--p-anchor\">CSS modules</a> in your Create React App projects. CSS Modules scope stylesheet class names so that they are unique to a specific React component. This allows you to create class names without having to worry if they might collide with class names used in another component.</p>\n<p>Add a new <code>css-modules</code> folder to the <code>src</code> folder. Within that folder, add the following files:</p>\n<ul>\n<li><span id=\"2912\"><code>HeadingA.js</code></span></li>\n<li><span id=\"3aa3\"><code>HeadingA.module.css</code></span></li>\n<li><span id=\"2ea3\"><code>HeadingB.js</code></span></li>\n<li><span id=\"ca2b\"><code>HeadingB.module.css</code></span></li>\n</ul>\n<p>Then update the contents of each file to the following:</p>\n<pre><code>// ./src/css-modules/HeadingA.js\n\nimport React from 'react';\nimport styles from './HeadingA.module.css';\n\nfunction HeadingA() {\n  return (\n    &#x3C;h1 className={styles.heading}>Heading A&#x3C;/h1>\n  );\n}\n\nexport default HeadingA;\n\n/* ./src/css-modules/HeadingA.module.css */\n\n.heading {\n  color: green;\n}\n\n// ./src/css-modules/HeadingB.js\n\nimport React from 'react';\nimport styles from './HeadingB.module.css';\n\nfunction HeadingB() {\n  return (\n    &#x3C;h1 className={styles.heading}>Heading B&#x3C;/h1>\n  );\n}\n\nexport default HeadingB;\n\n/* ./src/css-modules/HeadingB.module.css */\n\n.heading {\n  color: red;\n}\n</code></pre>\n<p>Notice how the <code>.heading</code> CSS class name is being used within each component to set the color of the <code>&#x3C;h1></code> element. For the <code>HeadingA</code> component, the color is <code>green</code>, and for the <code>HeadingB</code> component, the color is <code>red</code>. Using the file naming convention <code>[name].module.css</code> let's Create React App know that we want these stylesheets to be processed as CSS Modules. Using CSS Modules allows the <code>.heading</code> class name to be reused across components without any issue.</p>\n<p>To see this feature in action, update your <code>App</code> component to render both of your new components:</p>\n<pre><code>import React from 'react';\nimport HeadingA from './css-modules/HeadingA';\nimport HeadingB from './css-modules/HeadingB';\n\nfunction App() {\n  return (\n    &#x3C;div>\n      &#x3C;h1>Exploring React Builds&#x3C;/h1>\n      &#x3C;HeadingA />\n      &#x3C;HeadingB />\n    &#x3C;/div>\n  );\n}\n\nexport default App;\n</code></pre>\n<p>Then run your application (<code>npm start</code>) to see \"Heading A\" and \"Heading B\" displayed respectively in green and red. If you use the browser's developer tools to inspect \"Heading A\", you'll see that the <code>.heading</code> class name has been modified so that it's unique to the <code>HeadingA</code> component:</p>\n<p>CSS Modules is an example of how a front-end build process can be used to modify code to enable a feature that's not natively supported by browsers.</p>\n<h3>Phase 2: Using an image in a component</h3>\n<p>Create React App configures webpack with support for loading images (as well as CSS, fonts, and other file types). What this means, for you as the developer, is that you can add an image file to your project, import it directly into a module, and render it in a React component.</p>\n<p>Download any image of off the Web or <a href=\"https://appacademy-open-assets.s3-us-west-1.amazonaws.com/Modular-Curriculum/content/react-redux/topics/react-builds/assets/react-builds-cat.png\" class=\"markup--anchor markup--p-anchor\">click here</a> to download the below image.</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*233dNJ6vfgAmEVCD\" class=\"graf-image\" /></figure>Then within the `src` folder add a new folder named `image`. Within that folder add a new component file named `Image.js`. Also add your downloaded image file to the `image` folder (so it's a sibling to the `Image.js` file).\n<p>Update the contents of the <code>Image.js</code> file to this:</p>\n<pre><code>// ./src/image/Image.js\n\nimport React from 'react';\nimport cat from './react-builds-cat.png';\n\nconsole.log(cat); // /static/media/react-builds-cat.45f7f4d2.png\n\nfunction Image() {\n  // Import result is the URL of your image.\n  return &#x3C;img src={cat} alt=\"images/images/Cat\" />;\n}\n\nexport default Image;\n</code></pre>\n<p>You can import an image into a component using the <code>import</code> keyword. This tells webpack to include the image in the build. Notice that when you import an image into a module, you'll get a path to the image's location within the build. You can use this path to set the <code>src</code> attribute on an <code>&#x3C;img></code> element.</p>\n<blockquote>\n<p><em>Be sure to update the image</em> <code>import</code> <em>statement to the correct file name if you're using your own image!</em></p>\n</blockquote>\n<p>Now update the <code>App</code> component to import and render the <code>Image</code> component:</p>\n<pre><code>// ./src/App.js\n\nimport React from 'react';\nimport HeadingA from './css-modules/HeadingA';\nimport HeadingB from './css-modules/HeadingB';\nimport Image from './image/Image';\n\nfunction App() {\n  return (\n    &#x3C;div>\n      &#x3C;h1>Exploring React Builds&#x3C;/h1>\n      &#x3C;HeadingA />\n      &#x3C;HeadingB />\n      &#x3C;Image />\n    &#x3C;/div>\n  );\n}\n\nexport default App;\n</code></pre>\n<p>If you run your application (<code>npm start</code>) you'll see your image displayed on the page! You can also open your browser's developer tools and view the \"Sources\" for the current page. If you can expand the <code>localhost:3000</code> > <code>static</code> > <code>media</code> node on the left, you can see the image file that webpack copied to your build.</p>\n<h3>Images in stylesheets</h3>\n<p>You can also reference images in your CSS files too. Add a CSS file named <code>Image.css</code> to the <code>./src/image</code> folder and update its contents to this:</p>\n<pre><code>/* ./src/image/Image.css */\n\n.cat {\n  background-image: url(./react-builds-cat.png);\n  width: 400px;\n  height: 400px;\n}\n</code></pre>\n<p>Then update the <code>Image</code> component to this:</p>\n<pre><code>// ./src/image/Image.js\n\nimport React from 'react';\nimport './Image.css';\nimport cat from './react-builds-cat.png';\n\nconsole.log(cat); // /static/media/react-builds-cat.45f7f4d2.png\n\nfunction Image() {\n  return (\n    &#x3C;div>\n      {/* Import result is the URL of your image. */}\n      &#x3C;img src={cat} alt=\"Cat\" />\n      &#x3C;div className='cat'>&#x3C;/div>\n    &#x3C;/div>\n  );\n}\n\nexport default Image;\n</code></pre>\n<p>Now you'll see the image displayed twice on the page!</p>\n<h3>Phase 3: Updating the supported browsers (and its affect on code transpilation)</h3>\n<p>Earlier you learned about the <code>browerslist</code> setting in the <code>package.json</code> file and now adjusting these targets affect how your code will be transpiled:</p>\n<pre><code>{\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n</code></pre>\n<p>The <code>production</code> list specifies the browsers to target when creating a production build and the <code>development</code> list specifics the browsers to target when running the application using <code>npm start</code>. Currently, you're targeting relatively recent versions of the major browsers when creating a development build. Targeting older browser versions results in your code being transpiled to an older version of JavaScript.</p>\n<p>To experiment with this configuration option, let's add a class component to the project. Add a new folder named <code>class-component</code> to the <code>src</code> folder. Within that folder, add a file named <code>ClassComponent.js</code> containing the following code:</p>\n<pre><code class=\"language-jsx\">    // ./src/class-component/ClassComponent.js\n\n    import React from 'react';\n\n    class ClassComponent extends React.Component {\n      render() {\n        return (\n          &#x3C;h1>Class Component&#x3C;/h1>\n        );\n      }\n    }\n\n    export default ClassComponent;\n</code></pre>\n<p>Don't forget to update your <code>App</code> component to render the new component:</p>\n<pre><code class=\"language-jsx\">    // ./src/App.js\n\n    import React from 'react';\n    import HeadingA from './css-modules/HeadingA';\n    import HeadingB from './css-modules/HeadingB';\n    import Image from './image/Image';\n    import ClassComponent from './class-component/ClassComponent';\n\n    function App() {\n      return (\n        &#x3C;div>\n          &#x3C;h1>Exploring React Builds&#x3C;/h1>\n          &#x3C;HeadingA />\n          &#x3C;HeadingB />\n          &#x3C;Image />\n          &#x3C;ClassComponent />\n        &#x3C;/div>\n      );\n    }\n\n    export default App;\n</code></pre>\n<p>Now run your application using <code>npm start</code>. Open your browser's developer tools and view the \"Sources\" for the current page. Expand the <code>localhost:3000</code> > <code>static</code> > <code>js</code> node on the left and select the <code>main.chunk.js</code> file. Press <code>CMD+F</code> on macOS or <code>CTRL+F</code> on Windows to search the file for \"Class Component\". Here's what the transpiled code looks like for the <code>ClassComponent</code> class:</p>\n<pre><code class=\"language-jsx\">    class ClassComponent extends react__WEBPACK_IMPORTED_MODULE_0___default.a.Component {\n      render() {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n          __self: this,\n          __source: {\n            fileName: _jsxFileName,\n            lineNumber: 7,\n            columnNumber: 7\n          }\n        }, \"Class Component\");\n      }\n    }\n</code></pre>\n<blockquote>\n<p><em>Have you wondered yet why you need to use the developer tools to view the bundles generated by Create React App? Remember that when you run</em> <code>npm start</code><em>, Create React App builds your application using</em> <code>webpack-dev-server</code><em>. To keep things as performant as possible, the bundles generated by</em> <code>webpack-dev-server</code> <em>are stored in memory instead of writing them to the file system.</em></p>\n</blockquote>\n<p>The JSX in the component's <code>render</code> method has been converted to JavaScript but the <code>ClassComponent</code> ES2015 class is left alone. This makes sense though as JSX isn't natively supported by any browser while ES2015 classes have been natively supported by browsers for awhile now.</p>\n<p>But what if you need to target a version of a browser that doesn't support ES2015 classes? You can use the <a href=\"https://caniuse.com/#feat=es6-class\" class=\"markup--anchor markup--p-anchor\">“Can I use…”</a> website to see when browsers started supporting ES2105 (or ES6) classes. Starting with version 49, Chrome natively supported classes. But imagine that you need to support Chrome going back to version 30, a version of Chrome that doesn't support classes.</p>\n<p>Change the <code>browserslist.development</code> property in the <code>package.json</code> file to this:</p>\n<pre><code class=\"language-json\">    {\n      \"browserslist\": {\n        \"production\": [\n          \">0.2%\",\n          \"not dead\",\n          \"not op_mini all\"\n        ],\n        \"development\": [\n          \"chrome >= 30\",\n          \"last 1 firefox version\",\n          \"last 1 safari version\"\n        ]\n      }\n    }\n</code></pre>\n<p>The query <code>chrome >= 30</code> specifies that you want to target Chrome version 30 or newer.</p>\n<blockquote>\n<p><em>The</em> <a href=\"https://browserl.ist/\" class=\"markup--anchor markup--blockquote-anchor\"><em>browserl.ist</em></a> <em>website can be used to see the browsers supported by your configured</em> <code>browserslist</code><em>.</em></p>\n</blockquote>\n<p>Stop your application if it's currently running. Delete the <code>./node_modules/.cache</code> folder and run <code>npm start</code> again. Then view the <code>main.chunk.js</code> bundle again in the developer tools:</p>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*TKBUkpbL5aSm5PTQ\" class=\"graf-image\" /></figure>Now your ES2015 class component is being converted to a constructor function! Here's the transpiled code for reference:\n<pre><code class=\"language-jsx\">    let ClassComponent = /*#__PURE__*/function (_React$Component) {\n      Object(_Users_jameschurchill_Documents_GitHub_Modular_Curriculum_content_react_redux_topics_react_builds_projects_exploring_react_builds_solution_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ClassComponent, _React$Component);\n\n      let _super = Object(_Users_jameschurchill_Documents_GitHub_Modular_Curriculum_content_react_redux_topics_react_builds_projects_exploring_react_builds_solution_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(ClassComponent);\n\n      function ClassComponent() {\n        Object(_Users_jameschurchill_Documents_GitHub_Modular_Curriculum_content_react_redux_topics_react_builds_projects_exploring_react_builds_solution_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, ClassComponent);\n\n        return _super.apply(this, arguments);\n      }\n\n      Object(_Users_jameschurchill_Documents_GitHub_Modular_Curriculum_content_react_redux_topics_react_builds_projects_exploring_react_builds_solution_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(ClassComponent, [{\n        key: \"render\",\n        value: function render() {\n          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(\"h1\", {\n            __self: this,\n            __source: {\n              fileName: _jsxFileName,\n              lineNumber: 7,\n              columnNumber: 7\n            }\n          }, \"Class Component\");\n        }\n      }]);\n\n      return ClassComponent;\n    }(react__WEBPACK_IMPORTED_MODULE_4___default.a.Component);\n</code></pre>\n<p>Luckily it's very rare that you'll need to read the code in your generated bundles. webpack, by default, is configured to generate sourcemaps. Sourcemaps are a mapping of the code in a generated file, like a bundle file, to the original source code. This gives you access to your original source code in the browser's developer tools:</p>\n<p>You can even set a breakpoint in your source within the developer tools to stop execution on a specific line of code!</p>\n<h3>Phase 4: Adding environment variables</h3>\n<p>Earlier you learned that Create React App supports defining environment variables in an <code>.env</code> file. This gives you a convenient way to avoid hard coding values that vary across environments.</p>\n<p>Let's experiment with this feature so that you can see how the Create React App build process embeds environment variables into your HTML, CSS, and JavaScript bundles.</p>\n<p>Add an <code>.env</code> file to the root of your Create React App project. Define an environment variable named <code>REACT_APP_TITLE</code>:</p>\n<pre><code>REACT_APP_TITLE=Exploring React Builds\n</code></pre>\n<p>Remember that environment variables need to be prefixed with <code>REACT_APP_</code> for Create React App to process them. After defining your environment variable, you can refer to it within JSX using an expression and <code>process.env</code>:</p>\n<pre><code>// ./src/App.js\n</code></pre>\n<pre><code class=\"language-jsx\">    import React from 'react';\n    import HeadingA from './css-modules/HeadingA';\n    import HeadingB from './css-modules/HeadingB';\n    import Image from './image/Image';\n    import ClassComponent from './class-component/ClassComponent';\n\n    function App() {\n      return (\n        &#x3C;div>\n          &#x3C;h1>{process.env.REACT_APP_TITLE}&#x3C;/h1>\n          &#x3C;HeadingA />\n          &#x3C;HeadingB />\n          &#x3C;Image />\n          &#x3C;ClassComponent />\n        &#x3C;/div>\n      );\n    }\n\n    export default App;\n</code></pre>\n<p>Environment variables can also be referred to in regular JavaScript code:</p>\n<pre><code>console.log(process.env.REACT_APP_TITLE);\n</code></pre>\n<p>You can also reference environment variables in your <code>./public/index.html</code> file like this:</p>\n<pre><code class=\"language-html\">    &#x3C;!DOCTYPE html>\n    &#x3C;html lang=\"en\">\n      &#x3C;head>\n        &#x3C;meta charset=\"utf-8\" />\n        &#x3C;title>%REACT_APP_TITLE%&#x3C;/title>\n      &#x3C;/head>\n      &#x3C;body>\n        &#x3C;div id=\"root\">&#x3C;/div>\n      &#x3C;/body>\n    &#x3C;/html>\n</code></pre>\n<p>Run your application again using <code>npm start</code>. Open your browser's developer tools and view the \"Sources\" for the current page. Expand the <code>localhost:3000</code> node on the left and select <code>(index)</code>. Notice that the text <code>%REACT_APP_TITLE%</code> within the <code>&#x3C;title></code> element has been converted to the text literal <code>Exploring React Builds</code>:</p>\n<p>If you expand the <code>localhost:3000</code> > <code>static</code> > <code>js</code> node on the left and select the <code>main.chunk.js</code> file, you can see how the <code>App</code> component's JSX has been converted to JavaScript:</p>\n<p>Here's a closer look at the relevant <code>React.createElement</code> method call:</p>\n<pre><code class=\"language-jsx\">    /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n        __self: this,\n        __source: {\n          fileName: _jsxFileName,\n          lineNumber: 10,\n          columnNumber: 7\n        }\n      }, \"Exploring React Builds\")\n</code></pre>\n<p>Again, notice how the environment variable has been replaced with a text literal. This has important security implications for you to consider. Because environment variables are embedded into your HTML, CSS, and JavaScript bundles during the build process, it's <em>very important</em> to not store any secrets, like API keys, in your environment variables. Remember, anyone can view your bundled code in the browser by inspecting your files!</p>\n<h3>Phase 5: Deploying a production build</h3>\n<p>In the last phase of this project, let's add routing to the React application, create a production build, and deploy the build to an Express application!</p>\n<h3>Adding routing</h3>\n<p>To add React Router to the application, start by installing the <code>react-router-dom</code> npm package:</p>\n<pre><code>npm install react-router-dom@^5.0.0\n</code></pre>\n<p>Then update the <code>App</code> component to this code:</p>\n<pre><code class=\"language-jsx\">    // ./src/App.js\n\n    import React from 'react';\n    import {\n      BrowserRouter,\n      Switch,\n      Route,\n      Link\n    } from 'react-router-dom';\n    import HeadingA from './css-modules/HeadingA';\n    import HeadingB from './css-modules/HeadingB';\n    import Image from './image/Image';\n    import ClassComponent from './class-component/ClassComponent';\n\n    function App() {\n      return (\n        &#x3C;BrowserRouter>\n          &#x3C;div>\n            &#x3C;h1>{process.env.REACT_APP_TITLE}&#x3C;/h1>\n            &#x3C;nav>\n              &#x3C;ul>\n                &#x3C;li>\n                  &#x3C;Link to=\"/\">Home&#x3C;/Link>\n                &#x3C;/li>\n                &#x3C;li>\n                  &#x3C;Link to=\"/image\">Image&#x3C;/Link>\n                &#x3C;/li>\n                &#x3C;li>\n                  &#x3C;Link to=\"/class-component\">Class Component&#x3C;/Link>\n                &#x3C;/li>\n              &#x3C;/ul>\n            &#x3C;/nav>\n            &#x3C;Switch>\n              &#x3C;Route path=\"/image\">\n                &#x3C;Image />\n              &#x3C;/Route>\n              &#x3C;Route path=\"/class-component\">\n                &#x3C;ClassComponent />\n              &#x3C;/Route>\n              &#x3C;Route path=\"/\">\n                &#x3C;HeadingA />\n                &#x3C;HeadingB />\n              &#x3C;/Route>\n            &#x3C;/Switch>\n          &#x3C;/div>\n        &#x3C;/BrowserRouter>\n      );\n    }\n\n    export default App;\n</code></pre>\n<p>Be sure to run and test your application to ensure that the defined routes work as expected:</p>\n<ul>\n<li><span id=\"151a\"><code>/</code> - Should display the <code>HeadingA</code> and <code>HeadingB</code> components;</span></li>\n<li><span id=\"1e2b\"><code>/image</code> - Should display the <code>Image</code> component; and</span></li>\n<li><span id=\"7f3a\"><code>/class-component</code> - Should display the <code>ClassComponent</code> component.</span></li>\n</ul>\n<h3>Creating a production build</h3>\n<p>To create a production build, run the command <code>npm run build</code> from the root of your project. The output in the terminal should look something like this:</p>\n<pre><code>> solution@0.1.0 build [absolute path to your project]\n> react-scripts build\n\nCreating an optimized production build...\nCompiled successfully.\n\nFile sizes after gzip:\n\n  47.83 KB  build/static/js/2.722c16c4.chunk.js\n  773 B     build/static/js/runtime-main.b7d1e5ee.js\n  745 B     build/static/js/main.12299197.chunk.js\n  197 B     build/static/css/main.e9a0d1f8.chunk.css\n\nThe project was built assuming it is hosted at /.\nYou can control this with the homepage field in your package.json.\n\nThe build folder is ready to be deployed.\nYou may serve it with a static server:\n\n  npm install -g serve\n  serve -s build\n\nFind out more about deployment here:\n\n  bit.ly/CRA-deploy\n</code></pre>\n<p>Ignore the comments about using <code>serve</code> to deploy your application (i.e. <code>npm install -g serve</code> and <code>serve -s build</code>). In the next step, you'll create a simple Express application to server your React application.</p>\n<h3>Serving a React application using Express</h3>\n<p>Create a new folder for your Express application outside of the Create React App project folder.</p>\n<blockquote>\n<p><em>For example, from the root of your project, use</em> <code>cd ..</code> <em>to go up a level and then create a new folder named</em> <code>express-server</code> <em>by running the command</em> <code>mkdir express-server</code><em>. This makes the</em> <code>express-server</code> <em>folder a sibling to your Create React App project folder.</em></p>\n</blockquote>\n<p>Browse into the <code>express-server</code> folder and initialize it to use npm (i.e. <code>npm init -y</code>). Then install Express by running the command <code>npm install express@^4.0.0</code>.</p>\n<p>App a file named <code>app.js</code> with the following contents:</p>\n<pre><code>// ./app.js\n\nconst express = require('express');\nconst path = require('path');\n\nconst app = express();\n\napp.use(express.static(path.join(__dirname, 'public')));\n\napp.get('*', function(req, res) {\n  res.sendFile(path.join(__dirname, 'public', 'index.html'));\n});\n\nconst port = 9000;\n\napp.listen(port, () => console.log(`Listening on port ${port}...`));\n</code></pre>\n<p>This simple Express application will:</p>\n<ul>\n<li><span id=\"31ba\">Attempt to match incoming requests to static files located in the <code>public</code> folder; and</span></li>\n<li><span id=\"16e6\">If a matching static file isn't found, then the <code>./public/index.html</code> file will be served for all other requests.</span></li>\n</ul>\n<p>Now add a folder named <code>public</code> to the root of your Express project. Copy the files from the <code>build</code> folder in your Create React App project to the <code>public</code> folder in the Express application project. Then run your application using the command <code>node app.js</code>.</p>\n<p>Open a browser and browse to the URL <code>http://localhost:9000/</code>. You should see your React application served from your Express application! Be sure to click the navigation links to verify that all of your configured routes work as expected.</p>\n<p>Also, because you configured Express to serve the <code>./public/index.html</code> file for any request that doesn't match a static file, you can \"deep link\" to any of your React application's routes:</p>\n<ul>\n<li><span id=\"58e7\"><a href=\"http://localhost:9000/image\" class=\"markup--anchor markup--li-anchor\">http://localhost:9000/image</a></span></li>\n<li><span id=\"3fa9\"><a href=\"http://localhost:9000/class-component\" class=\"markup--anchor markup--li-anchor\">http://localhost:9000/class-component</a></span></li>\n</ul>\n<p><em>More content at</em> <a href=\"http://plainenglish.io/\" class=\"markup--anchor markup--p-anchor\"><strong><em>plainenglish.io</em></strong></a></p>\n<p>By <a href=\"https://medium.com/@bryanguner\" class=\"p-author h-card\">Bryan Guner</a> on <a href=\"https://medium.com/p/1965dcde8d4f\">July 15, 2021</a>.</p>\n<p><a href=\"https://medium.com/@bryanguner/react-in-depth-1965dcde8d4f\" class=\"p-canonical\">Canonical link</a></p>\n<p>Exported from <a href=\"https://medium.com\">Medium</a> on August 31, 2021.</p>"},{"url":"/docs/javascript/","relativePath":"docs/javascript/index.md","relativeDir":"docs/javascript","base":"index.md","name":"index","frontmatter":{"title":"Javascript","weight":0,"excerpt":"Javascript articles  and docs","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h2>Cheatsheet:</h2>\n<pre><code class=\"language-js\">// Single-line comments start with two slashes.\n/* Multiline comments start with slash-star,\n   and end with star-slash */\n\n// Statements can be terminated by ;\ndoStuff();\n\n// ... but they don't have to be, as semicolons are automatically inserted\n// wherever there's a newline, except in certain cases.\ndoStuff()\n\n// Because those cases can cause unexpected results, we'll keep on using\n// semicolons in this guide.\n\n///////////////////////////////////\n// 1. Numbers, Strings and Operators\n\n// JavaScript has one number type (which is a 64-bit IEEE 754 double).\n// Doubles have a 52-bit mantissa, which is enough to store integers\n// up to about 9✕10¹⁵ precisely.\n3; // = 3\n1.5; // = 1.5\n\n// Some basic arithmetic works as you'd expect.\n1 + 1; // = 2\n0.1 + 0.2; // = 0.30000000000000004\n8 - 1; // = 7\n10 * 2; // = 20\n35 / 5; // = 7\n\n// Including uneven division.\n5 / 2; // = 2.5\n\n// And modulo division.\n10 % 2; // = 0\n30 % 4; // = 2\n18.5 % 7; // = 4.5\n\n// Bitwise operations also work; when you perform a bitwise operation your float\n// is converted to a signed int *up to* 32 bits.\n1 &#x3C;&#x3C; 2; // = 4\n\n// Precedence is enforced with parentheses.\n(1 + 3) * 2; // = 8\n\n// There are three special not-a-real-number values:\nInfinity; // result of e.g. 1/0\n-Infinity; // result of e.g. -1/0\nNaN; // result of e.g. 0/0, stands for 'Not a Number'\n\n// There's also a boolean type.\ntrue;\nfalse;\n\n// Strings are created with ' or \".\n'abc';\n\"Hello, world\";\n\n// Negation uses the ! symbol\n!true; // = false\n!false; // = true\n\n// Equality is ===\n1 === 1; // = true\n2 === 1; // = false\n\n// Inequality is !==\n1 !== 1; // = false\n2 !== 1; // = true\n\n// More comparisons\n1 &#x3C; 10; // = true\n1 > 10; // = false\n2 &#x3C;= 2; // = true\n2 >= 2; // = true\n\n// Strings are concatenated with +\n\"Hello \" + \"world!\"; // = \"Hello world!\"\n\n// ... which works with more than just strings\n\"1, 2, \" + 3; // = \"1, 2, 3\"\n\"Hello \" + [\"world\", \"!\"]; // = \"Hello world,!\"\n\n// and are compared with &#x3C; and >\n\"a\" &#x3C; \"b\"; // = true\n\n// Type coercion is performed for comparisons with double equals...\n\"5\" == 5; // = true\nnull == undefined; // = true\n\n// ...unless you use ===\n\"5\" === 5; // = false\nnull === undefined; // = false\n\n// ...which can result in some weird behaviour...\n13 + !0; // 14\n\"13\" + !0; // '13true'\n\n// You can access characters in a string with `charAt`\n\"This is a string\".charAt(0);  // = 'T'\n\n// ...or use `substring` to get larger pieces.\n\"Hello world\".substring(0, 5); // = \"Hello\"\n\n// `length` is a property, so don't use ().\n\"Hello\".length; // = 5\n\n// There's also `null` and `undefined`.\nnull;      // used to indicate a deliberate non-value\nundefined; // used to indicate a value is not currently present (although\n           // `undefined` is actually a value itself)\n\n// false, null, undefined, NaN, 0 and \"\" are falsy; everything else is truthy.\n// Note that 0 is falsy and \"0\" is truthy, even though 0 == \"0\".\n\n///////////////////////////////////\n// 2. Variables, Arrays and Objects\n\n// Variables are declared with the `var` keyword. JavaScript is dynamically\n// typed, so you don't need to specify type. Assignment uses a single `=`\n// character.\nvar someVar = 5;\n\n// If you leave the var keyword off, you won't get an error...\nsomeOtherVar = 10;\n\n// ...but your variable will be created in the global scope, not in the scope\n// you defined it in.\n\n// Variables declared without being assigned to are set to undefined.\nvar someThirdVar; // = undefined\n\n// If you want to declare a couple of variables, then you could use a comma\n// separator\nvar someFourthVar = 2, someFifthVar = 4;\n\n// There's shorthand for performing math operations on variables:\nsomeVar += 5; // equivalent to someVar = someVar + 5; someVar is 10 now\nsomeVar *= 10; // now someVar is 100\n\n// and an even-shorter-hand for adding or subtracting 1\nsomeVar++; // now someVar is 101\nsomeVar--; // back to 100\n\n// Arrays are ordered lists of values, of any type.\nvar myArray = [\"Hello\", 45, true];\n\n// Their members can be accessed using the square-brackets subscript syntax.\n// Array indices start at zero.\nmyArray[1]; // = 45\n\n// Arrays are mutable and of variable length.\nmyArray.push(\"World\");\nmyArray.length; // = 4\n\n// Add/Modify at specific index\nmyArray[3] = \"Hello\";\n\n// Add and remove element from front or back end of an array\nmyArray.unshift(3); // Add as the first element\nsomeVar = myArray.shift(); // Remove first element and return it\nmyArray.push(3); // Add as the last element\nsomeVar = myArray.pop(); // Remove last element and return it\n\n// Join all elements of an array with semicolon\nvar myArray0 = [32,false,\"js\",12,56,90];\nmyArray0.join(\";\") // = \"32;false;js;12;56;90\"\n\n// Get subarray of elements from index 1 (include) to 4 (exclude)\nmyArray0.slice(1,4); // = [false,\"js\",12]\n\n// Remove 4 elements starting from index 2, and insert there strings\n// \"hi\",\"wr\" and \"ld\"; return removed subarray\nmyArray0.splice(2,4,\"hi\",\"wr\",\"ld\"); // = [\"js\",12,56,90]\n// myArray0 === [32,false,\"hi\",\"wr\",\"ld\"]\n\n// JavaScript's objects are equivalent to \"dictionaries\" or \"maps\" in other\n// languages: an unordered collection of key-value pairs.\nvar myObj = {key1: \"Hello\", key2: \"World\"};\n\n// Keys are strings, but quotes aren't required if they're a valid\n// JavaScript identifier. Values can be any type.\nvar myObj = {myKey: \"myValue\", \"my other key\": 4};\n\n// Object attributes can also be accessed using the subscript syntax,\nmyObj[\"my other key\"]; // = 4\n\n// ... or using the dot syntax, provided the key is a valid identifier.\nmyObj.myKey; // = \"myValue\"\n\n// Objects are mutable; values can be changed and new keys added.\nmyObj.myThirdKey = true;\n\n// If you try to access a value that's not yet set, you'll get undefined.\nmyObj.myFourthKey; // = undefined\n\n///////////////////////////////////\n// 3. Logic and Control Structures\n\n// The `if` structure works as you'd expect.\nvar count = 1;\nif (count == 3){\n    // evaluated if count is 3\n} else if (count == 4){\n    // evaluated if count is 4\n} else {\n    // evaluated if it's not either 3 or 4\n}\n\n// As does `while`.\nwhile (true){\n    // An infinite loop!\n}\n\n// Do-while loops are like while loops, except they always run at least once.\nvar input;\ndo {\n    input = getInput();\n} while (!isValid(input));\n\n// The `for` loop is the same as C and Java:\n// initialization; continue condition; iteration.\nfor (var i = 0; i &#x3C; 5; i++){\n    // will run 5 times\n}\n\n// Breaking out of labeled loops is similar to Java\nouter:\nfor (var i = 0; i &#x3C; 10; i++) {\n    for (var j = 0; j &#x3C; 10; j++) {\n        if (i == 5 &#x26;&#x26; j ==5) {\n            break outer;\n            // breaks out of outer loop instead of only the inner one\n        }\n    }\n}\n\n// The for/in statement allows iteration over properties of an object.\nvar description = \"\";\nvar person = {fname:\"Paul\", lname:\"Ken\", age:18};\nfor (var x in person){\n    description += person[x] + \" \";\n} // description = 'Paul Ken 18 '\n\n// The for/of statement allows iteration over iterable objects (including the built-in String, \n// Array, e.g. the Array-like arguments or NodeList objects, TypedArray, Map and Set, \n// and user-defined iterables).\nvar myPets = \"\";\nvar pets = [\"cat\", \"dog\", \"hamster\", \"hedgehog\"];\nfor (var pet of pets){\n    myPets += pet + \" \";\n} // myPets = 'cat dog hamster hedgehog '\n\n// &#x26;&#x26; is logical and, || is logical or\nif (house.size == \"big\" &#x26;&#x26; house.colour == \"blue\"){\n    house.contains = \"bear\";\n}\nif (colour == \"red\" || colour == \"blue\"){\n    // colour is either red or blue\n}\n\n// &#x26;&#x26; and || \"short circuit\", which is useful for setting default values.\nvar name = otherName || \"default\";\n\n// The `switch` statement checks for equality with `===`.\n// Use 'break' after each case\n// or the cases after the correct one will be executed too.\ngrade = 'B';\nswitch (grade) {\n  case 'A':\n    console.log(\"Great job\");\n    break;\n  case 'B':\n    console.log(\"OK job\");\n    break;\n  case 'C':\n    console.log(\"You can do better\");\n    break;\n  default:\n    console.log(\"Oy vey\");\n    break;\n}\n\n\n///////////////////////////////////\n// 4. Functions, Scope and Closures\n\n// JavaScript functions are declared with the `function` keyword.\nfunction myFunction(thing){\n    return thing.toUpperCase();\n}\nmyFunction(\"foo\"); // = \"FOO\"\n\n// Note that the value to be returned must start on the same line as the\n// `return` keyword, otherwise you'll always return `undefined` due to\n// automatic semicolon insertion. Watch out for this when using Allman style.\nfunction myFunction(){\n    return // &#x3C;- semicolon automatically inserted here\n    {thisIsAn: 'object literal'};\n}\nmyFunction(); // = undefined\n\n// JavaScript functions are first class objects, so they can be reassigned to\n// different variable names and passed to other functions as arguments - for\n// example, when supplying an event handler:\nfunction myFunction(){\n    // this code will be called in 5 seconds' time\n}\nsetTimeout(myFunction, 5000);\n// Note: setTimeout isn't part of the JS language, but is provided by browsers\n// and Node.js.\n\n// Another function provided by browsers is setInterval\nfunction myFunction(){\n    // this code will be called every 5 seconds\n}\nsetInterval(myFunction, 5000);\n\n// Function objects don't even have to be declared with a name - you can write\n// an anonymous function definition directly into the arguments of another.\nsetTimeout(function(){\n    // this code will be called in 5 seconds' time\n}, 5000);\n\n// JavaScript has function scope; functions get their own scope but other blocks\n// do not.\nif (true){\n    var i = 5;\n}\ni; // = 5 - not undefined as you'd expect in a block-scoped language\n\n// This has led to a common pattern of \"immediately-executing anonymous\n// functions\", which prevent temporary variables from leaking into the global\n// scope.\n(function(){\n    var temporary = 5;\n    // We can access the global scope by assigning to the \"global object\", which\n    // in a web browser is always `window`. The global object may have a\n    // different name in non-browser environments such as Node.js.\n    window.permanent = 10;\n})();\ntemporary; // raises ReferenceError\npermanent; // = 10\n\n// One of JavaScript's most powerful features is closures. If a function is\n// defined inside another function, the inner function has access to all the\n// outer function's variables, even after the outer function exits.\nfunction sayHelloInFiveSeconds(name){\n    var prompt = \"Hello, \" + name + \"!\";\n    // Inner functions are put in the local scope by default, as if they were\n    // declared with `var`.\n    function inner(){\n        alert(prompt);\n    }\n    setTimeout(inner, 5000);\n    // setTimeout is asynchronous, so the sayHelloInFiveSeconds function will\n    // exit immediately, and setTimeout will call inner afterwards. However,\n    // because inner is \"closed over\" sayHelloInFiveSeconds, inner still has\n    // access to the `prompt` variable when it is finally called.\n}\nsayHelloInFiveSeconds(\"Adam\"); // will open a popup with \"Hello, Adam!\" in 5s\n\n///////////////////////////////////\n// 5. More about Objects; Constructors and Prototypes\n\n// Objects can contain functions.\nvar myObj = {\n    myFunc: function(){\n        return \"Hello world!\";\n    }\n};\nmyObj.myFunc(); // = \"Hello world!\"\n\n// When functions attached to an object are called, they can access the object\n// they're attached to using the `this` keyword.\nmyObj = {\n    myString: \"Hello world!\",\n    myFunc: function(){\n        return this.myString;\n    }\n};\nmyObj.myFunc(); // = \"Hello world!\"\n\n// What this is set to has to do with how the function is called, not where\n// it's defined. So, our function doesn't work if it isn't called in the\n// context of the object.\nvar myFunc = myObj.myFunc;\nmyFunc(); // = undefined\n\n// Inversely, a function can be assigned to the object and gain access to it\n// through `this`, even if it wasn't attached when it was defined.\nvar myOtherFunc = function(){\n    return this.myString.toUpperCase();\n};\nmyObj.myOtherFunc = myOtherFunc;\nmyObj.myOtherFunc(); // = \"HELLO WORLD!\"\n\n// We can also specify a context for a function to execute in when we invoke it\n// using `call` or `apply`.\n\nvar anotherFunc = function(s){\n    return this.myString + s;\n};\nanotherFunc.call(myObj, \" And Hello Moon!\"); // = \"Hello World! And Hello Moon!\"\n\n// The `apply` function is nearly identical, but takes an array for an argument\n// list.\n\nanotherFunc.apply(myObj, [\" And Hello Sun!\"]); // = \"Hello World! And Hello Sun!\"\n\n// This is useful when working with a function that accepts a sequence of\n// arguments and you want to pass an array.\n\nMath.min(42, 6, 27); // = 6\nMath.min([42, 6, 27]); // = NaN (uh-oh!)\nMath.min.apply(Math, [42, 6, 27]); // = 6\n\n// But, `call` and `apply` are only temporary. When we want it to stick, we can\n// use `bind`.\n\nvar boundFunc = anotherFunc.bind(myObj);\nboundFunc(\" And Hello Saturn!\"); // = \"Hello World! And Hello Saturn!\"\n\n// `bind` can also be used to partially apply (curry) a function.\n\nvar product = function(a, b){ return a * b; };\nvar doubler = product.bind(this, 2);\ndoubler(8); // = 16\n\n// When you call a function with the `new` keyword, a new object is created, and\n// made available to the function via the `this` keyword. Functions designed to be\n// called like that are called constructors.\n\nvar MyConstructor = function(){\n    this.myNumber = 5;\n};\nmyNewObj = new MyConstructor(); // = {myNumber: 5}\nmyNewObj.myNumber; // = 5\n\n// Unlike most other popular object-oriented languages, JavaScript has no\n// concept of 'instances' created from 'class' blueprints; instead, JavaScript\n// combines instantiation and inheritance into a single concept: a 'prototype'.\n\n// Every JavaScript object has a 'prototype'. When you go to access a property\n// on an object that doesn't exist on the actual object, the interpreter will\n// look at its prototype.\n\n// Some JS implementations let you access an object's prototype on the magic\n// property `__proto__`. While this is useful for explaining prototypes it's not\n// part of the standard; we'll get to standard ways of using prototypes later.\nvar myObj = {\n    myString: \"Hello world!\"\n};\nvar myPrototype = {\n    meaningOfLife: 42,\n    myFunc: function(){\n        return this.myString.toLowerCase();\n    }\n};\n\nmyObj.__proto__ = myPrototype;\nmyObj.meaningOfLife; // = 42\n\n// This works for functions, too.\nmyObj.myFunc(); // = \"hello world!\"\n\n// Of course, if your property isn't on your prototype, the prototype's\n// prototype is searched, and so on.\nmyPrototype.__proto__ = {\n    myBoolean: true\n};\nmyObj.myBoolean; // = true\n\n// There's no copying involved here; each object stores a reference to its\n// prototype. This means we can alter the prototype and our changes will be\n// reflected everywhere.\nmyPrototype.meaningOfLife = 43;\nmyObj.meaningOfLife; // = 43\n\n// The for/in statement allows iteration over properties of an object,\n// walking up the prototype chain until it sees a null prototype.\nfor (var x in myObj){\n    console.log(myObj[x]);\n}\n///prints:\n// Hello world!\n// 43\n// [Function: myFunc]\n// true\n\n// To only consider properties attached to the object itself\n// and not its prototypes, use the `hasOwnProperty()` check.\nfor (var x in myObj){\n    if (myObj.hasOwnProperty(x)){\n        console.log(myObj[x]);\n    }\n}\n///prints:\n// Hello world!\n\n// We mentioned that `__proto__` was non-standard, and there's no standard way to\n// change the prototype of an existing object. However, there are two ways to\n// create a new object with a given prototype.\n\n// The first is Object.create, which is a recent addition to JS, and therefore\n// not available in all implementations yet.\nvar myObj = Object.create(myPrototype);\nmyObj.meaningOfLife; // = 43\n\n// The second way, which works anywhere, has to do with constructors.\n// Constructors have a property called prototype. This is *not* the prototype of\n// the constructor function itself; instead, it's the prototype that new objects\n// are given when they're created with that constructor and the new keyword.\nMyConstructor.prototype = {\n    myNumber: 5,\n    getMyNumber: function(){\n        return this.myNumber;\n    }\n};\nvar myNewObj2 = new MyConstructor();\nmyNewObj2.getMyNumber(); // = 5\nmyNewObj2.myNumber = 6;\nmyNewObj2.getMyNumber(); // = 6\n\n// Built-in types like strings and numbers also have constructors that create\n// equivalent wrapper objects.\nvar myNumber = 12;\nvar myNumberObj = new Number(12);\nmyNumber == myNumberObj; // = true\n\n// Except, they aren't exactly equivalent.\ntypeof myNumber; // = 'number'\ntypeof myNumberObj; // = 'object'\nmyNumber === myNumberObj; // = false\nif (0){\n    // This code won't execute, because 0 is falsy.\n}\nif (new Number(0)){\n   // This code will execute, because wrapped numbers are objects, and objects\n   // are always truthy.\n}\n\n// However, the wrapper objects and the regular builtins share a prototype, so\n// you can actually add functionality to a string, for instance.\nString.prototype.firstCharacter = function(){\n    return this.charAt(0);\n};\n\"abc\".firstCharacter(); // = \"a\"\n\n// This fact is often used in \"polyfilling\", which is implementing newer\n// features of JavaScript in an older subset of JavaScript, so that they can be\n// used in older environments such as outdated browsers.\n\n// For instance, we mentioned that Object.create isn't yet available in all\n// implementations, but we can still use it with this polyfill:\nif (Object.create === undefined){ // don't overwrite it if it exists\n    Object.create = function(proto){\n        // make a temporary constructor with the right prototype\n        var Constructor = function(){};\n        Constructor.prototype = proto;\n        // then use it to create a new, appropriately-prototyped object\n        return new Constructor();\n    };\n}\n\n\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS > OBJECT\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n * ******************************************************************************************* */\n\n// Global object: properties\nObject.length                                        // length is a property of a function object, and indicates how many arguments the function expects, i.e. the number of formal parameters. This number does not include the rest parameter. Has a value of 1.\nObject.prototype                                     // Represents the Object prototype object and allows to add new properties and methods to all objects of type Object.\n\n// Methods of the Object constructor\nObject.assign(target, ...sources)                    // Copies the values of all enumerable own properties from one or more source objects to a target object. method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object\nObject.create(MyObject)                              // Creates a new object with the specified prototype object and properties. The object which should be the prototype of the newly-created object.\nObject.defineProperty(obj, prop, descriptor)         // Adds the named property described by a given descriptor to an object.\nObject.defineProperties(obj, props)                  // Adds the named properties described by the given descriptors to an object.\nObject.entries(obj)                                  // Returns an array containing all of the [key, value] pairs of a given object's own enumerable string properties.\nObject.freeze(obj)                                   // Freezes an object: other code can't delete or change any properties.\nObject.getOwnPropertyDescriptor(obj, prop)           // Returns a property descriptor for a named property on an object.\nObject.getOwnPropertyDescriptors(obj)                // Returns an object containing all own property descriptors for an object.\nObject.getOwnPropertyNames(obj)                      // Returns an array containing the names of all of the given object's own enumerable and non-enumerable properties.\nObject.getOwnPropertySymbols(obj)                    // Returns an array of all symbol properties found directly upon a given object.\nObject.getPrototypeOf(obj)                           // Returns the prototype of the specified object.\nObject.is(value1, value2);                           // Compares if two values are the same value. Equates all NaN values (which differs from both Abstract Equality Comparison and Strict Equality Comparison).\nObject.isExtensible(obj)                             // Determines if extending of an object is allowed.\nObject.isFrozen(obj)                                 // Determines if an object was frozen.\nObject.isSealed(obj)                                 // Determines if an object is sealed.\nObject.keys(obj)                                     // Returns an array containing the names of all of the given object's own enumerable string properties.\nObject.preventExtensions(obj)                        // Prevents any extensions of an object.\nObject.seal(obj)                                     // Prevents other code from deleting properties of an object.\nObject.setPrototypeOf(obj, prototype)                // Sets the prototype (i.e., the internal [[Prototype]] property).\nObject.values(obj)                                   // Returns an array containing the values that correspond to all of a given object's own enumerable string properties.\n\n// Object instances and Object prototype object (Object.prototype.property or Object.prototype.method())\n// Properties\nobj.constructor                                      // Specifies the function that creates an object's prototype.\nobj.__proto__                                        // Points to the object which was used as prototype when the object was instantiated.\n\n// Methods\nobj.hasOwnProperty(prop)                             // Returns a boolean indicating whether an object contains the specified property as a direct property of that object and not inherited through the prototype chain.\nprototypeObj.isPrototypeOf(object)                   // Returns a boolean indicating whether the object this method is called upon is in the prototype chain of the specified object.\nobj.propertyIsEnumerable(prop)                       // Returns a boolean indicating if the internal ECMAScript [[Enumerable]] attribute is set.\nobj.toLocaleString()                                 // Calls toString().\nobj.toString()                                       // Returns a string representation of the object.\nobject.valueOf()                                     // Returns the primitive value of the specified object.\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS > ARRAY\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n * ******************************************************************************************* */\n\n// Global object: properties\nArray.length                                         // Reflects the number of elements in an array.\nArray.prototype                                      // Represents the prototype for the Array constructor and allows to add new properties and methods to all Array objects.\n\n// Global object: methods\nArray.from(arrayLike[, mapFn[, thisArg]])            // Creates a new Array instance from an array-like or iterable object.\nArray.isArray(obj)                                   // Returns true if a variable is an array, if not false.\nArray.of(element0[, element1[, ...[, elementN]]])    // Creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments.\n\n// Instance: properties\narr.length                                           // Reflects the number of elements in an array.\n\n// Instance: mutator methods\narr.copyWithin(target, start, end)                   // Copies a sequence of array elements within the array.\narr.fill(value, start, end)                          // Fills all the elements of an array from a start index to an end index with a static value.\narr.pop()                                            // Removes the last element from an array and returns that element.\narr.push([element1[, ...[, elementN]]])              // Adds one or more elements to the end of an array and returns the new length of the array.\narr.reverse()                                        // Reverses the order of the elements of an array in place — the first becomes the last, and the last becomes the first.\narr.shift()                                          // Removes the first element from an array and returns that element.\narr.sort()                                           // Sorts the elements of an array in place and returns the array.\narray.splice(start, deleteCount, item1, item2, ...)  // Adds and/or removes elements from an array.\narr.unshift([element1[, ...[, elementN]]])           // Adds one or more elements to the front of an array and returns the new length of the array.\n\n// Instance: accessor methods\narr.concat(value1[, value2[, ...[, valueN]]])        // Returns a new array comprised of this array joined with other array(s) and/or value(s).\narr.includes(searchElement, fromIndex)               // Determines whether an array contains a certain element, returning true or false as appropriate.\narr.indexOf(searchElement[, fromIndex])              // Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.\narr.join(separator)                                  // Joins all elements of an array into a string.\narr.lastIndexOf(searchElement, fromIndex)            // Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.\narr.slice(begin, end)                                // Extracts a section of an array and returns a new array.\narr.toString()                                       // Returns a string representing the array and its elements. Overrides the Object.prototype.toString() method.\narr.toLocaleString(locales, options)                 // Returns a localized string representing the array and its elements. Overrides the Object.prototype.toLocaleString() method.\n\n// Instance: iteration methods\narr.entries()                                        // Returns a new Array Iterator object that contains the key/value pairs for each index in the array.\narr.every(callback[, thisArg])                       // Returns true if every element in this array satisfies the provided testing function.\narr.filter(callback[, thisArg])                      // Creates a new array with all of the elements of this array for which the provided filtering function returns true.\narr.find(callback[, thisArg])                        // Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.\narr.findIndex(callback[, thisArg])                   // Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.\narr.forEach(callback[, thisArg])                     // Calls a function for each element in the array.\narr.keys()                                           // Returns a new Array Iterator that contains the keys for each index in the array.\narr.map(callback[, initialValue])                    // Creates a new array with the results of calling a provided function on every element in this array.\narr.reduce(callback[, initialValue])                 // Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.\narr.reduceRight(callback[, initialValue])            // Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.\narr.some(callback[, initialValue])                   // Returns true if at least one element in this array satisfies the provided testing function.\narr.values()                                         // Returns a new Array Iterator object that contains the values for each index in the array.\n</code></pre>\n<hr>\n<details>\n<summary>  See More </summary>   \n<h1>Fundamental Javascript Concepts You Should Understand</h1>\n<p>Plain Old JS Object Lesson Concepts</p>\n<hr>\n<h3>Fundamental Javascript Concepts You Should Understand</h3>\n<h3>Plain Old JS Object Lesson Concepts</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*bEuahctJRS_qCQgV.jpg\" class=\"graf-image\" /></figure>-   <span id=\"d911\">Label variables as either Primitive vs. Reference</span>\n-   <span id=\"42a0\">primitives: strings, booleans, numbers, null and undefined</span>\n-   <span id=\"4423\">primitives are immutable</span>\n-   <span id=\"fd1a\">refereces: objects (including arrays)</span>\n-   <span id=\"d581\">references are mutable</span>\n-   <span id=\"65e2\">Identify when to use `.` vs `[]` when accessing values of an object</span>\n-   <span id=\"eb9d\">dot syntax `object.key`</span>\n-   <span id=\"8e03\">easier to read</span>\n-   <span id=\"1662\">easier to write</span>\n-   <span id=\"5796\">cannot use variables as keys</span>\n-   <span id=\"588a\">keys cannot begin with a number</span>\n-   <span id=\"5501\">bracket notation `object[\"key]`</span>\n-   <span id=\"5734\">allows variables as keys</span>\n-   <span id=\"76ca\">strings that start with numbers can be use as keys</span>\n-   <span id=\"822a\">Write an object literal with a variable key using interpolation</span>\n<h4>put it in brackets to access the value of the variable, rather than just make the value that string</h4>\n<pre><code>let a = \"b\";\n    let obj = {\n        a: \"letter_a\",\n        [a]: \"letter b\"\n    }\n</code></pre>\n<ul>\n<li><span id=\"e4fc\">Use the <code>obj[key] !== undefined</code> pattern to check if a given variable that contains a key exists in an object</span></li>\n<li><span id=\"0baa\">can also use <code>(key in object)</code> syntax interchangeably (returns a boolean)</span></li>\n<li><span id=\"ad4c\">Utilize Object.keys and Object.values in a function</span></li>\n<li><span id=\"b548\"><code>Object.keys(obj)</code> returns an array of all the keys in <code>obj</code></span></li>\n<li><span id=\"f39b\"><code>Object.values(obj)</code> returns an array of the values in <code>obj</code></span></li>\n</ul>\n<h4>Iterate through an object using a <code>for in</code> loop</h4>\n<pre><code>let printValues = function(obj) {\n      for (let key in obj) {\n          let value = obj[key];\n          console.log(value);\n      }\n  }\n</code></pre>\n<h4>Define a function that utilizes <code>...rest</code> syntax to accept an arbitrary number of arguments</h4>\n<ul>\n<li><span id=\"58a5\"><code>...rest</code> syntax will store all additional arguments in an array</span></li>\n<li><span id=\"5f8b\">array will be empty if there are no additional arguments</span></li>\n</ul>\n<!-- -->\n<pre><code>let myFunction = function(str, ...strs) {\n        console.log(\"The first string is \" + str);\n        console.log(\"The rest of the strings are:\");\n        strs.forEach(function(str) {\n            console.log(str);\n        })\n    }\n</code></pre>\n<h4>Use <code>...spread</code> syntax for Object literals and Array literals</h4>\n<pre><code>let arr1 = [\"a\", \"b\", \"c\"];\n  let longer = [...arr1, \"d\", \"e\"]; // [\"a\", \"b\", \"c\", \"d\", \"e\"]\n  // without spread syntax, this would give you a nested array\n  let withoutRest = [arr1, \"d\", \"e\"] // [[\"a\", \"b\", \"c\"], \"d\", \"e\"]\n</code></pre>\n<ul>\n<li><span id=\"118b\">Destructure an array to reference specific elements</span></li>\n</ul>\n<!-- -->\n<pre><code>let array = [35, 9];\n\nlet [firstEl, secondEl] = array;\n\nconsole.log(firstEl); // => 35\n\nconsole.log(secondEl); // => 9\n\n// can also destructure using … syntax let array = [35, 9, 14]; let [head, …tail] = array; console.log(head); // => 35 console.log(tail); // => [9, 14]\n\n-Destructure an object to reference specific values\n    -\n    if you want to use variable names that don 't match the keys, you can use aliasing -\n    `let { oldkeyname: newkeyname } = object` -\n    rule of thumb— only destructure values from objects that are two levels deep ``\n`javascript\nlet obj = {\n   name: \"Wilfred\",\n   appearance: [\"short\", \"mustache\"],\n   favorites: {\n      color: \"mauve\",\n      food: \"spaghetti squash\",\n      number: 3\n   }\n}\n// with variable names that match keys\nlet { name, appearance } = obj;\nconsole.log(name); // \"Wilfred\"\nconsole.log(appearance); // [\"short\", \"mustache\"]\n\n// with new variable names (aliasing)\nlet {name: myName, appearance: myAppearance} = obj;\n\nconsole.log(myName); // \"Wilfred\"\nconsole.log(myAppearance); // [\"short\", \"mustache\"]\n\n// in a function call\nlet sayHello = function({name}) {\nconsole.log(\"Hello, \" + name); // \"Hello Wilfred\"\n}\n\n// nested objects + aliasing\nlet { favorites: {color, food: vegetable} } = obj;\nconsole.log(color, vegetable); //=> mauve spaghetti squash\n</code></pre>\n<h4>Write a function that accepts a array as an argument and returns an object representing the count of each character in the array</h4>\n<pre><code>//\n  let elementCounts = function(array) {\n      let obj = {};\n      array.forEach(function(el) {\n          if (el in obj) obj[el] += 1;\n          else obj[el] = 1;\n      })\n      return obj;\n  }\n  console.log(elementCounts([\"e\", \"f\", \"g\", \"f\"])); // => Object {e: 1, f: 2, g: 1}\n</code></pre>\n<h3>Callbacks Lesson Concepts</h3>\n<ul>\n<li><span id=\"a16e\">Given multiple plausible reasons, identify why functions are called “First Class Objects” in JavaScript.</span></li>\n<li><span id=\"0d89\">they can be stored in variables, passed as arguments to other functions, and serve as return value for a function</span></li>\n<li><span id=\"e458\">supports same basic operations as other types (strings, bools, numbers)</span></li>\n<li><span id=\"6af2\">higher-order functions take functions as arguments or return functions as values</span></li>\n<li><span id=\"adbe\">Given a code snippet containing an anonymous callback, a named callback, and multiple <code>console.log</code>s, predict what will be printed</span></li>\n<li><span id=\"e93b\">what is this referring to?</span></li>\n<li><span id=\"c73f\">Write a function that takes in a value and two callbacks. The function should return the result of the callback that is greater.</span></li>\n</ul>\n<!-- -->\n<pre><code>let greaterCB = function(val, callback1, callback2) {\n    if (callback1(val) > callback2(val)) {\n        return callback1(val);\n    }\n    return callback2(val);\n}\n\nlet greaterCB = function(val, callback1, callback2) {\n    if (callback1(val) > callback2(val)) {\n        return callback1(val);\n    }\n    return callback2(val);\n}\n</code></pre>\n<p>// shorter version let greaterCB = function(val, callback1, callback2) { return Math.max(callback1(val), callback2(val)); } // even shorter, cause why not let greaterCB = (val, cb1, cb2) => Math.max(cb1(val), cb2(val));</p>\n<pre><code>-Write a\nfunction, myMap, that takes in an array and a callback as arguments.The\nfunction should mimic the behavior of `Array#map`.\n``\n`javascript\nlet myMap = function(array, callback) {\n   let newArr = [];\n   for (let i = 0; i &#x3C; array.length; i ++) {\n      mapped = callback(array[i], i, array);\n      newArr.push(mapped);\n   }\n   return newArr;\n}\nconsole.log( myMap([16,25,36], Math.sqrt)); // => [4, 5, 6];\n\nlet myMapArrow = (array, callback) => {\n   let newArr = [];\n   array.forEach( (ele, ind, array) => {\n      newArr.push(callback(ele, ind, array));\n   })\n   return newArr;\n}\nconsole.log(myMapArrow([16,25,36], Math.sqrt)); // => [4, 5, 6];\n</code></pre>\n<h4>Write a function, myFilter, that takes in an array and a callback as arguments. The function should mimic the behavior of <code>Array#filter</code>.</h4>\n<pre><code>let myFilter = function(array, callback) {\n      let filtered = [];\n      for (let i = 0; i &#x3C; array.length; i++) {\n          if (callback(array[i])) {\n              filtered.push(array[i], i, array);\n          }\n      }\n  }\n</code></pre>\n<h4>Write a function, myEvery, that takes in an array and a callback as arguments. The function should mimic the behavior of <code>Array#every</code>.</h4>\n<pre><code>let myEvery = function(array, callback) {\n      for (let i = 0; i &#x3C; array.length; i++) {\n          if (!callback(array[i], i, array)) {\n              return false\n          }\n      }\n      return true;\n  }\n  // with arrow function syntax\n  let myEvery = (array, callback) => {\n      for (let i = 0; i &#x3C; array.length; i++) {\n          if (!callback(array[i])) {\n              return false\n          }\n      }\n      return true;\n  }\n</code></pre>\n<h3>Scope Lesson Concepts</h3>\n<ul>\n<li><span id=\"685f\">Identify the difference between <code>const</code>, <code>let</code>, and <code>var</code> declarations</span></li>\n<li><span id=\"7308\"><code>const</code> - cannot reassign variable, scoped to block</span></li>\n<li><span id=\"e07f\"><code>let</code> - can reassign variable, scoped to block</span></li>\n<li><span id=\"670d\"><code>var</code> - outdated, may or may not be reassigned, scoped to function. can be not just reassigned, but also redeclared!</span></li>\n<li><span id=\"b254\">a variable will always evaluate to the value it contains regardless of how it was declared</span></li>\n<li><span id=\"aace\">Explain the difference between <code>const</code>, <code>let</code>, and <code>var</code> declarations</span></li>\n<li><span id=\"5d79\"><code>var</code> is function scoped—so if you declare it anywhere in a function, the declaration (but not assignment) is \"hoisted\"</span></li>\n<li><span id=\"a54b\">so it will exist in memory as “undefined” which is bad and unpredictable</span></li>\n<li><span id=\"2dc2\"><code>var</code> will also allow you to redeclare a variable, while <code>let</code> or <code>const</code> will raise a syntax error. you shouldn't be able to do that!</span></li>\n<li><span id=\"1f74\"><code>const</code> won't let you reassign a variable, but if it points to a mutable object, you will still be able to change the value by mutating the object</span></li>\n<li><span id=\"2c20\">block-scoped variables allow new variables with the same name in new scopes</span></li>\n<li><span id=\"c3d4\">block-scoped still performs hoisting of all variables within the block, but it doesn’t initialize to the value of <code>undefined</code> like <code>var</code> does, so it throws a specific reference error if you try to access the value before it has been declared</span></li>\n<li><span id=\"f797\">if you do not use <code>var</code> or <code>let</code> or <code>const</code> when initializing, it will be declared as global—THIS IS BAD</span></li>\n<li><span id=\"2212\">if you assign a value without a declaration, it exists in the global scope (so then it would be accessible by all outer scopes, so bad). however, there’s no hoisting, so it doesn’t exist in the scope until after the line is run</span></li>\n<li><span id=\"86d1\">Predict the evaluation of code that utilizes function scope, block scope, lexical scope, and scope chaining</span></li>\n<li><span id=\"25dc\">scope of a program means the set of variables that are available for use within the program</span></li>\n<li><span id=\"bcaf\">global scope is represented by the <code>window</code> object in the browser and the <code>global</code> object in Node.js</span></li>\n<li><span id=\"7bc3\">global variables are available everywhere, and so increase the risk of name collisions</span></li>\n<li><span id=\"5172\">local scope is the set of variables available for use within the function</span></li>\n<li><span id=\"ed33\">when we enter a function, we enter a new scope</span></li>\n<li><span id=\"c21b\">includes functions arguments, local variables declared inside function, and any variables that were already declared when the function is defined (hmm about that last one)</span></li>\n<li><span id=\"51ad\">for blocks (denoted by curly braces <code>{}</code>, as in conditionals or <code>for</code> loops), variables can be block scoped</span></li>\n<li><span id=\"09f1\">inner scope does not have access to variables in the outer scope</span></li>\n<li><span id=\"587e\">scope chaining — if a given variable is not found in immediate scope, javascript will search all accessible outer scopes until variable is found</span></li>\n<li><span id=\"6ea5\">so an inner scope can access outer scope variables</span></li>\n<li><span id=\"5188\">but an outer scope can never access inner scope variables</span></li>\n</ul>\n<h4>Define an arrow function</h4>\n<pre><code>let arrowFunction = (param1, param2) => {\n\nlet sum = param1 + param2;\n\nreturn sum;\n\n}\n\n// with 1 param you can remove parens around parameters let arrowFunction = param =>\n\n// if your return statement is one line, you can use implied return let arrowFunction = param => param + 1;\n\n// you don’t have to assign to variable, can be anonymous // if you never need to use it again param => param + 1;\n</code></pre>\n<h4>Given an arrow function, deduce the value of <code>this</code> without executing the code</h4>\n<ul>\n<li><span id=\"0ee6\">arrow functions are automatically bound to the context they were declared in.</span></li>\n<li><span id=\"9fb2\">unlike regular function which use the context they are invoked in (unless they have been bound using <code>Function#bind</code>).</span></li>\n<li><span id=\"683a\">if you implement an arrow function as a method in an object the context it will be bound to is NOT the object itself, but the global context.</span></li>\n<li><span id=\"e9e1\">so you can’t use an arrow function to define a method directly</span></li>\n</ul>\n<!-- -->\n<pre><code>let obj = {\nname: “my object”,\nunboundFunc: function () {\n\nreturn this.name;\n\n// this function will be able to be called on different objects\n\n},\nboundToGlobal: () => { return this.name; // this function, no matter how you call it, will be called // on the global object, and it cannot be rebound // this is because it was defined using arrow syntax },\n\nmakeFuncBoundToObj: function() {\n        return () => {\n            return this.name;\n        }\n        // this function will return a function that will be bound\n        // to the object where we call the outer method\n        // because the arrow syntax is nested inside one of this\n        // function's methods, it cannot be rebound\n    },\n\n    makeUnboundFunc: function() {\n        return function() {\n            return this.name;\n        }\n        //this function will return a function that will still be unbound\n    },\n\n    immediatelyInvokedFunc: function() {\n        return this.name;\n    }(), // this property will be set to the return value of this anonymous function,\n    // which is invoked during the object definition;\n    // basically, it's a way to check the context inside of an object, at this moment\n\n    innerObj: {\n        name: \"inner object\",\n        innerArrowFunc: () => {\n            return this.name;\n        } // the context inside a nested object is not the parent, it's still\n        // the global object. entering an object definition doesn't change the context\n    },\n\n    let otherObj = {\n        name: \"my other object\"\n    }\n// call unboundFunc on obj, we get \"my object\" console.log(\"unboundFunc: \", obj.unboundFunc()); // => \"my object\" // assign unboundFunc to a variable and call it let newFunc = obj.unboundFunc; // this newFunc will default to being called on global object console.log(\"newFunc: \",newFunc()); // => undefined // but you could bind it directly to a different object if you wanted console.log(\"newFunc: \", newFunc.bind(otherObj)()); // \"my other object\"\n// meanwhile, obj.boundToGlobal will only ever be called on global object console.log(\"boundToGlobal: \", obj.boundToGlobal()); //=> undefined let newBoundFunc = obj.boundToGlobal; console.log(\"newBoundFunc: \", newBoundFunc()); // => undefined // even if you try to directly bind to another object, it won't work! console.log(\"newBoundFunc: \", newBoundFunc.bind(otherObj)()); // => undefined\n// let's make a new function that will always be bound to the context // where we call our function maker let boundFunc = obj.makeFuncBoundToObj();// note that we're invoking, not just assigning console.log(\"boundFunc: \", boundFunc()); // => \"my object\" // we can't rebind this function console.log(\"boundFunc: \", boundFunc.bind(otherObj)()) // =>\"my object\"\n// but if I call makeFuncBoundToObj on another context // the new bound function is stuck with that other context let boundToOther = obj.makeFuncBoundToObj.bind(otherObj)(); console.log(\"boundToOther: \", boundToOther()); // => \"my other object\" console.log(\"boundToOther: \", boundToOther.bind(obj)()) // \"my other object\"\n// the return value of my immediately invoked function // shows that the context inside of the object is the // global object, not the object itself // context only changes inside a function that is called // on an object console.log(\"immediatelyInvokedFunc: \", obj.immediatelyInvokedFunc); // => undefined\n// even though we're inside a nested object, the context is // still the same as it was outside the outer object // in this case, the global object console.log(\"innerArrowFunc: \", obj.innerObj.innerArrowFunc()); // => undefined\n\n}\n\n-Implement a closure and explain how the closure effects scope\n    -\n    a closure is \"the combination of a function and the lexical environment within which that function was declared\" -\n    alternatively, \"when an inner function uses or changes variables in an outer function\" -\n    closures have access to any variables within their own scope + scope of outer functions + global scope— the set of all these available variables is \"lexical environemnt\" -\n    closure keeps reference to all variables ** even\nif the outer\nfunction has returned **\n    -each\nfunction has a private mutable state that cannot be accessed externally\n    -\n    the inner\nfunction will maintain a reference to the scope in which it was declared.so it has access to variables that were initialized in any outer scope— even\nif that scope\n    -\n    if a variable exists in the scope of what could have been accessed by a\nfunction(e.g.global scope, outer\n    function, etc), does that variable wind up in the closure even\nif it never got accessed ?\n    -\n    if you change the value of a variable(e.g.i++) you will change the value of that variable in the scope that it was declared in\n\n    ``\n`javascript\nfunction createCounter() {\n   // this function starts a counter at 0, then returns a\n   // new function that can access and change that counter\n   //\n   // each new counter you create will have a single internal\n   // state, that can be changed only by calling the function.\n   // you can't access that state from outside of the function,\n   // even though the count variable in question is initialized\n   // by the outer function, and it remains accessible to the\n   // inner function after the outer function returns.\n   let count = 0;\n   return function() {\n      count ++;\n      return count;\n   }\n}\n\nlet counter = createCounter();\nconsole.log(counter()); //=> 1\nconsole.log(counter()); //=> 2\n// so the closure here comes into play because\n// an inner function is accessing and changing\n// a variable from an outer function\n\n// the closure is the combination of the counter\n// function and the all the variables that existed\n// in the scope that it was declared in. because\n// inner blocks/functions have access to outer\n// scopes, that includes the scope of the outer\n// function.\n\n// so counter variable is a closure, in that\n// it contains the inner count value that was\n// initialized by the outer createCounter() function\n// count has been captured or closed over\n\n// this state is private, so if i run createCounter again\n// i get a totally separate count that doesn't interact\n// with the previous one and each of the new functions\n// will have their own internal state based on the\n// initial declaration in the now-closed outer function\n\nlet counter2 = createCounter();\nconsole.log(counter2()); // => 1\n\n// if i set a new function equal to my existing counter\n// the internal state is shared with the new function\nlet counter3 = counter2;\nconsole.log(counter3());\n</code></pre>\n<h4>Define a method that references <code>this</code> on an object literal</h4>\n<ul>\n<li><span id=\"ae61\">when we use <code>this</code> in a method it refers to the object that the method is invoked on</span></li>\n<li><span id=\"29a2\">it will let you access other pieces of information from within that object, or even other methods</span></li>\n<li><span id=\"c41d\">method style invocation — <code>object.method(args)</code> (e.g. built in examples like <code>Array#push</code>, or <code>String#toUpperCase</code>)</span></li>\n<li><span id=\"c99d\">context is set every time we invoke a function</span></li>\n<li><span id=\"fa43\">function style invocation sets the context to the global object no matter what</span></li>\n<li><span id=\"8cc1\">being inside an object does not make the context that object! you still have to use method-style invocation</span></li>\n<li><span id=\"f578\">Utilize the built in <code>Function#bind</code> on a callback to maintain the context of this</span></li>\n<li><span id=\"26ba\">when we call bind on a function, we get an exotic function back — so the context will always be the same for that new function</span></li>\n</ul>\n<!-- -->\n<pre><code>let cat = {\n  purr: function () {\n  console.log(\"meow\");\n  },\n  purrMore: function () {\n  this.purr();\n  },\n  };\n  let sayMeow = cat.purrMore; console.log(sayMeow()); // TypeError: this.purr is not a function\n\n  // we can use the built in Function.bind to ensure our context, our this, // is the cat object let boundCat = sayMeow.bind(cat);\n  boundCat(); // prints \"meow\"\n\n-`bind`\n   can also work with arguments, so you can have a version of a\n   function with particular arguments and a particular context.the first arg will be the context aka the `this`\n   you want it to use.the next arguments will be the functions arguments that you are binding -\n       if you just want to bind it to those arguments in particular, you can use `null`\n   as the first argument, so the context won 't be bound, just the arguments -\n       Given a code snippet, identify what `this`\n   refers to\n       -\n       important to recognize the difference between scope and context -\n       scope works like a dictionary that has all the variables that are available within a given block, plus a pointer back the next outer scope(which itself has pointers to new scopes until you reach the global scope.so you can think about a whole given block 's scope as a kind of linked list of dictionaries) (also, this is not to say that scope is actually implemented in this way, that is just the schema that i can use to understand it) -\n           context refers to the value of the `this`\n           keyword -\n           the keyword `this`\n           exists in every\n           function and it evaluates to the object that is currently invoking that\n           function -so the context is fairly straightforward when we talk about methods being called on specific objects -\n           you could, however, call an object 's method on something other than that object, and then this would refer to the context where/how it was called, e.g.\n           ``\n           `javascript\nlet dog = {\n   name: \"Bowser\",\n   changeName: function () {\n      this.name = \"Layla\";\n  },\n};\n\n// note this is **not invoked** - we are assigning the function itself\nlet change = dog.changeName;\nconsole.log(change()); // undefined\n\n// our dog still has the same name\nconsole.log(dog); // { name: 'Bowser', changeName: [Function: changeName] }\n\n// instead of changing the dog we changed the global name!!!\nconsole.log(this); // Object [global] {etc, etc, etc,  name: 'Layla'}\n</code></pre>\n<h3>CALLING SOMETHING IN THE WRONG CONTEXT CAN MESS YOU UP!</h3>\n<ul>\n<li><span id=\"b960\">could throw an error if it expects this to have some other method or whatever that doesn’t exist</span></li>\n<li><span id=\"1880\">you could also overwrite values or assign values to exist in a space where they should not exist</span></li>\n<li><span id=\"c9f0\">if you call a function as a callback, it will set <code>this</code> to be the outer function itself, even if the function you were calling is a method that was called on a particular object</span></li>\n</ul>\n<!-- -->\n<pre><code>let cat = {\n  purr: function () {\n  console.log(\"meow\");\n  },\n  purrMore: function () {\n  this.purr();\n  },\n  };\n  global.setTimeout(cat.purrMore, 5000); // 5 seconds later: TypeError: this.purr is not a function\n</code></pre>\n<p>we can use strict mode with <code>\"use strict\";</code> this will prevent you from accessing the global object with <code>this</code> in functions, so if you try to call <code>this</code> in the global context and change a value, you will get a type error, and the things you try to access will be undefined</p>\n<pre><code>let sayMeow = cat.purrMore; console.log(sayMeow()); // TypeError: this.purr is not a function\n\n// we can use the built in Function.bind to ensure our context, our this , // is the cat object let boundCat = sayMeow.bind(cat);\n\nboundCat(); // prints “meow”\n\n-`bind`\n   can also work with arguments, so you can have a version of a\n   function with particular arguments and a particular context.the first arg will be the context aka the `this`\n   you want it to use.the next arguments will be the functions arguments that you are binding -\n       if you just want to bind it to those arguments in particular, you can use `null`\n   as the first argument, so the context won 't be bound, just the arguments -\n       Given a code snippet, identify what `this`\n   refers to\n       -\n       important to recognize the difference between scope and context -\n       scope works like a dictionary that has all the variables that are available within a given block, plus a pointer back the next outer scope(which itself has pointers to new scopes until you reach the global scope.so you can think about a whole given block 's scope as a kind of linked list of dictionaries) (also, this is not to say that scope is actually implemented in this way, that is just the schema that i can use to understand it) -\n           context refers to the value of the `this`\n           keyword -\n           the keyword `this`\n           exists in every\n           function and it evaluates to the object that is currently invoking that\n           function -so the context is fairly straightforward when we talk about methods being called on specific objects -\n           you could, however, call an object 's method on something other than that object, and then this would refer to the context where/how it was called, e.g.\n           ``\n           `javascript\nlet dog = {\n   name: \"Bowser\",\n   changeName: function () {\n      this.name = \"Layla\";\n  },\n};\n\n// note this is **not invoked** - we are assigning the function itself\nlet change = dog.changeName;\nconsole.log(change()); // undefined\n\n// our dog still has the same name\nconsole.log(dog); // { name: 'Bowser', changeName: [Function: changeName] }\n\n// instead of changing the dog we changed the global name!!!\nconsole.log(this); // Object [global] {etc, etc, etc,  name: 'Layla'}\n</code></pre>\n<ul>\n<li><span id=\"48ab\">CALLING SOMETHING IN THE WRONG CONTEXT CAN MESS YOU UP!</span></li>\n<li><span id=\"857d\">could throw an error if it expects this to have some other method or whatever that doesn’t exist</span></li>\n<li><span id=\"e09e\">you could also overwrite values or assign values to exist in a space where they should not exist</span></li>\n<li><span id=\"b6e0\">if you call a function as a callback, it will set <code>this</code> to be the outer function itself, even if the function you were calling is a method that was called on a particular object</span></li>\n</ul>\n<blockquote>\n<p>we can use strict mode with <code>\"use strict\";</code> this will prevent you from accessing the global object with <code>this</code> in functions, so if you try to call <code>this</code> in the global context and change a value, you will get a type error, and the things you try to access will be undefined</p>\n</blockquote>\n<h3>POJOs</h3>\n<h4>1. Label variables as either Primitive vs. Reference</h4>\n<p>Javascript considers most data types to be ‘primitive’, these data types are immutable, and are passed by value. The more complex data types: Array and Object are mutable, are considered ‘reference’ data types, and are passed by reference.</p>\n<ul>\n<li><span id=\"6f83\">Boolean — Primitive</span></li>\n<li><span id=\"6556\">Null — Primitive</span></li>\n<li><span id=\"0048\">Undefined — Primitive</span></li>\n<li><span id=\"8dec\">Number — Primitive</span></li>\n<li><span id=\"684c\">String — Primitive</span></li>\n<li><span id=\"41c1\">Array — Reference</span></li>\n<li><span id=\"9371\">Object — Reference</span></li>\n<li><span id=\"64c8\">Function — Reference</span></li>\n</ul>\n<h4>2. Identify when to use . vs [] when accessing values of an object</h4>\n<pre><code>let obj = {\n    \"one\": 1,\n    \"two\": 2\n};\n\n// Choose the square brackets property accessor when the property name is determined at\n// runtime, or if the property name is not a valid identifier\nlet myKey = \"one\";\nconsole.log(obj[myKey]);\n\n// Choose the dot property accessor when the property name is known ahead of time.\nconsole.log(obj.two);\n</code></pre>\n<h4>3. Write an object literal with a variable key using interpolation</h4>\n<pre><code>let keyName = \"two\";\n\n// If the key is not known, you can use an alternative `[]` syntax for\n// object initialization only\nlet obj2 = {\n    [keyName]: 2\n}\nconsole.log(obj2);\n</code></pre>\n<h4>4. Use the obj[key] !== undefined pattern to check if a given variable that contains a key exists in an object</h4>\n<pre><code>function doesKeyExist(obj, key) {\n    // obj[key] !== undefined\n    // or:\n    return key in obj;\n}\n\nlet course = {\n    bootcamp: 'Lambda',\n    course: 'Bootcamp Prep'\n}\nconsole.log(doesKeyExist(course, 'course')); // => true\nconsole.log(doesKeyExist(course, 'name')); // => false\n</code></pre>\n<h4>5. Utilize Object.keys and Object.values in a function</h4>\n<pre><code>function printKeys(object) {\n    return Object.keys(object);\n}\n\nfunction printValues(object) {\n    return Object.values(object);\n}\n\nconsole.log(printKeys({\n    dog: \"Strelka\",\n    dog2: \"Belka\"\n}));\nconsole.log(printValues({\n    dog: \"Strelka\",\n    dog2: \"Belka\"\n}));\n</code></pre>\n<h4>6. Iterate through an object using a for in loop</h4>\n<pre><code>let player = {\n    name: \"Sergey\",\n    skill: \"hockey\"\n};\n\nfor (let key in player) {\n    console.log(key, player[key]);\n}\n\nconsole.log(Object.entries(player));\n</code></pre>\n<h4>7. Define a function that utilizes …rest syntax to accept an arbitrary number of arguments</h4>\n<pre><code>function restSum(...otherNums) {\n    let sum = 0;\n    console.log(otherNums);\n    otherNums.forEach(function(num) {\n        sum += num;\n    });\n\n    return sum;\n}\n\nconsole.log(restSum(3, 5, 6)); // => 14\nconsole.log(restSum(1, 2, 3, 4, 5, 6, 7, 8, 9)); // => 45\nconsole.log(restSum(0)); // => 0\n</code></pre>\n<h4>8. Use …spread syntax for Object literals and Array literals</h4>\n<pre><code>let numArray = [1, 2, 3];\nlet moreNums = [...numArray, 4, 5, 6]\n\nconsole.log(moreNums);\n\nlet shoe = {\n    color: \"red\",\n    size: 10\n};\nlet newShoe = {\n    ...shoe,\n    brand: \"Nike\",\n    size: 12\n};\nconsole.log(newShoe);\nnewShoe.color = \"black\";\nconsole.log(newShoe);\n\nconsole.log(shoe);\n</code></pre>\n<h4>9. Destructure an array to reference specific elements</h4>\n<pre><code>let arr = ['one', 'two', 'three'];\n\nlet [first] = arr;\nconsole.log(first);\n</code></pre>\n<h4>10. Destructure an object to reference specific values</h4>\n<pre><code>let me = {\n    name: \"Ian\",\n    instruments: ['bass', 'synth', 'guitar'],\n    siblings: {\n        brothers: ['Alistair'],\n        sisters: ['Meghan']\n    }\n}\n\nlet {\n    name,\n    instruments: musical_instruments,\n    siblings: {\n        sisters\n    }\n} = me;\n\nconsole.log(name);\nconsole.log(musical_instruments);\nconsole.log(sisters);\n</code></pre>\n<h4>11. Write a function that accepts a string as an argument and returns an object representing the count of each character in the array</h4>\n<pre><code>function charCount(inputString) {\n\n    let res = inputString.split(\"\").reduce(function(accum, el) {\n        if (el in accum) {\n            accum[el] = accum[el] + 1;\n        } else {\n            accum[el] = 1;\n        }\n        return accum;\n    }, {})\n    return res;\n\n}\n\nconsole.log(charCount('aaabbbeebbcdkjfalksdfjlkasdfasdfiiidkkdingds'));\n</code></pre>\n<h3>Review of Concepts</h3>\n<h4>1. Identify the difference between const, let, and var declarations</h4>\n<h4>2. Explain the difference between const, let, and var declarations</h4>\n<pre><code>var a = \"a\";\n</code></pre>\n<ul>\n<li><span id=\"2dba\"><code>var</code> is the historical keyword used for variable declaration.</span></li>\n<li><span id=\"50d3\"><code>var</code> declares variables in function scope, or global scope if not inside a function.</span></li>\n<li><span id=\"4bc8\">We consider <code>var</code> to be deprecated and it is never used in this course.</span></li>\n</ul>\n<!-- -->\n<pre><code>let b = \"b\";\n</code></pre>\n<ul>\n<li><span id=\"8bab\"><code>let</code> is the keyword we use most often for variable declaration.</span></li>\n<li><span id=\"0642\"><code>let</code> declares variables in block scope.</span></li>\n<li><span id=\"bf7b\">variables declared with <code>let</code> are re-assignable.</span></li>\n</ul>\n<!-- -->\n<pre><code>const c = \"c\";\n</code></pre>\n<ul>\n<li><span id=\"e199\"><code>const</code> is a specialized form of <code>let</code> that can only be used to <strong>initialize</strong> a variable.</span></li>\n<li><span id=\"4522\">Except when it is declared, you cannot assign to a <code>const</code> variable.</span></li>\n<li><span id=\"4e5a\"><code>const</code> scopes variables the same way that <code>let</code> does.</span></li>\n</ul>\n<h4>3. Predict the evaluation of code that utilizes function scope, block scope, lexical scope, and scope chaining</h4>\n<p>Consider this <code>run</code> function, inside which <code>foo</code> and <code>bar</code> have <code>function scope</code> . <code>i</code> and <code>baz</code> are scoped to the block expression.</p>\n<pre><code>// function and block scope in this example\nfunction run() {\n    var foo = \"Foo\";\n    let bar = \"Bar\";\n\n    console.log(foo, bar);\n\n    {\n        console.log(foo);\n        let baz = \"Bazz\";\n        console.log(baz);\n    }\n\n    console.log(baz); // ReferenceError\n}\n\nrun();\n</code></pre>\n<p>Notice that referencing <code>baz</code> from outside it's block results in JavaScript throwing a ReferenceError.</p>\n<p>Consider this <code>run</code> function, inside of which <code>foo</code> has <code>function scope</code> .</p>\n<pre><code>function run() {\n    console.log(foo); // undefined\n    var foo = \"Foo\";\n    console.log(foo); // Foo\n}\n\nrun();\n</code></pre>\n<p>Consider this <code>func1</code> function and it's nested scopes.</p>\n<pre><code>// global scope\nfunction func1(arg1) {\n    // func1 scope\n\n    return function func2(arg2) {\n        // func2 scope\n\n        return function func3(arg3) {\n            // func3 scope\n\n            console.log(arg1, arg2, arg3);\n        }\n    }\n}\n</code></pre>\n<h4>6. Implement a closure and explain how the closure effects scope</h4>\n<pre><code>const adder = (arg1) => {\n    return (arg2) => {\n        return arg1 + arg2;\n    }\n};\n\nconst func2 = adder(2);\nconst result = func2(2);\nconsole.log(result); // => 4;\n</code></pre>\n<h4>4. Define an arrow function</h4>\n<pre><code>const returnValue = (val) => val;\n</code></pre>\n<p>This simple construct will create a function that accepts <code>val</code> as a parameter, and returns <code>val</code> immediately. We do not need to type <code>return val</code> , because this is a single-line function.</p>\n<p>Identically, we could write</p>\n<pre><code>const returnValue = (val) => {\n    return val;\n};\n</code></pre>\n<h4>5. Given an arrow function, deduce the value of <code>this</code> without executing the code</h4>\n<pre><code>function fDAdder(arr) {\n    console.log(this);\n\n    return arr.reduce((acc, ele) => {\n        return acc + ele;\n    });\n};\n\nfDAdder([1, 2, 4, 6]);\n</code></pre>\n<p>If we use a function declaration style function, the <code>this</code> variable is set to the <code>global</code> object (i.e. <code>Object [global]</code> in Node. JS and <code>Window</code> in your browser).</p>\n<pre><code>const adder = (arr) => {\n    console.log(this);\n    arr.reduce((acc, ele) => sum += ele);\n};\nadder([1, 2, 4, 6]);\n</code></pre>\n<p>In this example, we use a fat arrow style function. Note that when we declare a functions like this <code>this</code> becomes</p>\n<h4>7. Define a method that references this on an object literal</h4>\n<pre><code>const pokemon = {\n    firstname: 'Pika',\n    lastname: 'Chu',\n    getPokeName: function() {\n        const fullname = `${this.firstname} ${this.lastname}`;\n        return fullname;\n    }\n};\n\nconsole.log(pokemon.getPokeName());\n</code></pre>\n<h4>8. Utilize the built in Function#bind on a callback to maintain the context of <code>this</code></h4>\n<pre><code>const pokemon = {\n    firstname: 'Pika',\n    lastname: 'Chu',\n    getPokeName: function() {\n        const fullname = `${this.firstname} ${this.lastname}`;\n        return fullname;\n    }\n};\n\nconst logPokemon = pokemon.getPokename.bind(pokemon);\n\nlogPokemon('sushi', 'algorithms'); // Pika Chu loves sushi and algorithms\n</code></pre>\n<h4>9. Given a code snippet, identify what <code>this</code> refers to</h4>\n<pre><code>function Person(name) {\n    // this.name = name; \n    // let that = this;\n\n    setTimeout(function() {\n        // console.log(this); // => Window\n        // console.log(that); // => [Function] => Person\n        // this.sayName(); // => no method error\n        that.sayName();\n    }, 1000);\n}\n\nPerson.prototype.sayName = function() {\n    console.log(this.name);\n};\n\nconst jane = new Person(\"Jane\");\n</code></pre>\n<hr>\n<h1>The Complete JavaScript Reference Guide</h1>\n<hr>\n<h3>The Complete JavaScript Reference Guide</h3>\n<figure><img src=\"https://cdn-images-1.medium.com/max/800/0*In5wB-29T0Ud_zs3.jpg\" class=\"graf-image\" /></figure>### How to learn effectively\n<p><strong>Learning</strong>: The acquisition of skills and the ability to apply them in the future.</p>\n<p><strong>What makes an Effective learner?</strong></p>\n<ul>\n<li><span id=\"7504\">They are active listeners.</span></li>\n<li><span id=\"179b\">They are engaged with the material.</span></li>\n<li><span id=\"3193\">They are receptive of feedback.</span></li>\n<li><span id=\"17d8\">They are open to difficulty.</span></li>\n</ul>\n<p><strong>Why do active learning techniques feel difficult?</strong></p>\n<ul>\n<li><span id=\"7848\">It feels difficult because you are constantly receiving feedback, and so you are constantly adapting and perfecting the material.</span></li>\n</ul>\n<p><strong>Desirable Difficulty</strong></p>\n<ul>\n<li><span id=\"67c9\">The skills we wish to obtain is often a difficult one.</span></li>\n<li><span id=\"c939\">We want challenging but possible lessons based on current level of skill.</span></li>\n</ul>\n<p><strong>Effective learners space their practice</strong></p>\n<ul>\n<li><span id=\"59a4\">Consistent effort > cramming => for <strong>durable knowledge</strong></span></li>\n</ul>\n<hr>\n<h3>Getting visual feedback in your programs</h3>\n<p>The first command we'll learn in JavaScript is <code>console.log</code>. This command is used to <em>print</em> something onto the screen. As we write our first lines of code, we'll be using <code>console.log</code> frequently as a way to visually see the output of our programs. Let's write our first program:</p>\n<pre><code>console.log(\"hello world\");\nconsole.log(\"how are you?\");\n</code></pre>\n<p>Executing the program above would print out the following:</p>\n<pre><code>hello world\nhow are you?\n</code></pre>\n<p>Nothing too ground breaking here, but pay close attention to the exact way we wrote the program. In particular, notice how we lay out the periods, parentheses, and quotation marks. We'll also terminate lines with semicolons (;).</p>\n<blockquote>\n<p><em>Depending on how you structure your code, sometimes you'll be able to omit semicolons at the end of lines. For now, you'll want to include them just as we do.</em></p>\n</blockquote>\n<h3>Syntax</h3>\n<p>We refer to the exact arrangement of the symbols, characters, and keywords as <strong>syntax</strong>. These details matter — your computer will only be able to “understand” proper JavaScript syntax. A programming language is similar to a spoken language. A spoken language like English has grammar rules that we should follow in order to be understood by fellow speakers. In the same way, a programming language like JavaScript has syntax rules that we ought to follow!</p>\n<p>As you write your first lines of code in this new language, you may make many syntax errors. Don't get frustrated! This is normal — all new programmers go through this phase. Every time we recognize an error in our code, we have an opportunity to reinforce your understanding of correct syntax. Adopt a growth mindset and learn from your mistakes.</p>\n<p>Additionally, one of the best things about programming is that we can get such immediate feedback from our creations. There is no penalty for making a mistake when programming. Write some code, run the code, read the errors, fix the errors, rinse and repeat!</p>\n<h3>Code comments</h3>\n<p>Occasionally we'll want to leave <strong>comments</strong> or notes in our code. Commented lines will be ignored by our computer. This means that we can use comments to write plain english or temporarily avoid execution of some JavaScript lines. The proper <em>syntax</em> for writing a comment is to begin the line with double forward slashes (<code>//</code>):</p>\n<pre><code>// let's write another program!!!\nconsole.log(\"hello world\");\n\n// console.log(\"how are you?\");\n\nconsole.log(\"goodbye moon\");\n</code></pre>\n<p>The program above would only print:</p>\n<pre><code>hello world\ngoodbye moon\n</code></pre>\n<p>Comments are useful when annotating pieces of code to offer an explanation of how the code works. We'll want to strive to write straightforward code that is self-explanatory when possible, but we can also use comments to add additional clarity. The real art of programming is to write code so elegantly that it is easy to follow.</p>\n<p><strong>The Number Data Type</strong></p>\n<p>The <strong>number</strong> data type in JS is used to represent any numerical values, including integers and decimal numbers.</p>\n<p><strong>Basic Arithmetic Operators</strong></p>\n<p>Operators are the symbols that perform particular operations.</p>\n<ul>\n<li><span id=\"f533\"><strong>+</strong> (addition)</span></li>\n<li><span id=\"5b9f\"><strong>-</strong> (subtraction)</span></li>\n<li><span id=\"b98b\"><strong>asterisk</strong> (multiplication)</span></li>\n<li><span id=\"9a15\"><strong>/</strong> (division)</span></li>\n<li><span id=\"c752\"><strong>%</strong> (modulo)</span></li>\n</ul>\n<p>JS evaluates more complex expressions using the general math order of operations aka PEMDAS.</p>\n<ul>\n<li><span id=\"b6e3\"><strong>PEMDAS</strong> : Parentheses, Exponents, Multiplication, Division, Modulo, Addition, Subtraction.</span></li>\n<li><span id=\"9c25\"><em>To force a specific order of operation, use the group operator ( ) around a part of the expression.</em></span></li>\n</ul>\n<p><strong>Modulo</strong> : Very useful operation to check divisibility of numbers, check for even &#x26; odd, whether a number is prime, and much more! <em>(Discrete Math concept, circular problems can be solved with modulo)</em></p>\n<ul>\n<li><span id=\"cf5b\">Whenever you have a smaller number % a larger number, the answer will just be the initial small number.<br>\nconsole.log(7 % 10) // => 7;</span></li>\n</ul>\n<p><strong>The String Data Type</strong></p>\n<p>The <strong>string</strong> data type is a primitive data type that used to represent textual data.</p>\n<ul>\n<li><span id=\"e1b0\">can be wrapped by either <strong>single</strong> or <strong>double</strong> quotation marks, <em>best to choose one and stick with it for consistency</em>.</span></li>\n<li><span id=\"f8ad\">If your string contains quotation marks inside, can layer single or double quotation marks to allow it to work.<br>\n“That's a great string”; (valid)\n'Shakespeare wrote, “To be or not to be”'; (valid)\n'That's a bad string'; (invalid)</span></li>\n<li><span id=\"b2cb\">Alt. way to add other quotes within strings is to use template literals.<br>\n`This is a temp'l'ate literal ${function}` // use ${} to invoke functions within.</span></li>\n<li><span id=\"7b1a\"><strong>.length</strong> : property that can be appended to data to return the length.</span></li>\n<li><span id=\"f633\">empty strings have a length of zero.</span></li>\n<li><span id=\"0a07\"><strong>indices</strong> : indexes of data that begin at 0, can call upon index by using the bracket notation [ ].<br>\nconsole.log(“bootcamp”[0]); // => “b”<br>\nconsole.log(“bootcamp”[10]); // => “undefined”<br>\nconsole.log(“boots”[1 * 2]); // => “o”<br>\nconsole.log(“boots”[“boot”.length-1]); // => “t”</span></li>\n<li><span id=\"6482\">we can pass expressions through the brackets as well since JS always evaluates expressions first.</span></li>\n<li><span id=\"e2f5\">The index of the last character of a string is always one less than it's length.</span></li>\n<li><span id=\"2271\"><strong>indexOf()</strong> : method used to find the first index of a given character within a string.<br>\nconsole.log(“bagel”.indexOf(“b”)); // => 0<br>\nconsole.log(“bagel”.indexOf(“z”)); // => -1</span></li>\n<li><span id=\"8d68\">if the character inside the indexOf() search does not exist in the string, the output will be -1.</span></li>\n<li><span id=\"d15e\">the indexOf() search will return the first instanced index of the the char in the string.</span></li>\n<li><span id=\"a275\"><strong>concatenate</strong> : word to describe joining strings together into a single string.</span></li>\n</ul>\n<p><strong>The Boolean Data Type</strong></p>\n<p>The <strong>Boolean</strong> data type is the simplest data type since there are only two values: <strong>true</strong> and <strong>false</strong>.</p>\n<ul>\n<li><span id=\"60da\"><strong>Logical Operators</strong> (B<em>oolean Operators</em>) are used to establish logic in our code.</span></li>\n<li><span id=\"139b\"><strong>!</strong> (not) : reverses a Boolean value.<br>\nconsole.log(!true); // => false<br>\nconsole.log(!!false); // => false</span></li>\n<li><span id=\"e412\"><strong>Logical Order of Operations</strong> : JS will evaluate !, then &#x26;&#x26;, then ||.</span></li>\n<li><span id=\"99ad\"><strong>Short-Circuit Evaluation</strong> : Because JS evalutes from left to right, expressions can “short-circuit”. For example if we have true on the left of an || logical comparison, it will stop evaluating and yield true instead of wasting resources on processing the rest of the statement.<br>\nconsole.log(true || !false) // => stops after it sees “true ||”</span></li>\n</ul>\n<p><strong>Comparison Operators</strong></p>\n<p>All comparison operators will result in a boolean output.</p>\n<p><strong>The relative comparators</strong></p>\n<ul>\n<li><span id=\"6fee\"><strong>></strong> (greater than)</span></li>\n<li><span id=\"0437\"><strong>&#x3C;</strong> (less than)</span></li>\n<li><span id=\"17ff\"><strong>>=</strong> (greater than or equal to)</span></li>\n<li><span id=\"b2b4\"><strong>&#x3C;=</strong> (less than or equal to)</span></li>\n<li><span id=\"0c13\"><strong>===</strong> (equal to)</span></li>\n<li><span id=\"b73a\"><strong>!==</strong> (not equal to)</span></li>\n</ul>\n<p>Fun Fact: “a” &#x3C; “b” is considered valid JS Code because string comparisons are compared lexicographically (meaning dictionary order), so “a” is less than “b” because it appears earlier!</p>\n<p>If there is ever a standstill comparison of two string lexicographically (i.e. app vs apple) the comparison will deem the shorter string lesser.</p>\n<p><strong>Difference between == and ===</strong></p>\n<h4>===</h4>\n<p>Strict Equality, will only return true if the two comparisons are entirely the same.</p>\n<h4>==</h4>\n<p>Loose Equality, will return true even if the values are of a different type, due to coercion. (Avoid using this)</p>\n<p><strong>Variables</strong></p>\n<p>Variables are used to store information to be referenced and manipulated in a program.</p>\n<ul>\n<li><span id=\"c73d\">We initialize a variable by using the <strong>let</strong> keyword and a <strong>=</strong> single equals sign (assignment operator).<br>\nlet bootcamp = “App Academy”;<br>\nconsole.log(bootcamp); // “App Academy”</span></li>\n<li><span id=\"7849\">JS variable names can contain any alphanumeric characters, underscores, or dollar signs (cannot being with a number).</span></li>\n<li><span id=\"ad76\">If you do not declare a value for a variable, undefined is automatically set.<br>\nlet bootcamp;<br>\nconsole.log(bootcamp); // undefined</span></li>\n<li><span id=\"2188\">We can change the value of a previously declared variable (let, not const) by re-assigning it another value.</span></li>\n<li><span id=\"47ca\"><strong>let</strong> is the updated version of <strong>var</strong>; there are some differences in terms of hoisting and global/block scope</span></li>\n</ul>\n<p><strong>Assignment Shorthand</strong></p>\n<p>let num = 0;<br>\nnum += 10; // same as num = num + 10<br>\nnum -= 2; // same as num = num — 2<br>\nnum /= 4; // same as num = num / 4<br>\nnum *= 7; // same as num = num * 7</p>\n<ul>\n<li><span id=\"9c05\">In general, any nonsensical arithmetic will result in <strong>NaN</strong> ; usually operations that include undefined.</span></li>\n</ul>\n<p><strong>Functions</strong></p>\n<p>A function is a procedure of code that will run when called. Functions are used so that we do not have to rewrite code to do the same thing over and over. (Think of them as 'subprograms')</p>\n<ul>\n<li><span id=\"366f\"><strong>Function Declaration</strong> : Process when we first initially write our function.</span></li>\n<li><span id=\"676f\">Includes three things:</span></li>\n<li><span id=\"80c2\">Name of the function.</span></li>\n<li><span id=\"f3a4\">A list of <em>parameters</em> ()</span></li>\n<li><span id=\"2b0e\">The code to execute {}</span></li>\n<li><span id=\"6879\"><strong>Function Calls</strong> : We can call upon our function whenever and wherever* we want. (*wherever is only after the initial declaration)</span></li>\n<li><span id=\"8374\">JS evaluates code top down, left to right.</span></li>\n<li><span id=\"2687\">When we execute a declared function later on in our program we refer to this as <strong>invoking</strong> our function.</span></li>\n<li><span id=\"0c3a\">Every function in JS returns undefined unless otherwise specified.</span></li>\n<li><span id=\"4207\">When we hit a <strong>return</strong> statement in a function we immediately exit the function and return to where we called the function.</span></li>\n<li><span id=\"e39f\">When naming functions in JS always use camelCase and name it something appropriate.</span></li>\n</ul>\n<p>Greate code reads like English and almost explains itself. Think: Elegant, readable, and maintainable!</p>\n<p><strong>Parameters and Arguments</strong></p>\n<ul>\n<li><span id=\"e94e\"><strong>Parameters</strong> : Comma seperated variables specified as part of a function's declaration.</span></li>\n<li><span id=\"6740\"><strong>Arguments</strong> : Values passed to the function when it is invoked.</span></li>\n<li><span id=\"004c\"><em>If the number of arguments passed during a function invocation is different than the number of paramters listed, it will still work.</em></span></li>\n<li><span id=\"7da5\">However, is there are not enough arguments provided for parameters our function will likely yield <strong>Nan</strong>.</span></li>\n</ul>\n<h3>Including Comments</h3>\n<p>Comments are important because they help other people understand what is going on in your code or remind you if you forgot something yourself. Keep in mind that they have to be marked properly so the browser won't try to execute them.</p>\n<p>In JavaScript you have two different options:</p>\n<ul>\n<li><span id=\"356d\">Single-line comments — To include a comment that is limited to a single line, precede it with <code>//</code></span></li>\n<li><span id=\"ee3a\">Multi-line comments — In case you want to write longer comments between several lines, wrap it in <code>/*</code> and <code>*/</code> to avoid it from being executed</span></li>\n</ul>\n<h3>Variables in JavaScript</h3>\n<p>Variables are stand-in values that you can use to perform operations. You should be familiar with them from math class.</p>\n<h3>var, const, let</h3>\n<p>You have three different possibilities for declaring a variable in JavaScript, each with their own specialties:</p>\n<ul>\n<li><span id=\"4b29\"><code>var</code> — The most common variable. It can be reassigned but only accessed within a function. Variables defined with <code>var</code> move to the top when the code is executed.</span></li>\n<li><span id=\"d234\"><code>const</code> — Can not be reassigned and not accessible before they appear within the code.</span></li>\n<li><span id=\"0e3b\"><code>let</code> — Similar to <code>const</code>, the <code>let</code> variable can be reassigned but not re-declared.</span></li>\n</ul>\n<h3>Data Types</h3>\n<p>Variables can contain different types of values and data types. You use <code>=</code> to assign them:</p>\n<ul>\n<li><span id=\"b276\">Numbers — <code>var age = 23</code></span></li>\n<li><span id=\"5571\">Variables — <code>var x</code></span></li>\n<li><span id=\"e26c\">Text (strings) — <code>var a = \"init\"</code></span></li>\n<li><span id=\"1312\">Operations — <code>var b = 1 + 2 + 3</code></span></li>\n<li><span id=\"9880\">True or false statements — <code>var c = true</code></span></li>\n<li><span id=\"335a\">Constant numbers — <code>const PI = 3.14</code></span></li>\n<li><span id=\"7221\">Objects — <code>var name = {firstName:\"John\", lastName:\"Doe\"}</code></span></li>\n</ul>\n<p>There are more possibilities. Note that variables are case sensitive. That means <code>lastname</code> and <code>lastName</code> will be handled as two different variables.</p>\n<h3>Objects</h3>\n<p>Objects are certain kinds of variables. They are variables that can have their own values and methods. The latter are actions that you can perform on objects.</p>\n<p>var person = {</p>\n<p>firstName:”John”,</p>\n<p>lastName:”Doe”,</p>\n<p>age:20,</p>\n<p>nationality:”German”</p>\n<p>};</p>\n<h3>The Next Level: Arrays</h3>\n<p>Next up in our JavaScript cheat sheet are arrays. Arrays are part of many different programming languages. They are a way of organizing variables and properties into groups. Here's how to create one in JavaScript:</p>\n<p>var fruit = [“Banana”, “Apple”, “Pear”];</p>\n<p>Now you have an array called <code>fruit</code> which contains three items that you can use for future operations.</p>\n<h3>Array Methods</h3>\n<p>Once you have created arrays, there are a few things you can do with them:</p>\n<ul>\n<li><span id=\"4e4b\"><code>concat()</code> — Join several arrays into one</span></li>\n<li><span id=\"5c02\"><code>indexOf()</code> — Returns the first position at which a given element appears in an array</span></li>\n<li><span id=\"45cd\"><code>join()</code> — Combine elements of an array into a single string and return the string</span></li>\n<li><span id=\"3a4e\"><code>lastIndexOf()</code> — Gives the last position at which a given element appears in an array</span></li>\n<li><span id=\"8fbb\"><code>pop()</code> — Removes the last element of an array</span></li>\n<li><span id=\"28e4\"><code>push()</code> — Add a new element at the end</span></li>\n<li><span id=\"0be2\"><code>reverse()</code> — Sort elements in a descending order</span></li>\n<li><span id=\"775e\"><code>shift()</code> — Remove the first element of an array</span></li>\n<li><span id=\"1063\"><code>slice()</code> — Pulls a copy of a portion of an array into a new array</span></li>\n<li><span id=\"53fd\"><code>sort()</code> — Sorts elements alphabetically</span></li>\n<li><span id=\"f551\"><code>splice()</code> — Adds elements in a specified way and position</span></li>\n<li><span id=\"c46b\"><code>toString()</code> — Converts elements to strings</span></li>\n<li><span id=\"ef66\"><code>unshift()</code> —Adds a new element to the beginning</span></li>\n<li><span id=\"4598\"><code>valueOf()</code> — Returns the primitive value of the specified object</span></li>\n</ul>\n<h3>Operators</h3>\n<p>If you have variables, you can use them to perform different kinds of operations. To do so, you need operators.</p>\n<h3>Basic Operators</h3>\n<ul>\n<li><span id=\"5d34\"><code>+</code> — Addition</span></li>\n<li><span id=\"5fd9\"><code>-</code> — Subtraction</span></li>\n<li><span id=\"3b13\"><code>*</code> — Multiplication</span></li>\n<li><span id=\"521a\"><code>/</code> — Division</span></li>\n<li><span id=\"cf0f\"><code>(...)</code> — Grouping operator, operations within brackets are executed earlier than those outside</span></li>\n<li><span id=\"bb2a\"><code>%</code> — Modulus (remainder )</span></li>\n<li><span id=\"e837\"><code>++</code> — Increment numbers</span></li>\n<li><span id=\"71ea\"><code>--</code> — Decrement numbers</span></li>\n</ul>\n<h3>Comparison Operators</h3>\n<ul>\n<li><span id=\"a2b0\"><code>==</code> — Equal to</span></li>\n<li><span id=\"5105\"><code>===</code> — Equal value and equal type</span></li>\n<li><span id=\"c79c\"><code>!=</code> — Not equal</span></li>\n<li><span id=\"1f7f\"><code>!==</code> — Not equal value or not equal type</span></li>\n<li><span id=\"78c3\"><code>></code> — Greater than</span></li>\n<li><span id=\"d40b\"><code>&#x3C;</code> — Less than</span></li>\n<li><span id=\"081b\"><code>>=</code> — Greater than or equal to</span></li>\n<li><span id=\"d065\"><code>&#x3C;=</code> — Less than or equal to</span></li>\n<li><span id=\"174d\"><code>?</code> — Ternary operator</span></li>\n</ul>\n<h3>Logical Operators</h3>\n<ul>\n<li><span id=\"cb7b\"><code>&#x26;&#x26;</code> — Logical and</span></li>\n<li><span id=\"b1ee\"><code>||</code> — Logical or</span></li>\n<li><span id=\"96d4\"><code>!</code> — Logical not</span></li>\n</ul>\n<h3>Bitwise Operators</h3>\n<ul>\n<li><span id=\"8cf7\"><code>&#x26;</code> — AND statement</span></li>\n<li><span id=\"02d5\"><code>|</code> — OR statement</span></li>\n<li><span id=\"e576\"><code>~</code> — NOT</span></li>\n<li><span id=\"9c66\"><code>^</code> — XOR</span></li>\n<li><span id=\"b343\"><code>&#x3C;&#x3C;</code> — Left shift</span></li>\n<li><span id=\"52b1\"><code>>></code> — Right shift</span></li>\n<li><span id=\"1b5c\"><code>>>></code> — Zero fill right shift</span></li>\n</ul>\n<h3>Functions</h3>\n<p>JavaScript functions are blocks of code that perform a certain task. A basic function looks like this:</p>\n<p>function name(parameter1, parameter2, parameter3) {</p>\n<p>// what the function does</p>\n<p>}</p>\n<p>As you can see, it consists of the <code>function</code> keyword plus a name. The function's parameters are in the brackets and you have curly brackets around what the function performs. You can create your own, but to make your life easier - there are also a number of default functions.</p>\n<h3>Outputting Data</h3>\n<p>A common application for functions is the output of data. For the output, you have the following options:</p>\n<ul>\n<li><span id=\"a7a7\"><code>alert()</code> — Output data in an alert box in the browser window</span></li>\n<li><span id=\"0c44\"><code>confirm()</code> — Opens up a yes/no dialog and returns true/false depending on user click</span></li>\n<li><span id=\"9690\"><code>console.log()</code> — Writes information to the browser console, good for debugging purposes</span></li>\n<li><span id=\"0d4d\"><code>document.write()</code> — Write directly to the HTML document</span></li>\n<li><span id=\"16aa\"><code>prompt()</code> — Creates a dialogue for user input</span></li>\n</ul>\n<h3>Global Functions</h3>\n<p>Global functions are functions built into every browser capable of running JavaScript.</p>\n<ul>\n<li><span id=\"f4f1\"><code>decodeURI()</code> — Decodes a <a href=\"https://en.wikipedia.org/wiki/Uniform_Resource_Identifier\" class=\"markup--anchor markup--li-anchor\">Uniform Resource Identifier (URI)</a> created by <code>encodeURI</code> or similar</span></li>\n<li><span id=\"c203\"><code>decodeURIComponent()</code> — Decodes a URI component</span></li>\n<li><span id=\"176a\"><code>encodeURI()</code> — Encodes a URI into UTF-8</span></li>\n<li><span id=\"6720\"><code>encodeURIComponent()</code> — Same but for URI components</span></li>\n<li><span id=\"e97b\"><code>eval()</code> — Evaluates JavaScript code represented as a string</span></li>\n<li><span id=\"390b\"><code>isFinite()</code> — Determines whether a passed value is a finite number</span></li>\n<li><span id=\"5d46\"><code>isNaN()</code> — Determines whether a value is NaN or not</span></li>\n<li><span id=\"f668\"><code>Number()</code> —- Returns a number converted from its argument</span></li>\n<li><span id=\"a5ff\"><code>parseFloat()</code> — Parses an argument and returns a floating-point number</span></li>\n<li><span id=\"a666\"><code>parseInt()</code> — Parses its argument and returns an integer</span></li>\n</ul>\n<h3>JavaScript Loops</h3>\n<p>Loops are part of most programming languages. They allow you to execute blocks of code desired number of times with different values:</p>\n<p>for (before loop; condition <strong>for</strong> loop; execute after loop) {</p>\n<p>// what to do during the loop</p>\n<p>}</p>\n<p>You have several parameters to create loops:</p>\n<ul>\n<li><span id=\"ff62\"><code>for</code> — The most common way to create a loop in JavaScript</span></li>\n<li><span id=\"7ad1\"><code>while</code> — Sets up conditions under which a loop executes</span></li>\n<li><span id=\"c2f4\"><code>do while</code> — Similar to the <code>while</code> loop but it executes at least once and performs a check at the end to see if the condition is met to execute again</span></li>\n<li><span id=\"7157\"><code>break</code> —Used to stop and exit the cycle at certain conditions</span></li>\n<li><span id=\"f5c0\"><code>continue</code> — Skip parts of the cycle if certain conditions are met</span></li>\n</ul>\n<h3>If — Else Statements</h3>\n<p>These types of statements are easy to understand. Using them, you can set conditions for when your code is executed. If certain conditions apply, something is done, if not — something else is executed.</p>\n<p>if (condition) {</p>\n<p>// what to do if condition is met</p>\n<p>} <strong>else</strong> {</p>\n<p>// what to do if condition is not met</p>\n<p>}</p>\n<p>A similar concept to <code>if else</code> is the <code>switch</code> statement. However, using the switch you select one of several code blocks to execute.</p>\n<h3>Strings</h3>\n<p>Strings are what JavaScript calls to text that does not perform a function but can appear on the screen.</p>\n<p>var person = “John Doe”;</p>\n<p>In this case, <code>John Doe</code> is the string.</p>\n<h3>Escape Characters</h3>\n<p>In JavaScript, strings are marked with single or double-quotes. If you want to use quotation marks in a string, you need to use special characters:</p>\n<ul>\n<li><span id=\"b4b1\"><code>\\'</code> — Single quote</span></li>\n<li><span id=\"3b22\"><code>\\\"</code> — Double quote</span></li>\n</ul>\n<p>Aside from that you also have additional escape characters:</p>\n<ul>\n<li><span id=\"b412\"><code>\\\\</code> — Backslash</span></li>\n<li><span id=\"1592\"><code>\\b</code> — Backspace</span></li>\n<li><span id=\"3a72\"><code>\\f</code> — Form feed</span></li>\n<li><span id=\"145a\"><code>\\n</code> — New line</span></li>\n<li><span id=\"1416\"><code>\\r</code> — Carriage return</span></li>\n<li><span id=\"95d4\"><code>\\t</code> — Horizontal tabulator</span></li>\n<li><span id=\"d962\"><code>\\v</code> — Vertical tabulator</span></li>\n</ul>\n<h3>String Methods</h3>\n<p>There are many different ways to work with strings:</p>\n<ul>\n<li><span id=\"2021\"><code>charAt()</code> — Returns a character at a specified position inside a string</span></li>\n<li><span id=\"d3e5\"><code>charCodeAt()</code> — Gives you the Unicode of a character at that position</span></li>\n<li><span id=\"fdd1\"><code>concat()</code> — Concatenates (joins) two or more strings into one</span></li>\n<li><span id=\"009c\"><code>fromCharCode()</code> — Returns a string created from the specified sequence of UTF-16 code units</span></li>\n<li><span id=\"7ed3\"><code>indexOf()</code> — Provides the position of the first occurrence of a specified text within a string</span></li>\n<li><span id=\"2937\"><code>lastIndexOf()</code> — Same as <code>indexOf()</code> but with the last occurrence, searching backward</span></li>\n<li><span id=\"142d\"><code>match()</code> — Retrieves the matches of a string against a search pattern</span></li>\n<li><span id=\"6c18\"><code>replace()</code> — Find and replace specified text in a string</span></li>\n<li><span id=\"e279\"><code>search()</code> — Executes a search for a matching text and returns its position</span></li>\n<li><span id=\"6bcd\"><code>slice()</code> — Extracts a section of a string and returns it as a new string</span></li>\n<li><span id=\"e4ee\"><code>split()</code> — Splits a string object into an array of strings at a specified position</span></li>\n<li><span id=\"3a27\"><code>substr()</code> — Similar to <code>slice()</code> but extracts a substring depending on a specified number of characters</span></li>\n<li><span id=\"3d14\"><code>substring()</code> — Also similar to <code>slice()</code> but can't accept negative indices</span></li>\n<li><span id=\"fa33\"><code>toLowerCase()</code> — Convert strings to lower case</span></li>\n<li><span id=\"3485\"><code>toUpperCase()</code> — Convert strings to upper case</span></li>\n<li><span id=\"4f96\"><code>valueOf()</code> — Returns the primitive value (that has no properties or methods) of a string object</span></li>\n</ul>\n<h3>Regular Expression Syntax</h3>\n<p>Regular expressions are search patterns used to match character combinations in strings. The search pattern can be used for text search and text to replace operations.</p>\n<h3>Pattern Modifiers</h3>\n<ul>\n<li><span id=\"bb29\"><code>e</code> — Evaluate replacement</span></li>\n<li><span id=\"b6b8\"><code>i</code> — Perform case-insensitive matching</span></li>\n<li><span id=\"4f50\"><code>g</code> — Perform global matching</span></li>\n<li><span id=\"4add\"><code>m</code> — Perform multiple line matching</span></li>\n<li><span id=\"a073\"><code>s</code> — Treat strings as a single line</span></li>\n<li><span id=\"482b\"><code>x</code> — Allow comments and whitespace in the pattern</span></li>\n<li><span id=\"f6ad\"><code>U</code> — Ungreedy pattern</span></li>\n</ul>\n<h3>Brackets</h3>\n<ul>\n<li><span id=\"aae1\"><code>[abc]</code> — Find any of the characters between the brackets</span></li>\n<li><span id=\"e048\"><code>[^abc]</code> — Find any character which is not in the brackets</span></li>\n<li><span id=\"f9b5\"><code>[0-9]</code> — Used to find any digit from 0 to 9</span></li>\n<li><span id=\"ac71\"><code>[A-z]</code> — Find any character from uppercase A to lowercase z</span></li>\n<li><span id=\"6fce\"><code>(a|b|c)</code> — Find any of the alternatives separated with <code>|</code></span></li>\n</ul>\n<h3>Metacharacters</h3>\n<ul>\n<li><span id=\"dcd6\"><code>.</code> — Find a single character, except newline or line terminator</span></li>\n<li><span id=\"e944\"><code>\\w</code> — Word character</span></li>\n<li><span id=\"c4bf\"><code>\\W</code> — Non-word character</span></li>\n<li><span id=\"7b81\"><code>\\d</code> — A digit</span></li>\n<li><span id=\"a533\"><code>\\D</code> — A non-digit character</span></li>\n<li><span id=\"1fcc\"><code>\\s</code> — Whitespace character</span></li>\n<li><span id=\"374c\"><code>\\S</code> — Non-whitespace character</span></li>\n<li><span id=\"72d0\"><code>\\b</code> — Find a match at the beginning/end of a word</span></li>\n<li><span id=\"2d38\"><code>\\B</code> — A match not at the beginning/end of a word</span></li>\n<li><span id=\"859b\"><code>\\0</code> — NUL character</span></li>\n<li><span id=\"df4d\"><code>\\n</code> — A new line character</span></li>\n<li><span id=\"5acd\"><code>\\f</code> — Form feed character</span></li>\n<li><span id=\"833f\"><code>\\r</code> — Carriage return character</span></li>\n<li><span id=\"4f31\"><code>\\t</code> — Tab character</span></li>\n<li><span id=\"e618\"><code>\\v</code> — Vertical tab character</span></li>\n<li><span id=\"dcfc\"><code>\\xxx</code> — The character specified by an octal number xxx</span></li>\n<li><span id=\"cf5e\"><code>\\xdd</code> — Character specified by a hexadecimal number dd</span></li>\n<li><span id=\"978f\"><code>\\uxxxx</code> — The Unicode character specified by a hexadecimal number XXXX</span></li>\n</ul>\n<h3>Quantifiers</h3>\n<ul>\n<li><span id=\"e4cf\"><code>n+</code> — Matches any string that contains at least one n</span></li>\n<li><span id=\"be07\"><code>n*</code> — Any string that contains zero or more occurrences of n</span></li>\n<li><span id=\"4a93\"><code>n?</code> — A string that contains zero or one occurrence of n</span></li>\n<li><span id=\"91f0\"><code>n{X}</code> — String that contains a sequence of X n's</span></li>\n<li><span id=\"097b\"><code>n{X,Y}</code> — Strings that contain a sequence of X to Y n's</span></li>\n<li><span id=\"e9f2\"><code>n{X,}</code> — Matches any string that contains a sequence of at least X n's</span></li>\n<li><span id=\"15b3\"><code>n$</code> — Any string with n at the end of it</span></li>\n<li><span id=\"5fc9\"><code>^n</code> — String with n at the beginning of it</span></li>\n<li><span id=\"2b42\"><code>?=n</code> — Any string that is followed by a specific string n</span></li>\n<li><span id=\"6ffa\"><code>?!n</code> — String that is not followed by a specific string ni</span></li>\n</ul>\n<h3>Numbers and Math</h3>\n<p>In JavaScript, you can also work with numbers, constants and perform mathematical functions.</p>\n<h3>Number Properties</h3>\n<ul>\n<li><span id=\"3554\"><code>MAX_VALUE</code> — The maximum numeric value representable in JavaScript</span></li>\n<li><span id=\"c55d\"><code>MIN_VALUE</code> — Smallest positive numeric value representable in JavaScript</span></li>\n<li><span id=\"49e0\"><code>NaN</code> — The “Not-a-Number” value</span></li>\n<li><span id=\"3024\"><code>NEGATIVE_INFINITY</code> — The negative Infinity value</span></li>\n<li><span id=\"0bf4\"><code>POSITIVE_INFINITY</code> — Positive Infinity value</span></li>\n</ul>\n<h3>Number Methods</h3>\n<ul>\n<li><span id=\"9478\"><code>toExponential()</code> — Returns the string with a rounded number written as exponential notation</span></li>\n<li><span id=\"2ad0\"><code>toFixed()</code> — Returns the string of a number with a specified number of decimals</span></li>\n<li><span id=\"d464\"><code>toPrecision()</code> — String of a number written with a specified length</span></li>\n<li><span id=\"2244\"><code>toString()</code> — Returns a number as a string</span></li>\n<li><span id=\"bc1e\"><code>valueOf()</code> — Returns a number as a number</span></li>\n</ul>\n<h3>Math Properties</h3>\n<ul>\n<li><span id=\"9f68\"><code>E</code> — Euler's number</span></li>\n<li><span id=\"a4df\"><code>LN2</code> — The natural logarithm of 2</span></li>\n<li><span id=\"0f06\"><code>LN10</code> — Natural logarithm of 10</span></li>\n<li><span id=\"1a92\"><code>LOG2E</code> — Base 2 logarithm of E</span></li>\n<li><span id=\"42e7\"><code>LOG10E</code> — Base 10 logarithm of E</span></li>\n<li><span id=\"1fbe\"><code>PI</code> — The number PI</span></li>\n<li><span id=\"2a56\"><code>SQRT1_2</code> — Square root of 1/2</span></li>\n<li><span id=\"aab4\"><code>SQRT2</code> — The square root of 2</span></li>\n</ul>\n<h3>Math Methods</h3>\n<ul>\n<li><span id=\"8836\"><code>abs(x)</code> — Returns the absolute (positive) value of x</span></li>\n<li><span id=\"ddb9\"><code>acos(x)</code> — The arccosine of x, in radians</span></li>\n<li><span id=\"a0c3\"><code>asin(x)</code> — Arcsine of x, in radians</span></li>\n<li><span id=\"c2ca\"><code>atan(x)</code> — The arctangent of x as a numeric value</span></li>\n<li><span id=\"8b93\"><code>atan2(y,x)</code> — Arctangent of the quotient of its arguments</span></li>\n<li><span id=\"b103\"><code>ceil(x)</code> — Value of x rounded up to its nearest integer</span></li>\n<li><span id=\"c68a\"><code>cos(x)</code> — The cosine of x (x is in radians)</span></li>\n<li><span id=\"d480\"><code>exp(x)</code> — Value of Ex</span></li>\n<li><span id=\"2954\"><code>floor(x)</code> — The value of x rounded down to its nearest integer</span></li>\n<li><span id=\"ff4d\"><code>log(x)</code> — The natural logarithm (base E) of x</span></li>\n<li><span id=\"b6a9\"><code>max(x,y,z,...,n)</code> — Returns the number with the highest value</span></li>\n<li><span id=\"dfb0\"><code>min(x,y,z,...,n)</code> — Same for the number with the lowest value</span></li>\n<li><span id=\"a6f1\"><code>pow(x,y)</code> — X to the power of y</span></li>\n<li><span id=\"8851\"><code>random()</code> — Returns a random number between 0 and 1</span></li>\n<li><span id=\"d32e\"><code>round(x)</code> — The value of x rounded to its nearest integer</span></li>\n<li><span id=\"fe9a\"><code>sin(x)</code> — The sine of x (x is in radians)</span></li>\n<li><span id=\"c244\"><code>sqrt(x)</code> — Square root of x</span></li>\n<li><span id=\"b5ef\"><code>tan(x)</code> — The tangent of an angle</span></li>\n</ul>\n<h3>Dealing with Dates in JavaScript</h3>\n<p>You can also work with and modify dates and time with JavaScript. This is the next chapter in the JavaScript cheat sheet.</p>\n<h3>Setting Dates</h3>\n<ul>\n<li><span id=\"b187\"><code>Date()</code> — Creates a new date object with the current date and time</span></li>\n<li><span id=\"42f8\"><code>Date(2017, 5, 21, 3, 23, 10, 0)</code> — Create a custom date object. The numbers represent a year, month, day, hour, minutes, seconds, milliseconds. You can omit anything you want except for a year and month.</span></li>\n<li><span id=\"4e80\"><code>Date(\"2017-06-23\")</code> — Date declaration as a string</span></li>\n</ul>\n<h3>Pulling Date and Time Values</h3>\n<ul>\n<li><span id=\"465e\"><code>getDate()</code> — Get the day of the month as a number (1-31)</span></li>\n<li><span id=\"1b08\"><code>getDay()</code> — The weekday as a number (0-6)</span></li>\n<li><span id=\"6d9e\"><code>getFullYear()</code> — Year as a four-digit number (yyyy)</span></li>\n<li><span id=\"a216\"><code>getHours()</code> — Get the hour (0-23)</span></li>\n<li><span id=\"388a\"><code>getMilliseconds()</code> — The millisecond (0-999)</span></li>\n<li><span id=\"a97f\"><code>getMinutes()</code> — Get the minute (0-59)</span></li>\n<li><span id=\"2427\"><code>getMonth()</code> — Month as a number (0-11)</span></li>\n<li><span id=\"b964\"><code>getSeconds()</code> — Get the second (0-59)</span></li>\n<li><span id=\"505d\"><code>getTime()</code> — Get the milliseconds since January 1, 1970</span></li>\n<li><span id=\"7c14\"><code>getUTCDate()</code> — The day (date) of the month in the specified date according to universal time (also available for day, month, full year, hours, minutes etc.)</span></li>\n<li><span id=\"d6b6\"><code>parse</code> — Parses a string representation of a date and returns the number of milliseconds since January 1, 1970</span></li>\n</ul>\n<h3>Set Part of a Date</h3>\n<ul>\n<li><span id=\"9a97\"><code>setDate()</code> — Set the day as a number (1-31)</span></li>\n<li><span id=\"d4f0\"><code>setFullYear()</code> — Sets the year (optionally month and day)</span></li>\n<li><span id=\"1a45\"><code>setHours()</code> — Set the hour (0-23)</span></li>\n<li><span id=\"8020\"><code>setMilliseconds()</code> — Set milliseconds (0-999)</span></li>\n<li><span id=\"7feb\"><code>setMinutes()</code> — Sets the minutes (0-59)</span></li>\n<li><span id=\"d7ca\"><code>setMonth()</code> — Set the month (0-11)</span></li>\n<li><span id=\"795d\"><code>setSeconds()</code> — Sets the seconds (0-59)</span></li>\n<li><span id=\"1d7f\"><code>setTime()</code> — Set the time (milliseconds since January 1, 1970)</span></li>\n<li><span id=\"78e1\"><code>setUTCDate()</code> — Sets the day of the month for a specified date according to universal time (also available for day, month, full year, hours, minutes etc.)</span></li>\n</ul>\n<h3>DOM Mode</h3>\n<p>The DOM is the <a href=\"https://en.wikipedia.org/wiki/Document_Object_Model\" class=\"markup--anchor markup--p-anchor\">Document Object Model</a> of a page. It is the code of the structure of a webpage. JavaScript comes with a lot of different ways to create and manipulate HTML elements (called nodes).</p>\n<h3>Node Properties</h3>\n<ul>\n<li><span id=\"cfb7\"><code>attributes</code> — Returns a live collection of all attributes registered to an element</span></li>\n<li><span id=\"6138\"><code>baseURI</code> — Provides the absolute base URL of an HTML element</span></li>\n<li><span id=\"34da\"><code>childNodes</code> — Gives a collection of an element's child nodes</span></li>\n<li><span id=\"58ec\"><code>firstChild</code> — Returns the first child node of an element</span></li>\n<li><span id=\"2f34\"><code>lastChild</code> — The last child node of an element</span></li>\n<li><span id=\"fdea\"><code>nextSibling</code> — Gives you the next node at the same node tree level</span></li>\n<li><span id=\"1ca4\"><code>nodeName</code> —Returns the name of a node</span></li>\n<li><span id=\"d4ee\"><code>nodeType</code> — Returns the type of a node</span></li>\n<li><span id=\"cd22\"><code>nodeValue</code> — Sets or returns the value of a node</span></li>\n<li><span id=\"a9a3\"><code>ownerDocument</code> — The top-level document object for this node</span></li>\n<li><span id=\"51b4\"><code>parentNode</code> — Returns the parent node of an element</span></li>\n<li><span id=\"31ef\"><code>previousSibling</code> — Returns the node immediately preceding the current one</span></li>\n<li><span id=\"ec40\"><code>textContent</code> — Sets or returns the textual content of a node and its descendants</span></li>\n</ul>\n<h3>Node Methods</h3>\n<ul>\n<li><span id=\"7f05\"><code>appendChild()</code> — Adds a new child node to an element as the last child node</span></li>\n<li><span id=\"3b3a\"><code>cloneNode()</code> — Clones an HTML element</span></li>\n<li><span id=\"661c\"><code>compareDocumentPosition()</code> — Compares the document position of two elements</span></li>\n<li><span id=\"86d2\"><code>getFeature()</code> — Returns an object which implements the APIs of a specified feature</span></li>\n<li><span id=\"059c\"><code>hasAttributes()</code> — Returns true if an element has any attributes, otherwise false</span></li>\n<li><span id=\"5d0d\"><code>hasChildNodes()</code> — Returns true if an element has any child nodes, otherwise false</span></li>\n<li><span id=\"4c86\"><code>insertBefore()</code> — Inserts a new child node before a specified, existing child node</span></li>\n<li><span id=\"4b38\"><code>isDefaultNamespace()</code> — Returns true if a specified namespaceURI is the default, otherwise false</span></li>\n<li><span id=\"8c4e\"><code>isEqualNode()</code> — Checks if two elements are equal</span></li>\n<li><span id=\"2f6a\"><code>isSameNode()</code> — Checks if two elements are the same node</span></li>\n<li><span id=\"944e\"><code>isSupported()</code> — Returns true if a specified feature is supported on the element</span></li>\n<li><span id=\"b7ef\"><code>lookupNamespaceURI()</code> — Returns the namespace URI associated with a given node</span></li>\n<li><span id=\"5f59\"><code>lookupPrefix()</code> — Returns a DOMString containing the prefix for a given namespace URI if present</span></li>\n<li><span id=\"6670\"><code>normalize()</code> — Joins adjacent text nodes and removes empty text nodes in an element</span></li>\n<li><span id=\"c80a\"><code>removeChild()</code> — Removes a child node from an element</span></li>\n<li><span id=\"8108\"><code>replaceChild()</code> — Replaces a child node in an element</span></li>\n</ul>\n<h3>Element Methods</h3>\n<ul>\n<li><span id=\"9530\"><code>getAttribute()</code> — Returns the specified attribute value of an element node</span></li>\n<li><span id=\"0dd1\"><code>getAttributeNS()</code> — Returns string value of the attribute with the specified namespace and name</span></li>\n<li><span id=\"8a0d\"><code>getAttributeNode()</code> — Gets the specified attribute node</span></li>\n<li><span id=\"fc41\"><code>getAttributeNodeNS()</code> — Returns the attribute node for the attribute with the given namespace and name</span></li>\n<li><span id=\"2a3e\"><code>getElementsByTagName()</code> — Provides a collection of all child elements with the specified tag name</span></li>\n<li><span id=\"11a4\"><code>getElementsByTagNameNS()</code> — Returns a live HTMLCollection of elements with a certain tag name belonging to the given namespace</span></li>\n<li><span id=\"e2ae\"><code>hasAttribute()</code> — Returns true if an element has any attributes, otherwise false</span></li>\n<li><span id=\"17dd\"><code>hasAttributeNS()</code> — Provides a true/false value indicating whether the current element in a given namespace has the specified attribute</span></li>\n<li><span id=\"f28c\"><code>removeAttribute()</code> — Removes a specified attribute from an element</span></li>\n<li><span id=\"8cd0\"><code>removeAttributeNS()</code> — Removes the specified attribute from an element within a certain namespace</span></li>\n<li><span id=\"e6c3\"><code>removeAttributeNode()</code> — Takes away a specified attribute node and returns the removed node</span></li>\n<li><span id=\"a7b9\"><code>setAttribute()</code> — Sets or changes the specified attribute to a specified value</span></li>\n<li><span id=\"bf42\"><code>setAttributeNS()</code> — Adds a new attribute or changes the value of an attribute with the given namespace and name</span></li>\n<li><span id=\"2322\"><code>setAttributeNode()</code> — Sets or changes the specified attribute node</span></li>\n<li><span id=\"0540\"><code>setAttributeNodeNS()</code> — Adds a new namespaced attribute node to an element</span></li>\n</ul>\n<h3>Working with the User Browser</h3>\n<p>Besides HTML elements, JavaScript is also able to take into account the user browser and incorporate its properties into the code.</p>\n<h3>Window Properties</h3>\n<ul>\n<li><span id=\"1b1f\"><code>closed</code> — Checks whether a window has been closed or not and returns true or false</span></li>\n<li><span id=\"805f\"><code>defaultStatus</code> — Sets or returns the default text in the status bar of a window</span></li>\n<li><span id=\"458e\"><code>document</code> — Returns the document object for the window</span></li>\n<li><span id=\"93ee\"><code>frames</code> — Returns all <code>&#x3C;iframe></code> elements in the current window</span></li>\n<li><span id=\"c42a\"><code>history</code> — Provides the History object for the window</span></li>\n<li><span id=\"3a5d\"><code>innerHeight</code> — The inner height of a window's content area</span></li>\n<li><span id=\"c609\"><code>innerWidth</code> — The inner width of the content area</span></li>\n<li><span id=\"5167\"><code>length</code> — Find out the number of <code>&#x3C;iframe></code> elements in the window</span></li>\n<li><span id=\"4f05\"><code>location</code> — Returns the location object for the window</span></li>\n<li><span id=\"4125\"><code>name</code> — Sets or returns the name of a window</span></li>\n<li><span id=\"3d7f\"><code>navigator</code> — Returns the Navigator object for the window</span></li>\n<li><span id=\"c601\"><code>opener</code> — Returns a reference to the window that created the window</span></li>\n<li><span id=\"734e\"><code>outerHeight</code> — The outer height of a window, including toolbars/scrollbars</span></li>\n<li><span id=\"9b0a\"><code>outerWidth</code> — The outer width of a window, including toolbars/scrollbars</span></li>\n<li><span id=\"3140\"><code>pageXOffset</code> — Number of pixels the current document has been scrolled horizontally</span></li>\n<li><span id=\"0bcc\"><code>pageYOffset</code> — Number of pixels the document has been scrolled vertically</span></li>\n<li><span id=\"a2af\"><code>parent</code> — The parent window of the current window</span></li>\n<li><span id=\"3634\"><code>screen</code> — Returns the Screen object for the window</span></li>\n<li><span id=\"9566\"><code>screenLeft</code> — The horizontal coordinate of the window (relative to the screen)</span></li>\n<li><span id=\"1245\"><code>screenTop</code> — The vertical coordinate of the window</span></li>\n<li><span id=\"5656\"><code>screenX</code> — Same as <code>screenLeft</code> but needed for some browsers</span></li>\n<li><span id=\"21e7\"><code>screenY</code> — Same as <code>screenTop</code> but needed for some browsers</span></li>\n<li><span id=\"d000\"><code>self</code> — Returns the current window</span></li>\n<li><span id=\"99af\"><code>status</code> — Sets or returns the text in the status bar of a window</span></li>\n<li><span id=\"0a0f\"><code>top</code> — Returns the topmost browser window</span></li>\n</ul>\n<h3>Window Methods</h3>\n<ul>\n<li><span id=\"5715\"><code>alert()</code> — Displays an alert box with a message and an OK button</span></li>\n<li><span id=\"4afc\"><code>blur()</code> — Removes focus from the current window</span></li>\n<li><span id=\"ef9a\"><code>clearInterval()</code> — Clears a timer set with <code>setInterval()</code></span></li>\n<li><span id=\"fa72\"><code>clearTimeout()</code> — Clears a timer set with <code>setTimeout()</code></span></li>\n<li><span id=\"7bce\"><code>close()</code> — Closes the current window</span></li>\n<li><span id=\"ccbf\"><code>confirm()</code> — Displays a dialogue box with a message and an <em>OK</em> and <em>Cancel</em> button</span></li>\n<li><span id=\"e6f2\"><code>focus()</code> — Sets focus to the current window</span></li>\n<li><span id=\"5eb7\"><code>moveBy()</code> — Moves a window relative to its current position</span></li>\n<li><span id=\"16b6\"><code>moveTo()</code> — Moves a window to a specified position</span></li>\n<li><span id=\"32d8\"><code>open()</code> — Opens a new browser window</span></li>\n<li><span id=\"4198\"><code>print()</code> — Prints the content of the current window</span></li>\n<li><span id=\"3bec\"><code>prompt()</code> — Displays a dialogue box that prompts the visitor for input</span></li>\n<li><span id=\"e16a\"><code>resizeBy()</code> — Resizes the window by the specified number of pixels</span></li>\n<li><span id=\"31c8\"><code>resizeTo()</code> — Resizes the window to a specified width and height</span></li>\n<li><span id=\"6c44\"><code>scrollBy()</code> — Scrolls the document by a specified number of pixels</span></li>\n<li><span id=\"959f\"><code>scrollTo()</code> — Scrolls the document to specified coordinates</span></li>\n<li><span id=\"704a\"><code>setInterval()</code> — Calls a function or evaluates an expression at specified intervals</span></li>\n<li><span id=\"87c3\"><code>setTimeout()</code> — Calls a function or evaluates an expression after a specified interval</span></li>\n<li><span id=\"1cde\"><code>stop()</code> — Stops the window from loading</span></li>\n</ul>\n<h3>Screen Properties</h3>\n<ul>\n<li><span id=\"7e50\"><code>availHeight</code> — Returns the height of the screen (excluding the Windows Taskbar)</span></li>\n<li><span id=\"d7ea\"><code>availWidth</code> — Returns the width of the screen (excluding the Windows Taskbar)</span></li>\n<li><span id=\"4feb\"><code>colorDepth</code> — Returns the bit depth of the color palette for displaying images</span></li>\n<li><span id=\"f2f7\"><code>height</code> — The total height of the screen</span></li>\n<li><span id=\"8e22\"><code>pixelDepth</code> — The color resolution of the screen in bits per pixel</span></li>\n<li><span id=\"bc5a\"><code>width</code> — The total width of the screen</span></li>\n</ul>\n<h3>JavaScript Events</h3>\n<p>Events are things that can happen to HTML elements and are performed by the user. The programming language can listen for these events and trigger actions in the code. No JavaScript cheat sheet would be complete without them.</p>\n<h3>Mouse</h3>\n<ul>\n<li><span id=\"9546\"><code>onclick</code> — The event occurs when the user clicks on an element</span></li>\n<li><span id=\"9b50\"><code>oncontextmenu</code> — User right-clicks on an element to open a context menu</span></li>\n<li><span id=\"147a\"><code>ondblclick</code> — The user double-clicks on an element</span></li>\n<li><span id=\"3720\"><code>onmousedown</code> — User presses a mouse button over an element</span></li>\n<li><span id=\"a40a\"><code>onmouseenter</code> — The pointer moves onto an element</span></li>\n<li><span id=\"345e\"><code>onmouseleave</code> — Pointer moves out of an element</span></li>\n<li><span id=\"79b1\"><code>onmousemove</code> — The pointer is moving while it is over an element</span></li>\n<li><span id=\"fa70\"><code>onmouseover</code> — When the pointer is moved onto an element or one of its children</span></li>\n<li><span id=\"94f8\"><code>onmouseout</code> — User moves the mouse pointer out of an element or one of its children</span></li>\n<li><span id=\"486e\"><code>onmouseup</code> — The user releases a mouse button while over an element</span></li>\n</ul>\n<h3>Keyboard</h3>\n<ul>\n<li><span id=\"6a8f\"><code>onkeydown</code> — When the user is pressing a key down</span></li>\n<li><span id=\"0647\"><code>onkeypress</code> — The moment the user starts pressing a key</span></li>\n<li><span id=\"ff0f\"><code>onkeyup</code> — The user releases a key</span></li>\n</ul>\n<h3>Frame</h3>\n<ul>\n<li><span id=\"9d29\"><code>onabort</code> — The loading of a media is aborted</span></li>\n<li><span id=\"baa4\"><code>onbeforeunload</code> — Event occurs before the document is about to be unloaded</span></li>\n<li><span id=\"740e\"><code>onerror</code> — An error occurs while loading an external file</span></li>\n<li><span id=\"be95\"><code>onhashchange</code> — There have been changes to the anchor part of a URL</span></li>\n<li><span id=\"d0fd\"><code>onload</code> — When an object has loaded</span></li>\n<li><span id=\"65e5\"><code>onpagehide</code> — The user navigates away from a webpage</span></li>\n<li><span id=\"aae6\"><code>onpageshow</code> — When the user navigates to a webpage</span></li>\n<li><span id=\"e3dc\"><code>onresize</code> — The document view is resized</span></li>\n<li><span id=\"96c8\"><code>onscroll</code> — An element's scrollbar is being scrolled</span></li>\n<li><span id=\"f2fa\"><code>onunload</code> — Event occurs when a page has unloaded</span></li>\n</ul>\n<h3>Form</h3>\n<ul>\n<li><span id=\"731a\"><code>onblur</code> — When an element loses focus</span></li>\n<li><span id=\"facf\"><code>onchange</code> — The content of a form element changes (for <code>&#x3C;input></code>, <code>&#x3C;select></code> and <code>&#x3C;textarea></code>)</span></li>\n<li><span id=\"7a0a\"><code>onfocus</code> — An element gets focus</span></li>\n<li><span id=\"5188\"><code>onfocusin</code> — When an element is about to get focus</span></li>\n<li><span id=\"594a\"><code>onfocusout</code> — The element is about to lose focus</span></li>\n<li><span id=\"700e\"><code>oninput</code> — User input on an element</span></li>\n<li><span id=\"dd0f\"><code>oninvalid</code> — An element is invalid</span></li>\n<li><span id=\"6cad\"><code>onreset</code> — A form is reset</span></li>\n<li><span id=\"f4f2\"><code>onsearch</code> — The user writes something in a search field (for <code>&#x3C;input=\"search\"></code>)</span></li>\n<li><span id=\"32a9\"><code>onselect</code> — The user selects some text (for <code>&#x3C;input></code> and <code>&#x3C;textarea></code>)</span></li>\n<li><span id=\"3e1d\"><code>onsubmit</code> — A form is submitted</span></li>\n</ul>\n<h3>Drag</h3>\n<ul>\n<li><span id=\"912c\"><code>ondrag</code> — An element is dragged</span></li>\n<li><span id=\"6897\"><code>ondragend</code> — The user has finished dragging the element</span></li>\n<li><span id=\"8225\"><code>ondragenter</code> — The dragged element enters a drop target</span></li>\n<li><span id=\"cf37\"><code>ondragleave</code> — A dragged element leaves the drop target</span></li>\n<li><span id=\"5bc3\"><code>ondragover</code> — The dragged element is on top of the drop target</span></li>\n<li><span id=\"2b0c\"><code>ondragstart</code> — User starts to drag an element</span></li>\n<li><span id=\"8e24\"><code>ondrop</code> — Dragged element is dropped on the drop target</span></li>\n</ul>\n<h3>Clipboard</h3>\n<ul>\n<li><span id=\"c299\"><code>oncopy</code> — User copies the content of an element</span></li>\n<li><span id=\"267c\"><code>oncut</code> — The user cuts an element's content</span></li>\n<li><span id=\"e33c\"><code>onpaste</code> — A user pastes the content in an element</span></li>\n</ul>\n<h3>Media</h3>\n<ul>\n<li><span id=\"e0ab\"><code>onabort</code> — Media loading is aborted</span></li>\n<li><span id=\"0758\"><code>oncanplay</code> — The browser can start playing media (e.g. a file has buffered enough)</span></li>\n<li><span id=\"0bc2\"><code>oncanplaythrough</code> — The browser can play through media without stopping</span></li>\n<li><span id=\"4c27\"><code>ondurationchange</code> — The duration of the media changes</span></li>\n<li><span id=\"aa9a\"><code>onended</code> — The media has reached its end</span></li>\n<li><span id=\"25b8\"><code>onerror</code> — Happens when an error occurs while loading an external file</span></li>\n<li><span id=\"cdf4\"><code>onloadeddata</code> — Media data is loaded</span></li>\n<li><span id=\"edce\"><code>onloadedmetadata</code> — Metadata (like dimensions and duration) are loaded</span></li>\n<li><span id=\"7928\"><code>onloadstart</code> — The browser starts looking for specified media</span></li>\n<li><span id=\"159c\"><code>onpause</code> — Media is paused either by the user or automatically</span></li>\n<li><span id=\"057f\"><code>onplay</code> — The media has been started or is no longer paused</span></li>\n<li><span id=\"ce2a\"><code>onplaying</code> — Media is playing after having been paused or stopped for buffering</span></li>\n<li><span id=\"2655\"><code>onprogress</code> — The browser is in the process of downloading the media</span></li>\n<li><span id=\"a11c\"><code>onratechange</code> — The playing speed of the media changes</span></li>\n<li><span id=\"f8bb\"><code>onseeked</code> — User is finished moving/skipping to a new position in the media</span></li>\n<li><span id=\"9895\"><code>onseeking</code> — The user starts moving/skipping</span></li>\n<li><span id=\"c636\"><code>onstalled</code> — The browser is trying to load the media but it is not available</span></li>\n<li><span id=\"6480\"><code>onsuspend</code> — The browser is intentionally not loading media</span></li>\n<li><span id=\"f94b\"><code>ontimeupdate</code> — The playing position has changed (e.g. because of fast forward)</span></li>\n<li><span id=\"e96b\"><code>onvolumechange</code> — Media volume has changed (including mute)</span></li>\n<li><span id=\"9fe8\"><code>onwaiting</code> — Media paused but expected to resume (for example, buffering)</span></li>\n</ul>\n<h3>Animation</h3>\n<ul>\n<li><span id=\"4497\"><code>animationend</code> — A CSS animation is complete</span></li>\n<li><span id=\"fc16\"><code>animationiteration</code> — CSS animation is repeated</span></li>\n<li><span id=\"0f40\"><code>animationstart</code> — CSS animation has started</span></li>\n</ul>\n<h3>Other</h3>\n<ul>\n<li><span id=\"614b\"><code>transitionend</code> — Fired when a CSS transition has completed</span></li>\n<li><span id=\"5a40\"><code>onmessage</code> — A message is received through the event source</span></li>\n<li><span id=\"0dad\"><code>onoffline</code> — The browser starts to work offline</span></li>\n<li><span id=\"058e\"><code>ononline</code> — The browser starts to work online</span></li>\n<li><span id=\"090a\"><code>onpopstate</code> — When the window's history changes</span></li>\n<li><span id=\"d940\"><code>onshow</code> — A <code>&#x3C;menu></code> element is shown as a context menu</span></li>\n<li><span id=\"3062\"><code>onstorage</code> — A Web Storage area is updated</span></li>\n<li><span id=\"2681\"><code>ontoggle</code> — The user opens or closes the <code>&#x3C;details></code> element</span></li>\n<li><span id=\"6a40\"><code>onwheel</code> — Mouse wheel rolls up or down over an element</span></li>\n<li><span id=\"7178\"><code>ontouchcancel</code> — Screen-touch is interrupted</span></li>\n<li><span id=\"bec5\"><code>ontouchend</code> — User's finger is removed from a touch-screen</span></li>\n<li><span id=\"3b60\"><code>ontouchmove</code> — A finger is dragged across the screen</span></li>\n<li><span id=\"3c0e\"><code>ontouchstart</code> — A finger is placed on the touch-screen</span></li>\n</ul>\n<h3>Errors</h3>\n<p>When working with JavaScript, different errors can occur. There are several ways of handling them:</p>\n<ul>\n<li><span id=\"54c9\"><code>try</code> — Lets you define a block of code to test for errors</span></li>\n<li><span id=\"cb14\"><code>catch</code> — Set up a block of code to execute in case of an error</span></li>\n<li><span id=\"6a5b\"><code>throw</code> — Create custom error messages instead of the standard JavaScript errors</span></li>\n<li><span id=\"6aea\"><code>finally</code> — Lets you execute code, after try and catch, regardless of the result</span></li>\n</ul>\n<h3>Error Name Values</h3>\n<p>JavaScript also has a built-in error object. It has two properties:</p>\n<ul>\n<li><span id=\"ca3b\"><code>name</code> — Sets or returns the error name</span></li>\n<li><span id=\"7047\"><code>message</code> — Sets or returns an error message in a string from</span></li>\n</ul>\n<p>The error property can return six different values as its name:</p>\n<ul>\n<li><span id=\"b389\"><code>EvalError</code> — An error has occurred in the <code>eval()</code> function</span></li>\n<li><span id=\"570c\"><code>RangeError</code> — A number is “out of range”</span></li>\n<li><span id=\"2352\"><code>ReferenceError</code> — An illegal reference has occurred</span></li>\n<li><span id=\"5019\"><code>SyntaxError</code> — A syntax error has occurred</span></li>\n<li><span id=\"0527\"><code>TypeError</code> — A type error has occurred</span></li>\n<li><span id=\"02a3\"><code>URIError</code> — An <code>encodeURI()</code> error has occurred</span></li>\n</ul>\n<h3>Explicit Conversions</h3>\n<p>The simplest way to perform an explicit type conversion is to use the <code>Boolean(), Number()</code>, and <code>String()</code> functions.</p>\n<p>Any value other than <code>null</code>or <code>undefined</code>has a<code>toString()</code> method.</p>\n<p><code>n.toString(2);</code></p>\n<p>binary</p>\n<p><code>n.toString(8);</code></p>\n<p>octal</p>\n<p><code>n.toString(16);</code></p>\n<p>hex</p>\n<p><code>let n = 123456.789;</code></p>\n<p><code>n.toFixed(0)</code></p>\n<p>“123457”</p>\n<p><code>n.toFixed(5)</code></p>\n<p>“123456.78900”</p>\n<p><code>n.toExponential(3)</code></p>\n<p>“1.235e+5”</p>\n<p><code>n.toPrecision(7)</code></p>\n<p>“123456.8”</p>\n<p><code>n.toPrecision(10)</code></p>\n<p>“123456.7890”</p>\n<p><code>parseInt(\"3 blind mice\")</code></p>\n<p>3</p>\n<p><code>parseFloat(\" 3.14 meters\")</code></p>\n<p>3.14</p>\n<p><code>parseInt(\"-12.34\")</code></p>\n<p>-12</p>\n<p><code>parseInt(\"0xFF\")</code></p>\n<p>255</p>\n<h3>Types, Values, and Variables</h3>\n<h3>Links</h3>\n<p><strong>Resource</strong></p>\n<p><strong>URL</strong></p>\n<p>MDN</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript\" class=\"markup--anchor markup--p-anchor\">https://developer.mozilla.org/en-US/docs/Web/JavaScript</a></p>\n<p>Run Snippets</p>\n<p><a href=\"https://developers.google.com/web/tools/chrome-devtools/javascript/snippets\" class=\"markup--anchor markup--p-anchor\">https://developers.google.com/web/tools/chrome-devtools/javascript/snippets</a></p>\n<h3>Explicit Conversions</h3>\n<p>The simplest way to perform an explicit type conversion is to use the <code>Boolean(), Number()</code>, and <code>String()</code> functions.</p>\n<p>Any value other than <code>null</code>or <code>undefined</code>has a<code>toString()</code> method.</p>\n<p><code>n.toString(2);</code></p>\n<p>binary</p>\n<p><code>n.toString(8);</code></p>\n<p>octal</p>\n<p><code>n.toString(16);</code></p>\n<p>hex</p>\n<p><code>let n = 123456.789;</code></p>\n<p><code>n.toFixed(0)</code></p>\n<p>“123457”</p>\n<p><code>n.toFixed(5)</code></p>\n<p>“123456.78900”</p>\n<p><code>n.toExponential(3)</code></p>\n<p>“1.235e+5”</p>\n<p><code>n.toPrecision(7)</code></p>\n<p>“123456.8”</p>\n<p><code>n.toPrecision(10)</code></p>\n<p>“123456.7890”</p>\n<p><code>parseInt(\"3 blind mice\")</code></p>\n<p>3</p>\n<p><code>parseFloat(\" 3.14 meters\")</code></p>\n<p>3.14</p>\n<p><code>parseInt(\"-12.34\")</code></p>\n<p>-12</p>\n<p><code>parseInt(\"0xFF\")</code></p>\n<p>255</p>\n<p><code>parseInt(\"0xff\")</code></p>\n<p>255</p>\n<p><code>parseInt(\"-0XFF\")</code></p>\n<p>-255</p>\n<p><code>parseInt(\"0.1\")</code></p>\n<p>0</p>\n<p><code>parseInt(\".1\")</code></p>\n<p>NaN: integers can't start with “.”</p>\n<p><code>parseFloat(\"$72.47\")</code></p>\n<p>NaN: numbers can't start with “$”</p>\n<p>Supply Radix</p>\n<p><code>parseInt(\"11\", 2)</code></p>\n<p>3</p>\n<p><code>parseInt(\"ff\", 16)</code></p>\n<p>255</p>\n<p><code>parseInt(\"077\", 8)</code></p>\n<p>63</p>\n<h3>Conversion Idioms</h3>\n<p><code>x + \"\"</code></p>\n<p><code>String(x)</code></p>\n<p><code>+x</code></p>\n<p><code>Number(x)</code></p>\n<p><code>x-0</code></p>\n<p><code>Number(x)</code></p>\n<p><code>!!x</code></p>\n<p><code>Boolean(x)</code></p>\n<h3>Destructuring Assignment</h3>\n<p><code>let [x,y] = [1,2];</code></p>\n<p>let x=1, y=2</p>\n<p><code>[x,y] = [x + 1,y + 1];</code></p>\n<p>x = x + 1, y = y + 1</p>\n<p><code>[x,y] = [y,x];</code></p>\n<p>Swap the value of the two variables</p>\n<p>Destructuring assignment makes it easy to work with functions that return arrays of values:</p>\n<p><code>let [r,theta] = toPolar(1.0, 1.0);</code></p>\n<pre><code>function toPolar(x, y) {\n\nreturn [Math.sqrt(x*x+y*y), Math.atan2(y,x)];\n\n}\n</code></pre>\n<p>Variable destructuring in loops:</p>\n<p><code>let o = { x: 1, y: 2 };</code></p>\n<pre><code>for(const [name, value] of Object.entries(o)) {\n\nconsole.log(name, value); // Prints \"x 1\" and \"y 2\"\n\n}\n</code></pre>\n<p><strong>Note</strong>: The <code>Object.entries()</code> method returns an array of a given object's own enumerable string-keyed property <code>[key, value]</code> pairs, in the same order as that provided by a <code>for...in</code> loop. (The only important difference is that a <code>for...in</code> loop enumerates properties in the prototype chain as well).</p>\n<p>The list of variables on the left can include extra commas to skip certain values on the right</p>\n<p><code>[,x,,y] = [1,2,3,4];</code></p>\n<p>x == 2; y == 4</p>\n<p><strong>Note</strong>: the last comma does not stand for a value.</p>\n<p>To collect all unused or remaining values into a single variable when destructuring an array, use three dots <code>(...)</code>before the last variable name on the left-hand side</p>\n<p><code>let [x, ...y] = [1,2,3,4];</code></p>\n<p>y == [2,3,4]</p>\n<p><code>let [first, ...rest] = \"Hello\";</code></p>\n<p>first == “H”; rest ==[“e”,”l”,”l”,”o”]</p>\n<p>Destructuring assignment can also be performed when the righthand side is an object value.</p>\n<p><code>let transparent = {r: 0.0, g: 0.0, b: 0.0, a: 1.0};</code></p>\n<p><code>let {r, g, b} = transparent;</code></p>\n<p>r == 0.0; g == 0.0; b == 0.0</p>\n<p><code>const {sin, cos, tan} = Math;</code></p>\n<p>sin=Math.sin, cos=Math.cos, tan=Math.tan</p>\n<h3>Expressions and Operators</h3>\n<p>In JavaScript, the values <code>null</code>and <code>undefined</code>are the only two values that do not have properties. In a regular property access expression using . or [], you get a <code>TypeError</code> if the expression on the left evaluates to <code>null</code>or <code>undefined</code>. You can use <code>?.</code> and <code>?.[]</code> syntax to guard against errors of this type.</p>\n<p>You can also invoke a function using <code>?.()</code> instead of <code>()</code>.</p>\n<p>With the <code>new ?.()</code> invocation syntax, if the expression to the left of the <code>?.</code> evaluates to <code>null</code> or <code>undefined</code>, then the entire invocation expression evaluates to <code>undefined</code>and no exception is thrown.</p>\n<p>Write the function invocation using <code>?.(),</code> knowing that invocation will only happen if there is actually a value to be invoked</p>\n<pre><code>function square(x, log) {\n\nlog?.(x); // Call the function if there is one\n\nreturn x * x;\n\n}\n</code></pre>\n<p>Note that expression <code>x++</code> is not always the same as <code>x = x + 1</code>.The <code>++</code> operator never performs string concatenation: it always converts its operand to a number and increments it. If x is the string \"1\", <code>++x</code> is the number 2, but<code>x + 1</code> is the string \"11\".</p>\n<p>JavaScript objects are compared by reference, not by value. An object is equal to itself, but not to any other object. If two distinct objects have the same number of properties, with the same names and values, they are still not equal. Similarly, two arrays that have the same elements in the same order are not equal to each other.</p>\n<p><code>NaN</code>value is never equal to any other value, including itself! To check whether a value <code>x</code> is <code>NaN</code>, use <code>x !==</code>, or the global <code>isNaN()</code> function.</p>\n<p>If both values refer to the same object, array, or function, they are equal. If they refer to different objects, they are not equal, even if both objects have identical properties.</p>\n<h3>Evaluating Expressions</h3>\n<p>JavaScript has the ability to interpret strings of JavaScript source code, evaluating them to produce a value.</p>\n<p><code>eval(\"3+2\")</code></p>\n<p>Because of security issues, some web servers use the HTTP “Content-Security-Policy” header to disable<code>eval()</code> for an entire website.</p>\n<h3>First-Defined (??)</h3>\n<p>The first-defined operator <code>??</code> evaluates to its first defined operand: if its left operand is not <code>null</code> and not <code>undefined</code>, it returns that value.</p>\n<p><code>a ?? b</code> is equivalent to <code>(a !== null &#x26;&#x26; a !== undefined) ? a : b</code></p>\n<p><code>??</code> is a useful alternative to <code>||.</code> The problem with this idiomatic use is that zero, the empty string, and false are all <code>falsy</code>values that may be perfectly valid in some circumstances. In this code example, if <code>maxWidth</code>is zero, that value will be ignored. But if we change the <code>||</code> operator to <code>??</code>, we end up with an expression where zero is a valid value.</p>\n<p><code>let max = maxWidth || preferences.maxWidth || 500;</code></p>\n<p><code>let max = maxWidth ?? preferences.maxWidth ?? 500;</code></p>\n<h3>delete Operator</h3>\n<p>Deleting an array element leaves a “hole” in the array and does not change the array's length. The resulting array is sparse.</p>\n<h3>void Operator</h3>\n<p>Using the <code>void</code> operator makes sense only if the operand has side effects.</p>\n<p><code>let counter = 0;</code></p>\n<p><code>const increment = () => void counter++;</code></p>\n<p><code>increment()</code></p>\n<p>undefined</p>\n<p><code>counter</code></p>\n<p>1</p>\n<h3>Statements</h3>\n<p>Expressions are evaluated to produce a value, but statements are executed to make something happen.</p>\n<p>Expressions with side effects, such as assignments and function invocations, can stand alone as statements, and when used this way are known as expression statements.</p>\n<p>A similar category of statements are the declaration statements that declare new variables and define new functions.</p>\n<p>If a function does not have any side effects, there is no sense in calling it, unless it is part of a larger expression or an assignment statement.</p>\n<h3>for/of</h3>\n<p>The <code>for/of</code> loop works with iterable objects. Arrays, strings, sets, and maps are iterable.</p>\n<p>Array</p>\n<pre><code>let data = [1, 2, 3, 4, 5, 6, 7, 8, 9], sum = 0;\n\nfor(let element of data) {\n\nsum += element;\n\n}\n\nlet text = \"Na na na na na na na na\";\n\nlet wordSet = new Set(text.split(\" \"));\n\nlet unique = [];\n\nfor(let word of wordSet) {\n\nunique.push(word);\n\n}\n</code></pre>\n<p>String</p>\n<pre><code>let frequency = {};\n\nfor(let letter of \"mississippi\") {\n\nif (frequency[letter]) {\n\nfrequency[letter]++;\n\n}\n\nelse {\n\nfrequency[letter] = 1;\n\n}\n\n}\n</code></pre>\n<p>Map</p>\n<pre><code>let m = new Map([[1, \"one\"]]);\n\nfor(let [key, value] of m) {\n\nkey // => 1\n\nvalue // => \"one\"\n\n}\n</code></pre>\n<p>Objects are not (by default) iterable. Attempting to use <code>for/of</code> on a regular object throws a <code>TypeError</code> at runtime.</p>\n<p>If you want to iterate through the properties of an object, you can use the <code>for/in</code> loop.</p>\n<p>Note: <code>for/of</code> can be used on objects with <code>Object.entries</code> property, but it will not pick properties from object's prototype.</p>\n<h3>for/in</h3>\n<p><code>for/in</code> loop works with any object after the <code>in</code>.</p>\n<pre><code>for(let p in o) {\n\nconsole.log(o[p]);\n\n}\n</code></pre>\n<p>Note: this will enumerate array indexes, not values.</p>\n<pre><code>for(let i in a) console.log(i);\n</code></pre>\n<p>The <code>for/in</code> loop does not actually enumerate all properties of an object. It does not enumerate properties whose names are symbols. And of the properties whose names are strings, it only loops over the <code>enumerable</code>properties.</p>\n<h3>with</h3>\n<p>The with statement runs a block of code as if the properties of a specified object were variables in scope for that code.</p>\n<p>The <code>with</code>statement is forbidden in strict mode and should be considered deprecated in non-strict mode: avoid using it whenever possible.</p>\n<pre><code>document.forms[0].address.value\n\nwith(document.forms[0]) {\n\nname.value = \"\";\n\naddress.value = \"\";\n\nemail.value = \"\";\n\n}\n</code></pre>\n<h3>debugger</h3>\n<p>If a debugger program is available and is running, then an implementation may (but is not required to) perform some kind of debugging action.</p>\n<p>In practice, this statement acts like a breakpoint: execution of JavaScript code stops, and you can use the debugger to print variables' values, examine the call stack, and so on.</p>\n<p>Note that it is not enough to have a debugger available: the debugger statement won't start the debugger for you. If you're using a web browser and have the developer tools console open, however, this statement will cause a breakpoint.</p>\n<h3>use strict</h3>\n<p>Strict mode is a restricted subset of the language that fixes important language deficiencies and provides stronger error checking and increased security.</p>\n<p>The differences between strict mode and non-strict mode are the following:</p>\n<p>· The <code>with</code>statement is not allowed in strict mode.</p>\n<p>· In strict mode, all variables must be declared: a <code>ReferenceError</code>is thrown if you assign a value to an identifier that is not a declared variable, function, function parameter, catch clause parameter, or property of the global object.</p>\n<p>· In non-strict mode, this implicitly declares a global variable by adding a new property to the global object.</p>\n<p>· In strict mode, functions invoked as functions (rather than as methods) have a <code>this</code>value of undefined. (In non-strict mode, functions invoked as functions are always passed the global object as their <code>this</code>value.)</p>\n<p>· A function is invoked with <code>call()</code>or <code>apply()</code> , the <code>this</code>value is exactly the value passed as the first argument to <code>call()</code> or <code>apply()</code>. (In non-strict mode, <code>null</code>and <code>undefined</code>values are replaced with the global object and non-object values are converted to objects.)</p>\n<p>· In strict mode, assignments to non-writable properties and attempts to create new properties on non-extensible objects throw a <code>TypeError</code>. (In non-strict mode, these attempts fail silently.)</p>\n<p>· In strict mode, code passed to <code>eval()</code>cannot declare variables or define functions in the caller's scope as it can in non-strict mode. Instead, variable and function definitions live in a new scope created for the <code>eval()</code>. This scope is discarded when the <code>eval()</code> returns.</p>\n<p>· In strict mode, the Arguments object in a function holds a static copy of the values passed to the function. In non-strict mode, the Arguments object has “magical” behavior in which elements of the array and named function parameters both refer to the same value.</p>\n<p>· In strict mode, a <code>SyntaxError</code>is thrown if the <code>delete</code>operator is followed by an unqualified identifier such as a variable, function, or function parameter. (In non-strict mode, such a <code>delete</code>expression does nothing and evaluates to false.)</p>\n<p>· In strict mode, an attempt to delete a non-configurable property throws a <code>TypeError</code>. (In non-strict mode, the attempt fails and the delete expression evaluates to false.)</p>\n<p>· In strict mode, it is a syntax error for an object literal to define two or more properties by the same name. (In non-strict mode, no error occurs.)</p>\n<h3>Objects</h3>\n<p>In addition to its name and value, each property has three property attributes:</p>\n<p>· The <code>writable</code>attribute specifies whether the value of the property can be set.</p>\n<p>· The <code>enumerable</code>attribute specifies whether the property name is returned by a <code>for/in</code> loop.</p>\n<p>· The <code>configurable</code>attribute specifies whether the property can be deleted and whether its attributes can be altered.</p>\n<h3>Prototypes</h3>\n<p>All objects created by object literals have the same prototype object, <code>Object.prototype.</code></p>\n<p>Objects created using the <code>new</code>keyword and a constructor invocation use the value of the prototype property of the constructor function as their prototype.</p>\n<p>Object created by <code>new Object()</code> inherits from <code>Object.prototype</code>, just as the object created by <code>{}</code> does. Similarly, the object created by <code>new Array()</code> uses <code>Array.prototype</code> as its prototype, and the object created by<code>new Date()</code> uses <code>Date.prototype</code> as its prototype.</p>\n<p>Almost all objects have a prototype, but only a relatively small number of objects have a <code>prototype</code>property. It is these objects with prototype properties that define the prototypes for all the other objects.</p>\n<p>Most built-in constructors (and most user-defined constructors) have a prototype that inherits from <code>Object.prototype</code>.</p>\n<p><code>Date.prototype</code> inherits properties from <code>Object.prototype</code>, so a Date object created by <code>new Date()</code> inherits properties from both <code>Date.prototype</code> and <code>Object.prototype</code>. This linked series of prototype objects is known as a prototype chain.</p>\n<h3>Creating Objects</h3>\n<p>Objects can be created with object literals, with the <code>new</code> keyword, and with the <code>Object.create()</code> function.</p>\n<p>Literal</p>\n<p><code>let empty = {};</code></p>\n<p><code>let point = { x: 0, y: 0 };</code></p>\n<pre><code>let book = {\n\n\"main title\": \"JavaScript\",\n\n\"sub-title\": \"The Definitive Guide\",\n\nfor: \"all audiences\",\n\nauthor: {\n\nfirstname: \"David\", .\n\nsurname: \"Flanagan\"\n\n}\n\n};\n</code></pre>\n<p><code>new</code></p>\n<p><code>let o = new Object();</code><br>\n<code>let a = new Array();</code><br>\n<code>let d = new Date();</code><br>\n<code>let r = new Map();</code></p>\n<p><code>Object.create</code></p>\n<p><code>let o3 = Object.create(Object.prototype);</code></p>\n<p>Use <code>Object.create</code> to guard against accidental modifications:</p>\n<pre><code>let o = { x: \"don't change this value\" };\n\nlibrary.function(Object.create(o));\n</code></pre>\n<p>Note: the library function can modify the passed in object, but not the original <code>o</code> object</p>\n<h3>Access Object Properties with an array ([]) notation</h3>\n<pre><code>let addr = \"\";\n\nfor(let i = 0; i &#x3C; 4; i++) {\n\naddr += customer[`address${i}`] + \"\\n\";\n\n}\n</code></pre>\n<h3>Inheritance</h3>\n<p><code>let o = {};</code></p>\n<p><code>o.x = 1;</code></p>\n<p><code>let p = Object.create(o);</code></p>\n<p><code>p.y = 2;</code></p>\n<p><code>let q = Object.create(p);</code></p>\n<p><code>q.z = 3;</code></p>\n<p>Property <code>x</code> and <code>y</code> available on object <code>q</code></p>\n<p><code>q.x + q.y</code></p>\n<h3>How to query for property which may be undefined</h3>\n<p><code>surname = book &#x26;&#x26; book.author &#x26;&#x26; book.author.surname;</code></p>\n<p><code>let surname = book?.author?.surname;</code></p>\n<h3>Deleting properties</h3>\n<p>The <code>delete</code> operator only deletes own properties, not inherited ones. (To delete an inherited property, you must delete it from the prototype object in which it is defined. Doing this affects every object that inherits from that prototype.)</p>\n<p><code>delete</code> does not remove properties that have a <code>configurable</code>attribute of false.</p>\n<p>Certain properties of built-in objects are non-configurable, as are properties of the global object created by variable declaration and function declaration.</p>\n<p><code>delete Object.prototype</code></p>\n<p>false: property is non-configurable</p>\n<p><code>var x = 1;</code></p>\n<p><code>delete globalThis.x</code></p>\n<p>false: can't delete <code>this</code>property</p>\n<p><code>function f() {}</code></p>\n<p><code>delete globalThis.f</code></p>\n<p>false</p>\n<p><code>globalThis.x = 1;</code></p>\n<p><code>delete globalThis.x</code></p>\n<p>true</p>\n<h3>Testing properties</h3>\n<p>To check whether an object has a property with a given name. You can do this with the <code>in</code> operator, with the <code>hasOwnProperty()</code> and <code>propertyIsEnumerable()</code> methods, or simply by querying the property</p>\n<p>( <code>!= undefined</code>).</p>\n<h3>in &#x26; query</h3>\n<p><code>let o = { x: 1 };</code></p>\n<p><code>\"x\" in o</code></p>\n<p>true</p>\n<p><code>o.x !== undefined</code></p>\n<p><code>\"y\" in o</code></p>\n<p>false</p>\n<p><code>o.y !== undefined</code></p>\n<p><code>\"toString\" in o</code></p>\n<p>true: o inherits a <code>toString</code>property</p>\n<p><code>o.toString !== undefined</code></p>\n<p>Advantage of using in: <code>in</code> can distinguish between properties that do not exist and properties that exist but have been set to <code>undefined</code>.</p>\n<h3>hasOwnProperty</h3>\n<p><code>let o = { x: 1 };</code></p>\n<p><code>o.hasOwnProperty(\"x\")</code></p>\n<p>true</p>\n<p><code>o.hasOwnProperty(\"y\")</code></p>\n<p>false</p>\n<p><code>o.hasOwnProperty(\"toString\")</code></p>\n<p>false: toString is an inherited property</p>\n<p>The <code>propertyIsEnumerable()</code> returns true only if the named property is an own property and its <code>enumerable</code> attribute is true.</p>\n<p><code>let o = { x: 1 };</code></p>\n<p><code>o.propertyIsEnumerable(\"x\")</code></p>\n<p>true</p>\n<p><code>o.propertyIsEnumerable(\"toString\")</code></p>\n<p>false: not an own property</p>\n<p><code>Object.prototype.propertyIsEnumerable(\"toString\")</code></p>\n<p>false: not enumerable</p>\n<h3>Enumerating properties</h3>\n<p>To guard against enumerating inherited properties with <code>for/in</code>, you can add an explicit check inside the loop body:</p>\n<pre><code>for(let p in o) {\n\nif (!o.hasOwnProperty(p)) continue;\n\n}\n\nfor(let p in o) {\n\nif (typeof o[p] === \"function\") continue;\n\n}\n</code></pre>\n<p>Functions you can use to get an array of property names</p>\n<p>· <code>Object.keys()</code> returns an array of the names of the enumerable own properties of an object. It does not include non-enumerable properties, inherited properties, or properties whose name is a Symbol.</p>\n<p>· <code>Object.getOwnPropertyNames()</code> works like <code>Object.keys()</code>but returns an array of the names of nonenumerable own properties as well.</p>\n<p>· <code>Object.getOwnPropertySymbols()</code> returns own properties whose names are Symbols, whether or not they are enumerable.</p>\n<p>· <code>Reflect.ownKeys()</code> returns all own property names, both enumerable and non-enumerable, and both string and Symbol.</p>\n<h3>Extending Objects</h3>\n<p>To copy the properties of one object to another object</p>\n<pre><code>let target = {x: 1}, source = {y: 2, z: 3};\n\nfor(let key of Object.keys(source)) {\n\ntarget[key] = source[key];\n\n}\n</code></pre>\n<p>One reason to assign properties from one object into another is when you have an object that defines default values for many properties and you want to copy those default properties into another object if a property by that name does not already exist in that object. Using <code>Object.assign()</code> naively will not do what you want:</p>\n<pre><code>Object.assign(o, defaults);\n</code></pre>\n<p>overwrites everything in o with defaults</p>\n<p>Instead, use one of the following:,</p>\n<p><code>o = Object.assign({}, defaults, o);</code></p>\n<p><code>o = {...defaults, ...o};</code></p>\n<h3>Serializing Objects</h3>\n<p>The functions <code>JSON.stringify()</code> and<code>JSON.parse()</code> serialize and restore JavaScript objects.</p>\n<p><code>let o = {x: 1, y: {z: [false, null, \"\"]}};</code></p>\n<p><code>let s = JSON.stringify(o);</code></p>\n<p>s == '{“x”:1,”y”:{“z”:[false,null,””]}}'</p>\n<p><code>let p = JSON.parse(s);</code></p>\n<p>p == {x: 1, y: {z: [false,null, “”]}}</p>\n<h3>Object methods</h3>\n<p><code>toString(), valueOf(), loLocaleString(), toJSON()</code></p>\n<p><code>let s = { x: 1, y: 1 }.toString();</code></p>\n<p>s == “[object Object]”</p>\n<h3>Extended Object Literal Syntax</h3>\n<h3>Shorthand Properties</h3>\n<pre><code>let x = 1, y = 2;\n\nlet o = {\n\nx: x,\n\ny: y\n\n};\n</code></pre>\n<p>←></p>\n<p><code>let x = 1, y = 2;</code><br>\n<code>let o = { x, y };</code></p>\n<h3>Computer Property Names</h3>\n<p><code>const PROPERTY_NAME = \"p1\";</code><br>\n<code>function computePropertyName() { return \"p\" + 2; }</code></p>\n<pre><code>let o = {};\n\no[PROPERTY_NAME] = 1;\n\no[computePropertyName()] = 2;\n</code></pre>\n<p>←></p>\n<pre><code>let p = {\n\n[PROPERTY_NAME]: 1,\n\n[computePropertyName()]: 2\n\n};\n</code></pre>\n<h3>Symbols as Property Names</h3>\n<pre><code>const extension = Symbol(\"my extension symbol\");\n\nlet o = {\n\n[extension]: {}\n\n};\n\no[extension].x = 0;\n</code></pre>\n<p>Two Symbols created with the same string argument are still different from one another.</p>\n<p>The point of Symbols is not security, but to define a safe extension mechanism for JavaScript objects. If you get an object from third-party code that you do not control and need to add some of your own properties to that object but want to be sure that your properties will not conflict with any properties that may already exist on the object, you can safely use Symbols as your property names.</p>\n<h3>Spread Operator</h3>\n<p>You can copy the properties of an existing object into a new object using the “spread operator” … inside an object literal:</p>\n<p><code>let position = { x: 0, y: 0 };</code><br>\n<code>let dimensions = { width: 100, height: 75 };</code><br>\n<code>let rect = { ...position, ...dimensions };</code><br>\n<code>rect.x + rect.y + rect.width + rect.height</code></p>\n<h3>Shorthand Methods</h3>\n<pre><code>let square = {\n\narea: function() {\n\nreturn this.side * this.side; },\n\nside: 10\n\n};\n</code></pre>\n<p>←></p>\n<pre><code>let square = {\n\narea() {\n\nreturn this.side * this.side; },\n\nside: 10\n\n};\n</code></pre>\n<p>When you write a method using this shorthand syntax, the property name can take any of the forms that are legal in an object literal: in addition to a regular JavaScript identifier like the name area above, you can also use string literals and computed property names, which can include Symbol property names:</p>\n<pre><code>const METHOD_NAME = \"m\";\n\nconst symbol = Symbol();\n\nlet weirdMethods = {\n\n\"method With Spaces\"(x) { return x + 1; },\n\n[METHOD_NAME](x) { return x + 2; },\n\n[symbol](x) { return x + 3; }\n\n};\n</code></pre>\n<p><code>weirdMethods[\"method With Spaces\"](1)</code></p>\n<p>2</p>\n<p><code>weirdMethods[METHOD_NAME](1)</code></p>\n<p>3</p>\n<p><code>weirdMethods[symbol](1)</code></p>\n<p>4</p>\n<h3>Property Getters and Setters</h3>\n<pre><code>let o = {\n\ndataProp: value,\n\nget accessorProp() { return this.dataProp; },\n\nset accessorProp(value) { this.dataProp = value; }\n\n};\n</code></pre>\n<h3>Arrays</h3>\n<h3>Creating Arrays</h3>\n<p>· Array literals</p>\n<p>· The … spread operator on an iterable object</p>\n<p>· The <code>Array()</code> constructor</p>\n<p>· The <code>Array.of()</code> and <code>Array.from()</code> factory methods</p>\n<h3>Array literals</h3>\n<p><code>let empty = [];</code></p>\n<p><code>let primes = [2, 3, 5, 7, 11];</code></p>\n<p><code>let misc = [ 1.1, true, \"a\", ];</code></p>\n<p><code>let b = [[1, {x: 1, y: 2}], [2, {x: 3, y: 4}]];</code></p>\n<p>If an array literal contains multiple commas in a row, with no value between, the array is sparse</p>\n<p><code>let count = [1,,3];</code></p>\n<p><code>let undefs = [,,];</code></p>\n<p>Array literal syntax allows an optional trailing comma, so <code>[,,]</code> has a length of 2, not 3.</p>\n<h3>The Spread Operator</h3>\n<p><code>let a = [1, 2, 3];</code></p>\n<p><code>let b = [0, ...a, 4];</code></p>\n<p>[0, 1, 2, 3, 4]</p>\n<p>create a copy of an array — modifying the copy does not change the original</p>\n<p><code>let original = [1,2,3];</code><br>\n<code>let copy = [...original];</code></p>\n<p><code>let digits = [...\"0123456789ABCDEF\"];</code></p>\n<p>[“0”,”1\",”2\",”3\",”4\",”5\",”6\",”7\",”8\",”9\",”A”,”B”,”C”,”D”,”E”,”F”]</p>\n<p><code>let letters = [...\"hello world\"];</code></p>\n<p>[“h”,”e”,”l”,”l””o”,””,”w”,”o””r”,”l”,”d”]</p>\n<p><code>[...new Set(letters)]</code></p>\n<p>[“h”,”e”,”l”,”o”,””,”w”,”r”,”d”]</p>\n<h3>Array.of()</h3>\n<p>When the <code>Array()</code> constructor function is invoked with one numeric argument, it uses that argument as an array length. But when invoked with more than one numeric argument, it treats those arguments as elements for the array to be created. This means that the <code>Array()</code> constructor cannot be used to create an array with a single numeric element.</p>\n<p><code>Array.of()</code></p>\n<p>[]</p>\n<p><code>Array.of(10)</code></p>\n<p>[10]</p>\n<p><code>Array.of(1,2,3)</code></p>\n<p>[1, 2, 3]</p>\n<h3>Array.from()</h3>\n<p>It is also a simple way to make a copy of an array:</p>\n<p><code>let copy = Array.from(original);</code></p>\n<p><code>Array.from()</code> is also important because it defines a way to make a true-array copy of an array-like object. Array-like objects are non-array objects that have a numeric length property and have values stored with properties whose names happen to be integers.</p>\n<p><code>let truearray = Array.from(arraylike);</code></p>\n<p><code>Array.from()</code> also accepts an optional second argument. If you pass a function as the second argument, then as the new array is being built, each element from the source object will be passed to the function you specify, and the return value of the function will be stored in the array instead of the original value.</p>\n<h3>Reading and Writing Array Elements</h3>\n<p>What is special about arrays is that when you use property names that are non-negative integers , the array automatically maintains the value of the <code>length</code> property for you.</p>\n<p>JavaScript converts the numeric array index you specify to a string — the index 1 becomes the string “1”, then uses that string as a property name.</p>\n<p>It is helpful to clearly distinguish an array index from an object property name. All indexes are property names, but only property names that are integers between 0 and 231 are indexes. All arrays are objects, and you can create properties of any name on them. If you use properties that are array indexes, however, arrays have the special behavior of updating their <code>length</code> property as needed.</p>\n<p>Note that you can index an array using numbers that are negative or that are not integers. When you do this, the number is converted to a string, and that string is used as the property name. Since the name is not a non-negative integer, it is treated as a regular object property, not an array index.</p>\n<p><code>a[-1.23] = true;</code></p>\n<p>This creates a property named “-1.23”</p>\n<p><code>a[\"1000\"] = 0;</code></p>\n<p>This the 1001st element of the array</p>\n<p><code>a[1.000] = 1;</code></p>\n<p>Array index 1. Same as a[1] = 1;</p>\n<p>The fact that array indexes are simply a special type of object property name means that JavaScript arrays have no notion of an “out of bounds” error. When you try to query a nonexistent property of any object, you don't get an error; you simply get <code>undefined</code>.</p>\n<h3>Sparse Arrays</h3>\n<p>Sparse arrays can be created with the <code>Array()</code> constructor or simply by assigning to an array index larger than the current array length.</p>\n<p><code>a[1000] = 0;</code></p>\n<p>Assignment adds one element but sets length to 1001.</p>\n<p>you can also make an array sparse with the <code>delete</code> operator.</p>\n<p>Note that when you omit a value in an array literal (using repeated commas as in <code>[1,,3]</code>), the resulting array is sparse, and the omitted elements simply do not exist</p>\n<h3>Array Length</h3>\n<p>if you set the length property to a nonnegative integer <code>n</code> smaller than its current value, any array elements whose index is greater than or equal to n are deleted from the array.</p>\n<p><code>a = [1,2,3,4,5];</code></p>\n<p><code>a.length = 3;</code></p>\n<p>a is now [1,2,3].</p>\n<p><code>a.length = 0;</code></p>\n<p>Delete all elements. a is [].</p>\n<p><code>a.length = 5;</code></p>\n<p>Length is 5, but no elements, like <code>new Array(5)</code></p>\n<p>You can also set the length property of an array to a value larger than its current value. Doing this does not actually add any new elements to the array; it simply creates a sparse area at the end of the array.</p>\n<h3>Adding and Deleting Array Elements</h3>\n<p><code>let a = [];</code></p>\n<p><code>a[0] = \"zero\";</code></p>\n<p><code>a[1] = \"one\";</code></p>\n<p>add elements to it.</p>\n<p>You can also use the <code>push()</code> method to add one or more values to the end of an array.</p>\n<p>You can use the<code>unshift()</code> method to insert a value at the beginning of an array, shifting the existing array elements to higher indexes.</p>\n<p>The <code>pop()</code> method is the opposite of <code>push()</code>: it removes the last element of the array and returns it, reducing the length of an array by 1.</p>\n<p>Similarly, the <code>shift()</code> method removes and returns the first element of the array, reducing the length by 1 and shifting all elements down to an index one lower than their current index.</p>\n<p>You can delete array elements with the delete operator</p>\n<p><code>let a = [1,2,3];</code></p>\n<p><code>delete a[2];</code></p>\n<p>a now has no element at index 2</p>\n<p><code>2 in a</code></p>\n<p>false</p>\n<p><code>a.length</code></p>\n<p>3: delete does not affect array length</p>\n<h3>Iterating Arrays</h3>\n<p>The easiest way to loop through each of the elements of an array (or any iterable object) is with the <code>for/of</code>loop</p>\n<pre><code>let letters = [...\"Hello world\"];\n\nlet string = \"\";\n\nfor(let letter of letters) {\n\nstring += letter;\n\n}\n</code></pre>\n<p>It has no special behavior for sparse arrays and simply returns <code>undefined</code> for any array elements that do not exist.</p>\n<p>If you want to use a <code>for/of</code> loop for an array and need to know the index of each array element, use the <code>entries()</code> method of the array</p>\n<pre><code>let letters = [...\"Hello world\"];\n\nlet everyother = \"\";\n\nfor(let [index, letter] of letters.entries()) {\n\nif (index % 2 === 0) everyother += letter;\n\n}\n</code></pre>\n<p>Another good way to iterate arrays is with <code>forEach()</code>. This is not a new form of the for loop, but an array method that offers a functional approach to array iteration.</p>\n<pre><code>let letters = [...\"Hello world\"];\n\nlet uppercase = \"\";\n\nletters.forEach(letter => {\n\nuppercase += letter.toUpperCase();\n\n});\n</code></pre>\n<p>You can also loop through the elements of an array with a <code>for</code> loop.</p>\n<pre><code>for(let i = 0, len = letters.length; i &#x3C; len; i++) {\n\n// loop body\n\n}\n</code></pre>\n<h3>Multidimensional Arrays</h3>\n<h3>Create a multidimensional array</h3>\n<p><code>let table = new Array(10);</code></p>\n<pre><code>for(let i = 0; i &#x3C; table.length; i++) {\n\ntable[i] = new Array(10);\n\n}\n\nfor(let row = 0; row &#x3C; table.length; row++) {\n\nfor(let col = 0; col &#x3C; table[row].length; col++) {\n\ntable[row][col] = row * col;\n\n}\n\n}\n</code></pre>\n<h3>Array Methods</h3>\n<h3>Array Iterator Methods</h3>\n<p>First, all of these methods accept a function as their first argument and invoke that function once for each element (or some elements) of the array. If the array is sparse, the function you pass is not invoked for nonexistent elements. In most cases, the function you supply is invoked with three arguments: the value of the array element, the index of the array element, and the array itself.</p>\n<p>FOREACH()</p>\n<p><code>let data = [1,2,3,4,5], sum = 0;</code></p>\n<pre><code>data.forEach(value => { sum += value; });\n\ndata.forEach(function(v, i, a) {\n\na[i] = v + 1;\n\n});\n</code></pre>\n<p>15</p>\n<p>[2,3,4,5,6]</p>\n<p>MAP()</p>\n<p><code>let a = [1, 2, 3];</code><br>\n<code>a.map(x => x*x)</code></p>\n<p>[1, 4, 9]</p>\n<p>FILTER()</p>\n<p><code>let a = [5, 4, 3, 2, 1];</code><br>\n<code>a.filter(x => x &#x3C; 3)</code><br>\n<code>a.filter((x,i) => i % 2 === 0)</code></p>\n<p>[2, 1];</p>\n<p>[5, 3, 1];</p>\n<p>FIND()</p>\n<p>FINDINDEX()</p>\n<p><code>let a = [1,2,3,4,5];</code></p>\n<p><code>a.findIndex(x => x === 3)</code></p>\n<p><code>a.find(x => x % 5 === 0)</code></p>\n<p><code>a.find(x => x % 7 === 0)</code></p>\n<p>2</p>\n<p>5</p>\n<p>undefined</p>\n<p>EVERY()</p>\n<p>SOME()</p>\n<p><code>let a = [1,2,3,4,5];</code></p>\n<p><code>a.every(x => x &#x3C; 10)</code></p>\n<p><code>a.some(x => x % 2 === 0)</code></p>\n<p><code>a.some(isNaN)</code></p>\n<p>true</p>\n<p>true</p>\n<p>false</p>\n<p>REDUCE()</p>\n<p>ReduceRight()</p>\n<p>l<code>et a = [1,2,3,4,5];</code></p>\n<p><code>a.reduce((x,y) => x+y, 0)</code></p>\n<p><code>a.reduce((x,y) => x*y, 1)</code></p>\n<p><code>a.reduce((x,y) => (x > y) ? x : y)</code></p>\n<p>15</p>\n<p>120</p>\n<p>5</p>\n<p>Note that <code>map()</code> returns a new array: it does not modify the array it is invoked on. If that array is sparse, your function will not be called for the missing elements, but the returned array will be sparse in the same way as the original array: it will have the same length and the same missing elements.</p>\n<p>To close the gaps in a sparse array, you can do this:</p>\n<p><code>let dense = sparse.filter(() => true);</code></p>\n<p>And to close gaps and remove undefined and null elements, you can use filter, like this:</p>\n<p><code>a = a.filter(x => x !== undefined &#x26;&#x26; x !== null);</code></p>\n<p>Unlike <code>filter()</code>, however,<code>find()</code> and <code>findIndex()</code> stop iterating the first time the predicate finds an element. When that happens, <code>find()</code> returns the matching element, and <code>findIndex()</code> returns the index of the matching element. If no matching element is found,<code>find()</code> returns <code>undefined</code> and<code>findIndex()</code>returns -1.</p>\n<p>When you invoke <code>reduce()</code> with no initial value, it uses the first element of the array as the initial value.</p>\n<p><code>reduceRight()</code> works just like <code>reduce()</code>, except that it processes the array from highest index to lowest (right-to-left), rather than from lowest to highest. You might want to do this if the reduction operation has right-to-left associativity</p>\n<h3>Flattening arrays with <code>flat()</code> and <code>flatMap()</code></h3>\n<p><code>[1, [2, 3]].flat()</code></p>\n<p>[1, 2, 3]</p>\n<p><code>[1, [2, [3]]].flat()</code></p>\n<p>[1, 2, [3]]</p>\n<p><code>let a = [1, [2, [3, [4]]]];</code></p>\n<p><code>a.flat(1)</code></p>\n<p><code>a.flat(2)</code></p>\n<p><code>a.flat(3)</code></p>\n<p><code>a.flat(4)</code></p>\n<p>[1, 2, [3, [4]]]</p>\n<p>[1, 2, 3, [4]]</p>\n<p>[1, 2, 3, 4]</p>\n<p>[1, 2, 3, 4]</p>\n<p><code>let phrases = [\"hello world\", \"the definitive guide\"];</code><br>\n<code>let words = phrases.flatMap(phrase => phrase.split(\" \"));</code></p>\n<p>[“hello”, “world”, “the”, “definitive”, “guide”];</p>\n<p>Calling <code>a.flatMap(f)</code> is the same as (but more efficient than) <code>a.map(f).flat()</code>:</p>\n<h3>Adding arrays with concat()</h3>\n<p><code>let a = [1,2,3];</code></p>\n<p><code>a.concat(4, 5)</code></p>\n<p>[1,2,3,4,5]</p>\n<p><code>a.concat([4,5],[6,7])</code></p>\n<p>[1,2,3,4,5,6,7]</p>\n<h3>Stacks and Queues with push(), pop(), shift(), and unshift()</h3>\n<p>The <code>push()</code> and<code>pop()</code> methods allow you to work with arrays as if they were stacks. The <code>push()</code> method appends one or more new elements to the end of an array and returns the new length of the array.</p>\n<p>The <code>unshift()</code> and <code>shift()</code> methods behave much like <code>push()</code> and<code>pop()</code>, except that they insert and remove elements from the beginning of an array rather than from the end.</p>\n<p>You can implement a queue data structure by using <code>push()</code> to add elements at the end of an array and <code>shift()</code> to remove them from the start of the array. Note differences in <code>unshift</code>with single and multiple values.</p>\n<p><code>let a = [];</code></p>\n<p><code>a.unshift(1)</code></p>\n<p>[1]</p>\n<p><code>a.unshift(2)</code></p>\n<p>[2, 1]</p>\n<p><code>a = [];</code></p>\n<p><code>a.unshift(1,2)</code></p>\n<p>[1, 2]</p>\n<h3>Subarrays with <code>slice(), splice(), fill()</code>, and <code>copyWithin()</code></h3>\n<p>SLICE()</p>\n<p><code>let a = [1,2,3,4,5];</code></p>\n<p><code>a.slice(0,3);</code></p>\n<p><code>a.slice(3);</code></p>\n<p><code>a.slice(1,-1);</code></p>\n<p><code>a.slice(-3,-2);</code></p>\n<p>[1,2,3]</p>\n<p>[4,5]</p>\n<p>[2,3,4]</p>\n<p>[3]</p>\n<p>SPLICE</p>\n<p><code>let a = [1,2,3,4,5,6,7,8];</code></p>\n<p><code>a.splice(4)</code></p>\n<p><code>a.splice(1,2)</code></p>\n<p><code>a.splice(1,1)</code></p>\n<p><code>let a = [1,2,3,4,5];</code></p>\n<p><code>a.splice(2,0,\"a\",\"b\")</code></p>\n<p><code>a.splice(2,2,[1,2],3)</code></p>\n<p>[5,6,7,8]; <code>a</code> is now [1,2,3,4]</p>\n<p>[2,3]; a is now [1,4]</p>\n<p>[4]; a is now [1]</p>\n<p>[]; a is now [1,2,”a”,”b”,3,4,5]</p>\n<p>[“a”,”b”]; a is now [1,2,[1,2],3,3,4,5]</p>\n<p>FILL()</p>\n<p><code>let a = new Array(5);</code></p>\n<p><code>a.fill(0)</code></p>\n<p><code>a.fill(9, 1)</code></p>\n<p><code>a.fill(8, 2, -1)</code></p>\n<p>[0,0,0,0,0]</p>\n<p>[0,9,9,9,9]</p>\n<p>[0,9,8,8,9]</p>\n<p>COPYWITHIN()</p>\n<p><code>let a = [1,2,3,4,5];</code></p>\n<p><code>a.copyWithin(1)</code></p>\n<p><code>a.copyWithin(2, 3, 5)</code></p>\n<p><code>a.copyWithin(0, -2)</code></p>\n<p>[1,1,2,3,4]</p>\n<p>[1,1,3,4,4]</p>\n<p>[4,4,3,4,4]</p>\n<p><code>splice()</code> is a general-purpose method for inserting or removing elements from an array.<code>splice()</code> can delete elements from an array, insert new elements into an array, or perform both operations at the same time.</p>\n<p>The first argument to <code>splice()</code> specifies the array position at which the insertion and/or deletion is to begin. The second argument specifies the number of elements that should be deleted from (spliced out of) the array.</p>\n<p>Unlike <code>concat(), splice()</code> inserts arrays themselves, not the elements of those arrays.</p>\n<p><code>copyWithin()</code> copies a slice of an array to a new position within the array. It modifies the array in place and returns the modified array, but it will not change the length of the array.</p>\n<h3>Array Searching and Sorting Methods</h3>\n<p>INDEXOF()<br>\nLASTINDEXOF()</p>\n<p><code>let a = [0,1,2,1,0];</code></p>\n<p><code>a.indexOf(1)</code></p>\n<p><code>a.lastIndexOf(1)</code></p>\n<p><code>a.indexOf(3)</code></p>\n<p>1</p>\n<p>3</p>\n<p>-1</p>\n<p>SORT()</p>\n<p><code>let a = [33, 4, 1111, 222];</code></p>\n<p><code>a.sort();</code></p>\n<p><code>a.sort((a,b) => a - b);</code></p>\n<p>Case-insensitive sort</p>\n<pre><code>let a = [\"ant\", \"Bug\", \"cat\", \"Dog\"];\n\na.sort(); // a == [\"Bug\",\"Dog\",\"ant\",\"cat\"];\n\na.sort(function(s,t) {\n\nlet a = s.toLowerCase();\n\nlet b = t.toLowerCase();\n\nif (a &#x3C; b) return -1;\n\nif (a > b) return 1;\n\nreturn 0;\n\n});\n</code></pre>\n<p><code>[1111, 222, 33, 4];</code></p>\n<p><code>[4, 33, 222, 1111]</code></p>\n<p>REVERSE()</p>\n<p><code>let a = [1,2,3];</code><br>\n<code>a.reverse();</code></p>\n<p>[3,2,1]</p>\n<p><code>indexOf()</code> and <code>lastIndexOf()</code> compare their argument to the array elements using the equivalent of the === operator. If your array contains objects instead of primitive values, these methods check to see if two references both refer to exactly the same object. If you want to actually look at the content of an object, try using the <code>find()</code> method with your own custom predicate function instead.</p>\n<p><code>indexOf()</code> and <code>lastIndexOf()</code> take an optional second argument that specifies the array index at which to begin the search. Negative values are allowed for the second argument and are treated as an offset from the end of the array.</p>\n<p><code>indexOf()</code> will not detect the NaN value in an array, but <code>includes()</code> will</p>\n<p>When <code>sort()</code> is called with no arguments, it sorts the array elements in alphabetical order. To sort an array into some order other than alphabetical, you must pass a comparison function as an argument to <code>sort()</code>.</p>\n<h3>Array to String Conversions</h3>\n<p>The <code>join()</code> method converts all the elements of an array to strings and concatenates them, returning the resulting string.</p>\n<p><code>let a = [1, 2, 3];</code></p>\n<p><code>a.join()</code></p>\n<p><code>a.join(\" \")</code></p>\n<p><code>a.join(\"\")</code></p>\n<p>“1,2,3”</p>\n<p>“1 2 3”</p>\n<p>“123”</p>\n<p><code>let b = new Array(10);</code></p>\n<p><code>b.join(\"-\")</code></p>\n<p>“ — — — — -”</p>\n<p>Arrays, like all JavaScript objects, have a <code>toString()</code> method. For an array, this method works just like the <code>join()</code> method with no arguments:</p>\n<p><code>[1,2,3].toString()</code></p>\n<p>“1,2,3”</p>\n<p><code>[\"a\", \"b\", \"c\"].toString()</code></p>\n<p>“a,b,c”</p>\n<p><code>[1, [2,\"c\"]].toString()</code></p>\n<p>“1,2,c”</p>\n<h3>Static Array Functions</h3>\n<p><code>Array.isArray([])</code></p>\n<p>true</p>\n<p><code>Array.isArray({})</code></p>\n<p>false</p>\n<h3>Array-Like Objects</h3>\n<p>It is often perfectly reasonable to treat any object with a numeric <code>length</code> property and corresponding non-negative integer properties as a kind of array.</p>\n<pre><code>let a = {};\n\nlet i = 0;\n\nwhile(i &#x3C; 10) {\n\na[i] = i * i;\n\ni++;\n\n}\n\na.length = i;\n\n// Now iterate through it as if it were a real array\n\nlet total = 0;\n\nfor(let j = 0; j &#x3C; a.length; j++) {\n\ntotal += a[j];\n\n}\n</code></pre>\n<p>Since array-like objects do not inherit from <code>Array.prototype</code>, you cannot invoke array methods on them directly. You can invoke them indirectly using the <code>Function.call</code> method.</p>\n<p><code>let a = {\"0\": \"a\", \"1\": \"b\", \"2\": \"c\", length: 3};</code></p>\n<p>// An array-like object</p>\n<p><code>Array.prototype.join.call(a, \"+\")</code></p>\n<p>“a+b+c”</p>\n<p><code>Array.prototype.join.call(\"JavaScript\", \" \")</code></p>\n<p>“J a v a S c r i p t”</p>\n<p><code>Array.prototype.map.call(a, x => x.toUpperCase())</code></p>\n<p>[“A”,”B”,”C”]</p>\n<p><code>Array.from(a)</code></p>\n<p>[“a”,”b”,”c”]</p>\n<h3>Strings as Arrays</h3>\n<p><code>let s = \"test\";</code></p>\n<p><code>s.charAt(0)</code></p>\n<p>t</p>\n<p><code>s[1]</code></p>\n<p>e</p>\n<h3>Functions</h3>\n<p>In addition to the arguments, each invocation has another value — the invocation context — that is the value of the <code>this</code> keyword.</p>\n<h3>Function Declarations</h3>\n<pre><code>function printprops(o) {\n\nfor(let p in o) {\n\nconsole.log(`${p}: ${o[p]}\\n`);\n\n}\n\n}\n</code></pre>\n<p>Function declaration statements are “hoisted” to the top of the enclosing script, function, or block so that functions defined in this way may be invoked from code that appears before the definition.</p>\n<h3>Function Expressions</h3>\n<p><code>const square = function(x) { return x*x; };</code></p>\n<pre><code>const f = function fact(x) {\n\nif (x &#x3C;= 1) return 1;\n\nreturn x * fact(x-1);\n\n}\n</code></pre>\n<p>Function expressions can include names, which is useful for recursion</p>\n<p><code>[3,2,1].sort(function(a,b) { return a - b; });</code></p>\n<p>Function expressions can also be used as arguments to other functions</p>\n<p><code>let tensquared = (function(x) {return x*x;}(10));</code></p>\n<p>Function expressions are sometimes defined and immediately invoked</p>\n<h3>Arrow Functions</h3>\n<p><code>const sum = (x, y) => { return x + y; };</code></p>\n<p><code>const sum = (x, y) => x + y;</code></p>\n<p>no need for <code>return</code></p>\n<p><code>const polynomial = x => x*x + 2*x + 3;</code></p>\n<p>omit parens with single parameter</p>\n<p><code>const constantFunc = () => 42;</code></p>\n<p>usage for no params</p>\n<p>If the body of your arrow function is a single return statement but the expression to be returned is an object literal, then you have to put the object literal inside parentheses to avoid syntactic ambiguity between the curly braces of a function body and the curly braces of an object literal</p>\n<p><code>const f = x => { return { value: x }; };</code></p>\n<p>good</p>\n<p><code>const g = x => ({ value: x });</code></p>\n<p>good</p>\n<p><code>const h = x => { value: x };</code></p>\n<p>returns nothing</p>\n<p><code>const i = x => { v: x, w: x };</code></p>\n<p>syntax error</p>\n<p>Arrow functions differ from functions defined in other ways in one critical way: they inherit the value of the <code>this</code> keyword from the environment in which they are defined rather than defining their own invocation context as functions defined in other ways do.</p>\n<h3>Nested Functions</h3>\n<pre><code>function hypotenuse(a, b) {\n\nfunction square(x) { return x*x; }\n\nreturn Math.sqrt(square(a) + square(b));\n\n}\n</code></pre>\n<h3>Invoking Functions</h3>\n<p>For function invocation in non-strict mode, the invocation context (the <code>this</code> value) is the global object. In strict mode, however, the invocation context is <code>undefined</code>.</p>\n<p><code>const strict = (function() { return !this; }())</code></p>\n<p>Determine if we're in strict mode</p>\n<h3>Constructor Invocation</h3>\n<p>A constructor invocation creates a new, empty object that inherits from the object specified by the <code>prototype</code>property of the constructor.</p>\n<h3>Indirect invocation</h3>\n<p>JavaScript functions are objects, and like all JavaScript objects, they have methods. Two of these methods, <code>call()</code> and <code>apply()</code>, invoke the function indirectly. Both methods allow you to explicitly specify the <code>this</code>value for the invocation, which means you can invoke any function as a method of any object, even if it is not actually a method of that object.</p>\n<h3>Function Arguments and Parameters</h3>\n<h3>Optional Parameters and Defaults</h3>\n<p>When a function is invoked with fewer arguments than declared parameters, the additional parameters are set to their default value, which is normally <code>undefined</code>.</p>\n<pre><code>function getPropertyNames(o, a) {\n\na = a || [];\n\nfor(let property in o) a.push(property);\n\nreturn a;\n\n}\n\nfunction getPropertyNames(o, a = []) {\n\nfor(let property in o) a.push(property);\n\nreturn a;\n\n}\n</code></pre>\n<p>One interesting case is that, for functions with multiple parameters, you can use the value of a previous parameter to define the default value of the parameters that follow it</p>\n<pre><code>const rectangle = (width, height = width*2) => ({width, height});\n</code></pre>\n<h3>Rest Parameters and Variable-Length Argument Lists</h3>\n<p>Rest parameters enable us to write functions that can be invoked with arbitrarily more arguments than parameters.</p>\n<pre><code>function max(first=-Infinity, ...rest) {\n\nlet maxValue = first;\n\nfor(let n of rest) {\n\nif (n > maxValue) {\n\nmaxValue = n;\n\n}\n\n}\n\nreturn maxValue;\n\n}\n\nmax(1, 10, 100, 2, 3, 1000, 4, 5, 6)\n</code></pre>\n<p>1000</p>\n<p>within the body of a function, the value of a rest parameter will always be an array. The array may be empty, but a rest parameter will never be <code>undefined</code>.</p>\n<p>This type of function is called variadic functions, variable arity functions, or vararg functions.</p>\n<h3>The Arguments Object</h3>\n<p>Within the body of any function, the identifier <code>arguments</code> refers to the Arguments object for that invocation.</p>\n<pre><code>function max(x) {\n\nlet maxValue = -Infinity;\n\nfor(let i = 0; i &#x3C; arguments.length; i++) {\n\nif (arguments[i] > maxValue)\n\nmaxValue = arguments[i];\n\n}\n\nreturn maxValue;\n\n}\n\nmax(1, 10, 100, 2, 3, 1000, 4, 5, 6)\n</code></pre>\n<p>1000</p>\n<p>you should avoid using it in any new code you write.</p>\n<h3>The Spread Operator for Function Calls</h3>\n<pre><code>let numbers = [5, 2, 10, -1, 9, 100, 1];\n\nMath.min(...numbers)\n</code></pre>\n<p>-1</p>\n<pre><code>function timed(f) {\n\nreturn function(...args) {\n\nconsole.log(`Entering function ${f.name}`);\n\nlet startTime = Date.now();\n\ntry {\n\nreturn f(...args);\n\n}\n\nfinally {\n\nconsole.log(`Exiting ${f.name} after ${Date.now() - startTime}ms`);\n\n}\n\n};\n\n}\n\n// Compute the sum of the numbers between 1 and n by brute force\n\nfunction benchmark(n) {\n\nlet sum = 0;\n\nfor(let i = 1; i &#x3C;= n; i++) sum += i;\n\nreturn sum;\n\n}\n\n// Now invoke the timed version of that test function\n\ntimed(benchmark)(1000000)\n</code></pre>\n<h3>Destructuring Function Arguments into Parameters</h3>\n<pre><code>function vectorAdd(v1, v2) {\n\nreturn [v1[0] + v2[0], v1[1] + v2[1]];\n\n}\n\nvectorAdd([1,2], [3,4])\n</code></pre>\n<p>←></p>\n<pre><code>function vectorAdd([x1,y1], [x2,y2]) {\n\nreturn [x1 + x2, y1 + y2];\n\n}\n\nvectorAdd([1,2], [3,4])\n\nfunction vectorMultiply({x, y}, scalar) {\n\nreturn { x: x*scalar, y: y*scalar };\n\n}\n\nvectorMultiply({x: 1, y: 2}, 2)\n</code></pre>\n<p>←></p>\n<pre><code>function vectorMultiply({x,y}, scalar) {\n\nreturn { x: x*scalar, y: y*scalar};\n\n}\n\nvectorMultiply({x: 1, y: 2}, 2)\n</code></pre>\n<h3>Argument Types</h3>\n<p>Adding code to check the types of arguments</p>\n<pre><code>function sum(a) {\n\nlet total = 0;\n\nfor(let element of a) {\n\nif (typeof element !== \"number\") {\n\nthrow new TypeError(\"sum(): elements must be numbers\");\n\n}\n\ntotal += element;\n\n}\n\nreturn total;\n\n}\n</code></pre>\n<p><code>sum([1,2,3])</code></p>\n<p>6</p>\n<p><code>sum(1, 2, 3);</code></p>\n<p><code>TypeError</code>: 1 is not iterable</p>\n<p><code>sum([1,2,\"3\"]);</code></p>\n<p><code>TypeError</code>: element 2 is not a number</p>\n<h3>Functions as Values</h3>\n<pre><code>function square(x) { return x * x; }\n</code></pre>\n<p><code>let s = square;</code></p>\n<p><code>square(4)</code></p>\n<p>16</p>\n<p><code>s(4)</code></p>\n<p>16</p>\n<p>Functions can also be assigned to object properties rather than variables.</p>\n<p><code>let o = {square: function(x) { return x*x; }};</code></p>\n<p><code>let y = o.square(16);</code></p>\n<p>256</p>\n<p>Functions don't even require names at all, as when they're assigned to array elements:</p>\n<p><code>let a = [x => x*x, 20];</code></p>\n<p><code>a[0](a[1])</code></p>\n<p>400</p>\n<p><code>a[0]</code> accesses first element of the array, which is \"<code>x => x*x</code>\", <code>(a[1])</code> passes parameter, which is 20.</p>\n<h3>Examples of using functions as data</h3>\n<pre><code>function add(x,y) { return x + y; }\n\nfunction subtract(x,y) { return x - y; }\n\nfunction multiply(x,y) { return x * y; }\n\nfunction divide(x,y) { return x / y; }\n\nfunction operate(operator, operand1, operand2) {\n\nreturn operator(operand1, operand2);\n\n}\n</code></pre>\n<p><code>let i = operate(add, operate(add, 2, 3), operate(multiply, 4,5));</code></p>\n<p><code>(2+3) + (4*5):</code></p>\n<p>or:</p>\n<pre><code>const operators = {\n\nadd: (x,y) => x+y,\n\nsubtract: (x,y) => x-y,\n\nmultiply: (x,y) => x*y,\n\ndivide: (x,y) => x/y,\n\npow: Math.pow\n\n};\n\nfunction operate2(operation, operand1, operand2) {\n\nif (typeof operators[operation] === \"function\") {\n\nreturn operators[operation](operand1, operand2);\n\n}\n\nelse throw \"unknown operator\";\n\n}\n</code></pre>\n<p><code>operate2(\"add\", \"hello\", operate2(\"add\", \" \", \"world\"))</code></p>\n<p>// “hello world”</p>\n<p><code>operate2(\"pow\", 10, 2)</code></p>\n<p>100</p>\n<h3>Defining Your Own Function Properties</h3>\n<p>When a function needs a “static” variable whose value persists across invocations, it is often convenient to use a property of the function itself.</p>\n<p>For example, suppose you want to write a function that returns a unique integer whenever it is invoked. The function must never return the same value twice. In order to manage this, the function needs to keep track of the values it has already returned, and this information must persist across function invocations.</p>\n<pre><code>uniqueInteger.counter = 0;\n\nfunction uniqueInteger() {\n\nreturn uniqueInteger.counter++;\n\n}\n\nuniqueInteger()\n</code></pre>\n<p>0</p>\n<pre><code>uniqueInteger()\n</code></pre>\n<p>1</p>\n<p>Compute factorials and cache results as properties of the function itself.</p>\n<pre><code>function factorial(n) {\n\nif (Number.isInteger(n) &#x26;&#x26; n > 0) {\n\nif (!(n in factorial)) {\n\nfactorial[n] = n * factorial(n-1);\n\n}\n\nreturn factorial[n];\n\n}\n\nelse {\n\nreturn NaN;\n\n}\n\n}\n\nfactorial[1] = 1;\n</code></pre>\n<p>Initialize the cache to hold this base case.</p>\n<pre><code>factorial(6)\n</code></pre>\n<p>720</p>\n<pre><code>factorial[5]\n</code></pre>\n<p>120; the call above caches this value</p>\n<h3>Functions as Namespaces</h3>\n<p>Variables declared within a function are not visible outside of the function. For this reason, it is sometimes useful to define a function simply to act as a temporary namespace in which you can define variables without cluttering the global namespace.</p>\n<p>Variables that would have been global become local to the function. Following code defines only a single global variable: the function name <code>chunkNamespace</code>.</p>\n<pre><code>function chunkNamespace() {\n\n// Chunk of code goes here\n\n// Any variables defined in the chunk are local to this function\n\n// instead of cluttering up the global namespace.\n\n}\n\nchunkNamespace();\n</code></pre>\n<p>If defining even a single property is too much, you can define and invoke an anonymous function in a single expression — IIEF (immediately invoked function expression)</p>\n<pre><code>(function() {\n\n// chunkNamespace() function rewritten as an unnamed expression.\n\n// Chunk of code goes here\n\n}());\n</code></pre>\n<h3>Closures</h3>\n<p>JavaScript uses lexical scoping. This means that functions are executed using the variable scope that was in effect when they were defined, not the variable scope that is in effect when they are invoked.</p>\n<p>In order to implement lexical scoping, the internal state of a JavaScript function object must include not only the code of the function but also a reference to the scope in which the function definition appears.</p>\n<p>This combination of a function object and a scope (a set of variable bindings) in which the function's variables are resolved is called a closure.</p>\n<p>Closures become interesting when they are invoked from a different scope than the one they were defined in. This happens most commonly when a nested function object is returned from the function within which it was defined.</p>\n<pre><code>let scope = \"global scope\";\n\nfunction checkscope() {\n\nlet scope = \"local scope\";\n\nfunction f() { return scope; }\n\nreturn f();\n\n}\n</code></pre>\n<p><code>checkscope()</code></p>\n<p>“local scope”</p>\n<pre><code>let scope = \"global scope\";\n\nfunction checkscope() {\n\nlet scope = \"local scope\";\n\nfunction f() { return scope; }\n\nreturn f;\n\n}\n</code></pre>\n<p><code>let s = checkscope()();</code></p>\n<p>“local scope”</p>\n<p>Closures capture the local variables of a single function invocation and can use those variables as private state.</p>\n<pre><code>let uniqueInteger = (function() {\n\nlet counter = 0;\n\nreturn function() { return counter++; };\n\n}());\n</code></pre>\n<p><code>uniqueInteger()</code></p>\n<p>0</p>\n<p><code>uniqueInteger()</code></p>\n<p>1</p>\n<p>it is the return value of the function that is being assigned to <code>uniqueInteger</code>.</p>\n<p>Private variables like counter need not be exclusive to a single closure: it is perfectly possible for two or more nested functions to be defined within the same outer function and share the same scope.</p>\n<pre><code>function counter() {\n\nlet n = 0;\n\nreturn {\n\ncount: function() { return n++; },\n\nreset: function() { n = 0; }\n\n};\n\n}\n</code></pre>\n<p><code>let c = counter(), d = counter();</code></p>\n<p><code>c.count()</code></p>\n<p>0</p>\n<p><code>d.count()</code></p>\n<p>0</p>\n<p><code>c.reset();</code></p>\n<p><code>c.count()</code></p>\n<p>0</p>\n<p><code>d.count()</code></p>\n<p>1</p>\n<p>You can combine this closure technique with property getters and setters</p>\n<pre><code>function counter(n) {\n\nreturn {\n\nget count() { return n++; },\n\nset count(m) {\n\nif (m > n) n = m;\n\nelse throw Error(\"count can only be set to a larger value\")\n\n}\n\n};\n\n}\n</code></pre>\n<p><code>let c = counter(1000);</code></p>\n<p><code>c.count</code></p>\n<p>1000</p>\n<p><code>c.count</code></p>\n<p>1001</p>\n<p><code>c.count = 2000;</code></p>\n<p><code>c.count</code></p>\n<p>2000</p>\n<p><code>c.count = 2000;</code></p>\n<p>Error: count can only be set to a larger value</p>\n<p>Define a private variable and two nested functions to get and set the value of that variable.</p>\n<pre><code>function addPrivateProperty(o, name, predicate) {\n\nlet value;\n\no[`get${name}`] = function() { return value; };\n\no[`set${name}`] = function(v) {\n\nif (predicate &#x26;&#x26; !predicate(v)) {\n\nthrow new TypeError(`set${name}: invalid value ${v}`);\n\n}\n\nelse {\n\nvalue = v;\n\n}\n\n};\n\n}\n</code></pre>\n<p><code>let o = {};</code></p>\n<p><code>addPrivateProperty(o, \"Name\", x => typeof x === \"string\");</code></p>\n<p><code>o.setName(\"Frank\");</code></p>\n<p><code>o.getName()</code></p>\n<p>“Frank”</p>\n<p><code>o.setName(0);</code></p>\n<p>TypeError: try to set a value ofthe wrong type</p>\n<h3>Function Properties, Methods, and Constructor</h3>\n<p>Since functions are objects, they can have properties and methods, just like any other object.</p>\n<h3>The length Property</h3>\n<p>The read-only length property of a function specifies the arity of the function — the number of parameters it declares in its parameter list, which is usually the number of arguments that the function expects.</p>\n<h3>The name Property</h3>\n<p>This property is primarily useful when writing debugging or error messages.</p>\n<h3>The prototype Property</h3>\n<p>When a function is used as a constructor, the newly created object inherits properties from the prototype object.</p>\n<h3>The call() and apply() Methods</h3>\n<p><code>call()</code> and <code>apply()</code> allow you to indirectly invoke a function as if it were a method of some other object. The first argument to both <code>call()</code> and <code>apply()</code> is the object on which the function is to be invoked; this argument is the invocation context and becomes the value of the <code>this</code> keyword within the body of the function.</p>\n<p>To invoke the function<code>f()</code> as a method of the object o (passing no arguments),</p>\n<p><code>f.call(o);</code></p>\n<p><code>f.apply(o);</code></p>\n<p>To pass two numbers to the function <code>f()</code> and invoke it as if it were a method of the object o,</p>\n<pre><code>f.call(o, 1, 2);\n</code></pre>\n<p>The <code>apply()</code> method is like the <code>call()</code> method, except that the arguments to be passed to the function are specified as an array:</p>\n<pre><code>f.apply(o, [1,2]);\n</code></pre>\n<p>The <code>trace()</code>function defined uses the <code>apply()</code>method instead of a spread operator, and by doing that, it is able to invoke the wrapped method with the same arguments and the same this value as the wrapper method</p>\n<pre><code>function trace(o, m) {\n\nlet original = o[m];\n\no[m] = function(...args) {\n\nconsole.log(new Date(), \"Entering:\", m);\n\nlet result = original.apply(this, args);\n\nconsole.log(new Date(), \"Exiting:\", m);\n\nreturn result;\n\n};\n\n}\n</code></pre>\n<h3>The bind() Method</h3>\n<p>The primary purpose of <code>bind()</code> is to bind a function to an object.</p>\n<p><code>function f(y) { return this.x + y; }</code></p>\n<p><code>let o = { x: 1 };</code></p>\n<p><code>let g = f.bind(o);</code></p>\n<p><code>g(2)</code></p>\n<p>3</p>\n<p><code>let p = { x: 10, g };</code></p>\n<p><code>p.g(2)</code></p>\n<p>3 // g is still bound to o, not p.</p>\n<p>The most common use case for calling <code>bind()</code> is to make non-arrow functions behave like arrow functions.</p>\n<p>Partial application is a common technique in functional programming and is sometimes called <code>currying</code>.</p>\n<p><code>let sum = (x,y) => x + y;</code></p>\n<p><code>let succ = sum.bind(null, 1);</code></p>\n<p><code>succ(2)</code></p>\n<p>3</p>\n<h3>The toString() Method</h3>\n<p>Most (but not all) implementations of this <code>toString()</code> method return the complete source code for the function</p>\n<h3>The Function() Constructor</h3>\n<p>The Function() constructor is best thought of as a globally scoped version of <code>eval()</code> that defines new variables and functions in its own private scope. You will probably never need to use this constructor in your code.</p>\n<h3>Higher-Order Functions</h3>\n<p>A higher-order function is a function that operates on functions, taking one or more functions as arguments and returning a new function.</p>\n<pre><code>function not(f) {\n\nreturn function(...args) {\n\nlet result = f.apply(this, args);\n\nreturn !result;\n\n};\n\n}\n</code></pre>\n<p><code>const even = x => x % 2 === 0;</code></p>\n<p>A function to determine if a number is even</p>\n<p><code>const odd = not(even);</code></p>\n<p><code>[1,1,3,5,5].every(odd)</code></p>\n<p>true</p>\n<p>Returns a new function that maps one array to another</p>\n<pre><code>const map = function(a, ...args) { return a.map(...args); };\n\nfunction mapper(f) {\n\nreturn a => map(a, f);\n\n}\n\nconst increment = x => x + 1;\n\nconst incrementAll = mapper(increment);\n\nincrementAll([1,2,3]\n</code></pre>\n<p>[2,3,4]</p>\n<p>Example that takes two functions, f and g, and returns a new function that computes f(g()):</p>\n<pre><code>function compose(f, g) {\n\nreturn function(...args) {\n\nreturn f.call(this, g.apply(this, args));\n\n};\n\n}\n</code></pre>\n<p><code>const sum = (x,y) => x+y;</code></p>\n<p><code>const square = x => x*x;</code></p>\n<p><code>compose(square, sum)(2,3)</code></p>\n<p>25</p>\n<h3>Memoization</h3>\n<p>We defined a factorial function that cached its previously computed results. In functional programming, this kind of caching is called memoization.</p>\n<h3>Classes</h3>\n<p>JavaScript's classes and prototype-based inheritance mechanism are substantially different from the classes and class-based inheritance mechanism of Java.</p>\n<h3>Classes and Prototypes</h3>\n<p>If we define a prototype object and then use <code>Object.create()</code> to create objects that inherit from it, we have defined a JavaScript class.</p>\n<p>Factory function that returns a new range object:</p>\n<pre><code>function range(from, to) {\n\nlet r = Object.create(range.methods);\n\nr.from = from;\n\nr.to = to;\n\nreturn r;\n\n}\n\nrange.methods = {\n\nincludes(x) { return this.from &#x3C;= x &#x26;&#x26; x &#x3C;= this.to; },\n\n*[Symbol.iterator]() {\n\nfor(let x = Math.ceil(this.from); x &#x3C;= this.to; x++)\n\nyield x;\n\n},\n\ntoString() { return \"(\" + this.from + \"...\" + this.to +\")\"; }\n\n};\n</code></pre>\n<p><code>let r = range(1,3);</code></p>\n<p><code>r.includes(2)</code></p>\n<p>true</p>\n<p><code>r.toString()</code></p>\n<p>“(1…3)”</p>\n<p><code>[...r]</code></p>\n<p>[1, 2, 3]</p>\n<h3>Classes and Constructors</h3>\n<p>A constructor is a function designed for the initialization of newly created objects.</p>\n<p>The critical feature of constructor invocations is that the <code>prototype</code> property of the constructor is used as the prototype of the new object.</p>\n<p>While almost all objects have a prototype, only a few objects have a <code>prototype</code> property. It is function objects that have a <code>prototype</code> property.</p>\n<p>This means that all objects created with the same constructor function inherit from the same object and are therefore members of the same class.</p>\n<p>A Range class using a constructor</p>\n<pre><code>function Range(from, to) {\n\nthis.from = from;\n\nthis.to = to;\n\n}\n\nRange.prototype = {\n\nincludes: function(x) { return this.from &#x3C;= x &#x26;&#x26; x &#x3C;= this.to; },\n\n[Symbol.iterator]: function*() {\n\nfor(let x = Math.ceil(this.from); x &#x3C;= this.to; x++)\n\nyield x;\n\n},\n\ntoString: function() { return \"(\" + this.from + \"...\" + this.to + \")\"; }\n\n};\n</code></pre>\n<p><code>let r = new Range(1,3);</code></p>\n<p><code>r.includes(2)</code></p>\n<p>true</p>\n<p><code>r.toString()</code></p>\n<p>“(1…3)”</p>\n<p><code>[...r]</code></p>\n<p>[1, 2, 3]</p>\n<p>Because the <code>Range()</code>constructor is invoked with <code>new</code>, it does not have to call <code>Object.create()</code> or take any action to create a new object.</p>\n<p>In the first example, the prototype was <code>range.methods</code>. This was a convenient and descriptive name, but arbitrary. In the second example, the prototype is <code>Range.prototype</code>, and this name is mandatory.</p>\n<p>An invocation of the <code>Range()</code> constructor automatically uses <code>Range.prototype</code> as the prototype of the <code>new Range</code> object.</p>\n<h3>Constructors, Class Identity, and instanceof</h3>\n<p>Two objects are instances of the same class if and only if they inherit from the same prototype object.</p>\n<p>The <code>instanceof</code> operator is not checking whether <code>r</code> was actually initialized by the Range constructor. Instead, it is checking whether <code>r</code> inherits from <code>Range.prototype</code>.</p>\n<pre><code>function Strange() {}\n\nStrange.prototype = Range.prototype;\n\nnew Strange() instanceof Range\n</code></pre>\n<p>true</p>\n<p>If you want to test the prototype chain of an object for a specific prototype and do not want to use the constructor function as an intermediary, you can use the <code>isPrototypeOf()</code> method</p>\n<pre><code>range.methods.isPrototypeOf(r);\n</code></pre>\n<h3>The constructor Property</h3>\n<p>Every regular JavaScript function automatically has a <code>prototype</code> property. The value of this property is an object that has a single, non-enumerable <code>constructor</code> property.</p>\n<p>The value of the <code>constructor</code> property is the function object</p>\n<pre><code>let F = function() {};\n\nlet p = F.prototype;\n\nlet c = p.constructor;\n\nc === F\n</code></pre>\n<p>true</p>\n<p><code>let o = new F();</code></p>\n<p><code>o.constructor === F</code></p>\n<p>true</p>\n<p>Instances of the Range class, as defined, do not have a constructor property. We can remedy this problem by explicitly adding a constructor to the prototype:</p>\n<pre><code>Range.prototype = {\n\nconstructor: Range\n\n};\n</code></pre>\n<p>Another common technique that you are likely to see in older JavaScript code is to use the predefined prototype object with its constructor property and add methods to it one at a time with code like this:</p>\n<pre><code>Range.prototype.includes = function(x) {\n\nreturn this.from &#x3C;= x &#x26;&#x26; x &#x3C;= this.to;\n\n};\n\nRange.prototype.toString = function() {\n\nreturn \"(\" + this.from + \"...\" + this.to + \")\";\n\n};\n</code></pre>\n<h3>Classes with the class Keyword</h3>\n<pre><code>class Range {\n\nconstructor(from, to) {\n\nthis.from = from;\n\nthis.to = to;\n\n}\n\nincludes(x) { return this.from &#x3C;= x &#x26;&#x26; x &#x3C;= this.to; }\n\n*[Symbol.iterator]() {\n\nfor(let x = Math.ceil(this.from); x &#x3C;= this.to; x++)\n\nyield x;\n\n}\n\ntoString() { return `(${this.from}...${this.to})`; }\n\n}\n</code></pre>\n<p><code>let r = new Range(1,3);</code></p>\n<p><code>r.includes(2)</code></p>\n<p>true</p>\n<p><code>r.toString()</code></p>\n<p>(1…3)</p>\n<p><code>[...r]</code></p>\n<p>[1, 2, 3]</p>\n<p>Although class bodies are superficially similar to object literals, they are not the same thing. In particular, they do not support the definition of properties with name/value pairs.</p>\n<p>If your class does not need to do any initialization, you can omit the constructor keyword and its body, and an empty constructor function will be implicitly created for you.</p>\n<p>If you want to define a class that subclasses — or inherits from — another class, you can use the <code>extends</code> keyword with the class keyword:</p>\n<pre><code>class Span extends Range {\n\nconstructor(start, length) {\n\nif (length >= 0) {\n\nsuper(start, start + length);\n\n}\n\nelse {\n\nsuper(start + length, start);\n\n}\n\n}\n\n}\n</code></pre>\n<p>class declarations have both statement and expression forms</p>\n<p><code>let Square = class { constructor(x) { this.area = x * x; } };</code></p>\n<p><code>new Square(3).area</code></p>\n<p>9</p>\n<h3>Static methods</h3>\n<p>You can define a <code>static</code> method within a class body by prefixing the method declaration with the <code>static</code> keyword. Static methods are defined as properties of the constructor function rather than properties of the prototype object.</p>\n<pre><code>static parse(s) {\n\nlet matches = s.match(/^\\((\\d+)\\.\\.\\.(\\d+)\\)$/);\n\nif (!matches) {\n\nthrow new TypeError(`Cannot parse Range from \"${s}\".`)\n\n}\n\nreturn new Range(parseInt(matches[1]),\n\nparseInt(matches[2]));\n\n}\n</code></pre>\n<p>The method defined by this code is <code>Range.parse()</code>, not <code>Range.prototype.parse()</code>, and you must invoke it through the constructor, not through an instance:</p>\n<pre><code>let r = Range.parse('(1...10)');\n</code></pre>\n<h3>Getters, Setters, and other Method Forms</h3>\n<p>Within a class body, you can define getter and setter methods just as you can in object literals. The only difference is that in class bodies, you don't put a comma after the getter or setter.</p>\n<h3>Public, Private, and Static Fields</h3>\n<p>The ES6 standard only allows the creation of methods (including getters, setters, and generators) and static methods; it does not include syntax for defining fields.</p>\n<p>If you want to define a field on a class instance, you must do that in the constructor function or in one of the methods. And if you want to define a static field for a class, you must do that outside the class body, after the class has been defined.</p>\n<p>Standardization is underway, however, for extended class syntax that allows the definition of instance and static fields, in both public and private forms.</p>\n<pre><code>class Buffer {\n\nconstructor() {\n\nthis.size = 0;\n\nthis.capacity = 4096;\n\nthis.buffer = new Uint8Array(this.capacity);\n\n}\n\n}\n</code></pre>\n<p>←></p>\n<pre><code>class Buffer {\n\nsize = 0;\n\ncapacity = 4096;\n\nbuffer = new Uint8Array(this.capacity);\n\n}\n</code></pre>\n<p>The same proposal that seeks to standardize these instance fields also defines private (with the # prefix) instance fields.</p>\n<pre><code>class Buffer {\n\n#size = 0;\n\nget size() { return this.#size; }\n\n}\n</code></pre>\n<p>A related proposal seeks to standardize the use of the <code>static</code> keyword for fields.</p>\n<pre><code>static integerRangePattern = /^\\((\\d+)\\.\\.\\.(\\d+)\\)$/;\n\nstatic parse(s) {\n\nlet matches = s.match(Range.integerRangePattern);\n\nif (!matches) {\n\nthrow new TypeError(`Cannot parse Range from \"${s}\".`)\n\n}\n\nreturn new Range(parseInt(matches[1]), matches[2]);\n\n}\n</code></pre>\n<h3>Adding Methods to Existing Classes</h3>\n<p>We can augment JavaScript classes simply by adding new methods to their prototype objects.</p>\n<pre><code>if (!String.prototype.startsWith) {\n\nString.prototype.startsWith = function(s) {\n\nreturn this.indexOf(s) === 0;\n\n};\n\n}\n\nNumber.prototype.times = function(f, context) {\n\nlet n = this.valueOf();\n\nfor(let i = 0; i &#x3C; n; i++) f.call(context, i);\n\n};\n</code></pre>\n<h3>Subclasses</h3>\n<h3>Subclasses and Prototypes</h3>\n<p>Span subclass of the Range class. This subclass will work just like a Range, but instead of initializing it with a start and an end, we'll instead specify a start and a distance, or span.</p>\n<pre><code>function Span(start, span) {\n\nif (span >= 0) {\n\nthis.from = start;\n\nthis.to = start + span;\n\n}\n\nelse {\n\nthis.to = start;\n\nthis.from = start + span;\n\n}\n\n}\n</code></pre>\n<p>Ensure that the <code>Span</code> prototype inherits from the <code>Range</code></p>\n<pre><code>Span.prototype = Object.create(Range.prototype);\n</code></pre>\n<p>We don't want to inherit <code>Range.prototype.constructor</code>, so we define our own constructor property:</p>\n<pre><code>Span.prototype.constructor = Span;\n</code></pre>\n<p><code>Span</code> overrides the <code>toString()</code> method</p>\n<p><code>Span.prototype.toString = function() {</code><br>\n<code>return `(${this.from}... +${this.to - this.from})`;</code><br>\n<code>};</code></p>\n<p>A robust subclassing mechanism needs to allow classes to invoke the methods and constructor of their superclass, but prior to ES6, JavaScript did not have a simple way to do these things.</p>\n<h3>Subclasses with extends and super</h3>\n<pre><code>class EZArray extends Array {\n\nget first() { return this[0]; }\n\nget last() { return this[this.length-1]; }\n\n}\n</code></pre>\n<p><code>let a = new EZArray();</code></p>\n<p><code>a instanceof EZArray</code></p>\n<p>true</p>\n<p><code>a instanceof Array</code></p>\n<p>true</p>\n<p><code>a.push(1,2,3,4);</code></p>\n<p><code>a.pop()</code></p>\n<p>4</p>\n<p><code>a.first</code></p>\n<p>1</p>\n<p><code>a.last</code></p>\n<p>3</p>\n<p><code>Array.isArray(a)</code></p>\n<p>true</p>\n<p><code>EZArray.isArray(a)</code></p>\n<p>true</p>\n<p><code>Array.prototype.isPrototypeOf(EZArray.prototype</code></p>\n<p>true</p>\n<p><code>Array.isPrototypeOf(EZArray)</code></p>\n<p>true</p>\n<p>Example demonstrates the use of the <code>super</code> keyword to invoke the constructor and methods of the superclass</p>\n<pre><code>class TypedMap extends Map {\n\nconstructor(keyType, valueType, entries) {\n\nif (entries) {\n\nfor(let [k, v] of entries) {\n\nif (typeof k !== keyType || typeof v !== valueType) {\n\nthrow new TypeError(`Wrong type for entry [${k}, ${v}]`);\n\n}\n\n}\n\n}\n\nsuper(entries);\n\nthis.keyType = keyType;\n\nthis.valueType = valueType;\n\n}\n\nset(key, value) {\n\nif (this.keyType &#x26;&#x26; typeof key !== this.keyType) {\n\nthrow new TypeError(`${key} is not of type${this.keyType}`);\n\n}\n\nif (this.valueType &#x26;&#x26; typeof value !== this.valueType)\n\n{\n\nthrow new TypeError(`${value} is not of type ${this.valueType}`);\n\n}\n\nreturn super.set(key, value);\n\n}\n\n}\n</code></pre>\n<p>You may not use the <code>this</code> keyword in your constructor until after you have invoked the superclass constructor with <code>super()</code>. This enforces a rule that superclasses get to initialize themselves before subclasses do.</p>\n<p>Once private fields are supported, we could change these properties to <code>#keyType</code> and <code>#valueType</code> so that they could not be altered from the outside.</p>\n<h3>Class Hierarchies and Abstract Classes</h3>\n<p>Define abstract classes — classes that do not include a complete implementation — to serve as a common superclass for a group of related subclasses.</p>\n<h3>Modules</h3>\n<h3>Automating Closure-Based Modularity</h3>\n<p>Imagine a tool that takes a set of files, wraps the content of each of those files within an immediately invoked function expression, keeps track of the return value of each function, and concatenates everything into one big file.</p>\n<pre><code>const modules = {};\n\nfunction require(moduleName) { return modules[moduleName]; }\n\nmodules[\"sets.js\"] = (function() {\n\nconst exports = {};\n\nexports.BitSet = class BitSet { ... };\n\nreturn exports;\n\n}());\n\nmodules[\"stats.js\"] = (function() {\n\nconst exports = {};\n\nconst sum = (x, y) => x + y;\n\nconst square = x = > x * x;\n\nexports.mean = function(data) { ... };\n\nexports.stddev = function(data) { ... };\n\nreturn exports;\n\n}());\n</code></pre>\n<p>writing code like the following to make use of those modules</p>\n<pre><code>const stats = require(\"stats.js\");\n\nconst BitSet = require(\"sets.js\").BitSet;\n\n// Now write code using those modules\n\nlet s = new BitSet(100);\n\ns.insert(10);\n\ns.insert(20);\n\ns.insert(30);\n\nlet average = stats.mean([...s]);\n</code></pre>\n<h3>Modules in ES6</h3>\n<p>ES6 adds import and export keywords to JavaScript and finally supports real modularity as a core language feature.</p>\n<p>ES6 modularity is conceptually the same as Node modularity: each file is its own module, and constants, variables, functions, and classes defined within a file are private to that module unless they are explicitly exported.</p>\n<h3>ES6 Exports</h3>\n<p>To export a constant, variable, function, or class from an ES6 module, simply add the keyword export before the declaration</p>\n<pre><code>export const PI = Math.PI;\n\nexport function degreesToRadians(d) { return d * PI / 180; }\n\nexport class Circle {\n\nconstructor(r) { this.r = r; }\n\narea() { return PI * this.r * this.r; }\n\n}\n</code></pre>\n<p>or:</p>\n<pre><code>export { Circle, degreesToRadians, PI };\n</code></pre>\n<p>It is common to write modules that export only one value (typically a function or class), and in this case, we usually use export <code>default</code> instead of <code>export</code></p>\n<pre><code>export default class BitSet {\n\n// implementation omitted\n\n}\n</code></pre>\n<h3>ES6 Imports</h3>\n<pre><code>import BitSet from './bitset.js';\n\nimport { mean, stddev } from \"./stats.js\";\n</code></pre>\n<p>When importing from a module that defines many exports, however, you can easily import everything with an import statement like this:</p>\n<pre><code>import * as stats from \"./stats.js\";\n</code></pre>\n<p>With the wildcard import shown in the previous example, the importing module would use the imported <code>mean()</code> and<code>stddev()</code> functions through the stats object, invoking them as <code>stats.mean()</code> and <code>stats.stddev()</code>.</p>\n<p>Note: not finished.</p>\n<h3>The JavaScript Standard Library</h3>\n<h3>The Set Class</h3>\n<p>Sets are not ordered or indexed, and they do not allow duplicates.</p>\n<pre><code>let s = new Set();\n\nlet t = new Set([1, s]);\n\nlet t = new Set(s);\n\nlet unique = new Set(\"Mississippi\");\n</code></pre>\n<p>The argument to the <code>Set()</code> constructor need not be an array: any iterable object (including other Set objects) is allowed.</p>\n<p>The <code>add()</code> method takes a single argument; if you pass an array, it adds the array itself to the set, not the individual array elements. <code>add()</code> always returns the set it is invoked on, however, so if you want to add multiple values to a set, you can used chained method calls like.</p>\n<p>it is very important to understand that set membership is based on strict equality checks, like the === operator performs.</p>\n<p>The most important thing we do with sets is not to add and remove elements from them, but to check to see whether a specified value is a member of the set:</p>\n<p><code>let oneDigitPrimes = new Set([2,3,5,7]);</code></p>\n<p><code>oneDigitPrimes.has(2)</code></p>\n<p>The Set class is iterable, which means that you can use a <code>for/of</code> loop to enumerate all of the elements of a set:</p>\n<pre><code>let sum = 0;\n\nfor(let p of oneDigitPrimes) {\n\nsum += p; // and add them up\n\n}\n</code></pre>\n<p>Because Set objects are iterable, you can convert them to arrays and argument lists with the … spread operator</p>\n<p><code>[...oneDigitPrimes]</code></p>\n<p>JavaScript Set class always remembers the order that elements were inserted in, and it always uses this order when you iterate a set: the first element inserted will be the first one iterated (assuming you haven't deleted it first), and the most recently inserted element will be the last one iterated.</p>\n<p>Set class also implements a <code>forEach()</code> method</p>\n<pre><code>let product = 1;\n\noneDigitPrimes.forEach(n => { product *= n; });\n</code></pre>\n<h3>The Map Class</h3>\n<pre><code>let m = new Map();\n\nlet n = new Map([[\"one\", 1],[\"two\", 2]]);\n\nlet copy = new Map(n);\n\nlet o = { x: 1, y: 2};\n\nlet p = new Map(Object.entries(o));\n</code></pre>\n<p>map is a set of keys, each of which has an associated value. This is not quite the same as a set of key/value pairs.</p>\n<p>use <code>has()</code> to check whether a map includes the specified key; use <code>delete()</code> to remove a key (and its associated value) from the map; use <code>clear()</code> to remove all key/value pairs from the map; and use the size property to find out how many keys a map contains.</p>\n<p><code>set()</code> method of Map can be chained.</p>\n<p>Any JavaScript value can be used as a key or a value in a Map. This includes<code>null, undefined</code>, and <code>NaN</code>, as well as reference types like objects and arrays.</p>\n<p>Map compares keys by identity, not by equality.</p>\n<p><code>let m = new Map();</code></p>\n<p><code>m.set({}, 1);</code></p>\n<p><code>m.set({}, 2);</code></p>\n<p>Map a different empty object to the number 2.</p>\n<p><code>m.get({})</code></p>\n<p>undefined:</p>\n<p><code>m.set(m, undefined);</code></p>\n<p><code>m.has(m)</code></p>\n<p>true</p>\n<p><code>m.get(m)</code></p>\n<p>undefined</p>\n<p>Iterate over map:</p>\n<p><code>let m = new Map([[\"x\", 1], [\"y\", 2]]);</code></p>\n<p><code>[...m]</code></p>\n<p>[[“x”, 1], [“y”, 2]]</p>\n<p><code>for(let [key, value] of m) {...}</code></p>\n<p>Map class iterates in insertion order</p>\n<p>If you want to iterate just the keys or just the associated values of a map, use the <code>keys()</code> and <code>values()</code> methods: these return iterable objects that iterate keys and values, in insertion order. (The<br>\n<code>entries()</code> method returns an iterable object that iterates key/value pairs, but this is exactly the same as iterating the map directly.)</p>\n<pre><code>[...m.keys()]\n\n[...m.values()]\n\n[...m.entries()]\n</code></pre>\n<p>Map objects can also be iterated using the <code>forEach()</code></p>\n<pre><code>m.forEach((value, key) => {...}\n</code></pre>\n<p>Note that the value parameter comes before the key parameter.</p>\n<h3>WeakMap and WeakSet</h3>\n<p>The <code>WeakMap</code>class is a variant (but not an actual subclass) of the Map class that does not prevent its key values from being garbage collected.</p>\n<p><code>WeakMap</code>keys must be objects or arrays; primitive values are not subject to garbage collection and cannot be used as keys.</p>\n<p>WeakMap implements only the<code>get(), set(), has(),</code> and <code>delete()</code> methods. In particular, <code>WeakMap</code> is not iterable and does not define <code>keys(), values(),</code> or <code>forEach()</code>. If WeakMap was iterable, then its keys would be reachable and it wouldn't be weak.</p>\n<p>Similarly, WeakMap does not implement the size property because the <code>size</code> of a WeakMap could change at any time as objects are garbage collected</p>\n<h3>Typed Arrays and Binary Data</h3>\n<p>They differ from regular arrays in some very important ways</p>\n<p>· The elements of a typed array are all numbers. Unlike regular JavaScript numbers, however, typed arrays allow you to specify the type (signed and unsigned integers and IEEE-754 floating point) and size (8 bits to 64 bits) of the numbers to be stored in the array.</p>\n<p>· You must specify the length of a typed array when you create it, and that length can never change.</p>\n<p>· The elements of a typed array are always initialized to 0 when the array is created.</p>\n<pre><code>Int8Array()\n\nUint8Array()\n\nUint8ClampedArray()\n\nInt16Array()\n\nUint32Array()\n\nUint16Array()\n\nInt32Array()\n\nBigInt64Array()\n\nBigUint64Array()\n\nFloat32Array()\n\nlet bytes = new Uint8Array(1024);\n\nlet matrix = new Float64Array(9);\n\nlet sudoku = new Int8Array(81);\n</code></pre>\n<p>Initialize with values</p>\n<pre><code>let white = Uint8ClampedArray.of(255, 255, 255, 0);\n\nlet ints = Uint32Array.from(white);\n</code></pre>\n<p>one more way to create typed arrays that involves the <code>ArrayBuffer</code> type</p>\n<pre><code>let buffer = new ArrayBuffer(1024*1024);\n\nbuffer.byteLength\n</code></pre>\n<p>1024*1024</p>\n<p>Typed arrays are not true arrays, but they re-implement most array methods, so you can use them pretty much just like you'd use regular arrays:</p>\n<p><code>let ints = new Int16Array(10);</code></p>\n<p>10 short integers</p>\n<p><code>ints.fill(3).map(x=>x*x).join(\"\")</code></p>\n<p>“9999999999”</p>\n<p>Remember that typed arrays have fixed lengths, so the length property is read-only, and methods that change the length of the array (such as<code>push(), pop(), unshift(), shift(),</code> and <code>splice()</code>) are not implemented for typed arrays. Methods that alter the contents of an array without changing the length (such as <code>sort(), reverse()</code>, and <code>fill()</code>) are implemented.</p>\n<h3>Determine Endianess and DataView</h3>\n<pre><code>let littleEndian = new Int8Array(new Int32Array([1]).buffer)\n\n[0] === 1;\n</code></pre>\n<p>You can use the <code>DataView</code> class, which defines methods for reading and writing values from an <code>ArrayBuffer</code> with explicitly specified byte ordering. Refer to book for more examples.</p>\n<h3>Pattern Matching with Regular Expressions</h3>\n<p>RegExp objects may be created with the <code>RegExp()</code> constructor, of course, but they are more often created using a special literal syntax.</p>\n<pre><code>let pattern = /s$/;\n</code></pre>\n<p>←></p>\n<pre><code>let pattern = new RegExp(\"s$\");\n</code></pre>\n<p>Regular expressions can also have one or more flag characters that affect how they work</p>\n<pre><code>let pattern = /s$/i;\n</code></pre>\n<p>i = case insensitive</p>\n<p>Punctuation characters have special meanings in regular expressions: <code>^ $ . * + ? = ! : | \\ / ( ) [ ] { }.</code>Other punctuation characters, such as quotation marks and @, do not have special meaning and simply match themselves literally in a regular expression.</p>\n<p>If you use the <code>RegExp()</code> constructor, keep in mind that any backslashes in your regular expression need to be doubled, since strings also use backslashes as an escape character.</p>\n<p><strong>Character</strong></p>\n<p><strong>Matches</strong></p>\n<p><code>[...]</code></p>\n<p>Any one character between the brackets.</p>\n<p><code>[^...]</code></p>\n<p>Any one character not between the brackets</p>\n<p><code>.</code></p>\n<p>Any character except newline or another Unicode line terminator. Or, if the <code>RegExp</code> uses the s flag, then a period matches any character, including line terminators.</p>\n<p><code>\\w</code></p>\n<p>Any ASCII word character. Equivalent to [a-zA-Z0-9_].</p>\n<p><code>\\W</code></p>\n<p>Equivalent to [^a-zA-Z0-9_]</p>\n<p><code>\\s</code></p>\n<p>Any Unicode whitespace character.</p>\n<p><code>\\S</code></p>\n<p>Any character that is not Unicode whitespace.</p>\n<p><code>\\d</code></p>\n<p>Equivalent to [0-9].</p>\n<p><code>\\D</code></p>\n<p>Equivalent to [⁰-9].</p>\n<p><code>[\\b]</code></p>\n<p>A literal backspace (special case).</p>\n<p><code>[\\s\\d]</code></p>\n<p>Any one whitespace character or digit</p>\n<p>REPETITIONS</p>\n<p><strong>Character</strong></p>\n<p><strong>Meaning</strong></p>\n<p><code>{n,m}</code></p>\n<p>Match the previous item at least n times but no more than m times</p>\n<p><code>{n,}</code></p>\n<p>Match the previous item n or more times.</p>\n<p><code>{n}</code></p>\n<p>Match exactly n occurrences of the previous item.</p>\n<p><code>?</code></p>\n<p>Equivalent to {0,1}.</p>\n<p><code>+</code></p>\n<p>Equivalent to {1,}</p>\n<p>*</p>\n<p>Equivalent to {0,}.</p>\n<p><strong>Example</strong></p>\n<p><strong>Description</strong></p>\n<pre><code>let r = /\\d{2,4}/;\n</code></pre>\n<p>Match between two and four digits</p>\n<pre><code>r = /\\w{3}\\d?/;\n</code></pre>\n<p>Match exactly three word characters and an optional digit</p>\n<pre><code>r = /\\s+java\\s+/;\n</code></pre>\n<p>Match “java” with one or more spaces before and after</p>\n<pre><code>r = /[^(]*/;\n</code></pre>\n<p>Match zero or more characters that are not open parens</p>\n<p>If you want to match repetitions of more complicated expressions, you'll need to define a group with parentheses</p>\n<p>Be careful when using the * and ? repetition characters. Since these characters may match zero instances of whatever precedes them, they are allowed to match nothing.</p>\n<h3>NON-GREEDY REPETITION</h3>\n<p>It is also possible to specify that repetition should be done in a non-greedy way. Simply follow the repetition character or characters with a question mark: <code>??, +?, *?</code>, or even {1,5}?.</p>\n<p><strong>String</strong></p>\n<p><strong>Pattern</strong></p>\n<p><strong>Match</strong></p>\n<pre><code>\"aaa\"\n\n/a+/\n\n\"aaa\"\n\n\"aaa\"\n\n/a+?/\n\n\"a\"\n</code></pre>\n<p>Note that using non-greedy repetition may not always produce the results you expect. This is because regular expression pattern matching is done by findingthe first position in the string at which a match is possible. Since a match is possible starting at the first character of the string, shorter matches starting at subsequent characters are never even considered.</p>\n<h3>ALTERNATION, GROUPING, AND REFERENCES</h3>\n<p><strong>Char</strong></p>\n<p><strong>Pattern</strong></p>\n<p><strong>Pattern</strong></p>\n<p><code>|</code></p>\n<p><code>/ab|cd|ef/</code></p>\n<p>“ab” or the string “cd” or the string “ef”.</p>\n<p><code>/\\d{3}|[a-z]{4}/</code></p>\n<p>either three digits or four lowercase letters.</p>\n<p><code>/a|ab/</code></p>\n<p>matches only the first letter “a”</p>\n<p><code>()</code></p>\n<p><code>/java(script)?/</code></p>\n<p>matches “java” followed by the optional “script”</p>\n<p><code>/(ab|cd)+|ef/</code></p>\n<p>matches “java” followed by the optional “script”</p>\n<p>If the left alternative matches, the right alternative is ignored, even if it would have produced a “better” match</p>\n<p>Another purpose of parentheses in regular expressions is to define subpatterns within the complete pattern. When a regular expression is successfully matched against a target string, it is possible to extract the portions of the target string that matched any particular parenthesized subpattern. For example, suppose you are looking for one or more lowercase letters followed by one or more digits. You might use the pattern <code>/[a-z]+\\d+/</code>. But suppose you only really care about the digits at the end of each match. If you put that part of the pattern in parentheses (/[a-z]+(\\d+)/), you can extract the digits from any matches you find,</p>\n<p>A related use of parenthesized subexpressions is to allow you to refer back to a subexpression later in the same regular expression. This is done by following a \\ character by a digit or digits. The digits refer to the position of the parenthesized subexpression within the regular expression. For example, \\1 refers back to the first subexpression, and \\3 refers to the third.</p>\n<p><strong>Match</strong></p>\n<p><strong>Pattern</strong></p>\n<p>zero or more characters within single or double quotes. However, it does not<br>\nrequire the opening and closing quotes to match</p>\n<pre><code>/['\"][^'\"]*['\"]/\n</code></pre>\n<p>To require the quotes to match,use a reference</p>\n<pre><code>/(['\"])[^'\"]*\\1/\n</code></pre>\n<p><strong>Character</strong></p>\n<p><strong>Meaning</strong></p>\n<p>|</p>\n<p>match either the subexpression to the left or the subexpression to the right.</p>\n<p>(…)</p>\n<p>Grouping: group items into a single unit that can be used with *, +, ?, |, and so on. Also remember the characters that match this group for use with later references</p>\n<p>(?:…)</p>\n<p>group items into a single unit, but do not remember the characters that match this group.</p>\n<p>Note<code>(?:...)</code> syntax:</p>\n<p>In pattern<code>\"/([Jj]ava(?:[Ss]cript)?)\\sis\\s(fun\\w*)/</code>\" <code>\\2</code> refers to the text matched by <code>(fun\\w*)</code> since <code>(?:[Ss]cript)?)</code> in not remembered.</p>\n<h3>SPECIFYING MATCH POSITION</h3>\n<p><em>regular expression anchors</em> because they anchor the pattern to a specific position in the search string. The most commonly used anchor elements are ^, which ties the pattern to the beginning of the string, and $, which anchors the pattern to the end of the string.</p>\n<p><strong>Example</strong></p>\n<p><strong>Pattern</strong></p>\n<p>match the word “JavaScript” on a line by itself</p>\n<p><code>/^JavaScript$/</code></p>\n<p>To search for “Java” as a word by itself you can try the pattern <code>/\\sJava\\s/</code>, which requires a space before and after the word. But there are two problems with this solution. First, it does not match \"Java\" at the beginning or the end of a string, but only if it appears with space on either side. Second, when this pattern does find a match, the matched string it returns has leading and trailing spaces, which is not quite what's needed. So instead of matching actual space characters with \\s, match (or anchor to) word boundaries with \\b. The resulting expression is <code>/\\bJava\\b/</code>.</p>\n<p>The element <code>\\B</code> anchors the match to a location that is not a word boundary. Thus, the pattern <code>/\\B[Ss]cript/</code> matches \"JavaScript\" and \"postscript\", but not \"script\" or \"Scripting\".</p>\n<p>You can also use arbitrary regular expressions as anchor conditions.</p>\n<p>If you include an expression within <code>(?= and )</code> characters, it is a lookahead assertion, and it specifies that the enclosed characters must match, without actually matching them.</p>\n<p><strong>Example</strong></p>\n<p><strong>Pattern</strong></p>\n<p><strong>Matches</strong></p>\n<p>to match the name of a common programming language, but only if it is followed by a colon</p>\n<p><code>/[Jj]ava([Ss]cript)?(?=\\:)/</code></p>\n<p>matches the word “JavaScript” in “JavaScript: The DefinitiveGuide”</p>\n<p>does not match “Java” in “Java in a Nutshell”</p>\n<p>If you instead introduce an assertion with <code>(?!</code>, it is a negative lookahead assertion.</p>\n<h3>FLAGS</h3>\n<p>Flags are specified after the second / character of a regular expression literal or as a string passed as the second argument to the RegExp() constructor.</p>\n<p><strong>Flag</strong></p>\n<p><strong>Meaning</strong></p>\n<p>g</p>\n<p>“global” — that is,that we intend to use it to find all matches within a string rather than just finding the first <a href=\"http://match.it/\" class=\"markup--anchor markup--p-anchor\">match.it</a> does alter the behavior of the String <code>match()</code> method and the <code>RegExp exec()</code> method in important ways.</p>\n<p>i</p>\n<p>case-insensitive</p>\n<p>m</p>\n<p>“multiline” mode</p>\n<p>s</p>\n<p>useful when working with text that includes newlines.Normally, a “.” in a regular expression matches any character except a line terminator. When the s flag is used, however, “.” will match any character, including line terminators.</p>\n<p>u</p>\n<p>Unicode.</p>\n<p>Setting the u flag on a RegExp also allows you to use the new <code>\\u{...}</code> escape sequence for Unicode character and also enables the \\p{...} notation for Unicode character classes.</p>\n<p>y</p>\n<p>“sticky”. should match at the beginning of a string or at the first character following the previous match</p>\n<h3>String Methods for Pattern Matching</h3>\n<h3>SEARCH()</h3>\n<p>Strings support four methods that use regular expressions.</p>\n<p><code>\"JavaScript\".search(/script/ui)</code></p>\n<p>4</p>\n<p><code>\"Python\".search(/script/ui)</code></p>\n<p>-1</p>\n<p><code>search()</code> does not support global searches; it ignores the <code>g</code> flag of its regular expression argument.</p>\n<p>REPLACE()</p>\n<p><code>text.replace(/javascript/gi, \"JavaScript\");</code></p>\n<p>No matter how it is capitalized, replace it with the correct capitalization</p>\n<p>parenthesized subexpressions of a regular expression are numbered from left to right and that the regular expression remembers the text that each subexpression matches.</p>\n<p>to replace quotation marks in a string with other characters:</p>\n<p><code>let quote = /\"([^\"]*)\"/g;</code></p>\n<p><code>'He said \"stop\"'.replace(quote, '«$1»')</code></p>\n<p>'He said «stop»'</p>\n<p>If your RegExp uses named capture groups, then you can refer to the matching text by name rather than by number:</p>\n<p><code>let quote = /\"(?&#x3C;quotedText>[^\"]*)\"/g;</code></p>\n<p><code>'He said \"stop\"'.replace(quote, '«$&#x3C;quotedText>»')</code></p>\n<p>'He said «stop»'</p>\n<p>Instead of passing a replacement string as the second argument to replace(), you can also pass a function that will be invoked to compute the replacement value.</p>\n<p>Example to convert decimal integers in a string to hexadecimal:</p>\n<p><code>let s = \"15 times 15 is 225\";</code></p>\n<p><code>s.replace(/\\d+/gu, n => parseInt(n).toString(16))</code></p>\n<p>“f times f is e1”</p>\n<h3>MATCH()</h3>\n<p><code>\"7 plus 8 equals 15\".match(/\\d+/g)</code></p>\n<p>[“7”, “8”, “15”]</p>\n<p>If the regular expression does not have the <code>g</code> flag set, <code>match()</code> does not do a global search; it simply searches for the first match. In this nonglobal case, <code>match()</code> still returns an array, but the array elements are completely different.</p>\n<p>Thus, if <code>match()</code> returns an array a, a[0] contains the complete match, a[1] contains the substring that matched the first parenthesized expression, and so on.</p>\n<pre><code>let url = /(\\w+):\\/\\/([\\w.]+)\\/(\\S*)/;\n\nlet text = \"Visit my blog at http://www.example.com/~david\";\n\nlet match = text.match(url);\n\nlet fullurl, protocol, host, path;\n\nif (match !== null) {\n\nfullurl = match[0];\n</code></pre>\n<p><a href=\"http://www.example.com/~david\" class=\"markup--anchor markup--p-anchor\">“http://www.example.com/~david</a>\"</p>\n<pre><code>protocol = match[1];\n</code></pre>\n<p>“http”</p>\n<pre><code>host = match[2];\n</code></pre>\n<p><a href=\"http://www.example.com/\" class=\"markup--anchor markup--p-anchor\">“www.example.com</a>\"</p>\n<pre><code>path = match[3];\n</code></pre>\n<p>“~david”</p>\n<p>In this non-global case, the array returned by match() also has some object properties in addition to the numbered array elements.</p>\n<p>input property refers to the string on which match() was called</p>\n<p>The index property is the position within that string at which the match starts.</p>\n<p>if the regular expression contains named capture groups, then the returned array also has a groups property whose value is an object.</p>\n<p><code>let url = /(?&#x3C;protocol>\\w+):\\/\\/(?&#x3C;host>[\\w.]+)\\/(?&#x3C;path>\\S*)/;</code></p>\n<p><code>let text = \"Visit my blog at http://www.example.com/~david\";</code></p>\n<p><code>let match = text.match(url);</code></p>\n<p><code>match[0]</code></p>\n<p><a href=\"http://www.example.com/~david\" class=\"markup--anchor markup--p-anchor\">“http://www.example.com/~david</a>\"</p>\n<p><code>match.input</code></p>\n<p>text</p>\n<p><code>match.index</code></p>\n<p>17</p>\n<p><code>match.groups.protocol</code></p>\n<p>“http”</p>\n<p><code>match.groups.host</code></p>\n<p><a href=\"http://www.example.com/\" class=\"markup--anchor markup--p-anchor\">“www.example.com</a>\"</p>\n<p><code>match.groups.path</code></p>\n<p>“~david”</p>\n<p>There are also important but less dramatic differences in behavior when the y flag is set. Refer to book for examples.</p>\n<h3>MATCHALL()</h3>\n<p>Instead of returning an array of matching substrings like <code>match()</code> does, however, it returns an iterator that yields the kind of match objects that match() returns when used with a non-global RegExp.</p>\n<h3>SPLIT()</h3>\n<p><code>\"123,456,789\".split(\",\")</code></p>\n<p>[“123”, “456”,”789\"]</p>\n<p><code>\"1, 2, 3,\\n4, 5\".split(/\\s*,\\s*/)</code></p>\n<p>[“1”, “2”, “3”, “4”,”5\"]</p>\n<p>Surprisingly, if you call <code>split()</code> with a RegExp delimiter and the regular expression includes capturing groups, then the text that matches the capturing groups will be included in the returned array.</p>\n<p><code>const htmlTag = /&#x3C;([^>]+)>/;</code></p>\n<p><code>\"Testing&#x3C;br/>1,2,3\".split(htmlTag)</code></p>\n<p>[“Testing”, “br/”,”1,2,3\"]</p>\n<h3>The RegExp Class</h3>\n<p>The <code>RegExp()</code> constructor is useful when a regular expression is being dynamically created and thus cannot be represented with the regular expression literal syntax.</p>\n<pre><code>let zipcode = new RegExp(\"\\\\d{5}\", \"g\");\n</code></pre>\n<p><code>let exactMatch = /JavaScript/;</code><br>\n<code>let caseInsensitive = new RegExp(exactMatch, \"i\");</code></p>\n<h3>TEST()</h3>\n<p>Returns true or false by calling <code>exec()</code>.</p>\n<h3>EXEC()</h3>\n<pre><code>let pattern = /Java/g;\n\nlet text = \"JavaScript > Java\";\n\nlet match;\n\nwhile((match = pattern.exec(text)) !== null) {\n\nconsole.log(`Matched ${match[0]} at ${match.index}`);\n\nconsole.log(`Next search begins at ${pattern.lastIndex}`);\n\n}\n</code></pre>\n<h3>THE LASTINDEX PROPERTY AND REGEXP REUSE</h3>\n<p>The use of the <code>lastIndex</code> property with the g and y flags is a particularly awkward part of this API. When you use these flags, you need to be particularly careful when calling the <code>match(), exec()</code>, or <code>test()</code> methods because the behavior of these methods depends on <code>lastIndex</code>, and the value of <code>lastIndex</code> depends on what you have previously done with the RegExp object.</p>\n<p>To find the index of all &#x3C;p> tags within a string of HTML text:</p>\n<pre><code>let match, positions = [];\n\nwhile((match = /&#x3C;p>/g.exec(html)) !== null) {\n\npositions.push(match.index);\n\n}\n</code></pre>\n<p>If the html string contains at least one &#x3C;p> tag, then it will loop forever. For each iteration of the loop, we're creating a new RegExp object with <code>lastIndex</code> set to 0, so <code>exec()</code> always begins at the start of the string, and if there is a match, it will keep matching over and over. The solution, of course, is to define the RegExp once, and save it to a variable so that we're using the same RegExp object for each iteration of the loop.</p>\n<p>On the other hand, sometimes reusing a RegExp object is the wrong thing to do. Suppose, for example, that we want to loop through all of the words in a dictionary to find words that contain pairs of double letters.</p>\n<pre><code>let dictionary = [ \"apple\", \"book\", \"coffee\" ];\n\nlet doubleLetterWords = [];\n\nlet doubleLetter = /(\\w)\\1/g;\n\nfor(let word of dictionary) {\n\nif (doubleLetter.test(word)) {\n\ndoubleLetterWords.push(word);\n\n}\n\n}\n</code></pre>\n<p><code>doubleLetterWords</code></p>\n<p>[“apple”, “coffee”]: “book” is missing!</p>\n<p>Because we set the g flag on the RegExp, the <code>lastIndex</code> property is changed after successful matches, and the <code>test()</code> method (which is based on <code>exec()</code>) starts searching for a match at the position specified by <code>lastIndex</code>. After matching the \"pp\" in \"apple\", <code>lastIndex</code> is 3, and so we start searching the word \"book\" at position 3 and do not see the \"oo\" that it contains.</p>\n<h3>Dates and Times</h3>\n<pre><code>let now = new Date();\n</code></pre>\n<p>The current time</p>\n<pre><code>let epoch = new Date(0);\n</code></pre>\n<p>Midnight, January 1st, 1970, GMT</p>\n<pre><code>let century = new Date(2100,\n\n0,\n\n1,\n\n2, 3, 4, 5);\n</code></pre>\n<p>Year 2100</p>\n<p>January</p>\n<p>1st</p>\n<p>02:03:04.005, local</p>\n<pre><code>let century = new Date(Date.UTC(2100, 0, 1));\n</code></pre>\n<p>Midnight in GMT, January 1, 2100</p>\n<p>If you print a date (with console.log(century), for example), it will, by default, be printed in your local time zone. If you want to display a date in UTC, you should explicitly convert it to a string with <code>toUTCString()</code> or<code>toISOString()</code>.</p>\n<p>if you pass a string to the Date() constructor, it will attempt to parse that string as a date and time specification</p>\n<p><code>let century = new Date(\"2100-01-01T00:00:00Z\");</code></p>\n<p>Once you have a Date object, various get and set methods allow you to query and modify the year, month, day-of-month, hour, minute, second, and millisecond fields of the Date. Each of these methods hastwo forms: one that gets or sets using local time and one that gets or sets using UTC time.</p>\n<p>Note that the methods for querying the day-of-month are <code>getDate()</code> and <code>getUTCDate()</code>. The more natural-sounding functions <code>getDay()</code> and <code>getUTCDay()</code> return the day-of-week (0 for Sunday through 6 for Saturday). The day-of-week is read-only, so there is not a corresponding <code>setDay()</code> method.</p>\n<h3>Timestamps</h3>\n<p>JavaScript represents dates internally as integers that specify the number of milliseconds since (or before) midnight on January 1, 1970, UTC time.</p>\n<p>For any Date object, the <code>getTime()</code> method returns this internal value, and the <code>setTime()</code> method sets it.</p>\n<pre><code>d.setTime(d.getTime() + 30000);\n</code></pre>\n<p>add 30 secs</p>\n<p>The static Date.now() method returns the current time as a timestamp and is helpful when you want to measure how long your code takes to run</p>\n<pre><code>let startTime = Date.now();\n\nreticulateSplines(); // Do some time-consuming operation\n\nlet endTime = Date.now();\n\nconsole.log(`Spline reticulation took ${endTime -startTime}ms.`);\n</code></pre>\n<p>adds three months and two weeks to the current date:</p>\n<p><code>let d = new Date();</code><br>\n<code>d.setMonth(d.getMonth() + 3, d.getDate() + 14);</code></p>\n<h3>Formatting and Parsing Date Strings</h3>\n<pre><code>let d = new Date(2020, 0, 1, 17, 10, 30);\n\nd.toString()\n</code></pre>\n<p>“Wed Jan 01 2020 17:10:30 GMT-0800 (Pacific Standard Time)”</p>\n<pre><code>d.toUTCString()\n</code></pre>\n<p>“Thu, 02 Jan 2020 01:10:30 GMT”</p>\n<pre><code>d.toLocaleDateString()\n</code></pre>\n<p>“1/1/2020”: 'en-US' locale</p>\n<pre><code>d.toLocaleTimeString()\n</code></pre>\n<p>“5:10:30 PM”: 'en-US' locale</p>\n<pre><code>d.toISOString()\n</code></pre>\n<p>“2020-01-02T01:10:30.000Z”</p>\n<p>there is also a static Date.parse() method that takes a string as its argument, attempts to parse it as a date and time, and returns a timestamp representing that date. <code>Date.parse()</code> is able to parse the same strings that the <code>Date()</code> constructor can and is guaranteed to be able to parse the output of<code>toISOString(), toUTCString()</code>, and<code>toString()</code>.</p>\n<h3>Error Classes</h3>\n<p>One good reason to use an Error object is that, when you create an Error, it captures the state of the JavaScript stack, and if the exception is uncaught, the stack trace will be displayed with the error message, which will help you debug the issue.</p>\n<p>Error objects have two properties: <code>message</code> and <code>name</code>, and a<code>toString()</code> method. Node and all modern browsers also define a <code>stack</code> property on Error objects.</p>\n<p>Subclasses are <code>EvalError, RangeError, ReferenceError, SyntaxError, TypeError,</code> and <code>URIError</code>.</p>\n<p>You should feel free to define your own Error subclasses that best encapsulate the error conditions of your own program.</p>\n<pre><code>class HTTPError extends Error {\n\nconstructor(status, statusText, url) {\n\nsuper(`${status} ${statusText}: ${url}`);\n\nthis.status = status;\n\nthis.statusText = statusText;\n\nthis.url = url;\n\n}\n\nget name() { return \"HTTPError\"; }\n\n}\n\nlet error = new HTTPError(404, \"Not Found\", \"http://example.com/\");\n\nerror.status\n</code></pre>\n<p>404</p>\n<pre><code>error.message\n</code></pre>\n<p>“404 Not Found:<a href=\"http://example.com/\" class=\"markup--anchor markup--p-anchor\">http://example.com/</a>\"</p>\n<pre><code>error.name\n</code></pre>\n<p>HTTPError</p>\n<h3>JSON Serialization and Parsing</h3>\n<p>JavaScript supports JSON serialization and deserialization with the two functions <code>JSON.stringify()</code> and <code>JSON.parse().</code></p>\n<pre><code>let o = {s: \"\", n: 0, a: [true, false, null]};\n\nlet s = JSON.stringify(o);\n</code></pre>\n<p>s == '{“s”:””,”n”:0,”a”:[true,false,null]}'</p>\n<pre><code>let copy = JSON.parse(s);\n</code></pre>\n<p>copy == {s: “”, n: 0, a:[true, false, null]}</p>\n<p>Inefficient way of creating a deep copy of an object</p>\n<pre><code>function deepcopy(o) {\n\nreturn JSON.parse(JSON.stringify(o));\n\n}\n</code></pre>\n<p>Typically, you pass only a single argument to <code>JSON.stringify()</code> and <code>JSON.parse()</code>. Both functions accept an optional second argument that allows us to extend the JSON format.</p>\n<p><code>JSON.stringify()</code> also takes an optional third argument. If you would like your JSONformatted string to be human-readable (if it is being used as a configuration file, for example), then you should pass null as the second argument and pass a number or string as the third argument. If the third argument is a number, then it will use that number of spaces for each indentation level. If the third argument is a string of whitespace (such as '\\t'), it will use that string for each level of indent.</p>\n<h3>JSON Customizations</h3>\n<p>If <code>JSON.stringify()</code> is asked to serialize a value that is not natively supported by the JSON format, it looks to see if that value has a <code>toJSON()</code> method, and if so, it calls that method and then stringifies the return value in place of the original value. Date objects implement <code>toJSON()</code>: it returns the same string that <code>toISOString()</code> method does.</p>\n<p>If you need to re-create Date objects (or modify the parsed object inany other way), you can pass a “reviver” function as the second argument to <code>JSON.parse()</code>.</p>\n<pre><code>let data = JSON.parse(text, function(key, value) {\n\nif (key[0] === \"_\") return undefined;\n\nif (typeof value === \"string\" &#x26;&#x26; /^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d.\\d\\d\\dZ$/.test(value)) {\n\nreturn new Date(value);\n\n}\n\nreturn value;\n\n});\n</code></pre>\n<h3>The Console API</h3>\n<p>Console functions that print their arguments like console.log() have a little-known feature: if the first argument is a string that includes <code>%s, %i, %d, %f, %o, %O, or %c</code>, then this first argument is treated as format string, and the values of subsequent arguments are substituted into the string in place of the two-character % sequences.</p>\n<h3>URL API</h3>\n<pre><code>let url = new URL(\"https://example.com:8000/path/name?q=term#fragment\");\n\nurl.href\n</code></pre>\n<p><a href=\"https://example.com:8000/path/name\" class=\"markup--anchor markup--p-anchor\">“https://example.com:8000/path/name</a>?q=term#fragment\"</p>\n<pre><code>url.origin\n</code></pre>\n<p><a href=\"https://example.com:8000/\" class=\"markup--anchor markup--p-anchor\">“https://example.com:8000</a>\"</p>\n<pre><code>url.protocol\n</code></pre>\n<p>“https:”</p>\n<pre><code>url.host\n</code></pre>\n<p><a href=\"http://example.com/\" class=\"markup--anchor markup--p-anchor\">“example.com</a>:8000”</p>\n<pre><code>url.hostname\n</code></pre>\n<p><a href=\"http://example.com/\" class=\"markup--anchor markup--p-anchor\">“example.com</a>”</p>\n<pre><code>url.port\n</code></pre>\n<p>“8000”</p>\n<pre><code>url.pathname\n</code></pre>\n<p>“/path/name”</p>\n<pre><code>url.search\n</code></pre>\n<p>“?q=term”</p>\n<pre><code>url.hash\n</code></pre>\n<p>“#fragment”</p>\n<pre><code>let url = new URL(\"https://example.com\");\n\nurl.pathname = \"api/search\";\n</code></pre>\n<p>Add a path to an API endpoint</p>\n<pre><code>url.search = \"q=test\";\n</code></pre>\n<p>Add a query parameter</p>\n<pre><code>url.toString()\n</code></pre>\n<p><a href=\"https://example.com/api/search?q=test\" class=\"markup--anchor markup--p-anchor\">“https://example.com/api/search?q=test</a>\"</p>\n<p>One of the important features of the URL class is that it correctly adds punctuation and escapes special characters in URLs when that is needed</p>\n<pre><code>let url = new URL(\"https://example.com\");\n\nurl.pathname = \"path with spaces\";\n\nurl.pathname\n</code></pre>\n<p>“/path%20with%20spaces”</p>\n<pre><code>url.search = \"q=foo#bar\";\n\nurl.search\n</code></pre>\n<p>“?q=foo%23bar”</p>\n<pre><code>url.href\n</code></pre>\n<p><a href=\"https://example.com/path%20with%20spaces?q=foo%23bar\" class=\"markup--anchor markup--p-anchor\">“https://example.com/path%20with%20spaces?q=foo%23bar</a>\"</p>\n<p>Often, however, HTTP requests encode the values of multiple form fields or multiple API parameters into the query portion of a URL. In this format, the query portion of the URL is a question mark followed by one or more name/value pairs, which are separated from one another by ampersands.</p>\n<p>If you want to encode these kinds of name/value pairs into the query portion of a URL, then the searchParams property will be more useful than the search property.</p>\n<p><code>let url = new URL(\"https://example.com/search\");</code></p>\n<p><code>url.search</code></p>\n<p>“”</p>\n<p><code>url.searchParams.append(\"q\", \"term\");</code></p>\n<p><code>url.search</code></p>\n<p>“?q=term”</p>\n<p><code>url.searchParams.set(\"q\", \"x\");</code></p>\n<p><code>url.search</code></p>\n<p>“?q=x”</p>\n<p><code>url.searchParams.append(\"opts\", \"1\");</code></p>\n<p><code>url.search</code></p>\n<p>“?q=x&#x26;opts=1”</p>\n<p>The value of the searchParams property is a URLSearchParams object.</p>\n<p><code>let url = new URL(\"http://example.com\");</code></p>\n<p><code>let params = new URLSearchParams();</code></p>\n<p><code>params.append(\"q\", \"term\");</code></p>\n<p><code>params.append(\"opts\", \"exact\");</code></p>\n<p><code>params.toString()</code></p>\n<p>“q=term&#x26;opts=exact”</p>\n<p><code>url.search = params;</code></p>\n<p><code>url.href</code></p>\n<p><a href=\"http://example.com/\" class=\"markup--anchor markup--p-anchor\">“http://example.com/</a>?q=term&#x26;opts=exact\"</p>\n<h3>Timers</h3>\n<p><code>setTimeout()</code> and<code>setInterval()</code>—that allow programs to ask the browser to invoke a function after a specified amount of time has elapsed or to invoke the function repeatedly at a specified interval.</p>\n<pre><code>setTimeout(() => { console.log(\"Ready...\"); }, 1000);\n\nsetTimeout(() => { console.log(\"set...\"); }, 2000);\n\nsetTimeout(() => { console.log(\"go!\"); }, 3000);\n</code></pre>\n<p>If you want to invoke a function repeatedly, use <code>setInterval()</code></p>\n<p>Both <code>setTimeout()</code> and <code>setInterval()</code> return a value. If you save this value in a variable, you can then use it later to cancel the execution of the function by passing it to <code>clearTimeout()</code> or <code>clearInterval()</code>.</p>\n<pre><code>let clock = setInterval(() => {\n\nconsole.clear();\n\nconsole.log(new Date().toLocaleTimeString());\n\n}, 1000);\n\nsetTimeout(() => { clearInterval(clock); }, 10000);\n</code></pre>\n<p>After 10 seconds: stop the repeating code above</p>\n<h3>Iterators and Generators</h3>\n<p>The iterator method of an iterable object does not have a conventional name but uses the Symbol, Symbol.iterator as its name. So a simple for/of loop over an iterable object iterable could also be written the hard way, like this:</p>\n<pre><code>let iterable = [99];\n\nlet iterator = iterable[Symbol.iterator]();\n\nfor(let result = iterator.next(); !result.done; result =iterator.next()) {\n\nconsole.log(result.value) // result.value == 99\n\n}\n</code></pre>\n<p>When you want to iterate though a “partially used” iterator:</p>\n<p><code>let list = [1,2,3,4,5];</code><br>\n<code>let iter = list[Symbol.iterator]();</code></p>\n<p><code>let head = iter.next().value;</code></p>\n<p>head == 1</p>\n<p><code>let tail = [...iter];</code></p>\n<p>tail == [2,3,4,5]</p>\n<h3>Implementing Iterable Objects</h3>\n<p>we will implement the Range class one more time, making it iterable without relying on a generator.</p>\n<p>In order to make a class iterable, you must implement a method whose name is the Symbol <code>Symbol.iterator</code></p>\n<pre><code>class Range {\n\nconstructor (from, to) {\n\nthis.from = from;\n\nthis.to = to;\n\n}\n\nhas(x) { return typeof x === \"number\" &#x26;&#x26; this.from &#x3C;= x &#x26;&#x26; x &#x3C;= this.to; }\n\ntoString() { return `{ x | ${this.from} ≤ x ≤ ${this.to}}`; }\n\n[Symbol.iterator]() {\n\nlet next = Math.ceil(this.from);\n\nlet last = this.to;\n\nreturn {\n\nnext() {\n\nreturn (next &#x3C;= last) ? { value: next++ } : { done: true };\n\n},\n\n[Symbol.iterator]() { return this; }\n\n};\n\n}\n\n}\n\nfor(let x of new Range(1,10)) console.log(x);\n</code></pre>\n<p>Logs numbers 1 to 10</p>\n<pre><code>[...new Range(-2,2)]\n</code></pre>\n<p>[-2, -1, 0,1, 2]</p>\n<p>In addition to making your classes iterable, it can be quite useful to define functions that return iterable values.</p>\n<p>Return an iterable object that iterates the result of applying <code>f()</code> to each value from the source iterable</p>\n<pre><code>function map(iterable, f) {\n\nlet iterator = iterable[Symbol.iterator]();\n\nreturn {\n\n[Symbol.iterator]() { return this; },\n\nnext() {\n\nlet v = iterator.next();\n\nif (v.done) {\n\nreturn v;\n\n}\n\nelse {\n\nreturn { value: f(v.value) };\n\n}\n\n}\n\n};\n\n}\n</code></pre>\n<p><code>[...map(new Range(1,4), x => x*x)]</code></p>\n<p>[1, 4, 9, 16]</p>\n<p>Return an iterable object that filters the specified iterable, iterating only those elements for which the predicate returns true</p>\n<pre><code>function filter(iterable, predicate) {\n\nlet iterator = iterable[Symbol.iterator]();\n\nreturn {\n\n[Symbol.iterator]() { return this; },\n\nnext() {\n\nfor(;;) {\n\nlet v = iterator.next();\n\nif (v.done || predicate(v.value)) {\n\nreturn v;\n\n}\n\n}\n\n}\n\n};\n\n}\n</code></pre>\n<p><code>[...filter(new Range(1,10), x => x % 2 === 0)]</code></p>\n<p>[2,4,6,8,10]</p>\n<h3>Generators</h3>\n<p>Particularly useful when the values to be iterated are not the elements of a data structure, but the result of a computation.</p>\n<p>To create a generator, you must first define a generator function — defined with the keyword <code>function*</code> rather than <code>function</code></p>\n<p>When you invoke a generator function, it does not actually execute the function body, but instead returns a generator object. This generator object is an iterator.</p>\n<p>Calling its <code>next()</code> method causes the body of the generator function to run from the start (or whatever its current position is) until it reaches a <code>yield</code> statement.</p>\n<p>The value of the <code>yield</code> statement becomes the value returned by the <code>next()</code> call on the iterator.</p>\n<pre><code>function* oneDigitPrimes() {\n\nyield 2;\n\nyield 3;\n\nyield 5;\n\nyield 7;\n\n}\n\nlet primes = oneDigitPrimes();\n</code></pre>\n<p>we get a generator</p>\n<pre><code>primes.next().value\n</code></pre>\n<p>2</p>\n<pre><code>primes.next().value\n</code></pre>\n<p>3</p>\n<pre><code>primes.next().value\n</code></pre>\n<p>5</p>\n<pre><code>primes.next().value\n</code></pre>\n<p>7</p>\n<pre><code>primes.next().done\n</code></pre>\n<p>true</p>\n<p>Generators have a <code>Symbol.iterator</code> method to make them iterable</p>\n<p><code>primes[Symbol.iterator]()</code></p>\n<p><code>[...oneDigitPrimes()]</code></p>\n<p>[2,3,5,7]</p>\n<pre><code>let sum = 0;\n\nfor(let prime of oneDigitPrimes()) sum += prime;\n\nsum\n</code></pre>\n<p>17</p>\n<p>Like regular functions, however, we can also define generators in expression form.</p>\n<pre><code>const seq = function*(from,to) {\n\nfor(let i = from; i &#x3C;= to; i++) yield i;\n\n};\n\n[...seq(3,5)]\n</code></pre>\n<p>[3, 4, 5]</p>\n<p>In classes and object literals, we can use shorthand notation to omit the function keyword entirely when we define methods.</p>\n<pre><code>let o = {\n\nx: 1, y: 2, z: 3,\n\n*g() {\n\nfor(let key of Object.keys(this)) {\n\nyield key;\n\n}\n\n}\n\n};\n</code></pre>\n<p><code>[...o.g()]</code></p>\n<p>[“x”, “y”, “z”, “g”]</p>\n<p>Generators often make it particularly easy to define iterable classes.</p>\n<pre><code>*[Symbol.iterator]() {\n\nfor(let x = Math.ceil(this.from); x &#x3C;= this.to; x++)\n\nyield x;\n\n}\n</code></pre>\n<h3>Generator Examples</h3>\n<p>Generators are more interesting if they actually generate the values they yield by doing some kind of computation.</p>\n<p>generator function that yields Fibonacci numbers</p>\n<pre><code>function* fibonacciSequence() {\n\nlet x = 0, y = 1;\n\nfor(;;) {\n\nyield y;\n\n[x, y] = [y, x+y];\n\n}\n\n}\n</code></pre>\n<p>If this generator is used with the … spread operator, it will loop until memory is exhausted and the program crashes.</p>\n<p>Use it in a <code>for/of</code> loop, however</p>\n<pre><code>function fibonacci(n) {\n\nfor(let f of fibonacciSequence()) {\n\nif (n-- &#x3C;= 0) return f;\n\n}\n\n}\n\nfibonacci(20)\n</code></pre>\n<p>10946</p>\n<p>This kind of infinite generator becomes more useful with a <code>take()</code> generator like this</p>\n<pre><code>function* take(n, iterable) {\n\nlet it = iterable[Symbol.iterator]();\n\nwhile(n-- > 0) {\n\nlet next = it.next();\n\nif (next.done) return;\n\nelse yield next.value;\n\n}\n\n}\n\n[...take(5, fibonacciSequence())]\n</code></pre>\n<p>[1, 1, 2, 3, 5]</p>\n<h3>Asynchronous Javascript</h3>\n<p><code>Promises</code>, new in ES6, are objects that represent the not-yet-available result of an asynchronous operation.</p>\n<p>The keywords <code>async</code> and <code>await</code> were introduced in ES2017 and provide new syntax that simplifies asynchronous programming by allowing you to structure your Promise based code as if it was synchronous.</p>\n<p>Asynchronous iterators and the<code>for/await</code> loop were introduced in ES2018 and allow you to work with streams of asynchronous events using simple loops that appear synchronous.</p>\n<h3>Asynchronous Programming with Callbacks</h3>\n<h3>Timers</h3>\n<p><code>setTimeout(checkForUpdates, 60000);</code></p>\n<pre><code>let updateIntervalId = setInterval(checkForUpdates, 60000);\n\nfunction stopCheckingForUpdates() {\n\nclearInterval(updateIntervalId);\n\n}\n</code></pre>\n<h3>Events</h3>\n<p>Event-driven JavaScript programs register callback functions for specified types of events in specified contexts, and the web browser invokes those functions whenever the specified events occur.</p>\n<p>These callback functions are called event handlers or event listeners, and they are registered with <code>addEventListener()</code></p>\n<p>Ask the web browser to return an object representing the HTML &#x3C;button> element that matches this CSS selector:</p>\n<p><code>let okay = document.querySelector('#confirmUpdateDialogbutton.okay');</code></p>\n<p>Now register a callback function to be invoked when the user clicks on that button</p>\n<p><code>okay.addEventListener('click', applyUpdate);</code></p>\n<h3>Network Events</h3>\n<p>JavaScript running in the browser can fetch data from a web server with code like this:</p>\n<pre><code>function getCurrentVersionNumber(versionCallback) {\n\nlet request = new XMLHttpRequest();\n\nrequest.open(\"GET\", \"http://www.example.com/api/version\");\n\nrequest.send();\n\nrequest.onload = function() {\n\nif (request.status === 200) {\n\nlet currentVersion = parseFloat(request.responseText);\n\nversionCallback(null, currentVersion);\n\n}\n\nelse {\n\nversionCallback(response.statusText, null);\n\n}\n\n};\n\nrequest.onerror = request.ontimeout = function(e) {\n\nversionCallback(e.type, null);\n\n};\n\n}\n</code></pre>\n<h3>Promises</h3>\n<p>Promises, a core language feature designed to simplify asynchronous programming.</p>\n<p>A Promise is an object that represents the result of an asynchronous computation. That result may or may not be ready yet, and the Promise API is intentionally vague about this: there is no way to synchronously get the value of a Promise; you can only ask the Promise to call a callback function when the value is ready.</p>\n<p>One real problem with callback-based asynchronous programming is that it is common to end up with callbacks inside callbacks inside callbacks, with lines of code so highly indented that it is difficult to read.</p>\n<p>Promises allow this kind of nested callback to be re-expressed as a more linear Promise chain that tends to be easier to read and easier to reason about.</p>\n<p>Another problem with callbacks is that they can make handling errors difficult. If an asynchronous function (or an asynchronously invoked callback) throws an exception, there is no way for that exception to propagate back to the initiator of the asynchronous operation. This is a fundamental fact about asynchronous programming: it breaks exception handling. Promises help here by standardizing a way to handle errors and providing a way for errors to propagate correctly through a chain of promises.</p>\n<p>Note that Promises represent the future results of single asynchronous computations. They cannot be used to represent repeated asynchronous computations, however.</p>\n<p>We can't use Promises to replace <code>setInterval()</code> because that function invokes a callback function repeatedly, which is something that Promises are just not designed to do.</p>\n<h3>Using Promises</h3>\n<p>How we would use this Promise returning utility function</p>\n<pre><code>getJSON(url).then(jsonData => {\n\n// callback function that will be asynchronously invoked with the parsed JSON value when it becomes available.\n\n});\n</code></pre>\n<p>The Promise object defines a then() instance method. Instead of passing our callback function directly to <code>getJSON()</code>, we instead pass it to the then() method. When the HTTP response arrives, the body of that response is parsed as JSON, and the resulting parsed value is passed to the function that we passed to <code>then()</code>.</p>\n<p>If you call the <code>then()</code> method of a Promise object multiple times, each of the functions you specify will be called when the promised computation is complete.</p>\n<p>Unlike many event listeners, though, a Promise represents a single computation, and each function registered with then() will be invoked only once.</p>\n<pre><code>function displayUserProfile(profile) { ...}\n\ngetJSON(\"/api/user/profile\").then(displayUserProfile);\n</code></pre>\n<h3>HANDLING ERRORS WITH PROMISES</h3>\n<p>Asynchronous operations, particularly those that involve networking, can typically fail in a number of ways, and robust code has to be written to handle the errors that will inevitably occur.</p>\n<p><code>getJSON(\"/api/user/profile\").then(displayUserProfile, handleProfileError);</code></p>\n<p>if <code>getJSON()</code> runs normally, it passes its result to <code>displayUserProfile()</code>. If there is an error (the user is not logged in, the server is down, the user's internet connection dropped, the request timed out, etc.), then <code>getJSON()</code> passes an Error object to <code>handleProfileError()</code>.</p>\n<p>In practice, it is rare to see two functions passed to then(). There is a better and more idiomatic way of handling errors when working with Promises.</p>\n<p>To understand it, first consider what happens if <code>getJSON()</code> completes normally but an error occurs in <code>displayUserProfile()</code>. That callback function is invoked asynchronously when <code>getJSON()</code> returns, so it is also asynchronous and cannot meaningfully throw an exception (because there is no code on the call stack to handle it).</p>\n<pre><code>getJSON(\"/api/user/profile\").then(displayUserProfile).catch(handleProfileError);\n</code></pre>\n<p>With this code, a normal result from<code>getJSON()</code> is still passed to <code>displayUserProfile()</code>, but any error in <code>getJSON()</code> or in <code>displayUserProfile()</code> (including any exceptions thrown by <code>displayUserProfile</code>) get passed to <code>handleProfileError()</code>.</p>\n<h3>Chaining Promises</h3>\n<p>One of the most important benefits of Promises is that they provide a natural way to express a sequence of asynchronous operations as a linear chain of <code>then()</code> method invocations, without having to nest each operation within the callback of the previous one.</p>\n<pre><code>fetch(documentURL)\n\n.then(response => response.json())\n\n.then(document => {return render(document); })\n\n.then(rendered => {cacheInDatabase(rendered); })\n\n.catch(error => handle(error));\n</code></pre>\n<p>has largely been replaced by the newer, Promise-based Fetch API. In its simplest form, this new HTTP API is just the function fetch(). That promise is fulfilled when the HTTP response begins to arrive and the HTTP status and headers are available.</p>\n<pre><code>fetch(\"/api/user/profile\")\n\n.then(response => {\n\nif (response.ok &#x26;&#x26;  response.headers.get(\"Content-Type\") === \"application/json\") {\n\n// What can we do here? We don't actually have the response body yet.\n\n}\n\n});\n</code></pre>\n<p>But although the initial Promise is fulfilled, the body of the response may not yet have arrived. So these <code>text()</code> and<code>json()</code> methods for accessing the body of the response themselves return Promises.</p>\n<pre><code>fetch(\"/api/user/profile\")\n\n.then(response => {\n\nreturn response.json();\n\n})\n\n.then(profile => {\n\ndisplayUserProfile(profile);\n\n});\n</code></pre>\n<p>There is a second <code>then()</code> in the chain, which means that the first invocation of the <code>then()</code> method must itself return a Promise. That is not how Promises work, however.</p>\n<p>When we write a chain of <code>.then()</code> invocations, we are not registering multiple callbacks on a single Promise object. Instead, each invocation of the <code>then()</code> method returns a new Promise object. That new Promise object is not fulfilled until the function passed to <code>then()</code> is complete.</p>\n<pre><code>fetch(theURL)       // task 1; returns promise 1\n\n.then(callback1)  // task 2; returns promise 2\n\n.then(callback2); // task 3; returns promise 3\n</code></pre>\n<h3>Resolving Promises</h3>\n<p>There is actually a fourth Promise object involved as which brings up the point of what it means for a Promise to be “resolved.”</p>\n<p>fetch() returns a Promise object which, when fulfilled, passes a Response object to the callback function we register. This Response object has <code>.text(), .json(),</code> and other methods to request the body of the HTTP response in various forms. But since the body may not yet have arrived, these methods must return Promise objects.</p>\n<p>“task 2” calls the <code>.json()</code> method and returns its value. This is the fourth Promise object, and it is the return value of the <code>callback1()</code> function.</p>\n<p>Let's consider:</p>\n<pre><code>function c1(response) {\n\nlet p4 = response.json();\n\nreturn p4;\n\n}\n\n// callback 1\n\n// returns promise 4\n\nfunction c2(profile) {\n\ndisplayUserProfile(profile);\n\n}\n\n// callback 2\n\nlet p1 = fetch(\"/api/user/profile\");\n\npromise 1, task 1\n\nlet p2 = p1.then(c1);\n\npromise 2, task 2\n\nlet p3 = p2.then(c2);\n\npromise 3, task 3\n</code></pre>\n<p>In order for Promise chains to work usefully, the output of task 2 must become the input to task 3. The input to task 3 is the body of the URL that was fetched, parsed as a JSON object. But the return value of callback c1 is not a JSON object, but Promise p4 for that JSON object.</p>\n<p>When p1 is fulfilled, c1 is invoked, and task 2 begins. And when p2 is fulfilled, c2 is invoked, and task 3 begins.</p>\n<p>And when p2 is fulfilled, c2 is invoked, and task 3 begins. But just because task 2 begins when c1 is invoked,it does not mean that task 2 must end when c1 returns.</p>\n<p>Promises are about managing asynchronous tasks, and if task 2 is asynchronous, then that task will not be complete by the time the callback returns.</p>\n<p>When you pass a callback c to the <code>then()</code> method, <code>then()</code> returns a Promise p and arranges to asynchronously invoke c at some later time. The callback performs some computation and returns a value v. When the callback returns, p is resolved with the value v. When a Promise is resolved with a value that is not itself a Promise, it is immediately fulfilled with that value.</p>\n<p>So if c returns a non-Promise, that return value becomes the value of p, p is fulfilled and we are done. But if the return value v is itself a Promise, then p is resolved but not yet fulfilled.</p>\n<p>At this stage, p cannot settle until the Promise v settles. If v is fulfilled, then p will be fulfilled to the same value. If v is rejected, then p will be rejected for the same reason. This is what the “resolved” state of a Promise means</p>\n<p>the Promise has become associated with, or “locked onto,” another Promise. We don't know yet whether p will be fulfilled or rejected, but our callback c no longer has any control over that. p is “resolved” in the sense that its fate now depends entirely on what happens to Promise v.</p>\n<p>Let's bring this back to our URL-fetching example. When c1 returns p4, p2 is resolved. But being resolved is not the same as being fulfilled, so task 3 does not begin yet. When the full body of the HTTP response becomes available, then the .<code>json()</code> method can parse it and use that parsed value to fulfill p4. When p4 is fulfilled, p2 is automatically fulfilled as well, with the same parsed JSON value. At this point, the parsed JSON object is passed to c2, and task 3 begins.</p>\n<h3>More on Promises and Errors</h3>\n<p>With synchronous code, if you leave out error-handling code, you'll at least get an exception and a stack trace that you can use to figure out what is going wrong. With asynchronous code, unhandled exceptions will often go unreported, and errors can occur silently, making them much harder to debug. The good news is that the <code>.catch()</code> method makes it easy to handle errors when working with Promises.</p>\n<p>THE CATCH AND FINALLY METHODS</p>\n<p>The <code>.catch()</code> method of a Promise is simply a shorthand way to call <code>.then()</code> with null as the first argument and an error-handling callback as the second argument.</p>\n<p>Normal exceptions don't work with asynchronous code. The <code>.catch()</code> method of Promises is an alternative that does work for asynchronous code.</p>\n<pre><code>fetch(\"/api/user/profile\")\n\n.then(response => {\n\nif (!response.ok) {\n\nreturn null;\n\n}\n\nlet type = response.headers.get(\"content-type\");\n\nif (type !== \"application/json\") {\n\nthrow new TypeError(`Expected JSON, got ${type}`);\n\n}\n\nreturn response.json();\n\n})\n\n.then(profile => {\n\nif (profile) {\n\ndisplayUserProfile(profile);\n\n}\n\nelse {\n\ndisplayLoggedOutProfilePage();\n\n}\n\n})\n\n.catch(e => {\n\nif (e instanceof NetworkError) {\n\ndisplayErrorMessage(\"Check your internet connection.\");\n\n}\n\nelse if (e instanceof TypeError) {\n\ndisplayErrorMessage(\"Something is wrong with our server!\");\n\n}\n\nelse {\n\nconsole.error(e);\n\n}\n\n});\n</code></pre>\n<p>p1 is the Promise returned by the <code>fetch()</code> call</p>\n<p>p2 is the Promise returned by the first <code>.then()</code> call</p>\n<p>c1 is the callback that we pass to that .<code>then()</code> call</p>\n<p>p3 is the Promise returned by the second <code>.then()</code> call</p>\n<p>c2 is the callback we pass to that call</p>\n<p>c3 is the callback that we pass to the <code>.catch()</code> call</p>\n<p>The first thing that could fail is the fetch() request itself. Let's say p1 was rejected with a NetworkError object.</p>\n<p>We didn't pass an error-handling callback function as the second argument to the <code>.then()</code> call, so p2 rejects as well with the same NetworkError object.</p>\n<p>Without a handler, though, p2 is rejected, and then p3 is rejected for the same reason.</p>\n<p>At this point, the c3 error-handling callback is called, and the NetworkError-specific code within it runs.</p>\n<p>There are a couple of things worth noting about this code. First, notice that the error object thrown with a regular, synchronous throw statement ends up being handled asynchronously with a <code>.catch()</code> method invocation in a Promise chain. This should make it clear why this shorthand method is preferred over passing a second argument to .<code>then()</code>, and also why it is so idiomatic to end Promise chains with a <code>.catch()</code> call.</p>\n<p>it is also perfectly valid to use <code>.catch()</code> elsewhere in a Promise chain. If one of the stages in your Promise chain can fail with an error, and if the error is some kind of recoverable error that should not stop the rest of the chain from running, then you can insert a <code>.catch()</code> call in the chain, resulting in code that might look like this:</p>\n<pre><code>startAsyncOperation()\n\n.then(doStageTwo)\n\n.catch(recoverFromStageTwoError)\n\n.then(doStageThree)\n\n.then(doStageFour)\n\n.catch(logStageThreeAndFourErrors);\n</code></pre>\n<p>If the callback returns normally, then the <code>.catch()</code> callback will be skipped, and the return value of the previous callback will become the input to the next .<code>then()</code> callback.</p>\n<p>Once an error has been passed to a <code>.catch()</code> callback, it stops propagating down the Promise chain. A <code>.catch()</code> callback can throw a new error, but if it returns normally, than that return value is used to resolve and/or fulfill the associated Promise, and<br>\nthe error stops propagating.</p>\n<p>Sometimes, in complex network environments, errors can occur more or less at random, and it can be appropriate to handle those errors by simply retrying the asynchronous request.</p>\n<pre><code>queryDatabase()\n\n.catch(e => wait(500).then(queryDatabase))\n\n.then(displayTable)\n\n.catch(displayDatabaseError);\n</code></pre>\n<h3>Promises in Parallel</h3>\n<p>Sometimes,we want to execute a number of asynchronous operations in parallel. The function <code>Promise.all()</code> can do this. <code>Promise.all()</code> takes an array of Promise objects as its input and returns a Promise.</p>\n<p>The returned Promise will be rejected if any of the input Promises are rejected. Otherwise, it will be fulfilled with an array of the fulfillment values of each of the input Promises.</p>\n<pre><code>const urls = [ /* zero or more URLs here */ ];\n\npromises = urls.map(url => fetch(url).then(r => r.text()));\n\nPromise.all(promises)\n\n.then(bodies => { /* do something with the array of strings */ })\n\n.catch(e => console.error(e));\n</code></pre>\n<p>The Promise returned by <code>Promise.all()</code> rejects when any of the input Promises is rejected. This happens immediately upon the first rejection and can happen while other input Promises are still pending. In ES2020, <code>Promise.allSettled()</code> takes an array of input<br>\nPromises and returns a Promise, just like Promise.all() does. But <code>Promise.allSettled()</code> never rejects the returned Promise, and it does not fulfill that Promise until all of the input Promises have settled. The Promise resolves to an array of objects, with one object for each input Promise. Each of these returned objects has a status property set to \"fulfilled\" or \"rejected.\" If the status is \"fulfilled\", then the object will also have a value property that gives the fulfillment value. And if the status is \"rejected\", then the object will also have a reason property that gives the error or rejection value of the corresponding Promise.</p>\n<pre><code>Promise.allSettled([Promise.resolve(1), Promise.reject(2),3]).then(results => {\n\nresults[0] // => { status: \"fulfilled\", value: 1 }\n\nresults[1] // => { status: \"rejected\", reason: 2 }\n\nresults[2] // => { status: \"fulfilled\", value: 3 }\n\n});\n</code></pre>\n<p>Occasionally, you may want to run a number of Promises at once but may only care about the value of the first one to fulfill. In that case, you can use <code>Promise.race()</code> instead of <code>Promise.all()</code>. It returns a Promise that is fulfilled or rejected when the first of the Promises in the input array is fulfilled or rejected.</p>\n<h3>Making Promises</h3>\n<h3>Promises in Sequence</h3>\n<h3>async and await</h3>\n<p>These new keywords dramatically simplify the use of Promises and allow us to write Promise-based, asynchronous code that looks like synchronous code that blocks while waiting for network responses or other asynchronous events.</p>\n<p>Asynchronous code can't return a value or throw an exception the way that regular synchronous code can. And this is why Promises are designed the way the are. The value of a fulfilled Promise is like the return value of a synchronous function. And the value of a rejected Promise is like a value thrown by a synchronous function.</p>\n<p><code>async</code> and <code>await</code> take efficient, Promise-based code and hide the Promises so that your asynchronous code can be as easy to read and as easy to reason about as inefficient, blocking, synchronous code.</p>\n<p>Given a Promise object p, the expression await p waits until p settles. If p fulfills, then the value of await p is the fulfillment value of p. On the other hand, if p is rejected, then the await p expression throws the rejection value of p.</p>\n<pre><code>let response = await fetch(\"/api/user/profile\");\n\nlet profile = await response.json();\n</code></pre>\n<p>It is critical to understand right away that the <code>await</code> keyword does not cause your program to block and literally do nothing until the specified Promise settles. The code remains asynchronous, and the <code>await</code> simply disguises this fact. This means that any code that uses await is itself asynchronous.</p>\n<h3>async Functions</h3>\n<p>Because any code that uses await is asynchronous, there is one critical rule: you can only use the await keyword within functions that have been declared with the <code>async</code> keyword.</p>\n<pre><code>async function getHighScore() {\n\nlet response = await fetch(\"/api/user/profile\");\n\nlet profile = await response.json();\n\nreturn profile.highScore;\n\n}\n</code></pre>\n<p>Declaring a function <code>async</code> means that the return value of the function will be a Promise even if no Promise-related code appears in the body of the function.</p>\n<p>The <code>getHighScore()</code> function is declared <code>async</code>, so it returns a Promise. And because it returns a Promise, we can use the <code>await</code> keyword with it:</p>\n<pre><code>displayHighScore(await getHighScore());\n</code></pre>\n<h3>Awaiting Multiple Promises</h3>\n<p>Suppose that we've written our <code>getJSON()</code> function using async:</p>\n<pre><code>async function getJSON(url) {\n\nlet response = await fetch(url);\n\nlet body = await response.json();\n\nreturn body;\n\n}\n</code></pre>\n<p>And now suppose that we want to fetch two JSON values with this function</p>\n<pre><code>let value1 = await getJSON(url1);\n\nlet value2 = await getJSON(url2);\n</code></pre>\n<p>The problem with this code is that it is unnecessarily sequential: the fetch of the second URL will not begin until the first fetch is complete. If the second URL does not depend on the value obtained from the firstURL, then we should probably try to fetch the two values at the same time.</p>\n<pre><code>let [value1, value2] = await Promise.all([getJSON(url1), getJSON(url2)]);\n</code></pre>\n<h3>The for/await Loop</h3>\n<p>Suppose you have an array of URLs:</p>\n<pre><code>const urls = [url1, url2, url3];\n</code></pre>\n<p>You can call fetch() on each URL to get an array of Promises:</p>\n<pre><code>const promises = urls.map(url => fetch(url));\n</code></pre>\n<p>We could now use<code>Promise.all()</code> to wait for all the Promises in the array to be fulfilled. But suppose we want the results of the first fetch as soon as they become available and don't want to wait for all the URLs to be fetched.</p>\n<pre><code>for(const promise of promises) {\n\nresponse = await promise;\n\nhandle(response);\n\n}\n</code></pre>\n<p>←></p>\n<pre><code>for await (const response of promises) {\n\nhandle(response);\n\n}\n</code></pre>\n<p>both examples will only work if they are within functions declared async; a <code>for/await</code> loop is no different than a regular await expression in that way</p>\n</details>"},{"url":"/docs/reference/bookmarks/","relativePath":"docs/reference/bookmarks.md","relativeDir":"docs/reference","base":"bookmarks.md","name":"bookmarks","frontmatter":{"title":"Web Dev Bookmarks","weight":0,"excerpt":"Web Dev Bookmarks","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<h2>Web Dev Bookmarks</h2>\n<h1>Frontend Development <a href=\"https://github.com/sindresorhus/awesome\"><img src=\"https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\" alt=\"Awesome\"></a></h1>\n<hr>\n<h2>Appearance</h2>\n<p>The outward or visible aspect of a website.</p>\n<ul>\n<li>\n<p><strong>Animation</strong>: The process of creating motion and shape change.</p>\n<ul>\n<li><strong><a href=\"http://daneden.github.io/animate.css/\">Animate.css</a></strong>: Just-add-water CSS animations.</li>\n<li><strong><a href=\"https://github.com/machito/animate.less\">Animate.less</a></strong>: A bunch of cool, fun, and cross-browser animations converted into LESS for you to use in your Bootstrap projects.</li>\n<li><strong><a href=\"https://github.com/juliangarnier/anime\">Anime.js</a></strong>: Anime is a flexible yet lightweight JavaScript animation library. It works with CSS, Individual Transforms, SVG, DOM attributes and JS Objects.</li>\n<li><strong><a href=\"http://srobbin.com/jquery-plugins/approach/\">Approach</a></strong>: A jQuery plugin that allows you to animate CSS properties based on distance to an object.</li>\n<li><strong><a href=\"http://jsfiddle.net/simurai/CGmCe/light/\">CSS Spritesheet Animation Example</a></strong>: Sprite Sheet animation with CSS3 using the steps() feature.</li>\n<li><strong><a href=\"http://hyperandroid.github.io/CAAT/\">Caat</a></strong>: Scene graph director-based animation framework for javascript.</li>\n<li><strong><a href=\"http://www.arahaya.com/canvasscript3/\">CanvasScript3</a></strong>: CanvasScript3 is a Javascript library for the new HTML5 Canvas with an interface similar to ActionScript3. This library enables Sprite Groups, Layers, Mouse Events, Keyboard Events, Bitmap Effects, Tween Animations etc.</li>\n<li><strong><a href=\"http://jindo.dev.naver.com/collie/\">Collie</a></strong>: Collie is a Javascript library that helps to create highly optimized animations and games using HTML 5. Collie runs on both PC and mobile using HTML 5 canvas and DOM.</li>\n<li><strong><a href=\"https://github.com/madrobby/emile\">Emile.js</a></strong>: Emile.js is a no-frills stand-alone CSS animation JavaScript framework.</li>\n<li><strong><a href=\"http://extralogical.net/projects/firmin/\">Firmin</a></strong>: Firmin is a JavaScript animation library using CSS transforms and transitions.</li>\n<li>\n<p><strong><a href=\"http://www.greensock.com/get-started-js/\">GreenSock Animation Platform</a></strong>: GreenSock Animation Platform is a suite of tools for scripted animation.</p>\n<ul>\n<li><strong><a href=\"http://codepen.io/GreenSock/\">Codepen Repository</a></strong>: Codepen repository with examples of Greensock usage and code.</li>\n<li><strong><a href=\"http://ahrengot.com/tutorials/greensock-javascript-animation/\">Examples</a></strong>: Here are a couple of examples demonstrating the core features of the Greensock Animation Platform.</li>\n<li><strong><a href=\"http://www.greensock.com/learning/\">Learning Center</a></strong>: Tutorials and videos for GreenSock Animation Platform.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://ricostacruz.com/jquery.transit/\">JQuery Transit</a></strong>: Super-smooth CSS3 transformations and transitions for jQuery.</li>\n<li><strong><a href=\"https://github.com/MikeMcTiernan/Janis\">Janis</a></strong>: Janis is a lightweight Javascript framework that provides simple animations via CSS transitions for modern browsers on the web as well as mobile devices.</li>\n<li><strong><a href=\"https://github.com/wambotron/Keanu\">Keanu</a></strong>: Keanu is a micro-lib for animation on Canvas/JS.</li>\n<li><strong><a href=\"https://github.com/miniMAC/magic\">Magic</a></strong>: CSS3 Animations with special effects.</li>\n<li><strong><a href=\"http://visionmedia.github.com/move.js/\">Move.js</a></strong>: Move.js is a small JavaScript library making CSS3 backed animation extremely simple and elegant.</li>\n<li><strong><a href=\"http://www.rich-harris.co.uk/ramjet/\">Ramjet</a></strong>: Ramjet makes it looks as though one DOM element is capable of transforming into another, no matter where the two elements sit in the DOM tree.</li>\n<li><strong><a href=\"http://rekapi.com/\">Rekapi</a></strong>: A keyframe animation library for JavaScript.</li>\n<li><strong><a href=\"http://svgjs.com/\">SVG.js</a></strong>: A lightweight library for manipulating and animating SVG.</li>\n<li><strong><a href=\"http://scripty2.com/\">Scripty2</a></strong>: scripty2 is a powerful, flexible JavaScript framework to help you write your own delicious visual effects &#x26; user interfaces.</li>\n<li><strong><a href=\"http://jeremyckahn.github.com/shifty/\">Shifty</a></strong>: Shifty is a tweening engine built in JavaScript. It is designed to fit any number of tweening needs.</li>\n<li><strong><a href=\"http://snapsvg.io/\">Snap.svg</a></strong>: Snap.svg JavaScript library makes working with your SVG assets as easy as jQuery makes working with the DOM.</li>\n<li><strong><a href=\"http://jeremyckahn.github.io/stylie/\">Stylie</a></strong>: Stylie is a fun tool for easily creating complex CSS animations. Quickly design your animation graphically, grab the generated code and go!</li>\n<li><strong><a href=\"http://jschr.github.io/textillate/\">Textillate.js</a></strong>: Textillate.js combines some awesome libraries to provide a ease-to-use plugin for applying CSS3 animations to any text.</li>\n<li><strong><a href=\"https://github.com/sole/tween.js\">Tween.js</a></strong>: Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.</li>\n<li><strong><a href=\"https://cssanimation.rocks/twitter-fave/\">Twitter Fave Animation</a></strong>: Rather than rely on CSS transitions, the new animation makes use of a series of images. Here's how to recreate the animation using the CSS animation steps timing function.</li>\n<li><strong><a href=\"http://alistapart.com/article/web-animation-past-present-and-future\">Web Animation Past, Present, and Future (2016)</a></strong>: Rachel Nabors explores the world of web animation standards, platforms and tools in 2016: SVG, SMIL, GreenSock AP, Framer, Browser Tooling etc.</li>\n<li>\n<p><strong><a href=\"http://w3c.github.io/web-animations/\">Web Animations API</a></strong>: Web Animations is a new JavaScript API for driving animated content on the web. By unifying the animation features of SVG and CSS, Web Animations unlocks features previously only usable declaratively, and exposes powerful, high-performance animation capabilities to developers.</p>\n<ul>\n<li><strong><a href=\"https://birtles.github.io/areweanimatedyet/\">Are we animated yet?</a></strong>: This page tracks the progress of implementing the Web Animations API in Firefox.</li>\n<li><strong><a href=\"http://codepen.io/danwilson/pen/XmWraY\">WAAPI Browser Support Test (+ Polyfill)</a></strong>: This codepen tests whether and to which extend your browser supports Web Animations API. The test is run after including the Polyfill.</li>\n<li><strong><a href=\"https://github.com/web-animations/web-animations-js\">Web Animations Polyfill</a></strong>: JavaScript implementation of the Web Animations API.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Typography</strong>: The style, arrangement, or appearance of typeset matter.</p>\n<ul>\n<li><strong><a href=\"https://www.zachleat.com/web/comprehensive-webfonts/\">A Comprehensive Guide to Font Loading Strategies</a></strong>: Zach Leatherman describes different approaches to loading of web fonts.</li>\n<li><strong><a href=\"https://edgewebfonts.adobe.com/fonts\">Adobe Edge Web Fonts</a></strong>: Edge Web Fonts is a free service that provides access to a large library of fonts for your website. It's one of the Edge Tools &#x26; Services from Adobe. Use of the service is free and unlimited.</li>\n<li><strong><a href=\"https://github.com/daneden/Baseline.js\">Baseline.js</a></strong>: A simple jQuery plugin for restoring vertical baselines thrown off by odd image sizes.</li>\n<li><strong><a href=\"http://www.newnet-soft.com/blog/csstypography\">CSS Typography cheat sheet</a></strong>: Small roundup on CSS features that will enhance your web typography.</li>\n<li><strong><a href=\"http://stackoverflow.com/questions/2892691/font-face-fonts-only-work-on-their-own-domain\">Convincing a browser to load fonts from other domains</a></strong>: A StackOverflow question about loading fonts across domains.</li>\n<li><strong><a href=\"http://fittextjs.com/\">FitText</a></strong>: FitText makes font-sizes flexible. Use this plugin on your fluid or responsive layout to achieve scalable headlines that fill the width of a parent element.</li>\n<li><strong><a href=\"http://simplefocus.com/flowtype/\">FlowType.JS</a></strong>: Font-size and line-height based on element width.</li>\n<li><strong><a href=\"http://media.24ways.org/2007/17/fontmatrix.html\">Fontmatrix</a></strong>: Matrix of fonts bundled with Mac and Windows operating systems, Microsoft Office and Adobe Creative Suite.</li>\n<li><strong><a href=\"https://www.google.com/fonts/\">Google Fonts</a></strong>: Google Fonts makes it quick and easy for everyone to use web fonts. Our goal is to create a directory of web fonts for the world to use. Our API service makes it easy to add Google Fonts to a website in seconds.</li>\n<li><strong><a href=\"http://matejlatin.github.io/Gutenberg/\">Gutenberg</a></strong>: Gutenberg is a flexible and simple-to-use web typography starter kit for web designers and developers.</li>\n<li><strong><a href=\"http://letteringjs.com/\">Lettering.js</a></strong>: Web type is exploding all over the web but CSS currently doesn't offer complete down-to-the-letter control. So we created a jQuery plugin to give you that control.</li>\n<li><strong><a href=\"http://open-foundry.com/\">OpenFoundry</a></strong>: A platform for open-source fonts in a noise-free environment; to highlight their beauty and encourage further exploration.</li>\n<li><strong><a href=\"http://tilomitra.github.io/csstypography/\">Pure Typography</a></strong>: CSS Styles for nicer web type. Depends on Pure.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webfonts/quick/\">Quick guide to webfonts via @font-face</a></strong>: The @font-face feature from CSS3 allows us to use custom typefaces on the web in an accessible, manipulable, and scalable way.</li>\n<li><strong><a href=\"https://www.smashingmagazine.com/2016/05/fluid-typography/\">Truly Fluid Typography With vh And vw Units</a></strong>: This article describes viewport units and other technics to achieve typography which resizes smoothly with the screen.</li>\n<li><strong><a href=\"https://github.com/hudsonfoo/typebutter\">TypeButter</a></strong>: TypeButter allows you to set optical kerning for any font on your website. If you're longing for beautifully laid out text that today' browsers just don't provide, this is the plugin for you.</li>\n<li><strong><a href=\"https://github.com/joshuarudd/typeset.css\">Typeset.css</a></strong>: A no-nonsense CSS typography reset for styling user-generated content like blog posts, comments, and forum content.</li>\n<li><strong><a href=\"http://stormwarning.github.io/typeset.css/\">Typeset.css</a></strong>: A Sass library that provides some sensible default styles, optional classes to use &#x26; extend as needed, and some utility functions &#x26; mixins to make elevating your typography simpler.</li>\n<li><strong><a href=\"http://baconforme.com/\">bacon</a></strong>: Bacon is a jQuery plugin that allows you to wrap text around a bezier curve or a line.</li>\n<li><strong><a href=\"https://github.com/freqDec/slabText/\">slabText</a></strong>: A jQuery plugin for producing big, bold &#x26; responsive headlines.</li>\n<li><strong><a href=\"http://jrvis.com/trunk8/\">trunk8</a></strong>: trunk8 is an intelligent text truncation plugin to jQuery. When applied to a large block of text, trunk8 will cut off just enough text to prevent it from spilling over.</li>\n</ul>\n</li>\n<li>\n<p><strong>Visualization</strong>: Placing data in a visual context.</p>\n<ul>\n<li><strong><a href=\"http://bonsaijs.org/\">Bonsai.js</a></strong>: A lightweight graphics library with an intuitive graphics API and an SVG renderer.</li>\n<li><strong><a href=\"http://www.chartjs.org/\">Chart.js</a></strong>: Simple, clean and engaging charts for designers and developers.</li>\n<li><strong><a href=\"http://square.github.io/crossfilter/\">Crossfilter</a></strong>: Crossfilter is a JavaScript library for exploring large multivariate datasets in the browser.</li>\n<li><strong><a href=\"http://square.github.io/cube/\">Cube</a></strong>: Cube is a system for collecting timestamped events and deriving metrics. By collecting events rather than metrics, Cube lets you compute aggregate statistics post hoc.</li>\n<li><strong><a href=\"http://square.github.io/cubism/\">Cubism.js</a></strong>: Cubism.js is a D3 plugin for visualizing time series. Use Cubism to construct better realtime dashboards, pulling data from Graphite, Cube and other sources.</li>\n<li>\n<p><strong><a href=\"https://d3js.org/\">D3.js</a></strong>: D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS.</p>\n<ul>\n<li><strong><a href=\"http://datamaps.github.io/\">DataMaps</a></strong>: Customizable SVG (world) map visualizations for the web in a single Javascript file using D3.js.</li>\n<li><strong><a href=\"http://vadim.ogievetsky.com/IntroD3/\">Interactive Introduction to D3</a></strong>: D3 slides in D3 that I put together after becoming frustrated with explaining D3 using PowerPoint.</li>\n<li><strong><a href=\"http://nvd3.org/\">NVD3</a></strong>: This project is an attempt to build re-usable charts and chart components for d3.js without taking away the power that d3.js gives you.</li>\n<li><strong><a href=\"http://www.janwillemtulp.com/2011/03/20/tutorial-introduction-to-d3/\">Tutorial: Introduction to D3</a></strong>: Basically we just plot hidden circles randomly on the screen, and then transition them to a portion of the screen. Then we add some interaction to it so that the circles will move once you move your mouse over them.</li>\n<li><strong><a href=\"http://tenxer.github.io/xcharts/\">xCharts</a></strong>: xCharts is a JavaScript library for building beautiful and custom data-driven chart visualizations for the web using D3.js. Using HTML, CSS, and SVG, xCharts are designed to be dynamic, fluid, and open to integrations and customization.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://rendro.github.io/easy-pie-chart/\">Easy Pie Chart</a></strong>: Easy pie chart is a jQuery plugin that uses the canvas element to render simple pie charts for single values</li>\n<li><strong><a href=\"http://www.flotcharts.org/\">Flot</a></strong>: Flot is a pure JavaScript plotting library for jQuery, with a focus on simple usage, attractive looks and interactive features.</li>\n<li><strong><a href=\"https://developers.google.com/chart/\">Google Chart Tools</a></strong>: The Google Visualization API allows you to create charts and reporting applications over structured data and helps integrate these directly into your website.</li>\n<li><strong><a href=\"http://paperjs.org\">Paper.js</a></strong>: Paper.js offers a clean Scene Graph / Document Object Model and a lot of powerful functionality to create and work with vector graphics and bezier curves.</li>\n<li><strong><a href=\"http://photon.attasi.com/\">Photon</a></strong>: Photon is a JavaScript library that adds simple lighting effects to DOM elements in 3D space.</li>\n<li><strong><a href=\"http://lipka.github.io/piecon/\">Piecon</a></strong>: A tiny javascript library for dynamically generating progress pie charts in your favicons.</li>\n<li><strong><a href=\"http://berniesumption.com/software/animator/\">Processing.js</a></strong>: Processing.js is the sister project of the popular Processing visual programming language, designed for the web. Processing.js makes your data visualizations work using web standards.</li>\n<li><strong><a href=\"http://smoothiecharts.org/\">Smoothie Charts</a></strong>: A JavaScript Charting Library for Streaming Data.</li>\n<li><strong><a href=\"http://timeline.knightlab.com/\">TimelineJS</a></strong>: TimelineJS is an open-source tool that enables anyone to build visually rich, interactive timelines.</li>\n<li><strong><a href=\"http://sbstjn.github.io/timesheet.js/\">Timesheet.js</a></strong>: Visualize your data and events with sexy HTML5 and CSS3. Create simple time sheets with sneaky JavaScript. Style them with CSS and have mobile fun as well.</li>\n<li><strong><a href=\"https://github.com/jimblackler/treefun\">Treefun by Jim Blackler</a></strong>: This tool creates SVG (Standard Vector Graphics) files to illustrate information structured as a basic tree.</li>\n<li><strong><a href=\"http://taitems.github.io/jQuery.Gantt/\">jQuery.Gantt</a></strong>: Draw Gantt charts with the famous jQuery ease of development.</li>\n<li><strong><a href=\"http://jstat.github.io/\">jStat</a></strong>: jStat is a statistical library written in JavaScript that allows you to perform advanced statistical operations without the need of a dedicated statistical language (e.g. MATLAB or R).</li>\n<li><strong><a href=\"http://morrisjs.github.io/morris.js/\">morris.js</a></strong>: Morris.js is a very simple API for drawing line, bar, area and donut charts.</li>\n<li><strong><a href=\"http://jgraph.github.io/mxgraph/\">mxgraph</a></strong>: mxGraph is a JavaScript diagramming library that enables interactive graph and charting applications to be quickly created that run natively in any major browser, both HTML 5 capable and Internet Explorer v7+.</li>\n<li><strong><a href=\"http://threejs.org/\">three.js</a></strong>: Three.js is a library that makes WebGL - 3D in the browser - easy to use. While a simple cube in raw WebGL would turn out hundreds of lines of Javascript and shader code, a Three.js equivalent is only a fraction of that.</li>\n<li><strong><a href=\"http://visjs.org/\">vis.js</a></strong>: Vis.js is a dynamic, browser based visualization library. The library is designed to be easy to use, handle large amounts of dynamic data, and enable manipulation of the data.</li>\n</ul>\n</li>\n</ul>\n<h2>Architecture</h2>\n<p>High level structure of the frontend code and the discipline of creating such structures.</p>\n<ul>\n<li>\n<p><strong>Algorithms</strong>: A self-contained step-by-step set of operations to be performed. Algorithms perform calculation, data processing, and/or automated reasoning tasks.</p>\n<ul>\n<li><strong><a href=\"https://github.com/parkjs814/AlgorithmVisualizer\">Algorithm Visualizer</a></strong>: A collection of algorithms with code and visualizations for each one of them.</li>\n<li><strong><a href=\"https://www.toptal.com/developers/sorting-algorithms/\">Sorting Algorithms Animations</a></strong>: The following animations illustrate how effectively data sets from different starting points can be sorted using different algorithms.</li>\n</ul>\n</li>\n<li>\n<p><strong>Design Patterns</strong>: Best practices that the programmer can use to solve common problems when designing an application or system.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://github.com/css-modules\">CSS Modules</a></strong>: A CSS Module is a CSS file in which all class names and animation names are scoped locally by default.</p>\n<ul>\n<li><strong><a href=\"https://github.com/css-modules/css-modules\">CSS Modules Documentation</a></strong>: General overview and some implementations.</li>\n<li><strong><a href=\"https://github.com/jacobp100/es-css-modules\">ES CSS Modules</a></strong>: PostCSS plugin that combines CSS Modules and ES Imports.</li>\n<li><strong><a href=\"https://medium.com/@jacobp/tree-shaking-bootstrap-95d6301f61a9\">Tree Shaking Bootstrap</a></strong>: Jacob Parker describes how to include only those parts of Bootstrap you are really using on your website by leveraging CSS modules and ES6 modules.</li>\n</ul>\n</li>\n<li>\n<p><strong>Components</strong>: Reusable and composable pieces of HTML, CSS and/or JavaScript code which are mostly used for GUI elements.</p>\n<ul>\n<li><strong><a href=\"https://github.com/Mercateo/component-check\">Component Check</a></strong>: In this project Donald Pipowitch compares the usage and development of components in several frameworks such as Angular, Ember, Cycle.js and React.</li>\n<li><strong><a href=\"https://medium.com/@learnreact/container-components-c0e67432e005\">Container Components</a></strong>: Container Components is a pattern which allows to separate data-fetching and rendering concerns and increase the reusability of the (child) components.</li>\n<li><strong><a href=\"http://livingstyleguide.devbridge.com/\">Devbridge Styleguide</a></strong>: Devbridge Styleguide helps you create, share, and automate a living visual style library of your brand.</li>\n<li><strong><a href=\"https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0\">Presentational and Container Components</a></strong>: Dan Abramov creates a pattern for separating presentational and container components to increase reusability and clarity of the application code.</li>\n<li>\n<p><strong>Web Components</strong>: Web Components is a W3C standard for encapsulated, reusable and composable widgets for the web platform.</p>\n<ul>\n<li><strong><a href=\"http://jonrimmer.github.io/are-we-componentized-yet/\">Are We Componentized Yet?</a></strong>: Tracking the progress of Web Components through standardisation, polyfillification and implementation.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webcomponents/customelements/\">Custom Elements</a></strong>: Eric Bidelman describes how to create new HTML elements and manage their life cycle.</li>\n<li><strong><a href=\"http://w3c.github.io/webcomponents/spec/custom/\">Custom Elements W3C Editor's Draft</a></strong>: This specification describes the method for enabling the author to define and use new types of DOM elements in a document.</li>\n<li><strong><a href=\"http://w3c.github.io/webcomponents/spec/imports/\">HTML Imports W3C Editor's Draft</a></strong>: HTML Imports are a way to include and reuse HTML documents in other HTML documents.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webcomponents/imports/\">HTML Imports: #include for the web</a></strong>: Eric Bidelman describes how to use HTML imports and goes through several edge cases.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webcomponents/template/\">HTML's New Template Tag</a></strong>: The template element allows you to declare fragments of DOM which are parsed, inert at page load, and instantiated later at runtime.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/\">Shadow DOM 101</a></strong>: Dominic Cooney shows you how to use Shadow DOM in this tutorial.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/\">Shadow DOM 201</a></strong>: Eric Bidelman explains advanced topics related to styling of Shadow DOM elements.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-301/\">Shadow DOM 301</a></strong>: Eric Bidelman talks about advanced Shadow DOM topics like multiple shadow roots, insertion points, event model and Shadow DOM Visualizer.</li>\n<li><strong><a href=\"http://w3c.github.io/webcomponents/spec/shadow/\">Shadow DOM W3C Editor's Draft</a></strong>: This specification describes a method of combining multiple DOM trees into one hierarchy and how these trees interact with each other within a document, thus enabling better composition of the DOM.</li>\n<li><strong><a href=\"http://html5-demos.appspot.com/static/shadowdom-visualizer/index.html\">ShadowDOM Visualizer</a></strong>: This tool allows you to visualize how Shadow DOM renders in the browser.</li>\n<li><strong><a href=\"https://blog.revillweb.com/why-web-components-are-so-important-66ad0bd4807a\">Why Web Components Are So Important</a></strong>: Leon Revill compares web components with concepts from different frameworks and explains why web components matter.</li>\n<li><strong><a href=\"https://blog.revillweb.com/write-web-components-with-es2015-es6-75585e1f2584\">Write Web Components with ES2015 (ES6)</a></strong>: This tutorial shows how to create a web component using ES2015 and how to make use of babel to transpile back to ES5.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>DOM Diffing &#x26; Patching</strong>: Diffing &#x26; Patching is a pattern which allows faster and simpler rendering and updating of DOM trees as manual manipulation à la jQuery.</p>\n<ul>\n<li><strong><a href=\"http://teropa.info/blog/2015/03/02/change-and-its-detection-in-javascript-frameworks.html\">Change And Its Detection In JavaScript Frameworks</a></strong>: This article explores several approaches to manage state: Ember's data binding, Angular's dirty checking, React's virtual DOM, and its relationship to immutable data structures.</li>\n<li><strong><a href=\"https://github.com/joelrich/citojs\">Cito.js</a></strong>: The core of cito.js consists of a virtual DOM library inspired by React/Mithril. On top of that, it will provide a component framework which will make it easy to build well-encapsulated components.</li>\n<li>\n<p><strong><a href=\"https://github.com/google/incremental-dom\">Incremental DOM</a></strong>: Incremental DOM is a library for building up DOM trees and updating them in-place when data changes. It differs from the established virtual DOM approach in that no intermediate tree is created (the existing tree is mutated in-place).</p>\n<ul>\n<li><strong><a href=\"https://medium.com/google-developers/introducing-incremental-dom-e98f79ce2c5f\">Introducing Incremental DOM</a></strong>: Incremental DOM is a library inspired by Virtual DOM developed at Google.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/patrick-steele-idem/morphdom\">Morphdom</a></strong>: Lightweight module for morphing an existing DOM node tree to match a target DOM node tree. It's fast and works with the real DOM—no virtual DOM here!</li>\n<li><strong><a href=\"http://blog.reverberate.org/2014/02/react-demystified.html\">React Demystified</a></strong>: This article is an attempt to explain the core ideas behind React.js and Virtual DOM.</li>\n<li><strong><a href=\"https://auth0.com/blog/2015/11/20/face-off-virtual-dom-vs-incremental-dom-vs-glimmer/\">React vs Incremental DOM vs Glimmer</a></strong>: In this post we will explore three technologies to build dynamic DOMs. We will also run benchmarks and find out which one is faster.</li>\n<li><strong><a href=\"https://medium.com/@yelouafi/react-less-virtual-dom-with-snabbdom-functions-everywhere-53b672cb2fe3\">React-less Virtual DOM with Snabbdom: functions everywhere!</a></strong>: Yassine Elouafi shows in this post how to write a virtual DOM based applications using a small and standalone library.</li>\n<li><strong><a href=\"https://github.com/paldepind/snabbdom\">Snabbdom</a></strong>: A virtual DOM library with focus on simplicity, modularity, powerful features and performance.</li>\n<li>\n<p><strong><a href=\"https://github.com/Matt-Esch/virtual-dom\">Virtual DOM</a></strong>: Virtual-dom is a collection of modules designed to provide a declarative way of representing the DOM for your app. So instead of updating the DOM, you simply create a virtual tree or VTree, which looks like the DOM state that you want.</p>\n<ul>\n<li><strong><a href=\"https://github.com/TimBeyer/html-to-vdom\">html-to-vdom</a></strong>: This is yet another library to convert HTML into a vtree. It's used in conjunction with virtual-dom to convert template based views into virtual-dom views.</li>\n<li><strong><a href=\"https://github.com/unframework/html2hyperscript\">html2hyperscript</a></strong>: Automatically translate old HTML markup into the new Hyperscript markup embeddable directly inside your component Javascript code.</li>\n<li><strong><a href=\"https://github.com/nthtran/vdom-to-html/\">vdom-to-html</a></strong>: Turn Virtual DOM nodes into HTML.</li>\n<li><strong><a href=\"https://github.com/marcelklehr/vdom-virtualize/\">vdom-virtualize</a></strong>: Turn a DOMNode into a virtual-dom node.</li>\n<li><strong><a href=\"https://github.com/yoshuawuyts/virtual-html\">virtual-html</a></strong>: Convert given HTML into Virtual DOM object.</li>\n<li><strong><a href=\"https://github.com/parshap/vtree-select\">vtree-select</a></strong>: Select vtree nodes (used by virtual-dom) using css selectors. Selector matching is done using cssauron. See the documentation for details on supported selectors.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Design Pattern Collections</strong>: Overview resources and collections of design patterns.</p>\n<ul>\n<li><strong><a href=\"http://nicolasgallagher.com/about-html-semantics-front-end-architecture/\">About HTML Semantics and Frontend Architecture</a></strong>: A collection of thoughts, experiences, ideas on HTML semantics, components and approaches to front-end architecture, class naming patterns, and HTTP compression.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=mKouqShWI4o\">Box Tech Talk: Scalable JavaScript Application Architecture</a></strong>: A video by Nicholas Zakas (2012) about JavaScript Architecture.</li>\n<li><strong><a href=\"https://addyosmani.com/resources/essentialjsdesignpatterns/book/\">Learning JavaScript Design Patterns</a></strong>: In this free book Addy Osmani explores applying both classical and modern design patterns to the JavaScript programming language.</li>\n<li><strong><a href=\"https://addyosmani.com/largescalejavascript/\">Patterns For Large-Scale JavaScript Application Architecture</a></strong>: An extensive overview by Addy Osmani of existing architectural solutions in the frontend development field.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=vXjVFPosQHw\">Scalable JavaScript Application Architecture</a></strong>: In this video (2011) Nicholas Zakas discusses frontend architecture for complex, modular web applications with significant JavaScript elements.</li>\n<li><strong><a href=\"http://singlepageappbook.com/\">Single Page Apps in Depth</a></strong>: This free book is what I wanted when I started working with single page apps. It's not an API reference on a particular framework, rather, the focus is on discussing patterns, implementation choices and decent practices.</li>\n</ul>\n</li>\n<li>\n<p><strong>JavaScript Modules</strong>: Modules divide programs into clusters of code that, by some criterion, belong together.</p>\n<ul>\n<li><strong><a href=\"http://eloquentjavascript.net/10_modules.html\">Chapter 10 of Eloquent JavaScript: Modules</a></strong>: This chapter explores some of the benefits that division of code provides and shows techniques for building modules in JavaScript.</li>\n<li><strong><a href=\"https://hacks.mozilla.org/2015/08/es6-in-depth-modules/\">ES6 In Depth: Modules</a></strong>: This article highlights export and import keywords from ES6.</li>\n<li><strong><a href=\"https://mariusgundersen.net/module-pusher/\">Efficient Module Loading Without Bundling</a></strong>: We can combine ES2015 modules, static analysis of those modules, HTTP/2, caching, Service Workers and a bloom-filter to create a server-client relationship where the client can efficiently load any module.</li>\n<li><strong><a href=\"https://medium.freecodecamp.com/javascript-modules-a-beginner-s-guide-783f7d7a5fcc#.i78m6tfs9\">JavaScript Modules: A Beginner's Guide</a></strong>: In this post, Preethi Kasireddy will unpack the buzzwords like module bundlers, AMD and CommonJS for you in plain English, including a few code samples.</li>\n<li><strong><a href=\"https://addyosmani.com/resources/essentialjsdesignpatterns/book/#modularjavascript\">Modern Modular JavaScript Design Patterns</a></strong>: A chapter from Essential JavaScript Design Patterns on Modules.</li>\n<li>\n<p><strong>Module Bundlers and Loaders</strong>: Libraries for bundling JavaScript Modules into one or several files.</p>\n<ul>\n<li>\n<p><strong><a href=\"http://browserify.org/\">Browserify</a></strong>: Browserify lets you require('modules') in the browser by bundling up all of your dependencies.</p>\n<ul>\n<li><strong><a href=\"https://github.com/mattdesl/budo\">Budo</a></strong>: A browserify development server, focused on incremental reloading, LiveReload integration (including CSS injection), and other high-level features.</li>\n<li><strong><a href=\"https://www.npmjs.org/package/watchify\">Watchify</a></strong>: Watch mode for browserify builds.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/gregersrygg/crapLoader\">CrapLoader</a></strong>: The goal of crapLoader is to load ads, widgets or any JavaScript code with document.write in it. This library hijacks document.write and delegates the content loaded from each script into the correct position.</li>\n<li><strong><a href=\"https://github.com/medikoo/modules-webmake\">Modules Webmake</a></strong>: A CommonJS module bundler similar to Browserify but much faster due to different requirements finder.</li>\n<li><strong><a href=\"http://requirejs.org/\">Require.js</a></strong>: RequireJS is a JavaScript file and AMD module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments.</li>\n<li><strong><a href=\"http://stuk.github.io/require1k/\">Require1k</a></strong>: CommonJS require for the browser in 1KB, with no build needed.</li>\n<li><strong><a href=\"http://rollupjs.org/\">Rollup.js</a></strong>: Rollup is a next-generation JavaScript module bundler. Author your app or library using ES2015 modules, then efficiently bundle them up into a single file for use in browsers and Node.js.</li>\n<li>\n<p><strong><a href=\"https://github.com/systemjs/systemjs\">SystemJS</a></strong>: Universal dynamic module loader - loads ES6 modules, AMD, CommonJS and global scripts in the browser and NodeJS. Works with both Traceur and Babel.</p>\n<ul>\n<li><strong><a href=\"http://www.sitepoint.com/modular-javascript-systemjs-jspm/\">Modular JavaScript: A Beginners Guide to SystemJS &#x26; JSPM</a></strong>: The combination of jspm and SystemJS provides a unified way of installing and loading dependencies.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/anodynos/urequire\">URequire</a></strong>: The Ultimate JavaScript Module Builder &#x26; Automagical Task Runner.</li>\n<li>\n<p><strong><a href=\"http://webpack.github.io/\">Webpack</a></strong>: Webpack is a module bundler. It takes modules with dependencies and generates static assets representing those modules.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack.</li>\n<li><strong><a href=\"http://dapperdeveloper.com/2016/05/18/developing-with-docker-and-webpack/\">Developing with Docker and Webpack</a></strong>: Chris Harrington explains how to create a development environment with Webpack and Docker to match the production as much as possible.</li>\n<li><strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development.</li>\n<li><strong><a href=\"http://www.davidmeents.com/how-to-set-up-webpack-image-loader/\">How to Set Up Webpack Image Loader</a></strong>: This brief tutorial will help you set up an image loader in Webpack.</li>\n<li><strong><a href=\"http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/\">The SoundCloud Client in React + Redux</a></strong>: After finishing this step by step tutorial you will be able to author your own React + Redux project with Webpack and Babel.</li>\n<li><strong><a href=\"http://survivejs.com/webpack/\">Webpack from Apprentice to Master</a></strong>: The purpose of this guide is to help you get started with Webpack and then go beyond basics.</li>\n<li><strong><a href=\"http://www.webpackbin.com/\">WebpackBin</a></strong>: A webpack code sandbox.</li>\n<li><strong><a href=\"http://devlog.disco.zone/2016/06/01/webpack/\">Why I think Webpack is the Right Approach To Build Pipelines</a></strong>: Thomas Boyt compares how Grunt, Gulp, Broccoli and Webpack discover dependencies.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/umdjs/umd\">UMD (Universal Module Definition)</a></strong>: This repository formalizes the design and implementation of the Universal Module Definition (UMD) API for JavaScript modules. These are modules which are capable of working everywhere, be it in the client, on the server or elsewhere.</li>\n<li><strong><a href=\"https://addyosmani.com/writing-modular-js/\">Writing Modular JavaScript With AMD, CommonJS &#x26; ES Harmony</a></strong>: In this article Addy Osmani reviewes several of the options available for writing modular JavaScript using modern module formats AMD, CommonJS and ES6 Modules.</li>\n</ul>\n</li>\n<li>\n<p><strong>Observable</strong>: An Observable is an event stream which can emit zero or more events, and may or may not finish. If it finishes, then it does so by either emitting an error or a special “complete” event.</p>\n<ul>\n<li><strong><a href=\"https://github.com/zenparsing/es-observable\">ECMAScript Observable</a></strong>: This proposal introduces an Observable type to the ECMAScript standard library. The Observable type can be used to model push-based data sources such as DOM events, timer intervals, and sockets.</li>\n<li>\n<p><strong><a href=\"https://github.com/Reactive-Extensions/RxJS\">Reactive Extensions (RxJS)</a></strong>: RxJS is a set of libraries for composing asynchronous and event-based programs using observable sequences and fluent query operators.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=XRYN2xt11Ek\">Async JavaScript with Reactive Extensions</a></strong>: Jafar Husain explains in this video how Netflix uses the Reactive Extensions (Rx) library to build responsive user experiences that strive to be event-driven, scalable and resilient.</li>\n<li><strong><a href=\"http://blog.thoughtram.io/rx/2016/08/01/exploring-rx-operators-flatmap.html\">Exploring Rx Operators: FlatMap</a></strong>: Christoph Burgdorf introduces the FlatMap operator and its usage for collections and observables.</li>\n<li><strong><a href=\"http://blog.thoughtram.io/angular/2016/05/16/exploring-rx-operators-map.html\">Exploring Rx Operators: Map</a></strong>: Christoph Burgdorf explains how to use the map operator in RxJS.</li>\n<li><strong><a href=\"http://www.mokacoding.com/blog/functional-core-reactive-shell/\">Functional Core Reactive Shell</a></strong>: Giovanni Lodi makes an overview of different architecture meta-patterns and describes his current findings about functional programming and observables as a way to control side effects.</li>\n<li><strong><a href=\"http://reactivex.io/learnrx/\">Learn RX</a></strong>: A series of interactive exercises for learning Microsoft's Reactive Extensions (Rx) Library for Javascript.</li>\n<li><strong><a href=\"http://www.learnrxjs.io/\">Learn RxJS</a></strong>: This site focuses on making RxJS concepts approachable, the examples clear and easy to explore, and features references throughout to the best RxJS related material on the web.</li>\n<li><strong><a href=\"https://medium.com/@sergimansilla/real-world-observables-1f65748c8f9\">Real World Observables</a></strong>: Sergi Mansilla writes an FTP client to use it as an example for a real world application based on RxJS.</li>\n<li><strong><a href=\"https://github.com/JulienMoumne/rx-training-games\">Rx Training Games</a></strong>: Rx Training Games is a coding playground that can be used to learn and practice Reactive Extensions coding grid-based games</li>\n<li><strong><a href=\"http://xgrommx.github.io/rx-book/index.html\">Rx-Book</a></strong>: A complete book about RxJS v.4.0.</li>\n<li><strong><a href=\"http://rxmarbles.com/\">RxMarbles</a></strong>: A webapp for experimenting with diagrams of Rx Observables, for learning purposes.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/rxstate\">RxState</a></strong>: Simple opinionated state management library based on RxJS and Immutable.js</li>\n<li><strong><a href=\"http://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html\">Taking Advantage of Observables in Angular 2</a></strong>: Christoph Burgdorf describes the advantages of Observables and how you can use them in Angular 2 context.</li>\n<li><strong><a href=\"https://xgrommx.github.io/rx-book/content/getting_started_with_rxjs/creating_and_querying_observable_sequences/transducers.html\">Transducers with Observable Sequences</a></strong>: A chapter from the RxJS Book describing Transducers.</li>\n<li><strong><a href=\"http://staltz.com/why-we-built-xstream.html\">Why We Built Xstream</a></strong>: The authors needed a stream library tailored for Cycle.js. It needs to be “hot” only, small in kB size and it should have only a few and intuitive operators.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Routing</strong>: A routing system parses a string input (usually a URL) and decides which action should be executed by matching the string against multiple patterns.</p>\n<ul>\n<li><strong><a href=\"http://joakim.beng.se/blog/posts/a-javascript-router-in-20-lines.html\">A JavaScript router in 20 lines</a></strong>: Joakim Carlstein shows how to write a simple router with data binding.</li>\n<li><strong><a href=\"http://millermedeiros.github.io/crossroads.js/\">Crossroads.js</a></strong>: Crossroads.js is a powerful and flexible routing system. If used properly it can reduce code complexity by decoupling objects and also by abstracting navigation paths and server requests.</li>\n<li><strong><a href=\"https://github.com/flatiron/director\">Director</a></strong>: A tiny and isomorphic URL router for JavaScript.</li>\n<li><strong><a href=\"https://www.polymer-project.org/1.0/blog/routing\">Encapsulated Routing with Elements</a></strong>: Peter Burns describes a routing approach based on Polymer elements, that allow to create chained and modular routes.</li>\n<li><strong><a href=\"https://github.com/javve/hash.js\">Hash.js</a></strong>: Hash.js is a 0.5 KB script that lets you manipulate everything behind # in urls.</li>\n<li><strong><a href=\"http://www.asual.com/jquery/address/\">JQuery Address</a></strong>: The jQuery Address plugin provides powerful deep linking capabilities and allows the creation of unique virtual addresses that can point to a website section or an application state.</li>\n<li><strong><a href=\"https://github.com/visionmedia/page.js\">Page.js</a></strong>: Micro client-side router inspired by the Express router.</li>\n<li><strong><a href=\"http://grobmeier.github.io/Roadcrew.js/\">Roadcrew.js</a></strong>: Roadcrew.js is a small JavaScript component which lets you switch pages of a single file website.</li>\n<li><strong><a href=\"https://github.com/tildeio/route-recognizer\">Route Recognizer</a></strong>: A lightweight JavaScript library that matches paths against registered routes. It includes support for dynamic and star segments and nested handlers.</li>\n<li><strong><a href=\"https://github.com/tildeio/router.js\">Router.js (Ember)</a></strong>: Router.js is the routing microlib used by Ember.js.</li>\n<li><strong><a href=\"https://github.com/router5/router5\">Router5</a></strong>: A simple, powerful, modular and extensible router, organising your named routes in a tree and handling route transitions. In its simplest form, Router5 processes routing instructions and outputs state updates.</li>\n</ul>\n</li>\n<li>\n<p><strong>UI Data Binding</strong>: Binding of UI elements to an application domain model. Most frameworks employ the Observer pattern as the underlying binding mechanism.</p>\n<ul>\n<li><strong><a href=\"https://guides.emberjs.com/v2.6.0/object-model/bindings/\">Bindings in Ember</a></strong>: Unlike most other frameworks that include some sort of binding implementation, bindings in Ember.js can be used with any object.</li>\n<li><strong><a href=\"http://teropa.info/blog/2015/03/02/change-and-its-detection-in-javascript-frameworks.html\">Change And Its Detection In JavaScript Frameworks</a></strong>: This article explores several approaches to manage state: Ember's data binding, Angular's dirty checking, React's virtual DOM, and its relationship to immutable data structures.</li>\n<li><strong><a href=\"http://www.lucaongaro.eu/blog/2012/12/02/easy-two-way-data-binding-in-javascript/\">Easy Two-Way Data Binding in JavaScript</a></strong>: Two-way data binding refers to the ability to bind changes to an object's properties to changes in the UI, and viceversa. This article describes how to implement data binding with vanilla JavaScript.</li>\n<li><strong><a href=\"https://github.com/kriskowal/frb\">Functional Reactive Bindings</a></strong>: A CommonJS package that includes functional and generic building blocks to help incrementally ensure consistent state.</li>\n<li><strong><a href=\"http://knockoutjs.com/\">Knockout.js</a></strong>: Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern with templates.</li>\n<li><strong><a href=\"http://rivetsjs.com/\">Rivets.js</a></strong>: Lightweight and powerful data binding + templating solution for building modern web applications.</li>\n<li><strong><a href=\"https://github.com/bruth/synapse/\">Synapse</a></strong>: Hooks to support data binding between virtually any object.</li>\n</ul>\n</li>\n<li>\n<p><strong>Unidirectional Data Flow</strong>: An architecture design pattern which promotes a flow of data and events in a single direction, usually creating an interactive loop.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://facebook.github.io/flux/\">Flux</a></strong>: Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code.</p>\n<ul>\n<li><strong><a href=\"https://github.com/krasimir/fluxiny\">Fluxiny</a></strong>: ~1K implementation of flux architecture</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://vimeo.com/album/3953264/video/166790294\">Immutable User Interfaces</a></strong>: Lee Byron talks about unidirectional data flow architectures based on immutable data structures in contrast to traditional MVC based designs.</p>\n<ul>\n<li><strong><a href=\"https://github.com/facebook/immutable-js/\">Immutable.js</a></strong>: Immutable persistent data collections for Javascript which increase efficiency and simplicity.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/mobxjs/mobx\">MobX</a></strong>: MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming.</li>\n<li>\n<p><strong>Model-View-Intent (MVI)</strong>: MVI is a unidirectional data flow architecture pattern consisting of three parts: Intent (to listen to the user), Model (to process information), and View (to output back to the user).</p>\n<ul>\n<li><strong><a href=\"http://cycle.js.org/model-view-intent.html\">MVI in Cycle.js Docs</a></strong>: André Staltz describes how to refactor an application into MVI pattern.</li>\n<li><strong><a href=\"https://satishchilukuri.com/blog/entry/model-view-intent-with-react-and-rxjs\">Model-View-Intent with React and RxJS</a></strong>: Satish Chilukuri shows an example implementation of MVI pattern with React.</li>\n<li><strong><a href=\"http://futurice.com/blog/reactive-mvc-and-the-virtual-dom\">Reactive MVC and the Virtual DOM</a></strong>: André Staltz describes the idea of Reactive Programming vs. Interactive Programming, proceeds with the MVI design pattern and compares it to React/Flux.</li>\n<li><strong><a href=\"http://thenewstack.io/developers-need-know-mvi-model-view-intent/\">What Developers Need to Know about MVI (Model-View-Intent)</a></strong>: The article explains the general MVI pattern and how it relates to React, Reactive Programming and Cycle.js</li>\n</ul>\n</li>\n<li><strong><a href=\"http://staltz.com/nothing-new-in-react-and-flux-except-one-thing.html\">Nothing New in React and Flux Except One Thing</a></strong>: Andre Staltz talks about aspects of React and Flux which make them innovative and compelling.</li>\n<li>\n<p><strong><a href=\"http://redux.js.org/\">Redux</a></strong>: Redux is a predictable state container for JavaScript apps. It attempts to make state mutations predictable by imposing certain restrictions on how and when updates can happen.</p>\n<ul>\n<li><strong><a href=\"http://blog.ng-book.com/introduction-to-redux-with-typescript-and-angular-2/\">Building Redux in TypeScript with Angular 2</a></strong>: In this post we're going to discuss the ideas behind Redux. How to build our own mini version of the Redux Store and hook it up to Angular 2.</li>\n<li><strong><a href=\"http://blog.krawaller.se/posts/exploring-redux-middleware/\">Exploring Redux Middleware</a></strong>: The author explains how to author your own middleware for Redux. He dives into the execution path of each middleware function in the chain and shows some examples.</li>\n<li><strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development.</li>\n<li><strong><a href=\"https://github.com/facebook/immutable-js/\">Immutable.js</a></strong>: Immutable persistent data collections for Javascript which increase efficiency and simplicity.</li>\n<li><strong><a href=\"https://youtu.be/hmwBow1PUuo\">Learn Redux</a></strong>: A video series by Wes Bos, teaching Redux. From setting up Webpack to using Dev Tools.</li>\n<li><strong><a href=\"https://github.com/paularmstrong/normalizr\">Normalizr</a></strong>: Normalizes deeply nested JSON API responses according to a schema for Flux and Redux apps.</li>\n<li><strong><a href=\"https://github.com/acdlite/redux-actions\">Redux Actions</a></strong>: Flux Standard Action utilities for Redux.</li>\n<li><strong><a href=\"https://github.com/erikras/redux-form\">Redux Form</a></strong>: A Higher Order Component using react-redux to keep form state in a Redux store.</li>\n<li><strong><a href=\"https://github.com/raisemarketplace/redux-loop\">Redux Loop</a></strong>: A port of elm-effects and the Elm Architecture to Redux that allows you to sequence your effects naturally and purely by returning them from your reducers.</li>\n<li><strong><a href=\"https://github.com/yelouafi/redux-saga\">Redux Saga</a></strong>: An alternative Side Effects middleware for Redux applications. Instead of dispatching Thunks which get handled by the redux-thunk middleware, you create Sagas to gather all your Side Effects logic in a central place.</li>\n<li><strong><a href=\"https://github.com/happypoulp/redux-tutorial\">Redux Tutorial</a></strong>: This repository contains a step by step tutorial to help grasp flux and more specifically Redux.</li>\n<li><strong><a href=\"http://survivejs.com/blog/redux-interview/\">Reinventing Flux - Interview with Dan Abramov</a></strong>: Dan talks about why he developed Redux.</li>\n<li><strong><a href=\"https://github.com/reactjs/reselect\">Reselect</a></strong>: Simple “selector” library for Redux inspired by getters in NuclearJS and subscriptions in re-frame.</li>\n<li><strong><a href=\"http://staltz.com/some-problems-with-react-redux.html\">Some Problems with React/Redux</a></strong>: André Staltz goes through the pros and cons of React + Redux.</li>\n<li><strong><a href=\"http://silvenon.com/testing-react-and-redux/\">Testing a React &#x26; Redux Codebase</a></strong>: This series aims to be a very comprehensive guide through testing a React and Redux codebase, where you can really cover a lot with just unit tests because the code is mostly universal.</li>\n<li><strong><a href=\"https://medium.com/@denisraslov/the-redux-ecosystem-539c630ec521\">The Redux Ecosystem</a></strong>: Let's take a look at most of the features that you'll have to deal with when the time comes, — and where React &#x26; Redux themselves can't help you.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=uvAXVMwHJXU\">The Redux Journey at react-europe 2016</a></strong>: In this talk, Dan Abramov reflects on the past, present, and future of Redux.</li>\n<li><strong><a href=\"http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/\">The SoundCloud Client in React + Redux</a></strong>: After finishing this step by step tutorial you will be able to author your own React + Redux project with Webpack and Babel.</li>\n<li><strong><a href=\"http://ramonvictor.github.io/tic-tac-toe-js/\">Tic-Tac-Toe.js: Redux Pattern in Plain JavaScript</a></strong>: Ramon Victor describes how to use Redux with vanilla JavaScript. No React, no jQuery, no micro-library, it doesn't rely on anything else. It's just plain JS.</li>\n<li><strong><a href=\"https://medium.com/@meagle/understanding-87566abcfb7a\">Understanding Redux Middleware</a></strong>: The author describes the functional programming concepts involved in the creation and application of middleware functions.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://vimeo.com/168652278\">Unidirectional Data Flow Architectures (Talk)</a></strong>: Andre Staltz compares modern architecture patterns including Flux, Redux, Model-View-Intent, Elm Arch and BEST.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Designs</strong>: Ready to use and well documented structures and frameworks for frontend development.</p>\n<ul>\n<li>\n<p><strong><a href=\"http://atomicdesign.bradfrost.com/table-of-contents/\">Atomic Design</a></strong>: Atomic Design discusses the importance of crafting robust design systems, and introduces a methodology for which to create smart, deliberate interface systems.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/@AshConnolly/a-more-seamless-workflow-style-guides-for-better-design-and-development-639fc55be28c\">A More Seamless Workflow — Style Guides for Better Design and Development</a></strong>: Ash Connolly explains what styles guides are and which benefits they bring to designers and developers.</li>\n<li><strong><a href=\"http://atomicdocs.io/\">Atomic Docs</a></strong>: Atomic Docs is a styleguide generator and component manager. Atomic Docs is built in PHP. Inspired by Brad Frost's Atomic Design principles.</li>\n<li><strong><a href=\"http://steelydylan.github.io/atomic-lab/\">Atomic Lab</a></strong>: Template sharing and coding environment based on atomic design.</li>\n</ul>\n</li>\n<li>\n<p><strong>Authoring jQuery Plugins</strong>: jQuery is an utility library and a plugin framework. This section collects resources about creating such plugins.</p>\n<ul>\n<li><strong><a href=\"http://learn.jquery.com/plugins/advanced-plugin-concepts/\">Advanced Plugin Concepts</a></strong>: A collection of best practices for jQuery plugin authoring.</li>\n<li><strong><a href=\"http://learn.jquery.com/plugins/basic-plugin-creation/\">How to Create a Basic Plugin</a></strong>: The article describes basic plugin creation and provides a simple boilerplate.</li>\n<li><strong><a href=\"https://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin\">Signs of a poorly written jQuery plugin</a></strong>: Collection of jQuery plugin antipatterns.</li>\n<li><strong><a href=\"https://websanova.com/blog/jquery/the-ultimate-guide-to-writing-jquery-plugins\">The Ultimate Guide to Writing jQuery Plugins</a></strong>: A comprehensive guide on how to develop jQuery plugins including a simple boilerplate.</li>\n<li><strong><a href=\"http://learn.jquery.com/plugins/stateful-plugins-with-widget-factory/\">Writing Stateful Plugins with the jQuery UI Widget Factory</a></strong>: The article demonstrates the capabilities of the Widget Factory by building a simple progress bar plugin.</li>\n<li><strong><a href=\"https://github.com/jquery-boilerplate/jquery-boilerplate\">jQuery Boilerplate</a></strong>: This project won't seek to provide a perfect solution to every possible pattern, but will attempt to cover a simple template for beginners and above.</li>\n<li><strong><a href=\"https://github.com/jquery-boilerplate/jquery-patterns\">jQuery Plugin Patterns</a></strong>: This project won't seek to provide implementations for every possible pattern, but will attempt to cover popular patterns developers often use in the wild.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://en.bem.info/method/\">Block Element Modifier (BEM)</a></strong>: Methodology aimed at achieving fast to develop long-lived projects, team scalability, and code reuse.</p>\n<ul>\n<li><strong><a href=\"http://www.smashingmagazine.com/2012/04/a-new-front-end-methodology-bem/\">A New Front-End Methodology: BEM</a></strong>: An introduction by Varvara Stepanova at SmashingMagazine.</li>\n<li><strong><a href=\"http://webdesign.tutsplus.com/articles/an-introduction-to-the-bem-methodology--cms-19403\">An Introduction to the BEM Methodology</a></strong>: General introduction article on tutsplus.</li>\n<li><strong><a href=\"https://css-tricks.com/bem-101/\">BEM 101</a></strong>: A collaborative post by Joe Richardson, Robin Rendle, and CSS-Tricks staff giving an introduction to BEM with some good examples.</li>\n<li><strong><a href=\"https://m.alphasights.com/bem-i-finally-understand-b0c74815d5b0\">BEM I (finally) understand</a></strong>: In this article Andrei Popa will focus on the basics of BEM and how to approach simple to complex anatomies.</li>\n<li><strong><a href=\"https://www.smashingmagazine.com/2016/06/battling-bem-extended-edition-common-problems-and-how-to-avoid-them/\">Battling BEM (Extended Edition): 10 Common Problems And How To Avoid Them</a></strong>: This article aims to be useful for people who are already BEM enthusiasts and wish to use it more effectively or people who are curious to learn more about it.</li>\n<li><strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack.</li>\n<li><strong><a href=\"http://docs.emmet.io/filters/bem/\">Emmet filter for BEM</a></strong>: If you're writing your HTML and CSS code in OOCSS-style, Yandex's BEM style specifically, you will like this filter. It provides some aliases and automatic insertions of common block and element names in classes.</li>\n<li><strong><a href=\"http://blog.kaelig.fr/post/48196348743/fifty-shades-of-bem\">Fifty Shades of BEM</a></strong>: Article describes different flavors of BEM.</li>\n<li><strong><a href=\"https://m.alphasights.com/how-we-use-bem-to-modularise-our-css-82a0c39463b0\">How We Use BEM to Modularise Our CSS</a></strong>: Andrei Popa describes the challenges, AlphaSights team had, implementing BEM in their projects.</li>\n<li><strong><a href=\"https://www.toptal.com/css/introduction-to-bem-methodology\">Introduction To BEM Methodology (Toptal)</a></strong>: General introduction to BEM methodology and platform.</li>\n<li><strong><a href=\"http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/\">MindBEMding - getting your head 'round BEM syntax</a></strong>: Article on csswizardry explaining the BEM syntax for CSS classes.</li>\n<li><strong><a href=\"https://github.com/bem-contrib/pobem\">Pobem</a></strong>: PostCSS plugin for BEM syntax.</li>\n<li><strong><a href=\"http://mikefowler.me/2013/10/17/support-for-bem-modules-sass-3.3/\">Support for BEM modules in Sass 3.3</a></strong>: The next major release of Sass is poised for release and with it comes real support for BEM-style modules...</li>\n<li><strong><a href=\"http://www.didoo.net/to-bem-or-not-to-bem/\">To BEM or not to BEM</a></strong>: A series of interviews on BEM methodology.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://cycle.js.org/\">Cycle.js</a></strong>: A functional and reactive JavaScript framework that solves the cyclic dependency of Observables which emerge during dialogues (mutual observations) between the Human and the Computer.</p>\n<ul>\n<li><strong><a href=\"https://github.com/whitecolor/cycle-async-driver\">Async Driver</a></strong>: Higher order factory for creating cycle.js async request based drivers. Allows you almost completely eliminate boilerplate code for this kind of drivers.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=Rj8ZTRVka4E\">Cycle.js Was Built to Solve Problems</a></strong>: In this video André Staltz shows how Cycle.js has a practical purpose, meant to solve problems your customers/business may relate to.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=uNZnftSksYg\">Cycle.js and Functional Reactive User Interfaces</a></strong>: In this talk we will discover how Cycle.js is purely reactive and functional, and why it's an interesting alternative to React.</li>\n<li><strong><a href=\"https://glebbahmutov.com/draw-cycle/\">Draw Cycle</a></strong>: Simple Cycle.js program visualized</li>\n<li>\n<p><strong><a href=\"http://cycle.js.org/drivers.html\">Drivers</a></strong>: Drivers are functions that listen to Observable sinks (their input), perform imperative side effects, and may return Observable sources (their output).</p>\n<ul>\n<li><strong><a href=\"https://github.com/Widdershin/cycle-animation-driver\">Animation</a></strong>: A Cycle driver for requestAnimationFrame.</li>\n<li><strong><a href=\"https://github.com/benji6/cycle-audio-graph\">Audio Graph Driver</a></strong>: Audio graph driver for Cycle.js based on virtual-audio-graph.</li>\n<li><strong><a href=\"https://github.com/10clouds/cyclejs-cookie\">Cookie</a></strong>: Cycle.js Cookie Driver, based on cookie_js library.</li>\n<li><strong><a href=\"https://github.com/cyclejs/dom\">DOM</a></strong>: The standard DOM Driver for Cycle.js based on virtual-dom, and other helpers.</li>\n<li><strong><a href=\"https://github.com/secobarbital/cycle-fetch-driver\">Fetch</a></strong>: A Cycle.js Driver for making HTTP requests, using the Fetch API.</li>\n<li><strong><a href=\"https://github.com/r7kamura/cycle-fetcher-driver\">Fetcher</a></strong>: A Cycle.js Driver for making HTTP requests using stackable-fetcher.</li>\n<li><strong><a href=\"https://github.com/dralletje/cycle-firebase\">Firebase</a></strong>: Thin layer around the firebase javascript API that allows you to query and declaratively update your favorite real-time database.</li>\n<li><strong><a href=\"https://github.com/cyclejs/http\">HTTP</a></strong>: A Cycle.js Driver for making HTTP requests, based on superagent.</li>\n<li><strong><a href=\"https://github.com/CyclicMaterials/cycle-hammer-driver\">Hammer.js</a></strong>: The driver incorporates the Hammer.js gesture library.</li>\n<li><strong><a href=\"https://github.com/cyclejs/history\">History</a></strong>: Cycle.js URL Driver based on the rackt/history library.</li>\n<li><strong><a href=\"https://github.com/raquelxmoss/cycle-keys\">Keys</a></strong>: A Cycle.js driver for keyboard events.</li>\n<li><strong><a href=\"https://github.com/whitecolor/cycle-mongoose/\">Mongoose.js</a></strong>: A driver for using Mongoose with Cycle JS. Accepts both, write and read operations.</li>\n<li><strong><a href=\"https://github.com/cyclejs/cycle-notification-driver\">Notification</a></strong>: A Cycle.js Driver for showing and responding to HTML5 Notifications.</li>\n<li><strong><a href=\"https://github.com/TylorS/cycle-router\">Router</a></strong>: A router built from the ground up with Cycle.js in mind. Stands on the shoulders of battle-tested libraries switch-path for route matching and rackt/history for dealing with the History API.</li>\n<li><strong><a href=\"https://github.com/axefrog/cycle-router5\">Router5</a></strong>: A source/sink router driver for Cycle.js, based on router5.</li>\n<li><strong><a href=\"https://github.com/jessaustin/cycle-sse-driver\">Server-Sent Events</a></strong>: Cycle.js driver for Server-Sent Events (SSE), a browser feature also known as EventSource. Server-Sent Events allow the server to continuously update the page with new events, without resorting to hacks like long-polling.</li>\n<li><strong><a href=\"https://github.com/TylorS/cycle-snabbdom\">Snabbdom</a></strong>: Alternative DOM driver utilizing the snabbdom library.</li>\n<li><strong><a href=\"https://github.com/cgeorg/cycle-socket.io\">Socket.IO</a></strong>: A Cycle driver for applications using Socket.IO</li>\n<li><strong><a href=\"https://github.com/cyclejs/storage\">Storage</a></strong>: A Cycle.js Driver for using localStorage and sessionStorage in the browser.</li>\n</ul>\n</li>\n<li>\n<p><strong>Example Projects</strong>: Example applications built with Cycle.js</p>\n<ul>\n<li><strong><a href=\"https://github.com/cyclejs/examples\">Cycle.js Examples</a></strong>: Browse and learn from examples of small Cycle.js apps using Core, DOM Driver, HTML Driver, HTTP Driver, JSONP Driver, and others.</li>\n<li><strong><a href=\"https://github.com/staltz/rxmarbles\">RX Marbles</a></strong>: Interactive diagrams of Rx Observables.</li>\n<li><strong><a href=\"https://github.com/cgeorg/todomvp\">TODO: Minimum Viable Pizza</a></strong>: Minimum Viable Pizza implemented with Cycle.js</li>\n<li><strong><a href=\"https://github.com/Widdershin/tricycle\">Tricycle</a></strong>: A scratchpad for trying out Cycle.js.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=6_ETUyh0tns\">Intro to Functional Reactive Programming with Cycle.js</a></strong>: Nick Johnstone gives an introduction to developing with Cycle.js in this video presentation.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=31URmaeNHSs\">Learning How to Ride: an Introduction to Cycle.js</a></strong>: In this talk, Fernando Macias Pereznieto introduces us to the good, the bad, and the beautiful of using Cycle.js, whether you are a complete beginner or an experienced JS ninja.</li>\n<li>\n<p><strong><a href=\"https://github.com/motorcyclejs/core\">Motorcycle.js</a></strong>: This is a sister project that will continue to evolve and grow alongside Cycle.js for the foreseeable future. The primary focus of this project is to tune it for performance as much as possible.</p>\n<ul>\n<li><strong><a href=\"https://github.com/cujojs/most\">Most</a></strong>: Monadic reactive streams with high performance.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://medium.com/@fkrautwald/plug-and-play-all-your-observable-streams-with-cycle-js-e543fc287872\">Plug and Play All Your Observable Streams With Cycle.js</a></strong>: Frederik Krautwald explains the principles behind Cycle.js, it's inner workings and how to use it to create a simple program with drivers.</li>\n<li><strong><a href=\"https://github.com/Widdershin/tricycle\">Tricycle</a></strong>: A scratchpad for trying out Cycle.js.</li>\n<li><strong><a href=\"http://thenewstack.io/developers-need-know-mvi-model-view-intent/\">What Developers Need to Know about MVI (Model-View-Intent)</a></strong>: The article explains the general MVI pattern and how it relates to React, Reactive Programming and Cycle.js</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://www.polymer-project.org/1.0/docs/devguide/feature-overview.html\">Polymer Project</a></strong>: The Polymer library is designed to make it easier and faster for developers to create great, reusable components for the modern web.</p>\n<ul>\n<li><strong><a href=\"https://www.polymer-project.org/1.0/articles/es6.html\">Building web components using ES6 classes</a></strong>: Web components evolve markup into something that's meaningful, maintainable, and highly modular. Thanks to these new API primitives, not only do we have improved ergonomics when building apps, but we gain better overall structure, design, and reusability.</li>\n<li><strong><a href=\"https://technologyconversations.com/2015/08/09/developing-front-end-microservices-with-polymer-web-components-and-test-driven-development-part-15-the-first-component/\">Developing Front-End Microservices</a></strong>: In this article series we'll go through Web Components development in context of microservices.</li>\n<li><strong><a href=\"https://github.com/TimvdLippe/iron-lazy-pages\">Lazy Loading of Pages</a></strong>: iron-lazy-pages is a Polymer component which allows to load pages on demand.</li>\n<li><strong><a href=\"http://html5-demos.appspot.com/shadowdom-visualizer\">ShadowDOM Visualizer</a></strong>: This tools allows you to visualize how Shadow DOM renders in the browser.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=ZDjiUmx51y8\">Thinking in Polymer (The Polymer Summit 2015)</a></strong>: Kevin Schaaf explains how to employ data binding and composition to build complex application using only Polymer.</li>\n<li><strong><a href=\"https://medium.com/@richardanaya/unidirectional-data-architecture-with-polymer-rxjs-immutable-data-c689386ee998\">Unidirectional Dataflow Architecture with Polymer + RxJS + Immutable Data</a></strong>: Richard Anaya describes how to combine Polymer, RxJS and Freezer to implement a unidirectional data flow architecture.</li>\n<li><strong><a href=\"https://elements.polymer-project.org/guides/using-elements\">Using Elements</a></strong>: This guide describes how to install and use standalone Polymer components in an existing project.</li>\n<li><strong><a href=\"http://paulusschoutsen.nl/blog/2015/07/using-polymer-with-flux-and-a-global-app-state/\">Using Polymer with Flux and a Global App State</a></strong>: Paulus Schoutsen describes his experience integrating Polymer and NuclearJS.</li>\n<li><strong><a href=\"https://www.polymer-project.org/1.0/articles/shadydom.html\">What is shady DOM?</a></strong>: On browsers that support shadow DOM, it's possible to have an element that is rendered with complex DOM, but have that complexity hidden away as implementation detail.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://smacss.com/book/\">SMACSS</a></strong>: SMACSS (pronounced “smacks”) is a way to examine your design process and as a way to fit those rigid frameworks into a flexible thought process. It is an attempt to document a consistent approach to site development when using CSS.</li>\n<li><strong><a href=\"http://t3js.org/\">T3</a></strong>: T3 is a minimalist JavaScript framework sponsored by Box Inc. that provides core structure to code.</li>\n<li><strong><a href=\"http://guide.elm-lang.org/architecture/index.html\">The Elm Architecture</a></strong>: The Elm Architecture is a simple pattern for infinitely nestable components. It is great for modularity, code reuse, and testing.</li>\n<li><strong><a href=\"http://todomvc.com/\">TodoMVC</a></strong>: A project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today.</li>\n</ul>\n</li>\n<li>\n<p><strong>Event-Driven Programming</strong>: Event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions, sensor outputs, or messages from other programs/threads.</p>\n<ul>\n<li><strong><a href=\"https://github.com/millermedeiros/js-signals/wiki/Comparison-between-different-Observer-Pattern-implementations\">Comparison Between Different Observer Pattern Implementations</a></strong>: The comparison below is just about the basic features of subscribing to an event type, dispatching and removing an event listener.</li>\n<li><strong><a href=\"https://otaqui.com/blog/1374/event-emitter-pub-sub-or-deferred-promises-which-should-you-choose/\">Event Emitter, Pub Sub or Deferred Promises</a></strong>: In this post Pete Otaqui explores a little about how each pattern works with (very) basic implementations and looks at the reasons why you might choose one over another.</li>\n<li>\n<p><strong>Implementations</strong>: Libraries, frameworks and tools that use Event-Driven Programming paradigm.</p>\n<ul>\n<li><strong><a href=\"https://baconjs.github.io/\">Bacon.js</a></strong>: A small functional reactive programming lib for JavaScript. Turns your event spaghetti into clean and declarative feng shui bacon, by switching from imperative to functional.</li>\n<li><strong><a href=\"http://flightjs.github.io/\">Flight</a></strong>: An event-driven web framework, from Twitter.</li>\n<li><strong><a href=\"http://thejacklawson.com/Mediator.js/\">Mediator.js</a></strong>: Mediator is a simple class that allows you to register, unregister, and call subscriber methods to help event-based, asyncronous programming.</li>\n<li><strong><a href=\"https://github.com/postaljs/postal.js\">Postal.js</a></strong>: Postal.js takes the familiar \"eventing-style\" paradigm and extends it by providing \"broker\" and subscriber implementations</li>\n<li><strong><a href=\"http://radio.uxder.com/\">Radio.js</a></strong>: Radio.js is a small dependency-free publish/subscribe JavaScript library. Use it to implement the observer pattern in your code to help decouple your application architecture for greater maintainability.</li>\n<li><strong><a href=\"http://millermedeiros.github.io/js-signals/\">js-signals</a></strong>: Custom Event/Messaging system for JavaScript.</li>\n<li><strong><a href=\"https://github.com/federico-lox/pubsub.js\">pubsub.js</a></strong>: A tiny (~600 bytes when minified, ~300 bytes when gzip'd) and robust pubsub implementation.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Functional Programming</strong>: Functional programming is a programming paradigm, that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.</p>\n<ul>\n<li>\n<p><strong>A Gentle Introduction to Functional JavaScript</strong>: A 3 part series, by Derick Bailey featuring Chet Harrison, about functional programming with many examples in JavaScript.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=ZQSU4geXAxM\">Monads, Monoids and Composition with Functional JavaScript</a></strong>: Chet Harrison explains monads using form validation as an example.</li>\n<li><strong><a href=\"https://github.com/ChetHarrison/A-Gentle-Introduction-to-Functional-JavaScript\">Notes and Code from the Crowdcast</a></strong>: Chet Harrison provides a broad overview of functional programming concepts and a step by step tutorial for building Monads.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=myISHtMMeyU\">The Basics of Functional Programming</a></strong>: In this first episode, you'll learn the basics of why functional programming, what it is, where it came from and what the core of it is. You'll see function composition, function purity, currying, higher order functions and first-class functions.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=JZSoPZUoR58\">A Million Ways to Fold in JS</a></strong>: Brian Lonsdorf provides many functional alternatives to loops in this video.</li>\n<li><strong><a href=\"https://vimeo.com/45140590\">Adventures in Functional Programming</a></strong>: A talk by Jim Weirich, demonstrating how to use functional programming and lambda calculus to derive Y combinator.</li>\n<li><strong><a href=\"http://allong.es/\">Allong.es</a></strong>: allong.es is a JavaScript library based on the function combinator and decorator recipes introduced in the book JavaScript Allongé.</li>\n<li><strong><a href=\"https://github.com/cullophid/barely-functional\">Barely Functional</a></strong>: Tiny (2.7kb) functional programming library using native es5/6 operations.</li>\n<li><strong><a href=\"http://blog.gypsydave5.com/2015/03/21/lazy-eval-and-memo/\">Basic Lazy Evaluation and Memoization in JavaScript</a></strong>: Memoization is a way of optimizing code so that it will return cached results for the same inputs.</li>\n<li><strong><a href=\"http://bilby.brianmckenna.org/\">Bilby.js</a></strong>: A functional library based on category theory with immutable multimethods, functional data structures, functional operator overloading, automated specification testing.</li>\n<li><strong><a href=\"https://medium.com/@homam/composability-from-callbacks-to-categories-in-es6-f3d91e62451e\">Composability: from Callbacks to Categories in ES6</a></strong>: The author borrows some ideas from functional languages to explore a different approach for addressing the callback hell.</li>\n<li><strong><a href=\"https://medium.com/javascript-scene/curry-or-partial-application-8150044c78b8\">Curry or Partial Application?</a></strong>: Eric Elliott describes the difference between partial application and curry.</li>\n<li><strong><a href=\"https://github.com/puffnfresh/daggy\">Daggy</a></strong>: Library for creating tagged constructors with catamorphism.</li>\n<li><strong><a href=\"https://github.com/cullophid/date-fp\">Date FP</a></strong>: Functional programming date manipulation library.</li>\n<li><strong><a href=\"https://medium.com/@drboolean/debugging-functional-7deb4688a08c\">Debugging Functional</a></strong>: This post will demonstrate a simple solution that can go a long way to enhance the debugging experience in functional JavaScript applications.</li>\n<li><strong><a href=\"https://deterministic.curated.co/\">Deterministic</a></strong>: A weekly digest of interesting news and articles covering functional programming for the web, especially on the front end.</li>\n<li>\n<p><strong>Example Projects</strong>: Open source projects which use functional programming, preferably point-free and side-effect-free.</p>\n<ul>\n<li><strong><a href=\"https://github.com/plaid/async-problem\">Async Problem</a></strong>: This project considers various approaches to the problem of concurrently reading files inside a directory and concatenating their contents.</li>\n<li><strong><a href=\"https://github.com/iamstarkov/es-deps-deep\">CommonJS module dependencies resolver</a></strong>: The module and all related modules are written using point-free style.</li>\n<li><strong><a href=\"https://github.com/Bradcomp/egghunt-server/tree/functional\">Egg Hunt Server</a></strong>: A restful API written in FP style.</li>\n<li><strong><a href=\"https://github.com/Avaq/Idealist\">Idealist</a></strong>: Functional HTTP micro-framework.</li>\n<li><strong><a href=\"https://github.com/sanctuary-js/sanctuary-site/blob/gh-pages/scripts/generate\">Sanctuary Build Script</a></strong>: A build script for generating the Sanctuary website.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/fp-dom/fp-dom\">FP DOM</a></strong>: A collection of functions to favor functional programming in a DOM context.</li>\n<li><strong><a href=\"https://github.com/fantasyland/fantasy-combinators\">Fantasy Combinators</a></strong>: Combinators which are used for fantasy-land projects.</li>\n<li>\n<p><strong><a href=\"https://github.com/fantasyland/fantasy-land\">Fantasy Land</a></strong>: Specification for interoperability of common algebraic structures in JavaScript.</p>\n<ul>\n<li><strong><a href=\"https://github.com/fantasyland/fantasy-land/blob/master/implementations.md\">Conformant Implementations</a></strong>: A list of libraries implementing the Fantasy Land specification.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/fantasyland/fantasy-lenses\">Fantasy Lenses</a></strong>: Composable, immutable getters and setters.</li>\n<li><strong><a href=\"https://blog.simpleblend.net/functional-javascript-concepts-currying/\">Functional Concepts For JavaScript Developers: Currying</a></strong>: Andrew Robbins talks about what currying is and why it's useful.</li>\n<li><strong><a href=\"http://www.mokacoding.com/blog/functional-core-reactive-shell/\">Functional Core Reactive Shell</a></strong>: Giovanni Lodi makes an overview of different architecture meta-patterns and describes his current findings about functional programming and observables as a way to control side effects.</li>\n<li><strong><a href=\"https://github.com/paldepind/functional-frontend-architecture\">Functional Frontend Architecture</a></strong>: This repository is meant to document and explore the implementation of what is known as \"the Elm architecture\". A simple functional architecture for building frontend applications.</li>\n<li><strong><a href=\"https://jcouyang.gitbooks.io/functional-javascript/content/en/index.html\">Functional JavaScript Mini Book</a></strong>: Jichao Ouyang gives and introduction to functional programming with JavaScript and describes some Typeclasses like Functor and Monad.</li>\n<li><strong><a href=\"https://github.com/timoxley/functional-javascript-workshop\">Functional Javascript Workshop</a></strong>: The goal of this workshop is to create realistic problems that can be solved using terse, vanilla, idiomatic JavaScript.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=1uRC3hmKQnM\">Functional Principles In React</a></strong>: Jessica Kerr talks about four functional principles: Composition, Declarative Style, Isolation and Flow Of Data, and their usage in React.</li>\n<li><strong><a href=\"https://github.com/hemanth/functional-programming-jargon\">Functional Programming Jargon</a></strong>: Jargon from the functional programming world in simple terms.</li>\n<li><strong><a href=\"https://medium.com/@chetcorcos/functional-programming-for-javascript-people-1915d8775504\">Functional Programming for JavaScript People</a></strong>: Chet Corcos explains different features of functional programming like composition, currying, lazy evaluation, referential transparency and compares Clojure with Haskell.</li>\n<li><strong><a href=\"http://victorsavkin.com/post/63551894251/functional-refactoring-in-javascript\">Functional Refactoring in JavaScript</a></strong>: In this article Victor Savkin shows how to apply functional thinking when refactoring JavaScript code. He does that by taking a simple function and transforming it into a more extendable one, which has no mutable state, and no if statements.</li>\n<li><strong><a href=\"http://functionaljs.com/\">Functional.js</a></strong>: Functional.js is a functional JavaScript library. It facilitates currying and point-free / tacit programming and this methodology has been adhered to from the ground up.</li>\n<li><strong><a href=\"https://github.com/paldepind/functionize\">Functionize</a></strong>: A collection of functions which aids in making non-functional libraries functional.</li>\n<li><strong><a href=\"https://medium.com/@yelouafi/futures-and-monoids-7e9f4574bd88\">Futures and Monoids</a></strong>: Yassine Elouafi explains the nature of Monoids using Futures, Numbers and Strings as examples.</li>\n<li><strong><a href=\"http://functionaltalks.org/2013/05/27/brian-lonsdorf-hey-underscore-youre-doing-it-wrong/\">Hey Underscore, You're Doing It Wrong!</a></strong>: In this talk Brian Lonsdorf gently takes a shot at underscore.js for not thinking about currying and partial function application in its library design.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=mS264h8KGwk\">Immutability, Interactivity &#x26; JavaScript</a></strong>: We'll dive in and see how trees of JavaScript arrays can permit building efficient immutable collections. Then we'll see how embracing immutable values dramatically simplifies some classic hard problems in client side programming including but not limited to undo, error playback, and online/offline synchronization.</li>\n<li><strong><a href=\"https://github.com/qiao/immutable-sequence.js\">Immutable Sequence.js</a></strong>: High performance implementation of Immutable Sequence in JavaScript, based on Finger Tree.</li>\n<li><strong><a href=\"https://github.com/facebook/immutable-js/\">Immutable.js</a></strong>: Immutable persistent data collections for Javascript which increase efficiency and simplicity.</li>\n<li><strong><a href=\"https://javascriptair.com/episodes/2015-12-30/\">JSAir - Functional and Immutable Design Patterns in JavaScript</a></strong>: An episode of JavaScript Air about \"the how and why of functional programming and immutable design patterns in JavaScript\" with Dab Abramov and Brian Lonsdorf as guests.</li>\n<li><strong><a href=\"https://medium.com/@yelouafi/javascript-and-type-thinking-735edddc388d\">JavaScript and Type Thinking</a></strong>: Yassine Elouafi introduces Algebraic Data Types with an example of a simple and a recursive type.</li>\n<li><strong><a href=\"https://vimeo.com/97408202\">Javascript Combinators by Reginald Braithwaite</a></strong>: In this talk, we'll explore functions that consume and return functions, and see how they can be used to build expressive programs that hew closely to JavaScript's natural style.</li>\n<li><strong><a href=\"https://github.com/loop-recur/lambdajs\">Lamda.js</a></strong>: This library takes all the methods on instances of strings, arrays, objects, numbers, and regexp's and turns them into functions that can be used in a pointfree way.</li>\n<li><strong><a href=\"https://vimeo.com/104807358\">Lenses Quick n' Dirty</a></strong>: A video by Brian Lonsdorf that introduces lenses.</li>\n<li><strong><a href=\"http://joneshf.github.io/programming/2015/12/19/Lenses-and-Virtual-DOM-Support-Open-Closed.html\">Lenses and Virtual DOM Support Open Closed</a></strong>: Hardy Jones explains how Lenses work using a simple example of working with Virtual DOM.</li>\n<li><strong><a href=\"https://github.com/DrBoolean/lenses\">Lenses.js</a></strong>: Composable kmett style lenses.</li>\n<li><strong><a href=\"https://github.com/lodash/lodash/wiki/FP-Guide\">Lodash/fp</a></strong>: The lodash/fp module is an instance of lodash with its methods wrapped to produce immutable auto-curried iteratee-first data-last methods.</li>\n<li><strong><a href=\"http://alistapart.com/article/making-your-javascript-pure\">Making your JavaScript Pure</a></strong>: Jack Franklin compares pure and impure functions and describes how to leverage functional programming principles in JavaScript.</li>\n<li>\n<p><strong>Monads</strong>: Composable computation descriptions. The essence of monad is thus separation of composition timeline from the composed computation's execution timeline, as well as the ability of computation to implicitly carry extra data.</p>\n<ul>\n<li>\n<p><strong>Collections of Monads</strong>: Libraries of monad implementations.</p>\n<ul>\n<li><strong><a href=\"http://akh-js.com/\">Akh</a></strong>: Akh includes a basic set of common monad transformers, along with monads derived from these transformers. Akh structures implement the Fantasy Land specification.</li>\n<li><strong><a href=\"http://folktale.origamitower.com\">Folktale</a></strong>: Folktale is a suite of libraries for generic functional programming in JavaScript that allows you to write elegant modular applications with fewer bugs, and more reuse.</li>\n<li><strong><a href=\"https://github.com/cwmyers/monet.js\">Monet.js</a></strong>: Monet is a tool bag that assists Functional Programming by providing a rich set of Monads and other useful functions.</li>\n</ul>\n</li>\n<li>\n<p><strong>Continuation Monad</strong>: Represents computations in continuation-passing style (CPS). In continuation-passing style function result is not returned, but instead is passed to another function, received as a parameter (continuation).</p>\n<ul>\n<li><strong><a href=\"http://blog.mattbierner.com/the-delimited-continuation-monad-in-javascript/\">The Delimited Continuation Monad in Javascript</a></strong>: This post overviews continuations in Atum and covers the implementation of the delimited continuation monad in JavaScript.</li>\n</ul>\n</li>\n<li>\n<p><strong>Either Monad</strong>: The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b. It is often used for error handling.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/lazy-either\">Lazy Either</a></strong>: The LazyEither type is used to represent a lazy Either value. It is similar to the Future and Promise types.</li>\n<li><strong><a href=\"https://tech.evojam.com/2016/03/21/practical-intro-to-monads-in-javascript-either/\">Practical Intro to Monads in JavaScript: Either</a></strong>: Jakub Strojewski describes the Either Monad, a tool for fast-failing, synchronous computation chains.</li>\n</ul>\n</li>\n<li>\n<p><strong>Free Monad</strong>: A free monad satisfies all the Monad laws, but does not do any computation. It just builds up a nested series of contexts. The user who creates such a free monadic value is responsible for doing something with those nested contexts.</p>\n<ul>\n<li><strong><a href=\"https://github.com/fantasyland/fantasy-frees\">Fantasy Frees</a></strong>: An implementation of Coyoneda, Yoneda, Trampoline, Free Monad and Free Applicative with usage examples.</li>\n<li><strong><a href=\"https://github.com/joneshf/abstractions/tree/master/src\">Free Monad Experiments by Hardy Jones</a></strong>: Coyoneda, Coproduct, Either, Free, State, AJAX and so on.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=WH5BrkzGgQY&#x26;list=PLK_hdtAJ4KqUWp5LJdLOgkD_8qKW0iAHi&#x26;index=1\">Free Monads Video Series</a></strong>: A video series on free monads by Brian Lonsdorf explaining Coyoneda, Free Monad and Interpretors.</li>\n<li><strong><a href=\"https://github.com/DrBoolean/freeky\">Freeky</a></strong>: Collection of free monads by Brian Lonsdorf.</li>\n</ul>\n</li>\n<li>\n<p><strong>Futures</strong>: Futures represent the value arising from the success or failure of an asynchronous operation (I/O).</p>\n<ul>\n<li><strong><a href=\"https://github.com/Avaq/Fluture\">Fluture</a></strong>: The debuggable Fantasy Land Future library.</li>\n<li><strong><a href=\"http://folktale.origamitower.com/api/v2.1.0/en/folktale.concurrency.task.html\">Folktale Task</a></strong>: A structure for time-dependent values, providing explicit effects for delayed computations, latency, etc.</li>\n<li><strong><a href=\"https://medium.com/@yelouafi/from-callback-to-future-functor-monad-6c86d9c16cb5\">From Callback to Future -> Functor -> Monad</a></strong>: Yassine Elouafi goes through a simple implementation of Futures and compares them to Promises.</li>\n<li><strong><a href=\"https://github.com/futurize/future-io\">Future IO</a></strong>: A fantasy-land compliant monadic IO library for Node.js.</li>\n<li><strong><a href=\"https://github.com/arcseldon/futurizer\">Futurizer</a></strong>: Turn callback-style functions or promises into futures!</li>\n</ul>\n</li>\n<li>\n<p><strong>Introduction</strong>: Introductory materials about monads.</p>\n<ul>\n<li><strong><a href=\"https://curiosity-driven.org/monads-in-javascript\">Monads in JavaScript</a></strong>: This article explains monads and their usage in JavaScript including Identity, Maybe, List, Continuation, Do notation and Chaining.</li>\n<li><strong><a href=\"https://tech.evojam.com/2016/02/22/practical-intro-to-monads-in-javascript/\">Practical Intro to Monads in JavaScript</a></strong>: A simple, practical tutorial for JavaScript developers showing how some monads can be used.</li>\n<li><strong><a href=\"http://igstan.ro/posts/2011-05-02-understanding-monads-with-javascript.html\">Understanding Monads With JavaScript</a></strong>: The author starts with a problem of dealing with explicit immutable state and solves it with JavaScript using monads.</li>\n</ul>\n</li>\n<li>\n<p><strong>Maybe Monad</strong>: Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.</p>\n<ul>\n<li><strong><a href=\"http://sean.voisen.org/blog/2013/10/intro-monads-maybe/\">A Gentle Intro to Monads … Maybe?</a></strong>: A short introduction to Maybe and the world of monads.</li>\n<li><strong><a href=\"http://robotlolita.me/2013/12/08/a-monad-in-practicality-first-class-failures.html\">A Monad in Practicality: First-Class Failures</a></strong>: This article shows how the Maybe monad can be used for handling simple failure use cases. It then extrapolates into complex failure scenarios and shows how these cases can be modelled in terms of the Either monad.</li>\n<li><strong><a href=\"https://tech.evojam.com/2016/02/22/practical-intro-to-monads-in-javascript/\">Practical Intro to Monads in JavaScript</a></strong>: A simple, practical tutorial for JavaScript developers showing how some monads can be used.</li>\n</ul>\n</li>\n<li>\n<p><strong>Reader Monad</strong>: Represents a computation, which can read values from a shared environment, pass values from function to function, and execute sub-computations in a modified environment.</p>\n<ul>\n<li><strong><a href=\"https://passy.svbtle.com/dont-fear-the-reader\">Don't Fear the Reader</a></strong>: Pascal Hartig explains how to use the reader monad in JavaScript.</li>\n<li><strong><a href=\"https://github.com/fantasyland/fantasy-readers\">Fantasy Readers</a></strong>: Fantasy Land compatible implementation of the Reader Monad.</li>\n<li><strong><a href=\"https://www.livecoding.tv/evilsoft/videos/WojoB-functional-js-reader-monad\">LiveCoding Video of Reader Monad Implementation</a></strong>: In this video you will learn how to use and implement a Reader from scratch.</li>\n<li><strong><a href=\"https://vimeo.com/105300347\">Monad a Day: Reader</a></strong>: Short video by Brian Lonsdorf about the Reader Monad.</li>\n</ul>\n</li>\n<li>\n<p><strong>Transformers</strong>: Special types that allow us to roll two monads into a single one that shares the behavior of both.</p>\n<ul>\n<li><strong><a href=\"http://akh-js.com/\">Akh</a></strong>: Akh includes a basic set of common monad transformers, along with monads derived from these transformers. Akh structures implement the Fantasy Land specification.</li>\n<li><strong><a href=\"https://github.com/quarterto-archive/fantasy-arrayt\">Fantasy ArrayT</a></strong>: Monad transformer for JavaScript Arrays.</li>\n<li><strong><a href=\"https://github.com/boris-marinov/monad-transformers\">Monad Transformers</a></strong>: Monad transformers are tricky, they require an excessive amount of type juggling. One of the aims of this package is to reduce the amount of wrapping and unwrapping needed for making a new transformer and to provide an easy way to define and combine transformers.</li>\n<li><strong><a href=\"https://github.com/boris-marinov/monad-transformers\">Monad Transformers Library</a></strong>: Practical monad transformers for JS.</li>\n</ul>\n</li>\n<li>\n<p><strong>Validation Monad</strong>: A disjunction that is appropriate for validating inputs and aggregating failures.</p>\n<ul>\n<li><strong><a href=\"http://folktale.origamitower.com/api/v2.1.0/en/folktale.validation.html\">Folktale Validation</a></strong>: Validation Monad implementation of Folktale Library.</li>\n<li><strong><a href=\"https://tech.evojam.com/2016/04/26/practical-intro-to-monads-in-javascript-validation/\">Practical Intro to Monads in JavaScript: Validation</a></strong>: Jakub Strojewski shows how to accumulate errors in a simple Validation use case.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"http://swannodette.github.io/mori/\">Mori</a></strong>: A library for using ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript.</li>\n<li><strong><a href=\"https://drboolean.gitbooks.io/mostly-adequate-guide/content/\">Mostly Adequate Guide to Functional Programming</a></strong>: A book by Brian Lonsdorf that introduces algebraic functional programming in JavaScript.</li>\n<li><strong><a href=\"http://kovach.me/nanoscope/\">Nanoscope</a></strong>: Nanoscope is a javascript library designed to make complex transformations of data much easier. It is a built on the idea of a functional Lens - a construct that enables focusing on sub-parts of data structures to get and modify.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/pointfree-fantasy\">Pointfree Fantasy</a></strong>: Point-free wrappers for fantasy-land. Functions are curried using lodash's curry function, and receive their data last. Gives us aliases with our familar haskell names as well.</li>\n<li><strong><a href=\"http://lucasmreis.github.io/blog/pointfree-javascript/\">Pointfree Javascript</a></strong>: In this post Lucas Reis presents what is called pointfree style programming and goes through some common scenarios to demonstrate its benefits.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=XcS-LdEBUkE\">Practical Functional Programming: Pick Two</a></strong>: James Coglan tries to show in this video how to use functional concepts in daily JavaScript programming.</li>\n<li><strong><a href=\"https://medium.com/@yelouafi/promises-fp-beautiful-streams-6f0235c5b179\">Promises + FP = Beautiful Streams</a></strong>: Yassine Elouafi show how to use functional programming and algebraic data types to derive a pure functional definition of reactive programming like streams.</li>\n<li><strong><a href=\"https://vimeo.com/49384334\">Pure JavaScript</a></strong>: Christian Johansen shows you how you can up your game by leaving loops behind and embracing functions as the primary unit of abstraction.</li>\n<li><strong><a href=\"http://rauchg.com/2015/pure-ui/\">Pure UI</a></strong>: Guillermo Rauch discusses the definition of an application's UI as a pure function of application state.</li>\n<li><strong><a href=\"http://www.purescript.org/\">PureScript</a></strong>: PureScript is a strongly, statically typed language which compiles to JavaScript. It is written in and inspired by Haskell.</li>\n<li>\n<p><strong><a href=\"http://ramdajs.com/\">Ramda</a></strong>: A practical library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.</p>\n<ul>\n<li><strong>Practical Ramda - Functional Programming Examples</strong>: Tom MacWright gives some practical examples of Ramda usage.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/ramda/ramda-fantasy\">Ramda Fantasy</a></strong>: Fantasy Land compatible types for easy integration with Ramda. This is an experimental project and will probably merge with Sanctuary.</li>\n<li>\n<p><strong><a href=\"http://sanctuary.js.org/\">Sanctuary</a></strong>: Sanctuary is a functional programming library inspired by Haskell and PureScript. It depends on and works nicely with Ramda. Sanctuary makes it possible to write safe code without null checks.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sanctuary-js/sanctuary-site/blob/gh-pages/scripts/generate\">Sanctuary Build Script</a></strong>: A build script for generating the Sanctuary website.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://jaysoo.ca/2016/01/13/functional-programming-little-ideas/\">The Little Idea of Functional Programming</a></strong>: Jack Hsu tries to take a look at a couple of simple concepts that make up the little idea behind functional programming and to tie the concepts back to code examples in JavaScript.</li>\n<li><strong><a href=\"http://guigrpa.github.io/timm/\">Timm</a></strong>: Immutability helpers with fast reads and acceptable writes.</li>\n<li>\n<p><strong><a href=\"http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming\">Transducers</a></strong>: Transducers are a powerful and composable way to build algorithmic transformations that you can reuse in many contexts.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=6mTbuzafcII\">\"Transducers\" Presentation at Strange Loop</a></strong>: This talk will describe transducers, a new library feature for Clojure (but of interest to other languages) that emphasizes composable, context-free, intermediate-free notions like 'mapping' and 'filtering' and their concrete reuse across all of the contexts above.</li>\n<li><strong><a href=\"http://gfxmonk.net/2015/11/25/figuring-out-what-transducers-are-good-for.html\">Figuring out what transducers are good for</a></strong>: Tim Cuthbertson attempts some plausible but detailed examples with Transducers in JavaScript.</li>\n<li>\n<p><strong>Implementations</strong>: Libraries that implement Transducer protocoll and include ready to use transformers.</p>\n<ul>\n<li><strong><a href=\"https://github.com/transduce/transduce\">Transduce</a></strong>: Implementation by Kevin Beaty extracted from underarm.</li>\n<li><strong><a href=\"https://github.com/cognitect-labs/transducers-js\">Transducers-js by Cognitect Labs</a></strong>: A high performance Transducers implementation for JavaScript by Cognitect Labs.</li>\n<li>\n<p><strong><a href=\"https://github.com/jlongster/transducers.js\">Transducers.js Library by James Long</a></strong>: A small library for generalized transformation of data (inspired by Clojure's transducers)</p>\n<ul>\n<li><strong><a href=\"http://jlongster.com/Transducers.js-Round-2-with-Benchmarks\">Transducers.js Round 2 with Benchmarks</a></strong>: Refactored version of Transducers.js, some benchmarks, Laziness, the transformer protocoll.</li>\n<li><strong><a href=\"http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data\">Transducers.js: A JavaScript Library for Transformation of Data</a></strong>: A post announcing the transducers.js library with some explanation.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"http://simplectic.com/blog/2015/ramda-transducers-logs/\">Streaming Logs with Transducers and Ramda</a></strong>: In this article we will use Ramda to parse a log file without curly braces (and introduce transducers along the way).</li>\n<li><strong><a href=\"http://clojure.org/reference/transducers\">Transducers Documentation for Clojure</a></strong>: Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the essence of the transformation in terms of an individual element.</li>\n<li><strong><a href=\"http://simplectic.com/blog/2014/transducers-explained-1/\">Transducers Explained: Part 1</a></strong>: An introduction to transducers using JavaScript. We will work from reducing over arrays, to defining transformations as transformers, then incrementally introducing transducers and using them with transduce.</li>\n<li><strong><a href=\"http://simplectic.com/blog/2014/transducers-explained-pipelines/\">Transducers Explained: Pipelines</a></strong>: In this article, we will introduce four new transducers: filter, remove, drop and take. We will show how transducers can be composed into pipelines and talk about the order of transformation.</li>\n<li><strong><a href=\"http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming\">Transducers are Coming</a></strong>: The first announcement by Rich Hickey.</li>\n<li><strong><a href=\"https://xgrommx.github.io/rx-book/content/getting_started_with_rxjs/creating_and_querying_observable_sequences/transducers.html\">Transducers with Observable Sequences</a></strong>: A chapter from the RxJS Book describing Transducers.</li>\n<li><strong><a href=\"https://medium.com/@roman01la/understanding-transducers-in-javascript-3500d3bd9624#.3lbq6d4yq\">Understanding Transducers in JavaScript</a></strong>: Roman Liutikov translated code examples from similar Clojure article into JavaScript. So you can still read the article and check code examples here.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/paldepind/union-type\">Union Type</a></strong>: Union types are a way to group different values together. Union-type is a small JavaScript library for defining and using union types.</li>\n</ul>\n</li>\n<li>\n<p><strong>Functional Reactive Programming (FRP)</strong>: FRP is a programming paradigm for asynchronous dataflow programming using the building blocks of functional programming.</p>\n<ul>\n<li><strong><a href=\"https://github.com/kriskowal/gtor\">A General Theory of Reactivity</a></strong>: Kris Kowal describes popular primitives of Reactive Programming and some use cases.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=R9CGieinKVo\">A General Theory of Reactivity (Video)</a></strong>: Kris Kowal talks about reactive primitives and their traits.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=Agu6jipKfYw\">Controlling Time and Space</a></strong>: This talk will quickly cover the basics of FRP, and then go into a couple different formulations of FRP that people are beginning to use. We will explore how these formulations fit together historically and theoretically.</li>\n<li>\n<p><strong><a href=\"http://cycle.js.org/\">Cycle.js</a></strong>: A functional and reactive JavaScript framework that solves the cyclic dependency of Observables which emerge during dialogues (mutual observations) between the Human and the Computer.</p>\n<ul>\n<li><strong><a href=\"https://github.com/whitecolor/cycle-async-driver\">Async Driver</a></strong>: Higher order factory for creating cycle.js async request based drivers. Allows you almost completely eliminate boilerplate code for this kind of drivers.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=Rj8ZTRVka4E\">Cycle.js Was Built to Solve Problems</a></strong>: In this video André Staltz shows how Cycle.js has a practical purpose, meant to solve problems your customers/business may relate to.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=uNZnftSksYg\">Cycle.js and Functional Reactive User Interfaces</a></strong>: In this talk we will discover how Cycle.js is purely reactive and functional, and why it's an interesting alternative to React.</li>\n<li><strong><a href=\"https://glebbahmutov.com/draw-cycle/\">Draw Cycle</a></strong>: Simple Cycle.js program visualized</li>\n<li>\n<p><strong><a href=\"http://cycle.js.org/drivers.html\">Drivers</a></strong>: Drivers are functions that listen to Observable sinks (their input), perform imperative side effects, and may return Observable sources (their output).</p>\n<ul>\n<li><strong><a href=\"https://github.com/Widdershin/cycle-animation-driver\">Animation</a></strong>: A Cycle driver for requestAnimationFrame.</li>\n<li><strong><a href=\"https://github.com/benji6/cycle-audio-graph\">Audio Graph Driver</a></strong>: Audio graph driver for Cycle.js based on virtual-audio-graph.</li>\n<li><strong><a href=\"https://github.com/10clouds/cyclejs-cookie\">Cookie</a></strong>: Cycle.js Cookie Driver, based on cookie_js library.</li>\n<li><strong><a href=\"https://github.com/cyclejs/dom\">DOM</a></strong>: The standard DOM Driver for Cycle.js based on virtual-dom, and other helpers.</li>\n<li><strong><a href=\"https://github.com/secobarbital/cycle-fetch-driver\">Fetch</a></strong>: A Cycle.js Driver for making HTTP requests, using the Fetch API.</li>\n<li><strong><a href=\"https://github.com/r7kamura/cycle-fetcher-driver\">Fetcher</a></strong>: A Cycle.js Driver for making HTTP requests using stackable-fetcher.</li>\n<li><strong><a href=\"https://github.com/dralletje/cycle-firebase\">Firebase</a></strong>: Thin layer around the firebase javascript API that allows you to query and declaratively update your favorite real-time database.</li>\n<li><strong><a href=\"https://github.com/cyclejs/http\">HTTP</a></strong>: A Cycle.js Driver for making HTTP requests, based on superagent.</li>\n<li><strong><a href=\"https://github.com/CyclicMaterials/cycle-hammer-driver\">Hammer.js</a></strong>: The driver incorporates the Hammer.js gesture library.</li>\n<li><strong><a href=\"https://github.com/cyclejs/history\">History</a></strong>: Cycle.js URL Driver based on the rackt/history library.</li>\n<li><strong><a href=\"https://github.com/raquelxmoss/cycle-keys\">Keys</a></strong>: A Cycle.js driver for keyboard events.</li>\n<li><strong><a href=\"https://github.com/whitecolor/cycle-mongoose/\">Mongoose.js</a></strong>: A driver for using Mongoose with Cycle JS. Accepts both, write and read operations.</li>\n<li><strong><a href=\"https://github.com/cyclejs/cycle-notification-driver\">Notification</a></strong>: A Cycle.js Driver for showing and responding to HTML5 Notifications.</li>\n<li><strong><a href=\"https://github.com/TylorS/cycle-router\">Router</a></strong>: A router built from the ground up with Cycle.js in mind. Stands on the shoulders of battle-tested libraries switch-path for route matching and rackt/history for dealing with the History API.</li>\n<li><strong><a href=\"https://github.com/axefrog/cycle-router5\">Router5</a></strong>: A source/sink router driver for Cycle.js, based on router5.</li>\n<li><strong><a href=\"https://github.com/jessaustin/cycle-sse-driver\">Server-Sent Events</a></strong>: Cycle.js driver for Server-Sent Events (SSE), a browser feature also known as EventSource. Server-Sent Events allow the server to continuously update the page with new events, without resorting to hacks like long-polling.</li>\n<li><strong><a href=\"https://github.com/TylorS/cycle-snabbdom\">Snabbdom</a></strong>: Alternative DOM driver utilizing the snabbdom library.</li>\n<li><strong><a href=\"https://github.com/cgeorg/cycle-socket.io\">Socket.IO</a></strong>: A Cycle driver for applications using Socket.IO</li>\n<li><strong><a href=\"https://github.com/cyclejs/storage\">Storage</a></strong>: A Cycle.js Driver for using localStorage and sessionStorage in the browser.</li>\n</ul>\n</li>\n<li>\n<p><strong>Example Projects</strong>: Example applications built with Cycle.js</p>\n<ul>\n<li><strong><a href=\"https://github.com/cyclejs/examples\">Cycle.js Examples</a></strong>: Browse and learn from examples of small Cycle.js apps using Core, DOM Driver, HTML Driver, HTTP Driver, JSONP Driver, and others.</li>\n<li><strong><a href=\"https://github.com/staltz/rxmarbles\">RX Marbles</a></strong>: Interactive diagrams of Rx Observables.</li>\n<li><strong><a href=\"https://github.com/cgeorg/todomvp\">TODO: Minimum Viable Pizza</a></strong>: Minimum Viable Pizza implemented with Cycle.js</li>\n<li><strong><a href=\"https://github.com/Widdershin/tricycle\">Tricycle</a></strong>: A scratchpad for trying out Cycle.js.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=6_ETUyh0tns\">Intro to Functional Reactive Programming with Cycle.js</a></strong>: Nick Johnstone gives an introduction to developing with Cycle.js in this video presentation.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=31URmaeNHSs\">Learning How to Ride: an Introduction to Cycle.js</a></strong>: In this talk, Fernando Macias Pereznieto introduces us to the good, the bad, and the beautiful of using Cycle.js, whether you are a complete beginner or an experienced JS ninja.</li>\n<li>\n<p><strong><a href=\"https://github.com/motorcyclejs/core\">Motorcycle.js</a></strong>: This is a sister project that will continue to evolve and grow alongside Cycle.js for the foreseeable future. The primary focus of this project is to tune it for performance as much as possible.</p>\n<ul>\n<li><strong><a href=\"https://github.com/cujojs/most\">Most</a></strong>: Monadic reactive streams with high performance.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://medium.com/@fkrautwald/plug-and-play-all-your-observable-streams-with-cycle-js-e543fc287872\">Plug and Play All Your Observable Streams With Cycle.js</a></strong>: Frederik Krautwald explains the principles behind Cycle.js, it's inner workings and how to use it to create a simple program with drivers.</li>\n<li><strong><a href=\"https://github.com/Widdershin/tricycle\">Tricycle</a></strong>: A scratchpad for trying out Cycle.js.</li>\n<li><strong><a href=\"http://thenewstack.io/developers-need-know-mvi-model-view-intent/\">What Developers Need to Know about MVI (Model-View-Intent)</a></strong>: The article explains the general MVI pattern and how it relates to React, Reactive Programming and Cycle.js</li>\n</ul>\n</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=uNZnftSksYg\">Cycle.js and Functional Reactive User Interfaces</a></strong>: In this talk we will discover how Cycle.js is purely reactive and functional, and why it's an interesting alternative to React.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=v68ppDlvHqs\">Dynamics of Change: why Reactivity Matters</a></strong>: In this talk we will see when passive or reactive strategy is advantageous, and how the reactive strategy is a sensible default.</li>\n<li><strong><a href=\"https://vimeo.com/68987289\">Enemy of the State</a></strong>: An introduction to Functional Reactive Programming and Bacon.js by Philip Roberts.</li>\n<li><strong><a href=\"https://github.com/mobxjs/mobx\">MobX</a></strong>: MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming.</li>\n<li><strong><a href=\"https://medium.com/@yelouafi/promises-fp-beautiful-streams-6f0235c5b179\">Promises + FP = Beautiful Streams</a></strong>: Yassine Elouafi show how to use functional programming and algebraic data types to derive a pure functional definition of reactive programming like streams.</li>\n<li>\n<p><strong>Stream Libraries</strong>: Libraries which help you compose asynchronous operations on streams of time-varying values and events.</p>\n<ul>\n<li><strong><a href=\"http://baconjs.github.io/\">Bacon.js</a></strong>: A small functional reactive programming lib for JavaScript. Turns your event spaghetti into clean and declarative feng shui bacon, by switching from imperative to functional.</li>\n<li><strong><a href=\"https://rpominov.github.io/kefir/\">Kefir.js</a></strong>: Kefir — is a Reactive Programming library for JavaScript inspired by Bacon.js and RxJS, with focus on high performance and low memory usage.</li>\n<li><strong><a href=\"https://github.com/cujojs/most\">Most</a></strong>: Monadic reactive streams with high performance.</li>\n<li>\n<p><strong><a href=\"https://github.com/Reactive-Extensions/RxJS\">Reactive Extensions (RxJS)</a></strong>: RxJS is a set of libraries for composing asynchronous and event-based programs using observable sequences and fluent query operators.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=XRYN2xt11Ek\">Async JavaScript with Reactive Extensions</a></strong>: Jafar Husain explains in this video how Netflix uses the Reactive Extensions (Rx) library to build responsive user experiences that strive to be event-driven, scalable and resilient.</li>\n<li><strong><a href=\"http://blog.thoughtram.io/rx/2016/08/01/exploring-rx-operators-flatmap.html\">Exploring Rx Operators: FlatMap</a></strong>: Christoph Burgdorf introduces the FlatMap operator and its usage for collections and observables.</li>\n<li><strong><a href=\"http://blog.thoughtram.io/angular/2016/05/16/exploring-rx-operators-map.html\">Exploring Rx Operators: Map</a></strong>: Christoph Burgdorf explains how to use the map operator in RxJS.</li>\n<li><strong><a href=\"http://www.mokacoding.com/blog/functional-core-reactive-shell/\">Functional Core Reactive Shell</a></strong>: Giovanni Lodi makes an overview of different architecture meta-patterns and describes his current findings about functional programming and observables as a way to control side effects.</li>\n<li><strong><a href=\"http://reactivex.io/learnrx/\">Learn RX</a></strong>: A series of interactive exercises for learning Microsoft's Reactive Extensions (Rx) Library for Javascript.</li>\n<li><strong><a href=\"http://www.learnrxjs.io/\">Learn RxJS</a></strong>: This site focuses on making RxJS concepts approachable, the examples clear and easy to explore, and features references throughout to the best RxJS related material on the web.</li>\n<li><strong><a href=\"https://medium.com/@sergimansilla/real-world-observables-1f65748c8f9\">Real World Observables</a></strong>: Sergi Mansilla writes an FTP client to use it as an example for a real world application based on RxJS.</li>\n<li><strong><a href=\"https://github.com/JulienMoumne/rx-training-games\">Rx Training Games</a></strong>: Rx Training Games is a coding playground that can be used to learn and practice Reactive Extensions coding grid-based games</li>\n<li><strong><a href=\"http://xgrommx.github.io/rx-book/index.html\">Rx-Book</a></strong>: A complete book about RxJS v.4.0.</li>\n<li><strong><a href=\"http://rxmarbles.com/\">RxMarbles</a></strong>: A webapp for experimenting with diagrams of Rx Observables, for learning purposes.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/rxstate\">RxState</a></strong>: Simple opinionated state management library based on RxJS and Immutable.js</li>\n<li><strong><a href=\"http://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html\">Taking Advantage of Observables in Angular 2</a></strong>: Christoph Burgdorf describes the advantages of Observables and how you can use them in Angular 2 context.</li>\n<li><strong><a href=\"https://xgrommx.github.io/rx-book/content/getting_started_with_rxjs/creating_and_querying_observable_sequences/transducers.html\">Transducers with Observable Sequences</a></strong>: A chapter from the RxJS Book describing Transducers.</li>\n<li><strong><a href=\"http://staltz.com/why-we-built-xstream.html\">Why We Built Xstream</a></strong>: The authors needed a stream library tailored for Cycle.js. It needs to be “hot” only, small in kB size and it should have only a few and intuitive operators.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://github.com/staltz/xstream\">Xstream</a></strong>: An extremely intuitive, small, and fast functional reactive stream library for JavaScript.</p>\n<ul>\n<li><strong><a href=\"http://staltz.com/why-we-built-xstream.html\">Why We Built Xstream</a></strong>: The authors needed a stream library tailored for Cycle.js. It needs to be “hot” only, small in kB size and it should have only a few and intuitive operators.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"https://gist.github.com/staltz/868e7e9bc2a7b8c1f754\">The Introduction to Reactive Programming</a></strong>: André Staltz provides a complete introduction to the Reactive Programming and RxJS.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=1zj7M1LnJV4\">What if the User was a Function?</a></strong>: In this video André Staltz talks about the input/output cycle between humans and computers and how to take advantage of this model by using FRP and event streams.</li>\n</ul>\n</li>\n</ul>\n<h2>Compatibility</h2>\n<p>Ability of a product to work with different input/output devices and rendering software. Including printers, email, mobile devices and different browsers.</p>\n<ul>\n<li>\n<p><strong>Cross Browser</strong>: Cross-browser refers to the ability of a website, web application, HTML construct or client-side script to function in environments that provide its required features and to bow out or degrade gracefully when features are absent or lacking.</p>\n<ul>\n<li><strong><a href=\"http://caniuse.com/\">Can I use ... ?</a></strong>: \"Can I use\" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.</li>\n<li><strong><a href=\"https://developer.microsoft.com/en-us/microsoft-edge/tools/\">Dev Tools by Microsoft</a></strong>: These tools allow you to test your product on different version of Internet Explorer and Microsoft Edge.</li>\n<li><strong><a href=\"https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills\">HTML5 Cross Browser Polyfills</a></strong>: So here we're collecting all the shims, fallbacks, and polyfills in order to implant HTML5 functionality in browsers that don't natively support them.</li>\n<li><strong><a href=\"http://html5please.com/\">HTML5 Please</a></strong>: Look up HTML5, CSS3, etc features, know if they are ready for use, and if so find out how you should use them - with polyfills, fallbacks or as they are.</li>\n<li><strong><a href=\"https://modernizr.com/\">Modernizr</a></strong>: It's a collection of superfast tests - or “detects” as we like to call them - which run as your web page loads, then you can use the results to tailor the experience to the user.</li>\n<li><strong><a href=\"http://necolas.github.io/normalize.css/\">Normalize.css</a></strong>: A modern, HTML5-ready alternative to CSS resets.</li>\n<li><strong><a href=\"https://polyfill.io/\">Polyfill.io</a></strong>: Just the polyfills you need for your site, tailored to each browser.</li>\n</ul>\n</li>\n<li>\n<p><strong>E-Mail</strong>: Preparing HTML based electronic mail.</p>\n<ul>\n<li><strong><a href=\"https://buttons.cm/\">Bulletproof E-Mail Buttons</a></strong>: Design gorgeous buttons using progressively enhanced VML and CSS.</li>\n<li><strong><a href=\"https://github.com/sparkbox/email-lab\">Email Lab</a></strong>: This a project for developing and testing email templates. It uses Grunt to streamline and simplify the creation of email templates. Email template can be built with re-usable components.</li>\n<li><strong><a href=\"https://github.com/seanpowell/Email-Boilerplate\">Email-Boilerplate</a></strong>: Use these code examples as a guideline for formatting your HTML email to avoid some of the major styling pitfalls in HTML email design.</li>\n<li><strong><a href=\"http://foundation.zurb.com/emails.html\">Foundation for Emails 2</a></strong>: Frontend Framework for E-Mails including a grid, global styles, aligment classes, buttons, callout panels, thumbnail styles, typography, visibility classes.</li>\n<li><strong><a href=\"https://mjml.io/\">MJML</a></strong>: MJML is a markup language designed to reduce the pain of coding a responsive email. Its semantic syntax makes it easy and straightforward and its rich standard components library speeds up your development time and lightens your email codebase.</li>\n<li><strong><a href=\"https://github.com/mailchimp/Email-Blueprints\">MailChimp E-Mail Blueprints</a></strong>: Email Blueprints is a collection of HTML email templates that can serve as a solid foundation and starting point for the design of emails.</li>\n<li><strong><a href=\"https://www.sendwithus.com/resources/templates\">Open Source Email Templates</a></strong>: The sendwithus Open Source Template Project is a collection of free email templates created and managed by the sendwithus team and community.</li>\n<li><strong><a href=\"https://github.com/leemunroe/responsive-html-email-template\">Really Simple Responsive HTML Email Template</a></strong>: Sometimes all you want is a really simple HTML email template. Here it is.</li>\n<li><strong><a href=\"https://www.campaignmonitor.com/dev-resources/guides/mobile/\">Responsive Email Design</a></strong>: In this guide, the author will cover the fundamentals of designing and building a mobile-friendly email and back it all up with some neat tips and techniques.</li>\n<li><strong><a href=\"http://zurb.com/playground/responsive-email-templates\">Responsive Email Templates</a></strong>: Zurb Studios put together this set of super awesome email templates so that you can make your email campaigns responsive.</li>\n<li><strong><a href=\"https://www.campaignmonitor.com/css/\">The Ultimate Guide to CSS</a></strong>: A complete breakdown of the CSS support for the top 10 most popular mobile, web and desktop email clients on the planet.</li>\n</ul>\n</li>\n<li>\n<p><strong>Keyboard</strong>: Working with keyboard input in a web browser.</p>\n<ul>\n<li><strong><a href=\"https://developers.google.com/web/updates/2016/04/keyboardevent-keys-codes\">What's New with KeyboardEvents? Keys and Codes!</a></strong>: Jeff Posnick talks about the code and key event attributes and how to use them in practice.</li>\n</ul>\n</li>\n<li>\n<p><strong>Mobile</strong>: Development of websites optimized for viewing on smartphone and tablet devices.</p>\n<ul>\n<li>\n<p><strong>Emulation</strong>: Tools for emulating features of mobile devices on a desktop.</p>\n<ul>\n<li><strong><a href=\"http://www.responsinator.com/\">Responsinator</a></strong>: Quickly test any website in popular resolutions.</li>\n<li><strong><a href=\"https://developers.google.com/web/tools/chrome-devtools/iterate/device-mode/?hl=en\">Simulate Mobile Devices with Chrome Developer Tools</a></strong>: Use Chrome DevTools' Device Mode to build mobile-first, fully responsive web sites. Learn how to use it to simulate a wide range of devices and their capabilities.</li>\n<li><strong><a href=\"https://github.com/davidcalhoun/touche\">Touché</a></strong>: Touché: bringing touch events to non-touch browsers (how touching!). No dependencies. No code bloat.</li>\n<li><strong><a href=\"http://mwbrooks.github.io/thumbs.js/\">thumbs.js</a></strong>: Adds touch support to your browser.</li>\n</ul>\n</li>\n<li>\n<p><strong>Gestures</strong>: Resources for working with touch mechanics (what your fingers do on the screen) and touch activities (results of specific gestures).</p>\n<ul>\n<li><strong><a href=\"http://hammerjs.github.io/\">Hammer.js</a></strong>: Hammer helps you add support for touch gestures to your page, and remove the 300ms delay from clicks.</li>\n<li><strong><a href=\"https://www.google.com/design/spec/patterns/gestures.html\">Introduction to Gestures</a></strong>: Descriptions of different gestures an their meanings.</li>\n<li><strong><a href=\"https://github.com/jquery/PEP\">Pointer Events Polyfill</a></strong>: PEP polyfills pointer events in all browsers that haven't yet implemented them, providing a unified, responsive input model for all devices and input types.</li>\n<li><strong><a href=\"https://github.com/HotStudio/touchy\">Touchy</a></strong>: Touchy is a jQuery plugin for managing touch events on W3C-compliant browsers, such as Mobile Safari or Android Browser, or any browser that supports the ontouchstart, ontouchmove and ontouchend events.</li>\n<li><strong><a href=\"http://jgestures.codeplex.com/\">jGestures</a></strong>: A jQuery plugin that enables you to add gesture events just like native jQuery events. Includes event substitution for mouse events.</li>\n</ul>\n</li>\n<li>\n<p><strong>Layout</strong>: The way in which the parts of the website are arranged or laid out.</p>\n<ul>\n<li><strong><a href=\"https://github.com/jakiestfu/Snap.js\">Snap.js</a></strong>: A Library for creating beautiful mobile shelfs (side menus) in Javascript.</li>\n<li><strong><a href=\"https://github.com/thebird/swipe\">Swipe</a></strong>: Swipe is the most accurate touch slider.</li>\n<li><strong><a href=\"http://idangero.us/swiper/\">Swiper</a></strong>: Swiper is a free mobile touch slider with hardware accelerated transitions and native behavior. It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps.</li>\n<li><strong><a href=\"https://github.com/filamentgroup/jqm-pagination\">jqm-pagination</a></strong>: A jQuery Mobile plugin for sequential pagination between pages with support for touch, mouse, and keyboard.</li>\n<li><strong><a href=\"https://github.com/max-power/swipeslide\">swipeslide</a></strong>: A Zepto Plugin for iOS like swipe navigation.</li>\n</ul>\n</li>\n<li>\n<p><strong>Scrolling</strong>: Native scrolling of the browsers doesn't always fit for mobile websites. There are resources which solve this problem.</p>\n<ul>\n<li><strong><a href=\"https://github.com/azoff/overscroll\">Overscroll</a></strong>: Overscroll is a jQuery plug-in that mimics the iphone/ipad scrolling experience in a browser.</li>\n<li><strong><a href=\"https://www.filamentgroup.com/lab/overthrow.html\">Overthrow</a></strong>: A framework-independent, overflow: auto polyfill for use in responsive design.</li>\n<li><strong><a href=\"https://github.com/zynga/scroller\">Zynga Scroller</a></strong>: A pure logic component for scrolling/zooming. It is independent of any specific kind of rendering or event system.</li>\n<li><strong><a href=\"http://iscrolljs.com/\">iScroll</a></strong>: iScroll is a high performance, small footprint, dependency free, multi-platform javascript scroller.</li>\n<li><strong><a href=\"http://pep.briangonzalez.org/\">jQuery.pep.js</a></strong>: A lightweight plugin for kinetic-drag on mobile/desktop.</li>\n<li><strong><a href=\"http://jswipekinetic.codeplex.com/\">jSwipeKinetic</a></strong>: A jQuery plugin that enables you to add kinetic scrolling on your touch optimized projects. jSwipeKinetic is build on top of jGestures.</li>\n<li><strong><a href=\"https://github.com/visiongeist/pull-to-refresh-js\">pull-to-refresh.js</a></strong>: This plugin enables a pull-to-refresh functionality in mobile safari for scrollable block elements with native scrolling on iOS.</li>\n</ul>\n</li>\n<li>\n<p><strong>Tap Acceleration</strong>: Every touch-based mobile browser has an artificial ~300ms delay between you tapping a thing on the screen and the browser considering it a \"click\", but there are ways to work around this behavior.</p>\n<ul>\n<li><strong><a href=\"https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away\">300ms Tap Delay, Gone Away</a></strong>: An article by Google describing the 300ms delay and how Chrome 32+ on Anrdoid deals with it.</li>\n<li><strong><a href=\"http://hammerjs.github.io/\">Hammer.js</a></strong>: Hammer helps you add support for touch gestures to your page, and remove the 300ms delay from clicks.</li>\n<li><strong><a href=\"http://cheeaun.github.io/tappable/\">Tappable</a></strong>: Tappable is a simple, standalone library to invoke the tap event for touch-friendly web browsers.</li>\n<li><strong><a href=\"https://github.com/ftlabs/fastclick\">fastclick</a></strong>: FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers.</li>\n</ul>\n</li>\n<li>\n<p><strong>Touch Keyboard</strong>: Almost all modern smartphones provide a touch based keyboard for text input. There are some tactics to influence them and work around their quirks.</p>\n<ul>\n<li><strong><a href=\"https://www.smashingmagazine.com/2013/08/guide-to-designing-touch-keyboards-with-cheat-sheet/\">A Guide To Designing Touch Keyboards</a></strong>: In this article, we will look a bit deeper into the usability issues surrounding touch keyboards, including five design guidelines that will alleviate some of these pains.</li>\n</ul>\n</li>\n<li>\n<p><strong>Working With Sensors</strong>: All mobile devices are equipped with sensors like gyroscope, accelerometers, photometers, magnetometers and so on. Some of them are accessible in a browser through JavaScript.</p>\n<ul>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/device/orientation/\">This End Up: Using Device Orientation</a></strong>: In this article, we'll take a look at device orientation and motion events, and use CSS to rotate an image based on the orientation of the device.</li>\n<li><strong><a href=\"http://lenticular.attasi.com/\">lenticular.js</a></strong>: Tilt-controlled images in the browser.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Printers</strong>: Manipulation of printer output through CSS.</p>\n<ul>\n<li><strong><a href=\"http://coding.smashingmagazine.com/2013/03/08/tips-tricks-print-style-sheets/\">Tips And Tricks For Print Style Sheets</a></strong>: A comprehensive guide for print optimization including background images and colors, expanding external links, QR codes, CSS3 filters for print quality.</li>\n</ul>\n</li>\n<li>\n<p><strong>Responsive Web Design (RWD)</strong>: RWD responds to the needs of the users and the devices they're using. The layout changes based on the size and capabilities of the device.</p>\n<ul>\n<li>\n<p><strong>Data Tables</strong>: Tables filled with data don't behave well on small screens. Here are some resources to tame them.</p>\n<ul>\n<li><strong><a href=\"https://css-tricks.com/responsive-data-tables/\">Responsive Data Tables</a></strong>: Several ideas by Chris Coyier on how to deal with responsive tables.</li>\n<li><strong><a href=\"http://johnpolacek.github.com/stacktable.js/\">stacktable.js</a></strong>: jQuery plugin for stacking tables on small screens.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://futurefriendlyweb.com/thinking.html\">Future Friendly Thinking</a></strong>: We want to make things that are future friendly. The following ideas have been on our minds recently. Help us explore them further or suggest new ones.</li>\n<li><strong><a href=\"http://www.newnet-soft.com/blog/responsive-multi-column\">How to make a Responsive Newspaper-like layout</a></strong>: The article describes several approaches for creating multi column websites.</li>\n<li>\n<p><strong>Images</strong>: Images pose a set of problems on responsive websites: scaling, performance, retina screens and file size.</p>\n<ul>\n<li><strong><a href=\"http://adaptive-images.com/\">Adaptive Images</a></strong>: Adaptive Images detects your visitor's screen size and automatically creates, caches, and delivers device appropriate re-scaled versions of your web page's embeded HTML images.</li>\n<li><strong><a href=\"https://www.smashingmagazine.com/2013/07/choosing-a-responsive-image-solution/\">Choosing A Responsive Image Solution</a></strong>: This article leads you through the basics, and then arms you with the information you'll need to pick the best responsive image solution for your situation.</li>\n<li><strong><a href=\"https://github.com/estelle/clowncar\">Clown Car Technique</a></strong>: We can use media queries within SVG to serve up the right image. The beauty of the \"Clown Car\" technique is that all the logic remains in the SVG file.</li>\n<li><strong><a href=\"http://www.shutterstock.com/blog/2013/05/how-to-use-responsive-images-to-make-your-site-shine-on-any-platform/\">How to Use Responsive Images...</a></strong>: Engineers at Shutterstock describe different problems and solutions around responsive images.</li>\n<li><strong><a href=\"http://scottjehl.github.io/picturefill/\">Picturefill</a></strong>: A responsive image polyfill for <picture>, srcset, sizes, and more.</li>\n<li><strong><a href=\"https://github.com/tubalmartin/riloadr\">Riloadr</a></strong>: The goal of this library is to deliver optimized, contextual image sizes in responsive layouts that utilize dramatically different image sizes at different resolutions in order to improve page load time.</li>\n<li><strong><a href=\"https://timkadlec.com/2013/06/why-we-need-responsive-images/\">Why We Need Responsive Images</a></strong>: Tim Kadlec talks about page weight and responsive image solutions.</li>\n<li><strong><a href=\"https://github.com/karacas/imgLiquid\">imgLiquid</a></strong>: A jQuery Plugin to resize images to fit in a container.</li>\n<li><strong><a href=\"http://jquerypicture.com/\">jQuery Picture</a></strong>: jQuery Picture is a tiny (2kb) plugin to add support for responsive images to your layouts. It supports both figure elements with some custom data attributes and the new proposed picture format.</li>\n</ul>\n</li>\n<li>\n<p><strong>Monitoring Breakpoints</strong>: Triggering JavaScript events on different breakpoints.</p>\n<ul>\n<li><strong><a href=\"http://xoxco.com/projects/code/breakpoints/\">Breakpoints.js</a></strong>: Define breakpoints for your responsive design, and Breakpoints.js will fire custom events when the browser enters and/or exits that breakpoint.</li>\n<li><strong><a href=\"http://harvesthq.github.io/harvey/\">Harvey</a></strong>: Harvey helps you monitor and manage behavior changes by firing an event whenever your media query is activated.</li>\n<li><strong><a href=\"http://wicky.nillia.ms/enquire.js/\">enquire.js</a></strong>: enquire.js is a lightweight, pure javascript library (with no dependencies) for programmatically responding to media queries.</li>\n</ul>\n</li>\n<li>\n<p><strong>Navigation</strong>: Adapting the website navigation to different screen sizes.</p>\n<ul>\n<li><strong><a href=\"http://bradfrost.com/blog/web/complex-navigation-patterns-for-responsive-design/\">Complex Navigation Patterns</a></strong>: The article describes some emerging patterns for dealing with complex, lengthy and/or multi-level navigations.</li>\n<li><strong><a href=\"http://mobile.smashingmagazine.com/2013/09/11/responsive-navigation-on-complex-websites/\">Responsive Navigation On Complex Websites</a></strong>: To illustrate the techniques involved in implementing responsive navigation on a large website, author refers to two actual clients.</li>\n<li><strong><a href=\"http://bradfrost.com/blog/web/responsive-nav-patterns/\">Responsive Navigation Patterns</a></strong>: The article describes some of the more popular techniques for handling navigation in responsive designs.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://vimeo.com/45915667\">Responsive Design Workflow</a></strong>: In this video, Stephen Hay explores at a content-based approach to design workflow which is grounded in our multiplatform reality, not fixed-width Photoshop comps and overproduced wireframes.</li>\n<li><strong><a href=\"http://kumailht.com/responsive-elements/\">Responsive Elements</a></strong>: Responsive elements makes it possible for any element to adapt and respond to the area they occupy. It's a tiny JavaScript library that you can drop into your projects today.</li>\n<li><strong><a href=\"http://bradfrost.github.io/this-is-responsive/patterns.html\">Responsive Patterns</a></strong>: A collection of patterns and modules for responsive designs.</li>\n<li>\n<p><strong>Text</strong>: Working with text in a context of different viewport sizes.</p>\n<ul>\n<li><strong><a href=\"http://fittextjs.com/\">FitText</a></strong>: FitText makes font-sizes flexible. Use this plugin on your fluid or responsive layout to achieve scalable headlines that fill the width of a parent element.</li>\n<li><strong><a href=\"http://starburst1977.github.io/out-of-words/\">Out Of Words!</a></strong>: The responsive typography framework behind Words App.</li>\n<li><strong><a href=\"http://www.newnet-soft.com/blog/responsivefontsizing\">Responsive Font Sizing</a></strong>: Making your font size respond to your screen size, easy &#x26; maintainable.</li>\n<li><strong><a href=\"http://jbrewer.github.com/Responsive-Measure/\">Responsive Measure</a></strong>: A jQuery plugin for generating a responsive ideal measure.</li>\n<li><strong><a href=\"https://www.smashingmagazine.com/2016/05/fluid-typography/\">Truly Fluid Typography With vh And vw Units</a></strong>: This article describes viewport units and other technics to achieve typography which resizes smoothly with the screen.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/pazguille/viewport\">Viewport Component</a></strong>: Viewport is a component to ease viewport management. You can get the dimensions of the viewport and beyond, which can be quite helpful to perform some checks with JavaScript.</li>\n</ul>\n</li>\n<li>\n<p><strong>Web Accessibility</strong>: Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web.</p>\n<ul>\n<li><strong><a href=\"http://w3c.github.io/aria-in-html/\">Notes on Using ARIA in HTML</a></strong>: This document is a practical guide for developers on how to add accessibility information to HTML elements using the Accessible Rich Internet Applications specification.</li>\n<li><strong><a href=\"http://a11yproject.com/\">The A11Y Project</a></strong>: A community-driven effort to make web accessibility easier.</li>\n</ul>\n</li>\n</ul>\n<h2>Ecosystem</h2>\n<p>Important developers, companies, organizations and news sources.</p>\n<ul>\n<li>\n<p><strong>Communities Around Projects</strong>: Successful open source projects attract many developers who produce plugins, libraries, tutorials and other resources. This section collects such resources.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://angularjs.org/\">Angular</a></strong>: AngularJS is a web application framework trying to address many of the challenges encountered in developing single-page applications.</p>\n<ul>\n<li><strong><a href=\"https://devchat.tv/adv-in-angular\">Adventures in Angular</a></strong>: Adventures in Angular is a weekly podcast dedicated to the Angular JavaScript framework and related technologies, tools, languages, and practices.</li>\n<li><strong><a href=\"https://github.com/blacksonic/angular2-esnext-starter\">Angular 2 ESNext Starter</a></strong>: This repo stands as a starting point for those who try Angular 2 in Javascript. It shows techniques how easy development can be also without Typescript.</li>\n<li><strong><a href=\"https://vsavkin.com/angular-2-template-syntax-5f2ee9f13c6a\">Angular 2 Template Syntax</a></strong>: Victor Savkin writes about Angular 2 Templates including bindings, interpolation, syntax sugar, web component support and much more.</li>\n<li><strong><a href=\"http://developer.telerik.com/featured/angular-2-upgrade-strategies-angular-1-x/\">Angular 2 Upgrade Strategies from Angular 1.x</a></strong>: Some thoughts on general upgrading to Angular 2 and what you/your team can do to prepare.</li>\n<li><strong><a href=\"http://blog.ng-book.com/introduction-to-redux-with-typescript-and-angular-2/\">Building Redux in TypeScript with Angular 2</a></strong>: In this post we're going to discuss the ideas behind Redux. How to build our own mini version of the Redux Store and hook it up to Angular 2.</li>\n<li><strong><a href=\"http://victorsavkin.com/post/110170125256/change-detection-in-angular-2\">Change Detection in Angular 2</a></strong>: In this article Victor Savkin talks in depth about the Angular 2 change detection system.</li>\n<li><strong><a href=\"https://scotch.io/tutorials/how-to-implement-conditional-validation-in-angular-2-model-driven-forms\">How to Implement Conditional Validation in Model-driven Forms</a></strong>: In this article, we will learn about how to handle conditional validation in our model-driven form using the latest forms module.</li>\n<li><strong><a href=\"http://blog.thoughtram.io/angular/2016/05/23/opaque-tokens-in-angular-2.html\">How to Prevent Name Collisions in Angular 2 Providers</a></strong>: Opaque tokens are distinguishable and prevent us from running into naming collisions. Whenever we create a token that is not a type, OpaqueToken should be used.</li>\n<li><strong><a href=\"http://www.ng-newsletter.com/\">Ng-Newsletter</a></strong>: The free, weekly newsletter of the best AngularJS content on the web.</li>\n<li><strong><a href=\"http://www.primefaces.org/primeng/\">PrimeNG</a></strong>: PrimeNG is a collection of rich UI components for AngularJS2. PrimeNG is a sibling of the popular JavaServer Faces Component Suite, PrimeFaces.</li>\n<li><strong><a href=\"https://medium.com/@jecelynyeen/simple-language-translation-in-angular-2-part-1-a14087f50431\">Simple Language Translation</a></strong>: Create a pipe that we can use to translate words in the HTML view and a service that we can use to translate our words in JS / Typescript.</li>\n<li><strong><a href=\"https://scotch.io/tutorials/using-angular-2s-model-driven-forms-with-formgroup-and-formcontrol\">Using Model-Driven Forms with FormGroup and FormControl</a></strong>: In this article, we will learn about building model-driven form with validation using the latest forms module, then we will talk about what are the advantages / disadvantages of using model driven form as compared to template-driven form.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://backbonejs.org/\">Backbone.js</a></strong>: Backbone supplies structure to JavaScript-heavy applications by providing models, collections, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.</li>\n<li>\n<p><strong><a href=\"http://getbootstrap.com/\">Bootstrap</a></strong>: Bootstrap is a HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.</p>\n<ul>\n<li><strong><a href=\"http://hackerthemes.com/bootstrap-cheatsheet/\">Bootstrap 4 Cheat Sheet</a></strong>: A quick reference for Bootstrap v4 by Alexander Rechsteiner.</li>\n<li><strong><a href=\"https://medium.com/@jacobp/tree-shaking-bootstrap-95d6301f61a9\">Tree Shaking Bootstrap</a></strong>: Jacob Parker describes how to include only those parts of Bootstrap you are really using on your website by leveraging CSS modules and ES6 modules.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://cycle.js.org/\">Cycle.js</a></strong>: A functional and reactive JavaScript framework that solves the cyclic dependency of Observables which emerge during dialogues (mutual observations) between the Human and the Computer.</p>\n<ul>\n<li><strong><a href=\"https://github.com/whitecolor/cycle-async-driver\">Async Driver</a></strong>: Higher order factory for creating cycle.js async request based drivers. Allows you almost completely eliminate boilerplate code for this kind of drivers.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=Rj8ZTRVka4E\">Cycle.js Was Built to Solve Problems</a></strong>: In this video André Staltz shows how Cycle.js has a practical purpose, meant to solve problems your customers/business may relate to.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=uNZnftSksYg\">Cycle.js and Functional Reactive User Interfaces</a></strong>: In this talk we will discover how Cycle.js is purely reactive and functional, and why it's an interesting alternative to React.</li>\n<li><strong><a href=\"https://glebbahmutov.com/draw-cycle/\">Draw Cycle</a></strong>: Simple Cycle.js program visualized</li>\n<li>\n<p><strong><a href=\"http://cycle.js.org/drivers.html\">Drivers</a></strong>: Drivers are functions that listen to Observable sinks (their input), perform imperative side effects, and may return Observable sources (their output).</p>\n<ul>\n<li><strong><a href=\"https://github.com/Widdershin/cycle-animation-driver\">Animation</a></strong>: A Cycle driver for requestAnimationFrame.</li>\n<li><strong><a href=\"https://github.com/benji6/cycle-audio-graph\">Audio Graph Driver</a></strong>: Audio graph driver for Cycle.js based on virtual-audio-graph.</li>\n<li><strong><a href=\"https://github.com/10clouds/cyclejs-cookie\">Cookie</a></strong>: Cycle.js Cookie Driver, based on cookie_js library.</li>\n<li><strong><a href=\"https://github.com/cyclejs/dom\">DOM</a></strong>: The standard DOM Driver for Cycle.js based on virtual-dom, and other helpers.</li>\n<li><strong><a href=\"https://github.com/secobarbital/cycle-fetch-driver\">Fetch</a></strong>: A Cycle.js Driver for making HTTP requests, using the Fetch API.</li>\n<li><strong><a href=\"https://github.com/r7kamura/cycle-fetcher-driver\">Fetcher</a></strong>: A Cycle.js Driver for making HTTP requests using stackable-fetcher.</li>\n<li><strong><a href=\"https://github.com/dralletje/cycle-firebase\">Firebase</a></strong>: Thin layer around the firebase javascript API that allows you to query and declaratively update your favorite real-time database.</li>\n<li><strong><a href=\"https://github.com/cyclejs/http\">HTTP</a></strong>: A Cycle.js Driver for making HTTP requests, based on superagent.</li>\n<li><strong><a href=\"https://github.com/CyclicMaterials/cycle-hammer-driver\">Hammer.js</a></strong>: The driver incorporates the Hammer.js gesture library.</li>\n<li><strong><a href=\"https://github.com/cyclejs/history\">History</a></strong>: Cycle.js URL Driver based on the rackt/history library.</li>\n<li><strong><a href=\"https://github.com/raquelxmoss/cycle-keys\">Keys</a></strong>: A Cycle.js driver for keyboard events.</li>\n<li><strong><a href=\"https://github.com/whitecolor/cycle-mongoose/\">Mongoose.js</a></strong>: A driver for using Mongoose with Cycle JS. Accepts both, write and read operations.</li>\n<li><strong><a href=\"https://github.com/cyclejs/cycle-notification-driver\">Notification</a></strong>: A Cycle.js Driver for showing and responding to HTML5 Notifications.</li>\n<li><strong><a href=\"https://github.com/TylorS/cycle-router\">Router</a></strong>: A router built from the ground up with Cycle.js in mind. Stands on the shoulders of battle-tested libraries switch-path for route matching and rackt/history for dealing with the History API.</li>\n<li><strong><a href=\"https://github.com/axefrog/cycle-router5\">Router5</a></strong>: A source/sink router driver for Cycle.js, based on router5.</li>\n<li><strong><a href=\"https://github.com/jessaustin/cycle-sse-driver\">Server-Sent Events</a></strong>: Cycle.js driver for Server-Sent Events (SSE), a browser feature also known as EventSource. Server-Sent Events allow the server to continuously update the page with new events, without resorting to hacks like long-polling.</li>\n<li><strong><a href=\"https://github.com/TylorS/cycle-snabbdom\">Snabbdom</a></strong>: Alternative DOM driver utilizing the snabbdom library.</li>\n<li><strong><a href=\"https://github.com/cgeorg/cycle-socket.io\">Socket.IO</a></strong>: A Cycle driver for applications using Socket.IO</li>\n<li><strong><a href=\"https://github.com/cyclejs/storage\">Storage</a></strong>: A Cycle.js Driver for using localStorage and sessionStorage in the browser.</li>\n</ul>\n</li>\n<li>\n<p><strong>Example Projects</strong>: Example applications built with Cycle.js</p>\n<ul>\n<li><strong><a href=\"https://github.com/cyclejs/examples\">Cycle.js Examples</a></strong>: Browse and learn from examples of small Cycle.js apps using Core, DOM Driver, HTML Driver, HTTP Driver, JSONP Driver, and others.</li>\n<li><strong><a href=\"https://github.com/staltz/rxmarbles\">RX Marbles</a></strong>: Interactive diagrams of Rx Observables.</li>\n<li><strong><a href=\"https://github.com/cgeorg/todomvp\">TODO: Minimum Viable Pizza</a></strong>: Minimum Viable Pizza implemented with Cycle.js</li>\n<li><strong><a href=\"https://github.com/Widdershin/tricycle\">Tricycle</a></strong>: A scratchpad for trying out Cycle.js.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=6_ETUyh0tns\">Intro to Functional Reactive Programming with Cycle.js</a></strong>: Nick Johnstone gives an introduction to developing with Cycle.js in this video presentation.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=31URmaeNHSs\">Learning How to Ride: an Introduction to Cycle.js</a></strong>: In this talk, Fernando Macias Pereznieto introduces us to the good, the bad, and the beautiful of using Cycle.js, whether you are a complete beginner or an experienced JS ninja.</li>\n<li>\n<p><strong><a href=\"https://github.com/motorcyclejs/core\">Motorcycle.js</a></strong>: This is a sister project that will continue to evolve and grow alongside Cycle.js for the foreseeable future. The primary focus of this project is to tune it for performance as much as possible.</p>\n<ul>\n<li><strong><a href=\"https://github.com/cujojs/most\">Most</a></strong>: Monadic reactive streams with high performance.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://medium.com/@fkrautwald/plug-and-play-all-your-observable-streams-with-cycle-js-e543fc287872\">Plug and Play All Your Observable Streams With Cycle.js</a></strong>: Frederik Krautwald explains the principles behind Cycle.js, it's inner workings and how to use it to create a simple program with drivers.</li>\n<li><strong><a href=\"https://github.com/Widdershin/tricycle\">Tricycle</a></strong>: A scratchpad for trying out Cycle.js.</li>\n<li><strong><a href=\"http://thenewstack.io/developers-need-know-mvi-model-view-intent/\">What Developers Need to Know about MVI (Model-View-Intent)</a></strong>: The article explains the general MVI pattern and how it relates to React, Reactive Programming and Cycle.js</li>\n</ul>\n</li>\n<li><strong><a href=\"http://dojotoolkit.org/\">Dojo Toolkit</a></strong>: A JavaScript toolkit that saves you time and scales with your development process. Provides everything you need to build a Web app. Language utilities, UI components, and more, all in one place, designed to work together perfectly.</li>\n<li>\n<p><strong><a href=\"http://emberjs.com/\">Ember</a></strong>: Ember.js is an open-source JavaScript web framework, based on the MVC pattern. It allows developers to create scalable single-page web applications.</p>\n<ul>\n<li><strong><a href=\"https://guides.emberjs.com/v2.6.0/object-model/bindings/\">Bindings in Ember</a></strong>: Unlike most other frameworks that include some sort of binding implementation, bindings in Ember.js can be used with any object.</li>\n<li><strong><a href=\"https://github.com/tildeio/router.js\">Router.js (Ember)</a></strong>: Router.js is the routing microlib used by Ember.js.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://foundation.zurb.com/\">Foundation</a></strong>: Foundation provides a responsive grid and HTML and CSS UI components, templates, and code snippets, including typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions.</li>\n<li>\n<p><strong><a href=\"http://gulpjs.com/\">Gulp</a></strong>: Gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow. It's very fast, platform-agnostic and simple.</p>\n<ul>\n<li>\n<p><strong>Articles &#x26; Tutorials</strong>: Publications about gulp or step by step guides for setting up and using gulp in a project.</p>\n<ul>\n<li>\n<p><strong>Building with Gulp 3 and 4 (Series)</strong>: Great series of articles about single components and gulp as a whole.</p>\n<ul>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/04/23/building-with-gulp-3-and-4-part-1-examples/\">Part 1: Examples</a></strong>: Introduction to gulp and gulpfile.js.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/04/23/building-with-gulp-3-and-4-part-2-gulp-anatomy/\">Part 2: Gulp's anatomy</a></strong>: Orchestrator, Undertaker, Vinyl and Vinyl FS, Gulp Plugins.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/04/28/building-with-gulp-3-and-4-part-3-writing-transformers/\">Part 3: Writing transformers</a></strong>: Using map-stream, though2 and event-stream.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/05/01/building-with-gulp-4-part-4-incremental-builds/\">Part 4: Incremental builds</a></strong>: Building files which changed since last run and caching.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/05/05/building-with-gulp-part-5-caveats/\">Part 5: Caveats</a></strong>: Error management in Gulp 3 and \"MANY:1 disguised as a 1:1\" problem.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://medium.com/@contrahacks/gulp-3828e8126466\">The vision, history, and future of the project (Apr. 2014)</a></strong>: The article talks about Streams, Vinyl, Vinyl Adapters, Orchestrator and Error Management in Gulp 4.</li>\n<li><strong><a href=\"http://scm.io/blog/hack/2014/07/why-gulp-might-not-be-the-answer/\">Why Gulp might not be the Answer</a></strong>: ... there is still a conceptual problem that Gulp has yet to address. Many build steps are not 1:1 (one file in, one file out) but rather n:1 or 1:n.</li>\n</ul>\n</li>\n<li>\n<p><strong>CSS</strong>: Gulp plugins for working with CSS files.</p>\n<ul>\n<li><strong><a href=\"https://github.com/scniro/gulp-clean-css\">gulp-clean-css</a></strong>: gulp plugin to minify CSS, using clean-css.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-cssnano\">gulp-cssnano</a></strong>: Minify CSS with cssnano.</li>\n</ul>\n</li>\n<li>\n<p><strong>Concatenation</strong>: Plugins for file concatenation. For example bundling CSS or JavaScript files.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-concat\">gulp-concat</a></strong>: This plugin will concat files by your operating systems newLine. It will take the base directory from the first file that passes through it.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-group-concat\">gulp-group-concat</a></strong>: Concats groups of files into a smaller number of files</li>\n</ul>\n</li>\n<li>\n<p><strong>Deployment</strong>: Plugins for pushing built files into production.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-tar\">gulp-tar</a></strong>: Create tarball from files.</li>\n<li><strong><a href=\"https://github.com/morris/vinyl-ftp\">vinyl-ftp</a></strong>: Blazing fast vinyl adapter for FTP.</li>\n<li><strong><a href=\"https://github.com/izaakschroeder/vinyl-s3\">vinyl-s3</a></strong>: Use S3 as a source or destination of vinyl files.</li>\n</ul>\n</li>\n<li>\n<p><strong>Ecosystem</strong>: The network of developers and plugins around gulp.</p>\n<ul>\n<li><strong><a href=\"https://github.com/search?q=%40sindresorhus+gulp-\">@sindresorhus plugins</a></strong>: A collection of plugins by Sindre Sorhus.</li>\n<li><strong><a href=\"https://www.npmjs.com/browse/keyword/gulpfriendly\">Gulp Friendly NPM Packages</a></strong>: Normal node packages that work with gulp.</li>\n</ul>\n</li>\n<li>\n<p><strong>Filters</strong>: Plugins for filtering files in a vinyl stream.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-cache\">gulp-cache</a></strong>: A temp file based caching proxy task for gulp.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-cached\">gulp-cached</a></strong>: A simple in-memory file cache for gulp.</li>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-changed\">gulp-changed</a></strong>: Only pass through changed files.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-filter\">gulp-filter</a></strong>: Filter files in a vinyl stream.</li>\n<li><strong><a href=\"https://github.com/tschaub/gulp-newer\">gulp-newer</a></strong>: Pass through newer source files only.</li>\n<li><strong><a href=\"https://github.com/ahaurw01/gulp-remember\">gulp-remember</a></strong>: A plugin for gulp that remembers and recalls files passed through it.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-diff\">vinyl-diff</a></strong>: This library allows you to perform diffs between streams of vinyl.</li>\n</ul>\n</li>\n<li>\n<p><strong>Images</strong>: Plugins for working with images.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-imagemin\">gulp-imagemin</a></strong>: Minify PNG, JPEG, GIF and SVG images.</li>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-webp\">gulp-webp</a></strong>: Convert PNG, JPEG, TIFF images to WebP.</li>\n</ul>\n</li>\n<li>\n<p><strong>JavaScript</strong>: Module loaders, minifiers and other tools for working with JavaScript files.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-pure-cjs\">gulp-pure-cjs</a></strong>: Gulp plugin for Pure CommonJS builder.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-uglify\">gulp-uglify</a></strong>: Minify files with UglifyJS.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/yoloader\">yoloader</a></strong>: A CommonJS module loader implementation. It provides tools to bundle a CommonJS based project and to load such bundles.</li>\n</ul>\n</li>\n<li>\n<p><strong>SourceMaps</strong>: A source map provides a way of mapping code within a compressed file back to it's original position in a source file.</p>\n<ul>\n<li><strong><a href=\"https://github.com/floridoo/gulp-sourcemaps/wiki/Plugins-with-gulp-sourcemaps-support\">Plugins with gulp sourcemaps support</a></strong>: A list of plugins which support gulp-sourcemaps.</li>\n<li><strong><a href=\"https://github.com/floridoo/gulp-sourcemaps\">gulp-sourcemaps</a></strong>: Source map support for Gulp.js</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-sourcemaps-apply\">vinyl-sourcemaps-apply</a></strong>: Apply a source map to a vinyl file, merging it with preexisting source maps.</li>\n</ul>\n</li>\n<li>\n<p><strong>Utility</strong>: Tools and parts for building gulp plugins.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-count\">gulp-count</a></strong>: Count files in a vinyl stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-debug\">gulp-debug</a></strong>: Debug vinyl file streams to see what files are run through your gulp pipeline.</li>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-size\">gulp-size</a></strong>: Logs out the total size of files in the stream and optionally the individual file-sizes.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/lazypipe\">lazypipe</a></strong>: Lazypipe allows you to create an immutable, lazily-initialized pipeline. It's designed to be used in an environment where you want to reuse partial pipelines, such as with gulp.</li>\n<li><strong><a href=\"https://github.com/dominictarr/map-stream\">map-stream</a></strong>: Create a through stream from an asyncronous function.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://github.com/gulpjs/vinyl\">Vinyl</a></strong>: Vinyl is a very simple metadata object that describes a file.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-chmod\">gulp-chmod</a></strong>: Change permissions of Vinyl files.</li>\n<li><strong><a href=\"https://github.com/hparra/gulp-rename\">gulp-rename</a></strong>: A plugin to rename files easily.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/mem-fs\">mem-fs</a></strong>: Simple in-memory vinyl file store.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-ast\">vinyl-ast</a></strong>: Parse-once and generate-once AST tool bridge for Gulp plugins.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-buffer\">vinyl-buffer</a></strong>: Creates a transform stream that takes vinyl files as input, and outputs buffered (isStream() === false) vinyl files as output.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-file\">vinyl-file</a></strong>: Create a vinyl file from an actual file.</li>\n<li><strong><a href=\"https://github.com/wearefractal/vinyl-fs\">vinyl-fs</a></strong>: Vinyl adapter for the file system.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-fs-fake\">vinyl-fs-fake</a></strong>: A vinyl adapter that extends vinyl-fs to allow for easy debugging by passing in virtual files instead of globs, and calling a function instead of writing.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-git\">vinyl-git</a></strong>: Vinyl adapter for git.</li>\n<li><strong><a href=\"https://github.com/hughsk/vinyl-map\">vinyl-map</a></strong>: Map vinyl files' contents as strings, so you can easily use existing code without needing yet another gulp plugin!</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-paths\">vinyl-paths</a></strong>: Get the file paths in a vinyl stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-source-buffer\">vinyl-source-buffer</a></strong>: Convert a text stream into a vinyl pipeline whose content is a buffer.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-source-stream\">vinyl-source-stream</a></strong>: Use conventional text streams at the start of your gulp or vinyl pipelines, making for nicer interoperability with the existing npm stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-to-stream\">vinyl-to-stream</a></strong>: Convert a vinyl stream to a text stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-transform\">vinyl-transform</a></strong>: Wraps standard text transform streams so you can write fewer gulp plugins. Fulfills a similar use case to vinyl-map and vinyl-source-stream.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"https://www.meteor.com/\">Meteor</a></strong>: Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages.</li>\n<li>\n<p><strong><a href=\"http://facebook.github.io/react/\">React</a></strong>: React is a JavaScript library for creating user interfaces. Many people choose to think of React as the V in MVC. We built React to solve one problem: building large applications with data that changes over time.</p>\n<ul>\n<li><strong><a href=\"https://www.sitepoint.com/react-alternatives-preact-virtualdom-deku/\">3 Lightweight React Alternatives</a></strong>: Dan Prince explores Preact, VirtualDom &#x26; Deku.</li>\n<li><strong><a href=\"http://jamesknelson.com/state-react-1-stateless-react-app/\">A Stateless React App?</a></strong>: James K Nelson describes how to avoid state in React Components.</li>\n<li><strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack.</li>\n<li><strong><a href=\"https://medium.com/@kadmil/css-modules-to-the-rescue-jsx-ded2db874d34\">CSS Modules To The Rescue.jsx</a></strong>: If you use react-like templates/components, use webpack CSS loader to enable CSS Modules and forget about global CSS problems.</li>\n<li><strong><a href=\"http://andrewhfarmer.com/starter-project/\">Find Your Perfect React Starter Project</a></strong>: A simple search engine for React boilerplates with the ability to pick the ingredients.</li>\n<li><strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development.</li>\n<li><strong><a href=\"https://medium.com/@floydophone/functional-dom-programming-67d81637d43\">Functional DOM Programming</a></strong>: One of the earliest intros to React and its purpose by Pete Hunt.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=1uRC3hmKQnM\">Functional Principles In React</a></strong>: Jessica Kerr talks about four functional principles: Composition, Declarative Style, Isolation and Flow Of Data, and their usage in React.</li>\n<li><strong><a href=\"https://semaphoreci.com/community/tutorials/getting-started-with-tdd-in-react\">Getting Started with TDD in React</a></strong>: Learn how to test React components using a TDD approach with minimal setup, while learning exactly what to test and how to avoid common pitfalls.</li>\n<li><strong><a href=\"https://daveceddia.com/to-react-from-angular/\">Getting to Grips with React (as an Angular developer)</a></strong>: In a series of posts Dave Ceddia tries to help you apply your hard-won knowledge of “Angularisms” to React.</li>\n<li><strong><a href=\"https://medium.com/react-ecosystem/how-to-handle-state-in-react-6f2d3cd73a0c\">How to Handle State in React. The Missing FAQ</a></strong>: Osmel Mora challenges the common misconception that you always need a Flux-like architecture in your React apps.</li>\n<li><strong><a href=\"https://medium.com/@delveeng/how-we-use-the-flux-architecture-in-delve-effc551f8fbc\">How we use the Flux architecture in Delve</a></strong>: Øystein Hallaråker describes how Delve utilizes the Flux application architecture.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=I7IdS-PbEgI\">Immutable Data and React</a></strong>: Lee Byron talks about how persistent immutable data structures work, and techniques for using them in a React applications with Immutable.js.</li>\n<li><strong><a href=\"https://github.com/alexmingoia/jsx-transform\">JSX Transform</a></strong>: JSX transpiler. A standard and configurable implementation of JSX decoupled from React.</li>\n<li><strong><a href=\"https://github.com/facebook/jest\">Jest</a></strong>: A JavaScript unit testing framework, used by Facebook to test services and React applications.</li>\n<li><strong><a href=\"https://satishchilukuri.com/blog/entry/model-view-intent-with-react-and-rxjs\">Model-View-Intent with React and RxJS</a></strong>: Satish Chilukuri shows an example implementation of MVI pattern with React.</li>\n<li><strong><a href=\"https://github.com/team-gryff/react-monocle\">Monocle</a></strong>: A developer tool for generating visual representations of your React app's component hierarchy.</li>\n<li><strong><a href=\"http://staltz.com/nothing-new-in-react-and-flux-except-one-thing.html\">Nothing New in React and Flux Except One Thing</a></strong>: Andre Staltz talks about aspects of React and Flux which make them innovative and compelling.</li>\n<li><strong><a href=\"http://rauchg.com/2015/pure-ui/\">Pure UI</a></strong>: Guillermo Rauch discusses the definition of an application's UI as a pure function of application state.</li>\n<li><strong><a href=\"https://github.com/reactjs/react-basic\">React - Basic Theoretical Concepts</a></strong>: Sebastian Markbage attempts to formally explain his mental model of React. The intention is to describe this in terms of deductive reasoning that lead us to this design.</li>\n<li><strong><a href=\"https://github.com/kriasoft/react-app\">React App</a></strong>: React App is a small library powered by React, Universal Router and History that handles routing, navigation and rendering logic in isomorphic (universal) and single-page applications.</li>\n<li><strong><a href=\"https://medium.com/@dan_abramov/react-components-elements-and-instances-90800811f8ca#.9208ahtfb\">React Components, Elements, and Instances</a></strong>: Dan Abramov explains the Virtual DOM dictionary in React.</li>\n<li><strong><a href=\"http://blog.reverberate.org/2014/02/react-demystified.html\">React Demystified</a></strong>: This article is an attempt to explain the core ideas behind React.js and Virtual DOM.</li>\n<li><strong><a href=\"https://github.com/necolas/react-native-web\">React Native for Web</a></strong>: This project allows components built upon React Native to be run on the Web, and it manages all component styling out-of-the-box.</li>\n<li><strong><a href=\"https://www.reactstarterkit.com/\">React Starter Kit</a></strong>: Isomorphic web app boilerplate including Node.js, Express, GraphQL, React.js, Babel 6, PostCSS, Webpack, Browsersync.</li>\n<li><strong><a href=\"https://github.com/kadirahq/react-storybook\">React Storybook</a></strong>: Isolate your React UI Component development from the main app.</li>\n<li><strong><a href=\"https://github.com/jesstelford/react-workshop\">React Workshop</a></strong>: This is a self-directed workshop. Follow along to the steps at your own pace, and feel free to ask your instructors questions as you go.</li>\n<li><strong><a href=\"https://github.com/krasimir/react-in-patterns\">React in Patterns</a></strong>: List of design patterns/techniques used while developing with React.</li>\n<li><strong><a href=\"https://auth0.com/blog/2015/11/20/face-off-virtual-dom-vs-incremental-dom-vs-glimmer/\">React vs Incremental DOM vs Glimmer</a></strong>: In this post we will explore three technologies to build dynamic DOMs. We will also run benchmarks and find out which one is faster.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">React: Rethinking best practices (2013)</a></strong>: A video introduction to React by Pete Hunt.</li>\n<li><strong><a href=\"https://github.com/RamonGebben/react-perf-tool\">ReactPerfTool</a></strong>: ReactPerfTool tries to give you a more visual way of debugging performance of your React application. It does this by using the addons delivered by the React team and community to get measurements and visualize this using graphs.</li>\n<li><strong><a href=\"http://jlongster.com/Removing-User-Interface-Complexity,-or-Why-React-is-Awesome\">Removing User Interface Complexity, or Why React is Awesome</a></strong>: In this post James Long tries not to evangelize React specifically, but to explain why its technique is profound.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">Rethinking Best Practices</a></strong>: Pete Hunt talks about React's design decisions challenging established best practices.</li>\n<li><strong><a href=\"https://github.com/LiquidLabsGmbH/retractor\">Retractor</a></strong>: Retractor exposes the internals of a React application for end-to-end testing purposes. This allows you to select DOM nodes based on the name of the React Component that rendered the node as well as its state or properties.</li>\n<li><strong><a href=\"http://staltz.com/some-problems-with-react-redux.html\">Some Problems with React/Redux</a></strong>: André Staltz goes through the pros and cons of React + Redux.</li>\n<li><strong><a href=\"http://developer.telerik.com/featured/taming-react-setup/\">Taming the React Setup</a></strong>: Cody Lindley lays out seven React setups in this article and explains the relation of React to BYOA (Bring Your Own Architecture) approach.</li>\n<li><strong><a href=\"http://silvenon.com/testing-react-and-redux/\">Testing a React &#x26; Redux Codebase</a></strong>: This series aims to be a very comprehensive guide through testing a React and Redux codebase, where you can really cover a lot with just unit tests because the code is mostly universal.</li>\n<li><strong><a href=\"http://krasimirtsonev.com/blog/article/The-bare-minimum-to-work-with-React\">The Bare Minimum to Work with React</a></strong>: Krasimir Tsonev describes how to start working with React after installing only 7 dependencies and learning only three commands.</li>\n<li><strong><a href=\"https://medium.com/@denisraslov/the-redux-ecosystem-539c630ec521\">The Redux Ecosystem</a></strong>: Let's take a look at most of the features that you'll have to deal with when the time comes, — and where React &#x26; Redux themselves can't help you.</li>\n<li><strong><a href=\"http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/\">The SoundCloud Client in React + Redux</a></strong>: After finishing this step by step tutorial you will be able to author your own React + Redux project with Webpack and Babel.</li>\n<li><strong><a href=\"https://www.fullstackreact.com/articles/react-tutorial-cloning-yelp/\">Tutorial: Cloning Yelp</a></strong>: This post will guide you through building a full React app, even with little to no experience in the framework. We are going to build a Yelp clone in React.</li>\n<li><strong><a href=\"https://medium.com/@firasd/interface-from-data-using-react-to-sync-updates-and-offline-activity-across-devices-f672b213701c\">Using React to Sync Updates and Offline Activity</a></strong>: Firas Durri describes how React based architectures make syncing state across devices much easier.</li>\n<li><strong><a href=\"http://thenewstack.io/developers-need-know-mvi-model-view-intent/\">What Developers Need to Know about MVI (Model-View-Intent)</a></strong>: The article explains the general MVI pattern and how it relates to React, Reactive Programming and Cycle.js</li>\n<li><strong><a href=\"https://github.com/garbles/why-did-you-update\">Why Did You Update?</a></strong>: A function that monkey patches React and notifies you in the console when potentially unnecessary re-renders occur.</li>\n<li><strong><a href=\"http://facebook.github.io/react/blog/2013/06/05/why-react.html\">Why did we build React?</a></strong>: Pete Hunt tries to explain why Facebook devs built React in the first place.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://yeoman.io/\">Yeoman</a></strong>: Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive. It provides a generator ecosystem.</li>\n<li>\n<p><strong><a href=\"https://jquery.com/\">jQuery</a></strong>: jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler.</p>\n<ul>\n<li>\n<p><strong>Alternatives</strong>: Other libraries which intend to replace jQuery in one way or another.</p>\n<ul>\n<li><strong><a href=\"https://github.com/kenwheeler/cash\">Cash</a></strong>: Cash is a small library for modern browsers that provides jQuery style syntax for manipulating the DOM.</li>\n<li><strong><a href=\"https://github.com/kylebarrow/chibi\">Chibi</a></strong>: Chibi focuses on just the essentials, melted down and mixed with optimisation rainbows to create a really light micro-library that allows you to do awesome things.</li>\n<li><strong><a href=\"https://github.com/mattdesl/dom-css\">DOM CSS</a></strong>: Small module for fast and reliable DOM styling.</li>\n<li><strong><a href=\"http://minifiedjs.com/\">Minified.js</a></strong>: Minified.js is a client-side JavaScript library that's both powerful and small. It offers jQuery-like features and utility functions with a single, consistent API.</li>\n<li><strong><a href=\"https://plainjs.com/javascript/\">Plain.js</a></strong>: Vanilla JS utilities for writing powerful web applications without jQuery.</li>\n<li><strong><a href=\"http://zeptojs.com/\">Zepto.js</a></strong>: Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API.</li>\n</ul>\n</li>\n<li>\n<p><strong>Authoring jQuery Plugins</strong>: jQuery is an utility library and a plugin framework. This section collects resources about creating such plugins.</p>\n<ul>\n<li><strong><a href=\"http://learn.jquery.com/plugins/advanced-plugin-concepts/\">Advanced Plugin Concepts</a></strong>: A collection of best practices for jQuery plugin authoring.</li>\n<li><strong><a href=\"http://learn.jquery.com/plugins/basic-plugin-creation/\">How to Create a Basic Plugin</a></strong>: The article describes basic plugin creation and provides a simple boilerplate.</li>\n<li><strong><a href=\"https://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin\">Signs of a poorly written jQuery plugin</a></strong>: Collection of jQuery plugin antipatterns.</li>\n<li><strong><a href=\"https://websanova.com/blog/jquery/the-ultimate-guide-to-writing-jquery-plugins\">The Ultimate Guide to Writing jQuery Plugins</a></strong>: A comprehensive guide on how to develop jQuery plugins including a simple boilerplate.</li>\n<li><strong><a href=\"http://learn.jquery.com/plugins/stateful-plugins-with-widget-factory/\">Writing Stateful Plugins with the jQuery UI Widget Factory</a></strong>: The article demonstrates the capabilities of the Widget Factory by building a simple progress bar plugin.</li>\n<li><strong><a href=\"https://github.com/jquery-boilerplate/jquery-boilerplate\">jQuery Boilerplate</a></strong>: This project won't seek to provide a perfect solution to every possible pattern, but will attempt to cover a simple template for beginners and above.</li>\n<li><strong><a href=\"https://github.com/jquery-boilerplate/jquery-patterns\">jQuery Plugin Patterns</a></strong>: This project won't seek to provide implementations for every possible pattern, but will attempt to cover popular patterns developers often use in the wild.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/yuanyan/pragmatic-jquery\">Pragmatic jQuery Style</a></strong>: Coding guidelines for working with jQuery.</li>\n<li><strong><a href=\"http://jqfundamentals.com/\">jQuery Fundamentals</a></strong>: A guide to the basics of jQuery including a built-in editor for examples.</li>\n<li>\n<p><strong><a href=\"http://jqueryui.com/\">jQuery UI</a></strong>: jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.</p>\n<ul>\n<li><strong><a href=\"http://learn.jquery.com/jquery-ui/\">Learning jQuery UI</a></strong>: Series of articles about jQuery UI on learn.jquery.com.</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong>News</strong>: Websites &#x26; newsletters which provide daily and weekly news related to frontend web development. + <strong><a href=\"http://adripofjavascript.com/\">A Drip of JavaScript</a></strong>: One quick JavaScript tip, delivered to your inbox every other week. + <strong><a href=\"http://css-weekly.com/\">CSS Weekly</a></strong>: Weekly E-Mail roundup of CSS articles, tutorials, experiments and tools\ncurated by Zoran Jambor. + <strong><a href=\"https://deterministic.curated.co/\">Deterministic</a></strong>: A weekly digest of interesting news and articles covering functional programming for the web, especially on the front end. + <strong><a href=\"http://frontenddevweekly.com/\">Frontend Dev Weekly</a></strong>: Front-end developer news, tools and inspiration hand-picked each week. + <strong><a href=\"http://html5bookmarks.com/\">HTML5 Bookmarks</a></strong>: Daily bookmarks of HTML5 related resources. + <strong><a href=\"http://html5weekly.com/\">HTML5 Weekly</a></strong>: A once-weekly HTML5 and Web Platform technology roundup. CSS 3, Canvas, WebSockets, WebGL, Native Client, and more. + <strong><a href=\"http://javascriptweekly.com/\">JavaScript Weekly</a></strong>: A free, once-weekly e-mail round-up of JavaScript news and articles. + <strong><a href=\"http://www.ng-newsletter.com/\">Ng-Newsletter</a></strong>: The free, weekly newsletter of the best AngularJS content on the web. + <strong><a href=\"http://responsivedesignweekly.com/\">Responsive Design Newsletter</a></strong>: A free, once-weekly round-up of responsive design articles, tools, tips, tutorials and inspirational links. + <strong><a href=\"https://wdrl.info/\">WDRL</a></strong>: A handcrafted, carefully selected list of web development related resources. Curated and published usually every week. + <strong><a href=\"https://web-design-weekly.com/\">Web Design Weekly</a></strong>: A once a week email with no spam, no rambling. Just pure awesome links to the best news and articles to hit the interweb during the week. + <strong><a href=\"http://webplatformdaily.org/\">Web Platform Daily</a></strong>: Daily digest of web development news. + <strong><a href=\"http://webtoolsweekly.com/\">Web Tools Weekly</a></strong>: Web Tools Weekly is a front-end development and web design newsletter with a focus on tools. + <strong><a href=\"http://www.echojs.com/\">echo.js</a></strong>: Echo JS is a community-driven news site entirely focused on JavaScript development, HTML5, and front-end news.</li>\n<li>\n<p><strong>Notable Community Members</strong>: Important engineers, evangelists, architects and other celebrities.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://addyosmani.com/\">Addy Osmani</a></strong>: Engineer at Google working on open web tooling.</p>\n<ul>\n<li><strong><a href=\"https://addyosmani.com/resources/essentialjsdesignpatterns/book/\">Learning JavaScript Design Patterns</a></strong>: In this free book Addy Osmani explores applying both classical and modern design patterns to the JavaScript programming language.</li>\n<li><strong><a href=\"https://addyosmani.com/largescalejavascript/\">Patterns For Large-Scale JavaScript Application Architecture</a></strong>: An extensive overview by Addy Osmani of existing architectural solutions in the frontend development field.</li>\n<li><strong><a href=\"https://addyosmani.com/writing-modular-js/\">Writing Modular JavaScript With AMD, CommonJS &#x26; ES Harmony</a></strong>: In this article Addy Osmani reviewes several of the options available for writing modular JavaScript using modern module formats AMD, CommonJS and ES6 Modules.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://alexsexton.com/\">Alex Sexton</a></strong>: Alex Sexton is an engineer at Stripe. He is on the Modernizr core team, the jQuery Board of Directors, as well as the Dojo Foundation Board.</p>\n<ul>\n<li><strong><a href=\"https://modernizr.com/\">Modernizr</a></strong>: It's a collection of superfast tests - or “detects” as we like to call them - which run as your web page loads, then you can use the results to tailor the experience to the user.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://staltz.com/\">André Staltz</a></strong>: Founder of the cycle.js framework and important contributor to ReactiveX.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=uNZnftSksYg\">Cycle.js and Functional Reactive User Interfaces</a></strong>: In this talk we will discover how Cycle.js is purely reactive and functional, and why it's an interesting alternative to React.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=v68ppDlvHqs\">Dynamics of Change: why Reactivity Matters</a></strong>: In this talk we will see when passive or reactive strategy is advantageous, and how the reactive strategy is a sensible default.</li>\n<li><strong><a href=\"http://cycle.js.org/model-view-intent.html\">MVI in Cycle.js Docs</a></strong>: André Staltz describes how to refactor an application into MVI pattern.</li>\n<li><strong><a href=\"http://staltz.com/nothing-new-in-react-and-flux-except-one-thing.html\">Nothing New in React and Flux Except One Thing</a></strong>: Andre Staltz talks about aspects of React and Flux which make them innovative and compelling.</li>\n<li><strong><a href=\"http://rxmarbles.com/\">RxMarbles</a></strong>: A webapp for experimenting with diagrams of Rx Observables, for learning purposes.</li>\n<li><strong><a href=\"http://staltz.com/some-problems-with-react-redux.html\">Some Problems with React/Redux</a></strong>: André Staltz goes through the pros and cons of React + Redux.</li>\n<li><strong><a href=\"https://gist.github.com/staltz/868e7e9bc2a7b8c1f754\">The Introduction to Reactive Programming</a></strong>: André Staltz provides a complete introduction to the Reactive Programming and RxJS.</li>\n<li><strong><a href=\"https://vimeo.com/168652278\">Unidirectional Data Flow Architectures (Talk)</a></strong>: Andre Staltz compares modern architecture patterns including Flux, Redux, Model-View-Intent, Elm Arch and BEST.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=1zj7M1LnJV4\">What if the User was a Function?</a></strong>: In this video André Staltz talks about the input/output cycle between humans and computers and how to take advantage of this model by using FRP and event streams.</li>\n<li><strong><a href=\"http://staltz.com/why-we-built-xstream.html\">Why We Built Xstream</a></strong>: The authors needed a stream library tailored for Cycle.js. It needs to be “hot” only, small in kB size and it should have only a few and intuitive operators.</li>\n<li>\n<p><strong><a href=\"https://github.com/staltz/xstream\">Xstream</a></strong>: An extremely intuitive, small, and fast functional reactive stream library for JavaScript.</p>\n<ul>\n<li><strong><a href=\"http://staltz.com/why-we-built-xstream.html\">Why We Built Xstream</a></strong>: The authors needed a stream library tailored for Cycle.js. It needs to be “hot” only, small in kB size and it should have only a few and intuitive operators.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://bradfrost.com/\">Brad Frost</a></strong>: Web designer, speaker, writer, consultant, musician, and artist in beautiful Pittsburgh.</p>\n<ul>\n<li>\n<p><strong><a href=\"http://atomicdesign.bradfrost.com/table-of-contents/\">Atomic Design</a></strong>: Atomic Design discusses the importance of crafting robust design systems, and introduces a methodology for which to create smart, deliberate interface systems.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/@AshConnolly/a-more-seamless-workflow-style-guides-for-better-design-and-development-639fc55be28c\">A More Seamless Workflow — Style Guides for Better Design and Development</a></strong>: Ash Connolly explains what styles guides are and which benefits they bring to designers and developers.</li>\n<li><strong><a href=\"http://atomicdocs.io/\">Atomic Docs</a></strong>: Atomic Docs is a styleguide generator and component manager. Atomic Docs is built in PHP. Inspired by Brad Frost's Atomic Design principles.</li>\n<li><strong><a href=\"http://steelydylan.github.io/atomic-lab/\">Atomic Lab</a></strong>: Template sharing and coding environment based on atomic design.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://bradfrost.com/blog/web/responsive-nav-patterns/\">Responsive Navigation Patterns</a></strong>: The article describes some of the more popular techniques for handling navigation in responsive designs.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://github.com/DrBoolean\">Brian Lonsdorf</a></strong>: Lead UXE Engineer at Salesforce, JavaScript developer and speaker known for his work in functional programming community.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=JZSoPZUoR58\">A Million Ways to Fold in JS</a></strong>: Brian Lonsdorf provides many functional alternatives to loops in this video.</li>\n<li><strong><a href=\"https://medium.com/@drboolean/debugging-functional-7deb4688a08c\">Debugging Functional</a></strong>: This post will demonstrate a simple solution that can go a long way to enhance the debugging experience in functional JavaScript applications.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=WH5BrkzGgQY&#x26;list=PLK_hdtAJ4KqUWp5LJdLOgkD_8qKW0iAHi&#x26;index=1\">Free Monads Video Series</a></strong>: A video series on free monads by Brian Lonsdorf explaining Coyoneda, Free Monad and Interpretors.</li>\n<li><strong><a href=\"https://github.com/DrBoolean/freeky\">Freeky</a></strong>: Collection of free monads by Brian Lonsdorf.</li>\n<li><strong><a href=\"http://functionaltalks.org/2013/05/27/brian-lonsdorf-hey-underscore-youre-doing-it-wrong/\">Hey Underscore, You're Doing It Wrong!</a></strong>: In this talk Brian Lonsdorf gently takes a shot at underscore.js for not thinking about currying and partial function application in its library design.</li>\n<li><strong><a href=\"https://javascriptair.com/episodes/2015-12-30/\">JSAir - Functional and Immutable Design Patterns in JavaScript</a></strong>: An episode of JavaScript Air about \"the how and why of functional programming and immutable design patterns in JavaScript\" with Dab Abramov and Brian Lonsdorf as guests.</li>\n<li><strong><a href=\"https://vimeo.com/104807358\">Lenses Quick n' Dirty</a></strong>: A video by Brian Lonsdorf that introduces lenses.</li>\n<li><strong><a href=\"https://github.com/DrBoolean/lenses\">Lenses.js</a></strong>: Composable kmett style lenses.</li>\n<li><strong><a href=\"https://vimeo.com/105300347\">Monad a Day: Reader</a></strong>: Short video by Brian Lonsdorf about the Reader Monad.</li>\n<li><strong><a href=\"https://vimeo.com/105300347\">Monad a day 1: Reader</a></strong>: A video by Brian Lonsdorf explaining the Reader Monad.</li>\n<li><strong><a href=\"https://vimeo.com/106008027\">Monad a day 2: Future</a></strong>: Brian Lonsdorf explains the Future monad in this video.</li>\n<li><strong><a href=\"https://vimeo.com/109984691\">Monad a day 3: State</a></strong>: Brian Lonsdorf explains the State monad in this video.</li>\n<li><strong><a href=\"https://drboolean.gitbooks.io/mostly-adequate-guide/content/\">Mostly Adequate Guide to Functional Programming</a></strong>: A book by Brian Lonsdorf that introduces algebraic functional programming in JavaScript.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://twitter.com/cmaxw\">Charles Max Wood</a></strong>: Podcaster at Devchat.tv, organizer of remote confs such as Angular RC, React RC, Rails RC. Software consultant and developer.</p>\n<ul>\n<li><strong><a href=\"https://devchat.tv/adv-in-angular\">Adventures in Angular</a></strong>: Adventures in Angular is a weekly podcast dedicated to the Angular JavaScript framework and related technologies, tools, languages, and practices.</li>\n<li><strong><a href=\"https://devchat.tv/js-jabber/\">JavaScript Jabber</a></strong>: A weekly podcast about JavaScript, including Node.js, Front-End Technologies, Careers, Teams and more.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://chriscoyier.net/\">Chris Coyier</a></strong>: Designer at Codepen. Writer at CSS-Tricks. Podcaster at ShopTalk.</p>\n<ul>\n<li><strong><a href=\"https://css-tricks.com/responsive-data-tables/\">Responsive Data Tables</a></strong>: Several ideas by Chris Coyier on how to deal with responsive tables.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://www.crockford.com/\">Douglas Crockford</a></strong>: Computer programmer who is best known for his ongoing involvement in the development of the JavaScript language, for having popularized the data format JSON, and for developing JSLint and JSMin.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=dkZFtimgAcM\">Monads and Gonads</a></strong>: In this video from YUIConf 2012, Douglas Crockford attempts to break the long-standing Monad tutorial curse by explaining the concept and applications of monads in a way that is actually understandable to the audience.</li>\n<li><strong><a href=\"http://javascript.crockford.com/prototypal.html\">Prototypal Inheritance in JavaScript</a></strong>: An article by Douglas Crockford introducing the Object.create() method and describing the rational behind it.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://jlongster.com/\">James Long</a></strong>: Works on Firefox Developer Tools at Mozilla.</p>\n<ul>\n<li><strong><a href=\"http://jlongster.com/A-Study-on-Solving-Callbacks-with-JavaScript-Generators\">A Study on Solving Callbacks with JavaScript Generators</a></strong>: This article describes how Generators help fight callback hell.</li>\n<li><strong><a href=\"http://jlongster.com/Removing-User-Interface-Complexity,-or-Why-React-is-Awesome\">Removing User Interface Complexity, or Why React is Awesome</a></strong>: In this post James Long tries not to evangelize React specifically, but to explain why its technique is profound.</li>\n<li>\n<p><strong><a href=\"https://github.com/jlongster/transducers.js\">Transducers.js Library by James Long</a></strong>: A small library for generalized transformation of data (inspired by Clojure's transducers)</p>\n<ul>\n<li><strong><a href=\"http://jlongster.com/Transducers.js-Round-2-with-Benchmarks\">Transducers.js Round 2 with Benchmarks</a></strong>: Refactored version of Transducers.js, some benchmarks, Laziness, the transformer protocoll.</li>\n<li><strong><a href=\"http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data\">Transducers.js: A JavaScript Library for Transformation of Data</a></strong>: A post announcing the transducers.js library with some explanation.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://jlongster.com/Transducers.js-Round-2-with-Benchmarks\">Transducers.js Round 2 with Benchmarks</a></strong>: Refactored version of Transducers.js, some benchmarks, Laziness, the transformer protocoll.</li>\n<li><strong><a href=\"http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data\">Transducers.js: A JavaScript Library for Transformation of Data</a></strong>: A post announcing the transducers.js library with some explanation.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://snook.ca/about/\">Jonathan Snook</a></strong>: A web designer and developer who is currently UX Architect at Xero. Former lead frontend developer at Shopify.</p>\n<ul>\n<li><strong><a href=\"https://smacss.com/book/\">SMACSS</a></strong>: SMACSS (pronounced “smacks”) is a way to examine your design process and as a way to fit those rigid frameworks into a flexible thought process. It is an attempt to document a consistent approach to site development when using CSS.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://mixu.net/\">Mikito Takada (mixu)</a></strong>: Software engineer at Stripe.</p>\n<ul>\n<li><strong><a href=\"http://book.mixu.net/css/\">Learn CSS Layout the pedantic way</a></strong>: Walks you through every major concept in CSS layout, without trying to simplify away the underlying mechanisms described in the CSS 2.1 and flexbox specs.</li>\n<li><strong><a href=\"http://singlepageappbook.com/\">Single Page Apps in Depth</a></strong>: This free book is what I wanted when I started working with single page apps. It's not an API reference on a particular framework, rather, the focus is on discussing patterns, implementation choices and decent practices.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://www.nczonline.net/about/\">Nicholas C. Zakas</a></strong>: Former principal front-end engineer at Yahoo! and YUI developer. Leads a team of frontend engineers at Box now.</p>\n<ul>\n<li><strong><a href=\"https://www.youtube.com/watch?v=mKouqShWI4o\">Box Tech Talk: Scalable JavaScript Application Architecture</a></strong>: A video by Nicholas Zakas (2012) about JavaScript Architecture.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=vXjVFPosQHw\">Scalable JavaScript Application Architecture</a></strong>: In this video (2011) Nicholas Zakas discusses frontend architecture for complex, modular web applications with significant JavaScript elements.</li>\n<li><strong><a href=\"http://t3js.org/\">T3</a></strong>: T3 is a minimalist JavaScript framework sponsored by Box Inc. that provides core structure to code.</li>\n<li><strong><a href=\"https://leanpub.com/understandinges6/read\">Understanding ECMAScript 6</a></strong>: Free (as in pay what you want) E-Book by Nicholas C. Zakas describing the new features in EcmaScript 6.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://nicolasgallagher.com/\">Nicolas Gallagher</a></strong>: Frontend Engineer at Twitter.</p>\n<ul>\n<li><strong><a href=\"http://necolas.github.io/normalize.css/\">Normalize.css</a></strong>: A modern, HTML5-ready alternative to CSS resets.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://github.com/petehunt\">Pete Hunt</a></strong>: Co-founder &#x26; CEO @HelloSmyte. Ex-FB and Instagram. Worked on React.js.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/@floydophone/functional-dom-programming-67d81637d43\">Functional DOM Programming</a></strong>: One of the earliest intros to React and its purpose by Pete Hunt.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">React: Rethinking best practices (2013)</a></strong>: A video introduction to React by Pete Hunt.</li>\n<li><strong><a href=\"http://facebook.github.io/react/blog/2013/06/05/why-react.html\">Why did we build React?</a></strong>: Pete Hunt tries to explain why Facebook devs built React in the first place.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong>Organizations</strong>: Commercial companies and nonprofit organizations around web development. + <strong><a href=\"http://airbnb.io/projects/\">Airbnb</a></strong>: Airbnb is a website for people to list, find, and rent lodging. + <strong><a href=\"http://airbnb.io/projects/css/\">Airbnb CSS + Sass Style Guide</a></strong>: This style guide covers Terminology, Rule Declaration, Selectors, Properties, Formatting, Comments, OOCSS and BEM, ID Selectors, JavaScript hooks\nSass, Syntax, Ordering, Mixins, Placeholders, Nested selectors. + <strong><a href=\"http://airbnb.io/projects/javascript/\">Airbnb JavaScript Style Guide</a></strong>: A style guide for writing JavaScript code at Airbnb. + <strong><a href=\"http://airbnb.io/projects/enzyme/\">Enzyme</a></strong>: Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output. + <strong><a href=\"http://airbnb.io/polyglot.js/\">Polyglot</a></strong>: Polyglot.js is a I18n helper library written in JavaScript, made to work both in the browser and in CommonJS environments (Node). It provides a simple solution for interpolation and pluralization. + <strong><a href=\"https://medium.com/airbnb-engineering/turbocharged-javascript-refactoring-with-codemods-b0cae8b326b9\">Turbocharged JavaScript Refactoring with Codemods</a></strong>: Joe Lencioni describes how they used codemods to transform a large JavaScript code base at AirBnB + <strong><a href=\"http://opensource.box.com/\">Box Inc.</a></strong>: Box is an online file sharing and content management service for businesses based in Redwood City, California. + <strong><a href=\"https://github.com/box/leche\">Leche</a></strong>: A JavaScript testing utility designed to work with Mocha and Sinon. This is intended for use both by Node.js and in browsers, so any changes must work in both locations. + <strong><a href=\"https://www.nczonline.net/about/\">Nicholas C. Zakas</a></strong>: Former principal front-end engineer at Yahoo! and YUI developer. Leads a team of frontend engineers at Box now. + <strong><a href=\"https://www.youtube.com/watch?v=mKouqShWI4o\">Box Tech Talk: Scalable JavaScript Application Architecture</a></strong>: A video by Nicholas Zakas (2012) about JavaScript Architecture. + <strong><a href=\"https://www.youtube.com/watch?v=vXjVFPosQHw\">Scalable JavaScript Application Architecture</a></strong>: In this video (2011) Nicholas Zakas discusses frontend architecture for complex, modular web applications with significant JavaScript elements. + <strong><a href=\"http://t3js.org/\">T3</a></strong>: T3 is a minimalist JavaScript framework sponsored by Box Inc. that provides core structure to code. + <strong><a href=\"https://leanpub.com/understandinges6/read\">Understanding ECMAScript 6</a></strong>: Free (as in pay what you want) E-Book by Nicholas C. Zakas describing the new features in EcmaScript 6. + <strong><a href=\"https://github.com/box/shalam\">Shalam</a></strong>: A friendly tool for CSS spriting. Shalam allows you to add Retina-friendly, high-quality image sprites to your website without modifying any markup. + <strong><a href=\"http://t3js.org/\">T3</a></strong>: T3 is a minimalist JavaScript framework sponsored by Box Inc. that provides core structure to code. + <strong><a href=\"https://github.com/box/stalker\">stalker</a></strong>: A jQuery plugin allowing elements to follow the user as they scroll a page. + <strong><a href=\"https://code.facebook.com/projects/\">Facebook</a></strong>: Facebook is a corporation and online social networking service headquartered in Menlo Park, California, in the United States. + <strong><a href=\"https://github.com/facebook/immutable-js/\">Immutable.js</a></strong>: Immutable persistent data collections for Javascript which increase efficiency and simplicity. + <strong><a href=\"http://facebook.github.io/react/\">React</a></strong>: React is a JavaScript library for creating user interfaces. Many people choose to think of React as the V in MVC. We built React to solve one problem: building large applications with data that changes over time. + <strong><a href=\"https://www.sitepoint.com/react-alternatives-preact-virtualdom-deku/\">3 Lightweight React Alternatives</a></strong>: Dan Prince explores Preact, VirtualDom &#x26; Deku. + <strong><a href=\"http://jamesknelson.com/state-react-1-stateless-react-app/\">A Stateless React App?</a></strong>: James K Nelson describes how to avoid state in React Components. + <strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack. + <strong><a href=\"https://medium.com/@kadmil/css-modules-to-the-rescue-jsx-ded2db874d34\">CSS Modules To The Rescue.jsx</a></strong>: If you use react-like templates/components, use webpack CSS loader to enable CSS Modules and forget about global CSS problems. + <strong><a href=\"http://andrewhfarmer.com/starter-project/\">Find Your Perfect React Starter Project</a></strong>: A simple search engine for React boilerplates with the ability to pick the ingredients. + <strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development. + <strong><a href=\"https://medium.com/@floydophone/functional-dom-programming-67d81637d43\">Functional DOM Programming</a></strong>: One of the earliest intros to React and its purpose by Pete Hunt. + <strong><a href=\"https://www.youtube.com/watch?v=1uRC3hmKQnM\">Functional Principles In React</a></strong>: Jessica Kerr talks about four functional principles: Composition, Declarative Style, Isolation and Flow Of Data, and their usage in React. + <strong><a href=\"https://semaphoreci.com/community/tutorials/getting-started-with-tdd-in-react\">Getting Started with TDD in React</a></strong>: Learn how to test React components using a TDD approach with minimal setup, while learning exactly what to test and how to avoid common pitfalls. + <strong><a href=\"https://daveceddia.com/to-react-from-angular/\">Getting to Grips with React (as an Angular developer)</a></strong>: In a series of posts Dave Ceddia tries to help you apply your hard-won knowledge of “Angularisms” to React. + <strong><a href=\"https://medium.com/react-ecosystem/how-to-handle-state-in-react-6f2d3cd73a0c\">How to Handle State in React. The Missing FAQ</a></strong>: Osmel Mora challenges the common misconception that you always need a Flux-like architecture in your React apps. + <strong><a href=\"https://medium.com/@delveeng/how-we-use-the-flux-architecture-in-delve-effc551f8fbc\">How we use the Flux architecture in Delve</a></strong>: Øystein Hallaråker describes how Delve utilizes the Flux application architecture. + <strong><a href=\"https://www.youtube.com/watch?v=I7IdS-PbEgI\">Immutable Data and React</a></strong>: Lee Byron talks about how persistent immutable data structures work, and techniques for using them in a React applications with Immutable.js. + <strong><a href=\"https://github.com/alexmingoia/jsx-transform\">JSX Transform</a></strong>: JSX transpiler. A standard and configurable implementation of JSX decoupled from React. + <strong><a href=\"https://github.com/facebook/jest\">Jest</a></strong>: A JavaScript unit testing framework, used by Facebook to test services and React applications. + <strong><a href=\"https://satishchilukuri.com/blog/entry/model-view-intent-with-react-and-rxjs\">Model-View-Intent with React and RxJS</a></strong>: Satish Chilukuri shows an example implementation of MVI pattern with React. + <strong><a href=\"https://github.com/team-gryff/react-monocle\">Monocle</a></strong>: A developer tool for generating visual representations of your React app's component hierarchy. + <strong><a href=\"http://staltz.com/nothing-new-in-react-and-flux-except-one-thing.html\">Nothing New in React and Flux Except One Thing</a></strong>: Andre Staltz talks about aspects of React and Flux which make them innovative and compelling. + <strong><a href=\"http://rauchg.com/2015/pure-ui/\">Pure UI</a></strong>: Guillermo Rauch discusses the definition of an application's UI as a pure function of application state. + <strong><a href=\"https://github.com/reactjs/react-basic\">React - Basic Theoretical Concepts</a></strong>: Sebastian Markbage attempts to formally explain his mental model of React. The intention is to describe this in terms of deductive reasoning that lead us to this design. + <strong><a href=\"https://github.com/kriasoft/react-app\">React App</a></strong>: React App is a small library powered by React, Universal Router and History that handles routing, navigation and rendering logic in isomorphic (universal) and single-page applications. + <strong><a href=\"https://medium.com/@dan_abramov/react-components-elements-and-instances-90800811f8ca#.9208ahtfb\">React Components, Elements, and Instances</a></strong>: Dan Abramov explains the Virtual DOM dictionary in React. + <strong><a href=\"http://blog.reverberate.org/2014/02/react-demystified.html\">React Demystified</a></strong>: This article is an attempt to explain the core ideas behind React.js and Virtual DOM. + <strong><a href=\"https://github.com/necolas/react-native-web\">React Native for Web</a></strong>: This project allows components built upon React Native to be run on the Web, and it manages all component styling out-of-the-box. + <strong><a href=\"https://www.reactstarterkit.com/\">React Starter Kit</a></strong>: Isomorphic web app boilerplate including Node.js, Express, GraphQL, React.js, Babel 6, PostCSS, Webpack, Browsersync. + <strong><a href=\"https://github.com/kadirahq/react-storybook\">React Storybook</a></strong>: Isolate your React UI Component development from the main app. + <strong><a href=\"https://github.com/jesstelford/react-workshop\">React Workshop</a></strong>: This is a self-directed workshop. Follow along to the steps at your own pace, and feel free to ask your instructors questions as you go. + <strong><a href=\"https://github.com/krasimir/react-in-patterns\">React in Patterns</a></strong>: List of design patterns/techniques used while developing with React. + <strong><a href=\"https://auth0.com/blog/2015/11/20/face-off-virtual-dom-vs-incremental-dom-vs-glimmer/\">React vs Incremental DOM vs Glimmer</a></strong>: In this post we will explore three technologies to build dynamic DOMs. We will also run benchmarks and find out which one is faster. + <strong><a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">React: Rethinking best practices (2013)</a></strong>: A video introduction to React by Pete Hunt. + <strong><a href=\"https://github.com/RamonGebben/react-perf-tool\">ReactPerfTool</a></strong>: ReactPerfTool tries to give you a more visual way of debugging performance of your React application. It does this by using the addons delivered by the React team and community to get measurements and visualize this using graphs. + <strong><a href=\"http://jlongster.com/Removing-User-Interface-Complexity,-or-Why-React-is-Awesome\">Removing User Interface Complexity, or Why React is Awesome</a></strong>: In this post James Long tries not to evangelize React specifically, but to explain why its technique is profound. + <strong><a href=\"https://www.youtube.com/watch?v=x7cQ3mrcKaY\">Rethinking Best Practices</a></strong>: Pete Hunt talks about React's design decisions challenging established best practices. + <strong><a href=\"https://github.com/LiquidLabsGmbH/retractor\">Retractor</a></strong>: Retractor exposes the internals of a React application for end-to-end testing purposes. This allows you to select DOM nodes based on the name of the React Component that rendered the node as well as its state or properties. + <strong><a href=\"http://staltz.com/some-problems-with-react-redux.html\">Some Problems with React/Redux</a></strong>: André Staltz goes through the pros and cons of React + Redux. + <strong><a href=\"http://developer.telerik.com/featured/taming-react-setup/\">Taming the React Setup</a></strong>: Cody Lindley lays out seven React setups in this article and explains the relation of React to BYOA (Bring Your Own Architecture) approach. + <strong><a href=\"http://silvenon.com/testing-react-and-redux/\">Testing a React &#x26; Redux Codebase</a></strong>: This series aims to be a very comprehensive guide through testing a React and Redux codebase, where you can really cover a lot with just unit tests because the code is mostly universal. + <strong><a href=\"http://krasimirtsonev.com/blog/article/The-bare-minimum-to-work-with-React\">The Bare Minimum to Work with React</a></strong>: Krasimir Tsonev describes how to start working with React after installing only 7 dependencies and learning only three commands. + <strong><a href=\"https://medium.com/@denisraslov/the-redux-ecosystem-539c630ec521\">The Redux Ecosystem</a></strong>: Let's take a look at most of the features that you'll have to deal with when the time comes, — and where React &#x26; Redux themselves can't help you. + <strong><a href=\"http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/\">The SoundCloud Client in React + Redux</a></strong>: After finishing this step by step tutorial you will be able to author your own React + Redux project with Webpack and Babel. + <strong><a href=\"https://www.fullstackreact.com/articles/react-tutorial-cloning-yelp/\">Tutorial: Cloning Yelp</a></strong>: This post will guide you through building a full React app, even with little to no experience in the framework. We are going to build a Yelp clone in React. + <strong><a href=\"https://medium.com/@firasd/interface-from-data-using-react-to-sync-updates-and-offline-activity-across-devices-f672b213701c\">Using React to Sync Updates and Offline Activity</a></strong>: Firas Durri describes how React based architectures make syncing state across devices much easier. + <strong><a href=\"http://thenewstack.io/developers-need-know-mvi-model-view-intent/\">What Developers Need to Know about MVI (Model-View-Intent)</a></strong>: The article explains the general MVI pattern and how it relates to React, Reactive Programming and Cycle.js + <strong><a href=\"https://github.com/garbles/why-did-you-update\">Why Did You Update?</a></strong>: A function that monkey patches React and notifies you in the console when potentially unnecessary re-renders occur. + <strong><a href=\"http://facebook.github.io/react/blog/2013/06/05/why-react.html\">Why did we build React?</a></strong>: Pete Hunt tries to explain why Facebook devs built React in the first place. + <strong><a href=\"https://github.com/facebook/regenerator\">Regenerator</a></strong>: This package implements a source transformation that takes the proposed syntax for generators/yield from future versions of JS and spits out efficient JS-of-today (ES5) that behaves the same way. + <strong><a href=\"https://www.google.com/\">Google</a></strong>: Google's mission is to organize the world's information and make it universally accessible and useful. + <strong><a href=\"https://addyosmani.com/\">Addy Osmani</a></strong>: Engineer at Google working on open web tooling. + <strong><a href=\"https://addyosmani.com/resources/essentialjsdesignpatterns/book/\">Learning JavaScript Design Patterns</a></strong>: In this free book Addy Osmani explores applying both classical and modern design patterns to the JavaScript programming language. + <strong><a href=\"https://addyosmani.com/largescalejavascript/\">Patterns For Large-Scale JavaScript Application Architecture</a></strong>: An extensive overview by Addy Osmani of existing architectural solutions in the frontend development field. + <strong><a href=\"https://addyosmani.com/writing-modular-js/\">Writing Modular JavaScript With AMD, CommonJS &#x26; ES Harmony</a></strong>: In this article Addy Osmani reviewes several of the options available for writing modular JavaScript using modern module formats AMD, CommonJS and ES6 Modules. + <strong><a href=\"https://developers.google.com/closure/compiler/\">Closure Compiler</a></strong>: The Closure Compiler parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. + <strong><a href=\"https://medium.com/google-developers/introducing-incremental-dom-e98f79ce2c5f\">Introducing Incremental DOM</a></strong>: Incremental DOM is a library inspired by Virtual DOM developed at Google. + <strong><a href=\"http://www.microsoft.com/\">Microsoft</a></strong>: Microsoft Corporation is an American multinational technology company, that develops, manufactures, licenses, supports and sells computer software, consumer electronics and personal computers and services. + <strong><a href=\"https://developer.microsoft.com/en-us/microsoft-edge/tools/\">Dev Tools by Microsoft</a></strong>: These tools allow you to test your product on different version of Internet Explorer and Microsoft Edge. + <strong><a href=\"http://knockoutjs.com/\">Knockout.js</a></strong>: Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern with templates. + <strong><a href=\"https://github.com/Reactive-Extensions/RxJS\">Reactive Extensions (RxJS)</a></strong>: RxJS is a set of libraries for composing asynchronous and event-based programs using observable sequences and fluent query operators. + <strong><a href=\"https://www.youtube.com/watch?v=XRYN2xt11Ek\">Async JavaScript with Reactive Extensions</a></strong>: Jafar Husain explains in this video how Netflix uses the Reactive Extensions (Rx) library to build responsive user experiences that strive to be event-driven, scalable and resilient. + <strong><a href=\"http://blog.thoughtram.io/rx/2016/08/01/exploring-rx-operators-flatmap.html\">Exploring Rx Operators: FlatMap</a></strong>: Christoph Burgdorf introduces the FlatMap operator and its usage for collections and observables. + <strong><a href=\"http://blog.thoughtram.io/angular/2016/05/16/exploring-rx-operators-map.html\">Exploring Rx Operators: Map</a></strong>: Christoph Burgdorf explains how to use the map operator in RxJS. + <strong><a href=\"http://www.mokacoding.com/blog/functional-core-reactive-shell/\">Functional Core Reactive Shell</a></strong>: Giovanni Lodi makes an overview of different architecture meta-patterns and describes his current findings about functional programming and observables as a way to control side effects. + <strong><a href=\"http://reactivex.io/learnrx/\">Learn RX</a></strong>: A series of interactive exercises for learning Microsoft's Reactive Extensions (Rx) Library for Javascript. + <strong><a href=\"http://www.learnrxjs.io/\">Learn RxJS</a></strong>: This site focuses on making RxJS concepts approachable, the examples clear and easy to explore, and features references throughout to the best RxJS related material on the web. + <strong><a href=\"https://medium.com/@sergimansilla/real-world-observables-1f65748c8f9\">Real World Observables</a></strong>: Sergi Mansilla writes an FTP client to use it as an example for a real world application based on RxJS. + <strong><a href=\"https://github.com/JulienMoumne/rx-training-games\">Rx Training Games</a></strong>: Rx Training Games is a coding playground that can be used to learn and practice Reactive Extensions coding grid-based games + <strong><a href=\"http://xgrommx.github.io/rx-book/index.html\">Rx-Book</a></strong>: A complete book about RxJS v.4.0. + <strong><a href=\"http://rxmarbles.com/\">RxMarbles</a></strong>: A webapp for experimenting with diagrams of Rx Observables, for learning purposes. + <strong><a href=\"https://www.npmjs.com/package/rxstate\">RxState</a></strong>: Simple opinionated state management library based on RxJS and Immutable.js + <strong><a href=\"http://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html\">Taking Advantage of Observables in Angular 2</a></strong>: Christoph Burgdorf describes the advantages of Observables and how you can use them in Angular 2 context. + <strong><a href=\"https://xgrommx.github.io/rx-book/content/getting_started_with_rxjs/creating_and_querying_observable_sequences/transducers.html\">Transducers with Observable Sequences</a></strong>: A chapter from the RxJS Book describing Transducers. + <strong><a href=\"http://staltz.com/why-we-built-xstream.html\">Why We Built Xstream</a></strong>: The authors needed a stream library tailored for Cycle.js. It needs to be “hot” only, small in kB size and it should have only a few and intuitive operators. + <strong><a href=\"https://code.visualstudio.com/\">Visual Studio Code</a></strong>: Build and debug modern web and cloud applications. VS Code is free and available on your favorite platform - Linux, Mac OSX, and Windows. + <strong><a href=\"https://www.mozilla.org/\">Mozilla</a></strong>: Mozilla is a community, which uses, develops, spreads and supports free software products. It is supported institutionally by the Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation. + <strong><a href=\"https://www.mozilla.org/en-US/firefox/products/\">Firefox</a></strong>: Firefox is the highly popular free web browser. It is available for Linux, Mac, Windows, handheld devices, and in more than 70 different languages. + <strong><a href=\"http://jlongster.com/\">James Long</a></strong>: Works on Firefox Developer Tools at Mozilla. + <strong><a href=\"http://jlongster.com/A-Study-on-Solving-Callbacks-with-JavaScript-Generators\">A Study on Solving Callbacks with JavaScript Generators</a></strong>: This article describes how Generators help fight callback hell. + <strong><a href=\"http://jlongster.com/Removing-User-Interface-Complexity,-or-Why-React-is-Awesome\">Removing User Interface Complexity, or Why React is Awesome</a></strong>: In this post James Long tries not to evangelize React specifically, but to explain why its technique is profound. + <strong><a href=\"https://github.com/jlongster/transducers.js\">Transducers.js Library by James Long</a></strong>: A small library for generalized transformation of data (inspired by Clojure's transducers) + <strong><a href=\"http://jlongster.com/Transducers.js-Round-2-with-Benchmarks\">Transducers.js Round 2 with Benchmarks</a></strong>: Refactored version of Transducers.js, some benchmarks, Laziness, the transformer protocoll. + <strong><a href=\"http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data\">Transducers.js: A JavaScript Library for Transformation of Data</a></strong>: A post announcing the transducers.js library with some explanation. + <strong><a href=\"http://jlongster.com/Transducers.js-Round-2-with-Benchmarks\">Transducers.js Round 2 with Benchmarks</a></strong>: Refactored version of Transducers.js, some benchmarks, Laziness, the transformer protocoll. + <strong><a href=\"http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data\">Transducers.js: A JavaScript Library for Transformation of Data</a></strong>: A post announcing the transducers.js library with some explanation. + <strong><a href=\"https://developer.mozilla.org/\">Mozilla Developer Network (MDN)</a></strong>: The MDN is a complete learning platform for Web technologies and the software that powers the Web. + <strong><a href=\"http://mozilla.github.io/nunjucks/\">Nunjucks</a></strong>: A rich and powerful templating language for JavaScript. + <strong><a href=\"https://stripe.com/open-source\">Stripe</a></strong>: Stripe is an Irish technology company that allows both private individuals and businesses to accept payments over the Internet. + <strong><a href=\"https://alexsexton.com/\">Alex Sexton</a></strong>: Alex Sexton is an engineer at Stripe. He is on the Modernizr core team, the jQuery Board of Directors, as well as the Dojo Foundation Board. + <strong><a href=\"https://modernizr.com/\">Modernizr</a></strong>: It's a collection of superfast tests - or “detects” as we like to call them - which run as your web page loads, then you can use the results to tailor the experience to the user. + <strong><a href=\"http://mixu.net/\">Mikito Takada (mixu)</a></strong>: Software engineer at Stripe. + <strong><a href=\"http://book.mixu.net/css/\">Learn CSS Layout the pedantic way</a></strong>: Walks you through every major concept in CSS layout, without trying to simplify away the underlying mechanisms described in the CSS 2.1 and flexbox specs. + <strong><a href=\"http://singlepageappbook.com/\">Single Page Apps in Depth</a></strong>: This free book is what I wanted when I started working with single page apps. It's not an API reference on a particular framework, rather, the focus is on discussing patterns, implementation choices and decent practices. + <strong><a href=\"https://github.com/stripe/jquery.mobilePhoneNumber\">jquery.mobilePhoneNumber</a></strong>: A general purpose library for validating and formatting mobile phone numbers. + <strong><a href=\"https://github.com/stripe/jquery.payment\">jquery.payment</a></strong>: A general purpose library for building credit card forms, validating inputs and formatting numbers. + <strong><a href=\"http://todogroup.org/\">TODO Group</a></strong>: TODO is an open group of companies who want to collaborate on practices, tools, and other ways to run successful and effective open source projects and programs. + <strong><a href=\"https://twitter.com/\">Twitter</a></strong>: Twitter is an online social networking service that enables users to send and read short 140-character messages called \"tweets\". + <strong><a href=\"http://flightjs.github.io/\">Flight</a></strong>: An event-driven web framework, from Twitter. + <strong><a href=\"http://twitter.github.io/hogan.js/\">Hogan.js</a></strong>: Hogan.js is a 3.4k JS templating engine developed at Twitter. It was developed against the mustache test suite. + <strong><a href=\"http://nicolasgallagher.com/\">Nicolas Gallagher</a></strong>: Frontend Engineer at Twitter. + <strong><a href=\"http://necolas.github.io/normalize.css/\">Normalize.css</a></strong>: A modern, HTML5-ready alternative to CSS resets. + <strong><a href=\"https://www.w3.org/\">World Wide Web Consortium (W3C)</a></strong>: The W3C is an international community where Member organizations, a full-time staff, and the public work together to develop Web standards. + <strong><a href=\"https://www.w3.org/TR/webarch/#identification\">Architecture of the World Wide Web: Identification</a></strong>: This architecture document by W3C discusses the core design components of the Web. They are identification of resources, representation of resource state, and the protocols that support the interaction between agents and resources in the space. + <strong><a href=\"https://www.w3.org/TR/css-flexbox-1/\">CSS Flexible Box Layout Module Level 1</a></strong>: W3C specification for CSS flexbox. + <strong><a href=\"https://www.w3.org/DOM/DOMTR\">Document Object Model (DOM) Technical Reports</a></strong>: Specifications by the W3C. + <strong><a href=\"http://w3c.github.io/aria-in-html/\">Notes on Using ARIA in HTML</a></strong>: This document is a practical guide for developers on how to add accessibility information to HTML elements using the Accessible Rich Internet Applications specification. + <strong><a href=\"https://www.w3.org/TR/service-workers/\">Service Workers</a></strong>: A method that enables applications to take advantage of persistent background processing, including hooks to enable bootstrapping of web applications while offline. + <strong><a href=\"https://medium.com/google-developers/instant-loading-web-apps-with-an-application-shell-architecture-7c0c2f10c73\">Instant Loading Web Apps With An Application Shell Architecture</a></strong>: Addy Osmani describes how to leverage the Service Worker API to drastically improve the loading speed of your web application. + <strong><a href=\"http://www.html5rocks.com/en/tutorials/service-worker/introduction/\">Introduction to Service Worker</a></strong>: Matt Gaunt introduces the main features of Service Worker API in this article. + <strong><a href=\"https://jakearchibald.github.io/isserviceworkerready/\">Is ServiceWorker Ready?</a></strong>: Tracks the implementation status across the main browsers. + <strong><a href=\"http://w3c.github.io/webcomponents/spec/shadow/\">Shadow DOM W3C Editor's Draft</a></strong>: This specification describes a method of combining multiple DOM trees into one hierarchy and how these trees interact with each other within a document, thus enabling better composition of the DOM. + <strong><a href=\"https://www.yandex.com/\">Yandex</a></strong>: Yandex is one of the largest internet companies in Europe, operating Russia's most popular search engine and its most visited website. + <strong><a href=\"https://en.bem.info/method/\">Block Element Modifier (BEM)</a></strong>: Methodology aimed at achieving fast to develop long-lived projects, team scalability, and code reuse. + <strong><a href=\"http://www.smashingmagazine.com/2012/04/a-new-front-end-methodology-bem/\">A New Front-End Methodology: BEM</a></strong>: An introduction by Varvara Stepanova at SmashingMagazine. + <strong><a href=\"http://webdesign.tutsplus.com/articles/an-introduction-to-the-bem-methodology--cms-19403\">An Introduction to the BEM Methodology</a></strong>: General introduction article on tutsplus. + <strong><a href=\"https://css-tricks.com/bem-101/\">BEM 101</a></strong>: A collaborative post by Joe Richardson, Robin Rendle, and CSS-Tricks staff giving an introduction to BEM with some good examples. + <strong><a href=\"https://m.alphasights.com/bem-i-finally-understand-b0c74815d5b0\">BEM I (finally) understand</a></strong>: In this article Andrei Popa will focus on the basics of BEM and how to approach simple to complex anatomies. + <strong><a href=\"https://www.smashingmagazine.com/2016/06/battling-bem-extended-edition-common-problems-and-how-to-avoid-them/\">Battling BEM (Extended Edition): 10 Common Problems And How To Avoid Them</a></strong>: This article aims to be useful for people who are already BEM enthusiasts and wish to use it more effectively or people who are curious to learn more about it. + <strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack. + <strong><a href=\"http://docs.emmet.io/filters/bem/\">Emmet filter for BEM</a></strong>: If you're writing your HTML and CSS code in OOCSS-style, Yandex's BEM style specifically, you will like this filter. It provides some aliases and automatic insertions of common block and element names in classes. + <strong><a href=\"http://blog.kaelig.fr/post/48196348743/fifty-shades-of-bem\">Fifty Shades of BEM</a></strong>: Article describes different flavors of BEM. + <strong><a href=\"https://m.alphasights.com/how-we-use-bem-to-modularise-our-css-82a0c39463b0\">How We Use BEM to Modularise Our CSS</a></strong>: Andrei Popa describes the challenges, AlphaSights team had, implementing BEM in their projects. + <strong><a href=\"https://www.toptal.com/css/introduction-to-bem-methodology\">Introduction To BEM Methodology (Toptal)</a></strong>: General introduction to BEM methodology and platform. + <strong><a href=\"http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/\">MindBEMding - getting your head 'round BEM syntax</a></strong>: Article on csswizardry explaining the BEM syntax for CSS classes. + <strong><a href=\"https://github.com/bem-contrib/pobem\">Pobem</a></strong>: PostCSS plugin for BEM syntax. + <strong><a href=\"http://mikefowler.me/2013/10/17/support-for-bem-modules-sass-3.3/\">Support for BEM modules in Sass 3.3</a></strong>: The next major release of Sass is poised for release and with it comes real support for BEM-style modules... + <strong><a href=\"http://www.didoo.net/to-bem-or-not-to-bem/\">To BEM or not to BEM</a></strong>: A series of interviews on BEM methodology. + <strong><a href=\"https://browser.yandex.com/\">Yandex Browser</a></strong>: Chromium based browser developed by Yandex. + <strong><a href=\"http://zurb.com/\">Zurb</a></strong>: ZURB is a product design company since 1998. Through consulting, product design tools and training, they transform the way businesses approach Progressive Design. + <strong><a href=\"http://foundation.zurb.com/\">Foundation</a></strong>: Foundation provides a responsive grid and HTML and CSS UI components, templates, and code snippets, including typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. + <strong><a href=\"http://foundation.zurb.com/emails.html\">Foundation for Emails 2</a></strong>: Frontend Framework for E-Mails including a grid, global styles, aligment classes, buttons, callout panels, thumbnail styles, typography, visibility classes. + <strong><a href=\"http://zurb.com/playground/responsive-email-templates\">Responsive Email Templates</a></strong>: Zurb Studios put together this set of super awesome email templates so that you can make your email campaigns responsive.</li>\n<li>\n<p><strong>Podcasts</strong>: A podcast is a form of digital media that consists of an episodic series of audio, video, digital radio, PDF, or ePub files subscribed to and downloaded automatically through web syndication or streamed online to a computer or mobile device.</p>\n<ul>\n<li><strong><a href=\"https://devchat.tv/adv-in-angular\">Adventures in Angular</a></strong>: Adventures in Angular is a weekly podcast dedicated to the Angular JavaScript framework and related technologies, tools, languages, and practices.</li>\n<li><strong><a href=\"https://itunes.apple.com/us/podcast/cdnify/id786191888\">CDNify Podcasts</a></strong>: The CDNify podcast covers all things tech, startup, web performance and acceleration.</li>\n<li><strong><a href=\"https://javascriptair.com/\">JavaScript Air</a></strong>: The live broadcast podcast all about JavaScript.</li>\n<li><strong><a href=\"https://devchat.tv/js-jabber/\">JavaScript Jabber</a></strong>: A weekly podcast about JavaScript, including Node.js, Front-End Technologies, Careers, Teams and more.</li>\n<li><strong><a href=\"http://goodstuff.fm/nbsp\">Non Breaking Space Show</a></strong>: Seeking out the best, brightest, and smartest creative people on digital art, design, and development. From workflows to life hacks, we examine why they do what they do and how they did it.</li>\n<li><strong><a href=\"http://shoptalkshow.com/\">Shop Talk Show</a></strong>: An internet radio show about the internet starring Dave Rupert and Chris Coyier.</li>\n<li><strong><a href=\"http://5by5.tv/bigwebshow\">The Big Web Show</a></strong>: The award winning Big Web Show features special guests and topics like web publishing, art direction, content strategy, typography, web technology, and more. It's everything web that matters.</li>\n<li><strong><a href=\"http://5by5.tv/webahead\">The Web Ahead</a></strong>: Conversations with world experts on changing technologies and future of the web. The Web Ahead is your shortcut to keeping up.</li>\n<li><strong><a href=\"https://devchat.tv/web-sec-warriors\">Web Security Warrior</a></strong>: Web Security Warriors is a weekly discussion by developers about keeping websites, data, servers, and other internet outposts secure.</li>\n</ul>\n</li>\n</ul>\n<h2>Languages, Protocols, Browser APIs</h2>\n<p>Programming/mark-up languages and web related standards.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS\">Cascading Style Sheets (CSS)</a></strong>: CSS are a stylesheet language used to describe the presentation of a document written in HTML or XML. It describes how elements should be rendered on screen, on paper, in speech, or on other media.</p>\n<ul>\n<li>\n<p><strong>CSS Coding Conventions</strong>: Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices and methods for each aspect of a piece program written in this language.</p>\n<ul>\n<li><strong><a href=\"http://cssguidelin.es/\">CSS Guidelines</a></strong>: High-level advice and guidelines for writing sane, manageable, scalable CSS.</li>\n<li><strong><a href=\"https://github.com/necolas/idiomatic-css\">Idiomatic CSS</a></strong>: The following document outlines a reasonable style guide for CSS development. These guidelines strongly encourage the use of existing, common, sensible patterns.</li>\n<li><strong><a href=\"http://maintainablecss.com/\">Maintainable CSS</a></strong>: MaintainableCSS is an approach to writing modular, scalable and of course, maintainable CSS.</li>\n<li><strong><a href=\"http://primercss.io/\">Primer</a></strong>: Primer is GitHub's internal CSS framework. It includes basic global styling for typography, small components like buttons and tabs, and our general guidelines for writing HTML and CSS.</li>\n<li><strong><a href=\"https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/\">Wordpress CSS Coding Standards</a></strong>: The purpose of the WordPress CSS Coding Standards is to create a baseline for collaboration and review within various aspects of the WordPress open source project and community, from core code to themes to plugins.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://drafts.csswg.org/css-variables/\">CSS Variables W3C Editor's Draft</a></strong>: This module introduces cascading variables as a new primitive value type that is accepted by all CSS properties, and custom properties for defining them.</li>\n<li>\n<p><strong>Flexbox</strong>: The Flexbox Layout officially called CSS Flexible Box Layout Module is new layout module in CSS3 made to improve the items align, directions and order in the container even when they are with dynamic or even unknown size.</p>\n<ul>\n<li><strong><a href=\"http://tutorialzine.com/2016/04/5-flexbox-techniques-you-need-to-know-about/\">5 Flexbox Techniques You Need to Know About</a></strong>: In this article we're going to take a look at five flexbox approaches to solving common CSS layout problems. We've also included practical examples to showcase real life scenarios in which these techniques are applied.</li>\n<li><strong><a href=\"https://css-tricks.com/snippets/css/a-guide-to-flexbox/\">A Complete Guide to Flexbox</a></strong>: Chris Coyer provides a great reference to the flexbox features with code examples.</li>\n<li><strong><a href=\"https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties\">A Visual Guide to CSS3 Flexbox Properties</a></strong>: Rather that explaining how the flex properties work, this guide will focus on how the flex properties affect the layout in a visual way.</li>\n<li><strong><a href=\"https://www.w3.org/TR/css-flexbox-1/\">CSS Flexible Box Layout Module Level 1</a></strong>: W3C specification for CSS flexbox.</li>\n<li><strong><a href=\"https://css-tricks.com/flex-grow-is-weird/\">Flex-Grow is weird. Or is it?</a></strong>: Manuel Matuzovic describes how flex-grow works, including it's weird quirks. Then he goes into several examples on how common layout patterns may be implemented using flex-grow and flex-basis.</li>\n<li><strong><a href=\"http://flexboxfroggy.com/\">Flexbox Froggy</a></strong>: A fun way to learn Flexbox by playing a game where you help Froggy and friends to arrive at a lilypad.</li>\n<li><strong><a href=\"http://www.flexboxpatterns.com/\">Flexbox Patterns</a></strong>: These interactive examples will show you practical ways to use Flexbox to build UI components.</li>\n<li><strong><a href=\"https://github.com/philipwalton/flexbugs\">Flexbugs</a></strong>: This repository is a community-curated list of flexbox issues and cross-browser workarounds for them.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://howtocenterincss.com/\">How To Center in CSS</a></strong>: This tool consolidates the many ways of centering a div and gives you the code you need for each situation.</li>\n<li><strong><a href=\"http://www.tipue.com/blog/center-a-div/\">The Complete Guide to Centering a DIV</a></strong>: The aim of this article is to show how, with a few CSS tricks, any div can be centered; horizontally, vertically or both. And within the page or a div.</li>\n<li><strong><a href=\"https://css-tricks.com/understanding-border-image/\">Understanding border-image</a></strong>: The new CSS3 property border-image can allow you to create flexible boxes with custom borders with a single div and a single image.</li>\n<li><strong><a href=\"http://philipwalton.com/articles/what-no-one-told-you-about-z-index/\">What No One Told You About Z-Index</a></strong>: The problem with z-index is that it's not complicated, but it if you've never taken the time to read its specification, there are almost certainly crucial aspects that you're completely unaware of.</li>\n</ul>\n</li>\n<li>\n<p><strong>Document Object Model (DOM)</strong>: The DOM is a programming interface for HTML, XML and SVG documents. It defines methods that allow access to the tree, so that they can change the document structure, style and content.</p>\n<ul>\n<li>\n<p><strong>Document Events</strong>: DOM event model is a generic event system and a set of standard modules of events for user interface control and document mutation notifications</p>\n<ul>\n<li><strong><a href=\"https://www.smashingmagazine.com/2013/11/an-introduction-to-dom-events/\">An Introduction To DOM Events</a></strong>: Wilson Page introduces the basics of working with DOM events, then delves into their inner workings, explaining how we can make use of them to solve common problems.</li>\n<li><strong><a href=\"https://www.w3.org/TR/DOM-Level-2-Events/events.html\">DOM Level 2 Event Model</a></strong>: W3C specification section for DOM Level 2 Events.</li>\n<li><strong><a href=\"https://craig.is/riding/gators\">Gator</a></strong>: Gator is a small (~0.8 kb minified + gzipped), simple, standalone, event delegation library.</li>\n</ul>\n</li>\n<li>\n<p><strong>Overview</strong>: High level guides, articles and documents about DOM.</p>\n<ul>\n<li><strong><a href=\"http://www.impressivewebs.com/dom-features-you-didnt-know-existed-video-slides/\">DOM Features You Didn't Know Existed</a></strong>: Louis Lazaris talks about DOM Features you probably don't know.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model\">DOM Reference at the MDN</a></strong>: Complete reference of the DOM provided by the Mozilla Development Network.</li>\n<li><strong><a href=\"https://www.w3.org/DOM/DOMTR\">Document Object Model (DOM) Technical Reports</a></strong>: Specifications by the W3C.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction\">Introduction to the DOM</a></strong>: This section provides a brief conceptual introduction to the DOM: what it is, how it provides structure for HTML and XML documents, how you can access it, and how this API presents the reference information and examples.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://www.w3.org/html/\">HyperText Markup Language (HTML)</a></strong>: HTML is the standard markup language used to create web pages and its elements form the building blocks of all websites.</p>\n<ul>\n<li><strong><a href=\"http://diveintohtml5.info/\">Dive Into HTML5 (Book)</a></strong>: Dive Into HTML5 elaborates on a hand-picked selection of features from the HTML5 specification and other fine standards.</li>\n<li><strong><a href=\"https://google.github.io/styleguide/htmlcssguide.xml\">Google HTML/CSS Style Guide</a></strong>: This document defines formatting and style rules for HTML and CSS. It aims at improving collaboration, code quality, and enabling supporting infrastructure.</li>\n<li><strong><a href=\"https://github.com/joshbuchea/HEAD\">HEAD</a></strong>: A list of everything that could go in the <head> of your document.</li>\n<li><strong><a href=\"https://github.com/necolas/idiomatic-html\">Idiomatic HTML</a></strong>: The following document outlines a reasonable style guide for HTML development. These guidelines strongly encourage the use of existing, common, sensible patterns. They should be adapted as needed to create your own style guide.</li>\n<li>\n<p><strong>Video &#x26; Audio</strong>: Use the HTML video and audio element to embed video content in a document.</p>\n<ul>\n<li><strong><a href=\"https://www.smashingmagazine.com/2016/04/html5-media-source-extensions-bringing-production-video-web/\">Bringing Production Video To The Web</a></strong>: Stefan Lederer gives you a good overview of the state and future of video on the web.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://make.wordpress.org/core/handbook/best-practices/coding-standards/html/\">Wordpress HTML Coding Standards</a></strong>: Coding conventions for WordPress.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://www.mnot.net/blog/2016/04/22/ideal-http\">Hypertext Transfer Protocol (HTTP)</a></strong>: The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.</p>\n<ul>\n<li><strong><a href=\"http://blog.cloud66.com/best-practice-for-http2-front-end-deployments/\">Best Practice for HTTP2 Front-End Deployments</a></strong>: This post describes how to set up and use the new HTTP/2 protocol.</li>\n<li><strong><a href=\"https://www.mnot.net/blog/2016/04/22/ideal-http\">Ideal HTTP Performance</a></strong>: This post talks about the design of the HTTP protocol, it's performance drawbacks and how to work around them.</li>\n</ul>\n</li>\n<li>\n<p><strong>JavaScript (EcmaScript)</strong>: JavaScript is a full-fledged dynamic programming language that, when applied to an HTML document, can provide dynamic interactivity on websites. It is defined by ECMAScript standard.</p>\n<ul>\n<li>\n<p><strong>Control Flow &#x26; Error Handling</strong>: Statements, that you can use to incorporate interactivity in your application.</p>\n<ul>\n<li><strong><a href=\"https://www.sitepoint.com/proper-error-handling-javascript/\">A Guide to Proper Error Handling in JavaScript</a></strong>: Camilo Reyes describes ways to handle Exceptions and asynchronous errors in JavaScript.</li>\n</ul>\n</li>\n<li>\n<p><strong>Enhancement Libraries</strong>: Libraries that attempt to improve and enhance the vanilla JavaScript language by providing utility functions.</p>\n<ul>\n<li><strong><a href=\"https://flowtype.org/\">Flow</a></strong>: Flow is a static type checker for JavaScript. It can be used to catch common bugs in JavaScript programs before they run.</li>\n<li><strong><a href=\"https://lodash.com/\">Lodash</a></strong>: A modern JavaScript utility library delivering modularity, performance, &#x26; extras.</li>\n<li><strong><a href=\"http://moutjs.com/\">MOUT</a></strong>: MOUT provides many helper methods similar to those found on other languages standard libraries (ie. Python, Ruby, PHP).</li>\n<li>\n<p><strong><a href=\"http://ramdajs.com/\">Ramda</a></strong>: A practical library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.</p>\n<ul>\n<li><strong>Practical Ramda - Functional Programming Examples</strong>: Tom MacWright gives some practical examples of Ramda usage.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://rubyjs.org/\">RubyJS</a></strong>: RubyJS is a JavaScript implementation of all methods from Ruby classes like Array, String, Numbers, Time and more.</li>\n</ul>\n</li>\n<li>\n<p><strong>Functions</strong>: A function is a JavaScript procedure—a set of statements that performs a task or calculates a value.</p>\n<ul>\n<li><strong><a href=\"http://jibbering.com/faq/notes/closures/\">Closures explained by Jim Ley</a></strong>: Explanation of closures in JavaScript.</li>\n<li><strong><a href=\"https://medium.freecodecamp.com/lets-learn-javascript-closures-66feb44f6a44\">Let's Learn JavaScript Closures</a></strong>: So this post will be dedicated to the nuts and bolts of how and why closures work the way they do.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions\">MDN Guide Chapter about Functions</a></strong>: Defining functions, scope, closures, arguments, parameters, arrow functions and predefined functions.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions\">MDN Reference for Functions</a></strong>: Defining functions, arguments, parameters, methods, block-level functions and browser compatibility.</li>\n</ul>\n</li>\n<li>\n<p><strong>Generators</strong>: Generators allow you to define an iterative algorithm by writing a single function which can maintain its own state.</p>\n<ul>\n<li><strong><a href=\"http://jlongster.com/A-Closer-Look-at-Generators-Without-Promises\">A Closer Look at Generators Without Promises</a></strong>: Author looks at libraries for asynchronous programming with generators but without promises.</li>\n<li><strong><a href=\"http://jlongster.com/A-Study-on-Solving-Callbacks-with-JavaScript-Generators\">A Study on Solving Callbacks with JavaScript Generators</a></strong>: This article describes how Generators help fight callback hell.</li>\n<li><strong><a href=\"https://medium.com/@tjholowaychuk/callbacks-vs-coroutines-174f1fe66127\">Callbacks vs Coroutines</a></strong>: In this post TJ Holowaychuk goes through hist experiences with coroutines and why he thinks they're a great tool.</li>\n<li><strong><a href=\"https://x.st/javascript-coroutines/\">Coroutine Event Loops in Javascript</a></strong>: An intriguing use of coroutines is to implement event loops as an alternative to callback functions. This is particularly relevant to Javascript, where the use of callbacks is pervasive.</li>\n<li><strong><a href=\"http://stackoverflow.com/questions/715758/coroutine-vs-continuation-vs-generator\">Coroutine vs Continuation vs Generator</a></strong>: StackOverflow Discussion about the difference between Couroutines, Continuations and Generators.</li>\n<li><strong><a href=\"https://github.com/facebook/regenerator\">Regenerator</a></strong>: This package implements a source transformation that takes the proposed syntax for generators/yield from future versions of JS and spits out efficient JS-of-today (ES5) that behaves the same way.</li>\n</ul>\n</li>\n<li>\n<p><strong>Grammar and Types</strong>: JavaScript's basic grammar, variable declarations, data types scope, hoisting and literals.</p>\n<ul>\n<li><strong><a href=\"https://rainsoft.io/detailed-overview-of-well-known-symbols/\">Detailed Overview of Well-Known Symbols</a></strong>: Well-known symbols are used by built-in JavaScript algorithms. This article guides through the list of well-known symbols and explains how to use them comfortable in your code.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types\">Grammar and Types Chapter on the MDN</a></strong>: This chapter discusses JavaScript's basic grammar, variable declarations, data types and literals.</li>\n<li><strong><a href=\"http://bytearcher.com/articles/variable-hoisting-explained/\">Variable Hoisting Explained</a></strong>: The author explains how hoisting works in JavaScript including variable declarations and ES6 let operator.</li>\n<li><strong><a href=\"https://rainsoft.io/variables-lifecycle-and-why-let-is-not-hoisted/\">Variables Lifecycle: Why Let is not Hoisted</a></strong>: ES2015 provides a different and improved mechanism for let. It demands stricter variable declaration practices and as result better code quality. Let's dive into more details about this process.</li>\n</ul>\n</li>\n<li>\n<p><strong>JS Coding Conventions</strong>: Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices and methods for each aspect of a piece program written in this language.</p>\n<ul>\n<li><strong><a href=\"https://github.com/airbnb/javascript\">Airbnb JavaScript Style Guide</a></strong>: A reasonable approach to JavaScript by Airbnb.</li>\n<li><strong><a href=\"https://google.github.io/styleguide/javascriptguide.xml\">Google JavaScript Style Guide</a></strong>: JavaScript is the main client-side scripting language used by many of Google's open-source projects. This style guide is a list of dos and don'ts for JavaScript programs.</li>\n<li><strong><a href=\"https://github.com/rwaldron/idiomatic.js/\">Idiomatic.js</a></strong>: The following list outlines the practices that Rick Waldron uses in all code that he is the original author of.</li>\n<li><strong><a href=\"http://standardjs.com/\">JavaScript Standard Style</a></strong>: A set of modules to check and improve the style of your code.</li>\n<li><strong><a href=\"https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/\">WordPress JavaScript Coding Standards</a></strong>: JavaScript has become a critical component in developing WordPress-based applications (themes and plugins) as well as WordPress core. Standards are needed for formatting and styling JavaScript code.</li>\n</ul>\n</li>\n<li>\n<p><strong>Objects</strong>: An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life.</p>\n<ul>\n<li><strong><a href=\"http://dmitrysoshnikov.com/ecmascript/chapter-7-1-oop-general-theory/\">ECMA-262-3 in detail: OOP - The general theory</a></strong>: In this article we consider major aspects of object-oriented programming in ECMAScript. Much attention is given to theoretical aspects to see these processes from within.</li>\n<li><strong><a href=\"http://rainsoft.io/gentle-explanation-of-this-in-javascript/\">Gentle explanation of this keyword in JavaScript</a></strong>: This article is focused on the invocation explanation, how the function call influences this and demonstrates the common pitfalls of identifying the context.</li>\n<li><strong><a href=\"http://javascriptissexy.com/oop-in-javascript-what-you-need-to-know/\">OOP In JavaScript: What You NEED to Know</a></strong>: In this article, we are concerned with only Inheritance and Encapsulation since only these two concepts apply to OOP in JavaScript.</li>\n<li><strong><a href=\"http://blog.wolksoftware.com/about-classes-inheritance-and-object-oriented-design-in-typescript-and-es6\">Object-Oriented Design in TypeScript / ES6</a></strong>: The author dives into advanced OOP topics such as functional programming principles, inheritance and inversion of control.</li>\n<li><strong><a href=\"http://javascript.crockford.com/prototypal.html\">Prototypal Inheritance in JavaScript</a></strong>: An article by Douglas Crockford introducing the Object.create() method and describing the rational behind it.</li>\n<li><strong><a href=\"http://alistapart.com/article/prototypal-object-oriented-programming-using-javascript\">Prototypal Object-Oriented Programming using JavaScript</a></strong>: Mehdi Maujood describes the prototypical OO style and compares it to classes in JavaScript.</li>\n<li><strong><a href=\"https://msdn.microsoft.com/en-us/magazine/ff852808.aspx\">Prototypes and Inheritance in JavaScript</a></strong>: This article tries to demystify the concept of prototypes in JavaScript. It shows how prototypes allow objects to inherit functionality from other objects, an approach to building objects using the new operator and a constructor function.</li>\n</ul>\n</li>\n<li>\n<p><strong>Overview</strong>: General, high level guides and introductions to the JavaScript language.</p>\n<ul>\n<li><strong><a href=\"http://eloquentjavascript.net/\">Eloquent JavaScript (Book)</a></strong>: A comprehensive book about JavaScript, the language, the browser and Node.js.</li>\n<li><strong><a href=\"http://bonsaiden.github.io/JavaScript-Garden/\">JavaScript Garden</a></strong>: JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes and subtle bugs.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide\">JavaScript Guide by Mozilla Developer Network</a></strong>: The JavaScript Guide shows you how to use JavaScript and gives an overview of the language.</li>\n<li><strong><a href=\"http://jargon.js.org/\">Simplified JavaScript Jargon</a></strong>: A community-driven attempt at explaining the loads of buzzwords making the current JavaScript ecosystem in a few simple words.</li>\n<li><strong><a href=\"https://leanpub.com/understandinges6/read\">Understanding ECMAScript 6</a></strong>: Free (as in pay what you want) E-Book by Nicholas C. Zakas describing the new features in EcmaScript 6.</li>\n<li><strong><a href=\"https://www.youtube.com/watch?v=8aGhZQkoFbQ\">What the heck is the event loop anyway?</a></strong>: Philip Roberts, in this video, tries to create an intuitive understanding of what happens when JavaScript runs. He talks about the call stack, event loop, callback queue and other concepts.</li>\n<li><strong><a href=\"https://github.com/getify/You-Dont-Know-JS\">You Dont Know JS</a></strong>: These books each take on specific core parts of the language which are most commonly misunderstood or under-understood, and dive very deep and exhaustively into them.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://www.promisejs.org/\">Promises</a></strong>: A promise represents the result of an asynchronous operation.</p>\n<ul>\n<li><strong><a href=\"http://bluebirdjs.com/\">Bluebird.js</a></strong>: Bluebird is a full featured promise library with unmatched performance.</li>\n<li><strong><a href=\"https://glebbahmutov.com/blog/difference-between-promise-and-task/\">Difference between a Promise and a Task</a></strong>: Once you have a Promise instance the action has already started. Task instance does not run until someone calls .fork()</li>\n<li><strong><a href=\"https://tc39.github.io/ecma262/#sec-promise-objects\">ECMAScript Promises Spec</a></strong>: Standard ES specification for promises.</li>\n<li><strong><a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise\">MDN page on Promises</a></strong>: The Promise object is used for deferred and asynchronous computations. A Promise represents an operation that hasn't completed yet, but is expected in the future.</li>\n<li><strong><a href=\"https://promisesaplus.com/\">The Promises/A+ Spec</a></strong>: An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.</li>\n<li><strong><a href=\"http://www.2ality.com/2016/04/unhandled-rejections.html\">Tracking Unhandled Rejected Promises</a></strong>: In Promise-based asynchronous code, rejections are used for error handling. One risk is that rejections may get lost, leading to silent failures.</li>\n<li><strong><a href=\"http://cryto.net/~joepie91/blog/\">What is Promise.try, and why does it matter?</a></strong>: In this brief article Sven Slootweg provides a better explanation of what Promise.try is, and why you should always use it, without exceptions.</li>\n<li><strong><a href=\"http://www.telerik.com/blogs/what-is-the-point-of-promises\">What's The Point Of Promises?</a></strong>: The point of promises is to represent the eventual resulting value from an operation, but the reason to use them is to better parallel synchronous operations and to solve the callback hell.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://www.json.org/\">JavaScript Object Notation (JSON)</a></strong>: JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language.</p>\n<ul>\n<li><strong><a href=\"http://json-ld.org/\">JSON-LD</a></strong>: JSON-LD is a lightweight Linked Data format. It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale.</li>\n</ul>\n</li>\n<li>\n<p><strong>Scalable Vector Graphics (SVG)</strong>: An XML-based vector image format for two-dimensional graphics with support for interactivity and animation.</p>\n<ul>\n<li><strong><a href=\"https://www.smashingmagazine.com/2016/04/tools-and-resources-for-editing-converting-and-optimizing-svgs/\">Tools And Resources For Editing, Converting And Optimizing SVGs</a></strong>: This article will provide you with tools and resources to simplify editing, converting, optimizing, and delivering SVGs.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://www.w3.org/TR/service-workers/\">Service Workers</a></strong>: A method that enables applications to take advantage of persistent background processing, including hooks to enable bootstrapping of web applications while offline.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/google-developers/instant-loading-web-apps-with-an-application-shell-architecture-7c0c2f10c73\">Instant Loading Web Apps With An Application Shell Architecture</a></strong>: Addy Osmani describes how to leverage the Service Worker API to drastically improve the loading speed of your web application.</li>\n<li><strong><a href=\"http://www.html5rocks.com/en/tutorials/service-worker/introduction/\">Introduction to Service Worker</a></strong>: Matt Gaunt introduces the main features of Service Worker API in this article.</li>\n<li><strong><a href=\"https://jakearchibald.github.io/isserviceworkerready/\">Is ServiceWorker Ready?</a></strong>: Tracks the implementation status across the main browsers.</li>\n</ul>\n</li>\n<li><strong>Templating Languages and Engines</strong>: Template engines are tools to separate program-logic and presentation into two independent parts. This makes the development of both logic and presentation easier, improves flexibility and eases modification and maintenance. + <strong><a href=\"http://olado.github.io/doT/\">Dot.js</a></strong>: The fastest + concise javascript template engine for Node.js and browsers. + <strong><a href=\"http://www.dustjs.com/\">Dust.js by LinkedIn</a></strong>: Dust is a Javascript templating engine. It inherits its look from the ctemplate family of languages, and is designed to run asynchronously on both the server and the browser. + <strong><a href=\"http://jed.github.io/domo/\">Dōmo</a></strong>: dōmo lets you write HTML markup and CSS styles in JavaScript syntax. It is a simpler and easier alternative to template engines and CSS pre-processors. + <strong><a href=\"https://github.com/dominictarr/hyperscript\">HyperScript</a></strong>: Create HyperText with JavaScript, on client or server. + <strong><a href=\"https://github.com/marko-js/marko\">Marko</a></strong>: Marko is a really fast and lightweight HTML-based templating engine from eBay. Marko runs on Node.js and in the browser and it supports streaming, async rendering and custom tags. + <strong><a href=\"http://mustache.github.io/\">Mustache</a></strong>: Mustache is a Logic-less template language. There are no if statements, else clauses, or for loops. Instead there are only tags. + <strong><a href=\"https://github.com/wycats/handlebars.js/\">Handlebars.js</a></strong>: Handlebars.js is an extension to the Mustache templating language. Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be. + <strong><a href=\"http://twitter.github.io/hogan.js/\">Hogan.js</a></strong>: Hogan.js is a 3.4k JS templating engine developed at Twitter. It was developed against the mustache test suite. + <strong><a href=\"http://mustache.github.io/mustache.5.html\">Mustache Specification</a></strong>: This document explains the different types of Mustache tags. + <strong><a href=\"http://documentup.com/jeremyruppel/walrus/\">Walrus</a></strong>: Walrus is a templating library inspired by mustache, handlebars, ejs and friends,\nbut with a couple of important differences in philosophy and style. + <strong><a href=\"https://github.com/janl/mustache.js\">mustache.js</a></strong>: mustache.js is an implementation of the mustache template system in JavaScript. + <strong><a href=\"http://archan937.github.io/templayed.js/\">templayed.js</a></strong>: The fastest and smallest Mustache compliant Javascript templating library written in 1806 bytes. + <strong><a href=\"http://mozilla.github.io/nunjucks/\">Nunjucks</a></strong>: A rich and powerful templating language for JavaScript. + <strong><a href=\"https://github.com/caolan/pithy\">Pithy</a></strong>: An internal DSL for generating HTML in JavaScript. + <strong><a href=\"https://github.com/gcao/T.js\">T</a></strong>: T.js is a template engine that uses simple Javascript data structure to represent html/xml data. + <strong><a href=\"http://idangero.us/template7/\">Template7</a></strong>: Template7 is a mobile-first JavaScript template engine with Handlebars-like syntax. It is used as default template engine in Framework7. + <strong><a href=\"http://leonidas.github.io/transparency/\">Transparency</a></strong>: Transparency is a minimal template engine for jQuery. It maps JSON objects to DOM elements with zero configuration. + <strong><a href=\"https://github.com/tmpvar/weld\">Weld</a></strong>: Weld binds data to markup, and can generate markup based on your data. There's no special syntax or data reshaping required.</li>\n<li>\n<p><strong>Transpiled Languages</strong>: Abstract languages converted to native, browser supported standards like JavaScript or CSS.</p>\n<ul>\n<li><strong><a href=\"https://github.com/clojure/clojurescript\">ClojureScript</a></strong>: ClojureScript is a compiler for Clojure that targets JavaScript. It is designed to emit JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler.</li>\n<li><strong><a href=\"https://www.dartlang.org/\">Dart</a></strong>: Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps compiled to JavaScript</li>\n<li>\n<p><strong><a href=\"http://elm-lang.org/\">Elm</a></strong>: Elm is a functional programming language for declaratively creating web browser-based graphical user interfaces.</p>\n<ul>\n<li><strong><a href=\"http://guide.elm-lang.org/architecture/index.html\">The Elm Architecture</a></strong>: The Elm Architecture is a simple pattern for infinitely nestable components. It is great for modularity, code reuse, and testing.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://lesscss.org/\">Less</a></strong>: Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.</li>\n<li><strong><a href=\"http://www.purescript.org/\">PureScript</a></strong>: PureScript is a strongly, statically typed language which compiles to JavaScript. It is written in and inspired by Haskell.</li>\n<li><strong><a href=\"http://sass-lang.com/\">Sass</a></strong>: Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.</li>\n<li><strong><a href=\"http://www.scala-js.org/\">Scala.js</a></strong>: A Scala to JavaScript compiler.</li>\n<li><strong><a href=\"http://stylus-lang.com/\">Stylus</a></strong>: Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. Supporting both an indented syntax and regular CSS style.</li>\n<li>\n<p><strong><a href=\"https://www.typescriptlang.org/\">TypeScript</a></strong>: A typed superset of JavaScript that compiles to plain JavaScript. Popular in the Angular and Microsoft community.</p>\n<ul>\n<li><strong><a href=\"https://vsavkin.com/writing-angular-2-in-typescript-1fa77c78d8e8\">Angular 2: Why TypeScript?</a></strong>: Angular 2 is written in TypeScript. In this article Victor Savkin talks about why they made the decision.</li>\n<li><strong><a href=\"https://github.com/inversify/InversifyJS\">InversifyJS</a></strong>: A powerful and lightweight inversion of control container for JavaScript &#x26; Node.js apps powered by TypeScript.</li>\n<li><strong><a href=\"https://vsavkin.com/typescript-how-to-be-safe-even-if-you-cannot-type-it-31eb08485fe6\">Safety in the Absence of Types</a></strong>: Victor Savking talks about the limitation of TypeScript's static type checker and how to mitigate them.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Uniform Resource Identifier (URI)</strong>: URI is a string of characters used to identify a resource. The most common form of URI is the Uniform Resource Locator (URL).</p>\n<ul>\n<li><strong><a href=\"https://www.w3.org/TR/webarch/#identification\">Architecture of the World Wide Web: Identification</a></strong>: This architecture document by W3C discusses the core design components of the Web. They are identification of resources, representation of resource state, and the protocols that support the interaction between agents and resources in the space.</li>\n<li><strong><a href=\"https://github.com/pid/speakingurl\">SpeakingURL</a></strong>: This module aims to transliterate the input string and create a so-called Semantic or Speaking URL.</li>\n<li><strong><a href=\"http://medialize.github.io/URI.js/\">URI.js</a></strong>: URI.js is a javascript library for working with URLs. It offers a \"jQuery-style\" API to read and write all regular components and a number of convenience methods.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://w3c.github.io/web-animations/\">Web Animations API</a></strong>: Web Animations is a new JavaScript API for driving animated content on the web. By unifying the animation features of SVG and CSS, Web Animations unlocks features previously only usable declaratively, and exposes powerful, high-performance animation capabilities to developers.</p>\n<ul>\n<li><strong><a href=\"https://birtles.github.io/areweanimatedyet/\">Are we animated yet?</a></strong>: This page tracks the progress of implementing the Web Animations API in Firefox.</li>\n<li><strong><a href=\"http://codepen.io/danwilson/pen/XmWraY\">WAAPI Browser Support Test (+ Polyfill)</a></strong>: This codepen tests whether and to which extend your browser supports Web Animations API. The test is run after including the Polyfill.</li>\n<li><strong><a href=\"https://github.com/web-animations/web-animations-js\">Web Animations Polyfill</a></strong>: JavaScript implementation of the Web Animations API.</li>\n</ul>\n</li>\n<li>\n<p><strong>WebAssembly</strong>: WebAssembly is meant to fill a place that JavaScript has been forced to occupy up to now: a low-level code representation that can serve as a compiler target.</p>\n<ul>\n<li><strong><a href=\"https://auth0.com/blog/2015/10/14/7-things-you-should-know-about-web-assembly/\">7 Things You Should Know About WebAssembly</a></strong>: In this post we will explore seven key facts about WebAssembly, one of the biggest changes the web will experience in the coming years.</li>\n</ul>\n</li>\n</ul>\n<h2>User Interface Components</h2>\n<p>Drop-in UI components for web sites and applications.</p>\n<ul>\n<li>\n<p><strong>Buttons</strong>: The term button refers to any graphical control element that provides the user a simple way to trigger an event, like searching for a query at a search engine, or to interact with dialog boxes, like confirming an action.</p>\n<ul>\n<li><strong><a href=\"https://github.com/nashvail/Quttons\">Quantum Paper Buttons</a></strong>: With this plugin you can hide any div behind a Quantum Paper Button or Qutton. Qunatum Paper is a digital paper that can change its size, shape and color to accommodate new content. Quantum paper is part of Google's new Material Design language.</li>\n<li><strong><a href=\"http://sharingbuttons.io/\">Sharingbuttons.io</a></strong>: This generator outputs social media sharing buttons that do not use JavaScript, don't block your website from rendering, are accessible and don't track the user.</li>\n</ul>\n</li>\n<li><strong>Code</strong>: Code viewers and editors designed for embedding inside a website. + <strong><a href=\"http://jakiestfu.github.io/Behave.js/\">Behave.js</a></strong>: Behave.js is a lightweight library for adding IDE style behaviors to plain text areas, making it much more enjoyable to write code in. + <strong><a href=\"http://codemirror.net/\">CodeMirror</a></strong>: CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality. + <strong><a href=\"http://srobbin.com/jquery-plugins/intelligist/\">Intelligist</a></strong>: A jQuery plugin that makes it easy to share and demo code in-page, using GitHub gists. + <strong><a href=\"http://prismjs.com/\">Prism</a></strong>: Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. + <strong><a href=\"https://craig.is/making/rainbows\">Rainbow</a></strong>: Rainbow is a code syntax highlighting library written in Javascript.\nIt was designed to be lightweight, easy to use, and extendable.\nIt is completely themable via CSS. + <strong><a href=\"https://github.com/drudru/ansi_up\">ansi_up</a></strong>: A javascript library that converts text with ANSI terminal codes into colorful HTML + <strong><a href=\"http://julianlam.github.io/tabIndent.js/\">tabIndent.js</a></strong>: tabIndent.js enhances a textarea, so that the tab key no longer takes you to the next input, but rather, acts like a text editor by inserting a tab character.</li>\n<li>\n<p><strong>Forms</strong>: A HTML form on a web page allows a user to enter data that is sent to a server for processing. Web users fill out the forms using checkboxes, radio buttons, or text fields.</p>\n<ul>\n<li><strong><a href=\"https://github.com/alaabadran/ALAJAX\">ALAJAX</a></strong>: A jQuery plugin to convert normal HTML forms into AJAX forms simply. It Ajaxifys your HTML Form with this plugin. No change will be required on Server-Side.</li>\n<li><strong><a href=\"http://schneiderik.github.io/fields/\">Fields.js</a></strong>: An abstract way of interacting with fields. Fields.js creates collections of fields. Each field is constantly evaluated for validity, and is accessible through the collection.</li>\n<li><strong><a href=\"http://kumailht.com/gridforms/\">Grid Forms</a></strong>: A tiny Javascript/CSS framework that helps you make forms on grids with ease.</li>\n<li><strong><a href=\"https://github.com/zoltan-dulac/html5Forms.js\">HTML5Forms.js</a></strong>: HTML5Forms.js is a JavaScript polyfill that implements a subset of the HTML5 Forms module in all browsers. The script will only add support for the different parts of the module when there doesn't exist a native implementation.</li>\n<li><strong><a href=\"https://github.com/hakimel/Ladda\">Ladda</a></strong>: Buttons with built-in loading indicators.</li>\n<li><strong><a href=\"http://nativeformelements.com/\">Native form elements</a></strong>: This is what every HTML5 form element looks like on your current operating system and browser.</li>\n<li><strong><a href=\"https://github.com/erikras/redux-form\">Redux Form</a></strong>: A Higher Order Component using react-redux to keep form state in a Redux store.</li>\n<li>\n<p><strong>Serializers</strong>: Libraries for collecting form data in JavaScript.</p>\n<ul>\n<li><strong><a href=\"https://github.com/maxatwork/form2js\">form2js</a></strong>: Convenient way to collect structured form data into JavaScript object.</li>\n<li><strong><a href=\"https://github.com/hongymagic/jQuery.serializeObject\">jQuery.serializeObject</a></strong>: Encode a set of form elements as a JSON object for manipulation/submission.</li>\n<li><strong><a href=\"https://github.com/macek/jquery-serialize-object\">jquery-serialize-object</a></strong>: Adds the method serializeObject to jQuery, to perform complex form serialization into JavaScript objects.</li>\n<li><strong><a href=\"https://github.com/danheberden/jquery-serializeForm\">jquery.serializeJSON</a></strong>: Make an object out of form elements.</li>\n<li><strong><a href=\"https://github.com/danheberden/jquery-serializeForm\">serializeForm</a></strong>: jQuery plugin to serialize form elements into an object.</li>\n</ul>\n</li>\n<li>\n<p><strong>Validation</strong>: A form validation behavior checks data against a set of criteria before passing it along to the server.</p>\n<ul>\n<li><strong><a href=\"https://css-tricks.com/form-validation-ux-html-css/\">Form Validation UX in HTML and CSS</a></strong>: Chris Coyier describes how to implement form validation with just HTML attributes and some CSS trickery.</li>\n<li><strong><a href=\"https://github.com/mailcheck/mailcheck\">Mailcheck.js</a></strong>: The Javascript library and jQuery plugin that suggests a right domain when your users misspell it in an email address.</li>\n<li><strong><a href=\"https://github.com/One-com/one-validation\">One Validation</a></strong>: This is a collection of regular expressions for general validation purposes. The basic design concept is to split up the regexes into semantic parts of the pattern to match.</li>\n<li><strong><a href=\"https://github.com/guillaumepotier/Parsley.js\">Parsley</a></strong>: JavaScript form validation, without actually writing a single line of JavaScript!</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/remybach/jQuery.superLabels\">jQuery Super Labels Plugin</a></strong>: This plugin was born out of the need to use the label-over-field method for forms.</li>\n</ul>\n</li>\n<li>\n<p><strong>Galeries &#x26; Image Sliders</strong>: A sophisticated way to present a collection of images on your website.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sachinchoolur/lightgallery.js/\">Lightgallery.js</a></strong>: Full featured JavaScript Lightbox gallery without any dependencies.</li>\n</ul>\n</li>\n<li>\n<p><strong>Grid</strong>: CSS Grid Layout Systems.</p>\n<ul>\n<li><strong><a href=\"http://neat.bourbon.io/\">Bourbon Neat</a></strong>: A lightweight semantic grid framework for Sass and Bourbon.</li>\n<li><strong><a href=\"http://www.profoundgrid.com/\">Profound Grid</a></strong>: A responsive grid system for fixed and fluid layouts. Built in SCSS, it gives you flexibility and full control.</li>\n<li><strong><a href=\"http://rwdgrid.com/\">RWDGrid</a></strong>: 2kb, Mobile First Grid System, HTML5 Boilerplate Head, 960grid like naming convention. PSD Grid included.</li>\n<li><strong><a href=\"http://thisisdallas.github.io/Simple-Grid/\">Simple Grid</a></strong>: Simple Grid was created for developers who need a barebones grid. With fluid columns, Simple Grid is responsive down to mobile.</li>\n</ul>\n</li>\n<li>\n<p><strong>Rich Text Editors</strong>: A rich text editor is the interface for editing rich text within web browsers. The aim is to reduce the effort for users trying to express their formatting directly as valid HTML markup.</p>\n<ul>\n<li>\n<p><strong>Content Sanitizers</strong>: Rich text editors often produce unclean input when you copy &#x26; paste some content into them. Content sanitizers help you clean up the text.</p>\n<ul>\n<li><strong><a href=\"http://willemmulder.github.io/FilteredPaste.js/\">FilteredPaste.js</a></strong>: A jQuery plugin that filters any pasted input so that your application gets clean input, without any tags or attributes that you don't want.</li>\n<li><strong><a href=\"https://github.com/gbirke/sanitize.js\">Sanitize.js</a></strong>: Sanitize.js is a whitelist-based HTML sanitizer. Given a list of acceptable elements and attributes, Sanitize.js will remove all unacceptable HTML from a DOM node.</li>\n<li><strong><a href=\"https://github.com/guardian/html-janitor\">html-janitor</a></strong>: Cleans up your markup and allows you to take control of your HTML. HTMLJanitor uses a defined whitelist to limit HTML it is given to a defined subset.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://createjs.org/\">Create.js</a></strong>: Create.js is a comprehensive web editing interface for Content Management Systems. It is designed to provide a modern, fully browser-based HTML5 environment for managing content</li>\n<li><strong><a href=\"http://will-hart.github.io/demarcate.js/\">Demarcate</a></strong>: demarcate.js lets you edit directly in a page and generate Markdown back from the HTML elements.</li>\n<li><strong><a href=\"http://hallojs.org/\">Hallo</a></strong>: Hallo is the simplest web editor imaginable. Instead of cluttered forms or toolbars, you edit your web content as it is. Just you, your web design, and your content.</li>\n<li>\n<p><strong>Inspired by Medium</strong>: Medium.com has a great and simple rich text editor built in. This libraries try to clone its behavior.</p>\n<ul>\n<li><strong><a href=\"https://github.com/jakiestfu/Medium.js\">Medium.js</a></strong>: A tiny JavaScript library for making contenteditable beautiful (Like Medium's editor)</li>\n<li><strong><a href=\"http://sofish.github.io/pen/\">Pen</a></strong>: Rich text editor inspired by Medium and backed by Markdown.</li>\n<li><strong><a href=\"https://github.com/mduvall/grande.js\">grande.js</a></strong>: A small Javascript library that implements features from Medium's editing experience.</li>\n<li><strong><a href=\"https://github.com/yabwe/medium-editor\">medium-editor</a></strong>: Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/JoelOtter/kajero\">Kajero</a></strong>: Interactive JavaScript notebooks with markdown support and clever graphing.</li>\n<li><strong><a href=\"http://markitup.jaysalvat.com/\">MarkItUp</a></strong>: markItUp! is a JavaScript plugin built on the jQuery library. It allows you to turn any textarea into a markup editor.</li>\n<li><strong><a href=\"http://jejacks0n.github.io/mercury/\">Mercury Editor</a></strong>: Mercury is a full featured HTML5 editor. It was built from the ground up to help your team get the most out of content editing in modern browsers.</li>\n<li><strong><a href=\"https://github.com/quilljs/quill/\">Quill</a></strong>: Quill is a modern rich text editor built for compatibility and extensibility. It was created by Jason Chen and Byron Milligan and open sourced by Salesforce.com.</li>\n<li>\n<p><strong><a href=\"https://github.com/guardian/scribe\">Scribe</a></strong>: A rich text editor framework for the web platform, with patches for browser inconsistencies and sensible defaults. Developed by The Guardian.</p>\n<ul>\n<li><strong><a href=\"https://www.theguardian.com/info/developer-blog/2014/mar/20/inside-the-guardians-cms-meet-scribe-an-extensible-rich-text-editor\">Inside the Guardian's CMS: meet Scribe, an extensible rich text editor</a></strong>: The team behind the Guardian's digital content management system talk about how and why they built and open sourced Scribe.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://substance.io/\">Substance</a></strong>: Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/@_mql/build-your-own-editor-with-substance-7790eb600109\">Build your own editor with Substance</a></strong>: This article describes the philosophy behind Substance and how to get started.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://textangular.com/\">TextAngular</a></strong>: A Lightweight, Two-Way-Bound Angular.js Text-Editor.</li>\n<li>\n<p><strong><a href=\"http://xing.github.io/wysihtml5/\">WYSIHTML5</a></strong>: wysihtml5 is an open source rich text editor based on HTML5 technology and the progressive-enhancement approach. It aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.</p>\n<ul>\n<li><strong><a href=\"https://github.com/Voog/wysihtml\">Voog fork</a></strong>: wysihtml is an extended and less strict approach on xing/wysihtml5 open source rich text editor based on HTML5 technology. The code is completely library agnostic: No jQuery, Prototype or similar is required.</li>\n<li><strong><a href=\"https://github.com/zohararad/wysihtml5n\">WYSIHTML5 Enhanced</a></strong>: WYSIHTML5 Enhanced is a rich-text editor, based on the wonderful wysihtml5 editor, with a bit of help from Twitter Bootstrap, Font-Awesome, Jcrop and HTML5's Drag &#x26; Drop and File API.</li>\n<li><strong><a href=\"https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg\">bootstrap3-wysiwyg</a></strong>: Bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of wysihtml5 and Twitter Bootstrap.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://vitalets.github.io/x-editable/\">X-editable</a></strong>: This library allows you to create editable elements on your page. It can be used with any engine (bootstrap, jquery-ui, jquery only) and includes both popup and inline modes.</li>\n</ul>\n</li>\n<li>\n<p><strong>Table Of Contents</strong>: Components for automatic table of contents generation.</p>\n<ul>\n<li><strong><a href=\"http://tscanlin.github.io/tocbot/\">Tocbot</a></strong>: Tocbot builds a table of contents (TOC) from headings in an HTML document.</li>\n</ul>\n</li>\n<li>\n<p><strong>UI Kits</strong>: Collections of ready to use components.</p>\n<ul>\n<li><strong><a href=\"https://cloudflare.github.io/cf-ui/\">CloudFlare Components</a></strong>: A set of UI components built by CloudFlare and based on React.</li>\n<li><strong><a href=\"http://ink.sapo.pt/\">Ink</a></strong>: An HTML5/CSS3 framework used at SAPO for fast and efficient website design and prototyping.</li>\n<li><strong><a href=\"http://www.primefaces.org/primeng/\">PrimeNG</a></strong>: PrimeNG is a collection of rich UI components for AngularJS2. PrimeNG is a sibling of the popular JavaServer Faces Component Suite, PrimeFaces.</li>\n<li><strong><a href=\"http://primercss.io/\">Primer</a></strong>: Primer is GitHub's internal CSS framework. It includes basic global styling for typography, small components like buttons and tabs, and our general guidelines for writing HTML and CSS.</li>\n<li><strong><a href=\"http://purecss.io/\">Pure.css</a></strong>: A set of small, responsive CSS modules that you can use in every web project.</li>\n<li><strong><a href=\"http://getuikit.com/\">UIkit</a></strong>: A lightweight and modular front-end framework and a set of components for developing fast and powerful web interfaces.</li>\n<li><strong><a href=\"http://doximity.github.io/vital/\">Vital</a></strong>: A minimally invasive CSS framework for modern web applications.</li>\n</ul>\n</li>\n<li>\n<p><strong>Video &#x26; Audio</strong>: Components for playing audio and video files on a website.</p>\n<ul>\n<li><strong><a href=\"http://kolber.github.io/audiojs/\">Audio.js</a></strong>: audio.js is a drop-in javascript library that allows HTML5's audio tag to be used anywhere.</li>\n<li><strong><a href=\"https://github.com/goldfire/howler.js\">Howler.js</a></strong>: howler.js is an audio library for the modern web. It defaults to Web Audio API and falls back to HTML5 Audio.</li>\n<li><strong><a href=\"http://jplayer.org/\">JPlayer</a></strong>: jPlayer a media library written in JavaScript. A jQuery plugin, jPlayer allows you to rapidly weave cross platform audio and video into your web pages.</li>\n<li><strong><a href=\"http://mediaelementjs.com/\">MediaElement.js</a></strong>: HTML5 audio or video player with Flash and Silverlight shims that mimics the HTML5 MediaElement API, enabling a consistent UI in all browsers.</li>\n<li><strong><a href=\"https://stratus.soundcloud.com/\">Stratus 2</a></strong>: Stratus is a jQuery powered SoundCloud player that lives at the bottom (or top) of your website or blog.</li>\n<li><strong><a href=\"https://github.com/videojs/video.js\">Video.js</a></strong>: Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through plugins). It supports video playback on desktops and mobile devices.</li>\n</ul>\n</li>\n</ul>\n<h2>Workflow</h2>\n<p>Task automation and asset delivery.</p>\n<ul>\n<li><strong>Automated Testing</strong>: Automated software testing is a process in which software tools execute pre-scripted tests on a software application before it is released into production. + <strong><a href=\"https://medium.com/javascript-scene/5-common-misconceptions-about-tdd-unit-tests-863d5beb3ce9\">5 Common Misconceptions About TDD &#x26; Unit Tests</a></strong>: Eric Elliott breaks down some common misconceptions and explains how you can benefit the most from TDD &#x26; unit tests. + <strong><a href=\"http://jrsinclair.com/articles/2016/gentle-introduction-to-javascript-tdd-intro/\">A Gentle Introduction to Javascript Test Driven Development</a></strong>: Over the course of the series, James Sinclair works through developing a full application in JavaScript that involves making network requests and manipulating the DOM. + <strong><a href=\"https://shanetomlinson.com/2013/testing-javascript-frontend-part-1-anti-patterns-and-fixes/\">Anti-patterns and Their Fixes</a></strong>: Shane Tomlinson presents a sample application that contains several common anti-patterns and how these can be refactored to be more testable. + <strong><a href=\"http://chaijs.com/\">Chai</a></strong>: Chai is a BDD/TDD assertion library for node and the browser that can be paired with any JavaScript testing framework. + <strong><a href=\"https://cucumber.io/\">Cucumber</a></strong>: Cucumber is a software tool that computer programmers use for testing other software. It runs automated acceptance tests written in a behavior-driven development (BDD) style. + <strong><a href=\"https://github.com/cucumber/cucumber-js\">Cucumber.js</a></strong>: Cucumber.js is a Cucumber implementation written in pure JavaScript. It runs on Node.js, IO.js, browsers and any other JavaScript platform. + <strong><a href=\"https://github.com/cucumber/cucumber/wiki/Gherkin\">Gherkin</a></strong>: Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software's behaviour without detailing how that behaviour is implemented. + <strong><a href=\"http://galoisinc.github.io/FiveUI/\">FiveUI</a></strong>: FiveUI is an extensible tool for evaluating HTML user interfaces\nagainst sets of codified UI Guidelines. + <strong><a href=\"https://dannorth.net/introducing-bdd/\">Introducing BDD</a></strong>: Dan North introduces behaviour-driven development (BDD). A software development process that emerged from test-driven development (TDD). + <strong><a href=\"https://github.com/jasmine/jasmine\">Jasmine</a></strong>: Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run. + <strong><a href=\"https://www.sitepoint.com/javascript-testing-unit-functional-integration/\">JavaScript Testing: Unit vs Functional vs Integration Tests</a></strong>: Unit tests, integration tests, and functional tests are all types of automated tests which form essential cornerstones of continuous delivery, a development methodology that allows you to safely ship changes to production in days or hours rather than months or years. + <strong><a href=\"https://github.com/facebook/jest\">Jest</a></strong>: A JavaScript unit testing framework, used by Facebook to test services and React applications. + <strong><a href=\"http://devlucky.github.io/kakapo-js\">Kakapo.js</a></strong>: Kakapo its a full featured http mocking library, he allows you to entirely replicate your backend logic in simple and declaritive way directly in the browser. + <strong><a href=\"http://karma-runner.github.io/\">Karma</a></strong>: A simple tool that allows you to execute JavaScript code in multiple real browsers. + <strong><a href=\"https://github.com/box/leche\">Leche</a></strong>: A JavaScript testing utility designed to work with Mocha and Sinon. This is intended for use both by Node.js and in browsers, so any changes must work in both locations. + <strong><a href=\"https://remysharp.com/2015/12/14/my-node-test-strategy\">My Node Test Strategy</a></strong>: Remy Sharp shates his automated testing process with tape, proxyquire, sinon and browserify. + <strong><a href=\"https://github.com/Huddle/PhantomCSS\">PhantomCSS</a></strong>: PhantomCSS takes screenshots and compares them to baseline images to test for RGB pixel differences. PhantomCSS then generates image diffs to help you find the cause. + <strong><a href=\"http://qunitjs.com/\">QUnit</a></strong>: QUnit is a powerful, easy-to-use JavaScript unit testing framework. It's used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code. + <strong><a href=\"https://shanetomlinson.com/2013/writing-testable-javascript-part-2-refactor-away-anti-patterns/\">Refactor Away Anti-Patterns</a></strong>: Shane Tomlinson continues by refactoring the original application, including testing anti patterns, to be easier to read, easier to reuse, and easier to test. + <strong><a href=\"https://github.com/domenic/sinon-chai\">Sinon.JS Assertions for Chai</a></strong>: Sinon-Chai provides a set of custom assertions for using the Sinon.JS spy, stub, and mocking framework with the Chai assertion library. You get all the benefits of Chai with all the powerful tools of Sinon.JS. + <strong><a href=\"http://sinonjs.org/\">Sinon.js</a></strong>: Standalone test spies, stubs and mocks for JavaScript. No dependencies, works with any unit testing framework. + <strong><a href=\"http://codeutopia.net/blog/2016/05/23/sinon-js-quick-tip-how-to-stubmock-complex-objects-such-as-dom-objects/\">How to Stub/Mock Complex Objects</a></strong>: In this article, we'll look at how to stub objects which are deeply nested, and when functions have more complex return values and they interact with other objects. + <strong><a href=\"https://github.com/substack/tape\">Tape</a></strong>: Tap-producing test harness for node and browsers. + <strong><a href=\"https://ponyfoo.com/articles/testing-javascript-modules-with-tape\">Testing JavaScript Modules with Tape</a></strong>: In this article we will get an in-depth look at three modules: tape, proxyquire, and sinon. + <strong><a href=\"https://medium.com/javascript-scene/why-i-use-tape-instead-of-mocha-so-should-you-6aa105d8eaf4#.fjpja613n\">Why I use Tape Instead of Mocha &#x26; So Should You</a></strong>: Eric Elliott describes the advantages of Tape and compares it to more popular testing frameworks. + <strong><a href=\"https://github.com/leebyron/testcheck-js\">TestCheck</a></strong>: TestCheck is a library for generative testing of program properties, ala QuickCheck. + <strong><a href=\"http://silvenon.com/testing-react-and-redux/\">Testing a React &#x26; Redux Codebase</a></strong>: This series aims to be a very comprehensive guide through testing a React and Redux codebase, where you can really cover a lot with just unit tests because the code is mostly universal. + <strong>Writing Testable JavaScript</strong>: Rebecca Murphey discusses how to organize code to make JavaScript more testable in unit tests.</li>\n<li>\n<p><strong>Build Tools</strong>: Toolkits and their ecosystems, that help you automate painful and repeated tasks.</p>\n<ul>\n<li><strong><a href=\"http://indigounited.com/automaton/\">Automaton</a></strong>: Task automation tool built in JavaScript.</li>\n<li>\n<p><strong><a href=\"http://gruntjs.com/\">Grunt</a></strong>: Grunt is a task-based command line build tool for JavaScript projects.</p>\n<ul>\n<li><strong><a href=\"http://mattbailey.io/a-beginners-guide-to-grunt-redux.html\">A beginner's guide to Grunt: Redux</a></strong>: Simple Grunt boilerplate for frontend workflow with detailed instructions.</li>\n<li><strong><a href=\"https://github.com/tsvensen/gruntstart\">GruntStart</a></strong>: A Grunt-enabled head-start with the H5BP, jQuery, Modernizr, and Respond. The building blocks to quickly get started with Grunt to create an optimized website.</li>\n<li><strong><a href=\"http://mattbailey.io/grunt-synchronised-testing-between-browsers-devices\">Synchronised Testing Between Browsers/Devices</a></strong>: The article describes an easy way to test your projects on your devices.</li>\n<li><strong><a href=\"http://ruudud.github.io/2012/12/22/grunt/\">Web development is getting complex. Let's go shopping.</a></strong>: A step by step tutorial for building a new project with grunt.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://gulpjs.com/\">Gulp</a></strong>: Gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow. It's very fast, platform-agnostic and simple.</p>\n<ul>\n<li>\n<p><strong>Articles &#x26; Tutorials</strong>: Publications about gulp or step by step guides for setting up and using gulp in a project.</p>\n<ul>\n<li>\n<p><strong>Building with Gulp 3 and 4 (Series)</strong>: Great series of articles about single components and gulp as a whole.</p>\n<ul>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/04/23/building-with-gulp-3-and-4-part-1-examples/\">Part 1: Examples</a></strong>: Introduction to gulp and gulpfile.js.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/04/23/building-with-gulp-3-and-4-part-2-gulp-anatomy/\">Part 2: Gulp's anatomy</a></strong>: Orchestrator, Undertaker, Vinyl and Vinyl FS, Gulp Plugins.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/04/28/building-with-gulp-3-and-4-part-3-writing-transformers/\">Part 3: Writing transformers</a></strong>: Using map-stream, though2 and event-stream.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/05/01/building-with-gulp-4-part-4-incremental-builds/\">Part 4: Incremental builds</a></strong>: Building files which changed since last run and caching.</li>\n<li><strong><a href=\"http://blog.reactandbethankful.com/posts/2015/05/05/building-with-gulp-part-5-caveats/\">Part 5: Caveats</a></strong>: Error management in Gulp 3 and \"MANY:1 disguised as a 1:1\" problem.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://medium.com/@contrahacks/gulp-3828e8126466\">The vision, history, and future of the project (Apr. 2014)</a></strong>: The article talks about Streams, Vinyl, Vinyl Adapters, Orchestrator and Error Management in Gulp 4.</li>\n<li><strong><a href=\"http://scm.io/blog/hack/2014/07/why-gulp-might-not-be-the-answer/\">Why Gulp might not be the Answer</a></strong>: ... there is still a conceptual problem that Gulp has yet to address. Many build steps are not 1:1 (one file in, one file out) but rather n:1 or 1:n.</li>\n</ul>\n</li>\n<li>\n<p><strong>CSS</strong>: Gulp plugins for working with CSS files.</p>\n<ul>\n<li><strong><a href=\"https://github.com/scniro/gulp-clean-css\">gulp-clean-css</a></strong>: gulp plugin to minify CSS, using clean-css.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-cssnano\">gulp-cssnano</a></strong>: Minify CSS with cssnano.</li>\n</ul>\n</li>\n<li>\n<p><strong>Concatenation</strong>: Plugins for file concatenation. For example bundling CSS or JavaScript files.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-concat\">gulp-concat</a></strong>: This plugin will concat files by your operating systems newLine. It will take the base directory from the first file that passes through it.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-group-concat\">gulp-group-concat</a></strong>: Concats groups of files into a smaller number of files</li>\n</ul>\n</li>\n<li>\n<p><strong>Deployment</strong>: Plugins for pushing built files into production.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-tar\">gulp-tar</a></strong>: Create tarball from files.</li>\n<li><strong><a href=\"https://github.com/morris/vinyl-ftp\">vinyl-ftp</a></strong>: Blazing fast vinyl adapter for FTP.</li>\n<li><strong><a href=\"https://github.com/izaakschroeder/vinyl-s3\">vinyl-s3</a></strong>: Use S3 as a source or destination of vinyl files.</li>\n</ul>\n</li>\n<li>\n<p><strong>Ecosystem</strong>: The network of developers and plugins around gulp.</p>\n<ul>\n<li><strong><a href=\"https://github.com/search?q=%40sindresorhus+gulp-\">@sindresorhus plugins</a></strong>: A collection of plugins by Sindre Sorhus.</li>\n<li><strong><a href=\"https://www.npmjs.com/browse/keyword/gulpfriendly\">Gulp Friendly NPM Packages</a></strong>: Normal node packages that work with gulp.</li>\n</ul>\n</li>\n<li>\n<p><strong>Filters</strong>: Plugins for filtering files in a vinyl stream.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-cache\">gulp-cache</a></strong>: A temp file based caching proxy task for gulp.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-cached\">gulp-cached</a></strong>: A simple in-memory file cache for gulp.</li>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-changed\">gulp-changed</a></strong>: Only pass through changed files.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-filter\">gulp-filter</a></strong>: Filter files in a vinyl stream.</li>\n<li><strong><a href=\"https://github.com/tschaub/gulp-newer\">gulp-newer</a></strong>: Pass through newer source files only.</li>\n<li><strong><a href=\"https://github.com/ahaurw01/gulp-remember\">gulp-remember</a></strong>: A plugin for gulp that remembers and recalls files passed through it.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-diff\">vinyl-diff</a></strong>: This library allows you to perform diffs between streams of vinyl.</li>\n</ul>\n</li>\n<li>\n<p><strong>Images</strong>: Plugins for working with images.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-imagemin\">gulp-imagemin</a></strong>: Minify PNG, JPEG, GIF and SVG images.</li>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-webp\">gulp-webp</a></strong>: Convert PNG, JPEG, TIFF images to WebP.</li>\n</ul>\n</li>\n<li>\n<p><strong>JavaScript</strong>: Module loaders, minifiers and other tools for working with JavaScript files.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-pure-cjs\">gulp-pure-cjs</a></strong>: Gulp plugin for Pure CommonJS builder.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-uglify\">gulp-uglify</a></strong>: Minify files with UglifyJS.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/yoloader\">yoloader</a></strong>: A CommonJS module loader implementation. It provides tools to bundle a CommonJS based project and to load such bundles.</li>\n</ul>\n</li>\n<li>\n<p><strong>SourceMaps</strong>: A source map provides a way of mapping code within a compressed file back to it's original position in a source file.</p>\n<ul>\n<li><strong><a href=\"https://github.com/floridoo/gulp-sourcemaps/wiki/Plugins-with-gulp-sourcemaps-support\">Plugins with gulp sourcemaps support</a></strong>: A list of plugins which support gulp-sourcemaps.</li>\n<li><strong><a href=\"https://github.com/floridoo/gulp-sourcemaps\">gulp-sourcemaps</a></strong>: Source map support for Gulp.js</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-sourcemaps-apply\">vinyl-sourcemaps-apply</a></strong>: Apply a source map to a vinyl file, merging it with preexisting source maps.</li>\n</ul>\n</li>\n<li>\n<p><strong>Utility</strong>: Tools and parts for building gulp plugins.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-count\">gulp-count</a></strong>: Count files in a vinyl stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/gulp-debug\">gulp-debug</a></strong>: Debug vinyl file streams to see what files are run through your gulp pipeline.</li>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-size\">gulp-size</a></strong>: Logs out the total size of files in the stream and optionally the individual file-sizes.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/lazypipe\">lazypipe</a></strong>: Lazypipe allows you to create an immutable, lazily-initialized pipeline. It's designed to be used in an environment where you want to reuse partial pipelines, such as with gulp.</li>\n<li><strong><a href=\"https://github.com/dominictarr/map-stream\">map-stream</a></strong>: Create a through stream from an asyncronous function.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"https://github.com/gulpjs/vinyl\">Vinyl</a></strong>: Vinyl is a very simple metadata object that describes a file.</p>\n<ul>\n<li><strong><a href=\"https://github.com/sindresorhus/gulp-chmod\">gulp-chmod</a></strong>: Change permissions of Vinyl files.</li>\n<li><strong><a href=\"https://github.com/hparra/gulp-rename\">gulp-rename</a></strong>: A plugin to rename files easily.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/mem-fs\">mem-fs</a></strong>: Simple in-memory vinyl file store.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-ast\">vinyl-ast</a></strong>: Parse-once and generate-once AST tool bridge for Gulp plugins.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-buffer\">vinyl-buffer</a></strong>: Creates a transform stream that takes vinyl files as input, and outputs buffered (isStream() === false) vinyl files as output.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-file\">vinyl-file</a></strong>: Create a vinyl file from an actual file.</li>\n<li><strong><a href=\"https://github.com/wearefractal/vinyl-fs\">vinyl-fs</a></strong>: Vinyl adapter for the file system.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-fs-fake\">vinyl-fs-fake</a></strong>: A vinyl adapter that extends vinyl-fs to allow for easy debugging by passing in virtual files instead of globs, and calling a function instead of writing.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-git\">vinyl-git</a></strong>: Vinyl adapter for git.</li>\n<li><strong><a href=\"https://github.com/hughsk/vinyl-map\">vinyl-map</a></strong>: Map vinyl files' contents as strings, so you can easily use existing code without needing yet another gulp plugin!</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-paths\">vinyl-paths</a></strong>: Get the file paths in a vinyl stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-source-buffer\">vinyl-source-buffer</a></strong>: Convert a text stream into a vinyl pipeline whose content is a buffer.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-source-stream\">vinyl-source-stream</a></strong>: Use conventional text streams at the start of your gulp or vinyl pipelines, making for nicer interoperability with the existing npm stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-to-stream\">vinyl-to-stream</a></strong>: Convert a vinyl stream to a text stream.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/vinyl-transform\">vinyl-transform</a></strong>: Wraps standard text transform streams so you can write fewer gulp plugins. Fulfills a similar use case to vinyl-map and vinyl-source-stream.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"http://mimosajs.com\">Mimosa</a></strong>: Mimosa is a batteries included web development workflow tool that will get you coding in seconds rather than hunting down plugins and wrangling config for hours.</li>\n<li>\n<p><strong><a href=\"https://github.com/amwmedia/plop\">Plop</a></strong>: Micro-generator framework that makes it easy for an entire team to create files with a level or uniformity.</p>\n<ul>\n<li><strong><a href=\"http://newbranch.cn/ui-development-with-es6-javascript-part-x-automating-workflow-with-plop/\">Automating Workflow with plop</a></strong>: Automating UI Development with Riot.js and ES6 Javascript.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://webpack.github.io/\">Webpack</a></strong>: Webpack is a module bundler. It takes modules with dependencies and generates static assets representing those modules.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack.</li>\n<li><strong><a href=\"http://dapperdeveloper.com/2016/05/18/developing-with-docker-and-webpack/\">Developing with Docker and Webpack</a></strong>: Chris Harrington explains how to create a development environment with Webpack and Docker to match the production as much as possible.</li>\n<li><strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development.</li>\n<li><strong><a href=\"http://www.davidmeents.com/how-to-set-up-webpack-image-loader/\">How to Set Up Webpack Image Loader</a></strong>: This brief tutorial will help you set up an image loader in Webpack.</li>\n<li><strong><a href=\"http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/\">The SoundCloud Client in React + Redux</a></strong>: After finishing this step by step tutorial you will be able to author your own React + Redux project with Webpack and Babel.</li>\n<li><strong><a href=\"http://survivejs.com/webpack/\">Webpack from Apprentice to Master</a></strong>: The purpose of this guide is to help you get started with Webpack and then go beyond basics.</li>\n<li><strong><a href=\"http://www.webpackbin.com/\">WebpackBin</a></strong>: A webpack code sandbox.</li>\n<li><strong><a href=\"http://devlog.disco.zone/2016/06/01/webpack/\">Why I think Webpack is the Right Approach To Build Pipelines</a></strong>: Thomas Boyt compares how Grunt, Gulp, Broccoli and Webpack discover dependencies.</li>\n</ul>\n</li>\n<li><strong><a href=\"http://yeoman.io/\">Yeoman</a></strong>: Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive. It provides a generator ecosystem.</li>\n</ul>\n</li>\n<li>\n<p><strong>CSS Tools</strong>: Tools for analysis, pre and post processing of CSS files.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.com/package/css-pack\">CSS Pack</a></strong>: Packs CSS dependency graphs produced from dgraph or module-deps into a single CSS bundle, assuming every node in the graph contains CSS source and the graph itself is sorted with deps-sort</li>\n<li><strong><a href=\"https://github.com/reworkcss/css-stringify\">CSS Stringify</a></strong>: CSS stringifier using the AST from 'css.parse'</li>\n<li><strong><a href=\"http://zmoazeni.github.io/csscss/\">CSSCSS</a></strong>: A CSS redundancy analyzer that analyzes redundancy.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/clean-css\">Clean CSS</a></strong>: Clean-css is a fast and efficient Node.js library for minifying CSS files.</li>\n<li><strong><a href=\"https://github.com/geuis/helium-css\">Helium CSS</a></strong>: Helium is a tool for discovering unused CSS across many pages on a web site.</li>\n<li>\n<p><strong><a href=\"http://postcss.org/\">PostCSS</a></strong>: PostCSS parses CSS into an abstract syntax tree (AST), passes it through a series of plugins, and then concatenates back into a string.</p>\n<ul>\n<li><strong><a href=\"https://www.sitepoint.com/an-introduction-to-postcss/\">An Introduction to PostCSS</a></strong>: This article describes what PostCSS is and how to get started.</li>\n<li><strong><a href=\"https://github.com/jacobp100/es-css-modules\">ES CSS Modules</a></strong>: PostCSS plugin that combines CSS Modules and ES Imports.</li>\n<li><strong><a href=\"https://www.sitepoint.com/improving-the-quality-of-your-css-with-postcss/\">Improving the Quality of Your CSS with PostCSS</a></strong>: In this article, we will explore how we can utilise PostCSS to help us maintain a higher quality in our CSS code.</li>\n<li><strong><a href=\"https://www.reactstarterkit.com/\">React Starter Kit</a></strong>: Isomorphic web app boilerplate including Node.js, Express, GraphQL, React.js, Babel 6, PostCSS, Webpack, Browsersync.</li>\n<li><strong><a href=\"https://css-tricks.com/images-in-postcss/\">Working with Images in Stylesheets</a></strong>: Aleks Hudochenkov does a great job of showcasing what PostCSS is good at and the role it has grown into in the front end stack.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://stylelint.io/\">Stylelint</a></strong>: Stylelint's ambitious goal is to supplement our discipline with automatic enforcement — to provide a core set of rules and a pluggable framework that CSS authors can use to enforce their own strategies.</p>\n<ul>\n<li><strong><a href=\"https://css-tricks.com/stylelint/\">Lint your CSS with Stylelint</a></strong>: David Clark writes about reasons for using a CSS linter and advantages of Stylelint.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Code Editors</strong>: Text editor programs designed specifically for editing source code of a website.</p>\n<ul>\n<li><strong><a href=\"https://atom.io/\">Atom</a></strong>: Atom is a text editor that's modern, approachable, yet hackable to the core—a tool you can customize to do anything but also use productively without ever touching a config file.</li>\n<li><strong><a href=\"http://brackets.io/\">Brackets</a></strong>: An open source code editor for the web, written in JavaScript, HTML and CSS.</li>\n<li><strong><a href=\"https://notepad-plus-plus.org/\">Notepad++</a></strong>: Notepad++ is a free (as in \"free speech\" and also as in \"free beer\") source code editor and Notepad replacement that supports several languages. Running in the MS Windows environment, its use is governed by GPL License</li>\n<li><strong><a href=\"https://code.visualstudio.com/\">Visual Studio Code</a></strong>: Build and debug modern web and cloud applications. VS Code is free and available on your favorite platform - Linux, Mac OSX, and Windows.</li>\n</ul>\n</li>\n<li>\n<p><strong>Documentation</strong>: Writing, generating, publishing and consuming documentation for web deliverables.</p>\n<ul>\n<li><strong><a href=\"http://atomicdocs.io/\">Atomic Docs</a></strong>: Atomic Docs is a styleguide generator and component manager. Atomic Docs is built in PHP. Inspired by Brad Frost's Atomic Design principles.</li>\n<li><strong><a href=\"http://daux.io/\">Daux</a></strong>: Daux.io is a documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly.</li>\n<li><strong><a href=\"http://www.dexy.it/\">Dexy</a></strong>: Dexy makes it easier to create technical documents by doing the repetitive parts for you. Dexy provides a consistent interface to tools and scripts so you don't have to run them manually.</li>\n<li><strong><a href=\"http://jashkenas.github.io/docco/\">Docco</a></strong>: Docco is a quick-and-dirty documentation generator. It produces an HTML document that displays your comments intermingled with your code.</li>\n<li><strong><a href=\"http://usejsdoc.org/\">JSDoc Documentation</a></strong>: Comprehensive guide for JSDoc.</li>\n<li><strong><a href=\"https://github.com/rtomayko/ronn\">Ronn</a></strong>: Ronn builds manuals. It converts simple, human readable textfiles to roff for terminal display, and also to HTML for the web.</li>\n<li><strong><a href=\"https://github.com/plaid/transcribe\">Transcribe</a></strong>: Transcribe is a simple program which generates Markdown documentation from code comments.</li>\n<li><strong><a href=\"http://yui.github.io/yuidoc/\">YUIDoc</a></strong>: YUIDoc is a Node.js application that generates API documentation from comments in source, using a syntax similar to tools like Javadoc and Doxygen.</li>\n<li><strong><a href=\"http://doug-martin.github.io/coddoc/\">coddoc</a></strong>: coddoc is a jsdoc parsing library. Coddoc is different in that it is easily extensible by allowing users to add tag and code parsers. It also parses source code to be used in APIs.</li>\n<li><strong><a href=\"http://devdocs.io/\">devdocs.io</a></strong>: Devdocs is an all-in-one API documentation reader with a fast, organized, and consistent interface.</li>\n<li><strong><a href=\"https://github.com/visionmedia/dox\">dox</a></strong>: JavaScript documentation generator for node using markdown and jsdoc.</li>\n<li><strong><a href=\"http://jacobrask.github.io/styledocco/\">styledocco</a></strong>: StyleDocco generates documentation and style guide documents from your stylesheets.</li>\n</ul>\n</li>\n<li>\n<p><strong>Fonts for Programmers</strong>: Programmers need special fonts, which help align the code and distinguish between characters, that look alike.</p>\n<ul>\n<li><strong><a href=\"https://www.google.com/fonts/specimen/Droid+Sans+Mono\">Droid Sans Mono</a></strong>: Droid Sans Mono makes for a great programming font. Its only real flaw is the lack of a slashed zero.</li>\n<li><strong><a href=\"http://cdn.sixrevisions.com/0441-01_programming-fonts/demo/programming-fonts.html\">Free Programming Fonts</a></strong>: A demonstration of beautiful fonts for people who love to code.</li>\n<li><strong><a href=\"https://github.com/madmalik/mononoki\">Mononoki</a></strong>: Mononoki is a typeface by Matthias Tellen, created to enhance code formatting.</li>\n<li><strong><a href=\"http://tobiasjung.name/profont/\">Profont</a></strong>: Profont is a monospaced font created to be a most readable font for programming. It is designed to look good a really small sizes</li>\n<li><strong><a href=\"https://github.com/adobe-fonts/source-code-pro\">Source Code Pro</a></strong>: Source Code Pro is a set of OpenType fonts that have been designed to work well in user interface (UI) environments.</li>\n<li><strong><a href=\"https://fonts.google.com/specimen/Space%20Mono\">Space Mono</a></strong>: Space Mono is an original fixed-width type family designed by Colophon Foundry for Google Design.</li>\n</ul>\n</li>\n<li>\n<p><strong>Getting Started</strong>: Step by step guides for setting up a frontend development workflow.</p>\n<ul>\n<li>\n<p><strong><a href=\"http://www.gpmd.co.uk/blog/front-end-process-flat-builds-and-automation-part-1-introduction/\">Front-end Process - Flat Builds and Automation (series)</a></strong>: A flat build is basically the process of coding a static page (or pages) in HTML and CSS. The idea is to supply our developers with design assets such as style guides, pattern libraries or prototypes, including assets such as images, fonts, css, and javascript, as flat builds.</p>\n<ul>\n<li><strong><a href=\"http://www.gpmd.co.uk/blog/front-end-process-flat-builds-and-automation-part-4-css-framework/\">CSS Framework (Inuit)</a></strong>: In this part the author introduces the inuit CSS framework and describes how to integrate the framework into the development process.</li>\n<li><strong><a href=\"http://www.gpmd.co.uk/blog/front-end-process-flat-builds-and-automation-part-2-environment-setup-and-yeoman/\">Environment Setup &#x26; Yeoman</a></strong>: In this part the author outlines how to set up your dev environment, and how to scaffold a project using Yeoman.</li>\n<li><strong><a href=\"http://www.gpmd.co.uk/blog/front-end-process-flat-builds-and-automation-part-3-grunt-tasks/\">Grunt Tasks</a></strong>: The author outlined how to set up your dev environment, and how to scaffold a project using Yeoman. In this third part we will look at how to install and configure some grunt tasks.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>HTML Tools</strong>: Tools for pre and post processing of the HTML source code.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.org/package/html-inspector\">html-inspector</a></strong>: HTML Inspector is a code quality tool to help you and your team write better markup. It's written in JavaScript and runs in the browser, so testing your HTML has never been easier.</li>\n<li><strong><a href=\"https://www.npmjs.com/package/html-minifier\">html-minifier</a></strong>: HTMLMinifier is a highly configurable, well-tested, Javascript-based HTML minifier, with lint-like capabilities.</li>\n</ul>\n</li>\n<li>\n<p><strong>Image Post Processing</strong>: Tools for image conversion and optimization.</p>\n<ul>\n<li><strong><a href=\"https://github.com/JamieMason/ImageOptim-CLI\">ImageOptim-CLI</a></strong>: Make lossless optimisation of images part of your automated build process.</li>\n<li><strong><a href=\"https://github.com/tjko/jpegoptim\">Jpegoptim</a></strong>: Utility to optimize/compress JPEG files.</li>\n<li><strong><a href=\"https://www.keycdn.com/blog/optimize-images-for-web/\">Optimize Images for Web - Ultimate Guide</a></strong>: We will discuss the three areas in which you can better optimize images for web: better web performance, rank and index better in search engines, better social media engagement and CTR.</li>\n<li><strong><a href=\"http://pmt.sourceforge.net/pngcrush/\">Pngcrush</a></strong>: Pngcrush is an optimizer for PNG (Portable Network Graphics) files.</li>\n<li><strong><a href=\"https://github.com/jasonmoo/smlr\">SMLR</a></strong>: Re-encode jpeg images with no perceivable quality loss. Uses the butteraugli psychovisual comparison and k-ary search to determine the best jpeg quality setting.</li>\n</ul>\n</li>\n<li>\n<p><strong>JavaScript Tools</strong>: Tools for static analysis, pre and post processing of JavaScript files.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://babeljs.io/\">Babel</a></strong>: Babel is a generic multi-purpose compiler for JavaScript. Using Babel you can use (and create) the next generation of JavaScript, as well as the next generation of JavaScript tooling.</p>\n<ul>\n<li><strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development.</li>\n<li><strong><a href=\"https://scotch.io/tutorials/javascript-transpilers-what-they-are-why-we-need-them\">JavaScript Transpilers: What They Are &#x26; Why We Need Them</a></strong>: Learn how to use Babel, and what has to do with the future of JavaScript.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://developers.google.com/closure/compiler/\">Closure Compiler</a></strong>: The Closure Compiler parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.</li>\n<li><strong><a href=\"https://flowtype.org/\">Flow</a></strong>: Flow is a static type checker for JavaScript. It can be used to catch common bugs in JavaScript programs before they run.</li>\n<li>\n<p><strong><a href=\"https://github.com/facebook/jscodeshift\">JSCodeshift</a></strong>: Codemods are tools that assist large-scale, partially automatable codebase refactoring. JSCodeshift is a toolkit for running codemods over multiple JS files.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/airbnb-engineering/turbocharged-javascript-refactoring-with-codemods-b0cae8b326b9\">Turbocharged JavaScript Refactoring with Codemods</a></strong>: Joe Lencioni describes how they used codemods to transform a large JavaScript code base at AirBnB</li>\n</ul>\n</li>\n<li>\n<p><strong>JavaScript Code Linting</strong>: Linting is the process of running a program that will analyse code for potential errors.</p>\n<ul>\n<li><strong><a href=\"http://eslint.org/\">ESLint</a></strong>: The pluggable linting utility for JavaScript and JSX.</li>\n<li><strong><a href=\"http://jshint.com/\">JSHint</a></strong>: JSHint is a tool for more flexible static analysis of JavaScript programs.</li>\n<li><strong><a href=\"http://jslint.com/\">JSLint</a></strong>: JSLint is a tool for detecting errors or problems by static analysis of JavaScript programs.</li>\n<li><strong><a href=\"http://jslinterrors.com\">JSLint, JSHint and ESLint Error Explanations</a></strong>: JSLint Error Explanations is designed to help you improve your JavaScript by understanding the sometimes cryptic error messages produced by JSLint, JSHint and ESLint, and teaching you how to avoid such errors.</li>\n</ul>\n</li>\n<li>\n<p><strong>Module Bundlers and Loaders</strong>: Libraries for bundling JavaScript Modules into one or several files.</p>\n<ul>\n<li>\n<p><strong><a href=\"http://browserify.org/\">Browserify</a></strong>: Browserify lets you require('modules') in the browser by bundling up all of your dependencies.</p>\n<ul>\n<li><strong><a href=\"https://github.com/mattdesl/budo\">Budo</a></strong>: A browserify development server, focused on incremental reloading, LiveReload integration (including CSS injection), and other high-level features.</li>\n<li><strong><a href=\"https://www.npmjs.org/package/watchify\">Watchify</a></strong>: Watch mode for browserify builds.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/gregersrygg/crapLoader\">CrapLoader</a></strong>: The goal of crapLoader is to load ads, widgets or any JavaScript code with document.write in it. This library hijacks document.write and delegates the content loaded from each script into the correct position.</li>\n<li><strong><a href=\"https://github.com/medikoo/modules-webmake\">Modules Webmake</a></strong>: A CommonJS module bundler similar to Browserify but much faster due to different requirements finder.</li>\n<li><strong><a href=\"http://requirejs.org/\">Require.js</a></strong>: RequireJS is a JavaScript file and AMD module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments.</li>\n<li><strong><a href=\"http://stuk.github.io/require1k/\">Require1k</a></strong>: CommonJS require for the browser in 1KB, with no build needed.</li>\n<li><strong><a href=\"http://rollupjs.org/\">Rollup.js</a></strong>: Rollup is a next-generation JavaScript module bundler. Author your app or library using ES2015 modules, then efficiently bundle them up into a single file for use in browsers and Node.js.</li>\n<li>\n<p><strong><a href=\"https://github.com/systemjs/systemjs\">SystemJS</a></strong>: Universal dynamic module loader - loads ES6 modules, AMD, CommonJS and global scripts in the browser and NodeJS. Works with both Traceur and Babel.</p>\n<ul>\n<li><strong><a href=\"http://www.sitepoint.com/modular-javascript-systemjs-jspm/\">Modular JavaScript: A Beginners Guide to SystemJS &#x26; JSPM</a></strong>: The combination of jspm and SystemJS provides a unified way of installing and loading dependencies.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/anodynos/urequire\">URequire</a></strong>: The Ultimate JavaScript Module Builder &#x26; Automagical Task Runner.</li>\n<li>\n<p><strong><a href=\"http://webpack.github.io/\">Webpack</a></strong>: Webpack is a module bundler. It takes modules with dependencies and generates static assets representing those modules.</p>\n<ul>\n<li><strong><a href=\"https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b\">Block, Element, Modifying Your JavaScript Components</a></strong>: Mark Dalgleish is discussing how to organize React code with BEM and build everything with Webpack.</li>\n<li><strong><a href=\"http://dapperdeveloper.com/2016/05/18/developing-with-docker-and-webpack/\">Developing with Docker and Webpack</a></strong>: Chris Harrington explains how to create a development environment with Webpack and Docker to match the production as much as possible.</li>\n<li><strong><a href=\"http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html\">Full-Stack Redux Tutorial</a></strong>: We will go through all the steps of constructing a Node+Redux backend and a React+Redux frontend for a real-world application, using test-first development.</li>\n<li><strong><a href=\"http://www.davidmeents.com/how-to-set-up-webpack-image-loader/\">How to Set Up Webpack Image Loader</a></strong>: This brief tutorial will help you set up an image loader in Webpack.</li>\n<li><strong><a href=\"http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/\">The SoundCloud Client in React + Redux</a></strong>: After finishing this step by step tutorial you will be able to author your own React + Redux project with Webpack and Babel.</li>\n<li><strong><a href=\"http://survivejs.com/webpack/\">Webpack from Apprentice to Master</a></strong>: The purpose of this guide is to help you get started with Webpack and then go beyond basics.</li>\n<li><strong><a href=\"http://www.webpackbin.com/\">WebpackBin</a></strong>: A webpack code sandbox.</li>\n<li><strong><a href=\"http://devlog.disco.zone/2016/06/01/webpack/\">Why I think Webpack is the Right Approach To Build Pipelines</a></strong>: Thomas Boyt compares how Grunt, Gulp, Broccoli and Webpack discover dependencies.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/facebook/regenerator\">Regenerator</a></strong>: This package implements a source transformation that takes the proposed syntax for generators/yield from future versions of JS and spits out efficient JS-of-today (ES5) that behaves the same way.</li>\n</ul>\n</li>\n<li>\n<p><strong>Package Management</strong>: A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing reusable libraries and components in a consistent manner.</p>\n<ul>\n<li><strong><a href=\"https://github.com/bower/bower\">Bower</a></strong>: Bower offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack.</li>\n<li><strong><a href=\"https://github.com/lerna/lerna\">Lerna</a></strong>: Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm.</li>\n<li><strong><a href=\"https://www.npmjs.com/\">NPM</a></strong>: NPM makes it easy for JavaScript developers to share and reuse code, and it makes it easy to update the code that you're sharing.</li>\n</ul>\n</li>\n<li>\n<p><strong><a href=\"http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/\">Sourcemaps</a></strong>: Sourcemap is a way to map a combined/minified file back to an unbuilt state.</p>\n<ul>\n<li><strong><a href=\"https://www.npmjs.org/package/combine-source-map\">combine-source-map</a></strong>: Add source maps of multiple files, offset them and then combine them into one source map.</li>\n<li><strong><a href=\"https://www.npmjs.org/package/convert-source-map\">convert-source-map</a></strong>: Converts a source-map from/to different formats and allows adding/changing properties.</li>\n<li><strong><a href=\"https://github.com/thlorenz/exorcist\">exorcist</a></strong>: Externalizes the source map found inside a stream to an external .js.map file</li>\n<li><strong><a href=\"https://www.npmjs.org/package/generate-sourcemap\">generate-sourcemap</a></strong>: Generates a source map for files that were packed into a bundle.</li>\n<li><strong><a href=\"https://www.npmjs.org/package/inline-source-map\">inline-source-map</a></strong>: Adds source mappings and base64 encodes them, so they can be inlined in your generated file.</li>\n<li><strong><a href=\"https://www.npmjs.org/package/mold-source-map\">mold-source-map</a></strong>: Mold a source map that is almost perfect for you into one that is.</li>\n<li><strong><a href=\"https://www.npmjs.org/package/source-map-cjs\">source-map-cjs</a></strong>: Generates and consumes source maps. Adapted to be commonjs only and work in older browsers.</li>\n</ul>\n</li>\n<li>\n<p><strong>Version Control</strong>: Version control or source control is a system that records changes to a file or set of files over time so that you can recall specific versions later.</p>\n<ul>\n<li>\n<p><strong><a href=\"https://git-scm.com/\">Git</a></strong>: Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.</p>\n<ul>\n<li><strong><a href=\"https://www.atlassian.com/git/tutorials\">Become a Git Guru</a></strong>: A series of Git tutorials by Atlassian.</li>\n</ul>\n</li>\n<li><strong><a href=\"https://github.com/OctoLinker/browser-extension\">OctoLinker</a></strong>: The OctoLinker is a browser extensions which makes references to other files in GitHub clickable.</li>\n</ul>\n</li>\n</ul>"},{"url":"/blog/interview-questions-js/","relativePath":"blog/interview-questions-js.md","relativeDir":"blog","base":"interview-questions-js.md","name":"interview-questions-js","frontmatter":{"title":"Javascript Interview Questions","subtitle":"Object Oriented JavaScript","date":"2021-09-11","thumb_image_alt":"big o","excerpt":"What are the possible ways to create objects in JavaScript","seo":{"title":"","description":"What are the possible ways to create objects in JavaScript","robots":[],"extra":[{"name":"og:image","value":"images/code-299f1fc7.png","keyName":"property","relativeUrl":true},{"name":"twitter:title","value":"JS-Interview","keyName":"name","relativeUrl":false},{"name":"twitter:description","value":"What are the possible ways to create objects in JavaScript","keyName":"name","relativeUrl":false}]},"template":"post","thumb_image":"images/bigo.png","image":"images/green-spruce-4e3a1745.png"},"html":"<h1>Javascript Interview Questions:</h1>\n<ol>\n<li>\n<h3>What are the possible ways to create objects in JavaScript</h3>\n<p>There are many ways to create objects in javascript as below</p>\n<ol>\n<li>\n<p><strong>Object constructor:</strong></p>\n<p>The simplest way to create an empty object is using the Object constructor. Currently this approach is not recommended.</p>\n<pre><code class=\"language-javascript\">var object = new Object();\n</code></pre>\n</li>\n<li>\n<p><strong>Object's create method:</strong></p>\n<p>The create method of Object creates a new object by passing the prototype object as a parameter</p>\n<pre><code class=\"language-javascript\">var object = Object.create(null);\n</code></pre>\n</li>\n<li>\n<p><strong>Object literal syntax:</strong></p>\n<p>The object literal syntax is equivalent to create method when it passes null as parameter</p>\n<pre><code class=\"language-javascript\">var object = {};\n</code></pre>\n</li>\n<li>\n<p><strong>Function constructor:</strong></p>\n<p>Create any function and apply the new operator to create object instances,</p>\n<pre><code class=\"language-javascript\">function Person(name) {\n    this.name = name;\n    this.age = 21;\n}\nvar object = new Person('Sudheer');\n</code></pre>\n</li>\n<li>\n<p><strong>Function constructor with prototype:</strong></p>\n<p>This is similar to function constructor but it uses prototype for their properties and methods,</p>\n<pre><code class=\"language-javascript\">function Person() {}\nPerson.prototype.name = 'Sudheer';\nvar object = new Person();\n</code></pre>\n<p>This is equivalent to an instance created with an object create method with a function prototype and then call that function with an instance and parameters as arguments.</p>\n<pre><code class=\"language-javascript\">function func {};\n\nnew func(x, y, z);\n</code></pre>\n<p><strong>(OR)</strong></p>\n<pre><code class=\"language-javascript\">// Create a new instance using function prototype.\nvar newInstance = Object.create(func.prototype)\n\n// Call the function\nvar result = func.call(newInstance, x, y, z),\n\n// If the result is a non-null object then use it otherwise just use the new instance.\nconsole.log(result &#x26;&#x26; typeof result === 'object' ? result : newInstance);\n</code></pre>\n</li>\n<li>\n<p><strong>ES6 Class syntax:</strong></p>\n<p>ES6 introduces class feature to create the objects</p>\n<pre><code class=\"language-javascript\">class Person {\n    constructor(name) {\n        this.name = name;\n    }\n}\n\nvar object = new Person('Sudheer');\n</code></pre>\n</li>\n<li>\n<p><strong>Singleton pattern:</strong></p>\n<p>A Singleton is an object which can only be instantiated one time. Repeated calls to its constructor return the same instance and this way one can ensure that they don't accidentally create multiple instances.</p>\n<pre><code class=\"language-javascript\">var object = new (function () {\n    this.name = 'Sudheer';\n})();\n</code></pre>\n</li>\n</ol>\n</li>\n<li>\n<h3>What is a prototype chain</h3>\n<p><strong>Prototype chaining</strong> is used to build new types of objects based on existing ones. It is similar to inheritance in a class based language.</p>\n<p>The prototype on object instance is available through <strong>Object.getPrototypeOf(object)</strong> or *<strong>*proto**</strong> property whereas prototype on constructors function is available through <strong>Object.prototype</strong>.</p>\n<p><img src=\"images/prototype_chain.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>What is the difference between Call, Apply and Bind</h3>\n<p>The difference between Call, Apply and Bind can be explained with below examples,</p>\n<p><strong>Call:</strong> The call() method invokes a function with a given <code>this</code> value and arguments provided one by one</p>\n<pre><code class=\"language-javascript\">var employee1 = { firstName: 'John', lastName: 'Rodson' };\nvar employee2 = { firstName: 'Jimmy', lastName: 'Baily' };\n\nfunction invite(greeting1, greeting2) {\n    console.log(greeting1 + ' ' + this.firstName + ' ' + this.lastName + ', ' + greeting2);\n}\n\ninvite.call(employee1, 'Hello', 'How are you?'); // Hello John Rodson, How are you?\ninvite.call(employee2, 'Hello', 'How are you?'); // Hello Jimmy Baily, How are you?\n</code></pre>\n<p><strong>Apply:</strong> Invokes the function with a given <code>this</code> value and allows you to pass in arguments as an array</p>\n<pre><code class=\"language-javascript\">var employee1 = { firstName: 'John', lastName: 'Rodson' };\nvar employee2 = { firstName: 'Jimmy', lastName: 'Baily' };\n\nfunction invite(greeting1, greeting2) {\n    console.log(greeting1 + ' ' + this.firstName + ' ' + this.lastName + ', ' + greeting2);\n}\n\ninvite.apply(employee1, ['Hello', 'How are you?']); // Hello John Rodson, How are you?\ninvite.apply(employee2, ['Hello', 'How are you?']); // Hello Jimmy Baily, How are you?\n</code></pre>\n<p><strong>bind:</strong> returns a new function, allowing you to pass any number of arguments</p>\n<pre><code class=\"language-javascript\">var employee1 = { firstName: 'John', lastName: 'Rodson' };\nvar employee2 = { firstName: 'Jimmy', lastName: 'Baily' };\n\nfunction invite(greeting1, greeting2) {\n    console.log(greeting1 + ' ' + this.firstName + ' ' + this.lastName + ', ' + greeting2);\n}\n\nvar inviteEmployee1 = invite.bind(employee1);\nvar inviteEmployee2 = invite.bind(employee2);\ninviteEmployee1('Hello', 'How are you?'); // Hello John Rodson, How are you?\ninviteEmployee2('Hello', 'How are you?'); // Hello Jimmy Baily, How are you?\n</code></pre>\n<p>Call and apply are pretty interchangeable. Both execute the current function immediately. You need to decide whether it's easier to send in an array or a comma separated list of arguments. You can remember by treating Call is for <strong>comma</strong> (separated list) and Apply is for <strong>Array</strong>.</p>\n<p>Whereas Bind creates a new function that will have <code>this</code> set to the first parameter passed to bind().</p>\n</li>\n<li>\n<h3>What is JSON and its common operations</h3>\n<p><strong>JSON</strong> is a text-based data format following JavaScript object syntax, which was popularized by <code>Douglas Crockford</code>. It is useful when you want to transmit data across a network and it is basically just a text file with an extension of .json, and a MIME type of application/json</p>\n<p><strong>Parsing:</strong> Converting a string to a native object</p>\n<pre><code class=\"language-javascript\">JSON.parse(text);\n</code></pre>\n<p><strong>Stringification:</strong> converting a native object to a string so it can be transmitted across the network</p>\n<pre><code class=\"language-javascript\">JSON.stringify(object);\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of the array slice method</h3>\n<p>The <strong>slice()</strong> method returns the selected elements in an array as a new array object. It selects the elements starting at the given start argument, and ends at the given optional end argument without including the last element. If you omit the second argument then it selects till the end.</p>\n<p>Some of the examples of this method are,</p>\n<pre><code class=\"language-javascript\">let arrayIntegers = [1, 2, 3, 4, 5];\nlet arrayIntegers1 = arrayIntegers.slice(0, 2); // returns [1,2]\nlet arrayIntegers2 = arrayIntegers.slice(2, 3); // returns [3]\nlet arrayIntegers3 = arrayIntegers.slice(4); //returns [5]\n</code></pre>\n<p><strong>Note:</strong> Slice method won't mutate the original array but it returns the subset as a new array.</p>\n</li>\n<li>\n<h3>What is the purpose of the array splice method</h3>\n<p>The <strong>splice()</strong> method is used either adds/removes items to/from an array, and then returns the removed item. The first argument specifies the array position for insertion or deletion whereas the optional second argument indicates the number of elements to be deleted. Each additional argument is added to the array.</p>\n<p>Some of the examples of this method are,</p>\n<pre><code class=\"language-javascript\">let arrayIntegersOriginal1 = [1, 2, 3, 4, 5];\nlet arrayIntegersOriginal2 = [1, 2, 3, 4, 5];\nlet arrayIntegersOriginal3 = [1, 2, 3, 4, 5];\n\nlet arrayIntegers1 = arrayIntegersOriginal1.splice(0, 2); // returns [1, 2]; original array: [3, 4, 5]\nlet arrayIntegers2 = arrayIntegersOriginal2.splice(3); // returns [4, 5]; original array: [1, 2, 3]\nlet arrayIntegers3 = arrayIntegersOriginal3.splice(3, 1, 'a', 'b', 'c'); //returns [4]; original array: [1, 2, 3, \"a\", \"b\", \"c\", 5]\n</code></pre>\n<p><strong>Note:</strong> Splice method modifies the original array and returns the deleted array.</p>\n</li>\n<li>\n<h3>What is the difference between slice and splice</h3>\n<p>Some of the major difference in a tabular form</p>\n<table>\n<thead>\n<tr>\n<th>Slice</th>\n<th>Splice</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Doesn't modify the original array(immutable)</td>\n<td>Modifies the original array(mutable)</td>\n</tr>\n<tr>\n<td>Returns the subset of original array</td>\n<td>Returns the deleted elements as array</td>\n</tr>\n<tr>\n<td>Used to pick the elements from array</td>\n<td>Used to insert or delete elements to/from array</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>How do you compare Object and Map</h3>\n<p><strong>Objects</strong> are similar to <strong>Maps</strong> in that both let you set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key. Due to this reason, Objects have been used as Maps historically. But there are important differences that make using a Map preferable in certain cases.</p>\n<ol>\n<li>The keys of an Object are Strings and Symbols, whereas they can be any value for a Map, including functions, objects, and any primitive.</li>\n<li>The keys in Map are ordered while keys added to Object are not. Thus, when iterating over it, a Map object returns keys in order of insertion.</li>\n<li>You can get the size of a Map easily with the size property, while the number of properties in an Object must be determined manually.</li>\n<li>A Map is an iterable and can thus be directly iterated, whereas iterating over an Object requires obtaining its keys in some fashion and iterating over them.</li>\n<li>An Object has a prototype, so there are default keys in the map that could collide with your keys if you're not careful. As of ES5 this can be bypassed by using map = Object.create(null), but this is seldom done.</li>\n<li>A Map may perform better in scenarios involving frequent addition and removal of key pairs.</li>\n</ol>\n</li>\n<li>\n<h3>What is the difference between == and === operators</h3>\n<p>JavaScript provides both strict(===, !==) and type-converting(==, !=) equality comparison. The strict operators take type of variable in consideration, while non-strict operators make type correction/conversion based upon values of variables. The strict operators follow the below conditions for different types,</p>\n<ol>\n<li>Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions.</li>\n<li>\n<p>Two numbers are strictly equal when they are numerically equal. i.e, Having the same number value.\nThere are two special cases in this,</p>\n<ol>\n<li>NaN is not equal to anything, including NaN.</li>\n<li>Positive and negative zeros are equal to one another.</li>\n</ol>\n</li>\n<li>Two Boolean operands are strictly equal if both are true or both are false.</li>\n<li>Two objects are strictly equal if they refer to the same Object.</li>\n<li>Null and Undefined types are not equal with ===, but equal with ==. i.e,\nnull===undefined --> false but null==undefined --> true</li>\n</ol>\n<p>Some of the example which covers the above cases,</p>\n<pre><code class=\"language-javascript\">0 == false   // true\n0 === false  // false\n1 == \"1\"     // true\n1 === \"1\"    // false\nnull == undefined // true\nnull === undefined // false\n'0' == false // true\n'0' === false // false\n[]==[] or []===[] //false, refer different objects in memory\n{}=={} or {}==={} //false, refer different objects in memory\n</code></pre>\n</li>\n<li>\n<h3>What are lambda or arrow functions</h3>\n<p>An arrow function is a shorter syntax for a function expression and does not have its own <strong>this, arguments, super, or new.target</strong>. These functions are best suited for non-method functions, and they cannot be used as constructors.</p>\n</li>\n<li>\n<h3>What is a first class function</h3>\n<p>In Javascript, functions are first class objects. First-class functions means when functions in that language are treated like any other variable.</p>\n<p>For example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable. For example, in the below example, handler functions assigned to a listener</p>\n<pre><code class=\"language-javascript\">const handler = () => console.log('This is a click handler function');\ndocument.addEventListener('click', handler);\n</code></pre>\n</li>\n<li>\n<h3>What is a first order function</h3>\n<p>First-order function is a function that doesn't accept another function as an argument and doesn't return a function as its return value.</p>\n<pre><code class=\"language-javascript\">const firstOrder = () => console.log('I am a first order function!');\n</code></pre>\n</li>\n<li>\n<h3>What is a higher order function</h3>\n<p>Higher-order function is a function that accepts another function as an argument or returns a function as a return value or both.</p>\n<pre><code class=\"language-javascript\">const firstOrderFunc = () => console.log('Hello, I am a First order function');\nconst higherOrder = (ReturnFirstOrderFunc) => ReturnFirstOrderFunc();\nhigherOrder(firstOrderFunc);\n</code></pre>\n</li>\n<li>\n<h3>What is a unary function</h3>\n<p>Unary function (i.e. monadic) is a function that accepts exactly one argument. It stands for a single argument accepted by a function.</p>\n<p>Let us take an example of unary function,</p>\n<pre><code class=\"language-javascript\">const unaryFunction = (a) => console.log(a + 10); // Add 10 to the given argument and display the value\n</code></pre>\n</li>\n<li>\n<h3>What is the currying function</h3>\n<p>Currying is the process of taking a function with multiple arguments and turning it into a sequence of functions each with only a single argument. Currying is named after a mathematician <strong>Haskell Curry</strong>. By applying currying, a n-ary function turns it into a unary function.</p>\n<p>Let's take an example of n-ary function and how it turns into a currying function,</p>\n<pre><code class=\"language-javascript\">const multiArgFunction = (a, b, c) => a + b + c;\nconsole.log(multiArgFunction(1, 2, 3)); // 6\n\nconst curryUnaryFunction = (a) => (b) => (c) => a + b + c;\ncurryUnaryFunction(1); // returns a function: b => c =>  1 + b + c\ncurryUnaryFunction(1)(2); // returns a function: c => 3 + c\ncurryUnaryFunction(1)(2)(3); // returns the number 6\n</code></pre>\n<p>Curried functions are great to improve <strong>code reusability</strong> and <strong>functional composition</strong>.</p>\n</li>\n<li>\n<h3>What is a pure function</h3>\n<p>A <strong>Pure function</strong> is a function where the return value is only determined by its arguments without any side effects. i.e, If you call a function with the same arguments 'n' number of times and 'n' number of places in the application then it will always return the same value.</p>\n<p>Let's take an example to see the difference between pure and impure functions,</p>\n<pre><code class=\"language-javascript\">//Impure\nlet numberArray = [];\nconst impureAddNumber = (number) => numberArray.push(number);\n//Pure\nconst pureAddNumber = (number) => (argNumberArray) => argNumberArray.concat([number]);\n\n//Display the results\nconsole.log(impureAddNumber(6)); // returns 1\nconsole.log(numberArray); // returns [6]\nconsole.log(pureAddNumber(7)(numberArray)); // returns [6, 7]\nconsole.log(numberArray); // returns [6]\n</code></pre>\n<p>As per above code snippets, <strong>Push</strong> function is impure itself by altering the array and returning an push number index which is independent of parameter value. Whereas <strong>Concat</strong> on the other hand takes the array and concatenates it with the other array producing a whole new array without side effects. Also, the return value is a concatenation of the previous array.</p>\n<p>Remember that Pure functions are important as they simplify unit testing without any side effects and no need for dependency injection. They also avoid tight coupling and make it harder to break your application by not having any side effects. These principles are coming together with <strong>Immutability</strong> concept of ES6 by giving preference to <strong>const</strong> over <strong>let</strong> usage.</p>\n</li>\n<li>\n<h3>What is the purpose of the let keyword</h3>\n<p>The <code>let</code> statement declares a <strong>block scope local variable</strong>. Hence the variables defined with let keyword are limited in scope to the block, statement, or expression on which it is used. Whereas variables declared with the <code>var</code> keyword used to define a variable globally, or locally to an entire function regardless of block scope.</p>\n<p>Let's take an example to demonstrate the usage,</p>\n<pre><code class=\"language-javascript\">let counter = 30;\nif (counter === 30) {\n    let counter = 31;\n    console.log(counter); // 31\n}\nconsole.log(counter); // 30 (because the variable in if block won't exist here)\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between let and var</h3>\n<p>You can list out the differences in a tabular format</p>\n<table>\n<thead>\n<tr>\n<th>var</th>\n<th>let</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>It is been available from the beginning of JavaScript</td>\n<td>Introduced as part of ES6</td>\n</tr>\n<tr>\n<td>It has function scope</td>\n<td>It has block scope</td>\n</tr>\n<tr>\n<td>Variables will be hoisted</td>\n<td>Hoisted but not initialized</td>\n</tr>\n</tbody>\n</table>\n<p>Let's take an example to see the difference,</p>\n<pre><code class=\"language-javascript\">function userDetails(username) {\n    if (username) {\n        console.log(salary); // undefined due to hoisting\n        console.log(age); // ReferenceError: Cannot access 'age' before initialization\n        let age = 30;\n        var salary = 10000;\n    }\n    console.log(salary); //10000 (accessible to due function scope)\n    console.log(age); //error: age is not defined(due to block scope)\n}\nuserDetails('John');\n</code></pre>\n</li>\n<li>\n<h3>What is the reason to choose the name let as a keyword</h3>\n<p><code>let</code> is a mathematical statement that was adopted by early programming languages like <strong>Scheme</strong> and <strong>Basic</strong>. It has been borrowed from dozens of other languages that use <code>let</code> already as a traditional keyword as close to <code>var</code> as possible.</p>\n</li>\n<li>\n<h3>How do you redeclare variables in switch block without an error</h3>\n<p>If you try to redeclare variables in a <code>switch block</code> then it will cause errors because there is only one block. For example, the below code block throws a syntax error as below,</p>\n<pre><code class=\"language-javascript\">let counter = 1;\nswitch (x) {\n    case 0:\n        let name;\n        break;\n\n    case 1:\n        let name; // SyntaxError for redeclaration.\n        break;\n}\n</code></pre>\n<p>To avoid this error, you can create a nested block inside a case clause and create a new block scoped lexical environment.</p>\n<pre><code class=\"language-javascript\">let counter = 1;\nswitch (x) {\n    case 0: {\n        let name;\n        break;\n    }\n    case 1: {\n        let name; // No SyntaxError for redeclaration.\n        break;\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>What is the Temporal Dead Zone</h3>\n<p>The Temporal Dead Zone is a behavior in JavaScript that occurs when declaring a variable with the let and const keywords, but not with var. In ECMAScript 6, accessing a <code>let</code> or <code>const</code> variable before its declaration (within its scope) causes a ReferenceError. The time span when that happens, between the creation of a variable's binding and its declaration, is called the temporal dead zone.</p>\n<p>Let's see this behavior with an example,</p>\n<pre><code class=\"language-javascript\">function somemethod() {\n    console.log(counter1); // undefined\n    console.log(counter2); // ReferenceError\n    var counter1 = 1;\n    let counter2 = 2;\n}\n</code></pre>\n</li>\n<li>\n<h3>What is IIFE(Immediately Invoked Function Expression)</h3>\n<p>IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined. The signature of it would be as below,</p>\n<pre><code class=\"language-javascript\">(function () {\n    // logic here\n})();\n</code></pre>\n<p>The primary reason to use an IIFE is to obtain data privacy because any variables declared within the IIFE cannot be accessed by the outside world. i.e, If you try to access variables with IIFE then it throws an error as below,</p>\n<pre><code class=\"language-javascript\">(function () {\n    var message = 'IIFE';\n    console.log(message);\n})();\nconsole.log(message); //Error: message is not defined\n</code></pre>\n</li>\n<li>\n<h3>What is the benefit of using modules</h3>\n<p>There are a lot of benefits to using modules in favour of a sprawling. Some of the benefits are,</p>\n<ol>\n<li>Maintainability</li>\n<li>Reusability</li>\n<li>Namespacing</li>\n</ol>\n</li>\n<li>\n<h3>What is memoization</h3>\n<p>Memoization is a programming technique which attempts to increase a function's performance by caching its previously computed results. Each time a memoized function is called, its parameters are used to index the cache. If the data is present, then it can be returned, without executing the entire function. Otherwise the function is executed and then the result is added to the cache.\nLet's take an example of adding function with memoization,</p>\n<pre><code class=\"language-javascript\">const memoizAddition = () => {\n    let cache = {};\n    return (value) => {\n        if (value in cache) {\n            console.log('Fetching from cache');\n            return cache[value]; // Here, cache.value cannot be used as property name starts with the number which is not a valid JavaScript  identifier. Hence, can only be accessed using the square bracket notation.\n        } else {\n            console.log('Calculating result');\n            let result = value + 20;\n            cache[value] = result;\n            return result;\n        }\n    };\n};\n// returned function from memoizAddition\nconst addition = memoizAddition();\nconsole.log(addition(20)); //output: 40 calculated\nconsole.log(addition(20)); //output: 40 cached\n</code></pre>\n</li>\n<li>\n<h3>What is Hoisting</h3>\n<p>Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution. Remember that JavaScript only hoists declarations, not initialisation.\nLet's take a simple example of variable hoisting,</p>\n<pre><code class=\"language-javascript\">console.log(message); //output : undefined\nvar message = 'The variable Has been hoisted';\n</code></pre>\n<p>The above code looks like as below to the interpreter,</p>\n<pre><code class=\"language-javascript\">var message;\nconsole.log(message);\nmessage = 'The variable Has been hoisted';\n</code></pre>\n</li>\n<li>\n<h3>What are classes in ES6</h3>\n<p>In ES6, Javascript classes are primarily syntactic sugar over JavaScript's existing prototype-based inheritance.\nFor example, the prototype based inheritance written in function expression as below,</p>\n<pre><code class=\"language-javascript\">function Bike(model, color) {\n    this.model = model;\n    this.color = color;\n}\n\nBike.prototype.getDetails = function () {\n    return this.model + ' bike has' + this.color + ' color';\n};\n</code></pre>\n<p>Whereas ES6 classes can be defined as an alternative</p>\n<pre><code class=\"language-javascript\">class Bike {\n    constructor(color, model) {\n        this.color = color;\n        this.model = model;\n    }\n\n    getDetails() {\n        return this.model + ' bike has' + this.color + ' color';\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>What are closures</h3>\n<p>A closure is the combination of a function and the lexical environment within which that function was declared. i.e, It is an inner function that has access to the outer or enclosing function's variables. The closure has three scope chains</p>\n<ol>\n<li>Own scope where variables defined between its curly brackets</li>\n<li>Outer function's variables</li>\n<li>Global variables</li>\n</ol>\n<p>Let's take an example of closure concept,</p>\n<pre><code class=\"language-javascript\">function Welcome(name) {\n    var greetingInfo = function (message) {\n        console.log(message + ' ' + name);\n    };\n    return greetingInfo;\n}\nvar myFunction = Welcome('John');\nmyFunction('Welcome '); //Output: Welcome John\nmyFunction('Hello Mr.'); //output: Hello Mr.John\n</code></pre>\n<p>As per the above code, the inner function(i.e, greetingInfo) has access to the variables in the outer function scope(i.e, Welcome) even after the outer function has returned.</p>\n</li>\n<li>\n<h3>What are modules</h3>\n<p>Modules refer to small units of independent, reusable code and also act as the foundation of many JavaScript design patterns. Most of the JavaScript modules export an object literal, a function, or a constructor</p>\n</li>\n<li>\n<h3>Why do you need modules</h3>\n<p>Below are the list of benefits using modules in javascript ecosystem</p>\n<ol>\n<li>Maintainability</li>\n<li>Reusability</li>\n<li>Namespacing</li>\n</ol>\n</li>\n<li>\n<h3>What is scope in javascript</h3>\n<p>Scope is the accessibility of variables, functions, and objects in some particular part of your code during runtime. In other words, scope determines the visibility of variables and other resources in areas of your code.</p>\n</li>\n<li>\n<h3>What is a service worker</h3>\n<p>A Service worker is basically a script (JavaScript file) that runs in the background, separate from a web page and provides features that don't need a web page or user interaction. Some of the major features of service workers are Rich offline experiences(offline first web application development), periodic background syncs, push notifications, intercept and handle network requests and programmatically managing a cache of responses.</p>\n</li>\n<li>\n<h3>How do you manipulate DOM using a service worker</h3>\n<p>Service worker can't access the DOM directly. But it can communicate with the pages it controls by responding to messages sent via the <code>postMessage</code> interface, and those pages can manipulate the DOM.</p>\n</li>\n<li>\n<h3>How do you reuse information across service worker restarts</h3>\n<p>The problem with service worker is that it gets terminated when not in use, and restarted when it's next needed, so you cannot rely on global state within a service worker's <code>onfetch</code> and <code>onmessage</code> handlers. In this case, service workers will have access to IndexedDB API in order to persist and reuse across restarts.</p>\n</li>\n<li>\n<h3>What is IndexedDB</h3>\n<p>IndexedDB is a low-level API for client-side storage of larger amounts of structured data, including files/blobs. This API uses indexes to enable high-performance searches of this data.</p>\n</li>\n<li>\n<h3>What is web storage</h3>\n<p>Web storage is an API that provides a mechanism by which browsers can store key/value pairs locally within the user's browser, in a much more intuitive fashion than using cookies. The web storage provides two mechanisms for storing data on the client.</p>\n<ol>\n<li><strong>Local storage:</strong> It stores data for current origin with no expiration date.</li>\n<li><strong>Session storage:</strong> It stores data for one session and the data is lost when the browser tab is closed.</li>\n</ol>\n</li>\n<li>\n<h3>What is a post message</h3>\n<p>Post message is a method that enables cross-origin communication between Window objects.(i.e, between a page and a pop-up that it spawned, or between a page and an iframe embedded within it). Generally, scripts on different pages are allowed to access each other if and only if the pages follow same-origin policy(i.e, pages share the same protocol, port number, and host).</p>\n</li>\n<li>\n<h3>What is a Cookie</h3>\n<p>A cookie is a piece of data that is stored on your computer to be accessed by your browser. Cookies are saved as key/value pairs.\nFor example, you can create a cookie named username as below,</p>\n<pre><code class=\"language-javascript\">document.cookie = 'username=John';\n</code></pre>\n<p><img src=\"images/cookie.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>Why do you need a Cookie</h3>\n<p>Cookies are used to remember information about the user profile(such as username). It basically involves two steps,</p>\n<ol>\n<li>When a user visits a web page, the user profile can be stored in a cookie.</li>\n<li>Next time the user visits the page, the cookie remembers the user profile.</li>\n</ol>\n</li>\n<li>\n<h3>What are the options in a cookie</h3>\n<p>There are few below options available for a cookie,</p>\n<ol>\n<li>By default, the cookie is deleted when the browser is closed but you can change this behavior by setting expiry date (in UTC time).</li>\n</ol>\n<pre><code class=\"language-javascript\">document.cookie = 'username=John; expires=Sat, 8 Jun 2019 12:00:00 UTC';\n</code></pre>\n<ol>\n<li>By default, the cookie belongs to a current page. But you can tell the browser what path the cookie belongs to using a path parameter.</li>\n</ol>\n<pre><code class=\"language-javascript\">document.cookie = 'username=John; path=/services';\n</code></pre>\n</li>\n<li>\n<h3>How do you delete a cookie</h3>\n<p>You can delete a cookie by setting the expiry date as a passed date. You don't need to specify a cookie value in this case.\nFor example, you can delete a username cookie in the current page as below.</p>\n<pre><code class=\"language-javascript\">document.cookie = 'username=; expires=Fri, 07 Jun 2019 00:00:00 UTC; path=/;';\n</code></pre>\n<p><strong>Note:</strong> You should define the cookie path option to ensure that you delete the right cookie. Some browsers doesn't allow to delete a cookie unless you specify a path parameter.</p>\n</li>\n<li>\n<h3>What are the differences between cookie, local storage and session storage</h3>\n<p>Below are some of the differences between cookie, local storage and session storage,</p>\n<table>\n<thead>\n<tr>\n<th>Feature</th>\n<th>Cookie</th>\n<th>Local storage</th>\n<th>Session storage</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accessed on client or server side</td>\n<td>Both server-side &#x26; client-side</td>\n<td>client-side only</td>\n<td>client-side only</td>\n</tr>\n<tr>\n<td>Lifetime</td>\n<td>As configured using Expires option</td>\n<td>until deleted</td>\n<td>until tab is closed</td>\n</tr>\n<tr>\n<td>SSL support</td>\n<td>Supported</td>\n<td>Not supported</td>\n<td>Not supported</td>\n</tr>\n<tr>\n<td>Maximum data size</td>\n<td>4KB</td>\n<td>5 MB</td>\n<td>5MB</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>What is the main difference between localStorage and sessionStorage</h3>\n<p>LocalStorage is the same as SessionStorage but it persists the data even when the browser is closed and reopened(i.e it has no expiration time) whereas in sessionStorage data gets cleared when the page session ends.</p>\n</li>\n<li>\n<h3>How do you access web storage</h3>\n<p>The Window object implements the <code>WindowLocalStorage</code> and <code>WindowSessionStorage</code> objects which has <code>localStorage</code>(window.localStorage) and <code>sessionStorage</code>(window.sessionStorage) properties respectively. These properties create an instance of the Storage object, through which data items can be set, retrieved and removed for a specific domain and storage type (session or local).\nFor example, you can read and write on local storage objects as below</p>\n<pre><code class=\"language-javascript\">localStorage.setItem('logo', document.getElementById('logo').value);\nlocalStorage.getItem('logo');\n</code></pre>\n</li>\n<li>\n<h3>What are the methods available on session storage</h3>\n<p>The session storage provided methods for reading, writing and clearing the session data</p>\n<pre><code class=\"language-javascript\">// Save data to sessionStorage\nsessionStorage.setItem('key', 'value');\n\n// Get saved data from sessionStorage\nlet data = sessionStorage.getItem('key');\n\n// Remove saved data from sessionStorage\nsessionStorage.removeItem('key');\n\n// Remove all saved data from sessionStorage\nsessionStorage.clear();\n</code></pre>\n</li>\n<li>\n<h3>What is a storage event and its event handler</h3>\n<p>The StorageEvent is an event that fires when a storage area has been changed in the context of another document. Whereas onstorage property is an EventHandler for processing storage events.\nThe syntax would be as below</p>\n<pre><code class=\"language-javascript\">window.onstorage = functionRef;\n</code></pre>\n<p>Let's take the example usage of onstorage event handler which logs the storage key and it's values</p>\n<pre><code class=\"language-javascript\">window.onstorage = function (e) {\n    console.log('The ' + e.key + ' key has been changed from ' + e.oldValue + ' to ' + e.newValue + '.');\n};\n</code></pre>\n</li>\n<li>\n<h3>Why do you need web storage</h3>\n<p>Web storage is more secure, and large amounts of data can be stored locally, without affecting website performance. Also, the information is never transferred to the server. Hence this is a more recommended approach than Cookies.</p>\n</li>\n<li>\n<h3>How do you check web storage browser support</h3>\n<p>You need to check browser support for localStorage and sessionStorage before using web storage,</p>\n<pre><code class=\"language-javascript\">if (typeof Storage !== 'undefined') {\n    // Code for localStorage/sessionStorage.\n} else {\n    // Sorry! No Web Storage support..\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you check web workers browser support</h3>\n<p>You need to check browser support for web workers before using it</p>\n<pre><code class=\"language-javascript\">if (typeof Worker !== 'undefined') {\n    // code for Web worker support.\n} else {\n    // Sorry! No Web Worker support..\n}\n</code></pre>\n</li>\n<li>\n<h3>Give an example of a web worker</h3>\n<p>You need to follow below steps to start using web workers for counting example</p>\n<ol>\n<li>Create a Web Worker File: You need to write a script to increment the count value. Let's name it as counter.js</li>\n</ol>\n<pre><code class=\"language-javascript\">let i = 0;\n\nfunction timedCount() {\n    i = i + 1;\n    postMessage(i);\n    setTimeout('timedCount()', 500);\n}\n\ntimedCount();\n</code></pre>\n<p>Here postMessage() method is used to post a message back to the HTML page</p>\n<ol>\n<li>Create a Web Worker Object: You can create a web worker object by checking for browser support. Let's name this file as web<em>worker</em>example.js</li>\n</ol>\n<pre><code class=\"language-javascript\">if (typeof w == 'undefined') {\n    w = new Worker('counter.js');\n}\n</code></pre>\n<p>and we can receive messages from web worker</p>\n<pre><code class=\"language-javascript\">w.onmessage = function (event) {\n    document.getElementById('message').innerHTML = event.data;\n};\n</code></pre>\n<ol>\n<li>Terminate a Web Worker:\nWeb workers will continue to listen for messages (even after the external script is finished) until it is terminated. You can use the terminate() method to terminate listening to the messages.</li>\n</ol>\n<pre><code class=\"language-javascript\">w.terminate();\n</code></pre>\n<ol>\n<li>Reuse the Web Worker: If you set the worker variable to undefined you can reuse the code</li>\n</ol>\n<pre><code class=\"language-javascript\">w = undefined;\n</code></pre>\n</li>\n<li>\n<h3>What are the restrictions of web workers on DOM</h3>\n<p>WebWorkers don't have access to below javascript objects since they are defined in an external files</p>\n<ol>\n<li>Window object</li>\n<li>Document object</li>\n<li>Parent object</li>\n</ol>\n</li>\n<li>\n<h3>What is a promise</h3>\n<p>A promise is an object that may produce a single value some time in the future with either a resolved value or a reason that it's not resolved(for example, network error). It will be in one of the 3 possible states: fulfilled, rejected, or pending.</p>\n<p>The syntax of Promise creation looks like below,</p>\n<pre><code class=\"language-javascript\">const promise = new Promise(function (resolve, reject) {\n    // promise description\n});\n</code></pre>\n<p>The usage of a promise would be as below,</p>\n<pre><code class=\"language-javascript\">const promise = new Promise(\n    (resolve) => {\n        setTimeout(() => {\n            resolve(\"I'm a Promise!\");\n        }, 5000);\n    },\n    (reject) => {}\n);\n\npromise.then((value) => console.log(value));\n</code></pre>\n<p>The action flow of a promise will be as below,</p>\n<p><img src=\"images/promises.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>Why do you need a promise</h3>\n<p>Promises are used to handle asynchronous operations. They provide an alternative approach for callbacks by reducing the callback hell and writing the cleaner code.</p>\n</li>\n<li>\n<h3>What are the three states of promise</h3>\n<p>Promises have three states:</p>\n<ol>\n<li><strong>Pending:</strong> This is an initial state of the Promise before an operation begins</li>\n<li><strong>Fulfilled:</strong> This state indicates that the specified operation was completed.</li>\n<li><strong>Rejected:</strong> This state indicates that the operation did not complete. In this case an error value will be thrown.</li>\n</ol>\n</li>\n<li>\n<h3>What is a callback function</h3>\n<p>A callback function is a function passed into another function as an argument. This function is invoked inside the outer function to complete an action.\nLet's take a simple example of how to use callback function</p>\n<pre><code class=\"language-javascript\">function callbackFunction(name) {\n    console.log('Hello ' + name);\n}\n\nfunction outerFunction(callback) {\n    let name = prompt('Please enter your name.');\n    callback(name);\n}\n\nouterFunction(callbackFunction);\n</code></pre>\n</li>\n<li>\n<h3>Why do we need callbacks</h3>\n<p>The callbacks are needed because javascript is an event driven language. That means instead of waiting for a response javascript will keep executing while listening for other events.\nLet's take an example with the first function invoking an API call(simulated by setTimeout) and the next function which logs the message.</p>\n<pre><code class=\"language-javascript\">function firstFunction() {\n    // Simulate a code delay\n    setTimeout(function () {\n        console.log('First function called');\n    }, 1000);\n}\nfunction secondFunction() {\n    console.log('Second function called');\n}\nfirstFunction();\nsecondFunction();\n\nOutput;\n// Second function called\n// First function called\n</code></pre>\n<p>As observed from the output, javascript didn't wait for the response of the first function and the remaining code block got executed. So callbacks are used in a way to make sure that certain code doesn't execute until the other code finishes execution.</p>\n</li>\n<li>\n<h3>What is a callback hell</h3>\n<p>Callback Hell is an anti-pattern with multiple nested callbacks which makes code hard to read and debug when dealing with asynchronous logic. The callback hell looks like below,</p>\n<pre><code class=\"language-javascript\">async1(function(){\n    async2(function(){\n        async3(function(){\n            async4(function(){\n                ....\n            });\n        });\n    });\n});\n</code></pre>\n</li>\n<li>\n<h3>What are server-sent events</h3>\n<p>Server-sent events (SSE) is a server push technology enabling a browser to receive automatic updates from a server via HTTP connection without resorting to polling. These are a one way communications channel - events flow from server to client only. This has been used in Facebook/Twitter updates, stock price updates, news feeds etc.</p>\n</li>\n<li>\n<h3>How do you receive server-sent event notifications</h3>\n<p>The EventSource object is used to receive server-sent event notifications. For example, you can receive messages from server as below,</p>\n<pre><code class=\"language-javascript\">if (typeof EventSource !== 'undefined') {\n    var source = new EventSource('sse_generator.js');\n    source.onmessage = function (event) {\n        document.getElementById('output').innerHTML += event.data + '&#x3C;br>';\n    };\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you check browser support for server-sent events</h3>\n<p>You can perform browser support for server-sent events before using it as below,</p>\n<pre><code class=\"language-javascript\">if (typeof EventSource !== 'undefined') {\n    // Server-sent events supported. Let's have some code here!\n} else {\n    // No server-sent events supported\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the events available for server sent events</h3>\n<p>Below are the list of events available for server sent events\n| Event | Description |\n|---- | ---------\n| onopen | It is used when a connection to the server is opened |\n| onmessage | This event is used when a message is received |\n| onerror | It happens when an error occurs|</p>\n</li>\n<li>\n<h3>What are the main rules of promise</h3>\n<p>A promise must follow a specific set of rules,</p>\n<ol>\n<li>A promise is an object that supplies a standard-compliant <code>.then()</code> method</li>\n<li>A pending promise may transition into either fulfilled or rejected state</li>\n<li>A fulfilled or rejected promise is settled and it must not transition into any other state.</li>\n<li>Once a promise is settled, the value must not change.</li>\n</ol>\n</li>\n<li>\n<h3>What is callback in callback</h3>\n<p>You can nest one callback inside in another callback to execute the actions sequentially one by one. This is known as callbacks in callbacks.</p>\n<pre><code class=\"language-javascript\">loadScript('/script1.js', function (script) {\n    console.log('first script is loaded');\n\n    loadScript('/script2.js', function (script) {\n        console.log('second script is loaded');\n\n        loadScript('/script3.js', function (script) {\n            console.log('third script is loaded');\n            // after all scripts are loaded\n        });\n    });\n});\n</code></pre>\n</li>\n<li>\n<h3>What is promise chaining</h3>\n<p>The process of executing a sequence of asynchronous tasks one after another using promises is known as Promise chaining. Let's take an example of promise chaining for calculating the final result,</p>\n<pre><code class=\"language-javascript\">new Promise(function (resolve, reject) {\n    setTimeout(() => resolve(1), 1000);\n})\n    .then(function (result) {\n        console.log(result); // 1\n        return result * 2;\n    })\n    .then(function (result) {\n        console.log(result); // 2\n        return result * 3;\n    })\n    .then(function (result) {\n        console.log(result); // 6\n        return result * 4;\n    });\n</code></pre>\n<p>In the above handlers, the result is passed to the chain of .then() handlers with the below work flow,</p>\n<ol>\n<li>The initial promise resolves in 1 second,</li>\n<li>After that <code>.then</code> handler is called by logging the result(1) and then return a promise with the value of result * 2.</li>\n<li>After that the value passed to the next <code>.then</code> handler by logging the result(2) and return a promise with result * 3.</li>\n<li>Finally the value passed to the last <code>.then</code> handler by logging the result(6) and return a promise with result * 4.</li>\n</ol>\n</li>\n<li>\n<h3>What is promise.all</h3>\n<p>Promise.all is a promise that takes an array of promises as an input (an iterable), and it gets resolved when all the promises get resolved or any one of them gets rejected. For example, the syntax of promise.all method is below,</p>\n<pre><code class=\"language-javascript\">Promise.all([Promise1, Promise2, Promise3]) .then(result) => {   console.log(result) }) .catch(error => console.log(`Error in promises ${error}`))\n</code></pre>\n<p><strong>Note:</strong> Remember that the order of the promises(output the result) is maintained as per input order.</p>\n</li>\n<li>\n<h3>What is the purpose of the race method in promise</h3>\n<p>Promise.race() method will return the promise instance which is firstly resolved or rejected. Let's take an example of race() method where promise2 is resolved first</p>\n<pre><code class=\"language-javascript\">var promise1 = new Promise(function (resolve, reject) {\n    setTimeout(resolve, 500, 'one');\n});\nvar promise2 = new Promise(function (resolve, reject) {\n    setTimeout(resolve, 100, 'two');\n});\n\nPromise.race([promise1, promise2]).then(function (value) {\n    console.log(value); // \"two\" // Both promises will resolve, but promise2 is faster\n});\n</code></pre>\n</li>\n<li>\n<h3>What is a strict mode in javascript</h3>\n<p>Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a \"strict\" operating context. This way it prevents certain actions from being taken and throws more exceptions. The literal expression <code>\"use strict\";</code> instructs the browser to use the javascript code in the Strict mode.</p>\n</li>\n<li>\n<h3>Why do you need strict mode</h3>\n<p>Strict mode is useful to write \"secure\" JavaScript by notifying \"bad syntax\" into real errors. For example, it eliminates accidentally creating a global variable by throwing an error and also throws an error for assignment to a non-writable property, a getter-only property, a non-existing property, a non-existing variable, or a non-existing object.</p>\n</li>\n<li>\n<h3>How do you declare strict mode</h3>\n<p>The strict mode is declared by adding \"use strict\"; to the beginning of a script or a function.\nIf declared at the beginning of a script, it has global scope.</p>\n<pre><code class=\"language-javascript\">'use strict';\nx = 3.14; // This will cause an error because x is not declared\n</code></pre>\n<p>and if you declare inside a function, it has local scope</p>\n<pre><code class=\"language-javascript\">x = 3.14; // This will not cause an error.\nmyFunction();\n\nfunction myFunction() {\n    'use strict';\n    y = 3.14; // This will cause an error\n}\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of double exclamation</h3>\n<p>The double exclamation or negation(!!) ensures the resulting type is a boolean. If it was falsey (e.g. 0, null, undefined, etc.), it will be false, otherwise, true.\nFor example, you can test IE version using this expression as below,</p>\n<pre><code class=\"language-javascript\">let isIE8 = false;\nisIE8 = !!navigator.userAgent.match(/MSIE 8.0/);\nconsole.log(isIE8); // returns true or false\n</code></pre>\n<p>If you don't use this expression then it returns the original value.</p>\n<pre><code class=\"language-javascript\">console.log(navigator.userAgent.match(/MSIE 8.0/)); // returns either an Array or null\n</code></pre>\n<p><strong>Note:</strong> The expression !! is not an operator, but it is just twice of ! operator.</p>\n</li>\n<li>\n<h3>What is the purpose of the delete operator</h3>\n<p>The delete keyword is used to delete the property as well as its value.</p>\n<pre><code class=\"language-javascript\">var user = { name: 'John', age: 20 };\ndelete user.age;\n\nconsole.log(user); // {name: \"John\"}\n</code></pre>\n</li>\n<li>\n<h3>What is the typeof operator</h3>\n<p>You can use the JavaScript typeof operator to find the type of a JavaScript variable. It returns the type of a variable or an expression.</p>\n<pre><code class=\"language-javascript\">typeof 'John Abraham'; // Returns \"string\"\ntypeof (1 + 2); // Returns \"number\"\n</code></pre>\n</li>\n<li>\n<h3>What is undefined property</h3>\n<p>The undefined property indicates that a variable has not been assigned a value, or not declared at all. The type of undefined value is undefined too.</p>\n<pre><code class=\"language-javascript\">var user; // Value is undefined, type is undefined\nconsole.log(typeof user); //undefined\n</code></pre>\n<p>Any variable can be emptied by setting the value to undefined.</p>\n<pre><code class=\"language-javascript\">user = undefined;\n</code></pre>\n</li>\n<li>\n<h3>What is null value</h3>\n<p>The value null represents the intentional absence of any object value. It is one of JavaScript's primitive values. The type of null value is object.\nYou can empty the variable by setting the value to null.</p>\n<pre><code class=\"language-javascript\">var user = null;\nconsole.log(typeof user); //object\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between null and undefined</h3>\n<p>Below are the main differences between null and undefined,</p>\n<table>\n<thead>\n<tr>\n<th>Null</th>\n<th>Undefined</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>It is an assignment value which indicates that variable points to no object.</td>\n<td>It is not an assignment value where a variable has been declared but has not yet been assigned a value.</td>\n</tr>\n<tr>\n<td>Type of null is object</td>\n<td>Type of undefined is undefined</td>\n</tr>\n<tr>\n<td>The null value is a primitive value that represents the null, empty, or non-existent reference.</td>\n<td>The undefined value is a primitive value used when a variable has not been assigned a value.</td>\n</tr>\n<tr>\n<td>Indicates the absence of a value for a variable</td>\n<td>Indicates absence of variable itself</td>\n</tr>\n<tr>\n<td>Converted to zero (0) while performing primitive operations</td>\n<td>Converted to NaN while performing primitive operations</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>What is eval</h3>\n<p>The eval() function evaluates JavaScript code represented as a string. The string can be a JavaScript expression, variable, statement, or sequence of statements.</p>\n<pre><code class=\"language-javascript\">console.log(eval('1 + 2')); //  3\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between window and document</h3>\n<p>Below are the main differences between window and document,</p>\n<table>\n<thead>\n<tr>\n<th>Window</th>\n<th>Document</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>It is the root level element in any web page</td>\n<td>It is the direct child of the window object. This is also known as Document Object Model(DOM)</td>\n</tr>\n<tr>\n<td>By default window object is available implicitly in the page</td>\n<td>You can access it via window.document or document.</td>\n</tr>\n<tr>\n<td>It has methods like alert(), confirm() and properties like document, location</td>\n<td>It provides methods like getElementById, getElementsByTagName, createElement etc</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>How do you access history in javascript</h3>\n<p>The window.history object contains the browser's history. You can load previous and next URLs in the history using back() and next() methods.</p>\n<pre><code class=\"language-javascript\">function goBack() {\n    window.history.back();\n}\nfunction goForward() {\n    window.history.forward();\n}\n</code></pre>\n<p><strong>Note:</strong> You can also access history without window prefix.</p>\n</li>\n<li>\n<h3>How do you detect caps lock key turned on or not</h3>\n<p>The <code>mouseEvent getModifierState()</code> is used to return a boolean value that indicates whether the specified modifier key is activated or not. The modifiers such as CapsLock, ScrollLock and NumLock are activated when they are clicked, and deactivated when they are clicked again.</p>\n<p>Let's take an input element to detect the CapsLock on/off behavior with an example,</p>\n<pre><code class=\"language-html\">&#x3C;input type=\"password\" onmousedown=\"enterInput(event)\" />\n\n&#x3C;p id=\"feedback\">&#x3C;/p>\n\n&#x3C;script>\n    function enterInput(e) {\n        var flag = e.getModifierState('CapsLock');\n        if (flag) {\n            document.getElementById('feedback').innerHTML = 'CapsLock activated';\n        } else {\n            document.getElementById('feedback').innerHTML = 'CapsLock not activated';\n        }\n    }\n&#x3C;/script>\n</code></pre>\n</li>\n<li>\n<h3>What is isNaN</h3>\n<p>The isNaN() function is used to determine whether a value is an illegal number (Not-a-Number) or not. i.e, This function returns true if the value equates to NaN. Otherwise it returns false.</p>\n<pre><code class=\"language-javascript\">isNaN('Hello'); //true\nisNaN('100'); //false\n</code></pre>\n</li>\n<li>\n<h3>What are the differences between undeclared and undefined variables</h3>\n<p>Below are the major differences between undeclared and undefined variables,</p>\n<table>\n<thead>\n<tr>\n<th>undeclared</th>\n<th>undefined</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>These variables do not exist in a program and are not declared</td>\n<td>These variables declared in the program but have not assigned any value</td>\n</tr>\n<tr>\n<td>If you try to read the value of an undeclared variable, then a runtime error is encountered</td>\n<td>If you try to read the value of an undefined variable, an undefined value is returned.</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>What are global variables</h3>\n<p>Global variables are those that are available throughout the length of the code without any scope. The var keyword is used to declare a local variable but if you omit it then it will become global variable</p>\n<pre><code class=\"language-javascript\">msg = 'Hello'; // var is missing, it becomes global variable\n</code></pre>\n</li>\n<li>\n<h3>What are the problems with global variables</h3>\n<p>The problem with global variables is the conflict of variable names of local and global scope. It is also difficult to debug and test the code that relies on global variables.</p>\n</li>\n<li>\n<h3>What is NaN property</h3>\n<p>The NaN property is a global property that represents \"Not-a-Number\" value. i.e, It indicates that a value is not a legal number. It is very rare to use NaN in a program but it can be used as return value for few cases</p>\n<pre><code class=\"language-javascript\">Math.sqrt(-1);\nparseInt('Hello');\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of isFinite function</h3>\n<p>The isFinite() function is used to determine whether a number is a finite, legal number. It returns false if the value is +infinity, -infinity, or NaN (Not-a-Number), otherwise it returns true.</p>\n<pre><code class=\"language-javascript\">isFinite(Infinity); // false\nisFinite(NaN); // false\nisFinite(-Infinity); // false\n\nisFinite(100); // true\n</code></pre>\n</li>\n<li>\n<h3>What is an event flow</h3>\n<p>Event flow is the order in which event is received on the web page. When you click an element that is nested in various other elements, before your click actually reaches its destination, or target element, it must trigger the click event for each of its parent elements first, starting at the top with the global window object.\nThere are two ways of event flow</p>\n<ol>\n<li>Top to Bottom(Event Capturing)</li>\n<li>Bottom to Top (Event Bubbling)</li>\n</ol>\n</li>\n<li>\n<h3>What is event bubbling</h3>\n<p>Event bubbling is a type of event propagation where the event first triggers on the innermost target element, and then successively triggers on the ancestors (parents) of the target element in the same nesting hierarchy till it reaches the outermost DOM element.</p>\n</li>\n<li>\n<h3>What is event capturing</h3>\n<p>Event capturing is a type of event propagation where the event is first captured by the outermost element, and then successively triggers on the descendants (children) of the target element in the same nesting hierarchy till it reaches the innermost DOM element.</p>\n</li>\n<li>\n<h3>How do you submit a form using JavaScript</h3>\n<p>You can submit a form using <code>document.forms[0].submit()</code>. All the form input's information is submitted using onsubmit event handler</p>\n<pre><code class=\"language-javascript\">function submit() {\n    document.forms[0].submit();\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you find operating system details</h3>\n<p>The window.navigator object contains information about the visitor's browser OS details. Some of the OS properties are available under platform property,</p>\n<pre><code class=\"language-javascript\">console.log(navigator.platform);\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between document load and DOMContentLoaded events</h3>\n<p>The <code>DOMContentLoaded</code> event is fired when the initial HTML document has been completely loaded and parsed, without waiting for assets(stylesheets, images, and subframes) to finish loading. Whereas The load event is fired when the whole page has loaded, including all dependent resources(stylesheets, images).</p>\n</li>\n<li>\n<h3>What is the difference between native, host and user objects</h3>\n<p><code>Native objects</code> are objects that are part of the JavaScript language defined by the ECMAScript specification. For example, String, Math, RegExp, Object, Function etc core objects defined in the ECMAScript spec.\n<code>Host objects</code> are objects provided by the browser or runtime environment (Node). For example, window, XmlHttpRequest, DOM nodes etc are considered as host objects.\n<code>User objects</code> are objects defined in the javascript code. For example, User objects created for profile information.</p>\n</li>\n<li>\n<h3>What are the tools or techniques used for debugging JavaScript code</h3>\n<p>You can use below tools or techniques for debugging javascript</p>\n<ol>\n<li>Chrome Devtools</li>\n<li>debugger statement</li>\n<li>Good old console.log statement</li>\n</ol>\n</li>\n<li>\n<h3>What are the pros and cons of promises over callbacks</h3>\n<p>Below are the list of pros and cons of promises over callbacks,</p>\n<p><strong>Pros:</strong></p>\n<ol>\n<li>It avoids callback hell which is unreadable</li>\n<li>Easy to write sequential asynchronous code with .then()</li>\n<li>Easy to write parallel asynchronous code with Promise.all()</li>\n<li>Solves some of the common problems of callbacks(call the callback too late, too early, many times and swallow errors/exceptions)</li>\n</ol>\n<p><strong>Cons:</strong></p>\n<ol>\n<li>It makes little complex code</li>\n<li>You need to load a polyfill if ES6 is not supported</li>\n</ol>\n</li>\n<li>\n<h3>What is the difference between an attribute and a property</h3>\n<p>Attributes are defined on the HTML markup whereas properties are defined on the DOM. For example, the below HTML element has 2 attributes type and value,</p>\n<pre><code class=\"language-javascript\">&#x3C;input type=\"text\" value=\"Name:\">\n</code></pre>\n<p>You can retrieve the attribute value as below,</p>\n<pre><code class=\"language-javascript\">const input = document.querySelector('input');\nconsole.log(input.getAttribute('value')); // Good morning\nconsole.log(input.value); // Good morning\n</code></pre>\n<p>And after you change the value of the text field to \"Good evening\", it becomes like</p>\n<pre><code class=\"language-javascript\">console.log(input.getAttribute('value')); // Good morning\nconsole.log(input.value); // Good evening\n</code></pre>\n</li>\n<li>\n<h3>What is same-origin policy</h3>\n<p>The same-origin policy is a policy that prevents JavaScript from making requests across domain boundaries. An origin is defined as a combination of URI scheme, hostname, and port number. If you enable this policy then it prevents a malicious script on one page from obtaining access to sensitive data on another web page using Document Object Model(DOM).</p>\n</li>\n<li>\n<h3>What is the purpose of void 0</h3>\n<p>Void(0) is used to prevent the page from refreshing. This will be helpful to eliminate the unwanted side-effect, because it will return the undefined primitive value. It is commonly used for HTML documents that use href=\"JavaScript:Void(0);\" within an <code>&#x3C;a></code> element. i.e, when you click a link, the browser loads a new page or refreshes the same page. But this behavior will be prevented using this expression.\nFor example, the below link notify the message without reloading the page</p>\n<pre><code class=\"language-javascript\">&#x3C;a href=\"JavaScript:void(0);\" onclick=\"alert('Well done!')\">\n    Click Me!\n&#x3C;/a>\n</code></pre>\n</li>\n<li>\n<h3>Is JavaScript a compiled or interpreted language</h3>\n<p>JavaScript is an interpreted language, not a compiled language. An interpreter in the browser reads over the JavaScript code, interprets each line, and runs it. Nowadays modern browsers use a technology known as Just-In-Time (JIT) compilation, which compiles JavaScript to executable bytecode just as it is about to run.</p>\n</li>\n<li>\n<h3>Is JavaScript a case-sensitive language</h3>\n<p>Yes, JavaScript is a case sensitive language. The language keywords, variables, function &#x26; object names, and any other identifiers must always be typed with a consistent capitalization of letters.</p>\n</li>\n<li>\n<h3>Is there any relation between Java and JavaScript</h3>\n<p>No, they are entirely two different programming languages and have nothing to do with each other. But both of them are Object Oriented Programming languages and like many other languages, they follow similar syntax for basic features(if, else, for, switch, break, continue etc).</p>\n</li>\n<li>\n<h3>What are events</h3>\n<p> Events are \"things\" that happen to HTML elements. When JavaScript is used in HTML pages, JavaScript can <code>react</code> on these events. Some of the examples of HTML events are,</p>\n<ol>\n<li>Web page has finished loading</li>\n<li>Input field was changed</li>\n<li>Button was clicked</li>\n</ol>\n<p> Let's describe the behavior of click event for button element,</p>\n<pre><code class=\"language-javascript\">&#x3C;!doctype html>\n&#x3C;html>\n &#x3C;head>\n   &#x3C;script>\n     function greeting() {\n       alert('Hello! Good morning');\n     }\n   &#x3C;/script>\n &#x3C;/head>\n &#x3C;body>\n   &#x3C;button type=\"button\" onclick=\"greeting()\">Click me&#x3C;/button>\n &#x3C;/body>\n&#x3C;/html>\n</code></pre>\n</li>\n<li>\n<h3>Who created javascript</h3>\n<p> JavaScript was created by Brendan Eich in 1995 during his time at Netscape Communications. Initially it was developed under the name <code>Mocha</code>, but later the language was officially called <code>LiveScript</code> when it first shipped in beta releases of Netscape.</p>\n</li>\n<li>\n<h3>What is the use of preventDefault method</h3>\n<p> The preventDefault() method cancels the event if it is cancelable, meaning that the default action or behaviour that belongs to the event will not occur. For example, prevent form submission when clicking on submit button and prevent opening the page URL when clicking on hyperlink are some common use cases.</p>\n<pre><code class=\"language-javascript\">document.getElementById('link').addEventListener('click', function (event) {\n    event.preventDefault();\n});\n</code></pre>\n<p> <strong>Note:</strong> Remember that not all events are cancelable.</p>\n</li>\n<li>\n<h3>What is the use of stopPropagation method</h3>\n<p> The stopPropagation method is used to stop the event from bubbling up the event chain. For example, the below nested divs with stopPropagation method prevents default event propagation when clicking on nested div(Div1)</p>\n<pre><code class=\"language-javascript\">&#x3C;p>Click DIV1 Element&#x3C;/p>\n&#x3C;div onclick=\"secondFunc()\">DIV 2\n  &#x3C;div onclick=\"firstFunc(event)\">DIV 1&#x3C;/div>\n&#x3C;/div>\n\n&#x3C;script>\nfunction firstFunc(event) {\n  alert(\"DIV 1\");\n  event.stopPropagation();\n}\n\nfunction secondFunc() {\n  alert(\"DIV 2\");\n}\n&#x3C;/script>\n</code></pre>\n</li>\n<li>\n<h3>What are the steps involved in return false usage</h3>\n<p> The return false statement in event handlers performs the below steps,</p>\n<ol>\n<li>First it stops the browser's default action or behaviour.</li>\n<li>It prevents the event from propagating the DOM</li>\n<li>Stops callback execution and returns immediately when called.</li>\n</ol>\n</li>\n<li>\n<h3>What is BOM</h3>\n<p> The Browser Object Model (BOM) allows JavaScript to \"talk to\" the browser. It consists of the objects navigator, history, screen, location and document which are children of the window. The Browser Object Model is not standardized and can change based on different browsers.</p>\n<p> <img src=\"images/bom.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>What is the use of setTimeout</h3>\n<p> The setTimeout() method is used to call a function or evaluate an expression after a specified number of milliseconds. For example, let's log a message after 2 seconds using setTimeout method,</p>\n<pre><code class=\"language-javascript\">setTimeout(function () {\n    console.log('Good morning');\n}, 2000);\n</code></pre>\n</li>\n<li>\n<h3>What is the use of setInterval</h3>\n<p> The setInterval() method is used to call a function or evaluate an expression at specified intervals (in milliseconds). For example, let's log a message after 2 seconds using setInterval method,</p>\n<pre><code class=\"language-javascript\">setInterval(function () {\n    console.log('Good morning');\n}, 2000);\n</code></pre>\n</li>\n<li>\n<h3>Why is JavaScript treated as Single threaded</h3>\n<p> JavaScript is a single-threaded language. Because the language specification does not allow the programmer to write code so that the interpreter can run parts of it in parallel in multiple threads or processes. Whereas languages like java, go, C++ can make multi-threaded and multi-process programs.</p>\n</li>\n<li>\n<h3>What is an event delegation</h3>\n<p> Event delegation is a technique for listening to events where you delegate a parent element as the listener for all of the events that happen inside it.</p>\n<p> For example, if you wanted to detect field changes in inside a specific form, you can use event delegation technique,</p>\n<pre><code class=\"language-javascript\">var form = document.querySelector('#registration-form');\n\n// Listen for changes to fields inside the form\nform.addEventListener(\n    'input',\n    function (event) {\n        // Log the field that was changed\n        console.log(event.target);\n    },\n    false\n);\n</code></pre>\n</li>\n<li>\n<h3>What is ECMAScript</h3>\n<p> ECMAScript is the scripting language that forms the basis of JavaScript. ECMAScript standardized by the ECMA International standards organization in the ECMA-262 and ECMA-402 specifications. The first edition of ECMAScript was released in 1997.</p>\n</li>\n<li>\n<h3>What is JSON</h3>\n<p> JSON (JavaScript Object Notation) is a lightweight format that is used for data interchanging. It is based on a subset of JavaScript language in the way objects are built in JavaScript.</p>\n</li>\n<li>\n<h3>What are the syntax rules of JSON</h3>\n<p> Below are the list of syntax rules of JSON</p>\n<ol>\n<li>The data is in name/value pairs</li>\n<li>The data is separated by commas</li>\n<li>Curly braces hold objects</li>\n<li>Square brackets hold arrays</li>\n</ol>\n</li>\n<li>\n<h3>What is the purpose JSON stringify</h3>\n<p> When sending data to a web server, the data has to be in a string format. You can achieve this by converting JSON object into a string using stringify() method.</p>\n<pre><code class=\"language-javascript\">var userJSON = { name: 'John', age: 31 };\nvar userString = JSON.stringify(user);\nconsole.log(userString); //\"{\"name\":\"John\",\"age\":31}\"\n</code></pre>\n</li>\n<li>\n<h3>How do you parse JSON string</h3>\n<p> When receiving the data from a web server, the data is always in a string format. But you can convert this string value to a javascript object using parse() method.</p>\n<pre><code class=\"language-javascript\">var userString = '{\"name\":\"John\",\"age\":31}';\nvar userJSON = JSON.parse(userString);\nconsole.log(userJSON); // {name: \"John\", age: 31}\n</code></pre>\n</li>\n<li>\n<h3>Why do you need JSON</h3>\n<p> When exchanging data between a browser and a server, the data can only be text. Since JSON is text only, it can easily be sent to and from a server, and used as a data format by any programming language.</p>\n</li>\n<li>\n<h3>What are PWAs</h3>\n<p> Progressive web applications (PWAs) are a type of mobile app delivered through the web, built using common web technologies including HTML, CSS and JavaScript. These PWAs are deployed to servers, accessible through URLs, and indexed by search engines.</p>\n</li>\n<li>\n<h3>What is the purpose of clearTimeout method</h3>\n<p> The clearTimeout() function is used in javascript to clear the timeout which has been set by setTimeout()function before that. i.e, The return value of setTimeout() function is stored in a variable and it's passed into the clearTimeout() function to clear the timer.</p>\n<p> For example, the below setTimeout method is used to display the message after 3 seconds. This timeout can be cleared by the clearTimeout() method.</p>\n<pre><code class=\"language-javascript\">&#x3C;script>\nvar msg;\nfunction greeting() {\n   alert('Good morning');\n}\nfunction start() {\n  msg =setTimeout(greeting, 3000);\n\n}\n\nfunction stop() {\n    clearTimeout(msg);\n}\n&#x3C;/script>\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of clearInterval method</h3>\n<p> The clearInterval() function is used in javascript to clear the interval which has been set by setInterval() function. i.e, The return value returned by setInterval() function is stored in a variable and it's passed into the clearInterval() function to clear the interval.</p>\n<p> For example, the below setInterval method is used to display the message for every 3 seconds. This interval can be cleared by the clearInterval() method.</p>\n<pre><code class=\"language-javascript\">&#x3C;script>\nvar msg;\nfunction greeting() {\n   alert('Good morning');\n}\nfunction start() {\n  msg = setInterval(greeting, 3000);\n\n}\n\nfunction stop() {\n    clearInterval(msg);\n}\n&#x3C;/script>\n</code></pre>\n</li>\n<li>\n<h3>How do you redirect new page in javascript</h3>\n<p> In vanilla javascript, you can redirect to a new page using the <code>location</code> property of window object. The syntax would be as follows,</p>\n<pre><code class=\"language-javascript\">function redirect() {\n    window.location.href = 'newPage.html';\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you check whether a string contains a substring</h3>\n<p> There are 3 possible ways to check whether a string contains a substring or not,</p>\n<ol>\n<li><strong>Using includes:</strong> ES6 provided <code>String.prototype.includes</code> method to test a string contains a substring</li>\n</ol>\n<pre><code class=\"language-javascript\">var mainString = 'hello',\n    subString = 'hell';\nmainString.includes(subString);\n</code></pre>\n<ol>\n<li><strong>Using indexOf:</strong> In an ES5 or older environment, you can use <code>String.prototype.indexOf</code> which returns the index of a substring. If the index value is not equal to -1 then it means the substring exists in the main string.</li>\n</ol>\n<pre><code class=\"language-javascript\">var mainString = 'hello',\n    subString = 'hell';\nmainString.indexOf(subString) !== -1;\n</code></pre>\n<ol>\n<li><strong>Using RegEx:</strong> The advanced solution is using Regular expression's test method(<code>RegExp.test</code>), which allows for testing for against regular expressions</li>\n</ol>\n<pre><code class=\"language-javascript\">var mainString = 'hello',\n    regex = /hell/;\nregex.test(mainString);\n</code></pre>\n</li>\n<li>\n<h3>How do you validate an email in javascript</h3>\n<p> You can validate an email in javascript using regular expressions. It is recommended to do validations on the server side instead of the client side. Because the javascript can be disabled on the client side.</p>\n<pre><code class=\"language-javascript\">function validateEmail(email) {\n    var re =\n        /^(([^&#x3C;>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^&#x3C;>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n    return re.test(String(email).toLowerCase());\n}\n</code></pre>\n<p> The above regular expression accepts unicode characters.</p>\n</li>\n<li>\n<h3>How do you get the current url with javascript</h3>\n<p> You can use <code>window.location.href</code> expression to get the current url path and you can use the same expression for updating the URL too. You can also use <code>document.URL</code> for read-only purposes but this solution has issues in FF.</p>\n<pre><code class=\"language-javascript\">console.log('location.href', window.location.href); // Returns full URL\n</code></pre>\n</li>\n<li>\n<h3>What are the various url properties of location object</h3>\n<p> The below <code>Location</code> object properties can be used to access URL components of the page,</p>\n<ol>\n<li>href - The entire URL</li>\n<li>protocol - The protocol of the URL</li>\n<li>host - The hostname and port of the URL</li>\n<li>hostname - The hostname of the URL</li>\n<li>port - The port number in the URL</li>\n<li>pathname - The path name of the URL</li>\n<li>search - The query portion of the URL</li>\n<li>hash - The anchor portion of the URL</li>\n</ol>\n</li>\n<li>\n<h3>How do get query string values in javascript</h3>\n<p> You can use URLSearchParams to get query string values in javascript. Let's see an example to get the client code value from URL query string,</p>\n<pre><code class=\"language-javascript\">const urlParams = new URLSearchParams(window.location.search);\nconst clientCode = urlParams.get('clientCode');\n</code></pre>\n</li>\n<li>\n<h3>How do you check if a key exists in an object</h3>\n<p> You can check whether a key exists in an object or not using three approaches,</p>\n<ol>\n<li><strong>Using in operator:</strong> You can use the in operator whether a key exists in an object or not</li>\n</ol>\n<pre><code class=\"language-javascript\">'key' in obj;\n</code></pre>\n<p> and If you want to check if a key doesn't exist, remember to use parenthesis,</p>\n<pre><code class=\"language-javascript\">!('key' in obj);\n</code></pre>\n<ol>\n<li><strong>Using hasOwnProperty method:</strong> You can use <code>hasOwnProperty</code> to particularly test for properties of the object instance (and not inherited properties)</li>\n</ol>\n<pre><code class=\"language-javascript\">obj.hasOwnProperty('key'); // true\n</code></pre>\n<ol>\n<li><strong>Using undefined comparison:</strong> If you access a non-existing property from an object, the result is undefined. Let's compare the properties against undefined to determine the existence of the property.</li>\n</ol>\n<pre><code class=\"language-javascript\">const user = {\n    name: 'John'\n};\n\nconsole.log(user.name !== undefined); // true\nconsole.log(user.nickName !== undefined); // false\n</code></pre>\n</li>\n<li>\n<h3>How do you loop through or enumerate javascript object</h3>\n<p> You can use the <code>for-in</code> loop to loop through javascript object. You can also make sure that the key you get is an actual property of an object, and doesn't come from the prototype using <code>hasOwnProperty</code> method.</p>\n<pre><code class=\"language-javascript\">var object = {\n    k1: 'value1',\n    k2: 'value2',\n    k3: 'value3'\n};\n\nfor (var key in object) {\n    if (object.hasOwnProperty(key)) {\n        console.log(key + ' -> ' + object[key]); // k1 -> value1 ...\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you test for an empty object</h3>\n<p> There are different solutions based on ECMAScript versions</p>\n<ol>\n<li><strong>Using Object entries(ECMA 7+):</strong> You can use object entries length along with constructor type.</li>\n</ol>\n<pre><code class=\"language-javascript\">Object.entries(obj).length === 0 &#x26;&#x26; obj.constructor === Object; // Since date object length is 0, you need to check constructor check as well\n</code></pre>\n<ol>\n<li><strong>Using Object keys(ECMA 5+):</strong> You can use object keys length along with constructor type.</li>\n</ol>\n<pre><code class=\"language-javascript\">Object.keys(obj).length === 0 &#x26;&#x26; obj.constructor === Object; // Since date object length is 0, you need to check constructor check as well\n</code></pre>\n<ol>\n<li><strong>Using for-in with hasOwnProperty(Pre-ECMA 5):</strong> You can use a for-in loop along with hasOwnProperty.</li>\n</ol>\n<pre><code class=\"language-javascript\">function isEmpty(obj) {\n    for (var prop in obj) {\n        if (obj.hasOwnProperty(prop)) {\n            return false;\n        }\n    }\n\n    return JSON.stringify(obj) === JSON.stringify({});\n}\n</code></pre>\n</li>\n<li>\n<h3>What is an arguments object</h3>\n<p> The arguments object is an Array-like object accessible inside functions that contains the values of the arguments passed to that function. For example, let's see how to use arguments object inside sum function,</p>\n<pre><code class=\"language-javascript\">function sum() {\n    var total = 0;\n    for (var i = 0, len = arguments.length; i &#x3C; len; ++i) {\n        total += arguments[i];\n    }\n    return total;\n}\n\nsum(1, 2, 3); // returns 6\n</code></pre>\n<p> <strong>Note:</strong> You can't apply array methods on arguments object. But you can convert into a regular array as below.</p>\n<pre><code class=\"language-javascript\">var argsArray = Array.prototype.slice.call(arguments);\n</code></pre>\n</li>\n<li>\n<h3>How do you make first letter of the string in an uppercase</h3>\n<p> You can create a function which uses a chain of string methods such as charAt, toUpperCase and slice methods to generate a string with the first letter in uppercase.</p>\n<pre><code class=\"language-javascript\">function capitalizeFirstLetter(string) {\n    return string.charAt(0).toUpperCase() + string.slice(1);\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the pros and cons of for loop</h3>\n<p> The for-loop is a commonly used iteration syntax in javascript. It has both pros and cons</p>\n<h4>Pros</h4>\n<ol>\n<li>Works on every environment</li>\n<li>You can use break and continue flow control statements</li>\n</ol>\n<h4>Cons</h4>\n<ol>\n<li>Too verbose</li>\n<li>Imperative</li>\n<li>You might face one-by-off errors</li>\n</ol>\n</li>\n<li>\n<h3>How do you display the current date in javascript</h3>\n<p> You can use <code>new Date()</code> to generate a new Date object containing the current date and time. For example, let's display the current date in mm/dd/yyyy</p>\n<pre><code class=\"language-javascript\">var today = new Date();\nvar dd = String(today.getDate()).padStart(2, '0');\nvar mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!\nvar yyyy = today.getFullYear();\n\ntoday = mm + '/' + dd + '/' + yyyy;\ndocument.write(today);\n</code></pre>\n</li>\n<li>\n<h3>How do you compare two date objects</h3>\n<p> You need to use date.getTime() method to compare date values instead of comparison operators (==, !=, ===, and !== operators)</p>\n<pre><code class=\"language-javascript\">var d1 = new Date();\nvar d2 = new Date(d1);\nconsole.log(d1.getTime() === d2.getTime()); //True\nconsole.log(d1 === d2); // False\n</code></pre>\n</li>\n<li>\n<h3>How do you check if a string starts with another string</h3>\n<p> You can use ECMAScript 6's <code>String.prototype.startsWith()</code> method to check if a string starts with another string or not. But it is not yet supported in all browsers. Let's see an example to see this usage,</p>\n<pre><code class=\"language-javascript\">'Good morning'.startsWith('Good'); // true\n'Good morning'.startsWith('morning'); // false\n</code></pre>\n</li>\n<li>\n<h3>How do you trim a string in javascript</h3>\n<p> JavaScript provided a trim method on string types to trim any whitespaces present at the beginning or ending of the string.</p>\n<pre><code class=\"language-javascript\">'  Hello World   '.trim(); //Hello World\n</code></pre>\n<p> If your browser(&#x3C;IE9) doesn't support this method then you can use below polyfill.</p>\n<pre><code class=\"language-javascript\">if (!String.prototype.trim) {\n    (function () {\n        // Make sure we trim BOM and NBSP\n        var rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n        String.prototype.trim = function () {\n            return this.replace(rtrim, '');\n        };\n    })();\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you add a key value pair in javascript</h3>\n<p> There are two possible solutions to add new properties to an object. Let's take a simple object to explain these solutions.</p>\n<pre><code class=\"language-javascript\">var object = {\n    key1: value1,\n    key2: value2\n};\n</code></pre>\n<ol>\n<li><strong>Using dot notation:</strong> This solution is useful when you know the name of the property</li>\n</ol>\n<pre><code class=\"language-javascript\">object.key3 = 'value3';\n</code></pre>\n<ol>\n<li><strong>Using square bracket notation:</strong> This solution is useful when the name of the property is dynamically determined.</li>\n</ol>\n<pre><code class=\"language-javascript\">obj['key3'] = 'value3';\n</code></pre>\n</li>\n<li>\n<h3>Is the !-- notation represents a special operator</h3>\n<p> No,that's not a special operator. But it is a combination of 2 standard operators one after the other,</p>\n<ol>\n<li>A logical not (!)</li>\n<li>A prefix decrement (--)</li>\n</ol>\n<p> At first, the value decremented by one and then tested to see if it is equal to zero or not for determining the truthy/falsy value.</p>\n</li>\n<li>\n<h3>How do you assign default values to variables</h3>\n<p> You can use the logical or operator <code>||</code> in an assignment expression to provide a default value. The syntax looks like as below,</p>\n<pre><code class=\"language-javascript\">var a = b || c;\n</code></pre>\n<p> As per the above expression, variable 'a 'will get the value of 'c' only if 'b' is falsy (if is null, false, undefined, 0, empty string, or NaN), otherwise 'a' will get the value of 'b'.</p>\n</li>\n<li>\n<h3>How do you define multiline strings</h3>\n<p> You can define multiline string literals using the '\\' character followed by line terminator.</p>\n<pre><code class=\"language-javascript\">var str =\n    'This is a \\\nvery lengthy \\\nsentence!';\n</code></pre>\n<p> But if you have a space after the '\\' character, the code will look exactly the same, but it will raise a SyntaxError.</p>\n</li>\n<li>\n<h3>What is an app shell model</h3>\n<p> An application shell (or app shell) architecture is one way to build a Progressive Web App that reliably and instantly loads on your users' screens, similar to what you see in native applications. It is useful for getting some initial HTML to the screen fast without a network.</p>\n</li>\n<li>\n<h3>Can we define properties for functions</h3>\n<p> Yes, We can define properties for functions because functions are also objects.</p>\n<pre><code class=\"language-javascript\">fn = function (x) {\n    //Function code goes here\n};\n\nfn.name = 'John';\n\nfn.profile = function (y) {\n    //Profile code goes here\n};\n</code></pre>\n</li>\n<li>\n<h3>What is the way to find the number of parameters expected by a function</h3>\n<p> You can use <code>function.length</code> syntax to find the number of parameters expected by a function. Let's take an example of <code>sum</code> function to calculate the sum of numbers,</p>\n<pre><code class=\"language-javascript\">function sum(num1, num2, num3, num4) {\n    return num1 + num2 + num3 + num4;\n}\nsum.length; // 4 is the number of parameters expected.\n</code></pre>\n</li>\n<li>\n<h3>What is a polyfill</h3>\n<p> A polyfill is a piece of JS code used to provide modern functionality on older browsers that do not natively support it. For example, Silverlight plugin polyfill can be used to mimic the functionality of an HTML Canvas element on Microsoft Internet Explorer 7.</p>\n</li>\n<li>\n<h3>What are break and continue statements</h3>\n<p> The break statement is used to \"jump out\" of a loop. i.e, It breaks the loop and continues executing the code after the loop.</p>\n<pre><code class=\"language-javascript\">for (i = 0; i &#x3C; 10; i++) {\n    if (i === 5) {\n        break;\n    }\n    text += 'Number: ' + i + '&#x3C;br>';\n}\n</code></pre>\n<p> The continue statement is used to \"jump over\" one iteration in the loop. i.e, It breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in the loop.</p>\n<pre><code class=\"language-javascript\">for (i = 0; i &#x3C; 10; i++) {\n    if (i === 5) {\n        continue;\n    }\n    text += 'Number: ' + i + '&#x3C;br>';\n}\n</code></pre>\n</li>\n<li>\n<h3>What are js labels</h3>\n<p> The label statement allows us to name loops and blocks in JavaScript. We can then use these labels to refer back to the code later. For example, the below code with labels avoids printing the numbers when they are same,</p>\n<pre><code class=\"language-javascript\">var i, j;\n\nloop1: for (i = 0; i &#x3C; 3; i++) {\n    loop2: for (j = 0; j &#x3C; 3; j++) {\n        if (i === j) {\n            continue loop1;\n        }\n        console.log('i = ' + i + ', j = ' + j);\n    }\n}\n\n// Output is:\n//   \"i = 1, j = 0\"\n//   \"i = 2, j = 0\"\n//   \"i = 2, j = 1\"\n</code></pre>\n</li>\n<li>\n<h3>What are the benefits of keeping declarations at the top</h3>\n<p> It is recommended to keep all declarations at the top of each script or function. The benefits of doing this are,</p>\n<ol>\n<li>Gives cleaner code</li>\n<li>It provides a single place to look for local variables</li>\n<li>Easy to avoid unwanted global variables</li>\n<li>It reduces the possibility of unwanted re-declarations</li>\n</ol>\n</li>\n<li>\n<h3>What are the benefits of initializing variables</h3>\n<p> It is recommended to initialize variables because of the below benefits,</p>\n<ol>\n<li>It gives cleaner code</li>\n<li>It provides a single place to initialize variables</li>\n<li>Avoid undefined values in the code</li>\n</ol>\n</li>\n<li>\n<h3>What are the recommendations to create new object</h3>\n<p> It is recommended to avoid creating new objects using <code>new Object()</code>. Instead you can initialize values based on it's type to create the objects.</p>\n<ol>\n<li>Assign {} instead of new Object()</li>\n<li>Assign \"\" instead of new String()</li>\n<li>Assign 0 instead of new Number()</li>\n<li>Assign false instead of new Boolean()</li>\n<li>Assign [] instead of new Array()</li>\n<li>Assign /()/ instead of new RegExp()</li>\n<li>Assign function (){} instead of new Function()</li>\n</ol>\n<p> You can define them as an example,</p>\n<pre><code class=\"language-javascript\">var v1 = {};\nvar v2 = '';\nvar v3 = 0;\nvar v4 = false;\nvar v5 = [];\nvar v6 = /()/;\nvar v7 = function () {};\n</code></pre>\n</li>\n<li>\n<h3>How do you define JSON arrays</h3>\n<p> JSON arrays are written inside square brackets and arrays contain javascript objects. For example, the JSON array of users would be as below,</p>\n<pre><code class=\"language-javascript\">\"users\":[\n  {\"firstName\":\"John\", \"lastName\":\"Abrahm\"},\n  {\"firstName\":\"Anna\", \"lastName\":\"Smith\"},\n  {\"firstName\":\"Shane\", \"lastName\":\"Warn\"}\n]\n</code></pre>\n</li>\n<li>\n<h3>How do you generate random integers</h3>\n<p> You can use Math.random() with Math.floor() to return random integers. For example, if you want generate random integers between 1 to 10, the multiplication factor should be 10,</p>\n<pre><code class=\"language-javascript\">Math.floor(Math.random() * 10) + 1; // returns a random integer from 1 to 10\nMath.floor(Math.random() * 100) + 1; // returns a random integer from 1 to 100\n</code></pre>\n<p> <strong>Note:</strong> Math.random() returns a random number between 0 (inclusive), and 1 (exclusive)</p>\n</li>\n<li>\n<h3>Can you write a random integers function to print integers with in a range</h3>\n<p> Yes, you can create a proper random function to return a random number between min and max (both included)</p>\n<pre><code class=\"language-javascript\">function randomInteger(min, max) {\n    return Math.floor(Math.random() * (max - min + 1)) + min;\n}\nrandomInteger(1, 100); // returns a random integer from 1 to 100\nrandomInteger(1, 1000); // returns a random integer from 1 to 1000\n</code></pre>\n</li>\n<li>\n<h3>What is tree shaking</h3>\n<p> Tree shaking is a form of dead code elimination. It means that unused modules will not be included in the bundle during the build process and for that it relies on the static structure of ES2015 module syntax,( i.e. import and export). Initially this has been popularized by the ES2015 module bundler <code>rollup</code>.</p>\n</li>\n<li>\n<h3>What is the need of tree shaking</h3>\n<p> Tree Shaking can significantly reduce the code size in any application. i.e, The less code we send over the wire the more performant the application will be. For example, if we just want to create a \"Hello World\" Application using SPA frameworks then it will take around a few MBs, but by tree shaking it can bring down the size to just a few hundred KBs. Tree shaking is implemented in Rollup and Webpack bundlers.</p>\n</li>\n<li>\n<h3>Is it recommended to use eval</h3>\n<p> No, it allows arbitrary code to be run which causes a security problem. As we know that the eval() function is used to run text as code. In most of the cases, it should not be necessary to use it.</p>\n</li>\n<li>\n<h3>What is a Regular Expression</h3>\n<p> A regular expression is a sequence of characters that forms a search pattern. You can use this search pattern for searching data in a text. These can be used to perform all types of text search and text replace operations. Let's see the syntax format now,</p>\n<pre><code class=\"language-javascript\">/pattern/modifiers;\n</code></pre>\n<p> For example, the regular expression or search pattern with case-insensitive username would be,</p>\n<pre><code class=\"language-javascript\">/John/i;\n</code></pre>\n</li>\n<li>\n<h3>What are the string methods available in Regular expression</h3>\n<p> Regular Expressions has two string methods: search() and replace().\nThe search() method uses an expression to search for a match, and returns the position of the match.</p>\n<pre><code class=\"language-javascript\">var msg = 'Hello John';\nvar n = msg.search(/John/i); // 6\n</code></pre>\n<p> The replace() method is used to return a modified string where the pattern is replaced.</p>\n<pre><code class=\"language-javascript\">var msg = 'Hello John';\nvar n = msg.replace(/John/i, 'Buttler'); // Hello Buttler\n</code></pre>\n</li>\n<li>\n<h3>What are modifiers in regular expression</h3>\n<p> Modifiers can be used to perform case-insensitive and global searches. Let's list down some of the modifiers,</p>\n<table>\n<thead>\n<tr>\n<th>Modifier</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>i</td>\n<td>Perform case-insensitive matching</td>\n</tr>\n<tr>\n<td>g</td>\n<td>Perform a global match rather than stops at first match</td>\n</tr>\n<tr>\n<td>m</td>\n<td>Perform multiline matching</td>\n</tr>\n</tbody>\n</table>\n<p> Let's take an example of global modifier,</p>\n<pre><code class=\"language-javascript\">var text = 'Learn JS one by one';\nvar pattern = /one/g;\nvar result = text.match(pattern); // one,one\n</code></pre>\n</li>\n<li>\n<h3>What are regular expression patterns</h3>\n<p> Regular Expressions provide a group of patterns in order to match characters. Basically they are categorized into 3 types,</p>\n<ol>\n<li>\n<p><strong>Brackets:</strong> These are used to find a range of characters.\nFor example, below are some use cases,</p>\n<ol>\n<li>[abc]: Used to find any of the characters between the brackets(a,b,c)</li>\n<li>[0-9]: Used to find any of the digits between the brackets</li>\n<li>(a|b): Used to find any of the alternatives separated with |</li>\n</ol>\n</li>\n<li>\n<p><strong>Metacharacters:</strong> These are characters with a special meaning\nFor example, below are some use cases,</p>\n<ol>\n<li>\\d: Used to find a digit</li>\n<li>\\s: Used to find a whitespace character</li>\n<li>\\b: Used to find a match at the beginning or ending of a word</li>\n</ol>\n</li>\n<li>\n<p><strong>Quantifiers:</strong> These are useful to define quantities\nFor example, below are some use cases,</p>\n<ol>\n<li>n+: Used to find matches for any string that contains at least one n</li>\n<li>n*: Used to find matches for any string that contains zero or more occurrences of n</li>\n<li>n?: Used to find matches for any string that contains zero or one occurrences of n</li>\n</ol>\n</li>\n</ol>\n</li>\n<li>\n<h3>What is a RegExp object</h3>\n<p> RegExp object is a regular expression object with predefined properties and methods. Let's see the simple usage of RegExp object,</p>\n<pre><code class=\"language-javascript\">var regexp = new RegExp('\\\\w+');\nconsole.log(regexp);\n// expected output: /\\w+/\n</code></pre>\n</li>\n<li>\n<h3>How do you search a string for a pattern</h3>\n<p> You can use the test() method of regular expression in order to search a string for a pattern, and return true or false depending on the result.</p>\n<pre><code class=\"language-javascript\">var pattern = /you/;\nconsole.log(pattern.test('How are you?')); //true\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of exec method</h3>\n<p> The purpose of exec method is similar to test method but it executes a search for a match in a specified string and returns a result array, or null instead of returning true/false.</p>\n<pre><code class=\"language-javascript\">var pattern = /you/;\nconsole.log(pattern.exec('How are you?')); //[\"you\", index: 8, input: \"How are you?\", groups: undefined]\n</code></pre>\n</li>\n<li>\n<h3>How do you change the style of a HTML element</h3>\n<p> You can change inline style or classname of a HTML element using javascript</p>\n<ol>\n<li><strong>Using style property:</strong> You can modify inline style using style property</li>\n</ol>\n<pre><code class=\"language-javascript\">document.getElementById('title').style.fontSize = '30px';\n</code></pre>\n<ol>\n<li><strong>Using ClassName property:</strong> It is easy to modify element class using className property</li>\n</ol>\n<pre><code class=\"language-javascript\">document.getElementById('title').className = 'custom-title';\n</code></pre>\n</li>\n<li>\n<h3>What would be the result of 1+2+'3'</h3>\n<p> The output is going to be <code>33</code>. Since <code>1</code> and <code>2</code> are numeric values, the result of the first two digits is going to be a numeric value <code>3</code>. The next digit is a string type value because of that the addition of numeric value <code>3</code> and string type value <code>3</code> is just going to be a concatenation value <code>33</code>.</p>\n</li>\n<li>\n<h3>What is a debugger statement</h3>\n<p> The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect.\nFor example, in the below function a debugger statement has been inserted. So\nexecution is paused at the debugger statement just like a breakpoint in the script source.</p>\n<pre><code class=\"language-javascript\">function getProfile() {\n    // code goes here\n    debugger;\n    // code goes here\n}\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of breakpoints in debugging</h3>\n<p> You can set breakpoints in the javascript code once the debugger statement is executed and the debugger window pops up. At each breakpoint, javascript will stop executing, and let you examine the JavaScript values. After examining values, you can resume the execution of code using the play button.</p>\n</li>\n<li>\n<h3>Can I use reserved words as identifiers</h3>\n<p> No, you cannot use the reserved words as variables, labels, object or function names. Let's see one simple example,</p>\n<pre><code class=\"language-javascript\">var else = \"hello\"; // Uncaught SyntaxError: Unexpected token else\n</code></pre>\n</li>\n<li>\n<h3>How do you detect a mobile browser</h3>\n<p> You can use regex which returns a true or false value depending on whether or not the user is browsing with a mobile.</p>\n<pre><code class=\"language-javascript\">window.mobilecheck = function () {\n    var mobileCheck = false;\n    (function (a) {\n        if (\n            /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(\n                a\n            ) ||\n            /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\n                a.substr(0, 4)\n            )\n        )\n            mobileCheck = true;\n    })(navigator.userAgent || navigator.vendor || window.opera);\n    return mobileCheck;\n};\n</code></pre>\n</li>\n<li>\n<h3>How do you detect a mobile browser without regexp</h3>\n<p> You can detect mobile browsers by simply running through a list of devices and checking if the useragent matches anything. This is an alternative solution for RegExp usage,</p>\n<pre><code class=\"language-javascript\">function detectmob() {\n    if (\n        navigator.userAgent.match(/Android/i) ||\n        navigator.userAgent.match(/webOS/i) ||\n        navigator.userAgent.match(/iPhone/i) ||\n        navigator.userAgent.match(/iPad/i) ||\n        navigator.userAgent.match(/iPod/i) ||\n        navigator.userAgent.match(/BlackBerry/i) ||\n        navigator.userAgent.match(/Windows Phone/i)\n    ) {\n        return true;\n    } else {\n        return false;\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you get the image width and height using JS</h3>\n<p> You can programmatically get the image and check the dimensions(width and height) using Javascript.</p>\n<pre><code class=\"language-javascript\">var img = new Image();\nimg.onload = function () {\n    console.log(this.width + 'x' + this.height);\n};\nimg.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';\n</code></pre>\n</li>\n<li>\n<h3>How do you make synchronous HTTP request</h3>\n<p> Browsers provide an XMLHttpRequest object which can be used to make synchronous HTTP requests from JavaScript</p>\n<pre><code class=\"language-javascript\">function httpGet(theUrl) {\n    var xmlHttpReq = new XMLHttpRequest();\n    xmlHttpReq.open('GET', theUrl, false); // false for synchronous request\n    xmlHttpReq.send(null);\n    return xmlHttpReq.responseText;\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you make asynchronous HTTP request</h3>\n<p> Browsers provide an XMLHttpRequest object which can be used to make asynchronous HTTP requests from JavaScript by passing the 3rd parameter as true.</p>\n<pre><code class=\"language-javascript\">function httpGetAsync(theUrl, callback) {\n    var xmlHttpReq = new XMLHttpRequest();\n    xmlHttpReq.onreadystatechange = function () {\n        if (xmlHttpReq.readyState == 4 &#x26;&#x26; xmlHttpReq.status == 200) callback(xmlHttpReq.responseText);\n    };\n    xmlHttp.open('GET', theUrl, true); // true for asynchronous\n    xmlHttp.send(null);\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you convert date to another timezone in javascript</h3>\n<p> You can use the toLocaleString() method to convert dates in one timezone to another. For example, let's convert current date to British English timezone as below,</p>\n<pre><code class=\"language-javascript\">console.log(event.toLocaleString('en-GB', { timeZone: 'UTC' })); //29/06/2019, 09:56:00\n</code></pre>\n</li>\n<li>\n<h3>What are the properties used to get size of window</h3>\n<p> You can use innerWidth, innerHeight, clientWidth, clientHeight properties of windows, document element and document body objects to find the size of a window. Let's use them combination of these properties to calculate the size of a window or document,</p>\n<pre><code class=\"language-javascript\">var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\nvar height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n</code></pre>\n</li>\n<li>\n<h3>What is a conditional operator in javascript</h3>\n<p> The conditional (ternary) operator is the only JavaScript operator that takes three operands which acts as a shortcut for if statements.</p>\n<pre><code class=\"language-javascript\">var isAuthenticated = false;\nconsole.log(isAuthenticated ? 'Hello, welcome' : 'Sorry, you are not authenticated'); //Sorry, you are not authenticated\n</code></pre>\n</li>\n<li>\n<h3>Can you apply chaining on conditional operator</h3>\n<p> Yes, you can apply chaining on conditional operators similar to if … else if … else if … else chain. The syntax is going to be as below,</p>\n<pre><code class=\"language-javascript\">function traceValue(someParam) {\n    return condition1 ? value1 : condition2 ? value2 : condition3 ? value3 : value4;\n}\n\n// The above conditional operator is equivalent to:\n\nfunction traceValue(someParam) {\n    if (condition1) {\n        return value1;\n    } else if (condition2) {\n        return value2;\n    } else if (condition3) {\n        return value3;\n    } else {\n        return value4;\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the ways to execute javascript after page load</h3>\n<p> You can execute javascript after page load in many different ways,</p>\n<ol>\n<li><strong>window.onload:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">window.onload = function ...\n</code></pre>\n<ol>\n<li><strong>document.onload:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">document.onload = function ...\n</code></pre>\n<ol>\n<li><strong>body onload:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">&#x3C;body onload=\"script();\">\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between proto and prototype</h3>\n<p> The <code>__proto__</code> object is the actual object that is used in the lookup chain to resolve methods, etc. Whereas <code>prototype</code> is the object that is used to build <code>__proto__</code> when you create an object with new</p>\n<pre><code class=\"language-javascript\">new Employee().__proto__ === Employee.prototype;\nnew Employee().prototype === undefined;\n</code></pre>\n</li>\n<li>\n<h3>Give an example where do you really need semicolon</h3>\n<p> It is recommended to use semicolons after every statement in JavaScript. For example, in the below case it throws an error \".. is not a function\" at runtime due to missing semicolon.</p>\n<pre><code class=\"language-javascript\">// define a function\nvar fn = (function () {\n    //...\n})(\n    // semicolon missing at this line\n\n    // then execute some code inside a closure\n    function () {\n        //...\n    }\n)();\n</code></pre>\n<p> and it will be interpreted as</p>\n<pre><code class=\"language-javascript\">var fn = (function () {\n    //...\n})(function () {\n    //...\n})();\n</code></pre>\n<p> In this case, we are passing the second function as an argument to the first function and then trying to call the result of the first function call as a function. Hence, the second function will fail with a \"... is not a function\" error at runtime.</p>\n</li>\n<li>\n<h3>What is a freeze method</h3>\n<p> The <strong>freeze()</strong> method is used to freeze an object. Freezing an object does not allow adding new properties to an object,prevents from removing and prevents changing the enumerability, configurability, or writability of existing properties. i.e, It returns the passed object and does not create a frozen copy.</p>\n<pre><code class=\"language-javascript\">const obj = {\n    prop: 100\n};\n\nObject.freeze(obj);\nobj.prop = 200; // Throws an error in strict mode\n\nconsole.log(obj.prop); //100\n</code></pre>\n<p> <strong>Note:</strong> It causes a TypeError if the argument passed is not an object.</p>\n</li>\n<li>\n<h3>What is the purpose of freeze method</h3>\n<p> Below are the main benefits of using freeze method,</p>\n<ol>\n<li>It is used for freezing objects and arrays.</li>\n<li>It is used to make an object immutable.</li>\n</ol>\n</li>\n<li>\n<h3>Why do I need to use freeze method</h3>\n<p> In the Object-oriented paradigm, an existing API contains certain elements that are not intended to be extended, modified, or re-used outside of their current context. Hence it works as the <code>final</code> keyword which is used in various languages.</p>\n</li>\n<li>\n<h3>How do you detect a browser language preference</h3>\n<p> You can use navigator object to detect a browser language preference as below,</p>\n<pre><code class=\"language-javascript\">var language =\n    (navigator.languages &#x26;&#x26; navigator.languages[0]) || // Chrome / Firefox\n    navigator.language || // All browsers\n    navigator.userLanguage; // IE &#x3C;= 10\n\nconsole.log(language);\n</code></pre>\n</li>\n<li>\n<h3>How to convert string to title case with javascript</h3>\n<p> Title case means that the first letter of each word is capitalized. You can convert a string to title case using the below function,</p>\n<pre><code class=\"language-javascript\">function toTitleCase(str) {\n    return str.replace(/\\w\\S*/g, function (txt) {\n        return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n    });\n}\ntoTitleCase('good morning john'); // Good Morning John\n</code></pre>\n</li>\n<li>\n<h3>How do you detect javascript disabled in the page</h3>\n<p> You can use the <code>&#x3C;noscript></code> tag to detect javascript disabled or not. The code block inside <code>&#x3C;noscript></code> gets executed when JavaScript is disabled, and is typically used to display alternative content when the page generated in JavaScript.</p>\n<pre><code class=\"language-javascript\">&#x3C;script type=\"javascript\">\n    // JS related code goes here\n&#x3C;/script>\n&#x3C;noscript>\n    &#x3C;a href=\"next_page.html?noJS=true\">JavaScript is disabled in the page. Please click Next Page&#x3C;/a>\n&#x3C;/noscript>\n</code></pre>\n</li>\n<li>\n<h3>What are various operators supported by javascript</h3>\n<p> An operator is capable of manipulating(mathematical and logical computations) a certain value or operand. There are various operators supported by JavaScript as below,</p>\n<ol>\n<li><strong>Arithmetic Operators:</strong> Includes + (Addition),- (Subtraction), * (Multiplication), / (Division), % (Modulus), + + (Increment) and - - (Decrement)</li>\n<li><strong>Comparison Operators:</strong> Includes = =(Equal),!= (Not Equal), ===(Equal with type), > (Greater than),> = (Greater than or Equal to),&#x3C; (Less than),&#x3C;= (Less than or Equal to)</li>\n<li><strong>Logical Operators:</strong> Includes &#x26;&#x26;(Logical AND),||(Logical OR),!(Logical NOT)</li>\n<li><strong>Assignment Operators:</strong> Includes = (Assignment Operator), += (Add and Assignment Operator), - = (Subtract and Assignment Operator), *= (Multiply and Assignment), /= (Divide and Assignment), %= (Modules and Assignment)</li>\n<li><strong>Ternary Operators:</strong> It includes conditional(: ?) Operator</li>\n<li><strong>typeof Operator:</strong> It uses to find type of variable. The syntax looks like <code>typeof variable</code></li>\n</ol>\n</li>\n<li>\n<h3>What is a rest parameter</h3>\n<p> Rest parameter is an improved way to handle function parameters which allows us to represent an indefinite number of arguments as an array. The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">function f(a, b, ...theArgs) {\n    // ...\n}\n</code></pre>\n<p> For example, let's take a sum example to calculate on dynamic number of parameters,</p>\n<pre><code class=\"language-javascript\">function total(…args){\nlet sum = 0;\nfor(let i of args){\nsum+=i;\n}\nreturn sum;\n}\nconsole.log(fun(1,2)); //3\nconsole.log(fun(1,2,3)); //6\nconsole.log(fun(1,2,3,4)); //13\nconsole.log(fun(1,2,3,4,5)); //15\n</code></pre>\n<p> <strong>Note:</strong> Rest parameter is added in ES2015 or ES6</p>\n</li>\n<li>\n<h3>What happens if you do not use rest parameter as a last argument</h3>\n<p> The rest parameter should be the last argument, as its job is to collect all the remaining arguments into an array. For example, if you define a function like below it doesn't make any sense and will throw an error.</p>\n<pre><code class=\"language-javascript\">function someFunc(a,…b,c){\n//You code goes here\nreturn;\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the bitwise operators available in javascript</h3>\n<p> Below are the list of bitwise logical operators used in JavaScript</p>\n<ol>\n<li>Bitwise AND ( &#x26; )</li>\n<li>Bitwise OR ( | )</li>\n<li>Bitwise XOR ( ^ )</li>\n<li>Bitwise NOT ( ~ )</li>\n<li>Left Shift ( &#x3C;&#x3C; )</li>\n<li>Sign Propagating Right Shift ( >> )</li>\n<li>Zero fill Right Shift ( >>> )</li>\n</ol>\n</li>\n<li>\n<h3>What is a spread operator</h3>\n<p> Spread operator allows iterables( arrays / objects / strings ) to be expanded into single arguments/elements. Let's take an example to see this behavior,</p>\n<pre><code class=\"language-javascript\">function calculateSum(x, y, z) {\n    return x + y + z;\n}\n\nconst numbers = [1, 2, 3];\n\nconsole.log(calculateSum(...numbers)); // 6\n</code></pre>\n</li>\n<li>\n<h3>How do you determine whether object is frozen or not</h3>\n<p> Object.isFrozen() method is used to determine if an object is frozen or not.An object is frozen if all of the below conditions hold true,</p>\n<ol>\n<li>If it is not extensible.</li>\n<li>If all of its properties are non-configurable.</li>\n<li>If all its data properties are non-writable.\nThe usage is going to be as follows,</li>\n</ol>\n<pre><code class=\"language-javascript\">const object = {\n    property: 'Welcome JS world'\n};\nObject.freeze(object);\nconsole.log(Object.isFrozen(object));\n</code></pre>\n</li>\n<li>\n<h3>How do you determine two values same or not using object</h3>\n<p> The Object.is() method determines whether two values are the same value. For example, the usage with different types of values would be,</p>\n<pre><code class=\"language-javascript\">Object.is('hello', 'hello'); // true\nObject.is(window, window); // true\nObject.is([], []); // false\n</code></pre>\n<p> Two values are the same if one of the following holds:</p>\n<ol>\n<li>both undefined</li>\n<li>both null</li>\n<li>both true or both false</li>\n<li>both strings of the same length with the same characters in the same order</li>\n<li>both the same object (means both object have same reference)</li>\n<li>both numbers and\nboth +0\nboth -0\nboth NaN\nboth non-zero and both not NaN and both have the same value.</li>\n</ol>\n</li>\n<li>\n<h3>What is the purpose of using object is method</h3>\n<p> Some of the applications of Object's <code>is</code> method are follows,</p>\n<ol>\n<li>It is used for comparison of two strings.</li>\n<li>It is used for comparison of two numbers.</li>\n<li>It is used for comparing the polarity of two numbers.</li>\n<li>It is used for comparison of two objects.</li>\n</ol>\n</li>\n<li>\n<h3>How do you copy properties from one object to other</h3>\n<p> You can use the Object.assign() method which is used to copy the values and properties from one or more source objects to a target object. It returns the target object which has properties and values copied from the target object. The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">Object.assign(target, ...sources);\n</code></pre>\n<p> Let's take example with one source and one target object,</p>\n<pre><code class=\"language-javascript\">const target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nconst returnedTarget = Object.assign(target, source);\n\nconsole.log(target); // { a: 1, b: 3, c: 4 }\n\nconsole.log(returnedTarget); // { a: 1, b: 3, c: 4 }\n</code></pre>\n<p> As observed in the above code, there is a common property(<code>b</code>) from source to target so it's value has been overwritten.</p>\n</li>\n<li>\n<h3>What are the applications of assign method</h3>\n<p> Below are the some of main applications of Object.assign() method,</p>\n<ol>\n<li>It is used for cloning an object.</li>\n<li>It is used to merge objects with the same properties.</li>\n</ol>\n</li>\n<li>\n<h3>What is a proxy object</h3>\n<p> The Proxy object is used to define custom behavior for fundamental operations such as property lookup, assignment, enumeration, function invocation, etc. The syntax would be as follows,</p>\n<pre><code class=\"language-javascript\">var p = new Proxy(target, handler);\n</code></pre>\n<p> Let's take an example of proxy object,</p>\n<pre><code class=\"language-javascript\">var handler = {\n    get: function (obj, prop) {\n        return prop in obj ? obj[prop] : 100;\n    }\n};\n\nvar p = new Proxy({}, handler);\np.a = 10;\np.b = null;\n\nconsole.log(p.a, p.b); // 10, null\nconsole.log('c' in p, p.c); // false, 100\n</code></pre>\n<p> In the above code, it uses <code>get</code> handler which define the behavior of the proxy when an operation is performed on it</p>\n</li>\n<li>\n<h3>What is the purpose of seal method</h3>\n<p> The <strong>Object.seal()</strong> method is used to seal an object, by preventing new properties from being added to it and marking all existing properties as non-configurable. But values of present properties can still be changed as long as they are writable. Let's see the below example to understand more about seal() method</p>\n<pre><code class=\"language-javascript\">const object = {\n    property: 'Welcome JS world'\n};\nObject.seal(object);\nobject.property = 'Welcome to object world';\nconsole.log(Object.isSealed(object)); // true\ndelete object.property; // You cannot delete when sealed\nconsole.log(object.property); //Welcome to object world\n</code></pre>\n</li>\n<li>\n<h3>What are the applications of seal method</h3>\n<p> Below are the main applications of Object.seal() method,</p>\n<ol>\n<li>It is used for sealing objects and arrays.</li>\n<li>It is used to make an object immutable.</li>\n</ol>\n</li>\n<li>\n<h3>What are the differences between freeze and seal methods</h3>\n<p> If an object is frozen using the Object.freeze() method then its properties become immutable and no changes can be made in them whereas if an object is sealed using the Object.seal() method then the changes can be made in the existing properties of the object.</p>\n</li>\n<li>\n<h3>How do you determine if an object is sealed or not</h3>\n<p> The Object.isSealed() method is used to determine if an object is sealed or not. An object is sealed if all of the below conditions hold true</p>\n<ol>\n<li>If it is not extensible.</li>\n<li>If all of its properties are non-configurable.</li>\n<li>If it is not removable (but not necessarily non-writable).\nLet's see it in the action</li>\n</ol>\n<pre><code class=\"language-javascript\">const object = {\n    property: 'Hello, Good morning'\n};\n\nObject.seal(object); // Using seal() method to seal the object\n\nconsole.log(Object.isSealed(object)); // checking whether the object is sealed or not\n</code></pre>\n</li>\n<li>\n<h3>How do you get enumerable key and value pairs</h3>\n<p> The Object.entries() method is used to return an array of a given object's own enumerable string-keyed property [key, value] pairs, in the same order as that provided by a for...in loop. Let's see the functionality of object.entries() method in an example,</p>\n<pre><code class=\"language-javascript\">const object = {\n    a: 'Good morning',\n    b: 100\n};\n\nfor (let [key, value] of Object.entries(object)) {\n    console.log(`${key}: ${value}`); // a: 'Good morning'\n    // b: 100\n}\n</code></pre>\n<p> <strong>Note:</strong> The order is not guaranteed as object defined.</p>\n</li>\n<li>\n<h3>What is the main difference between Object.values and Object.entries method</h3>\n<p> The Object.values() method's behavior is similar to Object.entries() method but it returns an array of values instead [key,value] pairs.</p>\n<pre><code class=\"language-javascript\">const object = {\n    a: 'Good morning',\n    b: 100\n};\n\nfor (let value of Object.values(object)) {\n    console.log(`${value}`); // 'Good morning'\n    100;\n}\n</code></pre>\n</li>\n<li>\n<h3>How can you get the list of keys of any object</h3>\n<p> You can use the <code>Object.keys()</code> method which is used to return an array of a given object's own property names, in the same order as we get with a normal loop. For example, you can get the keys of a user object,</p>\n<pre><code class=\"language-javascript\">const user = {\n    name: 'John',\n    gender: 'male',\n    age: 40\n};\n\nconsole.log(Object.keys(user)); //['name', 'gender', 'age']\n</code></pre>\n</li>\n<li>\n<h3>How do you create an object with prototype</h3>\n<p> The Object.create() method is used to create a new object with the specified prototype object and properties. i.e, It uses an existing object as the prototype of the newly created object. It returns a new object with the specified prototype object and properties.</p>\n<pre><code class=\"language-javascript\">const user = {\n    name: 'John',\n    printInfo: function () {\n        console.log(`My name is ${this.name}.`);\n    }\n};\n\nconst admin = Object.create(user);\n\nadmin.name = 'Nick'; // Remember that \"name\" is a property set on \"admin\" but not on \"user\" object\n\nadmin.printInfo(); // My name is Nick\n</code></pre>\n</li>\n<li>\n<h3>What is a WeakSet</h3>\n<p> WeakSet is used to store a collection of weakly(weak references) held objects. The syntax would be as follows,</p>\n<pre><code class=\"language-javascript\">new WeakSet([iterable]);\n</code></pre>\n<p> Let's see the below example to explain it's behavior,</p>\n<pre><code class=\"language-javascript\">var ws = new WeakSet();\nvar user = {};\nws.add(user);\nws.has(user); // true\nws.delete(user); // removes user from the set\nws.has(user); // false, user has been removed\n</code></pre>\n</li>\n<li>\n<h3>What are the differences between WeakSet and Set</h3>\n<p> The main difference is that references to objects in Set are strong while references to objects in WeakSet are weak. i.e, An object in WeakSet can be garbage collected if there is no other reference to it.\nOther differences are,</p>\n<ol>\n<li>Sets can store any value Whereas WeakSets can store only collections of objects</li>\n<li>WeakSet does not have size property unlike Set</li>\n<li>WeakSet does not have methods such as clear, keys, values, entries, forEach.</li>\n<li>WeakSet is not iterable.</li>\n</ol>\n</li>\n<li>\n<h3>List down the collection of methods available on WeakSet</h3>\n<p> Below are the list of methods available on WeakSet,</p>\n<ol>\n<li>add(value): A new object is appended with the given value to the weakset</li>\n<li>delete(value): Deletes the value from the WeakSet collection.</li>\n<li>has(value): It returns true if the value is present in the WeakSet Collection, otherwise it returns false.</li>\n</ol>\n<p> Let's see the functionality of all the above methods in an example,</p>\n<pre><code class=\"language-javascript\">var weakSetObject = new WeakSet();\nvar firstObject = {};\nvar secondObject = {};\n// add(value)\nweakSetObject.add(firstObject);\nweakSetObject.add(secondObject);\nconsole.log(weakSetObject.has(firstObject)); //true\nweakSetObject.delete(secondObject);\n</code></pre>\n</li>\n<li>\n<h3>What is a WeakMap</h3>\n<p> The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced. In this case, keys must be objects and the values can be arbitrary values. The syntax is looking like as below,</p>\n<pre><code class=\"language-javascript\">new WeakMap([iterable]);\n</code></pre>\n<p> Let's see the below example to explain it's behavior,</p>\n<pre><code class=\"language-javascript\">var ws = new WeakMap();\nvar user = {};\nws.set(user);\nws.has(user); // true\nws.delete(user); // removes user from the map\nws.has(user); // false, user has been removed\n</code></pre>\n</li>\n<li>\n<h3>What are the differences between WeakMap and Map</h3>\n<p> The main difference is that references to key objects in Map are strong while references to key objects in WeakMap are weak. i.e, A key object in WeakMap can be garbage collected if there is no other reference to it.\nOther differences are,</p>\n<ol>\n<li>Maps can store any key type Whereas WeakMaps can store only collections of key objects</li>\n<li>WeakMap does not have size property unlike Map</li>\n<li>WeakMap does not have methods such as clear, keys, values, entries, forEach.</li>\n<li>WeakMap is not iterable.</li>\n</ol>\n</li>\n<li>\n<h3>List down the collection of methods available on WeakMap</h3>\n<p> Below are the list of methods available on WeakMap,</p>\n<ol>\n<li>set(key, value): Sets the value for the key in the WeakMap object. Returns the WeakMap object.</li>\n<li>delete(key): Removes any value associated to the key.</li>\n<li>has(key): Returns a Boolean asserting whether a value has been associated to the key in the WeakMap object or not.</li>\n<li>get(key): Returns the value associated to the key, or undefined if there is none.\nLet's see the functionality of all the above methods in an example,</li>\n</ol>\n<pre><code class=\"language-javascript\">var weakMapObject = new WeakMap();\nvar firstObject = {};\nvar secondObject = {};\n// set(key, value)\nweakMapObject.set(firstObject, 'John');\nweakMapObject.set(secondObject, 100);\nconsole.log(weakMapObject.has(firstObject)); //true\nconsole.log(weakMapObject.get(firstObject)); // John\nweakMapObject.delete(secondObject);\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of uneval</h3>\n<p> The uneval() is an inbuilt function which is used to create a string representation of the source code of an Object. It is a top-level function and is not associated with any object. Let's see the below example to know more about it's functionality,</p>\n<pre><code class=\"language-javascript\">var a = 1;\nuneval(a); // returns a String containing 1\nuneval(function user() {}); // returns \"(function user(){})\"\n</code></pre>\n</li>\n<li>\n<h3>How do you encode an URL</h3>\n<p> The encodeURI() function is used to encode complete URI which has special characters except (, / ? : @ &#x26; = + $ #) characters.</p>\n<pre><code class=\"language-javascript\">var uri = 'https://mozilla.org/?x=шеллы';\nvar encoded = encodeURI(uri);\nconsole.log(encoded); // https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\n</code></pre>\n</li>\n<li>\n<h3>How do you decode an URL</h3>\n<p> The decodeURI() function is used to decode a Uniform Resource Identifier (URI) previously created by encodeURI().</p>\n<pre><code class=\"language-javascript\">var uri = 'https://mozilla.org/?x=шеллы';\nvar encoded = encodeURI(uri);\nconsole.log(encoded); // https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\ntry {\n    console.log(decodeURI(encoded)); // \"https://mozilla.org/?x=шеллы\"\n} catch (e) {\n    // catches a malformed URI\n    console.error(e);\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you print the contents of web page</h3>\n<p> The window object provided a print() method which is used to print the contents of the current window. It opens a Print dialog box which lets you choose between various printing options. Let's see the usage of print method in an example,</p>\n<pre><code class=\"language-html\">&#x3C;input type=\"button\" value=\"Print\" onclick=\"window.print()\" />\n</code></pre>\n<p> <strong>Note:</strong> In most browsers, it will block while the print dialog is open.</p>\n</li>\n<li>\n<h3>What is the difference between uneval and eval</h3>\n<p> The <code>uneval</code> function returns the source of a given object; whereas the <code>eval</code> function does the opposite, by evaluating that source code in a different memory area. Let's see an example to clarify the difference,</p>\n<pre><code class=\"language-javascript\">var msg = uneval(function greeting() {\n    return 'Hello, Good morning';\n});\nvar greeting = eval(msg);\ngreeting(); // returns \"Hello, Good morning\"\n</code></pre>\n</li>\n<li>\n<h3>What is an anonymous function</h3>\n<p> An anonymous function is a function without a name! Anonymous functions are commonly assigned to a variable name or used as a callback function. The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">function (optionalParameters) {\n  //do something\n}\n\nconst myFunction = function(){ //Anonymous function assigned to a variable\n  //do something\n};\n\n[1, 2, 3].map(function(element){ //Anonymous function used as a callback function\n  //do something\n});\n</code></pre>\n<p> Let's see the above anonymous function in an example,</p>\n<pre><code class=\"language-javascript\">var x = function (a, b) {\n    return a * b;\n};\nvar z = x(5, 10);\nconsole.log(z); // 50\n</code></pre>\n</li>\n<li>\n<h3>What is the precedence order between local and global variables</h3>\n<p> A local variable takes precedence over a global variable with the same name. Let's see this behavior in an example.</p>\n<pre><code class=\"language-javascript\">var msg = 'Good morning';\nfunction greeting() {\n    msg = 'Good Evening';\n    console.log(msg);\n}\ngreeting();\n</code></pre>\n</li>\n<li>\n<h3>What are javascript accessors</h3>\n<p> ECMAScript 5 introduced javascript object accessors or computed properties through getters and setters. Getters uses the <code>get</code> keyword whereas Setters uses the <code>set</code> keyword.</p>\n<pre><code class=\"language-javascript\">var user = {\n  firstName: \"John\",\n  lastName : \"Abraham\",\n  language : \"en\",\n  get lang() {\n    return this.language;\n  }\n  set lang(lang) {\n  this.language = lang;\n  }\n};\nconsole.log(user.lang); // getter access lang as en\nuser.lang = 'fr';\nconsole.log(user.lang); // setter used to set lang as fr\n</code></pre>\n</li>\n<li>\n<h3>How do you define property on Object constructor</h3>\n<p> The Object.defineProperty() static method is used to define a new property directly on an object, or modify an existing property on an object, and returns the object. Let's see an example to know how to define property,</p>\n<pre><code class=\"language-javascript\">const newObject = {};\n\nObject.defineProperty(newObject, 'newProperty', {\n    value: 100,\n    writable: false\n});\n\nconsole.log(newObject.newProperty); // 100\n\nnewObject.newProperty = 200; // It throws an error in strict mode due to writable setting\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between get and defineProperty</h3>\n<p> Both have similar results until unless you use classes. If you use <code>get</code> the property will be defined on the prototype of the object whereas using <code>Object.defineProperty()</code> the property will be defined on the instance it is applied to.</p>\n</li>\n<li>\n<h3>What are the advantages of Getters and Setters</h3>\n<p> Below are the list of benefits of Getters and Setters,</p>\n<ol>\n<li>They provide simpler syntax</li>\n<li>They are used for defining computed properties, or accessors in JS.</li>\n<li>Useful to provide equivalence relation between properties and methods</li>\n<li>They can provide better data quality</li>\n<li>Useful for doing things behind the scenes with the encapsulated logic.</li>\n</ol>\n</li>\n<li>\n<h3>Can I add getters and setters using defineProperty method</h3>\n<p> Yes, You can use the <code>Object.defineProperty()</code> method to add Getters and Setters. For example, the below counter object uses increment, decrement, add and subtract properties,</p>\n<pre><code class=\"language-javascript\">var obj = { counter: 0 };\n\n// Define getters\nObject.defineProperty(obj, 'increment', {\n    get: function () {\n        this.counter++;\n    }\n});\nObject.defineProperty(obj, 'decrement', {\n    get: function () {\n        this.counter--;\n    }\n});\n\n// Define setters\nObject.defineProperty(obj, 'add', {\n    set: function (value) {\n        this.counter += value;\n    }\n});\nObject.defineProperty(obj, 'subtract', {\n    set: function (value) {\n        this.counter -= value;\n    }\n});\n\nobj.add = 10;\nobj.subtract = 5;\nconsole.log(obj.increment); //6\nconsole.log(obj.decrement); //5\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of switch-case</h3>\n<p> The switch case statement in JavaScript is used for decision making purposes. In a few cases, using the switch case statement is going to be more convenient than if-else statements. The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">switch (expression)\n{\n    case value1:\n        statement1;\n        break;\n    case value2:\n        statement2;\n        break;\n    .\n    .\n    case valueN:\n        statementN;\n        break;\n    default:\n        statementDefault;\n}\n</code></pre>\n<p> The above multi-way branch statement provides an easy way to dispatch execution to different parts of code based on the value of the expression.</p>\n</li>\n<li>\n<h3>What are the conventions to be followed for the usage of switch case</h3>\n<p> Below are the list of conventions should be taken care,</p>\n<ol>\n<li>The expression can be of type either number or string.</li>\n<li>Duplicate values are not allowed for the expression.</li>\n<li>The default statement is optional. If the expression passed to switch does not match with any case value then the statement within default case will be executed.</li>\n<li>The break statement is used inside the switch to terminate a statement sequence.</li>\n<li>The break statement is optional. But if it is omitted, the execution will continue on into the next case.</li>\n</ol>\n</li>\n<li>\n<h3>What are primitive data types</h3>\n<p> A primitive data type is data that has a primitive value (which has no properties or methods). There are 7 types of primitive data types.</p>\n<ol>\n<li>string</li>\n<li>number</li>\n<li>boolean</li>\n<li>null</li>\n<li>undefined</li>\n<li>bigint</li>\n<li>symbol</li>\n</ol>\n</li>\n<li>\n<h3>What are the different ways to access object properties</h3>\n<p> There are 3 possible ways for accessing the property of an object.</p>\n<ol>\n<li><strong>Dot notation:</strong> It uses dot for accessing the properties</li>\n</ol>\n<pre><code class=\"language-javascript\">objectName.property;\n</code></pre>\n<ol>\n<li><strong>Square brackets notation:</strong> It uses square brackets for property access</li>\n</ol>\n<pre><code class=\"language-javascript\">objectName['property'];\n</code></pre>\n<ol>\n<li><strong>Expression notation:</strong> It uses expression in the square brackets</li>\n</ol>\n<pre><code class=\"language-javascript\">objectName[expression];\n</code></pre>\n</li>\n<li>\n<h3>What are the function parameter rules</h3>\n<p> JavaScript functions follow below rules for parameters,</p>\n<ol>\n<li>The function definitions do not specify data types for parameters.</li>\n<li>Do not perform type checking on the passed arguments.</li>\n<li>Do not check the number of arguments received.\ni.e, The below function follows the above rules,</li>\n</ol>\n<pre><code class=\"language-javascript\">function functionName(parameter1, parameter2, parameter3) {\n    console.log(parameter1); // 1\n}\nfunctionName(1);\n</code></pre>\n</li>\n<li>\n<h3>What is an error object</h3>\n<p> An error object is a built in error object that provides error information when an error occurs. It has two properties: name and message. For example, the below function logs error details,</p>\n<pre><code class=\"language-javascript\">try {\n    greeting('Welcome');\n} catch (err) {\n    console.log(err.name + '&#x3C;br>' + err.message);\n}\n</code></pre>\n</li>\n<li>\n<h3>When you get a syntax error</h3>\n<p> A SyntaxError is thrown if you try to evaluate code with a syntax error. For example, the below missing quote for the function parameter throws a syntax error</p>\n<pre><code class=\"language-javascript\">try {\n    eval(\"greeting('welcome)\"); // Missing ' will produce an error\n} catch (err) {\n    console.log(err.name);\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the different error names from error object</h3>\n<p> There are 6 different types of error names returned from error object,\n| Error Name | Description |\n|---- | ---------\n| EvalError | An error has occurred in the eval() function |\n| RangeError | An error has occurred with a number \"out of range\" |\n| ReferenceError | An error due to an illegal reference|\n| SyntaxError | An error due to a syntax error|\n| TypeError | An error due to a type error |\n| URIError | An error due to encodeURI() |</p>\n</li>\n<li>\n<h3>What are the various statements in error handling</h3>\n<p> Below are the list of statements used in an error handling,</p>\n<ol>\n<li><strong>try:</strong> This statement is used to test a block of code for errors</li>\n<li><strong>catch:</strong> This statement is used to handle the error</li>\n<li><strong>throw:</strong> This statement is used to create custom errors.</li>\n<li><strong>finally:</strong> This statement is used to execute code after try and catch regardless of the result.</li>\n</ol>\n</li>\n<li>\n<h3>What are the two types of loops in javascript</h3>\n<ol>\n<li><strong>Entry Controlled loops:</strong> In this kind of loop type, the test condition is tested before entering the loop body. For example, For Loop and While Loop comes under this category.</li>\n<li><strong>Exit Controlled Loops:</strong> In this kind of loop type, the test condition is tested or evaluated at the end of the loop body. i.e, the loop body will execute at least once irrespective of test condition true or false. For example, do-while loop comes under this category.</li>\n</ol>\n</li>\n<li>\n<h3>What is nodejs</h3>\n<p> Node.js is a server-side platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. It is an event-based, non-blocking, asynchronous I/O runtime that uses Google's V8 JavaScript engine and libuv library.</p>\n</li>\n<li>\n<h3>What is an Intl object</h3>\n<p> The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. It provides access to several constructors and language sensitive functions.</p>\n</li>\n<li>\n<h3>How do you perform language specific date and time formatting</h3>\n<p> You can use the <code>Intl.DateTimeFormat</code> object which is a constructor for objects that enable language-sensitive date and time formatting. Let's see this behavior with an example,</p>\n<pre><code class=\"language-javascript\">var date = new Date(Date.UTC(2019, 07, 07, 3, 0, 0));\nconsole.log(new Intl.DateTimeFormat('en-GB').format(date)); // 07/08/2019\nconsole.log(new Intl.DateTimeFormat('en-AU').format(date)); // 07/08/2019\n</code></pre>\n</li>\n<li>\n<h3>What is an Iterator</h3>\n<p> An iterator is an object which defines a sequence and a return value upon its termination. It implements the Iterator protocol with a <code>next()</code> method which returns an object with two properties: <code>value</code> (the next value in the sequence) and <code>done</code> (which is true if the last value in the sequence has been consumed).</p>\n</li>\n<li>\n<h3>How does synchronous iteration works</h3>\n<p> Synchronous iteration was introduced in ES6 and it works with below set of components,</p>\n<p> <strong>Iterable:</strong> It is an object which can be iterated over via a method whose key is Symbol.iterator.\n<strong>Iterator:</strong> It is an object returned by invoking <code>[Symbol.iterator]()</code> on an iterable. This iterator object wraps each iterated element in an object and returns it via <code>next()</code> method one by one.\n<strong>IteratorResult:</strong> It is an object returned by <code>next()</code> method. The object contains two properties; the <code>value</code> property contains an iterated element and the <code>done</code> property determines whether the element is the last element or not.</p>\n<p> Let's demonstrate synchronous iteration with an array as below,</p>\n<pre><code class=\"language-javascript\">const iterable = ['one', 'two', 'three'];\nconst iterator = iterable[Symbol.iterator]();\nconsole.log(iterator.next()); // { value: 'one', done: false }\nconsole.log(iterator.next()); // { value: 'two', done: false }\nconsole.log(iterator.next()); // { value: 'three', done: false }\nconsole.log(iterator.next()); // { value: 'undefined, done: true }\n</code></pre>\n</li>\n<li>\n<h3>What is an event loop</h3>\n<p> The Event Loop is a queue of callback functions. When an async function executes, the callback function is pushed into the queue. The JavaScript engine doesn't start processing the event loop until the async function has finished executing the code.\n<strong>Note:</strong> It allows Node.js to perform non-blocking I/O operations even though JavaScript is single-threaded.</p>\n</li>\n<li>\n<h3>What is call stack</h3>\n<p> Call Stack is a data structure for javascript interpreters to keep track of function calls in the program. It has two major actions,</p>\n<ol>\n<li>Whenever you call a function for its execution, you are pushing it to the stack.</li>\n<li>Whenever the execution is completed, the function is popped out of the stack.</li>\n</ol>\n<p> Let's take an example and it's state representation in a diagram format</p>\n<pre><code class=\"language-javascript\">function hungry() {\n    eatFruits();\n}\nfunction eatFruits() {\n    return \"I'm eating fruits\";\n}\n\n// Invoke the `hungry` function\nhungry();\n</code></pre>\n<p> The above code processed in a call stack as below,</p>\n<ol>\n<li>Add the <code>hungry()</code> function to the call stack list and execute the code.</li>\n<li>Add the <code>eatFruits()</code> function to the call stack list and execute the code.</li>\n<li>Delete the <code>eatFruits()</code> function from our call stack list.</li>\n<li>Delete the <code>hungry()</code> function from the call stack list since there are no items anymore.</li>\n</ol>\n<p> <img src=\"images/call-stack.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>What is an event queue</h3>\n</li>\n<li>\n<h3>What is a decorator</h3>\n<p> A decorator is an expression that evaluates to a function and that takes the target, name, and decorator descriptor as arguments. Also, it optionally returns a decorator descriptor to install on the target object. Let's define admin decorator for user class at design time,</p>\n<pre><code class=\"language-javascript\">function admin(isAdmin) {\n   return function(target) {\n       target.isAdmin = isAdmin;\n   }\n}\n\n@admin(true)\nclass User() {\n}\nconsole.log(User.isAdmin); //true\n\n @admin(false)\n class User() {\n }\n console.log(User.isAdmin); //false\n</code></pre>\n</li>\n<li>\n<h3>What are the properties of Intl object</h3>\n<p> Below are the list of properties available on Intl object,</p>\n<ol>\n<li><strong>Collator:</strong> These are the objects that enable language-sensitive string comparison.</li>\n<li><strong>DateTimeFormat:</strong> These are the objects that enable language-sensitive date and time formatting.</li>\n<li><strong>ListFormat:</strong> These are the objects that enable language-sensitive list formatting.</li>\n<li><strong>NumberFormat:</strong> Objects that enable language-sensitive number formatting.</li>\n<li><strong>PluralRules:</strong> Objects that enable plural-sensitive formatting and language-specific rules for plurals.</li>\n<li><strong>RelativeTimeFormat:</strong> Objects that enable language-sensitive relative time formatting.</li>\n</ol>\n</li>\n<li>\n<h3>What is an Unary operator</h3>\n<p> The unary(+) operator is used to convert a variable to a number.If the variable cannot be converted, it will still become a number but with the value NaN. Let's see this behavior in an action.</p>\n<pre><code class=\"language-javascript\">var x = '100';\nvar y = +x;\nconsole.log(typeof x, typeof y); // string, number\n\nvar a = 'Hello';\nvar b = +a;\nconsole.log(typeof a, typeof b, b); // string, number, NaN\n</code></pre>\n</li>\n<li>\n<h3>How do you sort elements in an array</h3>\n<p> The sort() method is used to sort the elements of an array in place and returns the sorted array. The example usage would be as below,</p>\n<pre><code class=\"language-javascript\">var months = ['Aug', 'Sep', 'Jan', 'June'];\nmonths.sort();\nconsole.log(months); //  [\"Aug\", \"Jan\", \"June\", \"Sep\"]\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of compareFunction while sorting arrays</h3>\n<p> The compareFunction is used to define the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value. Let's take an example to see the usage of compareFunction,</p>\n<pre><code class=\"language-javascript\">let numbers = [1, 2, 5, 3, 4];\nnumbers.sort((a, b) => b - a);\nconsole.log(numbers); // [5, 4, 3, 2, 1]\n</code></pre>\n</li>\n<li>\n<h3>How do you reversing an array</h3>\n<p> You can use the reverse() method to reverse the elements in an array. This method is useful to sort an array in descending order. Let's see the usage of reverse() method in an example,</p>\n<pre><code class=\"language-javascript\">let numbers = [1, 2, 5, 3, 4];\nnumbers.sort((a, b) => b - a);\nnumbers.reverse();\nconsole.log(numbers); // [1, 2, 3, 4 ,5]\n</code></pre>\n</li>\n<li>\n<h3>How do you find min and max value in an array</h3>\n<p> You can use <code>Math.min</code> and <code>Math.max</code> methods on array variables to find the minimum and maximum elements within an array. Let's create two functions to find the min and max value with in an array,</p>\n<pre><code class=\"language-javascript\">var marks = [50, 20, 70, 60, 45, 30];\nfunction findMin(arr) {\n    return Math.min.apply(null, arr);\n}\nfunction findMax(arr) {\n    return Math.max.apply(null, arr);\n}\n\nconsole.log(findMin(marks));\nconsole.log(findMax(marks));\n</code></pre>\n</li>\n<li>\n<h3>How do you find min and max values without Math functions</h3>\n<p> You can write functions which loop through an array comparing each value with the lowest value or highest value to find the min and max values. Let's create those functions to find min and max values,</p>\n<pre><code class=\"language-javascript\">var marks = [50, 20, 70, 60, 45, 30];\nfunction findMin(arr) {\n    var length = arr.length;\n    var min = Infinity;\n    while (length--) {\n        if (arr[length] &#x3C; min) {\n            min = arr[len];\n        }\n    }\n    return min;\n}\n\nfunction findMax(arr) {\n    var length = arr.length;\n    var max = -Infinity;\n    while (len--) {\n        if (arr[length] > max) {\n            max = arr[length];\n        }\n    }\n    return max;\n}\n\nconsole.log(findMin(marks));\nconsole.log(findMax(marks));\n</code></pre>\n</li>\n<li>\n<h3>What is an empty statement and purpose of it</h3>\n<p> The empty statement is a semicolon (;) indicating that no statement will be executed, even if JavaScript syntax requires one. Since there is no action with an empty statement you might think that it's usage is quite less, but the empty statement is occasionally useful when you want to create a loop that has an empty body. For example, you can initialize an array with zero values as below,</p>\n<pre><code class=\"language-javascript\">// Initialize an array a\nfor(int i=0; i &#x3C; a.length; a[i++] = 0) ;\n</code></pre>\n</li>\n<li>\n<h3>How do you get metadata of a module</h3>\n<p> You can use the <code>import.meta</code> object which is a meta-property exposing context-specific meta data to a JavaScript module. It contains information about the current module, such as the module's URL. In browsers, you might get different meta data than NodeJS.</p>\n<pre><code class=\"language-javascript\">&#x3C;script type=\"module\" src=\"welcome-module.js\">&#x3C;/script>;\nconsole.log(import.meta); // { url: \"file:///home/user/welcome-module.js\" }\n</code></pre>\n</li>\n<li>\n<h3>What is a comma operator</h3>\n<p> The comma operator is used to evaluate each of its operands from left to right and returns the value of the last operand. This is totally different from comma usage within arrays, objects, and function arguments and parameters. For example, the usage for numeric expressions would be as below,</p>\n<pre><code class=\"language-javascript\">var x = 1;\nx = (x++, x);\n\nconsole.log(x); // 2\n</code></pre>\n</li>\n<li>\n<h3>What is the advantage of a comma operator</h3>\n<p> It is normally used to include multiple expressions in a location that requires a single expression. One of the common usages of this comma operator is to supply multiple parameters in a <code>for</code> loop. For example, the below for loop uses multiple expressions in a single location using comma operator,</p>\n<pre><code class=\"language-javascript\">for (var a = 0, b =10; a &#x3C;= 10; a++, b--)\n</code></pre>\n<p> You can also use the comma operator in a return statement where it processes before returning.</p>\n<pre><code class=\"language-javascript\">function myFunction() {\n    var a = 1;\n    return (a += 10), a; // 11\n}\n</code></pre>\n</li>\n<li>\n<h3>What is typescript</h3>\n<p> TypeScript is a typed superset of JavaScript created by Microsoft that adds optional types, classes, async/await, and many other features, and compiles to plain JavaScript. Angular built entirely in TypeScript and used as a primary language. You can install it globally as</p>\n<pre><code class=\"language-bash\">npm install -g typescript\n</code></pre>\n<p> Let's see a simple example of TypeScript usage,</p>\n<pre><code class=\"language-typescript\">function greeting(name: string): string {\n    return 'Hello, ' + name;\n}\n\nlet user = 'Sudheer';\n\nconsole.log(greeting(user));\n</code></pre>\n<p> The greeting method allows only string type as argument.</p>\n</li>\n<li>\n<h3>What are the differences between javascript and typescript</h3>\n<p> Below are the list of differences between javascript and typescript,</p>\n<table>\n<thead>\n<tr>\n<th>feature</th>\n<th>typescript</th>\n<th>javascript</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Language paradigm</td>\n<td>Object oriented programming language</td>\n<td>Scripting language</td>\n</tr>\n<tr>\n<td>Typing support</td>\n<td>Supports static typing</td>\n<td>It has dynamic typing</td>\n</tr>\n<tr>\n<td>Modules</td>\n<td>Supported</td>\n<td>Not supported</td>\n</tr>\n<tr>\n<td>Interface</td>\n<td>It has interfaces concept</td>\n<td>Doesn't support interfaces</td>\n</tr>\n<tr>\n<td>Optional parameters</td>\n<td>Functions support optional parameters</td>\n<td>No support of optional parameters for functions</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>What are the advantages of typescript over javascript</h3>\n<p> Below are some of the advantages of typescript over javascript,</p>\n<ol>\n<li>TypeScript is able to find compile time errors at the development time only and it makes sures less runtime errors. Whereas javascript is an interpreted language.</li>\n<li>TypeScript is strongly-typed or supports static typing which allows for checking type correctness at compile time. This is not available in javascript.</li>\n<li>TypeScript compiler can compile the .ts files into ES3,ES4 and ES5 unlike ES6 features of javascript which may not be supported in some browsers.</li>\n</ol>\n</li>\n<li>\n<h3>What is an object initializer</h3>\n<p> An object initializer is an expression that describes the initialization of an Object. The syntax for this expression is represented as a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}). This is also known as literal notation. It is one of the ways to create an object.</p>\n<pre><code class=\"language-javascript\">var initObject = { a: 'John', b: 50, c: {} };\n\nconsole.log(initObject.a); // John\n</code></pre>\n</li>\n<li>\n<h3>What is a constructor method</h3>\n<p> The constructor method is a special method for creating and initializing an object created within a class. If you do not specify a constructor method, a default constructor is used. The example usage of constructor would be as below,</p>\n<pre><code class=\"language-javascript\">class Employee {\n    constructor() {\n        this.name = 'John';\n    }\n}\n\nvar employeeObject = new Employee();\n\nconsole.log(employeeObject.name); // John\n</code></pre>\n</li>\n<li>\n<h3>What happens if you write constructor more than once in a class</h3>\n<p> The \"constructor\" in a class is a special method and it should be defined only once in a class. i.e, If you write a constructor method more than once in a class it will throw a <code>SyntaxError</code> error.</p>\n<pre><code class=\"language-javascript\"> class Employee {\n   constructor() {\n     this.name = \"John\";\n   }\n   constructor() {   //  Uncaught SyntaxError: A class may only have one constructor\n     this.age = 30;\n   }\n }\n\n var employeeObject = new Employee();\n\n console.log(employeeObject.name);\n</code></pre>\n</li>\n<li>\n<h3>How do you call the constructor of a parent class</h3>\n<p> You can use the <code>super</code> keyword to call the constructor of a parent class. Remember that <code>super()</code> must be called before using 'this' reference. Otherwise it will cause a reference error. Let's the usage of it,</p>\n<pre><code class=\"language-javascript\">class Square extends Rectangle {\n    constructor(length) {\n        super(length, length);\n        this.name = 'Square';\n    }\n\n    get area() {\n        return this.width * this.height;\n    }\n\n    set area(value) {\n        this.area = value;\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you get the prototype of an object</h3>\n<p> You can use the <code>Object.getPrototypeOf(obj)</code> method to return the prototype of the specified object. i.e. The value of the internal <code>prototype</code> property. If there are no inherited properties then <code>null</code> value is returned.</p>\n<pre><code class=\"language-javascript\">const newPrototype = {};\nconst newObject = Object.create(newPrototype);\n\nconsole.log(Object.getPrototypeOf(newObject) === newPrototype); // true\n</code></pre>\n</li>\n<li>\n<h3>What happens If I pass string type for getPrototype method</h3>\n<p> In ES5, it will throw a TypeError exception if the obj parameter isn't an object. Whereas in ES2015, the parameter will be coerced to an <code>Object</code>.</p>\n<pre><code class=\"language-javascript\">// ES5\nObject.getPrototypeOf('James'); // TypeError: \"James\" is not an object\n// ES2015\nObject.getPrototypeOf('James'); // String.prototype\n</code></pre>\n</li>\n<li>\n<h3>How do you set prototype of one object to another</h3>\n<p> You can use the <code>Object.setPrototypeOf()</code> method that sets the prototype (i.e., the internal <code>Prototype</code> property) of a specified object to another object or null. For example, if you want to set prototype of a square object to rectangle object would be as follows,</p>\n<pre><code class=\"language-javascript\">Object.setPrototypeOf(Square.prototype, Rectangle.prototype);\nObject.setPrototypeOf({}, null);\n</code></pre>\n</li>\n<li>\n<h3>How do you check whether an object can be extendable or not</h3>\n<p> The <code>Object.isExtensible()</code> method is used to determine if an object is extendable or not. i.e, Whether it can have new properties added to it or not.</p>\n<pre><code class=\"language-javascript\">const newObject = {};\nconsole.log(Object.isExtensible(newObject)); //true\n</code></pre>\n<p> <strong>Note:</strong> By default, all the objects are extendable. i.e, The new properties can be added or modified.</p>\n</li>\n<li>\n<h3>How do you prevent an object to extend</h3>\n<p> The <code>Object.preventExtensions()</code> method is used to prevent new properties from ever being added to an object. In other words, it prevents future extensions to the object. Let's see the usage of this property,</p>\n<pre><code class=\"language-javascript\">const newObject = {};\nObject.preventExtensions(newObject); // NOT extendable\n\ntry {\n    Object.defineProperty(newObject, 'newProperty', {\n        // Adding new property\n        value: 100\n    });\n} catch (e) {\n    console.log(e); // TypeError: Cannot define property newProperty, object is not extensible\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the different ways to make an object non-extensible</h3>\n<p> You can mark an object non-extensible in 3 ways,</p>\n<ol>\n<li>Object.preventExtensions</li>\n<li>Object.seal</li>\n<li>Object.freeze</li>\n</ol>\n<pre><code class=\"language-javascript\">var newObject = {};\n\nObject.preventExtensions(newObject); // Prevent objects are non-extensible\nObject.isExtensible(newObject); // false\n\nvar sealedObject = Object.seal({}); // Sealed objects are non-extensible\nObject.isExtensible(sealedObject); // false\n\nvar frozenObject = Object.freeze({}); // Frozen objects are non-extensible\nObject.isExtensible(frozenObject); // false\n</code></pre>\n</li>\n<li>\n<h3>How do you define multiple properties on an object</h3>\n<p> The <code>Object.defineProperties()</code> method is used to define new or modify existing properties directly on an object and returning the object. Let's define multiple properties on an empty object,</p>\n<pre><code class=\"language-javascript\">const newObject = {};\n\nObject.defineProperties(newObject, {\n    newProperty1: {\n        value: 'John',\n        writable: true\n    },\n    newProperty2: {}\n});\n</code></pre>\n</li>\n<li>\n<h3>What is MEAN in javascript</h3>\n<p> The MEAN (MongoDB, Express, AngularJS, and Node.js) stack is the most popular open-source JavaScript software tech stack available for building dynamic web apps where you can write both the server-side and client-side halves of the web project entirely in JavaScript.</p>\n</li>\n<li>\n<h3>What Is Obfuscation in javascript</h3>\n<p> Obfuscation is the deliberate act of creating obfuscated javascript code(i.e, source or machine code) that is difficult for humans to understand. It is something similar to encryption, but a machine can understand the code and execute it.\nLet's see the below function before Obfuscation,</p>\n<pre><code class=\"language-javascript\">function greeting() {\n    console.log('Hello, welcome to JS world');\n}\n</code></pre>\n<p> And after the code Obfuscation, it would be appeared as below,</p>\n<pre><code class=\"language-javascript\">eval(\n    (function (p, a, c, k, e, d) {\n        e = function (c) {\n            return c;\n        };\n        if (!''.replace(/^/, String)) {\n            while (c--) {\n                d[c] = k[c] || c;\n            }\n            k = [\n                function (e) {\n                    return d[e];\n                }\n            ];\n            e = function () {\n                return '\\\\w+';\n            };\n            c = 1;\n        }\n        while (c--) {\n            if (k[c]) {\n                p = p.replace(new RegExp('\\\\b' + e(c) + '\\\\b', 'g'), k[c]);\n            }\n        }\n        return p;\n    })(\"2 1(){0.3('4, 7 6 5 8')}\", 9, 9, 'console|greeting|function|log|Hello|JS|to|welcome|world'.split('|'), 0, {})\n);\n</code></pre>\n</li>\n<li>\n<h3>Why do you need Obfuscation</h3>\n<p> Below are the few reasons for Obfuscation,</p>\n<ol>\n<li>The Code size will be reduced. So data transfers between server and client will be fast.</li>\n<li>It hides the business logic from outside world and protects the code from others</li>\n<li>Reverse engineering is highly difficult</li>\n<li>The download time will be reduced</li>\n</ol>\n</li>\n<li>\n<h3>What is Minification</h3>\n<p> Minification is the process of removing all unnecessary characters(empty spaces are removed) and variables will be renamed without changing it's functionality. It is also a type of obfuscation .</p>\n</li>\n<li>\n<h3>What are the advantages of minification</h3>\n<p> Normally it is recommended to use minification for heavy traffic and intensive requirements of resources. It reduces file sizes with below benefits,</p>\n<ol>\n<li>Decreases loading times of a web page</li>\n<li>Saves bandwidth usages</li>\n</ol>\n</li>\n<li>\n<h3>What are the differences between Obfuscation and Encryption</h3>\n<p> Below are the main differences between Obfuscation and Encryption,</p>\n<table>\n<thead>\n<tr>\n<th>Feature</th>\n<th>Obfuscation</th>\n<th>Encryption</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Definition</td>\n<td>Changing the form of any data in any other form</td>\n<td>Changing the form of information to an unreadable format by using a key</td>\n</tr>\n<tr>\n<td>A key to decode</td>\n<td>It can be decoded without any key</td>\n<td>It is required</td>\n</tr>\n<tr>\n<td>Target data format</td>\n<td>It will be converted to a complex form</td>\n<td>Converted into an unreadable format</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>What are the common tools used for minification</h3>\n<p> There are many online/offline tools to minify the javascript files,</p>\n<ol>\n<li>Google's Closure Compiler</li>\n<li>UglifyJS2</li>\n<li>jsmin</li>\n<li>javascript-minifier.com/</li>\n<li>prettydiff.com</li>\n</ol>\n</li>\n<li>\n<h3>How do you perform form validation using javascript</h3>\n<p> JavaScript can be used to perform HTML form validation. For example, if the form field is empty, the function needs to notify, and return false, to prevent the form being submitted.\nLets' perform user login in an html form,</p>\n<pre><code class=\"language-html\">&#x3C;form name=\"myForm\" onsubmit=\"return validateForm()\" method=\"post\">\n    User name: &#x3C;input type=\"text\" name=\"uname\" />\n    &#x3C;input type=\"submit\" value=\"Submit\" />\n&#x3C;/form>\n</code></pre>\n<p> And the validation on user login is below,</p>\n<pre><code class=\"language-javascript\">function validateForm() {\n    var x = document.forms['myForm']['uname'].value;\n    if (x == '') {\n        alert(\"The username shouldn't be empty\");\n        return false;\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you perform form validation without javascript</h3>\n<p> You can perform HTML form validation automatically without using javascript. The validation enabled by applying the <code>required</code> attribute to prevent form submission when the input is empty.</p>\n<pre><code class=\"language-html\">&#x3C;form method=\"post\">\n    &#x3C;input type=\"text\" name=\"uname\" required />\n    &#x3C;input type=\"submit\" value=\"Submit\" />\n&#x3C;/form>\n</code></pre>\n<p> <strong>Note:</strong> Automatic form validation does not work in Internet Explorer 9 or earlier.</p>\n</li>\n<li>\n<h3>What are the DOM methods available for constraint validation</h3>\n<p> The below DOM methods are available for constraint validation on an invalid input,</p>\n<ol>\n<li>checkValidity(): It returns true if an input element contains valid data.</li>\n<li>setCustomValidity(): It is used to set the validationMessage property of an input element.\nLet's take an user login form with DOM validations</li>\n</ol>\n<pre><code class=\"language-javascript\">function myFunction() {\n    var userName = document.getElementById('uname');\n    if (!userName.checkValidity()) {\n        document.getElementById('message').innerHTML = userName.validationMessage;\n    } else {\n        document.getElementById('message').innerHTML = 'Entered a valid username';\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the available constraint validation DOM properties</h3>\n<p> Below are the list of some of the constraint validation DOM properties available,</p>\n<ol>\n<li>validity: It provides a list of boolean properties related to the validity of an input element.</li>\n<li>validationMessage: It displays the message when the validity is false.</li>\n<li>willValidate: It indicates if an input element will be validated or not.</li>\n</ol>\n</li>\n<li>\n<h3>What are the list of validity properties</h3>\n<p> The validity property of an input element provides a set of properties related to the validity of data.</p>\n<ol>\n<li>customError: It returns true, if a custom validity message is set.</li>\n<li>patternMismatch: It returns true, if an element's value does not match its pattern attribute.</li>\n<li>rangeOverflow: It returns true, if an element's value is greater than its max attribute.</li>\n<li>rangeUnderflow: It returns true, if an element's value is less than its min attribute.</li>\n<li>stepMismatch: It returns true, if an element's value is invalid according to step attribute.</li>\n<li>tooLong: It returns true, if an element's value exceeds its maxLength attribute.</li>\n<li>typeMismatch: It returns true, if an element's value is invalid according to type attribute.</li>\n<li>valueMissing: It returns true, if an element with a required attribute has no value.</li>\n<li>valid: It returns true, if an element's value is valid.</li>\n</ol>\n</li>\n<li>\n<h3>Give an example usage of rangeOverflow property</h3>\n<p> If an element's value is greater than its max attribute then rangeOverflow property returns true. For example, the below form submission throws an error if the value is more than 100,</p>\n<pre><code class=\"language-html\">&#x3C;input id=\"age\" type=\"number\" max=\"100\" /> &#x3C;button onclick=\"myOverflowFunction()\">OK&#x3C;/button>\n</code></pre>\n<pre><code class=\"language-javascript\">function myOverflowFunction() {\n    if (document.getElementById('age').validity.rangeOverflow) {\n        alert('The mentioned age is not allowed');\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>Is enums feature available in javascript</h3>\n<p> No, javascript does not natively support enums. But there are different kinds of solutions to simulate them even though they may not provide exact equivalents. For example, you can use freeze or seal on object,</p>\n<pre><code class=\"language-javascript\">var DaysEnum = Object.freeze({\"monday\":1, \"tuesday\":2, \"wednesday\":3, ...})\n</code></pre>\n</li>\n<li>\n<h3>What is an enum</h3>\n<p> An enum is a type restricting variables to one value from a predefined set of constants. JavaScript has no enums but typescript provides built-in enum support.</p>\n<pre><code class=\"language-javascript\">enum Color {\n RED, GREEN, BLUE\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you list all properties of an object</h3>\n<p> You can use the <code>Object.getOwnPropertyNames()</code> method which returns an array of all properties found directly in a given object. Let's the usage of it in an example,</p>\n<pre><code class=\"language-javascript\">const newObject = {\n    a: 1,\n    b: 2,\n    c: 3\n};\n\nconsole.log(Object.getOwnPropertyNames(newObject));\n['a', 'b', 'c'];\n</code></pre>\n</li>\n<li>\n<h3>How do you get property descriptors of an object</h3>\n<p> You can use the <code>Object.getOwnPropertyDescriptors()</code> method which returns all own property descriptors of a given object. The example usage of this method is below,</p>\n<pre><code class=\"language-javascript\">const newObject = {\n    a: 1,\n    b: 2,\n    c: 3\n};\nconst descriptorsObject = Object.getOwnPropertyDescriptors(newObject);\nconsole.log(descriptorsObject.a.writable); //true\nconsole.log(descriptorsObject.a.configurable); //true\nconsole.log(descriptorsObject.a.enumerable); //true\nconsole.log(descriptorsObject.a.value); // 1\n</code></pre>\n</li>\n<li>\n<h3>What are the attributes provided by a property descriptor</h3>\n<p> A property descriptor is a record which has the following attributes</p>\n<ol>\n<li>value: The value associated with the property</li>\n<li>writable: Determines whether the value associated with the property can be changed or not</li>\n<li>configurable: Returns true if the type of this property descriptor can be changed and if the property can be deleted from the corresponding object.</li>\n<li>enumerable: Determines whether the property appears during enumeration of the properties on the corresponding object or not.</li>\n<li>set: A function which serves as a setter for the property</li>\n<li>get: A function which serves as a getter for the property</li>\n</ol>\n</li>\n<li>\n<h3>How do you extend classes</h3>\n<p> The <code>extends</code> keyword is used in class declarations/expressions to create a class which is a child of another class. It can be used to subclass custom classes as well as built-in objects. The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">class ChildClass extends ParentClass { ... }\n</code></pre>\n<p> Let's take an example of Square subclass from Polygon parent class,</p>\n<pre><code class=\"language-javascript\">class Square extends Rectangle {\n    constructor(length) {\n        super(length, length);\n        this.name = 'Square';\n    }\n\n    get area() {\n        return this.width * this.height;\n    }\n\n    set area(value) {\n        this.area = value;\n    }\n}\n</code></pre>\n</li>\n<li>\n<h3>How do I modify the url without reloading the page</h3>\n<p> The <code>window.location.url</code> property will be helpful to modify the url but it reloads the page. HTML5 introduced the <code>history.pushState()</code> and <code>history.replaceState()</code> methods, which allow you to add and modify history entries, respectively. For example, you can use pushState as below,</p>\n<pre><code class=\"language-javascript\">window.history.pushState('page2', 'Title', '/page2.html');\n</code></pre>\n</li>\n<li>\n<h3>How do you check whether an array includes a particular value or not</h3>\n<p> The <code>Array#includes()</code> method is used to determine whether an array includes a particular value among its entries by returning either true or false. Let's see an example to find an element(numeric and string) within an array.</p>\n<pre><code class=\"language-javascript\">var numericArray = [1, 2, 3, 4];\nconsole.log(numericArray.includes(3)); // true\n\nvar stringArray = ['green', 'yellow', 'blue'];\nconsole.log(stringArray.includes('blue')); //true\n</code></pre>\n</li>\n<li>\n<h3>How do you compare scalar arrays</h3>\n<p> You can use length and every method of arrays to compare two scalar(compared directly using ===) arrays. The combination of these expressions can give the expected result,</p>\n<pre><code class=\"language-javascript\">const arrayFirst = [1, 2, 3, 4, 5];\nconst arraySecond = [1, 2, 3, 4, 5];\nconsole.log(arrayFirst.length === arraySecond.length &#x26;&#x26; arrayFirst.every((value, index) => value === arraySecond[index])); // true\n</code></pre>\n<p> If you would like to compare arrays irrespective of order then you should sort them before,</p>\n<pre><code class=\"language-javascript\">const arrayFirst = [2, 3, 1, 4, 5];\nconst arraySecond = [1, 2, 3, 4, 5];\nconsole.log(arrayFirst.length === arraySecond.length &#x26;&#x26; arrayFirst.sort().every((value, index) => value === arraySecond[index])); //true\n</code></pre>\n</li>\n<li>\n<h3>How to get the value from get parameters</h3>\n<p> The <code>new URL()</code> object accepts the url string and <code>searchParams</code> property of this object can be used to access the get parameters. Remember that you may need to use polyfill or <code>window.location</code> to access the URL in older browsers(including IE).</p>\n<pre><code class=\"language-javascript\">let urlString = 'http://www.some-domain.com/about.html?x=1&#x26;y=2&#x26;z=3'; //window.location.href\nlet url = new URL(urlString);\nlet parameterZ = url.searchParams.get('z');\nconsole.log(parameterZ); // 3\n</code></pre>\n</li>\n<li>\n<h3>How do you print numbers with commas as thousand separators</h3>\n<p> You can use the <code>Number.prototype.toLocaleString()</code> method which returns a string with a language-sensitive representation such as thousand separator,currency etc of this number.</p>\n<pre><code class=\"language-javascript\">function convertToThousandFormat(x) {\n    return x.toLocaleString(); // 12,345.679\n}\n\nconsole.log(convertToThousandFormat(12345.6789));\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between java and javascript</h3>\n<p> Both are totally unrelated programming languages and no relation between them. Java is statically typed, compiled, runs on its own VM. Whereas Javascript is dynamically typed, interpreted, and runs in a browser and nodejs environments. Let's see the major differences in a tabular format,\n| Feature | Java | JavaScript |\n|---- | ---- | -----\n| Typed | It's a strongly typed language | It's a dynamic typed language |\n| Paradigm | Object oriented programming | Prototype based programming |\n| Scoping | Block scoped | Function-scoped |\n| Concurrency | Thread based | event based |\n| Memory | Uses more memory | Uses less memory. Hence it will be used for web pages |</p>\n</li>\n<li>\n<h3>Does JavaScript supports namespace</h3>\n<p> JavaScript doesn't support namespace by default. So if you create any element(function, method, object, variable) then it becomes global and pollutes the global namespace. Let's take an example of defining two functions without any namespace,</p>\n<pre><code class=\"language-javascript\">function func1() {\n    console.log('This is a first definition');\n}\nfunction func1() {\n    console.log('This is a second definition');\n}\nfunc1(); // This is a second definition\n</code></pre>\n<p> It always calls the second function definition. In this case, namespace will solve the name collision problem.</p>\n</li>\n<li>\n<h3>How do you declare namespace</h3>\n<p> Even though JavaScript lacks namespaces, we can use Objects , IIFE to create namespaces.</p>\n<ol>\n<li><strong>Using Object Literal Notation:</strong> Let's wrap variables and functions inside an Object literal which acts as a namespace. After that you can access them using object notation</li>\n</ol>\n<pre><code class=\"language-javascript\">var namespaceOne = {\n   function func1() {\n       console.log(\"This is a first definition\");\n   }\n}\nvar namespaceTwo = {\n     function func1() {\n         console.log(\"This is a second definition\");\n     }\n }\nnamespaceOne.func1(); // This is a first definition\nnamespaceTwo.func1(); // This is a second definition\n</code></pre>\n<ol>\n<li><strong>Using IIFE (Immediately invoked function expression):</strong> The outer pair of parentheses of IIFE creates a local scope for all the code inside of it and makes the anonymous function a function expression. Due to that, you can create the same function in two different function expressions to act as a namespace.</li>\n</ol>\n<pre><code class=\"language-javascript\">(function () {\n    function fun1() {\n        console.log('This is a first definition');\n    }\n    fun1();\n})();\n\n(function () {\n    function fun1() {\n        console.log('This is a second definition');\n    }\n    fun1();\n})();\n</code></pre>\n<ol>\n<li><strong>Using a block and a let/const declaration:</strong> In ECMAScript 6, you can simply use a block and a let declaration to restrict the scope of a variable to a block.</li>\n</ol>\n<pre><code class=\"language-javascript\">{\n    let myFunction = function fun1() {\n        console.log('This is a first definition');\n    };\n    myFunction();\n}\n//myFunction(): ReferenceError: myFunction is not defined.\n\n{\n    let myFunction = function fun1() {\n        console.log('This is a second definition');\n    };\n    myFunction();\n}\n//myFunction(): ReferenceError: myFunction is not defined.\n</code></pre>\n</li>\n<li>\n<h3>How do you invoke javascript code in an iframe from parent page</h3>\n<p> Initially iFrame needs to be accessed using either <code>document.getElementBy</code> or <code>window.frames</code>. After that <code>contentWindow</code> property of iFrame gives the access for targetFunction</p>\n<pre><code class=\"language-javascript\">document.getElementById('targetFrame').contentWindow.targetFunction();\nwindow.frames[0].frameElement.contentWindow.targetFunction(); // Accessing iframe this way may not work in latest versions chrome and firefox\n</code></pre>\n</li>\n<li>\n<h3>How do get the timezone offset from date</h3>\n<p> You can use the <code>getTimezoneOffset</code> method of the date object. This method returns the time zone difference, in minutes, from current locale (host system settings) to UTC</p>\n<pre><code class=\"language-javascript\">var offset = new Date().getTimezoneOffset();\nconsole.log(offset); // -480\n</code></pre>\n</li>\n<li>\n<h3>How do you load CSS and JS files dynamically</h3>\n<p> You can create both link and script elements in the DOM and append them as child to head tag. Let's create a function to add script and style resources as below,</p>\n<pre><code class=\"language-javascript\">function loadAssets(filename, filetype) {\n    if (filetype == 'css') {\n        // External CSS file\n        var fileReference = document.createElement('link');\n        fileReference.setAttribute('rel', 'stylesheet');\n        fileReference.setAttribute('type', 'text/css');\n        fileReference.setAttribute('href', filename);\n    } else if (filetype == 'js') {\n        // External JavaScript file\n        var fileReference = document.createElement('script');\n        fileReference.setAttribute('type', 'text/javascript');\n        fileReference.setAttribute('src', filename);\n    }\n    if (typeof fileReference != 'undefined') document.getElementsByTagName('head')[0].appendChild(fileReference);\n}\n</code></pre>\n</li>\n<li>\n<h3>What are the different methods to find HTML elements in DOM</h3>\n<p> If you want to access any element in an HTML page, you need to start with accessing the document object. Later you can use any of the below methods to find the HTML element,</p>\n<ol>\n<li>document.getElementById(id): It finds an element by Id</li>\n<li>document.getElementsByTagName(name): It finds an element by tag name</li>\n<li>document.getElementsByClassName(name): It finds an element by class name</li>\n</ol>\n</li>\n<li>\n<h3>What is jQuery</h3>\n<p> jQuery is a popular cross-browser JavaScript library that provides Document Object Model (DOM) traversal, event handling, animations and AJAX interactions by minimizing the discrepancies across browsers. It is widely famous with its philosophy of \"Write less, do more\". For example, you can display welcome message on the page load using jQuery as below,</p>\n<pre><code class=\"language-javascript\">$(document).ready(function () {\n    // It selects the document and apply the function on page load\n    alert('Welcome to jQuery world');\n});\n</code></pre>\n<p> <strong>Note:</strong> You can download it from jquery's official site or install it from CDNs, like google.</p>\n</li>\n<li>\n<h3>What is V8 JavaScript engine</h3>\n<p> V8 is an open source high-performance JavaScript engine used by the Google Chrome browser, written in C++. It is also being used in the node.js project. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors.\n<strong>Note:</strong> It can run standalone, or can be embedded into any C++ application.</p>\n</li>\n<li>\n<h3>Why do we call javascript as dynamic language</h3>\n<p> JavaScript is a loosely typed or a dynamic language because variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned/reassigned with values of all types.</p>\n<pre><code class=\"language-javascript\">let age = 50; // age is a number now\nage = 'old'; // age is a string now\nage = true; // age is a boolean\n</code></pre>\n</li>\n<li>\n<h3>What is a void operator</h3>\n<p> The <code>void</code> operator evaluates the given expression and then returns undefined(i.e, without returning value). The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">void expression;\nvoid expression;\n</code></pre>\n<p> Let's display a message without any redirection or reload</p>\n<pre><code class=\"language-javascript\">&#x3C;a href=\"javascript:void(alert('Welcome to JS world'))\">Click here to see a message&#x3C;/a>\n</code></pre>\n<p> <strong>Note:</strong> This operator is often used to obtain the undefined primitive value, using \"void(0)\".</p>\n</li>\n<li>\n<h3>How to set the cursor to wait</h3>\n<p> The cursor can be set to wait in JavaScript by using the property \"cursor\". Let's perform this behavior on page load using the below function.</p>\n<pre><code class=\"language-javascript\">function myFunction() {\n    window.document.body.style.cursor = 'wait';\n}\n</code></pre>\n<p> and this function invoked on page load</p>\n<pre><code class=\"language-html\">&#x3C;body onload=\"myFunction()\">&#x3C;/body>\n</code></pre>\n</li>\n<li>\n<h3>How do you create an infinite loop</h3>\n<p> You can create infinite loops using for and while loops without using any expressions. The for loop construct or syntax is better approach in terms of ESLint and code optimizer tools,</p>\n<pre><code class=\"language-javascript\">for (;;) {}\nwhile (true) {}\n</code></pre>\n</li>\n<li>\n<h3>Why do you need to avoid with statement</h3>\n<p> JavaScript's with statement was intended to provide a shorthand for writing recurring accesses to objects. So it can help reduce file size by reducing the need to repeat a lengthy object reference without performance penalty. Let's take an example where it is used to avoid redundancy when accessing an object several times.</p>\n<pre><code class=\"language-javascript\">a.b.c.greeting = 'welcome';\na.b.c.age = 32;\n</code></pre>\n<p> Using <code>with</code> it turns this into:</p>\n<pre><code class=\"language-javascript\">with (a.b.c) {\n    greeting = 'welcome';\n    age = 32;\n}\n</code></pre>\n<p> But this <code>with</code> statement creates performance problems since one cannot predict whether an argument will refer to a real variable or to a property inside the with argument.</p>\n</li>\n<li>\n<h3>What is the output of below for loops</h3>\n<pre><code class=\"language-javascript\">for (var i = 0; i &#x3C; 4; i++) {\n    // global scope\n    setTimeout(() => console.log(i));\n}\n\nfor (let i = 0; i &#x3C; 4; i++) {\n    // block scope\n    setTimeout(() => console.log(i));\n}\n</code></pre>\n<p> The output of the above for loops is 4 4 4 4 and 0 1 2 3</p>\n<p> <strong>Explanation:</strong> Due to the event queue/loop of javascript, the <code>setTimeout</code> callback function is called after the loop has been executed. Since the variable i is declared with the <code>var</code> keyword it became a global variable and the value was equal to 4 using iteration when the time <code>setTimeout</code> function is invoked. Hence, the output of the first loop is <code>4 4 4 4</code>.</p>\n<p> Whereas in the second loop, the variable i is declared as the <code>let</code> keyword it becomes a block scoped variable and it holds a new value(0, 1 ,2 3) for each iteration. Hence, the output of the first loop is <code>0 1 2 3</code>.</p>\n</li>\n<li>\n<h3>List down some of the features of ES6</h3>\n<p> Below are the list of some new features of ES6,</p>\n<ol>\n<li>Support for constants or immutable variables</li>\n<li>Block-scope support for variables, constants and functions</li>\n<li>Arrow functions</li>\n<li>Default parameters</li>\n<li>Rest and Spread Parameters</li>\n<li>Template Literals</li>\n<li>Multi-line Strings</li>\n<li>Destructuring Assignment</li>\n<li>Enhanced Object Literals</li>\n<li>Promises</li>\n<li>Classes</li>\n<li>Modules</li>\n</ol>\n</li>\n<li>\n<h3>What is ES6</h3>\n<p> ES6 is the sixth edition of the javascript language and it was released in June 2015. It was initially known as ECMAScript 6 (ES6) and later renamed to ECMAScript 2015. Almost all the modern browsers support ES6 but for the old browsers there are many transpilers, like Babel.js etc.</p>\n</li>\n<li>\n<h3>Can I redeclare let and const variables</h3>\n<p> No, you cannot redeclare let and const variables. If you do, it throws below error</p>\n<pre><code class=\"language-bash\">Uncaught SyntaxError: Identifier 'someVariable' has already been declared\n</code></pre>\n<p> <strong>Explanation:</strong> The variable declaration with <code>var</code> keyword refers to a function scope and the variable is treated as if it were declared at the top of the enclosing scope due to hoisting feature. So all the multiple declarations contributing to the same hoisted variable without any error. Let's take an example of re-declaring variables in the same scope for both var and let/const variables.</p>\n<pre><code class=\"language-javascript\">var name = 'John';\nfunction myFunc() {\n    var name = 'Nick';\n    var name = 'Abraham'; // Re-assigned in the same function block\n    alert(name); // Abraham\n}\nmyFunc();\nalert(name); // John\n</code></pre>\n<p> The block-scoped multi-declaration throws syntax error,</p>\n<pre><code class=\"language-javascript\">let name = 'John';\nfunction myFunc() {\n    let name = 'Nick';\n    let name = 'Abraham'; // Uncaught SyntaxError: Identifier 'name' has already been declared\n    alert(name);\n}\n\nmyFunc();\nalert(name);\n</code></pre>\n</li>\n<li>\n<h3>Is const variable makes the value immutable</h3>\n<p> No, the const variable doesn't make the value immutable. But it disallows subsequent assignments(i.e, You can declare with assignment but can't assign another value later)</p>\n<pre><code class=\"language-javascript\">const userList = [];\nuserList.push('John'); // Can mutate even though it can't re-assign\nconsole.log(userList); // ['John']\n</code></pre>\n</li>\n<li>\n<h3>What are default parameters</h3>\n<p> In E5, we need to depend on logical OR operators to handle default values of function parameters. Whereas in ES6, Default function parameters feature allows parameters to be initialized with default values if no value or undefined is passed. Let's compare the behavior with an examples,</p>\n<pre><code class=\"language-javascript\">//ES5\nvar calculateArea = function (height, width) {\n    height = height || 50;\n    width = width || 60;\n\n    return width * height;\n};\nconsole.log(calculateArea()); //300\n</code></pre>\n<p> The default parameters makes the initialization more simpler,</p>\n<pre><code class=\"language-javascript\">//ES6\nvar calculateArea = function (height = 50, width = 60) {\n    return width * height;\n};\n\nconsole.log(calculateArea()); //300\n</code></pre>\n</li>\n<li>\n<h3>What are template literals</h3>\n<p> Template literals or template strings are string literals allowing embedded expressions. These are enclosed by the back-tick (`) character instead of double or single quotes.\nIn E6, this feature enables using dynamic expressions as below,</p>\n<pre><code class=\"language-javascript\">var greeting = `Welcome to JS World, Mr. ${firstName} ${lastName}.`;\n</code></pre>\n<p> In ES5, you need break string like below,</p>\n<pre><code class=\"language-javascript\">var greeting = 'Welcome to JS World, Mr. ' + firstName + ' ' + lastName.`\n</code></pre>\n<p> <strong>Note:</strong> You can use multi-line strings and string interpolation features with template literals.</p>\n</li>\n<li>\n<h3>How do you write multi-line strings in template literals</h3>\n<p> In ES5, you would have to use newline escape characters('\\n') and concatenation symbols(+) in order to get multi-line strings.</p>\n<pre><code class=\"language-javascript\">console.log('This is string sentence 1\\n' + 'This is string sentence 2');\n</code></pre>\n<p> Whereas in ES6, You don't need to mention any newline sequence character,</p>\n<pre><code class=\"language-javascript\">console.log(`This is string sentence\n'This is string sentence 2`);\n</code></pre>\n</li>\n<li>\n<h3>What are nesting templates</h3>\n<p> The nesting template is a feature supported within template literals syntax to allow inner backticks inside a placeholder ${ } within the template. For example, the below nesting template is used to display the icons based on user permissions whereas outer template checks for platform type,</p>\n<pre><code class=\"language-javascript\">const iconStyles = `icon ${isMobilePlatform() ? '' : `icon-${user.isAuthorized ? 'submit' : 'disabled'}`}`;\n</code></pre>\n<p> You can write the above use case without nesting template features as well. However, the nesting template feature is more compact and readable.</p>\n<pre><code class=\"language-javascript\">//Without nesting templates\n const iconStyles = `icon ${ isMobilePlatform() ? '' :\n  (user.isAuthorized ? 'icon-submit' : 'icon-disabled'}`;\n</code></pre>\n</li>\n<li>\n<h3>What are tagged templates</h3>\n<p> Tagged templates are the advanced form of templates in which tags allow you to parse template literals with a function. The tag function accepts the first parameter as an array of strings and remaining parameters as expressions. This function can also return manipulated strings based on parameters. Let's see the usage of this tagged template behavior of an IT professional skill set in an organization,</p>\n<pre><code class=\"language-javascript\">var user1 = 'John';\nvar skill1 = 'JavaScript';\nvar experience1 = 15;\n\nvar user2 = 'Kane';\nvar skill2 = 'JavaScript';\nvar experience2 = 5;\n\nfunction myInfoTag(strings, userExp, experienceExp, skillExp) {\n  var str0 = strings[0]; // \"Mr/Ms. \"\n  var str1 = strings[1]; // \" is a/an \"\n  var str2 = strings[2]; // \"in\"\n\n  var expertiseStr;\n  if (experienceExp > 10){\n    expertiseStr = 'expert developer';\n  } else if(skillExp > 5 &#x26;&#x26; skillExp &#x3C;= 10) {\n    expertiseStr = 'senior developer';\n  } else {\n    expertiseStr = 'junior developer';\n  }\n\n  return ${str0}${userExp}${str1}${expertiseStr}${str2}${skillExp};\n}\n\nvar output1 = myInfoTag`Mr/Ms. ${ user1 } is a/an ${ experience1 } in ${skill1}`;\nvar output2 = myInfoTag`Mr/Ms. ${ user2 } is a/an ${ experience2 } in ${skill2}`;\n\nconsole.log(output1);// Mr/Ms. John is a/an expert developer in JavaScript\nconsole.log(output2);// Mr/Ms. Kane is a/an junior developer in JavaScript\n</code></pre>\n</li>\n<li>\n<h3>What are raw strings</h3>\n<p> ES6 provides a raw strings feature using the <code>String.raw()</code> method which is used to get the raw string form of template strings. This feature allows you to access the raw strings as they were entered, without processing escape sequences. For example, the usage would be as below,</p>\n<pre><code class=\"language-javascript\">var calculationString = String.raw`The sum of numbers is \\n${1 + 2 + 3 + 4}!`;\nconsole.log(calculationString); // The sum of numbers is 10\n</code></pre>\n<p> If you don't use raw strings, the newline character sequence will be processed by displaying the output in multiple lines</p>\n<pre><code class=\"language-javascript\">var calculationString = `The sum of numbers is \\n${1 + 2 + 3 + 4}!`;\nconsole.log(calculationString);\n// The sum of numbers is\n// 10\n</code></pre>\n<p> Also, the raw property is available on the first argument to the tag function</p>\n<pre><code class=\"language-javascript\">function tag(strings) {\n    console.log(strings.raw[0]);\n}\n</code></pre>\n</li>\n<li>\n<h3>What is destructuring assignment</h3>\n<p> The destructuring assignment is a JavaScript expression that makes it possible to unpack values from arrays or properties from objects into distinct variables.\nLet's get the month values from an array using destructuring assignment</p>\n<pre><code class=\"language-javascript\">var [one, two, three] = ['JAN', 'FEB', 'MARCH'];\n\nconsole.log(one); // \"JAN\"\nconsole.log(two); // \"FEB\"\nconsole.log(three); // \"MARCH\"\n</code></pre>\n<p> and you can get user properties of an object using destructuring assignment,</p>\n<pre><code class=\"language-javascript\">var { name, age } = { name: 'John', age: 32 };\n\nconsole.log(name); // John\nconsole.log(age); // 32\n</code></pre>\n</li>\n<li>\n<h3>What are default values in destructuring assignment</h3>\n<p> A variable can be assigned a default value when the value unpacked from the array or object is undefined during destructuring assignment. It helps to avoid setting default values separately for each assignment. Let's take an example for both arrays and object use cases,</p>\n<p> <strong>Arrays destructuring:</strong></p>\n<pre><code class=\"language-javascript\">var x, y, z;\n\n[x = 2, y = 4, z = 6] = [10];\nconsole.log(x); // 10\nconsole.log(y); // 4\nconsole.log(z); // 6\n</code></pre>\n<p> <strong>Objects destructuring:</strong></p>\n<pre><code class=\"language-javascript\">var { x = 2, y = 4, z = 6 } = { x: 10 };\n\nconsole.log(x); // 10\nconsole.log(y); // 4\nconsole.log(z); // 6\n</code></pre>\n</li>\n<li>\n<h3>How do you swap variables in destructuring assignment</h3>\n<p> If you don't use destructuring assignment, swapping two values requires a temporary variable. Whereas using a destructuring feature, two variable values can be swapped in one destructuring expression. Let's swap two number variables in array destructuring assignment,</p>\n<pre><code class=\"language-javascript\">var x = 10,\n    y = 20;\n\n[x, y] = [y, x];\nconsole.log(x); // 20\nconsole.log(y); // 10\n</code></pre>\n</li>\n<li>\n<h3>What are enhanced object literals</h3>\n<p> Object literals make it easy to quickly create objects with properties inside the curly braces. For example, it provides shorter syntax for common object property definition as below.</p>\n<pre><code class=\"language-javascript\">//ES6\nvar x = 10,\n    y = 20;\nobj = { x, y };\nconsole.log(obj); // {x: 10, y:20}\n//ES5\nvar x = 10,\n    y = 20;\nobj = { x: x, y: y };\nconsole.log(obj); // {x: 10, y:20}\n</code></pre>\n</li>\n<li>\n<h3>What are dynamic imports</h3>\n<p> The dynamic imports using <code>import()</code> function syntax allows us to load modules on demand by using promises or the async/await syntax. Currently this feature is in <a href=\"https://github.com/tc39/proposal-dynamic-import\">stage4 proposal</a>. The main advantage of dynamic imports is reduction of our bundle's sizes, the size/payload response of our requests and overall improvements in the user experience.\nThe syntax of dynamic imports would be as below,</p>\n<pre><code class=\"language-javascript\">import('./Module').then((Module) => Module.method());\n</code></pre>\n</li>\n<li>\n<h3>What are the use cases for dynamic imports</h3>\n<p> Below are some of the use cases of using dynamic imports over static imports,</p>\n<ol>\n<li>Import a module on-demand or conditionally. For example, if you want to load a polyfill on legacy browser</li>\n</ol>\n<pre><code class=\"language-javascript\">if (isLegacyBrowser()) {\n    import(···)\n    .then(···);\n}\n</code></pre>\n<ol>\n<li>Compute the module specifier at runtime. For example, you can use it for internationalization.</li>\n</ol>\n<pre><code class=\"language-javascript\">import(`messages_${getLocale()}.js`).then(···);\n</code></pre>\n<ol>\n<li>Import a module from within a regular script instead a module.</li>\n</ol>\n</li>\n<li>\n<h3>What are typed arrays</h3>\n<p> Typed arrays are array-like objects from ECMAScript 6 API for handling binary data. JavaScript provides 8 Typed array types,</p>\n<ol>\n<li>Int8Array: An array of 8-bit signed integers</li>\n<li>Int16Array: An array of 16-bit signed integers</li>\n<li>Int32Array: An array of 32-bit signed integers</li>\n<li>Uint8Array: An array of 8-bit unsigned integers</li>\n<li>Uint16Array: An array of 16-bit unsigned integers</li>\n<li>Uint32Array: An array of 32-bit unsigned integers</li>\n<li>Float32Array: An array of 32-bit floating point numbers</li>\n<li>Float64Array: An array of 64-bit floating point numbers</li>\n</ol>\n<p> For example, you can create an array of 8-bit signed integers as below</p>\n<pre><code class=\"language-javascript\">const a = new Int8Array();\n// You can pre-allocate n bytes\nconst bytes = 1024;\nconst a = new Int8Array(bytes);\n</code></pre>\n</li>\n<li>\n<h3>What are the advantages of module loaders</h3>\n<p> The module loaders provides the below features,</p>\n<ol>\n<li>Dynamic loading</li>\n<li>State isolation</li>\n<li>Global namespace isolation</li>\n<li>Compilation hooks</li>\n<li>Nested virtualization</li>\n</ol>\n</li>\n<li>\n<h3>What is collation</h3>\n<p> Collation is used for sorting a set of strings and searching within a set of strings. It is parameterized by locale and aware of Unicode. Let's take comparison and sorting features,</p>\n<ol>\n<li><strong>Comparison:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">var list = ['ä', 'a', 'z']; // In German,  \"ä\" sorts with \"a\" Whereas in Swedish, \"ä\" sorts after \"z\"\nvar l10nDE = new Intl.Collator('de');\nvar l10nSV = new Intl.Collator('sv');\nconsole.log(l10nDE.compare('ä', 'z') === -1); // true\nconsole.log(l10nSV.compare('ä', 'z') === +1); // true\n</code></pre>\n<ol>\n<li><strong>Sorting:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">var list = ['ä', 'a', 'z']; // In German,  \"ä\" sorts with \"a\" Whereas in Swedish, \"ä\" sorts after \"z\"\nvar l10nDE = new Intl.Collator('de');\nvar l10nSV = new Intl.Collator('sv');\nconsole.log(list.sort(l10nDE.compare)); // [ \"a\", \"ä\", \"z\" ]\nconsole.log(list.sort(l10nSV.compare)); // [ \"a\", \"z\", \"ä\" ]\n</code></pre>\n</li>\n<li>\n<h3>What is for...of statement</h3>\n<p> The for...of statement creates a loop iterating over iterable objects or elements such as built-in String, Array, Array-like objects (like arguments or NodeList), TypedArray, Map, Set, and user-defined iterables. The basic usage of for...of statement on arrays would be as below,</p>\n<pre><code class=\"language-javascript\">let arrayIterable = [10, 20, 30, 40, 50];\n\nfor (let value of arrayIterable) {\n    value++;\n    console.log(value); // 11 21 31 41 51\n}\n</code></pre>\n</li>\n<li>\n<h3>What is the output of below spread operator array</h3>\n<pre><code class=\"language-javascript\">[...'John Resig'];\n</code></pre>\n<p> The output of the array is ['J', 'o', 'h', 'n', '', 'R', 'e', 's', 'i', 'g']\n<strong>Explanation:</strong> The string is an iterable type and the spread operator within an array maps every character of an iterable to one element. Hence, each character of a string becomes an element within an Array.</p>\n</li>\n<li>\n<h3>Is PostMessage secure</h3>\n<p> Yes, postMessages can be considered very secure as long as the programmer/developer is careful about checking the origin and source of an arriving message. But if you try to send/receive a message without verifying its source will create cross-site scripting attacks.</p>\n</li>\n<li>\n<h3>What are the problems with postmessage target origin as wildcard</h3>\n<p> The second argument of postMessage method specifies which origin is allowed to receive the message. If you use the wildcard \"*\" as an argument then any origin is allowed to receive the message. In this case, there is no way for the sender window to know if the target window is at the target origin when sending the message. If the target window has been navigated to another origin, the other origin would receive the data. Hence, this may lead to XSS vulnerabilities.</p>\n<pre><code class=\"language-javascript\">targetWindow.postMessage(message, '*');\n</code></pre>\n</li>\n<li>\n<h3>How do you avoid receiving postMessages from attackers</h3>\n<p> Since the listener listens for any message, an attacker can trick the application by sending a message from the attacker's origin, which gives an impression that the receiver received the message from the actual sender's window. You can avoid this issue by validating the origin of the message on the receiver's end using the \"message.origin\" attribute. For examples, let's check the sender's origin <a href=\"http://www.some-sender.com\">http://www.some-sender.com</a> on receiver side <a href=\"www.some-receiver.com\">www.some-receiver.com</a>,</p>\n<pre><code class=\"language-javascript\">//Listener on http://www.some-receiver.com/\nwindow.addEventListener(\"message\", function(message){\n    if(/^http://www\\.some-sender\\.com$/.test(message.origin)){\n         console.log('You received the data from valid sender', message.data);\n   }\n});\n</code></pre>\n</li>\n<li>\n<h3>Can I avoid using postMessages completely</h3>\n<p> You cannot avoid using postMessages completely(or 100%). Even though your application doesn't use postMessage considering the risks, a lot of third party scripts use postMessage to communicate with the third party service. So your application might be using postMessage without your knowledge.</p>\n</li>\n<li>\n<h3>Is postMessages synchronous</h3>\n<p> The postMessages are synchronous in IE8 browser but they are asynchronous in IE9 and all other modern browsers (i.e, IE9+, Firefox, Chrome, Safari).Due to this asynchronous behaviour, we use a callback mechanism when the postMessage is returned.</p>\n</li>\n<li>\n<h3>What paradigm is Javascript</h3>\n<p> JavaScript is a multi-paradigm language, supporting imperative/procedural programming, Object-Oriented Programming and functional programming. JavaScript supports Object-Oriented Programming with prototypical inheritance.</p>\n</li>\n<li>\n<h3>What is the difference between internal and external javascript</h3>\n<p> <strong>Internal JavaScript:</strong> It is the source code within the script tag.\n<strong>External JavaScript:</strong> The source code is stored in an external file(stored with .js extension) and referred with in the tag.</p>\n</li>\n<li>\n<h3>Is JavaScript faster than server side script</h3>\n<p> Yes, JavaScript is faster than server side script. Because JavaScript is a client-side script it does not require any web server's help for its computation or calculation. So JavaScript is always faster than any server-side script like ASP, PHP, etc.</p>\n</li>\n<li>\n<h3>How do you get the status of a checkbox</h3>\n<p> You can apply the <code>checked</code> property on the selected checkbox in the DOM. If the value is <code>True</code> means the checkbox is checked otherwise it is unchecked. For example, the below HTML checkbox element can be access using javascript as below,</p>\n<pre><code class=\"language-html\">&#x3C;input type=\"checkbox\" name=\"checkboxname\" value=\"Agree\" /> Agree the conditions&#x3C;br />\n</code></pre>\n<pre><code class=\"language-javascript\">console.log(document.getElementById('checkboxname').checked); // true or false\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of double tilde operator</h3>\n<p> The double tilde operator(~~) is known as double NOT bitwise operator. This operator is going to be a quicker substitute for Math.floor().</p>\n</li>\n<li>\n<h3>How do you convert character to ASCII code</h3>\n<p> You can use the <code>String.prototype.charCodeAt()</code> method to convert string characters to ASCII numbers. For example, let's find ASCII code for the first letter of 'ABC' string,</p>\n<pre><code class=\"language-javascript\">'ABC'.charCodeAt(0); // returns 65\n</code></pre>\n<p> Whereas <code>String.fromCharCode()</code> method converts numbers to equal ASCII characters.</p>\n<pre><code class=\"language-javascript\">String.fromCharCode(65, 66, 67); // returns 'ABC'\n</code></pre>\n</li>\n<li>\n<h3>What is ArrayBuffer</h3>\n<p> An ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. You can create it as below,</p>\n<pre><code class=\"language-javascript\">let buffer = new ArrayBuffer(16); // create a buffer of length 16\nalert(buffer.byteLength); // 16\n</code></pre>\n<p> To manipulate an ArrayBuffer, we need to use a \"view\" object.</p>\n<pre><code class=\"language-javascript\">//Create a DataView referring to the buffer\nlet view = new DataView(buffer);\n</code></pre>\n</li>\n<li>\n<h3>What is the output of below string expression</h3>\n<pre><code class=\"language-javascript\">console.log('Welcome to JS world'[0]);\n</code></pre>\n<p> The output of the above expression is \"W\".\n<strong>Explanation:</strong> The bracket notation with specific index on a string returns the character at a specific location. Hence, it returns the character \"W\" of the string. Since this is not supported in IE7 and below versions, you may need to use the .charAt() method to get the desired result.</p>\n</li>\n<li>\n<h3>What is the purpose of Error object</h3>\n<p> The Error constructor creates an error object and the instances of error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions. The syntax of error object would be as below,</p>\n<pre><code class=\"language-javascript\">new Error([message[, fileName[, lineNumber]]])\n</code></pre>\n<p> You can throw user defined exceptions or errors using Error object in try...catch block as below,</p>\n<pre><code class=\"language-javascript\">try {\n    if (withdraw > balance) throw new Error(\"Oops! You don't have enough balance\");\n} catch (e) {\n    console.log(e.name + ': ' + e.message);\n}\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of EvalError object</h3>\n<p> The EvalError object indicates an error regarding the global <code>eval()</code> function. Even though this exception is not thrown by JavaScript anymore, the EvalError object remains for compatibility. The syntax of this expression would be as below,</p>\n<pre><code class=\"language-javascript\">new EvalError([message[, fileName[, lineNumber]]])\n</code></pre>\n<p> You can throw EvalError with in try...catch block as below,</p>\n<pre><code class=\"language-javascript\">try {\n  throw new EvalError('Eval function error', 'someFile.js', 100);\n} catch (e) {\n  console.log(e.message, e.name, e.fileName);              // \"Eval function error\", \"EvalError\", \"someFile.js\"\n</code></pre>\n</li>\n<li>\n<h3>What are the list of cases error thrown from non-strict mode to strict mode</h3>\n<p> When you apply 'use strict'; syntax, some of the below cases will throw a SyntaxError before executing the script</p>\n<ol>\n<li>When you use Octal syntax</li>\n</ol>\n<pre><code class=\"language-javascript\">var n = 022;\n</code></pre>\n<ol>\n<li>Using <code>with</code> statement</li>\n<li>When you use delete operator on a variable name</li>\n<li>Using eval or arguments as variable or function argument name</li>\n<li>When you use newly reserved keywords</li>\n<li>When you declare a function in a block</li>\n</ol>\n<pre><code class=\"language-javascript\">if (someCondition) {\n    function f() {}\n}\n</code></pre>\n<p> Hence, the errors from above cases are helpful to avoid errors in development/production environments.</p>\n</li>\n<li>\n<h3>Do all objects have prototypes</h3>\n<p> No. All objects have prototypes except for the base object which is created by the user, or an object that is created using the new keyword.</p>\n</li>\n<li>\n<h3>What is the difference between a parameter and an argument</h3>\n<p> Parameter is the variable name of a function definition whereas an argument represents the value given to a function when it is invoked. Let's explain this with a simple function</p>\n<pre><code class=\"language-javascript\">function myFunction(parameter1, parameter2, parameter3) {\n    console.log(arguments[0]); // \"argument1\"\n    console.log(arguments[1]); // \"argument2\"\n    console.log(arguments[2]); // \"argument3\"\n}\nmyFunction('argument1', 'argument2', 'argument3');\n</code></pre>\n</li>\n<li>\n<h3>What is the purpose of some method in arrays</h3>\n<p> The some() method is used to test whether at least one element in the array passes the test implemented by the provided function. The method returns a boolean value. Let's take an example to test for any odd elements,</p>\n<pre><code class=\"language-javascript\">var array = [1, 2, 3, 4, 5, 6 ,7, 8, 9, 10];\n\nvar odd = element ==> element % 2 !== 0;\n\nconsole.log(array.some(odd)); // true (the odd element exists)\n</code></pre>\n</li>\n<li>\n<h3>How do you combine two or more arrays</h3>\n<p> The concat() method is used to join two or more arrays by returning a new array containing all the elements. The syntax would be as below,</p>\n<pre><code class=\"language-javascript\">array1.concat(array2, array3, ..., arrayX)\n</code></pre>\n<p> Let's take an example of array's concatenation with veggies and fruits arrays,</p>\n<pre><code class=\"language-javascript\">var veggies = ['Tomato', 'Carrot', 'Cabbage'];\nvar fruits = ['Apple', 'Orange', 'Pears'];\nvar veggiesAndFruits = veggies.concat(fruits);\nconsole.log(veggiesAndFruits); // Tomato, Carrot, Cabbage, Apple, Orange, Pears\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between Shallow and Deep copy</h3>\n<p> There are two ways to copy an object,</p>\n<p> <strong>Shallow Copy:</strong>\nShallow copy is a bitwise copy of an object. A new object is created that has an exact copy of the values in the original object. If any of the fields of the object are references to other objects, just the reference addresses are copied i.e., only the memory address is copied.</p>\n<p> <strong>Example</strong></p>\n<pre><code class=\"language-javascript\">var empDetails = {\n    name: 'John',\n    age: 25,\n    expertise: 'Software Developer'\n};\n</code></pre>\n<p> to create a duplicate</p>\n<pre><code class=\"language-javascript\">var empDetailsShallowCopy = empDetails; //Shallow copying!\n</code></pre>\n<p> if we change some property value in the duplicate one like this:</p>\n<pre><code class=\"language-javascript\">empDetailsShallowCopy.name = 'Johnson';\n</code></pre>\n<p> The above statement will also change the name of <code>empDetails</code>, since we have a shallow copy. That means we're losing the original data as well.</p>\n<p> <strong>Deep copy:</strong>\nA deep copy copies all fields, and makes copies of dynamically allocated memory pointed to by the fields. A deep copy occurs when an object is copied along with the objects to which it refers.</p>\n<p> <strong>Example</strong></p>\n<pre><code class=\"language-javascript\">var empDetails = {\n    name: 'John',\n    age: 25,\n    expertise: 'Software Developer'\n};\n</code></pre>\n<p> Create a deep copy by using the properties from the original object into new variable</p>\n<pre><code class=\"language-javascript\">var empDetailsDeepCopy = {\n    name: empDetails.name,\n    age: empDetails.age,\n    expertise: empDetails.expertise\n};\n</code></pre>\n<p> Now if you change <code>empDetailsDeepCopy.name</code>, it will only affect <code>empDetailsDeepCopy</code> &#x26; not <code>empDetails</code></p>\n</li>\n<li>\n<h3>How do you create specific number of copies of a string</h3>\n<p> The <code>repeat()</code> method is used to construct and return a new string which contains the specified number of copies of the string on which it was called, concatenated together. Remember that this method has been added to the ECMAScript 2015 specification.\nLet's take an example of Hello string to repeat it 4 times,</p>\n<pre><code class=\"language-javascript\">'Hello'.repeat(4); // 'HelloHelloHelloHello'\n</code></pre>\n</li>\n<li>\n<h3>How do you return all matching strings against a regular expression</h3>\n<p> The <code>matchAll()</code> method can be used to return an iterator of all results matching a string against a regular expression. For example, the below example returns an array of matching string results against a regular expression,</p>\n<pre><code class=\"language-javascript\">let regexp = /Hello(\\d?))/g;\nlet greeting = 'Hello1Hello2Hello3';\n\nlet greetingList = [...greeting.matchAll(regexp)];\n\nconsole.log(greetingList[0]); //Hello1\nconsole.log(greetingList[1]); //Hello2\nconsole.log(greetingList[2]); //Hello3\n</code></pre>\n</li>\n<li>\n<h3>How do you trim a string at the beginning or ending</h3>\n<p> The <code>trim</code> method of string prototype is used to trim on both sides of a string. But if you want to trim especially at the beginning or ending of the string then you can use <code>trimStart/trimLeft</code> and <code>trimEnd/trimRight</code> methods. Let's see an example of these methods on a greeting message,</p>\n<pre><code class=\"language-javascript\">var greeting = '   Hello, Goodmorning!   ';\n\nconsole.log(greeting); // \"   Hello, Goodmorning!   \"\nconsole.log(greeting.trimStart()); // \"Hello, Goodmorning!   \"\nconsole.log(greeting.trimLeft()); // \"Hello, Goodmorning!   \"\n\nconsole.log(greeting.trimEnd()); // \"   Hello, Goodmorning!\"\nconsole.log(greeting.trimRight()); // \"   Hello, Goodmorning!\"\n</code></pre>\n</li>\n<li>\n<h3>What is the output of below console statement with unary operator</h3>\n<p> Let's take console statement with unary operator as given below,</p>\n<pre><code class=\"language-javascript\">console.log(+'Hello');\n</code></pre>\n<p> The output of the above console log statement returns NaN. Because the element is prefixed by the unary operator and the JavaScript interpreter will try to convert that element into a number type. Since the conversion fails, the value of the statement results in NaN value.</p>\n</li>\n<li>\n<h3>Does javascript uses mixins</h3>\n</li>\n<li>\n<h3>What is a thunk function</h3>\n<p> A thunk is just a function which delays the evaluation of the value. It doesn't take any arguments but gives the value whenever you invoke the thunk. i.e, It is used not to execute now but it will be sometime in the future. Let's take a synchronous example,</p>\n<pre><code class=\"language-javascript\">const add = (x, y) => x + y;\n\nconst thunk = () => add(2, 3);\n\nthunk(); // 5\n</code></pre>\n</li>\n<li>\n<h3>What are asynchronous thunks</h3>\n<p> The asynchronous thunks are useful to make network requests. Let's see an example of network requests,</p>\n<pre><code class=\"language-javascript\">function fetchData(fn) {\n    fetch('https://jsonplaceholder.typicode.com/todos/1')\n        .then((response) => response.json())\n        .then((json) => fn(json));\n}\n\nconst asyncThunk = function () {\n    return fetchData(function getData(data) {\n        console.log(data);\n    });\n};\n\nasyncThunk();\n</code></pre>\n<p> The <code>getData</code> function won't be called immediately but it will be invoked only when the data is available from API endpoint. The setTimeout function is also used to make our code asynchronous. The best real time example is redux state management library which uses the asynchronous thunks to delay the actions to dispatch.</p>\n</li>\n<li>\n<h3>What is the output of below function calls</h3>\n<p> <strong>Code snippet:</strong></p>\n<pre><code class=\"language-javascript\">const circle = {\n    radius: 20,\n    diameter() {\n        return this.radius * 2;\n    },\n    perimeter: () => 2 * Math.PI * this.radius\n};\n</code></pre>\n<p> console.log(circle.diameter());\nconsole.log(circle.perimeter());</p>\n<p> <strong>Output:</strong></p>\n<p> The output is 40 and NaN. Remember that diameter is a regular function, whereas the value of perimeter is an arrow function. The <code>this</code> keyword of a regular function(i.e, diameter) refers to the surrounding scope which is a class(i.e, Shape object). Whereas this keyword of perimeter function refers to the surrounding scope which is a window object. Since there is no radius property on window objects it returns an undefined value and the multiple of number value returns NaN value.</p>\n</li>\n<li>\n<h3>How to remove all line breaks from a string</h3>\n<p> The easiest approach is using regular expressions to detect and replace newlines in the string. In this case, we use replace function along with string to replace with, which in our case is an empty string.</p>\n<pre><code class=\"language-javascript\">function remove_linebreaks( var message ) {\n    return message.replace( /[\\r\\n]+/gm, \"\" );\n}\n</code></pre>\n<p> In the above expression, g and m are for global and multiline flags.</p>\n</li>\n<li>\n<h3>What is the difference between reflow and repaint</h3>\n<p> A <em>repaint</em> occurs when changes are made which affect the visibility of an element, but not its layout. Examples of this include outline, visibility, or background color. A <em>reflow</em> involves changes that affect the layout of a portion of the page (or the whole page). Resizing the browser window, changing the font, content changing (such as user typing text), using JavaScript methods involving computed styles, adding or removing elements from the DOM, and changing an element's classes are a few of the things that can trigger reflow. Reflow of an element causes the subsequent reflow of all child and ancestor elements as well as any elements following it in the DOM.</p>\n</li>\n<li>\n<h3>What happens with negating an array</h3>\n<p> Negating an array with <code>!</code> character will coerce the array into a boolean. Since Arrays are considered to be truthy So negating it will return <code>false</code>.</p>\n<pre><code class=\"language-javascript\">console.log(![]); // false\n</code></pre>\n</li>\n<li>\n<h3>What happens if we add two arrays</h3>\n<p> If you add two arrays together, it will convert them both to strings and concatenate them. For example, the result of adding arrays would be as below,</p>\n<pre><code class=\"language-javascript\">console.log(['a'] + ['b']); // \"ab\"\nconsole.log([] + []); // \"\"\nconsole.log(![] + []); // \"false\", because ![] returns false.\n</code></pre>\n</li>\n<li>\n<h3>What is the output of prepend additive operator on falsy values</h3>\n<p> If you prepend the additive(+) operator on falsy values(null, undefined, NaN, false, \"\"), the falsy value converts to a number value zero. Let's display them on browser console as below,</p>\n<pre><code class=\"language-javascript\">console.log(+null); // 0\nconsole.log(+undefined); // NaN\nconsole.log(+false); // 0\nconsole.log(+NaN); // NaN\nconsole.log(+''); // 0\n</code></pre>\n</li>\n<li>\n<h3>How do you create self string using special characters</h3>\n<p> The self string can be formed with the combination of <code>[]()!+</code> characters. You need to remember the below conventions to achieve this pattern.</p>\n<ol>\n<li>Since Arrays are truthful values, negating the arrays will produce false: ![] === false</li>\n<li>As per JavaScript coercion rules, the addition of arrays together will toString them: [] + [] === \"\"</li>\n<li>Prepend an array with + operator will convert an array to false, the negation will make it true and finally converting the result will produce value '1': +(!(+[])) === 1</li>\n</ol>\n<p> By applying the above rules, we can derive below conditions</p>\n<pre><code class=\"language-javascript\">(![] + [] === 'false' + !+[]) === 1;\n</code></pre>\n<p> Now the character pattern would be created as below,</p>\n<pre><code class=\"language-javascript\">      s               e               l               f\n ^^^^^^^^^^^^^   ^^^^^^^^^^^^^   ^^^^^^^^^^^^^   ^^^^^^^^^^^^^\n\n (![] + [])[3] + (![] + [])[4] + (![] + [])[2] + (![] + [])[0]\n ^^^^^^^^^^^^^   ^^^^^^^^^^^^^   ^^^^^^^^^^^^^   ^^^^^^^^^^^^^\n(![] + [])[+!+[]+!+[]+!+[]] +\n(![] + [])[+!+[]+!+[]+!+[]+!+[]] +\n(![] + [])[+!+[]+!+[]] +\n(![] + [])[+[]]\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n(![]+[])[+!+[]+!+[]+!+[]]+(![]+[])[+!+[]+!+[]+!+[]+!+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+[]]\n</code></pre>\n</li>\n<li>\n<h3>How do you remove falsy values from an array</h3>\n<p> You can apply the filter method on the array by passing Boolean as a parameter. This way it removes all falsy values(0, undefined, null, false and \"\") from the array.</p>\n<pre><code class=\"language-javascript\">const myArray = [false, null, 1, 5, undefined];\nmyArray.filter(Boolean); // [1, 5] // is same as myArray.filter(x => x);\n</code></pre>\n</li>\n<li>\n<h3>How do you get unique values of an array</h3>\n<p> You can get unique values of an array with the combination of <code>Set</code> and rest expression/spread(...) syntax.</p>\n<pre><code class=\"language-javascript\">console.log([...new Set([1, 2, 4, 4, 3])]); // [1, 2, 4, 3]\n</code></pre>\n</li>\n<li>\n<h3>What is destructuring aliases</h3>\n<p> Sometimes you would like to have a destructured variable with a different name than the property name. In that case, you'll use a <code>: newName</code> to specify a name for the variable. This process is called destructuring aliases.</p>\n<pre><code class=\"language-javascript\">const obj = { x: 1 };\n// Grabs obj.x as as { otherName }\nconst { x: otherName } = obj;\n</code></pre>\n</li>\n<li>\n<h3>How do you map the array values without using map method</h3>\n<p> You can map the array values without using the <code>map</code> method by just using the <code>from</code> method of Array. Let's map city names from Countries array,</p>\n<pre><code class=\"language-javascript\">const countries = [\n    { name: 'India', capital: 'Delhi' },\n    { name: 'US', capital: 'Washington' },\n    { name: 'Russia', capital: 'Moscow' },\n    { name: 'Singapore', capital: 'Singapore' },\n    { name: 'China', capital: 'Beijing' },\n    { name: 'France', capital: 'Paris' }\n];\n\nconst cityNames = Array.from(countries, ({ capital }) => capital);\nconsole.log(cityNames); // ['Delhi, 'Washington', 'Moscow', 'Singapore', 'Beijing', 'Paris']\n</code></pre>\n</li>\n<li>\n<h3>How do you empty an array</h3>\n<p> You can empty an array quickly by setting the array length to zero.</p>\n<pre><code class=\"language-javascript\">let cities = ['Singapore', 'Delhi', 'London'];\ncities.length = 0; // cities becomes []\n</code></pre>\n</li>\n<li>\n<h3>How do you rounding numbers to certain decimals</h3>\n<p> You can round numbers to a certain number of decimals using <code>toFixed</code> method from native javascript.</p>\n<pre><code class=\"language-javascript\">let pie = 3.141592653;\npie = pie.toFixed(3); // 3.142\n</code></pre>\n</li>\n<li>\n<h3>What is the easiest way to convert an array to an object</h3>\n<p> You can convert an array to an object with the same data using spread(...) operator.</p>\n<pre><code class=\"language-javascript\">var fruits = ['banana', 'apple', 'orange', 'watermelon'];\nvar fruitsObject = { ...fruits };\nconsole.log(fruitsObject); // {0: \"banana\", 1: \"apple\", 2: \"orange\", 3: \"watermelon\"}\n</code></pre>\n</li>\n<li>\n<h3>How do you create an array with some data</h3>\n<p> You can create an array with some data or an array with the same values using <code>fill</code> method.</p>\n<pre><code class=\"language-javascript\">var newArray = new Array(5).fill('0');\nconsole.log(newArray); // [\"0\", \"0\", \"0\", \"0\", \"0\"]\n</code></pre>\n</li>\n<li>\n<h3>What are the placeholders from console object</h3>\n<p> Below are the list of placeholders available from console object,</p>\n<ol>\n<li>%o — It takes an object,</li>\n<li>%s — It takes a string,</li>\n<li>%d — It is used for a decimal or integer\nThese placeholders can be represented in the console.log as below</li>\n</ol>\n<pre><code class=\"language-javascript\">const user = { name: 'John', id: 1, city: 'Delhi' };\nconsole.log('Hello %s, your details %o are available in the object form', 'John', user); // Hello John, your details {name: \"John\", id: 1, city: \"Delhi\"} are available in object\n</code></pre>\n</li>\n<li>\n<h3>Is it possible to add CSS to console messages</h3>\n<p> Yes, you can apply CSS styles to console messages similar to html text on the web page.</p>\n<pre><code class=\"language-javascript\">console.log('%c The text has blue color, with large font and red background', 'color: blue; font-size: x-large; background: red');\n</code></pre>\n<p> The text will be displayed as below,\n<img src=\"images/console-css.png\" alt=\"Screenshot\"></p>\n<p> <strong>Note:</strong> All CSS styles can be applied to console messages.</p>\n</li>\n<li>\n<h3>What is the purpose of dir method of console object</h3>\n<p> The <code>console.dir()</code> is used to display an interactive list of the properties of the specified JavaScript object as JSON.</p>\n<pre><code class=\"language-javascript\">const user = { name: 'John', id: 1, city: 'Delhi' };\nconsole.dir(user);\n</code></pre>\n<p> The user object displayed in JSON representation\n<img src=\"images/console-dir.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>Is it possible to debug HTML elements in console</h3>\n<p> Yes, it is possible to get and debug HTML elements in the console just like inspecting elements.</p>\n<pre><code class=\"language-javascript\">const element = document.getElementsByTagName('body')[0];\nconsole.log(element);\n</code></pre>\n<p> It prints the HTML element in the console,</p>\n<p> <img src=\"images/console-html.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>How do you display data in a tabular format using console object</h3>\n<p> The <code>console.table()</code> is used to display data in the console in a tabular format to visualize complex arrays or objects.</p>\n<pre><code class=\"language-js\">const users = [\n    { name: 'John', id: 1, city: 'Delhi' },\n    { name: 'Max', id: 2, city: 'London' },\n    { name: 'Rod', id: 3, city: 'Paris' }\n];\nconsole.table(users);\n</code></pre>\n<p> The data visualized in a table format,</p>\n<p> <img src=\"images/console-table.png\" alt=\"Screenshot\">\n<strong>Not:</strong> Remember that <code>console.table()</code> is not supported in IE.</p>\n</li>\n<li>\n<h3>How do you verify that an argument is a Number or not</h3>\n<p> The combination of IsNaN and isFinite methods are used to confirm whether an argument is a number or not.</p>\n<pre><code class=\"language-javascript\">function isNumber(n) {\n    return !isNaN(parseFloat(n)) &#x26;&#x26; isFinite(n);\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you create copy to clipboard button</h3>\n<p> You need to select the content(using .select() method) of the input element and execute the copy command with execCommand (i.e, execCommand('copy')). You can also execute other system commands like cut and paste.</p>\n<pre><code class=\"language-javascript\">document.querySelector('#copy-button').onclick = function () {\n    // Select the content\n    document.querySelector('#copy-input').select();\n    // Copy to the clipboard\n    document.execCommand('copy');\n};\n</code></pre>\n</li>\n<li>\n<h3>What is the shortcut to get timestamp</h3>\n<p> You can use <code>new Date().getTime()</code> to get the current timestamp. There is an alternative shortcut to get the value.</p>\n<pre><code class=\"language-javascript\">console.log(+new Date());\nconsole.log(Date.now());\n</code></pre>\n</li>\n<li>\n<h3>How do you flattening multi dimensional arrays</h3>\n<p> Flattening bi-dimensional arrays is trivial with Spread operator.</p>\n<pre><code class=\"language-javascript\">const biDimensionalArr = [11, [22, 33], [44, 55], [66, 77], 88, 99];\nconst flattenArr = [].concat(...biDimensionalArr); // [11, 22, 33, 44, 55, 66, 77, 88, 99]\n</code></pre>\n<p> But you can make it work with multi-dimensional arrays by recursive calls,</p>\n<pre><code class=\"language-javascript\">function flattenMultiArray(arr) {\n    const flattened = [].concat(...arr);\n    return flattened.some((item) => Array.isArray(item)) ? flattenMultiArray(flattened) : flattened;\n}\nconst multiDimensionalArr = [11, [22, 33], [44, [55, 66, [77, [88]], 99]]];\nconst flatArr = flattenMultiArray(multiDimensionalArr); // [11, 22, 33, 44, 55, 66, 77, 88, 99]\n</code></pre>\n</li>\n<li>\n<h3>What is the easiest multi condition checking</h3>\n<p> You can use <code>indexOf</code> to compare input with multiple values instead of checking each value as one condition.</p>\n<pre><code class=\"language-javascript\">// Verbose approach\nif (input === 'first' || input === 1 || input === 'second' || input === 2) {\n    someFunction();\n}\n// Shortcut\nif (['first', 1, 'second', 2].indexOf(input) !== -1) {\n    someFunction();\n}\n</code></pre>\n</li>\n<li>\n<h3>How do you capture browser back button</h3>\n<p> The <code>window.onbeforeunload</code> method is used to capture browser back button events. This is helpful to warn users about losing the current data.</p>\n<pre><code class=\"language-javascript\">window.onbeforeunload = function () {\n    alert('You work will be lost');\n};\n</code></pre>\n</li>\n<li>\n<h3>How do you disable right click in the web page</h3>\n<p> The right click on the page can be disabled by returning false from the <code>oncontextmenu</code> attribute on the body element.</p>\n<pre><code class=\"language-html\">&#x3C;body oncontextmenu=\"return false;\">&#x3C;/body>\n</code></pre>\n</li>\n<li>\n<h3>What are wrapper objects</h3>\n<p> Primitive Values like string,number and boolean don't have properties and methods but they are temporarily converted or coerced to an object(Wrapper object) when you try to perform actions on them. For example, if you apply toUpperCase() method on a primitive string value, it does not throw an error but returns uppercase of the string.</p>\n<pre><code class=\"language-javascript\">let name = 'john';\n\nconsole.log(name.toUpperCase()); // Behind the scenes treated as console.log(new String(name).toUpperCase());\n</code></pre>\n<p> i.e, Every primitive except null and undefined have Wrapper Objects and the list of wrapper objects are String,Number,Boolean,Symbol and BigInt.</p>\n</li>\n<li>\n<h3>What is AJAX</h3>\n<p> AJAX stands for Asynchronous JavaScript and XML and it is a group of related technologies(HTML, CSS, JavaScript, XMLHttpRequest API etc) used to display data asynchronously. i.e. We can send data to the server and get data from the server without reloading the web page.</p>\n</li>\n<li>\n<h3>What are the different ways to deal with Asynchronous Code</h3>\n<p> Below are the list of different ways to deal with Asynchronous code.</p>\n<ol>\n<li>Callbacks</li>\n<li>Promises</li>\n<li>Async/await</li>\n<li>Third-party libraries such as async.js,bluebird etc</li>\n</ol>\n</li>\n<li>\n<h3>How to cancel a fetch request</h3>\n<p> Until a few days back, One shortcoming of native promises is no direct way to cancel a fetch request. But the new <code>AbortController</code> from js specification allows you to use a signal to abort one or multiple fetch calls.\nThe basic flow of cancelling a fetch request would be as below,</p>\n<ol>\n<li>Create an <code>AbortController</code> instance</li>\n<li>Get the signal property of an instance and pass the signal as a fetch option for signal</li>\n<li>Call the AbortController's abort property to cancel all fetches that use that signal\nFor example, let's pass the same signal to multiple fetch calls will cancel all requests with that signal,</li>\n</ol>\n<pre><code class=\"language-javascript\">const controller = new AbortController();\nconst { signal } = controller;\n\nfetch('http://localhost:8000', { signal })\n    .then((response) => {\n        console.log(`Request 1 is complete!`);\n    })\n    .catch((e) => {\n        if (e.name === 'AbortError') {\n            // We know it's been canceled!\n        }\n    });\n\nfetch('http://localhost:8000', { signal })\n    .then((response) => {\n        console.log(`Request 2 is complete!`);\n    })\n    .catch((e) => {\n        if (e.name === 'AbortError') {\n            // We know it's been canceled!\n        }\n    });\n\n// Wait 2 seconds to abort both requests\nsetTimeout(() => controller.abort(), 2000);\n</code></pre>\n</li>\n<li>\n<h3>What is web speech API</h3>\n<p> Web speech API is used to enable modern browsers recognize and synthesize speech(i.e, voice data into web apps). This API has been introduced by W3C Community in the year 2012. It has two main parts,</p>\n<ol>\n<li><strong>SpeechRecognition (Asynchronous Speech Recognition or Speech-to-Text):</strong> It provides the ability to recognize voice context from an audio input and respond accordingly. This is accessed by the <code>SpeechRecognition</code> interface.\nThe below example shows on how to use this API to get text from speech,</li>\n</ol>\n<pre><code class=\"language-javascript\">window.SpeechRecognition = window.webkitSpeechRecognition || window.SpeechRecognition; // webkitSpeechRecognition for Chrome and SpeechRecognition for FF\nconst recognition = new window.SpeechRecognition();\nrecognition.onresult = (event) => {\n    // SpeechRecognitionEvent type\n    const speechToText = event.results[0][0].transcript;\n    console.log(speechToText);\n};\nrecognition.start();\n</code></pre>\n<p> In this API, browser is going to ask you for permission to use your microphone</p>\n<ol>\n<li><strong>SpeechSynthesis (Text-to-Speech):</strong> It provides the ability to recognize voice context from an audio input and respond. This is accessed by the <code>SpeechSynthesis</code> interface.\nFor example, the below code is used to get voice/speech from text,</li>\n</ol>\n<pre><code class=\"language-javascript\">if ('speechSynthesis' in window) {\n    var speech = new SpeechSynthesisUtterance('Hello World!');\n    speech.lang = 'en-US';\n    window.speechSynthesis.speak(speech);\n}\n</code></pre>\n<p> The above examples can be tested on chrome(33+) browser's developer console.\n<strong>Note:</strong> This API is still a working draft and only available in Chrome and Firefox browsers(ofcourse Chrome only implemented the specification)</p>\n</li>\n<li>\n<h3>What is minimum timeout throttling</h3>\n<p> Both browser and NodeJS javascript environments throttles with a minimum delay that is greater than 0ms. That means even though setting a delay of 0ms will not happen instantaneously.\n<strong>Browsers:</strong> They have a minimum delay of 4ms. This throttle occurs when successive calls are triggered due to callback nesting(certain depth) or after a certain number of successive intervals.\nNote: The older browsers have a minimum delay of 10ms.\n<strong>Nodejs:</strong> They have a minimum delay of 1ms. This throttle happens when the delay is larger than 2147483647 or less than 1.\nThe best example to explain this timeout throttling behavior is the order of below code snippet.</p>\n<pre><code class=\"language-javascript\">function runMeFirst() {\n    console.log('My script is initialized');\n}\nsetTimeout(runMeFirst, 0);\nconsole.log('Script loaded');\n</code></pre>\n<p> and the output would be in</p>\n<pre><code class=\"language-cmd\">Script loaded\nMy script is initialized\n</code></pre>\n<p> If you don't use <code>setTimeout</code>, the order of logs will be sequential.</p>\n<pre><code class=\"language-javascript\">function runMeFirst() {\n    console.log('My script is initialized');\n}\nrunMeFirst();\nconsole.log('Script loaded');\n</code></pre>\n<p> and the output is,</p>\n<pre><code class=\"language-cmd\">My script is initialized\nScript loaded\n</code></pre>\n</li>\n<li>\n<h3>How do you implement zero timeout in modern browsers</h3>\n<p> You can't use setTimeout(fn, 0) to execute the code immediately due to minimum delay of greater than 0ms. But you can use window.postMessage() to achieve this behavior.</p>\n</li>\n<li>\n<h3>What are tasks in event loop</h3>\n<p> A task is any javascript code/program which is scheduled to be run by the standard mechanisms such as initially starting to run a program, run an event callback, or an interval or timeout being fired. All these tasks are scheduled on a task queue.\nBelow are the list of use cases to add tasks to the task queue,</p>\n<ol>\n<li>When a new javascript program is executed directly from console or running by the <code>&#x3C;script></code> element, the task will be added to the task queue.</li>\n<li>When an event fires, the event callback added to task queue</li>\n<li>When a setTimeout or setInterval is reached, the corresponding callback added to task queue</li>\n</ol>\n</li>\n<li>\n<h3>What is microtask</h3>\n<p> Microtask is the javascript code which needs to be executed immediately after the currently executing task/microtask is completed. They are kind of blocking in nature. i.e, The main thread will be blocked until the microtask queue is empty.\nThe main sources of microtasks are Promise.resolve, Promise.reject, MutationObservers, IntersectionObservers etc</p>\n<p> <strong>Note:</strong> All of these microtasks are processed in the same turn of the event loop.</p>\n</li>\n<li>\n<h3>What are different event loops</h3>\n</li>\n<li>\n<h3>What is the purpose of queueMicrotask</h3>\n</li>\n<li>\n<h3>How do you use javascript libraries in typescript file</h3>\n<p> It is known that not all JavaScript libraries or frameworks have TypeScript declaration files. But if you still want to use libraries or frameworks in our TypeScript files without getting compilation errors, the only solution is <code>declare</code> keyword along with a variable declaration. For example, let's imagine you have a library called <code>customLibrary</code> that doesn't have a TypeScript declaration and have a namespace called <code>customLibrary</code> in the global namespace. You can use this library in typescript code as below,</p>\n<pre><code class=\"language-javascript\">declare var customLibrary;\n</code></pre>\n<p> In the runtime, typescript will provide the type to the <code>customLibrary</code> variable as <code>any</code> type. The another alternative without using declare keyword is below</p>\n<pre><code class=\"language-javascript\">var customLibrary: any;\n</code></pre>\n</li>\n<li>\n<h3>What are the differences between promises and observables</h3>\n<p> Some of the major difference in a tabular form</p>\n<table>\n<thead>\n<tr>\n<th>Promises</th>\n<th>Observables</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Emits only a single value at a time</td>\n<td>Emits multiple values over a period of time(stream of values ranging from 0 to multiple)</td>\n</tr>\n<tr>\n<td>Eager in nature; they are going to be called immediately</td>\n<td>Lazy in nature; they require subscription to be invoked</td>\n</tr>\n<tr>\n<td>Promise is always asynchronous even though it resolved immediately</td>\n<td>Observable can be either synchronous or asynchronous</td>\n</tr>\n<tr>\n<td>Doesn't provide any operators</td>\n<td>Provides operators such as map, forEach, filter, reduce, retry, and retryWhen etc</td>\n</tr>\n<tr>\n<td>Cannot be canceled</td>\n<td>Canceled by using unsubscribe() method</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li>\n<h3>What is heap</h3>\n<p> Heap(Or memory heap) is the memory location where objects are stored when we define variables. i.e, This is the place where all the memory allocations and de-allocation take place. Both heap and call-stack are two containers of JS runtime.\nWhenever runtime comes across variables and function declarations in the code it stores them in the Heap.</p>\n<p> <img src=\"images/heap.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>What is an event table</h3>\n<p> Event Table is a data structure that stores and keeps track of all the events which will be executed asynchronously like after some time interval or after the resolution of some API requests. i.e Whenever you call a setTimeout function or invoke async operation, it is added to the Event Table.\nIt doesn't not execute functions on it's own. The main purpose of the event table is to keep track of events and send them to the Event Queue as shown in the below diagram.</p>\n<p> <img src=\"images/event-table.png\" alt=\"Screenshot\"></p>\n</li>\n<li>\n<h3>What is a microTask queue</h3>\n<p> Microtask Queue is the new queue where all the tasks initiated by promise objects get processed before the callback queue.\nThe microtasks queue are processed before the next rendering and painting jobs. But if these microtasks are running for a long time then it leads to visual degradation.</p>\n</li>\n<li>\n<h3>What is the difference between shim and polyfill</h3>\n<p> A shim is a library that brings a new API to an older environment, using only the means of that environment. It isn't necessarily restricted to a web application. For example, es5-shim.js is used to emulate ES5 features on older browsers (mainly pre IE9).\nWhereas polyfill is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively.\nIn a simple sentence, A polyfill is a shim for a browser API.</p>\n</li>\n<li>\n<h3>How do you detect primitive or non primitive value type</h3>\n<p> In JavaScript, primitive types include boolean, string, number, BigInt, null, Symbol and undefined. Whereas non-primitive types include the Objects. But you can easily identify them with the below function,</p>\n<pre><code class=\"language-javascript\">var myPrimitive = 30;\nvar myNonPrimitive = {};\nfunction isPrimitive(val) {\n    return Object(val) !== val;\n}\n\nisPrimitive(myPrimitive);\nisPrimitive(myNonPrimitive);\n</code></pre>\n<p> If the value is a primitive data type, the Object constructor creates a new wrapper object for the value. But If the value is a non-primitive data type (an object), the Object constructor will give the same object.</p>\n</li>\n<li>\n<h3>What is babel</h3>\n<p> Babel is a JavaScript transpiler to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. Some of the main features are listed below,</p>\n<ol>\n<li>Transform syntax</li>\n<li>Polyfill features that are missing in your target environment (using @babel/polyfill)</li>\n<li>Source code transformations (or codemods)</li>\n</ol>\n</li>\n<li>\n<h3>Is Node.js completely single threaded</h3>\n<p> Node is a single thread, but some of the functions included in the Node.js standard library(e.g, fs module functions) are not single threaded. i.e, Their logic runs outside of the Node.js single thread to improve the speed and performance of a program.</p>\n</li>\n<li>\n<h3>What are the common use cases of observables</h3>\n<p> Some of the most common use cases of observables are web sockets with push notifications, user input changes, repeating intervals, etc</p>\n</li>\n<li>\n<h3>What is RxJS</h3>\n<p> RxJS (Reactive Extensions for JavaScript) is a library for implementing reactive programming using observables that makes it easier to compose asynchronous or callback-based code. It also provides utility functions for creating and working with observables.</p>\n</li>\n<li>\n<h3>What is the difference between Function constructor and function declaration</h3>\n<p> The functions which are created with <code>Function constructor</code> do not create closures to their creation contexts but they are always created in the global scope. i.e, the function can access its own local variables and global scope variables only. Whereas function declarations can access outer function variables(closures) too.</p>\n<p> Let's see this difference with an example,</p>\n<p> <strong>Function Constructor:</strong></p>\n<pre><code class=\"language-javascript\">var a = 100;\nfunction createFunction() {\n    var a = 200;\n    return new Function('return a;');\n}\nconsole.log(createFunction()()); // 100\n</code></pre>\n<p> <strong>Function declaration:</strong></p>\n<pre><code class=\"language-javascript\">var a = 100;\nfunction createFunction() {\n    var a = 200;\n    return function func() {\n        return a;\n    };\n}\nconsole.log(createFunction()()); // 200\n</code></pre>\n</li>\n<li>\n<h3>What is a Short circuit condition</h3>\n<p> Short circuit conditions are meant for condensed way of writing simple if statements. Let's demonstrate the scenario using an example. If you would like to login to a portal with an authentication condition, the expression would be as below,</p>\n<pre><code class=\"language-javascript\">if (authenticate) {\n    loginToPorta();\n}\n</code></pre>\n<p> Since the javascript logical operators evaluated from left to right, the above expression can be simplified using &#x26;&#x26; logical operator</p>\n<pre><code class=\"language-javascript\">authenticate &#x26;&#x26; loginToPorta();\n</code></pre>\n</li>\n<li>\n<h3>What is the easiest way to resize an array</h3>\n<p> The length property of an array is useful to resize or empty an array quickly. Let's apply length property on number array to resize the number of elements from 5 to 2,</p>\n<pre><code class=\"language-javascript\">var array = [1, 2, 3, 4, 5];\nconsole.log(array.length); // 5\n\narray.length = 2;\nconsole.log(array.length); // 2\nconsole.log(array); // [1,2]\n</code></pre>\n<p> and the array can be emptied too</p>\n<pre><code class=\"language-javascript\">var array = [1, 2, 3, 4, 5];\narray.length = 0;\nconsole.log(array.length); // 0\nconsole.log(array); // []\n</code></pre>\n</li>\n<li>\n<h3>What is an observable</h3>\n<p> An Observable is basically a function that can return a stream of values either synchronously or asynchronously to an observer over time. The consumer can get the value by calling <code>subscribe()</code> method.\nLet's look at a simple example of an Observable</p>\n<pre><code class=\"language-javascript\">import { Observable } from 'rxjs';\n\nconst observable = new Observable((observer) => {\n    setTimeout(() => {\n        observer.next('Message from a Observable!');\n    }, 3000);\n});\n\nobservable.subscribe((value) => console.log(value));\n</code></pre>\n<p> <img src=\"images/observables.png\" alt=\"Screenshot\"></p>\n<p> <strong>Note:</strong> Observables are not part of the JavaScript language yet but they are being proposed to be added to the language</p>\n</li>\n<li>\n<h3>What is the difference between function and class declarations</h3>\n<p> The main difference between function declarations and class declarations is <code>hoisting</code>. The function declarations are hoisted but not class declarations.</p>\n<p> <strong>Classes:</strong></p>\n<pre><code class=\"language-javascript\">const user = new User(); // ReferenceError\n\nclass User {}\n</code></pre>\n<p> <strong>Constructor Function:</strong></p>\n<pre><code class=\"language-javascript\">const user = new User(); // No error\n\nfunction User() {}\n</code></pre>\n</li>\n<li>\n<h3>What is an async function</h3>\n<p> An async function is a function declared with the <code>async</code> keyword which enables asynchronous, promise-based behavior to be written in a cleaner style by avoiding promise chains. These functions can contain zero or more <code>await</code> expressions.</p>\n<p> Let's take a below async function example,</p>\n<pre><code class=\"language-javascript\">async function logger() {\n    let data = await fetch('http://someapi.com/users'); // pause until fetch returns\n    console.log(data);\n}\nlogger();\n</code></pre>\n<p> It is basically syntax sugar over ES2015 promises and generators.</p>\n</li>\n<li>\n<h3>How do you prevent promises swallowing errors</h3>\n<p> While using asynchronous code, JavaScript's ES6 promises can make your life a lot easier without having callback pyramids and error handling on every second line. But Promises have some pitfalls and the biggest one is swallowing errors by default.</p>\n<p> Let's say you expect to print an error to the console for all the below cases,</p>\n<pre><code class=\"language-javascript\">Promise.resolve('promised value').then(function () {\n    throw new Error('error');\n});\n\nPromise.reject('error value').catch(function () {\n    throw new Error('error');\n});\n\nnew Promise(function (resolve, reject) {\n    throw new Error('error');\n});\n</code></pre>\n<p> But there are many modern JavaScript environments that won't print any errors. You can fix this problem in different ways,</p>\n<ol>\n<li>\n<p><strong>Add catch block at the end of each chain:</strong> You can add catch block to the end of each of your promise chains</p>\n<pre><code class=\"language-javascript\">Promise.resolve('promised value')\n    .then(function () {\n        throw new Error('error');\n    })\n    .catch(function (error) {\n        console.error(error.stack);\n    });\n</code></pre>\n<p> But it is quite difficult to type for each promise chain and verbose too.</p>\n</li>\n<li>\n<p><strong>Add done method:</strong> You can replace first solution's then and catch blocks with done method</p>\n<pre><code class=\"language-javascript\">Promise.resolve('promised value').done(function () {\n    throw new Error('error');\n});\n</code></pre>\n<p> Let's say you want to fetch data using HTTP and later perform processing on the resulting data asynchronously. You can write <code>done</code> block as below,</p>\n<pre><code class=\"language-javascript\">getDataFromHttp()\n    .then(function (result) {\n        return processDataAsync(result);\n    })\n    .done(function (processed) {\n        displayData(processed);\n    });\n</code></pre>\n<p> In future, if the processing library API changed to synchronous then you can remove <code>done</code> block as below,</p>\n<pre><code class=\"language-javascript\">getDataFromHttp().then(function (result) {\n    return displayData(processDataAsync(result));\n});\n</code></pre>\n<p> and then you forgot to add <code>done</code> block to <code>then</code> block leads to silent errors.</p>\n</li>\n<li>\n<p><strong>Extend ES6 Promises by Bluebird:</strong>\nBluebird extends the ES6 Promises API to avoid the issue in the second solution. This library has a \"default\" onRejection handler which will print all errors from rejected Promises to stderr. After installation, you can process unhandled rejections</p>\n<pre><code class=\"language-javascript\">Promise.onPossiblyUnhandledRejection(function (error) {\n    throw error;\n});\n</code></pre>\n<p> and discard a rejection, just handle it with an empty catch</p>\n<pre><code class=\"language-javascript\">Promise.reject('error value').catch(function () {});\n</code></pre>\n</li>\n</ol>\n</li>\n<li>\n<h3>What is deno</h3>\n<p> Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 JavaScript engine and the Rust programming language.</p>\n</li>\n<li>\n<h3>How do you make an object iterable in javascript</h3>\n<p> By default, plain objects are not iterable. But you can make the object iterable by defining a <code>Symbol.iterator</code> property on it.</p>\n<p> Let's demonstrate this with an example,</p>\n<pre><code class=\"language-javascript\">const collection = {\n    one: 1,\n    two: 2,\n    three: 3,\n    [Symbol.iterator]() {\n        const values = Object.keys(this);\n        let i = 0;\n        return {\n            next: () => {\n                return {\n                    value: this[values[i++]],\n                    done: i > values.length\n                };\n            }\n        };\n    }\n};\n\nconst iterator = collection[Symbol.iterator]();\n\nconsole.log(iterator.next()); // → {value: 1, done: false}\nconsole.log(iterator.next()); // → {value: 2, done: false}\nconsole.log(iterator.next()); // → {value: 3, done: false}\nconsole.log(iterator.next()); // → {value: undefined, done: true}\n</code></pre>\n<p> The above process can be simplified using a generator function,</p>\n<pre><code class=\"language-javascript\">const collection = {\n    one: 1,\n    two: 2,\n    three: 3,\n    [Symbol.iterator]: function* () {\n        for (let key in this) {\n            yield this[key];\n        }\n    }\n};\nconst iterator = collection[Symbol.iterator]();\nconsole.log(iterator.next()); // {value: 1, done: false}\nconsole.log(iterator.next()); // {value: 2, done: false}\nconsole.log(iterator.next()); // {value: 3, done: false}\nconsole.log(iterator.next()); // {value: undefined, done: true}\n</code></pre>\n</li>\n<li>\n<h3>What is a Proper Tail Call</h3>\n<p> First, we should know about tail call before talking about \"Proper Tail Call\". A tail call is a subroutine or function call performed as the final action of a calling function. Whereas <strong>Proper tail call(PTC)</strong> is a technique where the program or code will not create additional stack frames for a recursion when the function call is a tail call.</p>\n<p> For example, the below classic or head recursion of factorial function relies on stack for each step. Each step need to be processed upto <code>n * factorial(n - 1)</code></p>\n<pre><code class=\"language-javascript\">function factorial(n) {\n    if (n === 0) {\n        return 1;\n    }\n    return n * factorial(n - 1);\n}\nconsole.log(factorial(5)); //120\n</code></pre>\n<p> But if you use Tail recursion functions, they keep passing all the necessary data it needs down the recursion without relying on the stack.</p>\n<pre><code class=\"language-javascript\">function factorial(n, acc = 1) {\n    if (n === 0) {\n        return acc;\n    }\n    return factorial(n - 1, n * acc);\n}\nconsole.log(factorial(5)); //120\n</code></pre>\n<p> The above pattern returns the same output as the first one. But the accumulator keeps track of total as an argument without using stack memory on recursive calls.</p>\n</li>\n<li>\n<h3>How do you check an object is a promise or not</h3>\n<p> If you don't know if a value is a promise or not, wrapping the value as <code>Promise.resolve(value)</code> which returns a promise</p>\n<pre><code class=\"language-javascript\">function isPromise(object) {\n    if (Promise &#x26;&#x26; Promise.resolve) {\n        return Promise.resolve(object) == object;\n    } else {\n        throw 'Promise not supported in your environment';\n    }\n}\n\nvar i = 1;\nvar promise = new Promise(function (resolve, reject) {\n    resolve();\n});\n\nconsole.log(isPromise(i)); // false\nconsole.log(isPromise(p)); // true\n</code></pre>\n<p> Another way is to check for <code>.then()</code> handler type</p>\n<pre><code class=\"language-javascript\">function isPromise(value) {\n    return Boolean(value &#x26;&#x26; typeof value.then === 'function');\n}\nvar i = 1;\nvar promise = new Promise(function (resolve, reject) {\n    resolve();\n});\n\nconsole.log(isPromise(i)); // false\nconsole.log(isPromise(promise)); // true\n</code></pre>\n</li>\n<li>\n<h3>How to detect if a function is called as constructor</h3>\n<p> You can use <code>new.target</code> pseudo-property to detect whether a function was called as a constructor(using the new operator) or as a regular function call.</p>\n<ol>\n<li>If a constructor or function invoked using the new operator, new.target returns a reference to the constructor or function.</li>\n<li>For function calls, new.target is undefined.</li>\n</ol>\n<pre><code class=\"language-javascript\">function Myfunc() {\n   if (new.target) {\n      console.log('called with new');\n   } else {\n      console.log('not called with new');\n   }\n}\n\nnew Myfunc(); // called with new\nMyfunc(); // not called with new\nMyfunc.call({}); not called with new\n</code></pre>\n</li>\n<li>\n<h3>What are the differences between arguments object and rest parameter</h3>\n<p> There are three main differences between arguments object and rest parameters</p>\n<ol>\n<li>The arguments object is an array-like but not an array. Whereas the rest parameters are array instances.</li>\n<li>The arguments object does not support methods such as sort, map, forEach, or pop. Whereas these methods can be used in rest parameters.</li>\n<li>The rest parameters are only the ones that haven't been given a separate name, while the arguments object contains all arguments passed to the function</li>\n</ol>\n</li>\n<li>\n<h3>What are the differences between spread operator and rest parameter</h3>\n<p> Rest parameter collects all remaining elements into an array. Whereas Spread operator allows iterables( arrays / objects / strings ) to be expanded into single arguments/elements. i.e, Rest parameter is opposite to the spread operator.</p>\n</li>\n<li>\n<h3>What are the different kinds of generators</h3>\n<p> There are five kinds of generators,</p>\n<ol>\n<li>\n<p><strong>Generator function declaration:</strong></p>\n<pre><code class=\"language-javascript\">function* myGenFunc() {\n    yield 1;\n    yield 2;\n    yield 3;\n}\nconst genObj = myGenFunc();\n</code></pre>\n</li>\n<li>\n<p><strong>Generator function expressions:</strong></p>\n<pre><code class=\"language-javascript\">const myGenFunc = function* () {\n    yield 1;\n    yield 2;\n    yield 3;\n};\nconst genObj = myGenFunc();\n</code></pre>\n</li>\n<li>\n<p><strong>Generator method definitions in object literals:</strong></p>\n<pre><code class=\"language-javascript\">const myObj = {\n    *myGeneratorMethod() {\n        yield 1;\n        yield 2;\n        yield 3;\n    }\n};\nconst genObj = myObj.myGeneratorMethod();\n</code></pre>\n</li>\n<li>\n<p><strong>Generator method definitions in class:</strong></p>\n<pre><code class=\"language-javascript\">class MyClass {\n    *myGeneratorMethod() {\n        yield 1;\n        yield 2;\n        yield 3;\n    }\n}\nconst myObject = new MyClass();\nconst genObj = myObject.myGeneratorMethod();\n</code></pre>\n</li>\n<li>\n<p><strong>Generator as a computed property:</strong></p>\n<pre><code class=\"language-javascript\">const SomeObj = {\n    *[Symbol.iterator]() {\n        yield 1;\n        yield 2;\n        yield 3;\n    }\n};\n\nconsole.log(Array.from(SomeObj)); // [ 1, 2, 3 ]\n</code></pre>\n</li>\n</ol>\n</li>\n<li>\n<h3>What are the built-in iterables</h3>\n<p> Below are the list of built-in iterables in javascript,</p>\n<ol>\n<li>Arrays and TypedArrays</li>\n<li>Strings: Iterate over each character or Unicode code-points</li>\n<li>Maps: iterate over its key-value pairs</li>\n<li>Sets: iterates over their elements</li>\n<li>arguments: An array-like special variable in functions</li>\n<li>DOM collection such as NodeList</li>\n</ol>\n</li>\n<li>\n<h3>What are the differences between for...of and for...in statements</h3>\n<p> Both for...in and for...of statements iterate over js data structures. The only difference is over what they iterate:</p>\n<ol>\n<li>for..in iterates over all enumerable property keys of an object</li>\n<li>for..of iterates over the values of an iterable object.</li>\n</ol>\n<p> Let's explain this difference with an example,</p>\n<pre><code class=\"language-javascript\">let arr = ['a', 'b', 'c'];\n\narr.newProp = 'newVlue';\n\n// key are the property keys\nfor (let key in arr) {\n    console.log(key);\n}\n\n// value are the property values\nfor (let value of arr) {\n    console.log(value);\n}\n</code></pre>\n<p> Since for..in loop iterates over the keys of the object, the first loop logs 0, 1, 2 and newProp while iterating over the array object. The for..of loop iterates over the values of a arr data structure and logs a, b, c in the console.</p>\n</li>\n<li>\n<h3>How do you define instance and non-instance properties</h3>\n<p> The Instance properties must be defined inside of class methods. For example, name and age properties defined insider constructor as below,</p>\n<pre><code class=\"language-javascript\">class Person {\n    constructor(name, age) {\n        this.name = name;\n        this.age = age;\n    }\n}\n</code></pre>\n<p> But Static(class) and prototype data properties must be defined outside of the ClassBody declaration. Let's assign the age value for Person class as below,</p>\n<pre><code class=\"language-javascript\">Person.staticAge = 30;\nPerson.prototype.prototypeAge = 40;\n</code></pre>\n</li>\n<li>\n<h3>What is the difference between isNaN and Number.isNaN?</h3>\n<ol>\n<li><strong>isNaN</strong>: The global function <code>isNaN</code> converts the argument to a Number and returns true if the resulting value is NaN.</li>\n<li><strong>Number.isNaN</strong>: This method does not convert the argument. But it returns true when the type is a Number and value is NaN.</li>\n</ol>\n<p> Let's see the difference with an example,</p>\n<pre><code class=\"language-javascript\">isNaN('hello');   // true\nNumber.isNaN('hello'); // false\n</code></pre>\n</li>\n<li>\n<h3>How to invoke an IIFE without any extra brackets?</h3>\n<p> Immediately Invoked Function Expressions(IIFE) requires a pair of parenthesis to wrap the function which contains set of statements.</p>\n<pre><code class=\"language-js\">(function (dt) {\n    console.log(dt.toLocaleTimeString());\n})(new Date());\n</code></pre>\n<p> Since both IIFE and void operator discard the result of an expression, you can avoid the extra brackets using <code>void operator</code> for IIFE as below,</p>\n<pre><code class=\"language-js\">void (function (dt) {\n    console.log(dt.toLocaleTimeString());\n})(new Date());\n</code></pre>\n</li>\n<li>\n<h3>Is that possible to use expressions in switch cases?</h3>\n<p> You might have seen expressions used in switch condition but it is also possible to use for switch cases by assigning true value for the switch condition. Let's see the weather condition based on temparature as an example,</p>\n<pre><code class=\"language-js\">const weather = (function getWeather(temp) {\n    switch (true) {\n        case temp &#x3C; 0:\n            return 'freezing';\n        case temp &#x3C; 10:\n            return 'cold';\n        case temp &#x3C; 24:\n            return 'cool';\n        default:\n            return 'unknown';\n    }\n})(10);\n</code></pre>\n</li>\n<li>\n<h3>What is the easiest way to ignore promise errors?</h3>\n<p> The easiest and safest way to ignore promise errors is void that error. This approach is ESLint friendly too.</p>\n<pre><code class=\"language-js\">await promise.catch((e) => void e);\n</code></pre>\n</li>\n<li>\n<h3>How do style the console output using CSS?</h3>\n<p> You can add CSS styling to the console output using the CSS format content specifier %c. The console string message can be appended after the specifier and CSS style in another argument. Let's print the red the color text using console.log and CSS specifier as below,</p>\n<pre><code class=\"language-js\">console.log('%cThis is a red text', 'color:red');\n</code></pre>\n<p> It is also possible to add more styles for the content. For example, the font-size can be modified for the above text</p>\n<pre><code class=\"language-js\">console.log('%cThis is a red text with bigger font', 'color:red; font-size:20px');\n</code></pre>\n</li>\n<li>\n<h3>What is nullish coalescing operator (??)?</h3>\n<p> It is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand. This can be contrasted with the logical OR (||) operator, which returns the right-hand side operand if the left operand is any falsy value, not only null or undefined.</p>\n<pre><code class=\"language-js\">console.log(null ?? true); // true\nconsole.log(false ?? true); // false\nconsole.log(undefined ?? true); // true\n</code></pre>\n</li>\n</ol>\n<h3>Coding Exercise</h3>\n<h4>1. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">var car = new Vehicle('Honda', 'white', '2010', 'UK');\nconsole.log(car);\n\nfunction Vehicle(model, color, year, country) {\n    this.model = model;\n    this.color = color;\n    this.year = year;\n    this.country = country;\n}\n</code></pre>\n<ul>\n<li>1: Undefined</li>\n<li>2: ReferenceError</li>\n<li>3: null</li>\n<li>4: {model: \"Honda\", color: \"white\", year: \"2010\", country: \"UK\"}</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The function declarations are hoisted similar to any variables. So the placement for <code>Vehicle</code> function declaration doesn't make any difference.</p>\n</p>\n</details>\n<hr>\n<h4>2. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function foo() {\n    let x = (y = 0);\n    x++;\n    y++;\n    return x;\n}\n\nconsole.log(foo(), typeof x, typeof y);\n</code></pre>\n<ul>\n<li>1: 1, undefined and undefined</li>\n<li>2: ReferenceError: X is not defined</li>\n<li>3: 1, undefined and number</li>\n<li>4: 1, number and number</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>Of course the return value of <code>foo()</code> is 1 due to the increment operator. But the statement <code>let x = y = 0</code> declares a local variable x. Whereas y declared as a global variable accidentally. This statement is equivalent to,</p>\n<pre><code class=\"language-javascript\">let x;\nwindow.y = 0;\nx = window.y;\n</code></pre>\n<p>Since the block scoped variable x is undefined outside of the function, the type will be undefined too. Whereas the global variable <code>y</code> is available outside the function, the value is 0 and type is number.</p>\n</p>\n</details>\n<hr>\n<h4>3. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function main() {\n    console.log('A');\n    setTimeout(function print() {\n        console.log('B');\n    }, 0);\n    console.log('C');\n}\nmain();\n</code></pre>\n<ul>\n<li>1: A, B and C</li>\n<li>2: B, A and C</li>\n<li>3: A and C</li>\n<li>4: A, C and B</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The statements order is based on the event loop mechanism. The order of statements follows the below order,</p>\n<ol>\n<li>At first, the main function is pushed to the stack.</li>\n<li>Then the browser pushes the fist statement of the main function( i.e, A's console.log) to the stack, executing and popping out immediately.</li>\n<li>But <code>setTimeout</code> statement moved to Browser API to apply the delay for callback.</li>\n<li>In the meantime, C's console.log added to stack, executed and popped out.</li>\n<li>The callback of <code>setTimeout</code> moved from Browser API to message queue.</li>\n<li>The <code>main</code> function popped out from stack because there are no statements to execute</li>\n<li>The callback moved from message queue to the stack since the stack is empty.</li>\n<li>The console.log for B is added to the stack and display on the console.</li>\n</ol>\n</p>\n</details>\n<hr>\n<h4>4. What is the output of below equality check</h4>\n<pre><code class=\"language-javascript\">console.log(0.1 + 0.2 === 0.3);\n</code></pre>\n<ul>\n<li>1: false</li>\n<li>2: true</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>This is due to the float point math problem. Since the floating point numbers are encoded in binary format, the addition operations on them lead to rounding errors. Hence, the comparison of floating points doesn't give expected results.\nYou can find more details about the explanation here <a href=\"https://0.30000000000000004.com/\">0.30000000000000004.com/</a></p>\n</p>\n</details>\n<hr>\n<h4>5. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">var y = 1;\nif (function f() {}) {\n    y += typeof f;\n}\nconsole.log(y);\n</code></pre>\n<ul>\n<li>1: 1function</li>\n<li>2: 1object</li>\n<li>3: ReferenceError</li>\n<li>4: 1undefined</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The main points in the above code snippets are,</p>\n<ol>\n<li>You can see function expression instead function declaration inside if statement. So it always returns true.</li>\n<li>Since it is not declared(or assigned) anywhere, f is undefined and typeof f is undefined too.</li>\n</ol>\n<p>In other words, it is same as</p>\n<pre><code class=\"language-javascript\">var y = 1;\nif ('foo') {\n    y += typeof f;\n}\nconsole.log(y);\n</code></pre>\n<p><strong>Note:</strong> It returns 1object for MS Edge browser</p>\n</p>\n</details>\n<hr>\n<h4>6. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function foo() {\n    return;\n    {\n        message: 'Hello World';\n    }\n}\nconsole.log(foo());\n</code></pre>\n<ul>\n<li>1: Hello World</li>\n<li>2: Object {message: \"Hello World\"}</li>\n<li>3: Undefined</li>\n<li>4: SyntaxError</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>This is a semicolon issue. Normally semicolons are optional in JavaScript. So if there are any statements(in this case, return) missing semicolon, it is automatically inserted immediately. Hence, the function returned as undefined.</p>\n<p>Whereas if the opening curly brace is along with the return keyword then the function is going to be returned as expected.</p>\n<pre><code class=\"language-javascript\">function foo() {\n    return {\n        message: 'Hello World'\n    };\n}\nconsole.log(foo()); // {message: \"Hello World\"}\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>7. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">var myChars = ['a', 'b', 'c', 'd'];\ndelete myChars[0];\nconsole.log(myChars);\nconsole.log(myChars[0]);\nconsole.log(myChars.length);\n</code></pre>\n<ul>\n<li>1: [empty, 'b', 'c', 'd'], empty, 3</li>\n<li>2: [null, 'b', 'c', 'd'], empty, 3</li>\n<li>3: [empty, 'b', 'c', 'd'], undefined, 4</li>\n<li>4: [null, 'b', 'c', 'd'], undefined, 4</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>The <code>delete</code> operator will delete the object property but it will not reindex the array or change its length. So the number or elements or length of the array won't be changed.\nIf you try to print myChars then you can observe that it doesn't set an undefined value, rather the property is removed from the array. The newer versions of Chrome use <code>empty</code> instead of <code>undefined</code> to make the difference a bit clearer.</p>\n</p>\n</details>\n<hr>\n<h4>8. What is the output of below code in latest Chrome</h4>\n<pre><code class=\"language-javascript\">var array1 = new Array(3);\nconsole.log(array1);\n\nvar array2 = [];\narray2[2] = 100;\nconsole.log(array2);\n\nvar array3 = [, , ,];\nconsole.log(array3);\n</code></pre>\n<ul>\n<li>1: [undefined × 3], [undefined × 2, 100], [undefined × 3]</li>\n<li>2: [empty × 3], [empty × 2, 100], [empty × 3]</li>\n<li>3: [null × 3], [null × 2, 100], [null × 3]</li>\n<li>4: [], [100], []</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>The latest chrome versions display <code>sparse array</code>(they are filled with holes) using this empty x n notation. Whereas the older versions have undefined x n notation.\n<strong>Note:</strong> The latest version of FF displays <code>n empty slots</code> notation.</p>\n</p>\n</details>\n<hr>\n<h4>9. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const obj = {\n    prop1: function () {\n        return 0;\n    },\n    prop2() {\n        return 1;\n    },\n    ['prop' + 3]() {\n        return 2;\n    }\n};\n\nconsole.log(obj.prop1());\nconsole.log(obj.prop2());\nconsole.log(obj.prop3());\n</code></pre>\n<ul>\n<li>1: 0, 1, 2</li>\n<li>2: 0, { return 1 }, 2</li>\n<li>3: 0, { return 1 }, { return 2 }</li>\n<li>4: 0, 1, undefined</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>ES6 provides method definitions and property shorthands for objects. So both prop2 and prop3 are treated as regular function values.</p>\n</p>\n</details>\n<hr>\n<h4>10. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(1 &#x3C; 2 &#x3C; 3);\nconsole.log(3 > 2 > 1);\n</code></pre>\n<ul>\n<li>1: true, true</li>\n<li>2: true, false</li>\n<li>3: SyntaxError, SyntaxError,</li>\n<li>4: false, false</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>The important point is that if the statement contains the same operators(e.g, &#x3C; or >) then it can be evaluated from left to right.\nThe first statement follows the below order,</p>\n<ol>\n<li>console.log(1 &#x3C; 2 &#x3C; 3);</li>\n<li>console.log(true &#x3C; 3);</li>\n<li>console.log(1 &#x3C; 3); // True converted as <code>1</code> during comparison</li>\n<li>True</li>\n</ol>\n<p>Whereas the second statement follows the below order,</p>\n<ol>\n<li>console.log(3 > 2 > 1);</li>\n<li>console.log(true > 1);</li>\n<li>console.log(1 > 1); // False converted as <code>0</code> during comparison</li>\n<li>False</li>\n</ol>\n</p>\n</details>\n<hr>\n<h4>11. What is the output of below code in non-strict mode</h4>\n<pre><code class=\"language-javascript\">function printNumbers(first, second, first) {\n    console.log(first, second, first);\n}\nprintNumbers(1, 2, 3);\n</code></pre>\n<ul>\n<li>1: 1, 2, 3</li>\n<li>2: 3, 2, 3</li>\n<li>3: SyntaxError: Duplicate parameter name not allowed in this context</li>\n<li>4: 1, 2, 1</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>In non-strict mode, the regular JavaScript functions allow duplicate named parameters. The above code snippet has duplicate parameters on 1st and 3rd parameters.\nThe value of the first parameter is mapped to the third argument which is passed to the function. Hence, the 3rd argument overrides the first parameter.</p>\n<p><strong>Note:</strong> In strict mode, duplicate parameters will throw a Syntax Error.</p>\n</p>\n</details>\n<hr>\n<h4>12. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const printNumbersArrow = (first, second, first) => {\n    console.log(first, second, first);\n};\nprintNumbersArrow(1, 2, 3);\n</code></pre>\n<ul>\n<li>1: 1, 2, 3</li>\n<li>2: 3, 2, 3</li>\n<li>3: SyntaxError: Duplicate parameter name not allowed in this context</li>\n<li>4: 1, 2, 1</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>Unlike regular functions, the arrow functions doesn't not allow duplicate parameters in either strict or non-strict mode. So you can see <code>SyntaxError</code> in the console.</p>\n</p>\n</details>\n<hr>\n<h4>13. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const arrowFunc = () => arguments.length;\nconsole.log(arrowFunc(1, 2, 3));\n</code></pre>\n<ul>\n<li>1: ReferenceError: arguments is not defined</li>\n<li>2: 3</li>\n<li>3: undefined</li>\n<li>4: null</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>Arrow functions do not have an <code>arguments, super, this, or new.target</code> bindings. So any reference to <code>arguments</code> variable tries to resolve to a binding in a lexically enclosing environment. In this case, the arguments variable is not defined outside of the arrow function. Hence, you will receive a reference error.</p>\n<p>Where as the normal function provides the number of arguments passed to the function</p>\n<pre><code class=\"language-javascript\">const func = function () {\n    return arguments.length;\n};\nconsole.log(func(1, 2, 3));\n</code></pre>\n<p>But If you still want to use an arrow function then rest operator on arguments provides the expected arguments</p>\n<pre><code class=\"language-javascript\">const arrowFunc = (...args) => args.length;\nconsole.log(arrowFunc(1, 2, 3));\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>14. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(String.prototype.trimLeft.name === 'trimLeft');\nconsole.log(String.prototype.trimLeft.name === 'trimStart');\n</code></pre>\n<ul>\n<li>1: True, False</li>\n<li>2: False, True</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>In order to be consistent with functions like <code>String.prototype.padStart</code>, the standard method name for trimming the whitespaces is considered as <code>trimStart</code>. Due to web web compatibility reasons, the old method name 'trimLeft' still acts as an alias for 'trimStart'. Hence, the prototype for 'trimLeft' is always 'trimStart'</p>\n</p>\n</details>\n<hr>\n<h4>15. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(Math.max());\n</code></pre>\n<ul>\n<li>1: undefined</li>\n<li>2: Infinity</li>\n<li>3: 0</li>\n<li>4: -Infinity</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>-Infinity is the initial comparant because almost every other value is bigger. So when no arguments are provided, -Infinity is going to be returned.\n<strong>Note:</strong> Zero number of arguments is a valid case.</p>\n</p>\n</details>\n<hr>\n<h4>16. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(10 == [10]);\nconsole.log(10 == [[[[[[[10]]]]]]]);\n</code></pre>\n<ul>\n<li>1: True, True</li>\n<li>2: True, False</li>\n<li>3: False, False</li>\n<li>4: False, True</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>As per the comparison algorithm in the ECMAScript specification(ECMA-262), the above expression converted into JS as below</p>\n<pre><code class=\"language-javascript\">10 === Number([10].valueOf().toString()); // 10\n</code></pre>\n<p>So it doesn't matter about number brackets([]) around the number, it is always converted to a number in the expression.</p>\n</p>\n</details>\n<hr>\n<h4>17. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(10 + '10');\nconsole.log(10 - '10');\n</code></pre>\n<ul>\n<li>1: 20, 0</li>\n<li>2: 1010, 0</li>\n<li>3: 1010, 10-10</li>\n<li>4: NaN, NaN</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>The concatenation operator(+) is applicable for both number and string types. So if any operand is string type then both operands concatenated as strings. Whereas subtract(-) operator tries to convert the operands as number type.</p>\n</p>\n</details>\n<hr>\n<h4>18. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log([0] == false);\nif ([0]) {\n    console.log(\"I'm True\");\n} else {\n    console.log(\"I'm False\");\n}\n</code></pre>\n<ul>\n<li>1: True, I'm True</li>\n<li>2: True, I'm False</li>\n<li>3: False, I'm True</li>\n<li>4: False, I'm False</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>In comparison operators, the expression <code>[0]</code> converted to Number([0].valueOf().toString()) which is resolved to false. Whereas <code>[0]</code> just becomes a truthy value without any conversion because there is no comparison operator.</p>\n</p>\n</details>\n<h4>19. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log([1, 2] + [3, 4]);\n</code></pre>\n<ul>\n<li>1: [1,2,3,4]</li>\n<li>2: [1,2][3,4]</li>\n<li>3: SyntaxError</li>\n<li>4: 1,23,4</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The + operator is not meant or defined for arrays. So it converts arrays into strings and concatenates them.</p>\n</p>\n</details>\n<hr>\n<h4>20. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const numbers = new Set([1, 1, 2, 3, 4]);\nconsole.log(numbers);\n\nconst browser = new Set('Firefox');\nconsole.log(browser);\n</code></pre>\n<ul>\n<li>1: {1, 2, 3, 4}, {\"F\", \"i\", \"r\", \"e\", \"f\", \"o\", \"x\"}</li>\n<li>2: {1, 2, 3, 4}, {\"F\", \"i\", \"r\", \"e\", \"o\", \"x\"}</li>\n<li>3: [1, 2, 3, 4], [\"F\", \"i\", \"r\", \"e\", \"o\", \"x\"]</li>\n<li>4: {1, 1, 2, 3, 4}, {\"F\", \"i\", \"r\", \"e\", \"f\", \"o\", \"x\"}</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>Since <code>Set</code> object is a collection of unique values, it won't allow duplicate values in the collection. At the same time, it is case sensitive data structure.</p>\n</p>\n</details>\n<hr>\n<h4>21. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(NaN === NaN);\n</code></pre>\n<ul>\n<li>1: True</li>\n<li>2: False</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>JavaScript follows IEEE 754 spec standards. As per this spec, NaNs are never equal for floating-point numbers.</p>\n</p>\n</details>\n<hr>\n<h4>22. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">let numbers = [1, 2, 3, 4, NaN];\nconsole.log(numbers.indexOf(NaN));\n</code></pre>\n<ul>\n<li>1: 4</li>\n<li>2: NaN</li>\n<li>3: SyntaxError</li>\n<li>4: -1</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The <code>indexOf</code> uses strict equality operator(===) internally and <code>NaN === NaN</code> evaluates to false. Since indexOf won't be able to find NaN inside an array, it returns -1 always.\nBut you can use <code>Array.prototype.findIndex</code> method to find out the index of NaN in an array or You can use <code>Array.prototype.includes</code> to check if NaN is present in an array or not.</p>\n<pre><code class=\"language-javascript\">let numbers = [1, 2, 3, 4, NaN];\nconsole.log(numbers.findIndex(Number.isNaN)); // 4\n\nconsole.log(numbers.includes(NaN)); // true\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>23. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">let [a, ...b,] = [1, 2, 3, 4, 5];\nconsole.log(a, b);\n</code></pre>\n<ul>\n<li>1: 1, [2, 3, 4, 5]</li>\n<li>2: 1, {2, 3, 4, 5}</li>\n<li>3: SyntaxError</li>\n<li>4: 1, [2, 3, 4]</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>When using rest parameters, trailing commas are not allowed and will throw a SyntaxError.\nIf you remove the trailing comma then it displays 1st answer</p>\n<pre><code class=\"language-javascript\">let [a, ...b] = [1, 2, 3, 4, 5];\nconsole.log(a, b); // 1, [2, 3, 4, 5]\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>25. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">async function func() {\n    return 10;\n}\nconsole.log(func());\n</code></pre>\n<ul>\n<li>1: Promise {&#x3C;fulfilled>: 10}</li>\n<li>2: 10</li>\n<li>3: SyntaxError</li>\n<li>4: Promise {&#x3C;rejected>: 10}</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>Async functions always return a promise. But even if the return value of an async function is not explicitly a promise, it will be implicitly wrapped in a promise. The above async function is equivalent to below expression,</p>\n<pre><code class=\"language-javascript\">function func() {\n    return Promise.resolve(10);\n}\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>26. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">async function func() {\n    await 10;\n}\nconsole.log(func());\n</code></pre>\n<ul>\n<li>1: Promise {&#x3C;fulfilled>: 10}</li>\n<li>2: 10</li>\n<li>3: SyntaxError</li>\n<li>4: Promise {&#x3C;resolved>: undefined}</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The await expression returns value 10 with promise resolution and the code after each await expression can be treated as existing in a <code>.then</code> callback. In this case, there is no return expression at the end of the function. Hence, the default return value of <code>undefined</code> is returned as the resolution of the promise. The above async function is equivalent to below expression,</p>\n<pre><code class=\"language-javascript\">function func() {\n    return Promise.resolve(10).then(() => undefined);\n}\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>27. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function delay() {\n    return new Promise((resolve) => setTimeout(resolve, 2000));\n}\n\nasync function delayedLog(item) {\n    await delay();\n    console.log(item);\n}\n\nasync function processArray(array) {\n    array.forEach((item) => {\n        await delayedLog(item);\n    });\n}\n\nprocessArray([1, 2, 3, 4]);\n</code></pre>\n<ul>\n<li>1: SyntaxError</li>\n<li>2: 1, 2, 3, 4</li>\n<li>3: 4, 4, 4, 4</li>\n<li>4: 4, 3, 2, 1</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>Even though \"processArray\" is an async function, the anonymous function that we use for <code>forEach</code> is synchronous. If you use await inside a synchronous function then it throws a syntax error.</p>\n</p>\n</details>\n<hr>\n<h4>28. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function delay() {\n    return new Promise((resolve) => setTimeout(resolve, 2000));\n}\n\nasync function delayedLog(item) {\n    await delay();\n    console.log(item);\n}\n\nasync function process(array) {\n    array.forEach(async (item) => {\n        await delayedLog(item);\n    });\n    console.log('Process completed!');\n}\nprocess([1, 2, 3, 5]);\n</code></pre>\n<ul>\n<li>1: 1 2 3 5 and Process completed!</li>\n<li>2: 5 5 5 5 and Process completed!</li>\n<li>3: Process completed! and 5 5 5 5</li>\n<li>4: Process completed! and 1 2 3 5</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The forEach method will not wait until all items are finished but it just runs the tasks and goes next. Hence, the last statement is displayed first followed by a sequence of promise resolutions.</p>\n<p>But you control the array sequence using for..of loop,</p>\n<pre><code class=\"language-javascript\">async function processArray(array) {\n    for (const item of array) {\n        await delayedLog(item);\n    }\n    console.log('Process completed!');\n}\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>29. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">var set = new Set();\nset.add('+0').add('-0').add(NaN).add(undefined).add(NaN);\nconsole.log(set);\n</code></pre>\n<ul>\n<li>1: Set(4) {\"+0\", \"-0\", NaN, undefined}</li>\n<li>2: Set(3) {\"+0\", NaN, undefined}</li>\n<li>3: Set(5) {\"+0\", \"-0\", NaN, undefined, NaN}</li>\n<li>4: Set(4) {\"+0\", NaN, undefined, NaN}</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>Set has few exceptions from equality check,</p>\n<ol>\n<li>All NaN values are equal</li>\n<li>Both +0 and -0 considered as different values</li>\n</ol>\n</p>\n</details>\n<hr>\n<h4>30. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const sym1 = Symbol('one');\nconst sym2 = Symbol('one');\n\nconst sym3 = Symbol.for('two');\nconst sym4 = Symbol.for('two');\n\ncnsooe.log(sym1 === sym2, sym3 === sym4);\n</code></pre>\n<ul>\n<li>1: true, true</li>\n<li>2: true, false</li>\n<li>3: false, true</li>\n<li>4: false, false</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>Symbol follows below conventions,</p>\n<ol>\n<li>Every symbol value returned from Symbol() is unique irrespective of the optional string.</li>\n<li><code>Symbol.for()</code> function creates a symbol in a global symbol registry list. But it doesn't necessarily create a new symbol on every call, it checks first if a symbol with the given key is already present in the registry and returns the symbol if it is found. Otherwise a new symbol created in the registry.</li>\n</ol>\n<p><strong>Note:</strong> The symbol description is just useful for debugging purposes.</p>\n</p>\n</details>\n<hr>\n<h4>31. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const sym1 = new Symbol('one');\nconsole.log(sym1);\n</code></pre>\n<ul>\n<li>1: SyntaxError</li>\n<li>2: one</li>\n<li>3: Symbol('one')</li>\n<li>4: Symbol</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p><code>Symbol</code> is a just a standard function and not an object constructor(unlike other primitives new Boolean, new String and new Number). So if you try to call it with the new operator will result in a TypeError</p>\n</p>\n</details>\n<hr>\n<h4>32. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">let myNumber = 100;\nlet myString = '100';\n\nif (!typeof myNumber === 'string') {\n    console.log('It is not a string!');\n} else {\n    console.log('It is a string!');\n}\n\nif (!typeof myString === 'number') {\n    console.log('It is not a number!');\n} else {\n    console.log('It is a number!');\n}\n</code></pre>\n<ul>\n<li>1: SyntaxError</li>\n<li>2: It is not a string!, It is not a number!</li>\n<li>3: It is not a string!, It is a number!</li>\n<li>4: It is a string!, It is a number!</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The return value of <code>typeof myNumber (OR) typeof myString</code> is always the truthy value (either \"number\" or \"string\"). Since ! operator converts the value to a boolean value, the value of both <code>!typeof myNumber or !typeof myString</code> is always false. Hence the if condition fails and control goes to else block.</p>\n</p>\n</details>\n<hr>\n<h4>33. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log(JSON.stringify({ myArray: ['one', undefined, function () {}, Symbol('')] }));\nconsole.log(JSON.stringify({ [Symbol.for('one')]: 'one' }, [Symbol.for('one')]));\n</code></pre>\n<ul>\n<li>1: {\"myArray\":['one', undefined, {}, Symbol]}, {}</li>\n<li>2: {\"myArray\":['one', null,null,null]}, {}</li>\n<li>3: {\"myArray\":['one', null,null,null]}, \"{ [Symbol.for('one')]: 'one' }, [Symbol.for('one')]\"</li>\n<li>4: {\"myArray\":['one', undefined, function(){}, Symbol('')]}, {}</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>The symbols has below constraints,</p>\n<ol>\n<li>The undefined, Functions, and Symbols are not valid JSON values. So those values are either omitted (in an object) or changed to null (in an array). Hence, it returns null values for the value array.</li>\n<li>All Symbol-keyed properties will be completely ignored. Hence it returns an empty object({}).</li>\n</ol>\n</p>\n</details>\n<hr>\n<h4>34. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">class A {\n    constructor() {\n        console.log(new.target.name);\n    }\n}\n\nclass B extends A {\n    constructor() {\n        super();\n    }\n}\n\nnew A();\nnew B();\n</code></pre>\n<ul>\n<li>1: A, A</li>\n<li>2: A, B</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Using constructors, <code>new.target</code> refers to the constructor (points to the class definition of class which is initialized) that was directly invoked by new. This also applies to the case if the constructor is in a parent class and was delegated from a child constructor.</p>\n</p>\n</details>\n<hr>\n<h4>35. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const [x, ...y,] = [1, 2, 3, 4];\nconsole.log(x, y);\n</code></pre>\n<ul>\n<li>1: 1, [2, 3, 4]</li>\n<li>2: 1, [2, 3]</li>\n<li>3: 1, [2]</li>\n<li>4: SyntaxError</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>It throws a syntax error because the rest element should not have a trailing comma. You should always consider using a rest operator as the last element.</p>\n</p>\n</details>\n<hr>\n<h4>36. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const { a: x = 10, b: y = 20 } = { a: 30 };\n\nconsole.log(x);\nconsole.log(y);\n</code></pre>\n<ul>\n<li>1: 30, 20</li>\n<li>2: 10, 20</li>\n<li>3: 10, undefined</li>\n<li>4: 30, undefined</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>The object property follows below rules,</p>\n<ol>\n<li>The object properties can be retrieved and assigned to a variable with a different name</li>\n<li>The property assigned a default value when the retrieved value is <code>undefined</code></li>\n</ol>\n</p>\n</details>\n<hr>\n<h4>37. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function area({ length = 10, width = 20 }) {\n    console.log(length * width);\n}\n\narea();\n</code></pre>\n<ul>\n<li>1: 200</li>\n<li>2: Error</li>\n<li>3: undefined</li>\n<li>4: 0</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>If you leave out the right-hand side assignment for the destructuring object, the function will look for at least one argument to be supplied when invoked. Otherwise you will receive an error <code>Error: Cannot read property 'length' of undefined</code> as mentioned above.</p>\n<p>You can avoid the error with either of the below changes,</p>\n<ol>\n<li><strong>Pass at least an empty object:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">function area({ length = 10, width = 20 }) {\n    console.log(length * width);\n}\n\narea({});\n</code></pre>\n<ol start=\"2\">\n<li><strong>Assign default empty object:</strong></li>\n</ol>\n<pre><code class=\"language-javascript\">function area({ length = 10, width = 20 } = {}) {\n    console.log(length * width);\n}\n\narea();\n</code></pre>\n</p>\n</details>\n<hr>\n<h4>38. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const props = [\n    { id: 1, name: 'John' },\n    { id: 2, name: 'Jack' },\n    { id: 3, name: 'Tom' }\n];\n\nconst [, , { name }] = props;\nconsole.log(name);\n</code></pre>\n<ul>\n<li>1: Tom</li>\n<li>2: Error</li>\n<li>3: undefined</li>\n<li>4: John</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>It is possible to combine Array and Object destructuring. In this case, the third element in the array props accessed first followed by name property in the object.</p>\n</p>\n</details>\n<hr>\n<h4>39. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function checkType(num = 1) {\n    console.log(typeof num);\n}\n\ncheckType();\ncheckType(undefined);\ncheckType('');\ncheckType(null);\n</code></pre>\n<ul>\n<li>1: number, undefined, string, object</li>\n<li>2: undefined, undefined, string, object</li>\n<li>3: number, number, string, object</li>\n<li>4: number, number, number, number</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>If the function argument is set implicitly(not passing argument) or explicitly to undefined, the value of the argument is the default parameter. Whereas for other falsy values('' or null), the value of the argument is passed as a parameter.</p>\n<p>Hence, the result of function calls categorized as below,</p>\n<ol>\n<li>The first two function calls logs number type since the type of default value is number</li>\n<li>The type of '' and null values are string and object type respectively.</li>\n</ol>\n</p>\n</details>\n<hr>\n<h4>40. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function add(item, items = []) {\n    items.push(item);\n    return items;\n}\n\nconsole.log(add('Orange'));\nconsole.log(add('Apple'));\n</code></pre>\n<ul>\n<li>1: ['Orange'], ['Orange', 'Apple']</li>\n<li>2: ['Orange'], ['Apple']</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Since the default argument is evaluated at call time, a new object is created each time the function is called. So in this case, the new array is created and an element pushed to the default empty array.</p>\n</p>\n</details>\n<hr>\n<h4>41. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function greet(greeting, name, message = greeting + ' ' + name) {\n    console.log([greeting, name, message]);\n}\n\ngreet('Hello', 'John');\ngreet('Hello', 'John', 'Good morning!');\n</code></pre>\n<ul>\n<li>1: SyntaxError</li>\n<li>2: ['Hello', 'John', 'Hello John'], ['Hello', 'John', 'Good morning!']</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Since parameters defined earlier are available to later default parameters, this code snippet doesn't throw any error.</p>\n</p>\n</details>\n<hr>\n<h4>42. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function outer(f = inner()) {\n    function inner() {\n        return 'Inner';\n    }\n}\nouter();\n</code></pre>\n<ul>\n<li>1: ReferenceError</li>\n<li>2: Inner</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>The functions and variables declared in the function body cannot be referred from default value parameter initializers. If you still try to access, it throws a run-time ReferenceError(i.e, <code>inner</code> is not defined).</p>\n</p>\n</details>\n<hr>\n<h4>43. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function myFun(x, y, ...manyMoreArgs) {\n    console.log(manyMoreArgs);\n}\n\nmyFun(1, 2, 3, 4, 5);\nmyFun(1, 2);\n</code></pre>\n<ul>\n<li>1: [3, 4, 5], undefined</li>\n<li>2: SyntaxError</li>\n<li>3: [3, 4, 5], []</li>\n<li>4: [3, 4, 5], [undefined]</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>The rest parameter is used to hold the remaining parameters of a function and it becomes an empty array if the argument is not provided.</p>\n</p>\n</details>\n<hr>\n<h4>44. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const obj = { key: 'value' };\nconst array = [...obj];\nconsole.log(array);\n</code></pre>\n<ul>\n<li>1: ['key', 'value']</li>\n<li>2: TypeError</li>\n<li>3: []</li>\n<li>4: ['key']</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Spread syntax can be applied only to iterable objects. By default, Objects are not iterable, but they become iterable when used in an Array, or with iterating functions such as <code>map(), reduce(), and assign()</code>. If you still try to do it, it still throws <code>TypeError: obj is not iterable</code>.</p>\n</p>\n</details>\n<hr>\n<h4>45. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function* myGenFunc() {\n    yield 1;\n    yield 2;\n    yield 3;\n}\nvar myGenObj = new myGenFunc();\nconsole.log(myGenObj.next().value);\n</code></pre>\n<ul>\n<li>1: 1</li>\n<li>2: undefined</li>\n<li>3: SyntaxError</li>\n<li>4: TypeError</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>Generators are not constructible type. But if you still proceed to do, there will be an error saying \"TypeError: myGenFunc is not a constructor\"</p>\n</p>\n</details>\n<hr>\n<h4>46. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function* yieldAndReturn() {\n    yield 1;\n    return 2;\n    yield 3;\n}\n\nvar myGenObj = yieldAndReturn();\nconsole.log(myGenObj.next());\nconsole.log(myGenObj.next());\nconsole.log(myGenObj.next());\n</code></pre>\n<ul>\n<li>1: { value: 1, done: false }, { value: 2, done: true }, { value: undefined, done: true }</li>\n<li>2: { value: 1, done: false }, { value: 2, done: false }, { value: undefined, done: true }</li>\n<li>3: { value: 1, done: false }, { value: 2, done: true }, { value: 3, done: true }</li>\n<li>4: { value: 1, done: false }, { value: 2, done: false }, { value: 3, done: true }</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>A return statement in a generator function will make the generator finish. If a value is returned, it will be set as the value property of the object and done property to true. When a generator is finished, subsequent next() calls return an object of this form: <code>{value: undefined, done: true}</code>.</p>\n</p>\n</details>\n<hr>\n<h4>47. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const myGenerator = (function* () {\n    yield 1;\n    yield 2;\n    yield 3;\n})();\nfor (const value of myGenerator) {\n    console.log(value);\n    break;\n}\n\nfor (const value of myGenerator) {\n    console.log(value);\n}\n</code></pre>\n<ul>\n<li>1: 1,2,3 and 1,2,3</li>\n<li>2: 1,2,3 and 4,5,6</li>\n<li>3: 1 and 1</li>\n<li>4: 1</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>The generator should not be re-used once the iterator is closed. i.e, Upon exiting a loop(on completion or using break &#x26; return), the generator is closed and trying to iterate over it again does not yield any more results. Hence, the second loop doesn't print any value.</p>\n</p>\n</details>\n<hr>\n<h4>48. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const num = 0o38;\nconsole.log(num);\n</code></pre>\n<ul>\n<li>1: SyntaxError</li>\n<li>2: 38</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>If you use an invalid number(outside of 0-7 range) in the octal literal, JavaScript will throw a SyntaxError. In ES5, it treats the octal literal as a decimal number.</p>\n</p>\n</details>\n<hr>\n<h4>49. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const squareObj = new Square(10);\nconsole.log(squareObj.area);\n\nclass Square {\n    constructor(length) {\n        this.length = length;\n    }\n\n    get area() {\n        return this.length * this.length;\n    }\n\n    set area(value) {\n        this.area = value;\n    }\n}\n</code></pre>\n<ul>\n<li>1: 100</li>\n<li>2: ReferenceError</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Unlike function declarations, class declarations are not hoisted. i.e, First You need to declare your class and then access it, otherwise it will throw a ReferenceError \"Uncaught ReferenceError: Square is not defined\".</p>\n<p><strong>Note:</strong> Class expressions also applies to the same hoisting restrictions of class declarations.</p>\n</p>\n</details>\n<hr>\n<h4>50. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">function Person() {}\n\nPerson.prototype.walk = function () {\n    return this;\n};\n\nPerson.run = function () {\n    return this;\n};\n\nlet user = new Person();\nlet walk = user.walk;\nconsole.log(walk());\n\nlet run = Person.run;\nconsole.log(run());\n</code></pre>\n<ul>\n<li>1: undefined, undefined</li>\n<li>2: Person, Person</li>\n<li>3: SyntaxError</li>\n<li>4: Window, Window</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>When a regular or prototype method is called without a value for <strong>this</strong>, the methods return an initial this value if the value is not undefined. Otherwise global window object will be returned. In our case, the initial <code>this</code> value is undefined so both methods return window objects.</p>\n</p>\n</details>\n<hr>\n<h4>51. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">class Vehicle {\n    constructor(name) {\n        this.name = name;\n    }\n\n    start() {\n        console.log(`${this.name} vehicle started`);\n    }\n}\n\nclass Car extends Vehicle {\n    start() {\n        console.log(`${this.name} car started`);\n        super.start();\n    }\n}\n\nconst car = new Car('BMW');\nconsole.log(car.start());\n</code></pre>\n<ul>\n<li>1: SyntaxError</li>\n<li>2: BMW vehicle started, BMW car started</li>\n<li>3: BMW car started, BMW vehicle started</li>\n<li>4: BMW car started, BMW car started</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 3</h5>\n<p>The super keyword is used to call methods of a superclass. Unlike other languages the super invocation doesn't need to be a first statement. i.e, The statements will be executed in the same order of code.</p>\n</p>\n</details>\n<hr>\n<h4>52. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">const USER = { age: 30 };\nUSER.age = 25;\nconsole.log(USER.age);\n</code></pre>\n<ul>\n<li>1: 30</li>\n<li>2: 25</li>\n<li>3: Uncaught TypeError</li>\n<li>4: SyntaxError</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Even though we used constant variables, the content of it is an object and the object's contents (e.g properties) can be altered. Hence, the change is going to be valid in this case.</p>\n</p>\n</details>\n<hr>\n<h4>53. What is the output of below code</h4>\n<pre><code class=\"language-javascript\">console.log('🙂' === '🙂');\n</code></pre>\n<ul>\n<li>1: false</li>\n<li>2: true</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 2</h5>\n<p>Emojis are unicodes and the unicode for smile symbol is \"U+1F642\". The unicode comparision of same emojies is equivalent to string comparison. Hence, the output is always true.</p>\n</p>\n</details>\n<hr>\n<h4>54. What is the output of below code?</h4>\n<pre><code class=\"language-javascript\">console.log(typeof typeof typeof true);\n</code></pre>\n<ul>\n<li>1: string</li>\n<li>2: boolean</li>\n<li>3: NaN</li>\n<li>4: number</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>The typeof operator on any primitive returns a string value. So even if you apply the chain of typeof operators on the return value, it is always string.</p>\n</p>\n</details>\n<hr>\n<h4>55. What is the output of below code?</h4>\n<pre><code class=\"language-javascript\">let zero = new Number(0);\n\nif (zero) {\n    console.log('If');\n} else {\n    console.log('Else');\n}\n</code></pre>\n<ul>\n<li>1: If</li>\n<li>2: Else</li>\n<li>3: NaN</li>\n<li>4: SyntaxError</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<ol>\n<li>The type of operator on new Number always returns object. i.e, typeof new Number(0) --> object.</li>\n<li>Objects are always truthy in if block</li>\n</ol>\n<p>Hence the above code block always goes to if section.</p>\n</p>\n</details>\n<hr>\n<h4>55. What is the output of below code in non strict mode?</h4>\n<pre><code class=\"language-javascript\">let msg = 'Good morning!!';\n\nmsg.name = 'John';\n\nconsole.log(msg.name);\n</code></pre>\n<ul>\n<li>1: \"\"</li>\n<li>2: Error</li>\n<li>3: John</li>\n<li>4: Undefined</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 4</h5>\n<p>It returns undefined for non-strict mode and returns Error for strict mode. In non-strict mode, the wrapper object is going to be created and get the mentioned property. But the object get disappeared after accessing the property in next line.</p>\n</p>\n</details>\n<hr>\n<h4>56. What is the output of below code?</h4>\n<pre><code class=\"language-javascript\">let count = 10;\n\n(function innerFunc() {\n    if (count === 10) {\n        let count = 11;\n        console.log(count);\n    }\n    console.log(count);\n})();\n</code></pre>\n<ul>\n<li>1: 11, 10</li>\n<li>2: 11, 11</li>\n<li>3: 10, 11</li>\n<li>4: 10, 10</li>\n</ul>\n<details><summary><b>Answer</b></summary>\n<p>\n<h5>Answer: 1</h5>\n<p>11 and 10 is logged to the console.</p>\n<p>The innerFunc is a closure which captures the count variable from the outerscope. i.e, 10. But the conditional has another local variable <code>count</code> which overwrites the ourter <code>count</code> variable. So the first console.log displays value 11.\nWhereas the second console.log logs 10 by capturing the count variable from outerscope.</p>\n</p>\n</details>\n<hr>\n<hr>"},{"url":"/docs/community/bookmarks/","relativePath":"docs/community/bookmarks.md","relativeDir":"docs/community","base":"bookmarks.md","name":"bookmarks","frontmatter":{"title":"Bookmarks","weight":0,"excerpt":"Bookmarks","seo":{"title":"","description":"","robots":[],"extra":[],"type":"stackbit_page_meta"},"template":"docs"},"html":"<h1>Bookmarks</h1>\n<!-- @import \"[TOC]\" {cmd=\"toc\" depthFrom=1 depthTo=6 orderedList=false} -->\n<!-- code_chunk_output -->\n<h3>Table Of Contents:</h3>\n<ul>\n<li>\n<p><a href=\"#bookmarks\">Bookmarks</a></p>\n<ul>\n<li><a href=\"#table-of-contents\">Table Of Contents:</a></li>\n<li><a href=\"#norwex\">NORWEX</a></li>\n<li><a href=\"#resources\">RESOURCES</a></li>\n<li><a href=\"#aa\">a/A</a></li>\n<li><a href=\"#netlify\">netlify</a></li>\n<li><a href=\"#python\">PYTHON</a></li>\n<li><a href=\"#react-redux\">React-Redux</a></li>\n<li><a href=\"#amazon\">AMAZON</a></li>\n<li><a href=\"#github\">GITHUB</a></li>\n<li><a href=\"#misc\">MISC</a></li>\n<li><a href=\"#amazingggg\">AMAZINGGGG</a></li>\n<li><a href=\"#free-stuff\">free-stuff</a></li>\n</ul>\n</li>\n</ul>\n<!-- /code_chunk_output -->\n<br>\n<hr>\n<br>\n<ul>\n<li>[✅ ] <a href=\"https://www.stackbit.com/blog/migrating-from-medium-a-developers-guide/\"><em><strong>Migrating From Medium - A Developer'sGuide</strong></em></a></li>\n<li>[✅] <a href=\"https://app.chatbot.com/dashboard/61665d6f8f5ea700073455ce\"><em><strong>Blank Bot |ChatBot.com</strong></em></a></li>\n<li>[✅] <a href=\"https://stackbit-gatsby-theme-diy-libris.netlify.app/\"><em><strong>Home | Stackbit DIYTheme</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1492\"><em><strong>Career Readiness</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/My-Medium-Blog/blob/master/index.html\"><em><strong>My-Medium-Blog/index.html at master ·bgoonz/My-Medium-Blog</strong></em></a></li>\n<li>[✅] <a href=\"http://www.unit-conversion.info/texttools/filter-lines/#data\"><em><strong>Filter lines - Linetools</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/8b120d11dddae8dc6b364e709ebcb8b2/raw/02ea2ca51ce2e5d93cb37382a03e67f5ce452872/codepens.md\"><em><strong>gist.github.com</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/KKvXPgG\"><em><strong>Responsive iFrames Pattern Grid</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/a19a0276bb467a94d4b3836e4bc1d2ea\"><em><strong>rotate.html</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Web_Utility_Tools/edit/master/basic-tools/README.md\"><em>**Editing Web</em>Utility<em>Tools/README.md at master ·bgoonz/Web</em>Utility<em>Tools**</em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/dashboard/home?workspace=da478b6b-a4b4-4f0b-bf97-6036bfd8dc97\"><em><strong>Dashboard -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/rotate-348q3?file=/index.html:1294-1298\"><em><strong>ROTATE -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/generalutil-rg787?file=/index.html:310-316\"><em><strong>generalutil -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://348q3.csb.app/\"><em><strong>Bootstrap Example</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/17710039/full-page-iframe\"><em><strong>html - Full Page &#x3C;iframe> - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/tools/dev-utilities/\"><em><strong>General Utilities |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://alpha.stackbit.com/studio/6142b621c92b2b00c7bbb301/\"><em><strong>diligent-sun - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://links-shortcut-site.vercel.app/\"><em><strong>My Links</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Web_Utility_Tools\"><em>**bgoonz/Web</em>Utility<em>Tools**</em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/bold-surf-xfsiq?file=/index.html\"><em><strong>bold-surf-xfsiq -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://account.microsoft.com/devices?refd=account.microsoft.com\"><em><strong>Microsoft account |Devices</strong></em></a></li>\n<li>[✅] <a href=\"https://ui.ads.microsoft.com/campaign/digitalmarketing?signout=true&#x26;mcae=True&#x26;ccuisrc=4\"><em><strong>Digital Marketing Center SignIn</strong></em></a></li>\n<li>[✅] <a href=\"https://business.facebook.com/bgoooonz-107075937574448/settings/?tab=messaging\"><em><strong>bgoooonz |Facebook</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/ads/manager/account_settings/information/?act=118873289&#x26;pid=p1&#x26;page=account_settings&#x26;tab=account_information\"><em><strong>AdsManager</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.marketo.com/2017/11/7-tips-making-website-content-interactive.html\"><em><strong>7 Tips for Making Your Website ContentInteractive</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.marketo.com/2016/06/3-ways-to-grow-your-business-with-user-generated-content.html\"><em><strong>3 Ways to Use User-Generated Content (UGC) -Marketo</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/eed3aac699664cc215af336f57dbee2c\"><em><strong>social-media-share.html</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=can+you+add+wordpress+to+non+wordpress+site&#x26;oq=can+you+add+wordpress+to+non+wordpress+site&#x26;aqs=chrome..69i57j33i160.9635j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>can you add wordpress to non wordpress site - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.com/activity-log/webcomponents390576979.wordpress.com\"><em><strong>Activity ‹ Web-components ---WordPress.com</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/ds-algo-official/deploys/61b6a65a3b158e000844b4d5\"><em><strong>Deploy details |ds-algo-official</strong></em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/609b2d7c71a5dd0016f36326/#/docs/javascript/nan\"><em><strong>BGOONZBLOG2 - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1275\"><em>**Merge pull request #1274 from bgoonz/preview by bgoonz · Pull Request#1275 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1270\"><em>**Preview by bgoonz · Pull Request #1270 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys\"><em><strong>Deploys |bgoonz-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nimbella/netlify-plugin-nimbella#readme\"><em><strong>nimbella/netlify-plugin-nimbella: A Nimbella plugin to extend NetlifySites with support for portable and stateful serverlessAPIs.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1264\"><em>**Merge pull request #1263 from bgoonz/master by bgoonz · Pull Request#1264 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/network/dependencies\"><em>**Dependencies ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/trekhleb/js-image-carver\"><em><strong>trekhleb/js-image-carver: 🌅 Content-aware image resizer and objectremover based on Seam Carvingalgorithm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1271\"><em>**Preview by bgoonz · Pull Request #1271 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/trekhleb/nodejs-master-class\"><em><strong>trekhleb/nodejs-master-class: 🛠 This repository contains the homeworkassignment for Node.js Master Class that is focused on building aRESTful API, web app GUI, and a CLI in plain Node JS with no NPM or3rd-party libraries</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/trekhleb.github.io/blob/master/apollo.config.js\"><em><strong>trekhleb.github.io/apollo.config.js at master ·side-projects-42/trekhleb.github.io</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/63124161/attempted-import-error-switch-is-not-exported-from-react-router-dom\"><em><strong>reactjs - Attempted import error: 'Switch' is not exported from'react-router-dom' - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://cheatsheets-42.netlify.app/\"><em><strong>Stackbit Fresh Theme</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/mini-tools-v3\"><em><strong>bgoonz/mini-tools-v3</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox\"><em><strong>Inbox (175) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/\">****</a></li>\n<li>[✅] <a href=\"https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet\"><em><strong>Markdown Here Cheatsheet · adam-p/markdown-hereWiki</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/mini-tools-v3/pulls\"><em><strong>Pull requests ·bgoonz/mini-tools-v3</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/43858441/emoji-look-up-table-and-algorithm\"><em><strong>android - emoji look up table and algorithm - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/bgoonz/mini-tools-v3\"><em><strong>mini-tools-v3 -- Overview --Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog-2-0.vercel.app/blog/blogwcomments/\"><em><strong>ExpressJS Apis |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#search/Tips+fo/FMfcgzGllMDQdVMdZlCWDhWNZTWMdkdK\"><em><strong>collaborate? - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.blogtrepreneur.com/\"><em><strong>Entrepreneur Blog | Blogtrepreneur</strong></em></a></li>\n<li>[✅] <a href=\"https://scottyseo.com/\"><em><strong>Technical SEO Consultant for eCommerce, Javascript &#x26; Large ScaleWebsites - ScottySEO</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/account_verifications?recommend_plan=true\"><em><strong>Please verify your emailaddress</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\"><em><strong>(2) Bryan (bgoonz (on most social media)) Guner |LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1276\"><em>**Merge pull request #1275 from bgoonz/master by bgoonz · Pull Request#1276 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/61a171aa5c760600c8e0277b/#/style-guide/\"><em><strong>Cheatsheets - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/overview\"><em><strong>Team overview |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/create/theme\"><em><strong>Stackbit App</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Web_Utility_Tools/deployments/activity_log?environment=github-pages\"><em>**Deployments ·bgoonz/Web</em>Utility<em>Tools**</em></a></li>\n<li>[✅] <a href=\"https://cheatsheets-42.netlify.app/about/\"><em><strong>About Me</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Cheat-Sheets/pull/35\"><em><strong>Discuss and review the changes in this comparison with others. Learnabout pull requests 9 commits 45 files changed by bgoonz · Pull Request#35 ·bgoonz/Cheat-Sheets</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Cheat-Sheets/compare/preview...master\"><em><strong>Comparing preview...master ·bgoonz/Cheat-Sheets</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Cheat-Sheets/pull/34\"><em><strong>Preview by bgoonz · Pull Request #34 ·bgoonz/Cheat-Sheets</strong></em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/609b2d7c71a5dd0016f36326/\"><em><strong>BGOONZBLOG2 - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1281\"><em>**Merge pull request #1280 from bgoonz/preview by bgoonz · Pull Request#1281 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/settings/deploys\"><em><strong>Build &#x26; deploy | Sitesettings</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz/edit/master/README.md\"><em><strong>Editing bgoonz/README.md at master ·bgoonz/bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/executablebooks?q=&#x26;type=all&#x26;language=jupyter+notebook&#x26;sort=stargazers\"><em><strong>ExecutableBooks</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/adam-p/s3-file-list-page\"><em><strong>adam-p/s3-file-list-page: List files in directories of S3-hostedwebsites</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/leeoniya/reMarked.js\"><em><strong>leeoniya/reMarked.js: client-side HTML >markdown</strong></em></a></li>\n<li>[✅] <a href=\"http://leeoniya.github.io/reMarked.js/\"><em><strong>reMarked.js Demo</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/marketplace/actions/markdown-embed-code-from-file\"><em><strong>Markdown Embed Code From File · Actions · GitHubMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/executablebooks/thebe\"><em><strong>executablebooks/thebe: Turn static HTML pages into live documents withJupyter kernels.</strong></em></a></li>\n<li>[✅] <a href=\"https://sphinx-copybutton.readthedocs.io/en/latest/\"><em><strong>Sphinx-copybutton --- SphinxCopybutton</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz/blob/master/README.md\"><em><strong>bgoonz/README.md at master ·bgoonz/bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/how-to-make-a-pagination-using-html-and-css/\"><em><strong>How to make a Pagination using HTML and CSS ? -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/new/import?s=https%3A%2F%2Fgithub.com%2Fbgoonz%2FWeb_Utility_Tools\"><em><strong>New Project --Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/feed/\"><em><strong>(2) Feed | LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/61a171aa5c760600c8e0277b/#/blog/index.html\"><em><strong>Cheatsheets - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Cheat-Sheets/pull/43\"><em><strong>Preview by bgoonz · Pull Request #43 ·bgoonz/Cheat-Sheets</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Cheat-Sheets/pull/41\"><em><strong>Preview by bgoonz · Pull Request #41 ·bgoonz/Cheat-Sheets</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/executablebooks/sphinx-copybutton/blob/master/sphinx_copybutton/_static/copybutton.css\"><em><strong>sphinx-copybutton/copybutton.css at master ·executablebooks/sphinx-copybutton</strong></em></a></li>\n<li>[✅] <a href=\"https://cheatsheets-42.netlify.app/blog/\"><em><strong>Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/61bd17ca07e79e0007167687\"><em><strong>Deploy details |bgoonz-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Web_Utility_Tools/settings/pages\"><em><strong>Pages</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addthis.com/dashboard#tool-config/pub/ra-60dcec1ece575946/pco/rpin/behavior\"><em><strong>AddThis Dashboard | ToolGallery</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/Web_Utility_Tools/\"><em><strong>directory</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web\"><em><strong>Getting started with the Web - Learn web development |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Cheat-Sheets/pulls\"><em><strong>Pull requests ·bgoonz/Cheat-Sheets</strong></em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/609b2d7c71a5dd0016f36326/#/docs/articles/node-package-manager/\"><em><strong>BGOONZBLOG2 - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1290\"><em>**fix by bgoonz · Pull Request #1290 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/609b2d7c71a5dd0016f36326/#/blog/\"><em><strong>BGOONZBLOG2 - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/blog/\"><em><strong>Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://dabblet.com/help/index.html\"><em><strong>Help ✿ dabblet.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/dabblet\"><em><strong>side-projects-42/dabblet: An interactive CSSplayground</strong></em></a></li>\n<li>[✅] <a href=\"https://dabblet.com/\"><em><strong>The first commented line is your dabblet's title ✿dabblet.com</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity\"><em><strong>Specificity - CSS: Cascading Style Sheets |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1289\"><em>**Merge pull request #1288 from bgoonz/preview by bgoonz · Pull Request#1289 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/61bd3b5f01322c0008ab94d9\"><em><strong>Deploy details |bgoonz-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/functions/configure-and-deploy/#configure-the-functions-folder\"><em><strong>Configure and deploy functions | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/functions/configure-and-deploy/\"><em><strong>Configure and deploy functions | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/builds/61bd2979b88ebd0008ff6fc4\"><em><strong>Deploy details |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz\"><em><strong>bgoonz/bgoonz:https://bgoonz.github.io/bgoonz/</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub.ghost.io/ghost/#/editor/page/61b2ce65539c2c002f6242a8\"><em><strong>JavaScript Cheatsheet: -WebDevHub</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub.ghost.io/about/\"><em><strong>WebDevHub</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub.ghost.io/ghost/#/tags/data-structures\"><em><strong>WebDevHub</strong></em></a></li>\n<li>[✅] <a href=\"https://ghost.org/docs/tutorials/google-custom-search/\"><em><strong>Tutorial: How to Add Google Custom Search toGhost</strong></em></a></li>\n<li>[✅] <a href=\"https://demo.ghost.io/\"><em><strong>Ghost</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/pydata/pydata-sphinx-theme\"><em><strong>pydata/pydata-sphinx-theme: Bootstrap-based sphinx theme from thePyData community</strong></em></a></li>\n<li>[✅] <a href=\"https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/install.html\"><em><strong>Installation --- PyData Sphinx Theme 0.7.1documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/academic-resources/pydata-sphinx-theme\"><em><strong>academic-resources/pydata-sphinx-theme: Bootstrap-based sphinx themefrom the PyDatacommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Faws.amazon.com%2Fmarketplace%2Ffulfillment%3FproductId%3D1785272a-0cd3-4998-be1e-322501822a4c%26ref_%3Ddtl_psb_continue%26isauthcode%3Dtrue&#x26;client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fawsmp-contessa&#x26;forceMobileApp=0\"><em><strong>Amazon Web ServicesSign-In</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/devops/what-is-devops/?nc1=f_cc\"><em><strong>What is DevOps? - Amazon Web Services(AWS)</strong></em></a></li>\n<li>[✅] <a href=\"https://linuxize.com/post/how-to-install-postman-on-ubuntu-20-04/\"><em><strong>How to Install Postman on Ubuntu 20.04 |Linuxize</strong></em></a></li>\n<li>[✅] <a href=\"https://pip.pypa.io/en/stable/user_guide/\"><em><strong>User Guide - pip documentationv21.3.1</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/markdown-embed-code\"><em><strong>side-projects-42/markdown-embed-code: Action to synchronize \"any\"code in markdown with an external file. No more managing code as plaintext.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/executablebooks/markdown-it-py\"><em><strong>executablebooks/markdown-it-py: Markdown parser, done right. 100%CommonMark support, extensions, syntax plugins &#x26; high speed. Now inPython!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/data-science-notes?organization=side-projects-42&#x26;organization=side-projects-42\"><em><strong>side-projects-42/data-science-notes: Open-source project hosted athttps://makeuseofdata.com to crowdsource a robust collection of notesrelated to data science (math, visualization, modeling,etc)</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/fc23cdfc1a266059a7fde3ad963221db\"><em><strong>inject-iframe.js</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/security-issues?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F\"><em><strong>Securityissues</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/insights/?utm_source=search_console&#x26;utm_medium=search_console&#x26;utm_campaign=search_console_dashboard&#x26;resource_id=https://bgoonz-blog.netlify.app/\"><em><strong>Siteoverview</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/welcome?new_domain_name=master--bgoonz-blog.netlify.app\"><em><strong>Welcome to Google SearchConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/LYLJZrW\"><em><strong>Privacy-Policy</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/the-game-of-life/blob/master/lib/jquery-ui.css\"><em><strong>the-game-of-life/jquery-ui.css at master ·bgoonz/the-game-of-life</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/academic-resources/LABS-web\"><em><strong>academic-resources/LABS-web</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/kosamari\"><em><strong>kosamari (Mariko Kosaka)</strong></em></a></li>\n<li>[✅] <a href=\"https://chromestatus.com/samples\"><em><strong>Chrome Platform Status</strong></em></a></li>\n<li>[✅] <a href=\"https://googlechrome.github.io/samples/file-constructor/index.html\"><em><strong>File ConstructorSample</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.chrome.com/blog/new-in-devtools-96/?utm_source=devtools#hide-cors-errors\"><em><strong>What's New In DevTools (Chrome 96) - ChromeDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/figure-out-when-you-will-or-have-crossed-the-1B-second-mark/runs/4574074988?check_suite_focus=true\"><em><strong>Create google.yml ·bgoonz/figure-out-when-you-will-or-have-crossed-the-1B-second-mark@8a4d230</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/figure-out-when-you-will-or-have-crossed-the-1B-second-mark/tree/master/.github/workflows\"><em><strong>figure-out-when-you-will-or-have-crossed-the-1B-second-mark/.github/workflowsat master ·bgoonz/figure-out-when-you-will-or-have-crossed-the-1B-second-mark</strong></em></a></li>\n<li>[✅] <a href=\"https://figure-out-when-you-will-or-have-crossed-the-1-b-second-mark.vercel.app/\"><em><strong>One BillionSeconds</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/69554485/eslint-error-must-use-import-to-load-es-module\"><em><strong>javascript - ESlint - Error: Must use import to load ES Module - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/eslint/eslint/issues/12319\"><em>**`ERR</em>REQUIRE<em>ESM` when requiring `.eslintrc.js` · Issue #12319 ·eslint/eslint**</em></a></li>\n<li>[✅] <a href=\"https://github.com/nodejs/modules/issues/389\"><em><strong>Script-based configuration files in \"type\": \"module\" packages ·Issue #389 ·nodejs/modules</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/eslint/eslint/issues/15157\"><em><strong>Bug: using babel-eslint parser throws error · Issue #15157 ·eslint/eslint</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ironhack-labs\"><em><strong>Ironhack Labs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codefactor.io/repository/new\"><em><strong>Add Repository</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/deployments/activity_log?environment=Production\"><em>**Deployments ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://vercel.com/bgoonz/bgoonz-blog-2-0/35t9cKT3ncUU2PkCw4xff4DHBYDt/functions\"><em><strong>bgoonz-blog-2-0 --Functions</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/bgoonz/bgoonz-blog-2-0\"><em><strong>bgoonz-blog-2-0 -- Overview --Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/codespaces\"><em><strong>Codespaces</strong></em></a></li>\n<li>[✅] <a href=\"https://web-dev-collaborative-mdn-ajax-nav-example-x5w7x7w443qx6.github.dev/\"><em><strong>Get Started - mdn-ajax-nav-example [Codespaces] - Visual Studio Code- Insiders -Codespaces</strong></em></a></li>\n<li>[✅] <a href=\"https://logflare.app/sources/16980\"><em><strong>bgoonz-blog2.all | Logflare | Cloudflare, Vercel &#x26; ElixirLogging</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/dashboard/integrations/icfg_QmZ1fBvTzv2NqtFyArTByRRW41F45bEdKhmPtVrrFsd5Vy\"><em><strong>Dashboard --Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/dashboard/integrations/icfg_qR6D3QbnwsfkVEIi5E9XJ9LA\"><em><strong>Dashboard --Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sanity.io/create/integrations/vercel/configure?configurationId=icfg_qR6D3QbnwsfkVEIi5E9XJ9LA\"><em><strong>Sanity.io &#x3C;>Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://www.meetup.com/github/events/282753494/\"><em><strong>How to attract non-code contributions to your OSS projects |Meetup</strong></em></a></li>\n<li>[✅] <a href=\"https://marketingplatform.google.com/home/integrations?authuser=0\"><em><strong>PlatformHome</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/?authuser=0#/p284713814/reports/dashboard/edit?params=_u..nav%3Dmaui&#x26;r=firebase-overview&#x26;ruid=firebase-overview,app,firebase&#x26;collectionId=app\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://surveys.google.com/your-surveys\"><em><strong>Google Surveys - Your Surveys</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/ServiceLogin/webreauth?ltmpl=ds&#x26;cd=_PDS&#x26;service=dartsearch&#x26;passive=false&#x26;continue=https%3A%2F%2Fsearchads.google.com%3A443%2Fds%2Fcm%2Fcm%3Fauthuser%3D0&#x26;authuser=0&#x26;flowName=GlifWebSignIn&#x26;flowEntry=ServiceLogin\"><em><strong>Sign in - GoogleAccounts</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/?authuser=0#/analysis/p284713814\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://marketingplatform.google.com/about/campaign-manager-360/benefits/\"><em><strong>Ad serving and measurement - Campaign Manager360</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/tag-platform/tag-manager/web/datalayer\"><em><strong>The data layer | Google Tag Manager for Web | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://optimize.google.com/optimize/home/?authuser=0#/accounts/4704489453/containers/14804290/experiments/6\"><em><strong>web-dev-hub | Details -Optimize</strong></em></a></li>\n<li>[✅] <a href=\"https://tagmanager.google.com/?authuser=0#/container/accounts/6004306073/containers/47892406/workspaces/5\"><em><strong>Google TagManager</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/?authuser=0#/a204228125p281933678/admin/streams/table/\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://www.xml-sitemaps.com/se-bot-simulator.html?go=1&#x26;pageurl=https%3A%2F%2Fpdfcrowd.com%2Fcontact%2F&#x26;se=googlebot\"><em><strong>Search Engine Robot Simulator - XML SitemapsGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://pdfcrowd.com/save-to-pdf/\"><em><strong>Save to PDF Link - Pdfcrowd</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/DOM-standard.md\"><em>**DOM standard.md · bgoonz/BGOONZ</em>BLOG<em>2.0 Wiki ·GitHub**</em></a></li>\n<li>[✅] <a href=\"https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes\"><em><strong>Learn YAML in five minutes! -CodeProject</strong></em></a></li>\n<li>[✅] <a href=\"https://www.postgresqltutorial.com/postgresql-sample-database/\"><em><strong>PostgreSQL SampleDatabase</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=define:boolean\"><em><strong>define:boolean - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgzGllVnXGggKsxPVbmNkFRtQNKDx\"><em><strong>https://bgoonz-blog.netlify.app/ is now associated with GoogleAnalytics property bgoonzblog2 - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/index/drilldown?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F&#x26;item_key=CAMYEyAE&#x26;hl=en\"><em><strong>Coverage</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/index/drilldown?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F&#x26;item_key=CAMYFCAE&#x26;hl=en\"><em><strong>Coverage</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/inspect?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F&#x26;id=4N5exYHORt2HLM1-veXXcg&#x26;alt_id=7ezhCZdVNi9rVRMcNyTG0w&#x26;hl=en\"><em><strong>URLInspection</strong></em></a></li>\n<li>[✅] <a href=\"https://ads.google.com/aw/campaigns/new?ocid=684885266&#x26;cmpnInfo=%7B%228%22%3A%22a4C43E97B-E3CC-4677-8342-2995EDB48A41--21%22%7D&#x26;euid=511440374&#x26;__u=5714947526&#x26;uscid=684885266&#x26;__c=9965720834&#x26;authuser=0&#x26;subid=ww-ww-et-g-aw-a-vasquette_ads_cons_1%21o2m--ahpm-0000000097-0000000000\"><em><strong>New campaign - 121-718-5098 - GoogleAds</strong></em></a></li>\n<li>[✅] <a href=\"https://ads.google.com/aw/productlinks/webmaster?ocid=684885266&#x26;euid=511440374&#x26;__u=5714947526&#x26;uscid=684885266&#x26;__c=9965720834&#x26;authuser=0\"><em><strong>Webmaster - 121-718-5098 - GoogleAds</strong></em></a></li>\n<li>[✅] <a href=\"https://ads.google.com/aw/audiencemanager?ocid=684885266&#x26;euid=511440374&#x26;__u=5714947526&#x26;uscid=684885266&#x26;__c=9965720834&#x26;authuser=0\"><em><strong>Error 404 (NotFound)!!1</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/google-ads/answer/7474166?&#x26;ref_topic=10551093\"><em><strong>Fix Customer Match issues with list upload, small list size, or lowvolume - Google AdsHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/performance/search-analytics?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F\"><em><strong>Performance</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/webmasters/tools/site-message-view?hl=en&#x26;siteUrl=https://bgoonz-blog.netlify.app/&#x26;message-filter=all&#x26;grid.r=0&#x26;msgid=AB9YKzIE0ZJC3VxbsKGJtwIKi8zCTeS-gtThNvv5j8hcAT2sPFvwYEs8hYNqvn0rcw13VkQmRYALqvavS3NP2mTcXfFUVIjANA\"><em><strong>Search Console - Messages for bgoonz-blog.netlify.app -https://bgoonz-blog.netlify.app/</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console?utm_source=wnc_376106&#x26;utm_medium=gamma&#x26;utm_campaign=wnc_376106&#x26;utm_content=msg_743502&#x26;hl=en&#x26;resource_id=https://bgoonz-blog.netlify.app/\"><em><strong>Overview</strong></em></a></li>\n<li>[✅] <a href=\"https://pagespeed.web.dev/report?url=https%3A%2F%2Fbgoonz-blog.netlify.app%2F&#x26;hl=en\"><em><strong>PageSpeedInsights</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/search/docs/advanced/crawling/special-tags?hl=en\"><em><strong>Meta and Inline Tags that Google Understands | Google Search Central | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.crunchboard.com/profiles/password/edit?reset_password_token=KWe7DRyaxBYNscdf9Pny\"><em><strong>Tech, Startup and Engineering Jobs - Crunchboard JobBoard</strong></em></a></li>\n<li>[✅] <a href=\"https://www.crunchboard.com/profiles/sign_in\"><em><strong>Profile Log In | CrunchboardJobs</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/inspect?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F&#x26;id=1gWYKw-w4CbfzTmluSiWGg&#x26;alt_id=r9fMCTrzdYrYn5CE0BOv3Q&#x26;hl=en\"><em><strong>URLInspection</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/whatwg/dom\"><em><strong>whatwg/dom: DOM Standard</strong></em></a></li>\n<li>[✅] <a href=\"https://dom.spec.whatwg.org/\"><em><strong>DOM Standard</strong></em></a></li>\n<li>[✅] <a href=\"https://html.spec.whatwg.org/\"><em><strong>HTML Standard</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/webdevhub42/8fd156c397c74d608c89448b4418cb65?v=454afa2feb5d4958ae6a8575f236601a&#x26;p=e26cfaadf3034650a2c66af8e6fa6486\"><em><strong>MyLinks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.xml-sitemaps.com/html-sitemap.html\"><em><strong>HTML Sitemap Explained - How to create HTML Sitemaps and how does ithelp a website - XML SitemapsGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/checkpoint/?next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Foauth%3Fclient_id%3D533518033351325%26redirect_uri%3Dhttps%253A%252F%252Fapp.dynomapper.com%252Fscn-social-auth%252Fhauth%253Fhauth.done%253DFacebook%26state%3D814a7f0ea0f02219e03cfddf4daf59b7%26sdk%3Dphp-sdk-3.2.3%26scope%3Dpublic_profile%252Cemail%26display%3Dpage%26ret%3Dlogin%26fbapp_pres%3D0%26logger_id%3D31bced98-556a-4cf3-8a04-ae8d7c1eb7d7%26tp%3Dunspecified%26cbt%3D1639933424494\"><em><strong>Facebook</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/blogger/docs/3.0/reference/posts/search?apix=true&#x26;apix_params=%7B%22blogId%22%3A%2210%22%2C%22q%22%3A%22JavaScript%22%2C%22fetchBodies%22%3Atrue%2C%22orderBy%22%3A%22PUBLISHED%22%7D#try-it\"><em><strong>Posts: search | Blogger | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/earnings/2114927300735556507\"><em><strong>Blogger:Earnings</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/adsense/new/u/0/pub-7131725540181116/home\"><em><strong>Home -- GoogleAdSense</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/search/docs/advanced/guidelines/webmaster-guidelines?hl=en&#x26;_ga=2.47561892.2010395531.1639933504-972587081.1639933504&#x26;visit_id=1639931578542-8725338968151920159&#x26;rd=1\"><em><strong>Webmaster Guidelines | Google Search Central | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/search/docs/advanced/guidelines/webmaster-guidelines?hl=en&#x26;_ga=2.47561892.2010395531.1639933504-972587081.1639933504&#x26;visit_id=1639931578542-8725338968151920159&#x26;rd=1#general\"><em><strong>Webmaster Guidelines | Google Search Central | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/programmable-search/answer/4513882?hl=en&#x26;ref_topic=4513742\"><em><strong>Create a search engine - Programmable Search EngineHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://programmablesearchengine.google.com/cse/setup/basic?cx=54896af6e2f16ea45\"><em><strong>Programmable Search -Basic</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/tools/Archive\"><em><strong>Archive |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/LABS-web\"><em><strong>Web-Dev-Collaborative/LABS-web</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/watch?v=A_l0qrPUJds\"><em><strong>JAMstack Course - Build websites that are simpler, faster, and moresecure - YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlify.com/blog/2020/03/12/learn-jamstack-with-a-free-3.5-hour-video-of-demos-and-examples/?utm_source=fcc-jamstack-course&#x26;utm_medium=phil-pnh&#x26;utm_campaign=devex\"><em><strong>Learn JAMstack in Free 3.5 Hour Video Course - Demos &#x26;Examples</strong></em></a></li>\n<li>[✅] <a href=\"https://gridsound.com/daw/\"><em><strong>*GridSound</strong></em></a></li>\n<li>[✅] <a href=\"https://discord.com/channels/442778850829795330/442778851534307339\"><em><strong>general</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bit101/tones\"><em><strong>bit101/tones</strong></em></a></li>\n<li>[✅] <a href=\"https://tonejs.github.io/\"><em><strong>Tone.js</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/goldfire/howler.js/\"><em><strong>goldfire/howler.js: Javascript audio library for the modernweb.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-list-of-embedable-content\"><em><strong>bgoonz/random-list-of-embedable-content</strong></em></a></li>\n<li>[✅] <a href=\"https://xsound.jp/\"><em><strong>XSound - Powerful Audio Features Easily ! -</strong></em></a></li>\n<li>[✅] <a href=\"https://ptsjs.org/\"><em><strong>Pts.js</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API\"><em><strong>Basic concepts behind Web Audio API - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API\"><em><strong>Using the Web Audio API - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Advanced_techniques\"><em><strong>Advanced techniques: Creating and sequencing audio - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide\"><em><strong>Autoplay guide for media and Web Audio APIs - Web media technologies |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_IIR_filters\"><em><strong>Using IIR filters - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Visualizations_with_Web_Audio_API\"><em><strong>Visualizations with Web Audio API - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics\"><em><strong>Web audio spatialization basics - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Controlling_multiple_parameters_with_ConstantSourceNode\"><em><strong>Controlling multiple parameters with ConstantSourceNode - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://www.html5rocks.com/en/tutorials/webaudio/positional_audio/\"><em><strong>Mixing Positional Audio and WebGL - HTML5Rocks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.html5rocks.com/en/tutorials/webaudio/games/\"><em><strong>Developing Game Audio with the Web Audio API - HTML5Rocks</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode\"><em><strong>OscillatorNode - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API\"><em><strong>Web Audio API - Web APIs |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jotform.com/blog/html5-filesystem-api-create-files-store-locally-using-javascript-webkit/\"><em><strong>HTML5: FileSystem API - Create Files and Store Them Locally UsingJavaScript and Webkit | The JotFormBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jotform.com/integrations/\"><em><strong>Online Form Integrations| JotForm</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/eYvrgpe\"><em><strong>gsuiOscilloscope</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/gridsound/export\"><em><strong>gridsound/export: ( this project's code is temporarily deprecated, wehave to use daw-core here) Render and download a GridSound file in.wav</strong></em></a></li>\n<li>[✅] <a href=\"https://gridsound.github.io/export/#\"><em><strong>GridSound - Export</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/users/password/new\"><em><strong>Forgot your password? |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/MihirBegMusicV3\"><em><strong>bgoonz/MihirBegMusicV3: FinalItteration</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.citrix.com/\"><em><strong>Home - Citrix Product Documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://headlesscommercesummit.com/\"><em><strong>Headless Commerce Summit |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/builds/60bb6115a63d1e000737aacf\"><em><strong>Deploy details | Bryan C Guner'steam</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/eYvMwKL\"><em><strong>Navigation bar with circle flexible highlightPOC</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/next-netlify-starter\"><em><strong>bgoonz/next-netlify-starter</strong></em></a></li>\n<li>[✅] <a href=\"https://60bb398322d0e12b13ce5f92--next-jamstack.netlify.app/\"><em><strong>Next.jsStarter!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/vercel/next.js\"><em><strong>vercel/next.js: The React Framework</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz?tab=repositories\"><em><strong>Your Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://jamstack.org/generators/gitbook/\"><em><strong>GitBook | Jamstack</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/GitbookIO/gitbook\"><em><strong>GitbookIO/gitbook: 📝 Modern documentation format and toolchain usingGit and Markdown</strong></em></a></li>\n<li>[✅] <a href=\"https://jamstack.org/generators/docusaurus/\"><em><strong>Docusaurus | Jamstack</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/facebook/docusaurus\"><em><strong>facebook/docusaurus: Easy to maintain open source documentationwebsites.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.blog/2016-02-01-working-with-submodules/\"><em><strong>Working with submodules | The GitHubBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgzGkXdDbDmbhBgNtMpNJNDNGGDWN\"><em><strong>LeetCode Weekly Digest - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://leetcode.com/problems/race-car/\"><em><strong>Race Car - LeetCode</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/leetcode-notes/Algorithm-Pratice-Questions-LeetCode\"><em><strong>leetcode-notes/Algorithm-Pratice-Questions-LeetCode</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/ask-me-anything\"><em><strong>bgoonz/ask-me-anything</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=free+audio+samples+for+music+production&#x26;oq=free+audio+samples&#x26;aqs=chrome.4.69i57j0l9.9257j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>free audio samples for music production - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.factmag.com/2017/03/25/best-free-sample-packs-download/\"><em><strong>21 great free sample packs for producers on abudget</strong></em></a></li>\n<li>[✅] <a href=\"https://www.autodafe.net/your-account-downloads/customer/downloads.html\"><em><strong>YourAccount</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/best-celery-b2d7c/overview\"><em><strong>Site overview |best-celery-b2d7c</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=contentful&#x26;oq=contentful&#x26;aqs=chrome..69i57j35i39j0i20i263j0l2j69i65l3.1869j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>contentful - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://cofounderstown.com/edit/quick-guide-big-o-notation-memoization-4436e\"><em><strong>All Interests -Cofounderstown</strong></em></a></li>\n<li>[✅] <a href=\"https://www.wordstream.com/blog/ws/2016/07/19/medium-optimization-tips\"><em><strong>7 Medium Optimization Tips To Get Your Articles To Go Hot |WordStream</strong></em></a></li>\n<li>[✅] <a href=\"https://sheet.best/\"><em><strong>sheet.best · Turn your google sheets into a RESTAPI</strong></em></a></li>\n<li>[✅] <a href=\"https://hq.app/app/?product_tour_id=20873\"><em><strong>HQ App</strong></em></a></li>\n<li>[✅] <a href=\"https://buildbootstrap.com/#\"><em><strong>BuildBootstrap · Grid layout builder for Bootstrap 3,4</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/codebubb/weird-and-wonderful-things-i-found-in-public-gists-1heg\"><em><strong>Weird and wonderful things I found in public Gists - DEV Community👩‍💻👨‍💻</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/tender-bartik-074feb/overview\"><em><strong>Site overview |tender-bartik-074feb</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/github-reference-repo\"><em><strong>bgoonz/github-reference-repo: just some stuff to help keep mesane</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/functions/overview/\"><em><strong>Functions overview | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://functions-playground.netlify.app/\"><em><strong>Netlify Functions Examples</strong></em></a></li>\n<li>[✅] <a href=\"https://listjs.com/examples/add-get-remove/\"><em><strong>Example to showcase the add, get and remove methods. -List.js</strong></em></a></li>\n<li>[✅] <a href=\"https://towardsdatascience.com/uploading-large-files-to-github-dbef518fa1a\"><em><strong>Uploading Large Files to GitHub. 3 ways to avoid getting errormessages... | by Eden Au | Towards DataScience</strong></em></a></li>\n<li>[✅] <a href=\"https://rtyley.github.io/bfg-repo-cleaner/\"><em><strong>BFG Repo-Cleaner by rtyley</strong></em></a></li>\n<li>[✅] <a href=\"https://github.community/t/how-can-i-download-a-specific-folder-from-a-github-repo/278\"><em><strong>How can I download a specific folder from a GitHub repo? - GitHub Help/ How to use Git and GitHub - GitHub SupportCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.google.com/document/d/e/2PACX-1vS9N2Ushu10Gb9pT2WrP1tZg61Q7L4nidlNQs7IB7y828fR_vOKyGaq4pWszcCwyOYr4ttMag-UM_Uu/pub\"><em><strong>Resume</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/#/m/p258860576/dashboard/overview?params=_u..nav%3Dclassic\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://datastudio.google.com/u/0/reporting/0B5FF6JBKbNJxOWItcWo2SVVVeGc/page/LjD\"><em><strong>Welcome to Data Studio! (Start here) › Nextsteps</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/datastudio/connector/get-started\"><em><strong>Get Started with Community Connectors | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://codelabs.developers.google.com/codelabs/community-connectors#5\"><em><strong>Connect and visualize all your data in DataStudio</strong></em></a></li>\n<li>[✅] <a href=\"https://groups.google.com/g/data-studio-developers/c/p9xSxN_O8GM\"><em><strong>[Opportunity]: Be a Community Visualizations LaunchPartner</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/datastudio/visualization/developer-preview/\"><em><strong>Community Visualizations Developer Preview | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/datastudio/visualization/define-config\"><em><strong>Defining the visualization config | CommunityVisualizations</strong></em></a></li>\n<li>[✅] <a href=\"https://script.google.com/home/start\"><em><strong>Getting Started - Apps Script</strong></em></a></li>\n<li>[✅] <a href=\"https://codelabs.developers.google.com/codelabs/webauthn-reauth#1\"><em><strong>Build your first WebAuthnapp</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.com/edit/#!/entertaining-night-garment\"><em><strong>Glitch :･ﾟ ✧</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.com/edit/#!/planet-sore-dragon?path=.env%3A1%3A0\"><em><strong>Glitch:･ﾟ ✧</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.com/edit/#!/planet-sore-dragon?path=README.md%3A1%3A0\"><em><strong>Glitch:･ﾟ ✧</strong></em></a></li>\n<li>[✅] <a href=\"https://fourtonfish.com/projects/\"><em><strong>Projects 💻 | Four Ton Fish</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.happyfox.com/kb/section/6/\"><em><strong>Projects - Glitch Support</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.happyfox.com/?login=1\"><em><strong>Login - Glitch Support</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.happyfox.com/kb/article/5-will-glitch-clean-up-my-code-formatting/\"><em><strong>Will Glitch clean up my code formatting? - GlitchSupport</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.com/help/kb/article/18-how-do-i-store-secrets-credentials-or-private-data/\"><em><strong>How do I store secrets, credentials or private data? - GlitchSupport</strong></em></a></li>\n<li>[✅] <a href=\"https://glitch.com/edit/#!/hello-express\"><em><strong>README.md -- hello-express</strong></em></a></li>\n<li>[✅] <a href=\"https://support.glitch.com/\"><em><strong>(1) Glitch Support</strong></em></a></li>\n<li>[✅] <a href=\"https://pdfcrowd.com/doc/api/\"><em><strong>Pdfcrowd API - Convert between images, HTML andPDF</strong></em></a></li>\n<li>[✅] <a href=\"https://pdfcrowd.com/playground/html-to-pdf/215489555df04ee1a871/\"><em><strong>Pdfcrowd APIPlayground</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sohamkamani.com/blog/javascript/2018-06-24-oauth-with-node-js/\"><em><strong>Implementing OAuth 2.0 with Node.js🔐</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>NORWEX {#norwex add<em>date=\"1640716651\" last</em>modified=\"1640717143\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://cloud.mongodb.com/v2/602ab21c5ea9a66164cb9ea6#clusters\"><em><strong>Clusters | Atlas: MongoDBAtlas</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.digitalocean.com/apps/2dbced50-862f-4cc5-ad63-2d4ce73e7591?i=cf4d7b\"><em><strong>sample-react - DigitalOcean AppPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.digitalocean.com/databases/db-postgresql-nyc1-36625?i=cf4d7b\"><em><strong>Database -DigitalOcean</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/cloudshell/home?region=us-west-2#55cbb775-5cb7-4a60-907a-d3c6d0bc3816\"><em><strong>AWSCloudShell</strong></em></a></li>\n<li>[✅] <a href=\"https://www.developerdrive.com/20-best-tools-for-react-development/\"><em><strong>20 Best Tools for React Development - DeveloperDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://reactstudio.com/\"><em><strong>React Studio</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.mongodb.com/v2#/org/602fce78f7612354fa1876dd/projects\"><em><strong>Projects | Cloud: MongoDBCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.mongodb.com/realm/services/json-expressions/\"><em><strong>JSON Expressions --- MongoDBRealm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.smashingmagazine.com/2009/06/45-incredibly-useful-web-design-checklists-and-questionnaires/\"><em><strong>45 Incredibly Useful Web Design Checklists and Questionnaires ---SmashingMagazine</strong></em></a></li>\n<li>[✅] <a href=\"https://googlechrome.github.io/lighthouse/viewer/?psiurl=https%3A%2F%2Fgoofy-euclid-1cd736.netlify.app%2F&#x26;strategy=mobile&#x26;category=performance&#x26;category=accessibility&#x26;category=best-practices&#x26;category=seo&#x26;category=pwa&#x26;utm_source=lh-chrome-ext\"><em><strong>Lighthouse ReportViewer</strong></em></a></li>\n<li>[✅] <a href=\"https://flounder-flower-xpaw.squarespace.com/config/settings/advanced/import-export\"><em><strong>Resources---</strong></em></a></li>\n<li>[✅] <a href=\"https://app.snipcart.com/dashboard/discounts\"><em><strong>Dashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://norwex.vercel.app/\"><em><strong>https://norwex.vercel.app</strong></em></a></li>\n<li>[✅] <a href=\"https://www.back4app.com/docs/get-started/welcome\"><em><strong>Welcome to Back4App Documentation | Back4appGuides</strong></em></a></li>\n<li>[✅] <a href=\"https://www.back4app.com/docs/get-started/parse-sdk\"><em><strong>Add Back4App to your App project | Back4appGuides</strong></em></a></li>\n<li>[✅] <a href=\"https://parse-dashboard.back4app.com/apps/b0062eac-d6cd-40fe-bfc7-12a3189a0880/browser\"><em><strong>undefined - ParseDashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://www.back4app.com/database/search\"><em><strong>Databases | Database Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://parse-dashboard.back4app.com/apps/9e5db051-bc0a-483a-8404-3ffbcf985372/browser/link\"><em><strong>link - ParseDashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://www.back4app.com/database/back4app/user-registration-template\"><em><strong>Complete User Registration | DatabaseHub</strong></em></a></li>\n<li>[✅] <a href=\"https://www.back4app.com/database/how-it-works\"><em><strong>How it works | DatabaseHub</strong></em></a></li>\n<li>[✅] <a href=\"https://gitlab.com/bryan.guner.dev/web-dev-notes-resource-site1\"><em><strong>Bryan Guner / Web Dev Notes Resource Site1 ·GitLab</strong></em></a></li>\n<li>[✅] <a href=\"https://norwex.biz/en_US/blog/biobased\"><em><strong>Norwex USA</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/agitated-villani-11a1f4/deploys/603428b2162e2f00c130d1b1\"><em><strong>Deploy details |agitated-villani-11a1f4</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/forms/notifications/\"><em><strong>Form notifications | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/one-click-hugo-cms/import\"><em><strong>bgoonz/one-click-hugo-cms: Import aRepository</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.digitalocean.com/networking/domains/tw85i7mu.epizy.com?i=cf4d7b\"><em><strong>Control Panel -DigitalOcean</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sitepoint.com/ultimate-testing-checklist/\"><em><strong>The Ultimate Testing Checklist -SitePoint</strong></em></a></li>\n<li>[✅] <a href=\"https://www.searchenginejournal.com/evaluate-website-quality/233555/#close\"><em><strong>50 Questions You Must Ask to Evaluate the Quality of YourWebsite</strong></em></a></li>\n<li>[✅] <a href=\"https://terrymorris.net/bestpractices/\"><em><strong>Web Design Best PracticesChecklist</strong></em></a></li>\n<li>[✅] <a href=\"http://drpete.co/?topic=25-point-website-usability-checklist\"><em><strong>25-point Website Usability Checklist --DrPete.co</strong></em></a></li>\n<li>[✅] <a href=\"http://www.bestwebdesignschools.com/2009/usabilityedu-25-incredibly-useful-usability-cheat-sheets-checklists/\"><em><strong>Usability.Edu: 25 Incredibly Useful Usability Cheat Sheets &#x26; Checklists| Designer City,USA</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/common-sense-seo-checklist/\"><em><strong>Common Sense SEO Checklist |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sitepoint.com/ultimate-seo-checklist/\"><em><strong>The Ultimate SEO Checklist -SitePoint</strong></em></a></li>\n<li>[✅] <a href=\"http://maxdesign.com.au/news/checklist/\"><em><strong>Web standards checklist</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/\"><em><strong>YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://rockthecradle.herokuapp.com/\"><em><strong>Rock the Cradle</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/registration-confirmation/\"><em><strong>RegistrationConfirmation</strong></em></a></li>\n<li>[✅] <a href=\"https://imgur.com/gallery/XQ0LqyA\"><em><strong>Norwex - Imgur</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/billing/home?#/\"><em><strong>Billing ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloud9/ide/d9dcb43345934f86bec541f5e832b25e\"><em><strong>bgoon - AWSCloud9</strong></em></a></li>\n<li>[✅] <a href=\"https://imgur.com/a/OmuV5YB\"><em><strong>Imgur: The magic of the Internet</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mongodb.com/how-to/use-atlas-on-heroku/\"><em><strong>Using MongoDB Atlas onHeroku</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/insights/?resource_id=https%3A%2F%2Fbgoonz-blog.netlify.app%2F&#x26;hl=en\"><em><strong>Siteoverview</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/lydiahallie/javascript-visualized-promises-async-await-5gke\"><em><strong>⭐️🎀 JavaScript Visualized: Promises &#x26; Async/Await -DEV</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/b/0/AddMailService\"><em><strong>Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://youtube.com/\"><em><strong>YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://maps.google.com/\"><em><strong>Maps</strong></em></a></li>\n<li>[✅] <a href=\"https://alf.nu/RegexGolf\"><em><strong>Regex Golf</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgxwKkRPFZWvGwtwmlzFsWktrmRpm\"><em><strong>What is the best future cryptocurrency? - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://fontawesome.com/start/confirm\"><em><strong>Start Confirmation | FontAwesome</strong></em></a></li>\n<li>[✅] <a href=\"https://www.knowi.com/blog/what-is-elastic-search/\"><em><strong>Elasticsearch: What it is, How it works, and what it's usedfor</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/elastic/elasticsearch\"><em><strong>elastic/elasticsearch: Open Source, Distributed, RESTful SearchEngine</strong></em></a></li>\n<li>[✅] <a href=\"https://www.elastic.co/downloads/elasticsearch\"><em><strong>Download Elasticsearch Free | Get Started Now | Elastic |Elastic</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=how+to+run+a+bat+file+from+cmd&#x26;rlz=1C1UEAD_enUS928US928&#x26;oq=how+to+run+a+bat+file+&#x26;aqs=chrome.1.69i57j0i457j0l4j0i395l4.7136j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>how to run a bat file from cmd - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-install.html\"><em><strong>Get Elasticsearch up and running | Elasticsearch Reference [7.10] |Elastic</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.elastic.co/deployments/d13f360dd89346b3bcdad11d3e611b91\"><em><strong>[d13f36] Overview --- ElasticCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/6.8/get-started-enable-security.html\"><em><strong>Enable Elasticsearch security features | Elasticsearch Reference[6.8] |Elastic</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises\"><em><strong>Using Promises - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\"><em><strong>RegExp - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/920fb6ab9d0a/edit\"><em><strong>Editing Bash Commands That Save Me Time and Frustration --Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://reposhub.com/python-full-stack-web-frameworks?sort_by=star\"><em><strong>164+ Best Python Web Frameworks frameworks, libraries, software andresourcese</strong></em></a></li>\n<li>[✅] <a href=\"https://reposhub.com/search/?repo=1&#x26;term=react&#x26;catalogId=all&#x26;pg=2\"><em><strong>5204+ results found in all categories |ReposHub</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/ee4f14d4d117f4e2b175d6c8c6a2f582\"><em><strong>react-skills</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes\"><em><strong>Ebazhanov/linkedin-skill-assessments-quizzes: Full reference ofLinkedIn answers 2021 for skill assessments, LinkedIn test, questionsand answers (aws-lambda, rest-api, javascript, react, git, html, jquery,mongodb, java, css, python, machine-learning, power-point) linkedinexcel test lösungen, linkedin machine learningtest</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=WebDevHub+netlify&#x26;sxsrf=ALeKk01rMI1W6QSY6bTSzTJwoxhS1AVYEw%3A1625290780664&#x26;ei=HPjfYJqIKIbKtQa7rJuYBQ&#x26;oq=WebDevHub+netlify&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyBwghEAoQoAE6BwgAEEcQsAM6BAgjECc6BggAEAoQHjoICAAQFhAKEB5KBAhBGABQq8gEWPjZBGD22wRoAXACeACAAVaIAcYGkgECMTKYAQCgAQGqAQdnd3Mtd2l6yAEEwAEB&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwiaho39l8bxAhUGZc0KHTvWBlMQ4dUDCA8&#x26;uact=5\"><em><strong>WebDevHub netlify - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://stackshare.io/api#plans\"><em><strong>StackShare API (Beta) - get the tech stack behind over 1.5 millioncompanies and counting | StackShare</strong></em></a></li>\n<li>[✅] <a href=\"https://stackshare.io/feed/advice\"><em><strong>Stack Advice | StackShare</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/graphql/graphiql\"><em><strong>graphql/graphiql: GraphiQL &#x26; the GraphQL LSP Reference Ecosystem forbuilding browser &#x26; IDE tools.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/graphql/graphiql/tree/main/examples\"><em><strong>graphiql/examples at main ·graphql/graphiql</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/graphiql-js-next-example-forked-z1pew\"><em><strong>graphiql-js-next-example (forked) -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/github/react-bootstrap/code-sandbox-examples/tree/master/basic\"><em><strong>CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/html/html_formatting.asp\"><em><strong>HTML TextFormatting</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz\"><em><strong>bgoonz's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab\"><em><strong>How to add a collapsible section inmarkdown.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/linktree\"><em><strong>bgoonz/linktree</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/MichaelBarney/LinkFree\"><em><strong>MichaelBarney/LinkFree: A free and open source alternative toLinkTree</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.pusher.com/apps/1229152/getting_started\"><em><strong>Getting Started - slick-valley-728 - Channels -Pusher</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/composer-cli\"><em><strong>composer-cli - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.labnol.org/internet/github-gist-tutorial/28499/\"><em><strong>What You Can Do With Gists on Github? - DigitalInspiration</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/fredrick?page=6\"><em><strong>fredrick's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/notslang/tidy-markdown\"><em><strong>notslang/tidy-markdown: Beautify Markdown, fixing formatting mistakesand standardizing syntax</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/tidy-markdown\"><em><strong>tidy-markdown - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://joeyh.name/code/moreutils/\"><em><strong>moreutils</strong></em></a></li>\n<li>[✅] <a href=\"http://myrepos.branchable.com/\"><em><strong>myrepos</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/stigtsp/moreutils\"><em><strong>stigtsp/moreutils: moreutils - forked fromgit://git.joeyh.name/moreutils</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/how-i-analyzed-a-million-medium-articles-to-learn-how-many-claps-great-stories-get-d688cf92759f/\"><em><strong>How I analyzed a million Medium articles to learn how many claps greatstoriesget</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/harrisonjansma/2020_Notes\"><em>**harrisonjansma/2020</em>Notes: A collection of notes regarding varioustopics. (Bash, PyTorch, Spark,etc.)**_</a></li>\n<li>[✅] <a href=\"https://medium.com/search/tags?q=Web\"><em><strong>Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/web-dev-notes-resource-site/network\"><em><strong>Network Graph ·bgoonz/web-dev-notes-resource-site</strong></em></a></li>\n<li>[✅] <a href=\"https://wakatime.com/dashboard\"><em><strong>Dashboard · WakaTime</strong></em></a></li>\n<li>[✅] <a href=\"https://badgerati.github.io/Pode/Getting-Started/FirstApp/\"><em><strong>Building your first Pode app -Pode</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/@japheth.yates/the-complete-wsl2-gui-setup-2582828f4577\"><em><strong>The complete WSL2 + GUI setup. |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://www.cs.usfca.edu/~galles/visualization/source.html\"><em><strong>Data StructureVisualization</strong></em></a></li>\n<li>[✅] <a href=\"https://vimeo.com/499765814/af0e465cbd\"><em><strong>Oct-JSX and React Router Intro October onVimeo</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/cloudformation/designer/home?region=us-west-2&#x26;templateURL=https%3A%2F%2Fs3.us-west-2.amazonaws.com%2Fcloudformation-templates-us-west-2%2FWindows_Roles_And_Features.template#\"><em><strong>AWS CloudFormationDesigner</strong></em></a></li>\n<li>[✅] <a href=\"http://www.employee-at-will.com/swagger-ui.html#/web-mvc-links-handler\"><em><strong>SwaggerUI</strong></em></a></li>\n<li>[✅] <a href=\"https://swapi.dev/documentation\"><em><strong>SWAPI - The Star Wars API</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/@wcd/bgoonz.02-using-effects-fork-klwaxmkx\"><em><strong>@wcd/bgoonz.02-using-effects-fork-klwaxmkx -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW1\"><em><strong>Optimizing WebContent</strong></em></a></li>\n<li>[✅] <a href=\"https://dezadkins.github.io/#main\"><em><strong>Dez Adkins | Full-Stack Software Engineer &#x26; AudioEngineer</strong></em></a></li>\n<li>[✅] <a href=\"https://zube.io/bgoonz/test/epics\"><em><strong>test | Epics</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/watch?v=xNc-xhH8kkk&#x26;ab_channel=FreeToChooseNetwork\"><em><strong>(5) Milton Friedman Speaks - Myths That Conceal Reality -YouTube</strong></em></a></li>\n<li>[✅] <a href=\"http://solam.co/loops/music-making-web-browser.htm\"><em><strong>Music making on the Web browser (a collection of tool URLs) - ...Loopsmultiplayer musicperformances</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pluralsight.com/guides/using-fetch-with-github-api-v3\"><em><strong>Using Fetch with Github API V3 |Pluralsight</strong></em></a></li>\n<li>[✅] <a href=\"https://us6.admin.mailchimp.com/login/verify/\"><em><strong>Login Verification |Mailchimp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/commits/master?before=dd6e4cf8fb2af22d573780908c0541b9a3c60cc9+245&#x26;branch=master\"><em><strong>stab</strong></em></a></li>\n<li>[✅] <a href=\"https://www.section.io/engineering-education/authors/saiharsha-balasubramaniam/\"><em><strong>Saiharsha Balasubramaniam | Engineering Education (EngEd) Program |Section</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/wowchemy\"><em><strong>Wowchemy</strong></em></a></li>\n<li>[✅] <a href=\"https://snipcart.com/blog/jamstack\"><em><strong>The Jamstack in 2021: Why (and How) to Get Started -Snipcart</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/walmartglobaltech/time-series-similarity-using-dynamic-time-warping-explained-9d09119e48ec\"><em><strong>Time Series Similarity Using Dynamic Time Warping -Explained | byAbhishek Mishra | Walmart Global Tech Blog |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://freefrontend.com/javascript-carousels/\"><em><strong>37 JavaScriptCarousels</strong></em></a></li>\n<li>[✅] <a href=\"https://transform.tools/css-to-js\"><em><strong>CSS to JS Objects</strong></em></a></li>\n<li>[✅] <a href=\"http://linuxcommand.org/lc3_adv_new_script.php\"><em>**Linux Command Line Adventure:new</em>script**_</a></li>\n<li>[✅] <a href=\"https://sayed.cyou/#resume\"><em><strong>Abu Sayed -- Best Web, Game, XR | Developer | Engineer |BANGLADESH</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>RESOURCES {#resources add<em>date=\"1640717067\" last</em>modified=\"1640718980\"}### Lambda {#lambda add<em>date=\"1640716651\" last</em>modified=\"1640717406\"}</h3>\n<ul>\n<li>[✅] <a href=\"http://javascriptguide.herokuapp.com/\"><em><strong>JavaScript Guide</strong></em></a></li>\n<li>[✅] <a href=\"https://open.appacademy.io/login\"><em><strong>App Academy Open</strong></em></a></li>\n<li>[✅] <a href=\"https://sites.google.com/bartimee.com/opticos-studios/home?authuser=0\"><em><strong>OpticosStudios</strong></em></a></li>\n<li>[✅] <a href=\"https://phoenixnap.com/kb/tag/nodejs\"><em><strong>nodejs Archives | Knowledge Base byphoenixNAP</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/HubSpot\"><em><strong>HubSpot</strong></em></a></li>\n<li>[✅] <a href=\"https://free-for.dev/#/?id=artifact-repos\"><em><strong>Free for developers</strong></em></a></li>\n<li>[✅] <a href=\"https://web.dev/measure/\"><em><strong>Measure</strong></em></a></li>\n<li>[✅] <a href=\"https://imagetagger.bit-bots.de/tools/\"><em><strong>Bit-Bots ImageTagger</strong></em></a></li>\n<li>[✅] <a href=\"https://app.hackernoon.com/stats\"><em><strong>Hacker Noon 2.0</strong></em></a></li>\n<li>[✅] <a href=\"https://zube.io/bgoonz/test/w/workspace-1/kanban\"><em><strong>Workspace 1 |Kanban</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/github\"><em><strong>GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://nootropicsdepot.com/phenylpiracetam-100mg-capsules/?gclid=Cj0KCQjwvr6EBhDOARIsAPpqUPFsx3_Lf2tCCe8Wt0ZrenS2fzYBAwoyZii9iqL5JSUf3z1yzIrvLwwaAruPEALw_wcB\"><em><strong>Buy Phenylpiracetam Capsules | NootropicsDepot</strong></em></a></li>\n<li>[✅] <a href=\"https://app.launchdarkly.com/default/production/quickstart\"><em><strong>Quickstart -tutorial</strong></em></a></li>\n<li>[✅] <a href=\"https://pdf2md.morethan.io/\"><em><strong>PDF to Markdown</strong></em></a></li>\n<li>[✅] <a href=\"https://greasyfork.org/en/scripts/by-site/medium.com\"><em><strong>User scripts formedium.com</strong></em></a></li>\n<li>[✅] <a href=\"https://airtable.com/shrEWfoUwxdiirz6Z\"><em><strong>Labs Matching Form (FT39)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz?tab=followers\"><em><strong>Your Followers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/Labs-Products-3bb84f4061c3482fa1e364df53958436\"><em><strong>LabsProducts</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/Roadmap-Human-Rights-First-Blue-Witness-cf3845cacc04456db5f8f51829126d31\"><em><strong>Roadmap: Human Rights First: BlueWitness</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.zoom.us/j/8192480906?_x_zm_rtaid=rKDyyMtsRseJ0gQXA1kX4Q.1632759883775.803c44d9cd9b53f4b61eb21b3b754e3c&#x26;_x_zm_rhtaid=617#success\"><em><strong>Launch Meeting -Zoom</strong></em></a></li>\n<li>[✅] <a href=\"https://airtable.com/shrJuhl4XMMAkZiil/tbltOGDrMIhMTXSeo/viwCHhwcrK7xJJ8Ha/recGgAot6vVkbsE3l\"><em><strong>Airtable - Labs FT39 (TeamView)</strong></em></a></li>\n<li>[✅] <a href=\"https://drive.google.com/drive/folders/1TFUiSL74BDd16by4NFXzJ3SpQXPRTnym\"><em><strong>HRF Asylum - GoogleDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://login.okta.com/?SAMLRequest=fc%2B7CsJAEAXQXvAflu1NNJUMeZBGELTx1a%2FrYILJTtyZGD%2FfSBRiYzlw77lMnD3rSj3Qc0ku0YtgrhU6S5fSXRN9PKxmS52l00nMpq6iBvJWCrfDe4ss6vStRe9aDzmGIZfo1jsgwyWDMzUyiIV9vt1AH4XGk5ClSvewUgMNa%2BYW%2FVj5jxhm9NLP67QQaSAMu64L6CYmsFSHlnzT4ZlLwTgcL6Sf8%2FeX9AU%3D\"><em><strong>Okta AccountChooser</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/michaelquintdev\"><em><strong>michaelquintdev (Michael Quint)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz\"><em><strong>bgoonz (Bryan C Guner)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.figma.com/files/recent?fuid=952681639916081043\"><em><strong>Recently viewed --Figma</strong></em></a></li>\n<li>[✅] <a href=\"https://calendar.google.com/calendar/u/0/r?cid=Y19mMTZidmhuc2RzcDhlcGNrY2luc3U0OTc4Z0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t\"><em><strong>Google Calendar - 4 days, starting Monday, September 27,2021</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.notion.site/Labs-Learner-Guide-cd09a9c47fd14f36a8b7fec281d871c1\"><em><strong>Labs LearnerGuide</strong></em></a></li>\n<li>[✅] <a href=\"https://secondcareerdevs.com/\"><em><strong>Second Career Devs | Home</strong></em></a></li>\n<li>[✅] <a href=\"https://devjourney.info/\"><em><strong>Every journey starts with one step | DevJourneyPodcast</strong></em></a></li>\n<li>[✅] <a href=\"https://noke.com/\"><em><strong>Nokē | Smart Security Solutions</strong></em></a></li>\n<li>[✅] <a href=\"https://app.meratas.com/dashboard\"><em><strong>Meratas</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/u/1/project/lambda-prep/functions\"><em><strong>lambda-prep -- Functions -- Firebaseconsole</strong></em></a></li>\n<li>[✅] <a href=\"https://fireship.io/lessons/firebase-quickstart/\"><em><strong>Firebase Quickstart</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/route53/v2/hostedzones#ListRecordSets/Z0468584ECPQ4P88HZMO\"><em><strong>Route 53 Console HostedZones</strong></em></a></li>\n<li>[✅] <a href=\"https://app.sli.do/event/qsqwkhz9/live/questions\"><em><strong>User Interface I</strong></em></a></li>\n<li>[✅] <a href=\"https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb#scrollTo=wKJ4bd5rt1wy\"><em><strong>colab-github-demo.ipynb -Colaboratory</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/30-seconds\"><em><strong>30 seconds</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/custom-search/docs/tutorial/introduction\"><em><strong>Introduction | Programmable Search Engine | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://app.daily.dev/bgoonz\"><em><strong>Bryan C Guner | daily.dev</strong></em></a></li>\n<li>[✅] <a href=\"https://disk.yandex.com/client/disk\"><em><strong>Yandex.Disk</strong></em></a></li>\n<li>[✅] <a href=\"https://shepherdjs.dev/\"><em><strong>Shepherd --- Guide your users through a tour of yourapp.</strong></em></a></li>\n<li>[✅] <a href=\"https://themes.3rdwavemedia.com/bootstrap-templates/resume/free-bootstrap4-resume-cv-template-for-developers-pillar/\"><em><strong>Pillar - Free Bootstrap 4 Resume/CV Template for Developers | UX &#x26;Bootstrap</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/#gsc.tab=0\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://random-list-of-embedable-content.vercel.app/#gsc.tab=0\"><em><strong>Document</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1173\"><em><strong>WEB43 - 2.1 - AppliedJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1145\"><em><strong>WEB43 - 2.2 - Intro toReact</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1148\"><em><strong>WEB43 - 2.3 - Single PageApplications</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1120\"><em><strong>WEB43 - 2.4 - WEB Unit 2Build</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1248\"><em><strong>WEB43 - 3.1 - AdvancedReact</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1218\"><em><strong>WEB43 - 3.2 - Advanced StateManagement</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1239\"><em><strong>WEB43 - 3.3 - Advanced WebApplications</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1219\"><em><strong>WEB43 - 3.4 - WEB Unit 3Build</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-games/deploys/6102010e8520650008be1fa2\"><em><strong>Deploy details |Deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-games.netlify.app/\"><em><strong>CodePen - Responsive iFrames PatternGrid</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.blogspot.com/\"><em><strong>web-dev-hub</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326#/docs/gallery\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/400\"><em>**(2) hi by bgoonz · Pull Request #400 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs\"><em><strong>Web Dev Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/#gsc.tab=0\"><em><strong>Web Dev Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/would-you-rather-1#wyr/templates/index.html\"><em><strong>would you rather 🟦🟥-1 -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Games\"><em><strong>bgoonz/Games</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/Games/\"><em><strong>CodePen - Responsive iFrames PatternGrid</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/configure-builds/file-based-configuration/\"><em><strong>File-based configuration | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://programmablesearchengine.google.com/cse/lookandfeel/customize?cx=b9b42c05e18ccf4ab\"><em><strong>Programmable Search - Customize look andfeel</strong></em></a></li>\n<li>[✅] <a href=\"https://programmablesearchengine.google.com/cse/setup/basic?cx=b9b42c05e18ccf4ab\"><em><strong>Programmable Search -Basic</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addthis.com/dashboard#gallery/pub/ra-60dcec1ece575946\"><em><strong>AddThis Dashboard | ToolGallery</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda\"><em><strong>bgoonz/Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/pageres\"><em><strong>Web-Dev-Collaborative/pageres: Capture websitescreenshots</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/pkrumins?tab=repositories&#x26;q=&#x26;type=source&#x26;language=javascript&#x26;sort=\"><em><strong>pkrumins (Peter Krumins) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/start/repos/Lambda-April%2FLinks\"><em><strong>Create a new site |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://elements.envato.com/?irgwc=1&#x26;clickid=09Ny6rRzWxyLRYawUx0Mo372UkESVU0%3ANwBpzQ0&#x26;iradid=298927&#x26;utm_campaign=elements_af_78798&#x26;iradtype=ONLINE_TRACKING_LINK&#x26;irmptype=mediapartner&#x26;utm_medium=affiliate&#x26;utm_source=impact_radius&#x26;mp=Speckyboy%20Design%20Magazine\"><em><strong>Envato Elements: Unlimited Stock Videos, Music, Photos &#x26;Graphics</strong></em></a></li>\n<li>[✅] <a href=\"https://www.browserling.com/about\"><em><strong>About Browserling Inc.</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn/The-most-useful-python-modules-for-beginners/51066\"><em><strong>The most useful python modules for beginners -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn/Replit-Git-Tutorial/23331\"><em><strong>Repl.it + Git Tutorial -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn/count-the-number-of-visits-to-a-website-using-Expressjs-MongoDB-part-1/25480\"><em><strong>count the number of visits to a website using Express.js, MongoDB -part1 -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn/Replit-DB/43305\"><em><strong>Repl.it DB - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@RolandJLevy/css-image-gallery-with-slides\"><em><strong>css: image gallery with slides -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@RolandJLevy/js-useful-apis\"><em><strong>js: useful apis -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@RolandJLevy/js-audio-sound-play\"><em><strong>js: audio sound play -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@RolandJLevy/js-speech-to-text-app\"><em><strong>js: speech-to-text-app -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/js-all-in-one-search-with-autocomplete\"><em><strong>Web-Dev-Collaborative/js-all-in-one-search-with-autocomplete</strong></em></a></li>\n<li>[✅] <a href=\"https://js-all-in-one-search-with-autocomplete.rolandjlevy.repl.co/\"><em><strong>All-in-one Search🔍</strong></em></a></li>\n<li>[✅] <a href=\"https://rolandlevy.co.uk/#projects\"><em><strong>Roland's portfolio 👨‍💻</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/portfolio-website/network/members\"><em><strong>Forks ·Web-Dev-Collaborative/portfolio-website</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sitepoint.com/dom-tips-techniques-parent-child-siblings/\"><em><strong>DOM Tips and Techniques: Parent, Child, and Siblings -SitePoint</strong></em></a></li>\n<li>[✅] <a href=\"https://modest-booth-4e17df.netlify.app/directory.html\"><em>**C:/MY-WEB-DEV/\\</em>_Projects/Medium<em>Articles**</em></a></li>\n<li>[✅] <a href=\"https://modest-booth-4e17df.netlify.app/originals/2021-03-06_postgresql-setup-for-windows---wsl-ubuntu-801672ab7089\"><em><strong>PostgreSQL Setup For Windows &#x26;WSL/Ubuntu</strong></em></a></li>\n<li>[✅] <a href=\"https://modest-booth-4e17df.netlify.app/originals/2021-03-05_express-quick-sheet-8f93762c59ca\"><em><strong>Express QuickSheet</strong></em></a></li>\n<li>[✅] <a href=\"https://modest-booth-4e17df.netlify.app/originals/2021-03-06_emmet-cheat-sheet-24758e628d37\"><em><strong>Emmet CheatSheet</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/github/carbon-design-system/ibm-dotcom-library/tree/master/packages/react/examples/codesandbox/components/ButtonGroup\"><em><strong>Loading... -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/github/carbon-design-system/carbon/tree/main/packages/react/examples/custom-data-table-state-manager\"><em><strong>carbon-components-react-example-fully-customized-data-table -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/kind-waterfall-i0h8p\"><em><strong>kind-waterfall-i0h8p -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/github/carbon-design-system/carbon/tree/main/packages/components/examples/codesandbox?file=/src/index.js\"><em><strong>carbon-components-getting-started -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/dashboard/f9296337-b3bc-4dfc-8a42-2af2b6425579/sites/2b48510b-2d18-4a80-94bd-3494b9f0e2ae/settings/general\"><em><strong>Gatsby Cloud | gatsby-gitbook-starter | SiteSettings</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/dashboard/organization/f9296337-b3bc-4dfc-8a42-2af2b6425579/sites/provision/organization\"><em><strong>GatsbyCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/8bi3kosknnn4/entries/5UxuJGeP3irgQmFkPhDFK1?previousEntries=3prNQrzzp00phXBxPut7jb,2XNR9ZPfpYxTxDIsWPGZZU,7rAwllcIgfMmDotTDmTlVZ\"><em><strong>dani california --- Content --- Contentful Apps ---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/8bi3kosknnn4/entries/4rjEnhW5Rge0lcYk0Jw6Yk?previousEntries=3prNQrzzp00phXBxPut7jb,2XNR9ZPfpYxTxDIsWPGZZU\"><em><strong>Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://compose.contentful.com/spaces/8bi3kosknnn4/page/4FEkMRmbdbCGwslxwdeefn\"><em><strong>Content - Contentful Apps - ContentfulCompose</strong></em></a></li>\n<li>[✅] <a href=\"https://launch.contentful.com/spaces/i31un640bs1z\"><em><strong>Contentful Launch</strong></em></a></li>\n<li>[✅] <a href=\"https://compose.contentful.com/spaces/i31un640bs1z/setup/getting-started\"><em><strong>ContentfulCompose</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/i31un640bs1z/home\"><em><strong>Space home --- mywebdev ---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/gatsbyjs/gatsby/tree/master/docs/docs\"><em><strong>gatsby/docs/docs at master ·gatsbyjs/gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/P7DAHWQACD/dashboard\"><em><strong>Overview | Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/knowledge-bas42/deploys\"><em><strong>Deploys |knowledge-bas42</strong></em></a></li>\n<li>[✅] <a href=\"https://master--knowledge-bas42.netlify.app/\"><em><strong>Welcome to the Contentful help center | Contentful helpcenter</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/knowledge-base/tree/master\"><em><strong>bgoonz/knowledge-base</strong></em></a></li>\n<li>[✅] <a href=\"https://knowledge-bas42.netlify.app/\"><em><strong>Welcome to the Contentful help center | Contentful helpcenter</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/i31un640bs1z/api/keys/1aDtx7CNJhiz4tzYU0vAO9\"><em><strong>APIs --- mywebdev --- master-2021-05-07 ---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=issues+downloading+zip+files+from+github&#x26;oq=issues+downloading+zip+files+from+github&#x26;aqs=chrome..69i57j33i22i29i30l4.8940j1j15&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>issues downloading zip files from github - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/overview\"><em><strong>Team overview | Bryan C Guner'steam</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/domains-https/netlify-dns/?_ga=2.62273577.467205373.1622769350-706151009.1622769350\"><em><strong>Netlify DNS | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://mediatemple.net/blog/web-development-tech/10-tips-before-you-buy-a-domain-name/\"><em><strong>10 Tips Before You Buy a Domain Name - The Media TempleBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=best+web+development+github+repos&#x26;oq=best+web+development+github+repos&#x26;aqs=chrome..69i57j33i22i29i30.8548j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>best web development github repos - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://thesmartcoder.dev/9-popular-github-repos-for-every-web-developer/\"><em><strong>9 Popular GitHub Repos For Every WebDeveloper</strong></em></a></li>\n<li>[✅] <a href=\"https://levelup.gitconnected.com/10-github-repos-that-can-help-you-grow-as-a-web-developer-56a640d9771a\"><em><strong>10 GitHub Repos That Can Help You Grow as a Web Developer | by Daan |Level UpCoding</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/minimaxir/big-list-of-naughty-strings\"><em><strong>minimaxir/big-list-of-naughty-strings: The Big List of Naughty Stringsis a list of strings which have a high probability of causing issueswhen used as user-inputdata.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/DopplerHQ/awesome-interview-questions\"><em><strong>DopplerHQ/awesome-interview-questions: A curated awesome list of listsof interview questions. Feel free tocontribute!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LeCoupa/awesome-cheatsheets\"><em><strong>LeCoupa/awesome-cheatsheets: 👩‍💻👨‍💻 Awesome cheatsheets for popularprogramming languages, frameworks and development tools. They includeeverything you should know in one singlefile.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/leonardomso/33-js-concepts\"><em><strong>leonardomso/33-js-concepts: 📜 33 JavaScript concepts every developershould know.</strong></em></a></li>\n<li>[✅] <a href=\"https://thesmartcoder.dev/10-awesome-github-repos-every-web-developer-should-know/\"><em><strong>10 Awesome Github Repos Every Web Developer ShouldKnow</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative?language=&#x26;page=9&#x26;q=&#x26;sort=stargazers&#x26;type=\"><em><strong>Web-Dev-Collab</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/python-scripts\"><em><strong>bgoonz/python-scripts</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Learning-Assets\"><em><strong>bgoonz/Learning-Assets</strong></em></a></li>\n<li>[✅] <a href=\"http://ourpcsolution.blogspot.com/2014/01/run-trial-software-forever.html\"><em><strong>Top 5 ways to use trial software forever | Our PCSolution</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/custom-search/docs/element\"><em><strong>Programmable Search Element Control API | Programmable SearchEngine</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Full-Text-Search\"><em><strong>bgoonz/Full-Text-Search</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/domains-https/netlify-dns/dns-records/\"><em><strong>DNS records | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz.github.io\"><em><strong>bgoonz/bgoonz.github.io</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/My-Web-Dev-Archive\"><em><strong>bgoonz/My-Web-Dev-Archive:archive</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/sitemaps?resource_id=https%3A%2F%2Fflounder-flower-xpaw.squarespace.com%2F&#x26;hl=en\"><em><strong>Sitemaps</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschoolsso.okta.com/login/login.htm?fromURI=%2Fapp%2FUserHome&#x26;message=You+were+signed+out+because+your+session+timed+out.\"><em><strong>lambdaschool-org-177932 - SignIn</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschoolsso.okta.com/\"><em><strong>lambdaschool-org-177932 - Sign In</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.com/\"><em><strong>Online Coding School and Bootcamp | LambdaSchool</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=adding+google+search+bar+to+netlify+website&#x26;oq=adding+google+search+bar+to+netlify+website&#x26;aqs=chrome..69i57.11145j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>adding google search bar to netlify website - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlify.com/blog/2016/09/22/making-netlifys-website-fully-searchable/\"><em><strong>Making Netlify's website fully searchable |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://cse.google.com/cse/setup/advanced?cx=07d4440552681e18d\"><em><strong>Programmable Search -Advanced</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/performance/search-analytics?resource_id=https%3A%2F%2Fflounder-flower-xpaw.squarespace.com%2F\"><em><strong>Performance</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/webmasters/answer/9008080#domain_name_verification&#x26;zippy=%2Cdomain-name-provider\"><em><strong>Verify your site ownership - Search ConsoleHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://search.google.com/search-console/not-verified?original_url=/search-console/ownership&#x26;original_resource_id\"><em><strong>Welcome to Google SearchConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.reddit.com/r/learnprogramming/comments/cgbpli/netlify_website_is_not_visible_in_google_search/\"><em><strong>Netlify website is not visible in google search :learnprogramming</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps\"><em><strong>Personal apps | Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/heroku-cli#download-and-install\"><em><strong>The Heroku CLI | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=ubuntu+get+list+of+manually+installed+packages&#x26;oq=ubuntu+get+list+of+&#x26;aqs=chrome.1.69i57j35i39j0l8.5824j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>ubuntu get list of manually installed packages - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.iotransfer.net/tips/download-all-instagram-photos-from-any-user-670.php\"><em><strong>5 Quick Ways to Download All Instagram Photos from AnyUser</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Markdown-Templates\"><em><strong>bgoonz/Markdown-Templates</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TheAlgorithms\"><em><strong>The Algorithms</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TheAlgorithms/Python\"><em><strong>TheAlgorithms/Python: All Algorithms implemented inPython</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TheAlgorithms/Javascript\"><em><strong>TheAlgorithms/Javascript: A repository for All algorithms implementedin Javascript (for educational purposesonly)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/trekhleb/javascript-algorithms\"><em><strong>trekhleb/javascript-algorithms: 📝 Algorithms and data structuresimplemented in JavaScript with explanations and links to furtherreadings</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=Leetcode+python+solutions+github&#x26;safe=active&#x26;sxsrf=ALeKk00m2SCc2-qpPasXOApwZpPcLTowgA%3A1623053591196&#x26;ei=F9W9YP-yC43WtAbrnJ9I&#x26;oq=Leetcode+python+solutions+github&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyAggAOgcIABBHELADOgQIABANOgYIABAHEB46CAgAEAgQBxAeOgYIABANEB46CAgAEAgQDRAeUMBjWL1tYK9vaAFwAngAgAH8AYgB-AWSAQU3LjAuMZgBAKABAaoBB2d3cy13aXrIAQjAAQE&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwi_moTmiYXxAhUNK80KHWvOBwkQ4dUDCA4&#x26;uact=5\"><em><strong>Leetcode python solutions github - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/search?q=react\"><em><strong>Search · react</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/facebook/react\"><em><strong>facebook/react: A declarative, efficient, and flexible JavaScriptlibrary for building userinterfaces.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/my-lambda-projects/Lambda-School-Build-Weeks\"><em><strong>my-lambda-projects/Lambda-School-Build-Weeks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.javascripttutorial.net/nodejs-tutorial/npm-list/#:~:text=Use%20the%20npm%20list%20to,show%20packages%20in%20the%20devDependencies%20.\"><em><strong>An Essential Guide to npm list Command By PracticalExamples</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/anywherefitness/frontend/DwReJK5MMGDBojjDLgmCgPoxJ9nE\"><em><strong>frontend -- DeploymentOverview</strong></em></a></li>\n<li>[✅] <a href=\"https://frontend-36d746b4y-anywherefitness.vercel.app/login\"><em><strong>AnywhereFitness</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps/anywherefitnessbe43/deploy/heroku-git\"><em><strong>anywherefitnessbe43 · Heroku-git |Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps/anywherefitnessbe43/resources\"><em><strong>anywherefitnessbe43 · Resources |Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps/secret-peak-42801/deploy/github\"><em><strong>secret-peak-42801 · GitHub |Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps/secret-peak-42801/activity/builds/735d9d2d-a601-4c03-8c48-a3805974defd\"><em><strong>secret-peak-42801 · Build |Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/heroku-postgresql#provisioning-heroku-postgres\"><em><strong>Heroku Postgres | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=vscode+map+imports+and+exports&#x26;oq=vscode+map+imports+and+exports&#x26;aqs=chrome..69i57j33i299.7170j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>vscode map imports and exports - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/heroku/legacy-cli/issues/1366\"><em><strong>Unable to heroku login because of .netrc permission issue · Issue#1366 ·heroku/legacy-cli</strong></em></a></li>\n<li>[✅] <a href=\"https://knexjs.org/\"><em><strong>Knex.js - A SQL Query Builder for Javascript</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/NigelEarle/80150ff1c50031e59b872baf0e474977\"><em><strong>Setup Knex withNode.js</strong></em></a></li>\n<li>[✅] <a href=\"https://www.taniarascia.com/node-express-postgresql-heroku/\"><em><strong>Build a Node.js, Express, &#x26; PostgreSQL REST API | TaniaRascia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=knex+cheat+sheet&#x26;oq=knex+ch&#x26;aqs=chrome.1.69i57j0i20i263i512l2j0i512l4j69i60.3185j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>knex cheat sheet - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://devhints.io/knex\"><em><strong>Knex cheatsheet</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/hoanganhlam/knex-cheat-sheet-79o\"><em><strong>Knex Cheat Sheet - DEVCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://knexjs.org/#Schema\"><em><strong>Knex.js - A SQL Query Builder forJavascript</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codesignal.com/test/FaWitY3sMPt9RC3eC/task/hBdpmqM9c9r6gjMDz\"><em><strong>CodeSignal</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/f7a563ef575fdbfb52928060679387e0/edit\"><em><strong>Editingjs-interview-questions.md</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codesignal.com/test/id7HD9pYStrQfmbip\"><em><strong>CodeSignal</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/python-gitbook\"><em><strong>bgoonz/python-gitbook</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/DATASTRUCPYTHONNOTES-3#GCA-prep.py\"><em>**DATA</em>STRUC<em>PYTHON</em>NOTES-3 -Replit**_</a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=veritasium+simple+math+problem&#x26;oq=veritasium+simple+math+problem&#x26;aqs=chrome..69i57j33i160j33i299.9395j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>veritasium simple math problem - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/me/settings\"><em><strong>Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Archive-42/SandboxJS/deployments/activity_log?environment=github-pages\"><em><strong>Deployments ·Archive-42/SandboxJS</strong></em></a></li>\n<li>[✅] <a href=\"https://archive-42.github.io/SandboxJS/\"><em><strong>SandboxJS: JavaScript \"Sandboxes\" for the webbrowser</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/zricethezav?language=javascript&#x26;tab=stars\"><em><strong>zricethezav (Zachary Rice) /Starred</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/qeeqbox/social-analyzer\"><em><strong>qeeqbox/social-analyzer: API, CLI &#x26; Web App for analyzing &#x26; finding aperson's profile across +900 social media \\ websites (Detections areupdated regularly)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jbrooksuk/node-summary\"><em><strong>jbrooksuk/node-summary: Node module that summarizes text using a naivesummarization algorithm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/JupiterOne/graph-gitleaks-findings\"><em><strong>JupiterOne/graph-gitleaks-findings</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/zricethezav/website\"><em><strong>zricethezav/website: zrice.net -- a website forme</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/zricethezav/gifs\"><em><strong>zricethezav/gifs: gifs forreadmes</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=html.brow.shhttps%3A%2F%2Fgithub.com%2Fzricethezav%2Fzachstalks&#x26;oq=html.brow.shhttps%3A%2F%2Fgithub.com%2Fzricethezav%2Fzachstalks&#x26;aqs=chrome..69i57j69i58.1180j0j4&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>html.brow.shhttps://github.com/zricethezav/zachstalks - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/zricethezav/emails\"><em><strong>zricethezav/emails: harvest emails fromgithub</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codesignal.com/test/uQTr7k2nPe8FBcpZe/task/SLpe8d5suowooEGSG\"><em><strong>CodeSignal</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/b5075e30e34832475a3fa90210f26a64\"><em><strong>front-end-guide.md</strong></em></a></li>\n<li>[✅] <a href=\"https://builtwith.com/?https%3a%2f%2fmaster--bgoonz-blog.netlify.app%2f\"><em><strong>master--bgoonz-blog.netlify.app TechnologyProfile</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bgoonz42/s/datastructures-in-pytho/abstract-data-structures/untitled-1/untitled-2\"><em><strong>Searching -datastructures-in-python</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/github-stats-website/\"><em><strong>Bryan C Guner</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/trending/javascript?since=weekly\"><em><strong>Trending JavaScript repositories on GitHub thisweek</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/filebrowser/filebrowser\"><em><strong>filebrowser/filebrowser: 📂 Web FileBrowser</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/awesome-selfhosted/awesome-selfhosted\"><em><strong>awesome-selfhosted/awesome-selfhosted: A list of Free Software networkservices and web applications which can be hosted on your ownservers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/hakimel/reveal.js\"><em><strong>hakimel/reveal.js: The HTML PresentationFramework</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/reactjs-interview-questions\"><em><strong>Web-Dev-Collaborative/reactjs-interview-questions: List of top 500ReactJS Interview Questions &#x26; Answers....Coding exercise questions arecomingsoon!!</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.python.org/3.9/tutorial/errors.html\"><em><strong>8. Errors and Exceptions --- Python 3.9.7documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jeffgeerling.com/blog/2018/get-list-all-users-public-github-repositories-using-github-api-and-jq\"><em><strong>Get a list of all a user's public GitHub repositories using GitHub APIand jq | JeffGeerling</strong></em></a></li>\n<li>[✅] <a href=\"https://marketplace.visualstudio.com/items?itemName=figstack.vsc\"><em><strong>Figstack - Visual StudioMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"https://shell.cloud.google.com/?walkthrough_tutorial_id=cloud_run_cloud_code_create_service&#x26;show=ide&#x26;environment_deployment=ide\"><em><strong>CloudShell</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/Technologies-Used.md\"><em>**Technologies Used.md · bgoonz/BGOONZ</em>BLOG<em>2.0Wiki**</em></a></li>\n<li>[✅] <a href=\"https://cloud.google.com/sdk/docs/install#deb\"><em><strong>Installing Cloud SDK | Cloud SDK Documentation | GoogleCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.google.com/\"><em><strong>Cloud Computing Services | Google Cloud</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.google.com/sdk/docs/quickstarts\"><em><strong>Quickstarts | Cloud SDK Documentation | GoogleCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.google.com/sdk/auth_success\"><em><strong>You are now authenticated with the Google CloudSDK!</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326#/blog/interview-questions-js\"><em><strong>bgoonz - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/882\"><em>**(2) hi by bgoonz · Pull Request #882 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60c3546f52e5bb0019dcbea4\"><em><strong>Quick-Post-Blog - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/881\"><em>**(1) interview-questions-js.md: added by bgoonz · Pull Request #881 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/functions/add?storageBucketName=web-serve&#x26;project=studious-pulsar-298821\"><em><strong>Create function from prototype -- Cloud Functions -- My Project 78672-- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/marketplace/product/google-cloud-platform/cloud-storage?folder=&#x26;organizationId=&#x26;project=jupyter-320000\"><em><strong>Cloud Storage -- Marketplace -- jupyter -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.google.com/storage/docs/?hl=en_US&#x26;_ga=2.91592984.-387416667.1631330034#code-samples\"><em><strong>Cloud Storage documentation | GoogleCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/nodejs-storage\"><em><strong>side-projects-42/nodejs-storage: Node.js client for Google CloudStorage: unified object storage for developers and enterprises, fromlive data serving to data analytics/ML to dataarchiving.</strong></em></a></li>\n<li>[✅] <a href=\"https://amber-chicken-08c7elej.ws-us15.gitpod.io/\"><em><strong>Preview README.md - nodejs-storage - GitpodCode</strong></em></a></li>\n<li>[✅] <a href=\"https://gitpod.io/integrations\"><em><strong>Integrations --- Gitpod</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/storage/browser?_ga=2.237457600.1998419613.1631330034-387416667.1631330034&#x26;pli=1&#x26;project=studious-pulsar-298821&#x26;prefix=\"><em><strong>Browser -- Cloud Storage -- My Project 78672 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/navigation-error;errorUrl=%2Fdataflow%2Fcreatejob%3Ftemplate%3DGCS_Text_to_Cloud_PubSub&#x26;jobName%3Dweb-serve&#x26;inputFilePattern%3Dgs:%252F%252Fweb-serve%252F*&#x26;confirmMsg%3Dtrue&#x26;project%3Dstudious-pulsar-298821?project=studious-pulsar-298821\"><em><strong>Error -- Dataflow -- My Project 78672 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=gs%3A%2F%2Fpotluck&#x26;oq=gs%3A%2F%2Fpotluck&#x26;aqs=chrome..69i57j69i58.604j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>gs://potluck - GoogleSearch</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>a/A {#aa add<em>date=\"1640716651\" last</em>modified=\"1640717094\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://onedrive.live.com/?authkey=%21AOZ4VcHpVkP%5F0qM&#x26;id=87D8B8560BFDB191%21272283&#x26;cid=87D8B8560BFDB191\"><em><strong>aa -OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ALW93/App-Academy\"><em><strong>ALW93/App-Academy: Notes taken from Homework Reading &#x26; Lectures +Objectives for App Academy's July 13th Cohort, feel free to use asneeded. Will be updated as often aspossible!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Erick-Bravo\"><em><strong>Erick-Bravo (Erick Bravo)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/cynthiaspence7827?tab=repositories\"><em><strong>cynthiaspence7827 /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ahan8927\"><em><strong>ahan8927 (Aaron Hanson)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pythonkitchen.com/legally-free-python-books-list/\"><em><strong>Legally Free Python Books List - Pythonkitchen</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=javascript+problem+guide&#x26;rlz=1C1CHBF_enUS916US916&#x26;oq=javascript+problem+guide&#x26;aqs=chrome..69i57j69i64.6957j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>javascript problem guide - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Howto\"><em><strong>Solve common problems in your JavaScript code - Learn web development| MDN</strong></em></a></li>\n<li>[✅] <a href=\"http://vswebessentials.com/download\"><em><strong>Download - Web Essentials</strong></em></a></li>\n<li>[✅] <a href=\"https://brilliant.org/practice/searching/?p=3\"><em><strong>Searching Practice Problems Online |Brilliant</strong></em></a></li>\n<li>[✅] <a href=\"https://brilliant.org/practice/the-speed-of-algorithms/?chapter=intro-to-algorithms\"><em><strong>The Speed of Algorithms Practice Problems Online |Brilliant</strong></em></a></li>\n<li>[✅] <a href=\"https://ghost.org/changelog/markdown/\"><em><strong>The Ultimate Guide to Writing &#x26; Publishing withMarkdown</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/NorthwoodsSoftware/GoJS\"><em><strong>NorthwoodsSoftware/GoJS: JavaScript diagramming library for interactiveflowcharts, org charts, design tools, planning tools, visuallanguages.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/rough-stuff/rough-notation\"><em><strong>rough-stuff/rough-notation: Create and animate hand-drawn annotationson a web page</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mifi/editly\"><em><strong>mifi/editly: Slick, declarative command line video editing &#x26;API</strong></em></a></li>\n<li>[✅] <a href=\"https://v8.dev/docs/stack-trace-api\"><em><strong>Stack trace API · V8</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/microsoft/vscode-jshint/issues/3\"><em><strong>\"Failed to load jshint library\" · Issue #3 ·microsoft/vscode-jshint</strong></em></a></li>\n<li>[✅] <a href=\"https://benwong.me/how-to-move-the-visual-studio-code-extensions-folder-on-windows/\"><em><strong>How to move the Visual Studio Code extensions folder on Windows |benwong.me</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jshint/fixmyjs\"><em><strong>jshint/fixmyjs: Automatically fix silly linterrors.</strong></em></a></li>\n<li>[✅] <a href=\"https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebEssentials2019\"><em><strong>Web Essentials 2019 - Visual StudioMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"https://jshint.com/install/\"><em><strong>Download and install</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jshint/jshint\"><em><strong>jshint/jshint: JSHint is a tool that helps to detect errors andpotential problems in your JavaScriptcode</strong></em></a></li>\n<li>[✅] <a href=\"https://specificity.keegan.st/\"><em><strong>Specificity Calculator</strong></em></a></li>\n<li>[✅] <a href=\"https://nodejs.dev/learn/get-http-request-body-data-using-nodejs\"><em><strong>Get HTTP request body data usingNode.js</strong></em></a></li>\n<li>[✅] <a href=\"http://marylark.com/wk12-quiz.html\"><em><strong>Mary Lark - Full Stack Engineer</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/@appacademy/cra-template-simple\"><em><strong>@appacademy/cra-template-simple -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://create-react-app.dev/docs/custom-templates/\"><em><strong>Custom Templates</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sololearn.com/Course/react/\"><em><strong>React + Redux | SoloLearn: Learn to code forFREE!</strong></em></a></li>\n<li>[✅] <a href=\"https://app.sli.do/event/qiefmfrm/live/questions\"><em><strong>September Online</strong></em></a></li>\n<li>[✅] <a href=\"https://www.db-fiddle.com/f/7fnLq7sZNknYPfm6U2xEAH/0\"><em><strong>DB Fiddle - SQL DatabasePlayground</strong></em></a></li>\n<li>[✅] <a href=\"https://quizlet.com/537605563/week-10-flash-cards/?x=1qqt\"><em><strong>Week 10 Flashcards |Quizlet</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>netlify {#netlify add<em>date=\"1640716651\" last</em>modified=\"1640717351\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://www6.waybackmachinedownloader.com/website-downloader-online/\"><em><strong>Website Downloader Online - Copy Any Site - Download AllFiles</strong></em></a></li>\n<li>[✅] <a href=\"https://www6.waybackmachinedownloader.com/website-downloader-online/file_editor-website-downloader-online/?url=files/demo/vithalreddy.com_bryan.guner_gmail.com_i6i0p2kqg9\"><em><strong>Website Downloader Online - ScrapingResults</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlify.com/jamstack/\"><em><strong>Welcome to the Jamstack | What, Why, and How ofJamstack</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/relaxed-noyce-f774b9/deploys/6073993d07b36aa5d39da796\"><em><strong>Deploy details |relaxed-noyce-f774b9</strong></em></a></li>\n<li>[✅] <a href=\"https://jamstack.org/glossary/\"><em><strong>Glossary of Jamstack Terminology |Jamstack</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/docs/quick-start\"><em><strong>Quick Start | Gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://jamstack.org/headless-cms/\"><em><strong>Headless CMS - Top Content Management Systems |Jamstack</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlify.com/products/build/\"><em><strong>Netlify Build | Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlify.com/products/edge/\"><em><strong>Netlify Edge | Netlify</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>PYTHON {#python add<em>date=\"1640716651\" last</em>modified=\"0\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://www.figstack.com/app/complexity\"><em><strong>Time Complexity</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>React-Redux {#react-redux add<em>date=\"1640716651\" last</em>modified=\"1640717490\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://github.com/bgoonz/Potluck-Planner/commits/master\"><em><strong>Commits ·bgoonz/Potluck-Planner</strong></em></a></li>\n<li>[✅] <a href=\"https://trello.com/b/JN4HNaJX/kanban-template\"><em><strong>Kanban Template |Trello</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b4fbcfbe480001870d75e/\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Potluck-Planner/tree/preview\"><em><strong>bgoonz/Potluck-Planner atpreview</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Potluck-Planner/compare/preview...master\"><em><strong>Comparing preview...master ·bgoonz/Potluck-Planner</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Potluck-Planner\"><em><strong>bgoonz/Potluck-Planner: Jamstack site ...landing page for potluckplanner</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/My-Notes-Compilation\"><em><strong>bgoonz/My-Notes-Compilation: This is just a running list of noteswithout any unifying theme or structure, however it will generally besomewhere in the realm of webdevelopment.</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/potluck-planner-landing/deploys/60ad29f09433ab0007aad117\"><em><strong>Deploy details |potluck-planner-landing</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Potluck-Planner/tree/9ccca68d727fb167abf96d56da3c4daa2340e3e4\"><em><strong>bgoonz/Potluck-Planner at9ccca68d727fb167abf96d56da3c4daa2340e3e4</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/wds9601/react-signup-form\"><em><strong>wds9601/react-signup-form</strong></em></a></li>\n<li>[✅] <a href=\"https://devhints.io/\"><em><strong>Devhints --- TL;DR for developer documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/technoetics/create-basic-login-forms-using-react-js-hooks-and-bootstrap-2ae36c15e551\"><em><strong>Create basic login forms using react.js hooks and bootstrap | bySaurabh Mhatre | CodeClassifiers |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://serverless-stack.com/chapters/create-a-login-page.html\"><em><strong>Create a Login Page | ServerlessStack</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/cornflourblue/react-redux-registration-login-example\"><em><strong>cornflourblue/react-redux-registration-login-example: React + Redux -User Registration and Login Tutorial &#x26;Example</strong></em></a></li>\n<li>[✅] <a href=\"https://jasonwatmore.com/post/2017/09/16/react-redux-user-registration-and-login-tutorial-example\"><em><strong>React + Redux - User Registration and Login Tutorial &#x26; Example | JasonWatmore'sBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://stackblitz.com/edit/react-redux-registration-login-example-uugbjr?file=_actions%2Fuser.actions.js\"><em><strong>react-redux-registration-login-example-uugbjr -StackBlitz</strong></em></a></li>\n<li>[✅] <a href=\"https://tysonmaly.com/programming/git/how-to-clone-older-version-in-git/\"><em><strong>How to clone old version ingit</strong></em></a></li>\n<li>[✅] <a href=\"http://www.sis.pitt.edu/mbsclass/tutorial/advanced/makefile/whatis.htm#:~:text=A%20makefile%20is%20a%20special,Makefile%20depending%20upon%20the%20system\"><em><strong>Makefile Tutorial - What is aMakefile?</strong></em></a>.&#x26;text=These%20rules%20tell%20the%20system,recompile)%20a%20series%20of%20files.)</li>\n<li>[✅] <a href=\"https://us04web.zoom.us/postattendee?id=45\"><em><strong>Post Attendee - Zoom</strong></em></a></li>\n<li>[✅] <a href=\"https://pagedraw.io/tutorials/basics\"><em><strong>demo --- Pagedraw</strong></em></a></li>\n<li>[✅] <a href=\"https://console.seed.run/bgoonz/BGOONZ-BLOG-2-0/stages/prod\"><em><strong>prod |SEED</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.serverless-stack.com/\"><em><strong>Serverless Stack | Serverless Stack(SST)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sitepoint.com/getting-started-with-react-native/\"><em><strong>Getting Started with React Native -SitePoint</strong></em></a></li>\n<li>[✅] <a href=\"https://epicreact.dev/\"><em><strong>Get Really Good at React | Epic React by Kent C.Dodds</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboardpack.com/theme-details/architectui-react-dashboard-free/?v=7516fd43adaa\"><em><strong>ArchitectUI React Dashboard Free -DashboardPack</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/jolly-pike-4q74z?from-embed=&#x26;file=/docs/doc1.md\"><em><strong>jolly-pike-4q74z -CodeSandbox</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>AMAZON {#amazon add<em>date=\"1634330937\" last</em>modified=\"1640716849\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://css-tricks.com/almanac/properties/b/box-shadow/\"><em><strong>box-shadow |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/elasticbeanstalk/home?region=us-west-2#/environment/dashboard?applicationName=bgoonz-blog&#x26;environmentId=e-9nnshmqmub\"><em><strong>Bgoonzblog-env -Dashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/storagegateway/home?region=us-west-2#/\"><em><strong>AWS StorageGateway</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/storagegateway/latest/userguide/create-gateway-file.html#GettingStartedSelectGatewayType-file\"><em><strong>Creating a gateway - AWS StorageGateway</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/storagegateway/home?region=us-west-2#/gateways/create\"><em><strong>AWS StorageGateway</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/ec2/home?region=us-west-2#InstanceDetails:instanceId=i-0d5d6e730147ee7c2\"><em><strong>Instance details | EC2 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/console/home?region=us-west-2\"><em><strong>AWS ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.html\"><em><strong>Elastic Beanstalk concepts - AWS ElasticBeanstalk</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/access?region=us-west-2\"><em><strong>Access analyzer forS3</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/settings?region=us-east-2\"><em><strong>S3 Block Public Access accountsettings</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html\"><em><strong>Amazon S3 inventory - Amazon Simple StorageService</strong></em></a></li>\n<li>[✅] <a href=\"https://elements.heroku.com/search/addons?q=mongo\"><em><strong>Search Add-ons - HerokuElements</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/chidimo?after=Y3Vyc29yOnYyOpK5MjAyMC0wNi0xNFQyMjo1NTozMS0wNDowMM4QO1ut&#x26;tab=repositories\"><em><strong>chidimo (Orji Chidi Matthew) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/chidimo/learnstorybook.com\"><em><strong>chidimo/learnstorybook.com: Static site and content for Storybooktutorials</strong></em></a></li>\n<li>[✅] <a href=\"https://www.learnstorybook.com/intro-to-storybook/react/en/deploy/\"><em><strong>Deploy Storybook | StorybookTutorials</strong></em></a></li>\n<li>[✅] <a href=\"https://www.chromatic.com/setup?appId=603000b7cd9c1b00234e443b\"><em><strong>Publish web-dev-notes-resource-site'sStorybook</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/lambda/home?region=us-east-1#/stepfunctions\"><em><strong>Step Functions state machines -Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/states/home?region=us-east-1#/statemachines/view/arn:aws:states:us-east-1:970632394313:stateMachine:StockTradingStateMachine-D1IpF5ii22FL?registered=true&#x26;stackId=arn:aws:cloudformation:us-east-1:970632394313:stack%2FStepFunctionsSample-HelloLambda0516270d-a8a7-430e-b21f-0ea918760d43%2F59ca1290-72e3-11eb-ab94-12ab197e9ef5&#x26;helloLambda\"><em><strong>Step Functions ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/signer/home?region=us-east-1#/signing-jobs/start/AWSLambda-SHA384-ECDSA/bryan\"><em><strong>AWSSigner</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/billing/home#/paymenthistory\"><em><strong>Billing ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/elasticbeanstalk/home?region=us-east-1#/gettingStarted\"><em><strong>Elastic Beanstalk ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/upload/norwex42?region=us-east-1\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/object/norwex42?region=us-east-1&#x26;prefix=1209_superior_mop_system.jpg\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/upload/web-dev-resourcehub?region=us-east-1\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/buckets/web-dev-resourcehub?region=us-east-1&#x26;prefix=2-content/&#x26;showversions=false\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/marketplace/server/procurement?productId=3b73ef49-208f-47e1-8a6e-4ae768d8a333\"><em><strong>AWS Marketplace: Ubuntu 18.04 LTS -Bionic</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/marketplace/storage?region=us-east-1\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/storagegateway/create/gateway?region=us-east-1\"><em><strong>AWS StorageGateway</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/storagegateway/latest/userguide/accessing-local-console.html#MaintenanceConsoleWindowKVM-common\"><em><strong>Accessing the Gateway Local Console - AWS StorageGateway</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/storagegateway/latest/userguide/manage-on-premises-common.html#LocalConsole-login-common\"><em><strong>Performing Tasks on the VM Local Console (Volume and Tape Gateways) -AWS StorageGateway</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.mongodb.com/v2/602fce78f7612354fa1876e5#clusters\"><em><strong>Clusters | Atlas: MongoDBAtlas</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/WSL.html#ssh-prereqs\"><em><strong>Connect to your Linux instance from Windows using Windows Subsystem forLinux - Amazon Elastic ComputeCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/AmazonS3.html\"><em><strong>Use Amazon S3 with Amazon EC2 - Amazon Elastic ComputeCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-hosting-custom-domain-walkthrough.html\"><em><strong>Configuring a static website using a custom domain registered withRoute 53 - Amazon Simple StorageService</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-hosting-cloudfront-walkthrough.html\"><em><strong>Speeding up your website with Amazon CloudFront - Amazon Simple StorageService</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloudfront/home?#create-distribution:\"><em><strong>AWS CloudFront ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html\"><em><strong>Configuring file system access for Lambda functions - AWSLambda</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/lambda/home?region=us-east-1#/create/function\"><em><strong>Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/signer/latest/developerguide/Welcome.html\"><em><strong>What Is AWS Signer? - AWSSigner</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/signer/latest/developerguide/signer-console.html\"><em><strong>Using the AWS Signer Console - AWSSigner</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/iam/home?#/roles\"><em><strong>IAM ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/lambda/home?region=us-east-1#/create/code-signing-configuration\"><em><strong>Create code signing configuration -Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html\"><em><strong>Configuring code signing for AWS Lambda - AWSLambda</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html\"><em><strong>Configuring a Lambda function to access resources in a VPC - AWSLambda</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/lambda/home?region=us-east-1#/applications/serverlessrepo-image-magick-lambda-layer\"><em><strong>serverlessrepo-image-magick-lambda-layer application -Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/setup-toolkit.html\"><em><strong>Installing the AWS Toolkit for Visual Studio Code - AWS Toolkit for VSCode</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloudshell/home?region=us-east-1\"><em><strong>AWSCloudShell</strong></em></a></li>\n<li>[✅] <a href=\"https://www.awseducate.com/student/s/\"><em><strong>Home</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html\"><em><strong>Building Lambda functions with Python - AWSLambda</strong></em></a></li>\n<li>[✅] <a href=\"https://www.simform.com/serverless-examples-aws-lambda-use-cases/\"><em><strong>10 AWS Lambda Use Cases to Start Your ServerlessJourney</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?ei=pUUyYOK5EKSP9PwPka6TsAg&#x26;q=what+are+aws+lambda+functions+and+what+are+they+used+for&#x26;oq=what+are+aws+lambda+functions+and+what+are+they+used+for&#x26;gs_lcp=Cgdnd3Mtd2l6EAM6BwgAEEcQsANQv0ZYgkxg01hoAXACeACAAU-IAd8CkgEBNZgBAKABAaoBB2d3cy13aXrIAQjAAQE&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwiioNS58fruAhWkB50JHRHXBIYQ4dUDCA0&#x26;uact=5\"><em><strong>what are aws lambda functions and what are they used for - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/lambda/\"><em><strong>AWS Lambda -- Serverless Compute - Amazon WebServices</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=github+lambda+functions+aws&#x26;oq=github+lambda+functions+aws&#x26;aqs=chrome..69i57j69i64.22039j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>github lambda functions aws - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/serverless/examples\"><em><strong>serverless/examples: Serverless Examples -- A collection ofboilerplates and examples of serverless architectures built with theServerless Framework on AWS Lambda, Microsoft Azure, Google CloudFunctions, and more.</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.jakoblind.no/aws-lambda-github-actions/\"><em><strong>How to set up an AWS Lambda and auto deployments with Github Actions |blog.jakoblind.no</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/aws-samples\"><em><strong>AWS Samples</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/serverless/sam/\"><em><strong>AWS Serverless Application Model - Amazon WebServices</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/products/developer-tools/\"><em><strong>Developer Tools -- Amazon Web Services(AWS)</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/cloud9/?c=dv&#x26;sec=srv\"><em><strong>AWS Cloud9 Amazon WebServices</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloud9/home/product?ad=c&#x26;cp=bn&#x26;p=c9#\"><em><strong>Welcome to AWSCloud9</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/cloud9/latest/user-guide/setup-express.html#setup-express-sign-in-ide\"><em><strong>Individual user setup for AWS Cloud9 - AWSCloud9</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/console/home?region=us-east-1\"><em><strong>AWS ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloud9/home/create\"><em><strong>Create a newenvironment</strong></em></a></li>\n<li>[✅] <a href=\"https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#CreateSubnet:\"><em><strong>VPC ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.aws.amazon.com/cloud9/latest/user-guide/setup-express.html\"><em><strong>Individual user setup for AWS Cloud9 - AWSCloud9</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloudshell/home?region=us-east-1#a801da33-0cf4-4dc2-837a-a9bf23641c76\"><em><strong>AWSCloudShell</strong></em></a></li>\n<li>[✅] <a href=\"https://hub.docker.com/repository/docker/bgoonz/norwex\"><em><strong>Docker Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://hub.docker.com/r/bgoonz/norwex\"><em><strong>Docker Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/quick-seo-pagerank-backli/mimhmidgldhoghjoehfigallmmndjkef/related?hl=en&#x26;pli=1&#x26;authuser=1\"><em><strong>Quick SEO - PageRank, Backlinks &#x26; Alexa Tool - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://www.similarweb.com/corp/extension-welcome-chrome/\"><em><strong>Chrome Extension Welcome |SimilarWeb</strong></em></a></li>\n<li>[✅] <a href=\"https://www.similarweb.com/website/netlify.app?utm_source=addon&#x26;utm_medium=chrome&#x26;utm_content=footer&#x26;utm_campaign=cta-button#alsoVisited\"><em><strong>Netlify.app Analytics - Market Share Data &#x26; Ranking |SimilarWeb</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mout/mout\"><em><strong>mout/mout: Modular JavaScript Utilities</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/moby/moby/issues/22847\"><em><strong>\"docker daemon -H fd://\" fails with message \"No sockets found\"under Ubuntu 15.10 · Issue #22847 ·moby/moby</strong></em></a></li>\n<li>[✅] <a href=\"https://hub.docker.com/search?q=&#x26;type=image&#x26;image_filter=store&#x26;category=tools%2Clanguages%2Cstorage&#x26;operating_system=linux%2Cwindows\"><em><strong>Explore</strong></em></a></li>\n<li>[✅] <a href=\"https://hub.docker.com/settings/general\"><em><strong>Docker Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://www.enterprisedb.com/thank-you-creating-account\"><em><strong>Check your email |EDB</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/transfer/home?region=us-east-1#/servers/s-075e3b4a4d9149d98\"><em><strong>AWSTransfer</strong></em></a></li>\n<li>[✅] <a href=\"https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/stackinfo?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A970632394313%3Astack%2FStepFunctionsSample-HelloLambda0516270d-a8a7-430e-b21f-0ea918760d43%2F59ca1290-72e3-11eb-ab94-12ab197e9ef5&#x26;filteringStatus=active&#x26;filteringText=&#x26;viewNested=true&#x26;hideStacks=false\"><em><strong>CloudFormation - StackStepFunctionsSample-HelloLambda0516270d-a8a7-430e-b21f-0ea918760d43</strong></em></a></li>\n<li>[✅] <a href=\"https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/stackinfo?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A970632394313%3Astack%2Fserverlessrepo-image-magick-lambda-layer%2Fc10196d0-72c6-11eb-af4e-0acfa743837d&#x26;filteringStatus=active&#x26;filteringText=&#x26;viewNested=true&#x26;hideStacks=false\"><em><strong>CloudFormation - Stackserverlessrepo-image-magick-lambda-layer</strong></em></a></li>\n<li>[✅] <a href=\"https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/update-import-resources?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A970632394313%3Astack%2Fserverlessrepo-image-magick-lambda-layer%2Fc10196d0-72c6-11eb-af4e-0acfa743837d\"><em><strong>CloudFormation - Stackserverlessrepo-image-magick-lambda-layer</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cloud9/home?region=us-east-1\"><em><strong>Yourenvironments</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/billing/home?#/costexplorer\"><em><strong>Billing ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/cost-management/home?#/savings-plans/overview\"><em><strong>CostManagement</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>GITHUB {#github add<em>date=\"1640716651\" last</em>modified=\"0\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://github.com/MoonHighway\"><em><strong>Moon Highway</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/facebook/create-react-app\"><em><strong>facebook/create-react-app: Set up a modern web app by running onecommand.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/React-Components-Insta-Clone/tree/main\"><em><strong>bgoonz/React-Components-Insta-Clone atmain</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1145/pages/objective-1-explain-what-side-effects-are-in-react-components?module_item_id=583442\"><em><strong>Objective 1 - explain what side effects are in React components: WEB43- 2.2 - Intro toReact</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/lambda-website/react-md/react-resources/~/settings/share\"><em><strong>React-Resources -lambda-website</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/knowledge/\"><em><strong>Initial page -knowledge</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/lambda-website/\"><em><strong>Closure-and-Scope -lambda-website</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/blog-2-0/\"><em><strong>README - Blog-2.0</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/blog-2-0/src/~/settings/integrations\"><em><strong>src -Blog-2.0</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/mini-project-showcase\"><em><strong>bgoonz/mini-project-showcase</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz\"><em><strong>Site overview |project-showcase-bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://project-showcase-bgoonz.netlify.app/\"><em>**/MY-WEB-DEV/\\</em>_Projects/Projects**_</a></li>\n<li>[✅] <a href=\"https://medium.com/me/export\"><em><strong>Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/facebook/react-native-website\"><em><strong>facebook/react-native-website: The site and docs for ReactNative</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/massoudmaboudi/datagit_v2.docusaurus\"><em>**massoudmaboudi/datagit</em>v2.docusaurus**_</a></li>\n<li>[✅] <a href=\"https://github.com/infinum/eightshift-docs\"><em><strong>infinum/eightshift-docs: A documentation website for Eightshift opensource projects</strong></em></a></li>\n<li>[✅] <a href=\"https://docusaurus.io/\"><em><strong>Build optimized websites quickly, focus on your content |Docusaurus</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/algolia/docsearch-website/blob/master/src/pages/index.js\"><em><strong>docsearch-website/index.js at master ·algolia/docsearch-website</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\"><em>**bgoonz/BGOONZ</em>BLOG<em>2.0: Jamstack site created withStackbit**</em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326/?utm_campaign=First+Site+Created+Email&#x26;utm_content=Welcome+to+Stackbit&#x26;utm_medium=email_action&#x26;utm_source=customer.io#/docs\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/lambda-resources/settings/general\"><em><strong>General | Sitesettings</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326\"><em><strong>Stackbit App</strong></em></a></li>\n<li>[✅] <a href=\"https://www.stackbit.com/\"><em><strong>Stackbit | The editing experience for Jamstacksites</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz\"><em><strong>bgoonz (Bryan C Guner)</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>MISC {#misc add<em>date=\"1633154253\" last</em>modified=\"1640718987\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://minicss.org/docs\"><em><strong>mini.css - Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codingrooms.com/w/MHE4HQVjM8fk\"><em><strong>Coding Rooms</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-bookmarks/settings/deploys\"><em><strong>Build &#x26; deploy | Sitesettings</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/accounts-and-billing/billing-faq/?_ga=2.215621589.33353493.1637800938-2057734480.1637800938\"><em><strong>Billing FAQ | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/netlify/js-client\"><em><strong>netlify/js-client: A Open-API derived JS + Node.js API client forNetlify</strong></em></a></li>\n<li>[✅] <a href=\"https://runkit.com/docs/await\"><em><strong>RunKit: Await Documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://runkit.com/bgoonz42/619eded25d3a8b000b5b9919\"><em><strong>ES6 Arrow Functions |RunKit</strong></em></a></li>\n<li>[✅] <a href=\"https://runkit.com/bgoonz42/619ededc6892ee000877ac90\"><em><strong>API Diff |RunKit</strong></em></a></li>\n<li>[✅] <a href=\"https://runkit.com/bgoonz42/619edee030871700087ff983\"><em><strong>ES6 Destructuring |RunKit</strong></em></a></li>\n<li>[✅] <a href=\"https://runkit.com/explore\"><em><strong>RunKit: Example Notebooks</strong></em></a></li>\n<li>[✅] <a href=\"https://jsbench.me/\"><em><strong>JSBench.me - JavaScript performance benchmarkingplayground</strong></em></a></li>\n<li>[✅] <a href=\"https://publish.twitter.com/?buttonType=FollowButton&#x26;query=https%3A%2F%2Ftwitter.com%2Fbgooonz&#x26;widget=Button\"><em><strong>TwitterPublish</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/MichaelDeBoey/gatsby-remark-embedder\"><em><strong>MichaelDeBoey/gatsby-remark-embedder: Gatsby Remark plugin to embedwell known services by theirURL.</strong></em></a></li>\n<li>[✅] <a href=\"https://twitter.com/home\"><em><strong>Home / Twitter</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.twitter.com/en/docs/labs\"><em><strong>Twitter Developer Labs | Docs | Twitter DeveloperPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://editor.swagger.io/#\"><em><strong>Swagger Editor</strong></em></a></li>\n<li>[✅] <a href=\"https://app.swaggerhub.com/organizations/webdevhub\"><em><strong>webdevhub |SwaggerHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/swagger-ui\"><em><strong>Web-Dev-Collaborative/swagger-ui: Swagger UI is a collection of HTML,JavaScript, and CSS assets that dynamically generate beautifuldocumentation from a Swagger-compliantAPI.</strong></em></a></li>\n<li>[✅] <a href=\"https://swagger.io/tools/open-source/\"><em><strong>OpenAPI Design &#x26; Documentation Tools |Swagger</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/swagger-api/swagger-editor/releases/tag/v4.0.1\"><em><strong>Release Swagger Editor v4.0.1 Released! ·swagger-api/swagger-editor</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/2/#inbox/FMfcgzGllCfgpbVFQFlgfJKZdVWmMGKg\"><em><strong>Verify your Twitter Developer Account - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.twitter.com/en/portal/register/keys\"><em><strong>TwitterDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/blog/300-react-questions/\"><em><strong>lorem-ipsum |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://gitpod.io/start/#indigo-hamster-wywkhsmi\"><em><strong>Dashboard --- Gitpod</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/add-to-your-site/#add-the-netlify-identity-widget\"><em><strong>Add to Your Site | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://jamstack.org/generators/\"><em><strong>Static Site Generators - Top Open Source SSGs |Jamstack</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/configuration-options/\"><em><strong>Configuration Options | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-backend-github\"><em><strong>netlify-cms/packages/netlify-cms-backend-github at master ·netlify/netlify-cms</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-lib-util/README.md\"><em><strong>netlify-cms/README.md at master ·netlify/netlify-cms</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/website-utilities\"><em><strong>website-utilities -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/thaibault/website-utilities/deployments/activity_log?environment=github-pages\"><em><strong>Deployments ·thaibault/website-utilities</strong></em></a></li>\n<li>[✅] <a href=\"https://torben.website/website-utilities/#project-status\"><em><strong>websiteUtilities</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3.org/accounts/request\"><em><strong>Account request</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/possibly-useful-snippets.md\"><em>**possibly useful snippets.md · bgoonz/BGOONZ</em>BLOG<em>2.0Wiki**</em></a></li>\n<li>[✅] <a href=\"https://gitpod.io/start/#gray-sparrow-16cfh4w8\"><em><strong>Dashboard --- Gitpod</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mikethecodegeek/medium-clone\"><em><strong>mikethecodegeek/medium-clone: Full stack application clone ofMedium.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/gothinkster/realworld\"><em><strong>GitHub - gothinkster/realworld: \"The mother of all demo apps\" ---Exemplary fullstack Medium.com clone powered by React, Angular, Node,Django, and many more 🏅</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mikethecodegeek/medium-clone/wiki\"><em><strong>Home · mikethecodegeek/medium-clone Wiki ·GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/puppeteer\"><em><strong>Web-Dev-Collaborative/puppeteer: Headless Chrome Node.jsAPI</strong></em></a></li>\n<li>[✅] <a href=\"https://pptr.dev/\"><em><strong>https://pptr.dev</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/puppeteer/puppeteer/blob/main/examples/screenshot-fullpage.js\"><em><strong>puppeteer/screenshot-fullpage.js at main ·puppeteer/puppeteer</strong></em></a></li>\n<li>[✅] <a href=\"https://lunrjs.com/guides/searching.html\"><em><strong>Searching : Lunr</strong></em></a></li>\n<li>[✅] <a href=\"https://lunrjs.com/guides/getting_started.html\"><em><strong>Getting Started : Lunr</strong></em></a></li>\n<li>[✅] <a href=\"https://lunrjs.com/guides/customising.html\"><em><strong>Customisation : Lunr</strong></em></a></li>\n<li>[✅] <a href=\"https://opensearch.org/downloads.html\"><em><strong>Opensearch 1.2.0 · OpenSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://newbedev.com/naming-cheatsheet\"><em><strong>Naming cheatsheet | Newbedev</strong></em></a></li>\n<li>[✅] <a href=\"https://adobe.wd5.myworkdayjobs.com/en-US/external_experienced/job/San-Francisco/Web-Optimization-and-Personalization-Developer_R117072-2/apply/autofillWithResume\"><em><strong>Web Optimization and Personalization Developer : MyInformation</strong></em></a></li>\n<li>[✅] <a href=\"https://apps.elfsight.com/panel/applications/yottie/add/\"><em><strong>ElfsightApps</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/manoj2411?tab=repositories&#x26;q=&#x26;type=&#x26;language=&#x26;sort=stargazers\"><em><strong>manoj2411 (Manoj Sehrawat) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/manoj2411/the-art-of-command-line/blob/master/README.md\"><em><strong>the-art-of-command-line/README.md at master ·manoj2411/the-art-of-command-line</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/manoj2411/books-list-redux\"><em><strong>manoj2411/books-list-redux</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/manoj2411/ReduxSimpleStarter\"><em><strong>manoj2411/ReduxSimpleStarter: Starter pack for an awesome Udemycourse</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326#/docs/tools/Archive\"><em><strong>BGOONZBLOG2 - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/MihirBegMusicV3/compare/preview...master\"><em><strong>Comparing preview...master ·bgoonz/MihirBegMusicV3</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/MihirBegMusicV3/pull/44\"><em><strong>Merge pull request #42 from bgoonz/master by bgoonz · Pull Request#44 ·bgoonz/MihirBegMusicV3</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/MihirBegMusicV3/pull/40\"><em><strong>Update dependency sourcebit-target-next to v0.6.4 by renovate[bot] ·Pull Request #40 ·bgoonz/MihirBegMusicV3</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/projects/1\"><em><strong>Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Quick-Post-Blog/pull/16\"><em><strong>Update prismjs to version 1.23.0 by bgoonz · Pull Request #16 ·bgoonz/Quick-Post-Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-static-html-page-deploy/commit/6a95bb4f128658104352191830c45755b636ef1e\"><em><strong>Unicorn! ·GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Quick-Post-Blog/pull/17/\"><em><strong>Pin dependencies by renovate[bot] · Pull Request #17 ·bgoonz/Quick-Post-Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Shopify/javascript-utilities/tree/master/src\"><em><strong>javascript-utilities/src at master ·Shopify/javascript-utilities</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/algos\"><em><strong>Web-Dev-Collaborative/algos: Algorithms and Data Structuresbook</strong></em></a></li>\n<li>[✅] <a href=\"https://waylonwalker.com/archive/\"><em><strong>Waylon Walkers Digital Garden</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/wpneXAMqW3h2FTadSxbx/readme-1\"><em><strong>Home - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/google-search-custom-3muj7?file=/index.html\"><em><strong>Google-search-custom -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/career/dev-interview/\"><em><strong>Developer Interview Questions |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgzGllClSCxknLxrWKjjLgmWLxFML\"><em><strong>Bryan, a UI Developer job opening - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Portfolio-Projects42/BGOONZ_BLOG_2.0/tree/master\"><em>**Portfolio-Projects42/BGOONZ</em>BLOG<em>2.0: The new home of myblog/resource sharingwebsite.**</em></a></li>\n<li>[✅] <a href=\"https://skillcrush.com/blog/job-sites-to-find-your-first-developer-job/\"><em><strong>Use These 25 Job Sites to Find Your First Developer Job -Skillcrush</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Archive-42/coding-interview-prac\"><em><strong>Archive-42/coding-interview-prac</strong></em></a></li>\n<li>[✅] <a href=\"https://cse.google.com/cse.js?cx=54896af6e2f16ea45\"><em><strong>New Tab</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sublimetext.com/docs/\"><em><strong>Documentation - Sublime Text</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@lambda-labs/s/lambda-labs/ux/untitled/ux-design/~/settings/share\"><em>**UX-Design -LAMBDA</em>LABS<em>Family</em>Promise**_</a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/tools/showcase/untitled\"><em><strong>Continued -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-static-html-page-deploy\"><em><strong>style.css</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/GIT-CDN-FILES\"><em><strong>bgoonz/GIT-CDN-FILES</strong></em></a></li>\n<li>[✅] <a href=\"https://trello.com/b/U8UUCBeb/family-promise-service-tracker\"><em><strong>Family Promise Service Tracker |Trello</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/40042572/how-to-get-json-list-of-files-in-git-repository\"><em><strong>How to get json list of files in git repository? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://jsonplaceholder.typicode.com/\"><em><strong>JSONPlaceholder - Free Fake RESTAPI</strong></em></a></li>\n<li>[✅] <a href=\"https://jsonplaceholder.typicode.com/guide/\"><em><strong>JSONPlaceholder - Guide</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/demo\"><em><strong>Web-Dev-Collaborative/demo: A demo repository for My JSON Server(Alpha)</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/11850527/use-javascript-to-get-the-list-of-a-users-github-repositories\"><em><strong>api - Use Javascript to get the list of a user's Github repositories -StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Lambda-School-Labs/family-promise-service-tracker-fe-a/issues/new\"><em><strong>New Issue ·Lambda-School-Labs/family-promise-service-tracker-fe-a</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/-MkP23pBP3MWkIzJcreW/docs/coding/~/gitsync/status\"><em>**What is JSON Web Token? -LAMBDA</em>LABS<em>Family</em>Promise**_</a></li>\n<li>[✅] <a href=\"https://github.com/settings/installations/15356246\"><em><strong>Installed GitHub App -Lucidchart</strong></em></a></li>\n<li>[✅] <a href=\"https://auth0.com/learn/json-web-tokens/\"><em><strong>auth0.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Markdown-Templates/new/master\"><em><strong>New File</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/marketplace/actions/continuous-reforestation\"><em><strong>continuous-reforestation · Actions · GitHubMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.gitbook.com/features/import\"><em><strong>Import - GitBookDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://web3.storage/upload/\"><em><strong>Upload - Web3 Storage</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.web3.storage/how-tos/store/#uploading-to-web3-storage\"><em><strong>Store | Web3.StorageDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/public-apis/public-apis#documents--productivity\"><em><strong>public-apis/public-apis: A collective list of freeAPIs</strong></em></a></li>\n<li>[✅] <a href=\"https://serpstack.com/documentation\"><em><strong>API Documentation - serpstack</strong></em></a></li>\n<li>[✅] <a href=\"http://api.serpstack.com/search?access_key=09e68fc916c5b5f1c18ee24ff07cbd63&#x26;query=mcdonalds\"><em>**api.serpstack.com/search?access</em>key=09e68fc916c5b5f1c18ee24ff07cbd63&#x26;query=mcdonalds**_</a></li>\n<li>[✅] <a href=\"https://serpstack.com/dashboard\"><em><strong>Account Dashboard | serpstack API</strong></em></a></li>\n<li>[✅] <a href=\"https://mddocs.io/\"><em><strong>Mddocs - Dashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/organizations/v2/home/services/Directory%20Service\"><em><strong>Organizations ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/directoryservicev2/identity/home?region=us-west-2#!/directories\"><em><strong>DirectoryService</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/directoryservicev2/home?region=us-west-2#!/create\"><em><strong>DirectoryService</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/acm/home?region=us-west-2#/\"><em><strong>AWS CertificateManager</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/elasticbeanstalk/home?region=us-west-2#/newEnvironment?applicationName=bgoonz-blog\"><em><strong>Createenvironment</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/buckets/elasticbeanstalk-us-west-2-873253405806?region=us-west-2&#x26;tab=objects\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://s3.console.aws.amazon.com/s3/home?region=us-west-2\"><em><strong>S3 ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codacy.com/gh/bgoonz/FAMILY_PROMISE_FRONT_END/issues?bid=25967477&#x26;filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6WyJKYXZhc2NyaXB0Il19LHsiaWQiOiJDYXRlZ29yeSIsInZhbHVlcyI6W119LHsiaWQiOiJMZXZlbCIsInZhbHVlcyI6WyJXYXJuaW5nIl19LHsiaWQiOiJQYXR0ZXJuIiwidmFsdWVzIjpbXX0seyJpZCI6IkF1dGhvciIsInZhbHVlcyI6W119XQ==\"><em>**FAMILY</em>PROMISE<em>FRONT</em>END - Codacy -Issues**_</a></li>\n<li>[✅] <a href=\"https://app.codacy.com/gh/bgoonz/FAMILY_PROMISE_FRONT_END/patterns/list?selectedEngine=9ed24812-b6ee-4a58-9004-0ed183c45b8f#pattern-5258\"><em>**FAMILY</em>PROMISE<em>FRONT</em>END - Codacy -Patterns**_</a></li>\n<li>[✅] <a href=\"https://frontend.code-inspector.com/login\"><em><strong>Code Inspector: technical debt management madeeasy!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Archive-42/bgoonz-blog-static/deployments/activity_log?environment=github-pages\"><em><strong>Deployments ·Archive-42/bgoonz-blog-static</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/ec2globalview/home#\"><em><strong>EC2 Global View</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codacy.com/gh/bgoonz/FAMILY_PROMISE_FRONT_END/file/62407076229/issues/source?bid=25967477\"><em>**FAMILY</em>PROMISE<em>FRONT</em>END - Codacy -Files**_</a></li>\n<li>[✅] <a href=\"https://github.com/public-apis/public-apis/blob/master/README.md\"><em><strong>public-apis/README.md at master ·public-apis/public-apis</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\"><em><strong>bgoonz/Data-Structures-Algos-Codebase</strong></em></a></li>\n<li>[✅] <a href=\"https://gitpod.io/start/#ivory-caterpillar-qsqn0mvx\"><em><strong>Dashboard ---Gitpod</strong></em></a></li>\n<li>[✅] <a href=\"https://app.enhancv.com/resume/6169e369170f4e003b458a59\"><em><strong>Resume Editor</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/AcademicContent\"><em><strong>Web-Dev-Collaborative/AcademicContent: Free tech resources for faculty,students, researchers, life-long learners, and academic communitybuilders for use in tech based courses, workshops, andhackathons.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/stackbit-themes/fjord-nextjs/blob/master/sourcebit.js\"><em><strong>fjord-nextjs/sourcebit.js at master ·stackbit-themes/fjord-nextjs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/GordonLesti/dynamic-time-warping\"><em><strong>GordonLesti/dynamic-time-warping: Dynamic time warping forJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://databricks.com/blog/2019/04/30/understanding-dynamic-time-warping.html\"><em><strong>Understanding Dynamic Time Warping - The DatabricksBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/wannesm/dtaidistance\"><em><strong>wannesm/dtaidistance: Time series distances: Dynamic Time Warping(DTW)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/UsefulResourceRepo3.0/deployments/activity_log?environment=Preview\"><em><strong>Deployments ·bgoonz/UsefulResourceRepo3.0</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/alternate-blog-theme\"><em><strong>bgoonz/alternate-blog-theme: AuxBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/yowainwright/reframe.js#readme\"><em><strong>yowainwright/reframe.js: 🖼 Reframe unresponsive elementsresponsively</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60b8d58b4dee5500161bb940/#/posts/becomming-a-web-dev/\"><em><strong>alternate-blog-theme - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/alternate-blog-theme/tree/944abef6f1dc5d1b89cbe22bbf226ac34e1faa5c\"><em><strong>bgoonz/alternate-blog-theme at944abef6f1dc5d1b89cbe22bbf226ac34e1faa5c</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/616a3cba20814700bec34bb9\"><em><strong>unique-bee - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/alternate-blog-theme/pulls\"><em><strong>Pull requests ·bgoonz/alternate-blog-theme</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60f8533bf1f40500bfa10af4/\"><em><strong>Bgoonz-Bookmarks - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Bgoonz-Bookmarks\"><em><strong>bgoonz/Bgoonz-Bookmarks: mybookmarks</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Bgoonz-Bookmarks/pull/85\"><em><strong>(1) hi by bgoonz · Pull Request #85 ·bgoonz/Bgoonz-Bookmarks</strong></em></a></li>\n<li>[✅] <a href=\"https://remarkable-lime-9a6f1.sanity.studio/desk/post;245054dd-ac56-45d0-8f80-14937756bae9\"><em><strong>remarkable-lime-9a6f1 --Sanity</strong></em></a></li>\n<li>[✅] <a href=\"https://unix.stackexchange.com/questions/389156/how-to-fix-held-broken-packages\"><em><strong>ubuntu - How to fix held broken packages? - Unix &#x26; Linux StackExchange</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/sanity-gatsby-blog3\"><em><strong>GitHub - bgoonz/sanity-gatsby-blog3: Blog withGatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://designerhangout.co/books\"><em><strong>Books | Designer Hangout</strong></em></a></li>\n<li>[✅] <a href=\"https://airtable.com/shriKMtkNHDNx7WwP/tblDHvDuLQOyAAuxj?backgroundColor=pink&#x26;viewControls=on\"><em><strong>Airtable - Gridview</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/-MkP23pBP3MWkIzJcreW/c/1o78krlTxpbLrCSE1ZqK/canvas/interview\"><em>**Interview -LAMBDA</em>LABS<em>Family</em>Promise**_</a></li>\n<li>[✅] <a href=\"https://github.com/rgrove\"><em><strong>rgrove (Ryan Grove)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/shd101wyy/shd101wyy.github.io\"><em><strong>GitHub -shd101wyy/shd101wyy.github.io</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/shd101wyy/Moni_Sample_Scripts\"><em>**GitHub -shd101wyy/Moni</em>Sample<em>Scripts**</em></a></li>\n<li>[✅] <a href=\"https://github.com/shd101wyy/Ebook-Crawler\"><em><strong>GitHub - shd101wyy/Ebook-Crawler: ebook crawler for studypurpose</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw\"><em><strong>3Blue1Brown -YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/pagexray/aedmpdookgbneegaeajpoldpnpfbpmlb\"><em><strong>PageXray - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://stackshare.io/tools/top\"><em><strong>What are the popular open source and SaaS tools that developers use in2021?</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326\"><em><strong>BGOONZBLOG2 - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/issues/995\"><em>**CVE-2021-32804 (High) detected in tar-2.2.2.tgz · Issue #995 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/searchAwesome\"><em><strong>bgoonz/searchAwesome</strong></em></a></li>\n<li>[✅] <a href=\"https://www.paypal.com/us/home\"><em><strong>Send Money, Pay Online or Set Up a Merchant Account -PayPal</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/y1ZrodVe1QH8lKAyrUCS/c/fgqSZck4xu7nVCamueQj/background/js-array-fundamentals\"><em><strong>JS Array Fundamentals: -Array-Methods-Lesson</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/array-methods-lesson/methods/native-implementation\"><em><strong>Native Implementation -Array-Methods-Lesson</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Uvacoder?tab=repositories\"><em><strong>Uvacoder (Uvacoder) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://dribbble.com/shots/16868128-old-blog-style\"><em><strong>old-blog-style by Bryan Guner onDribbble</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=medium+express+react+clone+heroku&#x26;oq=medium+express+react+clone+heroku&#x26;aqs=chrome..69i57j33i160.9494j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>medium express react clone heroku - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/archx3/medium-clone\"><em><strong>archx3/medium-clone: A clone of Medium.com using Node js, React andMongo DB</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/stlnick/how-to-deploy-a-full-stack-mern-app-with-heroku-netlify-ncb\"><em><strong>How To Deploy a Full-Stack MERN App with Heroku/Netlify - DEVCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/heroku-cli#download-and-install\"><em><strong>The Heroku CLI | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://community.chocolatey.org/packages/git\"><em><strong>Chocolatey Software | Git2.33.1</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/react-projects-you-should-build-this-year/\"><em><strong>7 React Projects You Should Build in2021</strong></em></a></li>\n<li>[✅] <a href=\"https://codeburst.io/build-simple-medium-com-on-node-js-and-react-js-a278c5192f47\"><em><strong>Build simple Medium.com on Node.js and React.js | by Krissanawat​Kaewsanmuang |codeburst</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/krissnawat/medium-clone-on-node\"><em><strong>krissnawat/medium-clone-on-node: clone Medium on Nodejs andReactjs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/regexhq/regex-email/blob/master/index.js\"><em><strong>regex-email/index.js at master ·regexhq/regex-email</strong></em></a></li>\n<li>[✅] <a href=\"https://dmitripavlutin.com/javascript-merge-arrays/\"><em><strong>3 Ways to Merge Arrays inJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialspoint.com/flattening-a-deeply-nested-array-of-literals-in-javascript\"><em><strong>Flattening a deeply nested array of literals inJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/d5cf41d127b965b405514f261070230a\"><em><strong>jAVASCRIPT-cHEAT-sHEET.md</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/readfile-guide.md\"><em>**readfile guide.md · bgoonz/BGOONZ</em>BLOG<em>2.0Wiki**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/gh-pages.png\"><em>**BGOONZ</em>BLOG<em>2.0/gh-pages.png at master ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/BGOONZ_BLOG_2.0/\"><em><strong>Bgoonzblog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/settings/tokens\"><em><strong>Personal Access Tokens</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/61cb07452a6cfb0008f2c5fd\"><em><strong>Deploy details |bgoonz-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1363\"><em>**Merge pull request #1362 from bgoonz/master by bgoonz · Pull Request#1363 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=projects&#x26;tbm=isch&#x26;ved=2ahUKEwirnduSvIX1AhU4o3IEHXxJAw0Q2-cCegQIABAA&#x26;oq=projects&#x26;gs_lcp=CgNpbWcQAzIHCCMQ7wMQJzIFCAAQgAQyBQgAEIAEMgUIABCABDIFCAAQgAQyBQgAEIAEMgUIABCABDIFCAAQgAQyBQgAEIAEMgUIABCABDoECAAQQzoHCAAQsQMQQ1DSCFivEmC5E2gAcAB4AIABS4gBgQSSAQE5mAEAoAEBqgELZ3dzLXdpei1pbWfAAQE&#x26;sclient=img&#x26;ei=XHnKYav_KrjGytMP_JKNaA&#x26;bih=771&#x26;biw=1582#imgrc=qoULjbq1PbAnDM\"><em><strong>projects - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/Vrm1wS3Y923aYZ7t7z6s/c/47ncdzDwDnLZuAZV9bkX/react-cheat-sheet\"><em><strong>React Cheat Sheet - CheatSheets</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/my-docs/v/cheat-sheets/?q=\"><em><strong>Cheat Sheets - MyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/copy-of-job-search-1/\"><em><strong>Home -Post-Bootcamp-Job-Search</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/my-docs/v/snippets/\"><em><strong>Introduction - MyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonzblog20master.gatsbyjs.io/\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/pure-markdown-blog\"><em><strong>bgoonz/pure-markdown-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/eslint/eslint/issues/13838\"><em><strong>SyntaxError: Unexpected token - } catch { · Issue #13838 ·eslint/eslint</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/54092486/visual-studio-code-terminal-blank-screen\"><em><strong>Visual Studio Code - Terminal Blank Screen - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/tags/tag_img.asp\"><em><strong>HTML img tag</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/copy-of-job-search\"><em><strong>bgoonz/copy-of-job-search</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialspoint.com/how-to-read-and-write-a-file-using-javascript\"><em><strong>How to read and write a file usingJavascript?</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.logrocket.com/file-processing-node-js-comprehensive-guide/\"><em><strong>File processing in Node.js: A comprehensive guide - LogRocketBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/kayut/using-arrow-functions-in-object-methods-14pf\"><em><strong>Using arrow functions in object methods - DEVCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nodejs/node/blob/master/lib/util.js\"><em><strong>node/util.js at master ·nodejs/node</strong></em></a></li>\n<li>[✅] <a href=\"https://nodejs.org/api/modules.html\"><em><strong>Modules: CommonJS modules | Node.js v17.3.0Documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://betterprogramming.pub/4-very-useful-built-in-node-js-modules-b734e140174c\"><em><strong>4 Very Useful Built-In Node.js Modules | by Louis Petrik | BetterProgramming</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialsteacher.com/nodejs/nodejs-modules\"><em><strong>Node.jsModules</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tabnine.com/code/javascript/functions/builtins/use\"><em><strong>builtins.use JavaScript and Node.js code examples |Tabnine</strong></em></a></li>\n<li>[✅] <a href=\"https://www.convertonline.io/convert/json-to-js\"><em><strong>Convert JSON toJavascript</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codegrepper.com/search.php?q=regex%20between%20two%20strings\"><em><strong>Search Code Snippets | regex between twostrings</strong></em></a></li>\n<li>[✅] <a href=\"https://www.regextester.com/96872\"><em><strong>Extract String Between Two STRINGS - RegexTester/Debugger</strong></em></a></li>\n<li>[✅] <a href=\"https://regex-escape.com/regex-escaper-online.php\"><em><strong>RegEx-Escape Online - The free Escaper Tool -EN</strong></em></a></li>\n<li>[✅] <a href=\"https://textce.com/extract-text-between-two-strings-tags-characters.html\"><em><strong>Extract text/content between two strings, tags,characters.</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/eec72cc959730bd0fdab0a7bb38a1dc8\"><em><strong>snippets-mega-comp.js</strong></em></a></li>\n<li>[✅] <a href=\"https://www.duke-energy.com/business/products/smartsaver/technical-question\"><em><strong>Technical Question Submission Form - DukeEnergy</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/6jXFm2M5nUh1ZhxJ9vGa/readme-1\"><em><strong>Home - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/job-search/filling-out-forms\"><em>**Filling Out Forms -WEB</em>DEV<em>JOB</em>SEARCH**_</a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/check/manage-account\"><em><strong>LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\"><em><strong>bgoonz/INTERVIEW-PREP-COMPLETE:INTERVIEW-PREP-ARCHIVE</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz\"><em><strong>bgoonz's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgzGllMNdnCmSvrlSFWDwkkWXKnWN\"><em><strong>Your submission for Hired has been received - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://account.amazon.jobs/en-US/jobs/1642321/apply\"><em><strong>Apply to a Job |Amazon.jobs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/settings/security-log\"><em><strong>Security log</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/random-embedable-content/deploys/61b3bba5d21a99000843f3f3\"><em><strong>Deploy details |random-embedable-content</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-list-of-embedable-content\"><em><strong>bgoonz/random-list-of-embedable-content</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/javascript/\"><em><strong>Javascript |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/crawlers/e673c304-fe20-4ddb-a61a-ae38c25ca462/overview\"><em><strong>Overview | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/JXBUGAW4Y5/dashboard\"><em><strong>Overview | Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/onboarding/#/push-data\"><em><strong>Interactive Tutorial | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://academy.algolia.com/trainings\"><em><strong>Algolia Academy</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/account/api-keys/all?applicationId=JXBUGAW4Y5\"><em><strong>Algolia |Dashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/O6OT9G9U8Z/explorer/interface-demos/netlify_a1b7ee1a-11a7-4bd2-a341-2260656e216f_master_all/edit/2e4a0ba7-4fc8-4ed3-ab24-9b3d53e9b894\"><em><strong>Index |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/O6OT9G9U8Z/explorer/interface-demos/netlify_a1b7ee1a-11a7-4bd2-a341-2260656e216f_master_all\"><em><strong>Index |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/O6OT9G9U8Z/explorer/browse/hiiiii?searchMode=search\"><em><strong>Index |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/guides/building-search-ui/installation/react/\"><em><strong>How to install React InstantSearch |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/blog/product/introducing-our-new-navigation/?utm_medium=page_link&#x26;utm_source=dashboard\"><em><strong>Introducing our new navigation | AlgoliaBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://resumecontacts.indeed.com/contacted/interested?rAKey=f1567b217820b5d4&#x26;sAKey=8cae3679df59469e&#x26;uid=1flsslcd2mvoh800&#x26;ecmi=%3C1flsslcd2mvoh800%40indeedemail.com%3E&#x26;h=e435741e82904126b7285e8a42565127&#x26;hl=en&#x26;co=US&#x26;el=en_US&#x26;name=Michael+Mcarthy&#x26;company=Capital+One&#x26;jt=Software+Engineer+Full+Stack&#x26;mailAgent=MESSAGES__WEB\"><em><strong>IndeedResume</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Gatsby-Experiments/blob/439a322efc543abb21471db2dbb18361e460ec98/package.json\"><em><strong>Gatsby-Experiments/package.json at439a322efc543abb21471db2dbb18361e460ec98 ·bgoonz/Gatsby-Experiments</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonzblog20master.gatsbyjs.io/docs/tools/\"><em><strong>Tools</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/dashboard\"><em><strong>Stackbit App</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/compare/preview...master\"><em>**Comparing preview...master ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pulls\"><em>**Pull requests ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/61b3853967a80c00bf22616b#/blog/what-is-backend-development/\"><em><strong>Starter - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://random-list-of-embedable-content.vercel.app/#gsc.tab=0\"><em><strong>Document</strong></em></a></li>\n<li>[✅] <a href=\"https://ds-algo-official.netlify.app/\"><em><strong>Data Structures InteractivePlayground</strong></em></a></li>\n<li>[✅] <a href=\"https://lab.github.com/githubtraining/github-actions:-publish-to-github-packages\"><em><strong>GitHub Actions: Publish to GitHub Packages | GitHub LearningLab</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/githubtraining/github-actions-for-packages-demo/pull/1\"><em><strong>Update cd-workflow.yml by DavideC03 · Pull Request #1 ·githubtraining/github-actions-for-packages-demo</strong></em></a></li>\n<li>[✅] <a href=\"https://gitpod.io/#https://github.com/githubtraining/github-actions-for-packages-demo/pull/1\"><em><strong>Starting ---Gitpod</strong></em></a></li>\n<li>[✅] <a href=\"https://lab.github.com/githubtraining/github-actions:-writing-javascript-actions\"><em><strong>GitHub Actions: Writing JavaScript Actions | GitHub LearningLab</strong></em></a></li>\n<li>[✅] <a href=\"https://lab.github.com/githubtraining/devops-with-github-actions?overlay=register-box-overlay\"><em><strong>DevOps with GitHub Actions | GitHub LearningLab</strong></em></a></li>\n<li>[✅] <a href=\"https://lab.github.com/githubtraining/github-actions:-using-github-script\"><em><strong>GitHub Actions: Using GitHub Script | GitHub LearningLab</strong></em></a></li>\n<li>[✅] <a href=\"https://lab.github.com/githubtraining/devops-with-github-actions\"><em><strong>GitHub LearningLab</strong></em></a></li>\n<li>[✅] <a href=\"https://opensource.guide/best-practices/\"><em><strong>Best Practices for Maintainers | Open SourceGuides</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/get-started/quickstart/git-and-github-learning-resources\"><em><strong>Git and GitHub learning resources - GitHubDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/developers\"><em><strong>Developers - GitHub Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://calendar.google.com/calendar/u/0/r?tab=rc&#x26;pli=1\"><em><strong>Google Calendar - December2021</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/#/a185027389p258804254/admin/streams/table/2245650133\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/tagmanager/answer/6103696\"><em><strong>Setup and install Tag Manager - Tag ManagerHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://tagmanager.google.com/#/container/accounts/6005515226/containers/55966760/workspaces/2\"><em><strong>Google TagManager</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.medium.com/secure-password-hashing-64cb49c7b5b\"><em><strong>Secure Password Hashing | by Bryan Guner | Dec, 2021 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/reactide/reactide\"><em><strong>reactide/reactide: Reactide is the first dedicated IDE for React webapplication development.</strong></em></a></li>\n<li>[✅] <a href=\"https://aglowiditsolutions.com/blog/react-developer-tools/\"><em><strong>Best React Developer Tools - Aglowid ITSolutions</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/webdevhub42/Embeds2-1acec1bb726c4b21a2c5c61cdb264f14\"><em><strong>Embeds2</strong></em></a></li>\n<li>[✅] <a href=\"https://create-react-app-teal-seven.vercel.app/\"><em><strong>Create React App + GoAPI</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=html+boilerplate&#x26;oq=html+bo&#x26;aqs=chrome.1.69i57j69i59j35i39j0i433i512l3j69i60l2.2010j0j4&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>html boilerplate - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/how-to-make-an-unobtrusive-scroll-to-top-button/\"><em><strong>How to Make an Unobtrusive Scroll-to-Top Button -CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/marcelrojas/pen/GRZOWwp\"><em><strong>Scroll-to-Top Button with Vanilla JS (Detecting the scrollposition)</strong></em></a></li>\n<li>[✅] <a href=\"https://marketplace.mendix.com/\"><em><strong>Mendix Marketplace - Home</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/tree/40ecc95f000a848710c39e166961b8da7fca306b\"><em>**bgoonz/BGOONZ</em>BLOG<em>2.0 at40ecc95f000a848710c39e166961b8da7fca306b**</em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/transition\"><em><strong>transition - CSS: Cascading Style Sheets |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/61b3982207b89f82642d360c\"><em><strong>Deploy details |bgoonz-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://random-static-html-deploys.netlify.app/blm.html\"><em><strong>Resources Archive - Black LivesMatter</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/61b39d6819b1c400085edb5c\"><em><strong>Deploy details |bgoonz-blog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Gatsby-Experiments\"><em><strong>bgoonz/Gatsby-Experiments:Gatsby-Experiments</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/netlify/a1b7ee1a-11a7-4bd2-a341-2260656e216f\"><em><strong>Netlify Crawler | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://sanity-signup.netlify.app/\"><em><strong>Stackbit Azimuth Theme</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1233\"><em>**hi by bgoonz · Pull Request #1233 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/61b3853967a80c00bf22616b\"><em><strong>Stackbit App</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.stackbit.com/reference/\"><em><strong>Reference Guides | Stackbit Documentation - V2Beta</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.stackbit.com/how-to-guides/upgrading/\"><em><strong>Upgrade Guide | Stackbit Documentation - V2Beta</strong></em></a></li>\n<li>[✅] <a href=\"https://v1.stackbit.com/studio/61a1793b8c626700c826cfa2/\"><em><strong>Gatsby-Experiments - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Gatsby-Experiments/pull/28\"><em><strong>hi by bgoonz · Pull Request #28 ·bgoonz/Gatsby-Experiments</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/Liberis-Docs-New/blob/master/package.json\"><em><strong>Liberis-Docs-New/package.json at master ·side-projects-42/Liberis-Docs-New</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1238\"><em>**templates fix by bgoonz · Pull Request #1238 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://platform.twitter.com/jot.html\"><em><strong>Twitter Widget Log Helper</strong></em></a></li>\n<li>[✅] <a href=\"https://reactjs.org/docs/lists-and-keys.html#keys\"><em><strong>Lists and Keys --React</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/@Cyclodex/demystifying-npm-install-npm-ci-package-lock-json-2807fc0ee404\"><em><strong>Demystifying npm install, npm ci &#x26; package-lock.json | by FabianGander |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages\"><em><strong>angularjs - Unable to resolve dependency tree error when installing npmpackages - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://prismjs.com/download.html#themes=prism-twilight&#x26;languages=markup+css+clike+javascript\"><em><strong>Download ▲Prism</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/janosh/blog\"><em><strong>janosh/blog: My blog. Powered byGatsby.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/janosh?tab=repositories&#x26;q=&#x26;type=&#x26;language=javascript&#x26;sort=stargazers\"><em><strong>janosh (Janosh Riebesell) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/tutorific-frontend\"><em><strong>Web-Dev-Collaborative/tutorific-frontend: React + Redux frontend for6-day Codeworks solo project'Tutorific'.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/dark-mode-minimal\"><em><strong>Web-Dev-Collaborative/dark-mode-minimal: SSR compatible, flicker-freedark mode MVP inGatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/WEB_DEV_COLLABORATIVE\"><em>**Web-Dev-Collaborative/WEB</em>DEV<em>COLLABORATIVE**</em></a></li>\n<li>[✅] <a href=\"https://www.computerworld.com/article/3635008/google-chrome-shortcut-sidebar.html\"><em><strong>The Chrome shortcut sidebar you didn't know you needed |Computerworld</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/feed/?trk=guest_homepage-basic_nav-header-signin\"><em><strong>Feed |LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/WULF\"><em><strong>Web-Dev-Collaborative/WULF</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/giuliachiola\"><em><strong>bgoonz/giuliachiola: taken fromgiuliachiola</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/eengineergz/scrape-me/tree/master/.github/workflows\"><em><strong>scrape-me/.github/workflows at master ·eengineergz/scrape-me</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/react-boilerplate/react-boilerplate\"><em><strong>react-boilerplate/react-boilerplate: A highly scalable, offline-firstfoundation with the best developer experience and a focus on performanceand bestpractices.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/reading\"><em><strong>Web-Dev-Collaborative/reading: A list of computer-science readings Irecommend</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/javascript-beginners-tutorial\"><em><strong>bgoonz/javascript-beginners-tutorial-329</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/PageModifiedOfficial/Check-My-Links\"><em><strong>PageModifiedOfficial/Check-My-Links: A Google Chrome extension whichallows you to check webpages for broken links (Response Code 404etc)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/gulp-starter-env/network/members\"><em><strong>Forks ·side-projects-42/gulp-starter-env</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/papers-we-love/papers-we-love\"><em><strong>papers-we-love/papers-we-love: Papers from the computer sciencecommunity to read anddiscuss.</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/ef1c779533112b114334479618d0e535\"><em><strong>cool</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Markdown-Templates\"><em><strong>bgoonz/Markdown-Templates</strong></em></a></li>\n<li>[✅] <a href=\"https://www.textfixer.com/html/convert-url-to-html-link.php\"><em><strong>Convert URL to HTMLLink</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/SAjtvJfpccGxE7rKsRVW/resources\"><em><strong>Resources - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/-MjLjuvITJh8ZwT8mVxp/c/wxizzRva19qpNoQJtdFz/programming-languages/programming-languages/cheatsheets\"><em><strong>CHEATSHEETS -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/search/personal?path=%2F&#x26;query=embed&#x26;search_session_id=47122654600063764722235860009024&#x26;search_token=oyTocxgBXAYgGvH5%2BN1H3fLs3g%2BGN9qOnADLZje1KXE%3D\"><em><strong>Search results -Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/dropbox-8xyxx?file=/index.html\"><em><strong>dropbox -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LambdaSchool/React-I-Demo/tree/master/src\"><em><strong>React-I-Demo/src at master ·LambdaSchool/React-I-Demo</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/alissacrane123/Module-2-Resources\"><em><strong>alissacrane123/Module-2-Resources</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bartdorsey/express-jwt-cookies-demo-app\"><em><strong>bartdorsey/express-jwt-cookies-demo-app</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bartdorsey/simple-docker-postgres\"><em><strong>bartdorsey/simple-docker-postgres: A Simple Way to start up a postgresdocker container for localdevelopment</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bartdorsey/developer-setup-guide\"><em><strong>bartdorsey/developer-setup-guide: This contains instructions on how tosetup your system fordevelopment.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bartdorsey/react-socketio-chat-demo\"><em><strong>bartdorsey/react-socketio-chat-demo</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bartdorsey/developer-playbook\"><em><strong>bartdorsey/developer-playbook: This is my custom Ansible playbook forsetting up my dev environment onWSL2.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL/actions/runs/1401604565\"><em><strong>Create blank.yml ·bgoonz/DS-ALGO-OFFICIAL@6190397</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/My-Medium-Blog\"><em><strong>bgoonz/My-Medium-Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/resources/links/~/gitsync/status\"><em><strong>Links - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://copyleaks.com/success/registration\"><em><strong>Login or Sign Up toCopyleaks</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1068\"><em><strong>WEB43 - 1.1 - User Interface andGit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LambdaSchool/Precourse\"><em><strong>LambdaSchool/Precourse: This repo contains the instruction material andassignments for Lambda School's pre-courseprogram.</strong></em></a></li>\n<li>[✅] <a href=\"https://lockys.github.io/2016/07/14/2014-11-08-note-javascript-hasownproperty-to-understand/\"><em><strong>#Note, Javascript hasOwnProperty 理解 |lockys</strong></em></a></li>\n<li>[✅] <a href=\"http://bonsaiden.github.io/JavaScript-Garden/#object.general\"><em><strong>JavaScriptGarden</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/users/\"><em><strong>Users - Stack Overflow</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/classeur/markdown-it-pandoc-renderer\"><em><strong>classeur/markdown-it-pandoc-renderer: Markdown-it Pandoc ASTrenderer</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?authkey=%21AHSDSyoYqzg2K2E&#x26;id=D21009FDD967A241%21538729&#x26;cid=D21009FDD967A241\"><em><strong>Lambda Cloud Storage -OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?id=D21009FDD967A241%21538729&#x26;cid=D21009FDD967A241&#x26;action=createTextDocument&#x26;v=TextFileEditor\"><em><strong>OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://www.robotstxt.org/robotstxt.html\"><em><strong>The Web Robots Pages</strong></em></a></li>\n<li>[✅] <a href=\"https://app.slack.com/client/T4JUEB3ME/browse-files/files/F01UPV9KC94\"><em><strong>Slack | File browser | Students at LambdaSchool</strong></em></a></li>\n<li>[✅] <a href=\"https://app.slack.com/client/T4JUEB3ME/browse-files\"><em><strong>Slack | File browser | Students at LambdaSchool</strong></em></a></li>\n<li>[✅] <a href=\"https://documentcloud.adobe.com/link/home?pdfnow%21verb=pdf-to-image&#x26;x_api_client_id=adobe_com&#x26;x_api_client_location=pdf_to_image\"><em><strong>Adobe AcrobatHome</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/8122c253a725870feaf7e22cb70f4daa\"><em><strong>CHEATSHEETS</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/apps\"><em><strong>Dropbox App Center - Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/install#downloaded\"><em><strong>Install - Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://help.dropbox.com/learn\"><em><strong>Dropbox fundamentals | Dropbox Help</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/developers/reference\"><em><strong>DBX Developer Guides -Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.dropbox.com/dbx-file-access-guide\"><em><strong>DBX File Access Guide -Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.dropbox.com/dbx-sharing-guide\"><em><strong>DBX Sharing Guide -Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/developers/apps/info/jccsv0atpqxqfau\"><em><strong>embed42bgoonz -Dropbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/s/pkwmb529a3k5pfo/comfortably.mp4?dl=0\"><em><strong>comfortably.mp4</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/WebDevPojectArchive\"><em><strong>bgoonz/WebDevPojectArchive</strong></em></a></li>\n<li>[✅] <a href=\"https://apps.elfsight.com/panel/applications/search/\"><em><strong>Elfsight Apps</strong></em></a></li>\n<li>[✅] <a href=\"https://elfsight.com/social-media-share-buttons/\"><em><strong>The best Social Media Share Buttons for website (forfree)</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/info/sessionexpired?service=mail&#x26;passive=true&#x26;rm=false&#x26;continue=https%3A%2F%2Fmail.google.com%2Fmail%2F%3Ftab%3Drm%26ogbl&#x26;scc=1&#x26;ltmpl=default&#x26;ltmplcache=2&#x26;emr=1&#x26;osid=1&#x26;flowName=GlifWebSignIn&#x26;flowEntry=ServiceLogin&#x26;cid=1&#x26;TL=AM3QAYa4xssy7rWOW4UUOfPB04pqZ5-_BueeHzeLI6grxbVccFfm7HH-AlzgqpO7\"><em><strong>Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/webdevvanillaprojectarchive\"><em><strong>bgoonz/webdevvanillaprojectarchive</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Leetcode-JS-PY-MD\"><em><strong>bgoonz/Leetcode-JS-PY-MD</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/9d758c214f580118552683d711822e39\"><em><strong>frontend-interview-questions</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/vvscode/js--interview-questions\"><em><strong>vvscode/js--interview-questions: Notes from technical (javascript)interviews. Tasks and quiz for different topics to discuss on interview/ check self skills injavascript</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/tools/links/~/settings/share\"><em><strong>REPL.IT Compilations -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/tools/showcase/~/settings/share\"><em><strong>Showcase -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=reactjs+guitar+recorder&#x26;sxsrf=AOaemvLZ58p7P8eeIUrlVv4kN4fvyaDj8w%3A1640434361994&#x26;ei=uQrHYc-PPNWZptQPs5GHwAk&#x26;ved=0ahUKEwiP0LGb9v70AhXVjIkEHbPIAZgQ4dUDCA4&#x26;uact=5&#x26;oq=reactjs+guitar+recorder&#x26;gs_lcp=Cgdnd3Mtd2l6EAM6BwgAEEcQsAM6BwgjELACECdKBAhBGABKBAhGGABQjgxY_w5g5RFoAXACeACAAXWIAd4BkgEDMC4ymAEAoAEByAEGwAEB&#x26;sclient=gws-wiz\"><em><strong>reactjs guitar recorder - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/react-guitar\"><em><strong>react-guitar - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/4lejandrito/react-guitar\"><em><strong>GitHub - 4lejandrito/react-guitar: A beautiful and accessible guitarcomponent for React. ⚛️ 🎸</strong></em></a></li>\n<li>[✅] <a href=\"https://reactjsexample.com/tag/guitar/\"><em><strong>Guitar - React.js Examples</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/examples/package/react-guitar\"><em><strong>react-guitar examples -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://morioh.com/p/7d1e57d5783a\"><em><strong>A beautiful and flexible guitar component forReact</strong></em></a></li>\n<li>[✅] <a href=\"https://npm.io/package/react-guitar-sound\"><em><strong>React-guitar-sound NPM |npm.io</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/react-guitar-sound\"><em><strong>react-guitar-sound -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://morioh.com/p/d3d9f055ab34\"><em><strong>Top React Audio Player Components (MusicPlayers)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Portfolio-Projects42/pedalboard\"><em><strong>Portfolio-Projects42/pedalboard</strong></em></a></li>\n<li>[✅] <a href=\"https://awesomeopensource.com/project/kriasoft/react-starter-kit\"><em><strong>React StarterKit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Audio-Tools/powertabeditor\"><em><strong>Web-Audio-Tools/powertabeditor: A cross-platform guitar tablatureeditor.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Audio-Tools/gtr-cof\"><em><strong>Web-Audio-Tools/gtr-cof: Interactive music theory dashboard forguitarists.http://guitardashboard.com/</strong></em></a></li>\n<li>[✅] <a href=\"https://guitardashboard.com/\"><em><strong>Guitar Chord Finder, Free Interactive Tool | GuitarDashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mikehadlow/gtr-cof\"><em><strong>GitHub - mikehadlow/gtr-cof: Interactive music theory dashboard forguitarists.http://guitardashboard.com/</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/lucaong/guitarstack\"><em><strong>lucaong/guitarstack: Digital guitar effects right in yourbrowser!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jbergknoff/guitar-tuner/blob/master/correlation_worker.js\"><em>**guitar-tuner/correlation</em>worker.js at master ·jbergknoff/guitar-tuner**_</a></li>\n<li>[✅] <a href=\"https://github.com/sfischer13/awesome-guitar#websites\"><em><strong>sfischer13/awesome-guitar: Useful resources for guitarplayers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-static-html-page-deploy/blob/master/README.md\"><em><strong>random-static-html-page-deploy/README.md at master ·bgoonz/random-static-html-page-deploy</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/issues/1359\"><em>**critical-js.md · Issue #1359 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/6/?ogbl#inbox\"><em><strong>Inbox (37) - webdevresourcehub@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgzGmtDvthGMrGgsSvGFWnzLkNnWM\"><em><strong>[GitHub] Please verify your device - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/3/#inbox\"><em><strong>Inbox (16) - bgoonz1996@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/5/#inbox/FMfcgzGmtDvtNPjrfkdZqmFCrblXstsr\"><em><strong>New login to Instagram from Chrome on Windows - gunerb1@tcnj.edu - TheCollege of New JerseyMail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/bgoonz/\"><em><strong>Bryan Guner Music (@bgoonz) • Instagram photos andvideos</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/fb-and-twitter-api-embeds/\"><em><strong>1 new message</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.tawk.to/#/admin/613041ecd6e7610a49b3326a/integrations-settings\"><em><strong>tawk.to | Administration | bgoonzblog |Webhooks</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgzGmtDvtFDNpSGMJjxSNhGNqmtlg\"><em><strong>New sign-in to your Opera account - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://auth.opera.com/account/login?service=auth\"><em><strong>Opera Account</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/3db10bb662f66b0b564c7d748226153d\"><em><strong>wordpress.html</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/random-static-html-deploys/overview\"><em><strong>Site overview |random-static-html-deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://random-static-html-deploys.netlify.app/\"><em><strong>CodePen - Responsive iFrames PatternGrid</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/job-search/\"><em>**Home -WEB</em>DEV<em>JOB</em>SEARCH**_</a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/PoKJzag\"><em><strong>Javascript</strong></em></a></li>\n<li>[✅] <a href=\"https://app.archbee.io/doc/l4mS13_rnF_Cd59ynngLZ/3LWQhuFJ5pOXnbYEVTk17\"><em><strong>Archbeedocument</strong></em></a></li>\n<li>[✅] <a href=\"https://us-west-2.console.aws.amazon.com/systems-manager/appmanager/application/AppManager-CFN-databricks-workspace-stack?region=us-west-2&#x26;tab=AppManagerApplicationResourcesTab\"><em><strong>Application Details - AWS Systems Manager - ApplicationManager</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining\"><em><strong>Optional chaining (?.) - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://aquadzn.github.io/learn-x-by-doing-y/\"><em><strong>Learn X by doing Y - A project-based learning searchengine</strong></em></a></li>\n<li>[✅] <a href=\"https://trekhleb.dev/projects/\"><em><strong>Trekhleb | Projects</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algoexpert.io/product\"><em><strong>AlgoExpert | Ace the CodingInterviews</strong></em></a></li>\n<li>[✅] <a href=\"https://hub.docker.com/_/python/\"><em><strong>python - Docker Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://www.hackerrank.com/\"><em><strong>HackerRank</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mundimark/awesome-markdown\"><em><strong>mundimark/awesome-markdown: A collection of awesome markdown goodies(libraries, services, editors, tools, cheatsheets,etc.)</strong></em></a></li>\n<li>[✅] <a href=\"https://ramdajs.com/\"><em><strong>Ramda Documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://pdfcandy.com/extract-text.html\"><em><strong>PDF to TXT: Extract text from PDF free in a singleclick</strong></em></a></li>\n<li>[✅] <a href=\"http://marylark.com/\"><em><strong>Mary Lark - Full Stack Engineer</strong></em></a></li>\n<li>[✅] <a href=\"https://regexr.com/\"><em><strong>RegExr: Learn, Build, &#x26; Test RegEx</strong></em></a></li>\n<li>[✅] <a href=\"https://regex101.com/r/x1swZC/1\"><em><strong>Online regex tester and debugger: PHP, PCRE, Python, Golang andJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/launch-school/javascript-weekly-using-a-structured-problem-solving-approach-fb9cce41ba5a\"><em><strong>JavaScript Weekly: Using a Structured Problem-Solving Approach | bySeverin Perez | Launch School |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/@javinpaul/hello-alonso-ahmetaj-while-i-agree-that-colt-steeles-javascript-algorithms-and-data-structures-fa5a33d22ae3\"><em><strong>Hello Alonso Ahmetaj, while I agree that Colt Steele's JavaScriptAlgorithms and Data Structures... | by javinpaul |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://bruno-simon.com/\"><em>**\\</em>_____🚗______________**_</a></li>\n<li>[✅] <a href=\"https://blog.benoitvallon.com/data-structures-in-javascript/the-hash-table-data-structure/\"><em><strong>The Hash Table data structure - Ben'sBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/joedotjs?tab=repositories\"><em><strong>joedotjs (Joseph Alves) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://codewithhugo.com/observablehq-notebooks-for-javascript-demos-and-prototypes/\"><em><strong>ObservableHQ notebooks for JavaScript demos and prototypes · Code withHugo</strong></em></a></li>\n<li>[✅] <a href=\"https://codewithhugo.com/\"><em><strong>Code with Hugo</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/lydiahallie/javascript-visualized-event-loop-3dif\"><em><strong>✨♻️ JavaScript Visualized: Event Loop -DEV</strong></em></a></li>\n<li>[✅] <a href=\"https://karloespiritu.github.io/cheatsheets/postgresql/\"><em><strong>Postgresql ·Cheatsheets</strong></em></a></li>\n<li>[✅] <a href=\"https://docker-curriculum.com/\"><em><strong>A Docker Tutorial for Beginners</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz?tab=stars\"><em><strong>Your Stars</strong></em></a></li>\n<li>[✅] <a href=\"https://learn-anything.xyz/\"><em><strong>Learn Anything</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nikitavoloboev\"><em><strong>nikitavoloboev (Nikita Voloboev)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz.github.io/blob/master/index.html\"><em><strong>bgoonz.github.io/index.html at master ·bgoonz/bgoonz.github.io</strong></em></a></li>\n<li>[✅] <a href=\"https://imaginary.org/sites/default/files/20190911-lala-booklet-v0.4-web-text.pdf\"><em><strong>20190911-lala-booklet-v0.4-web-text.pdf</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nglgzz\"><em><strong>nglgzz (Angelo Gazzola)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/learn-anything/cheat-sheets\"><em><strong>learn-anything/cheat-sheets: Awesome CheatSheets</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/frontarm/async-javascript-cheatsheet\"><em><strong>frontarm/async-javascript-cheatsheet: Cheatsheet for promises andasync/await.</strong></em></a></li>\n<li>[✅] <a href=\"https://frontarm.com/courses/async-javascript/promises/why-async/\"><em><strong>Why async: JavaScript and the realworld</strong></em></a></li>\n<li>[✅] <a href=\"https://frontarm.com/async-cheatsheet.pdf\"><em><strong>async-cheatsheet.pdf</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/FileSaver.js\"><em><strong>blakeembrey/FileSaver.js: An HTML5 saveAs() FileSaverimplementation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/code-challenge-n-queens\"><em><strong>blakeembrey/code-challenge-n-queens: Solve various n-queens problems inthe terminal</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/react-list\"><em><strong>blakeembrey/react-list: A versatile infinite scroll Reactcomponent.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/code-challenge\"><em><strong>blakeembrey/code-challenge: Command line interface for running codechallenges</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/each\"><em><strong>blakeembrey/each: Iterate over an object, array or string inJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/node-language-exec\"><em><strong>blakeembrey/node-language-exec: Execute a file in any programminglanguage using node</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/invoke\"><em><strong>blakeembrey/invoke: Functional utility for invoking the same method onevery call in JavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/map\"><em><strong>blakeembrey/map: Map over an object, array or string inJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/filter\"><em><strong>blakeembrey/filter: Filter an object, array or string inJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/node-language-command\"><em><strong>blakeembrey/node-language-command: Look up the command for executing aprogram in anylanguage</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/linked-list\"><em><strong>blakeembrey/linked-list: Minimalistic linkedlists.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/breadth-filter\"><em><strong>blakeembrey/breadth-filter: Breadth-first deep objectfilter</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/node-module-template\"><em><strong>blakeembrey/node-module-template: My standard node moduletemplate</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/iterative\"><em><strong>blakeembrey/iterative: Functions for working with iterators inJavaScript and TypeScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/js-functools\"><em><strong>blakeembrey/js-functools: Utilities for working with functions inJavaScript, withTypeScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/javascript-stringify\"><em><strong>blakeembrey/javascript-stringify: Stringify is to `eval` as`JSON.stringify` is to`JSON.parse`</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/deque\"><em><strong>blakeembrey/deque: JavaScript implementation of a double-endedqueue</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/blakeembrey/array-flatten\"><em><strong>blakeembrey/array-flatten: Flatten a multi-dimensional array inJavaScript.</strong></em></a></li>\n<li>[✅] <a href=\"https://darrengoossens.wordpress.com/2020/02/17/a-simple-pandoc-markdown-cheat-sheet/\"><em><strong>A simple pandoc/markdown cheat sheet --DSPACE</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/tagged/pandoc\"><em><strong>Newest 'pandoc' Questions - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/53403041/pandoc-convert-markdown-to-html-without-any-html-attributes\"><em><strong>Pandoc: Convert Markdown to HTML *without* any HTML attributes -StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://superuser.com/tags/pandoc/hot\"><em><strong>Hottest 'pandoc' Answers - SuperUser</strong></em></a></li>\n<li>[✅] <a href=\"https://learnbyexample.github.io/customizing-pandoc/\"><em><strong>learnbyexample - Customizing pandoc to generate beautiful pdf and epubfrom markdown</strong></em></a></li>\n<li>[✅] <a href=\"https://opensource.com/article/20/5/pandoc-cheat-sheet\"><em><strong>Convert documents with Pandoc like a pro |Opensource.com</strong></em></a></li>\n<li>[✅] <a href=\"https://opensource.com/downloads/pandoc-cheat-sheet\"><em><strong>Pandoc Cheat Sheet: Download now |Opensource.com</strong></em></a></li>\n<li>[✅] <a href=\"https://letterboxd.com/nikitavoloboev/\"><em><strong>‎Nikita Voloboev's profile •Letterboxd</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL\"><em><strong>bgoonz/DS-ALGO-OFFICIAL: The finalIteration</strong></em></a></li>\n<li>[✅] <a href=\"https://giphy.com/gifs/gustavo-loop-c4d-5xtDarLRM81i9LaJAR2\"><em><strong>recursion GIF by kidmograph - Find &#x26; Share onGIPHY</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=make+image+background+image+html&#x26;oq=make+image+background+image+html&#x26;aqs=chrome..69i57j0i22i30l3.14135j0j15&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>make image background image html - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://pandasuite.com/dashboard/download-studio\"><em><strong>PandaSuite -Dashboard</strong></em></a></li>\n<li>[✅] <a href=\"https://stormotion.io/web-application-development-services/\"><em><strong>Web Application Development Company | Web App Development Services |Stormotion</strong></em></a></li>\n<li>[✅] <a href=\"https://stormotion.io/portfolio/\"><em><strong>Software, Web &#x26; Mobile Applications we built for our clients |Stormotion</strong></em></a></li>\n<li>[✅] <a href=\"https://stormotion.io/blog/\"><em><strong>Stormotion Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://www.paypal.com/authflow/password-recovery/?failedBecause=service_error\"><em><strong>PayPal</strong></em></a></li>\n<li>[✅] <a href=\"https://web2application.com/w2a/user/signup.php\"><em><strong>New User Signup Page</strong></em></a></li>\n<li>[✅] <a href=\"https://stormotion.io/blog/how-to-turn-a-website-into-an-app/\"><em><strong>How to Turn a Website Into anApp</strong></em></a></li>\n<li>[✅] <a href=\"https://snappy.appypie.com/user/app/upgrade-app/2681e8ae715d?type=freeedit\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgxwLsmnBDphBSczBRXvgHFTjqsWR\"><em><strong>Appy Pie confirmation code: 82-36-74 - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://amazingmccarthyaa9929.pwastore.com/\"><em><strong>Amazing-mccarthy-aa9929 | Make an App like Amazing-mccarthy-aa9929Using Appy Pie</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=cool+backgrounds&#x26;sxsrf=ALeKk01BIK08zttdWyvrIeo9owsi2ATIAQ:1615419314488&#x26;source=lnms&#x26;tbm=isch&#x26;sa=X&#x26;ved=2ahUKEwiuwJzz8abvAhWMFlkFHUxjBGAQ_AUoAXoECBUQAw&#x26;biw=1780&#x26;bih=756#imgrc=BeF7e6bfTk-XCM\"><em><strong>cool backgrounds - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/web-dev-notes-resource-site/blob/master/core-site/index.html\"><em><strong>web-dev-notes-resource-site/index.html at master ·bgoonz/web-dev-notes-resource-site</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground\"><em><strong>bgoonz/embedable-repl-and-integrated-code-space-playground</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/learn/?messages=success%5B0%5D%3Dflash.signin-success\"><em><strong>Learn to Code --- For Free --- Coding Courses for BusyPeople</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/learn/coding-interview-prep/\"><em><strong>Coding Interview Prep |freeCodeCamp.org</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox\"><em><strong>Inbox (5,732) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/1/#inbox/FMfcgxwLswKZRFcFZltQtqwShfdJvkDs\"><em><strong>Welcome to Dynatrace! - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/web-dev-resource-hub/overview\"><em><strong>Site overview |web-dev-resource-hub</strong></em></a></li>\n<li>[✅] <a href=\"https://code-playground.netlify.app/\"><em><strong>Document</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/mynetwork/\"><em><strong>(4) LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://portfolio42.netlify.app/\"><em><strong>Bryan Guner</strong></em></a></li>\n<li>[✅] <a href=\"https://search.yahoo.com/search/?pid=default2017&#x26;p=google+stock+sy\"><em><strong>google stock sy - Yahoo SearchResults</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/exercise-tracker\"><em><strong>APIs and Microservices Projects - Exercise Tracker | Learn |freeCodeCamp.org</strong></em></a></li>\n<li>[✅] <a href=\"https://search.yahoo.com/yhs/search?hspart=dcola&#x26;hsimp=yhs-005&#x26;type=gsp_dimensions_00_00_--x1-114-x2-24--&#x26;param1=1&#x26;param2=cat%3Dweb%26sesid%3D1426835008e3cd4eadb4b6b4452cab46%26ip%3D173.70.97.51%26b%3DChrome%26bv%3D89.0.4389.82%26os%3DWindows-10%26os_ver%3D10.0%26pa%3Dgencoll05%26sid%3Da7f7757816c98f709fde9db2eef11591%26abid%3D%26abg%3D%26a%3Dgsp_dimensions_00_00_--x1-114-x2-24--%26sdk_ver%3D%26cd%3D%26cr%3D%26uid%3D%26uref%3D&#x26;p=npm+file+system+data+structures\"><em><strong>npm file system data structures - Yahoo SearchResults</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/fs-extra\"><em><strong>fs-extra - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jprichardson/node-fs-extra\"><em><strong>jprichardson/node-fs-extra: Node.js: extra methods for the fs objectlike copy(), remove(),mkdirs()</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/YzpBXWP\"><em><strong>Parallax Star background in CSS</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Medium_Articles\"><em>**bgoonz/Medium</em>Articles**_</a></li>\n<li>[✅] <a href=\"https://search.yahoo.com/yhs/search?hspart=dcola&#x26;hsimp=yhs-005&#x26;type=gsp_dimensions_00_00_--x1-114-x2-24--&#x26;param1=1&#x26;param2=cat%3Dweb%26sesid%3D1426835008e3cd4eadb4b6b4452cab46%26ip%3D173.70.97.51%26b%3DChrome%26bv%3D89.0.4389.82%26os%3DWindows-10%26os_ver%3D10.0%26pa%3Dgencoll05%26sid%3D41e8bf4292de97ad3c9b7818adf3c19c%26abid%3D%26abg%3D%26a%3Dgsp_dimensions_00_00_--x1-114-x2-24--%26sdk_ver%3D%26cd%3D%26cr%3D%26uid%3D%26uref%3D&#x26;p=link+button+styling\"><em><strong>link button styling - Yahoo SearchResults</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/a-complete-guide-to-links-and-buttons/\"><em><strong>A Complete Guide to Links and Buttons |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/16244860/top-align-text-within-button-element\"><em><strong>html - Top-align text within button element? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/reverting-a-pull-request\"><em><strong>Reverting a pull request - GitHubDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/BLANK#index.js\"><em><strong>Replit - BLANK</strong></em></a></li>\n<li>[✅] <a href=\"https://liveweave.com/aquFJf\"><em><strong>HTML, CSS and JavaScript demo -Liveweave</strong></em></a></li>\n<li>[✅] <a href=\"https://liveweave.com/cssgen/index.html\"><em><strong>CSS Explorer - Liveweave</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=embed+live+weave&#x26;oq=embed+live+weave&#x26;aqs=chrome..69i57.3449j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>embed live weave - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.designbombs.com/code-sharing-websites/\"><em><strong>15 Useful Code Sharing Websites for Web Developers(2021)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.smashingmagazine.com/2021/01/design-developer-friendly-react-code-animaapp/\"><em><strong>From Design To Developer-Friendly React Code In Minutes With Anima ---SmashingMagazine</strong></em></a></li>\n<li>[✅] <a href=\"https://create-react-app.dev/docs/getting-started\"><em><strong>Getting Started | Create ReactApp</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3.org/TR/html52/introduction.html#a-quick-introduction-to-html\"><em><strong>HTML 5.2: 1.Introduction</strong></em></a></li>\n<li>[✅] <a href=\"https://the-javascripting-english-major.org/v1/12-markdown#exercises\"><em><strong>Writing Content with Markdown | The JavaScripting EnglishMajor</strong></em></a></li>\n<li>[✅] <a href=\"https://linktr.ee/ToxicFreeSimplyClean\"><em><strong>@ToxicFreeSimplyClean |Linktree</strong></em></a></li>\n<li>[✅] <a href=\"https://sites.google.com/view/toxicfreesimplyclean-specials/home?authuser=0\"><em><strong>Toxic Free Simply Clean -Specials</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSd2tzZaFrf5toLGORw3l_PbRQyjsZoSl6Qqb5llgI0ev3IvZg/viewform\"><em><strong>Norwex Independent SalesConsultant</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.com/page/web-dev-hub.com/1076\"><em><strong>Edit Page ‹ Web Development Resources Site ---WordPress.com</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/bgoonz\"><em><strong>Dashboard -- Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Web_Utility_Tools\"><em><strong>github.com</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/Web_Utility_Tools/\"><em><strong>directory</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/web-dev-utility-tools-bgoonz/deploys/61c8ad13d4e2f600087943c1\"><em><strong>Deploy details |web-dev-utility-tools-bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://web-dev-utility-tools-bgoonz.netlify.app/\"><em><strong>directory</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Web_Utility_Tools/settings\"><em><strong>Options</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/netlify-plugin/quick-start/\"><em><strong>Quickstart for Using Algolia on Netlify |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/crawlers/cf7a2862-281b-4bb1-8192-7731253db2ca/overview\"><em><strong>Overview | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/users/sign_in\"><em><strong>Sign in | Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/b1b764b1bd5138dc6a7a71480e2a1f27\"><em><strong>gist.github.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/gitextensions/gitextensions/issues/4916\"><em><strong>Git Extensions is a great tool but the credential management is veryweak · Issue #4916 ·gitextensions/gitextensions</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/webdevhub42/Philosophy-PWS-Norwex-USA-12f971724e6943a1b4790aa2cc5c3dbd\"><em><strong>Philosophy PWS | NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz\"><em><strong>bgoonz (Bryan C Guner)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/settings/organizations\"><em><strong>Organizations</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub-2.disqus.com/admin/\"><em><strong>Start - Disqus Admin</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub-1.disqus.com/admin/settings/gatsby/\"><em><strong>Install instructions for Gatsby - DisqusAdmin</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/layout/2114927300735556507\"><em><strong>Blogger:Layout</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://gatsbyadvancedblogmaster82908.gatsbyjs.io/resume\"><em><strong>UVACODER |RESUME</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub-3.disqus.com/admin/settings/blogger/\"><em><strong>Install instructions for Blogger - DisqusAdmin</strong></em></a></li>\n<li>[✅] <a href=\"https://gatsbyadvancedblogmaster82908.gatsbyjs.io/\"><em><strong>Gatsby AdvancedBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/feed/update/urn:li:activity:6880775792482226176/\"><em><strong>Post | Feed |LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/in/cleverett1/?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAABPVXQIBpDGNItq3ROBDhgeu0W0UFmdGaIo\"><em><strong>Christine Leverett |LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz/edit/master/README.md\"><em><strong>Editing bgoonz/README.md at master ·bgoonz/bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/in/bryan-guner-046199128/\"><em><strong>Bryan Guner - Web Developer - Upwork |LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=canonical+url&#x26;oq=canonical+url&#x26;aqs=chrome..69i57j0i512l9.2646j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>canonical url - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=npm+i+peer+dependencies&#x26;oq=npm+i+peer&#x26;aqs=chrome.0.0i512j69i57j0i512j0i22i30j0i10i22i30j0i22i30l5.3304j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>npm i peer dependencies - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/post/edit/2114927300735556507/7760088312981353518\"><em><strong>Post:Edit</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.blogspot.com/2021/07/felxbox-css.html\"><em><strong>Felxbox css</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub-3.disqus.com/admin/install/platforms/gatsby/\"><em><strong>Install instructions for Gatsby - DisqusAdmin</strong></em></a></li>\n<li>[✅] <a href=\"https://disqus.com/admin/create/\"><em><strong>Register Site - Disqus Admin</strong></em></a></li>\n<li>[✅] <a href=\"https://disqus.com/admin/orgs/4622518/default/settings/general/\"><em><strong>General Settings - DisqusAdmin</strong></em></a></li>\n<li>[✅] <a href=\"https://help.disqus.com/en/?q=gatsby\"><em><strong>Search results for: gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/plugins/gatsby-plugin-disqus/\"><em><strong>gatsby-plugin-disqus |Gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/tterb/gatsby-plugin-disqus/wiki/Usage\"><em><strong>Usage · tterb/gatsby-plugin-disqusWiki</strong></em></a></li>\n<li>[✅] <a href=\"https://help.disqus.com/en/articles/1717111-what-s-a-shortname\"><em><strong>What's a shortname? |Disqus</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?sxsrf=ALeKk01YYJ6V9jxHXuosnzvJqlR1KuTO4Q:1612569094913&#x26;q=nj+4321-4+unemployment&#x26;spell=1&#x26;sa=X&#x26;ved=2ahUKEwjYqs-A-NPuAhUXFVkFHecTDRwQBSgAegQICRAw\"><em><strong>nj 4321-4 unemployment - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://greensock.com/showcase/page/2/\"><em><strong>Showcase - Page 2 - GreenSock</strong></em></a></li>\n<li>[✅] <a href=\"https://greensock.com/gsap/\"><em><strong>GSAP - GreenSock</strong></em></a></li>\n<li>[✅] <a href=\"https://www.bitbook.io/online-tools/\"><em><strong>Online Tools Archives - BitBook</strong></em></a></li>\n<li>[✅] <a href=\"https://codebeautify.org/javascript-escape-unescape\"><em><strong>JavaScript Escape and JavaScript Unescape OnlineTool</strong></em></a></li>\n<li>[✅] <a href=\"https://products.aspose.app/words/merger/md\"><em><strong>Merge MD files</strong></em></a></li>\n<li>[✅] <a href=\"https://www.quackit.com/html/codes/html_link_code.cfm\"><em><strong>HTML Link Code</strong></em></a>\n<br></li>\n</ul>\n<hr>\n<br>\n<h3>AMAZINGGGG {#amazingggg add<em>date=\"1634324422\" last</em>modified=\"1640719013\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://amused-black-jaguar.slab.com/posts/code-review-with-pull-requests-bk9ncz4l\"><em><strong>Code Review with Pull Requests -Slab</strong></em></a></li>\n<li>[✅] <a href=\"https://www.patternfly.org/v4/get-started/about\"><em><strong>PatternFly 4 • AboutPatternFly</strong></em></a></li>\n<li>[✅] <a href=\"https://www.patternfly.org/v4/charts/tooltip-chart\"><em><strong>PatternFly 4 • Tooltipchart</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/internetarchive\"><em><strong>Internet Archive</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/alissacrane123\"><em><strong>alissacrane123</strong></em></a></li>\n<li>[✅] <a href=\"https://html.spec.whatwg.org/multipage/indices.html#elements-3\"><em><strong>HTMLStandard</strong></em></a></li>\n<li>[✅] <a href=\"https://www.the-art-of-web.com/css/fading-slideshow-no-jquery/\"><em><strong>Fading slideshow with a touch of JavaScript &#x3C; CSS | The Art ofWeb</strong></em></a></li>\n<li>[✅] <a href=\"https://vscode.dev/\"><em><strong>Get Started - default (Workspace) - Visual StudioCode</strong></em></a></li>\n<li>[✅] <a href=\"https://www.producthunt.com/posts/regexlearn\"><em><strong>RegexLearn - Learn RegEx step by step, from zero to advanced | ProductHunt</strong></em></a></li>\n<li>[✅] <a href=\"https://regexlearn.com/learn\"><em><strong>RegexLearn - RegEx Interactive Course</strong></em></a></li>\n<li>[✅] <a href=\"https://freefrontend.com/react-carousels/\"><em><strong>19 React Carousels</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.prototypr.io/20-creative-search-bar-design-inspirations-with-html-css-bootstrap-9c72b22009be\"><em><strong>20 Creative Search Bar Design Inspirations with HTML/CSS/ Bootstrap |by Trista liu |Prototypr</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.prerender.io/\"><em><strong>Prerender.io Knowledge Base</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/FirebaseExtended\"><em><strong>FirebaseExtended</strong></em></a></li>\n<li>[✅] <a href=\"https://redux.js.org/usage/structuring-reducers/using-combinereducers\"><em><strong>Using combineReducers |Redux</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-static-html-page-deploy/tree/master\"><em><strong>now</strong></em></a></li>\n<li>[✅] <a href=\"https://mdbootstrap.com/snippets/jquery/bartek-malanowski/226737\"><em><strong>Modal hover - codehelper</strong></em></a></li>\n<li>[✅] <a href=\"https://markmurray.co/\"><em><strong>Mark Murray</strong></em></a></li>\n<li>[✅] <a href=\"https://leetcode.com/discuss/general-discussion/494279/comprehensive-data-structure-and-algorithm-study-guide\"><em><strong>Comprehensive Data Structure and Algorithm Study Guide - LeetCodeDiscuss</strong></em></a></li>\n<li>[✅] <a href=\"https://www.interviewcake.com/data-structures-and-algorithms-guide\"><em><strong>Data Structures and Algorithms (DSA): The Intuitive Guide | InterviewCake</strong></em></a></li>\n<li>[✅] <a href=\"https://www.hackerrank.com/challenges/sock-merchant/problem?h_l=interview&#x26;playlist_slugs%5B%5D=interview-preparation-kit&#x26;playlist_slugs%5B%5D=warmup\"><em><strong>Sales by Match |HackerRank</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/6154029d7c1fd400c81ec390/\"><em><strong>oceanic-pluto - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-bookmarks.netlify.app/\"><em><strong>Stackbit Book Theme</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/unique-zucchini/pull/10\"><em><strong>hi by bgoonz · Pull Request #10 ·bgoonz/unique-zucchini</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/unique-zucchini/pull/6\"><em><strong>Pin dependencies by renovate[bot] · Pull Request #6 ·bgoonz/unique-zucchini</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/unique-zucchini/pull/9\"><em><strong>hi by bgoonz · Pull Request #9 ·bgoonz/unique-zucchini</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/unique-zucchini/pull/4\"><em><strong>Configure Renovate by renovate[bot] · Pull Request #4 ·bgoonz/unique-zucchini</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/unique-zucchini\"><em><strong>bgoonz/unique-zucchini</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/count-equal-element-pairs-in-the-given-array/\"><em><strong>Count equal element pairs in the given array -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?ogbl#drafts/FMfcgzGlkjZJFNzHgRGWrPnMHMdNChXz\"><em><strong>Full-Time position for Front-End Software Engineer with one of ourdirect clients in Plano, TX. - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/tools\"><em><strong>Tools</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/Bwnz0WEX7QmY6ocaJWax/\"><em><strong>Home - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/lnishan/awesome-competitive-programming\"><em><strong>lnishan/awesome-competitive-programming: A curated list of awesomeCompetitive Programming, Algorithm and Data Structureresources</strong></em></a></li>\n<li>[✅] <a href=\"http://adilet.org/blog/your-ultimate-guide-to-interview-preparation/\"><em><strong>Your ultimate guide to interview preparation | Blog |Adilet.org</strong></em></a></li>\n<li>[✅] <a href=\"https://techinterviewhandbook.org/algorithms/binary/\"><em><strong>Binary | Tech InterviewHandbook</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=computer+science+memes&#x26;sxsrf=AOaemvL6JQH-swjS9fmQqp-TJv9NGRUp3Q:1636064268017&#x26;source=lnms&#x26;tbm=isch&#x26;sa=X&#x26;sqi=2&#x26;ved=2ahUKEwjt8pis3v_zAhUmRvEDHWjFCnQQ_AUoAXoECAEQAw&#x26;biw=1582&#x26;bih=708&#x26;dpr=1.22#imgrc=UE8ArjQ9fDwZ4M\"><em><strong>computer science memes - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://discord.com/channels/761733641210167297/761733641666953218\"><em><strong>general</strong></em></a></li>\n<li>[✅] <a href=\"https://shell.cloud.google.com/?walkthrough_tutorial_url=https%3A%2F%2Fwalkthroughs.googleusercontent.com%2Fcontent%2Fcloud_run_quickstart_index%2Fcloud_run_quickstart_index.md&#x26;show=ide&#x26;environment_deployment=ide\"><em><strong>CloudShell</strong></em></a></li>\n<li>[✅] <a href=\"https://shell.cloud.google.com/?walkthrough_tutorial_id=cloud_code_custom_samples&#x26;show=ide&#x26;environment_deployment=ide\"><em><strong>CloudShell</strong></em></a></li>\n<li>[✅] <a href=\"http://codylindley.com/\">****</a></li>\n<li>[✅] <a href=\"https://cloud.google.com/shell/docs/editor-overview\"><em><strong>Cloud Shell Editor interface overview | GoogleCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://vimeo.com/aacurriculum\"><em><strong>App Academy Staff</strong></em></a></li>\n<li>[✅] <a href=\"https://dojotoolkit.org/documentation/tutorials/1.10/hello_dojo/\"><em><strong>Hello Dojo! - Dojo ToolkitTutorial</strong></em></a></li>\n<li>[✅] <a href=\"https://www.math.utk.edu/~vasili/shell-scripts/\"><em><strong>Some useful shellscripts</strong></em></a></li>\n<li>[✅] <a href=\"https://www.blogger.com/blog/post/edit/2114927300735556507/5695193599059595450\"><em><strong>Post:Edit</strong></em></a></li>\n<li>[✅] <a href=\"https://expressjs.com/en/starter/generator.html\"><em><strong>Express applicationgenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://flaviocopes.com/pug/#install-pug\"><em><strong>The Pug Guide</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/chowdown\"><em><strong>chowdown - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://pentest-tools.com/website-vulnerability-scanning/discover-hidden-directories-and-files#\"><em><strong>URL Fuzzer - Discover hidden files and directories |Pentest-Tools.com</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.org/showcase/\"><em><strong>The Best WordPress Sites in the World |WordPress.org</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.org/plugins/\"><em><strong>WordPress Plugins | WordPress.org</strong></em></a></li>\n<li>\n<p>[✅] <a href=\"https://www.runpkg.com/?lodash@4.17.20/lodash.js\"><em><strong>lodash@4.17.20 |runpkg</strong></em></a></p>\n<ul>\n<li>[✅] <a href=\"https://www.toolsbug.com/website-copier-online.php\"><em><strong>Website Copier | Download Sites | Website Ripper - ToolsBug</strong></em></a></li>\n<li>[✅] <a href=\"https://www.wix.com/website/builder?categoryName=Tech%20Blogger&#x26;structureId=b0a520919b99728bae200018&#x26;industryId=0e72b2a150d4b1ffad033c6a&#x26;editorSessionId=8956de60-b872-4d50-89d6-b721e256e462&#x26;referral=split%20page&#x26;vertical=blog&#x26;storyId=c54057a8-2799-4ba3-9798-9691018d3089#!/builder/story/c54057a8-2799-4ba3-9798-9691018d3089:a8475309-8d08-4617-8fc2-c60a939f3e31/switch-preset/1.119\"><em><strong>WixADI</strong></em></a></li>\n<li>[✅] <a href=\"https://www.webdesign.org/excellent-collection-of-useful-web-design-and-development-resources.22931.html\"><em><strong>Excellent Collection Of Useful Web Design And Development Resources |WebsiteUsability</strong></em></a>\n<br></li>\n</ul>\n</li>\n</ul>\n<hr>\n<br>\n<h3>free-stuff {#free-stuff add<em>date=\"1640716651\" last</em>modified=\"0\"}</h3>\n<ul>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/a7e833436166d4ebb4905b078f5a352a\"><em><strong>list-of-technologies-to-learn.md</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Links-Shortcut-Site/blob/master/index.html\"><em><strong>Links-Shortcut-Site/index.html at master ·bgoonz/Links-Shortcut-Site</strong></em></a></li>\n<li>[✅] <a href=\"https://www.puupnewsapp.com/utorrent-for-chrome/\"><em><strong>Utorrent For Chrome Extension Download -Puupnewsapp</strong></em></a></li>\n<li>[✅] <a href=\"https://www.safesearchkids.com/how-to-detect-and-remove-pup-potentially-unwanted-programs/#.YFsF569KhiI\"><em><strong>Detect And Remove PUP (Potentially Unwanted Programs) | KidSafe</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=pirate+bay&#x26;oq=pirate+bay&#x26;aqs=chrome..69i57j0i433i457j0l5j69i60.2840j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>pirate bay - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.bittorrent.com/downloads/complete/classic/\"><em><strong>Download the BitTorrent Classic TorrentClient</strong></em></a></li>\n<li>[✅] <a href=\"https://fossbytes.com/paid-software-giveaway-websites-free/\"><em><strong>10 Best Websites To Download Paid Software For Free,Legally</strong></em></a></li>\n<li>[✅] <a href=\"https://giveawayradar.weebly.com/for-developers.html\"><em><strong>For Developers - GiveawayRadar</strong></em></a></li>\n<li>[✅] <a href=\"https://solutionsreview.com/application-development/the-top-open-source-development-tools-and-platforms/\"><em><strong>The Top 9 Open Source Development Tools andPlatforms</strong></em></a></li>\n<li>[✅] <a href=\"https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2021-03/R/eclipse-inst-jre-win64.exe&#x26;mirror_id=1281\"><em><strong>Thank You for Downloading Eclipse | The EclipseFoundation</strong></em></a></li>\n<li>[✅] <a href=\"https://skillcrush.com/blog/web-developer-free-resources/\"><em><strong>Apps, Extensions, and Sites: 24 Free Resources for Web Developers -Skillcrush</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.com/home/gunerb12.wordpress.com\"><em><strong>My Home ‹ Site Title ---WordPress.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jekyll/jekyll\"><em><strong>jekyll/jekyll: Jekyll is a blog-aware static site generator inRuby</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/\"><em><strong>The Fastest Frontend for the Modern Web |Gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://reactjs.org/\"><em><strong>React -- A JavaScript library for building userinterfaces</strong></em></a></li>\n<li>[✅] <a href=\"https://wallpaperaccess.com/web-developer\"><em><strong>Web Developer Wallpapers - Top Free Web Developer Backgrounds -WallpaperAccess</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgxwLtGjKXkRWlvwrvQNhDbQxgVCS\"><em><strong>Your Notion export is ready - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=postgres+database+sample+github&#x26;oq=postgres+database+sample+github&#x26;aqs=chrome..69i57j0i22i30j69i64.6826j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>postgres database sample github - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/morenoh149/postgresDBSamples\"><em><strong>morenoh149/postgresDBSamples: Sample databases forpostgres</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/h8/employees-database\"><em><strong>h8/employees-database: A sample PostgreSQL database to be used in testapplication</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/devrimgunduz/pagila\"><em><strong>devrimgunduz/pagila: PostgreSQL SampleDatabase</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/file-icons/atom\"><em><strong>file-icons/atom: Atom file-specific icons for improved visualgrepping.</strong></em></a></li>\n<li>[✅] <a href=\"https://web-dev-resource-hub.netlify.app/\"><em><strong>a/A-Student-Resources</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/\"><em><strong>Facebook</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/eloquent-sammet-ba1810/overview\"><em><strong>Site overview |eloquent-sammet-ba1810</strong></em></a></li>\n<li>[✅] <a href=\"https://divtable.com/generator/\"><em><strong>HTML Div Table Generator | 𝗗𝗜𝗩𝗧𝗔𝗕𝗟𝗘.𝗖𝗢𝗠</strong></em></a></li>\n<li>[✅] <a href=\"https://html-css-js.com/html/links/\"><em><strong>HTML Links - 𝗨𝗦𝗘𝗙𝗨𝗟 𝗟𝗜𝗡𝗞𝗦 𝗙𝗢𝗥 𝗪𝗘𝗕𝗗𝗘𝗩𝗘𝗟𝗢𝗣𝗘𝗥𝗦</strong></em></a></li>\n<li>[✅] <a href=\"https://the-javascripting-english-major.org/v1/12-markdown#showdown\"><em><strong>Writing Content with Markdown | The JavaScripting EnglishMajor</strong></em></a></li>\n<li>[✅] <a href=\"https://validator.w3.org/#validate_by_uri+with_options\"><em><strong>The W3C Markup ValidationService</strong></em></a></li>\n<li>[✅] <a href=\"https://js.devexpress.com/Demos/WidgetsGallery/Demo/Accordion/Overview/jQuery/Light/\"><em><strong>Overview - DevExtreme Accordion: jQuery Widgets byDevExpress</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sitepoint.com/author/brothercake/page/2/\"><em><strong>James Edwards, Author at SitePoint - Page2</strong></em></a></li>\n<li>[✅] <a href=\"https://www.html.am/templates/\"><em><strong>HTML Templates</strong></em></a></li>\n<li>[✅] <a href=\"https://www.html.am/templates/simple-website-templates/\"><em><strong>Simple WebsiteTemplates</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addtoany.com/buttons/customize/static_menu\"><em><strong>Static Menu -AddToAny</strong></em></a></li>\n<li>[✅] <a href=\"http://www.vvveb.com/vvvebjs/editor.html\"><em><strong>VvvebJs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.topcoder.com/community/competitive-programming/tutorials/the-importance-of-algorithms/\"><em><strong>Community - Competitive Programming - Competitive Programming Tutorials- The Importance ofAlgorithms</strong></em></a></li>\n<li>[✅] <a href=\"https://maggieappleton.com/learnable-programming\"><em><strong>Learnable ProgrammingPatterns</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gitpod.io/docs/examples/\"><em><strong>Example Projects - Gitpod</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.mgechev.com/2021/01/18/design-pattens-in-open-source-projects-part-i/\"><em><strong>Design Patterns in Open Source Projects - Part I · Minko Gechev'sblog</strong></em></a></li>\n<li>[✅] <a href=\"https://help.disqus.com/en/articles/1717084-javascript-configuration-variables\"><em><strong>JavaScript configuration variables |Disqus</strong></em></a></li>\n<li>[✅] <a href=\"https://mybinder.org/v2/gh/bgoonz/web-dev-notes-resource-site/master\"><em><strong>Binder</strong></em></a></li>\n<li>[✅] <a href=\"https://mybinder.org/\"><em><strong>Binder</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal\"><em><strong>Quickstart - Create a Windows VM in the Azure portal - Azure VirtualMachines | MicrosoftDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://survivejs.com/webpack/optimizing/minifying/\"><em><strong>Minifying</strong></em></a></li>\n<li>[✅] <a href=\"https://shields.io/category/size\"><em><strong>Shields.io: Quality metadata badges for open sourceprojects</strong></em></a></li>\n<li>[✅] <a href=\"https://thealtruist.medium.com/how-to-install-programs-with-a-graphical-user-interface-gui-in-wsl2-33203d7344ab#b6f5\"><em><strong>How to Install Programs With a Graphical User Interface in WSL2 | byDavid Littlefield |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://elc.github.io/posts/embed-interactive-notebooks/\"><em><strong>Embed Interactive Jupyter Notebooks in Static Websites for Free |Ezequiel Leonardo Castaño PersonalWebsite</strong></em></a></li>\n<li>[✅] <a href=\"https://transform.tools/html-to-jsx\"><em><strong>HTML to JSX</strong></em></a></li>\n<li>[✅] <a href=\"https://url-decode.com/cat/\"><em><strong>All</strong></em></a></li>\n<li>[✅] <a href=\"https://www9.lunapic.com/editor/\"><em><strong>LunaPic | Free Online Photo Editor | RoundedBorder</strong></em></a></li>\n<li>[✅] <a href=\"https://www.datacamp.com/community/data-science-cheatsheets?page=3\"><em><strong>Cheat sheets for data scientists |DataCamp</strong></em></a></li>\n<li>[✅] <a href=\"https://www.datacamp.com/onboarding\"><em><strong>DataCamp</strong></em></a></li>\n<li>[✅] <a href=\"https://learn.datacamp.com/projects\"><em><strong>DataCamp</strong></em></a></li>\n<li>[✅] <a href=\"https://tutorialzine.com/2012/11/google-product-search\"><em><strong>Tutorial: Make a Google Powered Shopping Search Website -Tutorialzine</strong></em></a></li>\n<li>[✅] <a href=\"https://nbviewer.jupyter.org/\"><em><strong>nbviewer</strong></em></a></li>\n<li>[✅] <a href=\"https://gke.mybinder.org/\"><em><strong>Binder</strong></em></a></li>\n<li>[✅] <a href=\"https://www.portablefreeware.com/bestof.php\"><em><strong>Best of... - The Portable FreewareCollection</strong></em></a></li>\n<li>[✅] <a href=\"https://webflow.com/design/bryans-initial-project-4a02db?t=1&#x26;b=0&#x26;t_nux=1&#x26;t_nux_v=2\"><em><strong>Webflow - Bryan's InitialProject</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/fergiemcdowall?tab=repositories\"><em><strong>fergiemcdowall (Fergus McDowall) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://microsoft.github.io/monaco-editor/index.html\"><em><strong>Monaco Editor</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/@kyle.galbraith/how-to-host-a-website-on-s3-without-getting-lost-in-the-sea-e2b82aa6cd38\"><em><strong>How to Host a Website on S3 Without Getting Lost in the Sea | by KyleGalbraith |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://userstyles.org/styles/79634/google-custom-background-16-images-or-your-own?utm_source=extension_welcome_page\"><em><strong>Website Themes &#x26; Skins by Stylish |Userstyles.org</strong></em></a></li>\n<li>[✅] <a href=\"https://userstyles.org/categories/site\"><em><strong>Site Themes &#x26; Skins by Stylish |Userstyles.org</strong></em></a></li>\n<li>[✅] <a href=\"https://nickguner.atlassian.net/wiki/spaces/DEV/pages/1220673798/Heroku+Postgres\"><em><strong>Heroku Postgres - DevOps -Confluence</strong></em></a></li>\n<li>[✅] <a href=\"https://www.bigomega.dev/\"><em><strong>Home | BigOmega</strong></em></a></li>\n<li>[✅] <a href=\"https://p5js.org/examples/sound-frequency-spectrum.html\"><em><strong>examples |p5.js</strong></em></a></li>\n<li>[✅] <a href=\"https://patch.cab/\"><em><strong>Patchcab</strong></em></a></li>\n<li>[✅] <a href=\"https://mobirise.com/bootstrap-template/tab-template.html\"><em><strong>Free HTML Bootstrap TabTemplate</strong></em></a></li>\n<li>[✅] <a href=\"https://ui.dev/\"><em><strong>JavaScript Visualizer</strong></em></a></li>\n<li>[✅] <a href=\"https://1stwebdesigner.com/css3-text-effects-typography/\"><em><strong>40 Creative CSS3 Text Effects andTutorials</strong></em></a></li>\n<li>[✅] <a href=\"https://wiki.nikitavoloboev.xyz/\"><em><strong>Introduction - Everything I know</strong></em></a></li>\n<li>[✅] <a href=\"https://www.techrepublic.com/article/google-cloud-platform-the-smart-persons-guide/\"><em><strong>Google Cloud Platform: A cheat sheet -TechRepublic</strong></em></a></li>\n<li>[✅] <a href=\"https://www.shellcheck.net/#\"><em><strong>ShellCheck -- shell script analysis tool</strong></em></a></li>\n<li>[✅] <a href=\"https://node-postgres.com/\"><em><strong>Welcome | node-postgres</strong></em></a></li>\n<li>[✅] <a href=\"https://bit.dev/components\"><em><strong>Discover Components · Bit</strong></em></a></li>\n<li>[✅] <a href=\"https://zerotomastery.io/blog/top-10-programmer-articles-from-2020/\"><em><strong>Top 10 Programmer Articles From 2020 | Zero ToMastery</strong></em></a></li>\n<li>[✅] <a href=\"https://icons8.com/articles/web-tools-services/\"><em><strong>30+ Handy Web Tools and Services for the End of 2019 - Icons8Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codester.com/categories/7/javascript-jquery-plugins?sort_by=cost&#x26;order=asc\"><em><strong>100+ Best JavaScript &#x26; jQuery Plugins |Codester</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/v-campbell\"><em><strong>v-campbell (Victoria Campbell)</strong></em></a></li>\n<li>[✅] <a href=\"https://v2.docusaurus.io/\"><em><strong>Build optimized websites quickly, focus on your content |Docusaurus</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/guides/building-search-ui/resources/demos/react/\"><em><strong>Demos | Building Search UI | Guide | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://stackedit.io/app#\"><em><strong>StackEdit</strong></em></a></li>\n<li>[✅] <a href=\"https://webcomponents.dev/docs/jsx/\"><em><strong>JSX - Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.powr.io/plugins/comments/standalone?id=27987885&#x26;\"><em><strong>Free Comments Software Application -POWR.io</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tablesgenerator.com/markdown_tables\"><em><strong>Markdown Tables generator -TablesGenerator.com</strong></em></a></li>\n<li>[✅] <a href=\"https://discuss.runkit.com/t/how-to-embed-runkit-inside-my-gitbook/178\"><em><strong>How to embed RunKit inside my Gitbook? - RunKit Feedback - RunKitDiscuss</strong></em></a></li>\n<li>[✅] <a href=\"https://stackblitz.com/\"><em><strong>StackBlitz</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.stackblitz.com/docs/platform/javascript-sdk\"><em><strong>Javascript SDK | StackBlitzDeveloper</strong></em></a></li>\n<li>[✅] <a href=\"http://colormind.io/template/material-dashboard/\"><em><strong>Colormind - Material Dashboard ColorGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/how-to-turn-your-website-into-a-mobile-app-with-7-lines-of-json-631c9c9895f5/\"><em><strong>How to Turn Your Website into a Mobile App with 7 Lines ofJSON</strong></em></a></li>\n<li>[✅] <a href=\"https://themeforest.net/item/property-real-estate-company-real-estate-agency-single-property-template/20898914\"><em><strong>PROPERTY - Real Estate Company, Real Estate Agency, Single PropertyTemplate byDuezaThemes</strong></em></a></li>\n<li>[✅] <a href=\"https://forum.jquery.com/topic/how-do-i-hide-only-half-of-a-div-and-then-reveal-it-on-hover\"><em><strong>How do I hide only half of a div and then reveal it on hover? - jQueryForum</strong></em></a></li>\n<li>[✅] <a href=\"https://1stwebdesigner.com/15-css-background-effects/\"><em><strong>15 Amazing CSS Background Effects - 1stWebDesigner - Best of thebest!</strong></em></a></li>\n<li>[✅] <a href=\"https://www.awwwards.com/sites/e-c-h-o\"><em><strong>E.C.H.O. - Awwwards SOTD</strong></em></a></li>\n<li>[✅] <a href=\"https://jazzkeys.plan8.co/\"><em><strong>JazzKeys, by Plan8</strong></em></a></li>\n<li>[✅] <a href=\"https://dillinger.io/\"><em><strong>Online Markdown Editor - Dillinger, the Last Markdown Editorever.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/creativetimofficial?ref=adr-documentation-header\"><em><strong>CreativeTim</strong></em></a></li>\n<li>[✅] <a href=\"https://thoughts.t37.net/merging-2-different-git-repositories-without-losing-your-history-de7a06bba804\"><em><strong>Merging 2 Different Git Repositories Without Losing your History | byFred de Villamil 🙈 🙉 🙊 | FredThoughts</strong></em></a></li>\n<li>[✅] <a href=\"https://online-video-cutter.com/\"><em><strong>Online Video Cutter - Cut Video, Cut MP4, AVI, MPG, 3GP-</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.com/page/web-dev-hub.com?site=5\"><em><strong>New Page ‹ Web Development Resources Site ---WordPress.com</strong></em></a></li>\n<li>[✅] <a href=\"https://cheatography.com/programming/\"><em><strong>1534 Programming Cheat Sheets - Cheatography.com: Cheat Sheets ForEvery Occasion</strong></em></a></li>\n<li>[✅] <a href=\"https://codetogo.io/how-to-interpolate-in-javascript/\"><em><strong>How to interpolate in JavaScript | Code togo</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jimdo.com/blog/20-widgets-to-improve-your-website/\"><em><strong>20 Widgets to Improve Your Website |Jimdo</strong></em></a></li>\n<li>[✅] <a href=\"https://codetogo.io/all/\"><em><strong>Use Cases | Code to go</strong></em></a></li>\n<li>[✅] <a href=\"https://tutorialzine.com/2014/09/50-awesome-tools-and-resources-for-web-developers\"><em><strong>50 Awesome Tools and Resources for Web Developers -Tutorialzine</strong></em></a></li>\n<li>[✅] <a href=\"https://onq72352.live.dynatrace.com/ui/dashboards?gtf=-2h&#x26;gf=all\"><em><strong>cembre: onq72352 -Dynatrace</strong></em></a></li>\n<li>[✅] <a href=\"https://onq72352.live.dynatrace.com/#smartscape;gf=all\"><em><strong>smartscape Map - cembre: onq72352 -Dynatrace</strong></em></a></li>\n<li>[✅] <a href=\"https://app.creatopy.com/team/162287/dashboard\"><em><strong>Online Graphic DesignPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://app.swiftype.com/engines/webdevhub/overview\"><em><strong>webdevhub Overview |Swiftype</strong></em></a></li>\n<li>[✅] <a href=\"https://codetasty.com/ide\"><em><strong>IDE | CodeTasty</strong></em></a></li>\n<li>[✅] <a href=\"https://codetasty.com/\"><em><strong>Powerful IDE in the cloud | CodeTasty</strong></em></a></li>\n<li>[✅] <a href=\"https://paiza.cloud/containers?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MDUxMmU5YWE4ZjM3YjAwYjhiMWM1YjYiLCJjb25maXJtZWQiOnRydWUsImlhdCI6MTYxNTkzMzA4MiwiZXhwIjoxNjE1OTUxMDgyfQ.Jekyn-e0yVWU1OIak_2woF9FKa5IXQ81mRI8YAv8fOo\"><em><strong>bryan-guner-dev-1 | PaizaCloud - Instant Linux withWeb-UI</strong></em></a></li>\n<li>[✅] <a href=\"https://tutorialzine.com/2018/07/10-amazing-web-demos-and-experiments-for-july-2018\"><em><strong>10 Amazing Web Demos And Experiments for July 2018 -Tutorialzine</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tiny.cloud/docs/general-configuration-guide/basic-setup/\"><em><strong>Basic setup | Docs |TinyMCE</strong></em></a></li>\n<li>[✅] <a href=\"https://ui.toast.com/tui-calendar\"><em><strong>Calendar | TOAST UI :: Make Your WebDelicious!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/dwyl\"><em><strong>dwyl</strong></em></a></li>\n<li>[✅] <a href=\"https://tweetsnippet.com/snippets/es6\"><em><strong>ES6 snippets - Tweetsnippet</strong></em></a></li>\n<li>[✅] <a href=\"https://pgexercises.com/questions/basic/selectall.html\"><em><strong>PostgreSQLexercises</strong></em></a></li>\n<li>[✅] <a href=\"https://pgexercises.com/gettingstarted.html\"><em><strong>PostgreSQL Exercises</strong></em></a></li>\n<li>[✅] <a href=\"https://codedown.io/bgoonz/python/?document=draw_chirp.py\"><em>**bgoonz/python(draw</em>chirp.py)**_</a></li>\n<li>[✅] <a href=\"https://web.dev/\"><em><strong>web.dev</strong></em></a></li>\n<li>[✅] <a href=\"https://pytorch.org/docs/stable/index.html\"><em><strong>PyTorch documentation --- PyTorch 1.8.0documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/collections/learn-to-code\"><em><strong>Collection: Learn toCode</strong></em></a></li>\n<li>[✅] <a href=\"https://bestofjs.org/projects?tags=search\"><em><strong>Best of JavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://arc.dev/interview\"><em><strong>Top Software Engineer Interview Questions &#x26; Answers |Arc</strong></em></a></li>\n<li>[✅] <a href=\"https://photoshop.adobe.com/adjust\"><em><strong>Adobe Photoshop Express</strong></em></a></li>\n<li>[✅] <a href=\"https://www.ofoct.com/combine-js-files\"><em><strong>Combine JS Files | Bear File Converter - Online &#x26;Free</strong></em></a></li>\n<li>[✅] <a href=\"https://looka.com/explore\"><em><strong>Free Logo Maker - Get Custom Logo Designs in Minutes |Looka</strong></em></a></li>\n<li>[✅] <a href=\"https://my.apify.com/tasks/innDmIK5FkTFPrsIp#/runs/1dnqOH2eA8c3NNhUQ\"><em><strong>my-task(apify/web-scraper)</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/@aratakagan/implementing-basic-shell-commands-with-node-js-eac5dba33174\"><em><strong>Implementing Basic Shell Commands with Node.js | by Arata Kagan |Medium</strong></em></a></li>\n<li>[✅] <a href=\"http://adilapapaya.com/docs/shelljs/\"><em><strong>shelljs</strong></em></a></li>\n<li>[✅] <a href=\"https://academo.org/search/?q=audio\"><em><strong>Search | Academo.org - Free, interactive,education.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.smashingmagazine.com/2018/02/dynamic-website-static-content-cdn/\"><em><strong>How To Make A Dynamic Website Become Static Through A Content CDN ---SmashingMagazine</strong></em></a></li>\n<li>[✅] <a href=\"https://imageopt.com/dashboard\"><em><strong>Image CDN | Dynamic image resizing |imageOpt</strong></em></a></li>\n<li>[✅] <a href=\"https://validatejavascript.com/\"><em><strong>ValidateJavaScript - Online Tool to Find &#x26; Fix JavaScriptErrors</strong></em></a></li>\n<li>[✅] <a href=\"https://amp.dev/documentation/examples/?format=websites\"><em><strong>AMP Websites Examples -amp.dev</strong></em></a></li>\n<li>[✅] <a href=\"https://amp.dev/documentation/examples/interactivity-dynamic-content/client-side_filtering/?format=websites\"><em><strong>Example: Client-side filtering -amp.dev</strong></em></a></li>\n<li>[✅] <a href=\"https://www.khanacademy.org/computing/computer-programming/html-css/css-layout-properties/pt/css-floating-elements\"><em><strong>Intro to HTML/CSS: Making webpages | Computer programming | KhanAcademy</strong></em></a></li>\n<li>[✅] <a href=\"https://stackedit.io/\"><em><strong>StackEdit -- In-browser Markdown editor</strong></em></a></li>\n<li>[✅] <a href=\"https://learngitbranching.js.org/?demo\"><em><strong>Learn Git Branching</strong></em></a></li>\n<li>[✅] <a href=\"https://codecanyon.net/user/dynomix/portfolio?irgwc=1&#x26;clickid=09Ny6rRzWxyLRYawUx0Mo372UkES160ONwBpzQ0&#x26;iradid=275988&#x26;irpid=27795&#x26;iradtype=ONLINE_TRACKING_LINK&#x26;irmptype=mediapartner&#x26;mp_value1=&#x26;utm_campaign=af_impact_radius_27795&#x26;utm_medium=affiliate&#x26;utm_source=impact_radius\"><em><strong>dynomix - Portfolio |CodeCanyon</strong></em></a></li>\n<li>[✅] <a href=\"http://www.jquery2dotnet.com/2013/06/quick-image-zoom-with-caption.html\"><em><strong>quick image zoom with caption - jQuery 2DotNet</strong></em></a></li>\n<li>[✅] <a href=\"https://next.observablehq.com/@bgoonz/timezonz\"><em><strong>TIMEZONZ / Bryan C Guner /Observable</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/djmitche\"><em><strong>djmitche's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://speckyboy.com/text-in-motion-effects/\"><em><strong>Set Your Text in Motion with These DazzlingEffects</strong></em></a></li>\n<li>[✅] <a href=\"https://wordtohtml.net/site/index?tour=1\"><em><strong>Word to HTML - Easy to use &#x26; InstantConversions</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/curious/8-books-that-got-me-through-2020-7fb41ff7173c\"><em><strong>8 Books That Got Me Through 2020. And how they continue to guide me toa... | by Israel Miles | Curious | Feb, 2021 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://rolandlevy.co.uk/\"><em><strong>Roland's portfolio 👨‍💻</strong></em></a></li>\n<li>[✅] <a href=\"https://app.superannotate.com/project/43352/images\"><em><strong>SuperAnnotate | Annotation Automation Platform for ComputerVision</strong></em></a></li>\n<li>[✅] <a href=\"https://winstall.app/generate\"><em><strong>winstall - GUI for Windows PackageManager</strong></em></a></li>\n<li>[✅] <a href=\"https://portableapps.com/apps\"><em><strong>Portable App Directory (over 400 free) -PortableApps.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/adnantopal\"><em><strong>adnantopal (Adnan Topal)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.joshwcomeau.com/snippets/\"><em><strong>Code Snippets</strong></em></a></li>\n<li>[✅] <a href=\"https://www.toptal.com/developers/webdevchecklist\"><em><strong>Web Developer Checklist: Website Launch Checklist |Toptal®</strong></em></a></li>\n<li>[✅] <a href=\"https://cloudconvert.com/api/v2/quickstart\"><em><strong>Quickstart Guide | CloudConvertAPI</strong></em></a></li>\n<li>[✅] <a href=\"https://cloudconvert.com/api/v2/jobs/builder#CaptureWebsite\"><em><strong>Job Builder | CloudConvertAPI</strong></em></a></li>\n<li>[✅] <a href=\"https://webdesign.tutsplus.com/categories/javascript\"><em><strong>JavaScript Web Design Tutorials by EnvatoTuts+</strong></em></a></li>\n<li>[✅] <a href=\"https://wonderwebware.com/file-splitter/\"><em><strong>File Splitter</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/watch?v=qcVaG4iEQxo&#x26;ab_channel=dirhtml\"><em><strong>Dirhtml overview -YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/jamesqquick/pens/popular?cursor=ZD0xJm89MCZwPTQ=\"><em><strong>James Quick onCodePen</strong></em></a></li>\n<li>[✅] <a href=\"https://www.encodedna.com/\"><em><strong>Web Development Blog by Arun Banik -EncodeDna.com</strong></em></a></li>\n<li>[✅] <a href=\"https://stackfame.com/auto-refresh-page-first-load-javascript-jquery\"><em><strong>auto-refresh page once only after first load - Using JavaScript /JQuery</strong></em></a></li>\n<li>[✅] <a href=\"https://formbuilder.online/\"><em><strong>jQuery formBuilder | Drag &#x26; Drop FormCreation</strong></em></a></li>\n<li>[✅] <a href=\"https://www6.waybackmachinedownloader.com/website-downloader-online/file_editor-website-downloader-online/?url=files/demo/stackfame.com_bryan.guner.dev_gmail.com_giq9ws8unx\"><em><strong>Website Downloader Online - ScrapingResults</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/npm-reinstall\"><em><strong>npm-reinstall - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://status.lekoarts.de/\"><em><strong>https://status.lekoarts.de</strong></em></a></li>\n<li>[✅] <a href=\"https://www.timeanddate.com/clocks/free.html\"><em><strong>Free Clocks for YourWebsite</strong></em></a></li>\n<li>[✅] <a href=\"https://voxel51.com/docs/fiftyone/environments/index.html\"><em><strong>FiftyOne Environments --- FiftyOne 0.8.0documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/PacktPublishing\"><em><strong>Packt</strong></em></a></li>\n<li>[✅] <a href=\"https://react-hook-form.com/form-builder/\"><em><strong>Form Builder | React Hook Form - Simple React formsvalidation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/electron/electron-api-demos/releases\"><em><strong>Releases ·electron/electron-api-demos</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub.jetbrains.space/m/bryan.guner.dev/edit?tab=Contacts\"><em><strong>General settings --- Bryan Guner ---webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codewars.com/kata/5412509bd436bd33920011bc/train/javascript\"><em><strong>Training on Credit Card Mask |Codewars</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/orgs/Web-Audio-Tools/people\"><em><strong>People ·Web-Audio-Tools</strong></em></a></li>\n<li>[✅] <a href=\"https://craigloewen-msft.github.io/WSLTipsAndTricks/\"><em><strong>WSL Tips and Tricks | A collection of tips and tricks for the WindowsSubsystem forLinux</strong></em></a></li>\n<li>[✅] <a href=\"https://builtwith.com/\"><em><strong>BuiltWith Technology Lookup</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/VwMyERy\"><em><strong>Flex Blog Entries</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/mdBpzoK\"><em><strong>Timetable Generator</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/c31a03f2058391633e17f3db10edd6ba\"><em><strong>TimetableGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/PoJEyLy\"><em><strong>Music Player</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/wvrpYON\"><em><strong>Fetch Instagram Photos</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/0c57fc51759cdc18619e290fdb40ddf6\"><em><strong>Fetch InstagramPhotos</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/poWpxBo\"><em><strong>Blog Posts Sidebar</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/6e71774b347da914ff282baf3e1102a0\"><em><strong>Blog PostsSidebar</strong></em></a></li>\n<li>[✅] <a href=\"https://markmurray.co/projects\"><em><strong>Mark Murray</strong></em></a></li>\n<li>[✅] <a href=\"http://markmur.github.io/docky/\"><em><strong>Docky</strong></em></a></li>\n<li>[✅] <a href=\"http://127.0.0.1:5500/docs/index.html\"><em><strong>Bgoonzblog</strong></em></a></li>\n<li>[✅] <a href=\"https://code.visualstudio.com/docs/getstarted/settings\"><em><strong>Visual Studio Code User and WorkspaceSettings</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/company/redfin/\"><em><strong>(1) Redfin: Overview |LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://www.redfin.com/careers/departments\"><em><strong>Departments | Redfin</strong></em></a></li>\n<li>[✅] <a href=\"https://codebeautify.org/html-to-markdown\"><em><strong>HTML to Markdown Converter</strong></em></a></li>\n<li>[✅] <a href=\"https://dillinger.io/\"><em><strong>Online Markdown Editor - Dillinger, the Last Markdown Editorever.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/4a6ee52d9a2840c2867ac1fd943d7fef?v=0b917f4abd7f4b40b5900c6358f9ece2&#x26;p=a55923c3b77a40fe866e948b0ec7aa85\"><em><strong>Job SearchResources</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/CwMwqn7G8lQwTk0T5KIy/navigation\"><em><strong>Navigation - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://builtin.com/profile/edit\"><em><strong>Edit Profile | Built In</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/notifications/\"><em><strong>Notifications | LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?ogbl#inbox/FMfcgzGlkjWzClNbKQDXbsfjGcjRfwhS\"><em><strong>Job opportunity (W2 only) NYPA - .Net Programmer (IT - 228) - WhitePlains, NY 10601 - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://education.github.com/experiences/intro_to_web_dev\"><em><strong>Intro to Web Dev - GitHubEducation</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgzGlkjWxkKJlLzBqVkNhLnHMdklZ\"><em><strong>Updated invitation: Job Search Kick-off November 1st @ Mon Nov 1, 20211pm - 2pm (EDT) (Lambda Job Search Program) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://airtable.com/shrDZgl0o92rMugIh\"><em><strong>Customized Outreach Message Request Form - 1st Month of JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://airtable.com/shrz3tX6QTJqUS5ay\"><em><strong>Job Search Intent Form - NewGrad</strong></em></a></li>\n<li>[✅] <a href=\"https://determined-dijkstra-ee7390.netlify.app/\"><em><strong>README</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LambdaSchool/CS-Wiki\"><em><strong>LambdaSchool/CS-Wiki: Lambda School CSWiki</strong></em></a></li>\n<li>[✅] <a href=\"https://mikewest.org/is/\"><em><strong>\"Mike West's brief bio\" --- Mike West</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=sales+force+hackerrank+github&#x26;sxsrf=AOaemvJmOUDDQgGba8gW_VMI29YR_khIeQ%3A1635799542803&#x26;ei=9lGAYbrKMIm2ggfOroHAAg&#x26;oq=sales+force+hackerrank+github&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyBAgAEA06BwgAEEcQsANKBAhBGABQsuMCWOLqAmCB7AJoAXABeACAAWaIAboEkgEDNi4xmAEAoAEByAEIwAEB&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwi6nbCVhPjzAhUJm-AKHU5XACgQ4dUDCA8&#x26;uact=5\"><em><strong>sales force hackerrank github - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/tag/salesforce/\"><em><strong>Salesforce Archives -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.quora.com/What-is-the-Salesforce-2-hour-remote-programming-test-2nd-round-interview-like\"><em><strong>(3) What is the Salesforce 2-hour remote programming test (2nd roundinterview) like? -Quora</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/chb0github/salesforce\"><em><strong>chb0github/salesforce: To share withfriends</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/manoflogan/Salesforce-Morsecode\"><em><strong>manoflogan/Salesforce-Morsecode: Take hometest</strong></em></a></li>\n<li>[✅] <a href=\"https://www.teamblind.com/post/Salesforce---Aloha-5-Coding-Challenge-dOwiMSSr\"><em><strong>Salesforce - Aloha 5 Coding Challenge -Blind</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/merge-k-sorted-linked-lists/\"><em><strong>Merge K sorted linked lists | Set 1 -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://careers.sweetwater.com/us/en/job/P-100094/Web-Software-Engineer\"><em><strong>Web Software Engineer in Fort Wayne, Indiana, United States |Technology at SweetwaterSound</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/toybox/mohlkfkdfnjciellfjppgfpffkchlopb/related\"><em><strong>Toybox - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?ogbl#inbox/FMfcgzGlkFsrHJsqPZWXjnVgwsMlmhhS\"><em><strong>Re: Hi Bryan, its Tom from Wix Site Design - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/react-router-route-config-forked-qgbif\"><em><strong>React Router - Route Config (forked) -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/musing-pine-y7vs3\"><em><strong>musing-pine-y7vs3 -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/wizardly-butterfly-b748k\"><em><strong>wizardly-butterfly-b748k -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub.ghost.io/tag/getting-started/\"><em><strong>Getting Started -WebDevHub</strong></em></a></li>\n<li>[✅] <a href=\"https://account.ghost.org/signup\"><em><strong>Sign up for Ghost(Pro)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/content/tree/main/files/en-us/glossary\"><em><strong>content/files/en-us/glossary at main ·bgoonz/content</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz42/pen/vYZwNPv\"><em><strong>Email Signature</strong></em></a></li>\n<li>[✅] <a href=\"https://hackernoon.com/company/google\"><em><strong>Google News Page | Hacker Noon</strong></em></a></li>\n<li>[✅] <a href=\"https://hackernoon.com/web-scraping-with-javascript-and-nodejs\"><em><strong>Web Scraping with Javascript and Node.js | HackerNoon</strong></em></a></li>\n<li>[✅] <a href=\"https://scrapeme.live/shop/Bulbasaur/\"><em><strong>Bulbasaur -- ScrapeMe</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgzGlkFtzMjwRQqXfWXldKxpLWhQW\"><em><strong>Thank you for submitting your integration request! -bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://nextjs.org/showcase\"><em><strong>Showcase | Next.js</strong></em></a></li>\n<li>[✅] <a href=\"https://vercel.com/oss?utm_source=next-site&#x26;utm_medium=footer&#x26;utm_campaign=next-website\"><em><strong>Open Source --Vercel</strong></em></a></li>\n<li>[✅] <a href=\"https://swr.vercel.app/\"><em><strong>React Hooks for Data Fetching -- SWR</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/vercel/swr\"><em><strong>vercel/swr: React Hooks for datafetching</strong></em></a></li>\n<li>[✅] <a href=\"https://nextjs.org/docs/basic-features/data-fetching\"><em><strong>Basic Features: Data Fetching |Next.js</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/vercel/next.js\"><em><strong>vercel/next.js: The React Framework</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/html-to-figma/efjcmgblfpkhbjpkpopkgeomfkokpaim/related?hl=en-US\"><em><strong>HTML to Figma - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Lambda-School-Labs/family-promise-service-tracker-fe-a/pull/185\"><em><strong>Cleaned up useless comments and added some clarification for ambiguouscomments in ServiceMap.js by LilCthulu · Pull Request #185 ·Lambda-School-Labs/family-promise-service-tracker-fe-a</strong></em></a></li>\n<li>[✅] <a href=\"https://getsharex.com/image-effects/\"><em><strong>Image effects - ShareX</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments\"><em><strong>Lexical grammar - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevhub.ghost.io/contact/\"><em><strong>WebDevHub</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/lambda-labs/~/drafts/-MlYUCnu4my4BGIrejE-/misc/cheat-sheets\"><em>**Cheat Sheets -LAMBDA</em>LABS<em>Family</em>Promise**_</a></li>\n<li>[✅] <a href=\"https://www.loom.com/share/173f03d6a3f24925ba6c742f36f686a4\"><em><strong>30 September, 2021 -Git-and-Trello-Walkthrough</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.gitbook.com/editing-content/embeds#spotify-music\"><em><strong>Embeds - GitBookDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.gitbook.com/product/a-unified-gitbook-experience\"><em><strong>A Unified GitBook Experience - GitBook'sBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/~/drafts/-MlYMzv87l4swA9ZUHAE/tools/untitled\"><em><strong>Networking -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/festive-kilby-f0a784/overview\"><em><strong>festive-kilby-f0a784 | Siteoverview</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.gitlab.com/ee/integration/\"><em><strong>GitLab integrations | GitLab</strong></em></a></li>\n<li>[✅] <a href=\"https://web.mit.edu/kerberos/\"><em><strong>Kerberos: The Network AuthenticationProtocol</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.gitlab.com/ee/integration/oauth_provider.html\"><em><strong>Configure GitLab as an OAuth 2.0 authentication identity provider |GitLab</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/musing-pine-y7vs3/\"><em><strong>CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://react-redux.js.org/\"><em><strong>React Redux | React Redux</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/Lambda-Repo-Resources\"><em><strong>Web-Dev-Collaborative/Lambda-Repo-Resources</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/keen-williams-48be7c/deploys\"><em><strong>Deploys for keen-williams-48be7c |Deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://www.learneroo.com/modules/64/nodes/353\"><em><strong>Control Structures -Learneroo</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/0a9a307a896aa5f56e43dd086b2a4457\"><em><strong>treenode.js</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/getting-started/overview/\"><em><strong>Crawler Overview | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://master--lambda-resources.netlify.app/weeks/cd_sata-structures/weeks/wk17/d1/d1#whileloops\"><em><strong>intro-2-py</strong></em></a></li>\n<li>[✅] <a href=\"https://renanmouraf.gumroad.com/l/HoXnu\"><em><strong>Python Fundamentals: Be able to say \"I knowPython\"</strong></em></a></li>\n<li>[✅] <a href=\"https://renanmf.com/the-top-skill-for-a-software-developer/\"><em><strong>The Top Skill for a SoftwareDeveloper</strong></em></a></li>\n<li>[✅] <a href=\"https://renanmf.com/wp-content/uploads/2020/04/python_beginners.pdf\"><em><strong>The Python Guide forBeginners</strong></em></a></li>\n<li>[✅] <a href=\"https://master--lambda-resources.netlify.app/\"><em><strong>Lambda StudentResources</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/8aa7f254a46b2b33923ef63a4da82d88\"><em><strong>examples.md</strong></em></a></li>\n<li>[✅] <a href=\"https://imglarger.com/Login\"><em><strong>AI Image Enlarger | Sign In Account</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/mystifying-ptolemy-293e0d/overview\"><em><strong>mystifying-ptolemy-293e0d | Siteoverview</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/crawlers/e673c304-fe20-4ddb-a61a-ae38c25ca462/monitoring/list?reason=success\"><em><strong>Monitoring | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschoolsso.okta.com/app/UserHome\"><em><strong>lambdaschool-org-177932 - MyApplications</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.zoho.com/zm/#stream/group/747400375/views/tome\"><em><strong>Streams - Zoho Mail(bgoonz@zohomail.com)</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.force.com/thehub/s/toparticles\"><em><strong>Top Articles</strong></em></a></li>\n<li>[✅] <a href=\"https://www.zoho.com/mail/\"><em><strong>Email Hosting | Secure Business Email for your organization - ZohoMail</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/crawlers?sort=status&#x26;order=ASC&#x26;limit=20\"><em><strong>Crawlers | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"http://jekyllrb.com/showcase/\"><em><strong>Showcase | Jekyll • Simple, blog-aware, staticsites</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/remotesynth/Static-Site-Samples\"><em><strong>remotesynth/Static-Site-Samples: A collection of simple sites builtwith various static siteengines</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pinterest.com/pin-builder/\"><em><strong>Pinterest</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/Data-Structures-Algos-Codebase-3#package-lock.json\"><em><strong>Data-Structures-Algos-Codebase-3 -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/wk14d3-1#northwind.db3\"><em><strong>wk14d3-1 - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.replit.com/tutorials/11-using-the-replit-database\"><em><strong>Replit Docs - Databases: build aphonebook</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/replit-docs-2#index.js\"><em><strong>replit docs-2 -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/excel2html-table#index.js\"><em><strong>excel2html-table -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/replit-docs-3\"><em><strong>replit docs-3 - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/@replit/database\"><em><strong>@replit/database -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/1/?ogbl#inbox/FMfcgzGlkPQQdlKjKtPmgrKSngNjZBSC\"><em><strong>Welcome to Learneroo! Please Confirm Your Email - gunerb1@tcnj.edu -The College of New JerseyMail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.hotscripts.com/category/scripts/javascript/scripts-programs/miscellaneous/\"><em><strong>JavaScript for Miscellaneous | Search &#x26; Download SoftwareFree</strong></em></a></li>\n<li>[✅] <a href=\"https://www.digitalocean.com/community/tutorials/understanding-nginx-http-proxying-load-balancing-buffering-and-caching\"><em><strong>Understanding Nginx HTTP Proxying, Load Balancing, Buffering, andCaching |DigitalOcean</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.com/courses/full-stack-web-development\"><em><strong>Full Stack Web Development Course | LambdaSchool</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/-MkP23pBP3MWkIzJcreW/front-end/untitled\"><em>**Frontend: -LAMBDA</em>LABS<em>Family</em>Promise**_</a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/family-promise-docs\"><em><strong>bgoonz/family-promise-docs</strong></em></a></li>\n<li>[✅] <a href=\"https://ds-unit-5-lambda.netlify.app/#\"><em><strong>Python Notes</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/wappalyzer/gppongmhjkpfnbhagpmjfkannfbllamg?hl=en%20\"><em><strong>Wappalyzer - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/franz-enzenhofer-seo-live/jbnaibigcohjfefpfocphcjeliohhold?hl=en\"><em><strong>Franz Enzenhofer SEO Live Test - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Lambda-School-Labs/family-promise-service-tracker-fe-a/edit/main/README.md\"><em><strong>Editing family-promise-service-tracker-fe-a/README.md at main ·Lambda-School-Labs/family-promise-service-tracker-fe-a</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/FaisalUmair/udemy-downloader-gui\"><em><strong>FaisalUmair/udemy-downloader-gui: A desktop application for downloadingUdemy Courses</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/106680fbea3a13308d759c188b25c1a1\"><em><strong>gendir-python-bash.md</strong></em></a></li>\n<li>[✅] <a href=\"http://familypromise.org/donate/?gclid=CjwKCAjwzaSLBhBJEiwAJSRokl9MGOm-e3RyWIfqp8skpeKXMY7Q6G02oISTae_LfbtpJ_TaObXlJBoCDa8QAvD_BwE\"><em><strong>Donate - FamilyPromise</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pinterest.com/pin-builder/?url=https%3A%2F%2Fimgur.com%2FAVzwOVT&#x26;media=https%3A%2F%2Fimgur.com%2FAVzwOVT&#x26;method=button\"><em><strong>Pinterest</strong></em></a></li>\n<li>[✅] <a href=\"https://paperhive.org/help/markdown\"><em><strong>Markdown cheat sheet</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/my-gists/deployments/activity_log?environment=github-pages\"><em><strong>Deployments ·bgoonz/my-gists</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/UsefulResourceRepo3.0/tree/c9168c54d563043a7bfcd3769be6040e28e0b13d\"><em><strong>bgoonz/UsefulResourceRepo3.0 atc9168c54d563043a7bfcd3769be6040e28e0b13d</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/UsefulResourceRepo3.0\"><em><strong>bgoonz/UsefulResourceRepo3.0</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/dns.js.org\"><em><strong>sokra/dns.js.org: Free and short JS.ORG domains for GitHubPages</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/develop.github.com\"><em><strong>sokra/develop.github.com: API Documentation forGitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/opencollective-website\"><em><strong>sokra/opencollective-website: OpenCollectivefrontend</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/antwar\"><em><strong>sokra/antwar: A static site generator built with React andWebpack.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/redux-simple-router\"><em><strong>sokra/redux-simple-router: Ruthlessly simple bindings to keepreact-router and redux insync</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/rimraf\"><em><strong>sokra/rimraf: A `rm -rf` util fornodejs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/chokidar\"><em><strong>sokra/chokidar: A neat wrapper around node.js fs.watch / fs.watchFile /fsevents.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sokra/markdown-loader\"><em><strong>sokra/markdown-loader: markdown loader forwebpack</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=git+revert+to+earlier+commit&#x26;oq=git+revert+to+ea&#x26;aqs=chrome.0.35i39j69i57j0i512l2j0i22i30l6.4056j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>git revert to earlier commit - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/potluck-landing\"><em><strong>bgoonz/potluck-landing:potluck-planner</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ft-potluck-planer-05-units3-4/organization\"><em><strong>ft-potluck-planer-05-units3-4/organization</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz?tab=repositories&#x26;q=pot&#x26;type=&#x26;language=&#x26;sort=\"><em><strong>YourRepositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/my-lambda-projects/Potluck-Planner\"><em><strong>my-lambda-projects/Potluck-Planner: Jamstack site ...landing page forpotluck planner</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative?q=ref&#x26;type=&#x26;language=&#x26;sort=\"><em><strong>Web-Dev-Collab</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/bgoonz/bk5a60fp/\"><em><strong>Maps API v3 Places Autocomplete form fill - JSFiddle - CodePlayground</strong></em></a></li>\n<li>[✅] <a href=\"https://nextjs.org/docs/api-reference/cli\"><em><strong>CLI | Next.js</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=g%2Fnpm%2Fnvm%3A+12%3A+node%3A+not+found&#x26;oq=g%2Fnpm%2Fnvm%3A+12%3A+node%3A+not+found&#x26;aqs=chrome.0.69i59j69i58.715j0j9&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>g/npm/nvm: 12: node: not found - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/bgoonz/vLumt3xo/9/\"><em><strong>JSFiddle - Code Playground</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/bgoonz/wpejzavc/1/\"><em><strong>Potluckmaps - JSFiddle - CodePlayground</strong></em></a></li>\n<li>[✅] <a href=\"https://random-static-html-deploys.netlify.app/google-maps-embed.html\"><em><strong>Locator</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/resources/~/gitsync/status\"><em><strong>Resources - JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/View.aspx?resid=D21009FDD967A241!671955&#x26;wdAccPdf=0&#x26;wdEmbedFS=1&#x26;authkey=!AE0Hs3cFrCr9jXg\"><em>**bryan</em>guner<em>resume</em>2021-v4 (1).docx - Microsoft WordOnline**_</a></li>\n<li>[✅] <a href=\"https://www.notion.so/webdevhub42/897a6fbf1da44109b781197edcbea0a6\"><em><strong>Notion -- The all-in-one workspace for your notes, tasks, wikis, anddatabases.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/Negotiating-your-Offer-44ef84c797ef486fb8097a3f7aa7702e\"><em><strong>Notion -- The all-in-one workspace for your notes, tasks, wikis, anddatabases.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/desktop\"><em><strong>Mac &#x26; Windows -- Notion</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/notion-web-clipper/knheggckgoiihginacbkhaalnibhilkk\"><em><strong>Notion Web Clipper - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/APPACADEMY-RESOURCES/blob/master/_Aly-Lei/App-Academy/7.27-7.31/Wednesday/Notes.md\"><em><strong>APPACADEMY-RESOURCES/Notes.md at master ·bgoonz/APPACADEMY-RESOURCES</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/APPACADEMY-RESOURCES/tree/master/_MShuff/testing-javascript\"><em>**APPACADEMY-RESOURCES/\\</em>MShuff/testing-javascript at master ·Web-Dev-Collaborative/APPACADEMY-RESOURCES**_</a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgzGlkjZJFNzHgRGWrPnMHMdNChXz?compose=CqMvqmWVQwpSVhDVlXrxMcRxGlvpNGDZpRvtKbNhqGldQlMLFlbJlbZXJgLqKNNsCxnPdGgLLLq\"><em><strong>Full-Time position for Front-End Software Engineer with one of ourdirect clients in Plano, TX. - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialspoint.com/javascript/javascript_error_handling.htm\"><em><strong>JavaScript - Errors &#x26; ExceptionsHandling</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/CSS-Tricks/jQuery-Organic-Tabs\"><em><strong>CSS-Tricks/jQuery-Organic-Tabs: Click the tabs to swap out contentbelow, but the area fluidly adjusts in size to the new content, ratherthan jerk up ordown.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/serverless\"><em><strong>Web-Dev-Collaborative/serverless: The Power of Serverless for Front-EndDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/Relevant-Dropdowns\"><em><strong>Web-Dev-Collaborative/Relevant-Dropdowns</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Audio-Tools/serverless\"><em><strong>Web-Audio-Tools/serverless: The Power of Serverless for Front-EndDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/topics/css-tricks\"><em><strong>css-tricks · GitHub Topics</strong></em></a></li>\n<li>[✅] <a href=\"https://geekflare.com/javascript-common-errors/\"><em><strong>5 Common Causes of JavaScript Errors (and How to AvoidThem)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/karlhorky/learn-to-program\"><em><strong>karlhorky/learn-to-program: Educational resources to learn to program(Foundation in WebDevelopment)</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.containerize.com/2021/06/25/top-5-open-source-cloud-storage-software-in-2021/\"><em><strong>Top 5 Open Source Cloud Storage Software in2021</strong></em></a></li>\n<li>[✅] <a href=\"https://owncloud.com/download-server/\"><em><strong>Download Server Packages -ownCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tecmint.com/free-open-source-cloud-storage-tools-for-linux/\"><em><strong>16 Open Source Cloud Storage Software for Linux in2020</strong></em></a></li>\n<li>[✅] <a href=\"https://pydio.com/en/solutions/pydio-education-and-academic-institutions\"><em><strong>Pydio for education and academic institutions |Pydio</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/s/-MjLjuvITJh8ZwT8mVxp/\"><em><strong>Home -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/new\"><em><strong>New Post - DEV Community 👩‍💻👨‍💻</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/b1eb322aaccc37294fcddd03a94a51af\"><em><strong>useful-commands.md</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/c/2PWiuKecIEYV9gDdrt4L\"><em><strong>My Docs - GitBook</strong></em></a></li>\n<li>[✅] <a href=\"https://account.microsoft.com/services/microsoft365/details#overview\"><em><strong>Microsoft account | Services &#x26;subscriptions</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?ogbl#inbox\"><em><strong>Inbox (498) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/earn\"><em><strong>Earn for your writing</strong></em></a></li>\n<li>[✅] <a href=\"https://mediumpartnerprogram.typeform.com/apply?typeform-source=medium.com\"><em><strong>Medium Partner ProgramApplication</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/8b7b89463d29/edit\"><em><strong>New story -- Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://reactjs.org/docs/fragments.html\"><em><strong>Fragments -- React</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/reactjs/pen/VrEbjE?editors=1000\"><em><strong>Example: Fragments</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/pop-quiz/deployments/activity_log?environment=github-pages\"><em><strong>Deployments ·bgoonz/pop-quiz</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1117\"><em>**uo by bgoonz · Pull Request #1117 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/GIT-CDN-FILES/tree/master\"><em><strong>bgoonz/GIT-CDN-FILES</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/robole/artifice#lsd\"><em><strong>robole/artifice: Experiments &#x26; exercises to improve web devtrickery.</strong></em></a></li>\n<li>[✅] <a href=\"http://serebrov.github.io/html/2014-01-04-git-revert-multiple-recent-comments.html\"><em><strong>git - how to revert multiple recent commits • vim, git, aws and otherthree-letterwords</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps/githubreadmeactivitygraph/deploy/github\"><em><strong>githubreadmeactivitygraph · GitHub |Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://githubreadmeactivitygraph.herokuapp.com/\"><em><strong>https://githubreadmeactivitygraph.herokuapp.com</strong></em></a></li>\n<li>[✅] <a href=\"https://ashutosh00710.github.io/github-readme-activity-graph/?\"><em><strong>GitHub Readme ActivityGraph</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/styleguide/tree/master/less\"><em><strong>styleguide/less at master ·side-projects-42/styleguide</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/graphs/code-frequency\"><em>**Code frequency ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/compare/master...preview\"><em>**Comparing master...preview ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1119\"><em>**-update by bgoonz · Pull Request #1119 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1120\"><em>**Preview by bgoonz · Pull Request #1120 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/619dd7df5c760600c8e0267e/\"><em><strong>blog3-backup - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://blog3-backup-dd7df.netlify.app/\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/blog3-backup\"><em><strong>bgoonz/blog3-backup</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/blog3-backup-dd7df/deploys/619df30c88416acc783bb2d3\"><em><strong>Deploy details |Deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/RwZzwGm\"><em><strong>Simple CSS Waves | Mobile &#x26; Fullwidth</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Zertz/react-headless-tabs\"><em><strong>Zertz/react-headless-tabs: Headless, simple, and highly flexibletab-like primitives built with reacthooks</strong></em></a></li>\n<li>[✅] <a href=\"https://account.ghost.org/signin\"><em><strong>Ghost: Sign in</strong></em></a></li>\n<li>[✅] <a href=\"https://workspace.google.com/marketplace/myapps?pann=ogb\"><em><strong>Manage apps - Google WorkspaceMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/me/partner/dashboard\"><em><strong>Your Partner Program earnings</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/links-to-remember\"><em>**links to remember · bgoonz/BGOONZ</em>BLOG<em>2.0Wiki**</em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/app-ads/sdk-setup\"><em><strong>Implement the SDK - Facebook AppAds</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/apps/448469606483680/settings/basic/\"><em><strong>hiiiiii - Settings - Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freeprivacypolicy.com/free-privacy-policy-generator/\"><em><strong>Free Privacy Policy Generator - Free PrivacyPolicy</strong></em></a></li>\n<li>[✅] <a href=\"https://app.freeprivacypolicy.com/profile/login\"><em><strong>Log In -FreePrivacyPolicy</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ManasMadan/PDFActions/network/dependencies\"><em><strong>Dependencies ·ManasMadan/PDFActions</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/mystifying-poitras-p8qhv?file=/index.html\"><em><strong>mystifying-poitras-p8qhv -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=example+of+every+type+of+html+tag&#x26;sxsrf=AOaemvI0Zi7k1DDPhRQ8w1Vf7udyQc0RHA%3A1633126235767&#x26;ei=W4dXYeybLs_r_QaQpqH4BA&#x26;ved=0ahUKEwistZ-pnarzAhXPdd8KHRBTCE8Q4dUDCA4&#x26;uact=5&#x26;oq=example+of+every+type+of+html+tag&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyCAghEBYQHRAeOgcIABBHELADOgQIIxAnOgUIABCRAjoRCC4QgAQQsQMQgwEQxwEQ0QM6DgguEIAEELEDEMcBENEDOgsIABCABBCxAxCDAToECAAQQzoICAAQsQMQgwE6CAgAEIAEELEDOgUIABCABDoHCAAQgAQQCjoGCAAQFhAeOggIABAWEAoQHjoFCAAQhgM6BQghEKABOgUIIRCrAkoECEEYAFDARVj9b2CrcWgDcAJ4AIABbogBtxOSAQQzMC4zmAEAoAEByAEIwAEB&#x26;sclient=gws-wiz\"><em><strong>example of every type of html tag - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sitepoint.com/a-basic-html5-template/\"><em><strong>HTML5 Template: A Basic Boilerplate for Any Project -SitePoint</strong></em></a></li>\n<li>[✅] <a href=\"https://www.semrush.com/blog/html-tags-list/\"><em><strong>HTML Tags List: HTML CheatSheet</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialbrain.com/html_tutorial/html_tags/\"><em><strong>HTML Tags --- List of all HTML Tags with ExamplesTutorialBrain</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codebrainer.com/blog/top-10-html-tags\"><em><strong>Basic HTML tags - Top 10tags</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/organizations/Portfolio-Projects42/settings/profile\"><em><strong>Organizationprofile</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/developer/thanks?account=Portfolio-Projects42\"><em><strong>Thanks</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/rest/guides\"><em><strong>Guides - GitHub Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app\"><em><strong>Setting up your development environment to create a GitHub App - GitHubDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en\"><em><strong>GitHub Documentation</strong></em></a></li>\n<li>\n<p>[✅] <a href=\"https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership\"><em><strong>Publicizing or hiding organization membership - GitHubDocs</strong></em></a></p>\n<ul>\n<li>[✅] <a href=\"https://github.com/Archive-42/strapi\"><em><strong>Archive-42/strapi: 🚀 Open source Node.js Headless CMS to easily buildcustomisable APIs</strong></em></a></li>\n<li>[✅] <a href=\"https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/file-structure.html\"><em><strong>Project Structure - Strapi DeveloperDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/strapi/documentation/tree/main/docs/user-docs/latest\"><em><strong>documentation/docs/user-docs/latest at main ·strapi/documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://strapi.io/documentation/developer-docs/latest/development/plugins/upload.html\"><em><strong>Upload - Strapi DeveloperDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://strapi.io/documentation/developer-docs/latest/developer-resources/content-api/content-api.html\"><em><strong>Content API - Strapi DeveloperDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://strapi.io/documentation/developer-docs/latest/developer-resources/content-api/integrations/gatsby.html\"><em><strong>Get started with Gatsby - Strapi DeveloperDocumentation</strong></em></a></li>\n</ul>\n</li>\n<li>[✅] <a href=\"https://strapi.io/documentation/developer-docs/latest/developer-resources/cli/CLI.html\"><em><strong>CLI - Strapi DeveloperDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@lambda-labs/s/lambda-labs/ux/untitled/accessibility\"><em>**Accessibility -LAMBDA</em>LABS<em>Family</em>Promise**_</a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Temp-Repo\"><em><strong>bgoonz/Temp-Repo</strong></em></a></li>\n<li>[✅] <a href=\"https://www.credly.com/earner/earned/share/bd145ba3-0f09-42fc-8d1f-a3bc4e0a46b4?new_connection=351619e3-9e1f-4b06-90ee-fe015b27e425&#x26;provider_id=351619e3-9e1f-4b06-90ee-fe015b27e425&#x26;provider=linkedin\"><em><strong>Share Badge -Credly</strong></em></a></li>\n<li>[✅] <a href=\"https://www.ziprecruiter.com/profile\"><em><strong>My Profile - Bryan C Guner |ZipRecruiter</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.google.com/document/d/1coQnfr9bx07DvWOahA2Lk87S58HQ7Aex/edit\"><em><strong>Bryan Guner.docx - GoogleDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://drive.google.com/drive/u/0/my-drive\"><em><strong>My Drive - Google Drive</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.google.com/spreadsheets/d/1Jy7MvB0juB31GoywQCjXDtlZrZABZ592YadE8qxn5Q4/edit#gid=0\"><em><strong>Links - GoogleSheets</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/#/a211006684p291037980/admin/streams/table/3016153243\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner.gitbook.io/job-search/readme-1\"><em>**Initial page -WEB</em>DEV<em>JOB</em>SEARCH**_</a></li>\n<li>[✅] <a href=\"https://www.notion.so/webdevhub42/Getting-Started-in-Job-Search-d4a2143e5bf546969b0762ca745e98ba\"><em><strong>Notion -- The all-in-one workspace for your notes, tasks, wikis, anddatabases.</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboards.lambdaschool.com/profile\"><em><strong>Lambda School Dashboards</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dropbox.com/scl/fi/6iqgujcopou2q9w2r243z/Untitled.gdoc?dl=0&#x26;rlkey=n6hesuzmzyuxmommzvqm4wjv5\"><em><strong>Untitled.gdoc</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/edit.aspx?resid=D21009FDD967A241%21671936&#x26;id=documents&#x26;authkey=!AFn3BAou_M9bR2w&#x26;\"><em><strong>Job-search-links.xlsx - Microsoft ExcelOnline</strong></em></a></li>\n<li>[✅] <a href=\"https://balanced-cornet-d0b.notion.site/Getting-Started-in-Job-Search-d0cd969ab1c147ccbe0ba1c2c6685241\"><em><strong>Getting Started in JobSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://balanced-cornet-d0b.notion.site/How-use-the-Customized-Outreach-Message-and-Contact-Sourcing-Generator-4ea04e77d3e5486084fdd26da8183111\"><em><strong>How use the Customized Outreach Message and Contact SourcingGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://sway.office.com/xKGEBSmAMUBR7YEG\"><em><strong>Sway</strong></em></a></li>\n<li>[✅] <a href=\"https://www.office.com/launch/word?auth=1\"><em><strong>Word</strong></em></a></li>\n<li>[✅] <a href=\"https://sway.office.com/oXrVxxWwDcxRCYpM\"><em><strong>Professional Profile Title</strong></em></a></li>\n<li>[✅] <a href=\"https://sway.office.com/mint_tulip\"><em><strong>MintTulip Documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.microsoft.com/en-us/microsoft-365/compare-microsoft-365-enterprise-plans\"><em><strong>Compare Microsoft 365 Enterpriseplans</strong></em></a></li>\n<li>[✅] <a href=\"https://edudownloads.azureedge.net/msdownloads/Microsoft_Technology_Blueprint_for_Remote_Learning.pdf\"><em>**Microsoft</em>Technology<em>Blueprint</em>for<em>Remote</em>Learning.pdf**_</a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?v=photos&#x26;id=root&#x26;cid=D21009FDD967A241&#x26;qt=allmyphotos\"><em><strong>All Photos -OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://my.indeed.com/resume/editor\"><em><strong>Indeed Resume</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/js-dynamic-time-warping\"><em><strong>bgoonz/js-dynamic-time-warping</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TheAlgorithms/Javascript\"><em><strong>TheAlgorithms/Javascript: A repository for All algorithms implementedin Javascript (for educational purposesonly)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sindresorhus/awesome/edit/main/readme.md\"><em><strong>github.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/chrisblakely01/quiz-app\"><em><strong>chrisblakely01/quiz-app: starter code for quiz app beginner reactproject</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/focused-cache-uuf2h?file=/resume.md:4874-5020\"><em><strong>Loading... -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.figstack.com/app/explain\"><em><strong>Explain Code</strong></em></a></li>\n<li>[✅] <a href=\"https://www.browserling.com/tools/extract-urls\"><em><strong>Extract URLs from Text - Extract HTML Links - Online - Browserling WebDeveloper Tools</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/langholz/dtw\"><em><strong>langholz/dtw: Dynamic time warping javascriptimplementation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/fheyen/dynamic-time-warping-2\"><em><strong>fheyen/dynamic-time-warping-2: Dynamic time warping forJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/js-dynamic-time-warping/settings\"><em><strong>Options</strong></em></a></li>\n<li>[✅] <a href=\"https://myaccount.google.com/?hl=en&#x26;rapt=AEjHL4ON1wFzHCHAmUAj_3F1UspaYDpH17ZSJ1oRWGrgI9iPxMxYCRfTDj_74-cfNuXqrwRvE7L_UtfKkcc21LauEu8oyJkSDQ\"><em><strong>GoogleAccount</strong></em></a></li>\n<li>[✅] <a href=\"https://drive.google.com/drive/my-drive\"><em><strong>My Drive - Google Drive</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift\"><em><strong>Learn Basic JavaScript: Manipulate Arrays With unshift() |freeCodeCamp.org</strong></em></a></li>\n<li>[✅] <a href=\"https://retool.com/careers/#writer,-developer-content\"><em><strong>Retool |Careers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.brooksource.com/find-talent/why-brooksource\"><em><strong>Brooksource | Find Talent | WhyBrooksource</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/priceless-thompson-dos9o?file=/src/app.js:471-487\"><em><strong>priceless-thompson-dos9o -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://www.ca-zeb.com/\"><em><strong>CyberArmy HeadQuarters</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codingrooms.com/management/courses/1811/questions\"><em><strong>CodingRooms</strong></em></a></li>\n<li>[✅] <a href=\"https://nbconvert.readthedocs.io/en/latest/usage.html#convert-html\"><em><strong>Using as a command line tool --- nbconvert 6.0.8.dev0documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://open.appacademy.io/learn/js-py---sep-2020-online/week-11-sep-2020-online/define-table\"><em><strong>App AcademyOpen</strong></em></a></li>\n<li>[✅] <a href=\"https://my-personal-website-git-master.bgoonz.vercel.app/Public/2-content/file-browser/_0-my-files/index.html\"><em><strong>directory</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/still-monad-rgl7d\"><em><strong>still-monad-rgl7d -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/u/0/project/resource-298820/overview\"><em><strong>web-dev-resource-hub -- Overview -- Firebaseconsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/u/0/project/resource-298820/authentication\"><em><strong>web-dev-resource-hub -- Authentication -- Firebaseconsole</strong></em></a></li>\n<li>[✅] <a href=\"https://divtable.com/table-styler/\"><em><strong>HTML Table Styler ▦ CSS Generator |𝗗𝗜𝗩𝗧𝗔𝗕𝗟𝗘.𝗖𝗢𝗠</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgxwLsJvLnfBKJppFRrtmBKRXpQKg\"><em><strong>Password Reset Request for DashboardPack - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://shields.io/\"><em><strong>Shields.io: Quality metadata badges for open sourceprojects</strong></em></a></li>\n<li>[✅] <a href=\"https://shields.io/category/social\"><em><strong>Shields.io: Quality metadata badges for open sourceprojects</strong></em></a></li>\n<li>[✅] <a href=\"https://octopus.do/uwvlkfasz8o\"><em><strong>Untitled project | Octopus.do</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?client_id=161872134255-dja0e3tb8886s5ecmo3vmna03kmgv1pk.apps.googleusercontent.com&#x26;redirect_uri=https%3A%2F%2Fapp.dynomapper.com%2Fscn-social-auth%2Fhauth%3Fhauth.done%3DGoogle&#x26;response_type=code&#x26;scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&#x26;access_type=offline&#x26;flowName=GeneralOAuthFlow\"><em><strong>Sign in - GoogleAccounts</strong></em></a></li>\n<li>[✅] <a href=\"https://app.creately.com/diagram/start/dashboard\"><em><strong>Creately</strong></em></a></li>\n<li>[✅] <a href=\"https://www.smashingmagazine.com/2009/07/50-new-css-techniques-for-your-next-web-design/\"><em><strong>50 New CSS Techniques For Your Next Web Design --- SmashingMagazine</strong></em></a></li>\n<li>[✅] <a href=\"https://firebase.google.com/docs/auth/where-to-start?authuser=0\"><em><strong>Where do I start with FirebaseAuthentication?</strong></em></a></li>\n<li>[✅] <a href=\"https://firebase.google.com/docs/auth/web/custom-auth?authuser=0\"><em><strong>Authenticate with Firebase in JavaScript Using a Custom AuthenticationSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://kremalicious.com/make-cool-and-clever-text-effects-with-css-text-shadow\"><em><strong>Text-Shadow Exposed: Make cool and clever text effects with csstext-shadow ¦kremalicious</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?sxsrf=ALeKk00GsCpoNdbGMrR03FlrgOrmApOpLw%3A1611975508435&#x26;ei=VMsUYJiPGqfG5gKzpp-QCQ&#x26;q=javascript+you+could+add+to+any+html+page&#x26;oq=javascript+you+could+add+to+any+html+page&#x26;gs_lcp=CgZwc3ktYWIQAzIFCCEQqwIyBQghEKsCMgUIIRCrAjoECAAQRzoECCMQJzoFCAAQkQI6BAgAEEM6CwguELEDEIMBEIsDOg4ILhCxAxDHARCjAhCLAzoICAAQsQMQiwM6FAguELEDEIMBEIsDEKgDEJsDEJoDOgcIABBDEIsDOhQILhCxAxCDARCLAxCoAxCaAxCbAzoHCAAQsQMQQzoLCAAQsQMQgwEQiwM6CggAELEDEEMQiwM6AggAOggIABAWEAoQHjoGCAAQFhAeOggIIRAWEB0QHjoFCCEQoAFQwSRY_39g_oEBaAJwBXgAgAGzA4gBoyuSAQo3LjMwLjMuMC4xmAEAoAEBqgEHZ3dzLXdpesgBCLgBAsABAQ&#x26;sclient=psy-ab&#x26;ved=0ahUKEwiYicTc1MLuAhUno1kKHTPTB5IQ4dUDCA0&#x26;uact=5\"><em><strong>javascript you could add to any html page - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addtoany.com/buttons/\"><em><strong>Share Buttons - AddToAny</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addtoany.com/share#url=https%3A%2F%2Fgoofy-euclid-1cd736.netlify.app%2F\"><em><strong>Share \"https://goofy-euclid-1cd736.netlify.app/\" -AddToAny</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pluralsight.com/guides/how-javascript-implementation-adds-dynamic-interactivity\"><em><strong>How Javascript Implementation Adds Dynamic Interactivity |Pluralsight</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz/edit/master/README.md\"><em><strong>Editing bgoonz/README.md at master ·bgoonz/bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://www.londonacademyofit.co.uk/blog/add-like-button-blogposts-simple-javascript\"><em><strong>Add a 'Like' Button to Your Blogposts Using This Simple JavaScriptTechnique | London Academy ofIT</strong></em></a></li>\n<li>[✅] <a href=\"https://www.londonacademyofit.co.uk/blog/add-like-button-blogposts-simple-javascript#create-firebase\"><em><strong>Add a 'Like' Button to Your Blogposts Using This Simple JavaScriptTechnique | London Academy ofIT</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/londonacademyofit/like-button\"><em><strong>londonacademyofit/like-button</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/complete-guide-table-element/\"><em><strong>A Complete Guide to the Table Element |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://en.gravatar.com/gravatars/new\"><em><strong>Gravatar - Globally RecognizedAvatars</strong></em></a></li>\n<li>[✅] <a href=\"https://qiita.com/Shadowys/items/f7a663a7a8d707a64428\"><em><strong>Setting up local postgresql database server for WSL/Ubuntu -Qiita</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/jonathanbossenger/my-2020-web-development-setup-3a98\"><em><strong>My 2020 web development setup - DEVCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://ostechnix.com/simple-script-setup-development-environment-ubuntu/\"><em><strong>A Simple Script To Setup Development Environment InUbuntu</strong></em></a></li>\n<li>[✅] <a href=\"https://ostechnix.com/install-development-tools-linux/\"><em><strong>How To Install Development Tools In Linux -OSTechNix</strong></em></a></li>\n<li>[✅] <a href=\"https://www.reddit.com/r/webdev/comments/3csye3/useful_shell_scripts_for_web_designweb_dev/\"><em><strong>Useful shell scripts for web design/web dev? :webdev</strong></em></a></li>\n<li>[✅] <a href=\"https://www.commandlinefu.com/commands/browse/sort-by-votes\"><em><strong>All commands sorted byvotes</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz\"><em><strong>bgoonz/bgoonz:https://bgoonz.github.io/</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/90c6ce52022f51123029861cc19b2642\"><em><strong>alternative-wsl-setup.sh ·GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.microsoft.com/en-us/windows/wsl/install-win10#simplified-installation-for-windows-insiders\"><em><strong>Install Windows Subsystem for Linux (WSL) on Windows 10 | MicrosoftDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=app+academy+open&#x26;oq=app+acade&#x26;aqs=chrome.2.0i355i433j46i175i199i433j0j69i57j0l2j69i60j69i65.7633j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>app academy open - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.textfixer.com/tools/remove-duplicate-lines.php\"><em><strong>Remove DuplicateLines</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ryo-ma/github-profile-trophy#specify-the-maximum-row--column-size\"><em><strong>GitHub - ryo-ma/github-profile-trophy: 🏆 Add dynamically generatedGitHub Trophy on yourreadme</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Mottie/GitHub-userscripts\"><em><strong>GitHub - Mottie/GitHub-userscripts: Userscripts to add functionality toGitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://jqueryui.com/tabs/\"><em><strong>Tabs | jQuery UI</strong></em></a></li>\n<li>[✅] <a href=\"https://open.appacademy.io/learn/js-py---sep-2020-online/week-1-sep-2020-online/setup---installations--windows-\"><em><strong>App AcademyOpen</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/microsoft/WSL/issues/5003\"><em><strong>0x80080005 while installing Kali · Issue #5003 · microsoft/WSL ·GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.online-convert.com/8-tips-to-follow-before-erasing-your-computer/\"><em><strong>8 Tips To Follow Before Erasing Your Computer | Online file conversionblog</strong></em></a></li>\n<li>[✅] <a href=\"https://helpdeskgeek.com/how-to/generate-a-list-of-installed-programs-in-windows/#:~:text=To%20access%20this%20menu%2C%20right,visible%20in%20a%20scrollable%20list.\"><em><strong>7 Ways To Generate a List of Installed Programs inWindows</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/microsoft/WSL/issues/634\"><em><strong>Doc Idea: when you need to restart LxssManager service · Issue #634 ·microsoft/WSL · GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz?tab=repositories&#x26;q=web+dev+no&#x26;type=&#x26;language=\"><em><strong>YourRepositories</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/getting-started-with-nodejs#define-a-procfile\"><em><strong>Getting Started on Heroku with Node.js | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/procfile\"><em><strong>The Procfile | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/heroku-local\"><em><strong>Running Apps Locally | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mybrainishuge?tab=repositories\"><em><strong>mybrainishuge (Richard May) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mybrainishuge/data-structures\"><em><strong>mybrainishuge/data-structures</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=recursion+prompt+solutions&#x26;oq=recursion+prompt+solutions&#x26;aqs=chrome..69i57.4974j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>recursion prompt solutions - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://repl.it/@JohnC5/Recursion-Exercises-Solution\"><em><strong>Repl.it - Recursion ExercisesSolution</strong></em></a></li>\n<li>[✅] <a href=\"https://libraries.io/github/JS-Challenges/recursion-prompts\"><em><strong>JS-Challenges/recursion-prompts -Libraries.io</strong></em></a></li>\n<li>[✅] <a href=\"https://libraries.io/github/mybrainishuge/recursion-prompts\"><em><strong>mybrainishuge/recursion-prompts -Libraries.io</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/awuradjoaq/recursion-prompts/blob/master/src/recursion.js\"><em><strong>recursion-prompts/recursion.js at master ·awuradjoaq/recursion-prompts</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/recursion-recursion-recursion-4db8890a674d/\"><em><strong>Recursion, Recursion,Recursion</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=%2F%2F+Solve+the+following+prompts+using+recursion.+%2F%2F+1.+Calculate+the+factorial+of+a+number.&#x26;oq=%2F%2F+Solve+the+following+prompts+using+recursion.+%2F%2F+1.+Calculate+the+factorial+of+a+number.&#x26;aqs=chrome..69i57.871j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>// Solve the following prompts using recursion. // 1. Calculate thefactorial of a number. - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/naughty-forest-yz3lb\"><em><strong>naughty-forest-yz3lb -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/Phongtlam/49ae88262c78f24a9ae640a4fa6f0950\"><em><strong>Recursionprompts</strong></em></a></li>\n<li>[✅] <a href=\"https://marketplace.visualstudio.com/items?itemName=jeremyrajan.vscode-lebab\"><em><strong>ES5 to ES6 - Visual StudioMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?biw=1418&#x26;bih=508&#x26;sxsrf=ALeKk03n1V-UetUtU-HRpOfwIq7zXAo79w%3A1613488858111&#x26;ei=2uIrYO6KBo2-ggemirOwBw&#x26;q=javascript+tools+online&#x26;oq=javascript+tools+online&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyAggAMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeOgcIIxCwAxAnOgcIABBHELADOgQIIxAnOgQIABBDOgUIABCRAjoLCAAQsQMQgwEQiwM6BwgAEEMQiwM6FwguELEDEIMBEMcBEKMCEIsDEKgDEKcDOhEILhCxAxCLAxCoAxCaAxCbAzoHCAAQsQMQQzoICAAQsQMQgwE6CAgAELEDEIsDOgUIABCxAzoHCAAQhwIQFFDQQ1jSYmCnZGgDcAJ4AIABcIgB6w2SAQQyMi4ymAEAoAEBqgEHZ3dzLXdpesgBCbgBAsABAQ&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwju3_Gx2u7uAhUNn-AKHSbFDHY4ChDh1QMIDQ&#x26;uact=5\"><em><strong>javascript tools online - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jetbrains.com/webstorm/promo/?gclid=Cj0KCQiA962BBhCzARIsAIpWEL0F2cHpYpG4KR-9Thg_M4j03DrfcYGBoGyTzi1BRBgcyNcMIN2BrxwaAoU2EALw_wcB&#x26;gclsrc=aw.ds\"><em><strong>WebStorm: The Smartest JavaScript IDE byJetBrains</strong></em></a></li>\n<li>[✅] <a href=\"https://playcode.io/online-javascript-editor\"><em><strong>Online JavaScript Editor</strong></em></a></li>\n<li>[✅] <a href=\"https://html-css-js.com/js/editor/\"><em><strong>JavaScript Editor and Cleaner - 𝗧𝗛𝗘 𝗕𝗘𝗦𝗧 𝗢𝗡𝗟𝗜𝗡𝗘 𝗝𝗦 𝗖𝗢𝗗𝗘𝗖𝗢𝗠𝗣𝗢𝗭𝗘𝗥</strong></em></a></li>\n<li>[✅] <a href=\"https://www.thesslstore.com/blog/fix-err-ssl-protocol-error/\"><em>**How to Fix ERR</em>SSL<em>PROTOCOL</em>ERROR on GoogleChrome**_</a></li>\n<li>[✅] <a href=\"https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#VpcDetails:VpcId=vpc-1b832d66\"><em><strong>VPC ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=medium+cloud+9&#x26;oq=medium+cloud+9&#x26;aqs=chrome..69i57j0i22i30j0i390l3j69i64.3313j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>medium cloud 9 - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/2/?pli=1#inbox\"><em><strong>Inbox (5,496) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://nickguner.atlassian.net/wiki/spaces/~604603067/pages/edit-v2/1230831647?draftShareId=aab7f214-c06c-4d15-9da0-1c4a787eacbf\"><em><strong>Add Page - Bryan C Guner -Confluence</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/1/#inbox/FMfcgxwLsdBkXjlkphdCmgtphjBqLVKk\"><em><strong>Your payment has been received - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/2/#inbox/FMfcgxwLsdCrnsdzZxfxSHgDfNdkLlKm\"><em><strong>Slack account sign in from a new device - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://app.slack.com/client/TD2587M3Q/CD0Q6GWTU\"><em><strong>Slack | * general | App AcademyMentor</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgxwLsdCrLhlbPwQlPLjgWSKxjxNv\"><em><strong>Amazon password assistance - gunerb1@tcnj.edu - The College of NewJerseyMail</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/goofy-euclid-1cd736/forms/60054121ce48a10008936ce7#\"><em><strong>Submissions from contact |goofy-euclid-1cd736</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.heroku.com/apps/node-react-ecommerce42/resources\"><em><strong>node-react-ecommerce42 · Resources |Heroku</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?id=root&#x26;cid=D21009FDD967A241\"><em><strong>OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://devcenter.heroku.com/articles/heroku-postgresql#local-setup\"><em><strong>Heroku Postgres | Heroku DevCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/7695962/postgresql-password-authentication-failed-for-user-postgres\"><em><strong>ubuntu - Postgresql: password authentication failed for user\"postgres\" - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://ostechnix.com/collection-useful-bash-scripts-heavy-commandline-users/\"><em><strong>Bash-Snippets - Useful BASH Scripts For Heavy CommandlineUsers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.liquidweb.com/kb/little-known-ways-to-utilize-github-gists/\"><em><strong>Little Known Ways To Utilize GitHub Gists | LiquidWeb</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/downloading-gists-from-github-made-simple/\"><em><strong>Downloading gists from Github made simple -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://asciinema.org/explore\"><em><strong>Featured asciicasts - asciinema</strong></em></a></li>\n<li>[✅] <a href=\"https://www.quora.com/Whats-your-coolest-Javascript-code-in-3-lines-or-less\"><em><strong>(2) What's your coolest Javascript code in 3 lines or less? -Quora</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/dailyjs/whats-the-difference-between-event-handlers-addeventlistener-in-js-963431f05c34\"><em><strong>The difference between Event Handlers &#x26; addEventListener | by TwanMulder |DailyJS</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/dailyjs/10-javascript-oneliners-you-have-got-to-add-your-arsenal-as-a-developer-b733cbb973b2#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkYjQwZTJmOTM1M2M1OGFkZDY0OGI2MzYzNGU1YmJmNjNlNGY1MDIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJuYmYiOjE2MTM5NDExMTQsImF1ZCI6IjIxNjI5NjAzNTgzNC1rMWs2cWUwNjBzMnRwMmEyamFtNGxqZGNtczAwc3R0Zy5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjExNjM4ODYwNDIxMDY4NTMxMjk4MiIsImhkIjoidGNuai5lZHUiLCJlbWFpbCI6Imd1bmVyYjFAdGNuai5lZHUiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXpwIjoiMjE2Mjk2MDM1ODM0LWsxazZxZTA2MHMydHAyYTJqYW00bGpkY21zMDBzdHRnLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwibmFtZSI6IkJyeWFuIEd1bmVyIiwicGljdHVyZSI6Imh0dHBzOi8vbGg1Lmdvb2dsZXVzZXJjb250ZW50LmNvbS8tbDE5eUxyNFY5SEEvQUFBQUFBQUFBQUkvQUFBQUFBQUFBQUEvQU1adXVjbXF5dHlKdDZKM2MzQlFpbGFlYmZneEhqSmZ2Zy9zOTYtYy9waG90by5qcGciLCJnaXZlbl9uYW1lIjoiQnJ5YW4iLCJmYW1pbHlfbmFtZSI6Ikd1bmVyIiwiaWF0IjoxNjEzOTQxNDE0LCJleHAiOjE2MTM5NDUwMTQsImp0aSI6IjRiYzRiNjAzZjVmY2E0MWY1NWI5MzhlODRiNjg2MDc5MTdkOWY1NDEifQ.hn-tkRj6MI7IzqeprnQNf9Wimaaqh208vBfRjoYFVARB5T4DcVK8L-N0VPtzur62oYmgSCLz_h-tNC3o1txYBRx55ViP7r4XhbehpUgAEO2OKjn8rVb9prqkAslA1MRJSRMWrMDleYGDFTq9B3FMka0SEfvrGjm6fqKN9YhRNVvQGfQp122evX4ZSC6l1Na7QixV5FrhmAGBCE2pARtOcAVxsIMGtTAg30uWdhbm_Yc9JYwtQG7OfovWsZE4p3Bl81KBEJJIKIflEWWwh_llQPml1-djGJ1muPpHPshUSskWVar3cYj2NPLho7aNJY7bhHbApjpY3me9tQvG-a2EZg\"><em><strong>10 JavaScript One-liners You Have Got to Add Your Arsenal as aDeveloper | by Twan Mulder | DailyJS |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?response_type=code&#x26;redirect_uri=https%3A%2F%2Fapp.taggbox.com%2Fwidget%2Faccounts%2FgGet%3FredirectTo%3Dfreetrial&#x26;client_id=432538686198-v1fdp138s18udc19jcekplaojbh7cinn.apps.googleusercontent.com&#x26;scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&#x26;access_type=online&#x26;approval_prompt=auto&#x26;flowName=GeneralOAuthFlow\"><em><strong>Sign in - GoogleAccounts</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/435f42a8617fbb854418d84a097073c8#design\"><em><strong>markdownbadges.md</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/TexTools\"><em><strong>bgoonz/TexTools</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/mihirishere\"><em><strong>Samuel messaged you</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Mihir_Beg_Final\"><em>**bgoonz/Mihir</em>Beg<em>Final**</em></a></li>\n<li>[✅] <a href=\"https://bandzoogle.com/blog/16-website-templates-for-musicians-and-bands\"><em><strong>16 website templates for musicians and bands | BandzoogleBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://idlewaveband.com/home\"><em><strong>Idle Wave</strong></em></a></li>\n<li>[✅] <a href=\"https://bandzoogle.com/files/3895/bzblog-16-templates-for-musicians-and-bands-echo.jpg\"><em><strong>bzblog-16-templates-for-musicians-and-bands-echo.jpg(1280×830)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/mihirbeg/?hl=en\"><em><strong>Mihir Beg (@mihirbeg) • Instagram photos andvideos</strong></em></a></li>\n<li>[✅] <a href=\"https://distrokid.com/hyperfollow/mihirbeg/getting-there\"><em><strong>Getting There by Mihir Beg -DistroKid</strong></em></a></li>\n<li>[✅] <a href=\"https://musiclab.chromeexperiments.com/Spectrogram/\"><em><strong>Chrome Music Lab -Spectrogram</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/file-system\"><em><strong>file-system - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=text+manipulation+with+javascript+github&#x26;safe=active&#x26;sxsrf=ALeKk03FhyWWVCld88gaUvpSmeI9z5Qz2g%3A1616653701039&#x26;ei=hS1cYLvqAduqtQbLkIrYBA&#x26;oq=text+manipulation+with+javascript+github&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyCAghEBYQHRAeOgcIABBHELADOgYIABAWEB5QqidYwy9g6DBoAXACeACAAa4DiAHpCpIBCTAuNS4xLjAuMZgBAKABAaoBB2d3cy13aXrIAQjAAQE&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwj7wMys6MrvAhVbVc0KHUuIAksQ4dUDCA0&#x26;uact=5\"><em><strong>text manipulation with javascript github - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/chibrander/jStringy-JavaScript-Library-for-Text-Manipulation\"><em><strong>chibrander/jStringy-JavaScript-Library-for-Text-Manipulation: Libraryfor commonly used textfunctions.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/toorhamza/JavaScript-Text-Manipulation-Tools\"><em><strong>toorhamza/JavaScript-Text-Manipulation-Tools: These are textmanipulation tools like duplicates remover, data text line sorter, findand replace, whitespace remover and more. It was created using HTML, CSSandJavascript</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mcchatman8009/text-manipulation\"><em><strong>mcchatman8009/text-manipulation: A NPM library that assists in textrange manipulation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Ileriayo/markdown-badges\"><em><strong>Ileriayo/markdown-badges: Badges for your Profile andProjects.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_badges&#x26;stacked=h\"><em><strong>Tryit Editorv3.6</strong></em></a></li>\n<li>[✅] <a href=\"https://www.hostinger.com/tutorials/best-html-web-fonts\"><em><strong>The 20 Best HTML Web Fonts To Use In 2021 -- HostingerTutorials</strong></em></a></li>\n<li>[✅] <a href=\"https://answers.netlify.com/t/status-badge-for-branch-deploys/4094\"><em><strong>Status badge for branch deploys - Features - Netlify SupportForums</strong></em></a></li>\n<li>[✅] <a href=\"https://jquery.com/\"><em><strong>jQuery</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/colors/colors_hex.asp\"><em><strong>HTML Color Values</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bootstrap-sidebar-template/edit/master/README.md\"><em><strong>Editing bootstrap-sidebar-template/README.md at master ·bgoonz/bootstrap-sidebar-template</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bootstrap-sidebar-template\"><em><strong>bgoonz/bootstrap-sidebar-template: Feel free to use this template forwhatever youwant.</strong></em></a></li>\n<li>[✅] <a href=\"https://assets.startbootstrap.com/img/screenshots/templates/simple-sidebar.png\"><em><strong>simple-sidebar.png(1500×1000)</strong></em></a></li>\n<li>[✅] <a href=\"https://imgur.com/a/Cnv8XAU\"><em><strong>Imgur: The magic of the Internet</strong></em></a></li>\n<li>[✅] <a href=\"https://markdotto.com/2018/11/05/css-dark-mode/\"><em><strong>CSS dark mode |@mdo</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=make+image+with+embeded+link&#x26;oq=make+image+with+embeded+link&#x26;aqs=chrome..69i57j33i10i22i29i30l3.5399j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>make image with embeded link - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/node-api1-guided\"><em><strong>bgoonz/node-api1-guided: Guided Project for Node API 1Module</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LambdaSchool/node-api1-guided/tree/lecture\"><em><strong>LambdaSchool/node-api1-guided atlecture</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1305/pages/objective-1-explain-what-node-dot-js-is-and-its-core-features?module_item_id=601927\"><em><strong>Objective 1 - explain what Node.js is and its core features: WEB43 -4.1 - Building RESTful APIs withExpress</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LambdaSchool/node-api1-guided/blob/lecture/index.js\"><em><strong>node-api1-guided/index.js at lecture ·LambdaSchool/node-api1-guided</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/dashboard\"><em><strong>Stackbit App</strong></em></a></li>\n<li>[✅] <a href=\"https://www.digitalocean.com/community/tutorials/js-json-parse-stringify\"><em><strong>How To Use JSON.parse() and JSON.stringify() |DigitalOcean</strong></em></a></li>\n<li>[✅] <a href=\"https://learning.postman.com/docs/sending-requests/visualizer/\"><em><strong>Visualizing responses | Postman LearningCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=http+404&#x26;oq=http+404&#x26;aqs=chrome..69i57j0l9.8711j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>http 404 - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/33879896/how-to-execute-the-start-script-with-nodemon#:~:text=Just%20executing%20command%20nodemon%20index,trigger%20the%20server%20to%20run.\"><em><strong>node.js - How to execute the start script with Nodemon - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gitpod.io/features\"><em><strong>Features</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/gitpod-io/gitpod\"><em><strong>gitpod-io/gitpod: Gitpod automates the provisioning of ready-to-codedevelopment environments.</strong></em></a></li>\n<li>[✅] <a href=\"https://app.sli.do/event/a2se8hhw/live/questions\"><em><strong>Git for WebDevelopment</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1055/pages/unit-1\"><em><strong>Unit 1 : FT LLP04/2021</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/lambda-week1/~/settings/teams\"><em><strong>| bgoonz | GistLog - Your dev blog delivered -lambda-week1</strong></em></a></li>\n<li>[✅] <a href=\"https://devurls.com/\"><em><strong>DevURLs -- World's simplest developer newsaggregator</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/lambda-prep/blob/master/index.html\"><em><strong>lambda-prep/index.html at master ·bgoonz/lambda-prep</strong></em></a></li>\n<li>[✅] <a href=\"https://lambda-prep.netlify.app/\"><em><strong>Document</strong></em></a></li>\n<li>[✅] <a href=\"https://liveweave.com/\"><em><strong>HTML, CSS and JavaScript demo - Liveweave</strong></em></a></li>\n<li>[✅] <a href=\"https://liveweave.com/designer/index.html\"><em><strong>Vector Editor - Liveweave</strong></em></a></li>\n<li>[✅] <a href=\"https://liveweave.com/colors/index.html\"><em><strong>Color Explorer - Liveweave</strong></em></a></li>\n<li>[✅] <a href=\"https://azure.microsoft.com/en-us/free/ai/search/?OCID=AID2100130_OLA_25595769_298647862_148299093&#x26;dclid=CjgKEAjwjbCDBhD0r5CX-vLv8XQSJACeRGIen_O4WIBGf_SqYZKVwT06vOYWCQVIIzHMhajieS6vXvD_BwE\"><em><strong>Try AI Services with an Azure Free Account | MicrosoftAzure</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/WEB-DEV-TOOLS-HUB\"><em><strong>bgoonz/WEB-DEV-TOOLS-HUB: A website that aims to consolidate all of theonline tools I use while building webapps!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Exploring-Promises/blob/master/AUXnotes.md\"><em><strong>Exploring-Promises/AUXnotes.md at master ·bgoonz/Exploring-Promises</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sindresorhus?after=Y3Vyc29yOnYyOpK5MjAyMS0wNC0wNVQwNDoyMDo1OC0wNDowMM4EZA-L&#x26;tab=repositories\"><em><strong>sindresorhus (Sindre Sorhus) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground/blob/master/index.html\"><em><strong>embedable-repl-and-integrated-code-space-playground/index.html atmaster ·bgoonz/embedable-repl-and-integrated-code-space-playground</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/lambda-w-1-notes/deploys\"><em><strong>Deploys |lambda-w-1-notes</strong></em></a></li>\n<li>[✅] <a href=\"https://master--links4242.netlify.app/\"><em><strong>My Links</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/substack\"><em><strong>substack (James Halliday)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/substack/node-mkdirp\"><em><strong>substack/node-mkdirp: Recursively mkdir, like `mkdir -p`, but innode.js</strong></em></a></li>\n<li>[✅] <a href=\"https://speckyboy.com/css-javascript-text-animation-snippets/\"><em><strong>10 Amazing Animated Text CSS &#x26; JavaScript CodeSnippets</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/bgoonz/pen/ExZvGoZ\"><em><strong>Simple Typing Carousel</strong></em></a></li>\n<li>[✅] <a href=\"https://www.browserling.com/tools/html-to-markdown\"><em><strong>HTML to Markdown Converter - Markdown Editor - Online - Browserling WebDeveloper Tools</strong></em></a></li>\n<li>[✅] <a href=\"https://stackblitz.com/edit/js-cpyeyo\"><em><strong>js-cpyeyo - StackBlitz</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.stackblitz.com/docs/platform/embedding\"><em><strong>Embedding | StackBlitzDeveloper</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn?order=votes\"><em><strong>Feed - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn\"><em><strong>Feed - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/templates/SaveCloud/130525\"><em><strong>SaveCloud - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/SaveCloud#script.js\"><em><strong>SaveCloud - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/talk/learn/Learn-To-Code-In-Python/7484\"><em><strong>Learn To Code In Python -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://levelup.gitconnected.com/basic-web-development-environment-setup-9f36c3f15afe\"><em><strong>Basic Web Development Environment Setup | by Bryan Guner | Level UpCoding</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/8a831acc3def/edit\"><em><strong>New story -- Medium</strong></em></a></li>\n<li>[✅] <a href=\"http://linuxcommand.org/lc3_man_page_index.php#other\"><em><strong>CommandDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/public?direction=asc&#x26;page=3&#x26;sort=created\"><em><strong>bgoonz'sgists</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-bookmarks.netlify.app/web-dev/\"><em><strong>Web Development Bookmarks |Bgoonz-Bookmarks</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/9e488be7fc5c0a5a9d146e5005c7a511\"><em><strong>github-cheatsheet.md</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-bookmarks/deploys/614bc384180eab96a0925429\"><em><strong>Deploy details |Deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-bookmarks/deploys\"><em><strong>Deploys for bgoonz-bookmarks |Deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/c23234a9a172ed7f3888c892f64b5d59\"><em><strong>npm-cli-commands.md</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/tools/showcase\"><em><strong>Showcase -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://trends.builtwith.com/analytics\"><em><strong>Analytics technologies Web UsageDistribution</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/pen/\"><em><strong>A Pen by Bryan C Guner</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/d712237764ecb5439a6b717248a77ecf\"><em><strong>Jquery-basics.md</strong></em></a></li>\n<li>[✅] <a href=\"https://www.wikihow.com/Uninstall-Ubuntu-Software\"><em><strong>3 Ways to Uninstall Ubuntu Software -wikiHow</strong></em></a></li>\n<li>[✅] <a href=\"https://code.visualstudio.com/updates/v1_60\"><em><strong>Visual Studio Code August2021</strong></em></a></li>\n<li>[✅] <a href=\"https://deepdecide.com/uninstall-visual-studio-code/\"><em><strong>How to uninstall Visual Studio Code completely in Windows10</strong></em></a></li>\n<li>[✅] <a href=\"https://code.visualstudio.com/docs/?dv=win\"><em><strong>Documentation for Visual StudioCode</strong></em></a></li>\n<li>[✅] <a href=\"https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch\"><em><strong>Troubleshoot Visual Studio Code Integrated Terminal launchfailures</strong></em></a></li>\n<li>[✅] <a href=\"http://127.0.0.1:5500/public/cli-commands/npm-install/\"><em><strong>127.0.0.1:5500/public/cli-commands/npm-install/</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/be1ed7fe446d51eddd145c8f4b83058a\"><em><strong>configuring-npm.md</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/878c7de75ca116ec76dbfcc63f2611f0\"><em><strong>scroll-percentage</strong></em></a></li>\n<li>[✅] <a href=\"https://contribute.jquery.org/web-sites/\"><em><strong>Contributing to jQuery Foundation Web Sites | Contribute tojQuery</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/jquery.com\"><em><strong>Web-Dev-Collaborative/jquery.com: jQuery web sitecontent</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/api.jquery.com\"><em><strong>Web-Dev-Collaborative/api.jquery.com: API documentation for jQueryCore</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/learn.jquery.com/tree/main/page\"><em><strong>learn.jquery.com/page at main ·Web-Dev-Collaborative/learn.jquery.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/jquery.org\"><em><strong>Web-Dev-Collaborative/jquery.org: jQuery Foundation web sitecontent</strong></em></a></li>\n<li>[✅] <a href=\"https://purple-bonobo-9w4bebsq.ws-us17.gitpod.io/\"><em><strong>donate.html - jquery.org - GitpodCode</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialrepublic.com/jquery-tutorial/jquery-get-started.php\"><em><strong>Beginning Web Development with jQuery - TutorialRepublic</strong></em></a></li>\n<li>[✅] <a href=\"https://doc.minirpa.net/en/Basics/work.html\"><em><strong>How does NDS work? · NoCoding Data Scraper | easy web scraper |scraping data to Excel from website freely-miniRPA</strong></em></a></li>\n<li>[✅] <a href=\"https://www.tutorialrepublic.com/codelab.php?topic=jquery&#x26;file=including-jquery-in-html-page\"><em><strong>Live Demo: My First jQueryApplication</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/9fd6bf819d081956cef289cce07ee1d7\"><em><strong>table-jq.md</strong></em></a></li>\n<li>[✅] <a href=\"https://checkwebsitetools.com/report/bgoonz-blog.netlify.app/code\"><em><strong>Source Code: bgoonz-blog.netlify.app -CheckWebsiteTools.com</strong></em></a></li>\n<li>[✅] <a href=\"https://techcommunity.microsoft.com/t5/office-365/how-to-disable-new-save-dialog/m-p/745951\"><em><strong>How to disable New save dialog - Microsoft TechCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://bryanguner.medium.com/\"><em><strong>Bryan Guner -- Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/e6d226a0e1da/edit\"><em><strong>Editing Intro To JQuery --Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326/#/docs/docs/no-whiteboarding\"><em><strong>bgoonz - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki\"><em>**Home · bgoonz/BGOONZ</em>BLOG<em>2.0Wiki**</em></a></li>\n<li>[✅] <a href=\"https://bryanguner.medium.com/basic-javascript-529617f35a1c\"><em><strong>Basic JavaScript. Lesson then practice set... | by Bryan Guner | Sep,2021 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://startbootstrap.com/bootstrap-resources#bootstrap-plugins\"><em><strong>Bootstrap Resources &#x26; Plugins List - StartBootstrap</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/docs/docs\"><em><strong>Docs -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/search?q=python+scripts\"><em><strong>Search · python scripts</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/support/\"><em><strong>Developer Support - Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://business.facebook.com/settings/news-pages/276496247449736?business_id=1199802970410986\"><em><strong>(2) BusinessSettings</strong></em></a></li>\n<li>[✅] <a href=\"https://business.facebook.com/creatorstudio/published?content_table=POSTED_POSTS&#x26;post_type=ALL\"><em><strong>CreatorStudio</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/direct/inbox/\"><em><strong>(1) Inbox • Chats</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/data-transfer-project/blob/master/Documentation/Integration.md\"><em><strong>data-transfer-project/Integration.md at master ·Web-Dev-Collaborative/data-transfer-project</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz\"><em><strong>bgoonz's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/blog/?filters%5B0%5D=platforms&#x26;filters%5B1%5D=programs&#x26;filters%5B2%5D=social_integrations&#x26;filters%5B3%5D=publishing&#x26;filters%5B4%5D=2021\"><em><strong>Facebook Platform Blog Articles | Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/facebook-login/web/login-button\"><em><strong>Login Button - FacebookLogin</strong></em></a></li>\n<li>[✅] <a href=\"https://open.appacademy.io/learn/full-stack-online/graphql-curriculum/introduction\"><em><strong>App AcademyOpen</strong></em></a></li>\n<li>[✅] <a href=\"https://app.termly.io/dashboard/website/1076319/terms-of-service\"><em><strong>Termly</strong></em></a></li>\n<li>[✅] <a href=\"https://app.termly.io/dashboard/website/93ea6991-3841-497c-b2c7-f9aa46bc9145/privacy-policy\"><em><strong>Termly</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/?authuser=3#/p281933678/assetlibrary/hub?params=_u..nav%3Dmaui%26_u..comparisons%3D%5B%7B%22name%22:%22All%20Users%22,%22filters%22:%5B%7B%22isCaseSensitive%22:true,%22expression%22:%220%22,%22fieldName%22:%22audience%22%7D%5D%7D,%7B%22name%22:%22Age%20includes%2018-24%22,%22filters%22:%5B%7B%22fieldName%22:%22age%22,%22expressionList%22:%5B%2218-24%22%5D,%22isCaseSensitive%22:true%7D%5D%7D%5D&#x26;collectionId=life-cycle\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/understanding-path/\"><em><strong>Understanding PATH |webdevhub</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326/#/docs/articles/understanding-firebase\"><em><strong>bgoonz - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-bookmarks.netlify.app/\"><em><strong>Stackbit Book Theme</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/~/drafts/-MkJ7XsduZ186qL-aeAW/job-search/job-search\"><em><strong>Job Search -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/settings/deploys\"><em><strong>Build &#x26; deploy | Sitesettings</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/info/sessionexpired?service=mail&#x26;passive=true&#x26;rm=false&#x26;continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&#x26;ss=1&#x26;scc=1&#x26;ltmpl=default&#x26;ltmplcache=2&#x26;emr=1&#x26;osid=1&#x26;flowName=GlifWebSignIn&#x26;flowEntry=ServiceLogin&#x26;cid=1&#x26;navigationDirection=forward&#x26;TL=AM3QAYac5X55XUfJ1p6ILzZUuV1O1TdQHeXsaEIyMR4lNfKakzFBgSF-6br5ouqD\"><em><strong>Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/RealHacker/leetcode-solutions\"><em><strong>RealHacker/leetcode-solutions: My solutions for all (~350) leetcodeproblems, includingpremium.</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/settings/developer/indie-verification/\"><em><strong>Developer Settings - Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/help/1701730696756992/?helpref=hc_fnav\"><em><strong>Accessing &#x26; Downloading Your Information | Facebook HelpCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/tools/explorer/951130702132399/?session_id=371757718023204\"><em><strong>Graph API Explorer - Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://business.facebook.com/creatorstudio/pre_published?content_table=SCHEDULED_POSTS&#x26;post_type=ALL\"><em><strong>CreatorStudio</strong></em></a></li>\n<li>[✅] <a href=\"https://business.facebook.com/Webdevresourcehub-blog-103884128414320/publishing_tools/?section=INSTANT_ARTICLES\"><em><strong>Webdevresourcehub-blog |Facebook</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/p/CQXdtMrhI5Y/\"><em><strong>Bryan Guner Music on Instagram: \"I know I've already posted thisvideo... but I just think this filter is socool\"</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/bgoonz/?fbclid=IwAR3b0JQYBxEYFQNqQJsTMwQreI3X6WD4qK4yQfuFtvKGqkT6BA1dFdP2aFI\"><em><strong>Bryan Guner Music (@bgoonz) • Instagram photos andvideos</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/musicians_network_features/?fbclid=IwAR09ePn6TFs-CGALxxj-BwpX7jIQCZpB8fmu2VMOYl4MAlEcZzySlp3gQzc\"><em>**Bgoon (@musicians</em>network<em>features) • Instagram photos andvideos**</em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@py-v2/s/datastructures-in-pytho/abstract-data-structures/untitled-7\"><em><strong>Data Structures Overview -datastructures-in-python</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/graphql/graphql-spec\"><em><strong>graphql/graphql-spec: GraphQL is a query language and execution enginetied to any backend service.</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/blog/?filters%5B0%5D=platforms&#x26;filters%5B1%5D=programs&#x26;filters%5B2%5D=publishing&#x26;filters%5B3%5D=social_integrations&#x26;filters%5B4%5D=2021\"><em><strong>News for Developers | FacebookDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/instagram-api/guides/content-publishing/\"><em><strong>Content Publishing - InstagramPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/apps/951130702132399/settings/basic/\"><em><strong>webdevhub - Settings - Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/instagram-api/guides/content-publishing/#publish-photos\"><em><strong>Content Publishing - InstagramPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/apps/951130702132399/fb-login/quickstart/\"><em><strong>webdevhub - Facebook Login - Facebook forDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/facebook-login/web/enabling-https\"><em><strong>Enabling HTTPS - FacebookLogin</strong></em></a></li>\n<li>[✅] <a href=\"https://dash.cloudflare.com/82a66abbd1e4b72a1fb0e4d0cfccabee/add-site\"><em><strong>Account | Cloudflare - Web Performance &#x26;Security</strong></em></a></li>\n<li>[✅] <a href=\"https://www.cloudflare.com/apps/developer/app-creator\"><em><strong>Create app - CloudflareApps</strong></em></a></li>\n<li>[✅] <a href=\"https://support.cloudflare.com/hc/en-us/articles/360000841472\"><em><strong>Adding Multiple Sites to Cloudflare via Automation -- Cloudflare HelpCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://dash.cloudflare.com/82a66abbd1e4b72a1fb0e4d0cfccabee/domains/transfer\"><em><strong>Domains | Account | Cloudflare - Web Performance &#x26;Security</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/facebook-login/web\"><em><strong>Web - FacebookLogin</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/docs/development/create-an-app\"><em><strong>Create an App - AppDevelopment</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/ds-web-dev-hub#main.sh\"><em><strong>ds-web-dev-hub -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=javascript+gif&#x26;sxsrf=AOaemvKwuSQmhtZLDa5sp_1pgN88RzLcGA:1632419807226&#x26;source=lnms&#x26;tbm=isch&#x26;sa=X&#x26;ved=2ahUKEwir8e7V1ZXzAhXjGFkFHY1KCicQ_AUoAXoECAEQAw&#x26;biw=2135&#x26;bih=978&#x26;dpr=0.9#imgrc=Uf5EDiFKJ8gScM\"><em><strong>javascript gif - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/?authuser=3#/p281933678/assetlibrary/dashboard/edit?params=_u..nav%3Dmaui%26_u..comparisons%3D%5B%7B%22name%22:%22All%20Users%22,%22filters%22:%5B%7B%22isCaseSensitive%22:true,%22expression%22:%220%22,%22fieldName%22:%22audience%22%7D%5D%7D,%7B%22name%22:%22Age%20includes%2018-24%22,%22filters%22:%5B%7B%22fieldName%22:%22age%22,%22expressionList%22:%5B%2218-24%22%5D,%22isCaseSensitive%22:true%7D%5D%7D%5D&#x26;r=lifecycle-monetization-overview&#x26;ruid=lifecycle-monetization-overview,life-cycle,monetization&#x26;collectionId=life-cycle\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://optimize.google.com/optimize/home/?authuser=3&#x26;utm_campaign=SuiteHeader&#x26;utm_source=UniversalPicker&#x26;utm_medium=getStarted#/accounts/4704484608/containers/14799372/experiments/6\"><em><strong>my-experience | Details -Optimize</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/tools/\"><em><strong>Tools</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326\"><em><strong>bgoonz - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60f8533bf1f40500bfa10af4\"><em><strong>Bgoonz-Bookmarks - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://otcatchup.util.repl.co/\"><em><strong>OT Catchup (Replit)</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/Timer-Software#main.py\"><em><strong>Timer Software -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=What+we+want+you+to+do+Back+to+keeping+everyone+in+a+multiplayer+repl+in+sync.+In+the+real+world%2C+we+don%27t+always+work+at+the+same+time.+Sometimes+people+leave+then+rejoin+later%2C+or+lose+their+internet+connection+and+come+back+online.+When+people+rejoin%2C+we+need+their+client+to+%22catch+up%22+to+the+current+state+of+the+repl+so+everyone+has+the+same+code+in+front+of+them!+So+when+we+catch+up%2C+we+need+to+validate+that+a+sequence+of+operational+transformations+will+actually+produce+the+most+recent+version+of+your+code.+It+would+be+pretty+terrible+if+I+edited+your+file+while+you%27re+gone%2C+then+you+somehow+end+up+with+the+wrong+file+contents+when+you+rejoin+later+%F0%9F%98%A2+For+this+challenge%2C+you%27re+going+to+write+the+OT+validation+function.+The+function+will+take+in+a+string+for+the+stale+file+contents%2C+a+string+containing+the+latest+file+contents%2C+and+a+JSON+string+containing+the+operations.&#x26;oq=What+we+want+you+to+do+Back+to+keeping+everyone+in+a+multiplayer+repl+in+sync.+In+the+real+world%2C+we+don%27t+always+work+at+the+same+time.+Sometimes+people+leave+then+rejoin+later%2C+or+lose+their+internet+connection+and+come+back+online.+When+people+rejoin%2C+we+need+their+client+to+%22catch+up%22+to+the+current+state+of+the+repl+so+everyone+has+the+same+code+in+front+of+them!+So+when+we+catch+up%2C+we+need+to+validate+that+a+sequence+of+operational+transformations+will+actually+produce+the+most+recent+version+of+your+code.+It+would+be+pretty+terrible+if+I+edited+your+file+while+you%27re+gone%2C+then+you+somehow+end+up+with+the+wrong+file+contents+when+you+rejoin+later+%F0%9F%98%A2+For+this+challenge%2C+you%27re+going+to+write+the+OT+validation+function.+The+function+will+take+in+a+string+for+the+stale+file+contents%2C+a+string+containing+the+latest+file+contents%2C+and+a+JSON+string+containing+the+operations.&#x26;aqs=chrome..69i57.1341j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>What we want you to do Back to keeping everyone in a multiplayer replin sync. In the real world, we don't always work at the same time.Sometimes people leave then rejoin later, or lose their internetconnection and come back online. When people rejoin, we need theirclient to \"catch up\" to the current state of the repl so everyone hasthe same code in front of them! So when we catch up, we need to validatethat a sequence of operational transformations will actually produce themost recent version of your code. It would be pretty terrible if Iedited your file while you're gone, then you somehow end up with thewrong file contents when you rejoin later 😢 For this challenge, you'regoing to write the OT validation function. The function will take in astring for the stale file contents, a string containing the latest filecontents, and a JSON string containing the operations. - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/monitoring/services?project=webdev-8afd6\"><em><strong>Services Overview -- Monitoring -- webdev -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/navigation-error;errorUrl=%2Fapis%2Fapi%2Ffirebasedatabase.googleapis.com%2Foverview%3Fproject%3Dwebdev-8afd6&#x26;pli%3D1/permissions?project=webdev-8afd6\"><em><strong>Permissions error -- APIs &#x26; Services -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/discovery\"><em><strong>Google API Discovery Service | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/google-developers/introduction-to-motionlayout-part-iii-47cd64d51a5\"><em><strong>Introduction to MotionLayout (part III) | by Nicolas Roard | GoogleDevelopers |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://firebase.google.com/docs/storage/\"><em><strong>Cloud Storage for Firebase</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/project/bgoonzblog20/overview\"><em><strong>bgoonzblog20 -- Overview -- Firebaseconsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/u/0/project/bgoonzblog20/overview\"><em><strong>bgoonzblog20 -- Overview -- Firebaseconsole</strong></em></a></li>\n<li>[✅] <a href=\"https://firebase.google.com/docs/firestore/security/get-started\"><em><strong>Get started with Cloud Firestore SecurityRules</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/quickstart-nodejs\"><em><strong>Web-Dev-Collaborative/quickstart-nodejs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/quickstart-unity\"><em><strong>Web-Dev-Collaborative/quickstart-unity: Firebase Quickstart Samples forUnity</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Archive-42/quickstart-js\"><em><strong>Archive-42/quickstart-js: Firebase Quickstart Samples forWeb</strong></em></a></li>\n<li>[✅] <a href=\"https://firebase.google.com/docs/web/setup?authuser=0\"><em><strong>Add Firebase to your JavaScriptproject</strong></em></a></li>\n<li>[✅] <a href=\"https://firebase.google.com/docs/projects/learn-more?authuser=0\"><em><strong>Understand Firebaseprojects</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codewithrepl.it/static/code-with-replit.pdf\"><em><strong>Programming walkthroughs: Coding with Python andRepl.it</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/my-gists/blob/master/by-extension/markdown/Interview-Questions-Solved.md\"><em><strong>my-gists/Interview-Questions-Solved.md at master ·bgoonz/my-gists</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/my-gists/blob/master/by-extension/markdown/companies-with-fair-interviews.md\"><em><strong>my-gists/companies-with-fair-interviews.md at master ·bgoonz/my-gists</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/DS-ALGO-OFFICIAL/blob/23a50355ac38aae7c50f7f99ae5c7613a3a98960/index.html\"><em><strong>DS-ALGO-OFFICIAL/index.html at 23a50355ac38aae7c50f7f99ae5c7613a3a98960·bgoonz/DS-ALGO-OFFICIAL</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/GIT-CDN-FILES/blob/master/README.md\"><em><strong>GIT-CDN-FILES/README.md at master ·bgoonz/GIT-CDN-FILES</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-list-of-embedable-content/blob/master/index.html\"><em><strong>random-list-of-embedable-content/index.html at master ·bgoonz/random-list-of-embedable-content</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/\"><em><strong>freeCodeCamp Programming Tutorials: Python, JavaScript, Git &#x26;More</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then\"><em><strong>Promise.prototype.then() - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function\"><em><strong>async function - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/9ea6ac71bbe761048f73ef141f081aae\"><em><strong>all thelinks</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?id=root&#x26;cid=D21009FDD967A241&#x26;qt=mru\"><em><strong>Recent -OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/edit.aspx?cid=d21009fdd967a241&#x26;page=view&#x26;resid=D21009FDD967A241!617387&#x26;parId=D21009FDD967A241!348&#x26;app=Excel&#x26;wacqt=mru\"><em><strong>Tech-Stacks.xlsx - Microsoft ExcelOnline</strong></em></a></li>\n<li>[✅] <a href=\"https://drive.google.com/drive/folders/1Wb7HyKfxxyWo-hGrOkEiWHjkIs3Kswh1\"><em><strong>webdevimages - GoogleDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSdvbv9jd7hlgIsHZWJGfnldLo2hLdlputw3hJ42JWpv3ctL1w/viewform\"><em><strong>freeCodeCamp Publication ContributorApplication</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/803ff193c522/edit\"><em><strong>Editing A Quick Guide to Big-O Notation, Memoization, Tabulation, andSorting Algorithms by Example --Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/Medium-article-comp-complex#aBunchOfDataStructures.js\"><em><strong>Medium-article-comp-complex -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/Data-Structures-Algos-Codebase#File-System/recursive-read-folder/rec-read-dir.js\"><em><strong>Data-Structures-Algos-Codebase -Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase/tree/master/File-System\"><em><strong>Data-Structures-Algos-Codebase/File-System at master ·bgoonz/Data-Structures-Algos-Codebase</strong></em></a></li>\n<li>[✅] <a href=\"https://www.udemy.com/course/react-redux/learn/lecture/12531080#announcements\"><em><strong>Modern React with Redux |Udemy</strong></em></a></li>\n<li>\n<p>[✅] <a href=\"https://github.com/StephenGrider/GraphQLCasts\"><em><strong>StephenGrider/GraphQLCasts: Completed Code Examples from GraphQL withReact</strong></em></a></p>\n<ul>\n<li>[✅] <a href=\"https://www.blogger.com/blog/earnings/2114927300735556507\"><em><strong>Blogger:Earnings</strong></em></a></li>\n<li>[✅] <a href=\"https://id.atlassian.com/login?application=confluence&#x26;prompt=login\"><em><strong>Log in with Atlassianaccount</strong></em></a></li>\n<li>[✅] <a href=\"https://aa-student-resource.atlassian.net/wiki/spaces/~973542278/pages/edit-v2/738033670?draftShareId=e1393b36-98bd-4793-bf50-18c6b9459529\"><em><strong>Add Page - Career -Confluence</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/adsense/new/u/0/pub-7131725540181116/sites/my-sites/new\"><em><strong>Sites -- GoogleAdSense</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/My-Medium-Blog\"><em><strong>bgoonz/My-Medium-Blog</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/40986340/how-to-wget-a-list-of-urls-in-a-text-file\"><em><strong>How to `wget` a list of URLs in a text file? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/New-Reusable-Components\"><em><strong>bgoonz/New-Reusable-Components</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/blog-templates\"><em><strong>bgoonz/blog-templates: Different styles of web-architecture with afocus on blogging.</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1482/pages/how-labs-works?module_item_id=608495\"><em><strong>How Labs Works: LabsApplication</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/interview-preparation-for-software-developer/\"><em><strong>Interview Preparation for Software Developer -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/web-dev-hub-docs/~/drafts/-MkOxmzgSyM1ZQdtOTVv/javascript/untitled\"><em><strong>JavaScript -Web-Dev-Hub-Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda\"><em><strong>bgoonz/Lambda: Learning tool for Lambda Students By LambdaStudents</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz?tab=repositories\"><em><strong>Your Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/knowledge/~/drafts/-MkOyUvT4XDfUTLklF5U/14-pure-education/knowledge-master/knowledge-master/databases/neo4j/~/settings/integrations\"><em><strong>Link your GitHub repository -knowledge</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=github+geeksforgeeks&#x26;oq=github+geeksforgeeks&#x26;aqs=chrome..69i57j0i22i30j69i64j69i65.5666j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>github geeksforgeeks - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/javascript-tutorial/?ref=footer\"><em><strong>JavaScript Tutorial -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/javascript-array-complete-reference/\"><em><strong>JavaScript Array Complete Reference -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/python-programming-language/?ref=leftbar\"><em><strong>Python Programming Language -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/\"><em><strong>GeeksforGeeks | A computer science portal forgeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://m-prerna.github.io/myportfolio/#footer\"><em><strong>About Prerna Mishra</strong></em></a></li>\n<li>[✅] <a href=\"https://camo.githubusercontent.com/a28961665c17c96bc0364c0841583e609cd95a8b3b7cb53f1dbcee8d2a3cb55f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4e756d50792d3031333234333f6c6f676f3d6e756d707926436f6c6f723d7768697465267374796c653d706c6173746963\"><em><strong>NumPy</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/mynetwork/\"><em><strong>LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sanity.io/docs/getting-started-with-sanity-cli\"><em><strong>Getting started with SanityCLI</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sanity.io/docs/cors-in-cli\"><em><strong>CORS</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60d103fc8e04a200175754a4#/maps/\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/maps/place/Space+Needle/@47.620506,-122.349277,16z/data=!4m5!3m4!1s0x0:0xdb2ba8689ed0920d!8m2!3d47.6205063!4d-122.3492774?hl=en-US\"><em><strong>Space Needle - GoogleMaps</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/maps/dir//47.6205063,-122.3492774/@47.620506,-122.349277,16z?hl=en-US\"><em><strong>GoogleMaps</strong></em></a></li>\n<li>[✅] <a href=\"https://potluck-landing.netlify.app/style-guide/\"><em><strong>Potluck Objectives</strong></em></a></li>\n<li>[✅] <a href=\"https://front-end-tau-seven.vercel.app/add-event\"><em><strong>React App</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/billing/01C41E-01F515-656A27/health?organizationId=0\"><em><strong>Billing health checks -- Billing -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.google.com/billing/docs/how-to/modify-project?&#x26;_ga=2.99091550.-1164462789.1624423132#enable_billing_for_a_new_project\"><em><strong>Enable, disable, or change billing for a project | CloudBilling</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/google/maps-apis/metrics?project=studious-pulsar-298821\"><em><strong>Metrics -- Google Maps Platform -- My Project 78672 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/bgoonz/b2p7yxws/1/\"><em><strong>JSFiddle - Code Playground</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=places_js&#x26;utm_medium=degraded&#x26;utm_campaign=keyless#api-key-and-billing-errors\"><em><strong>Error Messages | Maps JavaScript API | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ft-potluck-planer-05-units3-4/potluck-landing/tree/master/src\"><em><strong>potluck-landing/src at master ·ft-potluck-planer-05-units3-4/potluck-landing</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sanity.io/manage/personal/project/ykw3edr8\"><em><strong>potluckLanding -- Overview |Sanity.io</strong></em></a></li>\n<li>[✅] <a href=\"https://terrific-dolphin-103fc.sanity.studio/desk/post;a7fe77f8-1458-4179-9ce8-7942f4c9c4f8\"><em><strong>terrific-dolphin-103fc --Sanity</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/maps/documentation/embed/map-generator#enable-api-sdk\"><em><strong>The Maps Embed API quickstart | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/apis/library/maps-embed-backend.googleapis.com?_ga=2.96297756.1628426608.1624423132-1164462789.1624423132&#x26;project=studious-pulsar-298821&#x26;folder=&#x26;organizationId=\"><em><strong>Maps Embed API -- APIs &#x26; Services -- My Project 78672 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/apis/library/maps-embed-backend.googleapis.com?_ga=2.96297756.1628426608.1624423132-1164462789.1624423132&#x26;authuser=1&#x26;project=social-media42\"><em><strong>Maps Embed API -- APIs &#x26; Services -- social-media42 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/maps/documentation/embed/get-started?hl=en_US\"><em><strong>The Maps Embed API overview | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/maps/documentation/javascript/overview\"><em><strong>Overview | Maps JavaScript API | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/apis/credentials/consent/edit;newAppInternalUser=false?project=studious-pulsar-298821\"><em><strong>Edit app registration -- APIs &#x26; Services -- My Project 78672 -- GoogleCloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/cloud/answer/7650096#zippy=%2Cwhy-am-i-seeing-the-domain-limit-exceeded-exception%2Cwhat-is-a-domain%2Chow-do-i-fix-this\"><em><strong>Domain Limit Exceeded FAQ - Google Cloud Platform ConsoleHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://workspace.google.com/u/5/signup/businessstarter/checkout\"><em><strong>Sign up for GoogleWorkspace</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/code/contact/project_quota_increase\"><em><strong>Google Cloud Platform/API Project: Request Project Quota Increase -Google DevelopersHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/apis/credentials/consent/edit;verificationMode=true?project=studious-pulsar-298821\"><em><strong>Prepare for verification -- APIs &#x26; Services -- My Project 78672 --Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/getting-started/enterprise?project=studious-pulsar-298821\"><em><strong>Getting started -- My Project 78672 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://admin.google.com/u/5/ac/domains/manage?hl=en\"><em><strong>Manage domains - AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/maps/gmp-get-started\"><em><strong>Getting started with Google Maps Platform | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/google/maps-apis/api-list?project=studious-pulsar-298821\"><em><strong>APIs -- Google Maps Platform -- My Project 78672 -- Google CloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/bgoonz/h6wezn5k/2/\"><em><strong>JSFiddle - Code Playground</strong></em></a></li>\n<li>[✅] <a href=\"https://support.google.com/accounts/answer/114129?hl=en\"><em><strong>Verify your account - Google AccountHelp</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/google/maps-apis/solution-builder/locator_plus?project=studious-pulsar-298821\"><em><strong>Quick Builder -- Google Maps Platform -- My Project 78672 -- GoogleCloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/bgoonz/4dk3fj58/\"><em><strong>JSFiddle - Code Playground</strong></em></a></li>\n<li>[✅] <a href=\"https://jsfiddle.net/\"><em><strong>JSFiddle - Code Playground</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/net-services/domains/registrations/create?folder=&#x26;organizationId=&#x26;project=studious-pulsar-298821\"><em><strong>Register a domain -- Network services -- My Project 78672 -- GoogleCloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://paulrohan.medium.com/vs-code-settings-extensions-tips-and-tricks-and-solutions-to-common-issues-for-my-web-ecad6bda5aa3\"><em><strong>VS Code Settings, Extensions, tips and techniques and solutions tocommon issues for my Web Development setup | by Rohan Paul |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/web-module-challenge-objects/branches\"><em><strong>Branches ·bgoonz/web-module-challenge-objects</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/web-dev-resource-hub/deploys\"><em><strong>Deploys |web-dev-resource-hub</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/snippets/javascript/\"><em><strong>JavaScript Snippets\" + \" |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.htmlgoodies.com/beyond/javascript/article.php/3887346/Top-10-JavaScript-Snippets-for-Common-Tasks.htm\"><em><strong>Top 10 JavaScript Snippets for CommonTasks</strong></em></a></li>\n<li>[✅] <a href=\"https://bashooka.com/coding/20-useful-websites-for-javascript-css-snippets/\"><em><strong>20 Useful Websites For Javascript &#x26; CSS Snippets --Bashooka</strong></em></a></li>\n<li>[✅] <a href=\"https://morioh.com/p/5b34d9858cb5\"><em><strong>Social Network for Programmers andDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/3610540/how-to-define-a-default-value-for-input-type-text-without-using-attribute-val\"><em><strong>html - How to define a default value for \"input type=text\" withoutusing attribute 'value'? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://us04web.zoom.us/postattendee?id=41\"><em><strong>Post Attendee - Zoom</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/lambda-react\"><em><strong>lambda-react - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=cyber+army&#x26;oq=cyber+army&#x26;aqs=chrome..69i57j0l9.2210j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>cyber army - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://bim.smartinnovates.com/demo4/\"><em><strong>Showcase Slider -- Just another bim Sitessite</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/quizzical-dijkstra-bf2u5\"><em><strong>quizzical-dijkstra-bf2u5 -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/INTERVIEW-PREP-COMPLETE\"><em><strong>GitHub - bgoonz/INTERVIEW-PREP-COMPLETE:INTERVIEW-PREP-ARCHIVE</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgxwLswLjSTtmtXkMJCzTlzTNwxfq\"><em><strong>Welcome to Lambda School's Admissions Process! -bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgxwLswPBgwgsrDjbBPQxLfDXBFlf\"><em><strong>Action Required: Bryan, Register for Lambda Launch! -bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/Tools-Platforms-9cddc6fc25a848a0b45fc5ce63145d9a#261c1632222a44c7b9844e81423ff688\"><em><strong>Tools &#x26;Platforms</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/Tools-Platforms-9cddc6fc25a848a0b45fc5ce63145d9a#bba1d19f41694acaa301207249db271f\"><em><strong>Tools &#x26;Platforms</strong></em></a></li>\n<li>[✅] <a href=\"https://learn.lambdaschool.com/\"><em><strong>https://learn.lambdaschool.com</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/FrontDesk-88c67be0382d4f2e91a1950b6c55dee8#3982e139136e4fdb97a93e1e4fc38be3\"><em><strong>Notion -- The all-in-one workspace for your notes, tasks, wikis, anddatabases.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.office.com/?auth=1\"><em><strong>Microsoft Office Home</strong></em></a></li>\n<li>[✅] <a href=\"https://account.microsoft.com/?ref=MeControl&#x26;refd=www.office.com\"><em><strong>Microsoft account |Home</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/Lambda-School-Student-Guide-74b6ce15355f41b488f6643c31636480\"><em><strong>Lambda School StudentGuide</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/lambdaschool/Full-Stack-Web-Self-Study-Resources-cb10780fa4c14f3a90b8835956e7f2a4\"><em><strong>Notion -- The all-in-one workspace for your notes, tasks, wikis, anddatabases.</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.com/the-commons/prepare-yourself-for-success-by-attending-lambda-launch\"><em><strong>Lambda School | Prepare Yourself for Success by Attending LambdaLaunch</strong></em></a></li>\n<li>[✅] <a href=\"https://slack.com/signin#/workspaces\"><em><strong>Get Started | Slack</strong></em></a></li>\n<li>[✅] <a href=\"https://app.slack.com/client/TC3RJK1PT/CC4CG549G\"><em><strong>Slack | general | Jumpstart | 1 newitem</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/\"><em><strong>Medium -- Where good ideas find you.</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/e347d7db3822/edit\"><em><strong>Editing The Web Developer's Technical Interview --Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/~bgoonz11\"><em><strong>npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/generate-readme\"><em><strong>generate-readme - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/search?q=readme%20generator&#x26;page=2\"><em><strong>readme generator - npmsearch</strong></em></a></li>\n<li>[✅] <a href=\"https://quokkajs.com/docs/configuration.html\"><em><strong>Quokka.js: Configuration</strong></em></a></li>\n<li>[✅] <a href=\"https://quokkajs.com/docs/configuration.html#global-config-file\"><em><strong>Quokka.js:Configuration</strong></em></a></li>\n<li>[✅] <a href=\"https://quokkajs.com/docs/#value-explorer\"><em><strong>Quokka.js: Introduction</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/watch?v=HmWefc-8X8c\"><em><strong>Wallaby.js Webinar (HD): Accelerated Distraction-free JavaScriptTesting - YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/wallabyjs/public/issues/2254\"><em><strong>Automatic Jest configuration error: Module jest-cli is not found in'.'. · Issue #2254 ·wallabyjs/public</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math\"><em><strong>Math - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://levelup.gitconnected.com/how-to-accept-any-number-of-arguments-in-a-javascript-arrow-function-ed9ba66ed53f\"><em><strong>How to Accept Any Number of Arguments in a JavaScript Arrow Function |by Amanda Treutler | Level UpCoding</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=recursive+addition+javascript&#x26;oq=recursive+addition+javascript&#x26;aqs=chrome..69i57.7252j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>recursive addition javascript - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString\"><em><strong>Function.prototype.toString() - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/frontend-development-with-js/answers-of-front-end-job-interview-coding-questions-3c227d59016c\"><em><strong>Answers of Front-end Job Interview Coding Questions | by Onur Dayıbaşı| Frontend Development With JS |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://accounts.google.com/speedbump/samlconfirmaccount?continue=https%3A%2F%2Fwww.google.com%2Fwebhp%3Fauthuser&#x26;sarp=1&#x26;scc=0&#x26;TL=AM3QAYZe_YepDxzuGBsOGb9WPsFoOlqxA4hX4fv_OWswRcquZzLqH6KH7SawJfyY\"><em><strong>Sign in - GoogleAccounts</strong></em></a></li>\n<li>[✅] <a href=\"https://thoughtbot.com/blog/full-text-search-in-your-browser\"><em><strong>Full-text search in yourbrowser</strong></em></a></li>\n<li>[✅] <a href=\"https://simpl.info/search/lunr/\"><em><strong>Lunr text search</strong></em></a></li>\n</ul>\n</li>\n<li>[✅] <a href=\"https://medevel.com/os-fulltext-search-solutions/\"><em><strong>15 Open-source Full-Text Search Engine Solutions fordevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://lunrjs.com/guides/getting_started.html\"><em><strong>Getting Started : Lunr</strong></em></a></li>\n<li>[✅] <a href=\"http://elasticlunr.com/\"><em><strong>Elasticlunr.js, lightweight full-text search engine in Javascript forbrowser search and offline search.</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/github?message=SIZE_LIMIT_EXCEEDED\"><em><strong>GitHub - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/dev-channel/how-to-add-full-text-search-to-your-website-4e9c80ce2bf4\"><em><strong>How to add full text search to your website | by Sam Dutton | DevChannel |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/p/c00551ac5d0/edit\"><em><strong>New story -- Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/bgoonz/bigoooo-1fpd\"><em><strong>BIGOOOO - DEV Community 👩‍💻👨‍💻</strong></em></a></li>\n<li>[✅] <a href=\"https://splice.com/explore\"><em><strong>Trending Ableton, Logic Pro, FL Studio &#x26; Garageband Projects Free onSplice</strong></em></a></li>\n<li>[✅] <a href=\"https://splice.com/blog/\"><em><strong>Blog | Splice - An inside look at makingmusic</strong></em></a></li>\n<li>[✅] <a href=\"https://splice.com/features/sounds\"><em><strong>Royalty-Free Sounds, FX, Presets &#x26; more -Splice</strong></em></a></li>\n<li>[✅] <a href=\"https://splice.com/download\"><em><strong>Download Splice | Splice</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jupyter/notebook\"><em><strong>jupyter/notebook: Jupyter InteractiveNotebook</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda/deployments/activity_log?environment=github-pages\"><em><strong>Deployments ·bgoonz/Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/Lambda/Backup-Readme.html\"><em><strong>Document</strong></em></a></li>\n<li>[✅] <a href=\"https://gitter.im/bgoonz/community#share\"><em><strong>bgoonz/community - Gitter</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/29045140/env-bash-r-no-such-file-or-directory/29045187\"><em><strong>windows - env: bash\\r: No such file or directory - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://sidecar.gitter.im/\"><em><strong>Sidecar - Gitter</strong></em></a></li>\n<li>[✅] <a href=\"https://gitter.im/Community\"><em><strong>- Gitter</strong></em></a></li>\n<li>[✅] <a href=\"https://gitter.im/bgoonz/resourcedump\"><em><strong>bgoonz/resourcedump - Gitter</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda/blob/master/.gitignore\"><em><strong>Lambda/.gitignore at master ·bgoonz/Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/ARCHIVE_MAIN\"><em>**Web-Dev-Collaborative/ARCHIVE</em>MAIN**_</a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/4181861/message-src-refspec-master-does-not-match-any-when-pushing-commits-in-git\"><em><strong>Message 'src refspec master does not match any' when pushing commitsin Git - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://s3-us-west-1.amazonaws.com/appacademy-open-assets/data_structures_algorithms/efficient_sorting_algorithms/quick_sort/images/QuickSort.gif\"><em><strong>QuickSort.gif(608×272)</strong></em></a></li>\n<li>[✅] <a href=\"https://imgur.com/a/vWhausD\"><em><strong>Imgur: The magic of the Internet</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/tender-bartik-074feb/forms\"><em><strong>Forms |tender-bartik-074feb</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/forms/setup/?_ga=2.122402946.883992778.1610724079-1385156643.1610491971\"><em><strong>Forms setup | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/#inbox/FMfcgxwKkbdjWXWBlvxXHjzcGRJSkzTr\"><em><strong>[LiveForm] New submission for portfolio - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://liveformhq.com/forms/6770d1cb-bd6b-43b8-b2d1-e0f3aa9c8d89/setup\"><em><strong>Build awesome online forms, for web designers anddevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=how+to+add+a+responsive+form+to+a+static+site&#x26;rlz=1C1UEAD_enUS928US928&#x26;oq=how+to+add+a+responsive+form+to+a+static+site&#x26;aqs=chrome..69i57j69i64.7905j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>how to add a responsive form to a static site - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.developerdrive.com/add-google-forms-static-site/\"><em><strong>How to Add Custom Google Forms to Your Static Site - DeveloperDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://www.business.com/articles/how-to-transform-static-site-into-responsive-website/\"><em><strong>How to Transform Your Static Site into a Responsive Website -business.com</strong></em></a></li>\n<li>[✅] <a href=\"https://alistapart.com/article/fluidgrids/\"><em><strong>Fluid Grids -- A ListApart</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.yahoo.com/opensource/projectindex/\"><em><strong>Open Source Project Index - Yahoo DeveloperNetwork</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/yahoo/parsec\"><em><strong>yahoo/parsec: A collection of libraries and utilities to simplify theprocess of building web serviceapplications.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/yahoo\"><em><strong>Yahoo</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/yahoo/react-stickynode\"><em><strong>yahoo/react-stickynode: A performant and comprehensive React stickycomponent.</strong></em></a></li>\n<li>[✅] <a href=\"https://liveformhq.com/forms/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5/setup\"><em><strong>Build awesome online forms, for web designers anddevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://liveformhq.com/forms/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5/keys\"><em><strong>Build awesome online forms, for web designers anddevelopers</strong></em></a></li>\n<li>[✅] <a href=\"http://jsfiddle.net/amgnz/uBkuA/\"><em><strong>Simple Contact Form - JSFiddle - CodePlayground</strong></em></a></li>\n<li>[✅] <a href=\"https://liveformhq.com/form-test/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5#thank-you\"><em><strong>Test your form -LiveForm</strong></em></a></li>\n<li>[✅] <a href=\"https://liveformhq.com/forms/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5\"><em><strong>Build awesome online forms, for web designers anddevelopers</strong></em></a></li>\n<li>[✅] <a href=\"http://beautifytools.com/scss-compiler.php\"><em><strong>Online SCSS Compiler -BeautifyTools.com</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/6463439/how-to-open-a-file-browse-dialog-using-javascript\"><em><strong>jquery - How to open a file / browse dialog using javascript? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/chrissimmons/pen/WprrQe\"><em><strong>Bill 🚀👽 🌀 Paxton Tribute - GlowText</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/comehope/pen/GBwvxw\"><em><strong>Shimmering neon text</strong></em></a></li>\n<li>[✅] <a href=\"https://codepen.io/GeorgePark/pen/jeBbGN\"><em><strong>Black Mirror Cracked TextEffect</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/391440/how-to-make-div-resizeable\"><em><strong>html - How to make &#x3C;div> resizeable? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/andyj?page=2\"><em><strong>andyj's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/andyj\"><em><strong>andyj (Andy Jarrett)</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/andyj/8d40bc394fb44cec5f92\"><em><strong>Parsing CSV innode.js</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/22344246/making-html-page-zoom-by-default\"><em><strong>css - Making HTML page zoom by default - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/lambda-w-1-notes/overview\"><em><strong>Site overview |lambda-w-1-notes</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.zoom.us/j/7812577180#success\"><em><strong>Launch Meeting -Zoom</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1173/quizzes/27983?module_item_id=583341\"><em><strong>DOM II Attendance: WEB43 - 2.1 - AppliedJavaScript</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.google.com/document/d/1c9HpSiFUIJc83E-aI2fGJ-RRe2YtqSFZluxDprbW-l8/edit#\"><em><strong>Unit 2 Prep - GoogleDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/AudioToText/blob/main/src/audio_to_text.py\"><em>**AudioToText/audio</em>to<em>text.py at main ·Web-Dev-Collaborative/AudioToText**</em></a></li>\n<li>[✅] <a href=\"https://api.gitkraken.com/trello-auth/callback#token=2190a1808aa3b39fef026db98c2be3ec8b11f5654914eeb8b72d7bc72a395c13\"><em><strong>Trello Auth Success |GitKraken</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgxwLtkXnzXqCXrprNZdfrJMgzHQd\"><em><strong>Your Notion export is ready - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://zube.io/eengineergz\"><em><strong>John Holland | Projects</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/kazad/8bb682da198db597558c\"><em><strong>BetterExplained FourierExample</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/kazad\"><em><strong>kazad's gists</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/kazad/3629119\"><em><strong>Github / MindTouch integration</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/kazad/3558992\"><em><strong>Fancybox</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/b90c84fa791c8edaf6487916050d547b\"><em><strong>rand-string-gen.py</strong></em></a></li>\n<li>[✅] <a href=\"https://gistlog.co/bgoonz/ba2f88e2ee8900721858d08543148c82\"><em><strong>| bgoonz | GistLog - Your dev blogdelivered</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/SkyLined?tab=repositories&#x26;q=&#x26;type=&#x26;language=&#x26;sort=stargazers\"><em><strong>SkyLined (SkyLined) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/FileSystemBrowser\"><em><strong>Web-Dev-Collaborative/FileSystemBrowser: Create a webpage from adirectorytree.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=how+to+run+cmd+file+from+powershell&#x26;oq=how+to+run+cmd+file+f&#x26;aqs=chrome.1.0l2j69i57j0i22i30l7.6838j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>how to run cmd file from powershell - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.onlinegdb.com/\"><em><strong>GDB online Debugger | Compiler - Code, Compile, Run, Debug online C,C++</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/fghber/PyScripts\"><em><strong>fghber/PyScripts</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/UltiRequiem\"><em><strong>UltiRequiem (Eliaz Bobadilla)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/UltiRequiem/Python-UltiSnippets-VSCode-Extension\"><em><strong>UltiRequiem/Python-UltiSnippets-VSCode-Extension: 📟 A extensions ofVSCode</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/UltiRequiem/GitHub-Profile-Web-Scraper\"><em><strong>UltiRequiem/GitHub-Profile-Web-Scraper: 🕷️ A cool webscraper</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=install+requirements.txt+python&#x26;oq=install+requirm&#x26;aqs=chrome.1.69i57j0i10l9.4378j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>install requirements.txt python - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://min.io/resources\"><em><strong>MinIO | Resources</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/38832230/copy-paste-in-bash-on-ubuntu-on-windows/50050642#50050642\"><em><strong>Copy Paste in Bash on Ubuntu on Windows - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.deezer.com/us/register?source=electron\"><em><strong>Register | Create a Deezeraccount</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=GWSL&#x26;oq=GWSL&#x26;aqs=chrome..69i57j0i20i263j0i10l2j0j0i10j0j0i10l2.1244j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>GWSL - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bitclout/explorer\"><em><strong>bitclout/explorer</strong></em></a></li>\n<li>[✅] <a href=\"https://opticos.github.io/gwsl/tutorials/download.html\"><em><strong>GWSL Downloads |gwsl</strong></em></a></li>\n<li>[✅] <a href=\"https://askubuntu.com/questions/3167/what-is-difference-between-the-options-autoclean-autoremove-and-clean\"><em><strong>apt - What is difference between the options \"autoclean\",\"autoremove\" and \"clean\"? - AskUbuntu</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=what+is+microsoft+.net+sdk&#x26;oq=what+is+microsoft+.net+sdk&#x26;aqs=chrome..69i57j0i22i30l3j0i10i22i30j0i22i30j0i390l2.6264j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>what is microsoft .net sdk - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/RelativeTech/testing\"><em><strong>RelativeTech/testing</strong></em></a></li>\n<li>[✅] <a href=\"https://api.gitkraken.com/oauth/github/callback?code=cc2051d4ca97476b9f5c&#x26;state=socketId%3A3e855e83-a028-4afb-a4ca-96370ba6c1b5%3Baction%3Alogin%3BinApp%3Atrue%3BneedsGKPermissions%3Atrue%3Bchallenge%3Aa1c2326b-9540-483f-85f5-76f18c7720ac%3B\"><em><strong>OAuth Success |GitKraken</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/settings/connections/applications/a7557949433b7d282a76\"><em><strong>Connection withGitKraken</strong></em></a></li>\n<li>[✅] <a href=\"https://app.slack.com/workspace-signin?redir=%2Fgantry%2Fauth%3Fapp%3Dclient%26lc%3D1620280541%26return_to%3D%252Fclient%252FT4JUEB3ME%252FD01T2J8AP7X%252Fthread%252FC01TBRN4ZD2-1617501657.011500%26teams%3D\"><em><strong>Sign in |Slack</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/REACT-V4\"><em><strong>bgoonz/REACT-V4</strong></em></a></li>\n<li>[✅] <a href=\"https://app.sli.do/event/dftttcrh/live/questions\"><em><strong>Components II</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=is+there+a+way+to+push+to+github+at+regular+intervals+of+time&#x26;oq=is+there+a+way+to+push+to+github+at+regular+intervals+of+time&#x26;aqs=chrome..69i57j69i64.10698j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>is there a way to push to github at regular intervals of time - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=json+stringify+and+parse&#x26;oq=json+stringify+and+parse&#x26;aqs=chrome..69i57j0j0i22i30j0i10i22i30j0i22i30l6.7185j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>json stringify and parse - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://javascript.info/search/?query=promises&#x26;type=article\"><em><strong>Searchresults</strong></em></a></li>\n<li>[✅] <a href=\"https://javascript.info/promise-basics\"><em><strong>Promise</strong></em></a></li>\n<li>[✅] <a href=\"https://javascript.info/promise-api\"><em><strong>Promise API</strong></em></a></li>\n<li>[✅] <a href=\"https://javascript.info/promise-chaining\"><em><strong>Promises chaining</strong></em></a></li>\n<li>[✅] <a href=\"https://javascript.info/promise-error-handling\"><em><strong>Error handling withpromises</strong></em></a></li>\n<li>\n<p>[✅] <a href=\"https://javascript.info/async-await\"><em><strong>Async/await</strong></em></a></p>\n<ul>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/fullstack-slido-clone\"><em><strong>Web-Dev-Collaborative/fullstack-slido-clone: I code Slido web app fromscratch to endagain.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=denial+of+service+attack&#x26;oq=dENIAL+OF+SERvice+attack&#x26;aqs=chrome.0.0i433j0l9.4712j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>denial of service attack - GoogleSearch</strong></em></a></li>\n</ul>\n</li>\n<li>[✅] <a href=\"https://github.com/mdn?q=&#x26;type=&#x26;language=&#x26;sort=\"><em><strong>MDN Web Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mdn/interactive-examples\"><em><strong>mdn/interactive-examples: Home of the MDN live code editor interactiveexamples</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mdn/interactive-examples/tree/master/live-examples/js-examples/promise\"><em><strong>interactive-examples/live-examples/js-examples/promise at master ·mdn/interactive-examples</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/javascript-tutorial\"><em><strong>The Modern JavaScript Tutorial</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/engine\"><em><strong>Web-Dev-Collaborative/engine</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mdn/content\"><em><strong>mdn/content: The content behind MDN WebDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/jsref/met_console_error.asp\"><em><strong>HTML DOM console.error()Method</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mattdesl?tab=repositories&#x26;q=&#x26;type=&#x26;language=&#x26;sort=stargazers\"><em><strong>mattdesl (Matt DesLauriers) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/dwyl/learn-promises\"><em><strong>dwyl/learn-promises: Start writing (and keeping) JavaScript Promisestoday.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/css/css3_text_effects.asp\"><em><strong>CSS Text Effects</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/css/tryit.asp?filename=trycss3_text-overflow\"><em><strong>Tryit Editorv3.6</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_word-wrap\"><em><strong>Tryit Editorv3.6</strong></em></a></li>\n<li>[✅] <a href=\"https://ourcodeworld.com/articles/read/109/how-to-solve-filename-too-long-error-in-git-powershell-and-github-application-for-windows#:~:text=As%20you%20can%20see%2C%20indeed,there&#x27;s%20a%20limit%20of%20260\"><em><strong>How to solve \"filename too long\" error in git (Powershell and GitHubApplication) for windows | Our CodeWorld</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=github+serve+markdown+as+website&#x26;oq=github+serve+markdown+as+website&#x26;aqs=chrome..69i57j69i64.8142j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>github serve markdown as website - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Express-basic-server-template\"><em><strong>bgoonz/Express-basic-server-template</strong></em></a></li>\n<li>[✅] <a href=\"https://material.io/resources/get-started#web\"><em><strong>Get started - MaterialDesign</strong></em></a></li>\n<li>[✅] <a href=\"https://material.io/components/app-bars-top/web#regular-top-app-bar\"><em><strong>MaterialDesign</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/web-dev-notes-resource-site/community/license/new?branch=master\"><em><strong>Page not found · GitHub ·GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/excel2html-table\"><em><strong>bgoonz/excel2html-table</strong></em></a></li>\n<li>[✅] <a href=\"https://601215a58413c3000771f46c--pedantic-wing-adbf82.netlify.app/\"><em><strong>directory</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=html+copy+to+clipboard&#x26;oq=html+copy+to+clipboard&#x26;aqs=chrome..69i57j0i20i263j0l5j69i65.4809j1j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>html copy to clipboard - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://html-cleaner.com/\"><em><strong>HTML Cleaner - Online Beautifyer and WordConverter</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.facebook.com/\"><em><strong>Facebook for Developers</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/speed/pagespeed/insights/\">****</a></li>\n<li>[✅] <a href=\"https://htmltidy.net/\"><em><strong>HTML Tidy - Online Markup Corrector</strong></em></a></li>\n<li>[✅] <a href=\"https://dribbble.com/\"><em><strong>Dribbble - Discover the World's Top Designers &#x26; CreativeProfessionals</strong></em></a></li>\n<li>[✅] <a href=\"https://www.xml-sitemaps.com/\"><em><strong>Create your Google Sitemap Online - XML SitemapsGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://www.xml-sitemaps.com/seo-tools.html\"><em><strong>SEO Tools for Google, Bing and other Search Engines - A few small butuseful SEO tools for those webmasters interested to optimize theirwebsites for Search Engines - XML SitemapsGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://www.xml-sitemaps.com/http-headers-viewer.html?op=http-headers-viewer&#x26;go=1&#x26;pageurl=https%3A%2F%2Fgoofy-euclid-1cd736.netlify.app%2F&#x26;se=googlebot&#x26;submit=View+Headers\"><em><strong>HTTP Headers Viewer - XML SitemapsGenerator</strong></em></a></li>\n<li>[✅] <a href=\"https://www.semrush.com/signup/confirm/\"><em><strong>Confirm Your Email -- Semrush</strong></em></a></li>\n<li>[✅] <a href=\"https://material.io/resources\"><em><strong>Resources - Material Design</strong></em></a></li>\n<li>[✅] <a href=\"https://sway.office.com/y2JYXvYpMe7ToZCr?authoringPlay=true&#x26;publish\"><em><strong>week-10-test</strong></em></a></li>\n<li>[✅] <a href=\"https://marketplace.visualstudio.com/items?itemName=iocave.customize-ui\"><em><strong>Customize UI - Visual StudioMarketplace</strong></em></a></li>\n<li>[✅] <a href=\"http://theglamstreet.com/linkedin-react-js-assessment-answers/\"><em><strong>✔️ LinkedIn React.js Assessment Answers 2021Free</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/convert-folder-contents-2-website\"><em><strong>bgoonz/convert-folder-contents-2-website</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/kumar-abhishek/CS229-Fall-2018-Problem-Solutions\"><em><strong>kumar-abhishek/CS229-Fall-2018-Problem-Solutions: Problem setssolutions of Stanford CS229 Fall2018.</strong></em></a></li>\n<li>[✅] <a href=\"https://gistlog.co/bgoonz/d928f0deb01ce93bfd2a6cd70dbc05a6\"><em><strong>| bgoonz | GistLog - Your dev blogdelivered</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=Javascript+append+text+to+every+file+in+folder&#x26;sxsrf=ALeKk03xsJ6syy98v4bBSLLH6Rqc3w0zUg%3A1625317507853&#x26;ei=g2DgYM_KM5KstQbYl7L4AQ&#x26;oq=Javascript+append+text+to+every+file+in+folder&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyCAghEBYQHRAeMggIIRAWEB0QHjoHCAAQRxCwAzoECCMQJzoFCAAQkQI6BAgAEEM6BQgAELEDOgsILhCxAxDHARCjAjoKCAAQhwIQsQMQFDoHCAAQsQMQQzoCCAA6CAgAELEDEJECOgQIABAKOgcIABCHAhAUOgYIABAWEB5KBAhBGABQkL8CWO_-AmCLgANoA3ACeACAAZkBiAGOGpIBBDQ0LjOYAQCgAQGqAQdnd3Mtd2l6yAEIwAEB&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwiPmM_F-8bxAhUSVs0KHdiLDB8Q4dUDCA8&#x26;uact=5\"><em><strong>Javascript append text to every file in folder - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/55297621/append-text-at-the-end-of-all-files-in-a-directory\"><em><strong>windows - Append text at the end of all files in a directory - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codegrepper.com/code-examples/javascript/append+text+file+nodejs\"><em><strong>append text file nodejs CodeExample</strong></em></a></li>\n<li>[✅] <a href=\"https://unix.stackexchange.com/questions/65510/how-do-i-append-text-to-the-beginning-and-end-of-multiple-text-files-in-bash\"><em><strong>shell script - How do I append text to the beginning and end ofmultiple text files in Bash? - Unix &#x26; Linux StackExchange</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codegrepper.com/code-examples/javascript/js+append+to+file\"><em><strong>js append to file CodeExample</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/stackfame/get-list-of-all-files-in-a-directory-in-node-js-befd31677ec5\"><em><strong>Get List of all files in a directory in Node.js | by VithalReddy |stackFAME |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/@vithalreddy\"><em><strong>VithalReddy -- Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/pure-bash-bible\"><em><strong>Web-Dev-Collaborative/pure-bash-bible: 📖 A collection of pure bashalternatives to externalprocesses.</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/4638349/bash-truncate-filenames-keeping-them-unique\"><em><strong>bash: Truncate Filenames, keeping them unique - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/tag/web-development\"><em><strong>The most insightful stories about Web Development -Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/feed/\"><em><strong>(1) Feed | LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://snippets.cacher.io/snippet/b4345e0362a5d9f58a98\"><em><strong>run - CacherSnippet</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#search/kathy.guner%40gmail.com+nick.guner%40gmail.com\"><em><strong>Search results - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.state.nj.us/labor/salesforce/uia-w2l/EmployeeAppealProd.htm\"><em><strong>Department of Labor and Workforce Development | Unemployment InsuranceBenefits</strong></em></a></li>\n<li>[✅] <a href=\"https://www.nj.gov/labor/\"><em><strong>Department of Labor &#x26; Workforce Development</strong></em></a></li>\n<li>[✅] <a href=\"https://myunemployment.nj.gov/labor/myunemployment/help/faqs/appeals.shtml\"><em><strong>Division of Unemployment Insurance | FAQ: The appealsprocess</strong></em></a></li>\n<li>[✅] <a href=\"https://lwdwebpt.dol.state.nj.us/ClaimStatus/claimStatus.htm\"><em><strong>Claim StatusForm</strong></em></a></li>\n<li>[✅] <a href=\"https://myunemployment.nj.gov/labor/myunemployment/ebrights.pdf\"><em><strong>ebrights.pdf</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?rlz=1C1CHBF_enUS916US916&#x26;sxsrf=ALeKk00WUV84YAF23FbQrf3BgL3z5aPsQA%3A1601831146633&#x26;ei=6gB6X_2JJqbm_QaN-K3QAg&#x26;q=reddit+nj+unemployment+appeal+form&#x26;oq=reddit+nj+unemployment+appeal+form&#x26;gs_lcp=CgZwc3ktYWIQAzIFCCEQqwI6BAgAEEc6BAgjECc6BQgAEJECOgIIADoFCC4QsQM6CAguELEDEIMBOggIABCxAxCDAToICC4QxwEQowI6BAgAEEM6CggAELEDEIMBEEM6BQgAELEDOgcIABAUEIcCOgQIABAKOgYIABAWEB46CAgAEBYQChAeOgUIIRCgAToICCEQFhAdEB5QhDBY6oIBYIWFAWgBcAV4AIABZ4gB9hOSAQQzNC4xmAEAoAEBqgEHZ3dzLXdpesgBCMABAQ&#x26;sclient=psy-ab&#x26;ved=0ahUKEwj9pvCDtpvsAhUmc98KHQ18CyoQ4dUDCA0&#x26;uact=5\"><em><strong>reddit nj unemployment appeal form - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://old.reddit.com/r/newjersey/comments/gobra1/friday_megathread/\"><em><strong>Friday MegaThread :newjersey</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=unemployment+appeal+program+code&#x26;rlz=1C1CHBF_enUS916US916&#x26;oq=unemployment+appeal+program+code&#x26;aqs=chrome.0.69i59.17260j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>unemployment appeal program code - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=11%3A00+am+pst&#x26;rlz=1C1CHBF_enUS916US916&#x26;oq=11&#x26;aqs=chrome.1.69i57j35i39j0l3j69i60l2j69i61.3751j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>11:00 am pst - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/settings/2114927300735556507\"><em><strong>Blogger:Settings</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/posts/2114927300735556507?hl=en\"><em><strong>Blogger:Posts</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/adsense/new/u/0/pub-7131725540181116/myads/sites\"><em><strong>Overview -- GoogleAdSense</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/resourcerepo2/deploys/60e4106f1d19db0008b50dbc\"><em><strong>Deploy details |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/my-gists\"><em><strong>bgoonz/my-gists</strong></em></a></li>\n<li>[✅] <a href=\"https://www.stackbit.com/blog/gatsby-search/\"><em><strong>Adding Search to Your GatsbySite</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/QY3DFFD6SA/explorer/browse/static-server?searchMode=search\"><em><strong>Index |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/guides/building-search-ui/getting-started/js/\"><em><strong>Getting Started | Building Search UI | Guide | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/algolia/create-instantsearch-app\"><em><strong>algolia/create-instantsearch-app: ⚡️ Build InstantSearch apps at thespeed of thought</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/github/algolia/doc-code-samples/tree/master/InstantSearch.js/getting-started?file=/src/app.js\"><em><strong>ais-ecommerce-demo-app -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://go.algolia.com/thankyou_featurerequest_personalization.html?aliId=eyJpIjoidVdtZWMyVkNLVDdBakVlaCIsInQiOiJxK2JHbzZ3K0ZobGh6bFJVdnBwVkVRPT0ifQ%253D%253D\"><em><strong>Requestsubmitted!</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/apis/configuration/api-key/\"><em><strong>apiKey | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/apis/configuration/api-key/#examples\"><em><strong>apiKey | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/netlify-plugin/quick-start/#link-your-site-to-algolia\"><em><strong>Quick Start | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete/\"><em><strong>What Is Autocomplete? | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/api-reference/widgets/autocomplete/js/#connector\"><em><strong>autocomplete | InstantSearch.js | API parameters | API Reference |AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/docs/adding-search-with-algolia/\"><em><strong>Adding Search with Algolia |Gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/1125968/how-do-i-force-git-pull-to-overwrite-local-files\"><em><strong>version control - How do I force \"git pull\" to overwrite local files?- StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=github+libris+theme&#x26;oq=github+libris+theme&#x26;aqs=chrome..69i57j69i64.4112j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>github libris theme - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/?stackbit=3482d4890e1b69d678d1f55054a7c556b45321a695dbb1c54140dd6029c46013\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/edit/master/src/pages/index.md\"><em>**Editing BGOONZ</em>BLOG<em>2.0/index.md at master ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://accounts.lambdatest.com/login\"><em><strong>Login - LambdaTest</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/shopify-sanity-nextjs-demo\"><em><strong>bgoonz/shopify-sanity-nextjs-demo</strong></em></a></li>\n<li>[✅] <a href=\"https://coolx10.com/window-resizer/welcome.php\"><em><strong>Window Resizer</strong></em></a></li>\n<li>[✅] <a href=\"https://hull.dev/\"><em><strong>HULL</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sanity.io/manage/personal/project/y2r12zyg\"><em><strong>HULL -- Shopify Starter -- Overview |Sanity.io</strong></em></a></li>\n<li>[✅] <a href=\"https://hull-shopify-starter-pearl.vercel.app/studio/desk/__edit__80c8de4a-0eff-4710-8073-3692c509c168%2Ctype%3Dcollection\"><em><strong>HULL --Sanity</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/plugins\"><em><strong>Plugins | Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/netlify-plugin/front-end/\"><em><strong>Front-End Configuration | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/netlify-plugin/quick-start/\"><em><strong>Quick Start | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/crawlers/create\"><em><strong>Create a Crawler | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda/blob/fbcf27d3b40db5c242918c8fc0771815598fe4ff/index.html\"><em><strong>Lambda/index.html at fbcf27d3b40db5c242918c8fc0771815598fe4ff ·bgoonz/Lambda</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326/\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/?stackbit=3482d4890e1b69d678d1f55054a7c556b45321a695dbb1c54140dd6029c46013#/\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>\n<p>[✅] <a href=\"https://www.stackbit.com/blog/open-authoring-netlifycms/\"><em><strong>Creating a JAMstack Site with Open Authoring Using NetlifyCMS</strong></em></a></p>\n<ul>\n<li>[✅] <a href=\"https://css-tricks.com/netlify-cms-open-authoring/\"><em><strong>Netlify CMS Open Authoring |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://ragequit.tips/resources/index.html\"><em><strong>Burnout Resources -RageQuit.tips</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/open-authoring/\"><em><strong>Open Authoring | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/github-backend/\"><em><strong>GitHub | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/deploy-preview-links/\"><em><strong>Deploy Preview Links | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/add-to-your-site/\"><em><strong>Add to Your Site | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlifycms.org/docs/configuration-options/\"><em><strong>Configuration Options | Netlify CMS | Open-Source Content ManagementSystem</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/visitor-access/oauth-provider-tokens/#using-an-authentication-provider\"><em><strong>Use OAuth provider tokens on your site | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/tools/crawler/apis/configuration/app-id/#examples\"><em><strong>appId | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/provision/#/provision\"><em><strong>Analytics</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/jobs/companies/spotify#jobs\"><em><strong>Spotify Jobs &#x26; Careers - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.linkedin.com/notifications/\"><em><strong>Notifications | LinkedIn</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog.netlify.app/docs/gallery\"><em><strong>Gist Archive</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/UsefulResourceRepo2.0\"><em><strong>bgoonz/UsefulResourceRepo2.0</strong></em></a></li>\n<li>[✅] <a href=\"https://resourcerepo2.netlify.app/#.\"><em>**Snapshot ofC:\\Users\\bryan\\Downloads\\RESOURCE</em>REPO20\\UsefulResourceRepo2.0**_</a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=git+pull+accept+all+incoming+changes&#x26;oq=git+pull+accept+all+incoming+changes&#x26;aqs=chrome..69i57.4984j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>git pull accept all incoming changes - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://code.visualstudio.com/docs/nodejs/debugging-recipes\"><em><strong>JavaScript Debugging Recipes for Visual StudioCode</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Algos-Codebase\"><em><strong>bgoonz/Data-Structures-Algos-Codebase</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/APPACADEMY-RESOURCES/tree/master/_MShuff/deep-dives\"><em>**APPACADEMY-RESOURCES/\\</em>MShuff/deep-dives at master ·Web-Dev-Collaborative/APPACADEMY-RESOURCES**_</a></li>\n<li>[✅] <a href=\"https://github.com/conda/conda/blob/master/docs/source/user-guide/troubleshooting.rst\"><em><strong>conda/troubleshooting.rst at master ·conda/conda</strong></em></a></li>\n<li>[✅] <a href=\"https://phoenixnap.com/kb/how-to-install-python-3-ubuntu\"><em><strong>How to Install Python 3 on Ubuntu 18.04 or 20.04{Step-by-Step}</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/LambdaSchool\"><em><strong>Lambda School, Inc.</strong></em></a></li>\n<li>[✅] <a href=\"https://www.programiz.com/python-programming/examples/palindrome\"><em><strong>Python Program to Check Whether a String is Palindrome orNot</strong></em></a></li>\n<li>[✅] <a href=\"https://www.geeksforgeeks.org/python-program-check-string-palindrome-not/\"><em><strong>Python program to check if a string is palindrome or not -GeeksforGeeks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.mygreatlearning.com/blog/palindrome-in-python/\"><em><strong>Palindrome in Python | How to check palindrome number inpython</strong></em></a></li>\n<li>[✅] <a href=\"https://www.edureka.co/blog/python-program-to-check-palindrome/\"><em><strong>Python Program to Check a Number or String is Palindrome |Edureka</strong></em></a></li>\n<li>[✅] <a href=\"https://www.journaldev.com/23647/python-reverse-string\"><em><strong>Python Reverse String - 5 Ways and the Best One -JournalDev</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/55441788/checking-if-a-string-is-a-palindrome-codesignal-test-case-problem\"><em><strong>c - Checking if a string is a palindrome (CodeSignal test case problem)- StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/66501087/codesignal-reverseparentheses-failing-one-case\"><em><strong>javascript - CodeSignal reverseParentheses Failing one case - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?sxsrf=ALeKk02o_1GGpnEyrpRu3gRyXLrY-oKtvQ:1628250327227&#x26;q=%22codesignal%22+remove+duplicate+words&#x26;sa=X&#x26;ved=2ahUKEwiC6--SqZzyAhXXWc0KHabUDgwQ5t4CegQIDBAD&#x26;biw=1424&#x26;bih=635\"><em><strong>\"codesignal\" remove duplicate words - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ashishdotme?tab=repositories\"><em><strong>ashishdotme (Ashish Patel) /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ashishdotme/courses.ashish.me\"><em><strong>ashishdotme/courses.ashish.me: 🎓 collection of some of the courses Ihave completed over theyears.</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/settings\"><em><strong>Settings - DEV Community 👩‍💻👨‍💻</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ekand/python\"><em><strong>ekand/python: Exercism exercises inPython.</strong></em></a></li>\n<li>[✅] <a href=\"https://towardsdatascience.com/open-source-tools-for-fast-computer-vision-model-building-b39755aab490\"><em><strong>Open Source Tools for Fast Computer Vision Model Building | by EricHofesmann | Jun, 2021 | Towards DataScience</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=install+requirements.txt&#x26;oq=install+requ&#x26;aqs=chrome.0.0i512l2j69i57j0i512l4j69i65.4091j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>install requirements.txt - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://ourcodeworld.com/articles/read/109/how-to-solve-filename-too-long-error-in-git-powershell-and-github-application-for-windows\"><em><strong>How to solve \"filename too long\" error in git (Powershell and GitHubApplication) for windows | Our CodeWorld</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ashishdotme/code.ashish.me\"><em><strong>ashishdotme/code.ashish.me: 🎓 coding exercises from leetcode,hackerrank, codesignaletc.</strong></em></a></li>\n<li>[✅] <a href=\"https://notes.ashish.me/design-patterns/template-pattern\"><em><strong>Template pattern | Ashish Patel'sNotes</strong></em></a></li>\n<li>[✅] <a href=\"https://careerkarma.com/blog/python-reverse-string/\"><em><strong>Python Reverse String: A Step-By-Step Guide | CareerKarma</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/PYTHON-cb857bd3fa4b4940928842a94dce856d\"><em><strong>PYTHON</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschoolsso.okta.com/login/login.htm?fromURI=%2Fapp%2FUserHome\"><em><strong>lambdaschool-org-177932 - SignIn</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/me/stories/drafts\"><em><strong>Your stories</strong></em></a></li>\n<li>[✅] <a href=\"https://www.notion.so/D3-c05c030fa75e4d428f10f3c0d95d85ff\"><em><strong>D3</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bootcamp42/s/python/~/settings/share\"><em><strong>Python Data Structures Repo &#x26; Website -Python</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=all+trees+are+graphs&#x26;oq=all+trees+are+graphs&#x26;aqs=chrome..69i57j0i512j0i22i30.5442j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>all trees are graphs - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/611d837c13546a236c5e3d72\"><em><strong>Deploy details |Deploys</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/8f5b8523670ec6b4fc7b6b4111d0c68a\"><em><strong>madlibs</strong></em></a></li>\n<li>[✅] <a href=\"https://devdecs42.herokuapp.com/jekyll~4/\"><em><strong>Jekyll 4 documentation ---DevDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/side-projects-42/devdocs\"><em><strong>side-projects-42/devdocs</strong></em></a></li>\n<li>[✅] <a href=\"https://devdecs42.herokuapp.com/\"><em><strong>DevDocs API Documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Archive-42/dev-docs-static/blob/master/public/docs/javascript/functions.md\"><em><strong>dev-docs-static/functions.md at master ·Archive-42/dev-docs-static</strong></em></a></li>\n<li>[✅] <a href=\"https://app.codesignal.com/test/iqXBHYsNcPs6GDDxo/task/aEt5yHbESzFSr9yBY\"><em><strong>CodeSignal</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bootcamp42/s/python/resources/links\"><em><strong>Links -Python</strong></em></a></li>\n<li>[✅] <a href=\"https://auth.tdameritrade.com/oauth?client_id=TDARETAILWEB%40AMER.OAUTHAP&#x26;cv=default&#x26;response_type=code&#x26;redirect_uri=https%3A%2F%2Finvest.ameritrade.com%2Fgrid%2Fm%2Fcafelogin&#x26;code_challenge=8duYy3SxiCuXWVuvqRA6vzLW-6FlDEo5EtG4769LtFM&#x26;code_challenge_method=S256&#x26;exp=1628849544502&#x26;lang=en-us\"><em><strong>TD AmeritradeAuthentication</strong></em></a></li>\n</ul>\n</li>\n<li>[✅] <a href=\"https://lambda-resources.netlify.app/sitemap#.\"><em><strong>Lambda StudentResources</strong></em></a></li>\n<li>[✅] <a href=\"https://colab.research.google.com/drive/1Od6PSVwt0pqP6Iko09In0reDVftWMK1F?usp=sharing\"><em><strong>Searching.ipynb -Colaboratory</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.python.org/3/library/stdtypes.html\"><em><strong>Built-in Types --- Python 3.9.6documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://fiftyone-users.slack.com/signout/done?return_to_ssb=1\"><em><strong>Signed Out |Slack</strong></em></a></li>\n<li>[✅] <a href=\"https://coding-coach.slack.com/signout/done?return_to_ssb=1\"><em><strong>Signed Out |Slack</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/lambda-resources/overview\"><em><strong>lambda-resources | Siteoverview</strong></em></a></li>\n<li>[✅] <a href=\"https://lambda-resources.netlify.app/\"><em><strong>Lambda Student Resources</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda/commit/24c4b3f68cc00d4feef3422461552e07f7111c24\"><em><strong>-update ·bgoonz/Lambda@24c4b3f</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/8289805/getting-rid-of-bullet-points-from-ul\"><em><strong>html - Getting rid of bullet points from &#x3C;ul> - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/35702705/is-there-a-way-to-change-the-css-resize-corners-position\"><em><strong>javascript - Is there a way to change the CSS resize corner'sposition? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://webdevresourc-it76430.slack.com/signout/done?return_to_ssb=1\"><em><strong>Signed Out |Slack</strong></em></a></li>\n<li>[✅] <a href=\"https://app.slack.com/client/T4JUEB3ME/C4JUEB796\"><em><strong>Slack | announcements | Students at LambdaSchool</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/lambda-resources/plugins\"><em><strong>Plugins |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/netlify/a38fc1bf-b302-46e9-bb86-bb318739462e\"><em><strong>Netlify Crawler | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/CXZHBHM9AJ/indices\"><em><strong>Indices | Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/CXZHBHM9AJ/api-keys/all\"><em><strong>API Keys |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/almanac/properties/s/scrollbar/\"><em><strong>scrollbar |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/\"><em><strong>Google</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/bgoonz/blob/master/README.md\"><em><strong>bgoonz/README.md at master ·bgoonz/bgoonz</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/learn\"><em><strong>Learn to Code --- For Free --- Coding Courses for BusyPeople</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/what-is-recursion-in-javascript/\"><em><strong>What is Recursion? A Recursive Function Explained with JavaScript CodeExamples</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/react-testing-library-tutorial-javascript-example-code/\"><em><strong>React Testing Library -- Tutorial with JavaScript CodeExamples</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/python-vs-javascript-what-are-the-key-differences-between-the-two-popular-programming-languages/\"><em><strong>Python VS JavaScript -- What are the Key Differences Between The TwoPopular ProgrammingLanguages?</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/git-reset-to-remote-head-how-to-reset-a-remote-branch-to-origin/\"><em><strong>Git Reset to Remote Head -- How to Reset a Remote Branch toOrigin</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/ascii-table-hex-to-ascii-value-character-code-chart-2/\"><em><strong>ASCII Table -- Hex to ASCII Value Character CodeChart</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/osi-model-networking-layers-explained-in-plain-english/\"><em><strong>The OSI Model -- The 7 Layers of Networking Explained in PlainEnglish</strong></em></a></li>\n<li>[✅] <a href=\"https://www.freecodecamp.org/news/node-module-exports-explained-with-javascript-export-function-examples/\"><em><strong>Node Module Exports Explained -- With JavaScript Export FunctionExamples</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/random-static-html-page-deploy/blob/master/blog.png\"><em><strong>random-static-html-page-deploy/blog.png at master ·bgoonz/random-static-html-page-deploy</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/DATA_STRUC_PYTHON_NOTES\"><em>**bgoonz/DATA</em>STRUC<em>PYTHON</em>NOTES**_</a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/My-Medium-Blog/#C:/MY-WEB-DEV/MEDIUM/My-Medium-Blog\"><em><strong>Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=github+markdown+css&#x26;oq=github+markdown+css&#x26;aqs=chrome..69i57j0i512l2j0i22i30l7.3696j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>github markdown css - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sindresorhus/github-markdown-css\"><em><strong>sindresorhus/github-markdown-css: The minimal amount of CSS toreplicate the GitHub Markdownstyle</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/tuzz/3331384\"><em><strong>Github Markdown Stylesheet</strong></em></a></li>\n<li>[✅] <a href=\"https://master--bgoonz-blog.netlify.app/\"><em><strong>Web-Dev-Hub</strong></em></a></li>\n<li>[✅] <a href=\"https://search.freefind.com/find.html?si=14588965&#x26;pid=a\"><em><strong>FreeFind SiteSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://githtmlpreview.netlify.app/?https://github.com/bgoonz/bgoonz/blob/master/index.html\"><em><strong>Document</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/post/edit/2114927300735556507/3098975521105160252\"><em><strong>Post:Edit</strong></em></a></li>\n<li>[✅] <a href=\"https://draft.blogger.com/blog/loading\"><em><strong>Loading</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bootcamp42/s/python/resources/ascii-table\"><em><strong>ASCII TAble -Python</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3resource.com/javascript-exercises/javascript-recursion-function-exercise-1.php\"><em><strong>JavaScript recursion function: Calculate the factorial of a number -w3resource</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/algo-prac\"><em><strong>bgoonz/algo-prac</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326/#/docs/articles/dev-dep/\"><em><strong>bgoonz - StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/867\"><em>**(1) Merge pull request #866 from bgoonz/preview by bgoonz · PullRequest #867 ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://bryanguner.medium.com/javascript-algorithmic-interview-questions-and-considerations-e4e401bbc635\"><em><strong>JavaScript Algorithmic Interview Questions And Considerations | byBryan Guner | Aug, 2021 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://bryanguner.medium.com/an-introduction-to-curl-using-githubs-api-b85ddbc0f852\"><em><strong>An introduction to curl using GitHub's API. | by Bryan Guner | Aug,2021 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://everything.curl.dev/opensource/devel\"><em><strong>Development - Everythingcurl</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/rest/guides/getting-started-with-the-rest-api\"><em><strong>Getting started with the REST API - GitHubDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=wm#sent/KtbxLthNPswxvZdcWqZmVJKszflZZkWmgB\"><em><strong>(no subject) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Notes/blob/master/resources/General/W7D3/binarysearch.gif\"><em><strong>Data-Structures-Notes/binarysearch.gif at master ·bgoonz/Data-Structures-Notes</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/u/0/project/lambda-768c2/functions\"><em><strong>Lambda -- Functions -- Firebaseconsole</strong></em></a></li>\n<li>[✅] <a href=\"https://console.firebase.google.com/u/0/\"><em><strong>Firebase console</strong></em></a></li>\n<li>[✅] <a href=\"https://console.cloud.google.com/apis/enableflow?apiid=container.googleapis.com&#x26;_ga=2.129451084.1362621627.1630402858-562644514.1630402816&#x26;project=studious-pulsar-298821&#x26;folder=&#x26;organizationId=\"><em><strong>Enable access to API -- APIs &#x26; Services -- My Project 78672 -- GoogleCloudPlatform</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/webdevhub/awesome-list-of-awesome-lists-f1bbcd632fd0\"><em><strong>Here's the expanded list:. https://github.com/igorbarinov/awesome-b...| by Bryan Guner | WebDevHub | Aug, 2021 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://alvarotrigo.com/fullPage/\"><em><strong>fullPage.js | One Page Scroll sections SitePlugin</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/react-fullpage\"><em><strong>Web-Dev-Collaborative/react-fullpage: Official React.js wrapper forfullPage.jshttps://alvarotrigo.com/react-fullpage/</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Notes/blob/master/resources/General/W7D4/W7_filled_in_LOs.md\"><em>**Data-Structures-Notes/W7</em>filled<em>in</em>LOs.md at master ·bgoonz/Data-Structures-Notes**_</a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Notes\"><em><strong>bgoonz/Data-Structures-Notes: for anyone who mightbenefit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Data-Structures-Notes/blob/master/notes/D1/sept-official/lo-s/W07D1-LOs/W07D1-LOs-explained.md\"><em><strong>Data-Structures-Notes/W07D1-LOs-explained.md at master ·bgoonz/Data-Structures-Notes</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/GIT-CDN-FILES\"><em><strong>bgoonz/GIT-CDN-FILES</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=big+o+cheat+sheet&#x26;sxsrf=AOaemvIH6clbTtbfDGE0az4-peAuZyqZLQ:1630385669910&#x26;source=lnms&#x26;tbm=isch&#x26;sa=X&#x26;ved=2ahUKEwiDiM71u9ryAhVjg-AKHX6nApcQ_AUoAXoECAEQAw&#x26;biw=1424&#x26;bih=684#imgrc=_rh3zDlRBMK15M\"><em><strong>big o cheat sheet - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=trump+joker+hillary+harvey+two+face&#x26;tbm=isch&#x26;ved=2ahUKEwj59dGQ0tryAhXXqHIEHV4ZDpEQ2-cCegQIABAA&#x26;oq=trump+joker+hillary+harvey+two+face&#x26;gs_lcp=CgNpbWcQA1D4cVi9fmDZf2gAcAB4AIABQYgB-AOSAQE5mAEAoAEBqgELZ3dzLXdpei1pbWfAAQE&#x26;sclient=img&#x26;ei=UM0tYfmNCtfRytMP3rK4iAk&#x26;bih=684&#x26;biw=1424#imgrc=UlagAQoNoxFaSM\"><em><strong>trump joker hillary harvey two face - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://awwmemes.com/i/2833186\"><em><strong>🐣 25+ Best Memes About Two Faces | Two FacesMemes</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/imgres?imgurl=http%3A%2F%2Fi.imgur.com%2F1Hn09j3.jpg&#x26;imgrefurl=https%3A%2F%2Fwww.reddit.com%2Fr%2Fpics%2Fcomments%2F4qpnnp%2Fchoose%2F&#x26;tbnid=LJ_HvAHqRJ6vVM&#x26;vet=12ahUKEwj59dGQ0tryAhXXqHIEHV4ZDpEQMygBegQIARAT..i&#x26;docid=D1-LYNaxtqHlLM&#x26;w=1024&#x26;h=385&#x26;q=trump%20joker%20hillary%20harvey&#x26;ved=2ahUKEwj59dGQ0tryAhXXqHIEHV4ZDpEQMygBegQIARAT\"><em><strong>trump joker hillary harvey - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/curl/curl/\"><em><strong>curl/curl: A command line tool and library for transferring data withURL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP,HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP,SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP. libcurl offers amyriad of powerful features</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/spaces\"><em><strong>Spaces - GitBook</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/everything-curl\"><em><strong>bgoonz/everything-curl</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/everything-curl/source/style.html\"><em><strong>Code style - Everythingcurl</strong></em></a></li>\n<li>[✅] <a href=\"https://codebeautify.org/html-to-markdown\"><em><strong>Best HTML to MarkdownConverter</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/styleguide\"><em><strong>Web-Dev-Collaborative/styleguide: GitBook.com HTML/CSS StyleGuide</strong></em></a></li>\n<li>[✅] <a href=\"https://www.electronforge.io/?&#x26;utm_source=marketing_site&#x26;utm_medium=referral&#x26;utm_campaign=explore\"><em><strong>Getting Started - ElectronForge</strong></em></a></li>\n<li>[✅] <a href=\"https://css-tricks.com/perfect-full-page-background-image/\"><em><strong>Perfect Full Page Background Image |CSS-Tricks</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Archive-42/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md\"><em><strong>linkedin-skill-assessments-quizzes/python-quiz.md at master ·Archive-42/linkedin-skill-assessments-quizzes</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TonySo88/nasa-photo-of-the-day/tree/Tony-So2\"><em><strong>TonySo88/nasa-photo-of-the-day atTony-So2</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TonySo88/nasa-photo-of-the-day/commits?author=TonySo88\"><em><strong>Commits ·TonySo88/nasa-photo-of-the-day</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TonySo88/nasa-photo-of-the-day\"><em><strong>TonySo88/nasa-photo-of-the-day</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/xenodochial-field-h4rfd?file=/src/index.js\"><em><strong>CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://archive.org/\"><em><strong>Internet Archive: Digital Library of Free &#x26; Borrowable Books, Movies,Music &#x26; Wayback Machine</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/BrentOzarULTD/BrentOzar.com-Demos/commits?author=BrentOzar\"><em><strong>Commits ·BrentOzarULTD/BrentOzar.com-Demos</strong></em></a></li>\n<li>[✅] <a href=\"https://www.brentozar.com/sql-constantcare/\"><em><strong>SQL ConstantCare® - Brent OzarUnlimited®</strong></em></a></li>\n<li>[✅] <a href=\"https://web-dev-hub.com/2021/05/05/585/comment-page-1/?unapproved=1&#x26;moderation-hash=63c29acaf8530be4e2d08321f02915b9#comment-1\"><em><strong>Web Development ResourcesSite</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=stack+overflow+postgres+database&#x26;oq=stack+overflow+postgres+database&#x26;aqs=chrome..69i57j69i64l2.6496j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>stack overflow postgres database - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.bortzmeyer.org/stackoverflow-to-postgresql.pdf\"><em><strong>stackoverflow-to-postgresql.pdf</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.blog/2020/10/14/improve-database-performance-with-connection-pooling/\"><em><strong>Improve database performance with connection pooling - Stack OverflowBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://launchdarkly.com/\"><em><strong>Feature Flag &#x26; Toggle Management |LaunchDarkly</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.launchdarkly.com/home/code/github-actions\"><em><strong>GitHub Actions</strong></em></a></li>\n<li>[✅] <a href=\"https://launchdarkly.com/features/data-export/\"><em><strong>Data Export for Feature Flag Events |LaunchDarkly</strong></em></a></li>\n<li>[✅] <a href=\"https://launchdarkly.com/contact-us/\"><em><strong>Contact Us | LaunchDarkly</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/peterpaulorange?tab=repositories\"><em><strong>peterpaulorange /Repositories</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/peterpaulorange/pythonstuff\"><em><strong>peterpaulorange/pythonstuff</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/peterpaulorange/awesome-cheatsheets\"><em><strong>peterpaulorange/awesome-cheatsheets: 👩‍💻👨‍💻 Awesome cheatsheets forpopular programming languages, frameworks and development tools. Theyinclude everything you should know in one singlefile.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/peterpaulorange/interactive-coding-challenges\"><em><strong>peterpaulorange/interactive-coding-challenges: 120+ interactive Pythoncoding interview challenges (algorithms and data structures). IncludesAnkiflashcards.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/peterpaulorange/pytorch-tutorial\"><em><strong>peterpaulorange/pytorch-tutorial: PyTorch Tutorial for Deep LearningResearchers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/peterpaulorange/node-js-web-scrapper\"><em><strong>peterpaulorange/node-js-web-scrapper: Scrap, grab website images,create pdf from URL etc using npm puppeteermodule</strong></em></a></li>\n<li>[✅] <a href=\"https://cloudconvert.com/pdf-to-html\"><em><strong>PDF to HTML | CloudConvert</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pdfconvertonline.com/results.php\"><em><strong>PDF Conversion Results</strong></em></a></li>\n<li>\n<p>[✅] <a href=\"https://www.google.com/search?q=javascript+display+all+other+html+files+as+iframes&#x26;oq=javascript+display+all+other+html+files+as+iframes&#x26;aqs=chrome..69i57j69i64.9519j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>javascript display all other html files as iframes - GoogleSearch</strong></em></a></p>\n<ul>\n<li>[✅] <a href=\"https://blog.logrocket.com/the-ultimate-guide-to-iframes/\"><em><strong>The ultimate guide to iframes - LogRocketBlog</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies\"><em><strong>From object to iframe --- other embedding technologies - Learn webdevelopment |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#security_concerns\"><em><strong>From object to iframe --- other embedding technologies - Learn webdevelopment |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://mdn.github.io/learning-area/html/multimedia-and-embedding/other-embedding-technologies/iframe-detail.html\"><em><strong>Iframe with basicdetails</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mdn/learning-area\"><em><strong>mdn/learning-area: Github repo for the MDN LearningArea.</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/overview\"><em><strong>bgoonz-blog | Siteoverview</strong></em></a></li>\n<li>[✅] <a href=\"https://learning-redux42.netlify.app/\"><em><strong>Learning Redux</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/@bgoonz/Blank-REPL\"><em><strong>Blank REPL - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://ringcentral.github.io/engage-voice-embeddable/#environment\"><em><strong>RingCentral Engage Voice Widget demopage</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/handsfree-for-website\"><em><strong>Web-Dev-Collaborative/handsfree-for-website: Turn on voice control inyour website. Demo-></strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/annyang\"><em><strong>Web-Dev-Collaborative/annyang: Speech recognition for yoursite</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/jj09/voiceCmdr\"><em><strong>jj09/voiceCmdr: Add voice commands to your website with easy and simpleway</strong></em></a></li>\n<li>[✅] <a href=\"http://bookslib.azurewebsites.net/#/\"><em><strong>Books Lib</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/1226714/how-to-get-the-browser-to-navigate-to-url-in-javascript\"><em><strong>How to get the browser to navigate to URL in JavaScript - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/2/#inbox\"><em><strong>Inbox (749) - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/dyi/?referrer=yfi_settings\"><em><strong>Facebook</strong></em></a></li>\n<li>[✅] <a href=\"https://app.ringcentral.com/login\"><em><strong>RingCentral</strong></em></a></li>\n<li>[✅] <a href=\"https://discord.com/channels/364486390102097930/681363253607006238\"><em><strong>showcase</strong></em></a></li>\n<li>[✅] <a href=\"https://stackblitz.com/edit/wasm-event-loop-1nzxlp?file=index.js\"><em><strong>wasm-event-loop-1nzxlp -StackBlitz</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/stackblitz/webcontainer-core/blob/main/Supported_frameworks.md\"><em>**webcontainer-core/Supported</em>frameworks.md at main ·stackblitz/webcontainer-core**_</a></li>\n<li>[✅] <a href=\"https://github.com/stackblitz/template-gatsby\"><em><strong>stackblitz/template-gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://stackblitz.com/edit/react-vnwzhh?file=src%2FApp.js\"><em><strong>react-vnwzhh -StackBlitz</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/@bgoonz11/repoutils/access\"><em><strong>@bgoonz11/repoutils -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/gatsby?organization=Web-Dev-Collaborative&#x26;organization=Web-Dev-Collaborative\"><em><strong>Web-Dev-Collaborative/gatsby: Build blazing fast, modern apps andwebsites withReact</strong></em></a></li>\n<li>[✅] <a href=\"https://smallseotools.com/visitor-hit-counter/\"><em><strong>Hit counter | Get Free visitor Counter for yourwebsite</strong></em></a></li>\n<li>[✅] <a href=\"https://sharethis.com/onboarding/\"><em><strong>ShareThis Onboarding: Customize Share Buttons &#x26; Other Tools -ShareThis</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addthis.com/dashboard#rule/pub/ra-60c2b471a965f596/4dsk\"><em><strong>AddThis Dashboard | RuleEditor</strong></em></a></li>\n<li>[✅] <a href=\"https://www.addthis.com/dashboard#gallery/pub/ra-60c2b471a965f596/get-the-code-from-tool/pco/toolmanager\"><em><strong>AddThis Dashboard | Get TheCode</strong></em></a></li>\n<li>[✅] <a href=\"https://login.mailchimp.com/signup/post\"><em><strong>Signup | Mailchimp</strong></em></a></li>\n<li>[✅] <a href=\"https://www.digitaltrends.com/gaming/what-is-discord/#:~:text=Discord%20is%20a%20chat%20app,professional%20communications%20platforms%20like%20Slack.&#x26;text=It%20supports%20video%20calls%2C%20voice,trying%20to%20play%20PC%20games.\"><em><strong>What Is Discord? | DigitalTrends</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/ee53c8080618afb837d86d6ddb524f00\"><em><strong>https://www.powr.io/plugins/social-feed/standalone?id=29101271&#x26;</strong></em></a></li>\n<li>[✅] <a href=\"https://reactjsexample.com/youtube-player-component-for-react/\"><em><strong>YouTube player component forReact</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=react+youtube+slider&#x26;oq=react+youtube+slider&#x26;aqs=chrome..69i57j69i64.6060j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>react youtube slider - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://u-wave.net/react-youtube/\"><em><strong>@u-wave/react-youtube example</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/react-youtube\"><em><strong>bgoonz/react-youtube: YouTube player component forReact.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering\"><em><strong>bgoonz/Revamped-Automatic-Guitar-Effect-Triggering: Using audiosubsequence dynamic time warping to calculate a time agnostic measure ofsimilarity betweenperformances.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering/blob/master/images/image19.jpg\"><em><strong>Revamped-Automatic-Guitar-Effect-Triggering/image19.jpg at master ·bgoonz/Revamped-Automatic-Guitar-Effect-Triggering</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60c354becb12a800170c8ab8/#/introduction\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326#/docs/\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Ethan-Edmond\"><em><strong>Ethan-Edmond (Ethan Edmond)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ft-potluck-planer-05-units3-4\"><em><strong>ft-potluck-planer-05-units3-4</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/embedable-repl-and-integrated-code-space-playground/blob/master/index.html#L60\"><em><strong>embedable-repl-and-integrated-code-space-playground/index.html atmaster ·bgoonz/embedable-repl-and-integrated-code-space-playground</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog-2-0-9c7tjvwyd-bgoonz.vercel.app/style-guide\"><em><strong>Theme NotesTemplate</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz-blog-2-0-iuovoktmh-bgoonz.vercel.app/\"><em><strong>StackbitWeb-Dev-HubTheme</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/\"><em><strong>Welcome to Netlify | Netlify Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.netlify.com/research-program/?_ga=2.152960753.935517234.1624093363-1172220731.1624093363\"><em><strong>Netlify Research Program |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bgoonz-blog/deploys/60ce3a19b2d0e0000781f622\"><em><strong>Deploy details |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://studio.youtube.com/video/rE19nCedpNg/edit\"><em><strong>Video details - YouTubeStudio</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/watch?v=XdEnLMD30AY\"><em><strong>Light Balance: TikTok Dance Compilation 2 -YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/cvvergara/OSGeoLive-doc/wiki/Building-the-docs\"><em><strong>Building the docs · cvvergara/OSGeoLive-docWiki</strong></em></a></li>\n<li>[✅] <a href=\"https://www.archivematica.org/en/docs/archivematica-1.12/getting-started/overview/dashboard/#web-dashboard\"><em><strong>Web-based dashboard | Documentation (Archivematica 1.12.1) |Archivematica: open-source digital preservationsystem</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=iframe+example&#x26;oq=iframe+example&#x26;aqs=chrome..69i57j0i20i263j0l8.2470j0j15&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>iframe example - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ft-potluck-planer-05-units3-4/front-end\"><em><strong>ft-potluck-planer-05-units3-4/front-end</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#search/lyuba.guner%40gmail.com/QgrcJHsNkdVDgXJmjdtplTQnpsxbXPnsMmb\"><em><strong>(no subject) - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://drive.google.com/drive/u/1/folders/1JxZtwBiuuDBOd12d2cJZOc5mmaDg_8OG\"><em>**WEBDEVHUB</em>2 - GoogleDrive**_</a></li>\n<li>[✅] <a href=\"https://drive.google.com/drive/u/4/my-drive\"><em><strong>My Drive - Google Drive</strong></em></a></li>\n<li>[✅] <a href=\"https://photos.google.com/u/0/\"><em><strong>Photos - Google Photos</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=why+use+cass+components+in+react&#x26;oq=why+use+cass+components+in+react+&#x26;aqs=chrome..69i57j33i10i160l3.10551j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>why use cass components in react - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.bitsrc.io/will-react-classes-get-deprecated-because-of-hooks-bb62938ac1f5\"><em><strong>Will React Classes Get Deprecated Because of Hooks? | by FernandoDoglio | Bits andPieces</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/danielleye/react-class-component-vs-function-component-with-hooks-13dg\"><em><strong>React: Class Component VS Function Component with Hooks - DEVCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/danielleye/simple-react-clock\"><em><strong>danielleye/simple-react-clock: simple clock display time using react.Clock1 is a class component and Clock2 is a function component usinghooks</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/36097965/when-to-use-es6-class-based-react-components-vs-functional-es6-react-components\"><em><strong>javascript - When to use ES6 class based React components vs.functional ES6 React components? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.spotify.com/us/\"><em><strong>Listening is everything - Spotify</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/609b2d7c71a5dd0016f36326#/docs/about/\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/branches\"><em>**Branches ·bgoonz/BGOONZ</em>BLOG<em>2.0**</em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/bg-portfolio/overview\"><em><strong>bg-portfolio |Netlify</strong></em></a></li>\n<li>[✅] <a href=\"https://bg-portfolio.netlify.app/\"><em><strong>Bryan Guner Portfolio</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/node-api-helpers/\"><em><strong>Node API Helpers |Gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/\"><em><strong>Gatsby Node APIs |Gatsby</strong></em></a></li>\n<li>[✅] <a href=\"https://devconnected.com/how-to-unstage-files-on-git/\"><em><strong>How To Unstage Files on Git --devconnected</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/@bgoonz11/repoutils\"><em><strong>@bgoonz11/repoutils -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/40344543/convert-all-docx-in-directory-and-subdirectories-recursive-to-md-using-pand\"><em><strong>Convert all .docx in directory and subdirectories (recursive?) to .mdusing Pandoc bash - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ft-potluck-planer-05-units3-4/potluck-landing/blob/master/stackbit-build.sh\"><em><strong>potluck-landing/stackbit-build.sh at master ·ft-potluck-planer-05-units3-4/potluck-landing</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/studio/60d50e6c7cca550016e542d4\"><em><strong>Stackbit App</strong></em></a></li>\n<li>[✅] <a href=\"https://lab.github.com/everydeveloper/introduction-to-node-with-express?overlay=register-box-overlay\"><em><strong>Set up Node.js environment | Introduction to Node with Express |GitHub LearningLab</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/node-express-course\"><em><strong>bgoonz/node-express-course: An introduction to Node.js and Express.jsservers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/node-express-course/pull/5\"><em><strong>Configure Renovate by renovate · Pull Request #5 ·bgoonz/node-express-course</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sanity.io/manage/personal/project/508b8ebj\"><em><strong>Blogv2Sanity -- Overview |Sanity.io</strong></em></a></li>\n<li>[✅] <a href=\"https://npm.runkit.com/react-scripts\"><em><strong>RunKit + npm: react-scripts</strong></em></a></li>\n<li>[✅] <a href=\"https://www.reddit.com/r/reactjs/comments/7kyjjy/what_is_createreactapp_and_what_are_its/\"><em><strong>What Is create-react-app and what are it's alternatives :reactjs</strong></em></a></li>\n<li>[✅] <a href=\"https://ostechnix.com/how-to-rename-multiple-files-at-once-in-linux/\"><em><strong>6 Methods To Rename Multiple Files At Once InLinux</strong></em></a></li>\n<li>[✅] <a href=\"https://devilgate.org/blog/2012/07/02/tip-using-pandoc-to-create-truly-standalone-html-files/\"><em><strong>Tip: using Pandoc to create truly standalone HTML files | Tales FromtheBitface</strong></em></a></li>\n<li>[✅] <a href=\"https://pandoc.org/demos.html\"><em><strong>Pandoc - Demos</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/dfinke/vscode-pandoc/issues/21\"><em><strong>pandoc: command not found · Issue #21 ·dfinke/vscode-pandoc</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/tsertkov/exec-sh\"><em><strong>tsertkov/exec-sh: npm package with >500Mdownloads</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/18308913/how-can-i-resolve-this-error-in-shell-scripting-read-illegal-option-t\"><em><strong>bash - How can I resolve this error in shell scripting: \"read: Illegaloption -t\"? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/46394825/processing-command-line-options-with-multiple-arguments-in-bash\"><em><strong>Processing command line options with multiple arguments in Bash - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://florian-dahlitz.de/blog/build-a-markdown-to-html-conversion-pipeline-using-python#markdown-to-html-converter\"><em><strong>Build A Markdown To HTML Conversion Pipeline Using Python - Blog -FlorianDahlitz</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/DahlitzFlorian/markdown-to-html-generator-article-snippets\"><em><strong>DahlitzFlorian/markdown-to-html-generator-article-snippets: Supportingmaterial for the \"Markdown To HTML Generator\" articleseries</strong></em></a></li>\n<li>[✅] <a href=\"https://pygments.org/\"><em><strong>Welcome! --- Pygments</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=npm+WARN+tar+EPERM%3A+operation+not+permitted%2C+futime&#x26;rlz=1C1UEAD_enUS928US928&#x26;oq=npm+WARN+tar+EPERM%3A+operation+not+permitted%2C+futime&#x26;aqs=chrome..69i57j69i64l2.804j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>npm WARN tar EPERM: operation not permitted, futime - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://chrome.google.com/webstore/detail/linked-booster/nfcldgholonecfckicgfmekkecmnopbi/related?hl=en\"><em><strong>Linked Booster - Chrome WebStore</strong></em></a></li>\n<li>[✅] <a href=\"https://studio.youtube.com/video/Meho-rTWLFU/edit/basic?scroll_to=audience\"><em><strong>Video details - YouTubeStudio</strong></em></a></li>\n<li>[✅] <a href=\"https://www.youtube.com/watch?v=Meho-rTWLFU&#x26;ab_channel=BryanGuner&#x26;t=130s\"><em><strong>W10SAT -YouTube</strong></em></a></li>\n<li>[✅] <a href=\"https://wp-modula.com/free-photoshop-alternatives/\"><em><strong>Top 9 \"best\" free Photoshop alternatives that are actuallyGOOD</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gimp.org/downloads/\"><em><strong>GIMP - Downloads</strong></em></a></li>\n<li>[✅] <a href=\"https://www.techjunkie.com/extend-desktop-chromecast/#:~:text=Extend%20Your%20Desktop%20Using%20Chrome,make%20a%20wirelessly%2Dextended%20display.\"><em><strong>How to Extend your Desktop withChromecast</strong></em></a></li>\n<li>[✅] <a href=\"https://www.citrix.com/glossary/vdi.html#:~:text=The%20virtual%20desktops%20live%20within,system%20image%2C%20typically%20Microsoft%20Windows&#x26;text=Meanwhile%2C%20a%20hypervisor%20creates%2C%20runs,the%20individual%20virtual%20desktop%20environments\"><em><strong>What is VDI? -- Virtual Desktop Infrastructure Definition -Citrix</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/welcome-to-rds\"><em><strong>Welcome to Remote Desktop Services in Windows Server 2016 | MicrosoftDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://portal.azure.com/?quickstart=true#blade/Microsoft_Azure_Resources/QuickstartAnchorServicesBlade/goalId/create-a-web-app\"><em><strong>Create a web app - MicrosoftAzure</strong></em></a></li>\n<li>[✅] <a href=\"https://portal.azure.com/#create/Microsoft.VirtualMachine\"><em><strong>Create a virtual machine - MicrosoftAzure</strong></em></a></li>\n<li>[✅] <a href=\"https://account.microsoft.com/billing/orders/\"><em><strong>Microsoft account | Orderhistory</strong></em></a></li>\n</ul>\n</li>\n<li>[✅] <a href=\"https://discord.com/channels/724736182650667132/724736183439065173\"><em><strong>#just-typin</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/javascript-in-plain-english/stop-using-console-log-in-javascript-d29d6c24dc26\"><em><strong>Stop Using console.log() In JavaScript | by Harsha Vardhan |JavaScript In Plain English | Oct, 2020 |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://miro.medium.com/max/1200/0*t6SE511h7v_N1ask\"><em>*<em>0\\</em>t6SE511h7v</em>N1ask(1200×900)**_</a></li>\n<li>[✅] <a href=\"https://store.google.com/product/chromecast?utm_source=chromecast.com\"><em><strong>Chromecast - 3rd Generation - GoogleStore</strong></em></a></li>\n<li>[✅] <a href=\"https://crypt.codemancers.com/posts/2016-09-16-react-server-side-rendering/\"><em><strong>React.js : Server siderendering</strong></em></a></li>\n<li>[✅] <a href=\"https://us02web.zoom.us/postattendee?id=2\"><em><strong>Post Attendee - Zoom</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/8197089/fatal-error-when-updating-submodule-using-git\"><em><strong>github - Fatal Error when updating submodule using GIT - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/vigilant-easley-8b8c4c/overview\"><em><strong>Site overview |vigilant-easley-8b8c4c</strong></em></a></li>\n<li>[✅] <a href=\"https://discord.com/channels/@me/764569676780929024\"><em><strong>@WilliamVincent</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/rest/reference/search\"><em><strong>Search - GitHub Docs</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/rest/overview/libraries\"><em><strong>Libraries - GitHubDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.github.com/en/rest/overview/resources-in-the-rest-api#user-agent-required\"><em><strong>Resources in the REST API - GitHubDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TBFY/platform/blob/master/docs/index.html\"><em><strong>platform/index.html at master ·TBFY/platform</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/TBFY/general/blob/master/figures/tbfy-logo.png\"><em><strong>general/tbfy-logo.png at master ·TBFY/general</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/shaoxiongji/knowledge-graphs\"><em><strong>shaoxiongji/knowledge-graphs: A collection of research on knowledgegraphs</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/totogo/awesome-knowledge-graph/edit/master/readme.md\"><em><strong>Editing awesome-knowledge-graph/readme.md at master ·totogo/awesome-knowledge-graph</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/GIT-HTML-PREVIEW-TOOL\"><em><strong>bgoonz/GIT-HTML-PREVIEW-TOOL: load HTML using CORS proxy, then processall links, frames, scripts and styles, and load each of them using CORSproxy, so they can be evaluated by thebrowser.</strong></em></a></li>\n<li>[✅] <a href=\"https://githtmlpreview.netlify.app/?https://github.com/TBFY/platform/blob/master/docs/index.html\"><em><strong>TheyBuyForYouTools</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/search\"><em><strong>Google Search Central (formerly Webmasters) | Web SEOResources</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gistoapp.com/\"><em><strong>Gisto - Snippets Made Awesome</strong></em></a></li>\n<li>[✅] <a href=\"https://plugins.jetbrains.com/plugin/15899-babelnet-searcher\"><em><strong>BabelNet Searcher - plugin for IntelliJ IDEs |JetBrains</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codeblocks.org/\"><em><strong>Code::Blocks - Code::Blocks</strong></em></a></li>\n<li>[✅] <a href=\"https://www.mongodb.com/2\"><em><strong>The most popular database for modern apps |MongoDB</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jetbrains.com/webstorm/download/download-thanks.html?platform=windows\"><em><strong>www.jetbrains.com</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/model_search\"><em>**Web-Dev-Collaborative/model</em>search**_</a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/builds/607b62ee00743749d76d235e\"><em><strong>Deploy details | Bryan C Guner'steam</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Useful-Snippets-js\"><em><strong>bgoonz/Useful-Snippets-js: A collection of snippets that might come inhandy, inspired by 30 seconds of code and similarprojects</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/DavidWells/markdown-magic\"><em><strong>DavidWells/markdown-magic: 💫  Automatically format markdown files, syncexternal docs/src code &#x26; make betterdocs</strong></em></a></li>\n<li>[✅] <a href=\"https://wordpress.com/page/navbar982556129.wordpress.com/home\"><em><strong>Edit Page ‹ Web-Dev-Hub ---WordPress.com</strong></em></a></li>\n<li>[✅] <a href=\"https://edabit.com/\"><em><strong>Edabit // Learn to Code with 10,000+ InteractiveChallenges</strong></em></a></li>\n<li>[✅] <a href=\"https://www.codewars.com/\"><em><strong>Achieve mastery through challenge |Codewars</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/\"><em><strong>Create a new Gist</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Coding-Coach/coding-coach\"><em><strong>Coding-Coach/coding-coach: This is the landing page:)</strong></em></a></li>\n<li>[✅] <a href=\"https://mentors.codingcoach.io/?technology=reactjs&#x26;country=US&#x26;language=en\"><em><strong>Coding Coach | English speaking reactjs mentors from UnitedStates</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/links-skelleton/blob/master/index.html\"><em><strong>links-skelleton/index.html at master ·Web-Dev-Collaborative/links-skelleton</strong></em></a></li>\n<li>[✅] <a href=\"https://links4242.netlify.app/\"><em><strong>My Links</strong></em></a></li>\n<li>[✅] <a href=\"https://answers.netlify.com/t/git-submodule-pull-problem/15118\"><em><strong>Git submodule pull problem - Support - Netlify SupportForums</strong></em></a></li>\n<li>[✅] <a href=\"https://us05web.zoom.us/postattendee?id=3\"><em><strong>Post Attendee - Zoom</strong></em></a></li>\n<li>[✅] <a href=\"https://lambdaschool.instructure.com/courses/1079/pages/objective-1-explain-function-scope?module_item_id=565583\"><em><strong>Objective 1 - explain function scope: WEB43 - 1.3 - JavaScriptFundamentals</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/web-module-challenge-scope-and-closure\"><em><strong>bgoonz/web-module-challenge-scope-and-closure</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/\"><em><strong>GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://www.pluralsight.com/guides/javascript-closures\"><em><strong>Learn How to Utilize JavaScript Closures | Pluralsight |Pluralsight</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/31454474/understanding-private-variables-closure-in-javascript-with-specific-example\"><em><strong>Understanding Private Variables (Closure?) in Javascript with specificexample - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?cid=D21009FDD967A241&#x26;id=D21009FDD967A241%21337463&#x26;parId=D21009FDD967A241%21336808&#x26;o=OneUp\"><em>**pr2</em>whiteboarding-closures.md -OneDrive**_</a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/3469885/somevariable-vs-somevariable-in-javascript\"><em><strong>increment - ++someVariable vs. someVariable++ in JavaScript - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?tab=rm&#x26;ogbl#inbox/FMfcgxwLtZrBDbHnHnjmssrRKcFNTWhN\"><em><strong>web-module-challenge-scope-and-closure/index.js a... -bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/mwahl1/web-module-challenge-scope-and-closure/blob/marshal-wahl/index.js\"><em><strong>web-module-challenge-scope-and-closure/index.js at marshal-wahl ·mwahl1/web-module-challenge-scope-and-closure</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/owalker2014/web-module-challenge-scope-and-closure/blob/Oluwatobi-Walker/index.js\"><em><strong>web-module-challenge-scope-and-closure/index.js at Oluwatobi-Walker ·owalker2014/web-module-challenge-scope-and-closure</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random\"><em><strong>Math.random() - JavaScript |MDN</strong></em></a></li>\n<li>[✅] <a href=\"https://replit.com/login\"><em><strong>Log In - Replit</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/live-examples/tree/master/live-examples\"><em><strong>live-examples/live-examples at master ·bgoonz/live-examples</strong></em></a></li>\n<li>[✅] <a href=\"https://www.w3resource.com/javascript-exercises/javascript-math-exercise-1.php\"><em><strong>JavaScript Math: Convert a number from one base to another -w3resource</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=github+javascript+snippets&#x26;oq=github+javascript+snippets&#x26;aqs=chrome..69i57j0i22i30j69i64.8007j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>github javascript snippets - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/30-seconds/30-seconds-of-code\"><em><strong>30-seconds/30-seconds-of-code: Short JavaScript code snippets for allyour developmentneeds</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/JSsnippets/JavaScript-snippets/edit/master/README.md\"><em><strong>Editing JavaScript-snippets/README.md at master ·JSsnippets/JavaScript-snippets</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/thejhh/js-snippets\"><em><strong>thejhh/js-snippets: JavaScript SnippetCollection</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/paulcarroty/JavaScript-Snippets\"><em><strong>paulcarroty/JavaScript-Snippets: The useful pieces ofcode</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/baa4c9dbdb87583d0c2dda21f8e29b6b\"><em><strong>js-snippets-markdown.md</strong></em></a></li>\n<li>[✅] <a href=\"https://app.stackbit.com/edit/60bce5258de8ff001726fd17/summary\"><em><strong>StackbitApp</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/z5u5myu3wvyl/entries?id=JpalPD0FPcPN0NFq&#x26;order.fieldId=updatedAt&#x26;order.direction=descending&#x26;displayedFieldIds=contentType&#x26;displayedFieldIds=updatedAt&#x26;displayedFieldIds=author\"><em><strong>Content --- Gatsby Starter for Contentful --- master-2021-06-06 ---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/i31un640bs1z/entries/TPWm5AaWTabpjVt92OV9j\"><em><strong>Bryan Guner --- Content --- mywebdev --- master-2021-05-07 ---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.gatsbyjs.com/dashboard/organization/f9296337-b3bc-4dfc-8a42-2af2b6425579/sites\"><em><strong>Gatsby Cloud | bgoonz |Sites</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/z5u5myu3wvyl/api/keys/6v4youAWjf3lvpvHmi44fy\"><em><strong>APIs --- Gatsby Starter for Contentful --- master-2021-06-06 ---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/developers/docs/concepts/apis/?utm_source=webapp&#x26;utm_medium=knowledge-base-content_apis&#x26;utm_campaign=in-app-help\"><em><strong>API basics |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/help/setup-content-preview/?utm_source=webapp&#x26;utm_medium=knowledge-base-content_preview&#x26;utm_campaign=in-app-help\"><em><strong>Content preview | Contentful HelpCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/support/?upgrade-teams=true\"><em><strong>Support |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://app.contentful.com/spaces/z5u5myu3wvyl/settings/environments\"><em><strong>Environments --- Gatsby Starter for Contentful --- master-2021-06-06---Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/developers/docs/tutorials/cli/installation/\"><em><strong>Installing the Contentful CLI |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful?page=2\"><em><strong>Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/create-contentful-app\"><em><strong>contentful/create-contentful-app: Bootstrap a ContentfulApp</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/contentful-import\"><em><strong>contentful/contentful-import: Node module that uses the data providedby contentful-export to import it to contentfulspace</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/contentful.js\"><em><strong>contentful/contentful.js: JavaScript library for Contentful's DeliveryAPI (node &#x26; browser)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/markdown-to-jsx\"><em><strong>contentful/markdown-to-jsx: 🏭 The most lightweight, customizable Reactmarkdown component.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/starter-gatsby-blog\"><em><strong>contentful/starter-gatsby-blog: Gatsby starter for a Contentful projectfrom the community.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/the-example-app.graphql.js\"><em><strong>contentful/the-example-app.graphql.js: Example app for Contentful withGraphQL withReact</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/contentful/the-example-app.nodejs\"><em><strong>contentful/the-example-app.nodejs: Example app for Contentful innode.js</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/2/?ogbl#inbox/FMfcgzGkXdFkrqqdXHBVpvJJPKltffdK\"><em><strong>Welcome to Space - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.jetbrains.com/help/space/getting-started.html#first-steps\"><em><strong>Getting Started | JetBrainsSpace</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/dns/setup\"><em><strong>Add a domain to Netlify DNS | Bryan C Guner'steam</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/lambda-static-server/deploys/60bd6f9ad4b3f69ed849c560\"><em><strong>Deploy details |lambda-static-server</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/doc/guides/getting-started/quick-start/tutorials/getting-started-with-the-dashboard/#overview\"><em><strong>Get Started Using the Dashboard | Tutorials | AlgoliaDocumentation</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/Lambda-Resource-Static-Assets\"><em><strong>bgoonz/Lambda-Resource-Static-Assets</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/gatsby-plugin-algolia\"><em><strong>gatsby-plugin-algolia -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/algolia-webcrawler\"><em><strong>algolia-webcrawler -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/algolia?q=&#x26;type=&#x26;language=&#x26;sort=stargazers\"><em><strong>Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://docsearch.algolia.com/docs/run-your-own\"><em><strong>Run your own |DocSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/gitbook-plugin-algolia\"><em><strong>gitbook-plugin-algolia -npm</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/algolia/react-instantsearch\"><em><strong>algolia/react-instantsearch: ⚡️ Lightning-fast search for React andReact Native applications, byAlgolia.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/algolia/instantsearch.js\"><em><strong>algolia/instantsearch.js: ⚡️ A JavaScript library for buildingperformant and instant search experiences withAlgolia.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/algolia/docsearch\"><em><strong>algolia/docsearch: The easiest way to add search to yourdocumentation.</strong></em></a></li>\n<li>[✅] <a href=\"https://crawler.algolia.com/admin/netlify/75476e4e-6edd-4555-8914-89385ee81cdd\"><em><strong>Netlify Crawler | Crawler AdminConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/KR2EZWQOOJ/api-keys/all\"><em><strong>API Keys |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.algolia.com/apps/KR2EZWQOOJ/explorer/ui-demos/dev_staticserver\"><em><strong>Indices |Algolia</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/mdn-scraper\"><em><strong>mdn-scraper - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/full-text-search\"><em><strong>full-text-search - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://dribbble.com/shots/15789926-Form\"><em><strong>Form by Webshocker - Matjaz Valentar onDribbble</strong></em></a></li>\n<li>[✅] <a href=\"https://developers.google.com/custom-search/docs/tutorial/creatingcse\"><em><strong>Creating a Programmable Search Engine | GoogleDevelopers</strong></em></a></li>\n<li>[✅] <a href=\"https://lunrjs.com/\"><em><strong>Lunr: A bit like Solr, but much smaller and not asbright</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/manticoresearch\"><em><strong>Web-Dev-Collaborative/manticoresearch: Database forsearch</strong></em></a></li>\n<li>[✅] <a href=\"https://manticoresearch.com/cheatsheets/\"><em><strong>Cheatsheets -- ManticoreSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/elasticlunr.js\"><em><strong>Web-Dev-Collaborative/elasticlunr.js: Based on lunr.js, but moreflexible andcustomized.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nextapps-de/flexsearch\"><em><strong>nextapps-de/flexsearch: Next-Generation full text search library forBrowser and Node.js</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/ndx-search/docs\"><em><strong>ndx-search/docs: ndx documentation</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/developers/docs/references/content-management-api/\"><em><strong>Content Management API |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/developers/docs/tools/staticsitegenerators/\"><em><strong>Static site generators |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/developers/docs/tutorials/general/get-started/#deploy-the-starter-gatsby-blog\"><em><strong>Get started with Contentful |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://www.contentful.com/developers/docs/tutorials/general/get-started/#view-deployment-instructions-for-netlify\"><em><strong>Get started with Contentful |Contentful</strong></em></a></li>\n<li>[✅] <a href=\"https://learntocodewith.me/tutorials/github-pages/\"><em><strong>How to Get Your Site Online for Free With Github Pages | Learn to CodeWith Me</strong></em></a></li>\n<li>[✅] <a href=\"https://codemyui.com/css-only-file-tree-structure-with-folder-file-icons-and-size-info/\"><em><strong>CSS Only File Tree Structure with Folder, File Icons and Size Info --CodeMyUI</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/iamshipon1988/crossway\"><em><strong>iamshipon1988/crossway: An open-source block-based templatesystem.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/iamshipon1988?tab=stars\"><em><strong>iamshipon1988 (Sazzad Hossain) /Starred</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/givanz/VvvebJs\"><em><strong>givanz/VvvebJs: Drag and drop website builder javascriptlibrary.</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/1/#search/norwex/FMfcgxwLsSczRCmHfsHFnbGxpVTRPJfk\"><em><strong>Norwex Info - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/en_US/customer/shop/Household\"><em><strong>Shop - NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://linktr.ee/ToxicFreeSimplyClean\"><em><strong>@ToxicFreeSimplyClean |Linktree</strong></em></a></li>\n<li>[✅] <a href=\"https://dev.to/alidhuniya/convert-html-css-code-into-react-app-using-react-fundamentals-knowledge-hl\"><em><strong>Convert HTML CSS Code into React App using React Fundamentals Knowledge- DEVCommunity</strong></em></a></li>\n<li>[✅] <a href=\"https://roman01la.github.io/html-to-react-components/\"><em><strong>Convert HTML to Reactcomponents</strong></em></a></li>\n<li>[✅] <a href=\"http://roman01la.github.io/html-to-react-components/repl/\"><em><strong>html2react |REPL</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/47370369/how-to-convert-a-html-template-to-react\"><em><strong>reactjs - How to convert a html template to react? - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://www.npmjs.com/package/html-to-react\"><em><strong>html-to-react - npm</strong></em></a></li>\n<li>[✅] <a href=\"https://magic.reactjs.net/htmltojsx.htm\"><em><strong>HTML to JSX</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?sxsrf=ALeKk00fuMz85jY1zQSedwk_4EQ2wqWioQ%3A1613439518209&#x26;ei=HiIrYPibDLyp5NoP3euJ-Aw&#x26;q=react+ecommerce+admin+template+github&#x26;oq=react+ecommerce+admin+template+github&#x26;gs_lcp=Cgdnd3Mtd2l6EAMyBggAEBYQHjIGCAAQFhAeOgcIABBHELADUOMRWOwcYJ0eaAFwAngAgAGBAYgBzAWSAQM2LjKYAQCgAQGqAQdnd3Mtd2l6yAEIwAEB&#x26;sclient=gws-wiz&#x26;ved=0ahUKEwj4ouXKou3uAhW8FFkFHd11As8Q4dUDCA0&#x26;uact=5\"><em><strong>react ecommerce admin template github - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/binx/react-stripe-store\"><em><strong>binx/react-stripe-store: roll your own ecommercestore!</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/web-dev-notes-resource-site\"><em><strong>bgoonz/web-dev-notes-resource-site: My resource sharing site /blog</strong></em></a></li>\n<li>[✅] <a href=\"https://belugajs.com/gallery\"><em><strong>beluga | Gallery</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Radinvafaei/react-e-commerce-template\"><em><strong>Radinvafaei/react-e-commerce-template: An SPA E-commerce templatepowered by React.js andBootstrap</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/paoonline/E-commerce-Admin-Website\"><em><strong>paoonline/E-commerce-Admin-Website: create withreact.js</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?fs=1&#x26;tf=cm&#x26;source=mailto&#x26;to=super_admin@test.com#\"><em><strong>Compose Mail - toxicfreesimplyclean1@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://oauth-242602.firebaseapp.com/\"><em><strong>React App</strong></em></a></li>\n<li>[✅] <a href=\"https://coreui.io/react/demo/free/3.1.1/#/dashboard\"><em><strong>CoreUI Free React.js AdminTemplate</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=website+downloader+online+free&#x26;oq=website+downloader+online+free&#x26;aqs=chrome..69i57j0i22i30l6j69i64.7318j1j15&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>website downloader online free - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://www6.waybackmachinedownloader.com/website-downloader-online/file_editor-website-downloader-online/?url=files/demo/kathyguner.norwex.biz_gunerb1_tcnj.edu_u7292v1zn1\"><em><strong>Website Downloader Online - ScrapingResults</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/sindresorhus/awesome\"><em><strong>sindresorhus/awesome: 😎 Awesome lists about all kinds of interestingtopics</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/bgoonz/30bb612e00ae3ede678ee71173a68183\"><em><strong>Reusable-js-css-and-html</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/0/?ogbl#inbox/FMfcgxwLsmgFCHVwLtJQfHPGnlhJGWXt\"><em><strong>invited you to join Instagram! - bryan.guner@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.instagram.com/kguner.norbiz/\"><em><strong>@kguner.norbiz • Instagram photos andvideos</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/1/#inbox\"><em><strong>Inbox (136) - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://connect.stripe.com/reset\"><em><strong>Stripe: Sign in</strong></em></a></li>\n<li>[✅] <a href=\"https://mail.google.com/mail/u/1/#inbox/FMfcgxwLsmgFCCxLmLxnkfvDwpDvHDnM\"><em><strong>AWS Educate Application Approved - bryan.guner.dev@gmail.com -Gmail</strong></em></a></li>\n<li>[✅] <a href=\"https://www.aws.training/Account/SessionTimedOut?returnUrl=https%3A%2F%2Fwww.aws.training%2FDetails%2FeLearning%3Fid%3D60697\"><em><strong>Session Timed Out | AWS Training &#x26;Certification</strong></em></a></li>\n<li>[✅] <a href=\"https://www.awseducate.com/student/s/pathways\"><em><strong>Pathways</strong></em></a></li>\n<li>[✅] <a href=\"https://awseducate.instructure.com/courses/193/pages/software-development-devops?module_item_id=4615\"><em><strong>Software Development: DevOps: Web DevelopmentEngineer</strong></em></a></li>\n<li>[✅] <a href=\"https://www.php.net/\"><em><strong>PHP: Hypertext Preprocessor</strong></em></a></li>\n<li>[✅] <a href=\"https://aws.amazon.com/devops/continuous-integration/\"><em><strong>What is Continuous Integration? -- Amazon WebServices</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/teams/bgoonz/sites\"><em><strong>Sites | Bryan C Guner'steam</strong></em></a></li>\n<li>[✅] <a href=\"https://id.heroku.com/login\"><em><strong>Heroku | Login</strong></em></a></li>\n<li>[✅] <a href=\"https://cloud.digitalocean.com/login?redirect_url=https%3A%2F%2Fcloud.digitalocean.com%2Fapps%2F2dbced50-862f-4cc5-ad63-2d4ce73e7591%3Fi%3Dcf4d7b\"><em><strong>Sign in to your account |DigitalOcean</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dice.com/dashboard\"><em><strong>Seeker Dashboard - Profile</strong></em></a></li>\n<li>[✅] <a href=\"https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage\"><em><strong>Personal Cloud Storage -- MicrosoftOneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://onedrive.live.com/?id=D21009FDD967A241%21538638&#x26;cid=D21009FDD967A241\"><em><strong>JOB-SEARCH-OFFICIAL -OneDrive</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=provident+bank+routing+number&#x26;oq=prov&#x26;aqs=chrome.0.69i59j69i57j46i199i291i433j69i65l2j69i60l3.2340j0j9&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>provident bank routing number - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/topics/react-portfolio-template\"><em><strong>react-portfolio-template · GitHub Topics ·GitHub</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/rbhatia46/React-Portfolio\"><em><strong>rbhatia46/React-Portfolio: A simple SPA Portfolio template fordeveloper/designers built with React. Use it to showcase your work,testimonials and other information toclients.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/kaustubhai/portfolio-template\"><em><strong>kaustubhai/portfolio-template: An Open-Sourced Template for developersto show-off there skills. Made withReactJS</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/chetanverma16/react-portfolio-template\"><em><strong>GitHub - chetanverma16/react-portfolio-template: Modern React PortfolioTemplate(FREE)</strong></em></a></li>\n<li>[✅] <a href=\"https://www.reddit.com/r/cscareerquestions/comments/855maw/i_got_tired_of_writing_cover_letters_so_i_built_a/\"><em><strong>I got tired of writing cover letters so I built a cover lettergenerator! :cscareerquestions</strong></em></a></li>\n<li>[✅] <a href=\"https://www.dailycodingproblem.com/coverletter\"><em><strong>Daily Coding Problem</strong></em></a></li>\n<li>[✅] <a href=\"https://www.cincopa.com/media-platform/wizard_gettag.aspx?fid=15499427#html\"><em><strong>Embed yourgallery</strong></em></a></li>\n<li>[✅] <a href=\"https://www.cincopa.com/media-platform/wizard2/library15#\"><em><strong>My Media</strong></em></a></li>\n<li>[✅] <a href=\"https://bryan-guner-dev.cincopa.com/watch/AgEAazueAa6o#bclb\"><em><strong>New Gallery2021/3/4</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/\"><em><strong>Norwex Home - Premium Microfiber &#x26; Sustainable Cleaning Products |Norwex USA</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/en_US/customer/become-a-consultant\"><em><strong>Sign Up a New Consultant - NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/en_US/customer/shop/product-detail/357021?categoryName=Best_Sellers\"><em><strong>Fluff and Tumble Dryer Balls (set of 3) | NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/en_US/customer/our-heritage\"><em><strong>Our Norwex Heritage - Creating Safe Havens, cleaning without chemicals,microfiber, baclock, antibacterial | NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/en_US/customer/pages/social-responsibility\"><em><strong>Social Responsibility | NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.stripe.com/login?redirect=%2Fauth_stripecli\"><em><strong>Stripe: Signin</strong></em></a></li>\n<li>[✅] <a href=\"https://dashboard.stripe.com/express/oauth/authorize?response_type=code&#x26;client_id=ca_J3UACZzTZyhrGvaUrKF9wBwCM2NmtDpM&#x26;scope=read_write\"><em><strong>Stripe</strong></em></a></li>\n<li>[✅] <a href=\"https://console.aws.amazon.com/billing/home#/credits\"><em><strong>Billing ManagementConsole</strong></em></a></li>\n<li>[✅] <a href=\"https://www.parkmycloud.com/blog/aws-credits/\"><em><strong>11 Ways to Get AWS Credits -ParkMyCloud</strong></em></a></li>\n<li>[✅] <a href=\"https://developer.amazon.com/en-US/alexa/alexa-skills-kit/new/aws-promotional-credits\"><em><strong>Save Money with AWS Promotional Credits - Alexa Skills Kit OfficialSite</strong></em></a></li>\n<li>[✅] <a href=\"https://kathyguner.norwex.biz/en_US/customer/pages/join_now\"><em><strong>Join Our Norwex Team - Create Safe Havens with Home Parties and PremiumMicrofiber &#x26; Sustainable Cleaning Products | NorwexUSA</strong></em></a></li>\n<li>[✅] <a href=\"https://blog.hubspot.com/website/bootstrap-css\"><em><strong>The Ultimate Guide to BootstrapCSS</strong></em></a></li>\n<li>[✅] <a href=\"https://www.bootstrapcdn.com/\"><em><strong>Quick Start · BootstrapCDN by StackPath</strong></em></a></li>\n<li>[✅] <a href=\"https://getbootstrap.com/docs/3.4/getting-started/\"><em><strong>Getting started ·Bootstrap</strong></em></a></li>\n<li>[✅] <a href=\"https://analytics.google.com/analytics/web/#/p260159780/reports/defaulthome\"><em><strong>Analytics |Home</strong></em></a></li>\n<li>[✅] <a href=\"https://www.charlotteohara.ca/blog/backing-up-website\"><em><strong>Backing up your Squarespace website: CharlotteO'Hara</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/search?q=Natalie+Guarnieri&#x26;type=users\"><em><strong>Search · NatalieGuarnieri</strong></em></a></li>\n<li>[✅] <a href=\"https://dezadkins.github.io/\"><em><strong>Dez Adkins | Full-Stack Software Engineer &#x26; AudioEngineer</strong></em></a></li>\n<li>[✅] <a href=\"https://determined-dijkstra-ee7390.netlify.app/\"><em><strong>README</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/dakotabenger/flavorgram-menoitios\"><em><strong>dakotabenger/flavorgram-menoitios</strong></em></a></li>\n<li>[✅] <a href=\"https://determined-dijkstra-ee7390.netlify.app/directory.html\"><em><strong>SiteNavigation</strong></em></a></li>\n<li>[✅] <a href=\"https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/\"><em><strong>README</strong></em></a></li>\n<li>[✅] <a href=\"https://careers.lambdaschool.com/\"><em><strong>Student Careers</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/bgoonz/resume-cv-portfolio-samples/blob/master/2021-resume/bryan-guner-resume-2021.pdf\"><em><strong>resume-cv-portfolio-samples/bryan-guner-resume-2021.pdf at master ·bgoonz/resume-cv-portfolio-samples</strong></em></a></li>\n<li>[✅] <a href=\"https://app.netlify.com/sites/determined-dijkstra-ee7390/deploys\"><em><strong>Deploys |determined-dijkstra-ee7390</strong></em></a></li>\n<li>[✅] <a href=\"https://6087151c8bbccb00b5d0ff6b--determined-dijkstra-ee7390.netlify.app/\"><em><strong>README</strong></em></a></li>\n<li>[✅] <a href=\"https://docs.netlify.com/site-deploys/overview/#deploy-contexts\"><em><strong>Site deploys overview | NetlifyDocs</strong></em></a></li>\n<li>[✅] <a href=\"https://www.sivanandaonline.org/public_html/?cmd=displaysection&#x26;section_id=1416&#x26;parent=640&#x26;format=html\"><em><strong>How toMeditate?</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=full+stack+medium+clone+heroku&#x26;oq=full+stack+medium+clone+heroku&#x26;aqs=chrome..69i57j33i160.8889j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>full stack medium clone heroku - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://samdbrice.medium.com/full-stack-heroku-app-in-3-minutes-ee3fbaedb2ed\"><em><strong>Full-Stack Heroku App In 3 Minutes | by Samuel Brice |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://medium.com/swlh/how-to-deploy-fullstack-react-js-nestjs-postgresql-to-heroku-1cc96fc2af7b\"><em><strong>How to Deploy Fullstack React.js + nestJs + postgreSQL to Heroku | byTal Shnitzer | The Startup |Medium</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=fullstack+documentation+site&#x26;oq=fullstack+documentation+site&#x26;aqs=chrome..69i57j33i10i160l3.5065j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>fullstack documentation site - GoogleSearch</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/tiangolo/full-stack-flask-couchdb\"><em><strong>tiangolo/full-stack-flask-couchdb: Full stack, modern web applicationgenerator. Using Flask, CouchDB as database, Docker, Swagger, automaticHTTPS and more.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/blog-posts\"><em><strong>Web-Dev-Collaborative/blog-posts: Blog posts and related code bySebastián Ramírez(@tiangolo)</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/Web-Dev-Collaborative/node-frontend\"><em><strong>Web-Dev-Collaborative/node-frontend: Node.js Docker image with allPuppeteer dependencies installed for frontend Chrome Headless testingand default Nginx config, for multi-stage Dockerbuilding</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nicobytes/codelab-lazysizes\"><em><strong>nicobytes/codelab-lazysizes</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nicobytes/cordova-plugin-audioinput\"><em><strong>nicobytes/cordova-plugin-audioinput: This iOS/Android Cordova/PhoneGapplugin enables audio capture from the device microphone, by in nearreal-time forwarding audio to the web layer of your application. Atypical usage scenario for this plugin would be to use the capturedaudio as source for a web audio node chain, where it then can beanalyzed, manipulated and/orplayed.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/nicobytes/audio-input-background-mode\"><em><strong>nicobytes/audio-input-background-mode</strong></em></a></li>\n<li>[✅] <a href=\"https://www.facebook.com/bryan.guner/\"><em><strong>Bryan Guner | Facebook</strong></em></a></li>\n<li>[✅] <a href=\"https://www.themesine.com/\"><em><strong>Homepage - ThemeSINE</strong></em></a></li>\n<li>[✅] <a href=\"https://learning.oreilly.com/scenarios/postgresql-fundamentals-importing/9781098114343/\"><em><strong>Interactive Scenario: PostgreSQL Fundamentals: Importing and ExportingData UsingCOPY</strong></em></a></li>\n<li>[✅] <a href=\"https://learning.oreilly.com/scenarios/postgresql-fundamentals-creating/9781098114336/\"><em><strong>Interactive Scenario: PostgreSQL Fundamentals: Creating and ManagingTables</strong></em></a></li>\n<li>[✅] <a href=\"https://learning.oreilly.com/scenarios/postgresql-fundamentals-b-tree/9781098114350/\"><em><strong>Interactive Scenario: PostgreSQL Fundamentals: B-Tree IndexFeatures</strong></em></a></li>\n<li>[✅] <a href=\"https://learning.oreilly.com/scenarios/postgresql-fundamentals-hash/9781098114381/\"><em><strong>Interactive Scenario: PostgreSQL Fundamentals: HashIndex</strong></em></a></li>\n<li>[✅] <a href=\"https://learning.oreilly.com/scenarios/postgresql-fundamentals-block/9781098114398/\"><em><strong>Interactive Scenario: PostgreSQL Fundamentals: Block RangeIndex</strong></em></a></li>\n<li>[✅] <a href=\"https://help.medium.com/hc/en-us/articles/4405927192215?source=post_page-----4c5a06ac3507--------------------------------\"><em><strong>Referred memberships -- Medium HelpCenter</strong></em></a></li>\n<li>[✅] <a href=\"https://euangoddard.github.io/clipboard2markdown/\"><em><strong>Paste to Markdown</strong></em></a></li>\n<li>[✅] <a href=\"https://webflow.com/design/bryans-spectacular-project-fae067\"><em><strong>Webflow - Bryan's SpectacularProject</strong></em></a></li>\n<li>[✅] <a href=\"https://preview.webflow.com/preview/section-scroll-interaction?utm_medium=preview_link&#x26;utm_source=showcase_slider&#x26;utm_content=section-scroll-interaction&#x26;preview=c958906377274cc9d25a9c596fb2983d\"><em><strong>Webflow - Section ScrollInteraction</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/56873278/how-to-fix-error-filename-does-not-have-a-commit-checked-out-fatal-adding\"><em><strong>ruby on rails - How to fix: error: '&#x3C;filename>' does not have acommit checked out fatal: adding files failed when inputting \"git add.\" in command prompt - StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://soybean-tulip-em56.squarespace.com/config/pages/6056ff2af2e79040b7b58956\"><em><strong>Web Development Projects --- Web-Dev-Resource-Hub(BryanGuner)</strong></em></a></li>\n<li>[✅] <a href=\"https://crop-circle.imageonline.co/\"><em><strong>Crop a circle in image online - freetool</strong></em></a></li>\n<li>[✅] <a href=\"https://app.gitbook.com/@bryan-guner/s/data-structures-npm/\"><em><strong>Initial page -Data-Structures-NPM</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/react-yud4c?file=/src/components/field.js:0-265\"><em><strong>react -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://codesandbox.io/s/twilight-snow-9c4uk?file=/src/App.js:0-568\"><em><strong>twilight-snow-9c4uk -CodeSandbox</strong></em></a></li>\n<li>[✅] <a href=\"https://stackoverflow.com/questions/61973385/vscode-unable-to-save-files-inside-my-wsl2-home-folder\"><em><strong>laravel - VScode unable to save files inside my WSL2 home folder -StackOverflow</strong></em></a></li>\n<li>[✅] <a href=\"https://gist.github.com/TSiege/cbb0507082bb18ff7e4b\"><em><strong>This is my technical interview cheat sheet. Feel free to fork it or dowhatever you want with it. PLEASE let me know if there are any errors orif anything crucial is missing. I will add more linkssoon.</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/search?q=Khan+academy+datastructures&#x26;type=code\"><em><strong>Search · Khan academydatastructures</strong></em></a></li>\n<li>[✅] <a href=\"https://www.khanacademy.org/computing/computer-science/algorithms\"><em><strong>Algorithms | Computer science | Computing | KhanAcademy</strong></em></a></li>\n<li>[✅] <a href=\"https://www.google.com/search?q=Best+javascript+datastructures+interview+repository&#x26;oq=Best+javascript+datastructures+interview+repository&#x26;aqs=chrome..69i57j69i64.12806j0j7&#x26;sourceid=chrome&#x26;ie=UTF-8\"><em><strong>Best javascript datastructures interview Search</strong></em></a></li>\n<li>[✅] <a href=\"https://github.com/rohan-paul/Awesome-JavaScript-Interviews\"><em>**rohan-paulAwesome-JavaScript-Interviews: **</em></a></li>\n</ul>"},{"url":"/docs/python/at-length/","relativePath":"docs/python/at-length.md","relativeDir":"docs/python","base":"at-length.md","name":"at-length","frontmatter":{"title":"Python at length","weight":0,"excerpt":"Variables are simply declarations that are used to store certain values.","seo":{"title":"Python at length","description":"Python at length","robots":[],"extra":[]},"template":"docs"},"html":"<h4>Understanding variables <a id=\"understanding-variables\"></a></h4>\n<p>Variables are simply declarations that are used to store certain values. For instance, the variable <code>name</code> can hold the value of <code>John Smith.</code> Several rules need to be considered when declaring variable names. For starters, a variable name cannot begin with a number.</p>\n<p><code>2name = incorrect #incorrect</code></p>\n<p><code>name = correct #correct</code></p>\n<p>Variable names are case sensitive. This means that the variable <code>school</code> is not the same as <code>School</code>.</p>\n<p>Variables can hold different data types. This includes strings, integers, Booleans, long, lists, and arrays.</p>\n<p>In Python, we do not need to declare the data type while writing a variable. This is because the code is compiled and interpreted later. The compiler will throw an error in case there is a mismatch in the data types.</p>\n<p>Let's talk about the different data types.</p>\n<ol>\n<li>Strings</li>\n</ol>\n<p>Strings are usually presented in a text format. We will declare a string variable, as shown below.</p>\n<pre><code class=\"language-python\">name = “john”school = “Alliance Francaise”\n</code></pre>\n<p>When we run <code>print(name)</code>, the output will be <code>john</code>.</p>\n<ol>\n<li>Integers</li>\n</ol>\n<p>These variables hold numeric values, as shown below.</p>\n<pre><code class=\"language-python\">math = 90chemistry = 100biology = 70\n</code></pre>\n<p>We can find the total of the variables above using the following statement.</p>\n<pre><code class=\"language-python\">print(math+chemistry+biology)\n</code></pre>\n<p>The total is <code>260</code>.</p>\n<p>A TypeError is thrown when you try to add a string to an integer, as shwon below.</p>\n<pre><code class=\"language-python\">var1 = \"30\" #stringvar2 = 20 #integer​print(var1+var2)#type error\n</code></pre>\n<p>We can sum <code>var1</code> and <code>var2</code> by converting <code>var1</code> to an integer using the <code>int()</code> function. The following code will execute successfully.</p>\n<pre><code class=\"language-python\">var1 = \"30\" #stringvar2 = 20 #integer​print(int(var1)+var2) # Output: 50\n</code></pre>\n<blockquote>\n<p>Make sure that the variable stores a value that can be converted to an integer before using the int() method.</p>\n</blockquote>\n<ol>\n<li>Booleans</li>\n</ol>\n<p>There are only two Boolean values: <code>True</code> and <code>False</code>. In other words, something can either be true or false. We declare these values, as shown below. Please note that Python is case sensitive.</p>\n<pre><code class=\"language-python\">isOn = TrueisChecked = False\n</code></pre>\n<p>A <code>bool()</code> method can help convert a value to a boolean. The code snippets below showcase how a <code>bool()</code> function can be used.</p>\n<pre><code class=\"language-python\">print(bool(\"abc\")) #returns Trueprint(bool(0))  #returns False\n</code></pre>\n<p>The <code>bool()</code> function returns False when there are no parameters.</p>\n<ol>\n<li>Float</li>\n</ol>\n<p>This data type consists of numbers that have a decimal place. A perfect example of a float variable is highlighted below.</p>\n<pre><code class=\"language-python\">Bmi = 45.7\n</code></pre>\n<h4>Understanding lists <a id=\"understanding-lists\"></a></h4>\n<p>Lists allow us to store numerous elements in a particular variable. For instance, we can have a list that stores all the student names in a class. We use <code>[]</code> to define a list.</p>\n<pre><code class=\"language-python\">students = [] #list example\n</code></pre>\n<p>Elements in a list are usually separated by a comma, as shown below.</p>\n<pre><code class=\"language-python\">students = [“john”, “Mary Thomas”, “John Smith”]\n</code></pre>\n<p>Each element in the above <code>students</code> list has an index. By default, the first index is 0. So the item at index [0] is <code>john</code>, while the value at index <code>1</code> is <code>Mary Thomas</code>. A list of integers will look as follows.</p>\n<pre><code class=\"language-python\">student_marks = [90, 78, 90, 78]\n</code></pre>\n<p>We can access different list functionalities using built-in functions. For instance, to add a value to the <code>student_marks</code> list, we use the <code>append</code> function.</p>\n<pre><code class=\"language-python\">student_marks.append(\"Guardian Angel\")print(student_marks)\n</code></pre>\n<p>The above function adds <code>Guardian Angel</code> at the end of the <code>student_marks</code> list.</p>\n<p>When we print the list it shows:</p>\n<pre><code class=\"language-python\">#output[90, 78, 90, 78, 'Guardian Angel']\n</code></pre>\n<p>We use <code>len(student_marks)</code> to determine the length of the list. We use the <code>remove()</code> function to delete something from the list. For instance, we can remove <code>90</code> from the <code>student_mark</code> list as shown below.</p>\n<pre><code class=\"language-python\">student_marks.remove(90)print(student_marks)\n</code></pre>\n<p>In lists, negative indices allow us to count elements starting from the last one. For instance, the element with an index of <code>-1</code> in the above <code>student_marks</code> list is <code>\"Guardian Angel\"</code>. The second last element <code>78</code> has an index of <code>-2</code>.</p>\n<h4>Understanding functions or methods <a id=\"understanding-functions-or-methods\"></a></h4>\n<p>Methods are quite critical in programming. They help store reusable code. This means that a person can call already declared methods rather than writing statements from scratch repeatedly. This saves significant time, that can be invested in other productive activities.</p>\n<p>In Python, we use the <code>def</code> keyword to declare a function. An example of a python method is shown below.</p>\n<pre><code class=\"language-python\">def readData():    print('success')\n</code></pre>\n<p>The above function prints <code>success</code> when it's invoked. We can also pass data to a method, perform some calculations, and return the results. This is demonstrated in the code snippet below.</p>\n<pre><code class=\"language-python\">def calculateTotal(chem, bio):    return chem+bio​print(calculateTotal(90,80))\n</code></pre>\n<p>The <code>calculateTotal</code> method takes in two parameters (chem, bio). The function then returns the sum of the two values. It is important to take note of the data types when passing parameters. For instance, the <code>calculateTotal</code> method will not work when we pass in a string as a parameter. This is because the program cannot sum up an integer and a string. As shown above, we can call the <code>calculateTotal</code> method directly from our print statement.</p>\n<pre><code class=\"language-python\">print(calculateTotal(90,80))\n</code></pre>\n<p>The <code>return</code> keyword ensures that the method returns a result after execution.</p>\n<blockquote>\n<p>Note that a function can also call another method. This is illustrated below.</p>\n</blockquote>\n<pre><code class=\"language-python\">def readData(chem, bio):    return chem+bio​def getTotal():    print(readData(90,80)) #calls the readData method​getTotal()\n</code></pre>\n<h4>Understanding loops <a id=\"understanding-loops\"></a></h4>\n<p>Loops are critical because they allow us to iterate through lists, check for different conditions, and continuously execute various statements. The main loops are <code>for</code> and <code>while</code>.</p>\n<ol>\n<li>For loops As noted, we can use a for loop to iterate through a list, as shown below:</li>\n</ol>\n<pre><code class=\"language-python\">student_list = [“John Doore”,”Matu Smith”]for x in student_list:    print(x)\n</code></pre>\n<p>The <code>for</code> loop above will print every item in the student_list.</p>\n<ol>\n<li>While loops A while loop can help us check for a particular condition. For instance, while something is true specific statements can be executed. Here is an example of a while loop in action.</li>\n</ol>\n<pre><code class=\"language-python\">isChecked = falsewhile isChecked == true:    print('Hallo there')\n</code></pre>\n<blockquote>\n<p>Note that the while loop above will be executed indefinitely until isChecked is set to false. You can press ctrl+c to stop the loop.</p>\n</blockquote>\n<h4>Classes <a id=\"classes\"></a></h4>\n<p>Classes are a vital component of object-oriented programming. When creating a class, you must use the <code>class</code> keyword. Other elements are then nested in the class. Here is an example of a Python class.</p>\n<pre><code class=\"language-python\">class Farmer: # a class with the name farmer    name = \"John\" # A variable    produce = \"1000kgs\" # A variable​farmer = Farmer() #instatiating the class as an object. print(farmer.name) # accessing the properties of the Farmer class.\n</code></pre>\n<p>Classes can help as group things with similar characteristics. We can also assign values to class variables using the <code>init</code> function.</p>\n<pre><code class=\"language-python\">class Farmer:  def __init__(self, farmername, produce):    self.farmername = farmername    self.produce = produce​farmer = Farmer(\"Carry Sminson\", \"10,000kgs\")​print(farmer.farmername, farmer.produce)\n</code></pre>\n<p>In the above <code>Farmer</code> class, the <code>self</code> keyword represents an instance of an object. In other words, it allows us to access the different methods and attributes defined in the class.</p>\n<p>You can also declare a method in a class and use it later, as shown below.</p>\n<pre><code class=\"language-python\">class Farmer:  def __init__(self, farmername, produce):    self.farmername = farmername    self.produce = produce​  def printDetails(self): # Method      print(self.farmername, self.produce)​farmer = Farmer(\"Carry Sminson\", \"10,000kgs\")​farmer.printDetails()\n</code></pre>\n<h2>Python syntax was made for readability, and easy editing. For example, the python language uses a <code>:</code> and indented code, while javascript and others generally use <code>{}</code> and indented code. <a id=\"python-syntax-was-made-for-readability-and-easy-editing-for-example-the-python-language-uses-a-and-indented-code-while-javascript-and-others-generally-use-and-indented-code\"></a></h2>\n<p>Lets create a <a href=\"https://repl.it/languages/python3\">python 3</a> repl, and call it <em>Hello World</em>. Now you have a blank file called <em>main.py</em>. Now let us write our first line of code:</p>\n<p><em>helloworld.py</em></p>\n<pre><code class=\"language-python\">print('Hello world!')\n</code></pre>\n<blockquote>\n<p>Brian Kernighan actually wrote the first “Hello, World!” program as part of the documentation for the BCPL programming language developed by Martin Richards.</p>\n</blockquote>\n<p>Now, press the run button, which obviously runs the code. If you are not using replit, this will not work. You should research how to run a file with your text editor.</p>\n<p>If you look to your left at the console where hello world was just printed, you can see a <code>></code>, <code>>>></code>, or <code>$</code> depending on what you are using. After the prompt, try typing a line of code.</p>\n<pre><code class=\"language-python\">Python 3.6.1 (default, Jun 21 2017, 18:48:35)[GCC 4.9.2] on linuxType \"help\", \"copyright\", \"credits\" or \"license\" for more information.> print('Testing command line')Testing command line> print('Are you sure this works?')Are you sure this works?>\n</code></pre>\n<p>The command line allows you to execute single lines of code at a time. It is often used when trying out a new function or method in the language.</p>\n<p>Another cool thing that you can generally do with all languages, are comments. In python, a comment starts with a <code>#</code>. The computer ignores all text starting after the <code>#</code>.</p>\n<p><em>shortcom.py</em></p>\n<pre><code class=\"language-python\"># Write some comments!\n</code></pre>\n<p>If you have a huge comment, do <strong>not</strong> comment all the 350 lines, just put <code>'''</code> before it, and <code>'''</code> at the end. Technically, this is not a comment but a string, but the computer still ignores it, so we will use it.</p>\n<p><em>longcom.py</em></p>\n<pre><code class=\"language-python\">'''Dear PYer,I am confused about how you said you could use triple quotes to makeSUPERLONGCOMMENTS!​I am wondering if this is true,and if so,I am wondering if this is correct.​Could you help me with this?​Thanks,Random guy who used your tutorial.'''print('Testing')\n</code></pre>\n<p>Unlike many other languages, there is no <code>var</code>, <code>let</code>, or <code>const</code> to declare a variable in python. You simply go <code>name = 'value'</code>.</p>\n<p><em>vars1.py</em></p>\n<pre><code class=\"language-python\">x = 5y = 7z = x*y # 35print(z) # => 35\n</code></pre>\n<p>Remember, there is a difference between integers and strings. <em>Remember: String =</em> <em><code>\"\"</code>.</em> To convert between these two, you can put an int in a <code>str()</code> function, and a string in a <code>int()</code> function. There is also a less used one, called a float. Mainly, these are integers with decimals. Change them using the <code>float()</code> command.</p>\n<p><em>vars2.py</em></p>\n<pre><code class=\"language-python\">x = 5x = str(x)b = '5'b = int(b)print('x = ', x, '; b = ', str(b), ';') # => x = 5; b = 5;\n</code></pre>\n<p>Instead of using the <code>,</code> in the print function, you can put a <code>+</code> to combine the variables and string.</p>\n<p>There are many operators in python:</p>\n<ul>\n<li><code>+</code></li>\n<li><code>-</code></li>\n<li><code>/</code></li>\n<li><code>*</code> These operators are the same in most languages, and allow for addition, subtraction, division, and multiplicaiton. Now, we can look at a few more complicated ones:</li>\n<li><code>%</code></li>\n<li><code>//</code></li>\n<li><code>**</code></li>\n<li><code>+=</code></li>\n<li><code>-=</code></li>\n<li><code>/=</code></li>\n<li><code>*=</code> Research these if you want to find out more…</li>\n</ul>\n<p><em>simpleops.py</em></p>\n<pre><code class=\"language-python\">x = 4a = x + 1a = x - 1a = x * 2a = x / 2\n</code></pre>\n<p>You should already know everything shown above, as it is similar to other languages. If you continue down, you will see more complicated ones.</p>\n<p><em>complexop.py</em></p>\n<pre><code class=\"language-python\">a += 1a -= 1a *= 2a /= 2\n</code></pre>\n<p>The ones above are to edit the current value of the variable. Sorry to JS users, as there is no <code>i++;</code> or anything.</p>\n<blockquote>\n<p>Fun Fact: The python language was named after Monty Python.</p>\n</blockquote>\n<p>If you really want to know about the others, view <a href=\"https://www.tutorialspoint.com/python/python_basic_operators.htm\">Py Operators</a>​</p>\n<p>Like the title? Anyways, a <code>'</code> and a <code>\"</code> both indicate a string, but <strong>do not combine them!</strong></p>\n<p><em>quotes.py</em></p>\n<pre><code class=\"language-python\">x = 'hello' # Goodx = \"hello\" # Goodx = \"hello' # ERRORRR!!!\n</code></pre>\n<p><em>slicing.py</em></p>\n<h4>String Slicing <a id=\"string-slicing\"></a></h4>\n<p>You can look at only certain parts of the string by slicing it, using <code>[num:num]</code>. The first number stands for how far in you go from the front, and the second stands for how far in you go from the back.</p>\n<pre><code class=\"language-python\">x = 'Hello everybody!'x[1] # 'e'x[-1] # '!'x[5] # ' 'x[1:] # 'ello everybody!'x[:-1] # 'Hello everybod'x[2:-3] # 'llo everyb'\n</code></pre>\n<h4>Methods and Functions <a id=\"methods-and-functions\"></a></h4>\n<p>Here is a list of functions/methods we will go over:</p>\n<ul>\n<li><code>.strip()</code></li>\n<li><code>len()</code></li>\n<li><code>.lower()</code></li>\n<li><code>.upper()</code></li>\n<li><code>.replace()</code></li>\n<li><code>.split()</code></li>\n</ul>\n<p>I will make you try these out yourself. See if you can figure out how they work.</p>\n<p><em>strings.py</em></p>\n<pre><code class=\"language-python\">x = \" Testing, testing, testing, testing       \"print(x.strip())print(len(x))print(x.lower())print(x.upper())print(x.replace('test', 'runn'))print(x.split(','))\n</code></pre>\n<p>Good luck, see you when you come back!</p>\n<p>Input is a function that gathers input entered from the user in the command line. It takes one optional parameter, which is the users prompt.</p>\n<p><em>inp.py</em></p>\n<pre><code class=\"language-python\">print('Type something: ')x = input()print('Here is what you said: ', x)\n</code></pre>\n<p>If you wanted to make it smaller, and look neater to the user, you could do…</p>\n<p><em>inp2.py</em></p>\n<pre><code class=\"language-python\">print('Here is what you said: ', input('Type something: '))\n</code></pre>\n<p>Running: <em>inp.py</em></p>\n<pre><code class=\"language-python\">Type something:Hello WorldHere is what you said: Hello World\n</code></pre>\n<p><em>inp2.py</em></p>\n<pre><code class=\"language-python\">Type something: Hello WorldHere is what you said: Hello World\n</code></pre>\n<p>Python has created a lot of functions that are located in other .py files. You need to import these <strong>modules</strong> to gain access to the,, You may wonder why python did this. The purpose of separate modules is to make python faster. Instead of storing millions and millions of functions, , it only needs a few basic ones. To import a module, you must write <code>input &#x3C;modulename></code>. Do not add the .py extension to the file name. In this example , we will be using a python created module named random.</p>\n<p><em>module.py</em></p>\n<pre><code class=\"language-python\">import random\n</code></pre>\n<p>Now, I have access to all functions in the random.py file. To access a specific function in the module, you would do <code>&#x3C;module>.&#x3C;function></code>. For example:</p>\n<p><em>module2.py</em></p>\n<pre><code class=\"language-python\">import randomprint(random.randint(3,5)) # Prints a random number between 3 and 5\n</code></pre>\n<blockquote>\n<p>Pro Tip: Do <code>from random import randint</code> to not have to do <code>random.randint()</code>, just <code>randint()</code> To import all functions from a module, you could do <code>from random import *</code></p>\n</blockquote>\n<p>Loops allow you to repeat code over and over again. This is useful if you want to print Hi with a delay of one second 100 times.</p>\n<p><strong>for Loop</strong></p>\n<p>The for loop goes through a list of variables, making a seperate variable equal one of the list every time. Let's say we wanted to create the example above.</p>\n<p><em>loop.py</em></p>\n<pre><code class=\"language-python\">from time import sleepfor i in range(100):     print('Hello')     sleep(.3)\n</code></pre>\n<p>This will print Hello with a .3 second delay 100 times. This is just one way to use it, but it is usually used like this:</p>\n<p><em>loop2.py</em></p>\n<pre><code class=\"language-python\">import timefor number in range(100):     print(number)     time.sleep(.1)\n</code></pre>\n<p><strong>while Loop</strong></p>\n<p>The while loop runs the code while something stays true. You would put <code>while &#x3C;expression></code>. Every time the loop runs, it evaluates if the expression is True. It it is, it runs the code, if not it continues outside of the loop. For example:</p>\n<p><em>while.py</em></p>\n<pre><code class=\"language-python\">while True: # Runs forever     print('Hello World!')\n</code></pre>\n<p>Or you could do:</p>\n<p><em>while2.py</em></p>\n<pre><code class=\"language-python\">import randomposition = '&#x3C;placeholder>'while position != 1: # will run at least once    position = random.randint(1, 10)    print(position)\n</code></pre>\n<p>The if statement allows you to check if something is True. If so, it runs the code, if not, it continues on. It is kind of like a while loop, but it executes <strong>only once</strong>. An if statement is written:</p>\n<p><em>if.py</em></p>\n<pre><code class=\"language-python\">import randomnum = random.randint(1, 10)if num == 3:     print('num is 3. Hooray!!!')if num > 5:     print('Num is greater than 5')if num == 12:     print('Num is 12, which means that there is a problem with the python language, see if you can figure it out. Extra credit if you can figure it out!')\n</code></pre>\n<p>Now, you may think that it would be better if you could make it print only one message. Not as many that are True. You can do that with an <code>elif</code> statement:</p>\n<p><em>elif.py</em></p>\n<pre><code class=\"language-python\">import randomnum = random.randint(1, 10)if num == 3:    print('Num is three, this is the only msg you will see.')elif num > 2:    print('Num is not three, but is greater than 1')\n</code></pre>\n<p>Now, you may wonder how to run code if none work. Well, there is a simple statement called <code>else:</code></p>\n<p><em>else.py</em></p>\n<pre><code class=\"language-python\">import randomnum = random.randint(1, 10)if num == 3:    print('Num is three, this is the only msg you will see.')elif num > 2:    print('Num is not three, but is greater than 1')else:    print('No category')\n</code></pre>\n<p>So far, you have only seen how to use functions other people have made. Let use the example that you want to print the a random number between 1 and 9, and print different text every time. It is quite tiring to type:</p>\n<p>Characters: 389</p>\n<p><em>nofunc.py</em></p>\n<pre><code class=\"language-python\">import randomprint(random.randint(1, 9))print('Wow that was interesting.')print(random.randint(1, 9))print('Look at the number above ^')print(random.randint(1, 9))print('All of these have been interesting numbers.')print(random.randint(1, 9))print(\"these random.randint's are getting annoying to type\")print(random.randint(1, 9))print('Hi')print(random.randint(1, 9))print('j')\n</code></pre>\n<p>Now with functions, you can seriously lower the amount of characters:</p>\n<p>Characters: 254</p>\n<p><em>functions.py</em></p>\n<pre><code class=\"language-python\">import randomdef r(t):     print(random.randint(1, 9))     print(t)r('Wow that was interesting.')r('Look at the number above ^')r('All of these have been interesting numbers.')r(\"these random.randint's are getting annoying to type\")r('Hi')r('j')\n</code></pre>\n<h3>Chapter 01 - Getting Ready with Python <a id=\"chapter-01-getting-ready-with-python\"></a></h3>\n<h4>Installing Python 3, And Launching Python Shell <a id=\"installing-python-3-and-launching-python-shell\"></a></h4>\n<p>This video should help you get up and running with Python 3</p>\n<ul>\n<li>​<a href=\"https://www.youtube.com/watch?v=Ji1WW4Suaww\">Installing Python 3 and Launch Python Shell</a>​</li>\n</ul>\n<p>Installing Python is really a cakewalk. Search for “Python download” on <a href=\"http://www.google.com/\">www.google.com</a>. Download the installable and install it.</p>\n<p>A quick word of caution on Windows</p>\n<ul>\n<li>Make sure that you have the check-box “Add Python 3.6 to PATH”, checked.</li>\n</ul>\n<p>Once you have installed Python, you can launch the Python Shell.</p>\n<ul>\n<li>Windows - Launch cmd prompt by typing in 'cmd' command.</li>\n<li>Mac or Linux - Launch up terminal.</li>\n</ul>\n<p>Command to launch Python 3 is different in Mac.</p>\n<ul>\n<li>In Mac, type in <code>python3</code></li>\n<li>In other operating systems, including windows, type <code>python</code></li>\n</ul>\n<p>You can type code in python shell and code as well!</p>\n<p>You can use <code>print(5*4)</code>, and it shows <code>20</code>.</p>\n<p>You can execute the code, and the shell would immediately give you output.</p>\n<p>Using the the Python Shell is an awesome way to learn Python.</p>\n<h3>Chapter 02 - Introduction To Python Programming <a id=\"chapter-02-introduction-to-python-programming\"></a></h3>\n<p>Most programmers find programming a lot of fun, and besides, it also gets their work done.</p>\n<p>Programming mainly involves <em>problem solving</em>, where one makes use of a computer to solve a real world problem.</p>\n<p>During our journey here, we will approach programming in a very different way. We will not only introduce you to the Python language, but also help you pick up essential problem solving skills.</p>\n<p>As a programmer, you need to be able to look at a problem, and identify the important programming concepts relevant to solving it. Finally, you need to be able to use the language features and syntax, to express your solution on the computer. While all this looks complex, we want to make it easy for you. Together, we will tackle a variety of programming challenges, using these same steps. We will start with simple challenges (such as a Multiplication Table), and gradually increase the difficulty level over the duration of this book.</p>\n<p>Learning to program is a lot like learning to ride a bicycle. The first few steps are the most challenging ones.</p>\n<p>Once you get over these initial steps, your experience will become more and more enjoyable.</p>\n<p>Are you ready for your first programming challenge? Let's get going now! We wish you all the best.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the concept of problem solving</li>\n<li>Understood how good programmers approach problem solving</li>\n</ul>\n<h4>Step 01: Our First Programming Challenge <a id=\"step-01-our-first-programming-challenge\"></a></h4>\n<p>Our first <em>programming challenge</em> aims to do, what every kid does in math class: read out a multiplication table. We now want to give this task to the computer. Here is the statement of our problem:</p>\n<p><strong>The Print Multiplication Table Challenge (PMT-Challenge)</strong></p>\n<ol>\n<li>Compute the multiplication table for <code>5</code>, with entries from <code>1</code> to <code>10</code>.</li>\n<li>Display this table.</li>\n</ol>\n<p>The display needs to be:</p>\n<p><em><strong>5 * 1 = 5</strong></em></p>\n<p><em><strong>5 * 2 = 10</strong></em></p>\n<p><em><strong>5 * 3 = 15</strong></em></p>\n<p><em><strong>5 * 4 = 20</strong></em></p>\n<p><em><strong>5 * 5 = 25</strong></em></p>\n<p><em><strong>5 * 6 = 30</strong></em></p>\n<p><em><strong>5 * 7 = 35</strong></em></p>\n<p><em><strong>5 * 8 = 40</strong></em></p>\n<p><em><strong>5 * 9 = 45</strong></em></p>\n<p><em><strong>5 * 10 = 50</strong></em></p>\n<p>This is the challenge. For convenience, let's give it a label, say <em>PMT-Challenge</em>. What would be the important concepts we need to learn, to solve this challenge? The following list of concepts would be a good starting point:</p>\n<ul>\n<li><strong>Statements</strong></li>\n<li><strong>Expressions</strong></li>\n<li><strong>Variables</strong></li>\n<li><strong>Literals</strong></li>\n<li><strong>Conditionals</strong></li>\n<li><strong>Loops</strong></li>\n<li><strong>Methods</strong></li>\n</ul>\n<p>In the rest of this chapter, we will introduce these concepts to you, one-by-one. We will also show you how learning each concept, takes us closer to a solution to <em>PMT-Challenge</em>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Stated our first programming challenge</li>\n<li>Identified what programming concepts we need to learn, to solve this challenge</li>\n</ul>\n<h4>Step 02: Breaking Down <em>PMT-Challenge</em> <a id=\"step-02-breaking-down-pmt-challenge\"></a></h4>\n<p>Typically when we do programming, we have problems. Solving the problem typically need a step-by -step approach. Common sense tells us that to solve a complex problem, we break it into smaller parts, and solve each part one by one. Here is how any good programmer worth her salt, would solve a problem:</p>\n<ul>\n<li>Simplify the problem, by breaking it into sub-problems</li>\n<li>Solve the sub-problems in stages (in some order), using the language</li>\n<li>Combine these solutions to get a final solution</li>\n</ul>\n<p>The <em>PMT-Challenge</em> is no different! Now how do we break it down, and where do we really start? Once again, your common sense will reveal a solution. As a first step, we could get the computer to calculate say, <code>5 * 3</code>. The second thing we can do, is to try and print the calculated value, in a manner similar to <code>5 * 3 = 15</code>. Then, we could repeat what we just did, to print out all the entries of the <code>5</code> multiplication table. Let's put it down a little more formally:</p>\n<p>Here is how our draft steps look like</p>\n<ul>\n<li>Calculate <code>5 * 3</code> and print result as <code>15</code></li>\n<li>Print <code>5 * 3 = 15</code> (<code>15</code> is result of previous calculation)</li>\n<li>Do this ten times, once for each table entry (going from <code>1</code> to <code>10</code>)</li>\n</ul>\n<p>Let's start with that kind of a game plan, and see where it takes us.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned that breaking down a problem into sub-problems is a great help</li>\n<li>Found a way to break down the <em>PMT-Challenge</em> problem</li>\n</ul>\n<h4>Step 03: Introducing Operators And Expressions <a id=\"step-03-introducing-operators-and-expressions\"></a></h4>\n<p>Let's focus on solving the first sub-problem of <em>PMT-Challenge</em>, the numeric computation. We want the computer to calculate <code>5 * 5</code> for example, and print <code>25</code> for us. How do we get it to do that? That's what we would be looking at in this step.</p>\n<p><strong>Snippet-01: Introducing Operators</strong></p>\n<p>Launch up Python shell. We want to calculate <code>5 * 5</code>. How do we do that?</p>\n<p>Using our knowledge of school math, let's try <code>5 X 5</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 X 5    File \"&#x3C; stdin >\", line 1    5 X 5      ^    SyntaxError: invalid syntax\n</code></pre>\n<p>The Python Shell hits back at us, saying “<em>invalid syntax</em>”. This is how Python complains, when it doesn't fully understand the code you type in. Here, it says our code has a “<strong>SyntaxError</strong>”.</p>\n<p>The reason why it complains, is because '<code>X</code>' is not a valid <strong>operator</strong> in Python.</p>\n<p>The way you can do multiplication is by using the '<code>*</code>' <em>operator</em> .</p>\n<p>“<em>5 into 5</em>” is achieved by the code <code>5 * 5</code>, and you can see the result <code>25</code> being printed. Similarly, <code>5 * 6</code> gives us <code>30</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 * 6    30\n</code></pre>\n<p>There are a wide range of other operators in Python:</p>\n<ul>\n<li><code>5 + 6</code> gives a result of <code>11</code>.</li>\n<li>\n<p><code>5 - 6</code> leads to <code>-1</code>.</p>\n<pre><code class=\"language-python\">>>> 5 + 611>>> 5 - 6-1\n</code></pre>\n</li>\n</ul>\n<p><code>10 / 2</code>, gives an output of <code>5.0</code> . There is one interesting operator, <code>**</code>. Let's try <code>10 ** 3</code>. We ran this code, and the result we get is <code>1000</code>. Yes you guessed right, the operator performs “to the power of”. “<code>10</code> to the power of <code>3</code>” is <code>10 * 10 * 10</code>, or <code>1000</code>.</p>\n<pre><code class=\"language-python\">    >>> 10 / 2    5.0    >>> 10 ** 3    1000\n</code></pre>\n<p>Another interesting operator is <code>%</code>, called “<em>modulo</em>”, which computes the remainder on integer division. If we do <code>10 % 3</code>, what is the remainder when <code>10</code> is divided by <code>3</code>? <code>3 * 3</code> is <code>9</code>, and <code>10 - 9</code> is <code>1</code>, which is what <code>%</code> returns in this case.</p>\n<p>Let's look at some terminology:</p>\n<ul>\n<li>Whatever pieces of code we gave Python shell to run, are called <strong>expressions</strong>. So, <code>5 * 5</code>, <code>5 * 6</code> and <code>5 - 6</code> are all <em>expressions</em>. An expression is composed of <em>operators</em> and <strong>operands</strong>.</li>\n<li>In the expression <code>5 * 6</code>, the two values <code>5</code> and <code>6</code> are called operands, and the <code>*</code> operator <em>operates</em> on them.</li>\n<li>The values <code>5</code> and <code>6</code> are <strong>literals</strong>, because those are constants which cannot be changed.</li>\n</ul>\n<p>The cool thing about Python, is that you can even have expressions with multiple operators. Therefore, you can form an expression with <code>5 + 5 + 5</code>, which evaluates to <code>15</code>. This is an expression which has three operands, and two <code>+</code> operators. You can even have expressions with different types of operators, such as in <code>5 + 5 * 5</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 + 5 + 5    15    >>> 5 + 5 * 5    30\n</code></pre>\n<p>Try and play around with the expressions, and understand the output which results.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to give code input to the Python Shell</li>\n<li>Understood that Python has a predefined set of operators</li>\n<li>Used a few types of basic operators and their operands, to form expressions</li>\n</ul>\n<h4>Step 04: Programming Exercise IN-PE-01 <a id=\"step-04-programming-exercise-in-pe-01\"></a></h4>\n<p>At this stage, your smile tells us that you enjoy evaluating Python expressions. What if we tickle your mind a bit, to make sure it hasn't fallen asleep? Here is your first programming exercise.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write an expression to calculate the number of minutes in a day.</li>\n<li>Write an expression to calculate the number of seconds in a day.</li>\n</ol>\n<p><strong>Note</strong></p>\n<p>You need to solve these problems by yourself. If you are able to work them out, that's fantastic! But if not, that's part of the learning process.</p>\n<p><strong>Solutions</strong></p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>> 24 * 60​    1440\n</code></pre>\n<p>We wanted to calculate the number of minutes in a day. How do we do that? Think about this…</p>\n<ul>\n<li>How many number of hours are there in a day? <code>24</code>.</li>\n<li>And how many minutes does each hour have? It's <code>60</code>.</li>\n<li>So if you want to find out the number of minutes in a day, it's <code>24 * 60</code>, which is <code>1440</code>.</li>\n</ul>\n<p><strong>Solution 2</strong></p>\n<pre><code class=\"language-python\">    >>> 24 * 60 * 60​    86400\n</code></pre>\n<p>How many seconds are there in a day?</p>\n<ul>\n<li>Let's start with the number of hours, <code>24</code>.</li>\n<li>The number of minutes in an hour is <code>60</code>, and</li>\n<li>The number of seconds in a minute is <code>60</code> as well.</li>\n<li>So it's <code>24 * 60 * 60</code>, or <code>86400</code>.</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Solved a Programming Exercise involving common scenarios, using Python code involving:</p>\n<ul>\n<li>Expressions</li>\n<li>Operators</li>\n<li>Literals</li>\n</ul>\n</li>\n</ul>\n<h4>Step 05: Puzzles On Expressions <a id=\"step-05-puzzles-on-expressions\"></a></h4>\n<p>Let's look at a few puzzles related to expressions, in this step. Before that, let's revise some of the terminology we had learned earlier.</p>\n<p><code>5 + 6 + 10</code> is an example of an expression. In this expression, <code>5</code>, <code>6</code> and <code>10</code> are operands. The <code>+</code> here is the operator. You can have multiple operators in an expression. We also did mention that the operands, namely <code>10</code>, <code>6</code> and <code>5</code>, are literals. Their values will not change.</p>\n<p>Here are a few puzzles coming up, to explore aspects of expressions.</p>\n<p><strong>Snippet-01: Puzzles On Expressions</strong></p>\n<p>Think about what would happen when you do something of this kind: <code>5 $ 2</code>. You're right, it would throw a <code>SyntaxError</code>. When Python does not understand the code you type in, it reports an error. Here, the expression we're typing is <code>5 $ 2</code>, which does not make sense to Python, hence the <code>SyntaxError</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 $ 2    File \"&#x3C; stdin >\", line 1    5 $ 2    ^    SyntaxError: invalid syntax    >>> 5$2    File \"&#x3C; stdin >\", line 1    5 $ 2    ^    SyntaxError: invalid syntax\n</code></pre>\n<p>Let's say we type in <code>5+6+10</code>, without any spaces between the operands, and the operators. What do you think will happen? Surprisingly, the Python Shell does calculate the value!</p>\n<pre><code class=\"language-python\">    >>> 5+6+10    21\n</code></pre>\n<p>In an expression, using spaces makes it easier for you to read it, but it's not mandatory. <code>5 + 6 + 10</code> is easier to read than <code>5+6+10</code>, but does not make any difference to the Python compiler.</p>\n<p>The next puzzle tries to evaluate <code>5 / 2</code>, which is “<code>5</code> divided by <code>2</code>”. What would be the output? <code>2.5</code>.</p>\n<pre><code class=\"language-python\">    >>> 5/2    2.5\n</code></pre>\n<p>If you're coming from other programming languages like Java or C, this might be a surprising result. If you try this in Java for instance, you would get <code>2</code> as the output. Note that even though both operands are integers, the result of the <code>/</code> operation is a floating point value, <code>2.5</code> . Python does what is expected by a programmer!</p>\n<p>The puzzle after that tries to play with <code>5 + 5 * 6</code>. What would be the result of this expression? Will it be <code>5 + 5</code> or <code>10</code>, then <code>10 * 6</code>, which is <code>60</code>? Or, will it be <code>5</code> plus <code>5 * 6</code>, which is <code>5</code> + <code>30</code>, that's <code>35</code>?</p>\n<pre><code class=\"language-python\">    >>> 5 + 5 * 6    35\n</code></pre>\n<p>The correct result is <code>35</code>.</p>\n<p>Python decides this is based on the <strong>precedence</strong> of operators.</p>\n<p>Operators in Python are divided into two sets as follows:</p>\n<ul>\n<li><code>**</code>, <code>*</code>, <code>/</code> and <code>%</code> have higher precedence, or priority.</li>\n<li><code>+</code> and <code>-</code> have a lower precedence.</li>\n</ul>\n<p>Sub-expressions involving operators from {<code>*</code>, <code>/</code>, <code>%</code>, <code>**</code>} are evaluated before those involving operators from {<code>+</code>, <code>-</code>}</p>\n<p>Let's try another small puzzle on precedence, with <code>5 - 2 * 2</code>. What would be the result of this? Will it be <code>6</code>, or <code>1</code>? It's <code>1</code>, because <code>*</code> has a higher precedence than <code>-</code>. Thus <code>2 * 2</code> is <code>4</code>, and <code>5 - 4</code> gives us <code>1</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 - 2 * 2    1\n</code></pre>\n<p>Let's say we want to execute <code>5 - 2</code>, to give an output of <code>2</code>. How do we change the operator precedence?</p>\n<p>You cannot really change the precedence, but you can add parentheses to group sub-expressions differently.</p>\n<pre><code class=\"language-python\">    >>> (5 - 2) * 2    6    >>> 5 - ( 2 * 2 )    1\n</code></pre>\n<p>Parentheses have the highest precedence in Python, and can be used to override operator precedence. <code>(5 - 2)</code> gets calculated first, and the final result of the expression is <code>6</code>.</p>\n<p>A positive thing about using parentheses is, that it makes expressions more readable. So even in situations such as <code>5 - 2 * 2</code>, where we know the result according to precedence, adding parentheses is good.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we went about solving a few puzzles about expressions, touching concepts such as:</p>\n<ul>\n<li><code>SyntaxError</code> for incorrect operators</li>\n<li>White-space in expressions</li>\n<li>Floating Point division by default</li>\n<li>Operator Precedence</li>\n<li>Using parentheses</li>\n</ul>\n<h4>Step 06: Printing Text <a id=\"step-06-printing-text\"></a></h4>\n<p>In the previous step, we learned how to use expressions to compute values. In this step, let's see how we can actually print multiplication table entries, that are readable by the user.</p>\n<p><strong>Snippet-01: Printing Text</strong></p>\n<p>How do we go about printing a complete multiplication table entry? We want to print text such as <code>5 * 6 = 30</code> . But trying to do so, as we know it, gives us a <code>SyntaxError</code>. Clearly, there is a different way to print text, as compared to an expression.</p>\n<pre><code class=\"language-python\">    >>> 5 * 6 = 30      File \"&#x3C;stdin>\", line 1    SyntaxError: can't assign to operator\n</code></pre>\n<p>Let's first try to print a simple piece of text, <code>Hello</code>. Typing in this piece of code directly on Python Shell also gives us an error.</p>\n<pre><code class=\"language-python\">    >>> Hello    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'Hello' is not defined\n</code></pre>\n<p>Only expressions work that way, and <code>Hello</code> is not really an expression.</p>\n<p><code>\"Hello\"</code> is typically called a <strong>string</strong>, and represents the text of letters <code>'H'</code>, <code>'e'</code>, <code>'l'</code>, <code>'l'</code>, <code>'o'</code>. <code>\"Hello\"</code> is hence different from the number <code>5</code>.</p>\n<p>There are a number of in-built functions in Python to help print strings. One of these is the <code>print()</code> function. Can you just say <code>print Hello</code>?</p>\n<pre><code class=\"language-python\">    >>> print Hello      File \"&#x3C;stdin>\", line 1        print Hello                  ^    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(Hello)?\n</code></pre>\n<p>The Python compiler gives you an error, that says “missing parentheses”.</p>\n<p>Will <code>print(Hello)</code> work?</p>\n<pre><code class=\"language-python\">    >>> print (Hello)    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'Hello' is not defined\n</code></pre>\n<p>Nope! Again, this one failed because you need to indicate that <code>\"Hello\"</code> is a string.</p>\n<p>How do I indicate that <code>\"Hello\"</code> is a string? By putting it within double quotes.</p>\n<p>Let's try <code>print (\"Hello\")</code></p>\n<pre><code class=\"language-python\">    >>> print (\"Hello\")    Hello    >>> print(\"Hello\")    Hello\n</code></pre>\n<p><code>print(\"Hello\")</code> finally results in <code>\"Hello\"</code> being printed out. To be able to print <code>\"Hello\"</code>, the things we need to do are:</p>\n<ul>\n<li>Typing the method name print ,</li>\n<li>open parentheses ( ,</li>\n<li>Followed by a double quote \" ,</li>\n<li>The text Hello,</li>\n<li>and another double quote \" ,</li>\n<li>finished off with a closed parentheses ).</li>\n</ul>\n<p>What we have written here is called a <strong>statement</strong>, a simple piece of code to execute. As part of this statement, we are <strong>calling</strong> a <strong>function</strong>, named <code>print()</code>.</p>\n<p>What exactly are we trying to print?</p>\n<p>The text <code>\"Hello\"</code>, which is called a <strong>parameter</strong> or <strong>argument</strong>, to <code>print()</code>.</p>\n<p>Now let's get back to what we wanted to do, which is to print <code>5 * 6 = 30</code>. The most basic version would be something of this kind, <code>print(\"5 * 6 = 30\")</code>. Here, we are passing the entire value in the form of a string.</p>\n<pre><code class=\"language-python\">    >>> print(\"5 * 6 = 30\")    5 * 6 = 30\n</code></pre>\n<p>This prints the text on the console, as-is. The thing you need to understand here is, we aren't really calculating <code>30</code> using the formula <code>5 * 6</code>, but directly putting text <code>30</code> in here. That's called <strong>hard-coding</strong>.</p>\n<p>In a later step, we will look at how to actually calculate the value and pass it in.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Understood that displaying text on the console is not the same as printing an expression value</li>\n<li>Learned about the <code>print()</code> function, that is used to print text in Python.</li>\n<li>Found a way to print the text <code>\"5 * 6 = 30\"</code> on the console, by hard-coding values in a string</li>\n</ul>\n<h4>Step 07: Puzzles On Utility Methods, And Strings <a id=\"step-07-puzzles-on-utility-methods-and-strings\"></a></h4>\n<p>In the previous step, we learned how to print <code>5 * 6 = 30</code>. It was not a perfect solution, because we hard-coded everything. we used an in-built function named <code>print()</code>, passed a string to it, and invoked the method.</p>\n<p>In this step, let's look at a number of puzzles related to in-built methods, their parameters, and strings in general.</p>\n<p>For example, let's do <code>print(\"5 * 6\")</code>, as in the previous step. What does this code result in?</p>\n<pre><code class=\"language-python\">    >>> print(\"5*6\")    5*6    >>> print('5*6')    5*6\n</code></pre>\n<p>It just prints the string <code>\"5 * 6\"</code>.</p>\n<p>Let's say we try the code <code>print(5 * 6)</code>,</p>\n<pre><code class=\"language-python\">    >>> print(5*6)    30\n</code></pre>\n<p>Without the double quotes, <code>5 * 6</code> is an expression. What will be the output? <code>30</code>.</p>\n<p>If you call <code>print()</code> with an expression argument, it prints the value of the expression. However, when we pass something within double quotes, it becomes a piece of text, printed as-is.</p>\n<p>An interesting thing to note is, that in Python you can use either double-quotes (<code>\"</code> and <code>\"</code>), or single-quotes (<code>'</code> and <code>'</code>) with text values.</p>\n<p>Let's look at a few other in-built methods within Python.</p>\n<p>Consider <code>abs()</code> (which stands for absolute value), a method that accepts a numeric value. You can use <code>abs(10.5)</code>, passing <code>10.5</code> as a value to it, and it prints the absolute value of <code>10</code>.</p>\n<pre><code class=\"language-python\">    >>> abs 10.5      File \"&#x3C;stdin>\", line 1        abs 10.5               ^    SyntaxError: invalid syntax    >>> abs(10.5)    10.5\n</code></pre>\n<p>If you pass in a string value, will it work? It complains, “<code>abs()</code> function will not work with a string, it only works with numeric values”.</p>\n<pre><code class=\"language-python\">    >>> abs(\"10.5\")    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    TypeError: bad operand type for abs(): 'str'\n</code></pre>\n<p>Let's say you want to use a function that computes “to the power of”, for instance “<code>2</code> to the power of <code>5</code>”. In Python, there's an in-built function named <code>pow()</code>, which does just what we need. To <code>pow()</code>, you can pass two parameters and calculate the result. How do you do that?</p>\n<p>Will this work: <code>pow 2 5</code>? No, not at all. This code does not work as well: <code>pow(2 5)</code>. <code>pow(2, 5)</code> is the correct syntax.</p>\n<pre><code class=\"language-python\">    >>> pow 2 5      File \"&#x3C;stdin>\", line 1        pow 2 5            ^    SyntaxError: invalid syntax    >>> pow(2 5)      File \"&#x3C;stdin>\", line 1        pow(2 5)              ^    SyntaxError: invalid syntax    >>> pow(2, 5)    32\n</code></pre>\n<p>You'll see that <code>32</code> is printed.</p>\n<p>Let's see another example, “<code>10</code> to the power of <code>3</code>”. <code>pow(10,3)</code> is the alternative to saying <code>10 ** 3</code>. This gives us <code>1000</code>, similar to how <code>pow()</code> would.</p>\n<pre><code class=\"language-python\">    >>> pow(10, 3)    1000    >>> 10 ** 3    1000\n</code></pre>\n<p><code>max()</code> returns maximum in a set of numbers.<code>min()</code> function returns the minimum value.</p>\n<pre><code class=\"language-python\">    >>> max(34, 45, 67)    67    >>> min(34, 45, 67)    34\n</code></pre>\n<p>These are some of the in-built functions in Python, and we saw how to call the in-built functions by passing in a varied number of parameters.</p>\n<p>Python is case sensitive. So let's say I want of calculate <code>pow(2,5)</code>. So this would give me <code>32</code>. Now, what if I say capital <code>'P'</code> instead of small <code>'p'</code> here? <code>Pow(2,5)</code> would lead to an error.</p>\n<pre><code class=\"language-python\">    >>> pow(2,5)    32    >>> Pow(2,5)    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'Pow' is not defined\n</code></pre>\n<p>The only things not case-sensitive in Python, are string values. Earlier we saw that the code <code>print(\"Hello\")</code> displays the text <code>\"Hello\"</code>. Inside a string, the text can be in any case. Hence, <code>print(\"hello\")</code> displays <code>\"hello\"</code> ,with a small <code>'h'</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\")    Hello    >>> print(\"hello\")    hello    >>> print(\"hellO\")    hellO    >>> print ( \"hellO\" )    hellO\n</code></pre>\n<p>However inside your code, you need to be very particular about the case of function names, class names, variable names, and the like.</p>\n<p>In your code, whitespace does not really matter. You can add space here and here, and you would still get the same output. However, in case of strings, whitespace does matter.</p>\n<p>If we say <code>print(\"hellO World\")</code>, it would print <code>\"hellO World\"</code>, with a space in between. And if you do <code>print(\"hellO World\")</code> with three spaces, it would print the same. In expressions, white-space does not affect the output.</p>\n<pre><code class=\"language-python\">    >>> print ( \"hellO World\" )    hellO World    >>> print ( \"hellO     World\" )    hellO     World\n</code></pre>\n<p>The last thing we want to look at, is an <strong>escape sequence</strong>. Let's say you want to print a double quote, <code>\"</code>, in the code. If we were to do this: <code>print(\"Hello\"\")</code>, what would happen? The compiler says error!</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\"\")      File \"&#x3C;stdin>\", line 1        print(\"Hello\"\")                      ^    SyntaxError: EOL while scanning string literal\n</code></pre>\n<p>If you want to print a <code>\"</code> inside a string, use an escape sequence. In Python, the symbol <code>'\\'</code> is used as an <strong>escape character</strong>. On using <code>'\\'</code> adjacent to the <code>\"</code>, it prints <code>Hello\"</code> (notice the trailing <code>\"</code>). We have used the <code>'\\'</code> to <strong>escape</strong> the <code>\"</code>, by forming an <em>escape sequence</em> <code>\\\"</code>.</p>\n<pre><code class=\"language-python\">>>> print(\"Hello\\\"\")Hello\">>>\n</code></pre>\n<p>The other reason why you would want to use a <code>'\\'</code> is to print a <code>&#x3C;NEWLINE></code>. If you want to print <code>\"Hello World\"</code>, but with <code>\"Hello\"</code> on one line and <code>\"World\"</code> on the next, <code>'\\n'</code> is the escape sequence to use.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\\nWorld\")    Hello    World\n</code></pre>\n<p>The other important escape sequence is <code>'\\t'</code>, which prints a <code>&#x3C;TAB></code> in the output. When you do <code>print(\"Hello\\tWorld\")</code>, you can see the tab-space between <code>\"Hello\"</code> and <code>\"World\"</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\\tWorld\")    Hello   World\n</code></pre>\n<p>Another useful escape sequence is <code>\\\\</code> . If you want to print a <code>\\</code> , then use the sequence <code>\\\\</code> . You would see that it prints <code>Hello\\World</code> . Think about what would happen if we put six <code>\\</code> . Yes you're right! It would print this string: <code>\"\\\\\\\"</code> .</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\\\\World\")    Hello\\World    >>> print(\"Hello\\\\\\\\\\\\World\")    Hello\\\\\\World\n</code></pre>\n<p>One of the things with Python is, it does not matter whether you use double quotes or single quotes to enclose strings. There are some interesting, and useful ways of using a combination of both, within the same string. Have a look at this call: <code>print(\"Hello'World\")</code>, and notice the output we get. In a similar way, the following code will be accepted and run by the Python system: <code>print('Hello\"World')</code>.</p>\n<pre><code class=\"language-python\">    >>> print('Hello\"')    Hello\"    >>> print(\"Hello'World\")    Hello'World    >>> print(\"Hello\\\"World\")    Hello\"World    >>> print(\"Hello\\\"World\")    Hello\"World\n</code></pre>\n<p>The above two examples can be used as a tip by newbie programmers when they form string literals, and want to use them in their code:</p>\n<ul>\n<li>If the string literal contains one or more single quotes, then you can use double quotes to enclose it.</li>\n<li>However if the string contains one or more double quotes, then prefer to use single quotes to enclose it.</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Explored a number of puzzles related to code involving:</p>\n<ul>\n<li>Built-in functions for numeric calculations</li>\n<li>The <code>print()</code> function to display expressions and strings</li>\n</ul>\n</li>\n<li>\n<p>Covered the following aspects of the above utilities:</p>\n<ul>\n<li>Case-sensitive aspects of names and strings</li>\n<li>The role played by whitespace</li>\n<li>The escape character, and common escape sequences</li>\n</ul>\n</li>\n</ul>\n<h4>Step 08: Formatted Output With print() <a id=\"step-08-formatted-output-with-print\"></a></h4>\n<p>In the previous step, we learned how to print a hard-coded string, such as <code>\"5 * 6 = 30\"</code>.</p>\n<p>In this step, let's try to replace the hard-coded <code>30</code> with a computed value.</p>\n<p>Let's start with a simple scenario. Let's say we want to place that calculated value within a string, and display it. How do we do that?</p>\n<p><strong>Snippet-01: print() Formatted Output</strong></p>\n<p><code>format()</code> method can be used to print formatted text.</p>\n<p>Let's see an example:</p>\n<pre><code class=\"language-python\">    >>> print(\"VALUE\".format(5*2))    VALUE\n</code></pre>\n<p>We were expecting <code>10</code> to be printed, but it's actually printing <code>VALUE</code>.</p>\n<p>How do we get <code>10</code> to be printed then?</p>\n<pre><code class=\"language-python\">    >>> print(\"VALUE {0}\".format(5*2))    VALUE 10\n</code></pre>\n<p>By having an open brace <code>{</code>, closed brace <code>}</code>, and and by putting the index of the value between them. Here, the value is the first parameter, and it's index will be <code>0</code>.</p>\n<p><code>\"VALUE {0}\"</code> is what we need.</p>\n<p>Let's take another example. Suppose to the <code>format()</code> function, we pass three values: <code>10</code>, <code>20</code> and <code>30</code>.</p>\n<p>Typically when we count positions or indexes, we start from <code>0</code>.</p>\n<p>To print the first value, you need to pass in an index of <code>0</code>. To print the second value, pass an index of <code>1</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"VALUE {0}\".format(10,20,30))    VALUE 10    >>> print(\"VALUE {1}\".format(10,20,30))    VALUE 20    >>> print(\"VALUE {2}\".format(10,20,30))    VALUE 30\n</code></pre>\n<p>Now going back to our problem, we wanted to display <code>\"5 * 6 = 30\"</code>, but without hard-coding. Instead of <code>30</code>, we want the calculated value of <code>5 * 6</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"5 * 6 = 30\".format(5,6,5*6))    5 * 6 = 30\n</code></pre>\n<p>Let replace <code>\"5 * 6 = 30\"</code> with <code>\"5 * 6 = {2}\"</code>. <code>2</code> is the index of parameter value <code>5*6</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"5 * 6 = {2}\".format(5,6,5*6))    5 * 6 = 30\n</code></pre>\n<p>Cool! Progress made.</p>\n<p>Let's replace <code>5 * 6</code> with the right indices - <code>{0} * {1}</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,6,5*6))    5 * 6 = 30\n</code></pre>\n<p>The great thing about this, is now we can replace the values we passed to <code>print()</code> in the first place, without changing the indexes! So, we can display results for <code>5 * 7 = 35</code> and <code>5 * 8 = 40</code>. We are now able to print <code>5 * 6 = 30</code>, <code>5 * 7 = 35</code>, <code>5 * 8 = 40</code>, and can do similar things for other table entries as well.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,7,5*7))    5 * 7 = 35    >>> print(\"{0} * {1} = {2}\".format(5,8,5*8))    5 * 8 = 40    >>> print(\"{0} * {1} = {2}\".format(5,8,5*8))    5 * 8 = 40\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Discovered that Python provides a way to do formatted printing of string values</li>\n<li>Looked at the <code>format()</code> function, and saw how to call it within <code>print()</code></li>\n<li>Observed how we could work only with the indexes of parameters to <code>format()</code>, and change the parameters we pass without changing the code</li>\n</ul>\n<h4>Step 09: Puzzles On format() and print() <a id=\"step-09-puzzles-on-format-and-print\"></a></h4>\n<p>In this step, let's look at a few puzzles related to the format, and the print methods.</p>\n<p><strong>Snippet-01: format() And print() Puzzles</strong></p>\n<p>Let's say we pass in additional values, such as: <code>5 * 8</code>, <code>5 * 9</code> and <code>5 * 10</code>. However, within the call to <code>format()</code>, we are only referring to the values at index <code>0</code>, index <code>1</code> and index <code>2</code>. The values at indexes <code>3</code> and <code>4</code> are not used at all. What would happen when we run the code?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,8,5*8,5*9,5*10))    5 * 8 = 40\n</code></pre>\n<p>Would this throw an error? No, it does not. You can see that the additional values which are passed in, are conveniently ignored.</p>\n<p>Let's say instead of passing in a value of <code>2</code>, we pass <code>4</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {4}\".format(5,8,5*8,5*9,5*10))    5 * 8 = 50\n</code></pre>\n<p><code>5 * 10</code> is the value at index <code>4</code></p>\n<p>Now let's take a different scenario. We remove all the parameters passed to <code>format()</code>. However, inside the call to <code>print()</code>, we continue to say <code>{0} * {1} = {4}</code>. So we are trying to print the value at index <code>4</code>, but are only passing two values to the function <code>format()</code>. What do you think will happen?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {4}\".format(5,8))    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    IndexError: tuple index out of range\n</code></pre>\n<p>It says <code>IndexError</code>, which means :“you are asking me to fetch the value at index <code>4</code>, but only passing in two values. How can I do what you want?”</p>\n<p>Let's look at a few more things related to other data types. We try to format the following inside <code>print()</code>: <code>{0} * {1} = {2}</code>, and would pass in <code>2.5</code>, <code>2</code>, and <code>2.5 * 2</code> . Here, <code>2</code> is an integer value, but <code>2.5</code> is a floating point value. You can see that it prints <code>2.5 * 2 = 5.0</code>. So this approach of formatting values with <code>print()</code>, works also with floating point data as well.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(2.5,2,2.5*2))    2.5 * 2 = 5.0\n</code></pre>\n<p>Now, are there are other types of data that <code>format()</code> works with? Yes, strings can join the party.</p>\n<p>Let's say over here, we do: <code>print(\"My name is {0}\".format(\"Ranga\"))</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> print(\"My name is {0}\".format(\"Ranga\"))    My name is Ranga\n</code></pre>\n<p>Index <code>0</code> will be replaced with the first parameter to <code>format()</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Understood the behavior when the parameters passed to <code>format()</code>:</p>\n<ul>\n<li>Exceed the indexes accessed by <code>print()</code></li>\n<li>Are less than the indexes accessed by <code>print()</code></li>\n<li>Are of type integer, floating-point or string</li>\n</ul>\n</li>\n</ul>\n<h4>Step 10: Introducing Variables <a id=\"step-10-introducing-variables\"></a></h4>\n<p>We are slowly making progress toward our main goal, which is to print the <code>5</code> multiplication table.</p>\n<p>In the first statement, we are printing <code>5 * 1 = 5</code>, and then changing the literals. To make it print <code>5 * 2 = 10</code>, we are changing <code>1</code> to <code>2</code>. Next, we are changing <code>2</code> to <code>3</code>. How do we make it a little simpler, so that our effort is reduced?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,1,5*1))    5 * 1 = 5    >>> print(\"{0} * {1} = {2}\".format(5,2,5*2))    5 * 2 = 10    >>> print(\"{0} * {1} = {2}\".format(5,3,5*3))    5 * 3 = 15\n</code></pre>\n<p>Let's try a different approach.</p>\n<p>What would happen if you replace <code>1</code> with <code>index</code>, and <code>5 * 1</code> with <code>5 * index</code>, and try to run it?</p>\n<p>It gives an error! It says: “index is not defined”.</p>\n<p>Let's try and fix this, and execute <code>index = 2</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> index = 2\n</code></pre>\n<p>Aha! This compiles.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 2 = 10\n</code></pre>\n<p>And this statement is printing <code>5 * 2 = 10</code>.</p>\n<p>Let's try something else. Let's make <code>index = 3</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> index = 3    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 3 = 15\n</code></pre>\n<p>The same statement on being run, prints <code>5 * 3 = 15</code>.</p>\n<p>How can you check the value that <code>index</code> has? Just type in <code>index</code>.</p>\n<pre><code class=\"language-python\">    >>> index    3    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 3 = 15\n</code></pre>\n<p>The <code>index</code> symbol we have used here, is what is called a <strong>variable</strong>.</p>\n<p>In Python, it's also called a <strong>name</strong>.</p>\n<p>You can see that the value <code>index</code> referring to, can change over the duration of a program.</p>\n<p>Initially, <code>index</code> was referring to a value of <code>1</code>. later, <code>index</code> was referring to a value of <code>3</code>.</p>\n<p>Now, think about how you would print the entire table. All that you need to do, is start from <code>1</code>, execute the same statement with <code>print()</code> and <code>format()</code>, to get output <code>5 * 1 = 5</code>. Next, Change the value of index to <code>2</code>, and then print the same statement. Next, <code>index = 3</code>, and print the same statement again.</p>\n<pre><code class=\"language-python\">    >>> index = 1    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 1 = 5    >>> index = 2    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 2 = 10    >>> index = 3    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 3 = 15\n</code></pre>\n<p>With the same statement <code>print(\"{0} * {1} = {2}\".format(5,index,5*index))</code>, we are able to print different values. The value of <code>index</code> varies, but the code remains the same!</p>\n<p>Variables make the program much more easier to read, as well as more generic.</p>\n<p><strong>Snippet-02: Classroom Exercise On Variables</strong></p>\n<p>Let's do a simple exercise with variables.</p>\n<p>We want to create three variables <code>a</code>, <code>b</code> and <code>c</code>. Let's initially give them some values, say a value of <code>5</code> to <code>a</code>, <code>6</code> to <code>b</code> and <code>7</code> to <code>c</code>.</p>\n<p>We want to get output of this kind: <code>5 + 6 + 7 = 18</code>, without using the literal values.</p>\n<p>You would want to use the values stored in the variables in <code>a</code>, <code>b</code> and <code>c</code>.</p>\n<p>If you're hard-coding, the way to do it is with <code>print(\"5 + 6 + 7 = 18\")</code>.</p>\n<pre><code class=\"language-python\">    >>> a = 5    >>> b = 6    >>> c = 7    >>> print(\"5 + 6 + 7 = 18\")    5 + 6 + 7 = 18    >>> print(\"5 + 6 + 7 = 18\".format(a,b,c,a+b+c))    5 + 6 + 7 = 18\n</code></pre>\n<p>The way you can do that is with code like this: <code>print(\"{0} + {1} + {2} = {3}\".format(a,b,c,a+b+c))</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} + {1} + {2} = {3}\".format(a,b,c,a+b+c))    5 + 6 + 7 = 18\n</code></pre>\n<p>How do you confirm we are accessing values stored in the variables?</p>\n<p>Let's change the values of <code>a</code>, <code>b</code> and <code>c</code>. Let's make <code>a = 6</code> , <code>b = 7</code> , and <code>c = 8</code> . Execute same statement.</p>\n<pre><code class=\"language-python\">    >>> a = 6    >>> b = 7    >>> c = 8    >>> print(\"{0} + {1} + {2} = {3}\".format(a,b,c,a+b+c))    6 + 7 + 8 = 21\n</code></pre>\n<p>You can see the magic of variables at play here! Based on what values these variables are referring to, you can see that the output of the print statement changes.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to variables, or names, in Python</li>\n<li>Observed how we could pass in values of variables to the <code>format()</code> function</li>\n</ul>\n<h4>Step 11: Puzzles On Variables <a id=\"step-11-puzzles-on-variables\"></a></h4>\n<p>In the previous step, we were introduced to the concept of variables in Python.</p>\n<p>We will start with looking at a few puzzles.</p>\n<p><strong>Snippet-01: Puzzles On Variables</strong></p>\n<p>What if I try to refer to a variable which is not yet created?</p>\n<pre><code class=\"language-python\">    >>> count    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'count' is not defined    >>> print(count)    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'count' is not defined\n</code></pre>\n<p>Before using a variable, you need to have it assigned a value. If you have not defined a variable before, then you cannot use it. Consider <code>print(count)</code>, it does not know what count is. So it would throw an error, saying: “<code>count</code> is not defined, I have no idea what count is.”</p>\n<p>Once you assign a value to a variable, you can use it.</p>\n<pre><code class=\"language-python\">    >>> count = 4    >>> print(count)    4\n</code></pre>\n<p>The statement <code>count = 4</code> where we are creating a variable named <code>count</code> for the first time, is called a <strong>variable definition</strong>.</p>\n<p>This is the first time you're referring to a variable, and assigning a value to it.</p>\n<p>Python will create a variable in its memory.</p>\n<p>Variable names are case sensitive. <code>count</code> and <code>Count</code> are not the same thing.</p>\n<pre><code class=\"language-python\">    >>> Count    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'Count' is not defined    >>> count    4\n</code></pre>\n<p>There are rules to follow while naming variables.</p>\n<p>All variable names should either start with an alphabet , or an underscore <code>_</code> . <code>count</code>, <code>_count</code> are valid. <code>1count</code> is invalid.</p>\n<pre><code class=\"language-python\">    >>> 1count = 5      File \"&#x3C;stdin>\", line 1        1count = 5             ^    SyntaxError: invalid syntax    >>> count = 5    >>> _count = 5    >>> 1count      File \"&#x3C;stdin>\", line 1        1count             ^    SyntaxError: invalid syntax    >>> 2count      File \"&#x3C;stdin>\", line 1        2count             ^    SyntaxError: invalid syntax\n</code></pre>\n<p>After the first symbol, you can also use a numeral in variable names.</p>\n<pre><code class=\"language-python\">    >>> c12345 = 5\n</code></pre>\n<p>To summarize the rules for naming variables.</p>\n<ul>\n<li>This should start with an alphabet (a capital or a small alphabet) or underscore.</li>\n<li>Starting the second character, it can be alphabet, or underscore, or a numeric value.</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Understood that a variable needs to be defined before it is used</li>\n<li>Learned that there are certain rules to be followed while giving names to variables</li>\n</ul>\n<h4>Step 12: Introducing Assignment <a id=\"step-12-introducing-assignment\"></a></h4>\n<p>In this step, we will look at an important concept in Python, called <strong>assignment</strong>. In previous steps, we created variables, like <code>i = 5</code>.</p>\n<p><strong>Snippet-01: Introducing Assignment</strong></p>\n<p>You can create other variables using whatever value <code>i</code> is referring to. If we say <code>j = i</code>, what would happen?</p>\n<pre><code class=\"language-python\">    >>> i = 5    >>> j = i    >>> j    5\n</code></pre>\n<p><code>j</code> would start referring to the same value that <code>i</code> is referring to. This statement is called an <strong>assignment</strong>.</p>\n<p>Let's try <code>j = 2 * i</code>.</p>\n<pre><code class=\"language-python\">    >>> j = 2 * i    >>> j    10\n</code></pre>\n<p><code>j</code> refers to a value of <code>10</code></p>\n<p><code>=</code> has a different meaning in programming compared to mathematics.</p>\n<p>In mathematics, When we execute <code>j = i</code>, it means <code>j</code> and <code>i</code> are equal.</p>\n<p>In prgramming, the value of the expression on right hand side is assigned to the variable on the right hand side. Can you use a constant on the left hand side of an assignment? The answer is “No”!</p>\n<pre><code class=\"language-python\">    >>> 5 = j      File \"&#x3C;stdin>\", line 1    SyntaxError: can't assign to literal\n</code></pre>\n<p>The Python Shell throws an error, saying “Can't assign to literal”, as <code>5</code> is a literal.</p>\n<p>Let's create a couple of variables. <code>num1 = 5</code> and <code>num2 = 3</code>. We would want to add these and create a fresh variable. Let's say the name of the variable is <code>sum</code>.</p>\n<pre><code class=\"language-python\">    >>> num1 = 5    >>> num2 = 3    >>> sum = num1 + num2    >>> sum    8\n</code></pre>\n<p>Create 3 variables <code>a</code>, <code>b</code> and <code>c</code> with different values and calculate their sum.</p>\n<pre><code class=\"language-python\">    >>> a = 5    >>> b = 6    >>> c = 7    >>> sum = a + b + c    >>> sum    18\n</code></pre>\n<p>We have just seen the mechanics of how assignment works in Python.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned what happens when you assign a value to a variable, which may or may not exist</li>\n<li>Discovered that literal constants cannot be placed on the left hand side of the assignment(<code>=</code>) operator</li>\n</ul>\n<h4>Step 13: Introducing Formatted Printing <a id=\"step-13-introducing-formatted-printing\"></a></h4>\n<p>Until now, we have been using the <code>format()</code> method to format and print values. Let's see a better approach to printing values.</p>\n<p>This is the approach we used until now.</p>\n<pre><code class=\"language-python\">    >>> a = 1    >>> b = 2    >>> c = 3    >>> sum = a + b + c    >>> print(\"{0} + {1} + {2} = {3}\".format(a, b, c ,sum))    1 + 2 + 3 = 6\n</code></pre>\n<p>Python has the concept of formatted strings. The syntax to use a formatted string is very simple - <code>f\"\"</code>.</p>\n<p>If we want to print the value of a variable <code>a</code>, we can use <code>{a}</code> in the text.</p>\n<pre><code class=\"language-python\">    >>> print(f\"\")    >>> print(f\"value of a is {a}\")    value of a is 1    >>> print(f\"value of b is {b}\")    value of b is 2\n</code></pre>\n<p>The variable within braces is replaced by its value.</p>\n<p>You can use expressions in a formatted string. Example below uses <code>{a+b}</code>.</p>\n<pre><code class=\"language-python\">    >>> print(f\"sum of a and b is {a + b}\")    sum of a and b is 3\n</code></pre>\n<p>This feature was introduced in a Python 3 release.</p>\n<p>Let's get back to the original problem we wanted to solve: printing <code>5 + 6 + 7 = 18</code>, using formatted strings.</p>\n<pre><code class=\"language-python\">    >>> print(f\"{a} + {b} + {c} = {sum}\")    1 + 2 + 3 = 6\n</code></pre>\n<p>You can see how easy it turns out to be!</p>\n<h4>Step 14: The PMT-Challenge Revisited <a id=\"step-14-the-pmt-challenge-revisited\"></a></h4>\n<p>We want to print the <code>5</code>-table from <code>5 * 1 = 5</code> onward, until we reach to <code>5 * 10 = 50</code>. The best solution we have right now, is shown below:</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> index = 1    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 1 = 5    >>> index = 2    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 2 = 10    >>> index = 3    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 3 = 15    >>> index = 4    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 4 = 20\n</code></pre>\n<p>Can we do something, to make sure that the code remains the same all the time, but the <code>index</code> value gets updated?</p>\n<pre><code class=\"language-python\">    >>> index = index + 1    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 5 = 25    >>> index = index + 1    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 6 = 30    >>> index = index + 1    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))    5 * 7 = 35\n</code></pre>\n<p>We used <code>index = index + 1</code> to increment <code>index</code> value.</p>\n<p>If we execute these same two statements again and again, we can print the entire table! This is exactly what loops help us do: execute the same statements repeatedly.</p>\n<p>The simplest loop available in Python is the <strong>for loop</strong>.</p>\n<p>When we run a <code>for</code> loop, we need to specify the range of values - <code>1</code> to <code>10</code> or <code>1</code> to <code>20</code>, and so on. <code>range()</code> function helps us to specify a range of values.</p>\n<pre><code class=\"language-python\">    >>> range(1,10)    range(1, 10)\n</code></pre>\n<p>The syntax of the <code>for</code> loop is: <code>for i in range(1, 10): ...</code>. Here, <code>i</code> is the name of the <strong>control variable</strong>. In Python, you need to put a colon, '<code>:</code>', and in the next line give indentation.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):    ...   print(i)    ...    1    2    3    4    5    6    7    8    9\n</code></pre>\n<p>You would see that it prints from <code>1</code> to <code>9</code>.</p>\n<p>When we run a loop in <code>range(1, 10)</code>, <code>1</code> is <em>inclusive</em> and <code>10</code> is <strong>exclusive</strong>.The loop runs from <code>1</code> to the value before <code>10</code>, which is <code>9</code>.</p>\n<p>The leading whitespace before <code>print(i)</code> is called <strong>indentation</strong>. We'll talk about indentation later, when we talk about puzzles related to the <code>for</code> loop.</p>\n<p>How can you extend this concept to solving our <em>PMT-Challenge</em> problem?</p>\n<pre><code class=\"language-python\">    >>> print(f\"{5} * {index} = {5*index}\")    5 * 7 = 35\n</code></pre>\n<p>What we were doing earlier, was calling <code>print()</code> with a formatted string. Now we want to print this statement for different values of <code>i</code>.</p>\n<p>How can you do that?</p>\n<p>Let's start with a simple example.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,11):    ...   print(f\"{i}\")    ...    1    2    3    4    5    6    7    8    9    10\n</code></pre>\n<p><code>print(f\"{i}\")</code> prints the value of i.</p>\n<p>Now, how do we get it to print <code>5 * 1 = 5</code> to <code>5 * 10 = 50</code>?</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,11):    ...   print(f\"5 * {i} = {5 * i}\")    ...    5 * 1 = 5    5 * 2 = 10    5 * 3 = 15    5 * 4 = 20    5 * 5 = 25    5 * 6 = 30    5 * 7 = 35    5 * 8 = 40    5 * 9 = 45    5 * 10 = 50    >>> 5 * 4 * 50    1000\n</code></pre>\n<p><code>print(f\"5 * {i} = {5 * i}\")</code> prints a specific multiple of 5.</p>\n<h4>Step 15: Loops <a id=\"step-15-loops\"></a></h4>\n<p>In a previous step, we took a major step in programming. We wrote our first for loop with Python. In this step, let's try a few puzzles to understand the for loop even further.</p>\n<p>The syntax of the for loop we looked at earlier was:</p>\n<pre><code class=\"language-python\">  for i in range(1, 10):    print(i)\n</code></pre>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say we write a <code>for</code> loop, but don't give a <code>:</code> after the <code>range()</code> method, to close the first line. What would happen?</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10)      File \"&#x3C;stdin>\", line 1        for i in range(1,10)                           ^        SyntaxError: invalid syntax\n</code></pre>\n<p>Invalid syntax. A <code>:</code> is mandatory within the <code>for</code> loop syntax.</p>\n<p>Let's provide a <code>:</code> and in the next line, use <code>print(i)</code> without space before it (without indentation).</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):    ... print(i)      File \"&#x3C;stdin>\", line 2        print(i)            ^    IndentationError: expected an indented block\n</code></pre>\n<p>Most other programming languages use open brace <code>{</code> and closed brace <code>}</code> as delimiters in a <code>for</code> loop. However, Python uses indentation to identify which code is part of a <code>for</code> loop, and which is not. So if we are writing the body of a <code>for</code> loop, we must use indentation, and leave atleast a single <code>&#x3C;SPACE></code>.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):    ...   print(i)    ...    1    2    3    4    5    6    7    8    9\n</code></pre>\n<p>How do we execute two lines of code as part of the <code>for</code> loop?</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):    ...  print(i)    ...  print(2*i)    ...    1    2    2    4    3    6    4    8    5    10    6    12    7    14    8    16    9    18\n</code></pre>\n<p>We are indenting both statements with a space - <code>print(i)</code> and <code>print(2*i)</code>.</p>\n<p>When for loop has only one line of code, you can specify it right after the <code>:</code></p>\n<pre><code class=\"language-python\">    >>> for i in range(2,5): print(i)    ...    2    3    4\n</code></pre>\n<p>However, this is not considered to be a good programming practice. Even though you may want to execute just one statement in a <code>for</code> loop, indentation on a new line is recommended.</p>\n<p>Another best practice is to use four <code>&#x3C;SPACE></code>s for indentation, instead of just two. This would give clear indentation of the code.</p>\n<pre><code class=\"language-python\">    >>> for i in range(2,5):    ...     print(i)    ...    2    3    4\n</code></pre>\n<p>Anybody who looks at the code immediately understands that this <code>print()</code> is part of the <code>for</code> loop.</p>\n<p>Let's say you only want to print the odd numbers till <code>10</code>, which are <code>1</code>, <code>3</code>, <code>5</code>, <code>7</code> and <code>9</code>. The <code>range()</code> function offers an interesting option.</p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11,2):    ...   print(i)    ...    1    3    5    7    9\n</code></pre>\n<p>In <code>for i in range(1, 11, 2)</code>, we pass in a third argument, called a <em>step</em>. After each iteration, the value of <code>i</code> is increment by <code>step</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Looked at a few puzzles about the <code>for</code> loop, which lay emphasis on the following aspects of for:</p>\n<ul>\n<li>The importance of syntax elements such as the colon</li>\n<li>Indentation</li>\n<li>Variations of the <code>range()</code> function</li>\n</ul>\n</li>\n</ul>\n<h4>Step 16: Programming Exercise PE-BA-02 <a id=\"step-16-programming-exercise-pe-ba-02\"></a></h4>\n<p>In the previous step, after initially exploring the Python <code>for</code> loop, we looked at a number of puzzles.</p>\n<p>In this step, let's look at a few exercises.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Print the even numbers up to 10. We would want to print 2 4 6 8 10, using a for loop.</li>\n<li>Print the first 10 numbers in reverse</li>\n<li>Print the first 10 even numbers in reverse</li>\n<li>Print the squares of the first 10 numbers</li>\n<li>Print the squares of the first 10 numbers, in reverse</li>\n<li>Print the squares of the even numbers</li>\n</ol>\n<p><strong>Solution 1</strong></p>\n<p>Instead of starting with <code>1</code>, we need to start with <code>2</code>. Each time, <code>i</code> it would be incremented by <code>2</code>, and <code>2 4 6 8 and 10</code> would be printed.</p>\n<pre><code class=\"language-python\">    >>> for i in range (2,11,2):    ...   print(i)    ...    2    4    6    8    10\n</code></pre>\n<p><strong>Solution 2</strong></p>\n<p>We would want to print the numbers in reverse. Think about how you would do that using the <code>range()</code> function. We'd want go from <code>10</code>, <code>9</code>, <code>8</code>, and so on up to <code>1</code>.</p>\n<pre><code class=\"language-python\">    >>> for i in range (10,0,-1):    ...   print(i)    ...    10    9    8    7    6    5    4    3    2    1\n</code></pre>\n<p>The value to start with is <code>10</code>. As we discussed earlier, the end value is exclusive. So to print from <code>10</code> to <code>1</code>, we want to end one value which is <code>0</code>. <code>range(10, 0)</code> seems to be what we need.</p>\n<p>Usually these step value is positive, but we need to go backwards from <code>10</code>. Hence, we would give a step value of <code>-1</code>.</p>\n<p><strong>Solution 3</strong></p>\n<p>Now, let's print the first <code>10</code> even numbers in reverse.</p>\n<pre><code class=\"language-python\">    >>> for i in range (20,0,-2):    ...   print(i)    ...    20    18    16    14    12    10    8    6    4    2\n</code></pre>\n<p><strong>Solution 4</strong></p>\n<p>Next, we would want to print the squares of the first 10 numbers.</p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):    ...     print(i * i)    ...    1    4    9    16    25    36    49    64    81    100\n</code></pre>\n<p><strong>Solution 5</strong></p>\n<p>Let's print the squares in the reverse order.</p>\n<pre><code class=\"language-python\">    >>> for i in range (10,0,-1):    ...     print(i*i)    ...    100    81    64    49    36    25    16    9    4    1\n</code></pre>\n<p><strong>Solution 6</strong></p>\n<p>Print the squares of the even numbers. How to do that?</p>\n<pre><code class=\"language-python\">    >>> for i in range (10,0,-2):    ...     print(i*i)    ...    100    64    36    16    4\n</code></pre>\n<p>The key part is using a step of <code>-2</code></p>\n<p>We leave it as an exercise for you, to print squares of odd numbers.</p>\n<p><strong>Summary</strong></p>\n<p>In this video, we: * Tried out a few exercises involving the for loop, by playing around with printing sequences of numbers.</p>\n<ul>\n<li>Used the for loop to simplify the solution to the <em>PMT-Challenge</em> problem.</li>\n</ul>\n<h4>Step 17: Review: The Basics Of Python <a id=\"step-17-review-the-basics-of-python\"></a></h4>\n<p>It must have been a roller-coaster ride to solve the multiplication table challenge so far. If you're new to programming, there are a wide range of topics and concepts, that you would have learned during this small journey.</p>\n<p>Let's quickly revise the important concepts we have learned during this small journey.</p>\n<ul>\n<li><code>1</code>, <code>11</code>, <code>5</code>, … are all called literals because these are constant values. Their values don't really change. _Consider <code>5 _ 4 _ 50`. This is an expression. `_`is an operator, and`5`, `4`and`50</code> are operands.</li>\n<li>The name <code>i</code> in <code>i = 1</code>, is called a variable. It can refer to different values, at different points in time.</li>\n<li><code>range()</code> and <code>print()</code> are in-built Python functions.</li>\n<li>Every complete line of code is called statement. The specific statement <code>print()</code>, is invoking a method. The other statement which we looked at earlier, was an assignment statement. <code>index = index + 1</code> would evaluate <code>index + 1</code>, and have the <code>index</code> variable refer to that value.</li>\n<li>The syntax of the <code>for</code> loop was very simple. <code>for var in range(1, 10) : ...</code>, followed by statements you would want to execute in a loop, with indentation. For the sake of indentation we left four <code>&#x3C;SPACE></code>s in front of each statement inside the <code>for</code> loop.</li>\n</ul>\n<p>So that, in a nutshell, is what we have learned over the course of our first section.</p>\n<h3>Chapter 03 - Introducing Methods <a id=\"chapter-03-introducing-methods\"></a></h3>\n<p>In the last section, we introduced you to the basics of python. We learned those concepts by applying them to solve the <em>PMT-Challenge</em> problem. The code below is what we ended up with as we solved that chellenge.</p>\n<p><strong>Snippet-01: Current Solution To PMT-Challenge</strong></p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):    ...   print(f\"8 * {i} = {8 * i}\")\n</code></pre>\n<p>If we wanted to change the code to print the <code>7</code> table, we need to change the value <code>7</code> used in the for loop, to <code>8</code>. It's simple, but still not as friendly as you would like.</p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):    ...   print(f\"7 * {i} = {7 * i}\")\n</code></pre>\n<p>To print a <code>7</code> table, it would be awesome if could say <code>print_multiplication_table</code>, and give a value of 7 beside it, and it would do the rest:</p>\n<pre><code class=\"language-python\">    >>> print_multiplication_table(7)    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'print_multiplication_table' is not defined    >>> print_multiplication_table(8)    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'print_multiplication_table' is not defined\n</code></pre>\n<p>Similarly, <code>print_multiplication_table(8)</code>, could print the multiplication table for <code>8</code>!</p>\n<p>To be able to do this, we need to create a <strong>method</strong>, or a <strong>function</strong>. Creating a method makes the code <em>reusable</em>, and we can invoke that method very easily by passing <em>arguments</em>.</p>\n<p>In this section, we take an in-depth look at methods.</p>\n<h4>Step 01: Defining Your First Method <a id=\"step-01-defining-your-first-method\"></a></h4>\n<p>Methods are very important building blocks in Python programming. In this step, we will create a simple method that prints <code>\"Hello World\"</code>, twice.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>When we talk about a method, we need to give it a name. We are already using an in-built Python method here, which is <code>print()</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello World\")    Hello World    >>> print(\"Hello World\")    Hello World\n</code></pre>\n<p>Similar to that, we need to give a name to our body of code. Let's say the name is <code>print_hello_world_twice</code>.</p>\n<p>The syntax to create a method in Python is straightforward:</p>\n<ul>\n<li>At the start, use the keyword <code>def</code> followed by a space.</li>\n<li>Followed by name of the method - <code>print_hello_world_twice</code>.</li>\n<li>Add a pair of parenthesis: <code>()</code>.</li>\n<li>\n<p>This is followed by a colon <code>:</code> (similar to what we used in a <code>for</code> loop).</p>\n<pre><code class=\"language-python\">>>> def print_hello_world_twice():...     print(\"Hello World\")...     print(\"Hello World\")...\n</code></pre>\n</li>\n</ul>\n<p>All statements in a method should be indented. The two <code>print(\"Hello World\")</code> are indented. So, they are part of the method body.</p>\n<p><code>print_hello_world_twice()</code> defines a method, and it has certain code inside its body.</p>\n<p>How do we call this method? Is it sufficient to say <code>print_hello_world_twice</code>?</p>\n<pre><code class=\"language-python\">    >>> print_hello_world_twice    &#x3C;function print_hello_world_twice at 0x10a71ef28>\n</code></pre>\n<p>Python Shell says, there's a function defined with that specific name.</p>\n<p>How do we execute a method? Very simple! Add a pair of parentheses to the name, <code>()</code>!</p>\n<pre><code class=\"language-python\">    >>> print_hello_world_twice()    Hello World    Hello World    >>> print_hello_world_twice()    Hello World    Hello World\n</code></pre>\n<p>Now, we are able to run the method.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned we can define our own methods in the code we write</li>\n<li>Understood how to define a method, and all its syntax elements</li>\n<li>Saw how we can invoke a method we write</li>\n</ul>\n<h4>Step 02: Programming Exercise PE-MD-01 <a id=\"step-02-programming-exercise-pe-md-01\"></a></h4>\n<p>We will now leave you with two exercises, based on what we have learned about methods so far.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write a method called <code>print_hello_world_thrice()</code>. It should print <code>\"Hello World\"</code> thrice to the output. Define this method, and also invoke it.</li>\n<li>\n<p>Write and execute a method, that prints four statements:</p>\n<ol>\n<li>“I have created my first variable.”</li>\n<li>“I've created in my first loop.”</li>\n<li>“I've created my first method.”</li>\n<li>“I am excited to learn Python.” You need to print these four statements on four consecutive lines.</li>\n</ol>\n</li>\n</ol>\n<p><strong>Solutions</strong></p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>> def print_hello_world_thrice():    ...     print(\"Hello World\")    ...     print(\"Hello World\")    ...     print(\"Hello World\")    ...    >>> print_hello_world_thrice()    Hello World    Hello World    Hello World\n</code></pre>\n<p><strong>Solution 2</strong></p>\n<pre><code class=\"language-python\">    >>> def print_your_progress():    ...     print(\"Statement 1\")    ...     print(\"Statement 2\")    ...     print(\"Statement 3\")    ...     print(\"Statement 4\")    ...    >>> print_your_progress()    Statement 1    Statement 2    Statement 3    Statement 4​    def print_your_progress():        print(\"Statement 1\")        print(\"Statement 2\")        print(\"Statement 3\")        print(\"Statement 4\")\n</code></pre>\n<p>For convenience, we have changed the exact text we need to print. Call this method with the syntax <code>print_your_progress()</code>, and you're able to execute its code.</p>\n<p>Now try another exercise. We want to print <code>\"Statement 1\"</code>, <code>\"Statement 2\"</code>, <code>\"Statement 3\"</code> and <code>\"Statement 4\"</code> on different lines, using just one print statement. How can you do that?</p>\n<pre><code class=\"language-python\">    >>> def print_your_progress():    ...     print(\"Statement 1\\nStatement 2\\nStatement 3\\nStatement 4\")    ...    >>> print_your_progress()    Statement 1    Statement 2    Statement 3    Statement 4\n</code></pre>\n<p>We are using the newline character <code>\\n</code>.</p>\n<p>Let's look at the difference between defining and executing a method.</p>\n<p>When we are writing a method definition, we are writing the code as part of its body. It has a specific syntax, and starts with the <code>def</code> keyword.</p>\n<p>A definition by itself cannot cause the code in its body to be executed.</p>\n<p><code>print_your_progress()</code> represents a method call. The code inside the method is executed.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Implemented solutions to a few exercises that test our understanding of Python methods. We touched concepts such as:</p>\n<ul>\n<li>Defining a method body</li>\n<li>The way to invoke a method, to run its code</li>\n<li>The difference between the two</li>\n</ul>\n</li>\n</ul>\n<h4>Step 03: Passing Parameters To Methods <a id=\"step-03-passing-parameters-to-methods\"></a></h4>\n<p>In the previous step,we created methods. We defined <code>print_hello_world_twice()</code>, and this printed <code>\"Hello World\"</code> twice. In this step, let's talk about <em>method arguments</em>, or <em>parameters</em>.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> print_hello_world_twice()    Hello World    Hello World    >>> print_hello_world_thrice()    Hello World    Hello World    Hello World\n</code></pre>\n<p>Earlier, we wrote code for <code>print_hello_world_thrice()</code>, which prints the message three times.</p>\n<p>Let's say you want to print it five times. You would need to write another method that does what you need. Doesn't that seem monotonous?</p>\n<p>Instead of that, Won't it be great if I can call the method by the same name, say <code>print_hello_world(5)</code>, and it would print “Hello World” five times?</p>\n<p>The <code>5</code> which we are passing here is called an <strong>argument</strong>.</p>\n<p>How do we define our method to accept this argument?</p>\n<p>Let's call our argument <code>no_of_times</code>. If you have any experience with other programming languages, they generally need you to specify the parameter type. Something like <code>This parameter is an integer/float/string, or other types</code>. But Python does not require parameter type.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):    ...    print(\"Hello World\")    ...    print(no_of_times)    ...\n</code></pre>\n<p>Although we are not doing exactly what we set out to, let's see what would happen. What would happen if we say <code>print_hello_world()</code> ?</p>\n<pre><code class=\"language-python\">    >>> print_hello_world()    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    TypeError: print_hello_world() missing 1 required positional argument: 'no_of_times'\n</code></pre>\n<p>Error! Something like “Hey, you have created <code>print_hello_world</code> with a parameter, but not passing anything in here! Go ahead and pass a value”. Let's pass in a value, such as <code>5</code>.</p>\n<pre><code class=\"language-python\">    >>> print_hello_world(5)    Hello World    5    >>> print_hello_world(10)    Hello World    10    >>> print_hello_world(100)    Hello World    100\n</code></pre>\n<p>With <code>print_hello_world(5)</code>, you can see <code>\"Hello World\"</code> and <code>5</code> being printed. We are now able to define this method to accept a value, and print that value by invoking it. You can pass in any value, such as<code>10</code>, <code>100</code>, or others.</p>\n<p>Now think of a different solution for this method, where you don't repeat the same piece of code to print <code>\"Hello World\"</code>. Consider <code>print_hello_world(5)</code>, it should still print <code>\"Hello World\"</code> <code>5</code> times. How do you do that?</p>\n<p>Think about using something along the lines of a loop.</p>\n<p><strong>Snippet-02:</strong></p>\n<p>For now, what we are doing is we are printing <code>\"Hello World\"</code> <code>10</code> times.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):    ...    for i in range(1,10):    ...       print(\"Hello World\")    ...​    >>> print_hello_world(5)    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p>Our method call <code>print_hello_world(5)</code> now prints <code>\"Hello World\"</code> <code>10</code> times.</p>\n<p>However just print the message <code>5</code> times. We need to make use of the parameter <code>no_of_times</code> inside the <code>for</code> loop as well.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):    ...    for i in range(1,no_of_times):    ...       print(\"Hello World\")    ...​    >>> print_hello_world(5)    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p>Now let's execute the method again. You can see that it's printing <code>4</code> times only.</p>\n<p>Why is it not printing <code>5</code> times?</p>\n<p>That's because <code>no_of_times</code> as a second parameter to <code>range()</code> is exclusive.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):    ...    for i in range(1,no_of_times+1):    ...       print(\"Hello World\")    ...    >>> print_hello_world(5)    Hello World    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p>Great, it's now printing the message <code>5</code> times!</p>\n<pre><code class=\"language-python\">    >>> print_hello_world(7)    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p>If you pass a different argument like <code>7</code>, the message is displayed <code>7</code> times.</p>\n<p>Something you need to always be cautious about in Python, is the indentation. Over here, the <code>for</code> loop is part of the method body. So we have extra indentation for it. The print is part of the <code>for</code> loop body. So guess what, even more indentation for that code.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to pass arguments to a method</li>\n<li>Understood that the method definition needs to have parameters coded in</li>\n<li>Observed that arguments passed during a method call can be accessed inside a methods body</li>\n</ul>\n<h4>Step 04: Classroom Exercise CE-MD-01 <a id=\"step-04-classroom-exercise-ce-md-01\"></a></h4>\n<p>In this step, Let's look at a few exercises related to the method parameter.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write a method called <code>print_numbers()</code>, that would print all successive integers from <code>1</code> to <code>n</code>.</li>\n<li>The second one is to write a method called <code>print_squares_of_numbers()</code>, that prints squares of all successive integers from <code>1</code> to <code>n</code>.</li>\n</ol>\n<p><strong>Solutions</strong></p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>> def print_numbers(n):    ...    for i in range(1, n+1):    ...       print(i)    ...    >>> print_numbers(5)    1    2    3    4    5    >>>\n</code></pre>\n<p>If you are programming in other languages such as Java, you are used to naming methods in this way: <code>printNumbers()</code>. This convention is popularly known as “Camel Case”.</p>\n<p>That's NOT how Python programmers name their methods. Pythonic way is to use underscore <code>_</code> to separate words in the method name, as in <code>print_numbers()</code>.</p>\n<p><strong>Solution 2</strong></p>\n<p>Let's define <code>print_squares_of_numbers()</code>. This would be very similar to <code>print_numbers()</code>, working with the same range. Only, we need to say <code>print(i*i)</code> .</p>\n<pre><code class=\"language-python\">    >>> def print_squares_of_numbers(n):    ...    for i in range(1, n+1):    ...       print(i*i)    ...    >>> print_squares_of_numbers(5)    1    4    9    16    25\n</code></pre>\n<p>How is a parameter different from an argument?</p>\n<ul>\n<li>Inside the definition of the method, the name within parentheses is referred to as a <strong>parameter</strong>. In our recent exercise, <code>n</code> is a parameter, because it's used in the definition of <code>print_squares_of_numbers</code>.</li>\n<li>When you are passing a value to a method during a method call, say <code>5</code>, that value is called an <strong>argument</strong>.</li>\n<li>\n<p>Don't worry too much about it. Just follow this convention for now:</p>\n<ul>\n<li>In the method call, call it an <em>argument</em>.</li>\n<li>In a method definition, call it a <em>parameter</em>.</li>\n</ul>\n</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we looked at a few simple exercises related to passing method arguments</p>\n<h4>Step 05: Methods With Multiple Parameters <a id=\"step-05-methods-with-multiple-parameters\"></a></h4>\n<p>In this step, let's look at creating a method with multiple parameters.</p>\n<p><strong>Snippet-01:</strong></p>\n<p><code>print_hello_world</code> accepts one parameter and prints “Hello World” the specified number of times.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):    ...    for i in range(1,no_of_times+1):    ...       print(\"Hello World\")    ...\n</code></pre>\n<p>Let's say we want to print another piece of text <code>Welcome To Python</code>, a specified number of times. How do you do that?</p>\n<p>You can always create another method similar to the first one, such as <code>print_welcome_to_python(no_of_times)</code> and print the necessary text inside.</p>\n<p>However, is that what a good programmer does?</p>\n<p>A good programmer tries to create a more generic solution.</p>\n<pre><code class=\"language-python\">    >>> def print_string(str, no_of_times):    ...    for i in range(1,no_of_times+1):    ...       print(str)    ...    >>> print_string(\"Hello World\", 3)    Hello World    Hello World    Hello World\n</code></pre>\n<p>The good programmer that you are, you created a new method called <code>print_string(str, no_of_times)</code> accepting a text parameter, in addition to <code>no_of_times</code>.</p>\n<p>Syntax rules for method parameters are quite strict. If we say <code>print_string(\"Welcome to Python\")</code> and run it, we get an error! Python Shell says: “I need <code>no_of_times</code> to be present in here”.</p>\n<pre><code class=\"language-python\">    >>> print_string(\"Welcome to Python\")    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    TypeError: print_string() missing 1 required positional argument: 'no_of_times'\n</code></pre>\n<p>Let's say you want to assign default values for <code>str</code> and <code>no_of_times</code> in <code>print_string()</code>. By default, we want to always print <code>\"Hello World\"</code>, and that too <code>5</code> times.</p>\n<p>The Python language makes this very easy. <code>def print_string(str = \"Hello World\", no_of_times=5)</code>. The rest of the method remains the same.</p>\n<pre><code class=\"language-python\">    >>> def print_string(str=\"Hello World\", no_of_times=5):    ...    for i in range(1,no_of_times+1):    ...       print(str)    ...\n</code></pre>\n<p>Now you can call <code>print_string()</code>, and <code>\"Hello World\"</code> is displayed <code>5</code> times.</p>\n<pre><code class=\"language-python\">    >>> print_string()    Hello World    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p>If it's <code>print_string(\"Welcome To Python\")</code>, what does it do? It prints <code>\"Welcome To Python\"</code>, <code>5</code> times.</p>\n<pre><code class=\"language-python\">    >>> print_string(\"Welcome to Python\")    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python\n</code></pre>\n<p>Consider <code>print_string(\"Welcome to Python\", 8)</code>, it would print that string <code>8</code> times.</p>\n<pre><code class=\"language-python\">    >>> print_string(\"Welcome to Python\", 8)    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python    Welcome to Python\n</code></pre>\n<p>Isn't that cool!</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at how to pass multiple parameters to a method, starting with two arguments</li>\n<li>Learned how you can define default values for those parameters</li>\n<li>Observed we could pass default arguments for none, some or all of those parameters</li>\n</ul>\n<h4>Step 06: Back To Multiplication Table - Using Methods <a id=\"step-06-back-to-multiplication-table-using-methods\"></a></h4>\n<p>Let's get back to our original goal, of why we needed methods. We wanted to create a multiplication table for a number, and observed that each time we needed to we needed change that number, we were forced to make a change in the code. This is not something we liked, and that's why we started investigating how methods can be used.</p>\n<p>In this step, Let's try our hand at creating a multiplication table method.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):    ...    print(f\"7 * {i} = {7 * i}\")\n</code></pre>\n<p>Let's define a method called <code>print_multiplication_table()</code>, and pass in a parameter to it.</p>\n<pre><code class=\"language-python\">    >>> def print_multiplication_table(table):    ...    for i in range(1,11):    ...       print(f\"{table} * {i} = {table * i}\")    ...    >>> print_multiplication_table(7)    7 * 1 = 7    7 * 2 = 14    7 * 3 = 21    7 * 4 = 28    7 * 5 = 35    7 * 6 = 42    7 * 7 = 49    7 * 8 = 56    7 * 9 = 63    7 * 10 = 70\n</code></pre>\n<p>Now you have the entire multiplication table for <code>7</code>.</p>\n<p>You can then call <code>print_multiplication_table()</code> with arguments <code>8</code>, <code>9</code>,and so on, by simply changing the <code>table</code> arguemnt value.</p>\n<p>We now want to create even better <code>print_multiplication_table()</code> method.</p>\n<p>We want to control the start point, as well as the end point, in the call to <code>range()</code>. We want to say <code>print_multiplication_table(7, 1, 6)</code>, to print the <code>7</code> table with entries from <code>1</code> to <code>6</code>. How can you do that?</p>\n<pre><code class=\"language-python\">    >>> def print_multiplication_table(table, start, end):    ...    for i in range(start, end+1):    ...       print(f\"{table} * {i} = {table * i}\")    ...    >>> print_multiplication_table(7, 1 , 6)    7 * 1 = 7    7 * 2 = 14    7 * 3 = 21    7 * 4 = 28    7 * 5 = 35    7 * 6 = 42\n</code></pre>\n<p>Simple! Define those range limits as additional parameters!</p>\n<p>The other thing we can obviously do, is have default values for the <code>start</code>, and the <code>end</code>.</p>\n<pre><code class=\"language-python\">    >>> def print_multiplication_table(table, start=1, end=10):    ...    for i in range(start, end+1):    ...       print(f\"{table} * {i} = {table * i}\")    ...​    >>> print_multiplication_table(7)    7 * 1 = 7    7 * 2 = 14    7 * 3 = 21    7 * 4 = 28    7 * 5 = 35    7 * 6 = 42    7 * 7 = 49    7 * 8 = 56    7 * 9 = 63    7 * 10 = 70\n</code></pre>\n<p>Calling <code>print_multiplication_table(7)</code> would give us entries from <code>7 * 1 = 7</code> to <code>7 * 10 = 70</code>.</p>\n<p>Now you can actually send out this method, to your friends, who would find it easy to use, and cool!</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to define a method to print the multiplication table for a number</li>\n<li>Looked at how to enhance this method to make table printing more flexible</li>\n<li>Further enhanced that method to accept default arguments while printing a table</li>\n</ul>\n<h4>Step 07: Indentation Is King <a id=\"step-07-indentation-is-king\"></a></h4>\n<p>In Python, indentation denote blocks of code. So if you want to put something in a <code>for</code> loop, or outside it, proper indentation would be sufficient. In this step, let's explore indentation in depth. Let's start by creating a simple method.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> def method_to_understand_indentation():    ...     for i in range(1,11) :    ...        print(i)    ...    >>> method_to_understand_indentation()    1    2    3    4    5    6    7    8    9    10\n</code></pre>\n<p>Consider the code below: <code>print(5)</code> is indented at the same level as <code>for loop</code>.</p>\n<pre><code class=\"language-python\">    >>> def method_to_understand_indentation():    ...     for i in range(1,11) :    ...        print(i)    ...     print(5)    ...\n</code></pre>\n<p>You can see that <code>print(5)</code> is called only once. It is not part of the <code>for loop</code>.</p>\n<pre><code class=\"language-python\">    >>> method_to_understand_indentation()    1    2    3    4    5    6    7    8    9    10    5\n</code></pre>\n<p>Let's change the code in this method a bit. <code>print(5)</code> is indented the same way as <code>print(i)</code></p>\n<pre><code class=\"language-python\">    >>> def method_to_understand_indentation():    ...     for i in range(1,11) :    ...        print(i)    ...        print(5)    ...\n</code></pre>\n<p><code>print(5)</code> is part of the for loop. It is executed 10 times.</p>\n<pre><code class=\"language-python\">    >>> method_to_understand_indentation()    1    5    2    5    3    5    4    5    5    5    6    5    7    5    8    5    9    5    10    5\n</code></pre>\n<p>Whether we're talking about loops, methods or conditionals, proper indentation is very important in Python.</p>\n<p>We indicate a block of code, by having all lines of that block at the same indentation level. There are no specific delimiters like for instance a pair of braces <code>{...}</code>, as in other programming languages.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Ran through a few examples to see how indentation works in Python</li>\n</ul>\n<h4>Step 08: Puzzles on Methods - Named Parameters <a id=\"step-08-puzzles-on-methods-named-parameters\"></a></h4>\n<p>In this step, let's look at a variety of puzzles related to methods.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Consider the following method: I would want to print the default string 6 times. How do we do it?</p>\n<pre><code class=\"language-python\">    >>> def print_string(str=\"Hello World\", no_of_times=5):    ...     for i in range(1,no_of_times+1):    ...        print(str)    ...    >>> print_string()    Hello World    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p>Will it work if we call the method as in: <code>print_string(6)</code>?</p>\n<pre><code class=\"language-python\">    >>> print_string(6)    6    6    6    6    6\n</code></pre>\n<p><code>6</code> is passed as the first parameter. <code>6</code> is matched to <code>str</code>, and the method prints <code>6</code> the default number of times, which is <code>5</code>.</p>\n<p>to default to <code>\"Hello World\"</code>, and print it <code>6</code> times.</p>\n<p>You can do this in Python by using <strong>named parameters</strong>. During the method call, you can specify <code>no_of_times = 6</code>. <strong><code>no_of_times</code></strong> is a named parameter.</p>\n<blockquote>\n<p>There is no provision of doing something like this, in other languages like Java.</p>\n</blockquote>\n<p>Call it as <code>print_string(no_of_times=6)</code>:</p>\n<pre><code class=\"language-python\">    >>> print_string(no_of_times=6)    Hello World    Hello World    Hello World    Hello World    Hello World    Hello World\n</code></pre>\n<p><code>str</code> gets a default value, and <code>\"Hello World\"</code> is printed <code>6</code> times.</p>\n<p>Named parameters are very useful, when a method has a number of parameters, and you would want to make it very clear which parameter you're passing a value for.</p>\n<p>Let's call <code>print_string(7, 8)</code>. what happens?</p>\n<pre><code class=\"language-python\">    >>> print_string(7, 8)    7    7    7    7    7    7    7    7\n</code></pre>\n<p>You would see that <code>7</code> is printed <code>8</code> times.</p>\n<p>Since <code>print()</code> method is quite flexible, you can pass a number as the first argument. You can even pass a <code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> print_string(7.5, 8)    7.5    7.5    7.5    7.5    7.5    7.5    7.5    7.5\n</code></pre>\n<p>What would be the result of this - <code>print_string(7.5, \"eight\")</code>?</p>\n<pre><code class=\"language-python\">    >>> print_string(7.5, \"eight\")    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>      File \"&#x3C;stdin>\", line 2, in print_string    TypeError: must be str, not int\n</code></pre>\n<p>Note how <code>no_of_times</code> is used inside the method… as an argument to <code>range()</code>. <code>range()</code> only accepts integers, nothing else. When you run the code with <code>print_string(7.5, \"eight\")</code>, we get an error.</p>\n<p>It says: <code>TypeError: ```no_of_times``` must be ```int```, not string</code>.</p>\n<p>A simple rule of thumb is, if you have a parameter, you can pass any type of data to it. That could be an integer, a floating point value a string, or a boolean value. The Python language does not check for the type of a parameter. However, Python will throw an error if the function which is using that parameter, expects it to be of a specific type. The <code>range()</code> function expects that the <code>no_of_times</code> is an integer value.</p>\n<p><strong>Snippet-02:</strong></p>\n<p>The last thing which we would be looking at, is method naming conventions. We named our methods in a consistent way: <code>print_string</code>, <code>print_multiplication_table</code>, and the like.</p>\n<p>This is exactly the format which most Python developers use, to name their methods.</p>\n<p>Convention is to use underscore to separate words in a name.</p>\n<p>However, there are a few rules for naming a method: One of the important rules is also related to variable names. We observed that a variable name cannot start with a number.</p>\n<pre><code class=\"language-python\">    >>> def 1_print():      File \"&#x3C;stdin>\", line 1        def 1_print():             ^    SyntaxError: invalid token\n</code></pre>\n<p>Similarly, <code>1_print</code> will not be accepted as a method name.</p>\n<ul>\n<li>You can start a name with an alphabet, or with an underscore.</li>\n<li>From the second character onward, you are allowed to use numeric symbols.</li>\n</ul>\n<p>Methods and variables cannot be named using Python keywords.</p>\n<p>Now, what is a keyword? For example, when we talked about <code>for</code> loop, as in:</p>\n<pre><code class=\"language-python\">```for i in range(1, 11): print(i)```...\n</code></pre>\n<ul>\n<li><strong><code>for</code></strong> is a keyword</li>\n<li><strong><code>in</code></strong> is a keyword</li>\n<li><strong><code>def</code></strong> is a keyword.</li>\n</ul>\n<p>Later we will look at a few other keywords, such as <strong><code>while</code></strong>, <strong><code>return</code></strong>, <strong><code>if</code></strong>, <strong><code>else</code></strong>, <strong><code>elif</code></strong>, and many more.</p>\n<pre><code class=\"language-python\">    >>> def def():      File \"&#x3C;stdin>\", line 1        def def():              ^    SyntaxError: invalid syntax    >>> def in():      File \"&#x3C;stdin>\", line 1        def in():             ^    SyntaxError: invalid syntax    >>> def for():      File \"&#x3C;stdin>\", line 1        def for():              ^    SyntaxError: invalid syntax\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the concept of named parameters</li>\n<li>Explored the typical naming rules and conventions for methods in Python</li>\n<li>Observed that reserved keywords cannot be used to name variables or methods</li>\n</ul>\n<h4>Step 09: Methods - Return Values <a id=\"step-09-methods-return-values\"></a></h4>\n<p>Let's try and understand the importance of return values from a method. We will learn how to return a value from a method.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's name our method as <code>product_of_two_numbers()</code>, and let's have parameters <code>a</code> and <code>b</code> that it accepts:</p>\n<pre><code class=\"language-python\">    >>> def product_of_two_numbers(a,b):    ...     print(a * b)    ...    >>> product_of_two_numbers(1,2)    2\n</code></pre>\n<p>Can we take the product of these two numbers into a variable, and use it in other code, in the same program?</p>\n<p>Suppose we say a <code>product = product_of_two_numbers(1,2)</code>, is this allowed?</p>\n<p>Let's run this code, and see what's stored in <code>product</code>.</p>\n<pre><code class=\"language-python\">    >>> product = product_of_two_numbers(1,2)    2    >>> product\n</code></pre>\n<p>It's empty.</p>\n<p>The <code>product_of_two_numbers()</code> method is not really returning anything back, to be used elsewhere.</p>\n<p>Have a look at some of the built-in Python functions, such as <code>max()</code> for example.</p>\n<pre><code class=\"language-python\">    >>> max(1,2,3)    3    >>> max(1,2,3,4)    4    >>> maximum = max(1,2,3,4)    >>> maximum    4    >>> maximum * 5    20\n</code></pre>\n<p>If I call <code>max()</code> with four parameters, as in <code>maximum = max(1,2,3,4)</code>, the value <code>4</code> gets stored in maximum.</p>\n<p>Later on in the code that follows, we can say <code>maximum * 5</code>, or we can print the value of <code>maximum</code>, or a similar calculation. This gives our programs a lot more flexibility.</p>\n<p>So instead of just printing <code>a*b</code>, if this function could return a value, that would be quite useful.</p>\n<pre><code class=\"language-python\">    >>> def product_of_two_numbers(a,b):    ...      product = a * b;    ...      return product    ...    >>> product_of_two_numbers(2,3)    6\n</code></pre>\n<p>We are creating a variable <code>product</code> and doing a <code>return product</code>.</p>\n<p>Lets run <code>product_result = product_of_two_numbers(2, 3)</code></p>\n<pre><code class=\"language-python\">    >>> product_result = product_of_two_numbers(2,3)    >>> product_result    6    >>> product_result * 10    60\n</code></pre>\n<p>You can see how simple it is to return values from a method!</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to return values from inside a method</li>\n<li>Observed how we can store the values returned by a method call</li>\n</ul>\n<h4>Step 10: Programming Exercise PE-MD-02 <a id=\"step-10-programming-exercise-pe-md-02\"></a></h4>\n<p>In this step let's look at a couple of exercises about returning values from methods.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write a method to return the sum of three integers.</li>\n<li>Write a method which takes as input two integers, representing two angles of a triangle, and computes the third angle.</li>\n</ol>\n<p>Hint: The sum of the angles in a triangle is <code>180</code> degrees. So if I am passing <code>50</code> and <code>50</code>, <code>50</code> plus <code>50</code> is <code>100</code>. So some of three angles should be <code>180</code>, so the third angle will be <code>180 - 100</code>, which is <code>80</code>.</p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>>def sum_of_three_numbers(a, b, c):    ...     sum = a + b + c    ...     return sum    ...​    >>> sum_of_three_numbers(1,2,3)    6    >>> something = sum_of_three_numbers(1,2,3)    >>> something * 5    30\n</code></pre>\n<p>The shorter way of doing that would have been to have a temporary variable called instead of <code>sum</code>. We could directly <code>return a + b + c</code>.</p>\n<pre><code class=\"language-python\">    >>> def sum_of_three_numbers(a, b, c):    ...     return a + b + c    ...    >>> something = sum_of_three_numbers(1,2,3)    >>> something * 5    30\n</code></pre>\n<p>In methods, you can use <code>return expression</code> as well. That <code>expression</code> gets evaluated, and the value gets returned back. You'd see that the result remains the same.</p>\n<p><strong>Solution 2</strong></p>\n<p>The second is to write a method to take two integers, representing two angles of a triangle, and compute the third one.</p>\n<pre><code class=\"language-python\">    >>> def calculate_third_angle(first, second) :    ...     return 180 - ( first + second )    ...    >>> calculate_third_angle(50, 20)    110\n</code></pre>\n<p>In your programming career, you would be writing a number of methods. It's very important that you are comfortable doing so. Most of the methods that you write would return values back.</p>\n<p>That's the reason why we're creating a lot of examples involving method calls.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a couple of exercises related to returning values from methods</li>\n<li>Observed that returning expressions avoids creating unnecessary variables, and shortens method definitions</li>\n</ul>\n<h3>Chapter 04 - Introduction To Python Platform <a id=\"chapter-04-introduction-to-python-platform\"></a></h3>\n<p>Until now we had been using Python Shell to execute all our code.</p>\n<p>In the real world, we'll be write Python code in a variety of scripts. Before we would go into an IDE and use the IDE to write the script, we thought it would be useful for us to understand how you can write Python code without the benefit of an IDE.</p>\n<p>This would also help us understand the Python environment, in-depth.</p>\n<p>In the next few steps, we'll be looking at how to create simple Python scripts, using any text editor of your choice. Use Notepad, Notepad++. Editpad, or whichever text editing software you are comfortable with. We'll see what involved in executing the program, and what's happening in the background.</p>\n<p>Here are a few videos you might want to look at.</p>\n<ul>\n<li>​<a href=\"https://www.youtube.com/watch?v=ORmDD1R7lNc\">Writing and Executing your First Python Script</a>​</li>\n<li>​<a href=\"https://www.youtube.com/watch?v=HE-FC0csG68\">Understanding Python Virtual Machine and bytecode</a>​</li>\n</ul>\n<h4>Step 01 - Writing and Executing Python Shell Programs <a id=\"step-01-writing-and-executing-python-shell-programs\"></a></h4>\n<p>Here's a recommended video to watch - <a href=\"https://www.youtube.com/watch?v=ORmDD1R7lNc\">Writing and Executing your First Python Script</a>​</p>\n<p>Let's get started with creating a simple script file.</p>\n<p>We want to type in a simple Python script, or a piece of Python code, such as <code>print(\"Hello world\")</code>. Does it get any simpler than this?</p>\n<p>We'll save this into any folder on our hard disk, with a name 'first.py' .</p>\n<p><em><strong>first.py</strong></em></p>\n<pre><code class=\"language-python\">print(\"Hello world\")\n</code></pre>\n<p>The '.py' is not really mandatory, but typically all python files end with a '.py' extension.</p>\n<p>Here's how you can run it:</p>\n<ul>\n<li>Launch your terminal, or command prompt</li>\n<li>'cd' to the folder where this python script file is saved</li>\n<li>execute the command <code>python first.py</code></li>\n</ul>\n<p>You will see that <code>Hello World</code> will be printed.</p>\n<p>If you are familiar with other programming languages, you would need a class, need to put the code in that class, and similar stuff.</p>\n<p>While Python supports Object Oriented Programming, is not mandatory to create a class.</p>\n<p>It's almost as if you're typing commands, starting from the line one! That's why we call it a python script.</p>\n<p><strong>Summary</strong></p>\n<p>In this small step, we tried to create a simple python script, and we ran it from the command line. All we needed to do, was use the same command we use to launch up the python shell, and followed it up with a name of the file. We created a file called first.py, executed that, and were able to see the output on the console.</p>\n<p>As an exercise, try and add a few more methods and try to run those methods as well, as part of this script.</p>\n<h4>Step 02 - Python virtual machine and bytecode <a id=\"step-02-python-virtual-machine-and-bytecode\"></a></h4>\n<p>In this step, let's try and understand what's happening in the background.</p>\n<p>We wrote a simple piece of code using a text editor. We created a file named first.py, and all we did was: <code>python3 first.py</code>. If you look at other languages like Java for example, there is a separate compilation phase and then an execution phase. But with Python, just this command does both compilation and execution.</p>\n<p>We saw that, as soon as we make a change and we run <code>python3 first.py</code> , the change is compiled and executed as well!</p>\n<p>In Python, there is an intermediate format called <strong>Python byte code</strong>. Code is first compiled to bytecode, and then executed on the <strong>Python virtual machine</strong>.</p>\n<p>When we installed Python, we installed both the python compiler and interpreter, as well as the virtual machine.</p>\n<p>In Python, <code>bytecode</code> is not standardized. Different implementations of Python have different byte code. There are about 80 Python implementations, like CPython and Jython.</p>\n<ul>\n<li>CPython is a Python implementation in C language.</li>\n<li>Jython is a Python implementation in Java language. The bytecode which Jython uses is actually Java bytecode, and you can run it on the Java virtual machine.</li>\n</ul>\n<p>Python leaves a lot of flexibility to the implementations of Python. They have the flexibility to choose the bytecode, and to choose the virtual machine that is compatible. The bytecode is tied to the specific virtual machine you are using. Therefore, if you're using CPython to compile the bytecode, you'll not be able to use Jython to run it.</p>\n<p>You should make sure, that whatever implementation you are using to compile, is the same one you're using to run the code as well.</p>\n<p><strong>Summary</strong></p>\n<p>A lot of this sounds like boring theory. Don't worry about it. As a beginner, this might not be very important for you right now.</p>\n<p>It's very important for you to understand the process. What's happening is you were writing Python code, and when you ran the command <code>python3 first.py</code>, it is both compiled and executed. An intermediate format called bytecode is created, which is not really standardized in Python. The bytecode is executed in a Python virtual machine.</p>\n<p>The idea behind this quick section, is to give you a little bit of background on what's happening behind the scenes. I'll see you in the next section. Until then, bye-bye!</p>\n<h3>Chapter 05 - Introduction To VSCode <a id=\"chapter-05-introduction-to-vscode\"></a></h3>\n<p>Let's start using the IDE VSCode to write our Python Code</p>\n<p>Here are recommended videos to watch</p>\n<ul>\n<li>​<a href=\"https://www.youtube.com/watch?v=pI_cnCXpCTU\">Installing VSCode</a>​</li>\n<li>​<a href=\"https://www.youtube.com/watch?v=Na05tSP21Jg\">Write and Execute a Python File with VSCode</a>​</li>\n<li>​<a href=\"https://www.youtube.com/watch?v=PvYSlWbXuCw\">Write Your First Python Program with VSCode</a>​</li>\n</ul>\n<h4>Step 01 - Installing and Introduction to VSCode <a id=\"step-01-installing-and-introduction-to-vscode\"></a></h4>\n<p>In this quick step, we'll help you install VSCode.</p>\n<p>Here's the video guide for this step</p>\n<ul>\n<li>​<a href=\"https://www.youtube.com/watch?v=pI_cnCXpCTU\">Installing VSCode</a>​</li>\n</ul>\n<p>Go to Google and type in “VSCode Community Edition Download”. Click the link which comes up first: <a href=\"https://www.jetbrains.com/VSCode/download\">https://www.jetbrains.com/VSCode/download</a>.</p>\n<p>You'll go to a page where you can choose the operating system: whether you are on Windows, Mac, or Linux.</p>\n<p>Once you choose that, you can download the appropriate community version.</p>\n<p>On the right hand side, you'll see a community version, and you can click the download link, to start the download.</p>\n<p>If you are having a problem, you can also use the direct link to download.</p>\n<p>Once you download VSCode, all you need to do is double-click the package which is downloaded. Follow the instructions, and you can continue with the defaults, until you completely install VSCode.</p>\n<p>When you launch VSCode for the first time, it should ask you for a theme, where you can choose the default.</p>\n<p>You're all set to go ahead with the next step in the course.</p>\n<p>VSCode is an awesome IDE, and I'm sure you learn a lot about it.</p>\n<h4>Step 02 - Write and Execute a Python File with VSCode <a id=\"step-02-write-and-execute-a-python-file-with-vscode\"></a></h4>\n<p>In this step, let's launch up the VSCode IDE, and create our first Python project with a Python script. We want to be able to launch a Python script by the end of this step.</p>\n<p>Here's the video guide for this step</p>\n<ul>\n<li>​<a href=\"https://www.youtube.com/watch?v=Na05tSP21Jg\">Write and Execute a Python File with VSCode</a>​</li>\n</ul>\n<p>Launch the VSCode IDE. You'll see that it takes a little while to launch the first time, and then brings up a welcome screen.</p>\n<p>We would want to create a number of Python files. All these files will be in a project. You can think of our project as a collection of Python scripts, or modules.</p>\n<p>To get started, let's create a new project by clicking 'create new project'. Let's name it - '01-first-python-project'.</p>\n<p>Right now there are no files in the project.</p>\n<p>Let's create our first Python file, using the IDE.</p>\n<p>The way you can do that is by saying 'right-click' -> 'new' -> 'Python file', and then we'll give this a name of 'hello_world', and click OK.</p>\n<p>Now you can go ahead and write your first Python program. Let's write some simple code, like <code>print(\"Hello World\")</code>, and save it.</p>\n<p>You can do a right-click here, and say 'Run hello_world'.</p>\n<p>A small window comes up below, which shows the output. It says <code>'Hello World'</code>.</p>\n<h4>Step 03 - Execise - Write Multiplication Table Method with VSCode <a id=\"step-03-execise-write-multiplication-table-method-with-vscode\"></a></h4>\n<p>Let's start with a simple exercise. We created the multiplication table method in the Python Shell. What we do now, is we'll create the same thing but in a Python file of its own.</p>\n<p>Here's the video guide for this step:</p>\n<ul>\n<li>​<a href=\"https://www.youtube.com/watch?v=PvYSlWbXuCw\">Write Your First Python Program with VSCode</a>​</li>\n</ul>\n<h3>Chapter 06 - Introducing Data Types and Conditionals <a id=\"chapter-06-introducing-data-types-and-conditionals\"></a></h3>\n<p>Welcome to this section, where we will talk about numeric data types, and conditional program execution. After looking at the numeric and boolean data types, we will turn our attention to executing code, based on logical conditions.</p>\n<h4>Step 01: Numeric Data Types <a id=\"step-01-numeric-data-types\"></a></h4>\n<p>In previous sections, we created variables of this kind: <code>number = 5</code> , <code>value = 2.5</code>, etc. The <code>5</code> here is an integer, and integers represent numbers, such as <code>1</code>, <code>2</code>, <code>6</code>, <code>-1</code> and <code>-2</code>. In Python, the <code>class</code> for this particular data type is <code>int</code>.</p>\n<p>If you write code like <code>type(5)</code>, you'd get <code>'int'</code> as the output.</p>\n<p>In Python, there are no primitive types. What does that mean? Every value that you see in a Python program, is an object, an instance of some <code>class</code>.</p>\n<p>In later sections, We'll understand what is a <code>class</code>, and what is an object or an instance. For now, the most important thing for you to remember, is that behind every value, there is a <code>class</code>.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's look at <code>2.5</code>, which is a floating point value.</p>\n<p>If you go ahead and do <code>type(2.5)</code>, what would you see? You would see it's of type `<code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> type(2.5)    &#x3C;class 'float'>    >>> type(2.55)    &#x3C;class 'float'>\n</code></pre>\n<p>When you perform a division operation between two integers, there is a chance that the result of the operation is a <code>float</code>. If you do <code>5/2</code>, the result is <code>2.5</code>. If we were to do <code>4/2</code>, even then it's of type <code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> type(5/2)    &#x3C;class 'float'>    >>> type(4/2)    &#x3C;class 'float'>    >>> 4/2    2.0    >>> 1 + 2    3\n</code></pre>\n<p>All the operations we looked at until now, can also be performed on floating point values.</p>\n<pre><code class=\"language-python\">    >>> value1 = 4.5    >>> value2 = 3.2    >>> value1 + value2    7.7    >>> value1 - value2    1.2999999999999998    >>> value1 / value2    1.40625    >>> value1 % value2    1.2999999999999998\n</code></pre>\n<p><code>value1 - value2</code> returns <code>1.299999999999998</code>. Why?</p>\n<p>Floating point numbers don't really represent accurate values. That's one of the things you need to always keep in mind.</p>\n<p>Typically, if you're doing any highly sensitive financial calculations, don't use <code>float</code>s to represent your values. Instead, use <code>Decimal</code>. More about it later.</p>\n<p>Operations can also be performed between <code>int</code> and <code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> i + value1    14.5    >>> i - value1    5.5    >>> i / value1    2.2222222222222223    >>>\n</code></pre>\n<p>Result of an operation between a <code>int</code> and a <code>float</code>, is always a <code>float</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at the two basic numeric types: <code>int</code> and <code>float</code>.</li>\n<li>Saw the basic operations you can do among <code>int</code>s, among <code>float</code>s, and also between <code>int</code>s and <code>float</code>s.</li>\n</ul>\n<h4>Step 02: Programming Exercise PE-DT-01 <a id=\"step-02-programming-exercise-pe-dt-01\"></a></h4>\n<p>In this step, let's do a simple exercise with numeric values.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>You need to create a method called <code>simple_interest</code>, and pass three parameters: <code>principal</code>, <code>interest</code> and <code>duration</code> (in years). You also want to calculate the amount after the specific duration, and return it back. Call this method with a few example values.</li>\n</ol>\n<p>For example, if you want to call <code>simple_interest</code> with <code>10000</code>, with an interest of <code>5</code> percent, for a duration of <code>5</code> years, the correct answer would be as follows: <code>10000</code> is the principal. In addition to <code>10000</code>, you get the interest. The interest for one year is <code>10000 * 0.05</code>, as the interest figure is in percentage.So that's <code>500</code> a year, into <code>5</code> which is <code>2500</code>. The result would be <code>12500</code>, and this value should be printed.</p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    def calculate_simple_interest(principal, interest, duration) :            return principal * (1 + interest * 0.01 * duration)​    print(calculate_simple_interest(10000,5,5))\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Wrote a very simple method to do a simple interest calculation</li>\n</ul>\n<h4>Step 03: Puzzles On Numeric Types <a id=\"step-03-puzzles-on-numeric-types\"></a></h4>\n<p>In this section, we are looking at numeric types. In this specific step, we would be looking at a few puzzles related to values of these types.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's create a simple variable <code>i = 1</code>. <code>i = i + 1</code>. What would be the value of <code>i</code> after that?</p>\n<pre><code class=\"language-python\">    >>> i = 1    >>> i = i + 1    >>> i    2\n</code></pre>\n<p>It would be <code>2</code>. There is a shortcut way of doing the same thing, by using the <code>+=</code> operator.</p>\n<pre><code class=\"language-python\">    >>> i += 1    >>> i    3\n</code></pre>\n<p>Typically in other programming languages, you can do something of this kind: <code>i++</code>. There is no provision in Python to use increment operators like <code>++</code>, in either prefix or suffix mode, like <code>++i</code>, or <code>i++</code>.</p>\n<pre><code class=\"language-python\">    >>> i++      File \"&#x3C;stdin>\", line 1        i++          ^    SyntaxError: invalid syntax    >>> ++i    3\n</code></pre>\n<p>Let's look at compound assignments.</p>\n<pre><code class=\"language-python\">    >>> i += 1    >>> i    4    >>> i -= 1    >>> i    3    >>> i /= 1    >>> i *= 2    >>> i    6.0\n</code></pre>\n<p>What you see here, is Dynamic Typing in Python. The type of a variable can change during the lifetime of the program.</p>\n<pre><code class=\"language-python\">>>> i = 2>>> type(i)&#x3C;type 'int'>>>> i = i/2.0>>> type(i)&#x3C;type 'float'>\n</code></pre>\n<p>Let's create a couple more numbers. <code>number1 = 5</code> and <code>number2 = 2</code>. What could be the result of <code>number1 / number2</code>? You know it, it's <code>2.5</code> .</p>\n<p><code>number1 // nummber2</code> truncates the value of <code>2.5</code>, to <code>2</code>.</p>\n<pre><code class=\"language-python\">    >>> number1//number2    2\n</code></pre>\n<p>If you can do <code>number1 // number2</code>, can you also do this: <code>number1 //= number2</code>?</p>\n<pre><code class=\"language-python\">    >>> number1 //= 2    >>> number1    2\n</code></pre>\n<p><code>5 ** 3</code> is <code>5</code> 'to the power of' <code>3</code>, which is <code>5 * 5 * 5</code>, or <code>125</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 ** 3    125    >>> pow(5,3)    125\n</code></pre>\n<p>This can also be achieved by invoking <code>pow(5, 3)</code>. We have an operator, as well as a method at our disposal.</p>\n<p>The last thing we will look at, are type conversion functions.</p>\n<p>If you need to convert an <code>int</code> value to a <code>float</code>, or a <code>float</code> to an <code>int</code>.</p>\n<pre><code class=\"language-python\">    >>> int(5.6)    5\n</code></pre>\n<p>What if you want to round a value? <code>5.6</code> is nearer to <code>6</code> than <code>5</code>. You can use a function called <code>round()</code>, and here,<code>round(5.6)</code> gives the correct result <code>6</code>.</p>\n<pre><code class=\"language-python\">    >>> round(5.6)    6    >>> round(5.4)    5    >>> round(5.5)    6\n</code></pre>\n<p><code>round()</code> can also allows you to specify number of decimals in the result.</p>\n<pre><code class=\"language-python\">    >>> round(5.67, 1)    5.7    >>> round(5.678, 2)    5.68\n</code></pre>\n<p>You can also convert <code>int</code> to <code>float</code>, by using the function <code>float()</code>.</p>\n<pre><code class=\"language-python\">    >>> float(5)    5.0\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few corner cases related to your numeric types.</li>\n<li>Examined the different operators available for use with values of numeric types</li>\n<li>Learned about the usage of type conversion functions</li>\n</ul>\n<h4>Step 04: Introducing Boolean Type <a id=\"step-04-introducing-boolean-type\"></a></h4>\n<p>We will now shift our attention to the <code>bool</code> data type.</p>\n<p>A boolean value is something which can be either “true” or “false”.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>In Python, “true” is represented by <code>True</code>, and “false” by <code>False</code>. It's important to remember that it's <code>True</code> with a capital <code>'T'</code>, and <code>False</code> with a capital <code>'F'</code>.</p>\n<pre><code class=\"language-python\">    >>> True    True    >>> False    False    >>> true    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'true' is not defined    >>> false    Traceback (most recent call last):      File \"&#x3C;stdin>\", line 1, in &#x3C;module>    NameError: name 'false' is not defined\n</code></pre>\n<p>The boolean variable <code>is_even</code> indicates whether a number is even or not.</p>\n<pre><code class=\"language-python\">    >>> is_even = True    >>> is_odd = False\n</code></pre>\n<p>Let's create a variable <code>i = 10</code>. We want to find out if <code>i > 15</code>. What do you think is the result? <code>False</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 10    >>> i > 15    False    >>> i &#x3C; 15    True\n</code></pre>\n<p>In general, boolean values can represent the result of logical conditions.</p>\n<p>Let's look at other operations that can result in <code>bool</code> values. We looked at <code>></code> and <code>&#x3C;</code>. Another operation which you can perform, is <code>>=</code>.</p>\n<pre><code class=\"language-python\">    >>> i >= 15    False    >>> i >= 10    True    >>> i > 10    False    >>> i &#x3C;= 10    True    >>> i &#x3C; 10    False\n</code></pre>\n<p><code>==</code> is the comparison operator. We are only comparing the value of <code>i</code> against <code>10</code>, not changing its value.</p>\n<pre><code class=\"language-python\">    >>> i == 10    True    >>> i == 11    False\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the <code>bool</code> data type</li>\n<li>Learned that <code>bool</code> variables are useful handy while testing logical conditions</li>\n</ul>\n<h4>Step 05: Introducing Conditionals <a id=\"step-05-introducing-conditionals\"></a></h4>\n<p>In this step, let's look at <code>if</code> statement.</p>\n<p>Sometimes you need to execute code only when certain conditions are true. You can use a <code>if</code> condition, which is the simplest conditional in Python. Let's look at an example.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say <code>i</code> has a value of <code>5</code>. You want to print something, only if <code>i</code> has a value greater than <code>3</code>. How do you do that?</p>\n<pre><code class=\"language-python\">    >>> i = 5    >>> if i>3:    ...     print(f\"{i} is greater than 3\")    ...    5 is greater than 3\n</code></pre>\n<p>The syntax of the <code>if</code> is very simple: <code>if</code> followed by a condition; with the condition you want to check. It looks like: <code>if i>3: ...</code> You need to indent the body of the <code>if</code> with <code>&#x3C;SPACE></code>s as usual.</p>\n<p>Let's say <code>i</code> has a value of <code>2</code>. What would happen if we execute the same code again?</p>\n<pre><code class=\"language-python\">    >>> i = 2    >>> if i>3:    ...     print(f\"{i} is greater than 3\")    ...\n</code></pre>\n<p>You would see that nothing is printed to the console. Based on the value of <code>i</code> , either the statement is executed, or it's not. That's what an <code>if</code> helps us to do.</p>\n<p>The way you can think about an <code>if</code>, is the body of code under the <code>if</code> is executed only when this condition is <code>True</code>. If this condition is not <code>True</code>, that code is not executed at all.</p>\n<pre><code class=\"language-python\">    >>> if(False):    ...   print(\"False\")    ...    >>> if(True):    ...   print(\"True\")    ...    True\n</code></pre>\n<p>Let's take two different numbers, say <code>a = 5</code>, and <code>b = 7</code>. We want to compare them, and predict if <code>a</code> is greater that <code>b</code> .</p>\n<pre><code class=\"language-python\">    >>> a = 5    >>> b = 7    >>> if(a>b):    ...   print(\"a is greater than b\")    ...​    >>> a = 9    >>> if(a>b):    ...   print(\"a is greater than b\")    ...    a is greater than b\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the <code>if</code> statement, the simplest Python conditional</li>\n<li>Understood how an <code>if</code> helps in implementing conditional program logic</li>\n</ul>\n<h4>Step 06: Classroom Exercise CE-DT-01 <a id=\"step-06-classroom-exercise-ce-dt-01\"></a></h4>\n<p>In this step, let's look at a couple of exercises with the if statement.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say we define four variables: <code>a = 1</code>, <code>b = 2</code> , <code>c = 3</code> and <code>d = 5</code>. we want to find out, if <code>a + b</code> is greater than <code>c + d</code>.</p>\n<pre><code class=\"language-python\">    >>> a = 1    >>> b = 2    >>> c = 3    >>> d = 5    >>> if a+b > c+d :    ...    print(\"a+b > c +d\")    ...    >>> a = 9    >>> if a+b > c+d :    ...    print(\"a+b > c +d\")    ...    a+b > c +d\n</code></pre>\n<p>Let's say we are given three values meant to be the angles of a triangle. Their values are <code>angle1 = 30</code>, <code>angle2 = 20</code> and <code>angle3 = 60</code>. You want to find out if these three angles actually form a valid triangle. You know that the sum of the angles of a triangle is always <code>180</code> degrees.</p>\n<pre><code class=\"language-python\">    >>> angle1 = 30    >>> angle2 = 20    >>> angle3 = 60    >>> if(angle1 + angle2 + angle3 == 180):    ...      print(\"Valid Triangle\")    ...    >>> angle2 = 90    >>> if(angle1 + angle2 + angle3 == 180):    ...      print(\"Valid Triangle\")    ...    Valid Triangle\n</code></pre>\n<p>The last exercise is to check if a number is even or not.</p>\n<p>Hint L you need to use one of the operators we talked about earlier. That's right, use the modulo operator <code>%</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 2    >>> if(i%2==0):    ...   print(\"i is even\")    ...    i is even​    >>> i = 3    >>> if(i%2==0):    ...   print(\"i is even\")    ...\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few exercises related to the if statement, for writing and testing conditions.</li>\n</ul>\n<h4>Step 07 - Logical Operators - and or not <a id=\"step-07-logical-operators-and-or-not\"></a></h4>\n<p>In this step, let's look at the different operators that can be used on <code>bool</code> values. These operators are called logical operators - <code>and</code>, <code>or</code> , <code>not</code> and <code>^</code> (xor).</p>\n<p>Let's say we have a value <code>True</code>, and the other <code>False</code>, and we want to play around with them.</p>\n<p>Logical operator <code>and</code> returns true only when both operands are <code>True</code>.</p>\n<pre><code class=\"language-python\">    >>> True and False    False    >>> True and True    True    >>> True and False    False    >>> False and True    False    >>> False and False\n</code></pre>\n<p>Logical operator <code>or</code> returns true when atleast one of the operands is <code>True</code>.</p>\n<pre><code class=\"language-python\">    False    >>> True or False    True    >>> False or True    True    >>> True or True    True    >>> False or False\n</code></pre>\n<p>Logical operator <code>not</code> returns negation.</p>\n<pre><code class=\"language-python\">    False    >>> not True    False    >>> not(True)    False    >>> not False    True    >>> not(False)    True\n</code></pre>\n<p>The XOR operation, denoted by the <code>^</code> operator, is <code>True</code> when operands have different boolean values.</p>\n<pre><code class=\"language-python\">    >>> True ^ True    False    >>> True ^ False    True    >>> False ^ True    True    >>> False ^ False    False\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at the logical operators that act on boolean values, such as <code>and</code>, <code>or</code>, <code>not</code> and <code>^</code></li>\n<li>Explored each of these operators, finding out when they return <code>True</code>, and when <code>False</code>.</li>\n</ul>\n<h4>Step 08: Puzzles On Logical Operators <a id=\"step-08-puzzles-on-logical-operators\"></a></h4>\n<p>In this step, Let's look at a few simple puzzles to look at the logical operators.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say <code>i</code> has a value of <code>10</code>, and <code>j</code> has a value of <code>15</code>. You want to find out if both <code>i</code> and <code>j</code> are even. How do you do that?</p>\n<pre><code class=\"language-python\">    >>> i = 10    >>> j = 15    >>> if i%2==0 and j%2==0:    ...   print(\"i and j are even\")    ...    >>> j = 14    >>> if i%2==0 and j%2==0:    ...   print(\"i and j are even\")    ...    i and j are even​    >>> if i%2==0 or j%2==0:    ...      File \"&#x3C;stdin>\", line 2        ^    IndentationError: expected an indented block    >>> if i%2==0 or j%2==0:    ...   print(\"atleast one of i and j are even\")    ...    atleast one of i and j are even\n</code></pre>\n<p>If we want to find out if at least one of <code>i</code> and <code>j</code> is even, we can use the <code>or</code> operator.</p>\n<pre><code class=\"language-python\">    >>> i = 15    >>> j    14    >>> if i%2==0 or j%2==0:    ...   print(\"atleast one of i and j are even\")    ...    atleast one of i and j are even    >>> j = 23    >>> if i%2==0 or j%2==0:    ...   print(\"atleast one of i and j are even\")    ...    >>> i    15\n</code></pre>\n<p>Now try and guess the value of this. <code>if(True ^ False): print(\"Message\")</code></p>\n<pre><code class=\"language-python\">    >>> if(True ^ False):    ...     print(\"This will Print\")    ...    This will Print    >>> if(False ^ True):    ...     print(\"This will Print\")    ...    This will Print    >>> if(True ^ True):    ...     print(\"This will Print\")    ...\n</code></pre>\n<p>Xor operation using <code>^</code> - message will get printed if the operands are different.</p>\n<p>What would happen if both of them are <code>True</code>? No message is printed.</p>\n<p>So you would use <code>^</code> in situations, where you'd want one of the operands to be <code>True</code>, and the other to be <code>False</code>.</p>\n<p>Let's say, <code>x = 5</code>, and you want to check <code>if not x == 6: print(\"This\")</code>. What will be the result of running this code?</p>\n<pre><code class=\"language-python\">    >>> x = 5    >>> if not x == 6:    ...   print(\"This\")    ...    This    >>> x = 6    >>> if not x == 6:    ...   print(\"This\")    ...\n</code></pre>\n<p>Actually, there is a shortcut for such a condition: <code>if x != 6 : print(\"This\")</code>.</p>\n<pre><code class=\"language-python\">    >>> if x!=6:    ...   print(\"This\")    ...    >>> x=5    >>> if x!=6:    ...   print(\"This\")    ...    This\n</code></pre>\n<p><code>int()</code> is a conversion function, which when given say a <code>float</code> value, returns an <code>int</code> value. Consider <code>int(True)</code>, what would happen?</p>\n<pre><code class=\"language-python\">    >>> int(True)    1    >>> int(False)    0\n</code></pre>\n<p><code>int(True)</code> returns 1. <code>int(False)</code> returns 0.</p>\n<pre><code class=\"language-python\">    >>> x = -6    >>> if x:    ...   print(\"something\")    ...    something\n</code></pre>\n<p>One of the most interesting facts about boolean stuff, is anything which is non-zero, is considered to be <code>True</code>.</p>\n<p><code>0</code> is the only integer value which is considered to be <code>False</code>.</p>\n<pre><code class=\"language-python\">    >>> bool(6)    True    >>> bool(-6)    True    >>> bool(0)    False    >>>\n</code></pre>\n<p>So, if I have a value of <code>x = -6</code>, and execute <code>if x: print(\"something\")</code> what do you think will happen?</p>\n<p><code>\"something\"</code> will be printed.</p>\n<p>You can use the function <code>bool()</code>, to convert <code>int</code> to a <code>bool</code> value.</p>\n<ul>\n<li><code>bool(6)</code> returns <code>True</code></li>\n<li><code>bool(-6)</code> returns <code>True</code></li>\n<li><code>bool(0)</code> returns <code>False</code>.</li>\n</ul>\n<p>Except for <code>bool(0)</code>, all the other results would be <code>True</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few puzzles related to the logical operators</li>\n<li>Looked at conversion functions such as <code>bool()</code> and <code>int()</code> to convert between boolean and integer data</li>\n</ul>\n<h4>Step 09: <a id=\"step-09\"></a></h4>\n<p>In this step, let's look at two other important components of an <code>if</code> statement: <code>else</code> and <code>elif</code>. Let's start with <code>else</code>.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Consider a scenario where <code>i</code> has a value of <code>2</code>. Let's try to print a message <code>\"i is even\"</code> if <code>i</code> is an even number. Otherwise, print <code>\"i is odd\"</code>.</p>\n<p>Earlier we wrote code along these lines: <code>if i % 2 == 0 : print(\"i is even\")</code>. However if this condition is not <code>True</code>, we would want to <code>print(\"i is odd\")</code>. How do we accomplish that?</p>\n<pre><code class=\"language-python\">    >>> i = 2    >>> if i%2 == 0:    ...   print(\"i is even\");    ... else:    ...   print(\"i is odd\");    ...    i is even\n</code></pre>\n<p>An <code>else</code> clause provides an alternative code body to execute, if the <code>if</code> condition is <code>False</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 3    >>> if i%2 == 0:    ...   print(\"i is even\");    ... else:    ...   print(\"i is odd\");    ...    i is odd\n</code></pre>\n<p>Let's look at <code>elif</code>.</p>\n<p>We want to do something if <code>i</code> has value of <code>3</code>, and something totally different if <code>i</code> has a value of <code>4</code>.</p>\n<p>In short, we want to specify 2 alternatives to the <code>if</code> condition. How can that be done?</p>\n<pre><code class=\"language-python\">    >>> if i==1:    ...   print(\"i is 1\")    ... elif i==2:    ...   print(\"i is 2\")    ... else:    ...   print(\"i is not 1 or 2\")    ...    i is not 1 or 2    >>>\n</code></pre>\n<p>That's where the <strong><code>elif</code></strong> clause comes into the picture. The code in <code>elif</code> is executed if the previous conditions are false and the current <code>elif</code> condition is true.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at two important components of the <code>if</code> statement: <code>else</code> and <code>elif</code>.</li>\n<li>Understood that the <code>elif</code> clauses and the final <code>else</code> clause provide alternative conditions to check, when earlier if conditions are true.</li>\n</ul>\n<h4>Step 10: Classroom Exercise CE-DT-02 <a id=\"step-10-classroom-exercise-ce-dt-02\"></a></h4>\n<p>In this step, let's do a simple exercise with <code>if</code>, <code>else</code> and <code>elif</code>.</p>\n<p>Before getting to the exercise, let's try and learn how to get console input from the user.</p>\n<p>Until now, we had been hard-coding all the data we were to use. Let's make that part more dynamic now.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>How do we get input from the user? We want to get input from the console, and assign it to a variable. The way we can do that, is by statement <code>value = input()</code></p>\n<pre><code class=\"language-python\">    value = input(\"Enter a Value: \")    print(\"you entered \", value)\n</code></pre>\n<p>We can call the <code>input()</code> method with a text 'prompt', such as <code>\"Enter A Value: \"</code>. What we can initially do here, is print the value which was entered, back to the console, by <code>print(\"you entered \", integer_value)</code>.</p>\n<p>An interesting point to explore here, is the type of data input at the console.</p>\n<p>Let's do a <code>print(type(value))</code>.</p>\n<pre><code class=\"language-python\">    value = input(\"Enter a Value: \")    print(\"you entered \", value)    print(type(value))\n</code></pre>\n<p>Input a value of <code>Test</code>. It has a class of <code>str</code>.</p>\n<p>Let's run it again to see other possibilities. This time, let's enter a numeric value, say <code>12</code>. what would happen?</p>\n<p>We again get <code>str</code>.</p>\n<p>We want to get an integer value from the input. How can we do it?</p>\n<p><code>int()</code> function converts string to int. Let's use it.</p>\n<pre><code class=\"language-python\">value = input(\"Enter a Value: \")integer_value = int(value)print(\"you entered \", integer_value)print(type(integer_value))\n</code></pre>\n<p>Let's run our code once again.</p>\n<p><code>\"Enter A Value: \"</code> is prompted, and we enter <code>15</code>. And now, of it says <code>\"You entered 15\"</code>, and the type it indicates to us, is <code>int</code>.</p>\n<p><strong>Design a menu</strong></p>\n<ul>\n<li>\n<p>Ask the User for input:</p>\n<ul>\n<li>Enter two numbers</li>\n<li>\n<p>Choose the Option:</p>\n<ul>\n<li>1 - Add</li>\n<li>2 - Subtract</li>\n<li>3 - Multiply</li>\n<li>4 - Divide</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Perform the Operation</li>\n<li>Publish the Result</li>\n</ul>\n<p>Let's design a menu, and then ask the user for input.</p>\n<p>We have codes for each of the operations : add is <code>1</code>, subtract is <code>2</code>, divide is <code>3</code>, and multiply is <code>4</code>.</p>\n<p>In the first version of the program let's get all the inputs and print them out.</p>\n<p><strong>Solution</strong></p>\n<p>The first version of the program is simple to write</p>\n<pre><code class=\"language-python\">number1 = int(input(\"Enter Number1: \"))number2 = int(input(\"Enter Number2: \"))print(f\"You entered {number1}\")print(f\"You entered {number2}\")print(number1 + number2)print(\"\\n\\n1 - Add\")print(\"2 - Subtract\")print(\"3 - Divide\")print(\"4 - Multiply\")print(\"5 - Exit\")choice = int(input(\"Choose Operation: \"))print(choice)\n</code></pre>\n<p>We will continue this exercise to complete it, in the next step.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at the in-built <code>input()</code> function that can read console input</li>\n<li>Learned that <code>input()</code> always returns what the user enters, as a string</li>\n<li>We can convert the string from <code>input()</code>, to the data type we expect by invoking conversion functions</li>\n</ul>\n<h4>Step 11: Continued - Classroom Exercise CE-DT-02 <a id=\"step-11-continued-classroom-exercise-ce-dt-02\"></a></h4>\n<p><strong>Exercises</strong></p>\n<p>In the previous step, we got the input from the user. Let's continue the exercise in this step. We want to write an if condition.</p>\n<p><strong>Solution (Continued)</strong></p>\n<p>Extending the solution is easy. Write appropriate <code>if</code>, <code>elif</code> and <code>else</code> conditions.</p>\n<pre><code class=\"language-python\">number1 = int(input(\"Enter Number1: \"))number2 = int(input(\"Enter Number2: \"))​print(\"\\n\\n1 - Add\")print(\"2 - Subtract\")print(\"3 - Divide\")print(\"4 - Multiply\")​choice = int(input(\"Choose Operation: \"))​# print(number1 + number2)# print(choice)if choice==1:    result = number1 + number2elif choice==2:    result = number1 - number2elif choice==3:    result = number1 / number2elif choice==4:    result = number1 * number2else:    result = \"Invalid Choice\"​print(result)\n</code></pre>\n<p>We added the following code to account for invalid input.</p>\n<pre><code class=\"language-python\">else:    result = \"Invalid Choice\"\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Augmented the Menu Exercise to get all the input from the console, and compute a value from them</li>\n<li>Corrected the logic to handle incorrect input</li>\n</ul>\n<h4>Step 12: Puzzles On Conditionals <a id=\"step-12-puzzles-on-conditionals\"></a></h4>\n<p>In this step, let's look at a few puzzles related to these <code>if</code>, <code>elif</code> and <code>else</code> clauses.</p>\n<p><strong>Puzzle-01</strong></p>\n<p>Let's start with the first puzzle. Guess the output.</p>\n<pre><code class=\"language-python\">k = 15if (k > 20):  print(1)elif (k > 10):  print(2)elif (k &#x3C; 20):  print(3)else:  print(4)\n</code></pre>\n<p>When we run it, you can see that the output is <code>2</code>.</p>\n<p><code>k</code> has a value of <code>15</code>, is it greater than <code>20</code>? No! Execution goes to the <code>elif</code>, is <code>k</code> greater then <code>10</code>? Yes. It prints <code>2</code> and goes out of the complete <code>if</code>-<code>else</code> block.</p>\n<p>Inside the <code>if</code> conditional, the <code>if</code>, <code>elif</code> and <code>else</code> clauses are all independent ones. Only one matching block is ever executed.</p>\n<p><strong>Puzzle-02</strong></p>\n<p>What do you think would be the output of this particular piece of code?</p>\n<pre><code class=\"language-python\">l = 15    if (l &#x3C; 20):        print(\"l&#x3C;20\")if (l > 20):    print(\"l>20\")else:    print(\"Who am I?\")\n</code></pre>\n<p>Note that there are two totally different <code>if</code> conditions in here : <code>if l &#x3C; 20: ...</code> immediately followed by<code>if l > 20: ... else: ...</code>.</p>\n<p>The first <code>if</code> is true. <code>l&#x3C;20</code> is printed.</p>\n<p>The second <code>if</code> is a separate statement. The condition is false. So. <code>else</code> gets executed. Therefore, <code>\"who am I\"</code> gets printed.</p>\n<p><strong>Puzzle-03</strong></p>\n<p>Let's run this code.</p>\n<pre><code class=\"language-python\">m = 15if m>20:    if m&#x3C;20:        print(\"m>20\")    else:        print(\"Who am I?\")\n</code></pre>\n<p>You can see that nothing is printed.</p>\n<p>The most important thing to focus on here, is indentation.</p>\n<p>The second <code>if</code> block is executed only if the first <code>if</code> is true.</p>\n<p><strong>Puzzle-04</strong></p>\n<p>What would be the output?</p>\n<pre><code class=\"language-python\">number = 5if number &#x3C; 0:  number = number + 10number = number + 5print(number)\n</code></pre>\n<p><code>10</code> is printed.</p>\n<p>The most important thing to focus on here, is indentation.</p>\n<p>Only <code>number = number + 10</code> is part of <code>if</code> block. It is not executed because the condition is false.</p>\n<p><code>number = number + 5</code> is not part of <code>if</code>. So, it gets executed.</p>\n<p>Let's add a couple of spaces before <code>number = number + 5</code>.</p>\n<p>What would be the output?</p>\n<pre><code class=\"language-python\">number = 5if number &#x3C; 0:  number = number + 10  number = number + 5print(number)\n</code></pre>\n<p><code>5</code> is printed.</p>\n<p>Both the statements <code>number = number + 10</code> and <code>number = number + 5</code> are part of <code>if</code> block. They are not executed because the condition is false.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few puzzles related to <code>if</code>, <code>elif</code> and <code>else</code></li>\n<li>Explored the importance of indentation and the different condition clauses inside an <code>if</code> statement</li>\n</ul>\n<h4>Step 01: The Python Type To Denote Text <a id=\"step-01-the-python-type-to-denote-text\"></a></h4>\n<p>Let's start looking at another important data type in Python, that's used to represent strings. Not surprisingly, it is in fact named <code>str</code>!</p>\n<p>Let's look at valid string representations.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello World\"    >>> message = 'Hello World'    >>> message = 'Hello World\"      File \"&#x3C;stdin>\", line 1        message = 'Hello World\"                          ^     SyntaxError: EOL while scanning string literal\n</code></pre>\n<p>In Python, you can use either ```<code>or</code>\"\"` to delimit string values.</p>\n<p><code>type()</code> method can be used to find type of a variable.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello World\"    >>> type(message)    &#x3C;class 'str'>\n</code></pre>\n<p>The <code>str</code> <code>class</code> provides a lot of utility methods.</p>\n<pre><code class=\"language-python\">    >>> message.upper()    'HELLO WORLD'    >>> message.lower()    'hello world'    >>> message = \"hello\"\n</code></pre>\n<p><code>message.capitalize()</code> does init caps. Only first character is changed to uppercase.</p>\n<pre><code class=\"language-python\">    >>> \"hello\".capitalize()    'Hello'    >>> 'hello'.capitalize()    'Hello'\n</code></pre>\n<p>You can also run this directly - <code>'hello'.capitalize()</code>. Isn't that cool!</p>\n<p>That's because each piece of text in python is an object of the <code>str</code> <code>class</code>, and we can directly call methods of that <code>class</code> on <code>str</code> objects.</p>\n<p>Now let's shift our attention to methods, which gives us more information about the specific contents of a string.</p>\n<ul>\n<li>We want to find out if this string contains numeric values?</li>\n<li>Does it contain alphabets only?</li>\n<li>Does it contain alpha-numeric values?</li>\n<li>Is it lowercase?</li>\n<li>Is it uppercase?</li>\n</ul>\n<p>To find if a piece of text contains only lower case alphabets.</p>\n<pre><code class=\"language-python\">    >>> 'hello'.islower()    True    >>> 'Hello'.islower()    False\n</code></pre>\n<p>If the first letter is in uppercase, then <code>istitle()</code> will return a <code>True</code> value.</p>\n<pre><code class=\"language-python\">    >>> 'Hello'.istitle()    True    >>> 'hello'.istitle()    False\n</code></pre>\n<p>To find if a piece of text contains only upper case alphabets.</p>\n<pre><code class=\"language-python\">    >>> 'hello'.isupper()    False    >>> 'Hello'.isupper()    False    >>> 'HELLO'.isupper()    True\n</code></pre>\n<p><code>isdigit()</code> checks if a string is a numeric value.</p>\n<pre><code class=\"language-python\">    >>> '123'.isdigit()    True    >>> 'A23'.isdigit()    False    >>> '2 3'.isdigit()    False    >>> '23'.isdigit()    True\n</code></pre>\n<p><code>isalpha()</code> checks if a string only contains alphabets.</p>\n<pre><code class=\"language-python\">    >>> '23'.isalpha()    False    >>> '2A'.isalpha()    False    >>> 'ABC'.isalpha()    True\n</code></pre>\n<p><code>isalnum()</code> checks if a string only contains alphabets and/or numerals.</p>\n<pre><code class=\"language-python\">    >>> 'ABC123'.isalnum()    True    >>> 'ABC 123'.isalnum()    False\n</code></pre>\n<p>Lastly, we look at things which you can use, to check characters of a string.</p>\n<p><code>endswith</code> is self explanatory.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.endswith('World')    True    >>> 'Hello World'.endswith('ld')    True    >>> 'Hello World'.endswith('old')    False    >>> 'Hello World'.endswith('Wo')    False\n</code></pre>\n<p><code>startswith</code> is self explanatory as well.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.startswith('Wo')    False    >>> 'Hello World'.startswith('He')    True    >>> 'Hello World'.startswith('Hell0')    False    >>> 'Hello World'.startswith('Hello')    True\n</code></pre>\n<p><code>find</code> method returns if a piece of text is present in another string. Returns the first match index.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.find('Hello')    0    >>> 'Hello World'.find('ello')    1\n</code></pre>\n<p>A value of <code>-1</code> is returned, if you're searching for something which is not present in the string.</p>\n<p>If you are searching for <code>'Ello'</code> with a capital <code>'E'</code> ,you'll not be able to find it. Search is case sensitive.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.find('Ello')    -1    >>> 'Hello World'.find('bello')    -1    >>> 'Hello World'.find('Ello')    -1\n</code></pre>\n<h4>Step 02: Type Conversion Puzzles <a id=\"step-02-type-conversion-puzzles\"></a></h4>\n<p>We'll now try and convert values from one type to another, and try and play around with them.</p>\n<p><code>str</code> converts boolean value to a text value.</p>\n<pre><code class=\"language-python\">    >>> str(True)    'True'\n</code></pre>\n<p>All text value except for empty string represent True. So, <code>bool</code> returns True for everything except empty string.</p>\n<pre><code class=\"language-python\">    >>> bool('True')    True    >>> bool('true')    True    >>> bool('tru')    True    >>> bool('false')    True    >>> bool('False')    True    >>> bool('')    False\n</code></pre>\n<p>Let's try and convert a few integer values to strings.</p>\n<pre><code class=\"language-python\">    >>>str(123)    '123'    >>> str(12345)    '12345'    >>> str(12345.45678)    '12345.45678'\n</code></pre>\n<p>Let's do the reverse.</p>\n<pre><code class=\"language-python\">    >>> int('45')    45    >>> int('45.56')    ValueError: invalid literal for int()\n</code></pre>\n<p>if we do <code>int('45.56')</code>, you can see that it throws an error. It says “I cannot convert this to an <code>int</code>, as <code>45.56</code> is an invalid integer”.</p>\n<p>You can also pass an additional parameter to <code>int</code> indicating the numeric system - 16 for Hexa decimal, 8 for Octal etc. Default is 10 - Decimal.</p>\n<pre><code class=\"language-python\">    >>> int('45abc',16)    285372    >>> int('a',16)    10    >>> int('b',16)    11    >>> int('c',16)    12    >>> int('f',16)    15    >>> int('g',16)    ValueError: invalid literal for int() with base 16: 'g'\n</code></pre>\n<p>You can also convert string to float.</p>\n<pre><code class=\"language-python\">    >>> float(\"34.43\")    34.43    >>> float(\"34.43rer\")    ValueError: could not convert string to float: '34.43rer'\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this quick step, we looked at converting different types to strings, and converting strings to different types. So we looked at <code>int</code>, <code>bool</code> and <code>float</code> values, and we looked at how to convert them to string, and how to convert strings back to these specific types.</p>\n<h4>Step 02: Strings Are Immutable <a id=\"step-02-strings-are-immutable\"></a></h4>\n<p>In this step, let's learn an important fact about strings in Python.</p>\n<p>String values are immutable.</p>\n<p>What does immutability mean, and why do we say strings are immutable?</p>\n<p>Let's create a very simple string: <code>message = 'Hello'</code>, and we're saying <code>message.upper()</code>. But what does it do? It prints <code>'HELLO'</code>, with all characters in uppercase. Well, what would happen if you do <code>print(message)</code>? It says <code>'Hello'</code>.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello\"    >>> message.upper()    'HELLO'    >>> message    'Hello'\n</code></pre>\n<p>You would see we tried change the content of message, but it has not changed.</p>\n<p>When we execute <code>message.upper()</code>, a new string is created, and it is returned back. Original string remained unchanged. This is called immutability.</p>\n<p>Once you define a string in Python, you'll not be able to change the value of it.</p>\n<p>You can use - “OK. I can do something of this kind: <code>message = message.upper()</code>”.</p>\n<p>What would happen now?</p>\n<p>Will the value of <code>message</code> get changed? It prints <code>'HELLO'</code>, with all caps.</p>\n<p>Did the value of <code>message</code> change? Does this prove that strings are mutable?</p>\n<p>The important thing you need to understand about all this stuff, is how objects are stored inside Python.</p>\n<p>There are things called variables, and there are things called objects.</p>\n<p>When we run <code>message = 'Hello'</code></p>\n<ul>\n<li>We are creating one object of <code>str</code> class with a values <code>'Hello'</code>.</li>\n<li>We are creating one variable called <code>message</code></li>\n<li>The location of <code>'Hello'</code> is stored into <code>message</code></li>\n</ul>\n<p>In Python, your variables are nothing but a name.</p>\n<p>If location of <code>'Hello'</code> in memory is <code>A</code>, then the value stored in <code>message</code> is <code>A</code>. <code>message</code> is called a reference.</p>\n<p>What happens with <code>message = message.upper()</code>?</p>\n<p>A new object is created with value <code>'HELLO'</code> at a different location <code>B</code>.</p>\n<p>A reference ot location <code>B</code> is stored into <code>message</code> variable.</p>\n<p>Summary : The original value at location <code>A</code> has not changed and cannot be changed for <code>str</code> variables. Hence 'str' objects are immutable.</p>\n<p>Variables are just names referring to a location. They don't really contain the value. Variables contain a reference to the location that contains the object.</p>\n<h4>Step 03: Python Has No Separate Character Type <a id=\"step-03-python-has-no-separate-character-type\"></a></h4>\n<p>One of the things that surprises people new to Python, is that there is no character data type in Python.</p>\n<p>Typically we have text data types in all the languages, don't we? <code>'Hello World'</code> for example, is text data, and we stored it in <code>message</code>. This is called a string.</p>\n<p>In other languages, you would have something to represent a single character symbol. For example in Java, you can have a <code>char</code> data type, to store a single character <code>ch</code>, in which <code>'h'</code> is one character. But in Python, there is no separate data type to store single characters.</p>\n<p>For example, let's see how Python treats the first character of the following string <code>message</code>. The way you can access the first character of a string is by saying <code>message[0]</code>.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello World\"    >>> message[0]    'H'    >>> type(message[0])    &#x3C;class 'str'>    >>> type(message)    &#x3C;class 'str'>\n</code></pre>\n<p><code>type(message[0])</code> and <code>type(message)</code> print the same type <code>str</code>. No difference.</p>\n<p>In Python, whether you're talking about a string, or you're talking about a single character symbol, they are all represented by the same <code>class</code>, <code>str</code>.</p>\n<p><code>message[100]</code> throws an <code>IndexError</code>.</p>\n<pre><code class=\"language-python\">    >>> message[0]    'H'    >>> message[1]    'e'    >>> message[2]    'l'    >>> message[3]    'l'    >>> message[100]    IndexError: string index out of range\n</code></pre>\n<p>It says: “The given index is out of the range of the value of that specific string”.</p>\n<p>Let's say we would want to print all the characters in this string.</p>\n<p>The way you could do that, is by saying: <code>for ch in message: print(ch)</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this short step, we looked at the fact that there is no separate character class, or data type in Python. We also looked at how do we loop over a given string, and print all the characters present inside this string.</p>\n<h4>Step 04: The <code>string</code> <code>module</code> <a id=\"step-04-the-string-module\"></a></h4>\n<p>In this step, we will introduce you to the <code>string</code> <code>module</code>.</p>\n<p>If we would want to use anything from a module in Python, you need to import that specific <code>module</code> into your program.</p>\n<pre><code class=\"language-python\">    >>> import string\n</code></pre>\n<p>If you do a <code>string.</code> and press , it would show the different things which are part of the <code>string</code> <code>module</code>.</p>\n<pre><code class=\"language-python\">    >>> string.    string.Formatter(       string.ascii_uppercase  string.octdigits    string.Template(        string.capwords(        string.printable    string.ascii_letters    string.digits           string.punctuation    string.ascii_lowercase  string.hexdigits        string.whitespace\n</code></pre>\n<p>Let's explore some of these.</p>\n<pre><code class=\"language-python\">    >>> string.ascii_letters    'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'    >>> string.ascii_lowercase    'abcdefghijklmnopqrstuvwxyz'    >>> string.ascii_uppercase    'ABCDEFGHIJKLMNOPQRSTUVWXYZ'    >>> string.digits    '0123456789'    >>> string.hexdigits    '0123456789abcdefABCDEF'    >>> string.punctuation    '!\"#$%&#x26;\\'()*+,-./:;&#x3C;=>?@[\\\\]^_`{|}~'    >>> string.ascii_letters    'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n</code></pre>\n<p>You have a set of printable characters, punctuation characters and a lot more.</p>\n<p>You can check a text value against any of these</p>\n<pre><code class=\"language-python\">    >>> 'a' in string.ascii_letters    True    >>> 'ab' in string.ascii_letters    True    >>> 'abc' in string.ascii_letters    True\n</code></pre>\n<p><code>in</code> operation on a string, checks if a given string.</p>\n<pre><code class=\"language-python\">    >>> '1' in '13579'    True    >>> '2' in '13579'    False    >>> '4' in '13579'    False\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we explored more exercises involving the <code>str</code> module of Python.</p>\n<h4>Step 05: More Exercises With The <code>str</code> Module <a id=\"step-05-more-exercises-with-the-str-module\"></a></h4>\n<p>Let's start with an Exercise - find if a specific character is a vowel or not.</p>\n<pre><code class=\"language-python\">    >>> char = 'a'    >>> vowel_string = 'aeiouAEIOU'    >>> char in vowel_string    True    >>> char = 'b'    >>> char in vowel_string    False\n</code></pre>\n<p>he other thing you can do, is just have the capital vowels, or just the lowercase versions.</p>\n<pre><code class=\"language-python\">    >>> vowel_string = 'AEIOU'    >>> char.upper() in vowel_string    False    >>> char = 'a'    >>> char.upper() in vowel_string    True\n</code></pre>\n<p>Now let's move on to the next one.</p>\n<p>We want to find out and print all the capital alphabets, from <code>A</code> to <code>Z</code>.</p>\n<p>There was a small clue at the start of the previous step, regarding importing the <code>string</code> <code>module</code>. We did the <code>string</code> <code>module</code>, and we saw that <code>string</code> <code>module</code> contained a number of things.</p>\n<pre><code class=\"language-python\">    >>> string.ascii_uppercase    'ABCDEFGHIJKLMNOPQRSTUVWXYZ'    >>> for char in string.ascii_uppercase:    ...   print(char)    ...    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    P    Q    R    S    T    U    V    W    X    Y    Z\n</code></pre>\n<p>Try another easy exercise: print all the lower characters. Instead of <code>string.ascii_uppercase</code>, you have <code>string.ascii_lowercase</code>.</p>\n<pre><code class=\"language-python\">    >>> for char in string.ascii_lowercase:    ...   print(char)    ...    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    p    q    r    s    t    u    v    w    x    y    z\n</code></pre>\n<p>An even easier exercise, would be to print all the digits.</p>\n<pre><code class=\"language-python\">    >>> for char in string.    string.Formatter(       string.ascii_uppercase  string.octdigits    string.Template(        string.capwords(        string.printable    string.ascii_letters    string.digits           string.punctuation    string.ascii_lowercase  string.hexdigits        string.whitespace    >>> for char in string.digits:    ...   print(char)    ...    0    1    2    3    4    5    6    7    8    9    >>>\n</code></pre>\n<p>The last exercise which we want to leave you with, is to check if something is a consonant.</p>\n<p>A consonant is an alphabet which is not a vowel, so any alphabet which is not in <code>'aeiou'</code> is a consonant. The simplest way of doing this is to say <code>consonant_string = 'bcdfghj...'</code> and so on. Looks like a very long solution? There is an easier way out.</p>\n<pre><code class=\"language-python\">    >>> vowel_string = 'aeiou'    >>> char = 'b'    >>> char.isalpha() and char.lower() not in vowel_string    True\n</code></pre>\n<h4>Step 06: More Exercises On Strings <a id=\"step-06-more-exercises-on-strings\"></a></h4>\n<p>In the step, let's look at a few more puzzles and exercises related to strings. Let's say we have a simple string, <code>string_example</code>, and this is contains an English sentence. <code>'This is a great thing.'</code></p>\n<p>Let's try to to print each of the words present in this string, on a separate line.</p>\n<p>So we would want to print <code>'This'</code>, <code>'is'</code>, <code>'a'</code>, <code>'great'</code> and <code>'thing'</code> on individual lines.</p>\n<p>One of the clues we'll give you is, try and do <code>string_example. &#x3C;TAB></code>. There are a huge list of methods, which would come up if you do that.</p>\n<pre><code class=\"language-python\">    >>> string_example = \"This is a great thing\"    >>> string_example.    string_example.capitalize(    string_example.join(    string_example.casefold(      string_example.ljust(    string_example.center(        string_example.lower(    string_example.count(         string_example.lstrip(    string_example.encode(        string_example.maketrans(    string_example.endswith(      string_example.partition(    string_example.expandtabs(    string_example.replace(    string_example.find(          string_example.rfind(    string_example.format(        string_example.rindex(    string_example.format_map(    string_example.rjust(    string_example.index(         string_example.rpartition(    string_example.isalnum(       string_example.rsplit(    string_example.isalpha(       string_example.rstrip(    string_example.isdecimal(     string_example.split(    string_example.isdigit(       string_example.splitlines(    string_example.isidentifier(  string_example.startswith(    string_example.islower(       string_example.strip(    string_example.isnumeric(     string_example.swapcase(    string_example.isprintable(   string_example.title(    string_example.isspace(       string_example.translate(    string_example.istitle(       string_example.upper(    string_example.isupper(       string_example.zfill(\n</code></pre>\n<p>One of the methods in the list is the <code>split()</code> method.</p>\n<pre><code class=\"language-python\">    >>> string_example.split()    ['This', 'is', 'a', 'great', 'thing']    >>> for word in string_example.split():    ...    print(word)    ...    This    is    a    great    thing\n</code></pre>\n<p><code>split_lines()</code> method looks for a <code>'\\n'</code>, and it divides the string based on it. If you have a string which contains newlines, and you would want to divide it into a number of strings with each line as a new element, the method you can use is <code>split_lines()</code>.</p>\n<pre><code class=\"language-python\">    >>> string_example = \"This\\nis\\n\\ngreat\\nthing\"    >>> print(string_example)    This    is​    great    thing    >>> string_example = \"This\\nis\\na\\ngreat\\nthing\"    >>> print(string_example)    This    is    a    great    thing    >>> string_example.splitlines()    ['This', 'is', 'a', 'great', 'thing']    >>>\n</code></pre>\n<p>The last thing which we look at, is <strong>concatenation operator</strong>.</p>\n<pre><code class=\"language-python\">    >>> 1 + 2    3    >>> \"1\" + \"2\"    '12'    >>> \"1\" + 1    TypeError: must be str, not int    >>> \"ABC\" + \"DEF\"    'ABCDEF'\n</code></pre>\n<p>In Python, you cannot do <code>+</code> operator between two different types. <code>+</code> with two strings is concatenation. <code>+</code> with two numbers is addition.</p>\n<p>One other interesting operator on strings is multiplication. If you do a <code>'1' * 20</code>, What do you think will be the output?</p>\n<pre><code class=\"language-python\">    >>> 1 * 20    20    >>> '1' * 20    '11111111111111111111'    >>> 'A' * 10    'AAAAAAAAAA'\n</code></pre>\n<p>If you multiply a string with <code>number</code>, the string value is concatenated <code>number</code> times.</p>\n<p>The last thing which we look at in this step, is comparing strings.</p>\n<p>Let's say we have a string with a value <code>str = 'test'</code>, and you have another string to with a value <code>str1 = 'test1'</code>.</p>\n<p>We want to check whether both these strings are the same.</p>\n<pre><code class=\"language-python\">    >>> str = \"test\"    >>> str2 = \"test1\"    >>> str == str2    False    >>> str2 = \"test\"    >>> str == str2    True\n</code></pre>\n<p>You can compare strings using the <code>==</code> operator.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we explored a few exercises on strings, covering areas such as:</p>\n<ul>\n<li>Splitting a given sentence into individual words</li>\n<li>The concatenation operator, <code>+</code></li>\n<li>The string multiplication pattern, <code>*</code></li>\n<li>The use of the <code>==</code> operator to compare strings</li>\n</ul>\n<h3>Chapter 07 - Introducing Loops <a id=\"chapter-07-introducing-loops\"></a></h3>\n<p>Welcome to the section on Loops. In this section, we will look at a variety of loops that are available in Python. We will look mainly at the <strong><code>for</code></strong> loop, and the <strong><code>while</code></strong> loop.</p>\n<h4>Step 01: Revisited: The for Loop <a id=\"step-01-revisited-the-for-loop\"></a></h4>\n<p>Let's start with revising the basics of the for loop, we have learned in the previous steps.</p>\n<p>We saw that a <code>for</code> loop helps us to loop around the same set of code statements, many times over.</p>\n<p>Let's look at a few simple examples, once again.</p>\n<p><strong>Snippet-01</strong></p>\n<p>The syntax of a <code>for</code> loop is very simple.</p>\n<p>For example, this code snippet will tell you all about it: <code>for i in range(1, 11): print(i)</code>.</p>\n<p>What does this do? Very simple, it prints from <code>1</code> to <code>10</code>.</p>\n<p>In the call to the <code>range()</code> function, the second parameter is exclusive. We are actually looping from <code>1</code> to <code>10</code>, and this piece of code, <code>print(i)</code>, is being executed for different values of <code>i</code>.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,11):    ...   print(i)    ...    1    2    3    4    5    6    7    8    9    10\n</code></pre>\n<p><code>for</code> loop can also be used to loop round the characters in a string.</p>\n<pre><code class=\"language-python\">    >>> for ch in \"Hello World\":    ...   print(ch)    ...    H    e    l    l    o    W    o    r    l    d\n</code></pre>\n<p><code>for</code> loop can be used to loop around all the words in a given sentence.</p>\n<pre><code class=\"language-python\">    >>> for word in \"Hello World\".split():    ...   print(word)    ...    Hello    World\n</code></pre>\n<p><code>for</code> loop can be used to loop around a specific list of values.</p>\n<pre><code class=\"language-python\">    >>> for item in (3, 6, 9):    ...   print(item)    ...    3    6    9\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we started with discussing and revising basic concepts about the <code>for</code> loop</p>\n<h4>Step 02: Programming Exercise PE-LO-01 <a id=\"step-02-programming-exercise-pe-lo-01\"></a></h4>\n<p>Welcome back to this step, where we would do a lot of exercises with the <code>for</code> loop.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>\n<p>The first exercise is to find out if a number is prime. We want to write a method, <code>is_prime()</code>, which accepts an integer value as parameter, and returns whether it's a prime. (<strong>Hint</strong>: A prime number is something which is only divisible by <code>1</code> and itself).</p>\n<ol>\n<li><code>5</code> is only divisible by <code>1</code> and <code>5</code>. It is not divisible by any other number. Same is the case with <code>7</code> and <code>11</code>.</li>\n<li>However, <code>6</code> is divisible by <code>1</code>, <code>2</code>, <code>3</code> and <code>6</code>. So it's not a prime number.</li>\n</ol>\n</li>\n<li>The second exercise is to write a method to calculate the sum up to a given integer, starting from <code>1</code>. <strong>Hint</strong>: If I would want to find that the sum up to <code>6</code>. what's needed is <code>1 + 2 + 3 + 4 + 5 + 6</code>.</li>\n<li>The third exercise is to find that the sum of divisors of a given integer. <strong>Hint</strong>: Let's say we want to find out the sum of the divisors of <code>15</code>. The divisors of <code>15</code> are <code>1</code>, <code>3</code>, <code>5</code> and <code>15</code>. So I would want to calculate <code>1 + 3 + 5 + 15</code>, and return that value.</li>\n<li>Fourth exercise is to print a numbered triangle, when given a specific integer.</li>\n</ol>\n<p>Hint: Given an input <code>5</code>, we would want to print the number triangle of these kind:</p>\n<pre><code class=\"language-python\">11 21 2 31 2 3 41 2 3 4 5.\n</code></pre>\n<p>These are the exercises for the <code>for</code> loop. We also test our skills, with creating method and executing them, in our IDE.</p>\n<p><strong>Solution 1</strong></p>\n<p>Let's start with creating the <code>is_prime()</code> method, in a file named <code>for_exercises</code>.</p>\n<p>We would want to accept an <code>int</code> parameter, and find out if it is prime, or not.</p>\n<p>We need to check whether it's divisible by any other number, other than <code>1</code> and itself. If we are passed in a value of <code>5</code>, you want to see if it's divisible by any of <code>2</code>, <code>3</code> or <code>4</code>.</p>\n<pre><code class=\"language-python\">def is_prime(number):\n</code></pre>\n<p>We can use a <code>for</code> loop. We can structure it like this: <code>for divisor in range(1, number): ...</code>. We would not want to divide it with <code>1</code>, but start with <code>2</code> instead, and go up to <code>number-1</code>, which is <code>4</code>.</p>\n<pre><code class=\"language-python\">for divisor in range(2,number):\n</code></pre>\n<p>How can we check if the <code>number</code> is divisible by <code>divisor</code>?</p>\n<p>By using the <code>%</code> operator. If <code>number</code> is divisible by <code>divisor</code> we return <code>False</code>.</p>\n<pre><code class=\"language-python\">for divisor in range(2,number):    if number % divisor == 0:        return False\n</code></pre>\n<p>What happens if the code comes up to the end? It would mean we tried with <code>2</code>, <code>3</code> and <code>4</code>, but <code>number</code> was not divisible by all of them. In that case, <code>number</code> would be prime, and we can safely return <code>True</code>.</p>\n<pre><code class=\"language-python\">for divisor in range(2,number):    if number % divisor == 0:        return False​return True\n</code></pre>\n<p>For <code>1</code>, the rules are a little different, as it is neither a prime or composite. We will add an <code>if</code> condition to check if the number is <code>1</code>. <code>if(number &#x3C; 2):</code></p>\n<p>This <code>if</code> condition is called a guard check or a boundary check, to make sure that you are processing only the right input. If <code>number</code> has a value less than <code>2</code>, do nothing. OK, it's not a prime.</p>\n<p>Here is the entire code at one place, for your reference:</p>\n<pre><code class=\"language-python\">def is_prime(number):    if(number &#x3C; 2):        return False    for divisor in range(2,number):        if number % divisor == 0:            return False    return Trueprint(is_prime(5));\n</code></pre>\n<h4>Step 03: Continued - Programming Exercise PE-LO-01 <a id=\"step-03-continued-programming-exercise-pe-lo-01\"></a></h4>\n<p>In the previous step, we looked at solving the <code>is_prime()</code> exercise. In this step, let's look at an implementation of <code>sum_up_to_n()</code>. Here is the entire code for this exercise:</p>\n<pre><code class=\"language-python\">def sum_upto_n(number):    sum = 0    for i in range(1, number+1):        sum = sum + i    return sumprint(sum_upto_n(6))print(sum_upto_n(10))\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Wrote a Python function to compute the sum of all integers, from <code>1</code>, up to the input integer <code>n</code>.</li>\n</ul>\n<h4>Step 04: Continued - Programming Exercise PE-LO-01 <a id=\"step-04-continued-programming-exercise-pe-lo-01\"></a></h4>\n<p>Let's focus on the third exercise, <code>sum_of_divisors</code>.</p>\n<p>One of the clues we can give you, is that <code>sum_of_divisors()</code> is very similar to <code>is_prime()</code>.</p>\n<p>You want to find out if a number is dividing <code>15</code>, and if it's dividing <code>15</code>, with the remainder of <code>0</code>, then you need to add that up.</p>\n<pre><code class=\"language-python\">def calculate_sum_of_divisors(number):    sum = 0    if(number &#x3C; 2):        return sum    for divisor in range(1,number+1):        if number % divisor == 0:            sum = sum + divisor    return sumprint(calculate_sum_of_divisors(6))print(calculate_sum_of_divisors(15))\n</code></pre>\n<h4>Step 05: Continued - Programming Exercise PE-LO-01 <a id=\"step-05-continued-programming-exercise-pe-lo-01\"></a></h4>\n<p>In this step, Let's look at the last exercise - <code>print_a_number_triangle</code>.</p>\n<p>For example, if we call such a function with input <code>5</code>, the output needs to be:</p>\n<pre><code class=\"language-python\">1​1 2​1 2 3​1 2 3 4​1 2 3 4 5\n</code></pre>\n<p>Let start with a simple thing. Let's try and print <code>1 2 3 4 5</code> first, and then we would look at how to print the rest of the output. Lets proceed with defining this method.</p>\n<p>We can say <code>def print_a_number_triangle(number): ...</code> that takes a number as an input. You want to print a sequence of integers starting from <code>1</code>, up to that specific <code>number</code>. How can you do that? Let's try this: <code>for i in range(1,number+1): print(i)</code> What would happen? Let's call <code>print_a_number_triangle(5)</code> now. It prints:</p>\n<pre><code class=\"language-python\">    1    2    3    4    5\n</code></pre>\n<p>on individual lines.</p>\n<p>To print this sequence on a single line, let's delimit them with <code>&#x3C;SPACE></code> instead. Call <code>print()</code> like this instead: <code>for i in range(1,number+1): print(i, end=\" \")</code>.</p>\n<p>Let's see what would happen now. <code>1 2 3 4 5</code></p>\n<p>To solve our exercise, we want to repeat this again and again.</p>\n<p>Yes, we need another for loop around it!</p>\n<pre><code class=\"language-python\">for j in range(1, number+1):    for i in range(1, number + 1):        print(i, end=\" \")\n</code></pre>\n<p>Make sure that you have the indentation right. This is called <code>loop within a loop</code>.</p>\n<p>The output of above program is</p>\n<p><code>1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5</code></p>\n<p>Let's add <code>print(\"\\n\")</code>, so we have a new line at the end of each outer loop iteration.</p>\n<pre><code class=\"language-python\">for j in range(1, number+1):    for i in range(1, number + 1):        print(i, end=\" \")    print(\"\\n\")\n</code></pre>\n<p>Output</p>\n<pre><code class=\"language-python\">1 2 3 4 51 2 3 4 51 2 3 4 51 2 3 4 51 2 3 4 5\n</code></pre>\n<p>We are printing a square, not a triangle.</p>\n<p>What we want to do is to print up to <code>1</code> in first line, upto <code>2</code> in second line and so on.</p>\n<p>How can we do that? Think about it.</p>\n<p>When you are inside this loop, you can see the variable <code>j</code>.</p>\n<p>Instead of <code>number+1</code>, let's say <code>j + 1</code>.</p>\n<p>When <code>j</code> has a value of <code>1</code>, <code>for</code> will print from <code>1</code> to <code>1</code>. When <code>j</code> has a value of <code>2</code>, print from <code>1</code> to <code>2</code>, literally printing <code>1 2</code>. When j has a value of <code>3</code>, I'll print from <code>1</code> to <code>3</code>. Let's try this and see what would happen.</p>\n<pre><code class=\"language-python\">for j in range(1, number+1):    for i in range(1, j + 1):        print(i, end=\" \")    print(\"\\n\")\n</code></pre>\n<p>You can see that our number triangle is ready!</p>\n<pre><code class=\"language-python\">1​1 2​1 2 3​1 2 3 4​1 2 3 4 5\n</code></pre>\n<p>Here is the entire code for you:</p>\n<pre><code class=\"language-python\">def print_a_number_triangle(number):    for j in range(1, number + 1):        for i in range(1, j + 1):            print(i, end=' ')        print()print_a_number_triangle(6)\n</code></pre>\n<p>An important point to note is, a couple of these things can be done in a much simpler way. We will look at these options when we talk about functional programming.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Presented a solution to the exercise for printing a number triangle.</li>\n</ul>\n<h4>Step 06: Introducing The while Loop <a id=\"step-06-introducing-the-while-loop\"></a></h4>\n<p>Let's look at one of the other loops which is present in Python, called the <strong><code>while</code></strong> loop.</p>\n<p>In the <code>for</code> loop, we can specify the range of our iteration, by using the <code>range()</code> function.</p>\n<p>In a <code>while</code> loop, we specify a logical condition. While the condition is true, loop continues running.</p>\n<p>Do you remember one place where we use the condition until now? It was in an <code>if</code> statement.</p>\n<p>Let's see how to use a simple <code>while</code> loop.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> i = 5    >>> if i == 5:    ...   print(\"i is 5\")    ...    i is 5\n</code></pre>\n<p>Let's say <code>i</code> has a value of <code>0</code>, and we then do: <code>while i &#x3C; 5: print(i)</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 0    >>> while i &#x3C; 5:    ...   print(i)    ...    0    0    0    0    0    0    0    0    ^CTraceback (most recent call last):      File \"&#x3C;stdin>\", line 2, in &#x3C;module>    KeyboardInterrupt    >>>    KeyboardInterrupt\n</code></pre>\n<p>If we leave it to run, you'd see that it continuously prints <code>0</code> again, and again. Let's do a <code>&#x3C;CTRL-C></code> or <code>&#x3C;COMMAND-C></code> to interrupt this.</p>\n<p>What is happening here?</p>\n<p>Initially <code>i</code> is <code>0</code>, and the condition <code>i &#x3C; 5</code> is <code>True</code>, and <code>print(i)</code> is executed. Next iteration, it checks the condition, it is <code>True</code>, and <code>0</code> is printed. This continues to happen. What's happening is an <strong>infinite loop</strong>.</p>\n<p>One of the important things to make sure in a <code>while</code> loop, is to increment the value of <code>i</code>. We need to say something like <code>i = i + 1</code>.</p>\n<pre><code class=\"language-python\">    >>> while i &#x3C; 5:    ...   print(i)    ...   i = i + 1    ...    0    1    2    3    4\n</code></pre>\n<p>So how does it work? *<code>i</code> initially had a value of <code>0</code>. First the condition is checked. It's <code>True</code>, so <code>0</code> is printed and then the value of <code>i</code> is incremented to <code>1</code>.</p>\n<ul>\n<li><code>i</code> is still less than <code>5</code>, so the loop continues to execute, and this happens until <code>4</code> is printed. <code>i</code> again gets incremented to <code>4 + 1</code>, or <code>5</code>.</li>\n<li>Then we check the condition <code>i &#x3C; 5</code>. This is now <code>False</code>. Control goes out of the <code>while</code> loop, and terminates it.</li>\n</ul>\n<p>When executing a <code>while</code>, control flow is just based on a condition. As long as the condition is <code>True</code>, we keep executing the code. An important thing to remember, is to make sure the control variable is updated.</p>\n<pre><code class=\"language-python\">    >>> for i in range(0,5): print(i)    ...    0    1    2    3    4\n</code></pre>\n<p>A <code>for</code> loop is much simpler to code than a <code>while</code>. With <code>while</code>, we have to write an expression statement, to increment the value.</p>\n<p>The question you might have is - What are the situations when you should use a while?</p>\n<p>We will look at that very soon.</p>\n<p><strong>Summary</strong></p>\n<p>In this video, we:</p>\n<ul>\n<li>Were introduced to the concept of a <code>while</code> loop in Python</li>\n<li>Understood the importance of a control variable being incremented inside the loop</li>\n<li>Observed differences between the working of a <code>while</code>, and a <code>for</code> loop</li>\n</ul>\n<h4>Step 07: Programming Exercise PE-LO-02 <a id=\"step-07-programming-exercise-pe-lo-02\"></a></h4>\n<p>In the previous step, we were introduced to <code>while</code> loop. In this step, let's look at a couple of exercises using the <code>while</code> loop.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li><code>print_squares_upto_limit(30)</code>: We need to print all the squares of numbers, up to a limit of <code>30</code>. The output needs to be <code>1 4 9 16 25</code>.</li>\n<li><code>print_cubes_upto_limit(30)</code>: We need to print all the cubes of numbers, up to a limit of <code>30</code>.The output needs to be 1 8 27.</li>\n</ol>\n<p><strong>Exercise 1: Solution</strong></p>\n<p>Here is the entire code for your reference:</p>\n<pre><code class=\"language-python\">def print_squares_upto_limit(limit):    i = 1    while i * i &#x3C; limit:        print(i*i, end = \" \")        i = i + 1\n</code></pre>\n<p>Now the next exercise, was to print cubes up to a limit.</p>\n<p>The expression in the <code>while</code> condition should now be <code>i*i*i &#x3C; 30</code>.</p>\n<pre><code class=\"language-python\">def print_cubes_upto_limit(limit):    i = 1    while i * i * i &#x3C; limit:        print(i*i*i, end = \" \")        i = i + 1print_cubes_upto_limit(80)\n</code></pre>\n<p>Could we have implemented above two examples with <code>for</code> loop? It would've been a little more difficult.</p>\n<p>Typically, we use a <code>for</code> loop when we know how many times the loop will be executed is clear at the start.</p>\n<p>If we do not know, how many times a loop will run, <code>while</code> is a better option.</p>\n<h4>Step 08: While Example <a id=\"step-08-while-example\"></a></h4>\n<p>Earlier we used <code>if</code> statement to implement a solution for this:</p>\n<ul>\n<li>\n<p>Ask the User for input:</p>\n<ul>\n<li>Enter two numbers</li>\n<li>\n<p>Choose the Option:</p>\n<ul>\n<li>1 - Add</li>\n<li>2 - Subtract</li>\n<li>3 - Multiply</li>\n<li>4 - Divide</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Perform the Operation</li>\n<li>Publish the Result</li>\n</ul>\n<p>We would want to enhance it to execute in a loop multiple times, until the user chooses to exit. We will add an option 5 - Exit.</p>\n<ul>\n<li>\n<p>Ask the User for input:</p>\n<ul>\n<li>Enter two numbers</li>\n<li>\n<p>Choose the Option:</p>\n<ul>\n<li>1 - Add</li>\n<li>2 - Subtract</li>\n<li>3 - Multiply</li>\n<li>4 - Divide</li>\n<li>5 - Exit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Perform the Operation</li>\n<li>Publish the Result</li>\n<li>Repeat until Option 5 is chosen.</li>\n</ul>\n<p><strong>Snippet-01 Explained</strong></p>\n<p>Here's the earlier code we wrote with if:</p>\n<pre><code class=\"language-python\">number1 = int(input(\"Enter Number1: \"))number2 = int(input(\"Enter Number2: \"))​print(\"\\n\\n1 - Add\")print(\"2 - Subtract\")print(\"3 - Divide\")print(\"4 - Multiply\")​choice = int(input(\"Choose Operation: \"))​# print(number1 + number2)# print(choice)if choice==1:    result = number1 + number2elif choice==2:    result = number1 - number2elif choice==3:    result = number1 / number2elif choice==4:    result = number1 * number2else:    result = \"Invalid Choice\"​print(result)\n</code></pre>\n<hr>\n<h2>README</h2>\n<p><a href=\"https://github.com/bgoonz/python-gitbook/blob/master/.gitbook/assets/image%20%2821%29.png\"><img src=\"https://github.com/bgoonz/python-gitbook/raw/master/.gitbook/assets/image%20%2821%29.png\"></a></p>\n<p>{% embed url=\"<a href=\"https://replit.com/@bgoonz/30-days-python%5C#01%5C_Day%5C_Introduction/helloworld.py\">https://replit.com/@bgoonz/30-days-python\\#01\\<em>Day\\</em>Introduction/helloworld.py</a>\" caption=\"30 days of python practice\" %}</p>\n<p><a href=\"https://github.com/bgoonz/python-gitbook/blob/master/.gitbook/assets/image%20%2822%29.png\"><img src=\"https://github.com/bgoonz/python-gitbook/raw/master/.gitbook/assets/image%20%2822%29.png\"></a></p>\n<p><strong>Understanding variables</strong></p>\n<p>Variables are simply declarations that are used to store certain values. For instance, the variable <code>name</code> can hold the value of <code>John Smith.</code> Several rules need to be considered when declaring variable names. For starters, a variable name cannot begin with a number.</p>\n<p><code>2name = incorrect #incorrect</code></p>\n<p><code>name = correct #correct</code></p>\n<p>Variable names are case sensitive. This means that the variable <code>school</code> is not the same as <code>School</code>.</p>\n<p>Variables can hold different data types. This includes strings, integers, Booleans, long, lists, and arrays.</p>\n<p>In Python, we do not need to declare the data type while writing a variable. This is because the code is compiled and interpreted later. The compiler will throw an error in case there is a mismatch in the data types.</p>\n<p>Let's talk about the different data types.</p>\n<ol>\n<li>Strings</li>\n</ol>\n<p>Strings are usually presented in a text format. We will declare a string variable, as shown below.</p>\n<pre><code class=\"language-python\">name = “john”\nschool = “Alliance Francaise”\n</code></pre>\n<p>When we run <code>print(name)</code>, the output will be <code>john</code>.</p>\n<ol>\n<li>Integers</li>\n</ol>\n<p>These variables hold numeric values, as shown below.</p>\n<pre><code class=\"language-python\">math = 90\nchemistry = 100\nbiology = 70\n</code></pre>\n<p>We can find the total of the variables above using the following statement.</p>\n<pre><code class=\"language-python\">print(math+chemistry+biology)\n</code></pre>\n<p>The total is <code>260</code>.</p>\n<p>A TypeError is thrown when you try to add a string to an integer, as shwon below.</p>\n<pre><code class=\"language-python\">var1 = \"30\" #string\nvar2 = 20 #integer\n\nprint(var1+var2)#type error\n</code></pre>\n<p>We can sum <code>var1</code> and <code>var2</code> by converting <code>var1</code> to an integer using the <code>int()</code> function. The following code will execute successfully.</p>\n<pre><code class=\"language-python\">var1 = \"30\" #string\nvar2 = 20 #integer\n\nprint(int(var1)+var2) # Output: 50\n</code></pre>\n<blockquote>\n<p>Make sure that the variable stores a value that can be converted to an integer before using the int() method.</p>\n</blockquote>\n<ol>\n<li>Booleans</li>\n</ol>\n<p>There are only two Boolean values: <code>True</code> and <code>False</code>. In other words, something can either be true or false. We declare these values, as shown below. Please note that Python is case sensitive.</p>\n<pre><code class=\"language-python\">isOn = True\nisChecked = False\n</code></pre>\n<p>A <code>bool()</code> method can help convert a value to a boolean. The code snippets below showcase how a <code>bool()</code> function can be used.</p>\n<pre><code class=\"language-python\">print(bool(\"abc\")) #returns True\nprint(bool(0))  #returns False\n</code></pre>\n<p>The <code>bool()</code> function returns False when there are no parameters.</p>\n<ol>\n<li>Float</li>\n</ol>\n<p>This data type consists of numbers that have a decimal place. A perfect example of a float variable is highlighted below.</p>\n<pre><code class=\"language-python\">Bmi = 45.7\n</code></pre>\n<p><strong>Understanding lists</strong></p>\n<p>Lists allow us to store numerous elements in a particular variable. For instance, we can have a list that stores all the student names in a class. We use <code>[]</code> to define a list.</p>\n<pre><code class=\"language-python\">students = [] #list example\n</code></pre>\n<p>Elements in a list are usually separated by a comma, as shown below.</p>\n<pre><code class=\"language-python\">students = [“john”, “Mary Thomas”, “John Smith”]\n</code></pre>\n<p>Each element in the above <code>students</code> list has an index. By default, the first index is 0. So the item at index [0] is <code>john</code>, while the value at index <code>1</code> is <code>Mary Thomas</code>. A list of integers will look as follows.</p>\n<pre><code class=\"language-python\">student_marks = [90, 78, 90, 78]\n</code></pre>\n<p>We can access different list functionalities using built-in functions. For instance, to add a value to the <code>student_marks</code> list, we use the <code>append</code> function.</p>\n<pre><code class=\"language-python\">student_marks.append(\"Guardian Angel\")\nprint(student_marks)\n</code></pre>\n<p>The above function adds <code>Guardian Angel</code> at the end of the <code>student_marks</code> list.</p>\n<p>When we print the list it shows:</p>\n<pre><code class=\"language-python\">#output\n[90, 78, 90, 78, 'Guardian Angel']\n</code></pre>\n<p>We use <code>len(student_marks)</code> to determine the length of the list. We use the <code>remove()</code> function to delete something from the list. For instance, we can remove <code>90</code> from the <code>student_mark</code> list as shown below.</p>\n<pre><code class=\"language-python\">student_marks.remove(90)\nprint(student_marks)\n</code></pre>\n<p>In lists, negative indices allow us to count elements starting from the last one. For instance, the element with an index of <code>-1</code> in the above <code>student_marks</code> list is <code>\"Guardian Angel\"</code>. The second last element <code>78</code> has an index of <code>-2</code>.</p>\n<p><strong>Understanding functions or methods</strong></p>\n<p>Methods are quite critical in programming. They help store reusable code. This means that a person can call already declared methods rather than writing statements from scratch repeatedly. This saves significant time, that can be invested in other productive activities.</p>\n<p>In Python, we use the <code>def</code> keyword to declare a function. An example of a python method is shown below.</p>\n<pre><code class=\"language-python\">def readData():\n    print('success')\n</code></pre>\n<p>The above function prints <code>success</code> when it's invoked. We can also pass data to a method, perform some calculations, and return the results. This is demonstrated in the code snippet below.</p>\n<pre><code class=\"language-python\">def calculateTotal(chem, bio):\n    return chem+bio\n\nprint(calculateTotal(90,80))\n</code></pre>\n<p>The <code>calculateTotal</code> method takes in two parameters (chem, bio). The function then returns the sum of the two values. It is important to take note of the data types when passing parameters. For instance, the <code>calculateTotal</code> method will not work when we pass in a string as a parameter. This is because the program cannot sum up an integer and a string. As shown above, we can call the <code>calculateTotal</code> method directly from our print statement.</p>\n<pre><code class=\"language-python\">print(calculateTotal(90,80))\n</code></pre>\n<p>The <code>return</code> keyword ensures that the method returns a result after execution.</p>\n<blockquote>\n<p>Note that a function can also call another method. This is illustrated below.</p>\n</blockquote>\n<pre><code class=\"language-python\">def readData(chem, bio):\n    return chem+bio\n\ndef getTotal():\n    print(readData(90,80)) #calls the readData method\n\ngetTotal()\n</code></pre>\n<p><strong>Understanding loops</strong></p>\n<p>Loops are critical because they allow us to iterate through lists, check for different conditions, and continuously execute various statements. The main loops are <code>for</code> and <code>while</code>.</p>\n<ol>\n<li>For loops As noted, we can use a for loop to iterate through a list, as shown below:</li>\n</ol>\n<pre><code class=\"language-python\">student_list = [“John Doore”,”Matu Smith”]\nfor x in student_list:\n    print(x)\n</code></pre>\n<p>The <code>for</code> loop above will print every item in the student_list.</p>\n<ol>\n<li>While loops A while loop can help us check for a particular condition. For instance, while something is true specific statements can be executed. Here is an example of a while loop in action.</li>\n</ol>\n<pre><code class=\"language-python\">isChecked = false\nwhile isChecked == true:\n    print('Hallo there')\n</code></pre>\n<blockquote>\n<p>Note that the while loop above will be executed indefinitely until isChecked is set to false. You can press ctrl+c to stop the loop.</p>\n</blockquote>\n<p><strong>Classes</strong></p>\n<p>Classes are a vital component of object-oriented programming. When creating a class, you must use the <code>class</code> keyword. Other elements are then nested in the class. Here is an example of a Python class.</p>\n<pre><code class=\"language-python\">class Farmer: # a class with the name farmer\n    name = \"John\" # A variable\n    produce = \"1000kgs\" # A variable\n\nfarmer = Farmer() #instatiating the class as an object.\nprint(farmer.name) # accessing the properties of the Farmer class.\n</code></pre>\n<p>Classes can help as group things with similar characteristics. We can also assign values to class variables using the <code>init</code> function.</p>\n<pre><code class=\"language-python\">class Farmer:\n  def __init__(self, farmername, produce):\n    self.farmername = farmername\n    self.produce = produce\n\nfarmer = Farmer(\"Carry Sminson\", \"10,000kgs\")\n\nprint(farmer.farmername, farmer.produce)\n</code></pre>\n<p>In the above <code>Farmer</code> class, the <code>self</code> keyword represents an instance of an object. In other words, it allows us to access the different methods and attributes defined in the class.</p>\n<p>You can also declare a method in a class and use it later, as shown below.</p>\n<pre><code class=\"language-python\">class Farmer:\n  def __init__(self, farmername, produce):\n    self.farmername = farmername\n    self.produce = produce\n\n  def printDetails(self): # Method\n      print(self.farmername, self.produce)\n\nfarmer = Farmer(\"Carry Sminson\", \"10,000kgs\")\n\nfarmer.printDetails()\n</code></pre>\n<h3>Python syntax was made for readability, and easy editing. For example, the python language uses a <code>:</code> and indented code, while javascript and others generally use <code>{}</code> and indented code.</h3>\n<p>Lets create a <a href=\"https://repl.it/languages/python3\">python 3</a> repl, and call it <em>Hello World</em>. Now you have a blank file called <em>main.py</em>. Now let us write our first line of code:</p>\n<p><em>helloworld.py</em></p>\n<pre><code class=\"language-python\">print('Hello world!')\n</code></pre>\n<blockquote>\n<p>Brian Kernighan actually wrote the first “Hello, World!” program as part of the documentation for the BCPL programming language developed by Martin Richards.</p>\n</blockquote>\n<p>Now, press the run button, which obviously runs the code. If you are not using replit, this will not work. You should research how to run a file with your text editor.</p>\n<p>If you look to your left at the console where hello world was just printed, you can see a <code>></code>, <code>>>></code>, or <code>$</code> depending on what you are using. After the prompt, try typing a line of code.</p>\n<pre><code class=\"language-python\">Python 3.6.1 (default, Jun 21 2017, 18:48:35)\n[GCC 4.9.2] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n> print('Testing command line')\nTesting command line\n> print('Are you sure this works?')\nAre you sure this works?\n>\n</code></pre>\n<p>The command line allows you to execute single lines of code at a time. It is often used when trying out a new function or method in the language.</p>\n<p>Another cool thing that you can generally do with all languages, are comments. In python, a comment starts with a <code>#</code>. The computer ignores all text starting after the <code>#</code>.</p>\n<p><em>shortcom.py</em></p>\n<pre><code class=\"language-python\"># Write some comments!\n</code></pre>\n<p>If you have a huge comment, do <strong>not</strong> comment all the 350 lines, just put <code>'''</code> before it, and <code>'''</code> at the end. Technically, this is not a comment but a string, but the computer still ignores it, so we will use it.</p>\n<p><em>longcom.py</em></p>\n<pre><code class=\"language-python\">'''\nDear PYer,\nI am confused about how you said you could use triple quotes to make\nSUPER\nLONG\nCOMMENTS\n!\n\nI am wondering if this is true,\nand if so,\nI am wondering if this is correct.\n\nCould you help me with this?\n\nThanks,\nRandom guy who used your tutorial.\n'''\nprint('Testing')\n</code></pre>\n<p>Unlike many other languages, there is no <code>var</code>, <code>let</code>, or <code>const</code> to declare a variable in python. You simply go <code>name = 'value'</code>.</p>\n<p><em>vars1.py</em></p>\n<pre><code class=\"language-python\">x = 5\ny = 7\nz = x*y # 35\nprint(z) # => 35\n</code></pre>\n<p>Remember, there is a difference between integers and strings. <em>Remember: String = <code>\"\"</code>.</em> To convert between these two, you can put an int in a <code>str()</code> function, and a string in a <code>int()</code> function. There is also a less used one, called a float. Mainly, these are integers with decimals. Change them using the <code>float()</code> command.</p>\n<p><em>vars2.py</em></p>\n<pre><code class=\"language-python\">x = 5\nx = str(x)\nb = '5'\nb = int(b)\nprint('x = ', x, '; b = ', str(b), ';') # => x = 5; b = 5;\n</code></pre>\n<p>Instead of using the <code>,</code> in the print function, you can put a <code>+</code> to combine the variables and string.</p>\n<p>There are many operators in python:</p>\n<ul>\n<li><code>+</code></li>\n<li><code>-</code></li>\n<li><code>/</code></li>\n<li><code>*</code> These operators are the same in most languages, and allow for addition, subtraction, division, and multiplicaiton. Now, we can look at a few more complicated ones:</li>\n<li><code>%</code></li>\n<li><code>//</code></li>\n<li><code>**</code></li>\n<li><code>+=</code></li>\n<li><code>-=</code></li>\n<li><code>/=</code></li>\n<li><code>*=</code> Research these if you want to find out more…</li>\n</ul>\n<p><em>simpleops.py</em></p>\n<pre><code class=\"language-python\">x = 4\na = x + 1\na = x - 1\na = x * 2\na = x / 2\n</code></pre>\n<p>You should already know everything shown above, as it is similar to other languages. If you continue down, you will see more complicated ones.</p>\n<p><em>complexop.py</em></p>\n<pre><code class=\"language-python\">a += 1\na -= 1\na *= 2\na /= 2\n</code></pre>\n<p>The ones above are to edit the current value of the variable.<br>\nSorry to JS users, as there is no <code>i++;</code> or anything.</p>\n<blockquote>\n<p>Fun Fact:<br>\nThe python language was named after Monty Python.</p>\n</blockquote>\n<p>If you really want to know about the others, view <a href=\"https://www.tutorialspoint.com/python/python_basic_operators.htm\">Py Operators</a></p>\n<p>Like the title?<br>\nAnyways, a <code>'</code> and a <code>\"</code> both indicate a string, but <strong>do not combine them!</strong></p>\n<p><em>quotes.py</em></p>\n<pre><code class=\"language-python\">x = 'hello' # Good\nx = \"hello\" # Good\nx = \"hello' # ERRORRR!!!\n</code></pre>\n<p><em>slicing.py</em></p>\n<p><strong>String Slicing</strong></p>\n<p>You can look at only certain parts of the string by slicing it, using <code>[num:num]</code>.<br>\nThe first number stands for how far in you go from the front, and the second stands for how far in you go from the back.</p>\n<pre><code class=\"language-python\">x = 'Hello everybody!'\nx[1] # 'e'\nx[-1] # '!'\nx[5] # ' '\nx[1:] # 'ello everybody!'\nx[:-1] # 'Hello everybod'\nx[2:-3] # 'llo everyb'\n</code></pre>\n<p><strong>Methods and Functions</strong></p>\n<p>Here is a list of functions/methods we will go over:</p>\n<ul>\n<li><code>.strip()</code></li>\n<li><code>len()</code></li>\n<li><code>.lower()</code></li>\n<li><code>.upper()</code></li>\n<li><code>.replace()</code></li>\n<li><code>.split()</code></li>\n</ul>\n<p>I will make you try these out yourself. See if you can figure out how they work.</p>\n<p><em>strings.py</em></p>\n<pre><code class=\"language-python\">x = \" Testing, testing, testing, testing       \"\nprint(x.strip())\nprint(len(x))\nprint(x.lower())\nprint(x.upper())\nprint(x.replace('test', 'runn'))\nprint(x.split(','))\n</code></pre>\n<p>Good luck, see you when you come back!</p>\n<p>Input is a function that gathers input entered from the user in the command line. It takes one optional parameter, which is the users prompt.</p>\n<p><em>inp.py</em></p>\n<pre><code class=\"language-python\">print('Type something: ')\nx = input()\nprint('Here is what you said: ', x)\n</code></pre>\n<p>If you wanted to make it smaller, and look neater to the user, you could do…</p>\n<p><em>inp2.py</em></p>\n<pre><code class=\"language-python\">print('Here is what you said: ', input('Type something: '))\n</code></pre>\n<p>Running:<br>\n<em>inp.py</em></p>\n<pre><code class=\"language-python\">Type something:\nHello World\nHere is what you said: Hello World\n</code></pre>\n<p><em>inp2.py</em></p>\n<pre><code class=\"language-python\">Type something: Hello World\nHere is what you said: Hello World\n</code></pre>\n<p>Python has created a lot of functions that are located in other .py files. You need to import these <strong>modules</strong> to gain access to the,, You may wonder why python did this. The purpose of separate modules is to make python faster. Instead of storing millions and millions of functions, , it only needs a few basic ones. To import a module, you must write <code>input &#x3C;modulename></code>. Do not add the .py extension to the file name. In this example , we will be using a python created module named random.</p>\n<p><em>module.py</em></p>\n<pre><code class=\"language-python\">import random\n</code></pre>\n<p>Now, I have access to all functions in the random.py file. To access a specific function in the module, you would do <code>&#x3C;module>.&#x3C;function></code>. For example:</p>\n<p><em>module2.py</em></p>\n<pre><code class=\"language-python\">import random\nprint(random.randint(3,5)) # Prints a random number between 3 and 5\n</code></pre>\n<blockquote>\n<p>Pro Tip:<br>\nDo <code>from random import randint</code> to not have to do <code>random.randint()</code>, just <code>randint()</code><br>\nTo import all functions from a module, you could do <code>from random import *</code></p>\n</blockquote>\n<p>Loops allow you to repeat code over and over again. This is useful if you want to print Hi with a delay of one second 100 times.</p>\n<p><strong>for Loop</strong></p>\n<p>The for loop goes through a list of variables, making a seperate variable equal one of the list every time.<br>\nLet's say we wanted to create the example above.</p>\n<p><em>loop.py</em></p>\n<pre><code class=\"language-python\">from time import sleep\nfor i in range(100):\n     print('Hello')\n     sleep(.3)\n</code></pre>\n<p>This will print Hello with a .3 second delay 100 times. This is just one way to use it, but it is usually used like this:</p>\n<p><em>loop2.py</em></p>\n<pre><code class=\"language-python\">import time\nfor number in range(100):\n     print(number)\n     time.sleep(.1)\n</code></pre>\n<p><strong>while Loop</strong></p>\n<p>The while loop runs the code while something stays true. You would put <code>while &#x3C;expression></code>. Every time the loop runs, it evaluates if the expression is True. It it is, it runs the code, if not it continues outside of the loop. For example:</p>\n<p><em>while.py</em></p>\n<pre><code class=\"language-python\">while True: # Runs forever\n     print('Hello World!')\n</code></pre>\n<p>Or you could do:</p>\n<p><em>while2.py</em></p>\n<pre><code class=\"language-python\">import random\nposition = '&#x3C;placeholder>'\nwhile position != 1: # will run at least once\n    position = random.randint(1, 10)\n    print(position)\n</code></pre>\n<p>The if statement allows you to check if something is True. If so, it runs the code, if not, it continues on. It is kind of like a while loop, but it executes <strong>only once</strong>. An if statement is written:</p>\n<p><em>if.py</em></p>\n<pre><code class=\"language-python\">import random\nnum = random.randint(1, 10)\nif num == 3:\n     print('num is 3. Hooray!!!')\nif num > 5:\n     print('Num is greater than 5')\nif num == 12:\n     print('Num is 12, which means that there is a problem with the python language, see if you can figure it out. Extra credit if you can figure it out!')\n</code></pre>\n<p>Now, you may think that it would be better if you could make it print only one message. Not as many that are True. You can do that with an <code>elif</code> statement:</p>\n<p><em>elif.py</em></p>\n<pre><code class=\"language-python\">import random\nnum = random.randint(1, 10)\nif num == 3:\n    print('Num is three, this is the only msg you will see.')\nelif num > 2:\n    print('Num is not three, but is greater than 1')\n</code></pre>\n<p>Now, you may wonder how to run code if none work. Well, there is a simple statement called <code>else:</code></p>\n<p><em>else.py</em></p>\n<pre><code class=\"language-python\">import random\nnum = random.randint(1, 10)\nif num == 3:\n    print('Num is three, this is the only msg you will see.')\nelif num > 2:\n    print('Num is not three, but is greater than 1')\nelse:\n    print('No category')\n</code></pre>\n<p>So far, you have only seen how to use functions other people have made. Let use the example that you want to print the a random number between 1 and 9, and print different text every time.<br>\nIt is quite tiring to type:</p>\n<p>Characters: 389</p>\n<p><em>nofunc.py</em></p>\n<pre><code class=\"language-python\">import random\nprint(random.randint(1, 9))\nprint('Wow that was interesting.')\nprint(random.randint(1, 9))\nprint('Look at the number above ^')\nprint(random.randint(1, 9))\nprint('All of these have been interesting numbers.')\nprint(random.randint(1, 9))\nprint(\"these random.randint's are getting annoying to type\")\nprint(random.randint(1, 9))\nprint('Hi')\nprint(random.randint(1, 9))\nprint('j')\n</code></pre>\n<p>Now with functions, you can seriously lower the amount of characters:</p>\n<p>Characters: 254</p>\n<p><em>functions.py</em></p>\n<pre><code class=\"language-python\">import random\ndef r(t):\n     print(random.randint(1, 9))\n     print(t)\nr('Wow that was interesting.')\nr('Look at the number above ^')\nr('All of these have been interesting numbers.')\nr(\"these random.randint's are getting annoying to type\")\nr('Hi')\nr('j')\n</code></pre>\n<h4>Chapter 01 - Getting Ready with Python</h4>\n<p><strong>Installing Python 3, And Launching Python Shell</strong></p>\n<p>This video should help you get up and running with Python 3</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=Ji1WW4Suaww\">Installing Python 3 and Launch Python Shell</a></li>\n</ul>\n<p>Installing Python is really a cakewalk. Search for “Python download” on <a href=\"http://www.google.com/\">www.google.com</a>. Download the installable and install it.</p>\n<p>A quick word of caution on Windows</p>\n<ul>\n<li>Make sure that you have the check-box “Add Python 3.6 to PATH”, checked.</li>\n</ul>\n<p>Once you have installed Python, you can launch the Python Shell.</p>\n<ul>\n<li>Windows - Launch cmd prompt by typing in 'cmd' command.</li>\n<li>Mac or Linux - Launch up terminal.</li>\n</ul>\n<p>Command to launch Python 3 is different in Mac.</p>\n<ul>\n<li>In Mac, type in <code>python3</code></li>\n<li>In other operating systems, including windows, type <code>python</code></li>\n</ul>\n<p>You can type code in python shell and code as well!</p>\n<p>You can use <code>print(5*4)</code>, and it shows <code>20</code>.</p>\n<p>You can execute the code, and the shell would immediately give you output.</p>\n<p>Using the the Python Shell is an awesome way to learn Python.</p>\n<h4>Chapter 02 - Introduction To Python Programming</h4>\n<p>Most programmers find programming a lot of fun, and besides, it also gets their work done.</p>\n<p>Programming mainly involves <em>problem solving</em>, where one makes use of a computer to solve a real world problem.</p>\n<p>During our journey here, we will approach programming in a very different way. We will not only introduce you to the Python language, but also help you pick up essential problem solving skills.</p>\n<p>As a programmer, you need to be able to look at a problem, and identify the important programming concepts relevant to solving it. Finally, you need to be able to use the language features and syntax, to express your solution on the computer. While all this looks complex, we want to make it easy for you. Together, we will tackle a variety of programming challenges, using these same steps. We will start with simple challenges (such as a Multiplication Table), and gradually increase the difficulty level over the duration of this book.</p>\n<p>Learning to program is a lot like learning to ride a bicycle. The first few steps are the most challenging ones.</p>\n<p>Once you get over these initial steps, your experience will become more and more enjoyable.</p>\n<p>Are you ready for your first programming challenge? Let's get going now! We wish you all the best.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the concept of problem solving</li>\n<li>Understood how good programmers approach problem solving</li>\n</ul>\n<p><strong>Step 01: Our First Programming Challenge</strong></p>\n<p>Our first <em>programming challenge</em> aims to do, what every kid does in math class: read out a multiplication table. We now want to give this task to the computer. Here is the statement of our problem:</p>\n<p><strong>The Print Multiplication Table Challenge (PMT-Challenge)</strong></p>\n<ol>\n<li>Compute the multiplication table for <code>5</code>, with entries from <code>1</code> to <code>10</code>.</li>\n<li>Display this table.</li>\n</ol>\n<p>The display needs to be:</p>\n<p><em><strong>5 * 1 = 5</strong></em></p>\n<p><em><strong>5 * 2 = 10</strong></em></p>\n<p><em><strong>5 * 3 = 15</strong></em></p>\n<p><em><strong>5 * 4 = 20</strong></em></p>\n<p><em><strong>5 * 5 = 25</strong></em></p>\n<p><em><strong>5 * 6 = 30</strong></em></p>\n<p><em><strong>5 * 7 = 35</strong></em></p>\n<p><em><strong>5 * 8 = 40</strong></em></p>\n<p><em><strong>5 * 9 = 45</strong></em></p>\n<p><em><strong>5 * 10 = 50</strong></em></p>\n<p>This is the challenge. For convenience, let's give it a label, say <em>PMT-Challenge</em>. What would be the important concepts we need to learn, to solve this challenge? The following list of concepts would be a good starting point:</p>\n<ul>\n<li><strong>Statements</strong></li>\n<li><strong>Expressions</strong></li>\n<li><strong>Variables</strong></li>\n<li><strong>Literals</strong></li>\n<li><strong>Conditionals</strong></li>\n<li><strong>Loops</strong></li>\n<li><strong>Methods</strong></li>\n</ul>\n<p>In the rest of this chapter, we will introduce these concepts to you, one-by-one. We will also show you how learning each concept, takes us closer to a solution to <em>PMT-Challenge</em>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Stated our first programming challenge</li>\n<li>Identified what programming concepts we need to learn, to solve this challenge</li>\n</ul>\n<p><strong>Step 02: Breaking Down PMT-Challenge</strong></p>\n<p>Typically when we do programming, we have problems. Solving the problem typically need a step-by -step approach. Common sense tells us that to solve a complex problem, we break it into smaller parts, and solve each part one by one. Here is how any good programmer worth her salt, would solve a problem:</p>\n<ul>\n<li>Simplify the problem, by breaking it into sub-problems</li>\n<li>Solve the sub-problems in stages (in some order), using the language</li>\n<li>Combine these solutions to get a final solution</li>\n</ul>\n<p>The <em>PMT-Challenge</em> is no different! Now how do we break it down, and where do we really start? Once again, your common sense will reveal a solution. As a first step, we could get the computer to calculate say, <code>5 * 3</code>. The second thing we can do, is to try and print the calculated value, in a manner similar to <code>5 * 3 = 15</code>. Then, we could repeat what we just did, to print out all the entries of the <code>5</code> multiplication table. Let's put it down a little more formally:</p>\n<p>Here is how our draft steps look like</p>\n<ul>\n<li>Calculate <code>5 * 3</code> and print result as <code>15</code></li>\n<li>Print <code>5 * 3 = 15</code> (<code>15</code> is result of previous calculation)</li>\n<li>Do this ten times, once for each table entry (going from <code>1</code> to <code>10</code>)</li>\n</ul>\n<p>Let's start with that kind of a game plan, and see where it takes us.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned that breaking down a problem into sub-problems is a great help</li>\n<li>Found a way to break down the <em>PMT-Challenge</em> problem</li>\n</ul>\n<p><strong>Step 03: Introducing Operators And Expressions</strong></p>\n<p>Let's focus on solving the first sub-problem of <em>PMT-Challenge</em>, the numeric computation. We want the computer to calculate <code>5 * 5</code> for example, and print <code>25</code> for us. How do we get it to do that? That's what we would be looking at in this step.</p>\n<p><strong>Snippet-01: Introducing Operators</strong></p>\n<p>Launch up Python shell. We want to calculate <code>5 * 5</code>. How do we do that?</p>\n<p>Using our knowledge of school math, let's try <code>5 X 5</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 X 5\n    File \"&#x3C; stdin >\", line 1\n    5 X 5\n      ^\n    SyntaxError: invalid syntax\n</code></pre>\n<p>The Python Shell hits back at us, saying “<em>invalid syntax</em>”. This is how Python complains, when it doesn't fully understand the code you type in. Here, it says our code has a “<strong>SyntaxError</strong>”.</p>\n<p>The reason why it complains, is because '<code>X</code>' is not a valid <strong>operator</strong> in Python.</p>\n<p>The way you can do multiplication is by using the '<code>*</code>' <em>operator</em> .</p>\n<p>“<em>5 into 5</em>” is achieved by the code <code>5 * 5</code>, and you can see the result <code>25</code> being printed. Similarly, <code>5 * 6</code> gives us <code>30</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 * 6\n    30\n</code></pre>\n<p>There are a wide range of other operators in Python:</p>\n<ul>\n<li><code>5 + 6</code> gives a result of <code>11</code>.</li>\n<li>\n<p><code>5 - 6</code> leads to <code>-1</code>.</p>\n<pre><code class=\"language-python\">>>> 5 + 6\n11\n>>> 5 - 6\n-1\n</code></pre>\n</li>\n</ul>\n<p><code>10 / 2</code>, gives an output of <code>5.0</code> . There is one interesting operator, <code>**</code>. Let's try <code>10 ** 3</code>. We ran this code, and the result we get is <code>1000</code>. Yes you guessed right, the operator performs “to the power of”. “<code>10</code> to the power of <code>3</code>” is <code>10 * 10 * 10</code>, or <code>1000</code>.</p>\n<pre><code class=\"language-python\">    >>> 10 / 2\n    5.0\n    >>> 10 ** 3\n    1000\n</code></pre>\n<p>Another interesting operator is <code>%</code>, called “<em>modulo</em>”, which computes the remainder on integer division. If we do <code>10 % 3</code>, what is the remainder when <code>10</code> is divided by <code>3</code>? <code>3 * 3</code> is <code>9</code>, and <code>10 - 9</code> is <code>1</code>, which is what <code>%</code> returns in this case.</p>\n<p>Let's look at some terminology:</p>\n<ul>\n<li>Whatever pieces of code we gave Python shell to run, are called <strong>expressions</strong>. So, <code>5 * 5</code>, <code>5 * 6</code> and <code>5 - 6</code> are all <em>expressions</em>. An expression is composed of <em>operators</em> and <strong>operands</strong>.</li>\n<li>In the expression <code>5 * 6</code>, the two values <code>5</code> and <code>6</code> are called operands, and the <code>*</code> operator <em>operates</em> on them.</li>\n<li>The values <code>5</code> and <code>6</code> are <strong>literals</strong>, because those are constants which cannot be changed.</li>\n</ul>\n<p>The cool thing about Python, is that you can even have expressions with multiple operators. Therefore, you can form an expression with <code>5 + 5 + 5</code>, which evaluates to <code>15</code>. This is an expression which has three operands, and two <code>+</code> operators. You can even have expressions with different types of operators, such as in <code>5 + 5 * 5</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 + 5 + 5\n    15\n    >>> 5 + 5 * 5\n    30\n</code></pre>\n<p>Try and play around with the expressions, and understand the output which results.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to give code input to the Python Shell</li>\n<li>Understood that Python has a predefined set of operators</li>\n<li>Used a few types of basic operators and their operands, to form expressions</li>\n</ul>\n<p><strong>Step 04: Programming Exercise IN-PE-01</strong></p>\n<p>At this stage, your smile tells us that you enjoy evaluating Python expressions. What if we tickle your mind a bit, to make sure it hasn't fallen asleep? Here is your first programming exercise.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write an expression to calculate the number of minutes in a day.</li>\n<li>Write an expression to calculate the number of seconds in a day.</li>\n</ol>\n<p><strong>Note</strong></p>\n<p>You need to solve these problems by yourself. If you are able to work them out, that's fantastic! But if not, that's part of the learning process.</p>\n<p><strong>Solutions</strong></p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>> 24 * 60\n\n    1440\n</code></pre>\n<p>We wanted to calculate the number of minutes in a day. How do we do that? Think about this…</p>\n<ul>\n<li>How many number of hours are there in a day? <code>24</code>.</li>\n<li>And how many minutes does each hour have? It's <code>60</code>.</li>\n<li>So if you want to find out the number of minutes in a day, it's <code>24 * 60</code>, which is <code>1440</code>.</li>\n</ul>\n<p><strong>Solution 2</strong></p>\n<pre><code class=\"language-python\">    >>> 24 * 60 * 60\n\n    86400\n</code></pre>\n<p>How many seconds are there in a day?</p>\n<ul>\n<li>Let's start with the number of hours, <code>24</code>.</li>\n<li>The number of minutes in an hour is <code>60</code>, and</li>\n<li>The number of seconds in a minute is <code>60</code> as well.</li>\n<li>So it's <code>24 * 60 * 60</code>, or <code>86400</code>.</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Solved a Programming Exercise involving common scenarios, using Python code involving:</p>\n<ul>\n<li>Expressions</li>\n<li>Operators</li>\n<li>Literals</li>\n</ul>\n</li>\n</ul>\n<p><strong>Step 05: Puzzles On Expressions</strong></p>\n<p>Let's look at a few puzzles related to expressions, in this step. Before that, let's revise some of the terminology we had learned earlier.</p>\n<p><code>5 + 6 + 10</code> is an example of an expression. In this expression, <code>5</code>, <code>6</code> and <code>10</code> are operands. The <code>+</code> here is the operator. You can have multiple operators in an expression. We also did mention that the operands, namely <code>10</code>, <code>6</code> and <code>5</code>, are literals. Their values will not change.</p>\n<p>Here are a few puzzles coming up, to explore aspects of expressions.</p>\n<p><strong>Snippet-01: Puzzles On Expressions</strong></p>\n<p>Think about what would happen when you do something of this kind: <code>5 $ 2</code>. You're right, it would throw a <code>SyntaxError</code>. When Python does not understand the code you type in, it reports an error. Here, the expression we're typing is <code>5 $ 2</code>, which does not make sense to Python, hence the <code>SyntaxError</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 $ 2\n    File \"&#x3C; stdin >\", line 1\n    5 $ 2\n    ^\n    SyntaxError: invalid syntax\n    >>> 5$2\n    File \"&#x3C; stdin >\", line 1\n    5 $ 2\n    ^\n    SyntaxError: invalid syntax\n</code></pre>\n<p>Let's say we type in <code>5+6+10</code>, without any spaces between the operands, and the operators. What do you think will happen? Surprisingly, the Python Shell does calculate the value!</p>\n<pre><code class=\"language-python\">    >>> 5+6+10\n    21\n</code></pre>\n<p>In an expression, using spaces makes it easier for you to read it, but it's not mandatory. <code>5 + 6 + 10</code> is easier to read than <code>5+6+10</code>, but does not make any difference to the Python compiler.</p>\n<p>The next puzzle tries to evaluate <code>5 / 2</code>, which is “<code>5</code> divided by <code>2</code>”. What would be the output? <code>2.5</code>.</p>\n<pre><code class=\"language-python\">    >>> 5/2\n    2.5\n</code></pre>\n<p>If you're coming from other programming languages like Java or C, this might be a surprising result. If you try this in Java for instance, you would get <code>2</code> as the output. Note that even though both operands are integers, the result of the <code>/</code> operation is a floating point value, <code>2.5</code> . Python does what is expected by a programmer!</p>\n<p>The puzzle after that tries to play with <code>5 + 5 * 6</code>. What would be the result of this expression? Will it be <code>5 + 5</code> or <code>10</code>, then <code>10 * 6</code>, which is <code>60</code>? Or, will it be <code>5</code> plus <code>5 * 6</code>, which is <code>5</code> + <code>30</code>, that's <code>35</code>?</p>\n<pre><code class=\"language-python\">    >>> 5 + 5 * 6\n    35\n</code></pre>\n<p>The correct result is <code>35</code>.</p>\n<p>Python decides this is based on the <strong>precedence</strong> of operators.</p>\n<p>Operators in Python are divided into two sets as follows:</p>\n<ul>\n<li><code>**</code>, <code>*</code>, <code>/</code> and <code>%</code> have higher precedence, or priority.</li>\n<li><code>+</code> and <code>-</code> have a lower precedence.</li>\n</ul>\n<p>Sub-expressions involving operators from {<code>*</code>, <code>/</code>, <code>%</code>, <code>**</code>} are evaluated before those involving operators from {<code>+</code>, <code>-</code>}</p>\n<p>Let's try another small puzzle on precedence, with <code>5 - 2 * 2</code>. What would be the result of this? Will it be <code>6</code>, or <code>1</code>? It's <code>1</code>, because <code>*</code> has a higher precedence than <code>-</code>. Thus <code>2 * 2</code> is <code>4</code>, and <code>5 - 4</code> gives us <code>1</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 - 2 * 2\n    1\n</code></pre>\n<p>Let's say we want to execute <code>5 - 2</code>, to give an output of <code>2</code>. How do we change the operator precedence?</p>\n<p>You cannot really change the precedence, but you can add parentheses to group sub-expressions differently.</p>\n<pre><code class=\"language-python\">    >>> (5 - 2) * 2\n    6\n    >>> 5 - ( 2 * 2 )\n    1\n</code></pre>\n<p>Parentheses have the highest precedence in Python, and can be used to override operator precedence. <code>(5 - 2)</code> gets calculated first, and the final result of the expression is <code>6</code>.</p>\n<p>A positive thing about using parentheses is, that it makes expressions more readable. So even in situations such as <code>5 - 2 * 2</code>, where we know the result according to precedence, adding parentheses is good.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we went about solving a few puzzles about expressions, touching concepts such as:</p>\n<ul>\n<li><code>SyntaxError</code> for incorrect operators</li>\n<li>White-space in expressions</li>\n<li>Floating Point division by default</li>\n<li>Operator Precedence</li>\n<li>Using parentheses</li>\n</ul>\n<p><strong>Step 06: Printing Text</strong></p>\n<p>In the previous step, we learned how to use expressions to compute values. In this step, let's see how we can actually print multiplication table entries, that are readable by the user.</p>\n<p><strong>Snippet-01: Printing Text</strong></p>\n<p>How do we go about printing a complete multiplication table entry? We want to print text such as <code>5 * 6 = 30</code> . But trying to do so, as we know it, gives us a <code>SyntaxError</code>. Clearly, there is a different way to print text, as compared to an expression.</p>\n<pre><code class=\"language-python\">    >>> 5 * 6 = 30\n      File \"&#x3C;stdin>\", line 1\n    SyntaxError: can't assign to operator\n</code></pre>\n<p>Let's first try to print a simple piece of text, <code>Hello</code>. Typing in this piece of code directly on Python Shell also gives us an error.</p>\n<pre><code class=\"language-python\">    >>> Hello\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'Hello' is not defined\n</code></pre>\n<p>Only expressions work that way, and <code>Hello</code> is not really an expression.</p>\n<p><code>\"Hello\"</code> is typically called a <strong>string</strong>, and represents the text of letters <code>'H'</code>, <code>'e'</code>, <code>'l'</code>, <code>'l'</code>, <code>'o'</code>. <code>\"Hello\"</code> is hence different from the number <code>5</code>.</p>\n<p>There are a number of in-built functions in Python to help print strings. One of these is the <code>print()</code> function. Can you just say <code>print Hello</code>?</p>\n<pre><code class=\"language-python\">    >>> print Hello\n      File \"&#x3C;stdin>\", line 1\n        print Hello\n                  ^\n    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(Hello)?\n</code></pre>\n<p>The Python compiler gives you an error, that says “missing parentheses”.</p>\n<p>Will <code>print(Hello)</code> work?</p>\n<pre><code class=\"language-python\">    >>> print (Hello)\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'Hello' is not defined\n</code></pre>\n<p>Nope! Again, this one failed because you need to indicate that <code>\"Hello\"</code> is a string.</p>\n<p>How do I indicate that <code>\"Hello\"</code> is a string? By putting it within double quotes.</p>\n<p>Let's try <code>print (\"Hello\")</code></p>\n<pre><code class=\"language-python\">    >>> print (\"Hello\")\n    Hello\n    >>> print(\"Hello\")\n    Hello\n</code></pre>\n<p><code>print(\"Hello\")</code> finally results in <code>\"Hello\"</code> being printed out. To be able to print <code>\"Hello\"</code>, the things we need to do are:</p>\n<ul>\n<li>Typing the method name print ,</li>\n<li>open parentheses ( ,</li>\n<li>Followed by a double quote \" ,</li>\n<li>The text Hello,</li>\n<li>and another double quote \" ,</li>\n<li>finished off with a closed parentheses ).</li>\n</ul>\n<p>What we have written here is called a <strong>statement</strong>, a simple piece of code to execute. As part of this statement, we are <strong>calling</strong> a <strong>function</strong>, named <code>print()</code>.</p>\n<p>What exactly are we trying to print?</p>\n<p>The text <code>\"Hello\"</code>, which is called a <strong>parameter</strong> or <strong>argument</strong>, to <code>print()</code>.</p>\n<p>Now let's get back to what we wanted to do, which is to print <code>5 * 6 = 30</code>. The most basic version would be something of this kind, <code>print(\"5 * 6 = 30\")</code>. Here, we are passing the entire value in the form of a string.</p>\n<pre><code class=\"language-python\">    >>> print(\"5 * 6 = 30\")\n    5 * 6 = 30\n</code></pre>\n<p>This prints the text on the console, as-is. The thing you need to understand here is, we aren't really calculating <code>30</code> using the formula <code>5 * 6</code>, but directly putting text <code>30</code> in here. That's called <strong>hard-coding</strong>.</p>\n<p>In a later step, we will look at how to actually calculate the value and pass it in.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Understood that displaying text on the console is not the same as printing an expression value</li>\n<li>Learned about the <code>print()</code> function, that is used to print text in Python.</li>\n<li>Found a way to print the text <code>\"5 * 6 = 30\"</code> on the console, by hard-coding values in a string</li>\n</ul>\n<p><strong>Step 07: Puzzles On Utility Methods, And Strings</strong></p>\n<p>In the previous step, we learned how to print <code>5 * 6 = 30</code>. It was not a perfect solution, because we hard-coded everything. we used an in-built function named <code>print()</code>, passed a string to it, and invoked the method.</p>\n<p>In this step, let's look at a number of puzzles related to in-built methods, their parameters, and strings in general.</p>\n<p>For example, let's do <code>print(\"5 * 6\")</code>, as in the previous step. What does this code result in?</p>\n<pre><code class=\"language-python\">    >>> print(\"5*6\")\n    5*6\n    >>> print('5*6')\n    5*6\n</code></pre>\n<p>It just prints the string <code>\"5 * 6\"</code>.</p>\n<p>Let's say we try the code <code>print(5 * 6)</code>,</p>\n<pre><code class=\"language-python\">    >>> print(5*6)\n    30\n</code></pre>\n<p>Without the double quotes, <code>5 * 6</code> is an expression. What will be the output? <code>30</code>.</p>\n<p>If you call <code>print()</code> with an expression argument, it prints the value of the expression. However, when we pass something within double quotes, it becomes a piece of text, printed as-is.</p>\n<p>An interesting thing to note is, that in Python you can use either double-quotes (<code>\"</code> and <code>\"</code>), or single-quotes (<code>'</code> and <code>'</code>) with text values.</p>\n<p>Let's look at a few other in-built methods within Python.</p>\n<p>Consider <code>abs()</code> (which stands for absolute value), a method that accepts a numeric value. You can use <code>abs(10.5)</code>, passing <code>10.5</code> as a value to it, and it prints the absolute value of <code>10</code>.</p>\n<pre><code class=\"language-python\">    >>> abs 10.5\n      File \"&#x3C;stdin>\", line 1\n        abs 10.5\n               ^\n    SyntaxError: invalid syntax\n    >>> abs(10.5)\n    10.5\n</code></pre>\n<p>If you pass in a string value, will it work? It complains, “<code>abs()</code> function will not work with a string, it only works with numeric values”.</p>\n<pre><code class=\"language-python\">    >>> abs(\"10.5\")\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    TypeError: bad operand type for abs(): 'str'\n</code></pre>\n<p>Let's say you want to use a function that computes “to the power of”, for instance “<code>2</code> to the power of <code>5</code>”. In Python, there's an in-built function named <code>pow()</code>, which does just what we need. To <code>pow()</code>, you can pass two parameters and calculate the result. How do you do that?</p>\n<p>Will this work: <code>pow 2 5</code>? No, not at all. This code does not work as well: <code>pow(2 5)</code>. <code>pow(2, 5)</code> is the correct syntax.</p>\n<pre><code class=\"language-python\">    >>> pow 2 5\n      File \"&#x3C;stdin>\", line 1\n        pow 2 5\n            ^\n    SyntaxError: invalid syntax\n    >>> pow(2 5)\n      File \"&#x3C;stdin>\", line 1\n        pow(2 5)\n              ^\n    SyntaxError: invalid syntax\n    >>> pow(2, 5)\n    32\n</code></pre>\n<p>You'll see that <code>32</code> is printed.</p>\n<p>Let's see another example, “<code>10</code> to the power of <code>3</code>”. <code>pow(10,3)</code> is the alternative to saying <code>10 ** 3</code>. This gives us <code>1000</code>, similar to how <code>pow()</code> would.</p>\n<pre><code class=\"language-python\">    >>> pow(10, 3)\n    1000\n    >>> 10 ** 3\n    1000\n</code></pre>\n<p><code>max()</code> returns maximum in a set of numbers.<code>min()</code> function returns the minimum value.</p>\n<pre><code class=\"language-python\">    >>> max(34, 45, 67)\n    67\n    >>> min(34, 45, 67)\n    34\n</code></pre>\n<p>These are some of the in-built functions in Python, and we saw how to call the in-built functions by passing in a varied number of parameters.</p>\n<p>Python is case sensitive. So let's say I want of calculate <code>pow(2,5)</code>. So this would give me <code>32</code>. Now, what if I say capital <code>'P'</code> instead of small <code>'p'</code> here? <code>Pow(2,5)</code> would lead to an error.</p>\n<pre><code class=\"language-python\">    >>> pow(2,5)\n    32\n    >>> Pow(2,5)\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'Pow' is not defined\n</code></pre>\n<p>The only things not case-sensitive in Python, are string values. Earlier we saw that the code <code>print(\"Hello\")</code> displays the text <code>\"Hello\"</code>. Inside a string, the text can be in any case. Hence, <code>print(\"hello\")</code> displays <code>\"hello\"</code> ,with a small <code>'h'</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\")\n    Hello\n    >>> print(\"hello\")\n    hello\n    >>> print(\"hellO\")\n    hellO\n    >>> print ( \"hellO\" )\n    hellO\n</code></pre>\n<p>However inside your code, you need to be very particular about the case of function names, class names, variable names, and the like.</p>\n<p>In your code, whitespace does not really matter. You can add space here and here, and you would still get the same output. However, in case of strings, whitespace does matter.</p>\n<p>If we say <code>print(\"hellO World\")</code>, it would print <code>\"hellO World\"</code>, with a space in between. And if you do <code>print(\"hellO World\")</code> with three spaces, it would print the same. In expressions, white-space does not affect the output.</p>\n<pre><code class=\"language-python\">    >>> print ( \"hellO World\" )\n    hellO World\n    >>> print ( \"hellO     World\" )\n    hellO     World\n</code></pre>\n<p>The last thing we want to look at, is an <strong>escape sequence</strong>. Let's say you want to print a double quote, <code>\"</code>, in the code. If we were to do this: <code>print(\"Hello\"\")</code>, what would happen? The compiler says error!</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\"\")\n      File \"&#x3C;stdin>\", line 1\n        print(\"Hello\"\")\n                      ^\n    SyntaxError: EOL while scanning string literal\n</code></pre>\n<p>If you want to print a <code>\"</code> inside a string, use an escape sequence. In Python, the symbol <code>'\\'</code> is used as an <strong>escape character</strong>. On using <code>'\\'</code> adjacent to the <code>\"</code>, it prints <code>Hello\"</code> (notice the trailing <code>\"</code>). We have used the <code>'\\'</code> to <strong>escape</strong> the <code>\"</code>, by forming an <em>escape sequence</em> <code>\\\"</code>.</p>\n<pre><code class=\"language-python\">>>> print(\"Hello\\\"\")\nHello\"\n>>>\n</code></pre>\n<p>The other reason why you would want to use a <code>'\\'</code> is to print a <code>&#x3C;NEWLINE></code>. If you want to print <code>\"Hello World\"</code>, but with <code>\"Hello\"</code> on one line and <code>\"World\"</code> on the next, <code>'\\n'</code> is the escape sequence to use.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\\nWorld\")\n    Hello\n    World\n</code></pre>\n<p>The other important escape sequence is <code>'\\t'</code>, which prints a <code>&#x3C;TAB></code> in the output. When you do <code>print(\"Hello\\tWorld\")</code>, you can see the tab-space between <code>\"Hello\"</code> and <code>\"World\"</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\\tWorld\")\n    Hello   World\n</code></pre>\n<p>Another useful escape sequence is <code>\\\\</code> . If you want to print a <code>\\</code> , then use the sequence <code>\\\\</code> . You would see that it prints <code>Hello\\World</code> . Think about what would happen if we put six <code>\\</code> . Yes you're right! It would print this string: <code>\"\\\\\\\"</code> .</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello\\\\World\")\n    Hello\\World\n    >>> print(\"Hello\\\\\\\\\\\\World\")\n    Hello\\\\\\World\n</code></pre>\n<p>One of the things with Python is, it does not matter whether you use double quotes or single quotes to enclose strings. There are some interesting, and useful ways of using a combination of both, within the same string. Have a look at this call: <code>print(\"Hello'World\")</code>, and notice the output we get. In a similar way, the following code will be accepted and run by the Python system: <code>print('Hello\"World')</code>.</p>\n<pre><code class=\"language-python\">    >>> print('Hello\"')\n    Hello\"\n    >>> print(\"Hello'World\")\n    Hello'World\n    >>> print(\"Hello\\\"World\")\n    Hello\"World\n    >>> print(\"Hello\\\"World\")\n    Hello\"World\n</code></pre>\n<p>The above two examples can be used as a tip by newbie programmers when they form string literals, and want to use them in their code:</p>\n<ul>\n<li>If the string literal contains one or more single quotes, then you can use double quotes to enclose it.</li>\n<li>However if the string contains one or more double quotes, then prefer to use single quotes to enclose it.</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Explored a number of puzzles related to code involving:</p>\n<ul>\n<li>Built-in functions for numeric calculations</li>\n<li>The <code>print()</code> function to display expressions and strings</li>\n</ul>\n</li>\n<li>\n<p>Covered the following aspects of the above utilities:</p>\n<ul>\n<li>Case-sensitive aspects of names and strings</li>\n<li>The role played by whitespace</li>\n<li>The escape character, and common escape sequences</li>\n</ul>\n</li>\n</ul>\n<p><strong>Step 08: Formatted Output With print()</strong></p>\n<p>In the previous step, we learned how to print a hard-coded string, such as <code>\"5 * 6 = 30\"</code>.</p>\n<p>In this step, let's try to replace the hard-coded <code>30</code> with a computed value.</p>\n<p>Let's start with a simple scenario. Let's say we want to place that calculated value within a string, and display it. How do we do that?</p>\n<p><strong>Snippet-01: print() Formatted Output</strong></p>\n<p><code>format()</code> method can be used to print formatted text.</p>\n<p>Let's see an example:</p>\n<pre><code class=\"language-python\">    >>> print(\"VALUE\".format(5*2))\n    VALUE\n</code></pre>\n<p>We were expecting <code>10</code> to be printed, but it's actually printing <code>VALUE</code>.</p>\n<p>How do we get <code>10</code> to be printed then?</p>\n<pre><code class=\"language-python\">    >>> print(\"VALUE {0}\".format(5*2))\n    VALUE 10\n</code></pre>\n<p>By having an open brace <code>{</code>, closed brace <code>}</code>, and and by putting the index of the value between them. Here, the value is the first parameter, and it's index will be <code>0</code>.</p>\n<p><code>\"VALUE {0}\"</code> is what we need.</p>\n<p>Let's take another example. Suppose to the <code>format()</code> function, we pass three values: <code>10</code>, <code>20</code> and <code>30</code>.</p>\n<p>Typically when we count positions or indexes, we start from <code>0</code>.</p>\n<p>To print the first value, you need to pass in an index of <code>0</code>. To print the second value, pass an index of <code>1</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"VALUE {0}\".format(10,20,30))\n    VALUE 10\n    >>> print(\"VALUE {1}\".format(10,20,30))\n    VALUE 20\n    >>> print(\"VALUE {2}\".format(10,20,30))\n    VALUE 30\n</code></pre>\n<p>Now going back to our problem, we wanted to display <code>\"5 * 6 = 30\"</code>, but without hard-coding. Instead of <code>30</code>, we want the calculated value of <code>5 * 6</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"5 * 6 = 30\".format(5,6,5*6))\n    5 * 6 = 30\n</code></pre>\n<p>Let replace <code>\"5 * 6 = 30\"</code> with <code>\"5 * 6 = {2}\"</code>. <code>2</code> is the index of parameter value <code>5*6</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"5 * 6 = {2}\".format(5,6,5*6))\n    5 * 6 = 30\n</code></pre>\n<p>Cool! Progress made.</p>\n<p>Let's replace <code>5 * 6</code> with the right indices - <code>{0} * {1}</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,6,5*6))\n    5 * 6 = 30\n</code></pre>\n<p>The great thing about this, is now we can replace the values we passed to <code>print()</code> in the first place, without changing the indexes! So, we can display results for <code>5 * 7 = 35</code> and <code>5 * 8 = 40</code>. We are now able to print <code>5 * 6 = 30</code>, <code>5 * 7 = 35</code>, <code>5 * 8 = 40</code>, and can do similar things for other table entries as well.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,7,5*7))\n    5 * 7 = 35\n    >>> print(\"{0} * {1} = {2}\".format(5,8,5*8))\n    5 * 8 = 40\n    >>> print(\"{0} * {1} = {2}\".format(5,8,5*8))\n    5 * 8 = 40\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Discovered that Python provides a way to do formatted printing of string values</li>\n<li>Looked at the <code>format()</code> function, and saw how to call it within <code>print()</code></li>\n<li>Observed how we could work only with the indexes of parameters to <code>format()</code>, and change the parameters we pass without changing the code</li>\n</ul>\n<p><strong>Step 09: Puzzles On format() and print()</strong></p>\n<p>In this step, let's look at a few puzzles related to the format, and the print methods.</p>\n<p><strong>Snippet-01: format() And print() Puzzles</strong></p>\n<p>Let's say we pass in additional values, such as: <code>5 * 8</code>, <code>5 * 9</code> and <code>5 * 10</code>. However, within the call to <code>format()</code>, we are only referring to the values at index <code>0</code>, index <code>1</code> and index <code>2</code>. The values at indexes <code>3</code> and <code>4</code> are not used at all. What would happen when we run the code?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,8,5*8,5*9,5*10))\n    5 * 8 = 40\n</code></pre>\n<p>Would this throw an error? No, it does not. You can see that the additional values which are passed in, are conveniently ignored.</p>\n<p>Let's say instead of passing in a value of <code>2</code>, we pass <code>4</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {4}\".format(5,8,5*8,5*9,5*10))\n    5 * 8 = 50\n</code></pre>\n<p><code>5 * 10</code> is the value at index <code>4</code></p>\n<p>Now let's take a different scenario. We remove all the parameters passed to <code>format()</code>. However, inside the call to <code>print()</code>, we continue to say <code>{0} * {1} = {4}</code>. So we are trying to print the value at index <code>4</code>, but are only passing two values to the function <code>format()</code>. What do you think will happen?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {4}\".format(5,8))\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    IndexError: tuple index out of range\n</code></pre>\n<p>It says <code>IndexError</code>, which means :“you are asking me to fetch the value at index <code>4</code>, but only passing in two values. How can I do what you want?”</p>\n<p>Let's look at a few more things related to other data types. We try to format the following inside <code>print()</code>: <code>{0} * {1} = {2}</code>, and would pass in <code>2.5</code>, <code>2</code>, and <code>2.5 * 2</code> . Here, <code>2</code> is an integer value, but <code>2.5</code> is a floating point value. You can see that it prints <code>2.5 * 2 = 5.0</code>. So this approach of formatting values with <code>print()</code>, works also with floating point data as well.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(2.5,2,2.5*2))\n    2.5 * 2 = 5.0\n</code></pre>\n<p>Now, are there are other types of data that <code>format()</code> works with? Yes, strings can join the party.</p>\n<p>Let's say over here, we do: <code>print(\"My name is {0}\".format(\"Ranga\"))</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> print(\"My name is {0}\".format(\"Ranga\"))\n    My name is Ranga\n</code></pre>\n<p>Index <code>0</code> will be replaced with the first parameter to <code>format()</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Understood the behavior when the parameters passed to <code>format()</code>:</p>\n<ul>\n<li>Exceed the indexes accessed by <code>print()</code></li>\n<li>Are less than the indexes accessed by <code>print()</code></li>\n<li>Are of type integer, floating-point or string</li>\n</ul>\n</li>\n</ul>\n<p><strong>Step 10: Introducing Variables</strong></p>\n<p>We are slowly making progress toward our main goal, which is to print the <code>5</code> multiplication table.</p>\n<p>In the first statement, we are printing <code>5 * 1 = 5</code>, and then changing the literals. To make it print <code>5 * 2 = 10</code>, we are changing <code>1</code> to <code>2</code>. Next, we are changing <code>2</code> to <code>3</code>. How do we make it a little simpler, so that our effort is reduced?</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,1,5*1))\n    5 * 1 = 5\n    >>> print(\"{0} * {1} = {2}\".format(5,2,5*2))\n    5 * 2 = 10\n    >>> print(\"{0} * {1} = {2}\".format(5,3,5*3))\n    5 * 3 = 15\n</code></pre>\n<p>Let's try a different approach.</p>\n<p>What would happen if you replace <code>1</code> with <code>index</code>, and <code>5 * 1</code> with <code>5 * index</code>, and try to run it?</p>\n<p>It gives an error! It says: “index is not defined”.</p>\n<p>Let's try and fix this, and execute <code>index = 2</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> index = 2\n</code></pre>\n<p>Aha! This compiles.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 2 = 10\n</code></pre>\n<p>And this statement is printing <code>5 * 2 = 10</code>.</p>\n<p>Let's try something else. Let's make <code>index = 3</code>. What would happen?</p>\n<pre><code class=\"language-python\">    >>> index = 3\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 3 = 15\n</code></pre>\n<p>The same statement on being run, prints <code>5 * 3 = 15</code>.</p>\n<p>How can you check the value that <code>index</code> has? Just type in <code>index</code>.</p>\n<pre><code class=\"language-python\">    >>> index\n    3\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 3 = 15\n</code></pre>\n<p>The <code>index</code> symbol we have used here, is what is called a <strong>variable</strong>.</p>\n<p>In Python, it's also called a <strong>name</strong>.</p>\n<p>You can see that the value <code>index</code> referring to, can change over the duration of a program.</p>\n<p>Initially, <code>index</code> was referring to a value of <code>1</code>. later, <code>index</code> was referring to a value of <code>3</code>.</p>\n<p>Now, think about how you would print the entire table. All that you need to do, is start from <code>1</code>, execute the same statement with <code>print()</code> and <code>format()</code>, to get output <code>5 * 1 = 5</code>. Next, Change the value of index to <code>2</code>, and then print the same statement. Next, <code>index = 3</code>, and print the same statement again.</p>\n<pre><code class=\"language-python\">    >>> index = 1\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 1 = 5\n    >>> index = 2\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 2 = 10\n    >>> index = 3\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 3 = 15\n</code></pre>\n<p>With the same statement <code>print(\"{0} * {1} = {2}\".format(5,index,5*index))</code>, we are able to print different values. The value of <code>index</code> varies, but the code remains the same!</p>\n<p>Variables make the program much more easier to read, as well as more generic.</p>\n<p><strong>Snippet-02: Classroom Exercise On Variables</strong></p>\n<p>Let's do a simple exercise with variables.</p>\n<p>We want to create three variables <code>a</code>, <code>b</code> and <code>c</code>. Let's initially give them some values, say a value of <code>5</code> to <code>a</code>, <code>6</code> to <code>b</code> and <code>7</code> to <code>c</code>.</p>\n<p>We want to get output of this kind: <code>5 + 6 + 7 = 18</code>, without using the literal values.</p>\n<p>You would want to use the values stored in the variables in <code>a</code>, <code>b</code> and <code>c</code>.</p>\n<p>If you're hard-coding, the way to do it is with <code>print(\"5 + 6 + 7 = 18\")</code>.</p>\n<pre><code class=\"language-python\">    >>> a = 5\n    >>> b = 6\n    >>> c = 7\n    >>> print(\"5 + 6 + 7 = 18\")\n    5 + 6 + 7 = 18\n    >>> print(\"5 + 6 + 7 = 18\".format(a,b,c,a+b+c))\n    5 + 6 + 7 = 18\n</code></pre>\n<p>The way you can do that is with code like this: <code>print(\"{0} + {1} + {2} = {3}\".format(a,b,c,a+b+c))</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"{0} + {1} + {2} = {3}\".format(a,b,c,a+b+c))\n    5 + 6 + 7 = 18\n</code></pre>\n<p>How do you confirm we are accessing values stored in the variables?</p>\n<p>Let's change the values of <code>a</code>, <code>b</code> and <code>c</code>. Let's make <code>a = 6</code> , <code>b = 7</code> , and <code>c = 8</code> . Execute same statement.</p>\n<pre><code class=\"language-python\">    >>> a = 6\n    >>> b = 7\n    >>> c = 8\n    >>> print(\"{0} + {1} + {2} = {3}\".format(a,b,c,a+b+c))\n    6 + 7 + 8 = 21\n</code></pre>\n<p>You can see the magic of variables at play here! Based on what values these variables are referring to, you can see that the output of the print statement changes.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to variables, or names, in Python</li>\n<li>Observed how we could pass in values of variables to the <code>format()</code> function</li>\n</ul>\n<p><strong>Step 11: Puzzles On Variables</strong></p>\n<p>In the previous step, we were introduced to the concept of variables in Python.</p>\n<p>We will start with looking at a few puzzles.</p>\n<p><strong>Snippet-01: Puzzles On Variables</strong></p>\n<p>What if I try to refer to a variable which is not yet created?</p>\n<pre><code class=\"language-python\">    >>> count\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'count' is not defined\n    >>> print(count)\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'count' is not defined\n</code></pre>\n<p>Before using a variable, you need to have it assigned a value. If you have not defined a variable before, then you cannot use it. Consider <code>print(count)</code>, it does not know what count is. So it would throw an error, saying: “<code>count</code> is not defined, I have no idea what count is.”</p>\n<p>Once you assign a value to a variable, you can use it.</p>\n<pre><code class=\"language-python\">    >>> count = 4\n    >>> print(count)\n    4\n</code></pre>\n<p>The statement <code>count = 4</code> where we are creating a variable named <code>count</code> for the first time, is called a <strong>variable definition</strong>.</p>\n<p>This is the first time you're referring to a variable, and assigning a value to it.</p>\n<p>Python will create a variable in its memory.</p>\n<p>Variable names are case sensitive. <code>count</code> and <code>Count</code> are not the same thing.</p>\n<pre><code class=\"language-python\">    >>> Count\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'Count' is not defined\n    >>> count\n    4\n</code></pre>\n<p>There are rules to follow while naming variables.</p>\n<p>All variable names should either start with an alphabet , or an underscore <code>_</code> . <code>count</code>, <code>_count</code> are valid. <code>1count</code> is invalid.</p>\n<pre><code class=\"language-python\">    >>> 1count = 5\n      File \"&#x3C;stdin>\", line 1\n        1count = 5\n             ^\n    SyntaxError: invalid syntax\n    >>> count = 5\n    >>> _count = 5\n    >>> 1count\n      File \"&#x3C;stdin>\", line 1\n        1count\n             ^\n    SyntaxError: invalid syntax\n    >>> 2count\n      File \"&#x3C;stdin>\", line 1\n        2count\n             ^\n    SyntaxError: invalid syntax\n</code></pre>\n<p>After the first symbol, you can also use a numeral in variable names.</p>\n<pre><code class=\"language-python\">    >>> c12345 = 5\n</code></pre>\n<p>To summarize the rules for naming variables.</p>\n<ul>\n<li>This should start with an alphabet (a capital or a small alphabet) or underscore.</li>\n<li>Starting the second character, it can be alphabet, or underscore, or a numeric value.</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Understood that a variable needs to be defined before it is used</li>\n<li>Learned that there are certain rules to be followed while giving names to variables</li>\n</ul>\n<p><strong>Step 12: Introducing Assignment</strong></p>\n<p>In this step, we will look at an important concept in Python, called <strong>assignment</strong>. In previous steps, we created variables, like <code>i = 5</code>.</p>\n<p><strong>Snippet-01: Introducing Assignment</strong></p>\n<p>You can create other variables using whatever value <code>i</code> is referring to. If we say <code>j = i</code>, what would happen?</p>\n<pre><code class=\"language-python\">    >>> i = 5\n    >>> j = i\n    >>> j\n    5\n</code></pre>\n<p><code>j</code> would start referring to the same value that <code>i</code> is referring to. This statement is called an <strong>assignment</strong>.</p>\n<p>Let's try <code>j = 2 * i</code>.</p>\n<pre><code class=\"language-python\">    >>> j = 2 * i\n    >>> j\n    10\n</code></pre>\n<p><code>j</code> refers to a value of <code>10</code></p>\n<p><code>=</code> has a different meaning in programming compared to mathematics.</p>\n<p>In mathematics, When we execute <code>j = i</code>, it means <code>j</code> and <code>i</code> are equal.</p>\n<p>In prgramming, the value of the expression on right hand side is assigned to the variable on the right hand side. Can you use a constant on the left hand side of an assignment? The answer is “No”!</p>\n<pre><code class=\"language-python\">    >>> 5 = j\n      File \"&#x3C;stdin>\", line 1\n    SyntaxError: can't assign to literal\n</code></pre>\n<p>The Python Shell throws an error, saying “Can't assign to literal”, as <code>5</code> is a literal.</p>\n<p>Let's create a couple of variables. <code>num1 = 5</code> and <code>num2 = 3</code>. We would want to add these and create a fresh variable. Let's say the name of the variable is <code>sum</code>.</p>\n<pre><code class=\"language-python\">    >>> num1 = 5\n    >>> num2 = 3\n    >>> sum = num1 + num2\n    >>> sum\n    8\n</code></pre>\n<p>Create 3 variables <code>a</code>, <code>b</code> and <code>c</code> with different values and calculate their sum.</p>\n<pre><code class=\"language-python\">    >>> a = 5\n    >>> b = 6\n    >>> c = 7\n    >>> sum = a + b + c\n    >>> sum\n    18\n</code></pre>\n<p>We have just seen the mechanics of how assignment works in Python.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned what happens when you assign a value to a variable, which may or may not exist</li>\n<li>Discovered that literal constants cannot be placed on the left hand side of the assignment(<code>=</code>) operator</li>\n</ul>\n<p><strong>Step 13: Introducing Formatted Printing</strong></p>\n<p>Until now, we have been using the <code>format()</code> method to format and print values. Let's see a better approach to printing values.</p>\n<p>This is the approach we used until now.</p>\n<pre><code class=\"language-python\">    >>> a = 1\n    >>> b = 2\n    >>> c = 3\n    >>> sum = a + b + c\n    >>> print(\"{0} + {1} + {2} = {3}\".format(a, b, c ,sum))\n    1 + 2 + 3 = 6\n</code></pre>\n<p>Python has the concept of formatted strings. The syntax to use a formatted string is very simple - <code>f\"\"</code>.</p>\n<p>If we want to print the value of a variable <code>a</code>, we can use <code>{a}</code> in the text.</p>\n<pre><code class=\"language-python\">    >>> print(f\"\")\n    >>> print(f\"value of a is {a}\")\n    value of a is 1\n    >>> print(f\"value of b is {b}\")\n    value of b is 2\n</code></pre>\n<p>The variable within braces is replaced by its value.</p>\n<p>You can use expressions in a formatted string. Example below uses <code>{a+b}</code>.</p>\n<pre><code class=\"language-python\">    >>> print(f\"sum of a and b is {a + b}\")\n    sum of a and b is 3\n</code></pre>\n<p>This feature was introduced in a Python 3 release.</p>\n<p>Let's get back to the original problem we wanted to solve: printing <code>5 + 6 + 7 = 18</code>, using formatted strings.</p>\n<pre><code class=\"language-python\">    >>> print(f\"{a} + {b} + {c} = {sum}\")\n    1 + 2 + 3 = 6\n</code></pre>\n<p>You can see how easy it turns out to be!</p>\n<p><strong>Step 14: The PMT-Challenge Revisited</strong></p>\n<p>We want to print the <code>5</code>-table from <code>5 * 1 = 5</code> onward, until we reach to <code>5 * 10 = 50</code>. The best solution we have right now, is shown below:</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> index = 1\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 1 = 5\n    >>> index = 2\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 2 = 10\n    >>> index = 3\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 3 = 15\n    >>> index = 4\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 4 = 20\n</code></pre>\n<p>Can we do something, to make sure that the code remains the same all the time, but the <code>index</code> value gets updated?</p>\n<pre><code class=\"language-python\">    >>> index = index + 1\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 5 = 25\n    >>> index = index + 1\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 6 = 30\n    >>> index = index + 1\n    >>> print(\"{0} * {1} = {2}\".format(5,index,5*index))\n    5 * 7 = 35\n</code></pre>\n<p>We used <code>index = index + 1</code> to increment <code>index</code> value.</p>\n<p>If we execute these same two statements again and again, we can print the entire table! This is exactly what loops help us do: execute the same statements repeatedly.</p>\n<p>The simplest loop available in Python is the <strong>for loop</strong>.</p>\n<p>When we run a <code>for</code> loop, we need to specify the range of values - <code>1</code> to <code>10</code> or <code>1</code> to <code>20</code>, and so on. <code>range()</code> function helps us to specify a range of values.</p>\n<pre><code class=\"language-python\">    >>> range(1,10)\n    range(1, 10)\n</code></pre>\n<p>The syntax of the <code>for</code> loop is: <code>for i in range(1, 10): ...</code>. Here, <code>i</code> is the name of the <strong>control variable</strong>. In Python, you need to put a colon, '<code>:</code>', and in the next line give indentation.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):\n    ...   print(i)\n    ...\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n</code></pre>\n<p>You would see that it prints from <code>1</code> to <code>9</code>.</p>\n<p>When we run a loop in <code>range(1, 10)</code>, <code>1</code> is <em>inclusive</em> and <code>10</code> is <strong>exclusive</strong>.The loop runs from <code>1</code> to the value before <code>10</code>, which is <code>9</code>.</p>\n<p>The leading whitespace before <code>print(i)</code> is called <strong>indentation</strong>. We'll talk about indentation later, when we talk about puzzles related to the <code>for</code> loop.</p>\n<p>How can you extend this concept to solving our <em>PMT-Challenge</em> problem?</p>\n<pre><code class=\"language-python\">    >>> print(f\"{5} * {index} = {5*index}\")\n    5 * 7 = 35\n</code></pre>\n<p>What we were doing earlier, was calling <code>print()</code> with a formatted string. Now we want to print this statement for different values of <code>i</code>.</p>\n<p>How can you do that?</p>\n<p>Let's start with a simple example.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,11):\n    ...   print(f\"{i}\")\n    ...\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n    10\n</code></pre>\n<p><code>print(f\"{i}\")</code> prints the value of i.</p>\n<p>Now, how do we get it to print <code>5 * 1 = 5</code> to <code>5 * 10 = 50</code>?</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,11):\n    ...   print(f\"5 * {i} = {5 * i}\")\n    ...\n    5 * 1 = 5\n    5 * 2 = 10\n    5 * 3 = 15\n    5 * 4 = 20\n    5 * 5 = 25\n    5 * 6 = 30\n    5 * 7 = 35\n    5 * 8 = 40\n    5 * 9 = 45\n    5 * 10 = 50\n    >>> 5 * 4 * 50\n    1000\n</code></pre>\n<p><code>print(f\"5 * {i} = {5 * i}\")</code> prints a specific multiple of 5.</p>\n<p><strong>Step 15: Loops</strong></p>\n<p>In a previous step, we took a major step in programming. We wrote our first for loop with Python. In this step, let's try a few puzzles to understand the for loop even further.</p>\n<p>The syntax of the for loop we looked at earlier was:</p>\n<pre><code class=\"language-python\">  for i in range(1, 10):\n    print(i)\n</code></pre>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say we write a <code>for</code> loop, but don't give a <code>:</code> after the <code>range()</code> method, to close the first line. What would happen?</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10)\n      File \"&#x3C;stdin>\", line 1\n        for i in range(1,10)\n                           ^\n        SyntaxError: invalid syntax\n</code></pre>\n<p>Invalid syntax. A <code>:</code> is mandatory within the <code>for</code> loop syntax.</p>\n<p>Let's provide a <code>:</code> and in the next line, use <code>print(i)</code> without space before it (without indentation).</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):\n    ... print(i)\n      File \"&#x3C;stdin>\", line 2\n        print(i)\n            ^\n    IndentationError: expected an indented block\n</code></pre>\n<p>Most other programming languages use open brace <code>{</code> and closed brace <code>}</code> as delimiters in a <code>for</code> loop. However, Python uses indentation to identify which code is part of a <code>for</code> loop, and which is not. So if we are writing the body of a <code>for</code> loop, we must use indentation, and leave atleast a single <code>&#x3C;SPACE></code>.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):\n    ...   print(i)\n    ...\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n</code></pre>\n<p>How do we execute two lines of code as part of the <code>for</code> loop?</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,10):\n    ...  print(i)\n    ...  print(2*i)\n    ...\n    1\n    2\n    2\n    4\n    3\n    6\n    4\n    8\n    5\n    10\n    6\n    12\n    7\n    14\n    8\n    16\n    9\n    18\n</code></pre>\n<p>We are indenting both statements with a space - <code>print(i)</code> and <code>print(2*i)</code>.</p>\n<p>When for loop has only one line of code, you can specify it right after the <code>:</code></p>\n<pre><code class=\"language-python\">    >>> for i in range(2,5): print(i)\n    ...\n    2\n    3\n    4\n</code></pre>\n<p>However, this is not considered to be a good programming practice. Even though you may want to execute just one statement in a <code>for</code> loop, indentation on a new line is recommended.</p>\n<p>Another best practice is to use four <code>&#x3C;SPACE></code>s for indentation, instead of just two. This would give clear indentation of the code.</p>\n<pre><code class=\"language-python\">    >>> for i in range(2,5):\n    ...     print(i)\n    ...\n    2\n    3\n    4\n</code></pre>\n<p>Anybody who looks at the code immediately understands that this <code>print()</code> is part of the <code>for</code> loop.</p>\n<p>Let's say you only want to print the odd numbers till <code>10</code>, which are <code>1</code>, <code>3</code>, <code>5</code>, <code>7</code> and <code>9</code>. The <code>range()</code> function offers an interesting option.</p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11,2):\n    ...   print(i)\n    ...\n    1\n    3\n    5\n    7\n    9\n</code></pre>\n<p>In <code>for i in range(1, 11, 2)</code>, we pass in a third argument, called a <em>step</em>. After each iteration, the value of <code>i</code> is increment by <code>step</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Looked at a few puzzles about the <code>for</code> loop, which lay emphasis on the following aspects of for:</p>\n<ul>\n<li>The importance of syntax elements such as the colon</li>\n<li>Indentation</li>\n<li>Variations of the <code>range()</code> function</li>\n</ul>\n</li>\n</ul>\n<p><strong>Step 16: Programming Exercise PE-BA-02</strong></p>\n<p>In the previous step, after initially exploring the Python <code>for</code> loop, we looked at a number of puzzles.</p>\n<p>In this step, let's look at a few exercises.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Print the even numbers up to 10. We would want to print 2 4 6 8 10, using a for loop.</li>\n<li>Print the first 10 numbers in reverse</li>\n<li>Print the first 10 even numbers in reverse</li>\n<li>Print the squares of the first 10 numbers</li>\n<li>Print the squares of the first 10 numbers, in reverse</li>\n<li>Print the squares of the even numbers</li>\n</ol>\n<p><strong>Solution 1</strong></p>\n<p>Instead of starting with <code>1</code>, we need to start with <code>2</code>. Each time, <code>i</code> it would be incremented by <code>2</code>, and <code>2 4 6 8 and 10</code> would be printed.</p>\n<pre><code class=\"language-python\">    >>> for i in range (2,11,2):\n    ...   print(i)\n    ...\n    2\n    4\n    6\n    8\n    10\n</code></pre>\n<p><strong>Solution 2</strong></p>\n<p>We would want to print the numbers in reverse. Think about how you would do that using the <code>range()</code> function. We'd want go from <code>10</code>, <code>9</code>, <code>8</code>, and so on up to <code>1</code>.</p>\n<pre><code class=\"language-python\">    >>> for i in range (10,0,-1):\n    ...   print(i)\n    ...\n    10\n    9\n    8\n    7\n    6\n    5\n    4\n    3\n    2\n    1\n</code></pre>\n<p>The value to start with is <code>10</code>. As we discussed earlier, the end value is exclusive. So to print from <code>10</code> to <code>1</code>, we want to end one value which is <code>0</code>. <code>range(10, 0)</code> seems to be what we need.</p>\n<p>Usually these step value is positive, but we need to go backwards from <code>10</code>. Hence, we would give a step value of <code>-1</code>.</p>\n<p><strong>Solution 3</strong></p>\n<p>Now, let's print the first <code>10</code> even numbers in reverse.</p>\n<pre><code class=\"language-python\">    >>> for i in range (20,0,-2):\n    ...   print(i)\n    ...\n    20\n    18\n    16\n    14\n    12\n    10\n    8\n    6\n    4\n    2\n</code></pre>\n<p><strong>Solution 4</strong></p>\n<p>Next, we would want to print the squares of the first 10 numbers.</p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):\n    ...     print(i * i)\n    ...\n    1\n    4\n    9\n    16\n    25\n    36\n    49\n    64\n    81\n    100\n</code></pre>\n<p><strong>Solution 5</strong></p>\n<p>Let's print the squares in the reverse order.</p>\n<pre><code class=\"language-python\">    >>> for i in range (10,0,-1):\n    ...     print(i*i)\n    ...\n    100\n    81\n    64\n    49\n    36\n    25\n    16\n    9\n    4\n    1\n</code></pre>\n<p><strong>Solution 6</strong></p>\n<p>Print the squares of the even numbers. How to do that?</p>\n<pre><code class=\"language-python\">    >>> for i in range (10,0,-2):\n    ...     print(i*i)\n    ...\n    100\n    64\n    36\n    16\n    4\n</code></pre>\n<p>The key part is using a step of <code>-2</code></p>\n<p>We leave it as an exercise for you, to print squares of odd numbers.</p>\n<p><strong>Summary</strong></p>\n<p>In this video, we: * Tried out a few exercises involving the for loop, by playing around with printing sequences of numbers.</p>\n<ul>\n<li>Used the for loop to simplify the solution to the <em>PMT-Challenge</em> problem.</li>\n</ul>\n<p><strong>Step 17: Review: The Basics Of Python</strong></p>\n<p>It must have been a roller-coaster ride to solve the multiplication table challenge so far. If you're new to programming, there are a wide range of topics and concepts, that you would have learned during this small journey.</p>\n<p>Let's quickly revise the important concepts we have learned during this small journey.</p>\n<ul>\n<li><code>1</code>, <code>11</code>, <code>5</code>, … are all called literals because these are constant values. Their values don't really change. _Consider <code>5 _ 4 _ 50`. This is an expression. `_`is an operator, and`5`, `4`and`50</code> are operands.</li>\n<li>The name <code>i</code> in <code>i = 1</code>, is called a variable. It can refer to different values, at different points in time.</li>\n<li><code>range()</code> and <code>print()</code> are in-built Python functions.</li>\n<li>Every complete line of code is called statement. The specific statement <code>print()</code>, is invoking a method. The other statement which we looked at earlier, was an assignment statement. <code>index = index + 1</code> would evaluate <code>index + 1</code>, and have the <code>index</code> variable refer to that value.</li>\n<li>The syntax of the <code>for</code> loop was very simple. <code>for var in range(1, 10) : ...</code>, followed by statements you would want to execute in a loop, with indentation. For the sake of indentation we left four <code>&#x3C;SPACE></code>s in front of each statement inside the <code>for</code> loop.</li>\n</ul>\n<p>So that, in a nutshell, is what we have learned over the course of our first section.</p>\n<h4>Chapter 03 - Introducing Methods</h4>\n<p>In the last section, we introduced you to the basics of python. We learned those concepts by applying them to solve the <em>PMT-Challenge</em> problem. The code below is what we ended up with as we solved that chellenge.</p>\n<p><strong>Snippet-01: Current Solution To PMT-Challenge</strong></p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):\n    ...   print(f\"8 * {i} = {8 * i}\")\n</code></pre>\n<p>If we wanted to change the code to print the <code>7</code> table, we need to change the value <code>7</code> used in the for loop, to <code>8</code>. It's simple, but still not as friendly as you would like.</p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):\n    ...   print(f\"7 * {i} = {7 * i}\")\n</code></pre>\n<p>To print a <code>7</code> table, it would be awesome if could say <code>print_multiplication_table</code>, and give a value of 7 beside it, and it would do the rest:</p>\n<pre><code class=\"language-python\">    >>> print_multiplication_table(7)\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'print_multiplication_table' is not defined\n    >>> print_multiplication_table(8)\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'print_multiplication_table' is not defined\n</code></pre>\n<p>Similarly, <code>print_multiplication_table(8)</code>, could print the multiplication table for <code>8</code>!</p>\n<p>To be able to do this, we need to create a <strong>method</strong>, or a <strong>function</strong>. Creating a method makes the code <em>reusable</em>, and we can invoke that method very easily by passing <em>arguments</em>.</p>\n<p>In this section, we take an in-depth look at methods.</p>\n<p><strong>Step 01: Defining Your First Method</strong></p>\n<p>Methods are very important building blocks in Python programming. In this step, we will create a simple method that prints <code>\"Hello World\"</code>, twice.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>When we talk about a method, we need to give it a name. We are already using an in-built Python method here, which is <code>print()</code>.</p>\n<pre><code class=\"language-python\">    >>> print(\"Hello World\")\n    Hello World\n    >>> print(\"Hello World\")\n    Hello World\n</code></pre>\n<p>Similar to that, we need to give a name to our body of code. Let's say the name is <code>print_hello_world_twice</code>.</p>\n<p>The syntax to create a method in Python is straightforward:</p>\n<ul>\n<li>At the start, use the keyword <code>def</code> followed by a space.</li>\n<li>Followed by name of the method - <code>print_hello_world_twice</code>.</li>\n<li>Add a pair of parenthesis: <code>()</code>.</li>\n<li>\n<p>This is followed by a colon <code>:</code> (similar to what we used in a <code>for</code> loop).</p>\n<pre><code class=\"language-python\">>>> def print_hello_world_twice():\n...     print(\"Hello World\")\n...     print(\"Hello World\")\n...\n</code></pre>\n</li>\n</ul>\n<p>All statements in a method should be indented. The two <code>print(\"Hello World\")</code> are indented. So, they are part of the method body.</p>\n<p><code>print_hello_world_twice()</code> defines a method, and it has certain code inside its body.</p>\n<p>How do we call this method? Is it sufficient to say <code>print_hello_world_twice</code>?</p>\n<pre><code class=\"language-python\">    >>> print_hello_world_twice\n    &#x3C;function print_hello_world_twice at 0x10a71ef28>\n</code></pre>\n<p>Python Shell says, there's a function defined with that specific name.</p>\n<p>How do we execute a method? Very simple! Add a pair of parentheses to the name, <code>()</code>!</p>\n<pre><code class=\"language-python\">    >>> print_hello_world_twice()\n    Hello World\n    Hello World\n    >>> print_hello_world_twice()\n    Hello World\n    Hello World\n</code></pre>\n<p>Now, we are able to run the method.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned we can define our own methods in the code we write</li>\n<li>Understood how to define a method, and all its syntax elements</li>\n<li>Saw how we can invoke a method we write</li>\n</ul>\n<p><strong>Step 02: Programming Exercise PE-MD-01</strong></p>\n<p>We will now leave you with two exercises, based on what we have learned about methods so far.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write a method called <code>print_hello_world_thrice()</code>. It should print <code>\"Hello World\"</code> thrice to the output. Define this method, and also invoke it.</li>\n<li>\n<p>Write and execute a method, that prints four statements:</p>\n<ol>\n<li>“I have created my first variable.”</li>\n<li>“I've created in my first loop.”</li>\n<li>“I've created my first method.”</li>\n<li>“I am excited to learn Python.” You need to print these four statements on four consecutive lines.</li>\n</ol>\n</li>\n</ol>\n<p><strong>Solutions</strong></p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>> def print_hello_world_thrice():\n    ...     print(\"Hello World\")\n    ...     print(\"Hello World\")\n    ...     print(\"Hello World\")\n    ...\n    >>> print_hello_world_thrice()\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p><strong>Solution 2</strong></p>\n<pre><code class=\"language-python\">    >>> def print_your_progress():\n    ...     print(\"Statement 1\")\n    ...     print(\"Statement 2\")\n    ...     print(\"Statement 3\")\n    ...     print(\"Statement 4\")\n    ...\n    >>> print_your_progress()\n    Statement 1\n    Statement 2\n    Statement 3\n    Statement 4\n\n    def print_your_progress():\n        print(\"Statement 1\")\n        print(\"Statement 2\")\n        print(\"Statement 3\")\n        print(\"Statement 4\")\n</code></pre>\n<p>For convenience, we have changed the exact text we need to print. Call this method with the syntax <code>print_your_progress()</code>, and you're able to execute its code.</p>\n<p>Now try another exercise. We want to print <code>\"Statement 1\"</code>, <code>\"Statement 2\"</code>, <code>\"Statement 3\"</code> and <code>\"Statement 4\"</code> on different lines, using just one print statement. How can you do that?</p>\n<pre><code class=\"language-python\">    >>> def print_your_progress():\n    ...     print(\"Statement 1\\nStatement 2\\nStatement 3\\nStatement 4\")\n    ...\n    >>> print_your_progress()\n    Statement 1\n    Statement 2\n    Statement 3\n    Statement 4\n</code></pre>\n<p>We are using the newline character <code>\\n</code>.</p>\n<p>Let's look at the difference between defining and executing a method.</p>\n<p>When we are writing a method definition, we are writing the code as part of its body. It has a specific syntax, and starts with the <code>def</code> keyword.</p>\n<p>A definition by itself cannot cause the code in its body to be executed.</p>\n<p><code>print_your_progress()</code> represents a method call. The code inside the method is executed.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>\n<p>Implemented solutions to a few exercises that test our understanding of Python methods. We touched concepts such as:</p>\n<ul>\n<li>Defining a method body</li>\n<li>The way to invoke a method, to run its code</li>\n<li>The difference between the two</li>\n</ul>\n</li>\n</ul>\n<p><strong>Step 03: Passing Parameters To Methods</strong></p>\n<p>In the previous step,we created methods. We defined <code>print_hello_world_twice()</code>, and this printed <code>\"Hello World\"</code> twice. In this step, let's talk about <em>method arguments</em>, or <em>parameters</em>.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> print_hello_world_twice()\n    Hello World\n    Hello World\n    >>> print_hello_world_thrice()\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>Earlier, we wrote code for <code>print_hello_world_thrice()</code>, which prints the message three times.</p>\n<p>Let's say you want to print it five times. You would need to write another method that does what you need. Doesn't that seem monotonous?</p>\n<p>Instead of that, Won't it be great if I can call the method by the same name, say <code>print_hello_world(5)</code>, and it would print “Hello World” five times?</p>\n<p>The <code>5</code> which we are passing here is called an <strong>argument</strong>.</p>\n<p>How do we define our method to accept this argument?</p>\n<p>Let's call our argument <code>no_of_times</code>. If you have any experience with other programming languages, they generally need you to specify the parameter type. Something like <code>This parameter is an integer/float/string, or other types</code>. But Python does not require parameter type.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):\n    ...    print(\"Hello World\")\n    ...    print(no_of_times)\n    ...\n</code></pre>\n<p>Although we are not doing exactly what we set out to, let's see what would happen. What would happen if we say <code>print_hello_world()</code> ?</p>\n<pre><code class=\"language-python\">    >>> print_hello_world()\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    TypeError: print_hello_world() missing 1 required positional argument: 'no_of_times'\n</code></pre>\n<p>Error! Something like “Hey, you have created <code>print_hello_world</code> with a parameter, but not passing anything in here! Go ahead and pass a value”. Let's pass in a value, such as <code>5</code>.</p>\n<pre><code class=\"language-python\">    >>> print_hello_world(5)\n    Hello World\n    5\n    >>> print_hello_world(10)\n    Hello World\n    10\n    >>> print_hello_world(100)\n    Hello World\n    100\n</code></pre>\n<p>With <code>print_hello_world(5)</code>, you can see <code>\"Hello World\"</code> and <code>5</code> being printed. We are now able to define this method to accept a value, and print that value by invoking it. You can pass in any value, such as<code>10</code>, <code>100</code>, or others.</p>\n<p>Now think of a different solution for this method, where you don't repeat the same piece of code to print <code>\"Hello World\"</code>. Consider <code>print_hello_world(5)</code>, it should still print <code>\"Hello World\"</code> <code>5</code> times. How do you do that?</p>\n<p>Think about using something along the lines of a loop.</p>\n<p><strong>Snippet-02:</strong></p>\n<p>For now, what we are doing is we are printing <code>\"Hello World\"</code> <code>10</code> times.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):\n    ...    for i in range(1,10):\n    ...       print(\"Hello World\")\n    ...\n\n    >>> print_hello_world(5)\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>Our method call <code>print_hello_world(5)</code> now prints <code>\"Hello World\"</code> <code>10</code> times.</p>\n<p>However just print the message <code>5</code> times. We need to make use of the parameter <code>no_of_times</code> inside the <code>for</code> loop as well.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):\n    ...    for i in range(1,no_of_times):\n    ...       print(\"Hello World\")\n    ...\n\n    >>> print_hello_world(5)\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>Now let's execute the method again. You can see that it's printing <code>4</code> times only.</p>\n<p>Why is it not printing <code>5</code> times?</p>\n<p>That's because <code>no_of_times</code> as a second parameter to <code>range()</code> is exclusive.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):\n    ...    for i in range(1,no_of_times+1):\n    ...       print(\"Hello World\")\n    ...\n    >>> print_hello_world(5)\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>Great, it's now printing the message <code>5</code> times!</p>\n<pre><code class=\"language-python\">    >>> print_hello_world(7)\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>If you pass a different argument like <code>7</code>, the message is displayed <code>7</code> times.</p>\n<p>Something you need to always be cautious about in Python, is the indentation. Over here, the <code>for</code> loop is part of the method body. So we have extra indentation for it. The print is part of the <code>for</code> loop body. So guess what, even more indentation for that code.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to pass arguments to a method</li>\n<li>Understood that the method definition needs to have parameters coded in</li>\n<li>Observed that arguments passed during a method call can be accessed inside a methods body</li>\n</ul>\n<p><strong>Step 04: Classroom Exercise CE-MD-01</strong></p>\n<p>In this step, Let's look at a few exercises related to the method parameter.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write a method called <code>print_numbers()</code>, that would print all successive integers from <code>1</code> to <code>n</code>.</li>\n<li>The second one is to write a method called <code>print_squares_of_numbers()</code>, that prints squares of all successive integers from <code>1</code> to <code>n</code>.</li>\n</ol>\n<p><strong>Solutions</strong></p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>> def print_numbers(n):\n    ...    for i in range(1, n+1):\n    ...       print(i)\n    ...\n    >>> print_numbers(5)\n    1\n    2\n    3\n    4\n    5\n    >>>\n</code></pre>\n<p>If you are programming in other languages such as Java, you are used to naming methods in this way: <code>printNumbers()</code>. This convention is popularly known as “Camel Case”.</p>\n<p>That's NOT how Python programmers name their methods. Pythonic way is to use underscore <code>_</code> to separate words in the method name, as in <code>print_numbers()</code>.</p>\n<p><strong>Solution 2</strong></p>\n<p>Let's define <code>print_squares_of_numbers()</code>. This would be very similar to <code>print_numbers()</code>, working with the same range. Only, we need to say <code>print(i*i)</code> .</p>\n<pre><code class=\"language-python\">    >>> def print_squares_of_numbers(n):\n    ...    for i in range(1, n+1):\n    ...       print(i*i)\n    ...\n    >>> print_squares_of_numbers(5)\n    1\n    4\n    9\n    16\n    25\n</code></pre>\n<p>How is a parameter different from an argument?</p>\n<ul>\n<li>Inside the definition of the method, the name within parentheses is referred to as a <strong>parameter</strong>. In our recent exercise, <code>n</code> is a parameter, because it's used in the definition of <code>print_squares_of_numbers</code>.</li>\n<li>When you are passing a value to a method during a method call, say <code>5</code>, that value is called an <strong>argument</strong>.</li>\n<li>\n<p>Don't worry too much about it. Just follow this convention for now:</p>\n<ul>\n<li>In the method call, call it an <em>argument</em>.</li>\n<li>In a method definition, call it a <em>parameter</em>.</li>\n</ul>\n</li>\n</ul>\n<p><strong>Summary</strong></p>\n<p>In this step, we looked at a few simple exercises related to passing method arguments</p>\n<p><strong>Step 05: Methods With Multiple Parameters</strong></p>\n<p>In this step, let's look at creating a method with multiple parameters.</p>\n<p><strong>Snippet-01:</strong></p>\n<p><code>print_hello_world</code> accepts one parameter and prints “Hello World” the specified number of times.</p>\n<pre><code class=\"language-python\">    >>> def print_hello_world(no_of_times):\n    ...    for i in range(1,no_of_times+1):\n    ...       print(\"Hello World\")\n    ...\n</code></pre>\n<p>Let's say we want to print another piece of text <code>Welcome To Python</code>, a specified number of times. How do you do that?</p>\n<p>You can always create another method similar to the first one, such as <code>print_welcome_to_python(no_of_times)</code> and print the necessary text inside.</p>\n<p>However, is that what a good programmer does?</p>\n<p>A good programmer tries to create a more generic solution.</p>\n<pre><code class=\"language-python\">    >>> def print_string(str, no_of_times):\n    ...    for i in range(1,no_of_times+1):\n    ...       print(str)\n    ...\n    >>> print_string(\"Hello World\", 3)\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>The good programmer that you are, you created a new method called <code>print_string(str, no_of_times)</code> accepting a text parameter, in addition to <code>no_of_times</code>.</p>\n<p>Syntax rules for method parameters are quite strict. If we say <code>print_string(\"Welcome to Python\")</code> and run it, we get an error! Python Shell says: “I need <code>no_of_times</code> to be present in here”.</p>\n<pre><code class=\"language-python\">    >>> print_string(\"Welcome to Python\")\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    TypeError: print_string() missing 1 required positional argument: 'no_of_times'\n</code></pre>\n<p>Let's say you want to assign default values for <code>str</code> and <code>no_of_times</code> in <code>print_string()</code>. By default, we want to always print <code>\"Hello World\"</code>, and that too <code>5</code> times.</p>\n<p>The Python language makes this very easy. <code>def print_string(str = \"Hello World\", no_of_times=5)</code>. The rest of the method remains the same.</p>\n<pre><code class=\"language-python\">    >>> def print_string(str=\"Hello World\", no_of_times=5):\n    ...    for i in range(1,no_of_times+1):\n    ...       print(str)\n    ...\n</code></pre>\n<p>Now you can call <code>print_string()</code>, and <code>\"Hello World\"</code> is displayed <code>5</code> times.</p>\n<pre><code class=\"language-python\">    >>> print_string()\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>If it's <code>print_string(\"Welcome To Python\")</code>, what does it do? It prints <code>\"Welcome To Python\"</code>, <code>5</code> times.</p>\n<pre><code class=\"language-python\">    >>> print_string(\"Welcome to Python\")\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n</code></pre>\n<p>Consider <code>print_string(\"Welcome to Python\", 8)</code>, it would print that string <code>8</code> times.</p>\n<pre><code class=\"language-python\">    >>> print_string(\"Welcome to Python\", 8)\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n    Welcome to Python\n</code></pre>\n<p>Isn't that cool!</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at how to pass multiple parameters to a method, starting with two arguments</li>\n<li>Learned how you can define default values for those parameters</li>\n<li>Observed we could pass default arguments for none, some or all of those parameters</li>\n</ul>\n<p><strong>Step 06: Back To Multiplication Table - Using Methods</strong></p>\n<p>Let's get back to our original goal, of why we needed methods. We wanted to create a multiplication table for a number, and observed that each time we needed to we needed change that number, we were forced to make a change in the code. This is not something we liked, and that's why we started investigating how methods can be used.</p>\n<p>In this step, Let's try our hand at creating a multiplication table method.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> for i in range (1,11):\n    ...    print(f\"7 * {i} = {7 * i}\")\n</code></pre>\n<p>Let's define a method called <code>print_multiplication_table()</code>, and pass in a parameter to it.</p>\n<pre><code class=\"language-python\">    >>> def print_multiplication_table(table):\n    ...    for i in range(1,11):\n    ...       print(f\"{table} * {i} = {table * i}\")\n    ...\n    >>> print_multiplication_table(7)\n    7 * 1 = 7\n    7 * 2 = 14\n    7 * 3 = 21\n    7 * 4 = 28\n    7 * 5 = 35\n    7 * 6 = 42\n    7 * 7 = 49\n    7 * 8 = 56\n    7 * 9 = 63\n    7 * 10 = 70\n</code></pre>\n<p>Now you have the entire multiplication table for <code>7</code>.</p>\n<p>You can then call <code>print_multiplication_table()</code> with arguments <code>8</code>, <code>9</code>,and so on, by simply changing the <code>table</code> arguemnt value.</p>\n<p>We now want to create even better <code>print_multiplication_table()</code> method.</p>\n<p>We want to control the start point, as well as the end point, in the call to <code>range()</code>. We want to say <code>print_multiplication_table(7, 1, 6)</code>, to print the <code>7</code> table with entries from <code>1</code> to <code>6</code>. How can you do that?</p>\n<pre><code class=\"language-python\">    >>> def print_multiplication_table(table, start, end):\n    ...    for i in range(start, end+1):\n    ...       print(f\"{table} * {i} = {table * i}\")\n    ...\n    >>> print_multiplication_table(7, 1 , 6)\n    7 * 1 = 7\n    7 * 2 = 14\n    7 * 3 = 21\n    7 * 4 = 28\n    7 * 5 = 35\n    7 * 6 = 42\n</code></pre>\n<p>Simple! Define those range limits as additional parameters!</p>\n<p>The other thing we can obviously do, is have default values for the <code>start</code>, and the <code>end</code>.</p>\n<pre><code class=\"language-python\">    >>> def print_multiplication_table(table, start=1, end=10):\n    ...    for i in range(start, end+1):\n    ...       print(f\"{table} * {i} = {table * i}\")\n    ...\n\n    >>> print_multiplication_table(7)\n    7 * 1 = 7\n    7 * 2 = 14\n    7 * 3 = 21\n    7 * 4 = 28\n    7 * 5 = 35\n    7 * 6 = 42\n    7 * 7 = 49\n    7 * 8 = 56\n    7 * 9 = 63\n    7 * 10 = 70\n</code></pre>\n<p>Calling <code>print_multiplication_table(7)</code> would give us entries from <code>7 * 1 = 7</code> to <code>7 * 10 = 70</code>.</p>\n<p>Now you can actually send out this method, to your friends, who would find it easy to use, and cool!</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to define a method to print the multiplication table for a number</li>\n<li>Looked at how to enhance this method to make table printing more flexible</li>\n<li>Further enhanced that method to accept default arguments while printing a table</li>\n</ul>\n<p><strong>Step 07: Indentation Is King</strong></p>\n<p>In Python, indentation denote blocks of code. So if you want to put something in a <code>for</code> loop, or outside it, proper indentation would be sufficient. In this step, let's explore indentation in depth. Let's start by creating a simple method.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> def method_to_understand_indentation():\n    ...     for i in range(1,11) :\n    ...        print(i)\n    ...\n    >>> method_to_understand_indentation()\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n    10\n</code></pre>\n<p>Consider the code below: <code>print(5)</code> is indented at the same level as <code>for loop</code>.</p>\n<pre><code class=\"language-python\">    >>> def method_to_understand_indentation():\n    ...     for i in range(1,11) :\n    ...        print(i)\n    ...     print(5)\n    ...\n</code></pre>\n<p>You can see that <code>print(5)</code> is called only once. It is not part of the <code>for loop</code>.</p>\n<pre><code class=\"language-python\">    >>> method_to_understand_indentation()\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n    10\n    5\n</code></pre>\n<p>Let's change the code in this method a bit. <code>print(5)</code> is indented the same way as <code>print(i)</code></p>\n<pre><code class=\"language-python\">    >>> def method_to_understand_indentation():\n    ...     for i in range(1,11) :\n    ...        print(i)\n    ...        print(5)\n    ...\n</code></pre>\n<p><code>print(5)</code> is part of the for loop. It is executed 10 times.</p>\n<pre><code class=\"language-python\">    >>> method_to_understand_indentation()\n    1\n    5\n    2\n    5\n    3\n    5\n    4\n    5\n    5\n    5\n    6\n    5\n    7\n    5\n    8\n    5\n    9\n    5\n    10\n    5\n</code></pre>\n<p>Whether we're talking about loops, methods or conditionals, proper indentation is very important in Python.</p>\n<p>We indicate a block of code, by having all lines of that block at the same indentation level. There are no specific delimiters like for instance a pair of braces <code>{...}</code>, as in other programming languages.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Ran through a few examples to see how indentation works in Python</li>\n</ul>\n<p><strong>Step 08: Puzzles on Methods - Named Parameters</strong></p>\n<p>In this step, let's look at a variety of puzzles related to methods.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Consider the following method: I would want to print the default string 6 times. How do we do it?</p>\n<pre><code class=\"language-python\">    >>> def print_string(str=\"Hello World\", no_of_times=5):\n    ...     for i in range(1,no_of_times+1):\n    ...        print(str)\n    ...\n    >>> print_string()\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p>Will it work if we call the method as in: <code>print_string(6)</code>?</p>\n<pre><code class=\"language-python\">    >>> print_string(6)\n    6\n    6\n    6\n    6\n    6\n</code></pre>\n<p><code>6</code> is passed as the first parameter. <code>6</code> is matched to <code>str</code>, and the method prints <code>6</code> the default number of times, which is <code>5</code>.</p>\n<p>to default to <code>\"Hello World\"</code>, and print it <code>6</code> times.</p>\n<p>You can do this in Python by using <strong>named parameters</strong>. During the method call, you can specify <code>no_of_times = 6</code>. <strong><code>no_of_times</code></strong> is a named parameter.</p>\n<blockquote>\n<p>There is no provision of doing something like this, in other languages like Java.</p>\n</blockquote>\n<p>Call it as <code>print_string(no_of_times=6)</code>:</p>\n<pre><code class=\"language-python\">    >>> print_string(no_of_times=6)\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n    Hello World\n</code></pre>\n<p><code>str</code> gets a default value, and <code>\"Hello World\"</code> is printed <code>6</code> times.</p>\n<p>Named parameters are very useful, when a method has a number of parameters, and you would want to make it very clear which parameter you're passing a value for.</p>\n<p>Let's call <code>print_string(7, 8)</code>. what happens?</p>\n<pre><code class=\"language-python\">    >>> print_string(7, 8)\n    7\n    7\n    7\n    7\n    7\n    7\n    7\n    7\n</code></pre>\n<p>You would see that <code>7</code> is printed <code>8</code> times.</p>\n<p>Since <code>print()</code> method is quite flexible, you can pass a number as the first argument. You can even pass a <code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> print_string(7.5, 8)\n    7.5\n    7.5\n    7.5\n    7.5\n    7.5\n    7.5\n    7.5\n    7.5\n</code></pre>\n<p>What would be the result of this - <code>print_string(7.5, \"eight\")</code>?</p>\n<pre><code class=\"language-python\">    >>> print_string(7.5, \"eight\")\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n      File \"&#x3C;stdin>\", line 2, in print_string\n    TypeError: must be str, not int\n</code></pre>\n<p>Note how <code>no_of_times</code> is used inside the method… as an argument to <code>range()</code>. <code>range()</code> only accepts integers, nothing else. When you run the code with <code>print_string(7.5, \"eight\")</code>, we get an error.</p>\n<p>It says: <code>TypeError: ```no_of_times``` must be ```int```, not string</code>.</p>\n<p>A simple rule of thumb is, if you have a parameter, you can pass any type of data to it. That could be an integer, a floating point value a string, or a boolean value. The Python language does not check for the type of a parameter. However, Python will throw an error if the function which is using that parameter, expects it to be of a specific type. The <code>range()</code> function expects that the <code>no_of_times</code> is an integer value.</p>\n<p><strong>Snippet-02:</strong></p>\n<p>The last thing which we would be looking at, is method naming conventions. We named our methods in a consistent way: <code>print_string</code>, <code>print_multiplication_table</code>, and the like.</p>\n<p>This is exactly the format which most Python developers use, to name their methods.</p>\n<p>Convention is to use underscore to separate words in a name.</p>\n<p>However, there are a few rules for naming a method: One of the important rules is also related to variable names. We observed that a variable name cannot start with a number.</p>\n<pre><code class=\"language-python\">    >>> def 1_print():\n      File \"&#x3C;stdin>\", line 1\n        def 1_print():\n             ^\n    SyntaxError: invalid token\n</code></pre>\n<p>Similarly, <code>1_print</code> will not be accepted as a method name.</p>\n<ul>\n<li>You can start a name with an alphabet, or with an underscore.</li>\n<li>From the second character onward, you are allowed to use numeric symbols.</li>\n</ul>\n<p>Methods and variables cannot be named using Python keywords.</p>\n<p>Now, what is a keyword? For example, when we talked about <code>for</code> loop, as in:</p>\n<pre><code class=\"language-python\">```for i in range(1, 11): print(i)```...\n</code></pre>\n<ul>\n<li><strong><code>for</code></strong> is a keyword</li>\n<li><strong><code>in</code></strong> is a keyword</li>\n<li><strong><code>def</code></strong> is a keyword.</li>\n</ul>\n<p>Later we will look at a few other keywords, such as <strong><code>while</code></strong>, <strong><code>return</code></strong>, <strong><code>if</code></strong>, <strong><code>else</code></strong>, <strong><code>elif</code></strong>, and many more.</p>\n<pre><code class=\"language-python\">    >>> def def():\n      File \"&#x3C;stdin>\", line 1\n        def def():\n              ^\n    SyntaxError: invalid syntax\n    >>> def in():\n      File \"&#x3C;stdin>\", line 1\n        def in():\n             ^\n    SyntaxError: invalid syntax\n    >>> def for():\n      File \"&#x3C;stdin>\", line 1\n        def for():\n              ^\n    SyntaxError: invalid syntax\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the concept of named parameters</li>\n<li>Explored the typical naming rules and conventions for methods in Python</li>\n<li>Observed that reserved keywords cannot be used to name variables or methods</li>\n</ul>\n<p><strong>Step 09: Methods - Return Values</strong></p>\n<p>Let's try and understand the importance of return values from a method. We will learn how to return a value from a method.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's name our method as <code>product_of_two_numbers()</code>, and let's have parameters <code>a</code> and <code>b</code> that it accepts:</p>\n<pre><code class=\"language-python\">    >>> def product_of_two_numbers(a,b):\n    ...     print(a * b)\n    ...\n    >>> product_of_two_numbers(1,2)\n    2\n</code></pre>\n<p>Can we take the product of these two numbers into a variable, and use it in other code, in the same program?</p>\n<p>Suppose we say a <code>product = product_of_two_numbers(1,2)</code>, is this allowed?</p>\n<p>Let's run this code, and see what's stored in <code>product</code>.</p>\n<pre><code class=\"language-python\">    >>> product = product_of_two_numbers(1,2)\n    2\n    >>> product\n</code></pre>\n<p>It's empty.</p>\n<p>The <code>product_of_two_numbers()</code> method is not really returning anything back, to be used elsewhere.</p>\n<p>Have a look at some of the built-in Python functions, such as <code>max()</code> for example.</p>\n<pre><code class=\"language-python\">    >>> max(1,2,3)\n    3\n    >>> max(1,2,3,4)\n    4\n    >>> maximum = max(1,2,3,4)\n    >>> maximum\n    4\n    >>> maximum * 5\n    20\n</code></pre>\n<p>If I call <code>max()</code> with four parameters, as in <code>maximum = max(1,2,3,4)</code>, the value <code>4</code> gets stored in maximum.</p>\n<p>Later on in the code that follows, we can say <code>maximum * 5</code>, or we can print the value of <code>maximum</code>, or a similar calculation. This gives our programs a lot more flexibility.</p>\n<p>So instead of just printing <code>a*b</code>, if this function could return a value, that would be quite useful.</p>\n<pre><code class=\"language-python\">    >>> def product_of_two_numbers(a,b):\n    ...      product = a * b;\n    ...      return product\n    ...\n    >>> product_of_two_numbers(2,3)\n    6\n</code></pre>\n<p>We are creating a variable <code>product</code> and doing a <code>return product</code>.</p>\n<p>Lets run <code>product_result = product_of_two_numbers(2, 3)</code></p>\n<pre><code class=\"language-python\">    >>> product_result = product_of_two_numbers(2,3)\n    >>> product_result\n    6\n    >>> product_result * 10\n    60\n</code></pre>\n<p>You can see how simple it is to return values from a method!</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Learned how to return values from inside a method</li>\n<li>Observed how we can store the values returned by a method call</li>\n</ul>\n<p><strong>Step 10: Programming Exercise PE-MD-02</strong></p>\n<p>In this step let's look at a couple of exercises about returning values from methods.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>Write a method to return the sum of three integers.</li>\n<li>Write a method which takes as input two integers, representing two angles of a triangle, and computes the third angle.</li>\n</ol>\n<p>Hint: The sum of the angles in a triangle is <code>180</code> degrees. So if I am passing <code>50</code> and <code>50</code>, <code>50</code> plus <code>50</code> is <code>100</code>. So some of three angles should be <code>180</code>, so the third angle will be <code>180 - 100</code>, which is <code>80</code>.</p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    >>>def sum_of_three_numbers(a, b, c):\n    ...     sum = a + b + c\n    ...     return sum\n    ...\n\n    >>> sum_of_three_numbers(1,2,3)\n    6\n    >>> something = sum_of_three_numbers(1,2,3)\n    >>> something * 5\n    30\n</code></pre>\n<p>The shorter way of doing that would have been to have a temporary variable called instead of <code>sum</code>. We could directly <code>return a + b + c</code>.</p>\n<pre><code class=\"language-python\">    >>> def sum_of_three_numbers(a, b, c):\n    ...     return a + b + c\n    ...\n    >>> something = sum_of_three_numbers(1,2,3)\n    >>> something * 5\n    30\n</code></pre>\n<p>In methods, you can use <code>return expression</code> as well. That <code>expression</code> gets evaluated, and the value gets returned back. You'd see that the result remains the same.</p>\n<p><strong>Solution 2</strong></p>\n<p>The second is to write a method to take two integers, representing two angles of a triangle, and compute the third one.</p>\n<pre><code class=\"language-python\">    >>> def calculate_third_angle(first, second) :\n    ...     return 180 - ( first + second )\n    ...\n    >>> calculate_third_angle(50, 20)\n    110\n</code></pre>\n<p>In your programming career, you would be writing a number of methods. It's very important that you are comfortable doing so. Most of the methods that you write would return values back.</p>\n<p>That's the reason why we're creating a lot of examples involving method calls.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a couple of exercises related to returning values from methods</li>\n<li>Observed that returning expressions avoids creating unnecessary variables, and shortens method definitions</li>\n</ul>\n<h4>Chapter 04 - Introduction To Python Platform</h4>\n<p>Until now we had been using Python Shell to execute all our code.</p>\n<p>In the real world, we'll be write Python code in a variety of scripts. Before we would go into an IDE and use the IDE to write the script, we thought it would be useful for us to understand how you can write Python code without the benefit of an IDE.</p>\n<p>This would also help us understand the Python environment, in-depth.</p>\n<p>In the next few steps, we'll be looking at how to create simple Python scripts, using any text editor of your choice. Use Notepad, Notepad++. Editpad, or whichever text editing software you are comfortable with. We'll see what involved in executing the program, and what's happening in the background.</p>\n<p>Here are a few videos you might want to look at.</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=ORmDD1R7lNc\">Writing and Executing your First Python Script</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=HE-FC0csG68\">Understanding Python Virtual Machine and bytecode</a></li>\n</ul>\n<p><strong>Step 01 - Writing and Executing Python Shell Programs</strong></p>\n<p>Here's a recommended video to watch - <a href=\"https://www.youtube.com/watch?v=ORmDD1R7lNc\">Writing and Executing your First Python Script</a></p>\n<p>Let's get started with creating a simple script file.</p>\n<p>We want to type in a simple Python script, or a piece of Python code, such as <code>print(\"Hello world\")</code>. Does it get any simpler than this?</p>\n<p>We'll save this into any folder on our hard disk, with a name 'first.py' .</p>\n<p><em><strong>first.py</strong></em></p>\n<pre><code class=\"language-python\">print(\"Hello world\")\n</code></pre>\n<p>The '.py' is not really mandatory, but typically all python files end with a '.py' extension.</p>\n<p>Here's how you can run it:</p>\n<ul>\n<li>Launch your terminal, or command prompt</li>\n<li>'cd' to the folder where this python script file is saved</li>\n<li>execute the command <code>python first.py</code></li>\n</ul>\n<p>You will see that <code>Hello World</code> will be printed.</p>\n<p>If you are familiar with other programming languages, you would need a class, need to put the code in that class, and similar stuff.</p>\n<p>While Python supports Object Oriented Programming, is not mandatory to create a class.</p>\n<p>It's almost as if you're typing commands, starting from the line one! That's why we call it a python script.</p>\n<p><strong>Summary</strong></p>\n<p>In this small step, we tried to create a simple python script, and we ran it from the command line. All we needed to do, was use the same command we use to launch up the python shell, and followed it up with a name of the file. We created a file called first.py, executed that, and were able to see the output on the console.</p>\n<p>As an exercise, try and add a few more methods and try to run those methods as well, as part of this script.</p>\n<p><strong>Step 02 - Python virtual machine and bytecode</strong></p>\n<p>In this step, let's try and understand what's happening in the background.</p>\n<p>We wrote a simple piece of code using a text editor. We created a file named first.py, and all we did was: <code>python3 first.py</code>. If you look at other languages like Java for example, there is a separate compilation phase and then an execution phase. But with Python, just this command does both compilation and execution.</p>\n<p>We saw that, as soon as we make a change and we run <code>python3 first.py</code> , the change is compiled and executed as well!</p>\n<p>In Python, there is an intermediate format called <strong>Python byte code</strong>. Code is first compiled to bytecode, and then executed on the <strong>Python virtual machine</strong>.</p>\n<p>When we installed Python, we installed both the python compiler and interpreter, as well as the virtual machine.</p>\n<p>In Python, <code>bytecode</code> is not standardized. Different implementations of Python have different byte code. There are about 80 Python implementations, like CPython and Jython.</p>\n<ul>\n<li>CPython is a Python implementation in C language.</li>\n<li>Jython is a Python implementation in Java language. The bytecode which Jython uses is actually Java bytecode, and you can run it on the Java virtual machine.</li>\n</ul>\n<p>Python leaves a lot of flexibility to the implementations of Python. They have the flexibility to choose the bytecode, and to choose the virtual machine that is compatible. The bytecode is tied to the specific virtual machine you are using. Therefore, if you're using CPython to compile the bytecode, you'll not be able to use Jython to run it.</p>\n<p>You should make sure, that whatever implementation you are using to compile, is the same one you're using to run the code as well.</p>\n<p><strong>Summary</strong></p>\n<p>A lot of this sounds like boring theory. Don't worry about it. As a beginner, this might not be very important for you right now.</p>\n<p>It's very important for you to understand the process. What's happening is you were writing Python code, and when you ran the command <code>python3 first.py</code>, it is both compiled and executed. An intermediate format called bytecode is created, which is not really standardized in Python. The bytecode is executed in a Python virtual machine.</p>\n<p>The idea behind this quick section, is to give you a little bit of background on what's happening behind the scenes. I'll see you in the next section. Until then, bye-bye!</p>\n<h4>Chapter 05 - Introduction To VSCode</h4>\n<p>Let's start using the IDE VSCode to write our Python Code</p>\n<p>Here are recommended videos to watch</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=pI_cnCXpCTU\">Installing VSCode</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=Na05tSP21Jg\">Write and Execute a Python File with VSCode</a></li>\n<li><a href=\"https://www.youtube.com/watch?v=PvYSlWbXuCw\">Write Your First Python Program with VSCode</a></li>\n</ul>\n<p><strong>Step 01 - Installing and Introduction to VSCode</strong></p>\n<p>In this quick step, we'll help you install VSCode.</p>\n<p>Here's the video guide for this step</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=pI_cnCXpCTU\">Installing VSCode</a></li>\n</ul>\n<p>Go to Google and type in “VSCode Community Edition Download”. Click the link which comes up first: <a href=\"https://www.jetbrains.com/VSCode/download\">https://www.jetbrains.com/VSCode/download</a>.</p>\n<p>You'll go to a page where you can choose the operating system: whether you are on Windows, Mac, or Linux.</p>\n<p>Once you choose that, you can download the appropriate community version.</p>\n<p>On the right hand side, you'll see a community version, and you can click the download link, to start the download.</p>\n<p>If you are having a problem, you can also use the direct link to download.</p>\n<p>Once you download VSCode, all you need to do is double-click the package which is downloaded. Follow the instructions, and you can continue with the defaults, until you completely install VSCode.</p>\n<p>When you launch VSCode for the first time, it should ask you for a theme, where you can choose the default.</p>\n<p>You're all set to go ahead with the next step in the course.</p>\n<p>VSCode is an awesome IDE, and I'm sure you learn a lot about it.</p>\n<p><strong>Step 02 - Write and Execute a Python File with VSCode</strong></p>\n<p>In this step, let's launch up the VSCode IDE, and create our first Python project with a Python script. We want to be able to launch a Python script by the end of this step.</p>\n<p>Here's the video guide for this step</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=Na05tSP21Jg\">Write and Execute a Python File with VSCode</a></li>\n</ul>\n<p>Launch the VSCode IDE. You'll see that it takes a little while to launch the first time, and then brings up a welcome screen.</p>\n<p>We would want to create a number of Python files. All these files will be in a project. You can think of our project as a collection of Python scripts, or modules.</p>\n<p>To get started, let's create a new project by clicking 'create new project'. Let's name it - '01-first-python-project'.</p>\n<p>Right now there are no files in the project.</p>\n<p>Let's create our first Python file, using the IDE.</p>\n<p>The way you can do that is by saying 'right-click' -> 'new' -> 'Python file', and then we'll give this a name of 'hello_world', and click OK.</p>\n<p>Now you can go ahead and write your first Python program. Let's write some simple code, like <code>print(\"Hello World\")</code>, and save it.</p>\n<p>You can do a right-click here, and say 'Run hello_world'.</p>\n<p>A small window comes up below, which shows the output. It says <code>'Hello World'</code>.</p>\n<p><strong>Step 03 - Execise - Write Multiplication Table Method with VSCode</strong></p>\n<p>Let's start with a simple exercise. We created the multiplication table method in the Python Shell. What we do now, is we'll create the same thing but in a Python file of its own.</p>\n<p>Here's the video guide for this step:</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=PvYSlWbXuCw\">Write Your First Python Program with VSCode</a></li>\n</ul>\n<h4>Chapter 06 - Introducing Data Types and Conditionals</h4>\n<p>Welcome to this section, where we will talk about numeric data types, and conditional program execution. After looking at the numeric and boolean data types, we will turn our attention to executing code, based on logical conditions.</p>\n<p><strong>Step 01: Numeric Data Types</strong></p>\n<p>In previous sections, we created variables of this kind: <code>number = 5</code> , <code>value = 2.5</code>, etc. The <code>5</code> here is an integer, and integers represent numbers, such as <code>1</code>, <code>2</code>, <code>6</code>, <code>-1</code> and <code>-2</code>. In Python, the <code>class</code> for this particular data type is <code>int</code>.</p>\n<p>If you write code like <code>type(5)</code>, you'd get <code>'int'</code> as the output.</p>\n<p>In Python, there are no primitive types. What does that mean? Every value that you see in a Python program, is an object, an instance of some <code>class</code>.</p>\n<p>In later sections, We'll understand what is a <code>class</code>, and what is an object or an instance. For now, the most important thing for you to remember, is that behind every value, there is a <code>class</code>.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's look at <code>2.5</code>, which is a floating point value.</p>\n<p>If you go ahead and do <code>type(2.5)</code>, what would you see? You would see it's of type `<code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> type(2.5)\n    &#x3C;class 'float'>\n    >>> type(2.55)\n    &#x3C;class 'float'>\n</code></pre>\n<p>When you perform a division operation between two integers, there is a chance that the result of the operation is a <code>float</code>. If you do <code>5/2</code>, the result is <code>2.5</code>. If we were to do <code>4/2</code>, even then it's of type <code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> type(5/2)\n    &#x3C;class 'float'>\n    >>> type(4/2)\n    &#x3C;class 'float'>\n    >>> 4/2\n    2.0\n    >>> 1 + 2\n    3\n</code></pre>\n<p>All the operations we looked at until now, can also be performed on floating point values.</p>\n<pre><code class=\"language-python\">    >>> value1 = 4.5\n    >>> value2 = 3.2\n    >>> value1 + value2\n    7.7\n    >>> value1 - value2\n    1.2999999999999998\n    >>> value1 / value2\n    1.40625\n    >>> value1 % value2\n    1.2999999999999998\n</code></pre>\n<p><code>value1 - value2</code> returns <code>1.299999999999998</code>. Why?</p>\n<p>Floating point numbers don't really represent accurate values. That's one of the things you need to always keep in mind.</p>\n<p>Typically, if you're doing any highly sensitive financial calculations, don't use <code>float</code>s to represent your values. Instead, use <code>Decimal</code>. More about it later.</p>\n<p>Operations can also be performed between <code>int</code> and <code>float</code>.</p>\n<pre><code class=\"language-python\">    >>> i + value1\n    14.5\n    >>> i - value1\n    5.5\n    >>> i / value1\n    2.2222222222222223\n    >>>\n</code></pre>\n<p>Result of an operation between a <code>int</code> and a <code>float</code>, is always a <code>float</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at the two basic numeric types: <code>int</code> and <code>float</code>.</li>\n<li>Saw the basic operations you can do among <code>int</code>s, among <code>float</code>s, and also between <code>int</code>s and <code>float</code>s.</li>\n</ul>\n<p><strong>Step 02: Programming Exercise PE-DT-01</strong></p>\n<p>In this step, let's do a simple exercise with numeric values.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>You need to create a method called <code>simple_interest</code>, and pass three parameters: <code>principal</code>, <code>interest</code> and <code>duration</code> (in years). You also want to calculate the amount after the specific duration, and return it back. Call this method with a few example values.</li>\n</ol>\n<p>For example, if you want to call <code>simple_interest</code> with <code>10000</code>, with an interest of <code>5</code> percent, for a duration of <code>5</code> years, the correct answer would be as follows: <code>10000</code> is the principal. In addition to <code>10000</code>, you get the interest. The interest for one year is <code>10000 * 0.05</code>, as the interest figure is in percentage.So that's <code>500</code> a year, into <code>5</code> which is <code>2500</code>. The result would be <code>12500</code>, and this value should be printed.</p>\n<p><strong>Solution 1</strong></p>\n<pre><code class=\"language-python\">    def calculate_simple_interest(principal, interest, duration) :\n            return principal * (1 + interest * 0.01 * duration)\n\n    print(calculate_simple_interest(10000,5,5))\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Wrote a very simple method to do a simple interest calculation</li>\n</ul>\n<p><strong>Step 03: Puzzles On Numeric Types</strong></p>\n<p>In this section, we are looking at numeric types. In this specific step, we would be looking at a few puzzles related to values of these types.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's create a simple variable <code>i = 1</code>. <code>i = i + 1</code>. What would be the value of <code>i</code> after that?</p>\n<pre><code class=\"language-python\">    >>> i = 1\n    >>> i = i + 1\n    >>> i\n    2\n</code></pre>\n<p>It would be <code>2</code>. There is a shortcut way of doing the same thing, by using the <code>+=</code> operator.</p>\n<pre><code class=\"language-python\">    >>> i += 1\n    >>> i\n    3\n</code></pre>\n<p>Typically in other programming languages, you can do something of this kind: <code>i++</code>. There is no provision in Python to use increment operators like <code>++</code>, in either prefix or suffix mode, like <code>++i</code>, or <code>i++</code>.</p>\n<pre><code class=\"language-python\">    >>> i++\n      File \"&#x3C;stdin>\", line 1\n        i++\n          ^\n    SyntaxError: invalid syntax\n    >>> ++i\n    3\n</code></pre>\n<p>Let's look at compound assignments.</p>\n<pre><code class=\"language-python\">    >>> i += 1\n    >>> i\n    4\n    >>> i -= 1\n    >>> i\n    3\n    >>> i /= 1\n    >>> i *= 2\n    >>> i\n    6.0\n</code></pre>\n<p>What you see here, is Dynamic Typing in Python. The type of a variable can change during the lifetime of the program.</p>\n<pre><code class=\"language-python\">>>> i = 2\n>>> type(i)\n&#x3C;type 'int'>\n>>> i = i/2.0\n>>> type(i)\n&#x3C;type 'float'>\n</code></pre>\n<p>Let's create a couple more numbers. <code>number1 = 5</code> and <code>number2 = 2</code>. What could be the result of <code>number1 / number2</code>? You know it, it's <code>2.5</code> .</p>\n<p><code>number1 // nummber2</code> truncates the value of <code>2.5</code>, to <code>2</code>.</p>\n<pre><code class=\"language-python\">    >>> number1//number2\n    2\n</code></pre>\n<p>If you can do <code>number1 // number2</code>, can you also do this: <code>number1 //= number2</code>?</p>\n<pre><code class=\"language-python\">    >>> number1 //= 2\n    >>> number1\n    2\n</code></pre>\n<p><code>5 ** 3</code> is <code>5</code> 'to the power of' <code>3</code>, which is <code>5 * 5 * 5</code>, or <code>125</code>.</p>\n<pre><code class=\"language-python\">    >>> 5 ** 3\n    125\n    >>> pow(5,3)\n    125\n</code></pre>\n<p>This can also be achieved by invoking <code>pow(5, 3)</code>. We have an operator, as well as a method at our disposal.</p>\n<p>The last thing we will look at, are type conversion functions.</p>\n<p>If you need to convert an <code>int</code> value to a <code>float</code>, or a <code>float</code> to an <code>int</code>.</p>\n<pre><code class=\"language-python\">    >>> int(5.6)\n    5\n</code></pre>\n<p>What if you want to round a value? <code>5.6</code> is nearer to <code>6</code> than <code>5</code>. You can use a function called <code>round()</code>, and here,<code>round(5.6)</code> gives the correct result <code>6</code>.</p>\n<pre><code class=\"language-python\">    >>> round(5.6)\n    6\n    >>> round(5.4)\n    5\n    >>> round(5.5)\n    6\n</code></pre>\n<p><code>round()</code> can also allows you to specify number of decimals in the result.</p>\n<pre><code class=\"language-python\">    >>> round(5.67, 1)\n    5.7\n    >>> round(5.678, 2)\n    5.68\n</code></pre>\n<p>You can also convert <code>int</code> to <code>float</code>, by using the function <code>float()</code>.</p>\n<pre><code class=\"language-python\">    >>> float(5)\n    5.0\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few corner cases related to your numeric types.</li>\n<li>Examined the different operators available for use with values of numeric types</li>\n<li>Learned about the usage of type conversion functions</li>\n</ul>\n<p><strong>Step 04: Introducing Boolean Type</strong></p>\n<p>We will now shift our attention to the <code>bool</code> data type.</p>\n<p>A boolean value is something which can be either “true” or “false”.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>In Python, “true” is represented by <code>True</code>, and “false” by <code>False</code>. It's important to remember that it's <code>True</code> with a capital <code>'T'</code>, and <code>False</code> with a capital <code>'F'</code>.</p>\n<pre><code class=\"language-python\">    >>> True\n    True\n    >>> False\n    False\n    >>> true\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'true' is not defined\n    >>> false\n    Traceback (most recent call last):\n      File \"&#x3C;stdin>\", line 1, in &#x3C;module>\n    NameError: name 'false' is not defined\n</code></pre>\n<p>The boolean variable <code>is_even</code> indicates whether a number is even or not.</p>\n<pre><code class=\"language-python\">    >>> is_even = True\n    >>> is_odd = False\n</code></pre>\n<p>Let's create a variable <code>i = 10</code>. We want to find out if <code>i > 15</code>. What do you think is the result? <code>False</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 10\n    >>> i > 15\n    False\n    >>> i &#x3C; 15\n    True\n</code></pre>\n<p>In general, boolean values can represent the result of logical conditions.</p>\n<p>Let's look at other operations that can result in <code>bool</code> values. We looked at <code>></code> and <code>&#x3C;</code>. Another operation which you can perform, is <code>>=</code>.</p>\n<pre><code class=\"language-python\">    >>> i >= 15\n    False\n    >>> i >= 10\n    True\n    >>> i > 10\n    False\n    >>> i &#x3C;= 10\n    True\n    >>> i &#x3C; 10\n    False\n</code></pre>\n<p><code>==</code> is the comparison operator. We are only comparing the value of <code>i</code> against <code>10</code>, not changing its value.</p>\n<pre><code class=\"language-python\">    >>> i == 10\n    True\n    >>> i == 11\n    False\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the <code>bool</code> data type</li>\n<li>Learned that <code>bool</code> variables are useful handy while testing logical conditions</li>\n</ul>\n<p><strong>Step 05: Introducing Conditionals</strong></p>\n<p>In this step, let's look at <code>if</code> statement.</p>\n<p>Sometimes you need to execute code only when certain conditions are true. You can use a <code>if</code> condition, which is the simplest conditional in Python. Let's look at an example.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say <code>i</code> has a value of <code>5</code>. You want to print something, only if <code>i</code> has a value greater than <code>3</code>. How do you do that?</p>\n<pre><code class=\"language-python\">    >>> i = 5\n    >>> if i>3:\n    ...     print(f\"{i} is greater than 3\")\n    ...\n    5 is greater than 3\n</code></pre>\n<p>The syntax of the <code>if</code> is very simple: <code>if</code> followed by a condition; with the condition you want to check. It looks like: <code>if i>3: ...</code> You need to indent the body of the <code>if</code> with <code>&#x3C;SPACE></code>s as usual.</p>\n<p>Let's say <code>i</code> has a value of <code>2</code>. What would happen if we execute the same code again?</p>\n<pre><code class=\"language-python\">    >>> i = 2\n    >>> if i>3:\n    ...     print(f\"{i} is greater than 3\")\n    ...\n</code></pre>\n<p>You would see that nothing is printed to the console. Based on the value of <code>i</code> , either the statement is executed, or it's not. That's what an <code>if</code> helps us to do.</p>\n<p>The way you can think about an <code>if</code>, is the body of code under the <code>if</code> is executed only when this condition is <code>True</code>. If this condition is not <code>True</code>, that code is not executed at all.</p>\n<pre><code class=\"language-python\">    >>> if(False):\n    ...   print(\"False\")\n    ...\n    >>> if(True):\n    ...   print(\"True\")\n    ...\n    True\n</code></pre>\n<p>Let's take two different numbers, say <code>a = 5</code>, and <code>b = 7</code>. We want to compare them, and predict if <code>a</code> is greater that <code>b</code> .</p>\n<pre><code class=\"language-python\">    >>> a = 5\n    >>> b = 7\n    >>> if(a>b):\n    ...   print(\"a is greater than b\")\n    ...\n\n    >>> a = 9\n    >>> if(a>b):\n    ...   print(\"a is greater than b\")\n    ...\n    a is greater than b\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Were introduced to the <code>if</code> statement, the simplest Python conditional</li>\n<li>Understood how an <code>if</code> helps in implementing conditional program logic</li>\n</ul>\n<p><strong>Step 06: Classroom Exercise CE-DT-01</strong></p>\n<p>In this step, let's look at a couple of exercises with the if statement.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say we define four variables: <code>a = 1</code>, <code>b = 2</code> , <code>c = 3</code> and <code>d = 5</code>. we want to find out, if <code>a + b</code> is greater than <code>c + d</code>.</p>\n<pre><code class=\"language-python\">    >>> a = 1\n    >>> b = 2\n    >>> c = 3\n    >>> d = 5\n    >>> if a+b > c+d :\n    ...    print(\"a+b > c +d\")\n    ...\n    >>> a = 9\n    >>> if a+b > c+d :\n    ...    print(\"a+b > c +d\")\n    ...\n    a+b > c +d\n</code></pre>\n<p>Let's say we are given three values meant to be the angles of a triangle. Their values are <code>angle1 = 30</code>, <code>angle2 = 20</code> and <code>angle3 = 60</code>. You want to find out if these three angles actually form a valid triangle. You know that the sum of the angles of a triangle is always <code>180</code> degrees.</p>\n<pre><code class=\"language-python\">    >>> angle1 = 30\n    >>> angle2 = 20\n    >>> angle3 = 60\n    >>> if(angle1 + angle2 + angle3 == 180):\n    ...      print(\"Valid Triangle\")\n    ...\n    >>> angle2 = 90\n    >>> if(angle1 + angle2 + angle3 == 180):\n    ...      print(\"Valid Triangle\")\n    ...\n    Valid Triangle\n</code></pre>\n<p>The last exercise is to check if a number is even or not.</p>\n<p>Hint L you need to use one of the operators we talked about earlier. That's right, use the modulo operator <code>%</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 2\n    >>> if(i%2==0):\n    ...   print(\"i is even\")\n    ...\n    i is even\n\n    >>> i = 3\n    >>> if(i%2==0):\n    ...   print(\"i is even\")\n    ...\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few exercises related to the if statement, for writing and testing conditions.</li>\n</ul>\n<p><strong>Step 07 - Logical Operators - and or not</strong></p>\n<p>In this step, let's look at the different operators that can be used on <code>bool</code> values. These operators are called logical operators - <code>and</code>, <code>or</code> , <code>not</code> and <code>^</code> (xor).</p>\n<p>Let's say we have a value <code>True</code>, and the other <code>False</code>, and we want to play around with them.</p>\n<p>Logical operator <code>and</code> returns true only when both operands are <code>True</code>.</p>\n<pre><code class=\"language-python\">    >>> True and False\n    False\n    >>> True and True\n    True\n    >>> True and False\n    False\n    >>> False and True\n    False\n    >>> False and False\n</code></pre>\n<p>Logical operator <code>or</code> returns true when atleast one of the operands is <code>True</code>.</p>\n<pre><code class=\"language-python\">    False\n    >>> True or False\n    True\n    >>> False or True\n    True\n    >>> True or True\n    True\n    >>> False or False\n</code></pre>\n<p>Logical operator <code>not</code> returns negation.</p>\n<pre><code class=\"language-python\">    False\n    >>> not True\n    False\n    >>> not(True)\n    False\n    >>> not False\n    True\n    >>> not(False)\n    True\n</code></pre>\n<p>The XOR operation, denoted by the <code>^</code> operator, is <code>True</code> when operands have different boolean values.</p>\n<pre><code class=\"language-python\">    >>> True ^ True\n    False\n    >>> True ^ False\n    True\n    >>> False ^ True\n    True\n    >>> False ^ False\n    False\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at the logical operators that act on boolean values, such as <code>and</code>, <code>or</code>, <code>not</code> and <code>^</code></li>\n<li>Explored each of these operators, finding out when they return <code>True</code>, and when <code>False</code>.</li>\n</ul>\n<p><strong>Step 08: Puzzles On Logical Operators</strong></p>\n<p>In this step, Let's look at a few simple puzzles to look at the logical operators.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Let's say <code>i</code> has a value of <code>10</code>, and <code>j</code> has a value of <code>15</code>. You want to find out if both <code>i</code> and <code>j</code> are even. How do you do that?</p>\n<pre><code class=\"language-python\">    >>> i = 10\n    >>> j = 15\n    >>> if i%2==0 and j%2==0:\n    ...   print(\"i and j are even\")\n    ...\n    >>> j = 14\n    >>> if i%2==0 and j%2==0:\n    ...   print(\"i and j are even\")\n    ...\n    i and j are even\n\n    >>> if i%2==0 or j%2==0:\n    ...\n      File \"&#x3C;stdin>\", line 2\n        ^\n    IndentationError: expected an indented block\n    >>> if i%2==0 or j%2==0:\n    ...   print(\"atleast one of i and j are even\")\n    ...\n    atleast one of i and j are even\n</code></pre>\n<p>If we want to find out if at least one of <code>i</code> and <code>j</code> is even, we can use the <code>or</code> operator.</p>\n<pre><code class=\"language-python\">    >>> i = 15\n    >>> j\n    14\n    >>> if i%2==0 or j%2==0:\n    ...   print(\"atleast one of i and j are even\")\n    ...\n    atleast one of i and j are even\n    >>> j = 23\n    >>> if i%2==0 or j%2==0:\n    ...   print(\"atleast one of i and j are even\")\n    ...\n    >>> i\n    15\n</code></pre>\n<p>Now try and guess the value of this. <code>if(True ^ False): print(\"Message\")</code></p>\n<pre><code class=\"language-python\">    >>> if(True ^ False):\n    ...     print(\"This will Print\")\n    ...\n    This will Print\n    >>> if(False ^ True):\n    ...     print(\"This will Print\")\n    ...\n    This will Print\n    >>> if(True ^ True):\n    ...     print(\"This will Print\")\n    ...\n</code></pre>\n<p>Xor operation using <code>^</code> - message will get printed if the operands are different.</p>\n<p>What would happen if both of them are <code>True</code>? No message is printed.</p>\n<p>So you would use <code>^</code> in situations, where you'd want one of the operands to be <code>True</code>, and the other to be <code>False</code>.</p>\n<p>Let's say, <code>x = 5</code>, and you want to check <code>if not x == 6: print(\"This\")</code>. What will be the result of running this code?</p>\n<pre><code class=\"language-python\">    >>> x = 5\n    >>> if not x == 6:\n    ...   print(\"This\")\n    ...\n    This\n    >>> x = 6\n    >>> if not x == 6:\n    ...   print(\"This\")\n    ...\n</code></pre>\n<p>Actually, there is a shortcut for such a condition: <code>if x != 6 : print(\"This\")</code>.</p>\n<pre><code class=\"language-python\">    >>> if x!=6:\n    ...   print(\"This\")\n    ...\n    >>> x=5\n    >>> if x!=6:\n    ...   print(\"This\")\n    ...\n    This\n</code></pre>\n<p><code>int()</code> is a conversion function, which when given say a <code>float</code> value, returns an <code>int</code> value. Consider <code>int(True)</code>, what would happen?</p>\n<pre><code class=\"language-python\">    >>> int(True)\n    1\n    >>> int(False)\n    0\n</code></pre>\n<p><code>int(True)</code> returns 1. <code>int(False)</code> returns 0.</p>\n<pre><code class=\"language-python\">    >>> x = -6\n    >>> if x:\n    ...   print(\"something\")\n    ...\n    something\n</code></pre>\n<p>One of the most interesting facts about boolean stuff, is anything which is non-zero, is considered to be <code>True</code>.</p>\n<p><code>0</code> is the only integer value which is considered to be <code>False</code>.</p>\n<pre><code class=\"language-python\">    >>> bool(6)\n    True\n    >>> bool(-6)\n    True\n    >>> bool(0)\n    False\n    >>>\n</code></pre>\n<p>So, if I have a value of <code>x = -6</code>, and execute <code>if x: print(\"something\")</code> what do you think will happen?</p>\n<p><code>\"something\"</code> will be printed.</p>\n<p>You can use the function <code>bool()</code>, to convert <code>int</code> to a <code>bool</code> value.</p>\n<ul>\n<li><code>bool(6)</code> returns <code>True</code></li>\n<li><code>bool(-6)</code> returns <code>True</code></li>\n<li><code>bool(0)</code> returns <code>False</code>.</li>\n</ul>\n<p>Except for <code>bool(0)</code>, all the other results would be <code>True</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few puzzles related to the logical operators</li>\n<li>Looked at conversion functions such as <code>bool()</code> and <code>int()</code> to convert between boolean and integer data</li>\n</ul>\n<p><strong>Step 09:</strong></p>\n<p>In this step, let's look at two other important components of an <code>if</code> statement: <code>else</code> and <code>elif</code>. Let's start with <code>else</code>.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>Consider a scenario where <code>i</code> has a value of <code>2</code>. Let's try to print a message <code>\"i is even\"</code> if <code>i</code> is an even number. Otherwise, print <code>\"i is odd\"</code>.</p>\n<p>Earlier we wrote code along these lines: <code>if i % 2 == 0 : print(\"i is even\")</code>. However if this condition is not <code>True</code>, we would want to <code>print(\"i is odd\")</code>. How do we accomplish that?</p>\n<pre><code class=\"language-python\">    >>> i = 2\n    >>> if i%2 == 0:\n    ...   print(\"i is even\");\n    ... else:\n    ...   print(\"i is odd\");\n    ...\n    i is even\n</code></pre>\n<p>An <code>else</code> clause provides an alternative code body to execute, if the <code>if</code> condition is <code>False</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 3\n    >>> if i%2 == 0:\n    ...   print(\"i is even\");\n    ... else:\n    ...   print(\"i is odd\");\n    ...\n    i is odd\n</code></pre>\n<p>Let's look at <code>elif</code>.</p>\n<p>We want to do something if <code>i</code> has value of <code>3</code>, and something totally different if <code>i</code> has a value of <code>4</code>.</p>\n<p>In short, we want to specify 2 alternatives to the <code>if</code> condition. How can that be done?</p>\n<pre><code class=\"language-python\">    >>> if i==1:\n    ...   print(\"i is 1\")\n    ... elif i==2:\n    ...   print(\"i is 2\")\n    ... else:\n    ...   print(\"i is not 1 or 2\")\n    ...\n    i is not 1 or 2\n    >>>\n</code></pre>\n<p>That's where the <strong><code>elif</code></strong> clause comes into the picture. The code in <code>elif</code> is executed if the previous conditions are false and the current <code>elif</code> condition is true.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at two important components of the <code>if</code> statement: <code>else</code> and <code>elif</code>.</li>\n<li>Understood that the <code>elif</code> clauses and the final <code>else</code> clause provide alternative conditions to check, when earlier if conditions are true.</li>\n</ul>\n<p><strong>Step 10: Classroom Exercise CE-DT-02</strong></p>\n<p>In this step, let's do a simple exercise with <code>if</code>, <code>else</code> and <code>elif</code>.</p>\n<p>Before getting to the exercise, let's try and learn how to get console input from the user.</p>\n<p>Until now, we had been hard-coding all the data we were to use. Let's make that part more dynamic now.</p>\n<p><strong>Snippet-01:</strong></p>\n<p>How do we get input from the user? We want to get input from the console, and assign it to a variable. The way we can do that, is by statement <code>value = input()</code></p>\n<pre><code class=\"language-python\">    value = input(\"Enter a Value: \")\n    print(\"you entered \", value)\n</code></pre>\n<p>We can call the <code>input()</code> method with a text 'prompt', such as <code>\"Enter A Value: \"</code>. What we can initially do here, is print the value which was entered, back to the console, by <code>print(\"you entered \", integer_value)</code>.</p>\n<p>An interesting point to explore here, is the type of data input at the console.</p>\n<p>Let's do a <code>print(type(value))</code>.</p>\n<pre><code class=\"language-python\">    value = input(\"Enter a Value: \")\n    print(\"you entered \", value)\n    print(type(value))\n</code></pre>\n<p>Input a value of <code>Test</code>. It has a class of <code>str</code>.</p>\n<p>Let's run it again to see other possibilities. This time, let's enter a numeric value, say <code>12</code>. what would happen?</p>\n<p>We again get <code>str</code>.</p>\n<p>We want to get an integer value from the input. How can we do it?</p>\n<p><code>int()</code> function converts string to int. Let's use it.</p>\n<pre><code class=\"language-python\">value = input(\"Enter a Value: \")\ninteger_value = int(value)\nprint(\"you entered \", integer_value)\nprint(type(integer_value))\n</code></pre>\n<p>Let's run our code once again.</p>\n<p><code>\"Enter A Value: \"</code> is prompted, and we enter <code>15</code>. And now, of it says <code>\"You entered 15\"</code>, and the type it indicates to us, is <code>int</code>.</p>\n<p><strong>Design a menu</strong></p>\n<ul>\n<li>\n<p>Ask the User for input:</p>\n<ul>\n<li>Enter two numbers</li>\n<li>\n<p>Choose the Option:</p>\n<ul>\n<li>1 - Add</li>\n<li>2 - Subtract</li>\n<li>3 - Multiply</li>\n<li>4 - Divide</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Perform the Operation</li>\n<li>Publish the Result</li>\n</ul>\n<p>Let's design a menu, and then ask the user for input.</p>\n<p>We have codes for each of the operations : add is <code>1</code>, subtract is <code>2</code>, divide is <code>3</code>, and multiply is <code>4</code>.</p>\n<p>In the first version of the program let's get all the inputs and print them out.</p>\n<p><strong>Solution</strong></p>\n<p>The first version of the program is simple to write</p>\n<pre><code class=\"language-python\">number1 = int(input(\"Enter Number1: \"))\nnumber2 = int(input(\"Enter Number2: \"))\nprint(f\"You entered {number1}\")\nprint(f\"You entered {number2}\")\nprint(number1 + number2)\nprint(\"\\n\\n1 - Add\")\nprint(\"2 - Subtract\")\nprint(\"3 - Divide\")\nprint(\"4 - Multiply\")\nprint(\"5 - Exit\")\nchoice = int(input(\"Choose Operation: \"))\nprint(choice)\n</code></pre>\n<p>We will continue this exercise to complete it, in the next step.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at the in-built <code>input()</code> function that can read console input</li>\n<li>Learned that <code>input()</code> always returns what the user enters, as a string</li>\n<li>We can convert the string from <code>input()</code>, to the data type we expect by invoking conversion functions</li>\n</ul>\n<p><strong>Step 11: Continued - Classroom Exercise CE-DT-02</strong></p>\n<p><strong>Exercises</strong></p>\n<p>In the previous step, we got the input from the user. Let's continue the exercise in this step. We want to write an if condition.</p>\n<p><strong>Solution (Continued)</strong></p>\n<p>Extending the solution is easy. Write appropriate <code>if</code>, <code>elif</code> and <code>else</code> conditions.</p>\n<pre><code class=\"language-python\">number1 = int(input(\"Enter Number1: \"))\nnumber2 = int(input(\"Enter Number2: \"))\n\nprint(\"\\n\\n1 - Add\")\nprint(\"2 - Subtract\")\nprint(\"3 - Divide\")\nprint(\"4 - Multiply\")\n\nchoice = int(input(\"Choose Operation: \"))\n\n# print(number1 + number2)\n# print(choice)\nif choice==1:\n    result = number1 + number2\nelif choice==2:\n    result = number1 - number2\nelif choice==3:\n    result = number1 / number2\nelif choice==4:\n    result = number1 * number2\nelse:\n    result = \"Invalid Choice\"\n\nprint(result)\n</code></pre>\n<p>We added the following code to account for invalid input.</p>\n<pre><code class=\"language-python\">else:\n    result = \"Invalid Choice\"\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Augmented the Menu Exercise to get all the input from the console, and compute a value from them</li>\n<li>Corrected the logic to handle incorrect input</li>\n</ul>\n<p><strong>Step 12: Puzzles On Conditionals</strong></p>\n<p>In this step, let's look at a few puzzles related to these <code>if</code>, <code>elif</code> and <code>else</code> clauses.</p>\n<p><strong>Puzzle-01</strong></p>\n<p>Let's start with the first puzzle. Guess the output.</p>\n<pre><code class=\"language-python\">k = 15\nif (k > 20):\n  print(1)\nelif (k > 10):\n  print(2)\nelif (k &#x3C; 20):\n  print(3)\nelse:\n  print(4)\n</code></pre>\n<p>When we run it, you can see that the output is <code>2</code>.</p>\n<p><code>k</code> has a value of <code>15</code>, is it greater than <code>20</code>? No! Execution goes to the <code>elif</code>, is <code>k</code> greater then <code>10</code>? Yes. It prints <code>2</code> and goes out of the complete <code>if</code>-<code>else</code> block.</p>\n<p>Inside the <code>if</code> conditional, the <code>if</code>, <code>elif</code> and <code>else</code> clauses are all independent ones. Only one matching block is ever executed.</p>\n<p><strong>Puzzle-02</strong></p>\n<p>What do you think would be the output of this particular piece of code?</p>\n<pre><code class=\"language-python\">l = 15\n    if (l &#x3C; 20):\n        print(\"l&#x3C;20\")\nif (l > 20):\n    print(\"l>20\")\nelse:\n    print(\"Who am I?\")\n</code></pre>\n<p>Note that there are two totally different <code>if</code> conditions in here : <code>if l &#x3C; 20: ...</code> immediately followed by<code>if l > 20: ... else: ...</code>.</p>\n<p>The first <code>if</code> is true. <code>l&#x3C;20</code> is printed.</p>\n<p>The second <code>if</code> is a separate statement. The condition is false. So. <code>else</code> gets executed. Therefore, <code>\"who am I\"</code> gets printed.</p>\n<p><strong>Puzzle-03</strong></p>\n<p>Let's run this code.</p>\n<pre><code class=\"language-python\">m = 15\nif m>20:\n    if m&#x3C;20:\n        print(\"m>20\")\n    else:\n        print(\"Who am I?\")\n</code></pre>\n<p>You can see that nothing is printed.</p>\n<p>The most important thing to focus on here, is indentation.</p>\n<p>The second <code>if</code> block is executed only if the first <code>if</code> is true.</p>\n<p><strong>Puzzle-04</strong></p>\n<p>What would be the output?</p>\n<pre><code class=\"language-python\">number = 5\nif number &#x3C; 0:\n  number = number + 10\nnumber = number + 5\nprint(number)\n</code></pre>\n<p><code>10</code> is printed.</p>\n<p>The most important thing to focus on here, is indentation.</p>\n<p>Only <code>number = number + 10</code> is part of <code>if</code> block. It is not executed because the condition is false.</p>\n<p><code>number = number + 5</code> is not part of <code>if</code>. So, it gets executed.</p>\n<p>Let's add a couple of spaces before <code>number = number + 5</code>.</p>\n<p>What would be the output?</p>\n<pre><code class=\"language-python\">number = 5\nif number &#x3C; 0:\n  number = number + 10\n  number = number + 5\nprint(number)\n</code></pre>\n<p><code>5</code> is printed.</p>\n<p>Both the statements <code>number = number + 10</code> and <code>number = number + 5</code> are part of <code>if</code> block. They are not executed because the condition is false.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Looked at a few puzzles related to <code>if</code>, <code>elif</code> and <code>else</code></li>\n<li>Explored the importance of indentation and the different condition clauses inside an <code>if</code> statement</li>\n</ul>\n<p><strong>Step 01: The Python Type To Denote Text</strong></p>\n<p>Let's start looking at another important data type in Python, that's used to represent strings. Not surprisingly, it is in fact named <code>str</code>!</p>\n<p>Let's look at valid string representations.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello World\"\n    >>> message = 'Hello World'\n    >>> message = 'Hello World\"\n      File \"&#x3C;stdin>\", line 1\n        message = 'Hello World\"                          ^\n     SyntaxError: EOL while scanning string literal\n</code></pre>\n<p>In Python, you can use either ```<code>or</code>\"\"` to delimit string values.</p>\n<p><code>type()</code> method can be used to find type of a variable.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello World\"\n    >>> type(message)\n    &#x3C;class 'str'>\n</code></pre>\n<p>The <code>str</code> <code>class</code> provides a lot of utility methods.</p>\n<pre><code class=\"language-python\">    >>> message.upper()\n    'HELLO WORLD'\n    >>> message.lower()\n    'hello world'\n    >>> message = \"hello\"\n</code></pre>\n<p><code>message.capitalize()</code> does init caps. Only first character is changed to uppercase.</p>\n<pre><code class=\"language-python\">    >>> \"hello\".capitalize()\n    'Hello'\n    >>> 'hello'.capitalize()\n    'Hello'\n</code></pre>\n<p>You can also run this directly - <code>'hello'.capitalize()</code>. Isn't that cool!</p>\n<p>That's because each piece of text in python is an object of the <code>str</code> <code>class</code>, and we can directly call methods of that <code>class</code> on <code>str</code> objects.</p>\n<p>Now let's shift our attention to methods, which gives us more information about the specific contents of a string.</p>\n<ul>\n<li>We want to find out if this string contains numeric values?</li>\n<li>Does it contain alphabets only?</li>\n<li>Does it contain alpha-numeric values?</li>\n<li>Is it lowercase?</li>\n<li>Is it uppercase?</li>\n</ul>\n<p>To find if a piece of text contains only lower case alphabets.</p>\n<pre><code class=\"language-python\">    >>> 'hello'.islower()\n    True\n    >>> 'Hello'.islower()\n    False\n</code></pre>\n<p>If the first letter is in uppercase, then <code>istitle()</code> will return a <code>True</code> value.</p>\n<pre><code class=\"language-python\">    >>> 'Hello'.istitle()\n    True\n    >>> 'hello'.istitle()\n    False\n</code></pre>\n<p>To find if a piece of text contains only upper case alphabets.</p>\n<pre><code class=\"language-python\">    >>> 'hello'.isupper()\n    False\n    >>> 'Hello'.isupper()\n    False\n    >>> 'HELLO'.isupper()\n    True\n</code></pre>\n<p><code>isdigit()</code> checks if a string is a numeric value.</p>\n<pre><code class=\"language-python\">    >>> '123'.isdigit()\n    True\n    >>> 'A23'.isdigit()\n    False\n    >>> '2 3'.isdigit()\n    False\n    >>> '23'.isdigit()\n    True\n</code></pre>\n<p><code>isalpha()</code> checks if a string only contains alphabets.</p>\n<pre><code class=\"language-python\">    >>> '23'.isalpha()\n    False\n    >>> '2A'.isalpha()\n    False\n    >>> 'ABC'.isalpha()\n    True\n</code></pre>\n<p><code>isalnum()</code> checks if a string only contains alphabets and/or numerals.</p>\n<pre><code class=\"language-python\">    >>> 'ABC123'.isalnum()\n    True\n    >>> 'ABC 123'.isalnum()\n    False\n</code></pre>\n<p>Lastly, we look at things which you can use, to check characters of a string.</p>\n<p><code>endswith</code> is self explanatory.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.endswith('World')\n    True\n    >>> 'Hello World'.endswith('ld')\n    True\n    >>> 'Hello World'.endswith('old')\n    False\n    >>> 'Hello World'.endswith('Wo')\n    False\n</code></pre>\n<p><code>startswith</code> is self explanatory as well.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.startswith('Wo')\n    False\n    >>> 'Hello World'.startswith('He')\n    True\n    >>> 'Hello World'.startswith('Hell0')\n    False\n    >>> 'Hello World'.startswith('Hello')\n    True\n</code></pre>\n<p><code>find</code> method returns if a piece of text is present in another string. Returns the first match index.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.find('Hello')\n    0\n    >>> 'Hello World'.find('ello')\n    1\n</code></pre>\n<p>A value of <code>-1</code> is returned, if you're searching for something which is not present in the string.</p>\n<p>If you are searching for <code>'Ello'</code> with a capital <code>'E'</code> ,you'll not be able to find it. Search is case sensitive.</p>\n<pre><code class=\"language-python\">    >>> 'Hello World'.find('Ello')\n    -1\n    >>> 'Hello World'.find('bello')\n    -1\n    >>> 'Hello World'.find('Ello')\n    -1\n</code></pre>\n<p><strong>Step 02: Type Conversion Puzzles</strong></p>\n<p>We'll now try and convert values from one type to another, and try and play around with them.</p>\n<p><code>str</code> converts boolean value to a text value.</p>\n<pre><code class=\"language-python\">    >>> str(True)\n    'True'\n</code></pre>\n<p>All text value except for empty string represent True. So, <code>bool</code> returns True for everything except empty string.</p>\n<pre><code class=\"language-python\">    >>> bool('True')\n    True\n    >>> bool('true')\n    True\n    >>> bool('tru')\n    True\n    >>> bool('false')\n    True\n    >>> bool('False')\n    True\n    >>> bool('')\n    False\n</code></pre>\n<p>Let's try and convert a few integer values to strings.</p>\n<pre><code class=\"language-python\">    >>>str(123)\n    '123'\n    >>> str(12345)\n    '12345'\n    >>> str(12345.45678)\n    '12345.45678'\n</code></pre>\n<p>Let's do the reverse.</p>\n<pre><code class=\"language-python\">    >>> int('45')\n    45\n    >>> int('45.56')\n    ValueError: invalid literal for int()\n</code></pre>\n<p>if we do <code>int('45.56')</code>, you can see that it throws an error. It says “I cannot convert this to an <code>int</code>, as <code>45.56</code> is an invalid integer”.</p>\n<p>You can also pass an additional parameter to <code>int</code> indicating the numeric system - 16 for Hexa decimal, 8 for Octal etc. Default is 10 - Decimal.</p>\n<pre><code class=\"language-python\">    >>> int('45abc',16)\n    285372\n    >>> int('a',16)\n    10\n    >>> int('b',16)\n    11\n    >>> int('c',16)\n    12\n    >>> int('f',16)\n    15\n    >>> int('g',16)\n    ValueError: invalid literal for int() with base 16: 'g'\n</code></pre>\n<p>You can also convert string to float.</p>\n<pre><code class=\"language-python\">    >>> float(\"34.43\")\n    34.43\n    >>> float(\"34.43rer\")\n    ValueError: could not convert string to float: '34.43rer'\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this quick step, we looked at converting different types to strings, and converting strings to different types. So we looked at <code>int</code>, <code>bool</code> and <code>float</code> values, and we looked at how to convert them to string, and how to convert strings back to these specific types.</p>\n<p><strong>Step 02: Strings Are Immutable</strong></p>\n<p>In this step, let's learn an important fact about strings in Python.</p>\n<p>String values are immutable.</p>\n<p>What does immutability mean, and why do we say strings are immutable?</p>\n<p>Let's create a very simple string: <code>message = 'Hello'</code>, and we're saying <code>message.upper()</code>. But what does it do? It prints <code>'HELLO'</code>, with all characters in uppercase. Well, what would happen if you do <code>print(message)</code>? It says <code>'Hello'</code>.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello\"\n    >>> message.upper()\n    'HELLO'\n    >>> message\n    'Hello'\n</code></pre>\n<p>You would see we tried change the content of message, but it has not changed.</p>\n<p>When we execute <code>message.upper()</code>, a new string is created, and it is returned back. Original string remained unchanged. This is called immutability.</p>\n<p>Once you define a string in Python, you'll not be able to change the value of it.</p>\n<p>You can use - “OK. I can do something of this kind: <code>message = message.upper()</code>”.</p>\n<p>What would happen now?</p>\n<p>Will the value of <code>message</code> get changed? It prints <code>'HELLO'</code>, with all caps.</p>\n<p>Did the value of <code>message</code> change? Does this prove that strings are mutable?</p>\n<p>The important thing you need to understand about all this stuff, is how objects are stored inside Python.</p>\n<p>There are things called variables, and there are things called objects.</p>\n<p>When we run <code>message = 'Hello'</code></p>\n<ul>\n<li>We are creating one object of <code>str</code> class with a values <code>'Hello'</code>.</li>\n<li>We are creating one variable called <code>message</code></li>\n<li>The location of <code>'Hello'</code> is stored into <code>message</code></li>\n</ul>\n<p>In Python, your variables are nothing but a name.</p>\n<p>If location of <code>'Hello'</code> in memory is <code>A</code>, then the value stored in <code>message</code> is <code>A</code>. <code>message</code> is called a reference.</p>\n<p>What happens with <code>message = message.upper()</code>?</p>\n<p>A new object is created with value <code>'HELLO'</code> at a different location <code>B</code>.</p>\n<p>A reference ot location <code>B</code> is stored into <code>message</code> variable.</p>\n<p>Summary : The original value at location <code>A</code> has not changed and cannot be changed for <code>str</code> variables. Hence 'str' objects are immutable.</p>\n<p>Variables are just names referring to a location. They don't really contain the value. Variables contain a reference to the location that contains the object.</p>\n<p><strong>Step 03: Python Has No Separate Character Type</strong></p>\n<p>One of the things that surprises people new to Python, is that there is no character data type in Python.</p>\n<p>Typically we have text data types in all the languages, don't we? <code>'Hello World'</code> for example, is text data, and we stored it in <code>message</code>. This is called a string.</p>\n<p>In other languages, you would have something to represent a single character symbol. For example in Java, you can have a <code>char</code> data type, to store a single character <code>ch</code>, in which <code>'h'</code> is one character. But in Python, there is no separate data type to store single characters.</p>\n<p>For example, let's see how Python treats the first character of the following string <code>message</code>. The way you can access the first character of a string is by saying <code>message[0]</code>.</p>\n<pre><code class=\"language-python\">    >>> message = \"Hello World\"\n    >>> message[0]\n    'H'\n    >>> type(message[0])\n    &#x3C;class 'str'>\n    >>> type(message)\n    &#x3C;class 'str'>\n</code></pre>\n<p><code>type(message[0])</code> and <code>type(message)</code> print the same type <code>str</code>. No difference.</p>\n<p>In Python, whether you're talking about a string, or you're talking about a single character symbol, they are all represented by the same <code>class</code>, <code>str</code>.</p>\n<p><code>message[100]</code> throws an <code>IndexError</code>.</p>\n<pre><code class=\"language-python\">    >>> message[0]\n    'H'\n    >>> message[1]\n    'e'\n    >>> message[2]\n    'l'\n    >>> message[3]\n    'l'\n    >>> message[100]\n    IndexError: string index out of range\n</code></pre>\n<p>It says: “The given index is out of the range of the value of that specific string”.</p>\n<p>Let's say we would want to print all the characters in this string.</p>\n<p>The way you could do that, is by saying: <code>for ch in message: print(ch)</code>.</p>\n<p><strong>Summary</strong></p>\n<p>In this short step, we looked at the fact that there is no separate character class, or data type in Python. We also looked at how do we loop over a given string, and print all the characters present inside this string.</p>\n<p><strong>Step 04: The string module</strong></p>\n<p>In this step, we will introduce you to the <code>string</code> <code>module</code>.</p>\n<p>If we would want to use anything from a module in Python, you need to import that specific <code>module</code> into your program.</p>\n<pre><code class=\"language-python\">    >>> import string\n</code></pre>\n<p>If you do a <code>string.</code> and press , it would show the different things which are part of the <code>string</code> <code>module</code>.</p>\n<pre><code class=\"language-python\">    >>> string.\n    string.Formatter(       string.ascii_uppercase  string.octdigits\n    string.Template(        string.capwords(        string.printable\n    string.ascii_letters    string.digits           string.punctuation\n    string.ascii_lowercase  string.hexdigits        string.whitespace\n</code></pre>\n<p>Let's explore some of these.</p>\n<pre><code class=\"language-python\">    >>> string.ascii_letters\n    'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n    >>> string.ascii_lowercase\n    'abcdefghijklmnopqrstuvwxyz'\n    >>> string.ascii_uppercase\n    'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n    >>> string.digits\n    '0123456789'\n    >>> string.hexdigits\n    '0123456789abcdefABCDEF'\n    >>> string.punctuation\n    '!\"#$%&#x26;\\'()*+,-./:;&#x3C;=>?@[\\\\]^_`{|}~'\n    >>> string.ascii_letters\n    'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n</code></pre>\n<p>You have a set of printable characters, punctuation characters and a lot more.</p>\n<p>You can check a text value against any of these</p>\n<pre><code class=\"language-python\">    >>> 'a' in string.ascii_letters\n    True\n    >>> 'ab' in string.ascii_letters\n    True\n    >>> 'abc' in string.ascii_letters\n    True\n</code></pre>\n<p><code>in</code> operation on a string, checks if a given string.</p>\n<pre><code class=\"language-python\">    >>> '1' in '13579'\n    True\n    >>> '2' in '13579'\n    False\n    >>> '4' in '13579'\n    False\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we explored more exercises involving the <code>str</code> module of Python.</p>\n<p><strong>Step 05: More Exercises With The str Module</strong></p>\n<p>Let's start with an Exercise - find if a specific character is a vowel or not.</p>\n<pre><code class=\"language-python\">    >>> char = 'a'\n    >>> vowel_string = 'aeiouAEIOU'\n    >>> char in vowel_string\n    True\n    >>> char = 'b'\n    >>> char in vowel_string\n    False\n</code></pre>\n<p>he other thing you can do, is just have the capital vowels, or just the lowercase versions.</p>\n<pre><code class=\"language-python\">    >>> vowel_string = 'AEIOU'\n    >>> char.upper() in vowel_string\n    False\n    >>> char = 'a'\n    >>> char.upper() in vowel_string\n    True\n</code></pre>\n<p>Now let's move on to the next one.</p>\n<p>We want to find out and print all the capital alphabets, from <code>A</code> to <code>Z</code>.</p>\n<p>There was a small clue at the start of the previous step, regarding importing the <code>string</code> <code>module</code>. We did the <code>string</code> <code>module</code>, and we saw that <code>string</code> <code>module</code> contained a number of things.</p>\n<pre><code class=\"language-python\">    >>> string.ascii_uppercase\n    'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n    >>> for char in string.ascii_uppercase:\n    ...   print(char)\n    ...\n    A\n    B\n    C\n    D\n    E\n    F\n    G\n    H\n    I\n    J\n    K\n    L\n    M\n    N\n    O\n    P\n    Q\n    R\n    S\n    T\n    U\n    V\n    W\n    X\n    Y\n    Z\n</code></pre>\n<p>Try another easy exercise: print all the lower characters. Instead of <code>string.ascii_uppercase</code>, you have <code>string.ascii_lowercase</code>.</p>\n<pre><code class=\"language-python\">    >>> for char in string.ascii_lowercase:\n    ...   print(char)\n    ...\n    a\n    b\n    c\n    d\n    e\n    f\n    g\n    h\n    i\n    j\n    k\n    l\n    m\n    n\n    o\n    p\n    q\n    r\n    s\n    t\n    u\n    v\n    w\n    x\n    y\n    z\n</code></pre>\n<p>An even easier exercise, would be to print all the digits.</p>\n<pre><code class=\"language-python\">    >>> for char in string.\n    string.Formatter(       string.ascii_uppercase  string.octdigits\n    string.Template(        string.capwords(        string.printable\n    string.ascii_letters    string.digits           string.punctuation\n    string.ascii_lowercase  string.hexdigits        string.whitespace\n    >>> for char in string.digits:\n    ...   print(char)\n    ...\n    0\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n    >>>\n</code></pre>\n<p>The last exercise which we want to leave you with, is to check if something is a consonant.</p>\n<p>A consonant is an alphabet which is not a vowel, so any alphabet which is not in <code>'aeiou'</code> is a consonant. The simplest way of doing this is to say <code>consonant_string = 'bcdfghj...'</code> and so on. Looks like a very long solution? There is an easier way out.</p>\n<pre><code class=\"language-python\">    >>> vowel_string = 'aeiou'\n    >>> char = 'b'\n    >>> char.isalpha() and char.lower() not in vowel_string\n    True\n</code></pre>\n<p><strong>Step 06: More Exercises On Strings</strong></p>\n<p>In the step, let's look at a few more puzzles and exercises related to strings. Let's say we have a simple string, <code>string_example</code>, and this is contains an English sentence. <code>'This is a great thing.'</code></p>\n<p>Let's try to to print each of the words present in this string, on a separate line.</p>\n<p>So we would want to print <code>'This'</code>, <code>'is'</code>, <code>'a'</code>, <code>'great'</code> and <code>'thing'</code> on individual lines.</p>\n<p>One of the clues we'll give you is, try and do <code>string_example. &#x3C;TAB></code>. There are a huge list of methods, which would come up if you do that.</p>\n<pre><code class=\"language-python\">    >>> string_example = \"This is a great thing\"\n    >>> string_example.\n    string_example.capitalize(    string_example.join(\n    string_example.casefold(      string_example.ljust(\n    string_example.center(        string_example.lower(\n    string_example.count(         string_example.lstrip(\n    string_example.encode(        string_example.maketrans(\n    string_example.endswith(      string_example.partition(\n    string_example.expandtabs(    string_example.replace(\n    string_example.find(          string_example.rfind(\n    string_example.format(        string_example.rindex(\n    string_example.format_map(    string_example.rjust(\n    string_example.index(         string_example.rpartition(\n    string_example.isalnum(       string_example.rsplit(\n    string_example.isalpha(       string_example.rstrip(\n    string_example.isdecimal(     string_example.split(\n    string_example.isdigit(       string_example.splitlines(\n    string_example.isidentifier(  string_example.startswith(\n    string_example.islower(       string_example.strip(\n    string_example.isnumeric(     string_example.swapcase(\n    string_example.isprintable(   string_example.title(\n    string_example.isspace(       string_example.translate(\n    string_example.istitle(       string_example.upper(\n    string_example.isupper(       string_example.zfill(\n</code></pre>\n<p>One of the methods in the list is the <code>split()</code> method.</p>\n<pre><code class=\"language-python\">    >>> string_example.split()\n    ['This', 'is', 'a', 'great', 'thing']\n    >>> for word in string_example.split():\n    ...    print(word)\n    ...\n    This\n    is\n    a\n    great\n    thing\n</code></pre>\n<p><code>split_lines()</code> method looks for a <code>'\\n'</code>, and it divides the string based on it. If you have a string which contains newlines, and you would want to divide it into a number of strings with each line as a new element, the method you can use is <code>split_lines()</code>.</p>\n<pre><code class=\"language-python\">    >>> string_example = \"This\\nis\\n\\ngreat\\nthing\"\n    >>> print(string_example)\n    This\n    is\n\n    great\n    thing\n    >>> string_example = \"This\\nis\\na\\ngreat\\nthing\"\n    >>> print(string_example)\n    This\n    is\n    a\n    great\n    thing\n    >>> string_example.splitlines()\n    ['This', 'is', 'a', 'great', 'thing']\n    >>>\n</code></pre>\n<p>The last thing which we look at, is <strong>concatenation operator</strong>.</p>\n<pre><code class=\"language-python\">    >>> 1 + 2\n    3\n    >>> \"1\" + \"2\"\n    '12'\n    >>> \"1\" + 1\n    TypeError: must be str, not int\n    >>> \"ABC\" + \"DEF\"\n    'ABCDEF'\n</code></pre>\n<p>In Python, you cannot do <code>+</code> operator between two different types. <code>+</code> with two strings is concatenation. <code>+</code> with two numbers is addition.</p>\n<p>One other interesting operator on strings is multiplication. If you do a <code>'1' * 20</code>, What do you think will be the output?</p>\n<pre><code class=\"language-python\">    >>> 1 * 20\n    20\n    >>> '1' * 20\n    '11111111111111111111'\n    >>> 'A' * 10\n    'AAAAAAAAAA'\n</code></pre>\n<p>If you multiply a string with <code>number</code>, the string value is concatenated <code>number</code> times.</p>\n<p>The last thing which we look at in this step, is comparing strings.</p>\n<p>Let's say we have a string with a value <code>str = 'test'</code>, and you have another string to with a value <code>str1 = 'test1'</code>.</p>\n<p>We want to check whether both these strings are the same.</p>\n<pre><code class=\"language-python\">    >>> str = \"test\"\n    >>> str2 = \"test1\"\n    >>> str == str2\n    False\n    >>> str2 = \"test\"\n    >>> str == str2\n    True\n</code></pre>\n<p>You can compare strings using the <code>==</code> operator.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we explored a few exercises on strings, covering areas such as:</p>\n<ul>\n<li>Splitting a given sentence into individual words</li>\n<li>The concatenation operator, <code>+</code></li>\n<li>The string multiplication pattern, <code>*</code></li>\n<li>The use of the <code>==</code> operator to compare strings</li>\n</ul>\n<h4>Chapter 07 - Introducing Loops</h4>\n<p>Welcome to the section on Loops. In this section, we will look at a variety of loops that are available in Python. We will look mainly at the <strong><code>for</code></strong> loop, and the <strong><code>while</code></strong> loop.</p>\n<p><strong>Step 01: Revisited: The for Loop</strong></p>\n<p>Let's start with revising the basics of the for loop, we have learned in the previous steps.</p>\n<p>We saw that a <code>for</code> loop helps us to loop around the same set of code statements, many times over.</p>\n<p>Let's look at a few simple examples, once again.</p>\n<p><strong>Snippet-01</strong></p>\n<p>The syntax of a <code>for</code> loop is very simple.</p>\n<p>For example, this code snippet will tell you all about it: <code>for i in range(1, 11): print(i)</code>.</p>\n<p>What does this do? Very simple, it prints from <code>1</code> to <code>10</code>.</p>\n<p>In the call to the <code>range()</code> function, the second parameter is exclusive. We are actually looping from <code>1</code> to <code>10</code>, and this piece of code, <code>print(i)</code>, is being executed for different values of <code>i</code>.</p>\n<pre><code class=\"language-python\">    >>> for i in range(1,11):\n    ...   print(i)\n    ...\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n    10\n</code></pre>\n<p><code>for</code> loop can also be used to loop round the characters in a string.</p>\n<pre><code class=\"language-python\">    >>> for ch in \"Hello World\":\n    ...   print(ch)\n    ...\n    H\n    e\n    l\n    l\n    o\n    W\n    o\n    r\n    l\n    d\n</code></pre>\n<p><code>for</code> loop can be used to loop around all the words in a given sentence.</p>\n<pre><code class=\"language-python\">    >>> for word in \"Hello World\".split():\n    ...   print(word)\n    ...\n    Hello\n    World\n</code></pre>\n<p><code>for</code> loop can be used to loop around a specific list of values.</p>\n<pre><code class=\"language-python\">    >>> for item in (3, 6, 9):\n    ...   print(item)\n    ...\n    3\n    6\n    9\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we started with discussing and revising basic concepts about the <code>for</code> loop</p>\n<p><strong>Step 02: Programming Exercise PE-LO-01</strong></p>\n<p>Welcome back to this step, where we would do a lot of exercises with the <code>for</code> loop.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li>\n<p>The first exercise is to find out if a number is prime. We want to write a method, <code>is_prime()</code>, which accepts an integer value as parameter, and returns whether it's a prime. (<strong>Hint</strong>: A prime number is something which is only divisible by <code>1</code> and itself).</p>\n<ol>\n<li><code>5</code> is only divisible by <code>1</code> and <code>5</code>. It is not divisible by any other number. Same is the case with <code>7</code> and <code>11</code>.</li>\n<li>However, <code>6</code> is divisible by <code>1</code>, <code>2</code>, <code>3</code> and <code>6</code>. So it's not a prime number.</li>\n</ol>\n</li>\n<li>The second exercise is to write a method to calculate the sum up to a given integer, starting from <code>1</code>. <strong>Hint</strong>: If I would want to find that the sum up to <code>6</code>. what's needed is <code>1 + 2 + 3 + 4 + 5 + 6</code>.</li>\n<li>The third exercise is to find that the sum of divisors of a given integer. <strong>Hint</strong>: Let's say we want to find out the sum of the divisors of <code>15</code>. The divisors of <code>15</code> are <code>1</code>, <code>3</code>, <code>5</code> and <code>15</code>. So I would want to calculate <code>1 + 3 + 5 + 15</code>, and return that value.</li>\n<li>Fourth exercise is to print a numbered triangle, when given a specific integer.</li>\n</ol>\n<p>Hint: Given an input <code>5</code>, we would want to print the number triangle of these kind:</p>\n<pre><code class=\"language-python\">1\n1 2\n1 2 3\n1 2 3 4\n1 2 3 4 5.\n</code></pre>\n<p>These are the exercises for the <code>for</code> loop. We also test our skills, with creating method and executing them, in our IDE.</p>\n<p><strong>Solution 1</strong></p>\n<p>Let's start with creating the <code>is_prime()</code> method, in a file named <code>for_exercises</code>.</p>\n<p>We would want to accept an <code>int</code> parameter, and find out if it is prime, or not.</p>\n<p>We need to check whether it's divisible by any other number, other than <code>1</code> and itself. If we are passed in a value of <code>5</code>, you want to see if it's divisible by any of <code>2</code>, <code>3</code> or <code>4</code>.</p>\n<pre><code class=\"language-python\">def is_prime(number):\n</code></pre>\n<p>We can use a <code>for</code> loop. We can structure it like this: <code>for divisor in range(1, number): ...</code>. We would not want to divide it with <code>1</code>, but start with <code>2</code> instead, and go up to <code>number-1</code>, which is <code>4</code>.</p>\n<pre><code class=\"language-python\">for divisor in range(2,number):\n</code></pre>\n<p>How can we check if the <code>number</code> is divisible by <code>divisor</code>?</p>\n<p>By using the <code>%</code> operator. If <code>number</code> is divisible by <code>divisor</code> we return <code>False</code>.</p>\n<pre><code class=\"language-python\">for divisor in range(2,number):\n    if number % divisor == 0:\n        return False\n</code></pre>\n<p>What happens if the code comes up to the end? It would mean we tried with <code>2</code>, <code>3</code> and <code>4</code>, but <code>number</code> was not divisible by all of them. In that case, <code>number</code> would be prime, and we can safely return <code>True</code>.</p>\n<pre><code class=\"language-python\">for divisor in range(2,number):\n    if number % divisor == 0:\n        return False\n\nreturn True\n</code></pre>\n<p>For <code>1</code>, the rules are a little different, as it is neither a prime or composite. We will add an <code>if</code> condition to check if the number is <code>1</code>. <code>if(number &#x3C; 2):</code></p>\n<p>This <code>if</code> condition is called a guard check or a boundary check, to make sure that you are processing only the right input. If <code>number</code> has a value less than <code>2</code>, do nothing. OK, it's not a prime.</p>\n<p>Here is the entire code at one place, for your reference:</p>\n<pre><code class=\"language-python\">def is_prime(number):\n    if(number &#x3C; 2):\n        return False\n    for divisor in range(2,number):\n        if number % divisor == 0:\n            return False\n    return True\nprint(is_prime(5));\n</code></pre>\n<p><strong>Step 03: Continued - Programming Exercise PE-LO-01</strong></p>\n<p>In the previous step, we looked at solving the <code>is_prime()</code> exercise. In this step, let's look at an implementation of <code>sum_up_to_n()</code>. Here is the entire code for this exercise:</p>\n<pre><code class=\"language-python\">def sum_upto_n(number):\n    sum = 0\n    for i in range(1, number+1):\n        sum = sum + i\n    return sum\nprint(sum_upto_n(6))\nprint(sum_upto_n(10))\n</code></pre>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Wrote a Python function to compute the sum of all integers, from <code>1</code>, up to the input integer <code>n</code>.</li>\n</ul>\n<p><strong>Step 04: Continued - Programming Exercise PE-LO-01</strong></p>\n<p>Let's focus on the third exercise, <code>sum_of_divisors</code>.</p>\n<p>One of the clues we can give you, is that <code>sum_of_divisors()</code> is very similar to <code>is_prime()</code>.</p>\n<p>You want to find out if a number is dividing <code>15</code>, and if it's dividing <code>15</code>, with the remainder of <code>0</code>, then you need to add that up.</p>\n<pre><code class=\"language-python\">def calculate_sum_of_divisors(number):\n    sum = 0\n    if(number &#x3C; 2):\n        return sum\n    for divisor in range(1,number+1):\n        if number % divisor == 0:\n            sum = sum + divisor\n    return sum\nprint(calculate_sum_of_divisors(6))\nprint(calculate_sum_of_divisors(15))\n</code></pre>\n<p><strong>Step 05: Continued - Programming Exercise PE-LO-01</strong></p>\n<p>In this step, Let's look at the last exercise - <code>print_a_number_triangle</code>.</p>\n<p>For example, if we call such a function with input <code>5</code>, the output needs to be:</p>\n<pre><code class=\"language-python\">1\n\n1 2\n\n1 2 3\n\n1 2 3 4\n\n1 2 3 4 5\n</code></pre>\n<p>Let start with a simple thing. Let's try and print <code>1 2 3 4 5</code> first, and then we would look at how to print the rest of the output. Lets proceed with defining this method.</p>\n<p>We can say <code>def print_a_number_triangle(number): ...</code> that takes a number as an input. You want to print a sequence of integers starting from <code>1</code>, up to that specific <code>number</code>. How can you do that? Let's try this: <code>for i in range(1,number+1): print(i)</code> What would happen? Let's call <code>print_a_number_triangle(5)</code> now. It prints:</p>\n<pre><code class=\"language-python\">    1\n    2\n    3\n    4\n    5\n</code></pre>\n<p>on individual lines.</p>\n<p>To print this sequence on a single line, let's delimit them with <code>&#x3C;SPACE></code> instead. Call <code>print()</code> like this instead: <code>for i in range(1,number+1): print(i, end=\" \")</code>.</p>\n<p>Let's see what would happen now. <code>1 2 3 4 5</code></p>\n<p>To solve our exercise, we want to repeat this again and again.</p>\n<p>Yes, we need another for loop around it!</p>\n<pre><code class=\"language-python\">for j in range(1, number+1):\n    for i in range(1, number + 1):\n        print(i, end=\" \")\n</code></pre>\n<p>Make sure that you have the indentation right. This is called <code>loop within a loop</code>.</p>\n<p>The output of above program is</p>\n<p><code>1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5</code></p>\n<p>Let's add <code>print(\"\\n\")</code>, so we have a new line at the end of each outer loop iteration.</p>\n<pre><code class=\"language-python\">for j in range(1, number+1):\n    for i in range(1, number + 1):\n        print(i, end=\" \")\n    print(\"\\n\")\n</code></pre>\n<p>Output</p>\n<pre><code class=\"language-python\">1 2 3 4 5\n1 2 3 4 5\n1 2 3 4 5\n1 2 3 4 5\n1 2 3 4 5\n</code></pre>\n<p>We are printing a square, not a triangle.</p>\n<p>What we want to do is to print up to <code>1</code> in first line, upto <code>2</code> in second line and so on.</p>\n<p>How can we do that? Think about it.</p>\n<p>When you are inside this loop, you can see the variable <code>j</code>.</p>\n<p>Instead of <code>number+1</code>, let's say <code>j + 1</code>.</p>\n<p>When <code>j</code> has a value of <code>1</code>, <code>for</code> will print from <code>1</code> to <code>1</code>. When <code>j</code> has a value of <code>2</code>, print from <code>1</code> to <code>2</code>, literally printing <code>1 2</code>. When j has a value of <code>3</code>, I'll print from <code>1</code> to <code>3</code>. Let's try this and see what would happen.</p>\n<pre><code class=\"language-python\">for j in range(1, number+1):\n    for i in range(1, j + 1):\n        print(i, end=\" \")\n    print(\"\\n\")\n</code></pre>\n<p>You can see that our number triangle is ready!</p>\n<pre><code class=\"language-python\">1\n\n1 2\n\n1 2 3\n\n1 2 3 4\n\n1 2 3 4 5\n</code></pre>\n<p>Here is the entire code for you:</p>\n<pre><code class=\"language-python\">def print_a_number_triangle(number):\n    for j in range(1, number + 1):\n        for i in range(1, j + 1):\n            print(i, end=' ')\n        print()\nprint_a_number_triangle(6)\n</code></pre>\n<p>An important point to note is, a couple of these things can be done in a much simpler way. We will look at these options when we talk about functional programming.</p>\n<p><strong>Summary</strong></p>\n<p>In this step, we:</p>\n<ul>\n<li>Presented a solution to the exercise for printing a number triangle.</li>\n</ul>\n<p><strong>Step 06: Introducing The while Loop</strong></p>\n<p>Let's look at one of the other loops which is present in Python, called the <strong><code>while</code></strong> loop.</p>\n<p>In the <code>for</code> loop, we can specify the range of our iteration, by using the <code>range()</code> function.</p>\n<p>In a <code>while</code> loop, we specify a logical condition. While the condition is true, loop continues running.</p>\n<p>Do you remember one place where we use the condition until now? It was in an <code>if</code> statement.</p>\n<p>Let's see how to use a simple <code>while</code> loop.</p>\n<p><strong>Snippet-01:</strong></p>\n<pre><code class=\"language-python\">    >>> i = 5\n    >>> if i == 5:\n    ...   print(\"i is 5\")\n    ...\n    i is 5\n</code></pre>\n<p>Let's say <code>i</code> has a value of <code>0</code>, and we then do: <code>while i &#x3C; 5: print(i)</code>.</p>\n<pre><code class=\"language-python\">    >>> i = 0\n    >>> while i &#x3C; 5:\n    ...   print(i)\n    ...\n    0\n    0\n    0\n    0\n    0\n    0\n    0\n    0\n    ^CTraceback (most recent call last):\n      File \"&#x3C;stdin>\", line 2, in &#x3C;module>\n    KeyboardInterrupt\n    >>>\n    KeyboardInterrupt\n</code></pre>\n<p>If we leave it to run, you'd see that it continuously prints <code>0</code> again, and again. Let's do a <code>&#x3C;CTRL-C></code> or <code>&#x3C;COMMAND-C></code> to interrupt this.</p>\n<p>What is happening here?</p>\n<p>Initially <code>i</code> is <code>0</code>, and the condition <code>i &#x3C; 5</code> is <code>True</code>, and <code>print(i)</code> is executed. Next iteration, it checks the condition, it is <code>True</code>, and <code>0</code> is printed. This continues to happen. What's happening is an <strong>infinite loop</strong>.</p>\n<p>One of the important things to make sure in a <code>while</code> loop, is to increment the value of <code>i</code>. We need to say something like <code>i = i + 1</code>.</p>\n<pre><code class=\"language-python\">    >>> while i &#x3C; 5:\n    ...   print(i)\n    ...   i = i + 1\n    ...\n    0\n    1\n    2\n    3\n    4\n</code></pre>\n<p>So how does it work? *<code>i</code> initially had a value of <code>0</code>. First the condition is checked. It's <code>True</code>, so <code>0</code> is printed and then the value of <code>i</code> is incremented to <code>1</code>.</p>\n<ul>\n<li><code>i</code> is still less than <code>5</code>, so the loop continues to execute, and this happens until <code>4</code> is printed. <code>i</code> again gets incremented to <code>4 + 1</code>, or <code>5</code>.</li>\n<li>Then we check the condition <code>i &#x3C; 5</code>. This is now <code>False</code>. Control goes out of the <code>while</code> loop, and terminates it.</li>\n</ul>\n<p>When executing a <code>while</code>, control flow is just based on a condition. As long as the condition is <code>True</code>, we keep executing the code. An important thing to remember, is to make sure the control variable is updated.</p>\n<pre><code class=\"language-python\">    >>> for i in range(0,5): print(i)\n    ...\n    0\n    1\n    2\n    3\n    4\n</code></pre>\n<p>A <code>for</code> loop is much simpler to code than a <code>while</code>. With <code>while</code>, we have to write an expression statement, to increment the value.</p>\n<p>The question you might have is - What are the situations when you should use a while?</p>\n<p>We will look at that very soon.</p>\n<p><strong>Summary</strong></p>\n<p>In this video, we:</p>\n<ul>\n<li>Were introduced to the concept of a <code>while</code> loop in Python</li>\n<li>Understood the importance of a control variable being incremented inside the loop</li>\n<li>Observed differences between the working of a <code>while</code>, and a <code>for</code> loop</li>\n</ul>\n<p><strong>Step 07: Programming Exercise PE-LO-02</strong></p>\n<p>In the previous step, we were introduced to <code>while</code> loop. In this step, let's look at a couple of exercises using the <code>while</code> loop.</p>\n<p><strong>Exercises</strong></p>\n<ol>\n<li><code>print_squares_upto_limit(30)</code>: We need to print all the squares of numbers, up to a limit of <code>30</code>. The output needs to be <code>1 4 9 16 25</code>.</li>\n<li><code>print_cubes_upto_limit(30)</code>: We need to print all the cubes of numbers, up to a limit of <code>30</code>.The output needs to be 1 8 27.</li>\n</ol>\n<p><strong>Exercise 1: Solution</strong></p>\n<p>Here is the entire code for your reference:</p>\n<pre><code class=\"language-python\">def print_squares_upto_limit(limit):\n    i = 1\n    while i * i &#x3C; limit:\n        print(i*i, end = \" \")\n        i = i + 1\n</code></pre>\n<p>Now the next exercise, was to print cubes up to a limit.</p>\n<p>The expression in the <code>while</code> condition should now be <code>i*i*i &#x3C; 30</code>.</p>\n<pre><code class=\"language-python\">def print_cubes_upto_limit(limit):\n    i = 1\n    while i * i * i &#x3C; limit:\n        print(i*i*i, end = \" \")\n        i = i + 1\nprint_cubes_upto_limit(80)\n</code></pre>\n<p>Could we have implemented above two examples with <code>for</code> loop? It would've been a little more difficult.</p>\n<p>Typically, we use a <code>for</code> loop when we know how many times the loop will be executed is clear at the start.</p>\n<p>If we do not know, how many times a loop will run, <code>while</code> is a better option.</p>\n<p><strong>Step 08: While Example</strong></p>\n<p>Earlier we used <code>if</code> statement to implement a solution for this:</p>\n<ul>\n<li>\n<p>Ask the User for input:</p>\n<ul>\n<li>Enter two numbers</li>\n<li>\n<p>Choose the Option:</p>\n<ul>\n<li>1 - Add</li>\n<li>2 - Subtract</li>\n<li>3 - Multiply</li>\n<li>4 - Divide</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Perform the Operation</li>\n<li>Publish the Result</li>\n</ul>\n<p>We would want to enhance it to execute in a loop multiple times, until the user chooses to exit. We will add an option 5 - Exit.</p>\n<ul>\n<li>\n<p>Ask the User for input:</p>\n<ul>\n<li>Enter two numbers</li>\n<li>\n<p>Choose the Option:</p>\n<ul>\n<li>1 - Add</li>\n<li>2 - Subtract</li>\n<li>3 - Multiply</li>\n<li>4 - Divide</li>\n<li>5 - Exit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Perform the Operation</li>\n<li>Publish the Result</li>\n<li>Repeat until Option 5 is chosen.</li>\n</ul>\n<p><strong>Snippet-01 Explained</strong></p>\n<p>Here's the earlier code we wrote with if:</p>\n<pre><code class=\"language-python\">number1 = int(input(\"Enter Number1: \"))\nnumber2 = int(input(\"Enter Number2: \"))\n\nprint(\"\\n\\n1 - Add\")\nprint(\"2 - Subtract\")\nprint(\"3 - Divide\")\nprint(\"4 - Multiply\")\n\nchoice = int(input(\"Choose Operation: \"))\n\n# print(number1 + number2)\n# print(choice)\nif choice==1:\n    result = number1 + number2\nelif choice==2:\n    result = number1 - number2\nelif choice==3:\n    result = number1 / number2\nelif choice==4:\n    result = number1 * number2\nelse:\n    result = \"Invalid Choice\"\n\nprint(result)\n</code></pre>"},{"url":"/readme/","relativePath":"readme.md","relativeDir":"","base":"readme.md","name":"readme","frontmatter":{"title":"README","subtitle":"for this website","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"page","image":"images/bgoonzblog20-a6a3bfc3.png"},"html":"<h1 align=\"center\">Hi 👋, I'm Bryan</h1>\n<hr>\n<div align=\"center\">\n<p><img src=\"https://komarev.com/ghpvc/?username=bgoonz\"></p>\n<h1><a href=\"https://bgoonz-blog.netlify.app/\">WEBSITE</a></h1>\n<h1>Search Website: <a href=\"https://www.algolia.com/realtime-search-demo/web-dev-resource-hub-9e6b8aa8-6106-44c5-9f59-ff3f9531abd4\">search</a></h1>\n<h2><a href=\"https://bgoonzblog20-backup.netlify.app/#gsc.tab=0\">Backup Repo Deploy</a></h2>\n<h2><a href=\"https://bgoonz.github.io/BGOONZ_BLOG_2.0/\">Github pages</a></h2>\n<p><img src=\"https://views.whatilearened.today/views/github/bgoonz/views.svg\" alt=\"Profile views\"><a href=\"https://gitter.im/bgoonz/community?utm_source=badge&#x26;utm_medium=badge&#x26;utm_campaign=pr-badge\"><img src=\"https://badges.gitter.im/bgoonz/community.svg\" alt=\"Gitter\"></a></p>\n<p><a href=\"https://app.netlify.com/sites/best-celery-b2d7c/deploys\"><img src=\"https://api.netlify.com/api/v1/badges/a1b7ee1a-11a7-4bd2-a341-2260656e216f/deploy-status\" alt=\"Netlify Status\"></a></p>\n<p><a href=\"https://codescene.io/projects/17026\"><img src=\"https://codescene.io/projects/17026/status-badges/system-mastery\" alt=\"CodeScene System Mastery\"></a></p>\n<p><img src=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/iframes.gif?raw=true\" alt=\"Demo\"></p>\n<h1>Homepage</h1>\n<p><img src=\"./static/images/bgoonzblog20.png\" alt=\"Homepage\"></p>\n</div>\n<h1>Technologies used</h1>\n<h2><a href=\"https://trends.builtwith.com/analytics/Global-Site-Tag\">Global Site Tag</a></h2>\n<p><a href=\"https://trends.builtwith.com/analytics/Global-Site-Tag\">Global Site Tag Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Global-Site-Tag\">Download List of All Websites using Global Site Tag</a></p>\n<p>Google's primary tag for Google Measurement/Conversion Tracking, Adwords and DoubleClick.</p>\n<h2><a href=\"https://trends.builtwith.com/analytics/Google-Analytics\">Google Analytics</a></h2>\n<p><a href=\"https://trends.builtwith.com/analytics/Google-Analytics\">Google Analytics Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Analytics\">Download List of All Websites using Google Analytics</a></p>\n<p>Google Analytics offers a host of compelling features and benefits for everyone from senior executives and advertising and marketing professionals to site owners and content developers.</p>\n<p><a href=\"https://trends.builtwith.com/analytics/application-performance\">Application Performance</a> - <a href=\"https://trends.builtwith.com/analytics/audience-measurement\">Audience Measurement</a> - <a href=\"https://trends.builtwith.com/analytics/visitor-count-tracking\">Visitor Count Tracking</a></p>\n<h5><a href=\"https://trends.builtwith.com/analytics/Google-Analytics-4\">Google Analytics 4</a></h5>\n<p><a href=\"https://trends.builtwith.com/analytics/Google-Analytics-4\">Google Analytics 4 Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Analytics-4\">Download List of All Websites using Google Analytics 4</a></p>\n<p>Google Analytics 4 formerly known as App + Web is a new version of Google Analytics that was released in October 2020.</p>\n<h6>Widgets</h6>\n<p><a href=\"https://trends.builtwith.com/widgets\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/widgets/Imgur\">Imgur</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/Imgur\">Imgur Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Imgur\">Download List of All Websites using Imgur</a></p>\n<p>The page contains content from image sharing website imgur.</p>\n<h2><a href=\"https://trends.builtwith.com/widgets/Google-Font-API\">Google Font API</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/Google-Font-API\">Google Font API Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Font-API\">Download List of All Websites using Google Font API</a></p>\n<p>The Google Font API helps you add web fonts to any web page.</p>\n<p><a href=\"https://trends.builtwith.com/widgets/fonts\">Fonts</a></p>\n<h2><a href=\"https://trends.builtwith.com/widgets/Google-Tag-Manager\">Google Tag Manager</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/Google-Tag-Manager\">Google Tag Manager Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Tag-Manager\">Download List of All Websites using Google Tag Manager</a></p>\n<p>Tag management that lets you add and update website tags without changes to underlying website code.</p>\n<p><a href=\"https://trends.builtwith.com/widgets/tag-management\">Tag Management</a></p>\n<h2><a href=\"https://trends.builtwith.com/widgets/Icons8\">Icons8</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/Icons8\">Icons8 Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Icons8\">Download List of All Websites using Icons8</a></p>\n<p>Icons, photos and illustrations.</p>\n<p><a href=\"https://trends.builtwith.com/widgets/image-provider\">Image Provider</a></p>\n<h2><a href=\"https://trends.builtwith.com/widgets/Lorem-Ipsum\">Lorem Ipsum</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/Lorem-Ipsum\">Lorem Ipsum Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Lorem-Ipsum\">Download List of All Websites using Lorem Ipsum</a></p>\n<p>This website contains the phrase 'lorem ipsum' which means it may have placeholder text.</p>\n<h2><a href=\"https://trends.builtwith.com/widgets/AddThis\">AddThis</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/AddThis\">AddThis Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/AddThis\">Download List of All Websites using AddThis</a></p>\n<p>Widgets that allow visitors to save and promote the site.</p>\n<p><a href=\"https://trends.builtwith.com/widgets/social-sharing\">Social Sharing</a> - <a href=\"https://trends.builtwith.com/widgets/bookmarking\">Bookmarking</a></p>\n<h2><a href=\"https://trends.builtwith.com/widgets/tawk.to\">tawk.to</a></h2>\n<p><a href=\"https://trends.builtwith.com/widgets/tawk.to\">tawk.to Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/tawk.to\">Download List of All Websites using tawk.to</a></p>\n<p>tawk.to is a free live chat app that lets you monitor and chat with visitors.</p>\n<p><a href=\"https://trends.builtwith.com/widgets/live-chat\">Live Chat</a></p>\n<h6>Frameworks</h6>\n<p><a href=\"https://trends.builtwith.com/framework\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/framework/Gatsby-JS\">Gatsby JS</a></h2>\n<p><a href=\"https://trends.builtwith.com/framework/Gatsby-JS\">Gatsby JS Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Gatsby-JS\">Download List of All Websites using Gatsby JS</a></p>\n<p>Modern website and web apps generator for React.</p>\n<h6>Mobile</h6>\n<p><a href=\"https://trends.builtwith.com/mobile\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/mobile/Viewport-Meta\">Viewport Meta</a></h2>\n<p><a href=\"https://trends.builtwith.com/mobile/Viewport-Meta\">Viewport Meta Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Viewport-Meta\">Download List of All Websites using Viewport Meta</a></p>\n<p>This page uses the viewport meta tag which means the content may be optimized for mobile content.</p>\n<h2><a href=\"https://trends.builtwith.com/mobile/IPhone---Mobile-Compatible\">IPhone / Mobile Compatible</a></h2>\n<p><a href=\"https://trends.builtwith.com/mobile/IPhone---Mobile-Compatible\">IPhone / Mobile Compatible Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/IPhone---Mobile-Compatible\">Download List of All Websites using IPhone / Mobile Compatible</a></p>\n<p>The website contains code that allows the page to support IPhone / Mobile Content.</p>\n<h2><a href=\"https://trends.builtwith.com/mobile/Apple-Mobile-Web-Clips-Icon\">Apple Mobile Web Clips Icon</a></h2>\n<p><a href=\"https://trends.builtwith.com/mobile/Apple-Mobile-Web-Clips-Icon\">Apple Mobile Web Clips Icon Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Apple-Mobile-Web-Clips-Icon\">Download List of All Websites using Apple Mobile Web Clips Icon</a></p>\n<p>This page contains an icon for iPhone, iPad and iTouch devices.</p>\n<h6>Content Delivery Network</h6>\n<p><a href=\"https://trends.builtwith.com/cdn\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/cdn/AJAX-Libraries-API\">AJAX Libraries API</a></h2>\n<p><a href=\"https://trends.builtwith.com/cdn/AJAX-Libraries-API\">AJAX Libraries API Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/AJAX-Libraries-API\">Download List of All Websites using AJAX Libraries API</a></p>\n<p>The AJAX Libraries API is a content distribution network and loading architecture for the most popular, open source JavaScript libraries.</p>\n<h2><a href=\"https://trends.builtwith.com/cdn/jsDelivr\">jsDelivr</a></h2>\n<p><a href=\"https://trends.builtwith.com/cdn/jsDelivr\">jsDelivr Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/jsDelivr\">Download List of All Websites using jsDelivr</a></p>\n<p>A free CDN where Javascript developers can host their files. Encompasses MaxCDN, and BootstrapCDN.</p>\n<h2><a href=\"https://trends.builtwith.com/cdn/CloudFront\">CloudFront</a></h2>\n<p><a href=\"https://trends.builtwith.com/cdn/CloudFront\">CloudFront Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/CloudFront\">Download List of All Websites using CloudFront</a></p>\n<p>Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services to give developers and businesses an easy way to distribute content to end users with low latency, high data transfer speeds, and no commitments.</p>\n<h6>Content Management System</h6>\n<p><a href=\"https://trends.builtwith.com/cms\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/cms/Netlify\">Netlify</a></h2>\n<p><a href=\"https://trends.builtwith.com/cms/Netlify\">Netlify Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Netlify\">Download List of All Websites using Netlify</a></p>\n<p>Netlify is a platform that automates your code to create web sites.</p>\n<h6>JavaScript Libraries and Functions</h6>\n<p><a href=\"https://trends.builtwith.com/javascript\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/javascript/Google-Hosted-Libraries\">Google Hosted Libraries</a></h2>\n<p><a href=\"https://trends.builtwith.com/javascript/Google-Hosted-Libraries\">Google Hosted Libraries Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Hosted-Libraries\">Download List of All Websites using Google Hosted Libraries</a></p>\n<p>Google Hosted Libraries is a globally available content distribution network for the most popular, open-source JavaScript libraries.</p>\n<h5><a href=\"https://trends.builtwith.com/javascript/Google-Hosted-jQuery\">Google Hosted jQuery</a></h5>\n<p><a href=\"https://trends.builtwith.com/javascript/Google-Hosted-jQuery\">Google Hosted jQuery Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Hosted-jQuery\">Download List of All Websites using Google Hosted jQuery</a></p>\n<p>jQuery hoted at Google.</p>\n<h6>Advertising</h6>\n<p><a href=\"https://trends.builtwith.com/ads\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/ads/Google-Adsense\">Google Adsense</a></h2>\n<p><a href=\"https://trends.builtwith.com/ads/Google-Adsense\">Google Adsense Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Adsense\">Download List of All Websites using Google Adsense</a></p>\n<p>A contextual advertising solution for delivering Google AdWords ads that are relevant to site content pages.</p>\n<p><a href=\"https://trends.builtwith.com/ads/contextual-advertising\">Contextual Advertising</a></p>\n<h5><a href=\"https://trends.builtwith.com/ads/Google-Adsense-Asynchronous\">Google Adsense Asynchronous</a></h5>\n<p><a href=\"https://trends.builtwith.com/ads/Google-Adsense-Asynchronous\">Google Adsense Asynchronous Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Adsense-Asynchronous\">Download List of All Websites using Google Adsense Asynchronous</a></p>\n<p>Fully asynchronous version of the AdSense ad code.</p>\n<h6>Document Encoding</h6>\n<p><a href=\"https://trends.builtwith.com/encoding\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/encoding/UTF-8\">UTF-8</a></h2>\n<p><a href=\"https://trends.builtwith.com/encoding/UTF-8\">UTF-8 Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/UTF-8\">Download List of All Websites using UTF-8</a></p>\n<p>UTF-8 (8-bit UCS/Unicode Transformation Format) is a variable-length character encoding for Unicode. It is the preferred encoding for web pages.</p>\n<h6>Document Standards</h6>\n<p><a href=\"https://trends.builtwith.com/docinfo\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/HTML5-DocType\">HTML5 DocType</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/HTML5-DocType\">HTML5 DocType Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/HTML5-DocType\">Download List of All Websites using HTML5 DocType</a></p>\n<p>The DOCTYPE is a required preamble for HTML5 websites.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Cascading-Style-Sheets\">Cascading Style Sheets</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Cascading-Style-Sheets\">Cascading Style Sheets Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Cascading-Style-Sheets\">Download List of All Websites using Cascading Style Sheets</a></p>\n<p>Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in a markup language. Its most common application is to style web pages written in HTML</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Open-Graph-Protocol\">Open Graph Protocol</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Open-Graph-Protocol\">Open Graph Protocol Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Open-Graph-Protocol\">Download List of All Websites using Open Graph Protocol</a></p>\n<p>The Open Graph protocol enables any web page to become a rich object in a social graph, a open protocol supported by Facebook</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Twitter-Cards\">Twitter Cards</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Twitter-Cards\">Twitter Cards Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Twitter-Cards\">Download List of All Websites using Twitter Cards</a></p>\n<p>Twitter cards make it possible for you to attach media experiences to Tweets that link to your content.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Javascript\">Javascript</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Javascript\">Javascript Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Javascript\">Download List of All Websites using Javascript</a></p>\n<p>JavaScript is a scripting language most often used for client-side web development.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/IFrame\">IFrame</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/IFrame\">IFrame Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/IFrame\">Download List of All Websites using IFrame</a></p>\n<p>The page shows content with an iframe; an embedded frame that loads another webpage.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Font-Face-Rule\">Font Face Rule</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Font-Face-Rule\">Font Face Rule Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Font-Face-Rule\">Download List of All Websites using Font Face Rule</a></p>\n<p>The @font-face rule allows for linking to fonts that are automatically activated when needed.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/X-UA-Compatible\">X-UA-Compatible</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/X-UA-Compatible\">X-UA-Compatible Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/X-UA-Compatible\">Download List of All Websites using X-UA-Compatible</a></p>\n<p>Allows a website to define how a page is rendered in Internet Explorer 8, allowing a website to decide to use IE7 style rendering over IE8 rendering.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Meta-Keywords\">Meta Keywords</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Meta-Keywords\">Meta Keywords Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Meta-Keywords\">Download List of All Websites using Meta Keywords</a></p>\n<p>Meta tag containing keywords related to the page.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Meta-Description\">Meta Description</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Meta-Description\">Meta Description Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Meta-Description\">Download List of All Websites using Meta Description</a></p>\n<p>The description attribute provides a concise explanation of the page content.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/HTML-5-Specific-Tags\">HTML 5 Specific Tags</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/HTML-5-Specific-Tags\">HTML 5 Specific Tags Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/HTML-5-Specific-Tags\">Download List of All Websites using HTML 5 Specific Tags</a></p>\n<p>This page contains tags that are specific to an HTML 5 implementation.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/WAI-ARIA\">WAI-ARIA</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/WAI-ARIA\">WAI-ARIA Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/WAI-ARIA\">Download List of All Websites using WAI-ARIA</a></p>\n<p>A way to make Web content and Web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface controls developed with Ajax, HTML, JavaScript, and related technologies.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/Strict-Transport-Security\">Strict Transport Security</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/Strict-Transport-Security\">Strict Transport Security Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Strict-Transport-Security\">Download List of All Websites using Strict Transport Security</a></p>\n<p>The HTTP Strict-Transport-Security (HSTS) header instructs the browser to only use https.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/HSTS\">HSTS</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/HSTS\">HSTS Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/HSTS\">Download List of All Websites using HSTS</a></p>\n<p>Forces browsers to only communicate with the site using HTTPS.</p>\n<h2><a href=\"https://trends.builtwith.com/docinfo/HSTS-IncludeSubdomains-PreLoad\">HSTS IncludeSubdomains PreLoad</a></h2>\n<p><a href=\"https://trends.builtwith.com/docinfo/HSTS-IncludeSubdomains-PreLoad\">HSTS IncludeSubdomains PreLoad Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/HSTS-IncludeSubdomains-PreLoad\">Download List of All Websites using HSTS IncludeSubdomains PreLoad</a></p>\n<p>This website includes instructions for HSTS loading that would allow it to be submitted to the HSTS preload list.</p>\n<h6>Web Master Registration</h6>\n<p><a href=\"https://trends.builtwith.com/web-master\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/Web-Master/Google-Webmaster\">Google Webmaster</a></h2>\n<p><a href=\"https://trends.builtwith.com/Web-Master/Google-Webmaster\">Google Webmaster Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Google-Webmaster\">Download List of All Websites using Google Webmaster</a></p>\n<p>Webmaster tools provide you with a free and easy way to make your site more Google-friendly.</p>\n<h6>Content Delivery Network</h6>\n<p><a href=\"https://trends.builtwith.com/cdn\">View Global Trends</a></p>\n<h2><a href=\"https://trends.builtwith.com/CDN/Content-Delivery-Network\">Content Delivery Network</a></h2>\n<p><a href=\"https://trends.builtwith.com/CDN/Content-Delivery-Network\">Content Delivery Network Usage Statistics</a> - <a href=\"https://trends.builtwith.com/websitelist/Content-Delivery-Network\">Download List of All Websites using Content Delivery Network</a></p>\n<p>This page contains links that give the impression that some of the site contents are stored on a content delivery network.</p>\n<h2>Docs Structure</h2>\n<pre><code>.\n\n├── ./About\n\n│   ├── ./About/index.md\n\n│   ├── ./About/introduction2bg.md\n\n│   ├── ./About/me.md\n\n│   └── ./About/resume.md\n\n├── ./articles\n\n│   ├── ./articles/algo.md\n\n│   └── ./articles/basic-web-dev.md\n\n├── ./faq\n\n│   ├── ./faq/Contact.md\n\n│   ├── ./faq/index.md\n\n│   └── ./faq/other-sites.md\n\n├── ./index.md\n\n├── ./jupyter-notebooks.md\n\n├── ./links\n\n│   ├── ./links/Social.md\n\n│   ├── ./links/index.md\n\n│   └── ./links/my-websites.md\n\n├── ./portfolio-web.md\n\n├── ./python.md\n\n├── ./quick-reference\n\n│   ├── ./quick-reference/Emmet.md\n\n│   ├── ./quick-reference/index.md\n\n│   ├── ./quick-reference/installation.md\n\n│   └── ./quick-reference/new-repo-instructions.md\n\n├── ./react\n\n│   ├── ./react/createReactApp.md\n\n│   ├── ./react/index.md\n\n│   └── ./react/react2.md\n\n├── ./resources.md\n\n└── ./tools\n\n    ├── ./tools/Git-Html-Preview.md\n\n    ├── ./tools/default-readme.md\n\n    ├── ./tools/index.md\n\n    ├── ./tools/notes-template.md\n\n    └── ./tools/plug-ins.md\n\n\n\n7 directories, 29 files\n</code></pre>\n<hr>\n<h1>Sitemap</h1>\n<ul>\n<li><a href=\"https://bgoonz-blog.netlify.app/job-hunt/\">/job-hunt/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/notes-template/\">/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/\">/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/showcase/\">/showcase/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/\">/blog/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/review/\">/review/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/blog-archive/\">/blog/blog-archive/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/my-medium/\">/blog/my-medium/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/blogwcomments/\">/blog/blogwcomments/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/data-structures/\">/blog/data-structures/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/gallery/\">/docs/gallery/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python-for-js-dev/\">/blog/python-for-js-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/platform-docs/\">/blog/platform-docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/sitemap/\">/docs/sitemap/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/me/\">/docs/about/me/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python-resources/\">/blog/python-resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/resume/\">/docs/about/resume/</a></li>\n<li><a href=\"https://preview--bgoonz-b2d7c.stackbit.https://bgoonz-blog.netlify.app/log/web-scraping/\">/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/\">/docs/about/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/algo/\">/docs/articles/algo/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/install/\">/docs/articles/install/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/\">/docs/articles/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/gallery/\">/docs/articles/gallery/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/intro/\">/docs/articles/intro/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev/\">/docs/articles/basic-web-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/reading-files/\">/docs/articles/reading-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/writing-files/\">/docs/articles/writing-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/audio/\">/docs/audio/audio/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/projects/\">/docs/content/projects/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/terms/\">/docs/audio/terms/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/\">/docs/faq/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/community/\">/docs/community/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/resources/\">/docs/articles/resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/\">/docs/content/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-repos/\">/docs/docs/git-repos/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/trouble-shooting/\">/docs/content/trouble-shooting/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/python/\">/docs/articles/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/clock/\">/docs/interact/clock/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/python/\">/docs/docs/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/jupyter-notebooks/\">/docs/interact/jupyter-notebooks/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/\">/docs/interact/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/contact/\">/docs/faq/contact/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/docs/\">/docs/quick-reference/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/other-sites/\">/docs/interact/other-sites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions/\">/docs/quick-reference/new-repo-instructions/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet/\">/docs/quick-reference/Emmet/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/installation/\">/docs/quick-reference/installation/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/vscode-themes/\">/docs/quick-reference/vscode-themes/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/createReactApp/\">/docs/react/createReactApp/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/react2/\">/docs/react/react2/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/\">/docs/quick-reference/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/\">/docs/react/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/\">/docs/tools/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/notes-template/\">/docs/tools/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/more-tools/\">/docs/tools/more-tools/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/plug-ins/\">/docs/tools/plug-ins/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/install/\">/docs/articles/node/install/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/vscode/\">/docs/tools/vscode/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/intro/\">/docs/articles/node/intro/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/nodejs/\">/docs/articles/node/nodejs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/nodevsbrowser/\">/docs/articles/node/nodevsbrowser/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/npm/\">/docs/articles/node/npm/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/reading-files/\">/docs/articles/node/reading-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node/writing-files/\">/docs/articles/node/writing-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react-in-depth/\">/docs/react-in-depth/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/article-compilation/\">/docs/articles/article-compilation/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/my-websites/\">/docs/medium/my-websites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/social/\">/docs/medium/social/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/medium-links/\">/docs/medium/medium-links/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/\">/docs/medium/</a></li>\n</ul>\n<h1>Sitemap</h1>\n<hr>\n<ul>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/big-o-complexity/\">/blog/big-o-complexity/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/showcase/\">/showcase/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/blog-archive/\">/blog/blog-archive/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/\">/blog/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/review/\">/review/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/data-structures/\">/blog/data-structures/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/blogwcomments/\">/blog/blogwcomments/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/platform-docs/\">/blog/platform-docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python-resources/\">/blog/python-resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python-for-js-dev/\">/blog/python-for-js-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/gallery/\">/docs/gallery/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/my-medium/\">/blog/my-medium/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/search/\">/docs/search/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/eng-portfolio/\">/docs/about/eng-portfolio/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/intrests/\">/docs/about/intrests/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/sitemap/\">/docs/sitemap/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/resume/\">/docs/about/resume/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/web-scraping/\">/blog/web-scraping/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/job-search/\">/docs/about/job-search/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/\">/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/buffers/\">/docs/articles/buffers/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/\">/docs/about/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/event-loop/\">/docs/articles/event-loop/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/dev-dep/\">/docs/articles/dev-dep/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/\">/docs/articles/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/install/\">/docs/articles/install/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/fs-module/\">/docs/articles/fs-module/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-cli-args/\">/docs/articles/node-cli-args/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/module-exports/\">/docs/articles/module-exports/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-env-variables/\">/docs/articles/node-env-variables/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/intro/\">/docs/articles/intro/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-js-language/\">/docs/articles/node-js-language/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev/\">/docs/articles/basic-web-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-repl/\">/docs/articles/node-repl/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-package-manager/\">/docs/articles/node-package-manager/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/node-run-cli/\">/docs/articles/node-run-cli/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/npx/\">/docs/articles/npx/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/v8/\">/docs/articles/v8/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/nodevsbrowser/\">/docs/articles/nodevsbrowser/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/reading-files/\">/docs/articles/reading-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/nodejs/\">/docs/articles/nodejs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/npm/\">/docs/articles/npm/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/semantic/\">/docs/articles/semantic/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/writing-files/\">/docs/articles/writing-files/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/dynamic-time-warping/\">/docs/audio/dynamic-time-warping/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/\">/docs/audio/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/terms/\">/docs/audio/terms/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/os-module/\">/docs/articles/os-module/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/community/\">/docs/community/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/community/video-chat/\">/docs/community/video-chat/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/archive/\">/docs/content/archive/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/data-structures-algo/\">/docs/content/data-structures-algo/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/\">/docs/content/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/notes-template/\">/docs/content/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/gatsby-Queries-Mutations/\">/docs/content/gatsby-Queries-Mutations/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/projects/\">/docs/content/projects/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/trouble-shooting/\">/docs/content/trouble-shooting/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/audio/dfft/\">/docs/audio/dfft/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/content/algo/\">/docs/content/algo/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/await-keyword/\">/docs/docs/await-keyword/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/appendix/\">/docs/docs/appendix/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/algolia/\">/docs/docs/algolia/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/data-structures-docs/\">/docs/docs/data-structures-docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/\">/docs/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/git-repos/\">/docs/docs/git-repos/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/sitemap/\">/docs/docs/sitemap/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/css/\">/docs/docs/css/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/docs/regex-in-js/\">/docs/docs/regex-in-js/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/contact/\">/docs/faq/contact/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/jupyter-notebooks/\">/docs/interact/jupyter-notebooks/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/clock/\">/docs/interact/clock/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/\">/docs/interact/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/\">/docs/faq/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/video-chat/\">/docs/interact/video-chat/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/interact/other-sites/\">/docs/interact/other-sites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/plug-ins/\">/docs/faq/plug-ins/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/my-websites/\">/docs/medium/my-websites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/medium-links/\">/docs/medium/medium-links/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/medium/\">/docs/medium/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/create-react-app/\">/docs/quick-reference/create-react-app/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/javascript/constructor-functions/\">/docs/javascript/constructor-functions/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet/\">/docs/quick-reference/Emmet/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/python/\">/docs/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/awesome-static/\">/docs/quick-reference/awesome-static/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/\">/docs/quick-reference/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions/\">/docs/quick-reference/new-repo-instructions/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/installation/\">/docs/quick-reference/installation/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/google-firebase/\">/docs/quick-reference/google-firebase/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/notes-template/\">/docs/quick-reference/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/heroku-error-codes/\">/docs/quick-reference/heroku-error-codes/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/psql-setup/\">/docs/quick-reference/psql-setup/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/createReactApp/\">/docs/react/createReactApp/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/topRepos/\">/docs/quick-reference/topRepos/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/react2/\">/docs/react/react2/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/resources/\">/docs/quick-reference/resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/vscode/\">/docs/quick-reference/vscode/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/dev-utilities/\">/docs/tools/dev-utilities/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/data-structures/\">/docs/tools/data-structures/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/markdown-html/\">/docs/tools/markdown-html/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/psql/\">/docs/quick-reference/psql/</a></li>\n</ul>\n<hr>\n<h3>Links</h3>\n<h5>Try it out without cloning the entire repo</h5>\n<h5><a href=\"https://exploring-firebase-4c023.firebaseapp.com/\">stackblitz demo hosted on firebase</a></h5>\n<ul>\n<li><a href=\"https://bgoonz-blog.netlify.app/showcase/\">/showcase/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/repos/\">/repos/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/\">/blog/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/jupyter-notebooks/\">/docs/jupyter-notebooks/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/portfolio-web/\">/docs/portfolio-web/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/python/\">/docs/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/About/\">/docs/About/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/About/resume/\">/docs/About/resume/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/about/\">/docs/about/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/faq/\">/docs/faq/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/\">/docs/quick-reference/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet/\">/docs/quick-reference/Emmet/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions/\">/docs/quick-reference/new-repo-instructions/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/links/Social/\">/docs/links/Social/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/links/\">/docs/links/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/quick-reference/installation/\">/docs/quick-reference/installation/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/links/my-websites/\">/docs/links/my-websites/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/\">/docs/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/community/\">/blog/community/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/python/\">/blog/python/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/resources/\">/docs/resources/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/createReactApp/\">/docs/react/createReactApp/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/\">/docs/tools/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/notes-template/\">/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/my-medium/\">/blog/my-medium/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/default-readme/\">/docs/tools/default-readme/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/plug-ins/\">/docs/tools/plug-ins/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/react2/\">/docs/react/react2/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/notes-template/\">/docs/tools/notes-template/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/review/\">/review/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev/\">/docs/articles/basic-web-dev/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/blog/data-structures/\">/blog/data-structures/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/About/me/\">/docs/About/me/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/About/introduction2bg/\">/docs/About/introduction2bg/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/react/\">/docs/react/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/docs/tools/Git-Html-Preview/\">/docs/tools/Git-Html-Preview/</a></li>\n<li><a href=\"https://bgoonz-blog.netlify.app/gallery/\">/gallery/</a></li>\n</ul>\n<h2>Blog</h2>\n<ul>\n<li><a href=\"https://bryanguner.medium.com/introductory-react-part-2-cda01615a186?source=your_stories_page-------------------------------------\">introductory-react-part-2</a></li>\n<li><a href=\"https://bryanguner.medium.com/a-very-quick-guide-to-calculating-big-o-computational-complexity-eb1557e85fa3?source=your_stories_page-------------------------------------\">a-very-quick-guide-to-calculating-big-o-computational-complexity</a></li>\n<li><a href=\"https://javascript.plainenglish.io/introduction-to-react-for-complete-beginners-8021738aa1ad?source=your_stories_page-------------------------------------\">introduction-to-react-for-complete-beginners</a></li>\n<li><a href=\"https://javascript.plainenglish.io/scheduling-settimeout-and-setinterval-fcb2f40d16f7?source=your_stories_page-------------------------------------\">scheduling-settimeout-and-setinterval</a></li>\n<li><a href=\"https://bryanguner.medium.com/css-animations-d196a20099a5?source=your_stories_page-------------------------------------\">css-animations</a></li>\n<li><a href=\"https://bryanguner.medium.com/these-are-the-bash-shell-commands-that-stand-between-me-and-insanity-984865ba5d1b?source=your_stories_page-------------------------------------\">these-are-the-bash-shell-commands-that-stand-between-me-and-insanity</a></li>\n<li><a href=\"https://bryanguner.medium.com/how-to-implement-native-es6-data-structures-using-arrays-objects-ce953b9f6a07?source=your_stories_page-------------------------------------\">how-to-implement-native-es6-data-structures-using-arrays-objects</a></li>\n<li><a href=\"https://medium.com/codex/objects-in-javascript-cc578a781e1d?source=your_stories_page-------------------------------------\">objects-in-javascript</a></li>\n<li><a href=\"https://javascript.plainenglish.io/absolute-beginners-guide-to-javascript-part-1-e222d166b6e1?source=your_stories_page-------------------------------------\">absolute-beginners-guide-to-javascript-part1</a></li>\n<li><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-4-fd686892b9eb?source=your_stories_page-------------------------------------\">web-developer-resource-list-part-4</a></li>\n<li><a href=\"https://medium.com/codex/vscode-extensions-specifically-for-javascript-development-ea91305cbd4a?source=your_stories_page-------------------------------------\">vscode-extensions-specifically-for-javascript-development</a></li>\n<li><a href=\"https://bryanguner.medium.com/a-list-of-all-of-my-articles-to-link-to-future-posts-1f6f88ebdf5b?source=your_stories_page-------------------------------------\">a-list-of-all-of-my-articles-to-link-to-future-posts</a></li>\n<li><a href=\"https://javascript.plainenglish.io/lists-stacks-and-queues-in-javascript-88466fae0fbb?source=your_stories_page-------------------------------------\">lists-stacks-and-queues-in-javascript</a></li>\n<li><a href=\"https://bryanguner.medium.com/web-development-resources-part-3-f862ceb2b82a?source=your_stories_page-------------------------------------\">web-development-resources-part-3</a></li>\n<li><a href=\"https://medium.com/codex/web-development-interview-part-3-826ae81a9107?source=your_stories_page-------------------------------------\">web-development-interview-part-3</a></li>\n<li><a href=\"https://bryanguner.medium.com/running-list-of-interesting-articles-tools-and-ideas-as-i-explore-them-b87a2f04d9a6?source=your_stories_page-------------------------------------\">running-list-of-interesting-articles-tools</a></li>\n<li><a href=\"https://bryanguner.medium.com/the-best-cloud-based-code-playgrounds-of-2021-part-1-cdae9448db24?source=your_stories_page-------------------------------------\">the-best-cloud-based-code-playgrounds-of-2021-part-1</a></li>\n<li><a href=\"https://medium.com/codex/front-end-interview-questions-part-2-86ddc0e91443?source=your_stories_page-------------------------------------\">front-end-interview-questions-part-2</a></li>\n<li><a href=\"https://medium.com/star-gazers/web-developer-resource-list-part-2-9c5cb56ab263?source=your_stories_page-------------------------------------\">web-developer-resource-list-part-2</a></li>\n<li><a href=\"https://levelup.gitconnected.com/http-basics-8f02a96a834a?source=your_stories_page-------------------------------------\">http-basics</a></li>\n<li><a href=\"https://javascript.plainenglish.io/javascript-frameworks-libraries-35931e187a35?source=your_stories_page-------------------------------------\">javascript-frameworks-libraries</a></li>\n<li><a href=\"https://javascript.plainenglish.io/my-take-on-awesome-javascript-243255451e74?source=your_stories_page-------------------------------------\">my-take-on-awesome-javascript</a></li>\n<li><a href=\"https://levelup.gitconnected.com/everything-you-need-to-get-started-with-vscode-extensions-resources-b9f4c8d91931?source=your_stories_page-------------------------------------\">get-started-with-vscode-extensions</a></li>\n<li><a href=\"https://levelup.gitconnected.com/my-favorite-vscode-themes-9bab65af3f0f?source=your_stories_page-------------------------------------\">my-favorite-vscode-themes</a></li>\n<li><a href=\"https://levelup.gitconnected.com/object-oriented-programming-in-javascript-d45007d06333?source=your_stories_page-------------------------------------\">object-oriented-programming-in-javascript</a></li>\n<li><a href=\"https://medium.com/codex/javascript-rotate-array-problemwalkthrough-31deb19ebba1?source=your_stories_page-------------------------------------\">javascript-rotate-array-problemwalkthrough</a></li>\n<li><a href=\"https://levelup.gitconnected.com/super-simple-intro-to-html-651d695f9bc?source=your_stories_page-------------------------------------\">super-simple-intro-to-html-651d695f9bc</a></li>\n<li><a href=\"https://medium.com/codex/everything-you-need-to-know-about-relational-databases-sql-postgresql-and-sequelize-to-build-8acb68284a98?source=your_stories_page-------------------------------------\">everything-you-need-to-know-about-relational-databases-sql-postgresql</a></li>\n<li><a href=\"https://levelup.gitconnected.com/understanding-git-a-beginners-guide-containing-cheat-sheets-resources-b50c9c01a107?source=your_stories_page-------------------------------------\">understanding-git-a-beginners-guide-containing-cheat-sheets-resources-b50c9c01a107</a></li>\n<li><a href=\"https://javascript.plainenglish.io/complete-javascript-reference-guide-64306cd6b0db?source=your_stories_page-------------------------------------\">complete-javascript-reference-guide-64306cd6b0db</a>- [</li>\n</ul>\n</div>\n<hr>\n<hr>\n<h2>🚀 Quick start</h2>\n<ol>\n<li>\n<p><strong>Create a Gatsby site.</strong></p>\n<p>Use the Gatsby CLI to create a new site, specifying the default starter.</p>\n<pre><code class=\"language-shell\"># create a new Gatsby site using the default starter\n\ngatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default\n</code></pre>\n</li>\n<li>\n<p><strong>Start developing.</strong></p>\n<p>Navigate into your new site's directory and start it up.</p>\n<pre><code class=\"language-shell\">cd my-default-starter/\n\ngatsby develop\n</code></pre>\n</li>\n<li>\n<p><strong>Open the source code and start editing!</strong></p>\n<p>Your site is now running at <code>http://localhost:8000</code>!</p>\n<p><em>Note: You'll also see a second link:</em><code>http://localhost:8000/___graphql</code><em>. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the <a href=\"https://www.gatsbyjs.com/tutorial/part-five/#introducing-graphiql\">Gatsby tutorial</a>.</em></p>\n<p>Open the <code>my-default-starter</code> directory in your code editor of choice and edit <code>src/pages/index.js</code>. Save your changes and the browser will update in real time!</p>\n</li>\n</ol>\n<h2>🧐 What's inside?</h2>\n<p>A quick look at the top-level files and directories you'll see in a Gatsby project.</p>\n<pre><code>.\n\n├── node_modules\n\n├── src\n\n├── .gitignore\n\n├── .prettierrc\n\n├── gatsby-browser.js\n\n├── gatsby-config.js\n\n├── gatsby-node.js\n\n├── gatsby-ssr.js\n\n├── LICENSE\n\n├── package-lock.json\n\n├── package.json\n\n└── README.md\n</code></pre>\n<ol>\n<li><strong><code>/node_modules</code></strong>: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.</li>\n<li><strong><code>/src</code></strong>: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. <code>src</code> is a convention for \"source code\".</li>\n<li><strong><code>.gitignore</code></strong>: This file tells git which files it should not track / not maintain a version history for.</li>\n<li><strong><code>.prettierrc</code></strong>: This is a configuration file for <a href=\"https://prettier.io/\">Prettier</a>. Prettier is a tool to help keep the formatting of your code consistent.</li>\n<li><strong><code>gatsby-browser.js</code></strong>: This file is where Gatsby expects to find any usage of the <a href=\"https://www.gatsbyjs.com/docs/browser-apis/\">Gatsby browser APIs</a> (if any). These allow customization/extension of default Gatsby settings affecting the browser.</li>\n<li><strong><code>gatsby-config.js</code></strong>: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you'd like to include, etc. (Check out the <a href=\"https://www.gatsbyjs.com/docs/gatsby-config/\">config docs</a> for more detail).</li>\n<li><strong><code>gatsby-node.js</code></strong>: This file is where Gatsby expects to find any usage of the <a href=\"https://www.gatsbyjs.com/docs/node-apis/\">Gatsby Node APIs</a> (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.</li>\n<li><strong><code>gatsby-ssr.js</code></strong>: This file is where Gatsby expects to find any usage of the <a href=\"https://www.gatsbyjs.com/docs/ssr-apis/\">Gatsby server-side rendering APIs</a> (if any). These allow customization of default Gatsby settings affecting server-side rendering.</li>\n<li><strong><code>LICENSE</code></strong>: This Gatsby starter is licensed under the 0BSD license. This means that you can see this file as a placeholder and replace it with your own license.</li>\n<li><strong><code>package-lock.json</code></strong> (See <code>package.json</code> below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. <strong>(You won't change this file directly).</strong></li>\n<li><strong><code>package.json</code></strong>: A manifest file for Node.js projects, which includes things like metadata (the project's name, author, etc). This manifest is how npm knows which packages to install for your project.</li>\n<li><strong><code>README.md</code></strong>: A text file containing useful reference information about your project.</li>\n</ol>\n<h2>🎓 Learning Gatsby</h2>\n<p>Looking for more guidance? Full documentation for Gatsby lives <a href=\"https://www.gatsbyjs.com/\">on the website</a>. Here are some places to start:</p>\n<ul>\n<li><strong>For most developers, we recommend starting with our <a href=\"https://www.gatsbyjs.com/tutorial/\">in-depth tutorial for creating a site with Gatsby</a>.</strong> It starts with zero assumptions about your level of ability and walks through every step of the process.</li>\n<li><strong>To dive straight into code samples, head <a href=\"https://www.gatsbyjs.com/docs/\">to our documentation</a>.</strong> In particular, check out the <em>Guides</em>, <em>API Reference</em>, and <em>Advanced Tutorials</em> sections in the sidebar.</li>\n</ul>\n<h2>💫 Deploy</h2>\n<p><a href=\"https://app.netlify.com/start/deploy?repository=https://github.com/BGOONZ_BLOG_2.0.git\"><img src=\"https://www.netlify.com/img/deploy/button.svg\" alt=\"Deploy to Netlify\"></a></p>\n<p><a href=\"https://vercel.com/import/project?template=https://github.com/BGOONZ_BLOG_2.0.git\"><img src=\"https://vercel.com/button\" alt=\"Deploy with Vercel\"></a></p>\n<!-- AUTO-GENERATED-CONTENT:END -->\n<hr>\n<hr>\n<h1>Codebase</h1>\n<pre><code>bryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$ tree -f\n\n.\n\n├── ./components\n\n│   ├── ./components/ActionLink.js\n\n│   ├── ./components/CtaButtons.js\n\n│   ├── ./components/DocsMenu.js\n\n│   ├── ./components/DocsSubmenu.js\n\n│   ├── ./components/Footer.js\n\n│   ├── ./components/Header.js\n\n│   ├── ./components/Icon.js\n\n│   ├── ./components/Layout.js\n\n│   ├── ./components/SectionContent.js\n\n│   ├── ./components/SectionCta.js\n\n│   ├── ./components/SectionDocs.js\n\n│   ├── ./components/SectionGrid.js\n\n│   ├── ./components/SectionHero.js\n\n│   ├── ./components/Submenu.js\n\n│   ├── ./components/global.css\n\n│   └── ./components/index.js\n\n├── ./data\n\n│   └── ./data/doc_sections.yml\n\n├── ./hooks\n\n│   └── ./hooks/useScript.js\n\n├── ./html.js\n\n├── ./pages\n\n│   ├── ./pages/blog\n\n│   │   ├── ./pages/blog/blog-archive.md\n\n│   │   ├── ./pages/blog/blogwcomments.md\n\n│   │   ├── ./pages/blog/data-structures.md\n\n│   │   ├── ./pages/blog/index.md\n\n│   │   ├── ./pages/blog/my-medium.md\n\n│   │   ├── ./pages/blog/platform-docs.md\n\n│   │   ├── ./pages/blog/python-for-js-dev.md\n\n│   │   ├── ./pages/blog/python-resources.md\n\n│   │   └── ./pages/blog/web-scraping.md\n\n│   ├── ./pages/docs\n\n│   │   ├── ./pages/docs/about\n\n│   │   │   ├── ./pages/docs/about/index.md\n\n│   │   │   ├── ./pages/docs/about/me.md\n\n│   │   │   ├── ./pages/docs/about/node\n\n│   │   │   │   ├── ./pages/docs/about/node/install.md\n\n│   │   │   │   ├── ./pages/docs/about/node/intro.md\n\n│   │   │   │   ├── ./pages/docs/about/node/nodejs.md\n\n│   │   │   │   ├── ./pages/docs/about/node/nodevsbrowser.md\n\n│   │   │   │   ├── ./pages/docs/about/node/reading-files.md\n\n│   │   │   │   └── ./pages/docs/about/node/writing-files.md\n\n│   │   │   ├── ./pages/docs/about/npm.md\n\n│   │   │   └── ./pages/docs/about/resume.md\n\n│   │   ├── ./pages/docs/articles\n\n│   │   │   ├── ./pages/docs/articles/algo.md\n\n│   │   │   ├── ./pages/docs/articles/article-compilation.md\n\n│   │   │   ├── ./pages/docs/articles/basic-web-dev.md\n\n│   │   │   ├── ./pages/docs/articles/gists.md\n\n│   │   │   ├── ./pages/docs/articles/index.md\n\n│   │   │   ├── ./pages/docs/articles/install.md\n\n│   │   │   ├── ./pages/docs/articles/intro.md\n\n│   │   │   ├── ./pages/docs/articles/python.md\n\n│   │   │   ├── ./pages/docs/articles/reading-files.md\n\n│   │   │   ├── ./pages/docs/articles/resources.md\n\n│   │   │   ├── ./pages/docs/articles/ten-jamstack-apis-to-checkout.md\n\n│   │   │   └── ./pages/docs/articles/writing-files.md\n\n│   │   ├── ./pages/docs/docs\n\n│   │   │   └── ./pages/docs/docs/tools\n\n│   │   │       └── ./pages/docs/docs/tools/file-types.md\n\n│   │   ├── ./pages/docs/faq\n\n│   │   │   ├── ./pages/docs/faq/contact.md\n\n│   │   │   └── ./pages/docs/faq/index.md\n\n│   │   ├── ./pages/docs/gists.md\n\n│   │   ├── ./pages/docs/index.md\n\n│   │   ├── ./pages/docs/interact\n\n│   │   │   ├── ./pages/docs/interact/clock.md\n\n│   │   │   ├── ./pages/docs/interact/index.md\n\n│   │   │   └── ./pages/docs/interact/jupyter-notebooks.md\n\n│   │   ├── ./pages/docs/links\n\n│   │   │   ├── ./pages/docs/links/index.md\n\n│   │   │   ├── ./pages/docs/links/medium-links.md\n\n│   │   │   ├── ./pages/docs/links/my-websites.md\n\n│   │   │   └── ./pages/docs/links/social.md\n\n│   │   ├── ./pages/docs/quick-reference\n\n│   │   │   ├── ./pages/docs/quick-reference/Emmet.md\n\n│   │   │   ├── ./pages/docs/quick-reference/docs.md\n\n│   │   │   ├── ./pages/docs/quick-reference/index.md\n\n│   │   │   ├── ./pages/docs/quick-reference/installation.md\n\n│   │   │   └── ./pages/docs/quick-reference/new-repo-instructions.md\n\n│   │   ├── ./pages/docs/react\n\n│   │   │   ├── ./pages/docs/react/createReactApp.md\n\n│   │   │   ├── ./pages/docs/react/index.md\n\n│   │   │   └── ./pages/docs/react/react2.md\n\n│   │   ├── ./pages/docs/react-in-depth.md\n\n│   │   ├── ./pages/docs/sitemap.md\n\n│   │   └── ./pages/docs/tools\n\n│   │       ├── ./pages/docs/tools/index.md\n\n│   │       ├── ./pages/docs/tools/notes-template.md\n\n│   │       ├── ./pages/docs/tools/plug-ins.md\n\n│   │       └── ./pages/docs/tools/vscode.md\n\n│   ├── ./pages/index.md\n\n│   ├── ./pages/notes-template.md\n\n│   ├── ./pages/review.md\n\n│   └── ./pages/showcase.md\n\n├── ./sass\n\n│   ├── ./sass/imports\n\n│   │   ├── ./sass/imports/_animations.scss\n\n│   │   ├── ./sass/imports/_buttons.scss\n\n│   │   ├── ./sass/imports/_docs.scss\n\n│   │   ├── ./sass/imports/_footer.scss\n\n│   │   ├── ./sass/imports/_forms.scss\n\n│   │   ├── ./sass/imports/_functions.scss\n\n│   │   ├── ./sass/imports/_general.scss\n\n│   │   ├── ./sass/imports/_header.scss\n\n│   │   ├── ./sass/imports/_helpers.scss\n\n│   │   ├── ./sass/imports/_icons.scss\n\n│   │   ├── ./sass/imports/_palettes.scss\n\n│   │   ├── ./sass/imports/_posts.scss\n\n│   │   ├── ./sass/imports/_prism.scss\n\n│   │   ├── ./sass/imports/_reset.scss\n\n│   │   ├── ./sass/imports/_sections.scss\n\n│   │   ├── ./sass/imports/_structure.scss\n\n│   │   ├── ./sass/imports/_tables.scss\n\n│   │   └── ./sass/imports/_variables.scss\n\n│   └── ./sass/main.scss\n\n├── ./templates\n\n│   ├── ./templates/advanced.js\n\n│   ├── ./templates/blog.js\n\n│   ├── ./templates/docs.js\n\n│   ├── ./templates/page.js\n\n│   └── ./templates/post.js\n\n└── ./utils\n\n    ├── ./utils/attribute.js\n\n    ├── ./utils/classNames.js\n\n    ├── ./utils/cycler.js\n\n    ├── ./utils/getData.js\n\n    ├── ./utils/getPage.js\n\n    ├── ./utils/getPageByFilePath.js\n\n    ├── ./utils/getPages.js\n\n    ├── ./utils/htmlToReact.js\n\n    ├── ./utils/index.js\n\n    ├── ./utils/link.js\n\n    ├── ./utils/markdownify.js\n\n    ├── ./utils/pathJoin.js\n\n    ├── ./utils/toStyleObj.js\n\n    ├── ./utils/toUrl.js\n\n    └── ./utils/withPrefix.js\n\n\n\n21 directories, 119 files\n\nbryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$\n</code></pre>\n<hr>\n<h1>Components</h1>\n<details>\n  <summary><h1>Click to see React Components (src folder)!</h1></summary>\n<details>\n  <summary>ActionLink!</summary>\n<h2>ActionLink</h2>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { Link, withPrefix, classNames } from '../utils';\n\nimport Icon from './Icon';\n\n\n\nexport default class ActionLink extends React.Component {\n\nrender() {\n\nlet action = \\_.get(this.props, 'action', null);\n\nreturn (\n\n\n\n&#x3C;Link\n\nto={withPrefix(_.get(action, 'url', null))}\n\n{...(_.get(action, 'new_window', null) ? { target: '\\_blank' } : null)}\n\n{...(_.get(action, 'new*window', null) || *.get(action, 'no*follow', null)\n\n? {\n\nrel: (*.get(action, 'new*window', null) ? 'noopener ' : '') + (*.get(action, 'no*follow', null) ? 'nofollow' : '')\n\n}\n\n: null)}\n\nclassName={classNames({\n\nbutton: *.get(action, 'style', null) !== 'link',\n\n'button-secondary': _.get(action, 'style', null) === 'secondary',\n\n'button-icon': _.get(action, 'style', null) === 'icon'\n\n})} >\n\n{_.get(action, 'style', null) === 'icon' &#x26;&#x26; _.get(action, 'icon*class', null) ? (\n\n&#x3C;React.Fragment>\n\n&#x3C;Icon {...this.props} icon={*.get(action, 'icon*class', null)} />\n\n&#x3C;span className=\"screen-reader-text\">{*.get(action, 'label', null)}&#x3C;/span>\n\n&#x3C;/React.Fragment>\n\n) : (\n\n\\_.get(action, 'label', null)\n\n)}\n\n&#x3C;/Link>\n\n);\n\n}\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>CtaButtons!</summary>\n<h2>CtaButtons</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { Link, withPrefix, classNames } from '../utils';\n\n\n\nexport default class CtaButtons extends React.Component {\n\n    render() {\n\n        let actions = _.get(this.props, 'actions', null);\n\n        return _.map(actions, (action, action_idx) => (\n\n            &#x3C;Link\n\n                key={action_idx}\n\n                to={withPrefix(_.get(action, 'url', null))}\n\n                {...(_.get(action, 'new_window', null) ? { target: '_blank' } : null)}\n\n                {...(_.get(action, 'new_window', null) || _.get(action, 'no_follow', null)\n\n                    ? {\n\n                          rel: (_.get(action, 'new_window', null) ? 'noopener ' : '') + (_.get(action, 'no_follow', null) ? 'nofollow' : '')\n\n                      }\n\n                    : null)}\n\n                className={classNames({\n\n                    button: _.get(action, 'style', null) === 'primary' || _.get(action, 'style', null) === 'secondary',\n\n                    'button-secondary': _.get(action, 'style', null) === 'secondary'\n\n                })}\n\n            >\n\n                {_.get(action, 'label', null)}\n\n            &#x3C;/Link>\n\n        ));\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>DocsMenu</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { getPage, classNames, Link, withPrefix, pathJoin, getPages } from '../utils';\n\nimport DocsSubmenu from './DocsSubmenu';\n\n\n\nexport default class DocsMenu extends React.Component {\n\n    render() {\n\n        let site = _.get(this.props, 'site', null);\n\n        let page = _.get(this.props, 'page', null);\n\n        let root_docs_path = _.get(site, 'data.doc_sections.root_docs_path', null);\n\n        let root_page = getPage(this.props.pageContext.pages, root_docs_path);\n\n        return (\n\n            &#x3C;nav id=\"docs-nav\" className=\"docs-nav\">\n\n                &#x3C;div id=\"docs-nav-inside\" className=\"docs-nav-inside sticky\">\n\n                    &#x3C;button id=\"docs-nav-toggle\" className=\"docs-nav-toggle\">\n\n                        Navigate Docs\n\n                        &#x3C;span className=\"icon-angle-right\" aria-hidden=\"true\" />\n\n                    &#x3C;/button>\n\n                    &#x3C;div className=\"docs-nav-menu\">\n\n                        &#x3C;ul id=\"docs-menu\" className=\"docs-menu\">\n\n                            &#x3C;li\n\n                                className={classNames('docs-menu-item', {\n\n                                    current: _.get(page, 'url', null) === _.get(root_page, 'url', null)\n\n                                })}\n\n                            >\n\n                                &#x3C;Link to={withPrefix(_.get(root_page, 'url', null))}>{_.get(root_page, 'frontmatter.title', null)}&#x3C;/Link>\n\n                            &#x3C;/li>\n\n                            {_.map(_.get(site, 'data.doc_sections.sections', null), (section, section_idx) => {\n\n                                let section_path = pathJoin(root_docs_path, section);\n\n                                let section_page = getPage(this.props.pageContext.pages, section_path);\n\n                                let child_pages = _.orderBy(getPages(this.props.pageContext.pages, section_path), 'frontmatter.weight');\n\n                                let child_count = _.size(child_pages);\n\n                                let has_children = child_count > 0 ? true : false;\n\n                                let is_current_page = _.get(page, 'url', null) === _.get(section_page, 'url', null) ? true : false;\n\n                                let is_active = _.get(page, 'url', null).startsWith(_.get(section_page, 'url', null));\n\n                                return (\n\n                                    &#x3C;React.Fragment key={section_idx + '.1'}>\n\n                                        &#x3C;li\n\n                                            key={section_idx}\n\n                                            className={classNames('docs-menu-item', {\n\n                                                'has-children': has_children,\n\n                                                current: is_current_page,\n\n                                                active: is_active\n\n                                            })}\n\n                                        >\n\n                                            &#x3C;Link to={withPrefix(_.get(section_page, 'url', null))}>{_.get(section_page, 'frontmatter.title', null)}&#x3C;/Link>\n\n                                            {has_children &#x26;&#x26; (\n\n                                                &#x3C;React.Fragment>\n\n                                                    &#x3C;button className=\"docs-submenu-toggle\">\n\n                                                        &#x3C;span className=\"screen-reader-text\">Submenu&#x3C;/span>\n\n                                                        &#x3C;span className=\"icon-angle-right\" aria-hidden=\"true\" />\n\n                                                    &#x3C;/button>\n\n                                                    &#x3C;DocsSubmenu {...this.props} child_pages={child_pages} page={page} site={site} />\n\n                                                &#x3C;/React.Fragment>\n\n                                            )}\n\n                                        &#x3C;/li>\n\n                                    &#x3C;/React.Fragment>\n\n                                );\n\n                            })}\n\n                        &#x3C;/ul>\n\n                    &#x3C;/div>\n\n                &#x3C;/div>\n\n            &#x3C;/nav>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>DocsSubmenu</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { classNames, Link, withPrefix } from '../utils';\n\n\n\nexport default class DocsSubmenu extends React.Component {\n\n    render() {\n\n        let child_pages = _.get(this.props, 'child_pages', null);\n\n        let page = _.get(this.props, 'page', null);\n\n        return (\n\n            &#x3C;ul className=\"docs-submenu\">\n\n                {_.map(child_pages, (child_page, child_page_idx) => (\n\n                    &#x3C;li\n\n                        key={child_page_idx}\n\n                        className={classNames('docs-menu-item', {\n\n                            current: _.get(page, 'url', null) === _.get(child_page, 'url', null)\n\n                        })}\n\n                    >\n\n                        &#x3C;Link to={withPrefix(_.get(child_page, 'url', null))}>{_.get(child_page, 'frontmatter.title', null)}&#x3C;/Link>\n\n                    &#x3C;/li>\n\n                ))}\n\n            &#x3C;/ul>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>Footer</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { htmlToReact } from '../utils';\n\nimport ActionLink from './ActionLink';\n\n\n\nexport default class Footer extends React.Component {\n\n    render() {\n\n        return (\n\n            &#x3C;footer id=\"colophon\" className=\"site-footer outer\">\n\n                &#x3C;div className=\"inner\">\n\n                    &#x3C;div className=\"site-footer-inside\">\n\n                        &#x3C;p className=\"site-info\">\n\n                            {_.get(this.props, 'pageContext.site.siteMetadata.footer.content', null) &#x26;&#x26; (\n\n                                &#x3C;span className=\"copyright\">{htmlToReact(_.get(this.props, 'pageContext.site.siteMetadata.footer.content', null))}&#x3C;/span>\n\n                            )}\n\n                            {_.map(_.get(this.props, 'pageContext.site.siteMetadata.footer.links', null), (action, action_idx) => (\n\n                                &#x3C;ActionLink key={action_idx} {...this.props} action={action} />\n\n                            ))}\n\n                        &#x3C;/p>\n\n\n\n                        {_.get(this.props, 'pageContext.site.siteMetadata.footer.has_social', null) &#x26;&#x26; (\n\n                            &#x3C;div className=\"social-links\">\n\n                                {_.map(_.get(this.props, 'pageContext.site.siteMetadata.footer.social_links', null), (action, action_idx) => (\n\n                                    &#x3C;ActionLink key={action_idx} {...this.props} action={action} />\n\n                                ))}\n\n                            &#x3C;/div>\n\n                        )}\n\n                    &#x3C;/div>\n\n                &#x3C;/div>\n\n            &#x3C;/footer>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<h2>Header</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { Link, withPrefix, classNames } from '../utils';\n\nimport ActionLink from './ActionLink';\n\nimport Submenu from './Submenu';\n\n\n\nexport default class Header extends React.Component {\n\n    render() {\n\n        return (\n\n            &#x3C;header id=\"masthead\" className=\"site-header outer\">\n\n                &#x3C;div className=\"inner\">\n\n                    &#x3C;div className=\"site-header-inside\">\n\n                        &#x3C;div className=\"site-branding\">\n\n                            {_.get(this.props, 'pageContext.site.siteMetadata.header.logo_img', null) ? (\n\n                                &#x3C;p className=\"site-logo\">\n\n                                    &#x3C;Link to={withPrefix(_.get(this.props, 'pageContext.site.siteMetadata.header.url', null) || '/')}>\n\n                                        &#x3C;img\n\n                                            src={withPrefix(_.get(this.props, 'pageContext.site.siteMetadata.header.logo_img', null))}\n\n                                            alt={_.get(this.props, 'pageContext.site.siteMetadata.header.logo_img_alt', null)}\n\n                                        />\n\n                                    &#x3C;/Link>\n\n                                &#x3C;/p>\n\n                            ) : (\n\n                                &#x3C;p className=\"site-title\">\n\n                                    {' '}\n\n                                    WebDevHub\n\n                                    &#x3C;Link to={withPrefix(_.get(this.props, 'pageContext.site.siteMetadata.header.url', null) || '/')}>\n\n                                        {_.get(this.props, 'pageContext.site.siteMetadata.header.title', null)}\n\n                                    &#x3C;/Link>\n\n                                &#x3C;/p>\n\n                            )}\n\n                        &#x3C;/div>\n\n                        &#x3C;div id=\"search\" className=\"inner\">&#x3C;/div>\n\n                        {_.get(this.props, 'pageContext.site.siteMetadata.header.has_nav', null) &#x26;&#x26; (\n\n                            &#x3C;React.Fragment>\n\n                                &#x3C;nav id=\"main-navigation\" className=\"site-navigation\" aria-label=\"Main Navigation\">\n\n                                    &#x3C;div className=\"site-nav-inside\">\n\n                                        &#x3C;button id=\"menu-close\" className=\"menu-toggle\">\n\n                                            &#x3C;span className=\"screen-reader-text\">Open Menu&#x3C;/span>\n\n                                            &#x3C;span className=\"icon-close\" aria-hidden=\"true\" />\n\n                                        &#x3C;/button>\n\n                                        &#x3C;ul className=\"menu\">\n\n                                            {_.map(_.get(this.props, 'pageContext.site.siteMetadata.header.nav_links', null), (action, action_idx) => {\n\n                                                let page_url = _.trim(_.get(this.props, 'pageContext.url', null), '/');\n\n                                                let action_url = _.trim(_.get(action, 'url', null), '/');\n\n                                                return (\n\n                                                    &#x3C;li\n\n                                                        key={action_idx}\n\n                                                        className={classNames('menu-item', {\n\n                                                            'has-children': _.get(action, 'has_subnav', null) &#x26;&#x26; _.get(action, 'subnav_links', null),\n\n                                                            current: page_url === action_url,\n\n                                                            'menu-button': _.get(action, 'style', null) !== 'link'\n\n                                                        })}\n\n                                                    >\n\n                                                        &#x3C;ActionLink {...this.props} action={action} />\n\n                                                        {_.get(action, 'has_subnav', null) &#x26;&#x26; _.get(action, 'subnav_links', null) &#x26;&#x26; (\n\n                                                            &#x3C;React.Fragment>\n\n                                                                &#x3C;button className=\"submenu-toggle\">\n\n                                                                    &#x3C;span className=\"icon-angle-right\" aria-hidden=\"true\" />\n\n                                                                    &#x3C;span className=\"screen-reader-text\">Sub-menu&#x3C;/span>\n\n                                                                &#x3C;/button>\n\n                                                                &#x3C;Submenu\n\n                                                                    {...this.props}\n\n                                                                    submenu={_.get(action, 'subnav_links', null)}\n\n                                                                    menu_class={'submenu'}\n\n                                                                    page={this.props.pageContext}\n\n                                                                />\n\n                                                            &#x3C;/React.Fragment>\n\n                                                        )}\n\n                                                    &#x3C;/li>\n\n                                                );\n\n                                            })}\n\n                                        &#x3C;/ul>\n\n                                    &#x3C;/div>\n\n                                &#x3C;/nav>\n\n                                &#x3C;button id=\"menu-open\" className=\"menu-toggle\">\n\n                                    &#x3C;span className=\"screen-reader-text\">Close Menu&#x3C;/span>\n\n                                    &#x3C;span className=\"icon-menu\" aria-hidden=\"true\" />\n\n                                &#x3C;/button>\n\n                            &#x3C;/React.Fragment>\n\n                        )}\n\n                    &#x3C;/div>\n\n                &#x3C;/div>\n\n                &#x3C;div id=\"search\" className=\"inner\">&#x3C;/div>\n\n                &#x3C;div>\n\n                    &#x3C;a className=\"github-corner\" href=\"https://github.com/bgoonz/BGOONZ_BLOG_2.0\" aria-label=\"View source on Github\">\n\n                        &#x3C;svg\n\n                            aria-hidden=\"true\"\n\n                            width={80}\n\n                            height={80}\n\n                            viewBox=\"0 0 250 250\"\n\n                            style={{\n\n                                zIndex: 100000,\n\n                                fill: '#194ccdaf',\n\n                                color: '#fff',\n\n                                position: 'fixed',\n\n                                top: '20px',\n\n                                border: 0,\n\n                                left: '20px',\n\n                                transform: 'scale(-1.5, 1.5)'\n\n                            }}\n\n                        >\n\n                            &#x3C;path d=\"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z\">&#x3C;/path>\n\n                            &#x3C;path\n\n                                className=\"octo-arm\"\n\n                                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\"\n\n                                fill=\"currentColor\"\n\n                                style={{ transformOrigin: '130px 106px' }}\n\n                            >&#x3C;/path>\n\n                            &#x3C;path\n\n                                className=\"octo-body\"\n\n                                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\"\n\n                                fill=\"currentColor\"\n\n                            >&#x3C;/path>\n\n                        &#x3C;/svg>\n\n                    &#x3C;/a>\n\n                &#x3C;/div>\n\n            &#x3C;/header>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>Icon</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nexport default class Icon extends React.Component {\n\n    render() {\n\n        let icon = _.get(this.props, 'icon', null);\n\n        return (\n\n            &#x3C;svg className=\"icon\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\n                {icon === 'dev' ? (\n\n                    &#x3C;path d=\"M7.42 10.05c-.18-.16-.46-.23-.84-.23H6l.02 2.44.04 2.45.56-.02c.41 0 .63-.07.83-.26.24-.24.26-.36.26-2.2 0-1.91-.02-1.96-.29-2.18zM0 4.94v14.12h24V4.94H0zM8.56 15.3c-.44.58-1.06.77-2.53.77H4.71V8.53h1.4c1.67 0 2.16.18 2.6.9.27.43.29.6.32 2.57.05 2.23-.02 2.73-.47 3.3zm5.09-5.47h-2.47v1.77h1.52v1.28l-.72.04-.75.03v1.77l1.22.03 1.2.04v1.28h-1.6c-1.53 0-1.6-.01-1.87-.3l-.3-.28v-3.16c0-3.02.01-3.18.25-3.48.23-.31.25-.31 1.88-.31h1.64v1.3zm4.68 5.45c-.17.43-.64.79-1 .79-.18 0-.45-.15-.67-.39-.32-.32-.45-.63-.82-2.08l-.9-3.39-.45-1.67h.76c.4 0 .75.02.75.05 0 .06 1.16 4.54 1.26 4.83.04.15.32-.7.73-2.3l.66-2.52.74-.04c.4-.02.73 0 .73.04 0 .14-1.67 6.38-1.8 6.68z\" />\n\n                ) : icon === 'facebook' ? (\n\n                    &#x3C;path d=\"M23.998 12c0-6.628-5.372-12-11.999-12C5.372 0 0 5.372 0 12c0 5.988 4.388 10.952 10.124 11.852v-8.384H7.078v-3.469h3.046V9.356c0-3.008 1.792-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.384c5.736-.9 10.124-5.864 10.124-11.853z\" />\n\n                ) : icon === 'github' ? (\n\n                    &#x3C;path d=\"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\" />\n\n                ) : icon === 'instagram' ? (\n\n                    &#x3C;path d=\"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913a5.885 5.885 0 001.384 2.126A5.868 5.868 0 004.14 23.37c.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558a5.898 5.898 0 002.126-1.384 5.86 5.86 0 001.384-2.126c.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913a5.89 5.89 0 00-1.384-2.126A5.847 5.847 0 0019.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227a3.81 3.81 0 01-.899 1.382 3.744 3.744 0 01-1.38.896c-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421a3.716 3.716 0 01-1.379-.899 3.644 3.644 0 01-.9-1.38c-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678a6.162 6.162 0 100 12.324 6.162 6.162 0 100-12.324zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405a1.441 1.441 0 01-2.88 0 1.44 1.44 0 012.88 0z\" />\n\n                ) : icon === 'linkedin' ? (\n\n                    &#x3C;path d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\" />\n\n                ) : icon === 'pinterest' ? (\n\n                    &#x3C;path d=\"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z\" />\n\n                ) : icon === 'reddit' ? (\n\n                    &#x3C;path d=\"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z\" />\n\n                ) : icon === 'twitter' ? (\n\n                    &#x3C;path d=\"M23.954 4.569a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.691 8.094 4.066 6.13 1.64 3.161a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.061a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.937 4.937 0 004.604 3.417 9.868 9.868 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63a9.936 9.936 0 002.46-2.548l-.047-.02z\" />\n\n                ) : icon === 'youtube' ? (\n\n                    &#x3C;path d=\"M23.495 6.205a3.007 3.007 0 00-2.088-2.088c-1.87-.501-9.396-.501-9.396-.501s-7.507-.01-9.396.501A3.007 3.007 0 00.527 6.205a31.247 31.247 0 00-.522 5.805 31.247 31.247 0 00.522 5.783 3.007 3.007 0 002.088 2.088c1.868.502 9.396.502 9.396.502s7.506 0 9.396-.502a3.007 3.007 0 002.088-2.088 31.247 31.247 0 00.5-5.783 31.247 31.247 0 00-.5-5.805zM9.609 15.601V8.408l6.264 3.602z\" />\n\n                ) : (\n\n                    icon === 'vimeo' &#x26;&#x26; (\n\n                        &#x3C;path d=\"M23.977 6.416c-.105 2.338-1.739 5.543-4.894 9.609-3.268 4.247-6.026 6.37-8.29 6.37-1.409 0-2.578-1.294-3.553-3.881L5.322 11.4C4.603 8.816 3.834 7.522 3.01 7.522c-.179 0-.806.378-1.881 1.132L0 7.197a315.065 315.065 0 003.501-3.128C5.08 2.701 6.266 1.984 7.055 1.91c1.867-.18 3.016 1.1 3.447 3.838.465 2.953.789 4.789.971 5.507.539 2.45 1.131 3.674 1.776 3.674.502 0 1.256-.796 2.265-2.385 1.004-1.589 1.54-2.797 1.612-3.628.144-1.371-.395-2.061-1.614-2.061-.574 0-1.167.121-1.777.391 1.186-3.868 3.434-5.757 6.762-5.637 2.473.06 3.628 1.664 3.493 4.797l-.013.01z\" />\n\n                    )\n\n                )}\n\n            &#x3C;/svg>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>Body</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\n\n\nimport { Helmet } from 'react-helmet';\n\nimport _ from 'lodash';\n\n\n\nimport { withPrefix, attribute } from '../utils';\n\nimport '../sass/main.scss';\n\nimport Header from './Header';\n\nimport Footer from './Footer';\n\n\n\nexport default class Body extends React.Component {\n\n    render() {\n\n        return (\n\n            &#x3C;React.Fragment>\n\n                &#x3C;Helmet>\n\n                    &#x3C;title>\n\n                        {_.get(this.props, 'pageContext.frontmatter.seo.title', null)\n\n                            ? _.get(this.props, 'pageContext.frontmatter.seo.title', null)\n\n                            : _.get(this.props, 'pageContext.frontmatter.title', null) + ' | ' + _.get(this.props, 'pageContext.site.siteMetadata.title', null)}\n\n                    &#x3C;/title>\n\n                    &#x3C;meta charSet=\"utf-8\" />\n\n                    &#x3C;meta name=\"viewport\" content=\"width=device-width, initialScale=1.0\" />\n\n                    &#x3C;meta name=\"description\" content={_.get(this.props, 'pageContext.frontmatter.seo.description', null) || ''} />\n\n                    {_.get(this.props, 'pageContext.frontmatter.seo.robots', null) &#x26;&#x26; (\n\n                        &#x3C;meta name=\"robots\" content={_.join(_.get(this.props, 'pageContext.frontmatter.seo.robots', null), ',')} />\n\n                    )}\n\n                    {_.map(_.get(this.props, 'pageContext.frontmatter.seo.extra', null), (meta, meta_idx) => {\n\n                        let key_name = _.get(meta, 'keyName', null) || 'name';\n\n                        return _.get(meta, 'relativeUrl', null) ? (\n\n                            _.get(this.props, 'pageContext.site.siteMetadata.domain', null) &#x26;&#x26;\n\n                                (() => {\n\n                                    let domain = _.trim(_.get(this.props, 'pageContext.site.siteMetadata.domain', null), '/');\n\n                                    let rel_url = withPrefix(_.get(meta, 'value', null));\n\n                                    let full_url = domain + rel_url;\n\n                                    return &#x3C;meta key={meta_idx} {...attribute(key_name, _.get(meta, 'name', null))} content={full_url} />;\n\n                                })()\n\n                        ) : (\n\n                            &#x3C;meta key={meta_idx + '.1'} {...attribute(key_name, _.get(meta, 'name', null))} content={_.get(meta, 'value', null)} />\n\n                        );\n\n                    })}\n\n                    &#x3C;link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" />\n\n                    &#x3C;link href=\"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&#x26;display=swap\" rel=\"stylesheet\" />\n\n                    {_.get(this.props, 'pageContext.site.siteMetadata.favicon', null) &#x26;&#x26; (\n\n                        &#x3C;link rel=\"icon\" href={withPrefix(_.get(this.props, 'pageContext.site.siteMetadata.favicon', null))} />\n\n                    )}\n\n                    &#x3C;body className={'palette-' + _.get(this.props, 'pageContext.site.siteMetadata.palette', null)} />\n\n                &#x3C;/Helmet>\n\n                &#x3C;div id=\"page\" className=\"site\">\n\n                    &#x3C;Header {...this.props} />\n\n                    &#x3C;main id=\"content\" className=\"site-content\">\n\n                        {this.props.children}\n\n                    &#x3C;/main>\n\n                    &#x3C;Footer {...this.props} />\n\n                &#x3C;/div>\n\n            &#x3C;/React.Fragment>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>SectionContent</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { classNames, withPrefix, markdownify } from '../utils';\n\nimport CtaButtons from './CtaButtons';\n\n\n\nexport default class SectionContent extends React.Component {\n\n    render() {\n\n        let section = _.get(this.props, 'section', null);\n\n        return (\n\n            &#x3C;section id={_.get(section, 'section_id', null)} className=\"block block-text outer\">\n\n                &#x3C;div className=\"outter\">\n\n                    &#x3C;div\n\n                        className={classNames('inner', {\n\n                            'grid-swap': _.get(section, 'image', null) &#x26;&#x26; _.get(section, 'image_position', null) === 'right'\n\n                        })}\n\n                    >\n\n                        {_.get(section, 'image', null) &#x26;&#x26; (\n\n                            &#x3C;div className=\"grid-item block-image\">\n\n                                &#x3C;img src={withPrefix(_.get(section, 'image', null))} alt={_.get(section, 'image_alt', null)} />\n\n                            &#x3C;/div>\n\n                        )}\n\n                        &#x3C;div>\n\n                            {_.get(section, 'title', null) &#x26;&#x26; (\n\n                                &#x3C;div className=\"block-header\">\n\n                                    &#x3C;h2 className=\"block-title\">{_.get(section, 'title', null)}&#x3C;/h2>\n\n                                &#x3C;/div>\n\n                            )}\n\n                            {_.get(section, 'content', null) &#x26;&#x26; &#x3C;div className=\"outer\">{markdownify(_.get(section, 'content', null))}&#x3C;/div>}\n\n                            {_.get(section, 'actions', null) &#x26;&#x26; (\n\n                                &#x3C;div className=\"block-buttons\">\n\n                                    &#x3C;CtaButtons {...this.props} actions={_.get(section, 'actions', null)} />\n\n                                &#x3C;/div>\n\n                            )}\n\n                        &#x3C;/div>\n\n                    &#x3C;/div>\n\n                &#x3C;/div>\n\n            &#x3C;/section>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>SectionCta</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { htmlToReact } from '../utils';\n\nimport CtaButtons from './CtaButtons';\n\n\n\nexport default class SectionCta extends React.Component {\n\n    render() {\n\n        let section = _.get(this.props, 'section', null);\n\n        return (\n\n            &#x3C;section id={_.get(section, 'section_id', null)} className=\"block block-cta outer\">\n\n                &#x3C;div className=\"inner\">\n\n                    &#x3C;div className=\"has-gradient\">\n\n                        &#x3C;div className=\"grid grid-middle grid-center\">\n\n                            {(_.get(section, 'title', null) || _.get(section, 'subtitle', null)) &#x26;&#x26; (\n\n                                &#x3C;div className=\"grid-item block-header\">\n\n                                    {_.get(section, 'title', null) &#x26;&#x26; &#x3C;h2 className=\"block-title\">{_.get(section, 'title', null)}&#x3C;/h2>}\n\n                                    {_.get(section, 'subtitle', null) &#x26;&#x26; &#x3C;p className=\"block-subtitle\">{htmlToReact(_.get(section, 'subtitle', null))}&#x3C;/p>}\n\n                                &#x3C;/div>\n\n                            )}\n\n                            {_.get(section, 'actions', null) &#x26;&#x26; (\n\n                                &#x3C;div className=\"grid-item block-buttons\">\n\n                                    &#x3C;CtaButtons {...this.props} actions={_.get(section, 'actions', null)} />\n\n                                &#x3C;/div>\n\n                            )}\n\n                        &#x3C;/div>\n\n                    &#x3C;/div>\n\n                &#x3C;/div>\n\n            &#x3C;/section>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>SectionDocs</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { classNames, htmlToReact, pathJoin, getPage, Link, withPrefix } from '../utils';\n\n\n\nexport default class SectionDocs extends React.Component {\n\n    render() {\n\n        let section = _.get(this.props, 'section', null);\n\n        return (\n\n            &#x3C;section\n\n                id={_.get(section, 'section_id', null)}\n\n                className={classNames('block', 'block-grid', 'outer', {\n\n                    'has-header': _.get(section, 'title', null) || _.get(section, 'subtitle', null)\n\n                })}\n\n            >\n\n                &#x3C;div className=\"inner\">\n\n                    {(_.get(section, 'title', null) || _.get(section, 'subtitle', null)) &#x26;&#x26; (\n\n                        &#x3C;div className=\"block-header inner-sm\">\n\n                            {_.get(section, 'title', null) &#x26;&#x26; &#x3C;h2 className=\"block-title\">{_.get(section, 'title', null)}&#x3C;/h2>}\n\n                            {_.get(section, 'subtitle', null) &#x26;&#x26; &#x3C;p className=\"block-subtitle\">{htmlToReact(_.get(section, 'subtitle', null))}&#x3C;/p>}\n\n                        &#x3C;/div>\n\n                    )}\n\n                    &#x3C;div className=\"block-content\">\n\n                        &#x3C;div\n\n                            className={classNames('grid', {\n\n                                'grid-col-2': _.get(section, 'col_number', null) === 'two',\n\n                                'grid-col-3': _.get(section, 'col_number', null) === 'three'\n\n                            })}\n\n                        >\n\n                            {_.map(_.get(this.props, 'pageContext.site.data.doc_sections.sections', null), (doc_section, doc_section_idx) => {\n\n                                let doc_section_path = pathJoin(_.get(this.props, 'pageContext.site.data.doc_sections.root_docs_path', null), doc_section);\n\n                                let doc_section_page = getPage(this.props.pageContext.pages, doc_section_path);\n\n                                return (\n\n                                    &#x3C;div key={doc_section_idx} className=\"grid-item\">\n\n                                        &#x3C;div className=\"grid-item-inside\">\n\n                                            &#x3C;h3 className=\"grid-item-title line-left\">\n\n                                                &#x3C;Link to={withPrefix(_.get(doc_section_page, 'url', null))}>\n\n                                                    {_.get(doc_section_page, 'frontmatter.title', null)}\n\n                                                &#x3C;/Link>\n\n                                            &#x3C;/h3>\n\n                                            {_.get(doc_section_page, 'frontmatter.excerpt', null) &#x26;&#x26; (\n\n                                                &#x3C;div className=\"grid-item-content\">\n\n                                                    &#x3C;p>{htmlToReact(_.get(doc_section_page, 'frontmatter.excerpt', null))}&#x3C;/p>\n\n                                                &#x3C;/div>\n\n                                            )}\n\n                                            &#x3C;div className=\"grid-item-buttons\">\n\n                                                &#x3C;Link to={withPrefix(_.get(doc_section_page, 'url', null))}>Learn More&#x3C;/Link>\n\n                                            &#x3C;/div>\n\n                                        &#x3C;/div>\n\n                                    &#x3C;/div>\n\n                                );\n\n                            })}\n\n                        &#x3C;/div>\n\n                    &#x3C;/div>\n\n                &#x3C;/div>\n\n            &#x3C;/section>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>SectionGrid</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { classNames, htmlToReact, withPrefix, Link, markdownify } from '../utils';\n\nimport CtaButtons from './CtaButtons';\n\n\n\nexport default class SectionGrid extends React.Component {\n\n    render() {\n\n        let section = _.get(this.props, 'section', null);\n\n        return (\n\n            &#x3C;section\n\n                id={_.get(section, 'section_id', null)}\n\n                className={classNames('block', 'block-grid', 'outer', {\n\n                    'has-header': _.get(section, 'title', null) || _.get(section, 'subtitle', null)\n\n                })}\n\n            >\n\n                &#x3C;div className=\"inner\">\n\n                    {(_.get(section, 'title', null) || _.get(section, 'subtitle', null)) &#x26;&#x26; (\n\n                        &#x3C;div className=\"block-header inner-sm\">\n\n                            {_.get(section, 'title', null) &#x26;&#x26; &#x3C;h2 className=\"block-title\">{_.get(section, 'title', null)}&#x3C;/h2>}\n\n                            {_.get(section, 'subtitle', null) &#x26;&#x26; &#x3C;p className=\"block-subtitle\">{htmlToReact(_.get(section, 'subtitle', null))}&#x3C;/p>}\n\n                        &#x3C;/div>\n\n                    )}\n\n                    {_.get(section, 'grid_items', null) &#x26;&#x26; (\n\n                        &#x3C;div className=\"block-content\">\n\n                            &#x3C;div\n\n                                className={classNames('grid', {\n\n                                    'grid-col-2': _.get(section, 'col_number', null) === 'two',\n\n                                    'grid-col-3': _.get(section, 'col_number', null) === 'three'\n\n                                })}\n\n                            >\n\n                                {_.map(_.get(section, 'grid_items', null), (item, item_idx) => (\n\n                                    &#x3C;div key={item_idx} className=\"grid-item\">\n\n                                        &#x3C;div className=\"grid-item-inside\">\n\n                                            {_.get(item, 'image', null) &#x26;&#x26; (\n\n                                                &#x3C;div className=\"grid-item-image\">\n\n                                                    &#x3C;img src={withPrefix(_.get(item, 'image', null))} alt={_.get(item, 'image_alt', null)} />\n\n                                                &#x3C;/div>\n\n                                            )}\n\n                                            {_.get(item, 'title', null) &#x26;&#x26; (\n\n                                                &#x3C;h3 className=\"grid-item-title line-left\">\n\n                                                    {_.get(item, 'title_url', null) ? (\n\n                                                        &#x3C;Link to={withPrefix(_.get(item, 'title_url', null))}>{_.get(item, 'title', null)}&#x3C;/Link>\n\n                                                    ) : (\n\n                                                        _.get(item, 'title', null)\n\n                                                    )}\n\n                                                &#x3C;/h3>\n\n                                            )}\n\n                                            {_.get(item, 'content', null) &#x26;&#x26; (\n\n                                                &#x3C;div className=\"grid-item-content\">{markdownify(_.get(item, 'content', null))}&#x3C;/div>\n\n                                            )}\n\n                                            {_.get(item, 'actions', null) &#x26;&#x26; (\n\n                                                &#x3C;div className=\"grid-item-buttons\">\n\n                                                    &#x3C;CtaButtons {...this.props} actions={_.get(item, 'actions', null)} />\n\n                                                &#x3C;/div>\n\n                                            )}\n\n                                        &#x3C;/div>\n\n                                    &#x3C;/div>\n\n                                ))}\n\n                            &#x3C;/div>\n\n                        &#x3C;/div>\n\n                    )}\n\n                &#x3C;/div>\n\n            &#x3C;/section>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>SectionHero</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { toStyleObj, withPrefix, markdownify } from '../utils';\n\nimport CtaButtons from './CtaButtons';\n\n\n\nexport default class SectionHero extends React.Component {\n\n    render() {\n\n        let section = _.get(this.props, 'section', null);\n\n        return (\n\n            &#x3C;section id={_.get(section, 'section_id', null)} className=\"block block-hero has-gradient outer\">\n\n                {_.get(section, 'image', null) &#x26;&#x26; (\n\n                    &#x3C;div className=\"bg-img\" style={toStyleObj(\"background-image: url('\" + withPrefix(_.get(section, 'image', null)) + \"')\")} />\n\n                )}\n\n                &#x3C;div className=\"inner-sm\">\n\n                    {_.get(section, 'title', null) &#x26;&#x26; (\n\n                        &#x3C;div className=\"block-header\">\n\n                            &#x3C;h1 className=\"block-title\">{_.get(section, 'title', null)}&#x3C;/h1>\n\n                        &#x3C;/div>\n\n                    )}\n\n                    {_.get(section, 'content', null) &#x26;&#x26; &#x3C;div className=\"block-content\">{markdownify(_.get(section, 'content', null))}&#x3C;/div>}\n\n                    {_.get(section, 'actions', null) &#x26;&#x26; (\n\n                        &#x3C;div className=\"block-buttons\">\n\n                            &#x3C;CtaButtons {...this.props} actions={_.get(section, 'actions', null)} />\n\n                        &#x3C;/div>\n\n                    )}\n\n                &#x3C;/div>\n\n            &#x3C;/section>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>Submenu</h2>\n<hr>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport _ from 'lodash';\n\n\n\nimport { classNames } from '../utils';\n\nimport ActionLink from './ActionLink';\n\n\n\nexport default class Submenu extends React.Component {\n\n    render() {\n\n        let page = _.get(this.props, 'page', null);\n\n        return (\n\n            &#x3C;ul className={_.get(this.props, 'menu_class', null)}>\n\n                {_.map(_.get(this.props, 'submenu', null), (action, action_idx) => {\n\n                    let page_url = _.trim(_.get(page, 'url', null), '/');\n\n                    let action_url = _.trim(_.get(action, 'url', null), '/');\n\n                    return (\n\n                        &#x3C;li\n\n                            key={action_idx}\n\n                            className={classNames('menu-item', {\n\n                                current: page_url === action_url,\n\n                                'menu-button': _.get(action, 'style', null) !== 'link'\n\n                            })}\n\n                        >\n\n                            &#x3C;ActionLink {...this.props} action={action} />\n\n                        &#x3C;/li>\n\n                    );\n\n                })}\n\n            &#x3C;/ul>\n\n        );\n\n    }\n\n}\n</code></pre>\n<hr>\n<details>\n  <summary>Click to expand!</summary>\n<h2>Index.js</h2>\n<hr>\n<pre><code class=\"language-js\">import ActionLink from './ActionLink';\n\nimport CtaButtons from './CtaButtons';\n\nimport DocsMenu from './DocsMenu';\n\nimport DocsSubmenu from './DocsSubmenu';\n\nimport Footer from './Footer';\n\nimport Header from './Header';\n\nimport Icon from './Icon';\n\nimport SectionContent from './SectionContent';\n\nimport SectionCta from './SectionCta';\n\nimport SectionDocs from './SectionDocs';\n\nimport SectionGrid from './SectionGrid';\n\nimport SectionHero from './SectionHero';\n\nimport Submenu from './Submenu';\n\nimport Layout from './Layout';\n\n\n\nexport {\n\n    ActionLink,\n\n    CtaButtons,\n\n    DocsMenu,\n\n    DocsSubmenu,\n\n    Footer,\n\n    Header,\n\n    Icon,\n\n    SectionContent,\n\n    SectionCta,\n\n    SectionDocs,\n\n    SectionGrid,\n\n    SectionHero,\n\n    Submenu,\n\n    Layout\n\n};\n\n\n\nexport default {\n\n    ActionLink,\n\n    CtaButtons,\n\n    DocsMenu,\n\n    DocsSubmenu,\n\n    Footer,\n\n    Header,\n\n    Icon,\n\n    SectionContent,\n\n    SectionCta,\n\n    SectionDocs,\n\n    SectionGrid,\n\n    SectionHero,\n\n    Submenu,\n\n    Layout\n\n};\n</code></pre>\n</details>\n<hr>\n<hr>\n<h1>Static Javascript</h1>\n<details>\n  <summary>Static Javascript:!</summary>\n<h1>main.js</h1>\n<pre><code class=\"language-js\">window.onGatsbyInitialClientRender = function () {\n\n    /**\n\n     * Main JS file for theme behaviours\n\n     */\n\n    // Responsive video embeds\n\n    let videoEmbeds = ['iframe[src*=\"youtube.com\"]', 'iframe[src*=\"vimeo.com\"]'];\n\n    reframe(videoEmbeds.join(','));\n\n\n\n    // Handle main navigation menu toggling on small screens\n\n    function menuToggleHandler(e) {\n\n        e.preventDefault();\n\n        document.body.classList.toggle('menu--opened');\n\n    }\n\n\n\n    // Handle docs navigation menu toggling on small screens\n\n    function docsNavToggleHandler(e) {\n\n        e.preventDefault();\n\n        document.body.classList.toggle('docs-menu--opened');\n\n    }\n\n\n\n    // Handle submenu toggling\n\n    function submenuToggleHandler(e) {\n\n        e.preventDefault();\n\n        this.parentNode.classList.toggle('active');\n\n    }\n\n\n\n    window.addMainNavigationHandlers = function () {\n\n        const menuToggle = document.querySelectorAll('.menu-toggle');\n\n        if (menuToggle) {\n\n            for (let i = 0; i &#x3C; menuToggle.length; i++) {\n\n                menuToggle[i].addEventListener('click', menuToggleHandler, false);\n\n            }\n\n        }\n\n\n\n        const submenuToggle = document.querySelectorAll('.submenu-toggle');\n\n        if (submenuToggle) {\n\n            for (let i = 0; i &#x3C; submenuToggle.length; i++) {\n\n                submenuToggle[i].addEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.removeMainNavigationHandlers = function () {\n\n        // Remove nav related classes on page load\n\n        document.body.classList.remove('menu--opened');\n\n\n\n        const menuToggle = document.querySelectorAll('.menu-toggle');\n\n        if (menuToggle) {\n\n            for (let i = 0; i &#x3C; menuToggle.length; i++) {\n\n                menuToggle[i].removeEventListener('click', menuToggleHandler, false);\n\n            }\n\n        }\n\n\n\n        const submenuToggle = document.querySelectorAll('.submenu-toggle');\n\n        if (submenuToggle) {\n\n            for (let i = 0; i &#x3C; submenuToggle.length; i++) {\n\n                submenuToggle[i].removeEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.addDocsNavigationHandlers = function () {\n\n        const docsNavToggle = document.getElementById('docs-nav-toggle');\n\n        if (docsNavToggle) {\n\n            docsNavToggle.addEventListener('click', docsNavToggleHandler, false);\n\n        }\n\n\n\n        const docsSubmenuToggle = document.querySelectorAll('.docs-submenu-toggle');\n\n        if (docsSubmenuToggle) {\n\n            for (let i = 0; i &#x3C; docsSubmenuToggle.length; i++) {\n\n                docsSubmenuToggle[i].addEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.removeDocsNavigationHandlers = function () {\n\n        // Remove docs nav related classes on page load\n\n        document.body.classList.remove('docs-menu--opened');\n\n\n\n        const docsNavToggle = document.getElementById('docs-nav-toggle');\n\n        if (docsNavToggle) {\n\n            docsNavToggle.removeEventListener('click', docsNavToggleHandler, false);\n\n        }\n\n\n\n        const docsSubmenuToggle = document.querySelectorAll('.docs-submenu-toggle');\n\n        if (docsSubmenuToggle) {\n\n            for (let i = 0; i &#x3C; docsSubmenuToggle.length; i++) {\n\n                docsSubmenuToggle[i].removeEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.addPageNavLinks = function () {\n\n        const pageToc = document.getElementById('page-nav-inside');\n\n        const pageTocContainer = document.getElementById('page-nav-link-container');\n\n\n\n        if (pageToc &#x26;&#x26; pageTocContainer) {\n\n            const pageContent = document.querySelector('.type-docs .post-content');\n\n\n\n            // Create in-page navigation\n\n            const headerLinks = getHeaderLinks({\n\n                root: pageContent\n\n            });\n\n            if (headerLinks.length > 0) {\n\n                pageToc.classList.add('has-links');\n\n                renderHeaderLinks(pageTocContainer, headerLinks);\n\n            }\n\n\n\n            // Scroll to anchors\n\n            let scroll = new SmoothScroll('[data-scroll]');\n\n            let hash = window.decodeURI(location.hash.replace('#', ''));\n\n            if (hash !== '') {\n\n                window.setTimeout(function () {\n\n                    let anchor = document.getElementById(hash);\n\n                    if (anchor) {\n\n                        scroll.animateScroll(anchor);\n\n                    }\n\n                }, 0);\n\n            }\n\n\n\n            // Highlight current anchor\n\n            let pageTocLinks = pageTocContainer.getElementsByTagName('a');\n\n            if (pageTocLinks.length > 0) {\n\n                let spy = new Gumshoe('#page-nav-inside a', {\n\n                    nested: true,\n\n                    nestedClass: 'active-parent'\n\n                });\n\n            }\n\n\n\n            // Add link to page content headings\n\n            let pageHeadings = getElementsByTagNames(pageContent, ['h2', 'h3']);\n\n            for (let i = 0; i &#x3C; pageHeadings.length; i++) {\n\n                let heading = pageHeadings[i];\n\n                if (typeof heading.id !== 'undefined' &#x26;&#x26; heading.id !== '') {\n\n                    heading.insertBefore(anchorForId(heading.id), heading.firstChild);\n\n                }\n\n            }\n\n\n\n            // Copy link url\n\n            let clipboard = new ClipboardJS('.hash-link', {\n\n                text: function (trigger) {\n\n                    return window.location.href.replace(window.location.hash, '') + trigger.getAttribute('href');\n\n                }\n\n            });\n\n        }\n\n    };\n\n\n\n    window.removePageNavLinks = function () {\n\n        const pageToc = document.getElementById('page-nav-inside');\n\n        const pageTocContainer = document.getElementById('page-nav-link-container');\n\n\n\n        if (pageToc &#x26;&#x26; pageTocContainer) {\n\n            pageToc.classList.remove('has-links');\n\n            while (pageTocContainer.firstChild) {\n\n                pageTocContainer.removeChild(pageTocContainer.firstChild);\n\n            }\n\n        }\n\n    };\n\n\n\n    function getElementsByTagNames(root, tagNames) {\n\n        let elements = [];\n\n        for (let i = 0; i &#x3C; root.children.length; i++) {\n\n            let element = root.children[i];\n\n            let tagName = element.nodeName.toLowerCase();\n\n            if (tagNames.includes(tagName)) {\n\n                elements.push(element);\n\n            }\n\n            elements = elements.concat(getElementsByTagNames(element, tagNames));\n\n        }\n\n        return elements;\n\n    }\n\n\n\n    function createLinksForHeaderElements(elements) {\n\n        let result = [];\n\n        let stack = [\n\n            {\n\n                level: 0,\n\n                children: result\n\n            }\n\n        ];\n\n        let re = /^h(\\d)$/;\n\n        for (let i = 0; i &#x3C; elements.length; i++) {\n\n            let element = elements[i];\n\n            let tagName = element.nodeName.toLowerCase();\n\n            let match = re.exec(tagName);\n\n            if (!match) {\n\n                console.warn('can not create links to non header element');\n\n                continue;\n\n            }\n\n            let headerLevel = parseInt(match[1], 10);\n\n            if (!element.id) {\n\n                if (!element.textContent) {\n\n                    console.warn('can not create link to element without id and without text content');\n\n                    continue;\n\n                }\n\n                element.id = element.textContent\n\n                    .toLowerCase()\n\n                    .replace(/[^\\w]+/g, '_')\n\n                    .replace(/^_/, '')\n\n                    .replace(/_$/, '');\n\n            }\n\n            let link = document.createElement('a');\n\n            link.href = '#' + element.id;\n\n            link.setAttribute('data-scroll', '');\n\n            link.appendChild(document.createTextNode(element.textContent));\n\n            let obj = {\n\n                id: element.id,\n\n                level: headerLevel,\n\n                textContent: element.textContent,\n\n                element: element,\n\n                link: link,\n\n                children: []\n\n            };\n\n            if (headerLevel > stack[stack.length - 1].level) {\n\n                stack[stack.length - 1].children.push(obj);\n\n                stack.push(obj);\n\n            } else {\n\n                while (headerLevel &#x3C;= stack[stack.length - 1].level &#x26;&#x26; stack.length > 1) {\n\n                    stack.pop();\n\n                }\n\n                stack[stack.length - 1].children.push(obj);\n\n                stack.push(obj);\n\n            }\n\n        }\n\n        return result;\n\n    }\n\n\n\n    function getHeaderLinks(options = {}) {\n\n        let tagNames = options.tagNames || ['h2', 'h3'];\n\n        let root = options.root || document.body;\n\n        let headerElements = getElementsByTagNames(root, tagNames);\n\n        return createLinksForHeaderElements(headerElements);\n\n    }\n\n\n\n    function renderHeaderLinks(element, links) {\n\n        if (links.length === 0) {\n\n            return;\n\n        }\n\n        let ulElm = document.createElement('ul');\n\n        for (let i = 0; i &#x3C; links.length; i++) {\n\n            let liElm = document.createElement('li');\n\n            liElm.append(links[i].link);\n\n            if (links[i].children.length > 0) {\n\n                renderHeaderLinks(liElm, links[i].children);\n\n            }\n\n            ulElm.appendChild(liElm);\n\n        }\n\n        element.appendChild(ulElm);\n\n    }\n\n\n\n    function anchorForId(id) {\n\n        let anchor = document.createElement('a');\n\n        anchor.setAttribute('class', 'hash-link');\n\n        anchor.setAttribute('data-scroll', '');\n\n        anchor.href = '#' + id;\n\n        anchor.innerHTML = '&#x3C;span class=\"screen-reader-text\">Copy&#x3C;/span>';\n\n        return anchor;\n\n    }\n\n\n\n    // Syntax Highlighter\n\n    // Prism.highlightAll();\n\n};\n\n\n\n//-----------------------------------------------------------------------\n\n//-----------------------------------------------------------------------\n\n//--------------------------------New----------------------------------\n\n//-----------------------------------------------------------------------\n\n//-----------------------------------------------------------------------\n</code></pre>\n<hr>\n<hr>\n<h1>Page Load JS</h1>\n<pre><code class=\"language-js\">window.onGatsbyRouteUpdate = function () {\n\n    window.addMainNavigationHandlers();\n\n    window.addDocsNavigationHandlers();\n\n    window.addPageNavLinks();\n\n};\n</code></pre>\n<hr>\n<hr>\n<h1>PageUnload.js</h1>\n<pre><code class=\"language-js\">window.onGatsbyPreRouteUpdate = function () {\n\n    window.removeMainNavigationHandlers();\n\n    window.removeDocsNavigationHandlers();\n\n    window.removePageNavLinks();\n\n};\n</code></pre>\n<hr>\n<hr>\n<h1>Plugins.js</h1>\n<pre><code class=\"language-js\">!(function (e, t) {\n\n    'object' == typeof exports &#x26;&#x26; 'undefined' != typeof module\n\n        ? (module.exports = t())\n\n        : 'function' == typeof define &#x26;&#x26; define.amd\n\n        ? define(t)\n\n        : ((e = 'undefined' != typeof globalThis ? globalThis : e || self).reframe = t());\n\n})(this, function () {\n\n    'use strict';\n\n    function t() {\n\n        for (var e = 0, t = 0, n = arguments.length; t &#x3C; n; t++) e += arguments[t].length;\n\n        for (var i = Array(e), o = 0, t = 0; t &#x3C; n; t++) for (var r = arguments[t], f = 0, d = r.length; f &#x3C; d; f++, o++) i[o] = r[f];\n\n        return i;\n\n    }\n\n    return function (e, s) {\n\n        return (\n\n            void 0 === s &#x26;&#x26; (s = 'js-reframe'),\n\n            ('string' == typeof e ? t(document.querySelectorAll(e)) : 'length' in e ? t(e) : [e]).forEach(function (e) {\n\n                var t, n, i, o, r, f, d, l;\n\n                -1 !== e.className.split(' ').indexOf(s) ||\n\n                    -1 &#x3C; e.style.width.indexOf('%') ||\n\n                    ((i = e.getAttribute('height') || e.offsetHeight),\n\n                    (o = e.getAttribute('width') || e.offsetWidth),\n\n                    (r = (('string' == typeof i ? parseInt(i) : i) / ('string' == typeof o ? parseInt(o) : o)) * 100),\n\n                    ((f = document.createElement('div')).className = s),\n\n                    ((d = f.style).position = 'relative'),\n\n                    (d.width = '100%'),\n\n                    (d.paddingTop = r + '%'),\n\n                    ((l = e.style).position = 'absolute'),\n\n                    (l.width = '100%'),\n\n                    (l.height = '100%'),\n\n                    (l.left = '0'),\n\n                    (l.top = '0'),\n\n                    null !== (t = e.parentNode) &#x26;&#x26; void 0 !== t &#x26;&#x26; t.insertBefore(f, e),\n\n                    null !== (n = e.parentNode) &#x26;&#x26; void 0 !== n &#x26;&#x26; n.removeChild(e),\n\n                    f.appendChild(e));\n\n            })\n\n        );\n\n    };\n\n});\n\n\n\n/*! smooth-scroll v16.1.0 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */\n\nwindow.Element &#x26;&#x26;\n\n    !Element.prototype.closest &#x26;&#x26;\n\n    (Element.prototype.closest = function (e) {\n\n        var t,\n\n            n = (this.document || this.ownerDocument).querySelectorAll(e),\n\n            o = this;\n\n        do {\n\n            for (t = n.length; 0 &#x3C;= --t &#x26;&#x26; n.item(t) !== o; );\n\n        } while (t &#x3C; 0 &#x26;&#x26; (o = o.parentElement));\n\n        return o;\n\n    }),\n\n    (function () {\n\n        if ('function' == typeof window.CustomEvent) return;\n\n        function e(e, t) {\n\n            t = t || { bubbles: !1, cancelable: !1, detail: void 0 };\n\n            var n = document.createEvent('CustomEvent');\n\n            return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), n;\n\n        }\n\n        (e.prototype = window.Event.prototype), (window.CustomEvent = e);\n\n    })(),\n\n    (function () {\n\n        for (var r = 0, e = ['ms', 'moz', 'webkit', 'o'], t = 0; t &#x3C; e.length &#x26;&#x26; !window.requestAnimationFrame; ++t)\n\n            (window.requestAnimationFrame = window[e[t] + 'RequestAnimationFrame']),\n\n                (window.cancelAnimationFrame = window[e[t] + 'CancelAnimationFrame'] || window[e[t] + 'CancelRequestAnimationFrame']);\n\n        window.requestAnimationFrame ||\n\n            (window.requestAnimationFrame = function (e, t) {\n\n                var n = new Date().getTime(),\n\n                    o = Math.max(0, 16 - (n - r)),\n\n                    a = window.setTimeout(function () {\n\n                        e(n + o);\n\n                    }, o);\n\n                return (r = n + o), a;\n\n            }),\n\n            window.cancelAnimationFrame ||\n\n                (window.cancelAnimationFrame = function (e) {\n\n                    clearTimeout(e);\n\n                });\n\n    })(),\n\n    (function (e, t) {\n\n        'function' == typeof define &#x26;&#x26; define.amd\n\n            ? define([], function () {\n\n                  return t(e);\n\n              })\n\n            : 'object' == typeof exports\n\n            ? (module.exports = t(e))\n\n            : (e.SmoothScroll = t(e));\n\n    })('undefined' != typeof global ? global : 'undefined' != typeof window ? window : this, function (q) {\n\n        'use strict';\n\n        var I = {\n\n                ignore: '[data-scroll-ignore]',\n\n                header: null,\n\n                topOnEmptyHash: !0,\n\n                speed: 500,\n\n                speedAsDuration: !1,\n\n                durationMax: null,\n\n                durationMin: null,\n\n                clip: !0,\n\n                offset: 0,\n\n                easing: 'easeInOutCubic',\n\n                customEasing: null,\n\n                updateURL: !0,\n\n                popstate: !0,\n\n                emitEvents: !0\n\n            },\n\n            F = function () {\n\n                var n = {};\n\n                return (\n\n                    Array.prototype.forEach.call(arguments, function (e) {\n\n                        for (var t in e) {\n\n                            if (!e.hasOwnProperty(t)) return;\n\n                            n[t] = e[t];\n\n                        }\n\n                    }),\n\n                    n\n\n                );\n\n            },\n\n            r = function (e) {\n\n                '#' === e.charAt(0) &#x26;&#x26; (e = e.substr(1));\n\n                for (var t, n = String(e), o = n.length, a = -1, r = '', i = n.charCodeAt(0); ++a &#x3C; o; ) {\n\n                    if (0 === (t = n.charCodeAt(a))) throw new InvalidCharacterError('Invalid character: the input contains U+0000.');\n\n                    (1 &#x3C;= t &#x26;&#x26; t &#x3C;= 31) || 127 == t || (0 === a &#x26;&#x26; 48 &#x3C;= t &#x26;&#x26; t &#x3C;= 57) || (1 === a &#x26;&#x26; 48 &#x3C;= t &#x26;&#x26; t &#x3C;= 57 &#x26;&#x26; 45 === i)\n\n                        ? (r += '\\\\' + t.toString(16) + ' ')\n\n                        : (r +=\n\n                              128 &#x3C;= t || 45 === t || 95 === t || (48 &#x3C;= t &#x26;&#x26; t &#x3C;= 57) || (65 &#x3C;= t &#x26;&#x26; t &#x3C;= 90) || (97 &#x3C;= t &#x26;&#x26; t &#x3C;= 122)\n\n                                  ? n.charAt(a)\n\n                                  : '\\\\' + n.charAt(a));\n\n                }\n\n                return '#' + r;\n\n            },\n\n            L = function () {\n\n                return Math.max(\n\n                    document.body.scrollHeight,\n\n                    document.documentElement.scrollHeight,\n\n                    document.body.offsetHeight,\n\n                    document.documentElement.offsetHeight,\n\n                    document.body.clientHeight,\n\n                    document.documentElement.clientHeight\n\n                );\n\n            },\n\n            x = function (e) {\n\n                return e ? ((t = e), parseInt(q.getComputedStyle(t).height, 10) + e.offsetTop) : 0;\n\n                var t;\n\n            },\n\n            H = function (e, t, n, o) {\n\n                if (t.emitEvents &#x26;&#x26; 'function' == typeof q.CustomEvent) {\n\n                    var a = new CustomEvent(e, {\n\n                        bubbles: !0,\n\n                        detail: { anchor: n, toggle: o }\n\n                    });\n\n                    document.dispatchEvent(a);\n\n                }\n\n            };\n\n        return function (o, e) {\n\n            var A,\n\n                a,\n\n                O,\n\n                C,\n\n                M = {};\n\n            (M.cancelScroll = function (e) {\n\n                cancelAnimationFrame(C), (C = null), e || H('scrollCancel', A);\n\n            }),\n\n                (M.animateScroll = function (i, c, e) {\n\n                    M.cancelScroll();\n\n                    var s = F(A || I, e || {}),\n\n                        u = '[object Number]' === Object.prototype.toString.call(i),\n\n                        t = u || !i.tagName ? null : i;\n\n                    if (u || t) {\n\n                        var l = q.pageYOffset;\n\n                        s.header &#x26;&#x26; !O &#x26;&#x26; (O = document.querySelector(s.header));\n\n                        var n,\n\n                            o,\n\n                            a,\n\n                            m,\n\n                            r,\n\n                            d,\n\n                            f,\n\n                            h,\n\n                            p = x(O),\n\n                            g = u\n\n                                ? i\n\n                                : (function (e, t, n, o) {\n\n                                      var a = 0;\n\n                                      if (e.offsetParent) for (; (a += e.offsetTop), (e = e.offsetParent); );\n\n                                      return (a = Math.max(a - t - n, 0)), o &#x26;&#x26; (a = Math.min(a, L() - q.innerHeight)), a;\n\n                                  })(t, p, parseInt('function' == typeof s.offset ? s.offset(i, c) : s.offset, 10), s.clip),\n\n                            y = g - l,\n\n                            v = L(),\n\n                            w = 0,\n\n                            S =\n\n                                ((n = y),\n\n                                (a = (o = s).speedAsDuration ? o.speed : Math.abs((n / 1e3) * o.speed)),\n\n                                o.durationMax &#x26;&#x26; a > o.durationMax ? o.durationMax : o.durationMin &#x26;&#x26; a &#x3C; o.durationMin ? o.durationMin : parseInt(a, 10)),\n\n                            E = function (e, t) {\n\n                                var n,\n\n                                    o,\n\n                                    a,\n\n                                    r = q.pageYOffset;\n\n                                if (e == t || r == t || (l &#x3C; t &#x26;&#x26; q.innerHeight + r) >= v)\n\n                                    return (\n\n                                        M.cancelScroll(!0),\n\n                                        (o = t),\n\n                                        (a = u),\n\n                                        0 === (n = i) &#x26;&#x26; document.body.focus(),\n\n                                        a ||\n\n                                            (n.focus(),\n\n                                            document.activeElement !== n &#x26;&#x26; (n.setAttribute('tabindex', '-1'), n.focus(), (n.style.outline = 'none')),\n\n                                            q.scrollTo(0, o)),\n\n                                        H('scrollStop', s, i, c),\n\n                                        !(C = m = null)\n\n                                    );\n\n                            },\n\n                            b = function (e) {\n\n                                var t, n, o;\n\n                                m || (m = e),\n\n                                    (w += e - m),\n\n                                    (d =\n\n                                        l +\n\n                                        y *\n\n                                            ((n = r = 1 &#x3C; (r = 0 === S ? 0 : w / S) ? 1 : r),\n\n                                            'easeInQuad' === (t = s).easing &#x26;&#x26; (o = n * n),\n\n                                            'easeOutQuad' === t.easing &#x26;&#x26; (o = n * (2 - n)),\n\n                                            'easeInOutQuad' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 2 * n * n : (4 - 2 * n) * n - 1),\n\n                                            'easeInCubic' === t.easing &#x26;&#x26; (o = n * n * n),\n\n                                            'easeOutCubic' === t.easing &#x26;&#x26; (o = --n * n * n + 1),\n\n                                            'easeInOutCubic' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 4 * n * n * n : (n - 1) * (2 * n - 2) * (2 * n - 2) + 1),\n\n                                            'easeInQuart' === t.easing &#x26;&#x26; (o = n * n * n * n),\n\n                                            'easeOutQuart' === t.easing &#x26;&#x26; (o = 1 - --n * n * n * n),\n\n                                            'easeInOutQuart' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 8 * n * n * n * n : 1 - 8 * --n * n * n * n),\n\n                                            'easeInQuint' === t.easing &#x26;&#x26; (o = n * n * n * n * n),\n\n                                            'easeOutQuint' === t.easing &#x26;&#x26; (o = 1 + --n * n * n * n * n),\n\n                                            'easeInOutQuint' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 16 * n * n * n * n * n : 1 + 16 * --n * n * n * n * n),\n\n                                            t.customEasing &#x26;&#x26; (o = t.customEasing(n)),\n\n                                            o || n)),\n\n                                    q.scrollTo(0, Math.floor(d)),\n\n                                    E(d, g) || ((C = q.requestAnimationFrame(b)), (m = e));\n\n                            };\n\n                        0 === q.pageYOffset &#x26;&#x26; q.scrollTo(0, 0),\n\n                            (f = i),\n\n                            (h = s),\n\n                            u ||\n\n                                (history.pushState &#x26;&#x26;\n\n                                    h.updateURL &#x26;&#x26;\n\n                                    history.pushState(\n\n                                        { smoothScroll: JSON.stringify(h), anchor: f.id },\n\n                                        document.title,\n\n                                        f === document.documentElement ? '#top' : '#' + f.id\n\n                                    )),\n\n                            'matchMedia' in q &#x26;&#x26; q.matchMedia('(prefers-reduced-motion)').matches\n\n                                ? q.scrollTo(0, Math.floor(g))\n\n                                : (H('scrollStart', s, i, c), M.cancelScroll(!0), q.requestAnimationFrame(b));\n\n                    }\n\n                });\n\n            var t = function (e) {\n\n                    if (\n\n                        !e.defaultPrevented &#x26;&#x26;\n\n                        !(0 !== e.button || e.metaKey || e.ctrlKey || e.shiftKey) &#x26;&#x26;\n\n                        'closest' in e.target &#x26;&#x26;\n\n                        (a = e.target.closest(o)) &#x26;&#x26;\n\n                        'a' === a.tagName.toLowerCase() &#x26;&#x26;\n\n                        !e.target.closest(A.ignore) &#x26;&#x26;\n\n                        a.hostname === q.location.hostname &#x26;&#x26;\n\n                        a.pathname === q.location.pathname &#x26;&#x26;\n\n                        /#/.test(a.href)\n\n                    ) {\n\n                        var t,\n\n                            n = r(a.hash);\n\n                        if ('#' === n) {\n\n                            if (!A.topOnEmptyHash) return;\n\n                            t = document.documentElement;\n\n                        } else t = document.querySelector(n);\n\n                        (t = t || '#top' !== n ? t : document.documentElement) &#x26;&#x26;\n\n                            (e.preventDefault(),\n\n                            (function (e) {\n\n                                if (history.replaceState &#x26;&#x26; e.updateURL &#x26;&#x26; !history.state) {\n\n                                    var t = q.location.hash;\n\n                                    (t = t || ''),\n\n                                        history.replaceState(\n\n                                            {\n\n                                                smoothScroll: JSON.stringify(e),\n\n                                                anchor: t || q.pageYOffset\n\n                                            },\n\n                                            document.title,\n\n                                            t || q.location.href\n\n                                        );\n\n                                }\n\n                            })(A),\n\n                            M.animateScroll(t, a));\n\n                    }\n\n                },\n\n                n = function (e) {\n\n                    if (null !== history.state &#x26;&#x26; history.state.smoothScroll &#x26;&#x26; history.state.smoothScroll === JSON.stringify(A)) {\n\n                        var t = history.state.anchor;\n\n                        ('string' == typeof t &#x26;&#x26; t &#x26;&#x26; !(t = document.querySelector(r(history.state.anchor)))) || M.animateScroll(t, null, { updateURL: !1 });\n\n                    }\n\n                };\n\n            M.destroy = function () {\n\n                A &#x26;&#x26; (document.removeEventListener('click', t, !1), q.removeEventListener('popstate', n, !1), M.cancelScroll(), (C = O = a = A = null));\n\n            };\n\n            return (\n\n                (function () {\n\n                    if (!('querySelector' in document &#x26;&#x26; 'addEventListener' in q &#x26;&#x26; 'requestAnimationFrame' in q &#x26;&#x26; 'closest' in q.Element.prototype))\n\n                        throw 'Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.';\n\n                    M.destroy(),\n\n                        (A = F(I, e || {})),\n\n                        (O = A.header ? document.querySelector(A.header) : null),\n\n                        document.addEventListener('click', t, !1),\n\n                        A.updateURL &#x26;&#x26; A.popstate &#x26;&#x26; q.addEventListener('popstate', n, !1);\n\n                })(),\n\n                M\n\n            );\n\n        };\n\n    });\n\n\n\n/*! gumshoejs v5.1.1 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/gumshoe */\n\nElement.prototype.closest ||\n\n    (Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector),\n\n    (Element.prototype.closest = function (t) {\n\n        var e = this;\n\n        if (!document.documentElement.contains(this)) return null;\n\n        do {\n\n            if (e.matches(t)) return e;\n\n            e = e.parentElement;\n\n        } while (null !== e);\n\n        return null;\n\n    })),\n\n    (function () {\n\n        if ('function' == typeof window.CustomEvent) return !1;\n\n        function t(t, e) {\n\n            e = e || { bubbles: !1, cancelable: !1, detail: void 0 };\n\n            var n = document.createEvent('CustomEvent');\n\n            return n.initCustomEvent(t, e.bubbles, e.cancelable, e.detail), n;\n\n        }\n\n        (t.prototype = window.Event.prototype), (window.CustomEvent = t);\n\n    })(),\n\n    (function (t, e) {\n\n        'function' == typeof define &#x26;&#x26; define.amd\n\n            ? define([], function () {\n\n                  return e(t);\n\n              })\n\n            : 'object' == typeof exports\n\n            ? (module.exports = e(t))\n\n            : (t.Gumshoe = e(t));\n\n    })('undefined' != typeof global ? global : 'undefined' != typeof window ? window : this, function (t) {\n\n        'use strict';\n\n        var e = {\n\n                navClass: 'active',\n\n                contentClass: 'active',\n\n                nested: !1,\n\n                nestedClass: 'active',\n\n                offset: 0,\n\n                reflow: !1,\n\n                events: !0\n\n            },\n\n            n = function (t, e, n) {\n\n                if (n.settings.events) {\n\n                    var o = new CustomEvent(t, {\n\n                        bubbles: !0,\n\n                        cancelable: !0,\n\n                        detail: n\n\n                    });\n\n                    e.dispatchEvent(o);\n\n                }\n\n            },\n\n            o = function (t) {\n\n                var e = 0;\n\n                if (t.offsetParent) for (; t; ) (e += t.offsetTop), (t = t.offsetParent);\n\n                return e >= 0 ? e : 0;\n\n            },\n\n            s = function (t) {\n\n                t &#x26;&#x26;\n\n                    t.sort(function (t, e) {\n\n                        return o(t.content) &#x3C; o(e.content) ? -1 : 1;\n\n                    });\n\n            },\n\n            c = function (e, n, o) {\n\n                var s = e.getBoundingClientRect(),\n\n                    c = (function (t) {\n\n                        return 'function' == typeof t.offset ? parseFloat(t.offset()) : parseFloat(t.offset);\n\n                    })(n);\n\n                return o ? parseInt(s.bottom, 10) &#x3C; (t.innerHeight || document.documentElement.clientHeight) : parseInt(s.top, 10) &#x3C;= c;\n\n            },\n\n            r = function () {\n\n                return (\n\n                    t.innerHeight + t.pageYOffset >=\n\n                    Math.max(\n\n                        document.body.scrollHeight,\n\n                        document.documentElement.scrollHeight,\n\n                        document.body.offsetHeight,\n\n                        document.documentElement.offsetHeight,\n\n                        document.body.clientHeight,\n\n                        document.documentElement.clientHeight\n\n                    )\n\n                );\n\n            },\n\n            i = function (t, e) {\n\n                var n = t[t.length - 1];\n\n                if (\n\n                    (function (t, e) {\n\n                        return !(!r() || !c(t.content, e, !0));\n\n                    })(n, e)\n\n                )\n\n                    return n;\n\n                for (var o = t.length - 1; o >= 0; o--) if (c(t[o].content, e)) return t[o];\n\n            },\n\n            l = function (t, e) {\n\n                if (e.nested) {\n\n                    var n = t.parentNode.closest('li');\n\n                    n &#x26;&#x26; (n.classList.remove(e.nestedClass), l(n, e));\n\n                }\n\n            },\n\n            a = function (t, e) {\n\n                if (t) {\n\n                    var o = t.nav.closest('li');\n\n                    o &#x26;&#x26;\n\n                        (o.classList.remove(e.navClass),\n\n                        t.content.classList.remove(e.contentClass),\n\n                        l(o, e),\n\n                        n('gumshoeDeactivate', o, {\n\n                            link: t.nav,\n\n                            content: t.content,\n\n                            settings: e\n\n                        }));\n\n                }\n\n            },\n\n            u = function (t, e) {\n\n                if (e.nested) {\n\n                    var n = t.parentNode.closest('li');\n\n                    n &#x26;&#x26; (n.classList.add(e.nestedClass), u(n, e));\n\n                }\n\n            };\n\n        return function (o, c) {\n\n            var r,\n\n                l,\n\n                f,\n\n                d,\n\n                m,\n\n                v = {};\n\n            (v.setup = function () {\n\n                (r = document.querySelectorAll(o)),\n\n                    (l = []),\n\n                    Array.prototype.forEach.call(r, function (t) {\n\n                        var e = document.getElementById(decodeURIComponent(t.hash.substr(1)));\n\n                        e &#x26;&#x26; l.push({ nav: t, content: e });\n\n                    }),\n\n                    s(l);\n\n            }),\n\n                (v.detect = function () {\n\n                    var t = i(l, m);\n\n                    t\n\n                        ? (f &#x26;&#x26; t.content === f.content) ||\n\n                          (a(f, m),\n\n                          (function (t, e) {\n\n                              if (t) {\n\n                                  var o = t.nav.closest('li');\n\n                                  o &#x26;&#x26;\n\n                                      (o.classList.add(e.navClass),\n\n                                      t.content.classList.add(e.contentClass),\n\n                                      u(o, e),\n\n                                      n('gumshoeActivate', o, {\n\n                                          link: t.nav,\n\n                                          content: t.content,\n\n                                          settings: e\n\n                                      }));\n\n                              }\n\n                          })(t, m),\n\n                          (f = t))\n\n                        : f &#x26;&#x26; (a(f, m), (f = null));\n\n                });\n\n            var p = function (e) {\n\n                    d &#x26;&#x26; t.cancelAnimationFrame(d), (d = t.requestAnimationFrame(v.detect));\n\n                },\n\n                h = function (e) {\n\n                    d &#x26;&#x26; t.cancelAnimationFrame(d),\n\n                        (d = t.requestAnimationFrame(function () {\n\n                            s(l), v.detect();\n\n                        }));\n\n                };\n\n            v.destroy = function () {\n\n                f &#x26;&#x26; a(f, m),\n\n                    t.removeEventListener('scroll', p, !1),\n\n                    m.reflow &#x26;&#x26; t.removeEventListener('resize', h, !1),\n\n                    (l = null),\n\n                    (r = null),\n\n                    (f = null),\n\n                    (d = null),\n\n                    (m = null);\n\n            };\n\n            return (\n\n                (m = (function () {\n\n                    var t = {};\n\n                    return (\n\n                        Array.prototype.forEach.call(arguments, function (e) {\n\n                            for (var n in e) {\n\n                                if (!e.hasOwnProperty(n)) return;\n\n                                t[n] = e[n];\n\n                            }\n\n                        }),\n\n                        t\n\n                    );\n\n                })(e, c || {})),\n\n                v.setup(),\n\n                v.detect(),\n\n                t.addEventListener('scroll', p, !1),\n\n                m.reflow &#x26;&#x26; t.addEventListener('resize', h, !1),\n\n                v\n\n            );\n\n        };\n\n    });\n\n\n\n/*!\n\n * clipboard.js v2.0.4\n\n * https://zenorocha.github.io/clipboard.js\n\n *\n\n * Licensed MIT © Zeno Rocha\n\n */\n\n!(function (t, e) {\n\n    'object' == typeof exports &#x26;&#x26; 'object' == typeof module\n\n        ? (module.exports = e())\n\n        : 'function' == typeof define &#x26;&#x26; define.amd\n\n        ? define([], e)\n\n        : 'object' == typeof exports\n\n        ? (exports.ClipboardJS = e())\n\n        : (t.ClipboardJS = e());\n\n})(this, function () {\n\n    return (function (n) {\n\n        var o = {};\n\n        function r(t) {\n\n            if (o[t]) return o[t].exports;\n\n            var e = (o[t] = { i: t, l: !1, exports: {} });\n\n            return n[t].call(e.exports, e, e.exports, r), (e.l = !0), e.exports;\n\n        }\n\n        return (\n\n            (r.m = n),\n\n            (r.c = o),\n\n            (r.d = function (t, e, n) {\n\n                r.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: n });\n\n            }),\n\n            (r.r = function (t) {\n\n                'undefined' != typeof Symbol &#x26;&#x26;\n\n                    Symbol.toStringTag &#x26;&#x26;\n\n                    Object.defineProperty(t, Symbol.toStringTag, {\n\n                        value: 'Module'\n\n                    }),\n\n                    Object.defineProperty(t, '__esModule', { value: !0 });\n\n            }),\n\n            (r.t = function (e, t) {\n\n                if ((1 &#x26; t &#x26;&#x26; (e = r(e)), 8 &#x26; t)) return e;\n\n                if (4 &#x26; t &#x26;&#x26; 'object' == typeof e &#x26;&#x26; e &#x26;&#x26; e.__esModule) return e;\n\n                var n = Object.create(null);\n\n                if (\n\n                    (r.r(n),\n\n                    Object.defineProperty(n, 'default', {\n\n                        enumerable: !0,\n\n                        value: e\n\n                    }),\n\n                    2 &#x26; t &#x26;&#x26; 'string' != typeof e)\n\n                )\n\n                    for (var o in e)\n\n                        r.d(\n\n                            n,\n\n                            o,\n\n                            function (t) {\n\n                                return e[t];\n\n                            }.bind(null, o)\n\n                        );\n\n                return n;\n\n            }),\n\n            (r.n = function (t) {\n\n                var e =\n\n                    t &#x26;&#x26; t.__esModule\n\n                        ? function () {\n\n                              return t.default;\n\n                          }\n\n                        : function () {\n\n                              return t;\n\n                          };\n\n                return r.d(e, 'a', e), e;\n\n            }),\n\n            (r.o = function (t, e) {\n\n                return Object.prototype.hasOwnProperty.call(t, e);\n\n            }),\n\n            (r.p = ''),\n\n            r((r.s = 0))\n\n        );\n\n    })([\n\n        function (t, e, n) {\n\n            'use strict';\n\n            var r =\n\n                    'function' == typeof Symbol &#x26;&#x26; 'symbol' == typeof Symbol.iterator\n\n                        ? function (t) {\n\n                              return typeof t;\n\n                          }\n\n                        : function (t) {\n\n                              return t &#x26;&#x26; 'function' == typeof Symbol &#x26;&#x26; t.constructor === Symbol &#x26;&#x26; t !== Symbol.prototype ? 'symbol' : typeof t;\n\n                          },\n\n                i = (function () {\n\n                    function o(t, e) {\n\n                        for (var n = 0; n &#x3C; e.length; n++) {\n\n                            var o = e[n];\n\n                            (o.enumerable = o.enumerable || !1), (o.configurable = !0), 'value' in o &#x26;&#x26; (o.writable = !0), Object.defineProperty(t, o.key, o);\n\n                        }\n\n                    }\n\n                    return function (t, e, n) {\n\n                        return e &#x26;&#x26; o(t.prototype, e), n &#x26;&#x26; o(t, n), t;\n\n                    };\n\n                })(),\n\n                a = o(n(1)),\n\n                c = o(n(3)),\n\n                u = o(n(4));\n\n            function o(t) {\n\n                return t &#x26;&#x26; t.__esModule ? t : { default: t };\n\n            }\n\n            var l = (function (t) {\n\n                function o(t, e) {\n\n                    !(function (t, e) {\n\n                        if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');\n\n                    })(this, o);\n\n                    var n = (function (t, e) {\n\n                        if (!t) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\n                        return !e || ('object' != typeof e &#x26;&#x26; 'function' != typeof e) ? t : e;\n\n                    })(this, (o.__proto__ || Object.getPrototypeOf(o)).call(this));\n\n                    return n.resolveOptions(e), n.listenClick(t), n;\n\n                }\n\n                return (\n\n                    (function (t, e) {\n\n                        if ('function' != typeof e &#x26;&#x26; null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e);\n\n                        (t.prototype = Object.create(e &#x26;&#x26; e.prototype, {\n\n                            constructor: {\n\n                                value: t,\n\n                                enumerable: !1,\n\n                                writable: !0,\n\n                                configurable: !0\n\n                            }\n\n                        })),\n\n                            e &#x26;&#x26; (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e));\n\n                    })(o, c.default),\n\n                    i(\n\n                        o,\n\n                        [\n\n                            {\n\n                                key: 'resolveOptions',\n\n                                value: function () {\n\n                                    var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : {};\n\n                                    (this.action = 'function' == typeof t.action ? t.action : this.defaultAction),\n\n                                        (this.target = 'function' == typeof t.target ? t.target : this.defaultTarget),\n\n                                        (this.text = 'function' == typeof t.text ? t.text : this.defaultText),\n\n                                        (this.container = 'object' === r(t.container) ? t.container : document.body);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'listenClick',\n\n                                value: function (t) {\n\n                                    var e = this;\n\n                                    this.listener = (0, u.default)(t, 'click', function (t) {\n\n                                        return e.onClick(t);\n\n                                    });\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'onClick',\n\n                                value: function (t) {\n\n                                    var e = t.delegateTarget || t.currentTarget;\n\n                                    this.clipboardAction &#x26;&#x26; (this.clipboardAction = null),\n\n                                        (this.clipboardAction = new a.default({\n\n                                            action: this.action(e),\n\n                                            target: this.target(e),\n\n                                            text: this.text(e),\n\n                                            container: this.container,\n\n                                            trigger: e,\n\n                                            emitter: this\n\n                                        }));\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'defaultAction',\n\n                                value: function (t) {\n\n                                    return s('action', t);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'defaultTarget',\n\n                                value: function (t) {\n\n                                    var e = s('target', t);\n\n                                    if (e) return document.querySelector(e);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'defaultText',\n\n                                value: function (t) {\n\n                                    return s('text', t);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'destroy',\n\n                                value: function () {\n\n                                    this.listener.destroy(), this.clipboardAction &#x26;&#x26; (this.clipboardAction.destroy(), (this.clipboardAction = null));\n\n                                }\n\n                            }\n\n                        ],\n\n                        [\n\n                            {\n\n                                key: 'isSupported',\n\n                                value: function () {\n\n                                    var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : ['copy', 'cut'],\n\n                                        e = 'string' == typeof t ? [t] : t,\n\n                                        n = !!document.queryCommandSupported;\n\n                                    return (\n\n                                        e.forEach(function (t) {\n\n                                            n = n &#x26;&#x26; !!document.queryCommandSupported(t);\n\n                                        }),\n\n                                        n\n\n                                    );\n\n                                }\n\n                            }\n\n                        ]\n\n                    ),\n\n                    o\n\n                );\n\n            })();\n\n            function s(t, e) {\n\n                var n = 'data-clipboard-' + t;\n\n                if (e.hasAttribute(n)) return e.getAttribute(n);\n\n            }\n\n            t.exports = l;\n\n        },\n\n        function (t, e, n) {\n\n            'use strict';\n\n            var o,\n\n                r =\n\n                    'function' == typeof Symbol &#x26;&#x26; 'symbol' == typeof Symbol.iterator\n\n                        ? function (t) {\n\n                              return typeof t;\n\n                          }\n\n                        : function (t) {\n\n                              return t &#x26;&#x26; 'function' == typeof Symbol &#x26;&#x26; t.constructor === Symbol &#x26;&#x26; t !== Symbol.prototype ? 'symbol' : typeof t;\n\n                          },\n\n                i = (function () {\n\n                    function o(t, e) {\n\n                        for (var n = 0; n &#x3C; e.length; n++) {\n\n                            var o = e[n];\n\n                            (o.enumerable = o.enumerable || !1), (o.configurable = !0), 'value' in o &#x26;&#x26; (o.writable = !0), Object.defineProperty(t, o.key, o);\n\n                        }\n\n                    }\n\n                    return function (t, e, n) {\n\n                        return e &#x26;&#x26; o(t.prototype, e), n &#x26;&#x26; o(t, n), t;\n\n                    };\n\n                })(),\n\n                a = n(2),\n\n                c = (o = a) &#x26;&#x26; o.__esModule ? o : { default: o };\n\n            var u = (function () {\n\n                function e(t) {\n\n                    !(function (t, e) {\n\n                        if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');\n\n                    })(this, e),\n\n                        this.resolveOptions(t),\n\n                        this.initSelection();\n\n                }\n\n                return (\n\n                    i(e, [\n\n                        {\n\n                            key: 'resolveOptions',\n\n                            value: function () {\n\n                                var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : {};\n\n                                (this.action = t.action),\n\n                                    (this.container = t.container),\n\n                                    (this.emitter = t.emitter),\n\n                                    (this.target = t.target),\n\n                                    (this.text = t.text),\n\n                                    (this.trigger = t.trigger),\n\n                                    (this.selectedText = '');\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'initSelection',\n\n                            value: function () {\n\n                                this.text ? this.selectFake() : this.target &#x26;&#x26; this.selectTarget();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'selectFake',\n\n                            value: function () {\n\n                                var t = this,\n\n                                    e = 'rtl' == document.documentElement.getAttribute('dir');\n\n                                this.removeFake(),\n\n                                    (this.fakeHandlerCallback = function () {\n\n                                        return t.removeFake();\n\n                                    }),\n\n                                    (this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || !0),\n\n                                    (this.fakeElem = document.createElement('textarea')),\n\n                                    (this.fakeElem.style.fontSize = '12pt'),\n\n                                    (this.fakeElem.style.border = '0'),\n\n                                    (this.fakeElem.style.padding = '0'),\n\n                                    (this.fakeElem.style.margin = '0'),\n\n                                    (this.fakeElem.style.position = 'absolute'),\n\n                                    (this.fakeElem.style[e ? 'right' : 'left'] = '-9999px');\n\n                                var n = window.pageYOffset || document.documentElement.scrollTop;\n\n                                (this.fakeElem.style.top = n + 'px'),\n\n                                    this.fakeElem.setAttribute('readonly', ''),\n\n                                    (this.fakeElem.value = this.text),\n\n                                    this.container.appendChild(this.fakeElem),\n\n                                    (this.selectedText = (0, c.default)(this.fakeElem)),\n\n                                    this.copyText();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'removeFake',\n\n                            value: function () {\n\n                                this.fakeHandler &#x26;&#x26;\n\n                                    (this.container.removeEventListener('click', this.fakeHandlerCallback),\n\n                                    (this.fakeHandler = null),\n\n                                    (this.fakeHandlerCallback = null)),\n\n                                    this.fakeElem &#x26;&#x26; (this.container.removeChild(this.fakeElem), (this.fakeElem = null));\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'selectTarget',\n\n                            value: function () {\n\n                                (this.selectedText = (0, c.default)(this.target)), this.copyText();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'copyText',\n\n                            value: function () {\n\n                                var e = void 0;\n\n                                try {\n\n                                    e = document.execCommand(this.action);\n\n                                } catch (t) {\n\n                                    e = !1;\n\n                                }\n\n                                this.handleResult(e);\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'handleResult',\n\n                            value: function (t) {\n\n                                this.emitter.emit(t ? 'success' : 'error', {\n\n                                    action: this.action,\n\n                                    text: this.selectedText,\n\n                                    trigger: this.trigger,\n\n                                    clearSelection: this.clearSelection.bind(this)\n\n                                });\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'clearSelection',\n\n                            value: function () {\n\n                                this.trigger &#x26;&#x26; this.trigger.focus(), window.getSelection().removeAllRanges();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'destroy',\n\n                            value: function () {\n\n                                this.removeFake();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'action',\n\n                            set: function () {\n\n                                var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : 'copy';\n\n                                if (((this._action = t), 'copy' !== this._action &#x26;&#x26; 'cut' !== this._action))\n\n                                    throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n\n                            },\n\n                            get: function () {\n\n                                return this._action;\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'target',\n\n                            set: function (t) {\n\n                                if (void 0 !== t) {\n\n                                    if (!t || 'object' !== (void 0 === t ? 'undefined' : r(t)) || 1 !== t.nodeType)\n\n                                        throw new Error('Invalid \"target\" value, use a valid Element');\n\n                                    if ('copy' === this.action &#x26;&#x26; t.hasAttribute('disabled'))\n\n                                        throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n\n                                    if ('cut' === this.action &#x26;&#x26; (t.hasAttribute('readonly') || t.hasAttribute('disabled')))\n\n                                        throw new Error(\n\n                                            'Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes'\n\n                                        );\n\n                                    this._target = t;\n\n                                }\n\n                            },\n\n                            get: function () {\n\n                                return this._target;\n\n                            }\n\n                        }\n\n                    ]),\n\n                    e\n\n                );\n\n            })();\n\n            t.exports = u;\n\n        },\n\n        function (t, e) {\n\n            t.exports = function (t) {\n\n                var e;\n\n                if ('SELECT' === t.nodeName) t.focus(), (e = t.value);\n\n                else if ('INPUT' === t.nodeName || 'TEXTAREA' === t.nodeName) {\n\n                    var n = t.hasAttribute('readonly');\n\n                    n || t.setAttribute('readonly', ''), t.select(), t.setSelectionRange(0, t.value.length), n || t.removeAttribute('readonly'), (e = t.value);\n\n                } else {\n\n                    t.hasAttribute('contenteditable') &#x26;&#x26; t.focus();\n\n                    var o = window.getSelection(),\n\n                        r = document.createRange();\n\n                    r.selectNodeContents(t), o.removeAllRanges(), o.addRange(r), (e = o.toString());\n\n                }\n\n                return e;\n\n            };\n\n        },\n\n        function (t, e) {\n\n            function n() {}\n\n            (n.prototype = {\n\n                on: function (t, e, n) {\n\n                    var o = this.e || (this.e = {});\n\n                    return (o[t] || (o[t] = [])).push({ fn: e, ctx: n }), this;\n\n                },\n\n                once: function (t, e, n) {\n\n                    var o = this;\n\n                    function r() {\n\n                        o.off(t, r), e.apply(n, arguments);\n\n                    }\n\n                    return (r._ = e), this.on(t, r, n);\n\n                },\n\n                emit: function (t) {\n\n                    for (var e = [].slice.call(arguments, 1), n = ((this.e || (this.e = {}))[t] || []).slice(), o = 0, r = n.length; o &#x3C; r; o++)\n\n                        n[o].fn.apply(n[o].ctx, e);\n\n                    return this;\n\n                },\n\n                off: function (t, e) {\n\n                    var n = this.e || (this.e = {}),\n\n                        o = n[t],\n\n                        r = [];\n\n                    if (o &#x26;&#x26; e) for (var i = 0, a = o.length; i &#x3C; a; i++) o[i].fn !== e &#x26;&#x26; o[i].fn._ !== e &#x26;&#x26; r.push(o[i]);\n\n                    return r.length ? (n[t] = r) : delete n[t], this;\n\n                }\n\n            }),\n\n                (t.exports = n);\n\n        },\n\n        function (t, e, n) {\n\n            var d = n(5),\n\n                h = n(6);\n\n            t.exports = function (t, e, n) {\n\n                if (!t &#x26;&#x26; !e &#x26;&#x26; !n) throw new Error('Missing required arguments');\n\n                if (!d.string(e)) throw new TypeError('Second argument must be a String');\n\n                if (!d.fn(n)) throw new TypeError('Third argument must be a Function');\n\n                if (d.node(t))\n\n                    return (\n\n                        (s = e),\n\n                        (f = n),\n\n                        (l = t).addEventListener(s, f),\n\n                        {\n\n                            destroy: function () {\n\n                                l.removeEventListener(s, f);\n\n                            }\n\n                        }\n\n                    );\n\n                if (d.nodeList(t))\n\n                    return (\n\n                        (a = t),\n\n                        (c = e),\n\n                        (u = n),\n\n                        Array.prototype.forEach.call(a, function (t) {\n\n                            t.addEventListener(c, u);\n\n                        }),\n\n                        {\n\n                            destroy: function () {\n\n                                Array.prototype.forEach.call(a, function (t) {\n\n                                    t.removeEventListener(c, u);\n\n                                });\n\n                            }\n\n                        }\n\n                    );\n\n                if (d.string(t)) return (o = t), (r = e), (i = n), h(document.body, o, r, i);\n\n                throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n\n                var o, r, i, a, c, u, l, s, f;\n\n            };\n\n        },\n\n        function (t, n) {\n\n            (n.node = function (t) {\n\n                return void 0 !== t &#x26;&#x26; t instanceof HTMLElement &#x26;&#x26; 1 === t.nodeType;\n\n            }),\n\n                (n.nodeList = function (t) {\n\n                    var e = Object.prototype.toString.call(t);\n\n                    return void 0 !== t &#x26;&#x26; ('[object NodeList]' === e || '[object HTMLCollection]' === e) &#x26;&#x26; 'length' in t &#x26;&#x26; (0 === t.length || n.node(t[0]));\n\n                }),\n\n                (n.string = function (t) {\n\n                    return 'string' == typeof t || t instanceof String;\n\n                }),\n\n                (n.fn = function (t) {\n\n                    return '[object Function]' === Object.prototype.toString.call(t);\n\n                });\n\n        },\n\n        function (t, e, n) {\n\n            var a = n(7);\n\n            function i(t, e, n, o, r) {\n\n                var i = function (e, n, t, o) {\n\n                    return function (t) {\n\n                        (t.delegateTarget = a(t.target, n)), t.delegateTarget &#x26;&#x26; o.call(e, t);\n\n                    };\n\n                }.apply(this, arguments);\n\n                return (\n\n                    t.addEventListener(n, i, r),\n\n                    {\n\n                        destroy: function () {\n\n                            t.removeEventListener(n, i, r);\n\n                        }\n\n                    }\n\n                );\n\n            }\n\n            t.exports = function (t, e, n, o, r) {\n\n                return 'function' == typeof t.addEventListener\n\n                    ? i.apply(null, arguments)\n\n                    : 'function' == typeof n\n\n                    ? i.bind(null, document).apply(null, arguments)\n\n                    : ('string' == typeof t &#x26;&#x26; (t = document.querySelectorAll(t)),\n\n                      Array.prototype.map.call(t, function (t) {\n\n                          return i(t, e, n, o, r);\n\n                      }));\n\n            };\n\n        },\n\n        function (t, e) {\n\n            if ('undefined' != typeof Element &#x26;&#x26; !Element.prototype.matches) {\n\n                var n = Element.prototype;\n\n                n.matches = n.matchesSelector || n.mozMatchesSelector || n.msMatchesSelector || n.oMatchesSelector || n.webkitMatchesSelector;\n\n            }\n\n            t.exports = function (t, e) {\n\n                for (; t &#x26;&#x26; 9 !== t.nodeType; ) {\n\n                    if ('function' == typeof t.matches &#x26;&#x26; t.matches(e)) return t;\n\n                    t = t.parentNode;\n\n                }\n\n            };\n\n        }\n\n    ]);\n\n});\n</code></pre>\n<hr>\n<hr>\n<h1>Prism.js</h1>\n<pre><code>  ```js\n\n  /* PrismJS 1.16.0\n</code></pre>\n<p><a href=\"https://prismjs.com/download.html#themes=prism&#x26;languages=markup+css+clike+javascript&#x26;plugins=toolbar+copy-to-clipboard\">https://prismjs.com/download.html#themes=prism&#x26;languages=markup+css+clike+javascript&#x26;plugins=toolbar+copy-to-clipboard</a> _/</p>\n<p>var _self = 'undefined' != typeof window ? window : 'undefined' != typeof WorkerGlobalScope &#x26;&#x26; self instanceof WorkerGlobalScope ? self : {},</p>\n<p>Prism = (function (g) {</p>\n<p>var c = /\\blang(?:uage)?-([\\w-]+)\\b/i,</p>\n<p>a = 0,</p>\n<p>C = {</p>\n<p>manual: g.Prism &#x26;&#x26; g.Prism.manual,</p>\n<p>disableWorkerMessageHandler: g.Prism &#x26;&#x26; g.Prism.disableWorkerMessageHandler,</p>\n<p>util: {</p>\n<p>encode: function (e) {</p>\n<p>return e instanceof M</p>\n<p>? new M(e.type, C.util.encode(e.content), e.alias)</p>\n<p>: Array.isArray(e)</p>\n<p>? e.map(C.util.encode)</p>\n<p>: e</p>\n<p>.replace(/&#x26;/g, '&#x26;')</p>\n<p>.replace(/&#x3C;/g, '&#x3C;')</p>\n<p>.replace(/\\u00a0/g, ' ');</p>\n<p>},</p>\n<p>type: function (e) {</p>\n<p>return Object.prototype.toString.call(e).slice(8, -1);</p>\n<p>},</p>\n<p>objId: function (e) {</p>\n<p>return e.<strong>id || Object.defineProperty(e, '</strong>id', { value: ++a }), e.__id;</p>\n<p>},</p>\n<p>clone: function n(e, t) {</p>\n<p>var r,</p>\n<p>a,</p>\n<p>i = C.util.type(e);</p>\n<p>switch (((t = t || {}), i)) {</p>\n<p>case 'Object':</p>\n<p>if (((a = C.util.objId(e)), t[a])) return t[a];</p>\n<p>for (var l in ((r = {}), (t[a] = r), e)) e.hasOwnProperty(l) &#x26;&#x26; (r[l] = n(e[l], t));</p>\n<p>return r;</p>\n<p>case 'Array':</p>\n<p>return (</p>\n<p>(a = C.util.objId(e)),</p>\n<p>t[a]</p>\n<p>? t[a]</p>\n<p>: ((r = []),</p>\n<p>(t[a] = r),</p>\n<p>e.forEach(function (e, a) {</p>\n<p>r[a] = n(e, t);</p>\n<p>}),</p>\n<p>r)</p>\n<p>);</p>\n<p>default:</p>\n<p>return e;</p>\n<p>}</p>\n<p>}</p>\n<p>},</p>\n<p>languages: {</p>\n<p>extend: function (e, a) {</p>\n<p>var n = C.util.clone(C.languages[e]);</p>\n<p>for (var t in a) n[t] = a[t];</p>\n<p>return n;</p>\n<p>},</p>\n<p>insertBefore: function (n, e, a, t) {</p>\n<p>var r = (t = t || C.languages)[n],</p>\n<p>i = {};</p>\n<p>for (var l in r)</p>\n<p>if (r.hasOwnProperty(l)) {</p>\n<p>if (l == e) for (var o in a) a.hasOwnProperty(o) &#x26;&#x26; (i[o] = a[o]);</p>\n<p>a.hasOwnProperty(l) || (i[l] = r[l]);</p>\n<p>}</p>\n<p>var s = t[n];</p>\n<p>return (</p>\n<p>(t[n] = i),</p>\n<p>C.languages.DFS(C.languages, function (e, a) {</p>\n<p>a === s &#x26;&#x26; e != n &#x26;&#x26; (this[e] = i);</p>\n<p>}),</p>\n<p>i</p>\n<p>);</p>\n<p>},</p>\n<p>DFS: function e(a, n, t, r) {</p>\n<p>r = r || {};</p>\n<p>var i = C.util.objId;</p>\n<p>for (var l in a)</p>\n<p>if (a.hasOwnProperty(l)) {</p>\n<p>n.call(a, l, a[l], t || l);</p>\n<p>var o = a[l],</p>\n<p>s = C.util.type(o);</p>\n<p>'Object' !== s || r[i(o)] ? 'Array' !== s || r[i(o)] || ((r[i(o)] = !0), e(o, n, l, r)) : ((r[i(o)] = !0), e(o, n, null, r));</p>\n<p>}</p>\n<p>}</p>\n<p>},</p>\n<p>plugins: {},</p>\n<p>highlightAll: function (e, a) {</p>\n<p>C.highlightAllUnder(document, e, a);</p>\n<p>},</p>\n<p>highlightAllUnder: function (e, a, n) {</p>\n<p>var t = {</p>\n<p>callback: n,</p>\n<p>selector: 'code[class_=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'</p>\n<p>};</p>\n<p>C.hooks.run('before-highlightall', t);</p>\n<p>for (var r, i = t.elements || e.querySelectorAll(t.selector), l = 0; (r = i[l++]); ) C.highlightElement(r, !0 === a, t.callback);</p>\n<p>},</p>\n<p>highlightElement: function (e, a, n) {</p>\n<p>for (var t, r = 'none', i = e; i &#x26;&#x26; !c.test(i.className); ) i = i.parentNode;</p>\n<p>i &#x26;&#x26; ((r = (i.className.match(c) || [, 'none'])[1].toLowerCase()), (t = C.languages[r])),</p>\n<p>(e.className = e.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r),</p>\n<p>e.parentNode &#x26;&#x26;</p>\n<p>((i = e.parentNode), /pre/i.test(i.nodeName) &#x26;&#x26; (i.className = i.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r));</p>\n<p>var l = { element: e, language: r, grammar: t, code: e.textContent },</p>\n<p>o = function (e) {</p>\n<p>(l.highlightedCode = e),</p>\n<p>C.hooks.run('before-insert', l),</p>\n<p>(l.element.innerHTML = l.highlightedCode),</p>\n<p>C.hooks.run('after-highlight', l),</p>\n<p>C.hooks.run('complete', l),</p>\n<p>n &#x26;&#x26; n.call(l.element);</p>\n<p>};</p>\n<p>if ((C.hooks.run('before-sanity-check', l), l.code))</p>\n<p>if ((C.hooks.run('before-highlight', l), l.grammar))</p>\n<p>if (a &#x26;&#x26; g.Worker) {</p>\n<p>var s = new Worker(C.filename);</p>\n<p>(s.onmessage = function (e) {</p>\n<p>o(e.data);</p>\n<p>}),</p>\n<p>s.postMessage(</p>\n<p>JSON.stringify({</p>\n<p>language: l.language,</p>\n<p>code: l.code,</p>\n<p>immediateClose: !0</p>\n<p>})</p>\n<p>);</p>\n<p>} else o(C.highlight(l.code, l.grammar, l.language));</p>\n<p>else o(C.util.encode(l.code));</p>\n<p>else C.hooks.run('complete', l);</p>\n<p>},</p>\n<p>highlight: function (e, a, n) {</p>\n<p>var t = { code: e, grammar: a, language: n };</p>\n<p>return (</p>\n<p>C.hooks.run('before-tokenize', t),</p>\n<p>(t.tokens = C.tokenize(t.code, t.grammar)),</p>\n<p>C.hooks.run('after-tokenize', t),</p>\n<p>M.stringify(C.util.encode(t.tokens), t.language)</p>\n<p>);</p>\n<p>},</p>\n<p>matchGrammar: function (e, a, n, t, r, i, l) {</p>\n<p>for (var o in n)</p>\n<p>if (n.hasOwnProperty(o) &#x26;&#x26; n[o]) {</p>\n<p>if (o == l) return;</p>\n<p>var s = n[o];</p>\n<p>s = 'Array' === C.util.type(s) ? s : [s];</p>\n<p>for (var g = 0; g &#x3C; s.length; ++g) {</p>\n<p>var c = s[g],</p>\n<p>u = c.inside,</p>\n<p>h = !!c.lookbehind,</p>\n<p>f = !!c.greedy,</p>\n<p>d = 0,</p>\n<p>m = c.alias;</p>\n<p>if (f &#x26;&#x26; !c.pattern.global) {</p>\n<p>var p = c.pattern.toString().match(/[imuy]_$/)[0];</p>\n<p>c.pattern = RegExp(c.pattern.source, p + 'g');</p>\n<p>}</p>\n<p>c = c.pattern || c;</p>\n<p>for (var y = t, v = r; y &#x3C; a.length; v += a[y].length, ++y) {</p>\n<p>var k = a[y];</p>\n<p>if (a.length > e.length) return;</p>\n<p>if (!(k instanceof M)) {</p>\n<p>if (f &#x26;&#x26; y != a.length - 1) {</p>\n<p>if (((c.lastIndex = v), !(x = c.exec(e)))) break;</p>\n<p>for (</p>\n<p>var b = x.index + (h ? x[1].length : 0), w = x.index + x[0].length, A = y, P = v, O = a.length;</p>\n<p>A &#x3C; O &#x26;&#x26; (P &#x3C; w || (!a[A].type &#x26;&#x26; !a[A - 1].greedy));</p>\n<p>++A</p>\n<p>)</p>\n<p>(P += a[A].length) &#x3C;= b &#x26;&#x26; (++y, (v = P));</p>\n<p>if (a[y] instanceof M) continue;</p>\n<p>(N = A - y), (k = e.slice(v, P)), (x.index -= v);</p>\n<p>} else {</p>\n<p>c.lastIndex = 0;</p>\n<p>var x = c.exec(k),</p>\n<p>N = 1;</p>\n<p>}</p>\n<p>if (x) {</p>\n<p>h &#x26;&#x26; (d = x[1] ? x[1].length : 0);</p>\n<p>w = (b = x.index + d) + (x = x[0].slice(d)).length;</p>\n<p>var j = k.slice(0, b),</p>\n<p>S = k.slice(w),</p>\n<p>E = [y, N];</p>\n<p>j &#x26;&#x26; (++y, (v += j.length), E.push(j));</p>\n<p>var * = new M(o, u ? C.tokenize(x, u) : x, m, x, f);</p>\n<p>if (</p>\n<p>(E.push(*),</p>\n<p>S &#x26;&#x26; E.push(S),</p>\n<p>Array.prototype.splice.apply(a, E),</p>\n<p>1 != N &#x26;&#x26; C.matchGrammar(e, a, n, y, v, !0, o),</p>\n<p>i)</p>\n<p>)</p>\n<p>break;</p>\n<p>} else if (i) break;</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>},</p>\n<p>tokenize: function (e, a) {</p>\n<p>var n = [e],</p>\n<p>t = a.rest;</p>\n<p>if (t) {</p>\n<p>for (var r in t) a[r] = t[r];</p>\n<p>delete a.rest;</p>\n<p>}</p>\n<p>return C.matchGrammar(e, n, a, 0, 0, !1), n;</p>\n<p>},</p>\n<p>hooks: {</p>\n<p>all: {},</p>\n<p>add: function (e, a) {</p>\n<p>var n = C.hooks.all;</p>\n<p>(n[e] = n[e] || []), n[e].push(a);</p>\n<p>},</p>\n<p>run: function (e, a) {</p>\n<p>var n = C.hooks.all[e];</p>\n<p>if (n &#x26;&#x26; n.length) for (var t, r = 0; (t = n[r++]); ) t(a);</p>\n<p>}</p>\n<p>},</p>\n<p>Token: M</p>\n<p>};</p>\n<p>function M(e, a, n, t, r) {</p>\n<p>(this.type = e), (this.content = a), (this.alias = n), (this.length = 0 | (t || '').length), (this.greedy = !!r);</p>\n<p>}</p>\n<p>if (</p>\n<p>((g.Prism = C),</p>\n<p>(M.stringify = function (e, a) {</p>\n<p>if ('string' == typeof e) return e;</p>\n<p>if (Array.isArray(e))</p>\n<p>return e</p>\n<p>.map(function (e) {</p>\n<p>return M.stringify(e, a);</p>\n<p>})</p>\n<p>.join('');</p>\n<p>var n = {</p>\n<p>type: e.type,</p>\n<p>content: M.stringify(e.content, a),</p>\n<p>tag: 'span',</p>\n<p>classes: ['token', e.type],</p>\n<p>attributes: {},</p>\n<p>language: a</p>\n<p>};</p>\n<p>if (e.alias) {</p>\n<p>var t = Array.isArray(e.alias) ? e.alias : [e.alias];</p>\n<p>Array.prototype.push.apply(n.classes, t);</p>\n<p>}</p>\n<p>C.hooks.run('wrap', n);</p>\n<p>var r = Object.keys(n.attributes)</p>\n<p>.map(function (e) {</p>\n<p>return e + '=\"' + (n.attributes[e] || '').replace(/\"/g, '\"') + '\"';</p>\n<p>})</p>\n<p>.join(' ');</p>\n<p>return '&#x3C;' + n.tag + ' class=\"' + n.classes.join(' ') + '\"' + (r ? ' ' + r : '') + '>' + n.content + '&#x3C;/' + n.tag + '>';</p>\n<p>}),</p>\n<p>!g.document)</p>\n<p>)</p>\n<p>return (</p>\n<p>g.addEventListener &#x26;&#x26;</p>\n<p>(C.disableWorkerMessageHandler ||</p>\n<p>g.addEventListener(</p>\n<p>'message',</p>\n<p>function (e) {</p>\n<p>var a = JSON.parse(e.data),</p>\n<p>n = a.language,</p>\n<p>t = a.code,</p>\n<p>r = a.immediateClose;</p>\n<p>g.postMessage(C.highlight(t, C.languages[n], n)), r &#x26;&#x26; g.close();</p>\n<p>},</p>\n<p>!1</p>\n<p>)),</p>\n<p>C</p>\n<p>);</p>\n<p>var e = document.currentScript || [].slice.call(document.getElementsByTagName('script')).pop();</p>\n<p>return (</p>\n<p>e &#x26;&#x26;</p>\n<p>((C.filename = e.src),</p>\n<p>C.manual ||</p>\n<p>e.hasAttribute('data-manual') ||</p>\n<p>('loading' !== document.readyState</p>\n<p>? window.requestAnimationFrame</p>\n<p>? window.requestAnimationFrame(C.highlightAll)</p>\n<p>: window.setTimeout(C.highlightAll, 16)</p>\n<p>: document.addEventListener('DOMContentLoaded', C.highlightAll))),</p>\n<p>C</p>\n<p>);</p>\n<p>})(_self);</p>\n<p>'undefined' != typeof module &#x26;&#x26; module.exports &#x26;&#x26; (module.exports = Prism), 'undefined' != typeof global &#x26;&#x26; (global.Prism = Prism);</p>\n<p>(Prism.languages.markup = {</p>\n<p>comment: /<!--[\\s\\S]_?-->/,</p>\n<p>prolog: /&#x3C;?[\\s\\S]+??>/,</p>\n<p>doctype: /&#x3C;!DOCTYPE[\\s\\S]+?>/i,</p>\n<p>cdata: /&#x3C;![CDATA[[\\s\\S]_?]]>/i,</p>\n<p>tag: {</p>\n<p>pattern: /&#x3C;/?(?!\\d)<sup id=\"fnref-\\s>\\/=$<%\"><a href=\"#fn-\\s>\\/=$<%\" class=\"footnote-ref\">\\s>\\/=$&#x3C;%</a></sup>+(?:\\s(?:\\s<em><sup id=\"fnref-\\s>\\/=\"><a href=\"#fn-\\s>\\/=\" class=\"footnote-ref\">\\s>\\/=</a></sup>+(?:\\s<em>=\\s</em>(?:\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup></em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup>_'|<sup id=\"fnref-\\s&#x27;&#x22;>=\"><a href=\"#fn-\\s&#x27;&#x22;>=\" class=\"footnote-ref\">\\s'\">=</a></sup>+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*/?>/i,</p>\n<p>greedy: !0,</p>\n<p>inside: {</p>\n<p>tag: {</p>\n<p>pattern: /^&#x3C;/?<sup id=\"fnref-\\s>\\/\"><a href=\"#fn-\\s>\\/\" class=\"footnote-ref\">\\s>\\/</a></sup>+/i,</p>\n<p>inside: { punctuation: /^&#x3C;/?/, namespace: /^<sup id=\"fnref-\\s>\\/:\"><a href=\"#fn-\\s>\\/:\" class=\"footnote-ref\">\\s>\\/:</a></sup>+:/ }</p>\n<p>},</p>\n<p>'attr-value': {</p>\n<p>pattern: /=\\s*(?:\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup><em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup></em>'|<sup id=\"fnref-\\s&#x27;&#x22;>=\"><a href=\"#fn-\\s&#x27;&#x22;>=\" class=\"footnote-ref\">\\s'\">=</a></sup>+)/i,</p>\n<p>inside: {</p>\n<p>punctuation: [/^=/, { pattern: /^(\\s*)[\"']|[\"']$/, lookbehind: !0 }]</p>\n<pre><code>            }\n\n        },\n\n        punctuation: /\\/?>/,\n\n        'attr-name': {\n\n            pattern: /[^\\s>\\/]+/,\n\n            inside: { namespace: /^[^\\s>\\/:]+:/ }\n\n        }\n\n    }\n\n},\n\nentity: /&#x26;#?[\\da-z]{1,8};/i\n</code></pre>\n<p>}),</p>\n<pre><code>(Prism.languages.markup.tag.inside['attr-value'].inside.entity = Prism.languages.markup.entity),\n\nPrism.hooks.add('wrap', function (a) {\n\n    'entity' === a.type &#x26;&#x26; (a.attributes.title = a.content.replace(/&#x26;amp;/, '&#x26;'));\n\n}),\n\nObject.defineProperty(Prism.languages.markup.tag, 'addInlined', {\n\n    value: function (a, e) {\n\n        var s = {};\n\n        (s['language-' + e] = {\n\n            pattern: /(^&#x3C;!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i,\n</code></pre>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages[e]</p>\n<p>}),</p>\n<p>(s.cdata = /^&#x3C;![CDATA[|]]>$/i);</p>\n<p>var n = {</p>\n<p>'included-cdata': { pattern: /&#x3C;![CDATA[[\\s\\S]*?]]>/i, inside: s }</p>\n<p>};</p>\n<p>n['language-' + e] = { pattern: /[\\s\\S]+/, inside: Prism.languages[e] };</p>\n<p>var i = {};</p>\n<p>(i[a] = {</p>\n<p>pattern: RegExp('(&#x3C;<strong>[\\s\\S]<em>?>)(?:&#x3C;!\\[CDATA\\[[\\s\\S]</em>?\\]\\]>\\s<em>|[\\s\\S])</em>?(?=&#x3C;\\/</strong>>)'.replace(/**/g, a), 'i'),</p>\n<p>lookbehind: !0,</p>\n<p>greedy: !0,</p>\n<p>inside: n</p>\n<p>}),</p>\n<p>Prism.languages.insertBefore('markup', 'cdata', i);</p>\n<p>}</p>\n<p>}),</p>\n<p>(Prism.languages.xml = Prism.languages.extend('markup', {})),</p>\n<p>(Prism.languages.html = Prism.languages.markup),</p>\n<p>(Prism.languages.mathml = Prism.languages.markup),</p>\n<p>(Prism.languages.svg = Prism.languages.markup);</p>\n<p>!(function (s) {</p>\n<p>var t = /(\"|')(?:\\(?:\\r\\n|[\\s\\S])|(?!\\1)<sup id=\"fnref-\\\\\\r\\n\"><a href=\"#fn-\\\\\\r\\n\" class=\"footnote-ref\">\\\\\\r\\n</a></sup>)_\\1/;</p>\n<p>(s.languages.css = {</p>\n<p>comment: //*[\\s\\S]_?*//,</p>\n<p>atrule: {</p>\n<p>pattern: /@[\\w-]+[\\s\\S]<em>?(?:;|(?=\\s</em>{))/,</p>\n<p>inside: { rule: /@[\\w-]+/ }</p>\n<p>},</p>\n<p>url: {</p>\n<p>pattern: RegExp('url\\((?:' + t.source + '|<sup id=\"fnref-\\n\\r()\"><a href=\"#fn-\\n\\r()\" class=\"footnote-ref\">\\n\\r()</a></sup>_)\\)', 'i'),</p>\n<p>inside: { function: /^url/i, punctuation: /^(|)$/ }</p>\n<p>},</p>\n<p>selector: RegExp('<a href=\"?:%5B%5E%7B%7D;%22&#x27;%5D%7C&#x27;%20+%20t.source%20+\" title=\")_?(?=\\s*\\{)\">^{}\\s</a>,</p>\n<p>string: { pattern: t, greedy: !0 },</p>\n<p>property: /[-_a-z\\xA0-\\uFFFF][-\\w\\xa0-\\uffff]<em>(?=\\s</em>:)/i,</p>\n<p>important: /!important\\b/i,</p>\n<p>function: /[-a-z0-9]+(?=()/i,</p>\n<p>punctuation: /[(){};:,]/</p>\n<p>}),</p>\n<p>(s.languages.css.atrule.inside.rest = s.languages.css);</p>\n<p>var e = s.languages.markup;</p>\n<p>e &#x26;&#x26;</p>\n<p>(e.tag.addInlined('style', 'css'),</p>\n<p>s.languages.insertBefore(</p>\n<p>'inside',</p>\n<p>'attr-value',</p>\n<p>{</p>\n<p>'style-attr': {</p>\n<p>pattern: /\\s<em>style=(\"|')(?:\\[\\s\\S]|(?!\\1)<sup id=\"fnref-\\\\\"><a href=\"#fn-\\\\\" class=\"footnote-ref\">\\\\</a></sup>)</em>\\1/i,</p>\n<p>inside: {</p>\n<p>'attr-name': { pattern: /^\\s*style/i, inside: e.tag.inside },</p>\n<p>punctuation: /^\\s<em>=\\s</em>['\"]|['\"]\\s*$/,</p>\n<p>'attr-value': { pattern: /.+/i, inside: s.languages.css }</p>\n<p>},</p>\n<p>alias: 'language-css'</p>\n<p>}</p>\n<p>},</p>\n<p>e.tag</p>\n<p>));</p>\n<p>})(Prism);</p>\n<p>Prism.languages.clike = {</p>\n<p>comment: [</p>\n<p>{ pattern: /(^|<sup id=\"fnref-\\\\\"><a href=\"#fn-\\\\\" class=\"footnote-ref\">\\\\</a></sup>)/*[\\s\\S]<em>?(?:\\</em>/|$)/, lookbehind: !0 },</p>\n<pre><code>    { pattern: /(^|[^\\\\:])\\/\\/.*/, lookbehind: !0, greedy: !0 }\n\n],\n\nstring: {\n\n    pattern: /([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,\n\n    greedy: !0\n\n},\n\n'class-name': {\n\n    pattern: /((?:\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+)|(?:catch\\s+\\())[\\w.\\\\]+/i,\n\n    lookbehind: !0,\n\n    inside: { punctuation: /[.\\\\]/ }\n\n},\n\nkeyword: /\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,\n\nboolean: /\\b(?:true|false)\\b/,\n\nfunction: /\\w+(?=\\()/,\n\nnumber: /\\b0x[\\da-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n\noperator: /--?|\\+\\+?|!=?=?|&#x3C;=?|>=?|==?=?|&#x26;&#x26;?|\\|\\|?|\\?|\\*|\\/|~|\\^|%/,\n\npunctuation: /[{}[\\];(),.:]/\n</code></pre>\n<p>};</p>\n<p>(Prism.languages.javascript = Prism.languages.extend('clike', {</p>\n<pre><code>'class-name': [\n\n    Prism.languages.clike['class-name'],\n\n    {\n\n        pattern: /(^|[^$\\w\\xA0-\\uFFFF])[\\_$A-Z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_(?=\\.(?:prototype|constructor))/,\n</code></pre>\n<p>lookbehind: !0</p>\n<p>}</p>\n<p>],</p>\n<p>keyword: [</p>\n<p>{ pattern: /((?:^|})\\s_)(?:catch|finally)\\b/, lookbehind: !0 },</p>\n<p>{</p>\n<p>pattern:</p>\n<p>/(^|<sup id=\"fnref-.\"><a href=\"#fn-.\" class=\"footnote-ref\">.</a></sup>)\\b(?:as|async(?=\\s*(?:function\\b|(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,</p>\n<p>lookbehind: !0</p>\n<p>}</p>\n<p>],</p>\n<p>number: /\\b(?:(?:0<a href=\"?:%5B%5CdA-Fa-f%5D(?:_%5B%5CdA-Fa-f%5D)?\">xX</a>+|0<a href=\"?:%5B01%5D(?:_%5B01%5D)?\">bB</a>+|0<a href=\"?:%5B0-7%5D(?:_%5B0-7%5D)?\">oO</a>+)n?|(?:\\d(?:*\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:<em>\\d)?)+.?(?:\\d(?:\\</em>\\d)?)<em>|\\B.(?:\\d(?:</em>\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,</p>\n<p>function: /[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]<em>(?=\\s</em>(?:.\\s<em>(?:apply|bind|call)\\s</em>)?()/,</p>\n<p>operator: /-[-=]?|+[+=]?|!=?=?|&#x3C;<?=?|>>?>?=?|=(?:==?|>)?|&#x26;[&#x26;=]?||[|=]?|**?=?|/=?|~|^=?|%=?|?|.{3}/</p>\n<p>})),</p>\n<p>(Prism.languages.javascript['class-name'][0].pattern = /(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\]+/),</p>\n<p>Prism.languages.insertBefore('javascript', 'keyword', {</p>\n<p>regex: {</p>\n<p>pattern: /((?:^|<sup id=\"fnref-$\\w\\xa0-\\uffff.&#x22;&#x27;\\])\\s\"><a href=\"#fn-$\\w\\xa0-\\uffff.&#x22;&#x27;\\])\\s\" class=\"footnote-ref\">$\\w\\xa0-\\uffff.\"'\\])\\s</a></sup>)\\s<em>)/([(?:<sup id=\"fnref-\\]\\\\\\r\\n\"><a href=\"#fn-\\]\\\\\\r\\n\" class=\"footnote-ref\">\\]\\\\\\r\\n</a></sup>|\\.)</em>]|\\.|<sup id=\"fnref-/\\\\\\[\\r\\n\"><a href=\"#fn-/\\\\\\[\\r\\n\" class=\"footnote-ref\">/\\\\\\[\\r\\n</a></sup>)+/[gimyus]{0,6}(?=\\s*($|[\\r\\n,.;})]]))/,</p>\n<pre><code>        lookbehind: !0,\n\n        greedy: !0\n\n    },\n\n    'function-variable': {\n\n        pattern:\n\n            /[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))_\\)|[\\_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_)\\s*=>))/,\n</code></pre>\n<p>alias: 'function'</p>\n<p>},</p>\n<p>parameter: [</p>\n<p>{</p>\n<p>pattern: /(function(?:\\s+[_$A-Za-z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]<em>)?\\s</em>(\\s*)(?!\\s)(?:<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup>|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup><em>))+?(?=\\s</em>))/,</p>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>},</p>\n<p>{</p>\n<p>pattern: /[_$a-z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]<em>(?=\\s</em>=>)/i,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>},</p>\n<p>{</p>\n<p>pattern: /((\\s<em>)(?!\\s)(?:<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup>|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup></em>))+?(?=\\s<em>)\\s</em>=>)/,</p>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>},</p>\n<p>{</p>\n<p>pattern:</p>\n<p>/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:[_$A-Za-z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]<em>\\s</em>)(\\s<em>)(?!\\s)(?:<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup>|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup></em>))+?(?=\\s<em>)\\s</em>{)/,</p>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>}</p>\n<p>],</p>\n<p>constant: /\\b<a href=\"?:%5BA-Z_%5D%7C%5Cdx?\">A-Z</a>_\\b/</p>\n<p>}),</p>\n<p>Prism.languages.insertBefore('javascript', 'string', {</p>\n<p>'template-string': {</p>\n<p>pattern: /<code>(?:\\\\[\\s\\S]|\\${(?:[^{}]|{(?:[^{}]|{[^}]_})_})+}|[^\\\\</code>])_`/,</p>\n<p>greedy: !0,</p>\n<p>inside: {</p>\n<p>interpolation: {</p>\n<p>pattern: /${(?:<sup id=\"fnref-{}\"><a href=\"#fn-{}\" class=\"footnote-ref\">{}</a></sup>|{(?:<sup id=\"fnref-{}\"><a href=\"#fn-{}\" class=\"footnote-ref\">{}</a></sup>|{<sup id=\"fnref-}\"><a href=\"#fn-}\" class=\"footnote-ref\">}</a></sup><em>})</em>})+}/,</p>\n<p>inside: {</p>\n<p>'interpolation-punctuation': {</p>\n<p>pattern: /^${|}$/,</p>\n<p>alias: 'punctuation'</p>\n<p>},</p>\n<p>rest: Prism.languages.javascript</p>\n<p>}</p>\n<p>},</p>\n<p>string: /[\\s\\S]+/</p>\n<p>}</p>\n<p>}</p>\n<p>}),</p>\n<p>Prism.languages.markup &#x26;&#x26; Prism.languages.markup.tag.addInlined('script', 'javascript'),</p>\n<p>(Prism.languages.js = Prism.languages.javascript);</p>\n<p>!(function () {</p>\n<p>if ('undefined' != typeof self &#x26;&#x26; self.Prism &#x26;&#x26; self.document) {</p>\n<p>var r = [],</p>\n<p>i = {},</p>\n<p>n = function () {};</p>\n<p>Prism.plugins.toolbar = {};</p>\n<p>var t = (Prism.plugins.toolbar.registerButton = function (t, n) {</p>\n<p>var e;</p>\n<p>(e =</p>\n<p>'function' == typeof n</p>\n<p>? n</p>\n<p>: function (t) {</p>\n<p>var e;</p>\n<p>return (</p>\n<p>'function' == typeof n.onClick</p>\n<p>? (((e = document.createElement('button')).type = 'button'),</p>\n<p>e.addEventListener('click', function () {</p>\n<p>n.onClick.call(this, t);</p>\n<p>}))</p>\n<p>: 'string' == typeof n.url</p>\n<p>? ((e = document.createElement('a')).href = n.url)</p>\n<p>: (e = document.createElement('span')),</p>\n<p>(e.textContent = n.text),</p>\n<p>e</p>\n<p>);</p>\n<p>}),</p>\n<p>t in i ? console.warn('There is a button with the key \"' + t + '\" registered already.') : r.push((i[t] = e));</p>\n<p>}),</p>\n<p>e = (Prism.plugins.toolbar.hook = function (a) {</p>\n<p>var t = a.element.parentNode;</p>\n<p>if (t &#x26;&#x26; /pre/i.test(t.nodeName) &#x26;&#x26; !t.parentNode.classList.contains('code-toolbar')) {</p>\n<p>var e = document.createElement('div');</p>\n<p>e.classList.add('code-toolbar'), t.parentNode.insertBefore(e, t), e.appendChild(t);</p>\n<p>var o = document.createElement('div');</p>\n<p>o.classList.add('toolbar'),</p>\n<p>document.body.hasAttribute('data-toolbar-order') &#x26;&#x26;</p>\n<p>(r = document.body</p>\n<p>.getAttribute('data-toolbar-order')</p>\n<p>.split(',')</p>\n<p>.map(function (t) {</p>\n<p>return i[t] || n;</p>\n<p>})),</p>\n<p>r.forEach(function (t) {</p>\n<p>var e = t(a);</p>\n<p>if (e) {</p>\n<p>var n = document.createElement('div');</p>\n<p>n.classList.add('toolbar-item'), n.appendChild(e), o.appendChild(n);</p>\n<p>}</p>\n<p>}),</p>\n<p>e.appendChild(o);</p>\n<p>}</p>\n<p>});</p>\n<p>t('label', function (t) {</p>\n<p>var e = t.element.parentNode;</p>\n<p>if (e &#x26;&#x26; /pre/i.test(e.nodeName) &#x26;&#x26; e.hasAttribute('data-label')) {</p>\n<p>var n,</p>\n<p>a,</p>\n<p>o = e.getAttribute('data-label');</p>\n<p>try {</p>\n<p>a = document.querySelector('template#' + o);</p>\n<p>} catch (t) {}</p>\n<p>return (</p>\n<p>a</p>\n<p>? (n = a.content)</p>\n<p>: (e.hasAttribute('data-url')</p>\n<p>? ((n = document.createElement('a')).href = e.getAttribute('data-url'))</p>\n<p>: (n = document.createElement('span')),</p>\n<p>(n.textContent = o)),</p>\n<p>n</p>\n<p>);</p>\n<p>}</p>\n<p>}),</p>\n<p>Prism.hooks.add('complete', e);</p>\n<p>}</p>\n<p>})();</p>\n<p>!(function () {</p>\n<p>if ('undefined' != typeof self &#x26;&#x26; self.Prism &#x26;&#x26; self.document)</p>\n<p>if (Prism.plugins.toolbar) {</p>\n<p>var r = window.ClipboardJS || void 0;</p>\n<p>r || 'function' != typeof require || (r = require('clipboard'));</p>\n<p>var i = [];</p>\n<p>if (!r) {</p>\n<p>var o = document.createElement('script'),</p>\n<p>e = document.querySelector('head');</p>\n<p>(o.onload = function () {</p>\n<p>if ((r = window.ClipboardJS)) for (; i.length; ) i.pop()();</p>\n<p>}),</p>\n<p>(o.src = '<a href=\"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js&#x27;\">https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'</a>),</p>\n<p>e.appendChild(o);</p>\n<p>}</p>\n<p>Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (e) {</p>\n<p>var t = document.createElement('a');</p>\n<p>return (t.textContent = 'Copy'), r ? o() : i.push(o), t;</p>\n<p>function o() {</p>\n<p>var o = new r(t, {</p>\n<p>text: function () {</p>\n<p>return e.code;</p>\n<p>}</p>\n<p>});</p>\n<p>o.on('success', function () {</p>\n<p>(t.textContent = 'Copied'), n();</p>\n<p>}),</p>\n<p>o.on('error', function () {</p>\n<p>(t.textContent = 'Press Ctrl+C to copy'), n();</p>\n<p>});</p>\n<p>}</p>\n<p>function n() {</p>\n<p>setTimeout(function () {</p>\n<p>t.textContent = 'Copy';</p>\n<p>}, 5e3);</p>\n<p>}</p>\n<p>});</p>\n<p>} else console.warn('Copy to Clipboard plugin loaded before Toolbar plugin.');</p>\n<p>})();</p>\n<p>/_ PrismJS 1.24.1</p>\n<p><a href=\"https://prismjs.com/download.html#themes=prism&#x26;languages=markup+css+clike+javascript\">https://prismjs.com/download.html#themes=prism&#x26;languages=markup+css+clike+javascript</a> _/</p>\n<p>var _self = 'undefined' != typeof window ? window : 'undefined' != typeof WorkerGlobalScope &#x26;&#x26; self instanceof WorkerGlobalScope ? self : {},</p>\n<p>Prism = (function (u) {</p>\n<p>var c = /\\blang(?:uage)?-([\\w-]+)\\b/i,</p>\n<p>n = 0,</p>\n<p>e = {},</p>\n<p>M = {</p>\n<p>manual: u.Prism &#x26;&#x26; u.Prism.manual,</p>\n<p>disableWorkerMessageHandler: u.Prism &#x26;&#x26; u.Prism.disableWorkerMessageHandler,</p>\n<p>util: {</p>\n<p>encode: function e(n) {</p>\n<p>return n instanceof W</p>\n<p>? new W(n.type, e(n.content), n.alias)</p>\n<p>: Array.isArray(n)</p>\n<p>? n.map(e)</p>\n<p>: n</p>\n<p>.replace(/&#x26;/g, '&#x26;')</p>\n<p>.replace(/&#x3C;/g, '&#x3C;')</p>\n<p>.replace(/\\u00a0/g, ' ');</p>\n<p>},</p>\n<p>type: function (e) {</p>\n<p>return Object.prototype.toString.call(e).slice(8, -1);</p>\n<p>},</p>\n<p>objId: function (e) {</p>\n<p>return e.<strong>id || Object.defineProperty(e, '</strong>id', { value: ++n }), e.**id;</p>\n<p>},</p>\n<p>clone: function t(e, r) {</p>\n<p>var a, n;</p>\n<p>switch (((r = r || {}), M.util.type(e))) {</p>\n<p>case 'Object':</p>\n<p>if (((n = M.util.objId(e)), r[n])) return r[n];</p>\n<p>for (var i in ((a = {}), (r[n] = a), e)) e.hasOwnProperty(i) &#x26;&#x26; (a[i] = t(e[i], r));</p>\n<p>return a;</p>\n<p>case 'Array':</p>\n<p>return (</p>\n<p>(n = M.util.objId(e)),</p>\n<p>r[n]</p>\n<p>? r[n]</p>\n<p>: ((a = []),</p>\n<p>(r[n] = a),</p>\n<p>e.forEach(function (e, n) {</p>\n<p>a[n] = t(e, r);</p>\n<p>}),</p>\n<p>a)</p>\n<p>);</p>\n<p>default:</p>\n<p>return e;</p>\n<p>}</p>\n<p>},</p>\n<p>getLanguage: function (e) {</p>\n<p>for (; e &#x26;&#x26; !c.test(e.className); ) e = e.parentElement;</p>\n<p>return e ? (e.className.match(c) || [, 'none'])[1].toLowerCase() : 'none';</p>\n<p>},</p>\n<p>currentScript: function () {</p>\n<p>if ('undefined' == typeof document) return null;</p>\n<p>if ('currentScript' in document) return document.currentScript;</p>\n<p>try {</p>\n<p>throw new Error();</p>\n<p>} catch (e) {</p>\n<p>var n = (/at <sup id=\"fnref-(\\r\\n\"><a href=\"#fn-(\\r\\n\" class=\"footnote-ref\">(\\r\\n</a></sup><em>((.</em>):.+:.+)$/i.exec(e.stack) || [])[1];</p>\n<pre><code>                        if (n) {\n\n                            var t = document.getElementsByTagName('script');\n\n                            for (var r in t) if (t[r].src == n) return t[r];\n\n                        }\n\n                        return null;\n\n                    }\n\n                },\n\n                isActive: function (e, n, t) {\n\n                    for (var r = 'no-' + n; e; ) {\n\n                        var a = e.classList;\n\n                        if (a.contains(n)) return !0;\n\n                        if (a.contains(r)) return !1;\n\n                        e = e.parentElement;\n\n                    }\n\n                    return !!t;\n\n                }\n\n            },\n\n            languages: {\n\n                plain: e,\n\n                plaintext: e,\n\n                text: e,\n\n                txt: e,\n\n                extend: function (e, n) {\n\n                    var t = M.util.clone(M.languages[e]);\n\n                    for (var r in n) t[r] = n[r];\n\n                    return t;\n\n                },\n\n                insertBefore: function (t, e, n, r) {\n\n                    var a = (r = r || M.languages)[t],\n\n                        i = {};\n\n                    for (var l in a)\n\n                        if (a.hasOwnProperty(l)) {\n\n                            if (l == e) for (var o in n) n.hasOwnProperty(o) &#x26;&#x26; (i[o] = n[o]);\n\n                            n.hasOwnProperty(l) || (i[l] = a[l]);\n\n                        }\n\n                    var s = r[t];\n\n                    return (\n\n                        (r[t] = i),\n\n                        M.languages.DFS(M.languages, function (e, n) {\n\n                            n === s &#x26;&#x26; e != t &#x26;&#x26; (this[e] = i);\n\n                        }),\n\n                        i\n\n                    );\n\n                },\n\n                DFS: function e(n, t, r, a) {\n\n                    a = a || {};\n\n                    var i = M.util.objId;\n\n                    for (var l in n)\n\n                        if (n.hasOwnProperty(l)) {\n\n                            t.call(n, l, n[l], r || l);\n\n                            var o = n[l],\n\n                                s = M.util.type(o);\n\n                            'Object' !== s || a[i(o)] ? 'Array' !== s || a[i(o)] || ((a[i(o)] = !0), e(o, t, l, a)) : ((a[i(o)] = !0), e(o, t, null, a));\n\n                        }\n\n                }\n\n            },\n\n            plugins: {},\n\n            highlightAll: function (e, n) {\n\n                M.highlightAllUnder(document, e, n);\n\n            },\n\n            highlightAllUnder: function (e, n, t) {\n\n                var r = {\n\n                    callback: t,\n\n                    container: e,\n\n                    selector: 'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'\n\n                };\n\n                M.hooks.run('before-highlightall', r),\n\n                    (r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector))),\n\n                    M.hooks.run('before-all-elements-highlight', r);\n\n                for (var a, i = 0; (a = r.elements[i++]); ) M.highlightElement(a, !0 === n, r.callback);\n\n            },\n\n            highlightElement: function (e, n, t) {\n\n                var r = M.util.getLanguage(e),\n\n                    a = M.languages[r];\n\n                e.className = e.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r;\n\n                var i = e.parentElement;\n\n                i &#x26;&#x26; 'pre' === i.nodeName.toLowerCase() &#x26;&#x26; (i.className = i.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r);\n\n                var l = { element: e, language: r, grammar: a, code: e.textContent };\n\n                function o(e) {\n\n                    (l.highlightedCode = e),\n\n                        M.hooks.run('before-insert', l),\n\n                        (l.element.innerHTML = l.highlightedCode),\n\n                        M.hooks.run('after-highlight', l),\n\n                        M.hooks.run('complete', l),\n\n                        t &#x26;&#x26; t.call(l.element);\n\n                }\n\n                if (\n\n                    (M.hooks.run('before-sanity-check', l),\n\n                    (i = l.element.parentElement) &#x26;&#x26; 'pre' === i.nodeName.toLowerCase() &#x26;&#x26; !i.hasAttribute('tabindex') &#x26;&#x26; i.setAttribute('tabindex', '0'),\n\n                    !l.code)\n\n                )\n\n                    return M.hooks.run('complete', l), void (t &#x26;&#x26; t.call(l.element));\n\n                if ((M.hooks.run('before-highlight', l), l.grammar))\n\n                    if (n &#x26;&#x26; u.Worker) {\n\n                        var s = new Worker(M.filename);\n\n                        (s.onmessage = function (e) {\n\n                            o(e.data);\n\n                        }),\n\n                            s.postMessage(JSON.stringify({ language: l.language, code: l.code, immediateClose: !0 }));\n\n                    } else o(M.highlight(l.code, l.grammar, l.language));\n\n                else o(M.util.encode(l.code));\n\n            },\n\n            highlight: function (e, n, t) {\n\n                var r = { code: e, grammar: n, language: t };\n\n                return (\n\n                    M.hooks.run('before-tokenize', r),\n\n                    (r.tokens = M.tokenize(r.code, r.grammar)),\n\n                    M.hooks.run('after-tokenize', r),\n\n                    W.stringify(M.util.encode(r.tokens), r.language)\n\n                );\n\n            },\n\n            tokenize: function (e, n) {\n\n                var t = n.rest;\n\n                if (t) {\n\n                    for (var r in t) n[r] = t[r];\n\n                    delete n.rest;\n\n                }\n\n                var a = new i();\n\n                return (\n\n                    I(a, a.head, e),\n\n                    (function e(n, t, r, a, i, l) {\n\n                        for (var o in r)\n\n                            if (r.hasOwnProperty(o) &#x26;&#x26; r[o]) {\n\n                                var s = r[o];\n\n                                s = Array.isArray(s) ? s : [s];\n\n                                for (var u = 0; u &#x3C; s.length; ++u) {\n\n                                    if (l &#x26;&#x26; l.cause == o + ',' + u) return;\n\n                                    var c = s[u],\n\n                                        g = c.inside,\n\n                                        f = !!c.lookbehind,\n\n                                        h = !!c.greedy,\n\n                                        d = c.alias;\n\n                                    if (h &#x26;&#x26; !c.pattern.global) {\n\n                                        var p = c.pattern.toString().match(/[imsuy]*$/)[0];\n</code></pre>\n<p>c.pattern = RegExp(c.pattern.source, p + 'g');</p>\n<p>}</p>\n<p>for (var v = c.pattern || c, m = a.next, y = i; m !== t.tail &#x26;&#x26; !(l &#x26;&#x26; y >= l.reach); y += m.value.length, m = m.next) {</p>\n<p>var b = m.value;</p>\n<p>if (t.length > n.length) return;</p>\n<p>if (!(b instanceof W)) {</p>\n<p>var k,</p>\n<p>x = 1;</p>\n<p>if (h) {</p>\n<p>if (!(k = z(v, y, n, f))) break;</p>\n<p>var w = k.index,</p>\n<p>A = k.index + k[0].length,</p>\n<p>P = y;</p>\n<p>for (P += m.value.length; P &#x3C;= w; ) (m = m.next), (P += m.value.length);</p>\n<p>if (((P -= m.value.length), (y = P), m.value instanceof W)) continue;</p>\n<p>for (var E = m; E !== t.tail &#x26;&#x26; (P &#x3C; A || 'string' == typeof E.value); E = E.next)</p>\n<p>x++, (P += E.value.length);</p>\n<p>x--, (b = n.slice(y, P)), (k.index -= y);</p>\n<p>} else if (!(k = z(v, 0, b, f))) continue;</p>\n<p>var w = k.index,</p>\n<p>S = k[0],</p>\n<p>O = b.slice(0, w),</p>\n<p>L = b.slice(w + S.length),</p>\n<p>N = y + b.length;</p>\n<p>l &#x26;&#x26; N > l.reach &#x26;&#x26; (l.reach = N);</p>\n<p>var j = m.prev;</p>\n<p>O &#x26;&#x26; ((j = I(t, j, O)), (y += O.length)), q(t, j, x);</p>\n<p>var C = new W(o, g ? M.tokenize(S, g) : S, d, S);</p>\n<p>if (((m = I(t, j, C)), L &#x26;&#x26; I(t, m, L), 1 &#x3C; x)) {</p>\n<p>var _ = { cause: o + ',' + u, reach: N };</p>\n<p>e(n, t, r, m.prev, y, <em>), l &#x26;&#x26;</em>.reach > l.reach &#x26;&#x26; (l.reach = _.reach);</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>}</p>\n<p>})(e, a, n, a.head, 0),</p>\n<p>(function (e) {</p>\n<p>var n = [],</p>\n<p>t = e.head.next;</p>\n<p>for (; t !== e.tail; ) n.push(t.value), (t = t.next);</p>\n<p>return n;</p>\n<p>})(a)</p>\n<p>);</p>\n<p>},</p>\n<p>hooks: {</p>\n<p>all: {},</p>\n<p>add: function (e, n) {</p>\n<p>var t = M.hooks.all;</p>\n<p>(t[e] = t[e] || []), t[e].push(n);</p>\n<p>},</p>\n<p>run: function (e, n) {</p>\n<p>var t = M.hooks.all[e];</p>\n<p>if (t &#x26;&#x26; t.length) for (var r, a = 0; (r = t[a++]); ) r(n);</p>\n<p>}</p>\n<p>},</p>\n<p>Token: W</p>\n<p>};</p>\n<p>function W(e, n, t, r) {</p>\n<p>(this.type = e), (this.content = n), (this.alias = t), (this.length = 0 | (r || '').length);</p>\n<p>}</p>\n<p>function z(e, n, t, r) {</p>\n<p>e.lastIndex = n;</p>\n<p>var a = e.exec(t);</p>\n<p>if (a &#x26;&#x26; r &#x26;&#x26; a[1]) {</p>\n<p>var i = a[1].length;</p>\n<p>(a.index += i), (a[0] = a[0].slice(i));</p>\n<p>}</p>\n<p>return a;</p>\n<p>}</p>\n<p>function i() {</p>\n<p>var e = { value: null, prev: null, next: null },</p>\n<p>n = { value: null, prev: e, next: null };</p>\n<p>(e.next = n), (this.head = e), (this.tail = n), (this.length = 0);</p>\n<p>}</p>\n<p>function I(e, n, t) {</p>\n<p>var r = n.next,</p>\n<p>a = { value: t, prev: n, next: r };</p>\n<p>return (n.next = a), (r.prev = a), e.length++, a;</p>\n<p>}</p>\n<p>function q(e, n, t) {</p>\n<p>for (var r = n.next, a = 0; a &#x3C; t &#x26;&#x26; r !== e.tail; a++) r = r.next;</p>\n<p>((n.next = r).prev = n), (e.length -= a);</p>\n<p>}</p>\n<p>if (</p>\n<p>((u.Prism = M),</p>\n<p>(W.stringify = function n(e, t) {</p>\n<p>if ('string' == typeof e) return e;</p>\n<p>if (Array.isArray(e)) {</p>\n<p>var r = '';</p>\n<p>return (</p>\n<p>e.forEach(function (e) {</p>\n<p>r += n(e, t);</p>\n<p>}),</p>\n<p>r</p>\n<p>);</p>\n<p>}</p>\n<p>var a = { type: e.type, content: n(e.content, t), tag: 'span', classes: ['token', e.type], attributes: {}, language: t },</p>\n<p>i = e.alias;</p>\n<p>i &#x26;&#x26; (Array.isArray(i) ? Array.prototype.push.apply(a.classes, i) : a.classes.push(i)), M.hooks.run('wrap', a);</p>\n<p>var l = '';</p>\n<p>for (var o in a.attributes) l += ' ' + o + '=\"' + (a.attributes[o] || '').replace(/\"/g, '\"') + '\"';</p>\n<p>return '&#x3C;' + a.tag + ' class=\"' + a.classes.join(' ') + '\"' + l + '>' + a.content + '&#x3C;/' + a.tag + '>';</p>\n<p>}),</p>\n<p>!u.document)</p>\n<p>)</p>\n<p>return (</p>\n<p>u.addEventListener &#x26;&#x26;</p>\n<p>(M.disableWorkerMessageHandler ||</p>\n<p>u.addEventListener(</p>\n<p>'message',</p>\n<p>function (e) {</p>\n<p>var n = JSON.parse(e.data),</p>\n<p>t = n.language,</p>\n<p>r = n.code,</p>\n<p>a = n.immediateClose;</p>\n<p>u.postMessage(M.highlight(r, M.languages[t], t)), a &#x26;&#x26; u.close();</p>\n<p>},</p>\n<p>!1</p>\n<p>)),</p>\n<p>M</p>\n<p>);</p>\n<p>var t = M.util.currentScript();</p>\n<p>function r() {</p>\n<p>M.manual || M.highlightAll();</p>\n<p>}</p>\n<p>if ((t &#x26;&#x26; ((M.filename = t.src), t.hasAttribute('data-manual') &#x26;&#x26; (M.manual = !0)), !M.manual)) {</p>\n<p>var a = document.readyState;</p>\n<p>'loading' === a || ('interactive' === a &#x26;&#x26; t &#x26;&#x26; t.defer)</p>\n<p>? document.addEventListener('DOMContentLoaded', r)</p>\n<p>: window.requestAnimationFrame</p>\n<p>? window.requestAnimationFrame(r)</p>\n<p>: window.setTimeout(r, 16);</p>\n<p>}</p>\n<p>return M;</p>\n<p>})(_self);</p>\n<p>'undefined' != typeof module &#x26;&#x26; module.exports &#x26;&#x26; (module.exports = Prism), 'undefined' != typeof global &#x26;&#x26; (global.Prism = Prism);</p>\n<p>(Prism.languages.markup = {</p>\n<p>comment: /<!--[\\s\\S]*?-->/,</p>\n<p>prolog: /&#x3C;?[\\s\\S]+??>/,</p>\n<p>doctype: {</p>\n<p>pattern: /&#x3C;!DOCTYPE(?:[^>\"'[]]|\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup><em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup></em>')+(?:[(?:<sup id=\"fnref-<&#x22;&#x27;\\]\"><a href=\"#fn-<&#x22;&#x27;\\]\" class=\"footnote-ref\">&#x3C;\"'\\]</a></sup>|\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup><em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup></em>'|&#x3C;(?!!--)|<!--(?:[^-]|-(?!->))*-->)<em>]\\s</em>)?>/i,</p>\n<p>greedy: !0,</p>\n<p>inside: {</p>\n<p>'internal-subset': { pattern: /(^<sup id=\"fnref-\\[\"><a href=\"#fn-\\[\" class=\"footnote-ref\">\\[</a></sup>*[)[\\s\\S]+(?=]>$)/, lookbehind: !0, greedy: !0, inside: null },</p>\n<p>string: { pattern: /\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup><em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup></em>'/, greedy: !0 },</p>\n<p>punctuation: /^&#x3C;!|>$|[[]]/,</p>\n<p>'doctype-tag': /^DOCTYPE/,</p>\n<p>name: /<sup id=\"fnref-\\s<>&#x27;&#x22;\"><a href=\"#fn-\\s<>&#x27;&#x22;\" class=\"footnote-ref\">\\s&#x3C;>'\"</a></sup>+/</p>\n<p>}</p>\n<p>},</p>\n<p>cdata: /&#x3C;![CDATA[[\\s\\S]*?]]>/i,</p>\n<p>tag: {</p>\n<p>pattern: /&#x3C;/?(?!\\d)<sup id=\"fnref-\\s>\\/=$<%\"><a href=\"#fn-\\s>\\/=$<%\" class=\"footnote-ref\">\\s>\\/=$&#x3C;%</a></sup>+(?:\\s(?:\\s<em><sup id=\"fnref-\\s>\\/=\"><a href=\"#fn-\\s>\\/=\" class=\"footnote-ref\">\\s>\\/=</a></sup>+(?:\\s</em>=\\s<em>(?:\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup></em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup><em>'|<sup id=\"fnref-\\s&#x27;&#x22;>=\"><a href=\"#fn-\\s&#x27;&#x22;>=\" class=\"footnote-ref\">\\s'\">=</a></sup>+(?=[\\s>]))|(?=[\\s/>])))+)?\\s</em>/?>/,</p>\n<p>greedy: !0,</p>\n<p>inside: {</p>\n<p>tag: { pattern: /^&#x3C;/?<sup id=\"fnref-\\s>\\/\"><a href=\"#fn-\\s>\\/\" class=\"footnote-ref\">\\s>\\/</a></sup>+/, inside: { punctuation: /^&#x3C;/?/, namespace: /^<sup id=\"fnref-\\s>\\/:\"><a href=\"#fn-\\s>\\/:\" class=\"footnote-ref\">\\s>\\/:</a></sup>+:/ } },</p>\n<p>'special-attr': [],</p>\n<p>'attr-value': { pattern: /=\\s<em>(?:\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup></em>\"|'<sup id=\"fnref-&#x27;\"><a href=\"#fn-&#x27;\" class=\"footnote-ref\">'</a></sup>*'|<sup id=\"fnref-\\s&#x27;&#x22;>=\"><a href=\"#fn-\\s&#x27;&#x22;>=\" class=\"footnote-ref\">\\s'\">=</a></sup>+)/, inside: { punctuation: [{ pattern: /^=/, alias: 'attr-equals' }, /\"|'/] } },</p>\n<p>punctuation: //?>/,</p>\n<p>'attr-name': { pattern: /<sup id=\"fnref-\\s>\\/\"><a href=\"#fn-\\s>\\/\" class=\"footnote-ref\">\\s>\\/</a></sup>+/, inside: { namespace: /^<sup id=\"fnref-\\s>\\/:\"><a href=\"#fn-\\s>\\/:\" class=\"footnote-ref\">\\s>\\/:</a></sup>+:/ } }</p>\n<p>}</p>\n<p>},</p>\n<p>entity: [{ pattern: /&#x26;[\\da-z]{1,8};/i, alias: 'named-entity' }, /&#x26;#x?[\\da-f]{1,8};/i]</p>\n<p>}),</p>\n<p>(Prism.languages.markup.tag.inside['attr-value'].inside.entity = Prism.languages.markup.entity),</p>\n<p>(Prism.languages.markup.doctype.inside['internal-subset'].inside = Prism.languages.markup),</p>\n<p>Prism.hooks.add('wrap', function (a) {</p>\n<p>'entity' === a.type &#x26;&#x26; (a.attributes.title = a.content.replace(/&#x26;/, '&#x26;'));</p>\n<p>}),</p>\n<p>Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {</p>\n<p>value: function (a, e) {</p>\n<p>var s = {};</p>\n<p>(s['language-' + e] = { pattern: /(^&#x3C;![CDATA[)[\\s\\S]+?(?=]]>$)/i, lookbehind: !0, inside: Prism.languages[e] }),</p>\n<pre><code>            (s.cdata = /^&#x3C;!\\[CDATA\\[|\\]\\]>$/i);\n</code></pre>\n<p>var t = { 'included-cdata': { pattern: /&#x3C;![CDATA[[\\s\\S]*?]]>/i, inside: s } };</p>\n<p>t['language-' + e] = { pattern: /[\\s\\S]+/, inside: Prism.languages[e] };</p>\n<p>var n = {};</p>\n<p>(n[a] = {</p>\n<p>pattern: RegExp(</p>\n<p>'(&#x3C;<strong><sup id=\"fnref->\"><a href=\"#fn->\" class=\"footnote-ref\">></a></sup><em>>)(?:&#x3C;!\\<a href=\"?!%5D%3E\">CDATA\\[(?:<sup id=\"fnref-\\\\\"><a href=\"#fn-\\\\\" class=\"footnote-ref\">\\\\</a></sup>]|\\</a>)</em>\\]\\]>|(?!&#x3C;!\\[CDATA\\[)[^])*?(?=&#x3C;/</strong>>)'.replace(/__/g, function () {</p>\n<p>return a;</p>\n<p>}),</p>\n<p>'i'</p>\n<p>),</p>\n<p>lookbehind: !0,</p>\n<p>greedy: !0,</p>\n<p>inside: t</p>\n<p>}),</p>\n<p>Prism.languages.insertBefore('markup', 'cdata', n);</p>\n<p>}</p>\n<p>}),</p>\n<p>Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', {</p>\n<p>value: function (a, e) {</p>\n<p>Prism.languages.markup.tag.inside['special-attr'].push({</p>\n<p>pattern: RegExp('(^|[\"'\\s])(?:' + a + ')\\s<em>=\\s</em>(?:\"<sup id=\"fnref-&#x22;\"><a href=\"#fn-&#x22;\" class=\"footnote-ref\">\"</a></sup><em>\"|'<sup id=\"fnref-\\&#x27;\"><a href=\"#fn-\\&#x27;\" class=\"footnote-ref\">\\'</a></sup></em>'|<sup id=\"fnref-\\\\s\\&#x27;&#x22;>=\"><a href=\"#fn-\\\\s\\&#x27;&#x22;>=\" class=\"footnote-ref\">\\\\s\\'\">=</a></sup>+(?=[\\s>]))', 'i'),</p>\n<p>lookbehind: !0,</p>\n<p>inside: {</p>\n<p>'attr-name': /^<sup id=\"fnref-\\s=\"><a href=\"#fn-\\s=\" class=\"footnote-ref\">\\s=</a></sup>+/,</p>\n<p>'attr-value': {</p>\n<p>pattern: /=[\\s\\S]+/,</p>\n<p>inside: {</p>\n<p>value: {</p>\n<p>pattern: /(^=\\s<em>([\"']|(?![\"'])))\\S[\\s\\S]</em>(?=\\2$)/,</p>\n<pre><code>                            lookbehind: !0,\n\n                            alias: [e, 'language-' + e],\n\n                            inside: Prism.languages[e]\n\n                        },\n\n                        punctuation: [{ pattern: /^=/, alias: 'attr-equals' }, /\"|'/]\n\n                    }\n\n                }\n\n            }\n\n        });\n\n    }\n\n}),\n\n(Prism.languages.html = Prism.languages.markup),\n\n(Prism.languages.mathml = Prism.languages.markup),\n\n(Prism.languages.svg = Prism.languages.markup),\n\n(Prism.languages.xml = Prism.languages.extend('markup', {})),\n\n(Prism.languages.ssml = Prism.languages.xml),\n\n(Prism.languages.atom = Prism.languages.xml),\n\n(Prism.languages.rss = Prism.languages.xml);\n</code></pre>\n<p>!(function (s) {</p>\n<pre><code>var e = /(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n])*')/;\n\n(s.languages.css = {\n\n    comment: /\\/\\*[\\s\\S]*?\\*\\//,\n\n    atrule: {\n\n        pattern: /@[\\w-](?:[^;{\\s]|\\s+(?![\\s{]))*(?:;|(?=\\s*\\{))/,\n\n        inside: {\n\n            rule: /^@[\\w-]+/,\n\n            'selector-function-argument': {\n\n                pattern: /(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/,\n\n                lookbehind: !0,\n\n                alias: 'selector'\n\n            },\n\n            keyword: { pattern: /(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/, lookbehind: !0 }\n\n        }\n\n    },\n\n    url: {\n\n        pattern: RegExp('\\\\burl\\\\((?:' + e.source + '|(?:[^\\\\\\\\\\r\\n()\"\\']|\\\\\\\\[^])*)\\\\)', 'i'),\n\n        greedy: !0,\n\n        inside: { function: /^url/i, punctuation: /^\\(|\\)$/, string: { pattern: RegExp('^' + e.source + '$'), alias: 'url' } }\n\n    },\n\n    selector: { pattern: RegExp('(^|[{}\\\\s])[^{}\\\\s](?:[^{};\"\\'\\\\s]|\\\\s+(?![\\\\s{])|' + e.source + ')*(?=\\\\s*\\\\{)'), lookbehind: !0 },\n\n    string: { pattern: e, greedy: !0 },\n\n    property: { pattern: /(^|[^-\\w\\xA0-\\uFFFF])(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i, lookbehind: !0 },\n\n    important: /!important\\b/i,\n\n    function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\\()/i, lookbehind: !0 },\n\n    punctuation: /[(){};:,]/\n\n}),\n\n    (s.languages.css.atrule.inside.rest = s.languages.css);\n\nvar t = s.languages.markup;\n\nt &#x26;&#x26; (t.tag.addInlined('style', 'css'), t.tag.addAttribute('style', 'css'));\n</code></pre>\n<p>})(Prism);</p>\n<p>Prism.languages.clike = {</p>\n<pre><code>comment: [\n\n    { pattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/, lookbehind: !0, greedy: !0 },\n</code></pre>\n<p>{ pattern: /(^|<sup id=\"fnref-\\\\:\"><a href=\"#fn-\\\\:\" class=\"footnote-ref\">\\\\:</a></sup>)//.*/, lookbehind: !0, greedy: !0 }</p>\n<p>],</p>\n<p>string: { pattern: /([\"'])(?:\\(?:\\r\\n|[\\s\\S])|(?!\\1)<sup id=\"fnref-\\\\\\r\\n\"><a href=\"#fn-\\\\\\r\\n\" class=\"footnote-ref\">\\\\\\r\\n</a></sup>)*\\1/, greedy: !0 },</p>\n<p>'class-name': {</p>\n<p>pattern: /(\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+|\\bcatch\\s+()[\\w.\\]+/i,</p>\n<p>lookbehind: !0,</p>\n<p>inside: { punctuation: /[.\\]/ }</p>\n<p>},</p>\n<p>keyword: /\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,</p>\n<p>boolean: /\\b(?:true|false)\\b/,</p>\n<p>function: /\\b\\w+(?=()/,</p>\n<p>number: /\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:.\\d*)?|\\B.\\d+)(?:e[+-]?\\d+)?/i,</p>\n<p>operator: /[&#x3C;>]=?|[!=]=?=?|--?|++?|&#x26;&#x26;?|||?|[?*/~^%]/,</p>\n<p>punctuation: /[{}[];(),.:]/</p>\n<p>};</p>\n<p>(Prism.languages.javascript = Prism.languages.extend('clike', {</p>\n<p>'class-name': [</p>\n<p>Prism.languages.clike['class-name'],</p>\n<p>{ pattern: /(^|<sup id=\"fnref-$\\w\\xa0-\\uffff\"><a href=\"#fn-$\\w\\xa0-\\uffff\" class=\"footnote-ref\">$\\w\\xa0-\\uffff</a></sup>)(?!\\s)<a href=\"?:(?!%5Cs)%5B$%5Cw%5CxA0-%5CuFFFF%5D\">_$A-Z\\xA0-\\uFFFF</a>_(?=.(?:prototype|constructor))/, lookbehind: !0 }</p>\n<p>],</p>\n<p>keyword: [</p>\n<p>{ pattern: /((?:^|})\\s_)catch\\b/, lookbehind: !0 },</p>\n<p>{</p>\n<p>pattern:</p>\n<p>/(^|<sup id=\"fnref-.\"><a href=\"#fn-.\" class=\"footnote-ref\">.</a></sup>|...\\s<em>)\\b(?:as|assert(?=\\s</em>{)|async(?=\\s<em>(?:function\\b|(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\\s</em>(?:{|$))|for|from(?=\\s<em>(?:['\"]|$))|function|(?:get|set)(?=\\s</em>(?:[#[$\\w\\xA0-\\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,</p>\n<pre><code>        lookbehind: !0\n\n    }\n\n],\n\nfunction: /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,\n</code></pre>\n<p>number: /\\b(?:(?:0<a href=\"?:%5B%5CdA-Fa-f%5D(?:_%5B%5CdA-Fa-f%5D)?\">xX</a>+|0<a href=\"?:%5B01%5D(?:_%5B01%5D)?\">bB</a>+|0<a href=\"?:%5B0-7%5D(?:_%5B0-7%5D)?\">oO</a>+)n?|(?:\\d(?:*\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:<em>\\d)?)+.?(?:\\d(?:\\</em>\\d)?)<em>|\\B.(?:\\d(?:</em>\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,</p>\n<p>operator: /--|++|**=?|=>|&#x26;&#x26;=?|||=?|[!=]==|&#x3C;&#x3C;=?|>>>?=?|[-+*/%&#x26;|^!=&#x3C;>]=?|.{3}|??=?|?.?|[~:]/</p>\n<p>})),</p>\n<p>(Prism.languages.javascript['class-name'][0].pattern = /(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\]+/),</p>\n<p>Prism.languages.insertBefore('javascript', 'keyword', {</p>\n<p>regex: {</p>\n<p>pattern:</p>\n<p>/((?:^|<sup id=\"fnref-$\\w\\xa0-\\uffff.&#x22;&#x27;\\])\\s\"><a href=\"#fn-$\\w\\xa0-\\uffff.&#x22;&#x27;\\])\\s\" class=\"footnote-ref\">$\\w\\xa0-\\uffff.\"'\\])\\s</a></sup>|\\b(?:return|yield))\\s<em>)/(?:[(?:<sup id=\"fnref-\\]\\\\\\r\\n\"><a href=\"#fn-\\]\\\\\\r\\n\" class=\"footnote-ref\">\\]\\\\\\r\\n</a></sup>|\\.)</em>]|\\.|<sup id=\"fnref-/\\\\\\[\\r\\n\"><a href=\"#fn-/\\\\\\[\\r\\n\" class=\"footnote-ref\">/\\\\\\[\\r\\n</a></sup>)+/[dgimyus]{0,7}(?=(?:\\s|/*(?:<sup id=\"fnref-*\"><a href=\"#fn-*\" class=\"footnote-ref\">*</a></sup>|*(?!/))<em>*/)</em>(?:$|[\\r\\n,.;:})]]|//))/,</p>\n<pre><code>        lookbehind: !0,\n\n        greedy: !0,\n\n        inside: {\n\n            'regex-source': { pattern: /^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/, lookbehind: !0, alias: 'language-regex', inside: Prism.languages.regex },\n</code></pre>\n<p>'regex-delimiter': /^/|/$/,</p>\n<pre><code>            'regex-flags': /^[a-z]+$/\n</code></pre>\n<p>}</p>\n<p>},</p>\n<p>'function-variable': {</p>\n<p>pattern:</p>\n<p>/#?(?!\\s)<a href=\"?:(?!%5Cs)%5B$%5Cw%5CxA0-%5CuFFFF%5D\">_$a-zA-Z\\xA0-\\uFFFF</a><em>(?=\\s</em>[=:]\\s<em>(?:async\\s</em>)?(?:\\bfunction\\b|(?:((?:<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup>|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup><em>))</em>)|(?!\\s)<a href=\"?:(?!%5Cs)%5B$%5Cw%5CxA0-%5CuFFFF%5D\">_$a-zA-Z\\xA0-\\uFFFF</a><em>)\\s</em>=>))/,</p>\n<p>alias: 'function'</p>\n<p>},</p>\n<p>parameter: [</p>\n<p>{</p>\n<p>pattern: /(function(?:\\s+(?!\\s)<a href=\"?:(?!%5Cs)%5B$%5Cw%5CxA0-%5CuFFFF%5D\">_$a-zA-Z\\xA0-\\uFFFF</a><em>)?\\s</em>(\\s<em>)(?!\\s)(?:<sup id=\"fnref-()\\s\"><a href=\"#fn-()\\s\" class=\"footnote-ref\">()\\s</a></sup>|\\s+(?![\\s)])|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup></em>))+(?=\\s*))/,</p>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>},</p>\n<p>{</p>\n<p>pattern: /(^|<sup id=\"fnref-$\\w\\xa0-\\uffff\"><a href=\"#fn-$\\w\\xa0-\\uffff\" class=\"footnote-ref\">$\\w\\xa0-\\uffff</a></sup>)(?!\\s)<a href=\"?:(?!%5Cs)%5B$%5Cw%5CxA0-%5CuFFFF%5D\">_$a-z\\xA0-\\uFFFF</a><em>(?=\\s</em>=>)/i,</p>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>},</p>\n<p>{ pattern: /((\\s<em>)(?!\\s)(?:<sup id=\"fnref-()\\s\"><a href=\"#fn-()\\s\" class=\"footnote-ref\">()\\s</a></sup>|\\s+(?![\\s)])|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup><em>))+(?=\\s</em>)\\s</em>=>)/, lookbehind: !0, inside: Prism.languages.javascript },</p>\n<p>{</p>\n<p>pattern:</p>\n<p>/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:(?!\\s)<a href=\"?:(?!%5Cs)%5B$%5Cw%5CxA0-%5CuFFFF%5D\">_$a-zA-Z\\xA0-\\uFFFF</a><em>\\s</em>)(\\s<em>|]\\s</em>(\\s<em>)(?!\\s)(?:<sup id=\"fnref-()\\s\"><a href=\"#fn-()\\s\" class=\"footnote-ref\">()\\s</a></sup>|\\s+(?![\\s)])|(<sup id=\"fnref-()\"><a href=\"#fn-()\" class=\"footnote-ref\">()</a></sup><em>))+(?=\\s</em>)\\s</em>{)/,</p>\n<p>lookbehind: !0,</p>\n<p>inside: Prism.languages.javascript</p>\n<p>}</p>\n<p>],</p>\n<p>constant: /\\b<a href=\"?:%5BA-Z_%5D%7C%5Cdx?\">A-Z</a>*\\b/</p>\n<p>}),</p>\n<p>Prism.languages.insertBefore('javascript', 'string', {</p>\n<p>hashbang: { pattern: /^#!._/, greedy: !0, alias: 'comment' },</p>\n<p>'template-string': {</p>\n<p>pattern: /<code>(?:\\\\[\\s\\S]|\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]_\\})_\\})+\\}|(?!\\$\\{)[^\\\\</code>])_<code>/, greedy: !0, inside: { 'template-punctuation': { pattern: /^</code>|`$/, alias: 'string' },</p>\n<pre><code>            interpolation: {\n\n                pattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}/,\n\n                lookbehind: !0,\n\n                inside: { 'interpolation-punctuation': { pattern: /^\\$\\{|\\}$/, alias: 'punctuation' }, rest: Prism.languages.javascript }\n</code></pre>\n<p>},</p>\n<p>string: /[\\s\\S]+/</p>\n<p>}</p>\n<p>}</p>\n<p>}),</p>\n<p>Prism.languages.markup &#x26;&#x26;</p>\n<p>(Prism.languages.markup.tag.addInlined('script', 'javascript'),</p>\n<p>Prism.languages.markup.tag.addAttribute(</p>\n<p>'on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)',</p>\n<p>'javascript'</p>\n<p>)),</p>\n<p>(Prism.languages.js = Prism.languages.javascript);</p>\n<pre><code># main.js\n\n\n\n```js\n\nwindow.onGatsbyInitialClientRender = function () {\n\n    /**\n\n     * Main JS file for theme behaviours\n\n     */\n\n    // Responsive video embeds\n\n    let videoEmbeds = ['iframe[src*=\"youtube.com\"]', 'iframe[src*=\"vimeo.com\"]'];\n\n    reframe(videoEmbeds.join(','));\n\n\n\n    // Handle main navigation menu toggling on small screens\n\n    function menuToggleHandler(e) {\n\n        e.preventDefault();\n\n        document.body.classList.toggle('menu--opened');\n\n    }\n\n\n\n    // Handle docs navigation menu toggling on small screens\n\n    function docsNavToggleHandler(e) {\n\n        e.preventDefault();\n\n        document.body.classList.toggle('docs-menu--opened');\n\n    }\n\n\n\n    // Handle submenu toggling\n\n    function submenuToggleHandler(e) {\n\n        e.preventDefault();\n\n        this.parentNode.classList.toggle('active');\n\n    }\n\n\n\n    window.addMainNavigationHandlers = function () {\n\n        const menuToggle = document.querySelectorAll('.menu-toggle');\n\n        if (menuToggle) {\n\n            for (let i = 0; i &#x3C; menuToggle.length; i++) {\n\n                menuToggle[i].addEventListener('click', menuToggleHandler, false);\n\n            }\n\n        }\n\n\n\n        const submenuToggle = document.querySelectorAll('.submenu-toggle');\n\n        if (submenuToggle) {\n\n            for (let i = 0; i &#x3C; submenuToggle.length; i++) {\n\n                submenuToggle[i].addEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.removeMainNavigationHandlers = function () {\n\n        // Remove nav related classes on page load\n\n        document.body.classList.remove('menu--opened');\n\n\n\n        const menuToggle = document.querySelectorAll('.menu-toggle');\n\n        if (menuToggle) {\n\n            for (let i = 0; i &#x3C; menuToggle.length; i++) {\n\n                menuToggle[i].removeEventListener('click', menuToggleHandler, false);\n\n            }\n\n        }\n\n\n\n        const submenuToggle = document.querySelectorAll('.submenu-toggle');\n\n        if (submenuToggle) {\n\n            for (let i = 0; i &#x3C; submenuToggle.length; i++) {\n\n                submenuToggle[i].removeEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.addDocsNavigationHandlers = function () {\n\n        const docsNavToggle = document.getElementById('docs-nav-toggle');\n\n        if (docsNavToggle) {\n\n            docsNavToggle.addEventListener('click', docsNavToggleHandler, false);\n\n        }\n\n\n\n        const docsSubmenuToggle = document.querySelectorAll('.docs-submenu-toggle');\n\n        if (docsSubmenuToggle) {\n\n            for (let i = 0; i &#x3C; docsSubmenuToggle.length; i++) {\n\n                docsSubmenuToggle[i].addEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.removeDocsNavigationHandlers = function () {\n\n        // Remove docs nav related classes on page load\n\n        document.body.classList.remove('docs-menu--opened');\n\n\n\n        const docsNavToggle = document.getElementById('docs-nav-toggle');\n\n        if (docsNavToggle) {\n\n            docsNavToggle.removeEventListener('click', docsNavToggleHandler, false);\n\n        }\n\n\n\n        const docsSubmenuToggle = document.querySelectorAll('.docs-submenu-toggle');\n\n        if (docsSubmenuToggle) {\n\n            for (let i = 0; i &#x3C; docsSubmenuToggle.length; i++) {\n\n                docsSubmenuToggle[i].removeEventListener('click', submenuToggleHandler, false);\n\n            }\n\n        }\n\n    };\n\n\n\n    window.addPageNavLinks = function () {\n\n        const pageToc = document.getElementById('page-nav-inside');\n\n        const pageTocContainer = document.getElementById('page-nav-link-container');\n\n\n\n        if (pageToc &#x26;&#x26; pageTocContainer) {\n\n            const pageContent = document.querySelector('.type-docs .post-content');\n\n\n\n            // Create in-page navigation\n\n            const headerLinks = getHeaderLinks({\n\n                root: pageContent\n\n            });\n\n            if (headerLinks.length > 0) {\n\n                pageToc.classList.add('has-links');\n\n                renderHeaderLinks(pageTocContainer, headerLinks);\n\n            }\n\n\n\n            // Scroll to anchors\n\n            let scroll = new SmoothScroll('[data-scroll]');\n\n            let hash = window.decodeURI(location.hash.replace('#', ''));\n\n            if (hash !== '') {\n\n                window.setTimeout(function () {\n\n                    let anchor = document.getElementById(hash);\n\n                    if (anchor) {\n\n                        scroll.animateScroll(anchor);\n\n                    }\n\n                }, 0);\n\n            }\n\n\n\n            // Highlight current anchor\n\n            let pageTocLinks = pageTocContainer.getElementsByTagName('a');\n\n            if (pageTocLinks.length > 0) {\n\n                let spy = new Gumshoe('#page-nav-inside a', {\n\n                    nested: true,\n\n                    nestedClass: 'active-parent'\n\n                });\n\n            }\n\n\n\n            // Add link to page content headings\n\n            let pageHeadings = getElementsByTagNames(pageContent, ['h2', 'h3']);\n\n            for (let i = 0; i &#x3C; pageHeadings.length; i++) {\n\n                let heading = pageHeadings[i];\n\n                if (typeof heading.id !== 'undefined' &#x26;&#x26; heading.id !== '') {\n\n                    heading.insertBefore(anchorForId(heading.id), heading.firstChild);\n\n                }\n\n            }\n\n\n\n            // Copy link url\n\n            let clipboard = new ClipboardJS('.hash-link', {\n\n                text: function (trigger) {\n\n                    return window.location.href.replace(window.location.hash, '') + trigger.getAttribute('href');\n\n                }\n\n            });\n\n        }\n\n    };\n\n\n\n    window.removePageNavLinks = function () {\n\n        const pageToc = document.getElementById('page-nav-inside');\n\n        const pageTocContainer = document.getElementById('page-nav-link-container');\n\n\n\n        if (pageToc &#x26;&#x26; pageTocContainer) {\n\n            pageToc.classList.remove('has-links');\n\n            while (pageTocContainer.firstChild) {\n\n                pageTocContainer.removeChild(pageTocContainer.firstChild);\n\n            }\n\n        }\n\n    };\n\n\n\n    function getElementsByTagNames(root, tagNames) {\n\n        let elements = [];\n\n        for (let i = 0; i &#x3C; root.children.length; i++) {\n\n            let element = root.children[i];\n\n            let tagName = element.nodeName.toLowerCase();\n\n            if (tagNames.includes(tagName)) {\n\n                elements.push(element);\n\n            }\n\n            elements = elements.concat(getElementsByTagNames(element, tagNames));\n\n        }\n\n        return elements;\n\n    }\n\n\n\n    function createLinksForHeaderElements(elements) {\n\n        let result = [];\n\n        let stack = [\n\n            {\n\n                level: 0,\n\n                children: result\n\n            }\n\n        ];\n\n        let re = /^h(\\d)$/;\n\n        for (let i = 0; i &#x3C; elements.length; i++) {\n\n            let element = elements[i];\n\n            let tagName = element.nodeName.toLowerCase();\n\n            let match = re.exec(tagName);\n\n            if (!match) {\n\n                console.warn('can not create links to non header element');\n\n                continue;\n\n            }\n\n            let headerLevel = parseInt(match[1], 10);\n\n            if (!element.id) {\n\n                if (!element.textContent) {\n\n                    console.warn('can not create link to element without id and without text content');\n\n                    continue;\n\n                }\n\n                element.id = element.textContent\n\n                    .toLowerCase()\n\n                    .replace(/[^\\w]+/g, '_')\n\n                    .replace(/^_/, '')\n\n                    .replace(/_$/, '');\n\n            }\n\n            let link = document.createElement('a');\n\n            link.href = '#' + element.id;\n\n            link.setAttribute('data-scroll', '');\n\n            link.appendChild(document.createTextNode(element.textContent));\n\n            let obj = {\n\n                id: element.id,\n\n                level: headerLevel,\n\n                textContent: element.textContent,\n\n                element: element,\n\n                link: link,\n\n                children: []\n\n            };\n\n            if (headerLevel > stack[stack.length - 1].level) {\n\n                stack[stack.length - 1].children.push(obj);\n\n                stack.push(obj);\n\n            } else {\n\n                while (headerLevel &#x3C;= stack[stack.length - 1].level &#x26;&#x26; stack.length > 1) {\n\n                    stack.pop();\n\n                }\n\n                stack[stack.length - 1].children.push(obj);\n\n                stack.push(obj);\n\n            }\n\n        }\n\n        return result;\n\n    }\n\n\n\n    function getHeaderLinks(options = {}) {\n\n        let tagNames = options.tagNames || ['h2', 'h3'];\n\n        let root = options.root || document.body;\n\n        let headerElements = getElementsByTagNames(root, tagNames);\n\n        return createLinksForHeaderElements(headerElements);\n\n    }\n\n\n\n    function renderHeaderLinks(element, links) {\n\n        if (links.length === 0) {\n\n            return;\n\n        }\n\n        let ulElm = document.createElement('ul');\n\n        for (let i = 0; i &#x3C; links.length; i++) {\n\n            let liElm = document.createElement('li');\n\n            liElm.append(links[i].link);\n\n            if (links[i].children.length > 0) {\n\n                renderHeaderLinks(liElm, links[i].children);\n\n            }\n\n            ulElm.appendChild(liElm);\n\n        }\n\n        element.appendChild(ulElm);\n\n    }\n\n\n\n    function anchorForId(id) {\n\n        let anchor = document.createElement('a');\n\n        anchor.setAttribute('class', 'hash-link');\n\n        anchor.setAttribute('data-scroll', '');\n\n        anchor.href = '#' + id;\n\n        anchor.innerHTML = '&#x3C;span class=\"screen-reader-text\">Copy&#x3C;/span>';\n\n        return anchor;\n\n    }\n\n\n\n    // Syntax Highlighter\n\n    // Prism.highlightAll();\n\n};\n\n\n\n//-----------------------------------------------------------------------\n\n//-----------------------------------------------------------------------\n\n//--------------------------------New----------------------------------\n\n//-----------------------------------------------------------------------\n\n//-----------------------------------------------------------------------\n</code></pre>\n<hr>\n<hr>\n<h1>Page Load JS</h1>\n<pre><code class=\"language-js\">window.onGatsbyRouteUpdate = function () {\n\n    window.addMainNavigationHandlers();\n\n    window.addDocsNavigationHandlers();\n\n    window.addPageNavLinks();\n\n};\n</code></pre>\n<hr>\n<hr>\n<h1>PageUnload.js</h1>\n<pre><code class=\"language-js\">window.onGatsbyPreRouteUpdate = function () {\n\n    window.removeMainNavigationHandlers();\n\n    window.removeDocsNavigationHandlers();\n\n    window.removePageNavLinks();\n\n};\n</code></pre>\n<hr>\n<hr>\n<h1>Plugins.js</h1>\n<pre><code class=\"language-js\">!(function (e, t) {\n\n    'object' == typeof exports &#x26;&#x26; 'undefined' != typeof module\n\n        ? (module.exports = t())\n\n        : 'function' == typeof define &#x26;&#x26; define.amd\n\n        ? define(t)\n\n        : ((e = 'undefined' != typeof globalThis ? globalThis : e || self).reframe = t());\n\n})(this, function () {\n\n    'use strict';\n\n    function t() {\n\n        for (var e = 0, t = 0, n = arguments.length; t &#x3C; n; t++) e += arguments[t].length;\n\n        for (var i = Array(e), o = 0, t = 0; t &#x3C; n; t++) for (var r = arguments[t], f = 0, d = r.length; f &#x3C; d; f++, o++) i[o] = r[f];\n\n        return i;\n\n    }\n\n    return function (e, s) {\n\n        return (\n\n            void 0 === s &#x26;&#x26; (s = 'js-reframe'),\n\n            ('string' == typeof e ? t(document.querySelectorAll(e)) : 'length' in e ? t(e) : [e]).forEach(function (e) {\n\n                var t, n, i, o, r, f, d, l;\n\n                -1 !== e.className.split(' ').indexOf(s) ||\n\n                    -1 &#x3C; e.style.width.indexOf('%') ||\n\n                    ((i = e.getAttribute('height') || e.offsetHeight),\n\n                    (o = e.getAttribute('width') || e.offsetWidth),\n\n                    (r = (('string' == typeof i ? parseInt(i) : i) / ('string' == typeof o ? parseInt(o) : o)) * 100),\n\n                    ((f = document.createElement('div')).className = s),\n\n                    ((d = f.style).position = 'relative'),\n\n                    (d.width = '100%'),\n\n                    (d.paddingTop = r + '%'),\n\n                    ((l = e.style).position = 'absolute'),\n\n                    (l.width = '100%'),\n\n                    (l.height = '100%'),\n\n                    (l.left = '0'),\n\n                    (l.top = '0'),\n\n                    null !== (t = e.parentNode) &#x26;&#x26; void 0 !== t &#x26;&#x26; t.insertBefore(f, e),\n\n                    null !== (n = e.parentNode) &#x26;&#x26; void 0 !== n &#x26;&#x26; n.removeChild(e),\n\n                    f.appendChild(e));\n\n            })\n\n        );\n\n    };\n\n});\n\n\n\n/*! smooth-scroll v16.1.0 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */\n\nwindow.Element &#x26;&#x26;\n\n    !Element.prototype.closest &#x26;&#x26;\n\n    (Element.prototype.closest = function (e) {\n\n        var t,\n\n            n = (this.document || this.ownerDocument).querySelectorAll(e),\n\n            o = this;\n\n        do {\n\n            for (t = n.length; 0 &#x3C;= --t &#x26;&#x26; n.item(t) !== o; );\n\n        } while (t &#x3C; 0 &#x26;&#x26; (o = o.parentElement));\n\n        return o;\n\n    }),\n\n    (function () {\n\n        if ('function' == typeof window.CustomEvent) return;\n\n        function e(e, t) {\n\n            t = t || { bubbles: !1, cancelable: !1, detail: void 0 };\n\n            var n = document.createEvent('CustomEvent');\n\n            return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), n;\n\n        }\n\n        (e.prototype = window.Event.prototype), (window.CustomEvent = e);\n\n    })(),\n\n    (function () {\n\n        for (var r = 0, e = ['ms', 'moz', 'webkit', 'o'], t = 0; t &#x3C; e.length &#x26;&#x26; !window.requestAnimationFrame; ++t)\n\n            (window.requestAnimationFrame = window[e[t] + 'RequestAnimationFrame']),\n\n                (window.cancelAnimationFrame = window[e[t] + 'CancelAnimationFrame'] || window[e[t] + 'CancelRequestAnimationFrame']);\n\n        window.requestAnimationFrame ||\n\n            (window.requestAnimationFrame = function (e, t) {\n\n                var n = new Date().getTime(),\n\n                    o = Math.max(0, 16 - (n - r)),\n\n                    a = window.setTimeout(function () {\n\n                        e(n + o);\n\n                    }, o);\n\n                return (r = n + o), a;\n\n            }),\n\n            window.cancelAnimationFrame ||\n\n                (window.cancelAnimationFrame = function (e) {\n\n                    clearTimeout(e);\n\n                });\n\n    })(),\n\n    (function (e, t) {\n\n        'function' == typeof define &#x26;&#x26; define.amd\n\n            ? define([], function () {\n\n                  return t(e);\n\n              })\n\n            : 'object' == typeof exports\n\n            ? (module.exports = t(e))\n\n            : (e.SmoothScroll = t(e));\n\n    })('undefined' != typeof global ? global : 'undefined' != typeof window ? window : this, function (q) {\n\n        'use strict';\n\n        var I = {\n\n                ignore: '[data-scroll-ignore]',\n\n                header: null,\n\n                topOnEmptyHash: !0,\n\n                speed: 500,\n\n                speedAsDuration: !1,\n\n                durationMax: null,\n\n                durationMin: null,\n\n                clip: !0,\n\n                offset: 0,\n\n                easing: 'easeInOutCubic',\n\n                customEasing: null,\n\n                updateURL: !0,\n\n                popstate: !0,\n\n                emitEvents: !0\n\n            },\n\n            F = function () {\n\n                var n = {};\n\n                return (\n\n                    Array.prototype.forEach.call(arguments, function (e) {\n\n                        for (var t in e) {\n\n                            if (!e.hasOwnProperty(t)) return;\n\n                            n[t] = e[t];\n\n                        }\n\n                    }),\n\n                    n\n\n                );\n\n            },\n\n            r = function (e) {\n\n                '#' === e.charAt(0) &#x26;&#x26; (e = e.substr(1));\n\n                for (var t, n = String(e), o = n.length, a = -1, r = '', i = n.charCodeAt(0); ++a &#x3C; o; ) {\n\n                    if (0 === (t = n.charCodeAt(a))) throw new InvalidCharacterError('Invalid character: the input contains U+0000.');\n\n                    (1 &#x3C;= t &#x26;&#x26; t &#x3C;= 31) || 127 == t || (0 === a &#x26;&#x26; 48 &#x3C;= t &#x26;&#x26; t &#x3C;= 57) || (1 === a &#x26;&#x26; 48 &#x3C;= t &#x26;&#x26; t &#x3C;= 57 &#x26;&#x26; 45 === i)\n\n                        ? (r += '\\\\' + t.toString(16) + ' ')\n\n                        : (r +=\n\n                              128 &#x3C;= t || 45 === t || 95 === t || (48 &#x3C;= t &#x26;&#x26; t &#x3C;= 57) || (65 &#x3C;= t &#x26;&#x26; t &#x3C;= 90) || (97 &#x3C;= t &#x26;&#x26; t &#x3C;= 122)\n\n                                  ? n.charAt(a)\n\n                                  : '\\\\' + n.charAt(a));\n\n                }\n\n                return '#' + r;\n\n            },\n\n            L = function () {\n\n                return Math.max(\n\n                    document.body.scrollHeight,\n\n                    document.documentElement.scrollHeight,\n\n                    document.body.offsetHeight,\n\n                    document.documentElement.offsetHeight,\n\n                    document.body.clientHeight,\n\n                    document.documentElement.clientHeight\n\n                );\n\n            },\n\n            x = function (e) {\n\n                return e ? ((t = e), parseInt(q.getComputedStyle(t).height, 10) + e.offsetTop) : 0;\n\n                var t;\n\n            },\n\n            H = function (e, t, n, o) {\n\n                if (t.emitEvents &#x26;&#x26; 'function' == typeof q.CustomEvent) {\n\n                    var a = new CustomEvent(e, {\n\n                        bubbles: !0,\n\n                        detail: { anchor: n, toggle: o }\n\n                    });\n\n                    document.dispatchEvent(a);\n\n                }\n\n            };\n\n        return function (o, e) {\n\n            var A,\n\n                a,\n\n                O,\n\n                C,\n\n                M = {};\n\n            (M.cancelScroll = function (e) {\n\n                cancelAnimationFrame(C), (C = null), e || H('scrollCancel', A);\n\n            }),\n\n                (M.animateScroll = function (i, c, e) {\n\n                    M.cancelScroll();\n\n                    var s = F(A || I, e || {}),\n\n                        u = '[object Number]' === Object.prototype.toString.call(i),\n\n                        t = u || !i.tagName ? null : i;\n\n                    if (u || t) {\n\n                        var l = q.pageYOffset;\n\n                        s.header &#x26;&#x26; !O &#x26;&#x26; (O = document.querySelector(s.header));\n\n                        var n,\n\n                            o,\n\n                            a,\n\n                            m,\n\n                            r,\n\n                            d,\n\n                            f,\n\n                            h,\n\n                            p = x(O),\n\n                            g = u\n\n                                ? i\n\n                                : (function (e, t, n, o) {\n\n                                      var a = 0;\n\n                                      if (e.offsetParent) for (; (a += e.offsetTop), (e = e.offsetParent); );\n\n                                      return (a = Math.max(a - t - n, 0)), o &#x26;&#x26; (a = Math.min(a, L() - q.innerHeight)), a;\n\n                                  })(t, p, parseInt('function' == typeof s.offset ? s.offset(i, c) : s.offset, 10), s.clip),\n\n                            y = g - l,\n\n                            v = L(),\n\n                            w = 0,\n\n                            S =\n\n                                ((n = y),\n\n                                (a = (o = s).speedAsDuration ? o.speed : Math.abs((n / 1e3) * o.speed)),\n\n                                o.durationMax &#x26;&#x26; a > o.durationMax ? o.durationMax : o.durationMin &#x26;&#x26; a &#x3C; o.durationMin ? o.durationMin : parseInt(a, 10)),\n\n                            E = function (e, t) {\n\n                                var n,\n\n                                    o,\n\n                                    a,\n\n                                    r = q.pageYOffset;\n\n                                if (e == t || r == t || (l &#x3C; t &#x26;&#x26; q.innerHeight + r) >= v)\n\n                                    return (\n\n                                        M.cancelScroll(!0),\n\n                                        (o = t),\n\n                                        (a = u),\n\n                                        0 === (n = i) &#x26;&#x26; document.body.focus(),\n\n                                        a ||\n\n                                            (n.focus(),\n\n                                            document.activeElement !== n &#x26;&#x26; (n.setAttribute('tabindex', '-1'), n.focus(), (n.style.outline = 'none')),\n\n                                            q.scrollTo(0, o)),\n\n                                        H('scrollStop', s, i, c),\n\n                                        !(C = m = null)\n\n                                    );\n\n                            },\n\n                            b = function (e) {\n\n                                var t, n, o;\n\n                                m || (m = e),\n\n                                    (w += e - m),\n\n                                    (d =\n\n                                        l +\n\n                                        y *\n\n                                            ((n = r = 1 &#x3C; (r = 0 === S ? 0 : w / S) ? 1 : r),\n\n                                            'easeInQuad' === (t = s).easing &#x26;&#x26; (o = n * n),\n\n                                            'easeOutQuad' === t.easing &#x26;&#x26; (o = n * (2 - n)),\n\n                                            'easeInOutQuad' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 2 * n * n : (4 - 2 * n) * n - 1),\n\n                                            'easeInCubic' === t.easing &#x26;&#x26; (o = n * n * n),\n\n                                            'easeOutCubic' === t.easing &#x26;&#x26; (o = --n * n * n + 1),\n\n                                            'easeInOutCubic' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 4 * n * n * n : (n - 1) * (2 * n - 2) * (2 * n - 2) + 1),\n\n                                            'easeInQuart' === t.easing &#x26;&#x26; (o = n * n * n * n),\n\n                                            'easeOutQuart' === t.easing &#x26;&#x26; (o = 1 - --n * n * n * n),\n\n                                            'easeInOutQuart' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 8 * n * n * n * n : 1 - 8 * --n * n * n * n),\n\n                                            'easeInQuint' === t.easing &#x26;&#x26; (o = n * n * n * n * n),\n\n                                            'easeOutQuint' === t.easing &#x26;&#x26; (o = 1 + --n * n * n * n * n),\n\n                                            'easeInOutQuint' === t.easing &#x26;&#x26; (o = n &#x3C; 0.5 ? 16 * n * n * n * n * n : 1 + 16 * --n * n * n * n * n),\n\n                                            t.customEasing &#x26;&#x26; (o = t.customEasing(n)),\n\n                                            o || n)),\n\n                                    q.scrollTo(0, Math.floor(d)),\n\n                                    E(d, g) || ((C = q.requestAnimationFrame(b)), (m = e));\n\n                            };\n\n                        0 === q.pageYOffset &#x26;&#x26; q.scrollTo(0, 0),\n\n                            (f = i),\n\n                            (h = s),\n\n                            u ||\n\n                                (history.pushState &#x26;&#x26;\n\n                                    h.updateURL &#x26;&#x26;\n\n                                    history.pushState(\n\n                                        { smoothScroll: JSON.stringify(h), anchor: f.id },\n\n                                        document.title,\n\n                                        f === document.documentElement ? '#top' : '#' + f.id\n\n                                    )),\n\n                            'matchMedia' in q &#x26;&#x26; q.matchMedia('(prefers-reduced-motion)').matches\n\n                                ? q.scrollTo(0, Math.floor(g))\n\n                                : (H('scrollStart', s, i, c), M.cancelScroll(!0), q.requestAnimationFrame(b));\n\n                    }\n\n                });\n\n            var t = function (e) {\n\n                    if (\n\n                        !e.defaultPrevented &#x26;&#x26;\n\n                        !(0 !== e.button || e.metaKey || e.ctrlKey || e.shiftKey) &#x26;&#x26;\n\n                        'closest' in e.target &#x26;&#x26;\n\n                        (a = e.target.closest(o)) &#x26;&#x26;\n\n                        'a' === a.tagName.toLowerCase() &#x26;&#x26;\n\n                        !e.target.closest(A.ignore) &#x26;&#x26;\n\n                        a.hostname === q.location.hostname &#x26;&#x26;\n\n                        a.pathname === q.location.pathname &#x26;&#x26;\n\n                        /#/.test(a.href)\n\n                    ) {\n\n                        var t,\n\n                            n = r(a.hash);\n\n                        if ('#' === n) {\n\n                            if (!A.topOnEmptyHash) return;\n\n                            t = document.documentElement;\n\n                        } else t = document.querySelector(n);\n\n                        (t = t || '#top' !== n ? t : document.documentElement) &#x26;&#x26;\n\n                            (e.preventDefault(),\n\n                            (function (e) {\n\n                                if (history.replaceState &#x26;&#x26; e.updateURL &#x26;&#x26; !history.state) {\n\n                                    var t = q.location.hash;\n\n                                    (t = t || ''),\n\n                                        history.replaceState(\n\n                                            {\n\n                                                smoothScroll: JSON.stringify(e),\n\n                                                anchor: t || q.pageYOffset\n\n                                            },\n\n                                            document.title,\n\n                                            t || q.location.href\n\n                                        );\n\n                                }\n\n                            })(A),\n\n                            M.animateScroll(t, a));\n\n                    }\n\n                },\n\n                n = function (e) {\n\n                    if (null !== history.state &#x26;&#x26; history.state.smoothScroll &#x26;&#x26; history.state.smoothScroll === JSON.stringify(A)) {\n\n                        var t = history.state.anchor;\n\n                        ('string' == typeof t &#x26;&#x26; t &#x26;&#x26; !(t = document.querySelector(r(history.state.anchor)))) || M.animateScroll(t, null, { updateURL: !1 });\n\n                    }\n\n                };\n\n            M.destroy = function () {\n\n                A &#x26;&#x26; (document.removeEventListener('click', t, !1), q.removeEventListener('popstate', n, !1), M.cancelScroll(), (C = O = a = A = null));\n\n            };\n\n            return (\n\n                (function () {\n\n                    if (!('querySelector' in document &#x26;&#x26; 'addEventListener' in q &#x26;&#x26; 'requestAnimationFrame' in q &#x26;&#x26; 'closest' in q.Element.prototype))\n\n                        throw 'Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.';\n\n                    M.destroy(),\n\n                        (A = F(I, e || {})),\n\n                        (O = A.header ? document.querySelector(A.header) : null),\n\n                        document.addEventListener('click', t, !1),\n\n                        A.updateURL &#x26;&#x26; A.popstate &#x26;&#x26; q.addEventListener('popstate', n, !1);\n\n                })(),\n\n                M\n\n            );\n\n        };\n\n    });\n\n\n\n/*! gumshoejs v5.1.1 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/gumshoe */\n\nElement.prototype.closest ||\n\n    (Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector),\n\n    (Element.prototype.closest = function (t) {\n\n        var e = this;\n\n        if (!document.documentElement.contains(this)) return null;\n\n        do {\n\n            if (e.matches(t)) return e;\n\n            e = e.parentElement;\n\n        } while (null !== e);\n\n        return null;\n\n    })),\n\n    (function () {\n\n        if ('function' == typeof window.CustomEvent) return !1;\n\n        function t(t, e) {\n\n            e = e || { bubbles: !1, cancelable: !1, detail: void 0 };\n\n            var n = document.createEvent('CustomEvent');\n\n            return n.initCustomEvent(t, e.bubbles, e.cancelable, e.detail), n;\n\n        }\n\n        (t.prototype = window.Event.prototype), (window.CustomEvent = t);\n\n    })(),\n\n    (function (t, e) {\n\n        'function' == typeof define &#x26;&#x26; define.amd\n\n            ? define([], function () {\n\n                  return e(t);\n\n              })\n\n            : 'object' == typeof exports\n\n            ? (module.exports = e(t))\n\n            : (t.Gumshoe = e(t));\n\n    })('undefined' != typeof global ? global : 'undefined' != typeof window ? window : this, function (t) {\n\n        'use strict';\n\n        var e = {\n\n                navClass: 'active',\n\n                contentClass: 'active',\n\n                nested: !1,\n\n                nestedClass: 'active',\n\n                offset: 0,\n\n                reflow: !1,\n\n                events: !0\n\n            },\n\n            n = function (t, e, n) {\n\n                if (n.settings.events) {\n\n                    var o = new CustomEvent(t, {\n\n                        bubbles: !0,\n\n                        cancelable: !0,\n\n                        detail: n\n\n                    });\n\n                    e.dispatchEvent(o);\n\n                }\n\n            },\n\n            o = function (t) {\n\n                var e = 0;\n\n                if (t.offsetParent) for (; t; ) (e += t.offsetTop), (t = t.offsetParent);\n\n                return e >= 0 ? e : 0;\n\n            },\n\n            s = function (t) {\n\n                t &#x26;&#x26;\n\n                    t.sort(function (t, e) {\n\n                        return o(t.content) &#x3C; o(e.content) ? -1 : 1;\n\n                    });\n\n            },\n\n            c = function (e, n, o) {\n\n                var s = e.getBoundingClientRect(),\n\n                    c = (function (t) {\n\n                        return 'function' == typeof t.offset ? parseFloat(t.offset()) : parseFloat(t.offset);\n\n                    })(n);\n\n                return o ? parseInt(s.bottom, 10) &#x3C; (t.innerHeight || document.documentElement.clientHeight) : parseInt(s.top, 10) &#x3C;= c;\n\n            },\n\n            r = function () {\n\n                return (\n\n                    t.innerHeight + t.pageYOffset >=\n\n                    Math.max(\n\n                        document.body.scrollHeight,\n\n                        document.documentElement.scrollHeight,\n\n                        document.body.offsetHeight,\n\n                        document.documentElement.offsetHeight,\n\n                        document.body.clientHeight,\n\n                        document.documentElement.clientHeight\n\n                    )\n\n                );\n\n            },\n\n            i = function (t, e) {\n\n                var n = t[t.length - 1];\n\n                if (\n\n                    (function (t, e) {\n\n                        return !(!r() || !c(t.content, e, !0));\n\n                    })(n, e)\n\n                )\n\n                    return n;\n\n                for (var o = t.length - 1; o >= 0; o--) if (c(t[o].content, e)) return t[o];\n\n            },\n\n            l = function (t, e) {\n\n                if (e.nested) {\n\n                    var n = t.parentNode.closest('li');\n\n                    n &#x26;&#x26; (n.classList.remove(e.nestedClass), l(n, e));\n\n                }\n\n            },\n\n            a = function (t, e) {\n\n                if (t) {\n\n                    var o = t.nav.closest('li');\n\n                    o &#x26;&#x26;\n\n                        (o.classList.remove(e.navClass),\n\n                        t.content.classList.remove(e.contentClass),\n\n                        l(o, e),\n\n                        n('gumshoeDeactivate', o, {\n\n                            link: t.nav,\n\n                            content: t.content,\n\n                            settings: e\n\n                        }));\n\n                }\n\n            },\n\n            u = function (t, e) {\n\n                if (e.nested) {\n\n                    var n = t.parentNode.closest('li');\n\n                    n &#x26;&#x26; (n.classList.add(e.nestedClass), u(n, e));\n\n                }\n\n            };\n\n        return function (o, c) {\n\n            var r,\n\n                l,\n\n                f,\n\n                d,\n\n                m,\n\n                v = {};\n\n            (v.setup = function () {\n\n                (r = document.querySelectorAll(o)),\n\n                    (l = []),\n\n                    Array.prototype.forEach.call(r, function (t) {\n\n                        var e = document.getElementById(decodeURIComponent(t.hash.substr(1)));\n\n                        e &#x26;&#x26; l.push({ nav: t, content: e });\n\n                    }),\n\n                    s(l);\n\n            }),\n\n                (v.detect = function () {\n\n                    var t = i(l, m);\n\n                    t\n\n                        ? (f &#x26;&#x26; t.content === f.content) ||\n\n                          (a(f, m),\n\n                          (function (t, e) {\n\n                              if (t) {\n\n                                  var o = t.nav.closest('li');\n\n                                  o &#x26;&#x26;\n\n                                      (o.classList.add(e.navClass),\n\n                                      t.content.classList.add(e.contentClass),\n\n                                      u(o, e),\n\n                                      n('gumshoeActivate', o, {\n\n                                          link: t.nav,\n\n                                          content: t.content,\n\n                                          settings: e\n\n                                      }));\n\n                              }\n\n                          })(t, m),\n\n                          (f = t))\n\n                        : f &#x26;&#x26; (a(f, m), (f = null));\n\n                });\n\n            var p = function (e) {\n\n                    d &#x26;&#x26; t.cancelAnimationFrame(d), (d = t.requestAnimationFrame(v.detect));\n\n                },\n\n                h = function (e) {\n\n                    d &#x26;&#x26; t.cancelAnimationFrame(d),\n\n                        (d = t.requestAnimationFrame(function () {\n\n                            s(l), v.detect();\n\n                        }));\n\n                };\n\n            v.destroy = function () {\n\n                f &#x26;&#x26; a(f, m),\n\n                    t.removeEventListener('scroll', p, !1),\n\n                    m.reflow &#x26;&#x26; t.removeEventListener('resize', h, !1),\n\n                    (l = null),\n\n                    (r = null),\n\n                    (f = null),\n\n                    (d = null),\n\n                    (m = null);\n\n            };\n\n            return (\n\n                (m = (function () {\n\n                    var t = {};\n\n                    return (\n\n                        Array.prototype.forEach.call(arguments, function (e) {\n\n                            for (var n in e) {\n\n                                if (!e.hasOwnProperty(n)) return;\n\n                                t[n] = e[n];\n\n                            }\n\n                        }),\n\n                        t\n\n                    );\n\n                })(e, c || {})),\n\n                v.setup(),\n\n                v.detect(),\n\n                t.addEventListener('scroll', p, !1),\n\n                m.reflow &#x26;&#x26; t.addEventListener('resize', h, !1),\n\n                v\n\n            );\n\n        };\n\n    });\n\n\n\n/*!\n\n * clipboard.js v2.0.4\n\n * https://zenorocha.github.io/clipboard.js\n\n *\n\n * Licensed MIT © Zeno Rocha\n\n */\n\n!(function (t, e) {\n\n    'object' == typeof exports &#x26;&#x26; 'object' == typeof module\n\n        ? (module.exports = e())\n\n        : 'function' == typeof define &#x26;&#x26; define.amd\n\n        ? define([], e)\n\n        : 'object' == typeof exports\n\n        ? (exports.ClipboardJS = e())\n\n        : (t.ClipboardJS = e());\n\n})(this, function () {\n\n    return (function (n) {\n\n        var o = {};\n\n        function r(t) {\n\n            if (o[t]) return o[t].exports;\n\n            var e = (o[t] = { i: t, l: !1, exports: {} });\n\n            return n[t].call(e.exports, e, e.exports, r), (e.l = !0), e.exports;\n\n        }\n\n        return (\n\n            (r.m = n),\n\n            (r.c = o),\n\n            (r.d = function (t, e, n) {\n\n                r.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: n });\n\n            }),\n\n            (r.r = function (t) {\n\n                'undefined' != typeof Symbol &#x26;&#x26;\n\n                    Symbol.toStringTag &#x26;&#x26;\n\n                    Object.defineProperty(t, Symbol.toStringTag, {\n\n                        value: 'Module'\n\n                    }),\n\n                    Object.defineProperty(t, '__esModule', { value: !0 });\n\n            }),\n\n            (r.t = function (e, t) {\n\n                if ((1 &#x26; t &#x26;&#x26; (e = r(e)), 8 &#x26; t)) return e;\n\n                if (4 &#x26; t &#x26;&#x26; 'object' == typeof e &#x26;&#x26; e &#x26;&#x26; e.__esModule) return e;\n\n                var n = Object.create(null);\n\n                if (\n\n                    (r.r(n),\n\n                    Object.defineProperty(n, 'default', {\n\n                        enumerable: !0,\n\n                        value: e\n\n                    }),\n\n                    2 &#x26; t &#x26;&#x26; 'string' != typeof e)\n\n                )\n\n                    for (var o in e)\n\n                        r.d(\n\n                            n,\n\n                            o,\n\n                            function (t) {\n\n                                return e[t];\n\n                            }.bind(null, o)\n\n                        );\n\n                return n;\n\n            }),\n\n            (r.n = function (t) {\n\n                var e =\n\n                    t &#x26;&#x26; t.__esModule\n\n                        ? function () {\n\n                              return t.default;\n\n                          }\n\n                        : function () {\n\n                              return t;\n\n                          };\n\n                return r.d(e, 'a', e), e;\n\n            }),\n\n            (r.o = function (t, e) {\n\n                return Object.prototype.hasOwnProperty.call(t, e);\n\n            }),\n\n            (r.p = ''),\n\n            r((r.s = 0))\n\n        );\n\n    })([\n\n        function (t, e, n) {\n\n            'use strict';\n\n            var r =\n\n                    'function' == typeof Symbol &#x26;&#x26; 'symbol' == typeof Symbol.iterator\n\n                        ? function (t) {\n\n                              return typeof t;\n\n                          }\n\n                        : function (t) {\n\n                              return t &#x26;&#x26; 'function' == typeof Symbol &#x26;&#x26; t.constructor === Symbol &#x26;&#x26; t !== Symbol.prototype ? 'symbol' : typeof t;\n\n                          },\n\n                i = (function () {\n\n                    function o(t, e) {\n\n                        for (var n = 0; n &#x3C; e.length; n++) {\n\n                            var o = e[n];\n\n                            (o.enumerable = o.enumerable || !1), (o.configurable = !0), 'value' in o &#x26;&#x26; (o.writable = !0), Object.defineProperty(t, o.key, o);\n\n                        }\n\n                    }\n\n                    return function (t, e, n) {\n\n                        return e &#x26;&#x26; o(t.prototype, e), n &#x26;&#x26; o(t, n), t;\n\n                    };\n\n                })(),\n\n                a = o(n(1)),\n\n                c = o(n(3)),\n\n                u = o(n(4));\n\n            function o(t) {\n\n                return t &#x26;&#x26; t.__esModule ? t : { default: t };\n\n            }\n\n            var l = (function (t) {\n\n                function o(t, e) {\n\n                    !(function (t, e) {\n\n                        if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');\n\n                    })(this, o);\n\n                    var n = (function (t, e) {\n\n                        if (!t) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\n                        return !e || ('object' != typeof e &#x26;&#x26; 'function' != typeof e) ? t : e;\n\n                    })(this, (o.__proto__ || Object.getPrototypeOf(o)).call(this));\n\n                    return n.resolveOptions(e), n.listenClick(t), n;\n\n                }\n\n                return (\n\n                    (function (t, e) {\n\n                        if ('function' != typeof e &#x26;&#x26; null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e);\n\n                        (t.prototype = Object.create(e &#x26;&#x26; e.prototype, {\n\n                            constructor: {\n\n                                value: t,\n\n                                enumerable: !1,\n\n                                writable: !0,\n\n                                configurable: !0\n\n                            }\n\n                        })),\n\n                            e &#x26;&#x26; (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e));\n\n                    })(o, c.default),\n\n                    i(\n\n                        o,\n\n                        [\n\n                            {\n\n                                key: 'resolveOptions',\n\n                                value: function () {\n\n                                    var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : {};\n\n                                    (this.action = 'function' == typeof t.action ? t.action : this.defaultAction),\n\n                                        (this.target = 'function' == typeof t.target ? t.target : this.defaultTarget),\n\n                                        (this.text = 'function' == typeof t.text ? t.text : this.defaultText),\n\n                                        (this.container = 'object' === r(t.container) ? t.container : document.body);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'listenClick',\n\n                                value: function (t) {\n\n                                    var e = this;\n\n                                    this.listener = (0, u.default)(t, 'click', function (t) {\n\n                                        return e.onClick(t);\n\n                                    });\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'onClick',\n\n                                value: function (t) {\n\n                                    var e = t.delegateTarget || t.currentTarget;\n\n                                    this.clipboardAction &#x26;&#x26; (this.clipboardAction = null),\n\n                                        (this.clipboardAction = new a.default({\n\n                                            action: this.action(e),\n\n                                            target: this.target(e),\n\n                                            text: this.text(e),\n\n                                            container: this.container,\n\n                                            trigger: e,\n\n                                            emitter: this\n\n                                        }));\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'defaultAction',\n\n                                value: function (t) {\n\n                                    return s('action', t);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'defaultTarget',\n\n                                value: function (t) {\n\n                                    var e = s('target', t);\n\n                                    if (e) return document.querySelector(e);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'defaultText',\n\n                                value: function (t) {\n\n                                    return s('text', t);\n\n                                }\n\n                            },\n\n                            {\n\n                                key: 'destroy',\n\n                                value: function () {\n\n                                    this.listener.destroy(), this.clipboardAction &#x26;&#x26; (this.clipboardAction.destroy(), (this.clipboardAction = null));\n\n                                }\n\n                            }\n\n                        ],\n\n                        [\n\n                            {\n\n                                key: 'isSupported',\n\n                                value: function () {\n\n                                    var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : ['copy', 'cut'],\n\n                                        e = 'string' == typeof t ? [t] : t,\n\n                                        n = !!document.queryCommandSupported;\n\n                                    return (\n\n                                        e.forEach(function (t) {\n\n                                            n = n &#x26;&#x26; !!document.queryCommandSupported(t);\n\n                                        }),\n\n                                        n\n\n                                    );\n\n                                }\n\n                            }\n\n                        ]\n\n                    ),\n\n                    o\n\n                );\n\n            })();\n\n            function s(t, e) {\n\n                var n = 'data-clipboard-' + t;\n\n                if (e.hasAttribute(n)) return e.getAttribute(n);\n\n            }\n\n            t.exports = l;\n\n        },\n\n        function (t, e, n) {\n\n            'use strict';\n\n            var o,\n\n                r =\n\n                    'function' == typeof Symbol &#x26;&#x26; 'symbol' == typeof Symbol.iterator\n\n                        ? function (t) {\n\n                              return typeof t;\n\n                          }\n\n                        : function (t) {\n\n                              return t &#x26;&#x26; 'function' == typeof Symbol &#x26;&#x26; t.constructor === Symbol &#x26;&#x26; t !== Symbol.prototype ? 'symbol' : typeof t;\n\n                          },\n\n                i = (function () {\n\n                    function o(t, e) {\n\n                        for (var n = 0; n &#x3C; e.length; n++) {\n\n                            var o = e[n];\n\n                            (o.enumerable = o.enumerable || !1), (o.configurable = !0), 'value' in o &#x26;&#x26; (o.writable = !0), Object.defineProperty(t, o.key, o);\n\n                        }\n\n                    }\n\n                    return function (t, e, n) {\n\n                        return e &#x26;&#x26; o(t.prototype, e), n &#x26;&#x26; o(t, n), t;\n\n                    };\n\n                })(),\n\n                a = n(2),\n\n                c = (o = a) &#x26;&#x26; o.__esModule ? o : { default: o };\n\n            var u = (function () {\n\n                function e(t) {\n\n                    !(function (t, e) {\n\n                        if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');\n\n                    })(this, e),\n\n                        this.resolveOptions(t),\n\n                        this.initSelection();\n\n                }\n\n                return (\n\n                    i(e, [\n\n                        {\n\n                            key: 'resolveOptions',\n\n                            value: function () {\n\n                                var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : {};\n\n                                (this.action = t.action),\n\n                                    (this.container = t.container),\n\n                                    (this.emitter = t.emitter),\n\n                                    (this.target = t.target),\n\n                                    (this.text = t.text),\n\n                                    (this.trigger = t.trigger),\n\n                                    (this.selectedText = '');\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'initSelection',\n\n                            value: function () {\n\n                                this.text ? this.selectFake() : this.target &#x26;&#x26; this.selectTarget();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'selectFake',\n\n                            value: function () {\n\n                                var t = this,\n\n                                    e = 'rtl' == document.documentElement.getAttribute('dir');\n\n                                this.removeFake(),\n\n                                    (this.fakeHandlerCallback = function () {\n\n                                        return t.removeFake();\n\n                                    }),\n\n                                    (this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || !0),\n\n                                    (this.fakeElem = document.createElement('textarea')),\n\n                                    (this.fakeElem.style.fontSize = '12pt'),\n\n                                    (this.fakeElem.style.border = '0'),\n\n                                    (this.fakeElem.style.padding = '0'),\n\n                                    (this.fakeElem.style.margin = '0'),\n\n                                    (this.fakeElem.style.position = 'absolute'),\n\n                                    (this.fakeElem.style[e ? 'right' : 'left'] = '-9999px');\n\n                                var n = window.pageYOffset || document.documentElement.scrollTop;\n\n                                (this.fakeElem.style.top = n + 'px'),\n\n                                    this.fakeElem.setAttribute('readonly', ''),\n\n                                    (this.fakeElem.value = this.text),\n\n                                    this.container.appendChild(this.fakeElem),\n\n                                    (this.selectedText = (0, c.default)(this.fakeElem)),\n\n                                    this.copyText();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'removeFake',\n\n                            value: function () {\n\n                                this.fakeHandler &#x26;&#x26;\n\n                                    (this.container.removeEventListener('click', this.fakeHandlerCallback),\n\n                                    (this.fakeHandler = null),\n\n                                    (this.fakeHandlerCallback = null)),\n\n                                    this.fakeElem &#x26;&#x26; (this.container.removeChild(this.fakeElem), (this.fakeElem = null));\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'selectTarget',\n\n                            value: function () {\n\n                                (this.selectedText = (0, c.default)(this.target)), this.copyText();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'copyText',\n\n                            value: function () {\n\n                                var e = void 0;\n\n                                try {\n\n                                    e = document.execCommand(this.action);\n\n                                } catch (t) {\n\n                                    e = !1;\n\n                                }\n\n                                this.handleResult(e);\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'handleResult',\n\n                            value: function (t) {\n\n                                this.emitter.emit(t ? 'success' : 'error', {\n\n                                    action: this.action,\n\n                                    text: this.selectedText,\n\n                                    trigger: this.trigger,\n\n                                    clearSelection: this.clearSelection.bind(this)\n\n                                });\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'clearSelection',\n\n                            value: function () {\n\n                                this.trigger &#x26;&#x26; this.trigger.focus(), window.getSelection().removeAllRanges();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'destroy',\n\n                            value: function () {\n\n                                this.removeFake();\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'action',\n\n                            set: function () {\n\n                                var t = 0 &#x3C; arguments.length &#x26;&#x26; void 0 !== arguments[0] ? arguments[0] : 'copy';\n\n                                if (((this._action = t), 'copy' !== this._action &#x26;&#x26; 'cut' !== this._action))\n\n                                    throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n\n                            },\n\n                            get: function () {\n\n                                return this._action;\n\n                            }\n\n                        },\n\n                        {\n\n                            key: 'target',\n\n                            set: function (t) {\n\n                                if (void 0 !== t) {\n\n                                    if (!t || 'object' !== (void 0 === t ? 'undefined' : r(t)) || 1 !== t.nodeType)\n\n                                        throw new Error('Invalid \"target\" value, use a valid Element');\n\n                                    if ('copy' === this.action &#x26;&#x26; t.hasAttribute('disabled'))\n\n                                        throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n\n                                    if ('cut' === this.action &#x26;&#x26; (t.hasAttribute('readonly') || t.hasAttribute('disabled')))\n\n                                        throw new Error(\n\n                                            'Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes'\n\n                                        );\n\n                                    this._target = t;\n\n                                }\n\n                            },\n\n                            get: function () {\n\n                                return this._target;\n\n                            }\n\n                        }\n\n                    ]),\n\n                    e\n\n                );\n\n            })();\n\n            t.exports = u;\n\n        },\n\n        function (t, e) {\n\n            t.exports = function (t) {\n\n                var e;\n\n                if ('SELECT' === t.nodeName) t.focus(), (e = t.value);\n\n                else if ('INPUT' === t.nodeName || 'TEXTAREA' === t.nodeName) {\n\n                    var n = t.hasAttribute('readonly');\n\n                    n || t.setAttribute('readonly', ''), t.select(), t.setSelectionRange(0, t.value.length), n || t.removeAttribute('readonly'), (e = t.value);\n\n                } else {\n\n                    t.hasAttribute('contenteditable') &#x26;&#x26; t.focus();\n\n                    var o = window.getSelection(),\n\n                        r = document.createRange();\n\n                    r.selectNodeContents(t), o.removeAllRanges(), o.addRange(r), (e = o.toString());\n\n                }\n\n                return e;\n\n            };\n\n        },\n\n        function (t, e) {\n\n            function n() {}\n\n            (n.prototype = {\n\n                on: function (t, e, n) {\n\n                    var o = this.e || (this.e = {});\n\n                    return (o[t] || (o[t] = [])).push({ fn: e, ctx: n }), this;\n\n                },\n\n                once: function (t, e, n) {\n\n                    var o = this;\n\n                    function r() {\n\n                        o.off(t, r), e.apply(n, arguments);\n\n                    }\n\n                    return (r._ = e), this.on(t, r, n);\n\n                },\n\n                emit: function (t) {\n\n                    for (var e = [].slice.call(arguments, 1), n = ((this.e || (this.e = {}))[t] || []).slice(), o = 0, r = n.length; o &#x3C; r; o++)\n\n                        n[o].fn.apply(n[o].ctx, e);\n\n                    return this;\n\n                },\n\n                off: function (t, e) {\n\n                    var n = this.e || (this.e = {}),\n\n                        o = n[t],\n\n                        r = [];\n\n                    if (o &#x26;&#x26; e) for (var i = 0, a = o.length; i &#x3C; a; i++) o[i].fn !== e &#x26;&#x26; o[i].fn._ !== e &#x26;&#x26; r.push(o[i]);\n\n                    return r.length ? (n[t] = r) : delete n[t], this;\n\n                }\n\n            }),\n\n                (t.exports = n);\n\n        },\n\n        function (t, e, n) {\n\n            var d = n(5),\n\n                h = n(6);\n\n            t.exports = function (t, e, n) {\n\n                if (!t &#x26;&#x26; !e &#x26;&#x26; !n) throw new Error('Missing required arguments');\n\n                if (!d.string(e)) throw new TypeError('Second argument must be a String');\n\n                if (!d.fn(n)) throw new TypeError('Third argument must be a Function');\n\n                if (d.node(t))\n\n                    return (\n\n                        (s = e),\n\n                        (f = n),\n\n                        (l = t).addEventListener(s, f),\n\n                        {\n\n                            destroy: function () {\n\n                                l.removeEventListener(s, f);\n\n                            }\n\n                        }\n\n                    );\n\n                if (d.nodeList(t))\n\n                    return (\n\n                        (a = t),\n\n                        (c = e),\n\n                        (u = n),\n\n                        Array.prototype.forEach.call(a, function (t) {\n\n                            t.addEventListener(c, u);\n\n                        }),\n\n                        {\n\n                            destroy: function () {\n\n                                Array.prototype.forEach.call(a, function (t) {\n\n                                    t.removeEventListener(c, u);\n\n                                });\n\n                            }\n\n                        }\n\n                    );\n\n                if (d.string(t)) return (o = t), (r = e), (i = n), h(document.body, o, r, i);\n\n                throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n\n                var o, r, i, a, c, u, l, s, f;\n\n            };\n\n        },\n\n        function (t, n) {\n\n            (n.node = function (t) {\n\n                return void 0 !== t &#x26;&#x26; t instanceof HTMLElement &#x26;&#x26; 1 === t.nodeType;\n\n            }),\n\n                (n.nodeList = function (t) {\n\n                    var e = Object.prototype.toString.call(t);\n\n                    return void 0 !== t &#x26;&#x26; ('[object NodeList]' === e || '[object HTMLCollection]' === e) &#x26;&#x26; 'length' in t &#x26;&#x26; (0 === t.length || n.node(t[0]));\n\n                }),\n\n                (n.string = function (t) {\n\n                    return 'string' == typeof t || t instanceof String;\n\n                }),\n\n                (n.fn = function (t) {\n\n                    return '[object Function]' === Object.prototype.toString.call(t);\n\n                });\n\n        },\n\n        function (t, e, n) {\n\n            var a = n(7);\n\n            function i(t, e, n, o, r) {\n\n                var i = function (e, n, t, o) {\n\n                    return function (t) {\n\n                        (t.delegateTarget = a(t.target, n)), t.delegateTarget &#x26;&#x26; o.call(e, t);\n\n                    };\n\n                }.apply(this, arguments);\n\n                return (\n\n                    t.addEventListener(n, i, r),\n\n                    {\n\n                        destroy: function () {\n\n                            t.removeEventListener(n, i, r);\n\n                        }\n\n                    }\n\n                );\n\n            }\n\n            t.exports = function (t, e, n, o, r) {\n\n                return 'function' == typeof t.addEventListener\n\n                    ? i.apply(null, arguments)\n\n                    : 'function' == typeof n\n\n                    ? i.bind(null, document).apply(null, arguments)\n\n                    : ('string' == typeof t &#x26;&#x26; (t = document.querySelectorAll(t)),\n\n                      Array.prototype.map.call(t, function (t) {\n\n                          return i(t, e, n, o, r);\n\n                      }));\n\n            };\n\n        },\n\n        function (t, e) {\n\n            if ('undefined' != typeof Element &#x26;&#x26; !Element.prototype.matches) {\n\n                var n = Element.prototype;\n\n                n.matches = n.matchesSelector || n.mozMatchesSelector || n.msMatchesSelector || n.oMatchesSelector || n.webkitMatchesSelector;\n\n            }\n\n            t.exports = function (t, e) {\n\n                for (; t &#x26;&#x26; 9 !== t.nodeType; ) {\n\n                    if ('function' == typeof t.matches &#x26;&#x26; t.matches(e)) return t;\n\n                    t = t.parentNode;\n\n                }\n\n            };\n\n        }\n\n    ]);\n\n});\n</code></pre>\n<hr>\n<hr>\n<h1>Prism.js</h1>\n<pre><code class=\"language-js\">var \\_self = 'undefined' != typeof window ? window : 'undefined' != typeof WorkerGlobalScope &#x26;&#x26; self instanceof WorkerGlobalScope ? self : {},\n\nPrism = (function (g) {\n\nvar c = /\\blang(?:uage)?-([\\w-]+)\\b/i,\n\na = 0,\n\nC = {\n\nmanual: g.Prism &#x26;&#x26; g.Prism.manual,\n\ndisableWorkerMessageHandler: g.Prism &#x26;&#x26; g.Prism.disableWorkerMessageHandler,\n\nutil: {\n\nencode: function (e) {\n\nreturn e instanceof M\n\n? new M(e.type, C.util.encode(e.content), e.alias)\n\n: Array.isArray(e)\n\n? e.map(C.util.encode)\n\n: e\n\n.replace(/&#x26;/g, '&#x26;amp;')\n\n.replace(/&#x3C;/g, '&#x26;lt;')\n\n.replace(/\\u00a0/g, ' ');\n\n},\n\ntype: function (e) {\n\nreturn Object.prototype.toString.call(e).slice(8, -1);\n\n},\n\nobjId: function (e) {\n\nreturn e.**id || Object.defineProperty(e, '**id', { value: ++a }), e.\\_\\_id;\n\n},\n\nclone: function n(e, t) {\n\nvar r,\n\na,\n\ni = C.util.type(e);\n\nswitch (((t = t || {}), i)) {\n\ncase 'Object':\n\nif (((a = C.util.objId(e)), t[a])) return t[a];\n\nfor (var l in ((r = {}), (t[a] = r), e)) e.hasOwnProperty(l) &#x26;&#x26; (r[l] = n(e[l], t));\n\nreturn r;\n\ncase 'Array':\n\nreturn (\n\n(a = C.util.objId(e)),\n\nt[a]\n\n? t[a]\n\n: ((r = []),\n\n(t[a] = r),\n\ne.forEach(function (e, a) {\n\nr[a] = n(e, t);\n\n}),\n\nr)\n\n);\n\ndefault:\n\nreturn e;\n\n}\n\n}\n\n},\n\nlanguages: {\n\nextend: function (e, a) {\n\nvar n = C.util.clone(C.languages[e]);\n\nfor (var t in a) n[t] = a[t];\n\nreturn n;\n\n},\n\ninsertBefore: function (n, e, a, t) {\n\nvar r = (t = t || C.languages)[n],\n\ni = {};\n\nfor (var l in r)\n\nif (r.hasOwnProperty(l)) {\n\nif (l == e) for (var o in a) a.hasOwnProperty(o) &#x26;&#x26; (i[o] = a[o]);\n\na.hasOwnProperty(l) || (i[l] = r[l]);\n\n}\n\nvar s = t[n];\n\nreturn (\n\n(t[n] = i),\n\nC.languages.DFS(C.languages, function (e, a) {\n\na === s &#x26;&#x26; e != n &#x26;&#x26; (this[e] = i);\n\n}),\n\ni\n\n);\n\n},\n\nDFS: function e(a, n, t, r) {\n\nr = r || {};\n\nvar i = C.util.objId;\n\nfor (var l in a)\n\nif (a.hasOwnProperty(l)) {\n\nn.call(a, l, a[l], t || l);\n\nvar o = a[l],\n\ns = C.util.type(o);\n\n'Object' !== s || r[i(o)] ? 'Array' !== s || r[i(o)] || ((r[i(o)] = !0), e(o, n, l, r)) : ((r[i(o)] = !0), e(o, n, null, r));\n\n}\n\n}\n\n},\n\nplugins: {},\n\nhighlightAll: function (e, a) {\n\nC.highlightAllUnder(document, e, a);\n\n},\n\nhighlightAllUnder: function (e, a, n) {\n\nvar t = {\n\ncallback: n,\n\nselector: 'code[class_=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'\n\n};\n\nC.hooks.run('before-highlightall', t);\n\nfor (var r, i = t.elements || e.querySelectorAll(t.selector), l = 0; (r = i[l++]); ) C.highlightElement(r, !0 === a, t.callback);\n\n},\n\nhighlightElement: function (e, a, n) {\n\nfor (var t, r = 'none', i = e; i &#x26;&#x26; !c.test(i.className); ) i = i.parentNode;\n\ni &#x26;&#x26; ((r = (i.className.match(c) || [, 'none'])[1].toLowerCase()), (t = C.languages[r])),\n\n(e.className = e.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r),\n\ne.parentNode &#x26;&#x26;\n\n((i = e.parentNode), /pre/i.test(i.nodeName) &#x26;&#x26; (i.className = i.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r));\n\nvar l = { element: e, language: r, grammar: t, code: e.textContent },\n\no = function (e) {\n\n(l.highlightedCode = e),\n\nC.hooks.run('before-insert', l),\n\n(l.element.innerHTML = l.highlightedCode),\n\nC.hooks.run('after-highlight', l),\n\nC.hooks.run('complete', l),\n\nn &#x26;&#x26; n.call(l.element);\n\n};\n\nif ((C.hooks.run('before-sanity-check', l), l.code))\n\nif ((C.hooks.run('before-highlight', l), l.grammar))\n\nif (a &#x26;&#x26; g.Worker) {\n\nvar s = new Worker(C.filename);\n\n(s.onmessage = function (e) {\n\no(e.data);\n\n}),\n\ns.postMessage(\n\nJSON.stringify({\n\nlanguage: l.language,\n\ncode: l.code,\n\nimmediateClose: !0\n\n})\n\n);\n\n} else o(C.highlight(l.code, l.grammar, l.language));\n\nelse o(C.util.encode(l.code));\n\nelse C.hooks.run('complete', l);\n\n},\n\nhighlight: function (e, a, n) {\n\nvar t = { code: e, grammar: a, language: n };\n\nreturn (\n\nC.hooks.run('before-tokenize', t),\n\n(t.tokens = C.tokenize(t.code, t.grammar)),\n\nC.hooks.run('after-tokenize', t),\n\nM.stringify(C.util.encode(t.tokens), t.language)\n\n);\n\n},\n\nmatchGrammar: function (e, a, n, t, r, i, l) {\n\nfor (var o in n)\n\nif (n.hasOwnProperty(o) &#x26;&#x26; n[o]) {\n\nif (o == l) return;\n\nvar s = n[o];\n\ns = 'Array' === C.util.type(s) ? s : [s];\n\nfor (var g = 0; g &#x3C; s.length; ++g) {\n\nvar c = s[g],\n\nu = c.inside,\n\nh = !!c.lookbehind,\n\nf = !!c.greedy,\n\nd = 0,\n\nm = c.alias;\n\nif (f &#x26;&#x26; !c.pattern.global) {\n\nvar p = c.pattern.toString().match(/[imuy]_$/)[0];\n\nc.pattern = RegExp(c.pattern.source, p + 'g');\n\n}\n\nc = c.pattern || c;\n\nfor (var y = t, v = r; y &#x3C; a.length; v += a[y].length, ++y) {\n\nvar k = a[y];\n\nif (a.length > e.length) return;\n\nif (!(k instanceof M)) {\n\nif (f &#x26;&#x26; y != a.length - 1) {\n\nif (((c.lastIndex = v), !(x = c.exec(e)))) break;\n\nfor (\n\nvar b = x.index + (h ? x[1].length : 0), w = x.index + x[0].length, A = y, P = v, O = a.length;\n\nA &#x3C; O &#x26;&#x26; (P &#x3C; w || (!a[A].type &#x26;&#x26; !a[A - 1].greedy));\n\n++A\n\n)\n\n(P += a[A].length) &#x3C;= b &#x26;&#x26; (++y, (v = P));\n\nif (a[y] instanceof M) continue;\n\n(N = A - y), (k = e.slice(v, P)), (x.index -= v);\n\n} else {\n\nc.lastIndex = 0;\n\nvar x = c.exec(k),\n\nN = 1;\n\n}\n\nif (x) {\n\nh &#x26;&#x26; (d = x[1] ? x[1].length : 0);\n\nw = (b = x.index + d) + (x = x[0].slice(d)).length;\n\nvar j = k.slice(0, b),\n\nS = k.slice(w),\n\nE = [y, N];\n\nj &#x26;&#x26; (++y, (v += j.length), E.push(j));\n\nvar * = new M(o, u ? C.tokenize(x, u) : x, m, x, f);\n\nif (\n\n(E.push(*),\n\nS &#x26;&#x26; E.push(S),\n\nArray.prototype.splice.apply(a, E),\n\n1 != N &#x26;&#x26; C.matchGrammar(e, a, n, y, v, !0, o),\n\ni)\n\n)\n\nbreak;\n\n} else if (i) break;\n\n}\n\n}\n\n}\n\n}\n\n},\n\ntokenize: function (e, a) {\n\nvar n = [e],\n\nt = a.rest;\n\nif (t) {\n\nfor (var r in t) a[r] = t[r];\n\ndelete a.rest;\n\n}\n\nreturn C.matchGrammar(e, n, a, 0, 0, !1), n;\n\n},\n\nhooks: {\n\nall: {},\n\nadd: function (e, a) {\n\nvar n = C.hooks.all;\n\n(n[e] = n[e] || []), n[e].push(a);\n\n},\n\nrun: function (e, a) {\n\nvar n = C.hooks.all[e];\n\nif (n &#x26;&#x26; n.length) for (var t, r = 0; (t = n[r++]); ) t(a);\n\n}\n\n},\n\nToken: M\n\n};\n\nfunction M(e, a, n, t, r) {\n\n(this.type = e), (this.content = a), (this.alias = n), (this.length = 0 | (t || '').length), (this.greedy = !!r);\n\n}\n\nif (\n\n((g.Prism = C),\n\n(M.stringify = function (e, a) {\n\nif ('string' == typeof e) return e;\n\nif (Array.isArray(e))\n\nreturn e\n\n.map(function (e) {\n\nreturn M.stringify(e, a);\n\n})\n\n.join('');\n\nvar n = {\n\ntype: e.type,\n\ncontent: M.stringify(e.content, a),\n\ntag: 'span',\n\nclasses: ['token', e.type],\n\nattributes: {},\n\nlanguage: a\n\n};\n\nif (e.alias) {\n\nvar t = Array.isArray(e.alias) ? e.alias : [e.alias];\n\nArray.prototype.push.apply(n.classes, t);\n\n}\n\nC.hooks.run('wrap', n);\n\nvar r = Object.keys(n.attributes)\n\n.map(function (e) {\n\nreturn e + '=\"' + (n.attributes[e] || '').replace(/\"/g, '&#x26;quot;') + '\"';\n\n})\n\n.join(' ');\n\nreturn '&#x3C;' + n.tag + ' class=\"' + n.classes.join(' ') + '\"' + (r ? ' ' + r : '') + '>' + n.content + '&#x3C;/' + n.tag + '>';\n\n}),\n\n!g.document)\n\n)\n\nreturn (\n\ng.addEventListener &#x26;&#x26;\n\n(C.disableWorkerMessageHandler ||\n\ng.addEventListener(\n\n'message',\n\nfunction (e) {\n\nvar a = JSON.parse(e.data),\n\nn = a.language,\n\nt = a.code,\n\nr = a.immediateClose;\n\ng.postMessage(C.highlight(t, C.languages[n], n)), r &#x26;&#x26; g.close();\n\n},\n\n!1\n\n)),\n\nC\n\n);\n\nvar e = document.currentScript || [].slice.call(document.getElementsByTagName('script')).pop();\n\nreturn (\n\ne &#x26;&#x26;\n\n((C.filename = e.src),\n\nC.manual ||\n\ne.hasAttribute('data-manual') ||\n\n('loading' !== document.readyState\n\n? window.requestAnimationFrame\n\n? window.requestAnimationFrame(C.highlightAll)\n\n: window.setTimeout(C.highlightAll, 16)\n\n: document.addEventListener('DOMContentLoaded', C.highlightAll))),\n\nC\n\n);\n\n})(\\_self);\n\n'undefined' != typeof module &#x26;&#x26; module.exports &#x26;&#x26; (module.exports = Prism), 'undefined' != typeof global &#x26;&#x26; (global.Prism = Prism);\n\n(Prism.languages.markup = {\n\ncomment: /&#x3C;!--[\\s\\S]_?-->/,\n\nprolog: /&#x3C;\\?[\\s\\S]+?\\?>/,\n\ndoctype: /&#x3C;!DOCTYPE[\\s\\S]+?>/i,\n\ncdata: /&#x3C;!\\[CDATA\\[[\\s\\S]_?]]>/i,\n\ntag: {\n\npattern: /&#x3C;\\/?(?!\\d)[^\\s>\\/=$&#x3C;%]+(?:\\s(?:\\s_[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]_\"|'[^']_'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/i,\n\ngreedy: !0,\n\ninside: {\n\ntag: {\n\npattern: /^&#x3C;\\/?[^\\s>\\/]+/i,\n\ninside: { punctuation: /^&#x3C;\\/?/, namespace: /^[^\\s>\\/:]+:/ }\n\n},\n\n'attr-value': {\n\npattern: /=\\s*(?:\"[^\"]_\"|'[^']_'|[^\\s'\">=]+)/i,\n\ninside: {\n\npunctuation: [/^=/, { pattern: /^(\\s*)[\"']|[\"']$/, lookbehind: !0 }]\n\n                }\n\n            },\n\n            punctuation: /\\/?>/,\n\n            'attr-name': {\n\n                pattern: /[^\\s>\\/]+/,\n\n                inside: { namespace: /^[^\\s>\\/:]+:/ }\n\n            }\n\n        }\n\n    },\n\n    entity: /&#x26;#?[\\da-z]{1,8};/i\n\n}),\n\n    (Prism.languages.markup.tag.inside['attr-value'].inside.entity = Prism.languages.markup.entity),\n\n    Prism.hooks.add('wrap', function (a) {\n\n        'entity' === a.type &#x26;&#x26; (a.attributes.title = a.content.replace(/&#x26;amp;/, '&#x26;'));\n\n    }),\n\n    Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {\n\n        value: function (a, e) {\n\n            var s = {};\n\n            (s['language-' + e] = {\n\n                pattern: /(^&#x3C;!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i,\n\nlookbehind: !0,\n\ninside: Prism.languages[e]\n\n}),\n\n(s.cdata = /^&#x3C;!\\[CDATA\\[|\\]\\]>$/i);\n\nvar n = {\n\n'included-cdata': { pattern: /&#x3C;!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i, inside: s }\n\n};\n\nn['language-' + e] = { pattern: /[\\s\\S]+/, inside: Prism.languages[e] };\n\nvar i = {};\n\n(i[a] = {\n\npattern: RegExp('(&#x3C;**[\\\\s\\\\S]_?>)(?:&#x3C;!\\\\[CDATA\\\\[[\\\\s\\\\S]_?\\\\]\\\\]>\\\\s*|[\\\\s\\\\S])*?(?=&#x3C;\\\\/**>)'.replace(/**/g, a), 'i'),\n\nlookbehind: !0,\n\ngreedy: !0,\n\ninside: n\n\n}),\n\nPrism.languages.insertBefore('markup', 'cdata', i);\n\n}\n\n}),\n\n(Prism.languages.xml = Prism.languages.extend('markup', {})),\n\n(Prism.languages.html = Prism.languages.markup),\n\n(Prism.languages.mathml = Prism.languages.markup),\n\n(Prism.languages.svg = Prism.languages.markup);\n\n!(function (s) {\n\nvar t = /(\"|')(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])_\\1/;\n\n(s.languages.css = {\n\ncomment: /\\/\\*[\\s\\S]_?\\*\\//,\n\natrule: {\n\npattern: /@[\\w-]+[\\s\\S]_?(?:;|(?=\\s_\\{))/,\n\ninside: { rule: /@[\\w-]+/ }\n\n},\n\nurl: {\n\npattern: RegExp('url\\\\((?:' + t.source + '|[^\\n\\r()]_)\\\\)', 'i'),\n\ninside: { function: /^url/i, punctuation: /^\\(|\\)$/ }\n\n},\n\nselector: RegExp('[^{}\\\\s](?:[^{};\"\\']|' + t.source + ')_?(?=\\\\s*\\\\{)'),\n\nstring: { pattern: t, greedy: !0 },\n\nproperty: /[-\\_a-z\\xA0-\\uFFFF][-\\w\\xa0-\\uffff]*(?=\\s*:)/i,\n\nimportant: /!important\\b/i,\n\nfunction: /[-a-z0-9]+(?=\\()/i,\n\npunctuation: /[(){};:,]/\n\n}),\n\n(s.languages.css.atrule.inside.rest = s.languages.css);\n\nvar e = s.languages.markup;\n\ne &#x26;&#x26;\n\n(e.tag.addInlined('style', 'css'),\n\ns.languages.insertBefore(\n\n'inside',\n\n'attr-value',\n\n{\n\n'style-attr': {\n\npattern: /\\s*style=(\"|')(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1/i,\n\ninside: {\n\n'attr-name': { pattern: /^\\s*style/i, inside: e.tag.inside },\n\npunctuation: /^\\s*=\\s*['\"]|['\"]\\s*$/,\n\n'attr-value': { pattern: /.+/i, inside: s.languages.css }\n\n},\n\nalias: 'language-css'\n\n}\n\n},\n\ne.tag\n\n));\n\n})(Prism);\n\nPrism.languages.clike = {\n\ncomment: [\n\n{ pattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/, lookbehind: !0 },\n\n        { pattern: /(^|[^\\\\:])\\/\\/.*/, lookbehind: !0, greedy: !0 }\n\n    ],\n\n    string: {\n\n        pattern: /([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,\n\n        greedy: !0\n\n    },\n\n    'class-name': {\n\n        pattern: /((?:\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+)|(?:catch\\s+\\())[\\w.\\\\]+/i,\n\n        lookbehind: !0,\n\n        inside: { punctuation: /[.\\\\]/ }\n\n    },\n\n    keyword: /\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,\n\n    boolean: /\\b(?:true|false)\\b/,\n\n    function: /\\w+(?=\\()/,\n\n    number: /\\b0x[\\da-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n\n    operator: /--?|\\+\\+?|!=?=?|&#x3C;=?|>=?|==?=?|&#x26;&#x26;?|\\|\\|?|\\?|\\*|\\/|~|\\^|%/,\n\n    punctuation: /[{}[\\];(),.:]/\n\n};\n\n(Prism.languages.javascript = Prism.languages.extend('clike', {\n\n    'class-name': [\n\n        Prism.languages.clike['class-name'],\n\n        {\n\n            pattern: /(^|[^$\\w\\xA0-\\uFFFF])[\\_$A-Z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_(?=\\.(?:prototype|constructor))/,\n\nlookbehind: !0\n\n}\n\n],\n\nkeyword: [\n\n{ pattern: /((?:^|})\\s_)(?:catch|finally)\\b/, lookbehind: !0 },\n\n{\n\npattern:\n\n/(^|[^.])\\b(?:as|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,\n\nlookbehind: !0\n\n}\n\n],\n\nnumber: /\\b(?:(?:0[xX](&#x3C;?:[\\dA-Fa-f](?:_[\\dA-Fa-f])?>)+|0[bB](&#x3C;?:[01](?:_[01])?>)+|0[oO](&#x3C;?:[0-7](?:_[0-7])?>)+)n?|(?:\\d(?:*\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:*\\d)?)+\\.?(?:\\d(?:\\_\\d)?)*|\\B\\.(?:\\d(?:_\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,\n\nfunction: /[\\_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_(?=\\s_(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,\n\noperator: /-[-=]?|\\+[+=]?|!=?=?|&#x3C;&#x3C;?=?|>>?>?=?|=(?:==?|>)?|&#x26;[&#x26;=]?|\\|[|=]?|\\*\\*?=?|\\/=?|~|\\^=?|%=?|\\?|\\.{3}/\n\n})),\n\n(Prism.languages.javascript['class-name'][0].pattern = /(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\\\]+/),\n\nPrism.languages.insertBefore('javascript', 'keyword', {\n\nregex: {\n\npattern: /((?:^|[^$\\w\\xa0-\\uffff.\"'\\])\\s])\\s*)\\/(\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[gimyus]{0,6}(?=\\s*($|[\\r\\n,.;})\\]]))/,\n\n            lookbehind: !0,\n\n            greedy: !0\n\n        },\n\n        'function-variable': {\n\n            pattern:\n\n                /[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))_\\)|[\\_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_)\\s*=>))/,\n\nalias: 'function'\n\n},\n\nparameter: [\n\n{\n\npattern: /(function(?:\\s+[\\_$A-Za-z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]*)?\\s*\\(\\s*)(?!\\s)(?:[^()]|\\([^()]_\\))+?(?=\\s_\\))/,\n\nlookbehind: !0,\n\ninside: Prism.languages.javascript\n\n},\n\n{\n\npattern: /[\\_$a-z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_(?=\\s_=>)/i,\n\ninside: Prism.languages.javascript\n\n},\n\n{\n\npattern: /(\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\)\\s*=>)/,\n\nlookbehind: !0,\n\ninside: Prism.languages.javascript\n\n},\n\n{\n\npattern:\n\n/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:[\\_$A-Za-z\\xA0-\\uFFFF][$\\w\\xa0-\\uffff]_\\s_)\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\)\\s*\\{)/,\n\nlookbehind: !0,\n\ninside: Prism.languages.javascript\n\n}\n\n],\n\nconstant: /\\b[A-Z](?:[A-Z_]|\\dx?)_\\b/\n\n}),\n\nPrism.languages.insertBefore('javascript', 'string', {\n\n'template-string': {\n\npattern: /`(?:\\\\[\\s\\S]|\\${(?:[^{}]|{(?:[^{}]|{[^}]_})_})+}|[^\\\\`])_`/,\n\ngreedy: !0,\n\ninside: {\n\ninterpolation: {\n\npattern: /\\${(?:[^{}]|{(?:[^{}]|{[^}]_})_})+}/,\n\ninside: {\n\n'interpolation-punctuation': {\n\npattern: /^\\${|}$/,\n\nalias: 'punctuation'\n\n},\n\nrest: Prism.languages.javascript\n\n}\n\n},\n\nstring: /[\\s\\S]+/\n\n}\n\n}\n\n}),\n\nPrism.languages.markup &#x26;&#x26; Prism.languages.markup.tag.addInlined('script', 'javascript'),\n\n(Prism.languages.js = Prism.languages.javascript);\n\n!(function () {\n\nif ('undefined' != typeof self &#x26;&#x26; self.Prism &#x26;&#x26; self.document) {\n\nvar r = [],\n\ni = {},\n\nn = function () {};\n\nPrism.plugins.toolbar = {};\n\nvar t = (Prism.plugins.toolbar.registerButton = function (t, n) {\n\nvar e;\n\n(e =\n\n'function' == typeof n\n\n? n\n\n: function (t) {\n\nvar e;\n\nreturn (\n\n'function' == typeof n.onClick\n\n? (((e = document.createElement('button')).type = 'button'),\n\ne.addEventListener('click', function () {\n\nn.onClick.call(this, t);\n\n}))\n\n: 'string' == typeof n.url\n\n? ((e = document.createElement('a')).href = n.url)\n\n: (e = document.createElement('span')),\n\n(e.textContent = n.text),\n\ne\n\n);\n\n}),\n\nt in i ? console.warn('There is a button with the key \"' + t + '\" registered already.') : r.push((i[t] = e));\n\n}),\n\ne = (Prism.plugins.toolbar.hook = function (a) {\n\nvar t = a.element.parentNode;\n\nif (t &#x26;&#x26; /pre/i.test(t.nodeName) &#x26;&#x26; !t.parentNode.classList.contains('code-toolbar')) {\n\nvar e = document.createElement('div');\n\ne.classList.add('code-toolbar'), t.parentNode.insertBefore(e, t), e.appendChild(t);\n\nvar o = document.createElement('div');\n\no.classList.add('toolbar'),\n\ndocument.body.hasAttribute('data-toolbar-order') &#x26;&#x26;\n\n(r = document.body\n\n.getAttribute('data-toolbar-order')\n\n.split(',')\n\n.map(function (t) {\n\nreturn i[t] || n;\n\n})),\n\nr.forEach(function (t) {\n\nvar e = t(a);\n\nif (e) {\n\nvar n = document.createElement('div');\n\nn.classList.add('toolbar-item'), n.appendChild(e), o.appendChild(n);\n\n}\n\n}),\n\ne.appendChild(o);\n\n}\n\n});\n\nt('label', function (t) {\n\nvar e = t.element.parentNode;\n\nif (e &#x26;&#x26; /pre/i.test(e.nodeName) &#x26;&#x26; e.hasAttribute('data-label')) {\n\nvar n,\n\na,\n\no = e.getAttribute('data-label');\n\ntry {\n\na = document.querySelector('template#' + o);\n\n} catch (t) {}\n\nreturn (\n\na\n\n? (n = a.content)\n\n: (e.hasAttribute('data-url')\n\n? ((n = document.createElement('a')).href = e.getAttribute('data-url'))\n\n: (n = document.createElement('span')),\n\n(n.textContent = o)),\n\nn\n\n);\n\n}\n\n}),\n\nPrism.hooks.add('complete', e);\n\n}\n\n})();\n\n!(function () {\n\nif ('undefined' != typeof self &#x26;&#x26; self.Prism &#x26;&#x26; self.document)\n\nif (Prism.plugins.toolbar) {\n\nvar r = window.ClipboardJS || void 0;\n\nr || 'function' != typeof require || (r = require('clipboard'));\n\nvar i = [];\n\nif (!r) {\n\nvar o = document.createElement('script'),\n\ne = document.querySelector('head');\n\n(o.onload = function () {\n\nif ((r = window.ClipboardJS)) for (; i.length; ) i.pop()();\n\n}),\n\n(o.src = 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'),\n\ne.appendChild(o);\n\n}\n\nPrism.plugins.toolbar.registerButton('copy-to-clipboard', function (e) {\n\nvar t = document.createElement('a');\n\nreturn (t.textContent = 'Copy'), r ? o() : i.push(o), t;\n\nfunction o() {\n\nvar o = new r(t, {\n\ntext: function () {\n\nreturn e.code;\n\n}\n\n});\n\no.on('success', function () {\n\n(t.textContent = 'Copied'), n();\n\n}),\n\no.on('error', function () {\n\n(t.textContent = 'Press Ctrl+C to copy'), n();\n\n});\n\n}\n\nfunction n() {\n\nsetTimeout(function () {\n\nt.textContent = 'Copy';\n\n}, 5e3);\n\n}\n\n});\n\n} else console.warn('Copy to Clipboard plugin loaded before Toolbar plugin.');\n\n})();\n\n/_ PrismJS 1.24.1\n\nhttps://prismjs.com/download.html#themes=prism&#x26;languages=markup+css+clike+javascript _/\n\nvar \\_self = 'undefined' != typeof window ? window : 'undefined' != typeof WorkerGlobalScope &#x26;&#x26; self instanceof WorkerGlobalScope ? self : {},\n\nPrism = (function (u) {\n\nvar c = /\\blang(?:uage)?-([\\w-]+)\\b/i,\n\nn = 0,\n\ne = {},\n\nM = {\n\nmanual: u.Prism &#x26;&#x26; u.Prism.manual,\n\ndisableWorkerMessageHandler: u.Prism &#x26;&#x26; u.Prism.disableWorkerMessageHandler,\n\nutil: {\n\nencode: function e(n) {\n\nreturn n instanceof W\n\n? new W(n.type, e(n.content), n.alias)\n\n: Array.isArray(n)\n\n? n.map(e)\n\n: n\n\n.replace(/&#x26;/g, '&#x26;amp;')\n\n.replace(/&#x3C;/g, '&#x26;lt;')\n\n.replace(/\\u00a0/g, ' ');\n\n},\n\ntype: function (e) {\n\nreturn Object.prototype.toString.call(e).slice(8, -1);\n\n},\n\nobjId: function (e) {\n\nreturn e.**id || Object.defineProperty(e, '**id', { value: ++n }), e.**id;\n\n},\n\nclone: function t(e, r) {\n\nvar a, n;\n\nswitch (((r = r || {}), M.util.type(e))) {\n\ncase 'Object':\n\nif (((n = M.util.objId(e)), r[n])) return r[n];\n\nfor (var i in ((a = {}), (r[n] = a), e)) e.hasOwnProperty(i) &#x26;&#x26; (a[i] = t(e[i], r));\n\nreturn a;\n\ncase 'Array':\n\nreturn (\n\n(n = M.util.objId(e)),\n\nr[n]\n\n? r[n]\n\n: ((a = []),\n\n(r[n] = a),\n\ne.forEach(function (e, n) {\n\na[n] = t(e, r);\n\n}),\n\na)\n\n);\n\ndefault:\n\nreturn e;\n\n}\n\n},\n\ngetLanguage: function (e) {\n\nfor (; e &#x26;&#x26; !c.test(e.className); ) e = e.parentElement;\n\nreturn e ? (e.className.match(c) || [, 'none'])[1].toLowerCase() : 'none';\n\n},\n\ncurrentScript: function () {\n\nif ('undefined' == typeof document) return null;\n\nif ('currentScript' in document) return document.currentScript;\n\ntry {\n\nthrow new Error();\n\n} catch (e) {\n\nvar n = (/at [^(\\r\\n]_\\((._):.+:.+\\)$/i.exec(e.stack) || [])[1];\n\n                            if (n) {\n\n                                var t = document.getElementsByTagName('script');\n\n                                for (var r in t) if (t[r].src == n) return t[r];\n\n                            }\n\n                            return null;\n\n                        }\n\n                    },\n\n                    isActive: function (e, n, t) {\n\n                        for (var r = 'no-' + n; e; ) {\n\n                            var a = e.classList;\n\n                            if (a.contains(n)) return !0;\n\n                            if (a.contains(r)) return !1;\n\n                            e = e.parentElement;\n\n                        }\n\n                        return !!t;\n\n                    }\n\n                },\n\n                languages: {\n\n                    plain: e,\n\n                    plaintext: e,\n\n                    text: e,\n\n                    txt: e,\n\n                    extend: function (e, n) {\n\n                        var t = M.util.clone(M.languages[e]);\n\n                        for (var r in n) t[r] = n[r];\n\n                        return t;\n\n                    },\n\n                    insertBefore: function (t, e, n, r) {\n\n                        var a = (r = r || M.languages)[t],\n\n                            i = {};\n\n                        for (var l in a)\n\n                            if (a.hasOwnProperty(l)) {\n\n                                if (l == e) for (var o in n) n.hasOwnProperty(o) &#x26;&#x26; (i[o] = n[o]);\n\n                                n.hasOwnProperty(l) || (i[l] = a[l]);\n\n                            }\n\n                        var s = r[t];\n\n                        return (\n\n                            (r[t] = i),\n\n                            M.languages.DFS(M.languages, function (e, n) {\n\n                                n === s &#x26;&#x26; e != t &#x26;&#x26; (this[e] = i);\n\n                            }),\n\n                            i\n\n                        );\n\n                    },\n\n                    DFS: function e(n, t, r, a) {\n\n                        a = a || {};\n\n                        var i = M.util.objId;\n\n                        for (var l in n)\n\n                            if (n.hasOwnProperty(l)) {\n\n                                t.call(n, l, n[l], r || l);\n\n                                var o = n[l],\n\n                                    s = M.util.type(o);\n\n                                'Object' !== s || a[i(o)] ? 'Array' !== s || a[i(o)] || ((a[i(o)] = !0), e(o, t, l, a)) : ((a[i(o)] = !0), e(o, t, null, a));\n\n                            }\n\n                    }\n\n                },\n\n                plugins: {},\n\n                highlightAll: function (e, n) {\n\n                    M.highlightAllUnder(document, e, n);\n\n                },\n\n                highlightAllUnder: function (e, n, t) {\n\n                    var r = {\n\n                        callback: t,\n\n                        container: e,\n\n                        selector: 'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'\n\n                    };\n\n                    M.hooks.run('before-highlightall', r),\n\n                        (r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector))),\n\n                        M.hooks.run('before-all-elements-highlight', r);\n\n                    for (var a, i = 0; (a = r.elements[i++]); ) M.highlightElement(a, !0 === n, r.callback);\n\n                },\n\n                highlightElement: function (e, n, t) {\n\n                    var r = M.util.getLanguage(e),\n\n                        a = M.languages[r];\n\n                    e.className = e.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r;\n\n                    var i = e.parentElement;\n\n                    i &#x26;&#x26; 'pre' === i.nodeName.toLowerCase() &#x26;&#x26; (i.className = i.className.replace(c, '').replace(/\\s+/g, ' ') + ' language-' + r);\n\n                    var l = { element: e, language: r, grammar: a, code: e.textContent };\n\n                    function o(e) {\n\n                        (l.highlightedCode = e),\n\n                            M.hooks.run('before-insert', l),\n\n                            (l.element.innerHTML = l.highlightedCode),\n\n                            M.hooks.run('after-highlight', l),\n\n                            M.hooks.run('complete', l),\n\n                            t &#x26;&#x26; t.call(l.element);\n\n                    }\n\n                    if (\n\n                        (M.hooks.run('before-sanity-check', l),\n\n                        (i = l.element.parentElement) &#x26;&#x26; 'pre' === i.nodeName.toLowerCase() &#x26;&#x26; !i.hasAttribute('tabindex') &#x26;&#x26; i.setAttribute('tabindex', '0'),\n\n                        !l.code)\n\n                    )\n\n                        return M.hooks.run('complete', l), void (t &#x26;&#x26; t.call(l.element));\n\n                    if ((M.hooks.run('before-highlight', l), l.grammar))\n\n                        if (n &#x26;&#x26; u.Worker) {\n\n                            var s = new Worker(M.filename);\n\n                            (s.onmessage = function (e) {\n\n                                o(e.data);\n\n                            }),\n\n                                s.postMessage(JSON.stringify({ language: l.language, code: l.code, immediateClose: !0 }));\n\n                        } else o(M.highlight(l.code, l.grammar, l.language));\n\n                    else o(M.util.encode(l.code));\n\n                },\n\n                highlight: function (e, n, t) {\n\n                    var r = { code: e, grammar: n, language: t };\n\n                    return (\n\n                        M.hooks.run('before-tokenize', r),\n\n                        (r.tokens = M.tokenize(r.code, r.grammar)),\n\n                        M.hooks.run('after-tokenize', r),\n\n                        W.stringify(M.util.encode(r.tokens), r.language)\n\n                    );\n\n                },\n\n                tokenize: function (e, n) {\n\n                    var t = n.rest;\n\n                    if (t) {\n\n                        for (var r in t) n[r] = t[r];\n\n                        delete n.rest;\n\n                    }\n\n                    var a = new i();\n\n                    return (\n\n                        I(a, a.head, e),\n\n                        (function e(n, t, r, a, i, l) {\n\n                            for (var o in r)\n\n                                if (r.hasOwnProperty(o) &#x26;&#x26; r[o]) {\n\n                                    var s = r[o];\n\n                                    s = Array.isArray(s) ? s : [s];\n\n                                    for (var u = 0; u &#x3C; s.length; ++u) {\n\n                                        if (l &#x26;&#x26; l.cause == o + ',' + u) return;\n\n                                        var c = s[u],\n\n                                            g = c.inside,\n\n                                            f = !!c.lookbehind,\n\n                                            h = !!c.greedy,\n\n                                            d = c.alias;\n\n                                        if (h &#x26;&#x26; !c.pattern.global) {\n\n                                            var p = c.pattern.toString().match(/[imsuy]*$/)[0];\n\nc.pattern = RegExp(c.pattern.source, p + 'g');\n\n}\n\nfor (var v = c.pattern || c, m = a.next, y = i; m !== t.tail &#x26;&#x26; !(l &#x26;&#x26; y >= l.reach); y += m.value.length, m = m.next) {\n\nvar b = m.value;\n\nif (t.length > n.length) return;\n\nif (!(b instanceof W)) {\n\nvar k,\n\nx = 1;\n\nif (h) {\n\nif (!(k = z(v, y, n, f))) break;\n\nvar w = k.index,\n\nA = k.index + k[0].length,\n\nP = y;\n\nfor (P += m.value.length; P &#x3C;= w; ) (m = m.next), (P += m.value.length);\n\nif (((P -= m.value.length), (y = P), m.value instanceof W)) continue;\n\nfor (var E = m; E !== t.tail &#x26;&#x26; (P &#x3C; A || 'string' == typeof E.value); E = E.next)\n\nx++, (P += E.value.length);\n\nx--, (b = n.slice(y, P)), (k.index -= y);\n\n} else if (!(k = z(v, 0, b, f))) continue;\n\nvar w = k.index,\n\nS = k[0],\n\nO = b.slice(0, w),\n\nL = b.slice(w + S.length),\n\nN = y + b.length;\n\nl &#x26;&#x26; N > l.reach &#x26;&#x26; (l.reach = N);\n\nvar j = m.prev;\n\nO &#x26;&#x26; ((j = I(t, j, O)), (y += O.length)), q(t, j, x);\n\nvar C = new W(o, g ? M.tokenize(S, g) : S, d, S);\n\nif (((m = I(t, j, C)), L &#x26;&#x26; I(t, m, L), 1 &#x3C; x)) {\n\nvar _ = { cause: o + ',' + u, reach: N };\n\ne(n, t, r, m.prev, y, _), l &#x26;&#x26; _.reach > l.reach &#x26;&#x26; (l.reach = _.reach);\n\n}\n\n}\n\n}\n\n}\n\n}\n\n})(e, a, n, a.head, 0),\n\n(function (e) {\n\nvar n = [],\n\nt = e.head.next;\n\nfor (; t !== e.tail; ) n.push(t.value), (t = t.next);\n\nreturn n;\n\n})(a)\n\n);\n\n},\n\nhooks: {\n\nall: {},\n\nadd: function (e, n) {\n\nvar t = M.hooks.all;\n\n(t[e] = t[e] || []), t[e].push(n);\n\n},\n\nrun: function (e, n) {\n\nvar t = M.hooks.all[e];\n\nif (t &#x26;&#x26; t.length) for (var r, a = 0; (r = t[a++]); ) r(n);\n\n}\n\n},\n\nToken: W\n\n};\n\nfunction W(e, n, t, r) {\n\n(this.type = e), (this.content = n), (this.alias = t), (this.length = 0 | (r || '').length);\n\n}\n\nfunction z(e, n, t, r) {\n\ne.lastIndex = n;\n\nvar a = e.exec(t);\n\nif (a &#x26;&#x26; r &#x26;&#x26; a[1]) {\n\nvar i = a[1].length;\n\n(a.index += i), (a[0] = a[0].slice(i));\n\n}\n\nreturn a;\n\n}\n\nfunction i() {\n\nvar e = { value: null, prev: null, next: null },\n\nn = { value: null, prev: e, next: null };\n\n(e.next = n), (this.head = e), (this.tail = n), (this.length = 0);\n\n}\n\nfunction I(e, n, t) {\n\nvar r = n.next,\n\na = { value: t, prev: n, next: r };\n\nreturn (n.next = a), (r.prev = a), e.length++, a;\n\n}\n\nfunction q(e, n, t) {\n\nfor (var r = n.next, a = 0; a &#x3C; t &#x26;&#x26; r !== e.tail; a++) r = r.next;\n\n((n.next = r).prev = n), (e.length -= a);\n\n}\n\nif (\n\n((u.Prism = M),\n\n(W.stringify = function n(e, t) {\n\nif ('string' == typeof e) return e;\n\nif (Array.isArray(e)) {\n\nvar r = '';\n\nreturn (\n\ne.forEach(function (e) {\n\nr += n(e, t);\n\n}),\n\nr\n\n);\n\n}\n\nvar a = { type: e.type, content: n(e.content, t), tag: 'span', classes: ['token', e.type], attributes: {}, language: t },\n\ni = e.alias;\n\ni &#x26;&#x26; (Array.isArray(i) ? Array.prototype.push.apply(a.classes, i) : a.classes.push(i)), M.hooks.run('wrap', a);\n\nvar l = '';\n\nfor (var o in a.attributes) l += ' ' + o + '=\"' + (a.attributes[o] || '').replace(/\"/g, '&#x26;quot;') + '\"';\n\nreturn '&#x3C;' + a.tag + ' class=\"' + a.classes.join(' ') + '\"' + l + '>' + a.content + '&#x3C;/' + a.tag + '>';\n\n}),\n\n!u.document)\n\n)\n\nreturn (\n\nu.addEventListener &#x26;&#x26;\n\n(M.disableWorkerMessageHandler ||\n\nu.addEventListener(\n\n'message',\n\nfunction (e) {\n\nvar n = JSON.parse(e.data),\n\nt = n.language,\n\nr = n.code,\n\na = n.immediateClose;\n\nu.postMessage(M.highlight(r, M.languages[t], t)), a &#x26;&#x26; u.close();\n\n},\n\n!1\n\n)),\n\nM\n\n);\n\nvar t = M.util.currentScript();\n\nfunction r() {\n\nM.manual || M.highlightAll();\n\n}\n\nif ((t &#x26;&#x26; ((M.filename = t.src), t.hasAttribute('data-manual') &#x26;&#x26; (M.manual = !0)), !M.manual)) {\n\nvar a = document.readyState;\n\n'loading' === a || ('interactive' === a &#x26;&#x26; t &#x26;&#x26; t.defer)\n\n? document.addEventListener('DOMContentLoaded', r)\n\n: window.requestAnimationFrame\n\n? window.requestAnimationFrame(r)\n\n: window.setTimeout(r, 16);\n\n}\n\nreturn M;\n\n})(_self);\n\n'undefined' != typeof module &#x26;&#x26; module.exports &#x26;&#x26; (module.exports = Prism), 'undefined' != typeof global &#x26;&#x26; (global.Prism = Prism);\n\n(Prism.languages.markup = {\n\ncomment: /&#x3C;!--[\\s\\S]*?-->/,\n\nprolog: /&#x3C;\\?[\\s\\S]+?\\?>/,\n\ndoctype: {\n\npattern: /&#x3C;!DOCTYPE(?:[^>\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:[^&#x3C;\"'\\]]|\"[^\"]*\"|'[^']*'|&#x3C;(?!!--)|&#x3C;!--(?:[^-]|-(?!->))*-->)*\\]\\s*)?>/i,\n\ngreedy: !0,\n\ninside: {\n\n'internal-subset': { pattern: /(^[^\\[]*\\[)[\\s\\S]+(?=\\]>$)/, lookbehind: !0, greedy: !0, inside: null },\n\nstring: { pattern: /\"[^\"]*\"|'[^']*'/, greedy: !0 },\n\npunctuation: /^&#x3C;!|>$|[[\\]]/,\n\n'doctype-tag': /^DOCTYPE/,\n\nname: /[^\\s&#x3C;>'\"]+/\n\n}\n\n},\n\ncdata: /&#x3C;!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,\n\ntag: {\n\npattern: /&#x3C;\\/?(?!\\d)[^\\s>\\/=$&#x3C;%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/,\n\ngreedy: !0,\n\ninside: {\n\ntag: { pattern: /^&#x3C;\\/?[^\\s>\\/]+/, inside: { punctuation: /^&#x3C;\\/?/, namespace: /^[^\\s>\\/:]+:/ } },\n\n'special-attr': [],\n\n'attr-value': { pattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: 'attr-equals' }, /\"|'/] } },\n\npunctuation: /\\/?>/,\n\n'attr-name': { pattern: /[^\\s>\\/]+/, inside: { namespace: /^[^\\s>\\/:]+:/ } }\n\n}\n\n},\n\nentity: [{ pattern: /&#x26;[\\da-z]{1,8};/i, alias: 'named-entity' }, /&#x26;#x?[\\da-f]{1,8};/i]\n\n}),\n\n(Prism.languages.markup.tag.inside['attr-value'].inside.entity = Prism.languages.markup.entity),\n\n(Prism.languages.markup.doctype.inside['internal-subset'].inside = Prism.languages.markup),\n\nPrism.hooks.add('wrap', function (a) {\n\n'entity' === a.type &#x26;&#x26; (a.attributes.title = a.content.replace(/&#x26;amp;/, '&#x26;'));\n\n}),\n\nObject.defineProperty(Prism.languages.markup.tag, 'addInlined', {\n\nvalue: function (a, e) {\n\nvar s = {};\n\n(s['language-' + e] = { pattern: /(^&#x3C;!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i, lookbehind: !0, inside: Prism.languages[e] }),\n\n                (s.cdata = /^&#x3C;!\\[CDATA\\[|\\]\\]>$/i);\n\nvar t = { 'included-cdata': { pattern: /&#x3C;!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i, inside: s } };\n\nt['language-' + e] = { pattern: /[\\s\\S]+/, inside: Prism.languages[e] };\n\nvar n = {};\n\n(n[a] = {\n\npattern: RegExp(\n\n'(&#x3C;**[^>]*>)(?:&#x3C;!\\\\[CDATA\\\\[(?:[^\\\\]]|\\\\](?!\\]>))*\\\\]\\\\]>|(?!&#x3C;!\\\\[CDATA\\\\[)[^])\\*?(?=&#x3C;/**>)'.replace(/\\_\\_/g, function () {\n\nreturn a;\n\n}),\n\n'i'\n\n),\n\nlookbehind: !0,\n\ngreedy: !0,\n\ninside: t\n\n}),\n\nPrism.languages.insertBefore('markup', 'cdata', n);\n\n}\n\n}),\n\nObject.defineProperty(Prism.languages.markup.tag, 'addAttribute', {\n\nvalue: function (a, e) {\n\nPrism.languages.markup.tag.inside['special-attr'].push({\n\npattern: RegExp('(^|[\"\\'\\\\s])(?:' + a + ')\\\\s*=\\\\s*(?:\"[^\"]*\"|\\'[^\\']*\\'|[^\\\\s\\'\">=]+(?=[\\\\s>]))', 'i'),\n\nlookbehind: !0,\n\ninside: {\n\n'attr-name': /^[^\\s=]+/,\n\n'attr-value': {\n\npattern: /=[\\s\\S]+/,\n\ninside: {\n\nvalue: {\n\npattern: /(^=\\s*([\"']|(?![\"'])))\\S[\\s\\S]*(?=\\2$)/,\n\n                                lookbehind: !0,\n\n                                alias: [e, 'language-' + e],\n\n                                inside: Prism.languages[e]\n\n                            },\n\n                            punctuation: [{ pattern: /^=/, alias: 'attr-equals' }, /\"|'/]\n\n                        }\n\n                    }\n\n                }\n\n            });\n\n        }\n\n    }),\n\n    (Prism.languages.html = Prism.languages.markup),\n\n    (Prism.languages.mathml = Prism.languages.markup),\n\n    (Prism.languages.svg = Prism.languages.markup),\n\n    (Prism.languages.xml = Prism.languages.extend('markup', {})),\n\n    (Prism.languages.ssml = Prism.languages.xml),\n\n    (Prism.languages.atom = Prism.languages.xml),\n\n    (Prism.languages.rss = Prism.languages.xml);\n\n!(function (s) {\n\n    var e = /(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n])*')/;\n\n    (s.languages.css = {\n\n        comment: /\\/\\*[\\s\\S]*?\\*\\//,\n\n        atrule: {\n\n            pattern: /@[\\w-](?:[^;{\\s]|\\s+(?![\\s{]))*(?:;|(?=\\s*\\{))/,\n\n            inside: {\n\n                rule: /^@[\\w-]+/,\n\n                'selector-function-argument': {\n\n                    pattern: /(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/,\n\n                    lookbehind: !0,\n\n                    alias: 'selector'\n\n                },\n\n                keyword: { pattern: /(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/, lookbehind: !0 }\n\n            }\n\n        },\n\n        url: {\n\n            pattern: RegExp('\\\\burl\\\\((?:' + e.source + '|(?:[^\\\\\\\\\\r\\n()\"\\']|\\\\\\\\[^])*)\\\\)', 'i'),\n\n            greedy: !0,\n\n            inside: { function: /^url/i, punctuation: /^\\(|\\)$/, string: { pattern: RegExp('^' + e.source + '$'), alias: 'url' } }\n\n        },\n\n        selector: { pattern: RegExp('(^|[{}\\\\s])[^{}\\\\s](?:[^{};\"\\'\\\\s]|\\\\s+(?![\\\\s{])|' + e.source + ')*(?=\\\\s*\\\\{)'), lookbehind: !0 },\n\n        string: { pattern: e, greedy: !0 },\n\n        property: { pattern: /(^|[^-\\w\\xA0-\\uFFFF])(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i, lookbehind: !0 },\n\n        important: /!important\\b/i,\n\n        function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\\()/i, lookbehind: !0 },\n\n        punctuation: /[(){};:,]/\n\n    }),\n\n        (s.languages.css.atrule.inside.rest = s.languages.css);\n\n    var t = s.languages.markup;\n\n    t &#x26;&#x26; (t.tag.addInlined('style', 'css'), t.tag.addAttribute('style', 'css'));\n\n})(Prism);\n\nPrism.languages.clike = {\n\n    comment: [\n\n        { pattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/, lookbehind: !0, greedy: !0 },\n\n{ pattern: /(^|[^\\\\:])\\/\\/.*/, lookbehind: !0, greedy: !0 }\n\n],\n\nstring: { pattern: /([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/, greedy: !0 },\n\n'class-name': {\n\npattern: /(\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,\n\nlookbehind: !0,\n\ninside: { punctuation: /[.\\\\]/ }\n\n},\n\nkeyword: /\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,\n\nboolean: /\\b(?:true|false)\\b/,\n\nfunction: /\\b\\w+(?=\\()/,\n\nnumber: /\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n\noperator: /[&#x3C;>]=?|[!=]=?=?|--?|\\+\\+?|&#x26;&#x26;?|\\|\\|?|[?*/~^%]/,\n\npunctuation: /[{}[\\];(),.:]/\n\n};\n\n(Prism.languages.javascript = Prism.languages.extend('clike', {\n\n'class-name': [\n\nPrism.languages.clike['class-name'],\n\n{ pattern: /(^|[^$\\w\\xa0-\\uffff])(?!\\s)[_$A-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])_(?=\\.(?:prototype|constructor))/, lookbehind: !0 }\n\n],\n\nkeyword: [\n\n{ pattern: /((?:^|\\})\\s_)catch\\b/, lookbehind: !0 },\n\n{\n\npattern:\n\n/(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|assert(?=\\s*\\{)|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\\s*(?:\\{|$))|for|from(?=\\s*(?:['\"]|$))|function|(?:get|set)(?=\\s*(?:[#\\[$\\w\\xA0-\\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,\n\n            lookbehind: !0\n\n        }\n\n    ],\n\n    function: /#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,\n\nnumber: /\\b(?:(?:0[xX](&#x3C;?:[\\dA-Fa-f](?:_[\\dA-Fa-f])?>)+|0[bB](&#x3C;?:[01](?:_[01])?>)+|0[oO](&#x3C;?:[0-7](?:_[0-7])?>)+)n?|(?:\\d(?:*\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:*\\d)?)+\\.?(?:\\d(?:\\_\\d)?)*|\\B\\.(?:\\d(?:_\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,\n\noperator: /--|\\+\\+|\\*\\*=?|=>|&#x26;&#x26;=?|\\|\\|=?|[!=]==|&#x3C;&#x3C;=?|>>>?=?|[-+*/%&#x26;|^!=&#x3C;>]=?|\\.{3}|\\?\\?=?|\\?\\.?|[~:]/\n\n})),\n\n(Prism.languages.javascript['class-name'][0].pattern = /(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\\\]+/),\n\nPrism.languages.insertBefore('javascript', 'keyword', {\n\nregex: {\n\npattern:\n\n/((?:^|[^$\\w\\xa0-\\uffff.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))_\\*\\/)_(?:$|[\\r\\n,.;:})\\]]|\\/\\/))/,\n\n            lookbehind: !0,\n\n            greedy: !0,\n\n            inside: {\n\n                'regex-source': { pattern: /^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/, lookbehind: !0, alias: 'language-regex', inside: Prism.languages.regex },\n\n'regex-delimiter': /^\\/|\\/$/,\n\n                'regex-flags': /^[a-z]+$/\n\n}\n\n},\n\n'function-variable': {\n\npattern:\n\n/#?(?!\\s)[\\_$a-zA-Z\\xA0-\\uFFFF](&#x3C;?:(?!\\s)[$\\w\\xA0-\\uFFFF]>)_(?=\\s_[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]_\\))_\\)|(?!\\s)[\\_$a-zA-Z\\xA0-\\uFFFF](&#x3C;?:(?!\\s)[$\\w\\xA0-\\uFFFF]>)_)\\s_=>))/,\n\nalias: 'function'\n\n},\n\nparameter: [\n\n{\n\npattern: /(function(?:\\s+(?!\\s)[\\_$a-zA-Z\\xA0-\\uFFFF](&#x3C;?:(?!\\s)[$\\w\\xA0-\\uFFFF]>)_)?\\s_\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\))/,\n\nlookbehind: !0,\n\ninside: Prism.languages.javascript\n\n},\n\n{\n\npattern: /(^|[^$\\w\\xa0-\\uffff])(?!\\s)[\\_$a-z\\xA0-\\uFFFF](&#x3C;?:(?!\\s)[$\\w\\xA0-\\uFFFF]>)*(?=\\s*=>)/i,\n\nlookbehind: !0,\n\ninside: Prism.languages.javascript\n\n},\n\n{ pattern: /(\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]_\\))+(?=\\s_\\)\\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript },\n\n{\n\npattern:\n\n/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:(?!\\s)[\\_$a-zA-Z\\xA0-\\uFFFF](&#x3C;?:(?!\\s)[$\\w\\xA0-\\uFFFF]>)*\\s*)\\(\\s*|\\]\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]_\\))+(?=\\s_\\)\\s*\\{)/,\n\nlookbehind: !0,\n\ninside: Prism.languages.javascript\n\n}\n\n],\n\nconstant: /\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/\n\n}),\n\nPrism.languages.insertBefore('javascript', 'string', {\n\nhashbang: { pattern: /^#!._/, greedy: !0, alias: 'comment' },\n\n'template-string': {\n\npattern: /`(?:\\\\[\\s\\S]|\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]_\\})_\\})+\\}|(?!\\$\\{)[^\\\\`])_`/, greedy: !0, inside: { 'template-punctuation': { pattern: /^`|`$/, alias: 'string' },\n\n                interpolation: {\n\n                    pattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}/,\n\n                    lookbehind: !0,\n\n                    inside: { 'interpolation-punctuation': { pattern: /^\\$\\{|\\}$/, alias: 'punctuation' }, rest: Prism.languages.javascript }\n\n},\n\nstring: /[\\s\\S]+/\n\n}\n\n}\n\n}),\n\nPrism.languages.markup &#x26;&#x26;\n\n(Prism.languages.markup.tag.addInlined('script', 'javascript'),\n\nPrism.languages.markup.tag.addAttribute(\n\n'on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)',\n\n'javascript'\n\n)),\n\n(Prism.languages.js = Prism.languages.javascript);\n</code></pre>\n<pre><code>&#x3C;details>\n</code></pre>\n<br>\n<br>\n<hr>\n<hr>\n<hr>\n<hr>\n<br>\n<br>\n<h1>Plugins</h1>\n<pre><code>├── ./plugins\n\n        ├── ./plugins/gatsby-remark-page-creator\n\n        │   └──  ./plugins/gatsby-remark-page-creator/gatsby-node.js\n\n        │   \n\n        └── ./plugins/gatsby-source-data\n\n            └──  ./plugins/gatsby-source-data/gatsby-node.js\n</code></pre>\n<br>\n<br>\n<hr>\n<hr>\n<hr>\n<hr>\n<br>\n<br>\n<h1>Components</h1>\n<h3>Index.js</h3>\n<pre><code class=\"language-js\">import ActionLink from './ActionLink';\n\nimport CtaButtons from './CtaButtons';\n\nimport DocsMenu from './DocsMenu';\n\nimport DocsSubmenu from './DocsSubmenu';\n\nimport Footer from './Footer';\n\nimport Header from './Header';\n\nimport Icon from './Icon';\n\nimport SectionContent from './SectionContent';\n\nimport SectionCta from './SectionCta';\n\nimport SectionDocs from './SectionDocs';\n\nimport SectionGrid from './SectionGrid';\n\nimport SectionHero from './SectionHero';\n\nimport Submenu from './Submenu';\n\nimport Layout from './Layout';\n\nimport addScript from './../hooks/addScript';\n\nexport {\n\n    ActionLink,\n\n    CtaButtons,\n\n    DocsMenu,\n\n    DocsSubmenu,\n\n    Footer,\n\n    Header,\n\n    Icon,\n\n    SectionContent,\n\n    SectionCta,\n\n    SectionDocs,\n\n    SectionGrid,\n\n    SectionHero,\n\n    Submenu,\n\n    Layout\n\n};\n\n\n\nexport default {\n\n    ActionLink,\n\n    CtaButtons,\n\n    DocsMenu,\n\n    DocsSubmenu,\n\n    Footer,\n\n    Header,\n\n    Icon,\n\n    SectionContent,\n\n    SectionCta,\n\n    SectionDocs,\n\n    SectionGrid,\n\n    SectionHero,\n\n    Submenu,\n\n    Layout\n\n};\n</code></pre>\n<h3>Layout.js</h3>\n<pre><code class=\"language-js\">import React from 'react';\n\nimport { Helmet } from 'react-helmet';\n\nimport _ from 'lodash';\n\nimport { withPrefix, attribute } from '../utils';\n\nimport '../sass/main.scss';\n\nimport Header from './Header';\n\nimport Footer from './Footer';\n\nimport addScript from './../hooks/addScript';\n\nconst Script = (_props) => {\n\n    importScript('./../hooks/addScript.js');\n\n};\n\nexport default class Body extends React.Component {\n\n    render() {\n\n        return (\n\n            &#x3C;React.Fragment>\n\n                &#x3C;link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@1/dist/algoliasearchNetlify.css\" />\n\n                &#x3C;Helmet>\n\n                    &#x3C;title>\n\n                        {_.get(this.props, 'pageContext.frontmatter.seo.title', null)\n\n                            ? _.get(this.props, 'pageContext.frontmatter.seo.title', null)\n\n                            : _.get(this.props, 'pageContext.frontmatter.title', null) + ' | ' + _.get(this.props, 'pageContext.site.siteMetadata.title', null)}\n\n                    &#x3C;/title>\n\n                    &#x3C;meta charSet=\"utf-8\" />\n\n                    &#x3C;meta name=\"viewport\" content=\"width=device-width, initialScale=1.0\" />\n\n                    &#x3C;meta name=\"description\" content={_.get(this.props, 'pageContext.frontmatter.seo.description', null) || ''} />\n\n                    {_.get(this.props, 'pageContext.frontmatter.seo.robots', null) &#x26;&#x26; (\n\n                        &#x3C;meta name=\"robots\" content={_.join(_.get(this.props, 'pageContext.frontmatter.seo.robots', null), ',')} />\n\n                    )}\n\n                    {_.map(_.get(this.props, 'pageContext.frontmatter.seo.extra', null), (meta, meta_idx) => {\n\n                        let key_name = _.get(meta, 'keyName', null) || 'name';\n\n                        return _.get(meta, 'relativeUrl', null) ? (\n\n                            _.get(this.props, 'pageContext.site.siteMetadata.domain', null) &#x26;&#x26;\n\n                                (() => {\n\n                                    let domain = _.trim(_.get(this.props, 'pageContext.site.siteMetadata.domain', null), '/');\n\n                                    let rel_url = withPrefix(_.get(meta, 'value', null));\n\n                                    let full_url = domain + rel_url;\n\n                                    return &#x3C;meta key={meta_idx} {...attribute(key_name, _.get(meta, 'name', null))} content={full_url} />;\n\n                                })()\n\n                        ) : (\n\n                            &#x3C;meta key={meta_idx + '.1'} {...attribute(key_name, _.get(meta, 'name', null))} content={_.get(meta, 'value', null)} />\n\n                        );\n\n                    })}\n\n                    &#x3C;link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" />\n\n                    &#x3C;link href=\"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&#x26;display=swap\" rel=\"stylesheet\" />\n\n                    {_.get(this.props, 'pageContext.site.siteMetadata.favicon', null) &#x26;&#x26; (\n\n                        &#x3C;link rel=\"icon\" href={withPrefix(_.get(this.props, 'pageContext.site.siteMetadata.favicon', null))} />\n\n                    )}\n\n                    &#x3C;body className={'palette-' + _.get(this.props, 'pageContext.site.siteMetadata.palette', null)} />\n\n                &#x3C;/Helmet>\n\n                &#x3C;div id=\"page\" className=\"site\">\n\n                    &#x3C;Header {...this.props} />\n\n                    &#x3C;main id=\"content\" className=\"site-content\">\n\n                        {this.props.children}\n\n                    &#x3C;/main>\n\n                    &#x3C;Footer {...this.props} />\n\n                &#x3C;/div>\n\n            &#x3C;/React.Fragment>\n\n        );\n\n    }\n\n}\n</code></pre>\n<h3>ActionLink.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>CtaButtons.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>DocsMenu.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>DocsSubmenu.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>Footer.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>Header.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>Icon.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>SectionContent.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>SectionCta.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>SectionDocs.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>SectionGrid.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>SectionHero.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3>Submenu.js</h3>\n<pre><code class=\"language-js\"></code></pre>\n<br>\n<br>\n<hr>\n<hr>\n<hr>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<hr>\n<hr>\n<hr>\n<br>\n<br>\n<br>\n<br>\n<hr>\n<hr>\n<hr>\n<hr>\n<br>\n<br>\n<pre><code>├── ./functions\n\n│   └── ./functions/deploy-succeeded.js\n\n├── ./gatsby-browser.js\n\n├── ./gatsby-config.js\n\n├── ./gatsby-node.js\n\n├── ./gatsby-ssr.js\n\n├── ./googled2b1865dedd985a4.html\n\n├── ./lambda\n\n    └── ./lambda/deploy-succeeded.js\n</code></pre>\n<h2>Gatsby Browser</h2>\n<pre><code class=\"language-js\">/**\n\n * Implement Gatsby's Browser APIs in this file.\n\n *\n\n * See: https://www.gatsbyjs.org/docs/browser-apis/\n\n */\n\n\n\n// onPreRouteUpdate() and onRouteUpdate() are called before onInitialClientRender,\n\n// use initialized flag to ensure that window.onGatsbyPreRouteUpdate() and\n\n// window.onGatsbyRouteUpdate() will not be called before\n\n// window.onGatsbyInitialClientRender() has run\n\nlet initialized = false;\n\n\n\nexports.onInitialClientRender = () => {\n\n    initialized = true;\n\n    if ('onGatsbyInitialClientRender' in window &#x26;&#x26; typeof window.onGatsbyInitialClientRender === 'function') {\n\n        window.onGatsbyInitialClientRender();\n\n    }\n\n    if ('onGatsbyRouteUpdate' in window &#x26;&#x26; typeof window.onGatsbyRouteUpdate === 'function') {\n\n        window.onGatsbyRouteUpdate();\n\n    }\n\n};\n\n\n\nexports.onRouteUpdate = () => {\n\n    if (initialized &#x26;&#x26; 'onGatsbyRouteUpdate' in window &#x26;&#x26; typeof window.onGatsbyRouteUpdate === 'function') {\n\n        window.onGatsbyRouteUpdate();\n\n    }\n\n};\n\n\n\nexports.onPreRouteUpdate = () => {\n\n    if (initialized &#x26;&#x26; 'onGatsbyPreRouteUpdate' in window &#x26;&#x26; typeof window.onGatsbyPreRouteUpdate === 'function') {\n\n        window.onGatsbyPreRouteUpdate();\n\n    }\n\n};\n</code></pre>\n<hr>\n<h2>Gatsby-config</h2>\n<pre><code class=\"language-js\">const siteMetadata = require('./site-metadata.json');\n\n\n\nmodule.exports = {\n\n    pathPrefix: '/',\n\n    siteMetadata: siteMetadata,\n\n    plugins: [\n\n        `gatsby-plugin-react-helmet`,\n\n        `gatsby-source-data`,\n\n        `gatsby-transformer-remark`,\n\n        {\n\n            resolve: `gatsby-source-filesystem`,\n\n            options: {\n\n                name: `pages`,\n\n                path: `${__dirname}/src/pages`\n\n            }\n\n        },\n\n        {\n\n            resolve: `gatsby-plugin-sass`,\n\n            options: {}\n\n        },\n\n        {\n\n            resolve: `gatsby-remark-page-creator`,\n\n            options: {}\n\n        },\n\n        {\n\n            resolve: `@stackbit/gatsby-plugin-menus`,\n\n            options: {\n\n                sourceUrlPath: `fields.url`,\n\n                pageContextProperty: `menus`\n\n            }\n\n        }\n\n    ]\n\n};\n</code></pre>\n<hr>\n<h2>Gatsby-node</h2>\n<h2><a href=\"https://www.gatsbyjs.org/docs/node-apis/\">Gatsby Node</a></h2>\n<pre><code class=\"language-js\">/**\n\n * Implement Gatsby's Node APIs in this file.\n\n *\n\n * See: https://www.gatsbyjs.org/docs/node-apis/\n\n */\n</code></pre>\n<h1>Gatsby Node APIs</h1>\n<p>Gatsby gives plugins and site builders many APIs for building your site. Code in the file <code>gatsby-node.js</code> is run once in the process of building your site. You can use its APIs to create pages dynamically, add data into GraphQL, or respond to events during the build lifecycle. To use the <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/\">Gatsby Node APIs</a>, create a file named <code>gatsby-node.js</code> in the root of your site. Export any of the APIs you wish to use in this file.</p>\n<p>Every Gatsby Node API gets passed a <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/node-api-helpers/\">set of helper functions</a>. These let you access several methods like reporting, or perform actions like creating new pages.</p>\n<p>An example gatsby-node.js file that implements two APIs, <code>onPostBuild</code>, and <code>createPages</code>.</p>\n<blockquote>\n<p>gatsby-node.js</p>\n</blockquote>\n<pre><code class=\"language-js\">Copygatsby-node.js: copy code to clipboard`\n\n\n\nconst path =  require(`path`)\n\n\n\n// Log out information after a build is done\n\n\n\nexports.onPostBuild  =  ({ reporter })  =>  {\n\n\n\n reporter.info(`Your Gatsby site has been built!`)\n\n\n\n}\n\n\n\n// Create blog pages dynamically\n\n\n\nexports.createPages  =  async  ({ graphql, actions })  =>  {\n\n\n\n  const  { createPage }  = actions\n\n\n\n  const blogPostTemplate = path.resolve(`src/templates/blog-post.js`)\n\n\n\n  const result =  await  graphql(`\n\n\n\n query {\n\n\n\n allSamplePages {\n\n\n\n edges {\n\n\n\n node {\n\n\n\n slug\n\n\n\n title\n\n\n\n }\n\n\n\n }\n\n\n\n }\n\n\n\n }\n\n\n\n  `)\n\n\n\n result.data.allSamplePages.edges.forEach(edge  =>  {\n\n\n\n  createPage({\n\n\n\n path:  `${edge.node.slug}`,\n\n\n\n component: blogPostTemplate,\n\n\n\n context:  {\n\n\n\n title: edge.node.title,\n\n\n\n  },\n\n\n\n  })\n\n\n\n  })\n\n\n\n}\n</code></pre>\n<h2><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#async-vs-sync-work\"></a>Async vs. sync work</h2>\n<p>If your plugin performs async operations (disk I/O, database access, calling remote APIs, etc.) you must either return a promise (explicitly using <code>Promise</code> API or implicitly using <code>async</code>/<code>await</code> syntax) or use the callback passed to the 3rd argument. Gatsby needs to know when plugins are finished as some APIs, to work correctly, require previous APIs to be complete first. See <a href=\"https://www.gatsbyjs.com/docs/debugging-async-lifecycles/\">Debugging Async Lifecycles</a> for more info.</p>\n<p>// Async/await</p>\n<pre><code class=\"language-js\">exports.createPages = async () => {\n\n    // do async work\n\n\n\n    const result = await fetchExternalData();\n\n};\n\n\n\n// Promise API\n\n\n\nexports.createPages = () => {\n\n    return new Promise((resolve, reject) => {\n\n        // do async work\n\n    });\n\n};\n\n\n\n// Callback API\n\n\n\nexports.createPages = (_, pluginOptions, cb) => {\n\n    // do async work\n\n\n\n    cb();\n\n};\n</code></pre>\n<p>If your plugin does not do async work, you can return directly.</p>\n<h2>APIs</h2>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#createPages\"><code>createPages</code></a></p>\n<p>Create pages dynamically. This extension point is called only after the initial sourcing and transformation of nodes plus creation of the GraphQL schema are complete so you can query your data in order to create pages.</p>\n<p>You can also fetch data from remote or local sources to create pages.</p>\n<p>See also <a href=\"https://www.gatsbyjs.com/docs/actions/#createPage\">the documentation for the action <code>createPage</code></a>.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n<p>See the <a href=\"https://www.gatsbyjs.com/docs/node-api-helpers\">documentation for <code>Node API Helpers</code> for more details</a></p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`actions` Actions\n\nSee the [list of documented actions](https://www.gatsbyjs.com/docs/actions)\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>    `createPage` function\n\n    [Documentation for this action](https://www.gatsbyjs.com/docs/actions/#createPage)\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`graphql` function\n\n: Query GraphQL API. See [examples here](https://www.gatsbyjs.com/docs/creating-and-modifying-pages/#creating-pages-in-gatsby-nodejs)\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`reporter` GatsbyReporter\n\nLog issues. See [GatsbyReporter documentation](https://www.gatsbyjs.com/docs/node-api-helpers/#GatsbyReporter) for more details\n</code></pre>\n</li>\n</ul>\n<h4>Return value</h4>\n<h5></h5>\n<p>Promise<void></p>\n<p>No return value required, but the caller will <code>await</code> any promise that's returned</p>\n<h4>Example</h4>\n<pre><code class=\"language-js\">const path = require(`path`);\n\n\n\nexports.createPages = ({ graphql, actions }) => {\n\n    const { createPage } = actions;\n\n    const blogPostTemplate = path.resolve(`src/templates/blog-post.js`);\n\n    // Query for markdown nodes to use in creating pages.\n\n    // You can query for whatever data you want to create pages for e.g.\n\n    // products, portfolio items, landing pages, etc.\n\n    // Variables can be added as the second function parameter\n\n    return graphql(\n\n        `\n\n            query loadPagesQuery($limit: Int!) {\n\n                allMarkdownRemark(limit: $limit) {\n\n                    edges {\n\n                        node {\n\n                            frontmatter {\n\n                                slug\n\n                            }\n\n                        }\n\n                    }\n\n                }\n\n            }\n\n        `,\n\n        { limit: 1000 }\n\n    ).then((result) => {\n\n        if (result.errors) {\n\n            throw result.errors;\n\n        }\n\n\n\n        // Create blog post pages.\n\n        result.data.allMarkdownRemark.edges.forEach((edge) => {\n\n            createPage({\n\n                // Path for this page --- required\n\n                path: `${edge.node.frontmatter.slug}`,\n\n                component: blogPostTemplate,\n\n                context: {\n\n                    // Add optional context data to be inserted\n\n                    // as props into the page component.\n\n                    //\n\n                    // The context data can also be used as\n\n                    // arguments to the page GraphQL query.\n\n                    //\n\n                    // The page \"path\" is always available as a GraphQL\n\n                    // argument.\n\n                }\n\n            });\n\n        });\n\n    });\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#createPagesStatefully\"><code>createPagesStatefully</code></a></p>\n<p>Like <code>createPages</code> but for plugins who want to manage creating and removing pages themselves in response to changes in data <em>not</em> managed by Gatsby. Plugins implementing <code>createPages</code> will get called regularly to recompute page information as Gatsby's data changes but those implementing <code>createPagesStatefully</code> will not.</p>\n<p>An example of a plugin that uses this extension point is the plugin <a href=\"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-page-creator\">gatsby-plugin-page-creator</a> which monitors the <code>src/pages</code> directory for the adding and removal of JS pages. As its source of truth, files in the pages directory, is not known by Gatsby, it needs to keep its own state about its world to know when to add and remove pages.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#createResolvers\"><code>createResolvers</code></a></p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/schema/schema.js#L985-L990\">Source</a></p>\n<p>Add custom field resolvers to the GraphQL schema.</p>\n<p>Allows adding new fields to types by providing field configs, or adding resolver functions to existing fields.</p>\n<p>Things to note:</p>\n<ul>\n<li>Overriding field types is disallowed, instead use the <code>createTypes</code> action. In case of types added from third-party schemas, where this is not possible, overriding field types is allowed.</li>\n<li>New fields will not be available on <code>filter</code> and <code>sort</code> input types. Extend types defined with <code>createTypes</code> if you need this.</li>\n<li>In field configs, types can be referenced as strings.</li>\n<li>When extending a field with an existing field resolver, the original resolver function is available from <code>info.originalResolver</code>.</li>\n<li>The <code>createResolvers</code> API is called as the last step in schema generation. Thus, an intermediate schema is made available on the <code>intermediateSchema</code> property. In resolver functions themselves, it is recommended to access the final built schema from <code>info.schema</code>.</li>\n<li>Gatsby's data layer, including all internal query capabilities, is exposed on <a href=\"https://www.gatsbyjs.com/docs/node-model/\"><code>context.nodeModel</code></a>. The node store can be queried directly with <code>getAllNodes</code>, <code>getNodeById</code> and <code>getNodesByIds</code>, while more advanced queries can be composed with <code>runQuery</code>. Note that <code>runQuery</code> will call field resolvers before querying, so e.g. foreign-key fields will be expanded to full nodes. The other methods on <code>nodeModel</code> don't do this.</li>\n<li>It is possible to add fields to the root <code>Query</code> type.</li>\n<li>When using the first resolver argument (<code>source</code> in the example below, often also called <code>parent</code> or <code>root</code>), take care of the fact that field resolvers can be called more than once in a query, e.g. when the field is present both in the input filter and in the selection set. This means that foreign-key fields on <code>source</code> can be either resolved or not-resolved.</li>\n</ul>\n<p>For fuller examples, see <a href=\"https://github.com/gatsbyjs/gatsby/tree/master/examples/using-type-definitions\"><code>using-type-definitions</code></a>.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`intermediateSchema` GraphQLSchema\n\nCurrent GraphQL schema\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`createResolvers` function\n\nAdd custom resolvers to GraphQL field configs\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>$1</code> object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`resolvers` object\n\nAn object map of GraphQL type names to custom resolver functions\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`options` object\n\nOptional createResolvers options\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>    `ignoreNonexistentTypes` object\n\n    Silences the warning when trying to add resolvers for types that don't exist. Useful for optional extensions.\n</code></pre>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.createResolvers = ({ createResolvers }) => {\n\n    const resolvers = {\n\n        Author: {\n\n            fullName: {\n\n                resolve: (source, args, context, info) => {\n\n                    return source.firstName + source.lastName;\n\n                }\n\n            }\n\n        },\n\n        Query: {\n\n            allRecentPosts: {\n\n                type: [`BlogPost`],\n\n                resolve: (source, args, context, info) => {\n\n                    const posts = context.nodeModel.getAllNodes({ type: `BlogPost` });\n\n                    const recentPosts = posts.filter((post) => post.publishedAt > Date.UTC(2018, 0, 1));\n\n                    return recentPosts;\n\n                }\n\n            }\n\n        }\n\n    };\n\n    createResolvers(resolvers);\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#createSchemaCustomization\"><code>createSchemaCustomization</code></a></p>\n<p>Customize Gatsby's GraphQL schema by creating type definitions, field extensions or adding third-party schemas.</p>\n<p>The <a href=\"https://www.gatsbyjs.com/docs/actions/#createTypes\"><code>createTypes</code></a>, <a href=\"https://www.gatsbyjs.com/docs/actions/#createFieldExtension\"><code>createFieldExtension</code></a> and <a href=\"https://www.gatsbyjs.com/docs/actions/#addThirdPartySchema\"><code>addThirdPartySchema</code></a> actions are only available in this API. For details on their usage please refer to the actions documentation.</p>\n<p>This API runs immediately before schema generation. For modifications of the generated schema, e.g. to customize added third-party types, use the <a href=\"https://www.gatsbyjs.com/docs/node-apis/#createResolvers\"><code>createResolvers</code></a> API.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`actions` object\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>    `createTypes` object\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>    `createFieldExtension` object\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>    `addThirdPartySchema` object\n</code></pre>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.createSchemaCustomization = ({ actions }) => {\n\n    const { createTypes, createFieldExtension } = actions;\n\n\n\n    createFieldExtension({\n\n        name: 'shout',\n\n        extend: () => ({\n\n            resolve(source, args, context, info) {\n\n                return String(source[info.fieldName]).toUpperCase();\n\n            }\n\n        })\n\n    });\n\n\n\n    const typeDefs = `\n\n    type MarkdownRemark implements Node @dontInfer {\n\n      frontmatter: Frontmatter\n\n    }\n\n    type Frontmatter {\n\n      title: String!\n\n      tagline: String @shout\n\n      date: Date @dateformat\n\n      image: File @fileByRelativePath\n\n    }\n\n  `;\n\n    createTypes(typeDefs);\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onCreateBabelConfig\"><code>onCreateBabelConfig</code></a></p>\n<p>Let plugins extend/mutate the site's Babel configuration by calling <a href=\"https://www.gatsbyjs.com/docs/actions/#setBabelPlugin\"><code>setBabelPlugin</code></a> or <a href=\"https://www.gatsbyjs.com/docs/actions/#setBabelPreset\"><code>setBabelPreset</code></a>.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`stage` string\n\nThe current build stage. One of 'develop', 'develop-html', 'build-javascript', or 'build-html'\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`actions` object\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>options</code> object</p>\n<p>The Babel configuration</p>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.onCreateBabelConfig = ({ actions }) => {\n\n    actions.setBabelPlugin({\n\n        name: `babel-plugin-that-i-like`,\n\n        options: {}\n\n    });\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onCreateDevServer\"><code>onCreateDevServer</code></a></p>\n<p>Run when the <code>gatsby develop</code> server is started. It can be used for adding proxies and Express middleware to the server.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`app` Express\n\nThe [Express app](https://expressjs.com/en/4x/api.html#app) used to run the dev server\n</code></pre>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.onCreateDevServer = ({ app }) => {\n\n    app.get('/hello', function (req, res) {\n\n        res.send('hello world');\n\n    });\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onCreateNode\"><code>onCreateNode</code></a></p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/redux/actions/public.js#L907-L912\">Source</a></p>\n<p>Called when a new node is created. Plugins wishing to extend or transform nodes created by other plugins should implement this API.</p>\n<p>See also the documentation for <a href=\"https://www.gatsbyjs.com/docs/actions/#createNode\"><code>createNode</code></a> and <a href=\"https://www.gatsbyjs.com/docs/actions/#createNodeField\"><code>createNodeField</code></a></p>\n<p>The <a href=\"https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/creating-a-source-plugin/\">Creating a Source Plugin</a> tutorial demonstrates a way a plugin or site might use this API.</p>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.onCreateNode = ({ node, actions }) => {\n\n    const { createNode, createNodeField } = actions;\n\n    // Transform the new node here and create a new node or\n\n    // create a new node field.\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onCreatePage\"><code>onCreatePage</code></a></p>\n<p>Called when a new page is created. This extension API is useful for programmatically manipulating pages created by other plugins e.g. if you want paths without trailing slashes.</p>\n<p>There is a mechanism in Gatsby to prevent calling onCreatePage for pages created by the same gatsby-node.js to avoid infinite loops/callback.</p>\n<p>See the guide <a href=\"https://www.gatsbyjs.com/docs/creating-and-modifying-pages/\">Creating and Modifying Pages</a> for more on this API.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onCreateWebpackConfig\"><code>onCreateWebpackConfig</code></a></p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/webpack.config.js#L886-L894\">Source</a></p>\n<p>Let plugins extend/mutate the site's webpack configuration.</p>\n<p>See also the documentation for <a href=\"https://www.gatsbyjs.com/docs/actions/#setWebpackConfig\"><code>setWebpackConfig</code></a>.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`stage` string\n\nThe current build stage. One of 'develop', 'develop-html', 'build-javascript', or 'build-html'\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`getConfig` function\n\nReturns the current webpack config\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`rules` object\n\nA set of preconfigured webpack config rules\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`loaders` object\n\nA set of preconfigured webpack config loaders\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`plugins` object\n\nA set of preconfigured webpack config plugins\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`actions` object\n</code></pre>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.onCreateWebpackConfig = ({ stage, getConfig, rules, loaders, actions }) => {\n\n    actions.setWebpackConfig({\n\n        module: {\n\n            rules: [\n\n                {\n\n                    test: 'my-css',\n\n                    use: [loaders.style(), loaders.css()]\n\n                }\n\n            ]\n\n        }\n\n    });\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPluginInit\"><code>onPluginInit</code></a></p>\n<p>Lifecycle executed in each process (one time per process). Used to store actions etc for later use.</p>\n<h4>Example</h4>\n<pre><code class=\"language-js\">let createJobV2;\n\nexports.onPluginInit = ({ actions }) => {\n\n    // store job creation action to use it later\n\n    createJobV2 = actions.createJobV2;\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPostBootstrap\"><code>onPostBootstrap</code></a></p>\n<p>Called at the end of the bootstrap process after all other extension APIs have been called.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPostBuild\"><code>onPostBuild</code></a></p>\n<p>The last extension point called after all other parts of the build process are complete.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPreBootstrap\"><code>onPreBootstrap</code></a></p>\n<p>Called once Gatsby has initialized itself and is ready to bootstrap your site.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPreBuild\"><code>onPreBuild</code></a></p>\n<p>The first extension point called during the build process. Called after the bootstrap has completed but before the build steps start.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPreExtractQueries\"><code>onPreExtractQueries</code></a></p>\n<p>Run before GraphQL queries/fragments are extracted from JavaScript files. Useful for plugins to add more JavaScript files with queries/fragments e.g. from node_modules.</p>\n<p>See gatsby-transformer-sharp and gatsby-source-contentful for examples.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#onPreInit\"><code>onPreInit</code></a></p>\n<p>The first API called during Gatsby execution, runs as soon as plugins are loaded, before cache initialization and bootstrap preparation.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#pluginOptionsSchema\"><code>pluginOptionsSchema</code></a></p>\n<p>Run during the bootstrap phase. Plugins can use this to define a schema for their options using <a href=\"https://joi.dev/\">Joi</a> to validate the options users pass to the plugin.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`Joi` Joi\n\nThe instance of [Joi](https://joi.dev/) to define the schema\n</code></pre>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.pluginOptionsSchema = ({ Joi }) => {\n\n    return Joi.object({\n\n        // Validate that the anonymize option is defined by the user and is a boolean\n\n        anonymize: Joi.boolean().required()\n\n    });\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#preprocessSource\"><code>preprocessSource</code></a></p>\n<p>Ask compile-to-js plugins to process source to JavaScript so the query runner can extract out GraphQL queries for running.</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#resolvableExtensions\"><code>resolvableExtensions</code></a></p>\n<p>Lets plugins implementing support for other compile-to-js add to the list of \"resolvable\" file extensions. Gatsby supports <code>.js</code> and <code>.jsx</code> by default.</p>\n<h4>Return value</h4>\n<h5></h5>\n<p>string[]</p>\n<p>array of extensions</p>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#setFieldsOnGraphQLNodeType\"><code>setFieldsOnGraphQLNodeType</code></a></p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/schema/schema.js#L767-L777\">Source</a></p>\n<p>Called during the creation of the GraphQL schema. Allows plugins to add new fields to the types created from data nodes. It will be called separately for each type.</p>\n<p>This function should return an object in the shape of <a href=\"https://graphql.org/graphql-js/type/#graphqlobjecttype\">GraphQLFieldConfigMap</a> which will be appended to fields inferred by Gatsby from data nodes.</p>\n<p><em>Note:</em> Import GraphQL types from <code>gatsby/graphql</code> and don't add the <code>graphql</code> package to your project/plugin dependencies to avoid <code>Schema must contain unique named types but contains multiple types named</code> errors. <code>gatsby/graphql</code> exports all builtin GraphQL types as well as the <code>GraphQLJSON</code> type.</p>\n<p>Many transformer plugins use this to add fields that take arguments.</p>\n<ul>\n<li><a href=\"https://www.gatsbyjs.com/plugins/gatsby-transformer-remark/\"><code>gatsby-transformer-remark</code></a> adds an \"excerpt\" field where the user when writing their query can specify how many characters to prune the markdown source to.</li>\n<li><a href=\"https://www.gatsbyjs.com/plugins/gatsby-transformer-sharp/\"><code>gatsby-transformer-sharp</code></a> exposes many image transformation options as GraphQL fields.</li>\n</ul>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`type` object\n\nObject containing `name` and `nodes`\n</code></pre>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code class=\"language-js\">import { GraphQLString } from 'gatsby/graphql';\n\n\n\nexports.setFieldsOnGraphQLNodeType = ({ type }) => {\n\n    if (type.name === `File`) {\n\n        return {\n\n            newField: {\n\n                type: GraphQLString,\n\n                args: {\n\n                    myArgument: {\n\n                        type: GraphQLString\n\n                    }\n\n                },\n\n                resolve: (source, fieldArgs) => {\n\n                    return `Id of this node is ${source.id}.\n\n                  Field was called with argument: ${fieldArgs.myArgument}`;\n\n                }\n\n            }\n\n        };\n\n    }\n\n\n\n    // by default return empty object\n\n    return {};\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#sourceNodes\"><code>sourceNodes</code></a></p>\n<p>Extension point to tell plugins to source nodes. This API is called during the Gatsby bootstrap sequence. Source plugins use this hook to create nodes. This API is called exactly once per plugin (and once for your site's <code>gatsby-config.js</code> file). If you define this hook in <code>gatsby-node.js</code> it will be called exactly once after all of your source plugins have finished creating nodes.</p>\n<p>The <a href=\"https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/creating-a-source-plugin/\">Creating a Source Plugin</a> tutorial demonstrates a way a plugin or site might use this API.</p>\n<p>See also the documentation for <a href=\"https://www.gatsbyjs.com/docs/actions/#createNode\"><code>createNode</code></a>.</p>\n<h4>Example</h4>\n<pre><code class=\"language-js\">exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {\n\n    const { createNode } = actions;\n\n\n\n    // Data can come from anywhere, but for now create it manually\n\n    const myData = {\n\n        key: 123,\n\n        foo: `The foo field of my node`,\n\n        bar: `Baz`\n\n    };\n\n\n\n    const nodeContent = JSON.stringify(myData);\n\n\n\n    const nodeMeta = {\n\n        id: createNodeId(`my-data-${myData.key}`),\n\n        parent: null,\n\n        children: [],\n\n        internal: {\n\n            type: `MyNodeType`,\n\n            mediaType: `text/html`,\n\n            content: nodeContent,\n\n            contentDigest: createContentDigest(myData)\n\n        }\n\n    };\n\n\n\n    const node = Object.assign({}, myData, nodeMeta);\n\n    createNode(node);\n\n};\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/#unstable_shouldOnCreateNode\"><code>unstable_shouldOnCreateNode</code></a></p>\n<h2>Called before scheduling a <code>onCreateNode</code> callback for a plugin. If it returns falsy then Gatsby will not schedule the <code>onCreateNode</code> callback for this node for this plugin. Note: this API does not receive the regular <code>api</code> that other callbacks get as first arg</h2>\n<h2>Gatsby-ssr</h2>\n<pre><code class=\"language-js\">/**\n\n * Implement Gatsby's SSR (Server Side Rendering) APIs in this file.\n\n *\n\n * See: https://www.gatsbyjs.org/docs/ssr-apis/\n\n */\n\n\n\nconst React = require('react');\n\nconst withPrefix = require('./src/utils/withPrefix').default;\n\n\n\nexports.onRenderBody = function ({ setHeadComponents, setPostBodyComponents }) {\n\n    setHeadComponents([]);\n\n\n\n    setPostBodyComponents([\n\n        &#x3C;React.Fragment>\n\n            &#x3C;script src={withPrefix('js/plugins.js')} />\n\n            &#x3C;script src={withPrefix('js/main.js')} />\n\n            &#x3C;script src={withPrefix('js/page-load.js')} />\n\n            &#x3C;script src={withPrefix('js/page-unload.js')} />\n\n        &#x3C;/React.Fragment>\n\n    ]);\n\n};\n</code></pre>\n<h1>Gatsby Server Rendering APIs</h1>\n<p>The file <code>gatsby-ssr.js</code> lets you alter the content of static HTML files as they are being Server-Side Rendered (SSR) by Gatsby and Node.js. To use the <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/\">Gatsby SSR APIs</a>, create a file called <code>gatsby-ssr.js</code> in the root of your site. Export any of the APIs you wish to use in this file.</p>\n<p>The APIs <code>wrapPageElement</code> and <code>wrapRootElement</code> exist in both the SSR and <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser\">browser APIs</a>. You generally should implement the same components in both <code>gatsby-ssr.js</code> and <code>gatsby-browser.js</code> so that pages generated through SSR with Node.js are the same after being <a href=\"https://www.gatsbyjs.com/docs/glossary#hydration\">hydrated</a> in the browser.</p>\n<p>gatsby-ssr.js</p>\n<p>Copygatsby-ssr.js: copy code to clipboard`</p>\n<p>const React = require(\"react\")</p>\n<p>const Layout = require(\"./src/components/layout\")</p>\n<p>// Adds a class name to the body element</p>\n<p>exports.onRenderBody = ({ setBodyAttributes }, pluginOptions) => {</p>\n<p>setBodyAttributes({</p>\n<p>className: \"my-body-class\",</p>\n<p>})</p>\n<p>}</p>\n<p>// Wraps every page in a component</p>\n<p>exports.wrapPageElement = ({ element, props }) => {</p>\n<p>return &#x3C;Layout {...props}>{element}</Layout></p>\n<p>}</p>\n<p>`</p>\n<h2><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#usage\"></a>Usage</h2>\n<p>Implement any of these APIs by exporting them from a file named <code>gatsby-ssr.js</code> in the root of your project.</p>\n<h2>APIs</h2>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#onPreRenderHTML\"><code>onPreRenderHTML</code></a> Function</p>\n<p>Source</p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/develop-static-entry.js#L93-L101\">1</a><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/ssr-develop-static-entry.js#L317-L325\">2</a></p>\n<p>(apiCallbackContext: object, pluginOptions: pluginOptions) => undefined</p>\n<p>Called after every page Gatsby server renders while building HTML so you can replace head components to be rendered in your <code>html.js</code>. This is useful if you need to reorder scripts or styles added by other plugins.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`pathname` string\n\nThe pathname of the page currently being rendered.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`getHeadComponents` ReactNode[]\n\nReturns the current `headComponents` array.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`replaceHeadComponents` function\n\nTakes an array of components as its first argument which replace the `headComponents` array which is passed to the `html.js` component. **WARNING** if multiple plugins implement this API it's the last plugin that \"wins\".\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`getPreBodyComponents` ReactNode[]\n\nReturns the current `preBodyComponents` array.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`replacePreBodyComponents` function\n\nTakes an array of components as its first argument which replace the `preBodyComponents` array which is passed to the `html.js` component. **WARNING** if multiple plugins implement this API it's the last plugin that \"wins\".\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`getPostBodyComponents` ReactNode[]\n\nReturns the current `postBodyComponents` array.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`replacePostBodyComponents` function\n\nTakes an array of components as its first argument which replace the `postBodyComponents` array which is passed to the `html.js` component. **WARNING** if multiple plugins implement this API it's the last plugin that \"wins\".\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>pluginOptions</code> object</p>\n<p>Object containing options defined in <code>gatsby-config.js</code></p>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code>// Move Typography.js styles to the top of the head section so they're loaded first.\n\nexports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => {\n\n  const headComponents = getHeadComponents()\n\n  headComponents.sort((x, y) => {\n\n    if (x.key === 'TypographyStyle') {\n\n      return -1\n\n    } else if (y.key === 'TypographyStyle') {\n\n      return 1\n\n    }\n\n    return 0\n\n  })\n\n  replaceHeadComponents(headComponents)\n\n}\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#onRenderBody\"><code>onRenderBody</code></a> Function</p>\n<p>Source</p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/develop-static-entry.js#L83-L91\">1</a><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/ssr-develop-static-entry.js#L307-L315\">2</a></p>\n<p>(apiCallbackContext: object, pluginOptions: pluginOptions) => undefined</p>\n<p>Called after every page Gatsby server renders while building HTML so you can set head and body components to be rendered in your <code>html.js</code>.</p>\n<p>Gatsby does a two-pass render for HTML. It loops through your pages first rendering only the body and then takes the result body HTML string and passes it as the <code>body</code> prop to your <code>html.js</code> to complete the render.</p>\n<p>It's often handy to be able to send custom components to your <code>html.js</code>. For example, it's a very common pattern for React.js libraries that support server rendering to pull out data generated during the render to add to your HTML.</p>\n<p>Using this API over <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#replaceRenderer\"><code>replaceRenderer</code></a> is preferable as multiple plugins can implement this API where only one plugin can take over server rendering. However, if your plugin requires taking over server rendering then that's the one to use</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`pathname` string\n\nThe pathname of the page currently being rendered.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setHeadComponents` function\n\nTakes an array of components as its first argument which are added to the `headComponents` array which is passed to the `html.js` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setHtmlAttributes` function\n\nTakes an object of props which will spread into the `&#x3C;html>` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setBodyAttributes` function\n\nTakes an object of props which will spread into the `&#x3C;body>` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setPreBodyComponents` function\n\nTakes an array of components as its first argument which are added to the `preBodyComponents` array which is passed to the `html.js` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setPostBodyComponents` function\n\nTakes an array of components as its first argument which are added to the `postBodyComponents` array which is passed to the `html.js` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setBodyProps` function\n\nTakes an object of data which is merged with other body props and passed to `html.js` as `bodyProps`.\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>pluginOptions</code> object</p>\n<p>Object containing options defined in <code>gatsby-config.js</code></p>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code>// Import React so that you can use JSX in HeadComponents\n\nconst React = require(\"react\")\n\n\n\nconst HtmlAttributes = {\n\n  lang: \"en\"\n\n}\n\n\n\nconst HeadComponents = [\n\n  &#x3C;script key=\"my-script\" src=\"https://gatsby.dev/my-script\" />\n\n]\n\n\n\nconst BodyAttributes = {\n\n  \"data-theme\": \"dark\"\n\n}\n\n\n\nexports.onRenderBody = ({\n\n  setHeadComponents,\n\n  setHtmlAttributes,\n\n  setBodyAttributes\n\n}, pluginOptions) => {\n\n  setHtmlAttributes(HtmlAttributes)\n\n  setHeadComponents(HeadComponents)\n\n  setBodyAttributes(BodyAttributes)\n\n}\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#replaceRenderer\"><code>replaceRenderer</code></a> Function</p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/ssr-develop-static-entry.js#L284-L295\">Source</a></p>\n<p>(apiCallbackContext: object, pluginOptions: pluginOptions) => undefined</p>\n<p>Replace the default server renderer. This is useful for integration with Redux, css-in-js libraries, etc. that need custom setups for server rendering.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`pathname` string\n\nThe pathname of the page currently being rendered.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`bodyComponent` ReactNode\n\nThe React element to be rendered as the page body\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`replaceBodyHTMLString` function\n\nCall this with the HTML string you render. **WARNING** if multiple plugins implement this API it's the last plugin that \"wins\". TODO implement an automated warning against this.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setHeadComponents` function\n\nTakes an array of components as its first argument which are added to the `headComponents` array which is passed to the `html.js` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setHtmlAttributes` function\n\nTakes an object of props which will spread into the `&#x3C;html>` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setBodyAttributes` function\n\nTakes an object of props which will spread into the `&#x3C;body>` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setPreBodyComponents` function\n\nTakes an array of components as its first argument which are added to the `preBodyComponents` array which is passed to the `html.js` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setPostBodyComponents` function\n\nTakes an array of components as its first argument which are added to the `postBodyComponents` array which is passed to the `html.js` component.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`setBodyProps` function\n\nTakes an object of data which is merged with other body props and passed to `html.js` as `bodyProps`.\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>pluginOptions</code> object</p>\n<p>Object containing options defined in <code>gatsby-config.js</code></p>\n</li>\n</ul>\n<h4>Example</h4>\n<pre><code>// From gatsby-plugin-glamor\n\nconst { renderToString } = require(\"react-dom/server\")\n\nconst inline = require(\"glamor-inline\")\n\n\n\nexports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => {\n\n  const bodyHTML = renderToString(bodyComponent)\n\n  const inlinedHTML = inline(bodyHTML)\n\n\n\n  replaceBodyHTMLString(inlinedHTML)\n\n}\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#wrapPageElement\"><code>wrapPageElement</code></a> Function</p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/ssr-develop-static-entry.js#L252-L259\">Source</a></p>\n<p>(apiCallbackContext: object, pluginOptions: pluginOptions) => ReactNode</p>\n<p>Allow a plugin to wrap the page element.</p>\n<p>This is useful for setting wrapper components around pages that won't get unmounted on page changes. For setting Provider components, use <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#wrapRootElement\">wrapRootElement</a>.</p>\n<p><em>Note:</em> There is an equivalent hook in Gatsby's <a href=\"https://www.gatsbyjs.com/docs/browser-apis/#wrapPageElement\">Browser API</a>. It is recommended to use both APIs together. For example usage, check out <a href=\"https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n\">Using i18n</a>.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`element` ReactNode\n\nThe \"Page\" React Element built by Gatsby.\n</code></pre>\n</li>\n<li>\n<h6></h6>\n<pre><code>`props` object\n\nProps object used by page.\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>pluginOptions</code> object</p>\n<p>Object containing options defined in <code>gatsby-config.js</code></p>\n</li>\n</ul>\n<h4>Return value</h4>\n<h5></h5>\n<p>ReactNode</p>\n<p>Wrapped element</p>\n<h4>Example</h4>\n<pre><code>const React = require(\"react\")\n\nconst Layout = require(\"./src/components/layout\").default\n\n\n\nexports.wrapPageElement = ({ element, props }) => {\n\n  // props provide same data to Layout as Page element will get\n\n  // including location, data, etc - you don't need to pass it\n\n  return &#x3C;Layout {...props}>{element}&#x3C;/Layout>\n\n}\n</code></pre>\n<hr>\n<h3></h3>\n<p><a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#wrapRootElement\"><code>wrapRootElement</code></a> Function</p>\n<p><a href=\"https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/ssr-develop-static-entry.js#L274-L281\">Source</a></p>\n<p>(apiCallbackContext: object, pluginOptions: pluginOptions) => ReactNode</p>\n<p>Allow a plugin to wrap the root element.</p>\n<p>This is useful to set up any Provider components that will wrap your application. For setting persistent UI elements around pages use <a href=\"https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#wrapPageElement\">wrapPageElement</a>.</p>\n<p><em>Note:</em> There is an equivalent hook in Gatsby's <a href=\"https://www.gatsbyjs.com/docs/browser-apis/#wrapRootElement\">Browser API</a>. It is recommended to use both APIs together. For example usage, check out <a href=\"https://github.com/gatsbyjs/gatsby/tree/master/examples/using-redux\">Using redux</a>.</p>\n<h4>Parameters</h4>\n<ul>\n<li>\n<h5></h5>\n<p>destructured object</p>\n</li>\n<li>\n<h6></h6>\n<pre><code>`element` ReactNode\n\nThe \"Root\" React Element built by Gatsby.\n</code></pre>\n</li>\n<li>\n<h5></h5>\n<p><code>pluginOptions</code> object</p>\n<p>Object containing options defined in <code>gatsby-config.js</code></p>\n</li>\n</ul>\n<h4>Return value</h4>\n<h5></h5>\n<p>ReactNode</p>\n<p>Wrapped element</p>\n<h4>Example</h4>\n<pre><code>const React = require(\"react\")\n\nconst { Provider } = require(\"react-redux\")\n\n\n\nconst createStore = require(\"./src/state/createStore\")\n\nconst store = createStore()\n\n\n\nexports.wrapRootElement = ({ element }) => {\n\n  return (\n\n    &#x3C;Provider store={store}>\n\n      {element}\n\n    &#x3C;/Provider>\n\n  )\n\n}\n</code></pre>\n<hr>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>\n<h3></h3>\n<pre><code class=\"language-js\"></code></pre>"},{"url":"/docs/docs/glossary/","relativePath":"docs/docs/glossary.md","relativeDir":"docs/docs","base":"glossary.md","name":"glossary","frontmatter":{"title":"lorem-ipsum","weight":0,"excerpt":"lorem-ipsum","seo":{"title":"","description":"","robots":[],"extra":[]},"template":"docs"},"html":"<hr>\n<h2>Term:  '404'</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP Errors</li>\n<li>Infrastructure</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p>A 404 is a Standard Response Code meaning that the <em>Glossary(\"Server\", \"server\"</em>) cannot find the requested resource.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Status\">list of HTTP response codes</a></li>\n<li><a href=\"/en-US/docs/Learn/Common_questions/Checking_that_your_web_site_is_working_properly\">advice for beginners on avoiding 404 errors</a></li>\n</ul>\n<hr>\n<h2>Term:  '502'</h2>\n<ul>\n<li>'502'</li>\n<li>Bad Gateway</li>\n<li>Glossary</li>\n<li>HTTP Errors</li>\n<li>Infrastructure</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <em>Glossary(\"HTTP\"</em>) error code meaning \"Bad Gateway\".</p>\n</blockquote>\n<p>A <em>Glossary(\"Server\", \"server\"</em>) can act as a gateway or proxy (go-between) between a client (like your Web browser) and another, upstream server. When you request to access a <em>Glossary(\"URL\"</em>), the gateway server can relay your request to the upstream server. \"502\" means that the upstream server has returned an invalid response.</p>\n<p>Normally the upstream server is not down (i.e. furnishes no response to the gateway/proxy), but does not understand the same data-exchange protocol as the gateway/proxy. Internet <em>Glossary(\"Protocol\", \"protocols\"</em>) are quite explicit, and so a 502 usually means that one or both machines were incorrectly or incompletely programmed.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Status\">list of HTTP response codes</a></li>\n</ul>\n<hr>\n<h2>Term:  Abstraction</h2>\n<ul>\n<li>Abstraction</li>\n<li>Coding</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Programming Language</h2>\n</li>\n</ul>\n<blockquote>\n<p>Abstraction in <em>Glossary(\"computer programming\"</em>) is a way to reduce complexity and allow efficient design and implementation in complex software systems. It hides the technical complexity of systems behind simpler <em>Glossary(\"API\", \"APIs\"</em>).</p>\n</blockquote>\n<h2>Advantages of Data Abstraction</h2>\n<ul>\n<li>Helps the user to avoid writing low level code.</li>\n<li>Avoids code duplication and increases reusability.</li>\n<li>Can change internal implementation of class independently without affecting the user.</li>\n<li>Helps to increase security of an application or program as only important details are provided to the user.</li>\n</ul>\n<h2>Example</h2>\n<pre><code class=\"language-js\">class ImplementAbstraction {\n  // method to set values of internal members\n  set(x, y) {\n    this.a = x;\n    this.b = y;\n  }\n\n  display() {\n    console.log('a = ' + this.a);\n    console.log('b = ' + this.b);\n  }\n}\n\nconst obj = new ImplementAbstraction();\nobj.set(10, 20);\nobj.display();\n// a = 10\n// b = 20\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Abstraction (computer science)\", \"Abstraction\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  accent</h2>\n<ul>\n<li>Glossary</li>\n<li>Input</li>\n<li>\n<h2>accent</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>accent</strong> is a typically bright color that contrasts with the more utilitarian background and foreground colors within a color scheme. These are present in the visual style of many platforms (though not all).</p>\n</blockquote>\n<p>On the web, an accent is sometimes used in <em>HTMLElement(\"input\"</em>) elements for the active portion of the control, for instance the background of a checked <a href=\"/en-US/docs/Web/HTML/Element/input/checkbox\">checkbox</a>.</p>\n<h4>See also</h4>\n<h3>CSS related to the accent</h3>\n<p>You can set the color of the accent for a given element by setting the element's CSS <em>cssxref(\"accent-color\"</em>) property to the appropriate <em>cssxref(\"&#x3C;color>\"</em>) value.</p>\n<hr>\n<h2>Term:  Accessibility tree</h2>\n<ul>\n<li>AOM</li>\n<li>Accessibility</li>\n<li>DOM</li>\n<li>Glossary</li>\n<li>\n<h2>Reference</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>accessibility tree</strong> contains <em>Glossary(\"accessibility\"</em>)-related information for most HTML elements.</p>\n</blockquote>\n<p>Browsers convert markup into an internal representation called the <em>[DOM tree](/en-US/docs/Web/API/Document</em>object<em>model/How</em>to<em>create</em>a<em>DOM</em>tree)_. The DOM tree contains objects representing all the markup’s elements, attributes, and text nodes. Browsers then create an accessibility tree based on the DOM tree, which is used by platform-specific Accessibility APIs to provide a representation that can be understood by assistive technologies, such as screen readers.</p>\n<p>There are four things in an accessibility tree object:</p>\n<ul>\n<li>\n<p><strong>name</strong></p>\n<ul>\n<li>: How can we refer to this thing? For instance, a link with the text \"Read more\" will have \"Read more\" as its name (find more on how names are computed in the <a href=\"https://www.w3.org/TR/accname-1.1/\">Accessible Name and Description Computation spec</a>).</li>\n</ul>\n</li>\n<li>\n<p><strong>description</strong></p>\n<ul>\n<li>: How do we describe this thing, if we want to provide more description beyond the name? The description of a table could explain what kind of information the table contains.</li>\n</ul>\n</li>\n<li>\n<p><strong>role</strong></p>\n<ul>\n<li>: What kind of thing is it? For example, is it a button, a nav bar, or a list of items?</li>\n</ul>\n</li>\n<li>\n<p><strong>state</strong></p>\n<ul>\n<li>: Does it have a state? Examples include checked or unchecked for checkboxes, and collapsed or expanded for the <a href=\"/en-US/docs/Web/HTML/Element/summary\"><code>&#x3C;summary></code></a> element.</li>\n</ul>\n</li>\n</ul>\n<p>Additionally, the accessibility tree often contains information on what can be done with an element: a link can be <em>followed</em>, a text input can be <em>typed into</em>, etc.</p>\n<p>While still in draft form within the Web Incubator Community Group, the <strong><a href=\"https://wicg.github.io/aom/explainer.html\">Accessibility Object Model</a> (AOM)</strong> intends to incubate APIs that make it easier to express accessibility semantics and potentially allow read access to the computed accessibility tree.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Accessibility\"</em>)</li>\n<li><em>Glossary(\"ARIA\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Accessibility</h2>\n<ul>\n<li>Accessibility</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Web Accessibility</em> (<strong>A11Y</strong>) refers to best practices for keeping a website usable despite physical and technical restrictions. Web accessibility is formally defined and discussed at the <em>Glossary(\"W3C\"</em>) through the <em>Glossary(\"WAI\",\"Web Accessibility Initiative\"</em>) (WAI).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Accessibility\">Accessibility resources at MDN</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Web accessibility\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/Accessibility\">Learn accessibility on MDN</a></li>\n<li><a href=\"https://webaim.org/\">Web Accessibility In Mind</a></li>\n<li><a href=\"/en-US/docs/Web/Accessibility/ARIA\">The ARIA documentation on MDN</a></li>\n<li><a href=\"https://www.w3.org/WAI/\">The Web Accessibility Initiative homepage</a></li>\n<li><a href=\"https://www.w3.org/TR/wai-aria/\">The WAI-ARIA recommendation</a></li>\n</ul>\n<hr>\n<h2>Term:  Adobe Flash</h2>\n<hr>\n<blockquote>\n<p>Flash is an obsolete technology developed by Adobe for viewing expressive web applications, multimedia content, and streaming media.</p>\n</blockquote>\n<p>As of 2021, Flash is no longer supported by Adobe or any major web browsers.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://blog.adobe.com/en/publish/2017/07/25/adobe-flash-update#gs.g8mmgf\">Adobe Flash end-of-life announcement</a></li>\n<li><a href=\"https://www.blog.google/products/chrome/saying-goodbye-flash-chrome/\">Saying goodbye to Flash in Chrome</a></li>\n<li><a href=\"https://blog.mozilla.org/futurereleases/2017/07/25/firefox-roadmap-flash-end-life/\">Firefox Roadmap for Flash End-of-Life</a></li>\n<li><a href=\"https://blogs.windows.com/msedgedev/2020/09/04/update-adobe-flash-end-support/\">Microsoft Windows Flash Player removal</a></li>\n</ul>\n<hr>\n<h2>Term:  Advance measure</h2>\n<ul>\n<li>Accessibility</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>advance measure</strong> of a glyph is its <em>advance width</em> or <em>advance height</em>, whichever is in the inline axis of the element.</p>\n</blockquote>\n<p>This term is used in the definition of a number of CSS <em>cssxref(\"&#x3C;length>\"</em>) units.\nFor example, <code>ch</code> is the <em>advance measure</em> of the \"0\" character in the given typeface.\nFor a horizontal inline axis, this will be the width of the character.</p>\n<h4>See also</h4>\n<ul>\n<li><em>cssxref(\"&#x3C;length>\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Ajax</h2>\n<ul>\n<li>AJAX</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Ajax</strong>, which initially stood for Asynchronous <em>Glossary(\"JavaScript\"</em>) And <em>Glossary(\"XML\"</em>), is a programming practice of building complex, dynamic webpages using a technology known as <em>Glossary(\"XHR</em>(XMLHttpRequest)\",\"XMLHttpRequest\"_).</p>\n</blockquote>\n<p>Ajax allows you to update parts of the <em>Glossary(\"DOM\"</em>) of an <em>Glossary(\"HTML\"</em>) page without the need for a full page refresh. Ajax also lets you work asynchronously, meaning your code continues to run while the targeted part of your web page is trying to reload (compared to synchronously, which blocks your code from running until that part of your page is done reloading).</p>\n<p>With interactive websites and modern web standards, Ajax is gradually being replaced by functions within JavaScript frameworks and the official <em>domxref(\"Fetch API\"</em>) Standard.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"AJAX\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/Guide/AJAX\">Ajax</a></li>\n<li><a href=\"/en-US/docs/Web/Guide/AJAX/Getting_Started\">Ajax - Getting started</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a>:</p>\n<ul>\n<li><em>Glossary(\"XHR</em>(XMLHttpRequest)\",\"XMLHttpRequest\"_)</li>\n</ul>\n</li>\n<li><em>DOMxRef(\"XMLHttpRequest\"</em>)</li>\n<li><em>DOMxRef(\"Fetch API\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/API/Fetch_API/Using_Fetch\">Using Fetch API</a></li>\n<li><a href=\"https://peoplesofttutorial.com/difference-between-synchronous-and-asynchronous-messaging/\">Synchronous vs. Asynchronous Communications</a></li>\n</ul>\n<hr>\n<h2>Term:  Algorithm</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An algorithm is a self-contained series of instructions to perform a function.</p>\n</blockquote>\n<p>In other words, an algorithm is a means of describing a way to solve a problem so that it can be solved repeatedly, by humans or machines. Computer scientists compare the efficiency of algorithms through the concept of \"Algorithmic Complexity\" or \"Big O\" notation.</p>\n<p>For example:</p>\n<ul>\n<li>A cooking recipe is a simple algorithm for humans.</li>\n<li>A sorting algorithm is often used in computer programming to explain a machine how to sort data.</li>\n</ul>\n<p>Common algorithms are Pathfinding algorithms such as the Traveling Salesman Problem, Tree Traversal algorithms and so on.</p>\n<p>There are also Machine Learning algorithms such as Linear Regression, Logistic Regression, Decision Tree, Random Forest, Support Vector Machine, Recurrent Neural Network (RNN), Long Short Term Memory (LSTM) Neural Network, Convolutional Neural Network (CNN), Deep Convolutional Neural Network and so on.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Algorithm\", \"Algorithm\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.toptal.com/developers/sorting-algorithms\">Explanations of sorting algorithms</a></li>\n<li><a href=\"https://bigocheatsheet.com/\">Explanations of algorithmic complexity</a></li>\n</ul>\n<hr>\n<h2>Term:  Alignment container</h2>\n<ul>\n<li>Alignment container</li>\n<li>CSS</li>\n<li>Glossary</li>\n<li>\n<h2>alignment</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>alignment container</strong> is the rectangle that the <a href=\"/en-US/docs/Glossary/Alignment_Subject\">alignment subject</a> is aligned within. This is defined by the layout mode; it is usually the alignment subject’s containing block, and assumes the writing mode of the box establishing the containing block.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Box_Alignment\">CSS Box Alignment</a></li>\n</ul>\n<hr>\n<h2>Term:  Alignment subject</h2>\n<ul>\n<li>Alignment subject</li>\n<li>CSS</li>\n<li>Glossary</li>\n<li>\n<h2>alignment</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <a href=\"/en-US/docs/Web/CSS/CSS_Box_Alignment\">CSS Box Alignment</a> the <strong>alignment subject</strong> is the thing (or things) being aligned by the property.</p>\n</blockquote>\n<p>For <em>cssxref(\"justify-self\"</em>) and <em>cssxref(\"align-self\"</em>), the alignment subject is the margin box of the box the property is set on, using the writing mode of that box.</p>\n<p>For <em>cssxref(\"justify-content\"</em>) and <em>cssxref(\"align-content\"</em>), the writing mode of the box is also used. The definition of the alignment subject depends on the layout mode being used.</p>\n<ul>\n<li>\n<p>Block containers (including table cells)</p>\n<ul>\n<li>: The entire content of the block as a single unit.</li>\n</ul>\n</li>\n<li>\n<p>Multicol containers</p>\n<ul>\n<li>: The column boxes, with any spacing inserted between column boxes added to the relevant column gaps.</li>\n</ul>\n</li>\n<li>\n<p>Flex containers</p>\n<ul>\n<li>: For <em>cssxref(\"justify-content\"</em>), the flex items in each flex line.\nFor <em>cssxref(\"align-content\"</em>), the flex lines. Note, this only has an effect on multi-line flex containers.</li>\n</ul>\n</li>\n<li>\n<p>Grid containers</p>\n<ul>\n<li>: The grid tracks in the appropriate axis, with any spacing inserted between tracks added to the relevant gutters. Collapsed gutters are treated as a single opportunity for space insertion.</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Box_Alignment\">CSS Box Alignment</a></li>\n</ul>\n<hr>\n<h2>Term:  Alpha (alpha channel)</h2>\n<ul>\n<li>Alpha</li>\n<li>Alpha Channel</li>\n<li>Drawing</li>\n<li>Glossary</li>\n<li>Graphics</li>\n<li>Translucency</li>\n<li>Translucent</li>\n<li>Transparency</li>\n<li>Transparent</li>\n<li>WebGL</li>\n<li>WebXR</li>\n<li>channel</li>\n<li>color</li>\n<li>\n<h2>pixel</h2>\n</li>\n</ul>\n<blockquote>\n<p>Colors are represented in digital form as a collection of numbers, each representing the strength or intensity level of a given component of the color. Each of these components is called a <strong>channel</strong>. In a typical image file, the color channels describe how much red, green, and blue are used to make up the final color. To represent a color through which the background can be seen to some extent, a fourth channel is added to the color: the <strong>alpha channel</strong>. The alpha channel specifies how opaque the color is.</p>\n</blockquote>\n<p>For example, the color <code>#8921F2</code> (also described as <code>rgb(137, 33, 242)</code> or <code>hsl(270, 89%, 54)</code>) is a nice shade of purple. Below you see a small box of that color in the top-left corner and a box of the <em>same</em> color but with an alpha channel set at 0.5 (50% opacity). The two boxes are drawn on top of a paragraph of text.</p>\n<p><img src=\"alpha-channel-example.png\" alt=\"Image showing the effect of an alpha channel on a color.\"></p>\n<p>As you can see, the color without an alpha channel completely blocks the background text, while the box with the alpha channel leaves it visible through the purple background color.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Alpha compositing\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"RGBA color model\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Channel (digital image)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Color\">CSS color</a></li>\n</ul>\n<hr>\n<h2>Term:  ALPN</h2>\n<ul>\n<li>ALPN</li>\n<li>Draft</li>\n<li>Glossary</li>\n<li>NeedsContent</li>\n<li>\n<h2>TLS</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Application-Layer <em>Glossary(\"Protocol\"</em>) Negotiation</strong> (<strong>ALPN</strong>) is a <em>Glossary(\"TLS\"</em>) extension which indicates what application layer protocol is negotiating the encrypted connection without requiring additional round trips.</p>\n</blockquote>\n<table>\n<thead>\n<tr>\n<th>Protocol</th>\n<th>Identification sequence</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><em>Glossary(\"HTTP\"</em>)/1.1</td>\n<td><code>0x68 0x74 0x74 0x70 0x2F 0x31 0x2E 0x31</code> (\"http/1.1\")</td>\n</tr>\n<tr>\n<td><em>Glossary(\"HTTP 2\", \"HTTP/2\"</em>)</td>\n<td><code>0x68 0x32</code> (\"h2\")</td>\n</tr>\n<tr>\n<td>HTTP/2 over cleartext <em>Glossary(\"TCP\"</em>)</td>\n<td><code>0x68 0x32 0x63</code> (\"h2c\")</td>\n</tr>\n</tbody>\n</table>\n<h2>Specifications</h2>\n<table>\n<thead>\n<tr>\n<th>Specification</th>\n<th>Status</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><em>RFC(7301</em>)</td>\n<td>IETF RFC</td>\n<td>Initial definition.</td>\n</tr>\n</tbody>\n</table>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids\">IANA registered ALPN identifiers</a></li>\n</ul>\n<hr>\n<h2>Term:  API</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>An API (Application Programming Interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface. The API can be seen as a simple contract (the interface) between the application offering it and other items, such as third party software or hardware.</p>\n</blockquote>\n<p>In Web development, an API is generally a set of code features (e.g. <em>glossary(\"method\",\"methods\"</em>), <em>Glossary(\"property\",\"properties\"</em>), events, and <em>Glossary(\"URL\",\"URLs\"</em>)) that a developer can use in their apps for interacting with components of a user's web browser, or other software/hardware on the user's computer, or third party websites and services.</p>\n<p>For example:</p>\n<ul>\n<li>The <a href=\"/en-US/docs/Web/API/MediaDevices/getUserMedia\">getUserMedia</a> API can be used to grab audio and video from a user's webcam, which can then be used in any way the developer likes, for example, recording video and audio, broadcasting it to another user in a conference call, or capturing image stills from the video.</li>\n<li>The <a href=\"/en-US/docs/Web/API/Geolocation\">Geolocation API</a> can be used to retrieve location information from whatever service the user has available on their device (e.g. GPS), which can then be used in conjunction with the <a href=\"https://developers.google.com/maps/\">Google Maps APIs</a> to for example plot the user's location on a custom map and show them what tourist attractions are in their area.</li>\n<li>The <a href=\"https://dev.twitter.com/overview/api\">Twitter APIs</a> can be used to retrieve data from a user's twitter accounts, for example, to display their latest tweets on a web page.</li>\n<li>The <a href=\"/en-US/docs/Web/API/Web_Animations_API\">Web Animations API</a> can be used to animate parts of a web page — for example, to make images move around or rotate.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"API\", \"API\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API\">Web API reference</a></li>\n</ul>\n<hr>\n<h2>Term:  Apple Safari</h2>\n<ul>\n<li>Glossary</li>\n<li>Navigation</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><a href=\"https://www.apple.com/safari/\">Safari</a> is a <em>Glossary(\"Browser\",\"Web browser\"</em>) developed by Apple and bundled with both macOS and iOS. It's based on the open source <a href=\"https://webkit.org/\">WebKit</a> engine.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Safari (web browser)\", \"Safari\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.apple.com/safari/\">Safari on apple.com</a></li>\n<li><a href=\"https://webkit.org/\">The WebKit project</a></li>\n<li><a href=\"https://nightly.webkit.org/\">WebKit nightly build</a></li>\n<li><a href=\"https://bugs.webkit.org/\">Reporting a bug for Safari</a></li>\n</ul>\n<hr>\n<h2>Term:  Application Context</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>application context</strong> is a top-level <a href=\"/en-US/docs/Glossary/Browsing_context\">browsing context</a> that has a <a href=\"/en-US/docs/Web/Manifest\">manifest</a> applied to it.</p>\n</blockquote>\n<p>If an application context is created as a result of the user agent being asked to navigate to a deep link, the user agent must immediately navigate to the deep link with replacement enabled. Otherwise, when the application context is created, the user agent must immediately navigate to the start URL with replacement enabled.</p>\n<p>Please note that the start URL is not necessarily the value of the start_url member: the user or user agent could have changed it when the application was added to home-screen or otherwise bookmarked.</p>\n<hr>\n<h2>Term:  Argument</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>argument</strong> is a <em>glossary(\"value\"</em>) (<em>Glossary(\"primitive\"</em>) or <em>Glossary(\"object\"</em>)) passed as input to a <em>Glossary(\"function\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Parameter</em>(computer<em>programming)\", \"Difference between Parameter and Argument\"</em>) on Wikipedia</li>\n<li>The <em>jsxref(\"Functions/arguments\",\"arguments\"</em>) object in <em>glossary(\"JavaScript\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  ARIA</h2>\n<ul>\n<li>Accessibility</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>ARIA</strong> (<em>Accessible Rich _glossary(\"Internet\"</em>) Applications<em>) is a _Glossary(\"W3C\"</em>) specification for adding semantics and other metadata to <em>Glossary(\"HTML\"</em>) to cater to users of assistive technology.</p>\n</blockquote>\n<p>For example, you could add the attribute <code>role=\"alert\"</code> to a <em>HTMLElement(\"p\"</em>) <em>glossary(\"tag\"</em>) to notify a sight-challenged user that the information is important and time-sensitive (which you might otherwise convey through text color).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Accessibility/ARIA\">ARIA</a></li>\n</ul>\n<hr>\n<h2>Term:  ARPA</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>.arpa</strong> (address and routing parameter area) is a <em>glossary(\"TLD\",\"top-level domain\"</em>) used for Internet infrastructure purposes, especially reverse DNS lookup (i.e., find the <em>glossary('domain name'</em>) for a given <em>glossary(\"IP address\"</em>)).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.iana.org/domains/arpa\">Official website</a></li>\n<li><em>Interwiki(\"wikipedia\", \".arpa\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  ARPANET</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>ARPANET</strong> (Advanced Research Projects Agency NETwork) was an early computer network, constructed in 1969 as a robust medium to transmit sensitive military data and to connect leading research groups throughout the United States. ARPANET first ran NCP (Network Control Protocol) and subsequently the first version of the Internet protocol or <em>glossary(\"TCP\"</em>)/<em>glossary(\"IPv4\",\"IP\"</em>) suite, making ARPANET a prominent part of the nascent <em>glossary(\"Internet\"</em>). ARPANET was closed in early 1990.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"ARPANET\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Array</h2>\n<ul>\n<li>Array</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>programming</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <em>array</em> is an ordered collection of data (either <em>Glossary(\"primitive\"</em>) or <em>Glossary(\"object\"</em>) depending upon the language). Arrays are used to store multiple values in a single variable. This is compared to a variable that can store only one value.</p>\n</blockquote>\n<p>Each item in an array has a number attached to it, called a numeric index, that allows you to access it. In JavaScript, arrays start at index zero and can be manipulated with various <em>Glossary(\"Method\", \"methods\"</em>).</p>\n<p>What an array in JavaScript looks like:</p>\n<pre><code class=\"language-js\">let myArray = [1, 2, 3, 4];\nlet catNamesArray = [\"Jacqueline\", \"Sophia\", \"Autumn\"];\n//Arrays in JavaScript can hold different types of data, as shown above.\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Array data structure\", \"Array\"</em>) on Wikipedia</li>\n<li>JavaScript <em>jsxref(\"Array\"</em>) on MDN</li>\n</ul>\n<hr>\n<h2>Term:  ASCII</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>ASCII</strong> (<em>American Standard Code for Information Interchange</em>) is one of the most popular coding method used by computers for converting letters, numbers, punctuation and control codes into digital form. Since 2007, <em>Glossary(\"UTF-8\"</em>) superseded it on the Web.</p>\n</blockquote>\n<h4>See also</h4>\n<p><em>Interwiki(\"wikipedia\", \"ASCII\"</em>) on Wikipedia</p>\n<hr>\n<h2>Term:  Asynchronous</h2>\n<ul>\n<li>Glossary</li>\n<li>Web</li>\n<li>WebMechanics</li>\n<li>\n<h2>asynchronous</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>asynchronous</strong> refers to two or more objects or events <strong>not</strong> existing or happening at the same time (or multiple related things happening without waiting for the previous one to complete). In computing, the word \"asynchronous\" is used in two major contexts.</p>\n</blockquote>\n<ul>\n<li>\n<p>Networking and communications</p>\n<ul>\n<li>: Asynchronous communication is a method of exchanging messages between two or more parties in which each party receives and processes messages whenever it's convenient or possible to do so, rather than doing so immediately upon receipt. Additionally, messages may be sent without waiting for acknowledgement, with the understanding that if a problem occurs, the recipient will request corrections or otherwise handle the situation.</li>\n</ul>\n<p>For humans, e-mail is an asynchronous communication method; the sender sends an email and the recipient will read and reply to the message when it's convenient to do so, rather than doing so at once. And both sides can continue to send and receive messages whenever they wish, instead of having to schedule them around each other.</p>\n<p>When software communicates asynchronously, a program may make a request for information from another piece of software (such as a server), and continue to do other things while waiting for a reply. For example, the <a href=\"/en-US/docs/Web/Guide/AJAX\">AJAX</a> (Asynchronous JavaScript and <em>Glossary(\"XML\"</em>)) programming technique—now usually \"Ajax\", even though <em>Glossary(\"JSON\"</em>) is usually used rather than XML in modern applications—is a mechanism that requests relatively small amounts of data from the server using <em>Glossary(\"HTTP\"</em>), with the result being returned when available rather than immediately.</p>\n</li>\n<li>\n<p>Software design</p>\n<ul>\n<li>: Asynchronous software design expands upon the concept by building code that allows a program to ask that a task be performed alongside the original task (or tasks), without stopping to wait for the task to complete. When the secondary task is completed, the original task is notified using an agreed-upon mechanism so that it knows the work is done, and that the result, if any, is available.</li>\n</ul>\n<p>There are a number of programming techniques for implementing asynchronous software. See the article <a href=\"/en-US/docs/Learn/JavaScript/Asynchronous\">Asynchronous JavaScript</a> for an introduction to them.</p>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Fetching_data\">Fetching data from the server</a> (Learning Area)</li>\n<li><em>glossary(\"Synchronous\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  ATAG</h2>\n<ul>\n<li>ATAG</li>\n<li>Accessibility</li>\n<li>Authoring Tool Accessibility Guidelines</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>ATAG (Authoring Tool <em>glossary(\"Accessibility\"</em>) Guidelines) is a <em>Glossary(\"W3C\"</em>) recommendation for building accessible-authoring tools that produce accessible contents.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Web_Accessibility_Initiative#Authoring_Tools_Accessibility_Guidelines_.28ATAG.29\">ATAG as part of the Web Accessibility Initiative</a> on WikiPedia</li>\n<li><a href=\"https://www.w3.org/WAI/intro/atag.php\">Authoring Tool Accessibility Guidelines (ATAG) Overview</a></li>\n<li><a href=\"https://www.w3.org/TR/ATAG20/\">The ATAG 2.0 recommendation</a></li>\n</ul>\n<hr>\n<h2>Term:  Attribute</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>HTML</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>attribute</strong> extends an HTML or XML <em>Glossary(\"element\"</em>), changing its behavior or providing metadata.</p>\n</blockquote>\n<p>An attribute always has the form <code>name=\"value\"</code> (the attribute's identifier followed by its associated value).</p>\n<p>You may see attributes without the equals sign or a value. That is a shorthand for providing the empty string in HTML, or the attribute's name in XML.</p>\n<pre><code class=\"language-html\">&#x3C;input required>\n&#x3C;!-- is the same as… -->\n&#x3C;input required=\"\">\n&#x3C;!-- or -->\n&#x3C;input required=\"required\">\n</code></pre>\n<h2>Reflection of an attribute</h2>\n<p>Attributes may be <em>reflected</em> into a particular property of the specific interface.\nIt means that the value of the attribute can be read by accessing the property,\nand can be modified by setting the property to a different value.</p>\n<p>For example, the <code>placeholder</code> below is reflected into <em>domxref(\"HTMLInputElement.placeholder\"</em>).</p>\n<p>Considering the following HTML:</p>\n<pre><code class=\"language-html\">&#x3C;input placeholder=\"Original placeholder\">\n</code></pre>\n<p>We can check the reflection between <em>domxref(\"HTMLInputElement.placeholder\"</em>) and the attribute using:</p>\n<pre><code class=\"language-js\">let input = document.getElementsByTagName(\"input\")[0];\nlet attr = input.getAttributeNode(\"placeholder\")\nconsole.log(attr.value);\nconsole.log(input.placeholder); //Returns the same value as `attr.value`\n</code></pre>\n<p>and</p>\n<pre><code class=\"language-js\">let input2 = document.getElementsByTagName(\"input\")[0];\nlet attr2 = input.getAttributeNode(\"placeholder\")\nconsole.log(attr2.value); // Returns `Original placeholder`\ninput2.placeholder = \"Modified placeholder\"; // Also change the value of the reflected attribute.\nconsole.log(attr2.value); // Returns `Modified placeholder`\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTML/Attributes\">HTML attribute reference</a></li>\n<li>Information about HTML's <a href=\"/en-US/docs/Web/HTML/Global_attributes\">global attributes</a></li>\n</ul>\n<hr>\n<h2>Term:  Media (Audio-visual presentation)</h2>\n<ul>\n<li>Audio</li>\n<li>Glossary</li>\n<li>Media</li>\n<li>Multimedia</li>\n<li>\n<h2>Video</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>media</strong> (more accurately, <strong>multimedia</strong>) refers to audio, video, or combined audio-visual material such as music, recorded speech, movies, TV shows, or any other form of content that is presented over a period of time.</p>\n</blockquote>\n<p>More broadly, media may include still images such as photographs or other still images.</p>\n<p>Media content can be recorded, played back, presented, and at times interacted with in various ways.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Multimedia\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/Media\">Web media technologies</a>: a guide to all the ways media can be used in web content</li>\n<li><a href=\"/en-US/docs/Learn/HTML/Multimedia_and_embedding\">Multimedia and Embedding</a> in the MDN learning area</li>\n<li><em>HTMLElement(\"audio\"</em>) and <em>HTMLElement(\"video\"</em>) elements, used to present media in <em>Glossary(\"HTML\"</em>) documents</li>\n</ul>\n<hr>\n<h2>Term:  Bandwidth</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>Bandwidth is the measure of how much information can pass through a data connection in a given amount of time. It is usually measured in multiples of bits-per-second (bps), for example megabits-per-second (Mbps) or gigabits-per-second (Gbps).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Bandwidth\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Base64</h2>\n<ul>\n<li>Advanced</li>\n<li>Base64</li>\n<li>JavaScript</li>\n<li>Typed Arrays</li>\n<li>URI</li>\n<li>URL</li>\n<li>Unicode Problem</li>\n<li>atob()</li>\n<li>\n<h2>btoa()</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Base64</strong> is a group of similar <a href=\"https://en.wikipedia.org/wiki/Binary-to-text_encoding\">binary-to-text encoding</a> schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term <em>Base64</em> originates from a specific <a href=\"https://en.wikipedia.org/wiki/MIME#Content-Transfer-Encoding\">MIME content transfer encoding</a>.</p>\n</blockquote>\n<p>Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ASCII. This is to ensure that the data remain intact without modification during transport. Base64 is commonly used in a number of applications including email via <a href=\"https://en.wikipedia.org/wiki/MIME\">MIME</a>, and storing complex data in <a href=\"/en-US/docs/Web/XML\">XML</a>.</p>\n<p>One common application of Base64 encoding on the web is to encode binary data so it can be included in a <a href=\"/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\">data: URL</a>.</p>\n<p>In JavaScript there are two functions respectively for decoding and encoding Base64 strings:</p>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/btoa\"><code>btoa()</code></a>: creates a Base64-encoded ASCII string from a \"string\" of binary data (\"btoa\" should be read as \"binary to ASCII\").</li>\n<li><a href=\"/en-US/docs/Web/API/atob\"><code>atob()</code></a>: decodes a Base64-encoded string(\"atob\" should be read as \"ASCII to binary\").</li>\n</ul>\n<p>The algorithm used by <code>atob()</code> and <code>btoa()</code> is specified in <a href=\"https://datatracker.ietf.org/doc/html/rfc4648\">RFC 4648</a>, section 4.</p>\n<p>Note that <code>btoa()</code> expects to be passed binary data, and will throw an exception if the given string contains any characters whose UTF-16 representation occupies more than one byte. For more details, see the documentation for <a href=\"/en-US/docs/Web/API/btoa\"><code>btoa()</code></a>.</p>\n<h2>Encoded size increase</h2>\n<p>Each Base64 digit represents exactly 6 bits of data. So, three 8-bits bytes of the input string/binary file (3×8 bits = 24 bits) can be represented by four 6-bit Base64 digits (4×6 = 24 bits).</p>\n<p>This means that the Base64 version of a string or file will be at least 133% the size of its source (a ~33% increase). The increase may be larger if the encoded data is small. For example, the string <code>\"a\"</code> with <code>length === 1</code> gets encoded to <code>\"YQ==\"</code> with <code>length === 4</code> — a 300% increase.</p>\n<h2>The \"Unicode Problem\"</h2>\n<p>Since <a href=\"/en-US/docs/Web/API/DOMString\" title=\"/en-US/docs/Web/API/DOMString\"><code>DOMString</code></a>s are 16-bit-encoded strings, in most browsers calling <code>window.btoa</code> on a Unicode string will cause a <code>Character Out Of Range</code> exception if a character exceeds the range of a 8-bit ASCII-encoded character. There are two possible methods to solve this problem:</p>\n<ul>\n<li>the first one is to escape the whole string and then encode it;</li>\n<li>the second one is to convert the UTF-16 <a href=\"/en-US/docs/Web/API/DOMString\" title=\"/en-US/docs/Web/API/DOMString\"><code>DOMString</code></a> to an UTF-8 array of characters and then encode it.</li>\n</ul>\n<p>Here are the two possible methods.</p>\n<h3>Solution #1 - escaping the string before encoding it</h3>\n<pre><code class=\"language-js\">function utf8_to_b64( str ) {\n  return window.btoa(unescape(encodeURIComponent( str )));\n}\n\nfunction b64_to_utf8( str ) {\n  return decodeURIComponent(escape(window.atob( str )));\n}\n\n// Usage:\nutf8_to_b64('✓ à la mode'); // \"4pyTIMOgIGxhIG1vZGU=\"\nb64_to_utf8('4pyTIMOgIGxhIG1vZGU='); // \"✓ à la mode\"\n</code></pre>\n<p>This solution has been proposed by <a href=\"http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\">Johan Sundström</a>.</p>\n<p>Another possible solution without utilizing the now deprecated 'unescape' and 'escape' functions.</p>\n<pre><code class=\"language-js\">function b64EncodeUnicode(str) {\n    return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {\n        return String.fromCharCode('0x' + p1);\n    }));\n}\n b64EncodeUnicode('✓ à la mode'); // \"4pyTIMOgIGxhIG1vZGU=\"\n</code></pre>\n<h3>Solution #2 - rewriting <code>atob()</code> and <code>btoa()</code> using <code>TypedArray</code>s and UTF-8</h3>\n<blockquote>\n<p><strong>Note:</strong> The following code is also useful to get an <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\">ArrayBuffer</a> from a Base64 string and/or viceversa (<a href=\"#appendix_decode_a_base64_string_to_uint8array_or_arraybuffer\">see below</a>).</p>\n</blockquote>\n<pre><code class=\"language-js\">\"use strict\";\n\n/*\\\n|*|\n|*|  Base64 / binary data / UTF-8 strings utilities\n|*|\n|*|  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding\n|*|\n\\*/\n\n/* Array of bytes to Base64 string decoding */\n\nfunction b64ToUint6 (nChr) {\n\n  return nChr > 64 &#x26;&#x26; nChr &#x3C; 91 ?\n      nChr - 65\n    : nChr > 96 &#x26;&#x26; nChr &#x3C; 123 ?\n      nChr - 71\n    : nChr > 47 &#x26;&#x26; nChr &#x3C; 58 ?\n      nChr + 4\n    : nChr === 43 ?\n      62\n    : nChr === 47 ?\n      63\n    :\n      0;\n\n}\n\nfunction base64DecToArr (sBase64, nBlocksSize) {\n\n  var\n    sB64Enc = sBase64.replace(/[^A-Za-z0-9\\+\\/]/g, \"\"), nInLen = sB64Enc.length,\n    nOutLen = nBlocksSize ? Math.ceil((nInLen * 3 + 1 >> 2) / nBlocksSize) * nBlocksSize : nInLen * 3 + 1 >> 2, taBytes = new Uint8Array(nOutLen);\n\n  for (var nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx &#x3C; nInLen; nInIdx++) {\n    nMod4 = nInIdx &#x26; 3;\n    nUint24 |= b64ToUint6(sB64Enc.charCodeAt(nInIdx)) &#x3C;&#x3C; 6 * (3 - nMod4);\n    if (nMod4 === 3 || nInLen - nInIdx === 1) {\n      for (nMod3 = 0; nMod3 &#x3C; 3 &#x26;&#x26; nOutIdx &#x3C; nOutLen; nMod3++, nOutIdx++) {\n        taBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 &#x26; 24) &#x26; 255;\n      }\n      nUint24 = 0;\n\n    }\n  }\n\n  return taBytes;\n}\n\n/* Base64 string to array encoding */\n\nfunction uint6ToB64 (nUint6) {\n\n  return nUint6 &#x3C; 26 ?\n      nUint6 + 65\n    : nUint6 &#x3C; 52 ?\n      nUint6 + 71\n    : nUint6 &#x3C; 62 ?\n      nUint6 - 4\n    : nUint6 === 62 ?\n      43\n    : nUint6 === 63 ?\n      47\n    :\n      65;\n\n}\n\nfunction base64EncArr (aBytes) {\n\n  var nMod3 = 2, sB64Enc = \"\";\n\n  for (var nLen = aBytes.length, nUint24 = 0, nIdx = 0; nIdx &#x3C; nLen; nIdx++) {\n    nMod3 = nIdx % 3;\n    if (nIdx > 0 &#x26;&#x26; (nIdx * 4 / 3) % 76 === 0) { sB64Enc += \"\\r\\n\"; }\n    nUint24 |= aBytes[nIdx] &#x3C;&#x3C; (16 >>> nMod3 &#x26; 24);\n    if (nMod3 === 2 || aBytes.length - nIdx === 1) {\n      sB64Enc += String.fromCodePoint(uint6ToB64(nUint24 >>> 18 &#x26; 63), uint6ToB64(nUint24 >>> 12 &#x26; 63), uint6ToB64(nUint24 >>> 6 &#x26; 63), uint6ToB64(nUint24 &#x26; 63));\n      nUint24 = 0;\n    }\n  }\n\n  return sB64Enc.substr(0, sB64Enc.length - 2 + nMod3) + (nMod3 === 2 ? '' : nMod3 === 1 ? '=' : '==');\n\n}\n\n/* UTF-8 array to DOMString and vice versa */\n\nfunction UTF8ArrToStr (aBytes) {\n\n  var sView = \"\";\n\n  for (var nPart, nLen = aBytes.length, nIdx = 0; nIdx &#x3C; nLen; nIdx++) {\n    nPart = aBytes[nIdx];\n    sView += String.fromCodePoint(\n      nPart > 251 &#x26;&#x26; nPart &#x3C; 254 &#x26;&#x26; nIdx + 5 &#x3C; nLen ? /* six bytes */\n        /* (nPart - 252 &#x3C;&#x3C; 30) may be not so safe in ECMAScript! So...: */\n        (nPart - 252) * 1073741824 + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 24) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 18) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 12) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 6) + aBytes[++nIdx] - 128\n      : nPart > 247 &#x26;&#x26; nPart &#x3C; 252 &#x26;&#x26; nIdx + 4 &#x3C; nLen ? /* five bytes */\n        (nPart - 248 &#x3C;&#x3C; 24) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 18) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 12) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 6) + aBytes[++nIdx] - 128\n      : nPart > 239 &#x26;&#x26; nPart &#x3C; 248 &#x26;&#x26; nIdx + 3 &#x3C; nLen ? /* four bytes */\n        (nPart - 240 &#x3C;&#x3C; 18) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 12) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 6) + aBytes[++nIdx] - 128\n      : nPart > 223 &#x26;&#x26; nPart &#x3C; 240 &#x26;&#x26; nIdx + 2 &#x3C; nLen ? /* three bytes */\n        (nPart - 224 &#x3C;&#x3C; 12) + (aBytes[++nIdx] - 128 &#x3C;&#x3C; 6) + aBytes[++nIdx] - 128\n      : nPart > 191 &#x26;&#x26; nPart &#x3C; 224 &#x26;&#x26; nIdx + 1 &#x3C; nLen ? /* two bytes */\n        (nPart - 192 &#x3C;&#x3C; 6) + aBytes[++nIdx] - 128\n      : /* nPart &#x3C; 127 ? */ /* one byte */\n        nPart\n    );\n  }\n\n  return sView;\n\n}\n\nfunction strToUTF8Arr (sDOMStr) {\n\n  var aBytes, nChr, nStrLen = sDOMStr.length, nArrLen = 0;\n\n  /* mapping... */\n\n  for (var nMapIdx = 0; nMapIdx &#x3C; nStrLen; nMapIdx++) {\n    nChr = sDOMStr.codePointAt(nMapIdx);\n\n    if (nChr > 65536) {\n      nMapIdx++;\n    }\n\n    nArrLen += nChr &#x3C; 0x80 ? 1 : nChr &#x3C; 0x800 ? 2 : nChr &#x3C; 0x10000 ? 3 : nChr &#x3C; 0x200000 ? 4 : nChr &#x3C; 0x4000000 ? 5 : 6;\n  }\n\n  aBytes = new Uint8Array(nArrLen);\n\n  /* transcription... */\n\n  for (var nIdx = 0, nChrIdx = 0; nIdx &#x3C; nArrLen; nChrIdx++) {\n    nChr = sDOMStr.codePointAt(nChrIdx);\n    if (nChr &#x3C; 128) {\n      /* one byte */\n      aBytes[nIdx++] = nChr;\n    } else if (nChr &#x3C; 0x800) {\n      /* two bytes */\n      aBytes[nIdx++] = 192 + (nChr >>> 6);\n      aBytes[nIdx++] = 128 + (nChr &#x26; 63);\n    } else if (nChr &#x3C; 0x10000) {\n      /* three bytes */\n      aBytes[nIdx++] = 224 + (nChr >>> 12);\n      aBytes[nIdx++] = 128 + (nChr >>> 6 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr &#x26; 63);\n    } else if (nChr &#x3C; 0x200000) {\n      /* four bytes */\n      aBytes[nIdx++] = 240 + (nChr >>> 18);\n      aBytes[nIdx++] = 128 + (nChr >>> 12 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr >>> 6 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr &#x26; 63);\n      nChrIdx++;\n    } else if (nChr &#x3C; 0x4000000) {\n      /* five bytes */\n      aBytes[nIdx++] = 248 + (nChr >>> 24);\n      aBytes[nIdx++] = 128 + (nChr >>> 18 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr >>> 12 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr >>> 6 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr &#x26; 63);\n      nChrIdx++;\n    } else /* if (nChr &#x3C;= 0x7fffffff) */ {\n      /* six bytes */\n      aBytes[nIdx++] = 252 + (nChr >>> 30);\n      aBytes[nIdx++] = 128 + (nChr >>> 24 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr >>> 18 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr >>> 12 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr >>> 6 &#x26; 63);\n      aBytes[nIdx++] = 128 + (nChr &#x26; 63);\n      nChrIdx++;\n    }\n  }\n\n  return aBytes;\n\n}\n</code></pre>\n<h3>Tests</h3>\n<pre><code class=\"language-js\">/* Tests */\n\nvar sMyInput = \"Base 64 \\u2014 Mozilla Developer Network\";\n\nvar aMyUTF8Input = strToUTF8Arr(sMyInput);\n\nvar sMyBase64 = base64EncArr(aMyUTF8Input);\n\nalert(sMyBase64);\n\nvar aMyUTF8Output = base64DecToArr(sMyBase64);\n\nvar sMyOutput = UTF8ArrToStr(aMyUTF8Output);\n\nalert(sMyOutput);\n</code></pre>\n<h3>Appendix: Decode a Base64 string to Uint8Array or ArrayBuffer</h3>\n<p>These function let us to create also <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\">uint8Arrays</a> or <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\">arrayBuffers</a> from Base64-encoded strings:</p>\n<pre><code class=\"language-js\">// \"Base 64 \\u2014 Mozilla Developer Network\"\nvar myArray = base64DecToArr(\"QmFzZSA2NCDigJQgTW96aWxsYSBEZXZlbG9wZXIgTmV0d29yaw==\");\n\n// \"Base 64 \\u2014 Mozilla Developer Network\"\nvar myBuffer = base64DecToArr(\"QmFzZSA2NCDigJQgTW96aWxsYSBEZXZlbG9wZXIgTmV0d29yaw==\").buffer;\n\nalert(myBuffer.byteLength);\n</code></pre>\n<blockquote>\n<p><strong>Note:</strong> The function <code>base64DecToArr(sBase64[, nBlocksSize])</code> returns an <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\"><code>uint8Array</code></a> of bytes. If your aim is to build a buffer of 16-bit / 32-bit / 64-bit raw data, use the <code>nBlocksSize</code> argument, which is the number of bytes of which the <code>uint8Array.buffer.bytesLength</code> property must result a multiple (<code>1</code> or omitted for ASCII, <a href=\"/en-US/docs/Web/API/DOMString/Binary\">binary strings</a> or UTF-8-encoded strings, <code>2</code> for UTF-16 strings, <code>4</code> for UTF-32 strings).</p>\n</blockquote>\n<hr>\n<h2>Term:  Baseline</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>SVG</li>\n<li>alignment</li>\n<li>\n<h2>typography</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>baseline</strong> is a term used in European and West Asian typography meaning an imaginary line upon which the characters of a font rest.</p>\n</blockquote>\n<p>The descenders of characters like g and p extend below this line. <em>Glossary(\"glyph\", \"Glyphs\"</em>) with rounded lower and upper extents like C or 3 slightly extend below it.</p>\n<p>East Asian scripts have no baseline. Their glyphs are placed in a square box without ascenders or descenders.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Baseline_(typography)\">Baseline</a> on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Box_Alignment#types_of_alignment\">CSS Box Alignment</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  beacon</h2>\n<ul>\n<li>Beacon</li>\n<li>Glossary</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>A web <strong>beacon</strong> is a small object, such as a 1 pixel gif, embedded in markup, used to communicate information back to the web server or to 3rd party servers. Beacons are generally included to provide information about the user for statistical purposes. Beacons are often included within third party scripts for collecting user data, performance metrics and error reporting.</p>\n</blockquote>\n<p>There is a <a href=\"https://w3c.github.io/beacon/\">W3C Draft Beacon Specification</a> to standardize the beacon as an interface to asynchronously transfer HTTP data from User Agent to a web server prior to page load without negative performance impact.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/Real_User_Monitoring\">Real User Monitoring (RUM)</a></li>\n</ul>\n<hr>\n<h2>Term:  BiDi</h2>\n<ul>\n<li>Accessibility</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>BiDi</strong> (BiDirectional) refers to a document containing both right-to-left and left-to-right text. Even when both directionalities occur in the same paragraph, the text in each language must appear in its proper directionality.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Bi-directional text\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  BigInt</h2>\n<ul>\n<li>BigInt</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>Reference</li>\n<li>\n<h2>arbitrary precision format</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), <strong>BigInt</strong> is a numeric data type that can represent integers in the <a href=\"https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic\">arbitrary precision format</a>. In other programming languages different numeric types can exist, for examples: Integers, Floats, Doubles, or Bignums.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Data type#Numeric</em>types\", \"Numeric types\"_) on Wikipedia</li>\n<li>The JavaScript type: <a href=\"/en-US/docs/Web/JavaScript/Data_structures#bigint_type\"><code>BigInt</code></a></li>\n<li>The JavaScript global object <em>jsxref(\"BigInt\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Blink</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Layout</li>\n<li>\n<h2>Rendering engine</h2>\n</li>\n</ul>\n<blockquote>\n<p>Blink is an open-source browser layout engine developed by Google as part of Chromium (and therefore part of <em>glossary(\"Google Chrome\", \"Chrome\"</em>) as well). Specifically, Blink began as a fork of the WebCore library in <em>glossary(\"WebKit\"</em>), which handles layout, rendering, and <em>glossary(\"DOM\"</em>), but now stands on its own as a separate <em>glossary(\"rendering engine\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>Blink project <a href=\"https://www.chromium.org/blink\">home page</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Blink_(browser_engine)\">Blink</a> on Wikipedia</li>\n<li><a href=\"https://www.chromium.org/blink/developer-faq\">FAQ</a> on Blink</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>glossary(\"Google Chrome\"</em>)</li>\n<li><em>glossary(\"Gecko\"</em>)</li>\n<li><em>glossary(\"Trident\"</em>)</li>\n<li><em>glossary(\"WebKit\"</em>)</li>\n<li><em>glossary(\"Rendering engine\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Block cipher mode of operation</h2>\n<ul>\n<li>Block cipher mode of operation</li>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A block cipher mode of operation, usually just called a \"mode\" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size.</p>\n</blockquote>\n<p>Most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data a block at a time. The size of each block is fixed and determined by the algorithm: for example AES uses 16-byte blocks. Block ciphers are always used with a <em>mode</em>, which specifies how to securely encrypt messages that are longer than the block size. For example, AES is a cipher, while CTR, CBC, and GCM are all modes. Using an inappropriate mode, or using a mode incorrectly, can completely undermine the security provided by the underlying cipher.</p>\n<hr>\n<h2>Term:  Block</h2>\n<ul>\n<li>Disambiguation</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>block</strong> can have several meanings depending on the context. It may refer to:</p>\n</blockquote>\n<p>_GlossaryDisambiguation}}</p>\n<hr>\n<h2>Term:  Boolean</h2>\n<ul>\n<li>Boolean</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>Programming Languages</li>\n<li>\n<h2>data types</h2>\n</li>\n</ul>\n<blockquote>\n<p>In computer science, a <strong>Boolean</strong> is a logical data type that can have only the values <code>true</code> or <code>false</code>.</p>\n</blockquote>\n<p>For example, in JavaScript, Boolean conditionals are often used to decide which sections of code to execute (such as in <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/if...else\">if statements</a>) or repeat (such as in <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/for\">for loops</a>).</p>\n<p>Below is some JavaScript pseudocode (it's not truly executable code) demonstrating this concept.</p>\n<pre><code class=\"language-js\">/* JavaScript if statement */\nif (boolean conditional) {\n   // code to execute if the conditional is true\n}\n\nif (boolean conditional) {\n  console.log(\"boolean conditional resolved to true\");\n} else {\n  console.log(\"boolean conditional resolved to false\");\n}\n\n/* JavaScript for loop */\nfor (control variable; boolean conditional; counter) {\n  // code to execute repeatedly if the conditional is true\n}\n\nfor (var i=0; i &#x3C; 4; i++) {\n  console.log(\"I print only when the boolean conditional is true\");\n}\n</code></pre>\n<p>The Boolean value is named after English mathematician <em>interwiki(\"wikipedia\", \"George Boole\"</em>), who pioneered the field of mathematical logic.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Boolean data type\", \"Boolean\"</em>) on Wikipedia</li>\n<li>The JavaScript global object: <em>jsxref(\"Boolean\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types and data structures</a></li>\n</ul>\n<hr>\n<h2>Term:  Boot2Gecko</h2>\n<ul>\n<li>B2G</li>\n<li>Boot2Gecko</li>\n<li>Firefox OS</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Boot2Gecko</em> (<strong>B2G</strong>) is the engineering codename for <em>glossary(\"Firefox OS\"</em>) and refers to builds that haven't yet received official Firefox OS branding. (Firefox OS was also often called Boot2Gecko before the project had an official name.)</p>\n</blockquote>\n<hr>\n<h2>Term:  Bootstrap</h2>\n<ul>\n<li>Bootstrap</li>\n<li>CSS</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>\n<h2>framework</h2>\n</li>\n</ul>\n<blockquote>\n<p>Bootstrap is a free, open source <em>Glossary(\"HTML\"</em>), CSS, and <em>Glossary(\"JavaScript\"</em>) framework for quickly building responsive websites.</p>\n</blockquote>\n<p>Initially, Bootstrap was called Twitter Blueprint and was developed by a team working at <a href=\"https://twitter.com/\">Twitter</a>. It supports responsive design and features predefined design templates that you can use out of the box, or customize for your needs with your code. You don't need to worry about compatibility with other browsers either, as Bootstrap is compatible with all modern browsers and newer versions of <em>glossary(\"Microsoft Internet Explorer\", \"Internet Explorer\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Bootstrap (front-end framework)\", \"Bootstrap\"</em>) on Wikipedia</li>\n<li><a href=\"https://getbootstrap.com/\">Download Bootstrap</a></li>\n<li><a href=\"https://www.w3schools.com/bootstrap4/bootstrap_get_started.asp\">Get started with the latest version</a></li>\n</ul>\n<hr>\n<h2>Term:  Bounding Box</h2>\n<ul>\n<li>Bounding Box</li>\n<li>CodingScripting</li>\n<li>Design</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The bounding box of an element is the smallest possible rectangle (aligned with the axes of that element's user coordinate system) that entirely encloses it and its descendants.</p>\n</blockquote>\n<hr>\n<h2>Term:  Breadcrumb</h2>\n<ul>\n<li>Accessibility</li>\n<li>Glossary</li>\n<li>Navigation</li>\n<li>Search</li>\n<li>Site map</li>\n<li>\n<h2>breadcrumb</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>breadcrumb</strong>, or breadcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited.</p>\n</blockquote>\n<p>A location breadcrumb for this document might look something like this:</p>\n<p><a href=\"/\">MDN</a> > <a href=\"/en-US/docs/Glossary\">Glossary</a> > Breadcrumb</p>\n<p>Breadcrumb trails enable users to be aware of their location within a website. This type of navigation, if done correctly, helps users know where they are in a site and how they got there. They can also help a user get back to where they were before and can reduce the number of clicks needed to get to a higher-level page.</p>\n<hr>\n<h2>Term:  Brotli</h2>\n<ul>\n<li>Brotli</li>\n<li>Glossary</li>\n<li>Reference</li>\n<li>Web Performance</li>\n<li>\n<h2>compression</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Brotli</strong> is a general-purpose lossless compression algorithm.</p>\n</blockquote>\n<p>It compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding, and second-order context modeling, providing a compression ratio comparable to the best currently available general-purpose compression methods. Brotli provides better compression ratios than <em>glossary(\"GZip</em>compression\", \"gzip\"<em>) and deflate speeds are comparable, but brotli compressing is a slower process than Gzip compression, so gzip may be a better option for the compression of non-</em>glossary(\"Cache\", \"cacheable\"_) content.</p>\n<p>Brotli is compatible with most modern browsers, but you may want to consider a fallback.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://brotli.org/\">brotli.org</a></li>\n<li><a href=\"https://github.com/google/brotli\">Brotli Github repository</a></li>\n<li><em>interwiki(\"wikipedia\", \"Brotli\"</em>) on Wikipedia</li>\n<li><a href=\"https://caniuse.com/#feat=brotli\">Brotli on Caniuse</a></li>\n</ul>\n<hr>\n<h2>Term:  Browser</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>Web browser</strong> or <strong>browser</strong> is a program that retrieves and displays pages from the <em>Glossary(\"World Wide Web\",\"Web\"</em>), and lets users access further pages through <em>Glossary(\"hyperlink\",\"hyperlinks\"</em>). A browser is the most familiar type of <em>Glossary(\"user agent\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Web browser\"</em>) on Wikipedia</li>\n<li><a href=\"http://www.evolutionoftheweb.com/\">The evolution of the web</a></li>\n<li><em>Glossary(\"user agent\"</em>) (Glossary)</li>\n<li><em>HTTPHeader(\"User-agent\"</em>) (HTTP Header)</li>\n<li>\n<p>Download a browser</p>\n<ul>\n<li><a href=\"https://www.mozilla.org/en-US/firefox/\">Mozilla Firefox</a></li>\n<li><a href=\"https://www.google.com/chrome/\">Google Chrome</a></li>\n<li><a href=\"https://www.microsoft.com/en-us/edge\">Microsoft Edge</a></li>\n<li><a href=\"https://www.opera.com/\">Opera Browser</a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Browsing context</h2>\n<ul>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>browsing context</strong> is the environment in which a browser displays a <em>domxref(\"Document\"</em>). In modern browsers, it usually is a <em>tab</em>, but can be a <em>window</em> or even only parts of a page, like a <em>frame</em> or an <em>iframe</em>.</p>\n</blockquote>\n<p>Each browsing context has a specific origin, the origin of the active document and a history that memorize all the displayed documents, in order.</p>\n<p>Communication between browsing context is severely constrained. Between browsing context of the same origin, a <em>domxref(\"BroadcastChannel\"</em>) can be opened and used.</p>\n<h4>See also</h4>\n<ul>\n<li>See <em>glossary(\"origin\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  buffer</h2>\n<ul>\n<li>Buffer</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Data_buffer\">Data buffer</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Bézier curve</h2>\n<ul>\n<li>Bézier curve</li>\n<li>Glossary</li>\n<li>Graphics</li>\n<li>\n<h2>Reference</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>Bézier curve</strong> (pronounced [bezje]) is a mathematically described curve used in computer graphics and animation. In <em>Glossary(\"vector image\", \"vector images\"</em>), they are used to model smooth curves that can be scaled indefinitely.</p>\n</blockquote>\n<p>The curve is defined by a set of control points with a minimum of two. Web related graphics and animations use Cubic Béziers, which are curves with four control points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub>, and P<sub>3</sub>.</p>\n<p>To draw the curve, two imaginary lines are drawn, one from P<sub>0</sub> to P<sub>1</sub> and the other from P<sub>1</sub> to P<sub>2</sub>. The end points of the lines are then steadily moved to the next point. A third imaginary line is drawn with its starting point moving steadily on the first helper line and the end point on the second helper line. On this imaginary line a point is drawn from its starting point moving steadily to its end point. The curve this point describes is the Bézier curve. Here's an animated illustration demonstrating the creation of the curve:</p>\n<p><img src=\"b%C3%A9zier_3_big.gif\" alt=\"Drawing a Bézier curve\"></p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/B%C3%A9zier_curve\">Bézier curve on Wikipedia</a></li>\n<li><a href=\"/en-US/docs/Web/CSS/easing-function#the_cubic-bezier()_class_of_timing_functions\">Cubic Bézier timing functions in CSS</a></li>\n<li><em>SVGAttr(\"keySplines\"</em>) SVG attribute</li>\n</ul>\n<hr>\n<h2>Term:  Cacheable</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>cacheable</strong> response is an HTTP response that can be cached, that is stored to be retrieved and used later, saving a new request to the server. Not all HTTP responses can be cached, these are the following constraints for an HTTP response to be cached:</p>\n</blockquote>\n<ul>\n<li>The method used in the request is itself <em>cacheable</em>, that is either a <em>HTTPMethod(\"GET\"</em>) or a <em>HTTPMethod(\"HEAD\"</em>) method. A response to a <em>HTTPMethod(\"POST\"</em>) or <em>HTTPMethod(\"PATCH\"</em>) request can also be cached if freshness is indicated and the <em>HTTPHeader(\"Content-Location\"</em>) header is set, but this is rarely implemented. (For example, Firefox does not support it per <a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=109553\">https://bugzilla.mozilla.org/show_bug.cgi?id=109553</a>.) Other methods, like <em>HTTPMethod(\"PUT\"</em>) or <em>HTTPMethod(\"DELETE\"</em>) are not cacheable and their result cannot be cached.</li>\n<li>The status code of the response is <em>known</em> by the application caching, and it is considered <em>cacheable</em>. The following status code are cacheable: <em>HTTPStatus(\"200\"</em>), <em>HTTPStatus(\"203\"</em>), <em>HTTPStatus(\"204\"</em>), <em>HTTPStatus(\"206\"</em>), <em>HTTPStatus(\"300\"</em>), <em>HTTPStatus(\"301\"</em>), <em>HTTPStatus(\"404\"</em>), <em>HTTPStatus(\"405\"</em>), <em>HTTPStatus(\"410\"</em>), <em>HTTPStatus(\"414\"</em>), and <em>HTTPStatus(\"501\"</em>).</li>\n<li>There are <em>specific headers</em> in the response, like <em>HTTPHeader(\"Cache-Control\"</em>), that prevents caching.</li>\n</ul>\n<p>Note that some non-cacheable requests/responses to a specific URI may invalidate previously cached responses on the same URI. For example, a <em>HTTPMethod(\"PUT\"</em>) to pageX.html will invalidate all cached <em>HTTPMethod(\"GET\"</em>) or <em>HTTPMethod(\"HEAD\"</em>) requests to the same URI.</p>\n<p>When both, the method of the request and the status of the response, are cacheable, the response to the request can be cached:</p>\n<pre><code class=\"language-plain\">GET /pageX.html HTTP/1.1\n(…)\n\n200 OK\n(…)\n</code></pre>\n<p>A <em>HTTPMethod(\"PUT\"</em>) request cannot be cached. Moreover, it invalidates cached data for request to the same URI done via <em>HTTPMethod(\"HEAD\"</em>) or <em>HTTPMethod(\"GET\"</em>):</p>\n<pre><code class=\"language-plain\">PUT /pageX.html HTTP/1.1\n(…)\n\n200 OK\n(…)\n</code></pre>\n<p>A specific <em>HTTPHeader(\"Cache-Control\"</em>) header in the response can prevent caching:</p>\n<pre><code class=\"language-plain\">GET /pageX.html HTTP/1.1\n(…)\n\n200 OK\nCache-Control: no-cache\n(…)\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li>Definition of <a href=\"https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.3\">cacheable</a> in the HTTP specification.</li>\n<li>Description of common cacheable methods: <em>HTTPMethod(\"GET\"</em>), <em>HTTPMethod(\"HEAD\"</em>)</li>\n<li>Description of common non-cacheable methods: <em>HTTPMethod(\"PUT\"</em>), <em>HTTPMethod(\"DELETE\"</em>), often <em>HTTPMethod(\"POST\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Cache</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>HTTP</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>cache</strong> (web cache or HTTP cache) is a component that stores HTTP responses temporarily so that it can be used for subsequent HTTP requests as long as it meets certain conditions.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Web cache\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  CalDAV</h2>\n<ul>\n<li>CalDAV</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>CalDAV (Calendaring extensions to <em>Glossary(\"WebDAV\"</em>)) is a <em>glossary(\"protocol\"</em>) standardized by the <em>Glossary(\"IETF\"</em>) and used to remotely access calendar data from a <em>glossary(\"server\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"CalDAV\"</em>) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc4791\">RFC 4791: Calendaring extensions to WebDAV (CalDAV)</a></li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc6638\">RFC 6638: Scheduling Extensions to CalDAV</a></li>\n</ul>\n<hr>\n<h2>Term:  Call stack</h2>\n<ul>\n<li>Call Stack</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>call stack</strong> is a mechanism for an interpreter (like the JavaScript interpreter in a web browser) to keep track of its place in a script that calls multiple <em>glossary(\"function\",\"functions\"</em>) — what function is currently being run and what functions are called from within that function, etc.</p>\n</blockquote>\n<ul>\n<li>When a script calls a function, the interpreter adds it to the call stack and then starts carrying out the function.</li>\n<li>Any functions that are called by that function are added to the call stack further up, and run where their calls are reached.</li>\n<li>When the current function is finished, the interpreter takes it off the stack and resumes execution where it left off in the last code listing.</li>\n<li>If the stack takes up more space than it had assigned to it, it results in a \"stack overflow\" error.</li>\n</ul>\n<h2>Example</h2>\n<pre><code class=\"language-js\">function greeting() {\n   // [1] Some code here\n   sayHi();\n   // [2] Some code here\n}\nfunction sayHi() {\n   return \"Hi!\";\n}\n\n// Invoke the `greeting` function\ngreeting();\n\n// [3] Some code here\n</code></pre>\n<p>The code above would be executed like this:</p>\n<ol>\n<li>Ignore all functions, until it reaches the <code>greeting()</code> function invocation.</li>\n<li>\n<p>Add the <code>greeting()</code> function to the call stack list.</p>\n<blockquote>\n<p><strong>Note:</strong> Call stack list:\n- greeting</p>\n</blockquote>\n</li>\n<li>Execute all lines of code inside the <code>greeting()</code> function.</li>\n<li>Get to the <code>sayHi()</code> function invocation.</li>\n<li>\n<p>Add the <code>sayHi()</code> function to the call stack list.</p>\n<blockquote>\n<p><strong>Note:</strong> Call stack list:\n- sayHi\n- greeting</p>\n</blockquote>\n</li>\n<li>Execute all lines of code inside the <code>sayHi()</code> function, until reaches its end.</li>\n<li>Return execution to the line that invoked <code>sayHi()</code> and continue executing the rest of the <code>greeting()</code> function.</li>\n<li>\n<p>Delete the <code>sayHi()</code> function from our call stack list.</p>\n<blockquote>\n<p><strong>Note:</strong> Call stack list:\n- greeting</p>\n</blockquote>\n</li>\n<li>When everything inside the <code>greeting()</code> function has been executed, return to its invoking line to continue executing the rest of the JS code.</li>\n<li>\n<p>Delete the <code>greeting()</code> function from the call stack list.</p>\n<blockquote>\n<p><strong>Note:</strong> Call stack list:\nEMPTY</p>\n</blockquote>\n</li>\n</ol>\n<p>In summary, then, we start with an empty Call Stack. Whenever we invoke a function, it is automatically added to the Call Stack. Once the function has executed all of its code, it is automatically removed from the Call Stack. Ultimately, the Stack is empty again.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Call stack\"</em>) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Call stack\"</em>)</li>\n<li><em>Glossary(\"Function\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Callback function</h2>\n<ul>\n<li>Callback</li>\n<li>Callback function</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.</p>\n</blockquote>\n<p>Here is a quick example:</p>\n<pre><code class=\"language-js\">function greeting(name) {\n  alert('Hello ' + name);\n}\n\nfunction processUserInput(callback) {\n  var name = prompt('Please enter your name.');\n  callback(name);\n}\n\nprocessUserInput(greeting);\n</code></pre>\n<p>The above example is a <em>glossary(\"synchronous\"</em>) callback, as it is executed immediately.</p>\n<p>Note, however, that callbacks are often used to continue code execution after an <em>glossary(\"asynchronous\"</em>) operation has completed — these are called asynchronous callbacks. A good example is the callback functions executed inside a <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then\"><code>.then()</code></a> block chained onto the end of a promise after that promise fulfills or rejects. This structure is used in many modern web APIs, such as <a href=\"/en-US/docs/Web/API/fetch\"><code>fetch()</code></a>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Callback</em>(computer<em>programming)\", \"Callback\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Canonical order</h2>\n<ul>\n<li>Canonical order</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>In CSS, canonical order is used to refer to the order in which separate values need to be specified (or <em>Glossary(\"parse\", \"parsed\"</em>)) or are to be <em>Glossary(\"serialization\", \"serialized\"</em>) as part of a CSS property value. It is defined by the formal <em>Glossary(\"syntax\"</em>) of the property and normally refers to the order in which longhand values should be specified as part of a single shorthand value.</p>\n</blockquote>\n<p>For example, <em>cssxref(\"background\"</em>) shorthand property values are made up of several <code>background-*</code> longhand properties. The canonical order of those longhand values is defined as</p>\n<ol>\n<li><em>cssxref(\"background-image\"</em>)</li>\n<li><em>cssxref(\"background-position\"</em>)</li>\n<li><em>cssxref(\"background-size\"</em>)</li>\n<li><em>cssxref(\"background-repeat\"</em>)</li>\n<li><em>cssxref(\"background-attachment\"</em>)</li>\n<li><em>cssxref(\"background-origin\"</em>)</li>\n<li><em>cssxref(\"background-clip\"</em>)</li>\n<li><em>cssxref(\"background-color\"</em>)</li>\n</ol>\n<p>Furthermore, its syntax defines, that if a value for the <em>cssxref(\"background-size\"</em>) is given, it <strong>must</strong> be specified <strong>after</strong> the value for the <em>cssxref(\"background-position\"</em>), separated by a slash. Other values may appear in any order.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://stackoverflow.com/questions/28963536/what-does-canonical-order-mean-with-respect-to-css-properties\">What does “canonical order” mean with respect to CSS properties?</a> on Stack Overflow provides useful further discussion.</li>\n<li>The <a href=\"/en-US/docs/Web/CSS/Value_definition_syntax\">description of the formal syntax used for CSS values</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Canvas</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Graphics</li>\n<li>HTML</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>canvas element</strong> is part of <a href=\"https://en.wikipedia.org/wiki/HTML5\">HTML5</a> and allows for dynamic, <a href=\"https://en.wikipedia.org/wiki/Scripting_language\" title=\"Scripting language\">scriptable</a> <a href=\"https://en.wikipedia.org/wiki/Rendering_(computer_graphics)\" title=\"Rendering (computer graphics)\">rendering</a> of 2D and 3D shapes and <a href=\"https://en.wikipedia.org/wiki/Bitmap\">bitmap</a> images.</p>\n</blockquote>\n<p>It is a low level, procedural model that updates a <a href=\"https://en.wikipedia.org/wiki/Bitmap\">bitmap</a> and does not have a built-in <a href=\"https://en.wikipedia.org/wiki/Scene_graph\" title=\"Scene graph\">scene graph</a>. It provides an empty graphic zone on which specific <em>Glossary(\"JavaScript\"</em>) <em>Glossary(\"API\",\"APIs\"</em>) can draw (such as Canvas 2D or <em>Glossary(\"WebGL\"</em>)).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Canvas element\", \"Canvas\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/Canvas_API/Tutorial\">The Canvas tutorial on MDN</a></li>\n<li>The HTML <em>HTMLElement(\"canvas\"</em>) element on MDN</li>\n<li><a href=\"/en-US/docs/Web/API/Canvas_API\">The Canvas general documentation on MDN</a></li>\n<li><em>domxref(\"CanvasRenderingContext2D\"</em>): The canvas 2D drawing API</li>\n<li><a href=\"https://www.w3.org/TR/2dcontext/\">The Canvas 2D API specification</a></li>\n</ul>\n<hr>\n<h2>Term:  Card sorting</h2>\n<ul>\n<li>Card sorting</li>\n<li>Design</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Card sorting is a simple technique used in <em>glossary(\"Information architecture\"</em>) whereby people involved in the design of a website (or other type of product) are invited to write down the content / services / features they feel the product should contain, and then organize those features into categories or groupings. This can be used for example to work out what should go on each page of a website. The name comes from the fact that often card sorting is carried out by literally writing the items to sort onto cards, and then arranging the cards into piles.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Card</em>sorting\", \"Card sorting\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  CardDAV</h2>\n<ul>\n<li>CardDAV</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>CardDAV</strong> (vCard Extension to <em>Glossary(\"WebDAV\"</em>)) is a <em>glossary(\"protocol\"</em>) standardized by the <em>Glossary(\"IETF\"</em>) and used to remote-access or share contact information over a <em>glossary(\"server\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"CardDAV\"</em>) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc6352\">RFC 6352: vCard Extensions to Web Distributed Authoring and Versioning (WebDAV)</a></li>\n</ul>\n<hr>\n<h2>Term:  caret</h2>\n<ul>\n<li>Cursor</li>\n<li>Glossary</li>\n<li>Input</li>\n<li>caret</li>\n<li>insertion point</li>\n<li>text cursor</li>\n<li>text entry</li>\n<li>text input</li>\n<li>\n<h2>text insertion point</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>caret</strong> (sometimes called a \"text cursor\") is an indicator displayed on the screen to indicate where text input will be inserted.</p>\n</blockquote>\n<p>Most user interfaces represent the caret using a thin vertical line or a character-sized box that flashes, but this can vary. This point in the text is called the <strong>insertion point</strong>. The word \"caret\" differentiates the text insertion point from the mouse cursor.</p>\n<p>On the web, a caret is used to represent the insertion point in <em>HTMLElement(\"input\"</em>) and <em>HTMLElement(\"textarea\"</em>) elements, as well as any elements whose <em>htmlattrxref(\"contenteditable\"</em>) attribute is set, thereby allowing the contents of the element to be edited by the user.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Caret navigation\"</em>) on Wikipedia</li>\n</ul>\n<h3>CSS related to the caret</h3>\n<p>You can set the color of the caret for a given element's editable content by setting the element's CSS <em>cssxref(\"caret-color\"</em>) property to the appropriate <em>cssxref(\"&#x3C;color>\"</em>) value.</p>\n<h3>HTML elements that may present a caret</h3>\n<p>These elements provide text entry fields or boxes and therefore make use of the caret.</p>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTML/Element/input/text\"><code>&#x3C;input type=\"text\"></code></a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/input/password\"><code>&#x3C;input type=\"password\"></code></a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/input/search\"><code>&#x3C;input type=\"search\"></code></a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/input/date\"><code>&#x3C;input type=\"date\"></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/input/time\"><code>&#x3C;input type=\"time\"></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/input/datetime\"><code>&#x3C;input type=\"datetime\"></code></a>, and <a href=\"/en-US/docs/Web/HTML/Element/input/datetime-local\"><code>&#x3C;input type=\"datetime-local\"></code></a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/input/number\"><code>&#x3C;input type=\"number\"></code></a><a href=\"/en-US/docs/Web/HTML/Element/input/number\">, </a><a href=\"/en-US/docs/Web/HTML/Element/input/range\"><code>&#x3C;input type=\"range\"></code></a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/input/email\"><code>&#x3C;input type=\"email\"></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/input/tel\"><code>&#x3C;input type=\"tel\"></code></a>, and <a href=\"/en-US/docs/Web/HTML/Element/input/url\"><code>&#x3C;input type=\"url\"></code></a></li>\n<li><em>HTMLElement(\"textarea\"</em>)</li>\n<li>Any element with its <em>htmlattrxref(\"contenteditable\"</em>) attribute set</li>\n</ul>\n<hr>\n<h2>Term:  CDN</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>CDN</strong> (Content Delivery Network) is a group of servers spread out over many locations. These servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users. CDNs make for fast service less affected by high traffic.</p>\n</blockquote>\n<p>CDNs are used widely for delivering stylesheets and Javascript files (static assets) of libraries like Bootstrap, jQuery etc. Using CDN for those library files is preferable for a number of reasons:</p>\n<ul>\n<li>Serving libraries' static assets over CDN lowers the request burden on an organization's own servers.</li>\n<li>Most CDNs have servers all over the globe, so CDN servers may be geographically nearer to your users than your own servers. Geographical distance affects latency proportionally.</li>\n<li>CDNs are already configured with proper cache settings. Using a CDN saves further configuration for static assets on your own servers.</li>\n</ul>\n<hr>\n<h2>Term:  Certificate authority</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A certificate authority (CA) is an organization that <em>Glossary(\"Signature/Security\", \"signs\"</em>) <em>Glossary(\"Digital certificate\", \"digital certificates\"</em>) and their associated <em>Glossary(\"Key\", \"public keys\"</em>), thereby asserting that the contained information and keys are correct.</p>\n</blockquote>\n<p>For a website digital certificate, this information minimally includes the name of the organization that requested the digital certificate (e.g., Mozilla Corporation), the site that it is for (e.g., mozilla.org), and the certificate authority.</p>\n<p>Certificate authorities are the part of the Internet <a href=\"https://en.wikipedia.org/wiki/Public_key_infrastructure\">public key infrastructure</a> that allows browsers to verify website identity and securely connect over SSL (and HTTPS).</p>\n<blockquote>\n<p><strong>Note:</strong> Web browsers come preloaded with a list of \"root certificates\". The browser can use these to reliably check that the website certificate was signed by a certificate authority  that \"chains back\" to the root certificate (i.e. was trusted by the owner of the root certificate or an intermediate CA). Ultimately this process relies on every CA performing adequate identity checks before signing a certificate!</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Certificate_authority\">Certificate authority</a> on Wikipedia</li>\n<li><a href=\"https://en.wikipedia.org/wiki/Public_key_infrastructure\">Public key infrastructure</a> on Wikipedia</li>\n<li><a href=\"https://wiki.mozilla.org/CA/Included_Certificates\">Mozilla Included CA Certificate List</a></li>\n</ul>\n<hr>\n<h2>Term:  Certified</h2>\n<ul>\n<li>Apps</li>\n<li>B2G</li>\n<li>Firefox OS</li>\n<li>Glossary</li>\n<li>Security</li>\n<li>\n<h2>Trustworthy</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Certified</strong> means that an application, content or data transmission has successfully undergone evaluation by professionals with expertise in the relevant field, thereby indicating completeness, security and trustworthiness.</p>\n</blockquote>\n<p>For details on certification in <em>glossary(\"Cryptography\"</em>), please refer to <em>glossary(\"Digital Certificate\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Professional</em>certification<em>(computer</em>technology)#Information<em>systems</em>security\", \"Certification\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Challenge-response authentication</h2>\n<ul>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>In security protocols, a <em>challenge</em> is some data sent to the client by the server in order to generate a different response each time. Challenge-response protocols are one way to fight against <a href=\"https://en.wikipedia.org/wiki/Replay_attack\">replay attacks</a> where an attacker listens to the previous messages and resends them at a later time to get the same credentials as the original message.</p>\n</blockquote>\n<p>The <a href=\"/en-US/docs/Web/HTTP/Authentication\">HTTP authentication protocol</a> is challenge-response based, though the \"Basic\" protocol isn't using a real challenge (the realm is always the same).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Challenge%E2%80%93response_authentication\">Challenge-response authentication</a> on Wikipedia.</li>\n</ul>\n<hr>\n<h2>Term:  Character encoding</h2>\n<ul>\n<li>Composing</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An encoding defines a mapping between bytes and text. A sequence of bytes allows for different textual interpretations. By specifying a particular encoding (such as UTF-8), we specify how the sequence of bytes is to be interpreted.</p>\n</blockquote>\n<p>For example, in HTML we normally declare a character encoding of UTF-8, using the following line:</p>\n<pre><code class=\"language-html\">&#x3C;meta charset=\"utf-8\">\n</code></pre>\n<p>This ensures that you can use characters from just about any human language in your HTML document, and they will display reliably.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/International/articles/definitions-characters/\">Character encoding on W3C</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Character encoding\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Character set</h2>\n<ul>\n<li>Glossary</li>\n<li>character encoding</li>\n<li>\n<h2>character set</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>character set</strong> is an encoding system to let computers know how to recognize <em>Glossary(\"Character\"</em>), including letters, numbers, punctuation marks, and whitespace.</p>\n</blockquote>\n<p>In earlier times, countries developed their own character sets due to their different languages used, such as Kanji JIS codes (e.g. Shift-JIS, EUC-JP, etc.) for Japanese, Big5 for traditional Chinese, and KOI8-R for Russian. However, <em>Glossary(\"Unicode\"</em>) gradually became most acceptable character set for its universal language support.</p>\n<p>If a character set is used incorrectly (For example, Unicode for an article encoded in Big5), you may see nothing but broken characters, which are called <em>Interwiki(\"wikipedia\", \"Mojibake\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Character encoding\"</em>) (Wikipedia)</li>\n<li><em>Interwiki(\"wikipedia\", \"Mojibake\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Character\"</em>)</li>\n<li><em>Glossary(\"Unicode\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Character</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>strings</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>character</em> is either a symbol (letters, numbers, punctuation) or non-printing \"control\" (e.g., carriage return or soft hyphen).  <em>glossary(\"UTF-8\"</em>) is the most common character set and includes the graphemes of the most popular human languages.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Character (computing)\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Character encoding\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"ASCII\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"UTF-8\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Unicode\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Chrome</h2>\n<ul>\n<li>Browser</li>\n<li>Chrome</li>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>In a browser, the chrome is any visible aspect of a browser aside from the webpages themselves (e.g., toolbars, menu bar, tabs). This is not to be confused with the <em>glossary(\"Google Chrome\"</em>) browser.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.nngroup.com/articles/browser-and-gui-chrome/\">Browser and GUI Chrome</a></li>\n</ul>\n<hr>\n<h2>Term:  CIA</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>CIA (Confidentiality, Integrity, Availability) (also called the CIA triad or AIC triad) is a model that guides an organization's policies for information security.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Information</em>security#Key<em>concepts\", \"CIA\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Cipher suite</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A cipher suite is a combination of a key exchange algorithm, authentication method, bulk encryption <em>Glossary(\"cipher\"</em>), and message authentication code.</p>\n</blockquote>\n<p>In a <em>Glossary(\"cryptosystem\"</em>) like <em>Glossary(\"TLS\"</em>), the client and server must agree on a cipher suite before they can begin communicating securely.  A typical cipher suite looks like ECDHE<em>RSA</em>WITH<em>AES</em>128<em>GCM</em>SHA256 or ECDHE-RSA-AES128-GCM-SHA256, indicating:</p>\n<ul>\n<li>ECDHE (elliptic curve Diffie-Hellman ephemeral) for key exchange</li>\n<li>RSA for authentication</li>\n<li>AES-128 as the cipher, with Galois/Counter Mode (GCM) as the block cipher mode of operation</li>\n<li>SHA-256 as the hash-based message authentication code (HMAC)</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://wiki.mozilla.org/Security/Server_Side_TLS\">Mozilla recommended cipher suite choices for TLS</a></li>\n</ul>\n<hr>\n<h2>Term:  Cipher</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>glossary(\"cryptography\"</em>), a <strong>cipher</strong> is an algorithm that can <em>glossary(\"encryption\", \"encode\"</em>) <em>glossary(\"Plaintext\"</em>) to make it unreadable, and to <em>glossary(\"decryption\", \"decode\"</em>) it back.</p>\n</blockquote>\n<p>Ciphers were common long before the information age (e.g., <a href=\"https://en.wikipedia.org/wiki/Substitution_cipher\">substitution ciphers</a>, <a href=\"https://en.wikipedia.org/wiki/Transposition_cipher\">transposition ciphers</a>, and <a href=\"https://en.wikipedia.org/wiki/Permutation_cipher\">permutation ciphers</a>), but none of them were cryptographically secure except for the <a href=\"https://en.wikipedia.org/wiki/One-time_pad\">one-time pad</a>.</p>\n<p>Modern ciphers are designed to withstand <em>glossary(\"attack\", \"attacks\"</em>) discovered by a <em>glossary(\"cryptanalysis\", \"cryptanalyst\"</em>). There is no guarantee that all attack methods have been discovered, but each algorithm is judged against known classes of attacks.</p>\n<p>Ciphers operate two ways, either as <a href=\"https://en.wikipedia.org/wiki/Block_cipher\">block ciphers</a> on successive blocks, or buffers, of data, or as <a href=\"https://en.wikipedia.org/wiki/Stream_cipher\">stream ciphers</a> on a continuous data flow (often of sound or video).</p>\n<p>They also are classified according to how their <em>glossary(\"key\", \"keys\"</em>) are handled:</p>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Symmetric_key_algorithm\">symmetric key</a> algorithms use the same key to encode and decode a message. The key also must be sent securely if the message is to stay confidential.</li>\n<li><a href=\"https://en.wikipedia.org/wiki/Asymmetric_key_algorithm\">asymmetric key</a> algorithms use a different key for encryption and decryption.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Cipher\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Archive/Security/Encryption_and_Decryption\">Encryption and Decryption</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Block cipher mode of operation\"</em>)</li>\n<li><em>Glossary(\"Cipher\"</em>)</li>\n<li><em>Glossary(\"Ciphertext\"</em>)</li>\n<li><em>Glossary(\"Cipher suite\"</em>)</li>\n<li><em>Glossary(\"Cryptanalysis\"</em>)</li>\n<li><em>Glossary(\"Cryptography\"</em>)</li>\n<li><em>Glossary(\"Decryption\"</em>)</li>\n<li><em>Glossary(\"Encryption\"</em>)</li>\n<li><em>Glossary(\"Key\"</em>)</li>\n<li><em>Glossary(\"Plaintext\"</em>)</li>\n<li><em>Glossary(\"Public-key cryptography\"</em>)</li>\n<li><em>Glossary(\"Symmetric-key cryptography\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Ciphertext</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>glossary(\"cryptography\"</em>), a ciphertext is a scrambled message that conveys information but is not legible unless <em>glossary(\"decryption\",\"decrypted\"</em>) with the right <em>glossary(\"cipher\"</em>) and the right secret (usually a <em>glossary(\"key\"</em>)), reproducing the original <em>glossary(\"Plaintext\"</em>). A ciphertext's security, and therefore the secrecy of the contained information, depends on using a secure cipher and keeping the key secret.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Ciphertext\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Class</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>glossary(\"OOP\",\"object-oriented programming\"</em>), a <em>class</em> defines an <em>glossary(\"object\",\"object's\"</em>) characteristics. Class is a template definition of an object's <em>glossary(\"property\",\"properties\"</em>) and <em>glossary(\"method\",\"methods\"</em>), the \"blueprint\" from which other more specific instances of the object are drawn.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages\">Class-based vs. prototype-based programming languages</a> (like JavaScript)</li>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Objects#the_class\">Using functions as classes in JavaScript</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Class-based_programming\">Class-based programming</a> on Wikipedia</li>\n<li><a href=\"https://en.wikipedia.org/wiki/Object-oriented_programming\">Object-oriented programming</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Clickjacking</h2>\n<ul>\n<li>Clickjacking</li>\n<li>Interface-based attack</li>\n<li>Glossary</li>\n<li>Security</li>\n<li>vulnerability</li>\n<li>\n<h2>exploit</h2>\n</li>\n</ul>\n<blockquote>\n<p>Clickjacking is an interface-based attack that tricks website users into unwittingly clicking on malicious links. In clickjacking, the attackers embed their malicious links into buttons or legitimate pages in a website. In an infected <em>glossary(\"Site\"</em>), whenever a user clicks on a legitimate link, the attacker gets the confidential information of that user, which ultimately compromises the user's privacy on the Internet.</p>\n</blockquote>\n<p>Clickjacking can be prevented by implementing a <a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors\">Content Security Policy (frame-ancestors)</a> and implementing <a href=\"/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes\">Set-Cookie attributes</a>.</p>\n<h2>Learn more</h2>\n<ul>\n<li><a href=\"/en-US/docs/Web/Security#clickjacking_protection\">Web security: clickjacking protection</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Clickjacking\">Clickjacking</a> on Wikipedia</li>\n<li><a href=\"https://owasp.org/www-community/attacks/Clickjacking\">Clickjacking</a> on OWASP</li>\n</ul>\n<hr>\n<h2>Term:  Closure</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The binding which defines the <strong><em>glossary(\"scope\"</em>)</strong> of execution. In <em>glossary(\"JavaScript\"</em>), <strong><em>glossary(\"function\",\"functions\"</em>)</strong> create a closure context.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Closure</em>%28computer<em>programming%29\", \"Closure\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Closures\">Closure</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  CMS</h2>\n<ul>\n<li>CMS</li>\n<li>Composing</li>\n<li>Content management system</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A CMS (Content Management System) is software that allows users to publish, organize, change, or remove various kinds of content, not only text but also embedded images, video, audio, and interactive code.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Content management system\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Code point</h2>\n<ul>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>code point</em> is a number assigned to represent an abstract character in a system for representing text (such as Unicode). In Unicode, a code point is expressed in the form \"U+1234\" where \"1234\" is the assigned number. For example, the character \"A\" is assigned a code point of U+0041.</p>\n</blockquote>\n<p>Character encoding forms, such as UTF-8 and UTF-16, determine how a Unicode code point should be encoded as a sequence of bytes. Different encoding forms may encode the same code point as different byte sequences: for example, the Cyrillic character \"Ф\", whose code point is U+0424, is encoded as <code>0xd0a4</code> in UTF-8 and as <code>0x0424</code> in UTF-16.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.unicode.org/versions/Unicode14.0.0/ch02.pdf#G25564\">The Unicode Standard: Code Points and Characters</a></li>\n</ul>\n<hr>\n<h2>Term:  Code splitting</h2>\n<ul>\n<li>Glossary</li>\n<li>Reference</li>\n<li>Web Performance</li>\n<li>code splitting</li>\n<li>\n<h2>latency</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Code splitting</strong> is the splitting of code into various bundles or components which can then be loaded on demand or in parallel.</p>\n</blockquote>\n<p>As an application grows in complexity or is maintained, CSS and JavaScripts files or  bundles grow in byte size, especially as the number and size of included third-party libraries increases. To prevent the requirement of downloading ginormous files, scripts can be split into multiple smaller files. Then features required at page load can be downloaded immediately with additional scripts being <a href=\"/en-US/docs/Glossary/Lazy_load\">lazy loaded</a> after the page or application is interactive, thus improving performance. While the total amount of code is the same (and perhaps even a few bytes larger), the amount of code needed during initial load can be reduced.</p>\n<p>Code splitting is a feature supported by bundlers like <a href=\"https://webpack.js.org/\">Webpack</a> and <a href=\"http://browserify.org/\">Browserify</a> which can create multiple bundles that can be dynamically loaded at runtime.</p>\n<h4>See also</h4>\n<ul>\n<li>Bundling</li>\n<li><a href=\"/en-US/docs/Web/Performance/Lazy_loading\">Lazy loading</a></li>\n<li><a href=\"/en-US/docs/Glossary/HTTP_2\">HTTP/2</a></li>\n<li><a href=\"/en-US/docs/Glossary/Tree_shaking\">Tree shaking</a></li>\n</ul>\n<hr>\n<h2>Term:  Code unit</h2>\n<ul>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>code unit</em> is the basic component used by a character encoding system (such as UTF-8 or UTF-16). A character encoding system uses one or more code units to encode a Unicode <em>Glossary(\"code point\"</em>).</p>\n</blockquote>\n<p>In UTF-16 (the encoding system used for JavaScript strings) code units are 16-bit values. This means that operations such as indexing into a string or getting the length of a string operate on these 16-bit units. These units do not always map 1-1 onto what we might consider characters.</p>\n<p>For example, sometimes characters with diacritics such as accents are represented using two Unicode code points:</p>\n<pre><code class=\"language-js\">const myString = 'ñ';\nmyString.length;\n// 2\n</code></pre>\n<p>Also, since not all of the code points defined by Unicode fit into 16 bits, many Unicode code points are encoded as a pair of UTF-16 code units, which is called a <em>surrogate pair</em>:</p>\n<pre><code class=\"language-js\">const face = '🥵';\nface.length;\n// 2\n</code></pre>\n<p>The <em>jsxref(\"String/codePointAt\", \"codePointAt()\"</em>) method of the JavaScript <em>jsxref(\"String\"</em>) object enables you to retrieve the Unicode code point from its encoded form:</p>\n<pre><code class=\"language-js\">const face = '🥵';\nface.codePointAt(0)\n// 129397\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.unicode.org/faq/utf_bom.html\">Unicode encoding FAQ</a></li>\n</ul>\n<hr>\n<h2>Term:  Codec</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>codec</em> (a blend word derived from \"<strong><em>co</em></strong>der-<strong><em>dec</em></strong>oder\") is a program, algorithm, or device that encodes or decodes a data stream. A given codec knows how to handle a specific encoding or compression technology.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Codec\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/Media/Formats/Video_codecs\">Web video codec guide</a></li>\n<li><a href=\"/en-US/docs/Web/Media/Formats/Audio_codecs\">Web audio codec guide</a></li>\n<li><a href=\"/en-US/docs/Web/Media/Formats\">Guide to media types and formats on the web</a></li>\n</ul>\n<hr>\n<h2>Term:  Compile time</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>compile time</em> is the time from when the program is first loaded until the program is <em>Glossary(\"parse\",\"parsed\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Compile time\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Compile</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Compiling</strong> is the process of transforming a computer program written in a given <em>Glossary(\"computer programming\", \"language\"</em>) into a set of instructions in another format or language. A <strong>compiler</strong> is a computer program to execute that task.</p>\n</blockquote>\n<p>Typically, a compiler transforms code written in a higher-level language such as <a href=\"https://en.wikipedia.org/wiki/C++\">C++</a> or <a href=\"https://en.wikipedia.org/wiki/Rust_(programming_language)\">Rust</a> or <a href=\"https://en.wikipedia.org/wiki/Java_(programming_language)\">Java</a> into executable (runnable) code — so-called <strong>binary code</strong> or <strong>machine code</strong>. <a href=\"/en-US/docs/WebAssembly\">WebAssembly</a>, for example, is a form of executable binary code that <a href=\"https://webassembly.org/getting-started/developers-guide/\">can be compiled from code written in C++, Rust, C#, Go, Swift, and several other languages</a> and that can then be run on any web page, in any browser.</p>\n<p>Most compilers perform either ahead-of-time (AOT) compilation or just-in-time (JIT) compilation.</p>\n<p>The GNU <code>gcc</code> compiler is one well-known example of an AOT compiler. AOT compilers are typically invoked from the command line in a shell environment (from within a terminal or console) or within an <em>Glossary(\"IDE\"</em>).</p>\n<p>JIT compilers are typically not invoked directly but are instead built into software runtimes internally, for the purpose of improving performance. For example, all major browsers now use JavaScript engines that have built-in JIT compilers.</p>\n<p>Compilers may also translate among higher-level languages — for example, from TypeScript to <em>Glossary(\"JavaScript\"</em>) — in which case, they are often sometimes referred to as <strong>transpilers</strong>.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/WebAssembly/C_to_wasm\">Compiling from C/C++ to WebAssembly</a></li>\n<li><a href=\"/en-US/docs/WebAssembly/Rust_to_wasm\">Compiling from Rust to WebAssembly</a></li>\n<li>Wikipedia: <em>Interwiki(\"wikipedia\", \"Compiler\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Computer Programming</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Computer Programming</li>\n<li>Programming Language</li>\n<li>\n<h2>programming</h2>\n</li>\n</ul>\n<blockquote>\n<p>Computer programming is a process of composing and organizing a collection of instructions. These tell a computer/software program what to do in a language which the computer understands. These instructions come in the form of many different languages such as C++, Java, JavaScript, HTML, Python, Ruby, and Rust.</p>\n</blockquote>\n<p>Using an appropriate language, you can program/create all sorts of software. For example, a program that helps scientists with complex calculations, a database that stores huge amounts of data, a web site that allows people to download music, or animation software that allows people to create animated movies.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Computer programming\"</em>) on Wikipedia</li>\n<li><a href=\"https://en.wikipedia.org/wiki/List_of_programming_languages\">List of Programming Languages: Wikipedia</a></li>\n</ul>\n<hr>\n<h2>Term:  Conditional</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>condition</strong> is a set of rules that can interrupt normal code execution or change it, depending on whether the condition is completed or not.</p>\n</blockquote>\n<p>An instruction or a set of instructions is executed if a specific condition is fulfilled. Otherwise, another instruction is executed. It is also possible to repeat the execution of an instruction, or set of instructions, while a condition is not yet fulfilled.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Exception</em>handling#Condition<em>systems\", \"Condition\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Glossary/Control_flow\">Control flow</a> on MDN</li>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Building_blocks/conditionals\">Making decisions in your code — conditionals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling\">Control flow and error handling in JavaScript</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Constant</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Constant</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A constant is a value that the programmer cannot change, for example numbers (1, 2, 42). With <em>glossary(\"variable\",\"variables\"</em>), on the other hand, the programmer can assign a new <em>glossary(\"value\"</em>) to a variable name already in use.</p>\n</blockquote>\n<p>Like variables, some constants are bound to identifiers. For example, the identifier <code>pi</code> could be bound to the value 3.14... .</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Constant</em>(computer<em>programming)\", \"Constant\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Constructor</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>constructor</strong> belongs to a particular class <em>glossary(\"object\"</em>) that is instantiated. The constructor initializes this object and can provide access to its private information. The concept of a constructor can be applied to most <em>glossary(\"OOP\",\"object-oriented programming\"</em>) languages. Essentially, a constructor in <em>glossary(\"JavaScript\"</em>) is usually declared at the instance of a <em>glossary(\"class\"</em>).</p>\n</blockquote>\n<h2>Syntax</h2>\n<pre><code class=\"language-js\">// This is a generic default constructor class Default\nfunction Default() {\n}\n\n// This is an overloaded constructor class Overloaded\n// with parameter arguments\nfunction Overloaded(arg1, arg2, ..., argN){\n}\n</code></pre>\n<p>To call the constructor of the class in JavaScript, use a <code>new</code> operator to assign a new <em>glossary(\"object reference\"</em>) to a <em>glossary(\"variable\"</em>).</p>\n<pre><code class=\"language-js\">function Default() {\n}\n\n// A new reference of a Default object assigned to a\n// local variable defaultReference\nvar defaultReference = new Default();\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Constructor</em>%28object-oriented<em>programming%29\", \"Constructor\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Objects#the_constructor\">The constructor in object oriented programming for JavaScript</a> on MDN</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/new\">New operator in JavaScript</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Continuous Media</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Media</h2>\n</li>\n</ul>\n<blockquote>\n<p>Continuous media is data where there is a timing relationship between source and destination. The most common examples of continuous media are audio and motion video. Continuous media can be real-time (interactive), where there is a \"tight\" timing relationship between source and sink, or streaming (playback), where the relationship is less strict.</p>\n</blockquote>\n<p>CSS can be used in a variety of contexts, including print media. And some CSS, particularly those that are used for layout, behave differently depending on the context they are in.</p>\n<p>Continuous Media, therefore, identifies a context where the content is not broken up. It flows continuously. Web content displayed on a screen is continuous media, as is spoken content.</p>\n<hr>\n<h2>Term:  Control flow</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>control flow</em> is the order in which the computer executes statements in a script.</p>\n</blockquote>\n<p>Code is run in order from the first line in the file to the last line, unless the computer runs across the (extremely frequent) structures that change the control flow, such as conditionals and loops.</p>\n<p>For example, imagine a script used to validate user data from a webpage form. The script submits validated data, but if the user, say, leaves a required field empty, the script prompts them to fill it in. To do this, the script uses a <em>Glossary(\"Conditional\", \"conditional\"</em>) structure or <code>if...else</code>, so that different code executes depending on whether the form is complete or not:</p>\n<pre><code>if (field==empty) {\n    promptUser();\n} else {\n    submitForm();\n}\n</code></pre>\n<p>A typical script in <em>glossary(\"JavaScript\"</em>) or <em>glossary(\"PHP\"</em>) (and the like) includes many control structures, including conditionals, <em>Glossary(\"Loop\", \"loops\"</em>) and <em>Glossary(\"Function\", \"functions\"</em>). Parts of a script may also be set to execute when <em>Glossary(\"Event\", \"events\"</em>) occur.</p>\n<p>For example, the above excerpt might be inside a function that runs when the user clicks the <strong>Submit</strong> button for the form. The function could also include a loop, which iterates through all of the fields in the form, checking each one in turn. Looking back at the code in the <code>if</code> and <code>else</code> sections, the lines <code>promptUser</code> and <code>submitForm</code> could also be calls to other functions in the script. As you can see, control structures can dictate complex flows of processing even with only a few lines of code.</p>\n<p>Control flow means that when you read a script, you must not only read from start to finish but also look at program structure and how it affects order of execution.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Control flow\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference#control_flow\">JavaScript Reference - Control flow</a> on MDN</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling\">Statements (Control flow)</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Cookie</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A cookie is a small piece of information left on a visitor's computer by a website, via a web browser.</p>\n</blockquote>\n<p>Cookies are used to personalize a user’s web experience with a website. It may contain the user’s preferences or inputs when accessing that website. A user can customize their web browser to accept, reject, or delete cookies.</p>\n<p>Cookies can be set and modified at the server level using the <code>Set-Cookie</code> <a href=\"/en-US/docs/Web/HTTP/Cookies\">HTTP header</a>, or with JavaScript using <a href=\"/en-US/docs/Web/API/Document/cookie\"><code>document.cookie</code></a>.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/HTTP_cookie\">HTTP cookie</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Copyleft</h2>\n<ul>\n<li>Glossary</li>\n<li>OpenPractices</li>\n<li>Remixing</li>\n<li>\n<h2>Sharing</h2>\n</li>\n</ul>\n<blockquote>\n<p>Copyleft is a term, usually referring to a license, used to indicate that such license requires that redistribution of said work is subject to the same license as the original. Examples of copyleft licenses are the GNU <em>Glossary(\"GPL\"</em>) (for software) and the Creative Commons SA (Share Alike) licenses (for works of art).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Copyleft\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  CORS-safelisted request header</h2>\n<ul>\n<li>CORS</li>\n<li>\n<h2>Fetch</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <a href=\"https://fetch.spec.whatwg.org/#cors-safelisted-request-header\">CORS-safelisted request header</a> is one of the following <a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP headers</a>:</p>\n</blockquote>\n<ul>\n<li><em>HTTPHeader(\"Accept\"</em>),</li>\n<li><em>HTTPHeader(\"Accept-Language\"</em>),</li>\n<li><em>HTTPHeader(\"Content-Language\"</em>),</li>\n<li><em>HTTPHeader(\"Content-Type\"</em>).</li>\n</ul>\n<p>When containing only these headers (and values that meet the additional requirements laid out below), a requests doesn't need to send a <em>glossary(\"preflight request\"</em>) in the context of <a href=\"/en-US/docs/Glossary/CORS\">CORS</a>.</p>\n<p>You can safelist more headers using the <em>HTTPHeader(\"Access-Control-Allow-Headers\"</em>) header and also list the above headers there to circumvent the following additional restrictions:</p>\n<h4>Additional restrictions</h4>\n<p>CORS-safelisted headers must also fulfill the following requirements in order to be a CORS-safelisted request header:</p>\n<ul>\n<li>For <em>HTTPHeader(\"Accept-Language\"</em>) and <em>HTTPHeader(\"Content-Language\"</em>): can only have values consisting of <code>0-9</code>, <code>A-Z</code>, <code>a-z</code>, space or <code>*,-.;=</code>.</li>\n<li>For <em>HTTPHeader(\"Accept\"</em>) and <em>HTTPHeader(\"Content-Type\"</em>): can't contain a <em>CORS-unsafe request header byte</em>: <code>0x00-0x1F</code> (except for <code>0x09 (HT)</code>, which is allowed), <code>\"():&#x3C;>?@[\\]{}</code>, and <code>0x7F (DEL)</code>.</li>\n<li>For <em>HTTPHeader(\"Content-Type\"</em>): needs to have a MIME type of its parsed value (ignoring parameters) of either <code>application/x-www-form-urlencoded</code>, <code>multipart/form-data</code>, or <code>text/plain</code>.</li>\n<li>For any header: the value’s length can't be greater than 128.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Glossary(\"CORS-safelisted response header\"</em>)</li>\n<li><em>Glossary(\"Forbidden header name\"</em>)</li>\n<li><em>Glossary(\"Request header\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  CORS-safelisted response header</h2>\n<ul>\n<li>CORS</li>\n<li>Fetch</li>\n<li>Glossary</li>\n<li>\n<h2>HTTP</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>CORS-safelisted response header</em> is an <a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP header</a> in a <a href=\"/en-US/docs/Web/HTTP/CORS\">CORS</a> response that it is considered <em>safe</em> to expose to client scripts. Only safelisted response headers are made available to web pages.</p>\n</blockquote>\n<p>By default, the safelist includes the following response headers:</p>\n<ul>\n<li><em>HTTPHeader(\"Cache-Control\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Language\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Length\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Type\"</em>)</li>\n<li><em>HTTPHeader(\"Expires\"</em>)</li>\n<li><em>HTTPHeader(\"Last-Modified\"</em>)</li>\n<li><em>HTTPHeader(\"Pragma\"</em>)</li>\n</ul>\n<p>Additional headers can be added to the safelist using <em>HTTPHeader(\"Access-Control-Expose-Headers\"</em>).</p>\n<blockquote>\n<p><strong>Note:</strong> <em>HTTPHeader(\"Content-Length\"</em>) was not part of the original set of safelisted response headers [<a href=\"https://github.com/whatwg/fetch/pull/626\">ref</a>]</p>\n</blockquote>\n<h2>Examples</h2>\n<h3>Extending the safelist</h3>\n<p>You can extend the list of CORS-safelisted response headers by using the <em>HTTPHeader(\"Access-Control-Expose-Headers\"</em>) header:</p>\n<pre><code class=\"language-plain\">Access-Control-Expose-Headers: X-Custom-Header, Content-Encoding\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP\">HTTP</a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP headers</a></li>\n<li><em>HTTPHeader(\"Access-Control-Expose-Headers\"</em>)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"CORS\"</em>)</li>\n<li><em>Glossary(\"CORS-safelisted</em>request<em>header\", \"CORS-safelisted request header\"</em>)</li>\n<li><em>Glossary(\"Forbidden header name\"</em>)</li>\n<li><em>Glossary(\"Request header\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  CORS</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>CORS</strong> (Cross-Origin Resource Sharing) is a system, consisting of transmitting <em>Glossary(\"HTTP</em>header\", \"HTTP headers\"_), that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.</p>\n</blockquote>\n<p>The <a href=\"/en-US/docs/Web/Security/Same-origin_policy\">same-origin security policy</a> forbids cross-origin access to resources. But CORS gives web servers the ability to say they want to opt into allowing cross-origin access to their resources.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/CORS\">Cross-Origin Resource Sharing (CORS)</a> on MDN</li>\n<li><em>Interwiki(\"wikipedia\", \"Cross-origin resource sharing\"</em>) on Wikipedia</li>\n<li><a href=\"https://fetch.spec.whatwg.org\">Fetch specification</a></li>\n</ul>\n<h3>CORS headers</h3>\n<ul>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Allow-Origin\"</em>)</p>\n<ul>\n<li>: Indicates whether the response can be shared.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Allow-Credentials\"</em>)</p>\n<ul>\n<li>: Indicates whether or not the response to the request can be exposed when the credentials flag is true.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Allow-Headers\"</em>)</p>\n<ul>\n<li>: Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Allow-Methods\"</em>)</p>\n<ul>\n<li>: Specifies the method or methods allowed when accessing the resource in response to a preflight request.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Expose-Headers\"</em>)</p>\n<ul>\n<li>: Indicates which headers can be exposed as part of the response by listing their names.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Max-Age\"</em>)</p>\n<ul>\n<li>: Indicates how long the results of a preflight request can be cached.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Request-Headers\"</em>)</p>\n<ul>\n<li>: Used when issuing a preflight request to let the server know which HTTP headers will be used when the actual request is made.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Access-Control-Request-Method\"</em>)</p>\n<ul>\n<li>: Used when issuing a preflight request to let the server know which <a href=\"/en-US/docs/Web/HTTP/Methods\">HTTP method</a> will be used when the actual request is made.</li>\n</ul>\n</li>\n<li>\n<p><em>HTTPHeader(\"Origin\"</em>)</p>\n<ul>\n<li>: Indicates where a fetch originates from.</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Crawler</h2>\n<ul>\n<li>Browser</li>\n<li>Crawler</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>A web crawler is a program, often called a bot or robot, which systematically browses the <em>glossary(\"World Wide Web\",\"Web\"</em>) to collect data from webpages. Typically search engines (e.g. Google, Bing, etc.) use crawlers to build indexes.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Web crawler\"</em>) on Wikipedia</li>\n<li><em>Glossary(\"Search engine\"</em>) (Glossary)</li>\n</ul>\n<hr>\n<h2>Term:  CRLF</h2>\n<ul>\n<li>CR</li>\n<li>CRLF</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>LF</li>\n<li>carriage return</li>\n<li>\n<h2>line feed</h2>\n</li>\n</ul>\n<blockquote>\n<p>CR and LF are <a href=\"https://en.wikipedia.org/wiki/Control_character\">control characters</a> or <a href=\"https://en.wikipedia.org/wiki/Bytecode\">bytecode</a> that can be used to mark a line break in a text file.</p>\n</blockquote>\n<ul>\n<li>CR = <strong>Carriage Return</strong> (<code>\\r</code>, <code>0x0D</code> in hexadecimal, 13 in decimal) — moves the cursor to the beginning of the line without advancing to the next line.</li>\n<li>LF = <strong>Line Feed</strong> (<code>\\n</code>, <code>0x0A</code> in hexadecimal, 10 in decimal) — moves the cursor down to the next line without returning to the beginning of the line.</li>\n</ul>\n<p>A CR immediately followed by a LF (CRLF, <code>\\r\\n</code>, or <code>0x0D0A</code>) moves the cursor down to the next line and then to the beginning of the line.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Newline#In</em>programming<em>languages\", \"Newline\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Carriage</em>return#Computers\", \"Carriage return\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Cross-site scripting</h2>\n<ul>\n<li>Cross Site Scripting</li>\n<li>DOM</li>\n<li>Glossary</li>\n<li>Security</li>\n<li>XSS</li>\n<li>\n<h2>exploit</h2>\n</li>\n</ul>\n<blockquote>\n<p>Cross-site scripting (XSS) is a security exploit which allows an attacker to inject into a website malicious client-side code. This code is executed by the victims and lets the attackers bypass access controls and impersonate users. According to the Open Web Application Security Project, XSS was the <a href=\"https://owasp.org/www-project-top-ten/OWASP_Top_Ten_2017/Top_10-2017_A7-Cross-Site_Scripting_(XSS)\">seventh most common Web app vulnerability</a> in 2017.</p>\n</blockquote>\n<p>These attacks succeed if the Web app does not employ enough validation or encoding. The user's browser cannot detect the malicious script is untrustworthy, and so gives it access to any cookies, session tokens, or other sensitive site-specific information, or lets the malicious script rewrite the <em>glossary(\"HTML\"</em>) content.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Security/Types_of_attacks#cross-site_scripting_xss\">Cross-site scripting (XSS)</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Cross-site scripting\"</em>) on Wikipedia</li>\n<li><a href=\"https://owasp.org/www-community/attacks/xss/\">Cross-site scripting on OWASP</a></li>\n<li><a href=\"https://www.acunetix.com/blog/web-security-zone/articles/dom-xss-explained/\">Another article about Cross-site scripting</a></li>\n<li><a href=\"https://secure.wphackedhelp.com/blog/wordpress-xss-attack/\">XSS Attack - Exploit &#x26; Protection</a></li>\n</ul>\n<hr>\n<h2>Term:  Cross Axis</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>cross axis</li>\n<li>\n<h2>flexbox</h2>\n</li>\n</ul>\n<blockquote>\n<p>The cross axis in <em>glossary(\"flexbox\"</em>) runs perpendicular to the <em>glossary(\"main axis\"</em>), therefore if your <em>cssxref(\"flex-direction\"</em>) is either <code>row</code> or <code>row-reverse</code> then the cross axis runs down the columns.</p>\n</blockquote>\n<p><img src=\"basics3.png\" alt=\"The cross axis runs down the column\"></p>\n<p>If your main axis is <code>column</code> or <code>column-reverse</code> then the cross axis runs along the rows.</p>\n<p><img src=\"basics4.png\" alt=\"The cross axis runs along the row.\"></p>\n<p>Alignment of items on the cross axis is achieved with the <code>align-items</code> property on the flex container or <code>align-self</code> property on individual items. In the case of a multi-line flex container, with additional space on the cross axis, you can use <code>align-content</code> to control the spacing of the rows.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"align-content\"</em>)</li>\n<li><em>cssxref(\"align-items\"</em>)</li>\n<li><em>cssxref(\"align-self\"</em>)</li>\n<li><em>cssxref(\"flex-wrap\"</em>)</li>\n<li><em>cssxref(\"flex-direction\"</em>)</li>\n<li><em>cssxref(\"flex\"</em>)</li>\n<li><em>cssxref(\"flex-basis\"</em>)</li>\n<li><em>cssxref(\"flex-flow\"</em>)</li>\n<li><em>cssxref(\"flex-grow\"</em>)</li>\n<li><em>cssxref(\"flex-shrink\"</em>)</li>\n<li><em>cssxref(\"justify-content\"</em>)</li>\n<li><em>cssxref(\"order\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Flexbox Guide: <em>[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Basic<em>Concepts</em>of<em>Flexbox)</em></li>\n<li>CSS Flexbox Guide: <em>[Aligning items in a flex container](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Aligning<em>Items</em>in<em>a</em>Flex<em>Container)</em></li>\n<li>CSS Flexbox Guide: <em>[Mastering wrapping of flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Mastering<em>Wrapping</em>of<em>Flex</em>Items)_</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Flex\"</em>)</li>\n<li><em>Glossary(\"Flex Container\"</em>)</li>\n<li><em>Glossary(\"Flex Item\"</em>)</li>\n<li><em>Glossary(\"Grid\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  CRUD</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>CRUD</strong> (Create, Read, Update, Delete) is an acronym for ways one can operate on stored data. It is a mnemonic for the four basic functions of persistent storage. CRUD typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"CRUD\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Cryptanalysis</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Cryptanalysis</strong> is the branch of <em>glossary(\"cryptography\"</em>) that studies how to break codes and cryptosystems. Cryptanalysis creates techniques to break <em>glossary(\"cipher\",\"ciphers\"</em>), in particular by methods more efficient than a <a href=\"https://en.wikipedia.org/wiki/Brute-force_search\">brute-force search</a>. In addition to traditional methods like <a href=\"https://en.wikipedia.org/wiki/Frequency_analysis\">frequency analysis</a> and <a href=\"https://en.wikipedia.org/wiki/Index_of_coincidence\">index of coincidence</a>, cryptanalysis includes more recent methods, like <a href=\"https://en.wikipedia.org/wiki/Linear_cryptanalysis\">linear cryptanalysis</a> or <a href=\"https://en.wikipedia.org/wiki/Differential_cryptanalysis\">differential cryptanalysis</a>, that can break more advanced ciphers.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Cryptanalysis\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Cryptographic hash function</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A cryptographic hash function, also sometimes called a <em>digest function</em>, is a <em>glossary(\"cryptography\", \"cryptographic\"</em>) primitive transforming a message of arbitrary size into a message of fixed size, called a <em>glossary(\"digest\"</em>). Cryptographic hash functions are used for authentication, <em>Glossary(\"digital signature\", \"digital signatures\"</em>), and <em>Glossary(\"HMAC\", \"message authentication codes\"</em>).</p>\n</blockquote>\n<p>To be used for cryptography, a hash function must have these qualities:</p>\n<ul>\n<li>quick to compute (because they are generated frequently)</li>\n<li>not invertible (each digest could come from a very large number of messages, and only brute-force can generate a message that leads to a given digest)</li>\n<li>tamper-resistant (any change to a message leads to a different digest)</li>\n<li>collision-resistant (it should be impossible to find two different messages that produce the same digest)</li>\n</ul>\n<p>Cryptographic hash functions such as MD5 and SHA-1 are considered broken, as attacks have been found that significantly reduce their collision resistance.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Cryptographic hash function\", \"Cryptographic hash function\"</em>) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Symmetric-key cryptography\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Cryptography</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Cryptography</strong>, or cryptology, is the science that studies how to encode and transmit messages securely. Cryptography designs and studies algorithms used to encode and decode messages in an insecure environment, and their applications.</p>\n</blockquote>\n<p>More than just <strong>data confidentiality</strong>, cryptography also tackles <strong>identification</strong>, <strong>authentication</strong>, <strong>non-repudiation</strong>, and <strong>data integrity</strong>. Therefore it also studies usage of cryptographic methods in context, <strong>cryptosystems</strong>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Cryptography\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/Security/Information_Security_Basics\">Information security tutorial</a></li>\n<li><a href=\"/en-US/docs/Archive/Security/Encryption_and_Decryption\">Encrypting and Decrypting</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Block cipher mode of operation\"</em>)</li>\n<li><em>Glossary(\"Cipher\"</em>)</li>\n<li><em>Glossary(\"Ciphertext\"</em>)</li>\n<li><em>Glossary(\"Cipher suite\"</em>)</li>\n<li><em>Glossary(\"Cryptanalysis\"</em>)</li>\n<li><em>Glossary(\"Cryptography\"</em>)</li>\n<li><em>Glossary(\"Decryption\"</em>)</li>\n<li><em>Glossary(\"Encryption\"</em>)</li>\n<li><em>Glossary(\"Key\"</em>)</li>\n<li><em>Glossary(\"Plaintext\"</em>)</li>\n<li><em>Glossary(\"Public-key cryptography\"</em>)</li>\n<li><em>Glossary(\"Symmetric-key cryptography\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  CSP</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>A CSP (<a href=\"/en-US/docs/Web/HTTP/CSP\">Content Security Policy</a>) is used to detect and mitigate certain types of website related attacks like <em>Glossary(\"Cross-site</em>scripting\"_), <a href=\"/en-US/docs/Glossary/Clickjacking\">clickjacking</a> and data injections.</p>\n</blockquote>\n<p>The implementation is based on an <em>Glossary(\"HTTP\"</em>) header called <em>HTTPHeader(\"Content-Security-Policy\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Content_Security_Policy\">Content Security Policy on Wikipedia</a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/CSP\">Content Security Policy documentation on MDN</a></li>\n</ul>\n<hr>\n<h2>Term:  CSRF</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>CSRF</strong> (Cross-Site Request Forgery) is an attack that impersonates a trusted user and sends a website unwanted commands.</p>\n</blockquote>\n<p>This can be done, for example, by including malicious parameters in a <em>glossary(\"URL\"</em>) behind a link that purports to go somewhere else:</p>\n<pre><code class=\"language-html\">&#x3C;img src=\"https://www.example.com/index.php?action=delete&#x26;id=123\">\n</code></pre>\n<p>For users who have modification permissions on <code>https://www.example.com</code>, the <code>&#x3C;img></code> element executes action on <code>https://www.example.com</code> without their noticing, even if the element is not at <code>https://www.example.com</code>.</p>\n<p>There are many ways to prevent CSRF, such as implementing <em>glossary(\"REST\", \"RESTful API\"</em>), adding secure tokens, etc.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Cross-site request forgery\"</em>) on Wikipedia</li>\n<li><a href=\"https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html\">Prevention measures</a></li>\n</ul>\n<hr>\n<h2>Term:  CSS pixel</h2>\n<ul>\n<li>CSS</li>\n<li>CSS Pixel</li>\n<li>Glossary</li>\n<li>height</li>\n<li>length</li>\n<li>pixel</li>\n<li>size</li>\n<li>unit</li>\n<li>\n<h2>width</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>CSS pixel</strong> is synonymous with the CSS unit of absolute length <em>px</em> — which is <a href=\"https://drafts.csswg.org/css-values/#absolute-lengths\">normatively defined</a> as being exactly 1/96th of 1 inch.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://hacks.mozilla.org/2013/09/css-length-explained/\">CSS Length Explained</a> on the MDN Hacks Blog</li>\n</ul>\n<hr>\n<h2>Term:  CSS preprocessor</h2>\n<ul>\n<li>CSS</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>CSS preprocessor</strong> is a program that lets you generate <em>Glossary(\"CSS\"</em>) from the preprocessor's own unique <em>Glossary(\"syntax\"</em>).</p>\n</blockquote>\n<p>There are many CSS preprocessors to choose from, however most CSS preprocessors will add some features that don't exist in pure CSS, such as mixin, nesting selector, inheritance selector, and so on. These features make the CSS structure more readable and easier to maintain.</p>\n<p>To use a CSS preprocessor, you must install a CSS compiler on your web <em>Glossary(\"server\"</em>); Or use the CSS preprocessor to compile on the development environment, and then upload compiled CSS file to the web server.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p>A few of most popular CSS preprocessors:</p>\n<ul>\n<li><a href=\"https://sass-lang.com/\">Sass</a></li>\n<li><a href=\"https://lesscss.org/\">LESS</a></li>\n<li><a href=\"https://stylus-lang.com/\">Stylus</a></li>\n<li><a href=\"https://postcss.org/\">PostCSS</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"CSS\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Selector (CSS)</h2>\n<ul>\n<li>CSS</li>\n<li>CSS Selector</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>Selector</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>CSS selector</strong> is the part of a CSS rule that describes what elements in a document the rule will match. The matching elements will have the rule's specified style applied to them.</p>\n</blockquote>\n<h2>Example</h2>\n<p>Consider this CSS:</p>\n<pre><code class=\"language-css\">p {\n  color: green;\n}\n\ndiv.warning {\n  width: 100%;\n  border: 2px solid yellow;\n  color: white;\n  background-color: darkred;\n  padding: 0.8em 0.8em 0.6em;\n}\n\n#customized {\n  font: 16px Lucida Grande, Arial, Helvetica, sans-serif;\n}\n</code></pre>\n<p>The selectors here are <code>\"p\"</code> (which applies the color green to the text inside any <em>HTMLElement(\"p\"</em>) element), <code>\"div.warning\"</code> (which makes any <em>HTMLElement(\"div\"</em>) element with the <em>Glossary(\"CSS class\", \"class\"</em>) <code>\"warning\"</code> look like a warning box), and <code>\"#customized\"</code>, which sets the base font of the element with the ID <code>\"customized\"</code> to 16-pixel tall Lucida Grande or one of a few fallback fonts.</p>\n<p>We can then apply this CSS to some HTML, such as:</p>\n<pre><code class=\"language-html\">&#x3C;p>This is happy text.&#x3C;/p>\n\n&#x3C;div class=\"warning\">\n  Be careful! There are wizards present, and they are quick to anger!\n&#x3C;/div>\n\n&#x3C;div id=\"customized\">\n  &#x3C;p>This is happy text.&#x3C;/p>\n\n  &#x3C;div class=\"warning\">\n    Be careful! There are wizards present, and they are quick to anger!\n  &#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<p>The resulting page content is styled like this:</p>\n<p><em>EmbedLiveSample(\"Example\", 640, 240</em>)</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/CSS/Building_blocks/Selectors\">Learn more about CSS selectors</a> in our introduction to CSS.</li>\n<li>\n<p>Basic selectors</p>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Type_selectors\">Type selectors</a> <code>elementname</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Class_selectors\">Class selectors</a> <code>.classname</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/ID_selectors\">ID selectors</a> <code>#idname</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Universal_selectors\">Universal selectors</a> <code>* ns|* *|*</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Attribute_selectors\">Attribute selectors</a> <code>[attr=value]</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Pseudo-classes\">State selectors</a> <code>a:active, a:visited</code></li>\n</ul>\n</li>\n<li>\n<p>Grouping selectors</p>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Selector_list\">Selector list</a> <code>A, B</code></li>\n</ul>\n</li>\n<li>\n<p>Combinators</p>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Adjacent_sibling_combinator\">Adjacent sibling selectors</a> <code>A + B</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/General_sibling_combinator\">General sibling selectors</a> <code>A ~ B</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Child_combinator\">Child selectors</a> <code>A > B</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Descendant_combinator\">Descendant selectors</a> <code>A B</code></li>\n</ul>\n</li>\n<li>\n<p>Pseudo</p>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Pseudo-classes\">Pseudo classes</a> <code>:</code></li>\n<li><a href=\"/en-US/docs/Web/CSS/Pseudo-elements\">Pseudo elements</a> <code>::</code></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Media (CSS)</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>\n<h2>Media</h2>\n</li>\n</ul>\n<blockquote>\n<p>In the context of <em>Glossary(\"CSS\"</em>) (Cascading Style Sheets), the term <strong><em>media</em></strong> refers to the destination to which the document is to be drawn by the <em>Glossary(\"rendering engine\"</em>).</p>\n</blockquote>\n<p>Typically, this is a screen—but it may also be a printer, Braille display, or another type of device.</p>\n<p>CSS offers several features that allow you to tweak your document's styles—or even offer different styles—according to the media <strong>type</strong> (such as screen or print, to name two) or media <strong>capabilities</strong> (such as width, resolution, or other values) of the viewer's device.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Media_Queries/Using_media_queries\">Using media queries</a></li>\n<li><a href=\"/en-US/docs/Web/CSS/Media_Queries\">Media queries</a></li>\n<li><em>cssxref(\"@media\"</em>) <a href=\"/en-US/docs/Web/CSS/At-rule\">at-rule</a>: Conditionally apply part of a <a href=\"/en-US/docs/Learn/CSS/First_steps/How_CSS_works#how_to_apply_your_css_to_your_html\">stylesheet</a>, based on the result of a media query.</li>\n<li><em>domxref(\"Window.matchMedia()\"</em>): Test the viewing device against a media query</li>\n</ul>\n<hr>\n<h2>Term:  CSS Object Model (CSSOM)</h2>\n<ul>\n<li>CSS</li>\n<li>CSSOM</li>\n<li>DOM</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <a href=\"/en-US/docs/Web/API/CSS_Object_Model\"><strong>CSS Object Model (CSSOM)</strong></a> is a set of APIs for reading and modifying a document’s style-related (CSS) information. In other words, similar to the way in which the <a href=\"/en-US/docs/Web/API/Document_Object_Model\">DOM</a> enables a document’s structure and content to be read and modified from JavaScript, the CSSOM allows the document’s styling to be read and modified from JavaScript.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/How_browsers_work\">Populating the page: how browsers work</a></li>\n</ul>\n<hr>\n<h2>Term:  Data structure</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Data structure</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Data structure</strong> is a particular way of organizing <em>data</em> so that it can be used efficiently.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Data</em>structure\", \"Data structure\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Database</h2>\n<ul>\n<li>Database</li>\n<li>Glossary</li>\n<li>\n<h2>Sql</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>database</strong> is a storing system that collects organized data, to make some works easier like searching, structure, and extend.</p>\n</blockquote>\n<p>In web development, most databases use the relational database management system (RDBMS) to organize data and programming in <em>glossary(\"SQL\"</em>). Some databases, however, don't follow the former mechanism to organized data, which called NoSQL.</p>\n<p>Some famous server-side RDBMS are <em>MySQL</em>(or <em>MariaDB</em> which is a fork of it), <em>SQL Server</em>, and <em>Oracle Database</em>. On the other hand, some famous NoSQL examples are <em>MongoDB</em>, <em>Cassandra</em>, and <em>Redis</em>.</p>\n<p>Browsers also have their own database system called <em>glossary(\"IndexedDB\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Database\"</em>) on Wikipedia</li>\n<li>\n<p>Glossary</p>\n<ul>\n<li><em>Glossary(\"IndexedDB\"</em>)</li>\n<li><em>Glossary(\"SQL\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Decryption</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>glossary(\"cryptography\"</em>), <strong>decryption</strong> is the conversion of <em>glossary(\"ciphertext\"</em>) into <em>glossary(\"Plaintext\"</em>).</p>\n</blockquote>\n<p>Decryption is a cryptographic primitive: it transforms a ciphertext message into plaintext using a cryptographic algorithm called a <em>glossary(\"cipher\"</em>). Like encryption, decryption in modern ciphers is performed using a specific algorithm and a secret, called the <em>glossary(\"key\"</em>). Since the algorithm is often public, the key must stay secret if the encryption stays secure.</p>\n<p><img src=\"decryption.png\" alt=\"The decryption primitive.\"></p>\n<p>Decryption is the reverse of <em>glossary(\"encryption\"</em>) and if the key stays secret, decryption without knowing the specific secret, decryption is mathematically hard to perform. How hard depends on the security of the cryptographic algorithm chosen and evolves with the progress of <em>glossary(\"cryptanalysis\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Encryption_and_Decryption\">Encryption and Decryption</a></li>\n</ul>\n<hr>\n<h2>Term:  Delta</h2>\n<ul>\n<li>Delta</li>\n<li>Glossary</li>\n<li>difference</li>\n<li>\n<h2>value</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>delta</strong> refers to the difference between two values or states.</p>\n</blockquote>\n<p>The name originates from the Greek letter Δ (delta), which is equivalent to the letter <em>D</em> in the Roman alphabet. <em>Delta</em> refers to the use of the letter Δ as a shorthand for <em>difference</em>.</p>\n<p>The term <em>delta</em> is commonly used when communicating changes in speed, position, or acceleration of a physical or virtual object. It's also used when describing changes in the volume or frequency of sound waves.</p>\n<p>For example, when describing how far an object on the screen moves left-to-right, one might use the term <em>delta x</em> or <em>Δx</em>.</p>\n<p>Likewise, given the new value of <em>X</em> and its old value, you might compute the delta like this:</p>\n<pre><code class=\"language-js\">let deltaX = newX - oldX;\n</code></pre>\n<p>More commonly, you receive the delta and use it to update a saved previous condition:</p>\n<pre><code class=\"language-js\">let newX = oldX + deltaX;\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li>Mouse wheel events (<em>domxref(\"WheelEvent\"</em>) offer the amount the wheel moved since the last event in its <em>domxref(\"WheelEvent.deltaX\", \"deltaX\"</em>), <em>domxref(\"WheelEvent.deltaY\", \"deltaY\"</em>), and <em>domxref(\"WheelEvent.deltaZ\", \"deltaZ\"</em>) properties, for example.</li>\n</ul>\n<hr>\n<h2>Term:  Denial of Service</h2>\n<ul>\n<li>Attack</li>\n<li>Denial of Service</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>See <a href=\"/en-US/docs/Glossary/DOS_attack\">DoS attack</a> for more information.</p>\n</blockquote>\n<hr>\n<h2>Term:  Descriptor (CSS)</h2>\n<ul>\n<li>CSS</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>CSS descriptor</strong> defines the characteristics of an <em>cssxref(\"at-rule\"</em>). At-rules may have one or multiple descriptors. Each descriptor has:</p>\n</blockquote>\n<ul>\n<li>A name</li>\n<li>A value, which holds the component values</li>\n<li>An \"!important\" flag, which in its default state is unset</li>\n</ul>\n<hr>\n<h2>Term:  Deserialization</h2>\n<ul>\n<li>Deserialization</li>\n<li>Deserialize</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>The process whereby a lower-level format (e.g. that has been transferred over a network, or stored in a data store) is translated into a readable object or other data structure.</p>\n</blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), for example, you can deserialize a <em>Glossary(\"JSON\"</em>) <em>Glossary(\"string\"</em>) to an object by calling the <em>Glossary(\"function\"</em>) <em>jsxref(\"JSON.parse()\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Serialization\">Serialization</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Developer Tools</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Developer Tools</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Developer tools (or \"development tools\" or short \"DevTools\") are programs that allow a developer to create, test and debug software.</p>\n</blockquote>\n<p>Current browsers provide integrated developer tools, which allow to inspect a website. They let users inspect and debug the page's <em>Glossary(\"HTML\"</em>), <em>Glossary(\"CSS\"</em>), and <em>Glossary(\"JavaScript\"</em>), allow to inspect the network traffic it causes, make it possible to measure it's performance, and much more.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Web development tools\", \"Web development tools\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Tools\">Firefox Developer Tools</a> on MDN</li>\n<li><a href=\"https://getfirebug.com/\">Firebug</a> (former developer tool for Firefox)</li>\n<li><a href=\"https://developer.chrome.com/devtools\">Chrome DevTools</a> on chrome.com</li>\n<li><a href=\"https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007874-CH1-SW1\">Safari Web Inspector</a> on apple.com</li>\n<li><a href=\"https://docs.microsoft.com/en-us/microsoft-edge/f12-devtools-guide\">Edge Dev Tools</a> on microsoft.com</li>\n</ul>\n<hr>\n<h2>Term:  DHTML</h2>\n<ul>\n<li>CodingScripting</li>\n<li>DHTML</li>\n<li>Glossary</li>\n<li>\n<h2>HTML</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>DHTML</strong> (Dynamic <em>glossary(\"HTML\"</em>)) refers to the code behind interactive webpages that need no plugins like <em>Glossary(\"Adobe Flash\",\"Flash\"</em>) or <em>Glossary(\"Java\"</em>). DHTML aggregates the combined functionality of <em>Glossary(\"HTML\"</em>), <em>Glossary(\"CSS\"</em>), the <em>Glossary(\"DOM\"</em>), and <em>Glossary(\"JavaScript\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Dynamic HTML\", \"DHTML\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Digest</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>digest</strong> is a small value generated by a <em>glossary(\"cryptographic hash function\", \"hash function\"</em>) from a whole message. Ideally, a digest is quick to calculate, irreversible, and unpredictable, and therefore indicates whether someone has tampered with a given message.</p>\n</blockquote>\n<p>A digest can be used to perform several tasks:</p>\n<ul>\n<li>in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files)</li>\n<li>verify message integrity (a tampered message will have a different hash)</li>\n<li>store passwords so that they can't be retrieved, but can still be checked (To do this securely, you also need to salt the password.)</li>\n<li>generate pseudo-random numbers</li>\n<li>generate <em>glossary(\"key\",\"keys\"</em>)</li>\n</ul>\n<p>It is critical to choose the proper hash function for your use case to avoid collisions and predictability.</p>\n<h4>See also</h4>\n<ul>\n<li>See <em>glossary(\"Cryptographic hash function\"</em>)</li>\n<li><em>interwiki(\"wikipedia\", \"Cryptographic</em>hash<em>function\", \"Hash function\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Digital certificate</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A digital certificate is a data file that binds a publicly known <em>Glossary(\"Key\", \"cryptographic key\"</em>) to an organization.</p>\n</blockquote>\n<p>A digital certificate contains information about an organization, such as the common name (e.g., mozilla.org), the organization unit (e.g., Mozilla Corporation), and the location (e.g., Mountain View). Digital certificates are most commonly signed by a <em>Glossary(\"certificate authority\"</em>), attesting to the certificate's authenticity.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Public</em>key<em>certificate\", \"Digital certificate \"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Distributed Denial of Service</h2>\n<ul>\n<li>Attack</li>\n<li>DDoS</li>\n<li>Denial of Service</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A Distributed Denial-of-Service (DDoS) is an attack in which many compromised systems are made to attack a single target, in order to swamp server resources and block legitimate users.</p>\n</blockquote>\n<p>Normally many persons, using many bots, attack high-profile Web <em>glossary(\"server\",\"servers\"</em>) like banks or credit-card payment gateways. DDoS concerns computer networks and CPU resource management.</p>\n<p>In a typical DDoS attack, the assailant begins by exploiting a vulnerability in one computer system and making it the DDoS master. The attack master, also known as the botmaster, identifies and infects other vulnerable systems with malware. Eventually, the assailant instructs the controlled machines to launch an attack against a specified target.</p>\n<p>There are two types of DDoS attacks: a network-centric attack (which overloads a service by using up bandwidth) and an application-layer attack (which overloads a service or database with application calls). The overflow of data to the target causes saturation in the target machine so that it cannot respond or responds very slowly to legitimate traffic (hence the name \"denial of service\"). The infected computers' owners normally don't know that their computers have been compromised, and they also suffer loss of service.</p>\n<p>A computer under an intruder's control is called a zombie or bot. A network of co-infected computers is known as a botnet or a zombie army. Both Kaspersky Labs and Symantec have identified botnets -- not spam, viruses, or worms -- as the biggest threat to Internet security.</p>\n<p>The United States Computer Emergency Readiness Team (US-CERT) defines symptoms of denial-of-service attacks to include:</p>\n<ul>\n<li>Unusually slow network performance (opening files or accessing websites)</li>\n<li>Unavailability of a particular website</li>\n<li>Inability to access any website</li>\n<li>Dramatic increase in the number of spam emails received—(this type of DoS attack is considered an email bomb)</li>\n<li>Disconnection of a wireless or wired internet connection</li>\n<li>Longterm denial of access to the Web or any internet services</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Denial-of-service</em>attack\", \"Denial-of-service attack\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  DMZ</h2>\n<ul>\n<li>Glossary</li>\n<li>Networking</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>DMZ</strong> (DeMilitarized Zone) is a way to provide an insulated secure interface between an internal network (corporate or private) and the outside untrusted world — usually the Internet.</p>\n</blockquote>\n<p>It exposes only certain defined endpoints, while denying access to the internal network from <em>Glossary('node/networking', 'external nodes'</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"DMZ (computing)\", \"DMZ\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  DNS</h2>\n<ul>\n<li>DNS</li>\n<li>Domain Name System</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>DNS</strong> (Domain Name System) is a hierarchical and decentralized naming system for Internet connected resources. DNS maintains a list of <em>Glossary(\"domain name\",\"domain names\"</em>) along with the resources, such as IP addresses, that are associated with them.</p>\n</blockquote>\n<p>The most prominent function of DNS is the translation of human-friendly domain names (such as mozilla.org) to a numeric <em>Glossary(\"IP address\"</em>) (such as 151.106.5.172); this process of mapping a domain name to the appropriate IP address is known as a <strong>DNS lookup</strong>. By contrast, a <strong>reverse DNS lookup</strong> (rDNS) is used to determine the domain name associated with an IP address.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/What_is_a_domain_name\">Understanding domain names</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Domain</em>Name<em>System\", \"Domain Name System\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Doctype</h2>\n<ul>\n<li>Browser</li>\n<li>CodingScripting</li>\n<li>DOCTYPE</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"HTML\"</em>), the doctype is the required \"<code>&#x3C;!DOCTYPE html></code>\" preamble found at the top of all documents. Its sole purpose is to prevent a <em>Glossary(\"browser\"</em>) from switching into so-called <a href=\"/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode\">“quirks mode”</a> when rendering a document; that is, the \"<code>&#x3C;!DOCTYPE html></code>\" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://html.spec.whatwg.org/multipage/syntax.html#the-doctype\">Definition of the DOCTYPE in the HTML specification</a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode\">Quirks Mode and Standards Mode</a></li>\n<li><a href=\"/en-US/docs/Web/API/Document/doctype\">Document.doctype</a>, a JavaScript method that returns the doctype</li>\n</ul>\n<hr>\n<h2>Term:  Document directive</h2>\n<ul>\n<li>CSP</li>\n<li>Directive</li>\n<li>Document</li>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong><em>Glossary(\"CSP\"</em>) document directives</strong> are used in a <em>HTTPHeader(\"Content-Security-Policy\"</em>) header and govern the properties of a document or <a href=\"/en-US/docs/Web/API/Web_Workers_API\">worker</a> environment to which a policy applies.</p>\n</blockquote>\n<p>Document directives don't fall back to the <em>CSP(\"default-src\"</em>) directive.</p>\n<p>See <a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#document_directives\">Document directives</a> for a complete list.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"CSP\"</em>)</li>\n<li><em>Glossary(\"Reporting directive\"</em>)</li>\n<li><em>Glossary(\"Fetch directive\"</em>)</li>\n<li><em>Glossary(\"Navigation directive\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Reference</p>\n<ul>\n<li><a href=\"https://www.w3.org/TR/CSP/#directives-document\">https://www.w3.org/TR/CSP/#directives-document</a></li>\n<li><em>HTTPHeader(\"Content-Security-Policy/upgrade-insecure-requests\", \"upgrade-insecure-requests\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Security-Policy/block-all-mixed-content\", \"block-all-mixed-content\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Security-Policy/require-sri-for\", \"require-sri-for\"</em>) <em>Deprecated</em>Inline}}</li>\n<li><em>HTTPHeader(\"Content-Security-Policy\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  document environment</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>When the JavaScript global environment is a window or an iframe, it is called a <em>document environment</em>. A global environment is an environment that doesn't have an outer environment.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://html.spec.whatwg.org/multipage/webappapis.html#document-environment\">document environment</a> in the HTML specification</li>\n</ul>\n<hr>\n<h2>Term:  Domain name</h2>\n<ul>\n<li>Domain Name</li>\n<li>Glossary</li>\n<li>Protocol</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>domain name</strong> is a website's address on the <em>Glossary(\"Internet\"</em>). Domain names are used in <em>Glossary(\"URL\",\"URLs\"</em>) to identify to which server belong a specific webpage. The domain name consists of a hierarchical sequence of names (labels) separated by periods (dots) and ending with an <em>glossary(\"TLD\",\"extension\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Domain</em>name\", \"Domain name\"_) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/Common_questions/What_is_a_domain_name\">Understanding domain names</a></li>\n</ul>\n<hr>\n<h2>Term:  Domain sharding</h2>\n<ul>\n<li>DNS</li>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Reference</li>\n<li>Web Performance</li>\n<li>\n<h2>latency</h2>\n</li>\n</ul>\n<blockquote>\n<p>Browsers limit the number of active connections for each domain. To enable concurrent downloads of assets exceeding that limit, <strong>domain sharding</strong> splits content across multiple subdomains. When multiple domains are used to serve multiple assets, browsers are able to download more resources simultaneously, resulting in a faster page load time and improved user experience.</p>\n</blockquote>\n<p>The problem with domain sharding, in terms of performance, is the cost of extra DNS lookups for each domain and the overhead of establishing each TCP connection.</p>\n<p>The initial response from an HTTP request is generally an HTML file listing other resources such as JavaScript, CSS, images and other media files that need to be downloaded. As browsers limit the number of active connections per domain, serving all the required resources from a single domain could be slow as assets need to be downloaded sequentially. With domain sharding, the required downloads are served from more than one domain, enabling the browser to simultaneously download needed resources. Multiple domains, however, is an anti-pattern, as DNS lookups slow initial load times.</p>\n<p>HTTP2 supports unlimited concurrent requests making domain sharding an obsolete requirement when HTTP/2 is enabled.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Glossary(\"TLS\"</em>)</li>\n<li><a href=\"/en-US/docs/Glossary/DNS\">DNS</a></li>\n<li><a href=\"/en-US/docs/Glossary/HTTP_2\">HTTP/2</a></li>\n</ul>\n<hr>\n<h2>Term:  Domain</h2>\n<ul>\n<li>Browser</li>\n<li>Domain</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Networking</h2>\n</li>\n</ul>\n<blockquote>\n<p>A domain is an authority within the internet that controls its own resources. Its \"domain name\" is a way to address this authority as part of the hierarchy in a <em>Glossary(\"URL\"</em>) - usually the most memorable part of it, for instance a brand name.</p>\n</blockquote>\n<p>A fully qualified domain name (FQDN) contains all necessary parts to look up this authority by name unambiguously using the <em>Glossary(\"DNS\"</em>) system of the internet.</p>\n<p>For example, in \"developer.mozilla.org\":</p>\n<ol>\n<li>\"org\" is called a <em>interwiki(\"wikipedia\", \"Top-level</em>domain\", \"top-level domain\"<em>). They are registered as an internet standard by the _interwiki(\"wikipedia\", \"Internet</em>Assigned<em>Numbers</em>Authority\", \"IANA\"<em>) . Here, \"org\" means \"organization\" which is defined in a top-level _domain registry</em>.</li>\n<li>\"mozilla\" is the domain. If you like to own a domain you have to register it with one of the many <em>interwiki(\"wikipedia\", \"Domain</em>name<em>registrar\", \"registrars\"</em>) who are allowed to do so with a top-level domain registry.</li>\n<li>\"developer\" is a \"sub-domain\", something you as the owner of a domain may define yourself. Many owners choose to have a subdomain \"www\" to point to their <em>Glossary(\"World</em>Wide<em>Web\"</em>) resource, but that's not required (and has even fallen somewhat out of favor).</li>\n</ol>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Domain</em>name\", \"Domain Name\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Dominator</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>In graph theory, node A dominates node B if every path from the root node to B passes through A.</p>\n</blockquote>\n<p>This concept is important for <em>Glossary(\"garbage collection\"</em>) because it means that B is only reachable through A. So if the garbage collector found A to be unreachable and eligible for reclaiming, than B would also be unreachable and eligible for reclaiming. So objects that A dominates contribute to the retained size of A: that is, the total amount of memory that could be freed if A itself were freed.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Dominator (graph theory)\", \"Dominator\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Tools/Memory/Dominators\">Dominators</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection\">Garbage collection</a></li>\n</ul>\n<hr>\n<h2>Term:  DOM (Document Object Model)</h2>\n<ul>\n<li>CodingScripting</li>\n<li>DOM</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>DOM</strong> (Document Object Model) is an <em>glossary(\"API\"</em>) that represents and interacts with any <em>glossary(\"HTML\"</em>) or <em>glossary(\"XML\"</em>) document. The DOM is a document model loaded in the <em>glossary(\"browser\"</em>) and representing the document as a node tree, where each node represents part of the document (e.g. an <em>Glossary(\"element\"</em>), text string, or comment).</p>\n</blockquote>\n<p>The DOM is one of the most-used <em>Glossary(\"API\"</em>)s on the <em>glossary(\"World Wide Web\",\"Web\"</em>) because it allows code running in a browser to access and interact with every node in the document. Nodes can be created, moved and changed. Event listeners can be added to nodes and triggered on occurrence of a given event.</p>\n<p>DOM was not originally specified—it came about when browsers began implementing <em>Glossary(\"JavaScript\"</em>). This legacy DOM is sometimes called DOM 0. Today, the WHATWG maintains the DOM Living Standard.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Document</em>Object<em>Model\", \"The Document Object Model\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/Document_Object_Model\">The DOM documentation on MDN</a></li>\n<li><a href=\"https://dom.spec.whatwg.org/\">The DOM Standard</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"API\"</em>)</li>\n<li><em>Glossary(\"HTML\"</em>)</li>\n<li><em>Glossary(\"XML\"</em>)</li>\n<li><em>Glossary(\"World Wide Web\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  DoS attack</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>DoS (Denial of Service) is a network attack that prevents legitimate use of <em>glossary(\"server\"</em>) resources by flooding the server with requests.</p>\n</blockquote>\n<p>There are also Distributed Denial of Service (DDoS) Attacks in which a multitude of servers are used to exhaust the computing capacity of an attacked computer.</p>\n<h3>Types of DoS attack</h3>\n<p>DoS attacks are more of a category than a particular kind of attack. Here is a non-exhaustive list of DoS attack types:</p>\n<ul>\n<li>bandwidth attack</li>\n<li>service request flood</li>\n<li>SYN flooding attack</li>\n<li>ICMP flood attack</li>\n<li>peer-to-peer attack</li>\n<li>permanent DoS attack</li>\n<li>application level flood attack</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Denial-of-service</em>attack\", \"Denial-of-service attack\"_) on Wikipedia</li>\n<li><a href=\"https://www.owasp.org/index.php/Denial_of_Service\">Denial-of-service on OWASP</a></li>\n<li><em>Glossary(\"Distributed Denial of Service\",\"DDoS\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  DTLS (Datagram Transport Layer Security)</h2>\n<ul>\n<li>DTLS</li>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Datagram Transport Layer Security</strong> (<strong>DTLS</strong>) is a protocol used to secure datagram-based communications. It's based on the stream-focused Transport Layer Security (<em>Glossary(\"TLS\"</em>)), providing a similar level of security. As a datagram protocol, DTLS doesn't guarantee the order of message delivery, or even that messages will be delivered at all. However, DTLS gains the benefits of datagram protocols, too; in particular, the lower overhead and reduced latency.</p>\n</blockquote>\n<p>These features are especially useful for one of the most common areas in which DTLS comes into play: <em>Glossary(\"WebRTC\"</em>). All of the WebRTC related protocols are required to encrypt their communications using DTLS; this includes <em>Glossary(\"SCTP\"</em>), <em>Glossary(\"RTP\", \"SRTP\"</em>), and <em>Glossary(\"STUN\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Datagram Transport Layer Security\"</em>) on Wikipedia</li>\n<li>\n<p>Specifications:</p>\n<ul>\n<li><em>RFC(6347, \"Datagram Transport Layer Security Version 1.2\"</em>)</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/draft-ietf-tls-dtls13\">Datagram Transport Layer Security Protocol Version 1.3 <em>draft specification</em></a></li>\n</ul>\n</li>\n<li>\n<p>Related specification</p>\n<ul>\n<li><em>RFC(5763, \"Framework for Establishing a Secure Real-time Transport Protocol (SRTP) Security Context Using DTLS\"</em>)</li>\n<li><em>RFC(5764, \"DTLS Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)\"</em>)</li>\n<li><em>RFC(6083, \"DTLS for Stream Control Transmission Protocol (SCTP)\"</em>)</li>\n<li><em>RFC(8261, \"Datagram Transport Layer Security (DTLS) Encapsulation of SCTP Packets\"</em>)</li>\n<li><em>RFC(7350, \"Datagram Transport Layer Security (DTLS) as Transport for Session Traversal Utilities for NAT (STUN)\"</em>)</li>\n<li><em>RFC(7925, \"TLS / DTLS Profiles for the Internet of Things\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  DTMF (Dual-Tone Multi-Frequency signaling)</h2>\n<ul>\n<li>DTMF</li>\n<li>Glossary</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Dual-Tone Multi-Frequency</strong> (<strong>DTMF</strong>) signaling is a system by which audible tones are used to represent buttons being pressed on a keypad. Frequently referred to in the United States as \"touch tone\" (after the Touch-Tone trademark used when the transition from pulse dialing to DTMF began), DTMF makes it possible to signal the digits 0-9 as well as the letters \"A\" through \"D\" and the symbols \"#\" and \"*\". Few telephone keypads include the letters, which are typically used for control signaling by the telephone network.</p>\n</blockquote>\n<p>Computers may make use of DTMF when dialing a modem, or when sending commands to a menu system for teleconferencing or other purposes.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Dual-tone multi-frequency signaling\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Pulse dialing\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Dynamic typing</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>ProgrammingLanguage</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Dynamically-typed languages</strong> are those (like <em>glossary(\"JavaScript\"</em>)) where the interpreter assigns <em>glossary(\"variable\",\"variables\"</em>) a <em>glossary(\"type\"</em>) at runtime based on the variable's <em>glossary(\"value\"</em>) at the time.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types and data structures</a></li>\n<li><em>interwiki(\"wikipedia\", \"Type</em>system#DYNAMIC\", \"Type system\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  ECMA</h2>\n<ul>\n<li>Glossary</li>\n<li>Stub</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Ecma International</strong> (formally <em>European Computer Manufacturers Association</em>) is a non-profit organization that develops standards in computer hardware, communications, and programming languages.</p>\n</blockquote>\n<p>On the web it is famous for being the organization which maintain <a href=\"https://www.ecma-international.org/publications/standards/Ecma-262.htm\">the ECMA-262 specification</a> (aka. <em>Glossary(\"ECMAScript\"</em>)) which is the core specification for the <em>Glossary(\"JavaScript\"</em>) language.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Ecma</em>International\", \"Ecma International\"_) on Wikipedia</li>\n<li><a href=\"https://www.ecma-international.org/\">The Ecma International web site</a></li>\n</ul>\n<hr>\n<h2>Term:  ECMAScript</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>ECMAScript</strong> is a scripting language specification on which <em>glossary(\"JavaScript\"</em>) is based. <a href=\"https://www.ecma-international.org\">Ecma International</a> is in charge of standardizing ECMAScript.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"ECMAScript\"</em>) on Wikipedia</li>\n<li><a href=\"http://www.ecmascript.org/\">ECMAScript</a></li>\n</ul>\n<hr>\n<h2>Term:  Effective connection type</h2>\n<ul>\n<li>Glossary</li>\n<li>Navigator</li>\n<li>Network Information API</li>\n<li>NetworkInformation</li>\n<li>Performance</li>\n<li>Reference</li>\n<li>Web Performance</li>\n<li>connect</li>\n<li>effective connection type</li>\n<li>\n<h2>effectiveType</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Effective connection type</strong> (ECT) refers to the measured network performance, returning a cellular connection type, like 3G, even if the actual connection is tethered broadband or WiFi, based on the time between the browser requesting a page and effective type of the connection.</p>\n</blockquote>\n<p>The values of '<code>slow-2g</code>', '<code>2g</code>', '<code>3g</code>', and '<code>4g</code>' are determined using observed round-trip times and downlink values.</p>\n<table>\n<thead>\n<tr>\n<th>ECT</th>\n<th>Minimum <a href=\"/en-US/docs/Glossary/Round_Trip_Time_(RTT)\">RTT</a></th>\n<th>Maximum downlink</th>\n<th>Explanation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><em><code>slow-2g</code></em></td>\n<td>2000ms</td>\n<td>50 Kbps</td>\n<td>The network is suited for small transfers only such as text-only pages.</td>\n</tr>\n<tr>\n<td><em><code>2g</code></em></td>\n<td>1400ms</td>\n<td>70 Kbps</td>\n<td>The network is suited for transfers of small images.</td>\n</tr>\n<tr>\n<td><em><code>3g</code></em></td>\n<td>270ms</td>\n<td>700 Kbps</td>\n<td>The network is suited for transfers of large assets such as high resolution images, audio, and SD video.</td>\n</tr>\n<tr>\n<td><em><code>4g</code></em></td>\n<td>0ms</td>\n<td>∞</td>\n<td>The network is suited for HD video, real-time video, etc.</td>\n</tr>\n</tbody>\n</table>\n<p><a href=\"/en-US/docs/Web/API/NetworkInformation/effectiveType\">effectiveType</a> is a property of the <a href=\"/en-US/docs/Web/API/Network_Information_API\">Network Information API</a>, exposed to JavaScript via the <a href=\"/en-US/docs/Web/API/Navigator/connection\">navigator.connection</a> object. To see your effective connection type, open the console of the developer tools of a supporting browser and enter the following:</p>\n<pre><code class=\"language-js\">navigator.connection.effectiveType;\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Network_Information_API\">Network Information API</a></li>\n<li><em>domxref('NetworkInformation'</em>)</li>\n<li><em>domxref('NetworkInformation.effectiveType'</em>)</li>\n<li><em>HTTPHeader(\"ECT\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Element</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>HTML</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>element</strong> is a part of a webpage. In <em>glossary(\"XML\"</em>) and <em>glossary(\"HTML\"</em>), an element may contain a data item or a chunk of text or an image, or perhaps nothing. A typical element includes an opening tag with some <em>glossary(\"attribute\", \"attributes\"</em>), enclosed text content, and a closing tag.</p>\n</blockquote>\n<p><img src=\"anatomy-of-an-html-element.png\" alt=\"Example: in <p class=&#x22;nice&#x22;>Hello world!</p>, &#x27;<p class=&#x22;nice&#x22;>&#x27; is an opening tag, &#x27;class=&#x22;nice&#x22;&#x27; is an attribute and its value, &#x27;Hello world!&#x27; is enclosed text content, and &#x27;</p>&#x27; is a closing tag.\"></p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started\">Getting started with HTML</a></li>\n<li><a href=\"/en-US/docs/Web/Web_Components/Using_custom_elements\">Defining custom elements</a></li>\n<li>The <em>domxref(\"Element\"</em>) interface, representing an element in the DOM.</li>\n</ul>\n<hr>\n<h2>Term:  Empty element</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Intermediate</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>empty element</strong> is an <em>Glossary(\"element\"</em>) from HTML, SVG, or MathML that <strong>cannot</strong> have any child nodes (i.e., nested elements or text nodes).</p>\n</blockquote>\n<p>The <a href=\"https://html.spec.whatwg.org/multipage/\">HTML</a>, <a href=\"https://www.w3.org/TR/SVG2/\">SVG</a>, and <a href=\"https://www.w3.org/TR/MathML3/\">MathML</a> specifications define very precisely what each element can contain. Many combinations have no semantic meaning, for example an <em>HTMLElement(\"audio\"</em>) element nested inside an <em>HTMLElement(\"hr\"</em>) element.</p>\n<p>In HTML, using a closing tag on an empty element is usually invalid. For example, <code>&#x3C;input type=\"text\">&#x3C;/input></code> is invalid HTML.</p>\n<p>The empty elements in HTML are as follows:</p>\n<ul>\n<li><em>HTMLElement(\"area\"</em>)</li>\n<li><em>HTMLElement(\"base\"</em>)</li>\n<li><em>HTMLElement(\"br\"</em>)</li>\n<li><em>HTMLElement(\"col\"</em>)</li>\n<li><em>HTMLElement(\"embed\"</em>)</li>\n<li><em>HTMLElement(\"hr\"</em>)</li>\n<li><em>HTMLElement(\"img\"</em>)</li>\n<li><em>HTMLElement(\"input\"</em>)</li>\n<li><em>HTMLElement(\"keygen\"</em>)(HTML 5.2 Draft removed)</li>\n<li><em>HTMLElement(\"link\"</em>)</li>\n<li><em>HTMLElement(\"meta\"</em>)</li>\n<li><em>HTMLElement(\"param\"</em>)</li>\n<li><em>HTMLElement(\"source\"</em>)</li>\n<li><em>HTMLElement(\"track\"</em>)</li>\n<li><em>HTMLElement(\"wbr\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Encapsulation</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Encapsulation is the packing of data and <em>glossary(\"function\",\"functions\"</em>) into one component (for example, a <em>glossary(\"class\"</em>)) and then controlling access to that component to make a \"blackbox\" out of the <em>glossary(\"object\"</em>). Because of this, a user of that class only needs to know its interface (that is, the data and functions exposed outside the class), not the hidden implementation.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming)\">Encapsulation</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Encryption</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>glossary(\"cryptography\"</em>), <strong>encryption</strong> is the conversion of <em>glossary(\"plaintext\"</em>) into a coded text or <em>glossary(\"ciphertext\"</em>). A ciphertext is intended to be unreadable by unauthorized readers.</p>\n</blockquote>\n<p>Encryption is a cryptographic primitive: it transforms a plaintext message into a ciphertext using a cryptographic algorithm called a <em>glossary(\"cipher\"</em>). Encryption in modern ciphers is performed using a specific algorithm and a secret, called the <em>glossary(\"key\"</em>). Since the algorithm is often public, the key must stay secret if the encryption stays secure.</p>\n<p><img src=\"encryption.png\" alt=\"How encryption works.\"></p>\n<p>Without knowing the secret, the reverse operation, <em>glossary(\"decryption\"</em>), is mathematically hard to perform. How hard depends on the security of the cryptographic algorithm chosen and evolves with the progress of <em>glossary(\"cryptanalysis\"</em>).</p>\n<hr>\n<h2>Term:  Endianness</h2>\n<ul>\n<li>Coding</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Endian</strong> and <strong>endianness</strong> (or \"byte-order\") describe how computers organize the bytes that make up numbers.</p>\n</blockquote>\n<p>Each memory storage location has an index or address. Every byte can store an 8-bit number (i.e. between <code>0x00</code> and <code>0xff</code>), so you must reserve more than one byte to store a larger number. By far the most common <em>ordering</em> of multiple bytes in one number is the <strong>little-endian</strong>, which is used on all Intel processors. Little-endian means storing bytes in order of least-to-most-significant (where the least significant byte takes the first or lowest address), comparable to a common European way of writing dates (e.g., 31 December 2050).</p>\n<p>Naturally, <strong>big-endian</strong> is the opposite order, comparable to an ISO date (2050-12-31). Big-endian is also often called \"network byte order\", because Internet standards usually require data to be stored big-endian, starting at the standard UNIX socket level and going all the way up to standardized Web binary data structures. Also, older Mac computers using 68000-series and PowerPC microprocessors formerly used big-endian.</p>\n<p>Examples with the number <code>0x12345678</code> (i.e. 305 419 896 in decimal):</p>\n<ul>\n<li><em>little-endian</em>: <code>0x78 0x56 0x34 0x12</code></li>\n<li><em>big-endian</em>: <code>0x12 0x34 0x56 0x78</code></li>\n<li><em>mixed-endian</em> (historic and very rare): <code>0x34 0x12 0x78 0x56</code></li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>jsxref(\"ArrayBuffer\"</em>)</li>\n<li><em>jsxref(\"DataView\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Typed_arrays\">Typed Arrays</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Endianness\"</em>) (Wikipedia)</li>\n<li><em>Glossary(\"Data structure\"</em>) (Glossary)</li>\n</ul>\n<hr>\n<h2>Term:  Engine</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>glossary(\"JavaScript\"</em>) engine is an interpreter that parses and executes a JavaScript program.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"JavaScript engine\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Entity header</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<blockquote>\n<p><strong>Warning:</strong> The current HTTP/1.1 specification no longer refers to entities, entity headers or entity-body. Some of the fields are now referred to as <em>glossary(\"Representation header\"</em>) fields.</p>\n</blockquote>\n</blockquote>\n<p>An entity header is an <em>glossary(\"HTTP</em>header\", \"HTTP header\"<em>) that describes the payload of an HTTP message (i.e. metadata about the message body). Entity headers include: _HTTPHeader(\"Content-Length\"</em>), <em>HTTPHeader(\"Content-Language\"</em>), <em>HTTPHeader(\"Content-Encoding\"</em>), <em>HTTPHeader(\"Content-Type\"</em>), <em>HTTPHeader(\"Expires\"</em>), etc. Entity headers may be present in both HTTP request and response messages.</p>\n<p>In the following example, <em>HTTPHeader(\"Content-Length\"</em>) is an entity header, while <em>HTTPHeader(\"Host\"</em>) and <em>HTTPHeader(\"User-Agent\"</em>) are requests headers:</p>\n<pre><code class=\"language-plain\">POST /myform.html HTTP/1.1\nHost: developer.mozilla.org\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0\nContent-Length: 128\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Glossary(\"Representation header\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Entity</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>\n<h2>HTML</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <em>glossary(\"HTML\"</em>) <strong>entity</strong> is a piece of text (\"string\") that begins with an ampersand (<code>&#x26;</code>) and ends with a semicolon (<code>;</code>) . Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces). You can also use them in place of other characters that are difficult to type with a standard keyboard.</p>\n</blockquote>\n<blockquote>\n<p><strong>Note:</strong> Many characters have memorable entities. For example, the entity for the copyright symbol (<code>©</code>) is <code>&#x26;copy;</code>. For less memorable characters, such as <code>&#x26;#8212;</code> or <code>&#x26;#x2014;</code>, you can use a <a href=\"https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references\">reference chart</a> or <a href=\"https://mothereff.in/html-entities\">decoder tool</a>.</p>\n</blockquote>\n<h2>Reserved characters</h2>\n<p>Some special characters are reserved for use in HTML, meaning that your browser will parse them as HTML code. For example, if you use the less-than (<code>&#x3C;</code>) sign, the browser interprets any text that follows as a <em>Glossary('tag'</em>).</p>\n<p>To display these characters as text, replace them with their corresponding character entities, as shown in the following table.</p>\n<table>\n<thead>\n<tr>\n<th>Character</th>\n<th>Entity</th>\n<th>Note</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>&#x26;</td>\n<td><code>&#x26;amp;</code></td>\n<td>Interpreted as the beginning of an entity or character reference.</td>\n</tr>\n<tr>\n<td>&#x3C;</td>\n<td><code>&#x26;lt;</code></td>\n<td>Interpreted as the beginning of a <em>Glossary('tag'</em>)</td>\n</tr>\n<tr>\n<td>></td>\n<td><code>&#x26;gt;</code></td>\n<td>Interpreted as the ending of a <em>Glossary('tag'</em>)</td>\n</tr>\n<tr>\n<td>\"</td>\n<td><code>&#x26;quot;</code></td>\n<td>Interpreted as the beginning and end of an <em>Glossary('attribute'</em>)'s value.</td>\n</tr>\n</tbody>\n</table>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references\">Official list of character entities</a></li>\n</ul>\n<hr>\n<h2>Term:  Event</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Events are assets generated by <a href=\"/en-US/docs/Glossary/DOM\">DOM</a> elements, which can be manipulated by a Javascript code.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Event\">Event documentation on MDN</a></li>\n<li><a href=\"https://www.w3.org/TR/DOM-Level-2-Events/events.html\">Official website</a></li>\n<li><em>Interwiki(\"wikipedia\", \"DOM Events\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Exception</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>exception</strong> is a condition that interrupts normal code execution. In JavaScript <em>glossary(\"syntax error\", \"syntax errors\"</em>) are a very common source of exceptions.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Exception handling\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  EXIF</h2>\n<ul>\n<li>EXIF</li>\n<li>\n<h2>Image</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>Exchangeable Image File Format (EXIF)</strong> is a standard that specifies how metadata about a multimedia file can be embedded within the file. For example, an image might contain EXIF data describing the: pixel width, height, and density, shutter speed, aperture, ISO settings, capture date, etc.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Exif\">EXIF</a> (Wikipedia)</li>\n<li><a href=\"https://www.cipa.jp/std/std-sec_e.html\">CIPA Standards, including \"CIPA DC-008-Translation-2019 Exchangeable image file format for digital still cameras : Exif Version 2.32\"</a></li>\n</ul>\n<hr>\n<h2>Term:  Expando</h2>\n<ul>\n<li>CodingScripting</li>\n<li>JavaScript</li>\n<li>Reference</li>\n<li>\n<h2>expando</h2>\n</li>\n</ul>\n<blockquote>\n<p>Expando properties are properties added to <em>glossary(\"DOM\"</em>) nodes with <em>glossary(\"JavaScript\"</em>), where those properties are not part of the <em>glossary(\"object\",\"object's\"</em>) DOM specification:</p>\n</blockquote>\n<pre><code class=\"language-js\">window.document.foo = 5; // foo is an expando\n</code></pre>\n<p>The term may also be applied to properties added to objects without respecting the object's original intent, such as non-numeric named properties added to an <em>glossary(\"Array\"</em>).</p>\n<hr>\n<h2>Term:  Fallback alignment</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>\n<h2>alignment</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <a href=\"/en-US/docs/Web/CSS/CSS_Box_Alignment\">CSS Box Alignment</a>, a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fulfilled. For example, if you specify <code>justify-content: space-between</code> there must be more than one <a href=\"/en-US/docs/Glossary/Alignment_Subject\">alignment subject</a>. If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below.</p>\n</blockquote>\n<ul>\n<li>\n<p>First baseline</p>\n<ul>\n<li>: <code>start</code></li>\n</ul>\n</li>\n<li>\n<p>Last baseline</p>\n<ul>\n<li>: <code>safe end</code></li>\n</ul>\n</li>\n<li>\n<p>Baseline</p>\n<ul>\n<li>: <code>start</code></li>\n</ul>\n</li>\n<li>\n<p>Space-between</p>\n<ul>\n<li>: <code>flex-start</code> (start)</li>\n</ul>\n</li>\n<li>\n<p>Space-around</p>\n<ul>\n<li>: <code>center</code></li>\n</ul>\n</li>\n<li>\n<p>Space-evenly</p>\n<ul>\n<li>: <code>center</code></li>\n</ul>\n</li>\n<li>\n<p>Stretch</p>\n<ul>\n<li>: <code>flex-start</code> (start)</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Box_Alignment\">CSS Box Alignment</a></li>\n</ul>\n<hr>\n<h2>Term:  Falsy</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>falsy</strong> (sometimes written <strong>falsey</strong>) value is a value that is considered false when encountered in a <em>Glossary(\"Boolean\"</em>) context.</p>\n</blockquote>\n<p><em>Glossary(\"JavaScript\"</em>) uses <em>Glossary(\"Type</em>Conversion\", \"type conversion\"<em>) to coerce any value to a Boolean in contexts that require it, such as _Glossary(\"Conditional\", \"conditionals\"</em>) and <em>Glossary(\"Loop\", \"loops\"</em>).</p>\n<p>The following table provides a complete list of JavaScript falsy values:</p>\n<table>\n<thead>\n<tr>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>false</code></td>\n<td>The keyword <a href=\"/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#future_reserved_keywords_in_older_standards\"><code>false</code></a>.</td>\n</tr>\n<tr>\n<td><code>0</code></td>\n<td>The <em>jsxref(\"Number\"</em>) zero (so, also <code>0.0</code>, etc., and <code>0x0</code>).</td>\n</tr>\n<tr>\n<td><code>-0</code></td>\n<td>The <em>jsxref(\"Number\"</em>) negative zero (so, also <code>-0.0</code>, etc., and <code>-0x0</code>).</td>\n</tr>\n<tr>\n<td><code>0n</code></td>\n<td>The <em>jsxref(\"BigInt\"</em>) zero (so, also <code>0x0n</code>). Note that there is no <em>jsxref(\"BigInt\"</em>) negative zero — the negation of <code>0n</code> is <code>0n</code>.</td>\n</tr>\n<tr>\n<td><code>\"\"</code>, <code>''</code>, <code>``</code>                   | Empty <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a> value.</td>\n<td></td>\n</tr>\n<tr>\n<td><em>Glossary(\"null\"</em>)</td>\n<td><a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\">null</a> — the absence of any value.</td>\n</tr>\n<tr>\n<td><em>Glossary(\"undefined\"</em>)</td>\n<td><a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\">undefined</a> — the primitive value.</td>\n</tr>\n<tr>\n<td><em>Glossary(\"NaN\"</em>)</td>\n<td><a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\">NaN </a>— not a number.</td>\n</tr>\n<tr>\n<td><em>domxref(\"document.all\"</em>)</td>\n<td>Objects are falsy if and only if they have the <a href=\"https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\">[[IsHTMLDDA]]</a> internal slot.That slot only exists in <em>domxref(\"document.all\"</em>) and cannot be set using JavaScript.</td>\n</tr>\n</tbody>\n</table>\n<h2>Examples</h2>\n<p>Examples of <em>falsy</em> values in JavaScript (which are coerced to false in Boolean contexts, and thus <em>bypass</em> the <code>if</code> block):</p>\n<pre><code class=\"language-js\">if (false)\nif (null)\nif (undefined)\nif (0)\nif (-0)\nif (0n)\nif (NaN)\nif (\"\")\n</code></pre>\n<h3>The logical AND operator, &#x26;&#x26;</h3>\n<p>If the first object is falsy, it returns that object</p>\n<pre><code class=\"language-js\">false &#x26;&#x26; \"dog\"\n// ↪ false\n\n0 &#x26;&#x26; \"dog\"\n// ↪ 0\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Glossary(\"Truthy\"</em>)</li>\n<li><em>Glossary(\"Type</em>coercion\", \"Coercion\"_)</li>\n<li><em>Glossary(\"Boolean\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Favicon</h2>\n<ul>\n<li>Glossary</li>\n<li>Intro</li>\n<li>favicon</li>\n<li>\n<h2>user agent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A favicon (favorite icon) is a tiny icon included along with a website, which is displayed in places like the browser's address bar, page tabs and bookmarks menu.</p>\n</blockquote>\n<p>Note, however, that most modern browsers replaced the favicon from the address bar by an image indicating whether or not the website is using <em>Glossary(\"https\",\"HTTPS\"</em>).</p>\n<p>Usually, a favicon is 16 x 16 pixels in size and stored in the <em>Glossary(\"GIF\"</em>), <em>Glossary(\"PNG\"</em>), or ICO file format.</p>\n<p>They are used to improve user experience and enforce brand consistency. When a familiar icon is seen in the browser's address bar, for example, it helps users know they are in the right place.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Favicon\", \"Favicon\"</em>) on Wikipedia</li>\n<li>\n<p>Tools</p>\n<ul>\n<li><a href=\"https://favicon.io/\">Free favicon generator</a></li>\n<li><a href=\"https://www.favicon-generator.org/\">Favicon.ico and &#x26; app icon generator</a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Fetch directive</h2>\n<ul>\n<li>CSP</li>\n<li>HTTP</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong><em>Glossary(\"CSP\"</em>) fetch directives</strong> are used in a <em>HTTPHeader(\"Content-Security-Policy\"</em>) header and control locations from which certain resource types may be loaded. For instance, <em>CSP(\"script-src\"</em>) allows developers to allow trusted sources of script to execute on a page, while <em>CSP(\"font-src\"</em>) controls the sources of web fonts.</p>\n</blockquote>\n<p>All fetch directives fall back to <em>CSP(\"default-src\"</em>). That means, if a fetch directive is absent in the CSP header, the user agent will look for the <code>default-src</code> directive.</p>\n<p>See <a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#fetch_directives\">Fetch directives</a> for a complete list.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"CSP\"</em>)</li>\n<li><em>Glossary(\"Reporting directive\"</em>)</li>\n<li><em>Glossary(\"Document directive\"</em>)</li>\n<li><em>Glossary(\"Navigation directive\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Reference</p>\n<ul>\n<li><a href=\"https://www.w3.org/TR/CSP/#directives-fetch\">https://www.w3.org/TR/CSP/#directives-fetch</a></li>\n<li><em>HTTPHeader(\"Content-Security-Policy/upgrade-insecure-requests\", \"upgrade-insecure-requests\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Security-Policy/block-all-mixed-content\", \"block-all-mixed-content\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Security-Policy/require-sri-for\", \"require-sri-for\"</em>) <em>Deprecated</em>Inline}}</li>\n<li><em>HTTPHeader(\"Content-Security-Policy\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Fetch metadata request header</h2>\n<ul>\n<li>Fetch Metadata Request Headers</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>fetch metadata request header</strong> is an <em>Glossary(\"Request header\", \"HTTP request header\"</em>) that provides additional information about the context from which the request originated. This allows the server to make decisions about whether a request should be allowed based on where the request came from and how the resource will be used.</p>\n</blockquote>\n<p>With this information a server can implement a <em>Glossary(\"resource isolation policy\"</em>), allowing external sites to request only those resources that are intended for sharing, and that are used appropriately. This approach can help mitigate common cross-site web vulnerabilities such as <em>Glossary(\"CSRF\"</em>), Cross-site Script Inclusion('XSSI'), timing attacks, and cross-origin information leaks.</p>\n<p>These headers are prefixed with <code>Sec-</code>, and hence have <em>Glossary(\"Forbidden header name\", \"forbidden header names\"</em>). As such, they cannot be modified from JavaScript.</p>\n<p>The fetch metadata request headers are:</p>\n<ul>\n<li><em>HTTPHeader(\"Sec-Fetch-Site\"</em>)</li>\n<li><em>HTTPHeader(\"Sec-Fetch-Mode\"</em>)</li>\n<li><em>HTTPHeader(\"Sec-Fetch-User\"</em>)</li>\n<li><em>HTTPHeader(\"Sec-Fetch-Dest\"</em>)</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://web.dev/fetch-metadata/\">Protect your resources from web attacks with Fetch Metadata</a> (web.dev)</li>\n<li><a href=\"https://secmetadata.appspot.com/\">Fetch Metadata Request Headers playground</a> (secmetadata.appspot.com)</li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">List of all HTTP headers</a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers#fetch_metadata_request_headers\">List of all HTTP headers > Fetch metadata request headers</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Representation header\"</em>)</li>\n<li><em>Glossary(\"HTTP</em>header\",\"HTTP header\"_)</li>\n<li><em>Glossary(\"Response header\"</em>)</li>\n<li><em>Glossary(\"Request header\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Firefox OS</h2>\n<ul>\n<li>B2G</li>\n<li>Boot2Gecko</li>\n<li>Firefox OS</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p>Firefox OS is a discontinued open source mobile operating system developed by Mozilla. See <em>interwiki(\"wikipedia\", \"Firefox OS\"</em>) for more details.</p>\n</blockquote>\n<hr>\n<h2>Term:  firewall</h2>\n<ul>\n<li>DDoS</li>\n<li>Firewall</li>\n<li>Glossary</li>\n<li>Security</li>\n<li>\n<h2>computer network</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>firewall</strong> is a system that filters network traffic. It can either let it pass or block it, according to some specified rules. For example, it can block incoming connections aimed at a certain port or outgoing connections to a certain IP address.</p>\n</blockquote>\n<p>Firewalls can be as simple as a single piece of software, or more complex, like a dedicated machine whose only function is to act as a firewall.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Firewall (computing)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  First-class Function</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A programming language is said to have <strong>First-class functions</strong> when functions in that language are treated like any other variable. For example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable.</p>\n</blockquote>\n<h2>Example | Assign a function to a variable</h2>\n<h3>JavaScript</h3>\n<pre><code class=\"language-js\">const foo = function() {\n   console.log(\"foobar\");\n}\nfoo(); // Invoke it using the variable\n// foobar\n</code></pre>\n<p>We assigned an <strong>Anonymous Function</strong> in a <em>glossary(\"Variable\"</em>), then we used that variable to invoke the function by adding parentheses <code>()</code> at the end.</p>\n<blockquote>\n<p><strong>Note:</strong> <strong>Even if your function was named,</strong> you can use the variable name to invoke it. Naming it will be helpful when debugging your code. <em>But it won't affect the way we invoke it.</em></p>\n</blockquote>\n<h2>Example | Pass a function as an Argument</h2>\n<h3>JavaScript</h3>\n<pre><code class=\"language-js\">function sayHello() {\n   return \"Hello, \";\n}\nfunction greeting(helloMessage, name) {\n  console.log(helloMessage() + name);\n}\n// Pass `sayHello` as an argument to `greeting` function\ngreeting(sayHello, \"JavaScript!\");\n// Hello, JavaScript!\n</code></pre>\n<p>We are passing our <code>sayHello()</code> function as an argument to the <code>greeting()</code> function, this explains how we are treating the function as a <strong>value</strong>.</p>\n<blockquote>\n<p><strong>Note:</strong> The function that we pass as an argument to another function, is called a <strong><em>glossary(\"Callback function\"</em>)</strong>. <em><code>sayHello</code> is a Callback function.</em></p>\n</blockquote>\n<h2>Example | Return a function</h2>\n<h3>JavaScript</h3>\n<pre><code class=\"language-js\">function sayHello() {\n   return function() {\n      console.log(\"Hello!\");\n   }\n}\n</code></pre>\n<p>In this example; We need to return a function from another function - <em>We can return a function because we treated function in JavaScript as a <strong>value</strong>.</em></p>\n<blockquote>\n<p><strong>Note:</strong> A function that returns a function is called a <strong>Higher-Order Function</strong>.</p>\n</blockquote>\n<p>Back to our example; Now, we need to invoke <code>sayHello</code> function and its returned <code>Anonymous Function</code>. To do so, we have two ways:</p>\n<h3>1- Using a variable</h3>\n<pre><code class=\"language-js\">const sayHello = function() {\n   return function() {\n      console.log(\"Hello!\");\n   }\n}\nconst myFunc = sayHello();\nmyFunc();\n// Hello!\n</code></pre>\n<p>This way, it returns the <code>Hello!</code> message.</p>\n<blockquote>\n<p><strong>Note:</strong> You have to use another variable. If you invoked <code>sayHello</code> directly, it would return the function itself <strong>without invoking its returned function</strong>.</p>\n</blockquote>\n<h3>2- Using double parentheses</h3>\n<pre><code class=\"language-js\">function sayHello() {\n   return function() {\n      console.log(\"Hello!\");\n   }\n}\nsayHello()();\n// Hello!\n</code></pre>\n<p>We are using double parentheses <code>()()</code> to invoke the returned function as well.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"First-class</em>function\", \"First-class functions\"_) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>glossary(\"Callback function\"</em>)</li>\n<li><em>glossary(\"Function\"</em>)</li>\n<li><em>glossary(\"Variable\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  First contentful paint</h2>\n<ul>\n<li>Glossary</li>\n<li>Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>First Contentful Paint</strong> (FCP) is when the browser renders the first bit of content from the DOM, providing the first feedback to the user that the page is actually loading. The question \"Is it happening?\" is \"yes\" when the first contentful paint completes.</p>\n</blockquote>\n<p><em>The First Contentful Paint</em> time stamp is when the browser first rendered any text, image (including background images), non-white canvas or SVG. This excludes any content of iframes, but includes text with pending webfonts. This is the first time users could start consuming page content.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/first_meaningful_paint\">First Meaningful Paint</a></li>\n<li><a href=\"https://w3c.github.io/paint-timing/#first-contentful-paint\">Paint Timing specification</a></li>\n</ul>\n<hr>\n<h2>Term:  First CPU idle</h2>\n<ul>\n<li>Glossary</li>\n<li>Lighthouse</li>\n<li>Performance</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>First CPU Idle</strong> measures when a page is minimally interactive, or when the window is quiet enough to handle user input. It is a non-standard Google web performance metric. Generally, it occurs when most, but not necessarily all visible UI elements are interactive, and the user interface responds, on average, to most user input within 50ms. It is also known as <a href=\"/en-US/docs/Glossary/First_interactive\">First interactive</a>.</p>\n</blockquote>\n<hr>\n<h2>Term:  First input delay</h2>\n<ul>\n<li>Glossary</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>First input delay</strong> (FID) measures the time from when a user first interacts with your site (i.e. when they click a link, tap on a button, or use a custom, JavaScript-powered control) to the time when the browser is actually able to respond to that interaction.</p>\n</blockquote>\n<p>It is the length of time, in milliseconds, between the first user interaction on a web page and the browser’s response to that interaction. Scrolling and zooming are not included in this metric.</p>\n<p>The time between when content is painted to the page and when all the functionality becomes responsive to human interaction often varies based on the size and complexity of the JavaScript needing to be downloaded, parsed, and executed on the main thread, and on the device speed or lack thereof (think low end mobile devices). The longer the delay, the worse the user experience. Reducing site initialization time and eliminating<a href=\"/en-US/docs/Web/API/Long_Tasks_API\"> long tasks</a> can help eliminate first input delays.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Window/requestIdleCallback\">requestIdleCallback</a></li>\n<li><a href=\"/en-US/docs/Web/Performance/Lazy_loading\">lazy loading</a></li>\n</ul>\n<hr>\n<h2>Term:  First interactive</h2>\n<ul>\n<li>Glossary</li>\n<li>Lighthouse</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>_draft}}</p>\n</blockquote>\n<p><strong>First Interactive,</strong> also known as <a href=\"/en-US/docs/Glossary/First_CPU_idle\">first CPU idle</a>, is a non-standard web performance metric that measures when the user's window is quiet enough to handle user input, or what is termed as minimally interactive.</p>\n<p>Minimally interactive is defined as when some, but not necessarily all, UI elements on the page have loaded and are interactive, and, on average, respond to user input in a reasonable amount of time.</p>\n<h2>More information</h2>\n<p>First interactive is a variation of <a href=\"/en-US/docs/Glossary/Time_to_interactive\">Time to Interactive</a>, which is split into <em>First Interactive</em> and <em>Consistently Interactive</em>. These metrics have been proposed by the Web Incubator Community Group and are already being used in various tools. This metric has been called <em>First CPU Idle</em> since <a href=\"https://developers.google.com/web/tools/lighthouse/\">Lighthouse 3.0</a></p>\n<hr>\n<h2>Term:  First Meaningful Paint</h2>\n<ul>\n<li>Glossary</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>First Meaningful Paint</strong> (FMP) is the paint after which the biggest above-the-fold layout change has happened and web fonts have loaded.  It is when the answer to \"Is it useful?\" becomes \"yes\", upon first meaningful paint completion.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/First_contentful_paint\">First contentful paint</a></li>\n</ul>\n<hr>\n<h2>Term:  First paint</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Performance</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>First Paint</strong>, part of the <a href=\"/en-US/docs/Web/PerformancePaintTiming\">Paint Timing API</a>, is the time between navigation and when the browser renders the first pixels to the screen, rendering anything that is visually different from what was on the screen prior to navigation. It answers the question \"Is it happening?\"</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/first_meaningful_paint\">First meaningful paint</a></li>\n<li><a href=\"/en-US/docs/Glossary/First_contentful_paint\">First contentful paint</a></li>\n<li><a href=\"/en-US/docs/Web/PerformancePaintTiming\">Paint Timing API</a></li>\n</ul>\n<hr>\n<h2>Term:  Flex Container</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>flex container</li>\n<li>\n<h2>flexbox</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>glossary(\"flexbox\"</em>) layout is defined using the <code>flex</code> or <code>inline-flex</code> values of the <code>display</code> property on the parent item. This element then becomes a <strong>flex container</strong>, and each one of its children becomes a <em>glossary(\"flex item\"</em>).</p>\n</blockquote>\n<p>A value of <code>flex</code> causes the element to become a block level flex container, and <code>inline-flex</code> an inline level flex container. These values create a <strong>flex formatting context</strong> for the element, which is similar to a block formatting context in that floats will not intrude into the container, and the margins on the container will not collapse with those of the items.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"align-content\"</em>)</li>\n<li><em>cssxref(\"align-items\"</em>)</li>\n<li><em>cssxref(\"flex\"</em>)</li>\n<li><em>cssxref(\"flex-direction\"</em>)</li>\n<li><em>cssxref(\"flex-flow\"</em>)</li>\n<li><em>cssxref(\"flex-wrap\"</em>)</li>\n<li><em>cssxref(\"justify-content\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Flexbox Guide: <em>[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Basic<em>Concepts</em>of<em>Flexbox)</em></li>\n<li>CSS Flexbox Guide: <em>[Aligning items in a flex container](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Aligning<em>Items</em>in<em>a</em>Flex<em>Container)</em></li>\n<li>CSS Flexbox Guide: <em>[Mastering wrapping of flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Mastering<em>Wrapping</em>of<em>Flex</em>Items)_</li>\n<li>Firefox Developer Tools > How to: <em><a href=\"/en-US/docs/Tools/Page_Inspector/How_to/Examine_Flexbox_layouts\">CSS Flexbox Inspector: Examine Flexbox layouts</a></em></li>\n</ul>\n<hr>\n<h2>Term:  Flex Item</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>flex item</li>\n<li>\n<h2>flexbox</h2>\n</li>\n</ul>\n<blockquote>\n<p>The direct children of a <em>glossary(\"Flex Container\"</em>) (elements with <code>display: flex</code> or <code>display: inline-flex</code> set on them) become <strong>flex items</strong>.</p>\n</blockquote>\n<p>Continuous runs of text inside flex containers will also become flex items.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"align-self\"</em>)</li>\n<li><em>cssxref(\"flex-basis\"</em>)</li>\n<li><em>cssxref(\"flex-grow\"</em>)</li>\n<li><em>cssxref(\"flex-shrink\"</em>)</li>\n<li><em>cssxref(\"order\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Flexbox Guide: <em>[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Basic<em>Concepts</em>of<em>Flexbox)</em></li>\n<li>CSS Flexbox Guide: <em>[Ordering flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Ordering<em>Flex</em>Items)_</li>\n<li>CSS Flexbox Guide: <em>[Controlling Ratios of flex items along the main axis](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Controlling<em>Ratios</em>of<em>Flex</em>Items<em>Along</em>the<em>Main</em>Ax)_</li>\n</ul>\n<hr>\n<h2>Term:  Flexbox</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>\n<h2>flexbox</h2>\n</li>\n</ul>\n<blockquote>\n<p>Flexbox is the commonly-used name for the <a href=\"https://www.w3.org/TR/css-flexbox-1/\">CSS Flexible Box Layout Module</a>, a layout model for displaying items in a single dimension — as a row or as a column.</p>\n</blockquote>\n<p>In the specification, Flexbox is described as a layout model for user interface design. The key feature of Flexbox is the fact that items in a flex layout can grow and shrink. Space can be assigned to the items themselves, or distributed between or around the items.</p>\n<p>Flexbox also enables alignment of items on the main or cross axis, thus providing a high level of control over the size and alignment of a group of items.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"align-content\"</em>)</li>\n<li><em>cssxref(\"align-items\"</em>)</li>\n<li><em>cssxref(\"align-self\"</em>)</li>\n<li><em>cssxref(\"flex\"</em>)</li>\n<li><em>cssxref(\"flex-basis\"</em>)</li>\n<li><em>cssxref(\"flex-direction\"</em>)</li>\n<li><em>cssxref(\"flex-flow\"</em>)</li>\n<li><em>cssxref(\"flex-grow\"</em>)</li>\n<li><em>cssxref(\"flex-shrink\"</em>)</li>\n<li><em>cssxref(\"flex-wrap\"</em>)</li>\n<li><em>cssxref(\"justify-content\"</em>)</li>\n<li><em>cssxref(\"order\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li><em><a href=\"https://www.w3.org/TR/css-flexbox-1/\">CSS Flexible Box Layout Module Level 1 Specification</a></em></li>\n<li>CSS Flexbox Guide: <em>[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Basic<em>Concepts</em>of<em>Flexbox)</em></li>\n<li>CSS Flexbox Guide: <em>[Relationship of flexbox to other layout methods](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Relationship<em>of</em>Flexbox<em>to</em>Other<em>Layout</em>Methods)_</li>\n<li>CSS Flexbox Guide: <em>[Aligning items in a flex container](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Aligning<em>Items</em>in<em>a</em>Flex<em>Container)</em></li>\n<li>CSS Flexbox Guide: <em>[Ordering flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Ordering<em>Flex</em>Items)_</li>\n<li>CSS Flexbox Guide: <em>[Controlling Ratios of flex items along the main axis](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Controlling<em>Ratios</em>of<em>Flex</em>Items<em>Along</em>the<em>Main</em>Ax)_</li>\n<li>CSS Flexbox Guide: <em>[Mastering wrapping of flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Mastering<em>Wrapping</em>of<em>Flex</em>Items)_</li>\n<li>CSS Flexbox Guide: <em>[Typical use cases of flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Typical<em>Use</em>Cases<em>of</em>Flexbox)_</li>\n</ul>\n<hr>\n<h2>Term:  Flex</h2>\n<ul>\n<li>CSS</li>\n<li>Flex</li>\n<li>Glossary</li>\n<li>\n<h2>flexbox</h2>\n</li>\n</ul>\n<blockquote>\n<p><code>flex</code> is a new value added to the CSS <em>cssxref(\"display\"</em>) property. Along with <code>inline-flex</code> it causes the element that it applies to in order to become a <em>glossary(\"flex container\"</em>), and the element's children to each become a <em>glossary(\"flex item\"</em>). The items then participate in flex layout, and all of the properties defined in the CSS Flexible Box Layout Module may be applied.</p>\n</blockquote>\n<p>The <code>flex</code> property is a shorthand for the flexbox properties <code>flex-grow</code>, <code>flex-shrink</code> and <code>flex-basis</code>.</p>\n<p>In addition <code>&#x3C;flex></code> can refer to <a href=\"/en-US/docs/Web/CSS/flex_value\">a flexible length</a> in CSS Grid Layout.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"align-content\"</em>)</li>\n<li><em>cssxref(\"align-items\"</em>)</li>\n<li><em>cssxref(\"align-self\"</em>)</li>\n<li><em>cssxref(\"flex\"</em>)</li>\n<li><em>cssxref(\"flex-basis\"</em>)</li>\n<li><em>cssxref(\"flex-direction\"</em>)</li>\n<li><em>cssxref(\"flex-flow\"</em>)</li>\n<li><em>cssxref(\"flex-grow\"</em>)</li>\n<li><em>cssxref(\"flex-shrink\"</em>)</li>\n<li><em>cssxref(\"flex-wrap\"</em>)</li>\n<li><em>cssxref(\"justify-content\"</em>)</li>\n<li><em>cssxref(\"order\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li><em><a href=\"https://www.w3.org/TR/css-flexbox-1/\">CSS Flexible Box Layout Module Level 1 Specification</a></em></li>\n<li>CSS Flexbox Guide: <em>[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Basic<em>Concepts</em>of<em>Flexbox)</em></li>\n<li>CSS Flexbox Guide: <em>[Relationship of flexbox to other layout methods](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Relationship<em>of</em>Flexbox<em>to</em>Other<em>Layout</em>Methods)_</li>\n<li>CSS Flexbox Guide: <em>[Aligning items in a flex container](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Aligning<em>Items</em>in<em>a</em>Flex<em>Container)</em></li>\n<li>CSS Flexbox Guide: <em>[Ordering flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Ordering<em>Flex</em>Items)_</li>\n<li>CSS Flexbox Guide: <em>[Controlling Ratios of flex items along the main axis](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Controlling<em>Ratios</em>of<em>Flex</em>Items<em>Along</em>the<em>Main</em>Ax)_</li>\n<li>CSS Flexbox Guide: <em>[Mastering wrapping of flex items](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Mastering<em>Wrapping</em>of<em>Flex</em>Items)_</li>\n<li>CSS Flexbox Guide: <em>[Typical use cases of flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Typical<em>Use</em>Cases<em>of</em>Flexbox)_</li>\n</ul>\n<hr>\n<h2>Term:  Forbidden header name</h2>\n<ul>\n<li>Fetch</li>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Headers</li>\n<li>\n<h2>forbidden</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>forbidden header name</strong> is the name of any <a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP header</a> that cannot be modified programmatically; specifically, an HTTP <strong>request</strong> header name (in contrast with a <em>Glossary(\"Forbidden response header name\"</em>)).</p>\n</blockquote>\n<p>Modifying such headers is forbidden because the user agent retains full control over them. Names starting with <code>Sec-</code> are reserved for creating new headers safe from <em>glossary(\"API\",\"APIs\"</em>) using <a href=\"/en-US/docs/Web/API/Fetch_API\">Fetch</a> that grant developers control over headers, such as <em>domxref(\"XMLHttpRequest\"</em>).</p>\n<p>Forbidden header names start with <code>Proxy-</code> or <code>Sec-</code>, or are one of the following names:</p>\n<ul>\n<li><code>Accept-Charset</code></li>\n<li><code>Accept-Encoding</code></li>\n<li><code>Access-Control-Request-Headers</code></li>\n<li><code>Access-Control-Request-Method</code></li>\n<li><code>Connection</code></li>\n<li><code>Content-Length</code></li>\n<li><code>Cookie</code></li>\n<li><code>Cookie2</code></li>\n<li><code>Date</code></li>\n<li><code>DNT</code></li>\n<li><code>Expect</code></li>\n<li><code>Feature-Policy</code></li>\n<li><code>Host</code></li>\n<li><code>Keep-Alive</code></li>\n<li><code>Origin</code></li>\n<li><code>Proxy-</code></li>\n<li><code>Sec-</code></li>\n<li><code>Referer</code></li>\n<li><code>TE</code></li>\n<li><code>Trailer</code></li>\n<li><code>Transfer-Encoding</code></li>\n<li><code>Upgrade</code></li>\n<li><code>Via</code></li>\n</ul>\n<blockquote>\n<p><strong>Note:</strong> The <code>User-Agent</code> header is no longer forbidden, <a href=\"https://fetch.spec.whatwg.org/#terminology-headers\">as per spec</a> — see forbidden header name list (this was implemented in Firefox 43) — it can now be set in a Fetch <a href=\"/en-US/docs/Web/API/Headers\">Headers</a> object, or via XHR <a href=\"/en-US/docs/Web/API/XMLHttpRequest#setrequestheader%28%29\">setRequestHeader()</a>.  However, Chrome will silently drop the header from Fetch requests (see <a href=\"https://bugs.chromium.org/p/chromium/issues/detail?id=571722\">Chromium bug 571722</a>).</p>\n</blockquote>\n<h4>See also</h4>\n<p><em>Glossary(\"Forbidden response header name\"</em>) (Glossary)</p>\n<hr>\n<h2>Term:  Forbidden response header name</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Response</li>\n<li>\n<h2>forbidden</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>forbidden response header name</em> is an <a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP header</a> name (either `<code>Set-Cookie</code>` or `<code>Set-Cookie2</code>`) that cannot be modified programmatically.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://fetch.spec.whatwg.org/#forbidden-response-header-name\">Fetch specification: forbidden response-header name</a></li>\n</ul>\n<hr>\n<h2>Term:  Fork</h2>\n<ul>\n<li>Fork</li>\n<li>Glossary</li>\n<li>Tools</li>\n<li>\n<h2>git</h2>\n</li>\n</ul>\n<blockquote>\n<p>A fork is a copy of an existing software project at some point to add someone's own modifications to the project.</p>\n</blockquote>\n<p>Basically, if the license of the original software allows, you can copy the code to develop your own version of it, with your own additions, which will be a \"fork\".</p>\n<p>Forks are often seen in free and open source software development. This is now a more popular term thanks to contribution model using Git (and/or the GitHub platform).</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Fork</em>(software<em>development)\",\"Fork\"</em>) on Wikipedia</li>\n<li><a href=\"https://help.github.com/articles/fork-a-repo/\">How to fork a GitHub repo</a> (fork as in a Git context)</li>\n<li><em>Glossary(\"Fork\"</em>) (Glossary)</li>\n<li>\n<p>Various \"well-known\" forks</p>\n<ul>\n<li><a href=\"https://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg\">Linux distributions</a></li>\n<li><a href=\"https://nodejs.org/en/blog/announcements/foundation-v4-announce/\">Node.js and io.js (which have been merged together back)</a></li>\n<li><a href=\"https://www.libreoffice.org/about-us/who-are-we/\">LibreOffice, a fork of OpenOffice</a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  frame rate (FPS)</h2>\n<ul>\n<li>Animation</li>\n<li>Glossary</li>\n<li>Web Performance</li>\n<li>\n<h2>requestAnimationFrame</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>frame rate</strong> is the speed at which the browser is able to recalculate, layout and paint content to the display. The <strong>frames per second</strong>, or <strong>fps</strong>, is how many frames can be repainted in one second. The goal frame rate for in web site computer graphics is 60fps.</p>\n</blockquote>\n<p>Movies generally have a frame rate of 24 fps. They are able to have fewer frames per second because the illusion of life is created with motion blurs. When moving on a computer screen there are no motion blurs (unless you are animating an image <a href=\"/en-US/docs/Web/CSS/CSS_Images/Implementing_image_sprites_in_CSS\">sprite</a> with motion blurs).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Frame rate\"</em>) (Wikipedia)</li>\n<li><em>glossary(\"FPS\"</em>) (Glossary)</li>\n</ul>\n<hr>\n<h2>Term:  Fragmentainer</h2>\n<ul>\n<li>CSS</li>\n<li>CSS Fragmentation Specification</li>\n<li>Glossary</li>\n<li>\n<h2>fragmentainer</h2>\n</li>\n</ul>\n<blockquote>\n<p>A fragmentainer is defined in the<a href=\"https://www.w3.org/TR/css-break-3/\"> CSS Fragmentation Specification</a> as follows:</p>\n</blockquote>\n<blockquote>\n<p>A box—such as a page box, column box, or region—that contains a portion (or all) of a fragmented flow. Fragmentainers can be pre-defined, or generated as needed. When breakable content would overflow a fragmentainer in the block dimension, it breaks into the next container in its fragmentation context instead.</p>\n</blockquote>\n<p>Fragmented contexts are found in CSS Paged Media, where the fragmentainer would be the box which defines a page. In Multiple-column Layout the fragmentainer is the column box created when columns are defined on a multicol container. In CSS Regions each Region is a fragmentainer.</p>\n<hr>\n<h2>Term:  FTP</h2>\n<ul>\n<li>CodingScripting</li>\n<li>FTP</li>\n<li>Glossary</li>\n<li>\n<h2>Protocol</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>FTP</strong> (File Transfer Protocol) is an insecure <em>glossary(\"protocol\"</em>) for transferring files from one <em>glossary(\"host\"</em>) to another over the Internet.</p>\n</blockquote>\n<p>For many years it was the defacto standard way of transferring files, but as it is inherently insecure, it is no longer supported by many hosting accounts. Instead you should use SFTP (a secure, encrypted version of FTP) or another secure method for transferring files like Rsync over SSH.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/Upload_files_to_a_web_server\">Beginner's guide to uploading files via FTP</a></li>\n<li><em>interwiki(\"wikipedia\", \"File Transfer Protocol\", \"FTP\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  FTU</h2>\n<ul>\n<li>FTU</li>\n<li>Firefox OS</li>\n<li>First time use</li>\n<li>Gaia</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p>FTU (First Time Use) is the app that loads when you run a newly-installed version of <em>glossary(\"Gecko\"</em>) on a <em>glossary(\"Firefox OS\"</em>) device.</p>\n</blockquote>\n<p>You can use FTU to set many important options (e.g. timezone, WiFi details, default language, importing contacts), or take the \"Phone Tour\" to find out more about your device.</p>\n<hr>\n<h2>Term:  Function</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>IIFE</li>\n<li>Immediately Invoked Function Expressions (IIFE)</li>\n<li>Intro</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>function</strong> is a code snippet that can be called by other code or by itself, or a <em>Glossary(\"variable\"</em>) that refers to the function. When a function is called, <em>Glossary(\"Argument\", \"arguments\"</em>) are passed to the function as input, and the function can optionally return a value. A function in <em>glossary(\"JavaScript\"</em>) is also an <em>glossary(\"object\"</em>).</p>\n</blockquote>\n<p>A function name is an <em>Glossary(\"identifier\"</em>) included as part of a function declaration or function expression. The function name's <em>Glossary(\"scope\"</em>) depends on whether the function name is a declaration or expression.</p>\n<h3>Different types of functions</h3>\n<p>An <strong>anonymous function</strong> is a function without a function name. Only function expressions can be anonymous, function declarations must have a name:</p>\n<pre><code class=\"language-js\">// When used as a function expression\n(function () {});\n// or using the ECMAScript 2015 arrow notation\n() => {};\n</code></pre>\n<p>The following terms are not used in the ECMAScript language specification, they're jargon used to refer to different types of functions.</p>\n<p>A <strong>named function</strong> is a function with a function name:</p>\n<pre><code class=\"language-js\">// Function declaration\nfunction foo() {};\n// Named function expression\n(function bar() {});\n// or using the ECMAScript 2015 arrow notation\nconst foo = () => {};\n</code></pre>\n<p>An <strong>inner function</strong> is a function inside another function (<code>square</code> in this case). An <strong>outer function</strong> is a function containing a function (<code>addSquares</code> in this case):</p>\n<pre><code class=\"language-js\">function addSquares(a,b) {\n   function square(x) {\n      return x * x;\n   }\n   return square(a) + square(b);\n};\n//Using ECMAScript 2015 arrow notation\nconst addSquares = (a,b) => {\n   const square = x => x*x;\n   return square(a) + square(b);\n};\n</code></pre>\n<p>A <strong>recursive function</strong> is a function that calls itself. See <em>Glossary(\"Recursion\", \"recursion\"</em>).</p>\n<pre><code class=\"language-js\">function loop(x) {\n   if (x >= 10)\n      return;\n   loop(x + 1);\n};\n//Using ECMAScript 2015 arrow notation\nconst loop = x => {\n   if (x >= 10)\n      return;\n   loop(x + 1);\n};\n</code></pre>\n<p>An <strong>Immediately Invoked Function Expressions</strong> (<em>glossary(\"IIFE\"</em>)) is a function that is called directly after the function is loaded into the browser’s compiler. The way to identify an IIFE is by locating the extra left and right parenthesis at the end of the function’s definition.</p>\n<pre><code class=\"language-js\">// Declared functions can't be called immediately this way\n// Error (https://en.wikipedia.org/wiki/Immediately-invoked_function_expression)\n/*\nfunction foo() {\n    console.log('Hello Foo');\n}();\n*/\n\n// Function expressions, named or anonymous, can be called immediately\n(function foo() {\n    console.log(\"Hello Foo\");\n}());\n\n(function food() {\n    console.log(\"Hello Food\");\n})();\n\n(() => console.log('hello world'))();\n</code></pre>\n<p>If you'd like to know more about IIFEs, check out the following page on Wikipedia : <a href=\"https://en.wikipedia.org/wiki/Immediately-invoked_function_expression\">Immediately Invoked Function Expression</a></p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Functions\">Functions</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">Arrow Functions</a></li>\n</ul>\n<hr>\n<h2>Term:  Fuzz testing</h2>\n<ul>\n<li>Firefox</li>\n<li>Fuzzing</li>\n<li>Mozilla</li>\n<li>QA</li>\n<li>Security</li>\n<li>\n<h2>Testing</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Fuzzing</strong> is a technique for testing software using automated tools to provide invalid or unexpected input to a program or function in a program, then checking the results to see if the program crashes or otherwise acts inappropriately. This is an important way to ensure that software is stable, reliable, and secure, and we use fuzzing a lot at Mozilla.</p>\n</blockquote>\n<ul>\n<li><a href=\"https://www.squarefree.com/categories/fuzzing/\">Jesse's blog posts about fuzzing</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Fuzz_testing\">Wikipedia: Fuzz testing</a></li>\n<li><a href=\"https://github.com/fuzzdb-project/fuzzdb\">fuzzdb</a></li>\n<li><a href=\"https://github.com/fuzzitdev/jsfuzz\">jsfuzz - coverage guided javascript fuzzer</a></li>\n</ul>\n<hr>\n<h2>Term:  Garbage collection</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong><a href=\"/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection\">Garbage collection</a></strong> is a term used in <em>Glossary(\"computer programming\"</em>) to describe the process of finding and deleting <em>Glossary(\"object\", \"objects\"</em>) which are no longer being <em>Glossary(\"object reference\", \"referenced\"</em>) by other objects.</p>\n</blockquote>\n<p>In other words, garbage collection is the process of removing any objects which are not being used by any other objects. Often abbreviated \"GC,\" garbage collection is a fundamental component of the <a href=\"/en-US/docs/Web/JavaScript/Memory_Management\">memory management</a> system used by <em>Glossary(\"JavaScript\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Memory management\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Garbage collection (computer science)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection\">Garbage collection</a> in the MDN JavaScript guide.</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Memory_Management\">Memory management in JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  Gecko</h2>\n<ul>\n<li>Firefox OS</li>\n<li>Gecko</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Intro</li>\n<li>\n<h2>Mozilla</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Gecko</strong> is the layout engine developed by the Mozilla Project and used in many apps/devices, including <em>glossary(\"Mozilla Firefox\",\"Firefox\"</em>) and <em>glossary(\"Firefox OS\"</em>).</p>\n</blockquote>\n<p>Web <em>glossary(\"browser\",\"browsers\"</em>) need software called a layout engine to interpret <em>glossary(\"HTML\"</em>), <em>glossary(\"CSS\"</em>), <em>glossary(\"JavaScript\"</em>), and embedded content (like images) and draw everything to your screen. Besides this, Gecko makes sure associated <em>glossary(\"API\",\"APIs\"</em>) work well on every operating system Gecko supports, and that appropriate APIs are exposed only to relevant support targets. This means that Gecko includes, among other things, a networking stack, graphics stack, layout engine, a JavaScript virtual machine, and porting layers.</p>\n<p>Since all Firefox OS apps are Web apps, Firefox OS uses Gecko as its app runtime as well.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Gecko (software)\", \"Gecko\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  General header</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>General header</strong> is an outdated term used to refer to an <em>glossary('HTTP</em>header', 'HTTP header'<em>) that can be used in both request and response messages, but which doesn't apply to the content itself (a header that applied to the content was called an _glossary(\"entity header\"</em>)). Depending on the context they are used in, general headers might either be <em>glossary(\"Response header\", \"response\"</em>) or <em>glossary(\"request header\", \"request headers\"</em>) (e.g. <em>HTTPheader(\"Cache-Control\"</em>)).</p>\n</blockquote>\n<blockquote>\n<p><strong>Note:</strong> Current versions of the HTTP/1.1 specification do not specifically categorize headers as \"general headers\". These are now simply refered to as <em>glossary(\"Response header\", \"response\"</em>) or <em>glossary(\"request header\", \"request headers\"</em>) depending on context.</p>\n</blockquote>\n<hr>\n<h2>Term:  GIF</h2>\n<ul>\n<li>Composing</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>GIF (Graphics Interchange Format) is an image format that uses lossless compression and can be used for animations. A GIF uses up to 8 bits per pixel and a maximum of 256 colors from the 24-bit color space.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"GIF\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Git</h2>\n<ul>\n<li>Collaborating</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Git</strong> is a free, open-source, distributed Source Code Management (<em>Glossary(\"SCM\", \"SCM\", 1</em>)) system. It facilitates handling code bases with distributed development teams. What sets it apart from previous SCM systems is the ability to do common operations (branching, committing, etc.) on your local development machine, without having to change the master repository or even having write access to it.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://git-scm.com/\">Official website with documentation</a></li>\n<li><a href=\"https://github.com/\">GitHub</a>, a Git-based graphical project host</li>\n</ul>\n<hr>\n<h2>Term:  Global object</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A global object is an <em>glossary(\"object\"</em>) that always exists in the <em>glossary(\"global scope\"</em>).</p>\n</blockquote>\n<p>In JavaScript, there's always a global object defined. In a web browser, when scripts create global variables defined with the <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/var\"><code>var</code></a> keyword, they're created as members of the global object. (In <em>Glossary(\"Node.js\"</em>) this is not the case.) The global object's <em>Glossary(\"interface\"</em>) depends on the execution context in which the script is running. For example:</p>\n<ul>\n<li>In a web browser, any code which the script doesn't specifically start up as a background task has a <em>domxref(\"Window\"</em>) as its global object. This is the vast majority of JavaScript code on the Web.</li>\n<li>Code running in a <em>domxref(\"Worker\"</em>) has a <em>domxref(\"WorkerGlobalScope\"</em>) object as its global object.</li>\n<li>Scripts running under <em>Glossary(\"Node.js\"</em>) have an object called <a href=\"https://nodejs.org/api/globals.html#globals_global\"><code>global</code></a> as their global object.</li>\n</ul>\n<blockquote>\n<p><strong>Note</strong>: Unlike <em>jsxref(\"Statements/var\", \"var\"</em>), the statements <em>jsxref(\"Statements/let\", \"let\"</em>) and <em>jsxref(\"Statements/const\", \"const\"</em>) do not create properties of the global object.</p>\n</blockquote>\n<h2><code>window</code> object in the Browser</h2>\n<p>The <code>window</code> object is the Global Object in the Browser. Any Global Variables or Functions can be accessed as <em>properties</em> of the <code>window</code> object.</p>\n<h3>Access Global Variables</h3>\n<pre><code class=\"language-js\">var foo = \"foobar\";\nfoo === window.foo; // Returns: true\n</code></pre>\n<p>After defining a Global Variable <code>foo</code>, we can access its value directly from the <code>window</code> object, by using the variable name <code>foo</code> as a property name of the Global Object <code>window.foo</code>.</p>\n<h4>Explanation:</h4>\n<p>The global variable <code>foo</code> was stored in the <code>window</code> object, like this:</p>\n<pre><code class=\"language-js\">foo: \"foobar\"\n</code></pre>\n<h3>Access Global Functions</h3>\n<pre><code class=\"language-js\">function greeting() {\n   console.log(\"Hi!\");\n}\n\nwindow.greeting(); // It is the same as the normal invoking: greeting();\n</code></pre>\n<p>The example above explains how Global Functions are stored as <em>properties</em> in the <code>window</code> object. We created a Global Function called <code>greeting</code>, then invoked it using the <code>window</code> object.</p>\n<h4>Explanation:</h4>\n<p>The global function <code>greeting</code> was stored in the <code>window</code> object, like this:</p>\n<pre><code class=\"language-js\">greeting: function greeting() {\n   console.log(\"Hi!\");\n}\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>glossary(\"global scope\"</em>)</li>\n<li><em>glossary(\"object\"</em>)</li>\n</ul>\n</li>\n<li><em>domxref(\"Window\"</em>)</li>\n<li><em>domxref(\"WorkerGlobalScope\"</em>)</li>\n<li><a href=\"https://nodejs.org/api/globals.html#globals_global\"><code>global</code></a></li>\n</ul>\n<hr>\n<h2>Term:  Global scope</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>In a programming environment, the <em>global scope</em> is the <em>glossary(\"scope\"</em>) that contains, and is visible in, all other scopes.</p>\n</blockquote>\n<p>In client-side JavaScript, the global scope is generally the web page inside which all the code is being executed.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#variable_scope\">Introduction to variable scope in JavaScript</a></li>\n<li><em>interwiki(\"wikipedia\", \"Scope (computer science)\", \"Scope\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Global variable</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A global variable is a <em>glossary(\"variable\"</em>) that is declared in the <em>glossary(\"global scope\"</em>) in other words, a variable that is visible from all other scopes.</p>\n</blockquote>\n<p>In JavaScript it is a <em>glossary(\"property\"</em>) of the <em>glossary(\"global object\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Global variable\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Glyph</h2>\n<ul>\n<li>Glossary</li>\n<li>SVG</li>\n<li>\n<h2>typography</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>glyph</strong> is a term used in typography for the visual representation of one or more <em>Glossary(\"character\", \"characters\"</em>).</p>\n</blockquote>\n<p>The fonts used by a website contain different sets of glyphs, which represent the characters of the font.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Glyph\">Glyph</a> on Wikipedia</li>\n<li><a href=\"https://www.quora.com/Whats-the-difference-between-a-character-a-glyph-and-a-grapheme/answer/Thomas-Phinney\">Glyph, character and grapheme</a> on Quora</li>\n</ul>\n<hr>\n<h2>Term:  Google Chrome</h2>\n<ul>\n<li>Browser</li>\n<li>Chrome canary</li>\n<li>Chrome stable</li>\n<li>Chromium</li>\n<li>Glossary</li>\n<li>WebMechanics</li>\n<li>\n<h2>google chrome</h2>\n</li>\n</ul>\n<blockquote>\n<p>Google Chrome is a free Web <em>glossary(\"browser\"</em>) developed by Google. It's based on the <a href=\"https://www.chromium.org/\">Chromium</a> open source project. Some key differences are described on the <a href=\"https://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome\">Chromium wiki</a>. Chrome supports its own layout called <em>glossary(\"Blink\"</em>). Note that the iOS version of Chrome uses that platform's WebView, not Blink.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Google Chrome\", \"Google Chrome\"</em>) on Wikipedia</li>\n</ul>\n<h3>For Chrome Users</h3>\n<p>Use one of these links if you're an everyday user.</p>\n<ul>\n<li><a href=\"https://play.google.com/store/apps/details?id=com.android.chrome\">Android</a></li>\n<li><a href=\"https://apps.apple.com/us/app/chrome-web-browser-by-google/id535886823\">iOS</a></li>\n<li><a href=\"https://www.google.com/chrome/\">Desktop</a></li>\n</ul>\n<h3>For Web Developers</h3>\n<p>If you want to try the latest Chrome features, install one of the pre-stable builds. Google pushes updates frequently and has designed the distributions to run side-by-side with the stable version. Visit the <a href=\"https://chromereleases.googleblog.com\">Chrome Releases Blog</a> to learn what's new.</p>\n<ul>\n<li><a href=\"https://play.google.com/store/apps/details?id=com.chrome.dev\">Chrome Dev for Android</a></li>\n<li><a href=\"https://www.google.com/chrome/browser/canary.html\">Chrome Canary for desktop</a>.</li>\n</ul>\n<hr>\n<h2>Term:  GPL</h2>\n<ul>\n<li>GPL</li>\n<li>Glossary</li>\n<li>License</li>\n<li>OpenPractices</li>\n<li>Remixing</li>\n<li>\n<h2>Sharing</h2>\n</li>\n</ul>\n<blockquote>\n<p>The (GNU) GPL (General Public License) is a <em>Glossary(\"copyleft\"</em>) free software license published by the Free Software Foundation. Users of a GPL-licensed program are granted the freedom to use it, read the source code, modify it and redistribute the changes they made, provided they redistribute the program (modified or unmodified) under the same license.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.gnu.org/licenses/gpl-faq.html\">FAQ</a> on GNU licenses</li>\n<li><a href=\"https://en.wikipedia.org/wiki/GNU_General_Public_License\">GNU GPL</a> on Wikipedia</li>\n<li><a href=\"https://gnu.org/licenses/gpl.html\">GPL License</a> text</li>\n</ul>\n<hr>\n<h2>Term:  GPU</h2>\n<ul>\n<li>Glossary</li>\n<li>Graphics</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>The GPU (Graphics Processing Unit) is a computer component similar to the CPU (Central Processing Unit). It specializes in the drawing of graphics (both 2D and 3D) on your monitor.</p>\n</blockquote>\n<hr>\n<h2>Term:  Graceful degradation</h2>\n<ul>\n<li>Design</li>\n<li>Glossary</li>\n<li>\n<h2>graceful degradation</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Graceful degradation</strong> is a design philosophy that centers around trying to build a modern web site/application that will work in the newest browsers, but falls back to an experience that while not as good still delivers essential content and functionality in older browsers.</p>\n</blockquote>\n<p><em>Glossary(\"Polyfill\",\"Polyfills\"</em>) can be used to build in missing features with JavaScript, but acceptable alternatives to features like styling and layout should be provided where possible, for example by using the CSS cascade, or HTML fallback behavior. Some good examples can be found in <a href=\"/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/HTML_and_CSS\">Handling common HTML and CSS problems</a>.</p>\n<p>It is a useful technique that allows Web developers to focus on developing the best possible websites, given that those websites are accessed by multiple unknown user-agents. <em>Glossary(\"Progressive enhancement\"</em>) is related but different — often seen as going in the opposite direction to graceful degradation. In reality both approaches are valid and can often complement one another.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Graceful degradation\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/HTML_and_CSS\">Handling common HTML and CSS problems</a></li>\n<li><a href=\"/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection\">Implementing feature detection</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Graceful degradation\"</em>)</li>\n<li><em>Glossary(\"Polyfill\"</em>)</li>\n<li><em>Glossary(\"Progressive enhancement\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Grid Areas</h2>\n<ul>\n<li>CSS</li>\n<li>CSS Grids</li>\n<li>\n<h2>Reference</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>grid area</strong> is one or more <em>glossary(\"grid cell\", \"grid cells\"</em>) that make up a rectangular area on the grid. Grid areas are created when you place an item using <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Line-based_Placement_with_CSS_Grid\">line-based placement</a> or when defining areas using <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas\">named grid areas</a>.</p>\n</blockquote>\n<p><img src=\"1_grid_area.png\" alt=\"Image showing a highlighted grid area\"></p>\n<p>Grid areas <em>must</em> be rectangular in nature; it is not possible to create, for example, a T- or L-shaped grid area.</p>\n<h2>Example</h2>\n<p>In the example below I have a grid container with two grid items. I have named these with the <em>cssxref(\"grid-area\"</em>) property and then laid them out on the grid using <em>cssxref(\"grid-template-areas\"</em>). This creates two grid areas, one covering four grid cells, the other two.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: repeat(3,1fr);\n  grid-template-rows: 100px 100px;\n  grid-template-areas:\n    \"a a b\"\n    \"a a b\";\n}\n.item1 {\n  grid-area: a;\n}\n.item2 {\n  grid-area: b;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div class=\"item1\">Item&#x3C;/div>\n   &#x3C;div class=\"item2\">Item&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<p>_ EmbedLiveSample('Example', '300', '280') }}</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid-auto-rows\"</em>)</li>\n<li><em>cssxref(\"grid-auto-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-areas\"</em>)</li>\n<li><em>cssxref(\"grid-area\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n<li>CSS Grid Layout Guide: <em>[Grid template areas](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Grid</em>Template<em>Areas)</em></li>\n<li><a href=\"https://drafts.csswg.org/css-grid/#grid-area-concept\">Definition of Grid Areas in the CSS Grid Layout specification</a></li>\n</ul>\n<hr>\n<h2>Term:  Grid Axis</h2>\n<ul>\n<li>CSS</li>\n<li>\n<h2>CSS Grids</h2>\n</li>\n</ul>\n<blockquote>\n<p>CSS Grid Layout is a two-dimensional layout method enabling the laying out of content in <em>rows</em> and <em>columns</em>. Therefore in any grid we have two axes. The <em>block or column axis</em>, and the <em>inline or row axis</em>.</p>\n</blockquote>\n<p>It is along these axes that items can be aligned and justified using the properties defined in the <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Box_Alignment_in_CSS_Grid_Layout\">Box Alignment specification</a>.</p>\n<p>In CSS the <em>block or column axis</em> is the axis used when laying out blocks of text. If you have two paragraphs and are working in a right to left, top to bottom language they lay out one below the other, on the block axis.</p>\n<p><img src=\"7_block_axis.png\" alt=\"Diagram showing the block axis in CSS Grid Layout.\"></p>\n<p>The <em>inline or row axis</em> runs across the Block Axis and is the direction along which regular text flows. These are our rows in CSS Grid Layout.</p>\n<p><img src=\"7_inline_axis.png\" alt=\"Diagram showing the inline axis in CSS Grid Layout.\"></p>\n<p>The physical direction of these axes can change according to the <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Logical_Values_and_Writing_Modes\">writing mode</a> of the document.</p>\n<h4>See also</h4>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n<li>CSS Grid Layout Guide: <em>[Box alignment in Grid Layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Box</em>Alignment<em>in</em>CSS<em>Grid</em>Layout)_</li>\n<li>CSS Grid Layout Guide: <em>[Grids, logical values and writing modes](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/CSS</em>Grid<em>Logical</em>Values<em>and</em>Writing<em>Modes)</em></li>\n</ul>\n<hr>\n<h2>Term:  Grid Cell</h2>\n<ul>\n<li>\n<h2>CSS Grids</h2>\n</li>\n</ul>\n<blockquote>\n<p>In a <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>, a <strong>grid cell</strong> is the smallest unit you can have on your CSS grid. It is the space between four intersecting <em>glossary(\"grid lines\"</em>) and conceptually much like a table cell.</p>\n</blockquote>\n<p><img src=\"1_grid_cell.png\" alt=\"Diagram showing an individual cell on the grid.\"></p>\n<p>If you do not place items using one of the grid placement methods, direct children of the grid container will be placed one into each individual grid cell by the auto-placement algorithm. Additional row or column <em>glossary(\"grid tracks\", \"tracks\"</em>) will be created to create enough cells to hold all items.</p>\n<h2>Example</h2>\n<p>In the example we have created a three column track grid. The five items are placed into grid cells working along an initial row of three grid cells, then creating a new row for the remaining two.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: repeat(3,1fr);\n  grid-auto-rows: 100px;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div>One&#x3C;/div>\n   &#x3C;div>Two&#x3C;/div>\n   &#x3C;div>Three&#x3C;/div>\n   &#x3C;div>Four&#x3C;/div>\n   &#x3C;div>Five&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<p>_ EmbedLiveSample('Example', '300', '280') }}</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid-auto-rows\"</em>)</li>\n<li><em>cssxref(\"grid-auto-columns\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n<li><a href=\"https://drafts.csswg.org/css-grid/#grid-track-concept\">Definition of Grid Cells in the CSS Grid Layout specification</a></li>\n</ul>\n<hr>\n<h2>Term:  Grid Column</h2>\n<ul>\n<li>CSS</li>\n<li>\n<h2>CodingScripting</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>grid column</strong> is a vertical track in a <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>, and is the space between two vertical grid lines. It is defined by the <em>cssxref(\"grid-template-columns\"</em>) property or in the shorthand <em>cssxref(\"grid\"</em>) or <em>cssxref(\"grid-template\"</em>) properties.</p>\n</blockquote>\n<p>In addition, columns may be created in the <em>implicit grid</em> when items are placed outside of columns created in the <em>explicit grid</em>. These columns will be auto-sized by default, or can have a size specified with the <em>cssxref(\"grid-auto-columns\"</em>) property.</p>\n<p>When working with alignment in <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>, the axis down which columns run is known as the <em>block, or column, axis</em>.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-auto-columns\"</em>)</li>\n<li><em>cssxref(\"grid\"</em>)</li>\n<li><em>cssxref(\"grid-template\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n</ul>\n<hr>\n<h2>Term:  Grid container</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>\n<h2>grid</h2>\n</li>\n</ul>\n<blockquote>\n<p>Using the value <code>grid</code> or <code>inline-grid</code> on an element turns it into a <strong>grid container</strong> using <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>, and any direct children of this element become grid items.</p>\n</blockquote>\n<p>When an element becomes a grid container it establishes a <strong>grid formatting context</strong>. The direct children can now lay themselves out on any explicit grid defined using <em>cssxref(\"grid-template-columns\"</em>) and <em>cssxref(\"grid-template-rows\"</em>), or on the <em>implicit grid</em> created when an item is placed outside of the <em>explicit grid</em>.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid-auto-columns\"</em>)</li>\n<li><em>cssxref(\"grid-auto-rows\"</em>)</li>\n<li><em>cssxref(\"grid\"</em>)</li>\n<li><em>cssxref(\"grid-template\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n</ul>\n<hr>\n<h2>Term:  Grid Lines</h2>\n<ul>\n<li>\n<h2>CSS Grids</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Grid lines</strong> are created when you define <em>glossary(\"Grid tracks\", \"tracks\"</em>) in the explicit grid using <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>.</p>\n</blockquote>\n<h2>Example</h2>\n<p>In the following example there is a grid with three column tracks and two row tracks. This gives us 4 column lines and 3 row lines.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n     display: grid;\n     grid-template-columns: repeat(3, 1fr);\n     grid-template-rows: repeat(3, 100px);\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div>One&#x3C;/div>\n   &#x3C;div>Two&#x3C;/div>\n   &#x3C;div>Three&#x3C;/div>\n   &#x3C;div>Four&#x3C;/div>\n   &#x3C;div>Five&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  grid-template-rows: 100px 100px;\n}\n</code></pre>\n<p>_ EmbedLiveSample('Example', '500', '250') }}</p>\n<p>Lines can be addressed using their line number. In a left-to-right language such as English, column line 1 will be on the left of the grid, row line 1 on the top. Lines numbers respect the <a href=\"/en-US/docs/Web/CSS/CSS_Writing_Modes\">writing mode</a> of the document and so in a right-to-left language for example, column line 1 will be on the right of the grid. The image below shows the line numbers of the grid, assuming the language is left-to-right.</p>\n<p><img src=\"1_diagram_numbered_grid_lines.png\" alt=\"Diagram showing the grid with lines numbered.\"></p>\n<p>Lines are also created in the <em>implicit grid</em> when implicit tracks are created to hold content positioned outside of the <em>explicit grid</em>, however these lines cannot be addressed by a number.</p>\n<h2>Placing items onto the grid by line number</h2>\n<p>Having created a grid, you can place items onto the grid by line number. In the following example the item is positioned from column line 1 to column line 3, and from row line 1 to row line 3.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n     display: grid;\n     grid-template-columns: repeat(3, 1fr);\n     grid-template-rows: repeat(3, 100px);\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div class=\"item\">Item&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  grid-template-rows: 100px 100px;\n}\n.item {\n  grid-column-start: 1;\n  grid-column-end: 3;\n  grid-row-start: 1;\n  grid-row-end: 3;\n}\n</code></pre>\n<p>_ EmbedLiveSample('Placing<em>items</em>onto<em>the</em>grid<em>by</em>line_number', '500', '250') }}</p>\n<h2>Naming lines</h2>\n<p>The lines created in the <em>explicit grid</em> can be named, by adding the name in square brackets before or after the track sizing information. When placing an item, you can then use these names instead of the line number, as demonstrated below.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n     display: grid;\n     grid-template-columns: repeat(3, 1fr);\n     grid-template-rows: repeat(3, 100px);\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div class=\"item\">Item&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: [col1-start] 1fr [col2-start] 1fr [col3-start] 1fr [cols-end];\n  grid-template-rows: [row1-start] 100px [row2-start] 100px [rows-end];\n}\n.item {\n  grid-column-start: col1-start;\n  grid-column-end: col3-start;\n  grid-row-start: row1-start;\n  grid-row-end: rows-end;\n}\n</code></pre>\n<p>_ EmbedLiveSample('Naming_lines', '500', '250') }}</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid-column-start\"</em>)</li>\n<li><em>cssxref(\"grid-column-end\"</em>)</li>\n<li><em>cssxref(\"grid-column\"</em>)</li>\n<li><em>cssxref(\"grid-row-start\"</em>)</li>\n<li><em>cssxref(\"grid-row-end\"</em>)</li>\n<li><em>cssxref(\"grid-row\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n<li>CSS Grid Layout Guide: <em>[Line-based placement with CSS Grid](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Line-based</em>Placement<em>with</em>CSS<em>Grid)</em></li>\n<li>CSS Grid Layout Guide: <em>[Layout using named grid lines](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Layout</em>using<em>Named</em>Grid<em>Lines)</em></li>\n<li>CSS Grid Layout Guide: <em>[CSS Grids, Logical Values and Writing Modes](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/CSS</em>Grid<em>Logical</em>Values<em>and</em>Writing<em>Modes)</em></li>\n<li><a href=\"https://drafts.csswg.org/css-grid/#grid-line-concept\">Definition of Grid Lines in the CSS Grid Layout specification</a></li>\n</ul>\n<hr>\n<h2>Term:  Grid Row</h2>\n<ul>\n<li>\n<h2>CSS Grids</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>grid row</strong> is a horizontal track in a <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>, that is the space between two horizontal grid lines. It is defined by the <em>cssxref(\"grid-template-rows\"</em>) property or in the shorthand <em>cssxref(\"grid\"</em>) or <em>cssxref(\"grid-template\"</em>) properties.</p>\n</blockquote>\n<p>In addition, rows may be created in the <em>implicit grid</em> when items are placed outside of rows created in the <em>explicit grid</em>. These rows will be auto sized by default, or can have a size specified with the <em>cssxref(\"grid-auto-rows\"</em>) property.</p>\n<p>When working with alignment in <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a>, the axis along which rows run is known as the <em>inline, or row, axis</em>.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid-auto-rows\"</em>)</li>\n<li><em>cssxref(\"grid\"</em>)</li>\n<li><em>cssxref(\"grid-template\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n</ul>\n<hr>\n<h2>Term:  Grid Tracks</h2>\n<ul>\n<li>\n<h2>CSS Grids</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>grid track</strong> is the space between two adjacent <em>glossary(\"grid lines\"</em>). They are defined in the <em>explicit grid</em> by using the <em>cssxref(\"grid-template-columns\"</em>) and <em>cssxref(\"grid-template-rows\"</em>) properties or the shorthand <em>cssxref(\"grid\"</em>) or <em>cssxref(\"grid-template\"</em>) properties. Tracks are also created in the <em>implicit grid</em> by positioning a grid item outside of the tracks created in the explicit grid.</p>\n</blockquote>\n<p>The image below shows the first row track on a grid.</p>\n<p><img src=\"1_grid_track.png\" alt=\"Diagram showing a grid track.\"></p>\n<h2>Track sizing in the explicit grid</h2>\n<p>When defining grid tracks using <em>cssxref(\"grid-template-columns\"</em>) and <em>cssxref(\"grid-template-rows\"</em>) you may use any length unit, and also the flex unit, <code>fr</code> which indicates a portion of the available space in the grid container.</p>\n<h2>Example</h2>\n<p>The example below demonstrates a grid with three column tracks, one of 200 pixels, the second of 1fr, the third of 3fr. Once the 200 pixels has been subtracted from the space available in the grid container, the remaining space is divided by 4. One part is given to column 2, 3 parts to column 3.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: 200px 1fr 3fr;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div>One&#x3C;/div>\n   &#x3C;div>Two&#x3C;/div>\n   &#x3C;div>Three&#x3C;/div>\n   &#x3C;div>Four&#x3C;/div>\n   &#x3C;div>Five&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<p>_ EmbedLiveSample('Example', '500', '230') }}</p>\n<h2>Track sizing in the implicit grid</h2>\n<p>Tracks created in the implicit grid are auto-sized by default, however you can define a size for these tracks using the <em>cssxref(\"grid-auto-rows\"</em>) and <em>cssxref(\"grid-auto-columns\"</em>) properties.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout\">Basic concepts of grid layout</a></li>\n<li><a href=\"https://drafts.csswg.org/css-grid/#grid-track-concept\">Definition of Grid Tracks in the CSS Grid Layout specification</a></li>\n<li>\n<p>Property reference</p>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid\"</em>)</li>\n<li><em>cssxref(\"grid-template\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Grid</h2>\n<ul>\n<li>CSS</li>\n<li>CSS Grid</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>CSS grid</em> is defined using the <code>grid</code> value of the <em>cssxref(\"display\"</em>) property; you can define columns and rows on your grid using the <em>cssxref(\"grid-template-rows\"</em>) and <em>cssxref(\"grid-template-columns\"</em>) properties.</p>\n</blockquote>\n<p>The grid that you define using these properties is described as an <em>explicit grid</em>.</p>\n<p>If you place content outside of this explicit grid, or if you are relying on auto-placement and the grid algorithm needs to create additional row or column <em>glossary(\"grid tracks\", \"tracks\"</em>) to hold <em>glossary(\"grid item\", \"grid items\"</em>), then extra tracks will be created in the implicit grid. The <em>implicit grid</em> is the grid created automatically due to content being added outside of the tracks defined.</p>\n<p>In the example below I have created an <em>explicit grid</em> of three columns and two rows. The <em>third</em> row on the grid is an <em>implicit grid</em> row track, formed due to their being more than the six items which fill the explicit tracks.</p>\n<h2>Example</h2>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #ffd8a8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: 1fr 1fr 1fr;\n  grid-template-rows: 100px 100px;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div>One&#x3C;/div>\n   &#x3C;div>Two&#x3C;/div>\n   &#x3C;div>Three&#x3C;/div>\n   &#x3C;div>Four&#x3C;/div>\n   &#x3C;div>Five&#x3C;/div>\n   &#x3C;div>Six&#x3C;/div>\n   &#x3C;div>Seven&#x3C;/div>\n   &#x3C;div>Eight&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<p>_ EmbedLiveSample('Example', '500', '330') }}</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout\">Basic concepts of grid layout</a></li>\n<li>\n<p>Property reference:</p>\n<ul>\n<li><em>cssxref(\"grid-template-columns\"</em>)</li>\n<li><em>cssxref(\"grid-template-rows\"</em>)</li>\n<li><em>cssxref(\"grid\"</em>)</li>\n<li><em>cssxref(\"grid-template\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Guard</h2>\n<ul>\n<li>API</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>guard</h2>\n</li>\n</ul>\n<blockquote>\n<p>Guard is a feature of <em>domxref(\"Headers\"</em>) objects (as defined in the <em>domxref(\"Fetch</em>API\",\"Fetch spec\"<em>), which affects whether methods such as _domxref(\"Headers.set\",\"set()\"</em>) and <em>domxref(\"Headers.append\",\"append()\"</em>) can change the header's contents. For example, <code>immutable</code> guard means that headers can't be changed. For more information, read <a href=\"/en-US/docs/Web/API/Fetch_API/Basic_concepts#guard\">Fetch basic concepts: guard</a>.</p>\n</blockquote>\n<hr>\n<h2>Term:  Gutters</h2>\n<ul>\n<li>\n<h2>CSS Grids</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Gutters</strong> or <em>alleys</em> are spacing between content tracks. These can be created in <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout\">CSS Grid Layout</a> using the <em>cssxref(\"column-gap\"</em>), <em>cssxref(\"row-gap\"</em>), or <em>cssxref(\"gap\"</em>) properties.</p>\n</blockquote>\n<h2>Example</h2>\n<p>In the example below we have a three-column and two-row track grid, with 20-pixel gaps between column tracks and <code>20px</code>-gaps between row tracks.</p>\n<pre><code class=\"language-css\" data-meta=\"hidden\">* {box-sizing: border-box;}\n\n.wrapper {\n    border: 2px solid #f76707;\n    border-radius: 5px;\n    background-color: #fff4e6;\n}\n\n.wrapper > div {\n    border: 2px solid #ffa94d;\n    border-radius: 5px;\n    background-color: #fff8f8;\n    padding: 1em;\n    color: #d9480f;\n}\n</code></pre>\n<pre><code class=\"language-css\">.wrapper {\n  display: grid;\n  grid-template-columns: repeat(3,1.2fr);\n  grid-auto-rows: 45%;\n  grid-column-gap: 20px;\n  grid-row-gap: 20px;\n}\n</code></pre>\n<pre><code class=\"language-html\">&#x3C;div class=\"wrapper\">\n   &#x3C;div>One&#x3C;/div>\n   &#x3C;div>Two&#x3C;/div>\n   &#x3C;div>Three&#x3C;/div>\n   &#x3C;div>Four&#x3C;/div>\n   &#x3C;div>Five&#x3C;/div>\n&#x3C;/div>\n</code></pre>\n<p>_ EmbedLiveSample('Example', '300', '280') }}</p>\n<p>In terms of grid sizing, gaps act as if they were a regular grid track however nothing can be placed into the gap. The gap acts as if the grid line at that location has gained extra size, so any grid item placed after that line begins at the end of the gap.</p>\n<p>The grid-gap properties are not the only thing that can cause tracks to space out. Margins, padding or the use of the space distribution properties in <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Box_Alignment_in_CSS_Grid_Layout\">Box Alignment</a> can all contribute to the visible gap - therefore the grid-gap properties should not be seen as equal to “the gutter size” unless you know that your design has not introduced any additional space with one of these methods.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"column-gap\"</em>)</li>\n<li><em>cssxref(\"row-gap\"</em>)</li>\n<li><em>cssxref(\"gap\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Grid Layout Guide: <em>[Basic concepts of grid layout](/en-US/docs/Web/CSS/CSS</em>Grid<em>Layout/Basic</em>Concepts<em>of</em>Grid<em>Layout)</em></li>\n<li><a href=\"https://drafts.csswg.org/css-grid/#gutters\">Definition of gutters in the CSS Grid Layout specification</a></li>\n</ul>\n<hr>\n<h2>Term:  gzip compression</h2>\n<ul>\n<li>Glossary</li>\n<li>compression</li>\n<li>\n<h2>gzip</h2>\n</li>\n</ul>\n<blockquote>\n<p>gzip is a file format used for file compression and decompression. It is based on the Deflate algorithm that allows files to be made smaller in size which allows for faster network transfers. gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before sending them, and browsers can uncompress files upon receiving them.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"http://www.gzip.org/\">The gzip home page</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Gzip\">gzip on Wikipedia</a></li>\n</ul>\n<hr>\n<h2>Term:  Hash</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Hash</h2>\n</li>\n</ul>\n<blockquote>\n<p>The hash function takes a variable-length message input and produces a fixed-length hash output. It is commonly in the form of a 128-bit \"fingerprint\" or \"message digest\". Hashes are very useful for <em>glossary(\"cryptography\"</em>) — they insure the integrity of transmitted data, and provide the basis for <em>glossary(\"HMAC\"</em>), which enables message authentication.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Hash function\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Head</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>head</li>\n<li>\n<h2>metadata</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>Head</strong> is the part of an <em>glossary(\"HTML\"</em>) document that contains <em>glossary(\"metadata\"</em>) about that document, such as author, description, and links to <em>glossary(\"CSS\"</em>) or <em>glossary(\"JavaScript\"</em>) files that should be applied to the HTML.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>htmlelement(\"head\"</em>) element reference on MDN</li>\n<li><a href=\"/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML\">The HTML &#x3C;head></a> on the MDN Learning Area</li>\n</ul>\n<hr>\n<h2>Term:  High-level programming language</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A high-level programming language has a <strong>significant abstraction</strong> from the details of computer operation. It is designed to be easily understood by humans and for this reason they must be translated by another software. Unlike low-level programming languages, it may use natural language elements, or may automate (or even entirely hide) significant areas of computing systems, making the process of developing simpler and more understandable relative to a lower-level language. The amount of abstraction provided defines how \"high-level\" a programming language is.</p>\n</blockquote>\n<p>The idea of a language automatically translatable into machine code, but nearer to human logic, was introduced in computer science in the 1950s, especially thanks to the work of <strong>John Backus</strong> (IBM), to whom it owes the first high-level language to have been widely circulated: Fortran. For this innovation Backus received the Turing prize.</p>\n<hr>\n<h2>Term:  HMAC</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Hash</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Hash-based message authentication code</strong>(<em>HMAC</em>) is a protocol used for <em>Glossary(\"cryptography\", \"cryptographically\"</em>) authenticating messages.</p>\n</blockquote>\n<p>It can use any kind of <em>Glossary(\"Cryptographic hash function\", \"cryptographic functions\"</em>), and its strength depends on the underlying function (SHA1 or MD5 for instance), and the chosen secret key. With such a combination, the HMAC verification <em>Glossary(\"Algorithm\", \"algorithm\"</em>) is then known with a compound name such as HMAC-SHA1.</p>\n<p>HMAC is used to ensure both integrity and authentication.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Hash-based message authentication code\", \"HMAC\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.ietf.org/rfc/rfc2104.txt\">RFC 2104</a> on IETF</li>\n</ul>\n<hr>\n<h2>Term:  Hoisting</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>JavaScript <strong>Hoisting</strong> refers to the process whereby the interpreter appears to move the <em>declaration</em> of functions, variables or classes to the top of their scope, prior to execution of the code.</p>\n</blockquote>\n<p>Hoisting allows functions to be safely used in code before they are declared.</p>\n<p>Variable and class <em>declarations</em> are also hoisted, so they too can be referenced before they are declared.\nNote that doing so can lead to unexpected errors, and is not generally recommended.</p>\n<blockquote>\n<p><strong>Note:</strong> The term hoisting is not used in any normative specification prose prior to <a href=\"https://www.ecma-international.org/ecma-262/6.0/index.html\">ECMAScript® 2015 Language Specification</a>.\nHoisting was thought up as a general way of thinking about how execution contexts (specifically the creation and execution phases) work in JavaScript.</p>\n</blockquote>\n<h2>Function hoisting</h2>\n<p>One of the advantages of hoisting is that it lets you use a function before you declare it in your code.</p>\n<pre><code class=\"language-js\">catName(\"Tiger\");\n\nfunction catName(name) {\n  console.log(\"My cat's name is \" + name);\n}\n/*\nThe result of the code above is: \"My cat's name is Tiger\"\n*/\n</code></pre>\n<p>Without hoisting you would <em>have</em> to write the same code like this:</p>\n<pre><code class=\"language-js\">function catName(name) {\n  console.log(\"My cat's name is \" + name);\n}\n\ncatName(\"Tiger\");\n/*\nThe result of the code above is the same: \"My cat's name is Tiger\"\n*/\n</code></pre>\n<h2>Variable hoisting</h2>\n<p>Hoisting works with variables too, so you can use a variable in code before it is declared and/or initialized.</p>\n<p>However JavaScript only hoists declarations, not initializations!\nThis means that initialization doesn't happen until the associated line of code is executed, even if the variable was originally initialized then declared, or declared and initialized in the same line.</p>\n<p>Until that point in the execution is reached the variable has its <em>default</em> initialization (<code>undefined</code> for a variable declared using <code>var</code>, otherwise uninitialized).</p>\n<blockquote>\n<p><strong>Note:</strong> Conceptually variable hoisting is often presented as the interpreter \"splitting variable declaration and initialization, and moving (just) the declarations to the top of the code\".</p>\n</blockquote>\n<p>Below are some examples showing what can happen if you use a variable before it is declared.</p>\n<h3><code>var</code> hoisting</h3>\n<p>Here we declare then initialize the value of a <code>var</code> after using it.\nThe default initialization of the <code>var</code> is <code>undefined</code>.</p>\n<pre><code class=\"language-js\">console.log(num); // Returns 'undefined' from hoisted var declaration (not 6)\nvar num; // Declaration\nnum = 6; // Initialization\nconsole.log(num); // Returns 6 after the line with initialization is executed.\n</code></pre>\n<p>The same thing happens if we declare and initialize the variable in the same line.</p>\n<pre><code class=\"language-js\">console.log(num); // Returns 'undefined' from hoisted var declaration (not 6)\nvar num = 6; // Initialization and declaration.\nconsole.log(num); // Returns 6 after the line with initialization is executed.\n</code></pre>\n<p>If we forget the declaration altogether (and only initialize the value) the variable isn't hoisted.\nTrying to read the variable before it is initialized results in <code>ReferenceError</code> exception.</p>\n<pre><code class=\"language-js\">console.log(num); // Throws ReferenceError exception - the interpreter doesn't know about `num`.\nnum = 6; // Initialization\n</code></pre>\n<p>Note however that initialization also causes declaration (if not already declared).\nThe code snippet below will work, because even though it isn't hoisted, the variable is initialized and effectively declared before it is used.</p>\n<pre><code class=\"language-js\">a = 'Cran'; // Initialize a\nb = 'berry'; // Initialize b\n\nconsole.log(a + \"\" + b); // 'Cranberry'\n</code></pre>\n<h3><code>let</code> and <code>const</code> hoisting</h3>\n<p>Variables declared with <code>let</code> and <code>const</code> are also hoisted but, unlike <code>var</code>, are not initialized with a default value.\nAn exception will be thrown if a variable declared with <code>let</code> or <code>const</code> is read before it is initialized.</p>\n<pre><code class=\"language-js\">console.log(num); // Throws ReferenceError exception as the variable value is uninitialized\nlet num = 6; // Initialization\n</code></pre>\n<p>Note that it is the order in which code is <em>executed</em> that matters, not the order in which it is written in the source file.\nThe code will succeed provided the line that initializes the variable is executed before any line that reads it.</p>\n<p>For information and examples see <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz\"><code>let</code> > temporal dead zone</a>.</p>\n<h2><code>class</code> hoisting</h2>\n<p>Classes defined using a <a href=\"/en-US/docs/Web/JavaScript/Reference/Classes#class_declarations\">class declaration</a> are hoisted, which means that JavaScript has a reference to the class.\nHowever the class is not initialized by default, so any code that uses it before the line in which it is initialized is executed will throw a <code>ReferenceError</code>.</p>\n<h2>Function and class expression hoisting</h2>\n<p><a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/function\">Function expressions</a> and <a href=\"/en-US/docs/Web/JavaScript/Reference/Classes#class_expressions\">class expressions</a> are not hoisted.</p>\n<p>The expressions evaluate to a function or class (respectively), which are typically assigned to a variable.\nIn this case the variable declaration is hoisted and the expression is its initialization.\nTherefore the expressions are not evaluated until the relevant line is executed.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/var\"><code>var</code> statement</a> — MDN</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/let\"><code>let</code> statement</a> — MDN</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/const\"><code>const</code> statement</a> — MDN</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/function\"><code>function</code> statement</a> — MDN</li>\n</ul>\n<hr>\n<h2>Term:  Host</h2>\n<ul>\n<li>Glossary</li>\n<li>Intermediate</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A host is a device connected to the <em>glossary(\"Internet\"</em>) (or a local network). Some hosts called <em>glossary(\"server\",\"servers\"</em>) offer additional services like serving webpages or storing files and emails.</p>\n</blockquote>\n<p>The host doesn't need to be a hardware instance. It can be generated by virtual machines. The host generated by virtual machines is called \"Virtual hosting\".</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Host (network)\", \"Host\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Hotlink</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>hotlink</strong> (also known as an <strong>inline link</strong>) is an object (typically an image) directly linked to from another site. For example, an image hosted on site1.com is shown directly on site2.com.</p>\n</blockquote>\n<p>The practice is often frowned upon as it can cause unwanted bandwidth usage on the website hosting the linked-to object, and copyright concerns — it is considered stealing when it is done without permission.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Inline linking\", \"Hotlink\"</em>) on Wikipedia</li>\n<li><em>glossary(\"Hyperlink\"</em>) (Glossary)</li>\n</ul>\n<hr>\n<h2>Term:  Houdini</h2>\n<ul>\n<li>CSS</li>\n<li>CSS API</li>\n<li>Glossary</li>\n<li>Houdini</li>\n<li>\n<h2>Reference</h2>\n</li>\n</ul>\n<blockquote>\n<p>Houdini is a set of low level APIs that give developers the power to extend CSS, providing the ability to hook into the styling and layout process of a browser’s rendering engine. Houdini gives developers access to the <a href=\"/en-US/docs/Web/API/CSS_Object_Model\">CSS Object Model</a> (<a href=\"/en-US/docs/Glossary/CSSOM\">CSSOM</a>), enabling developers to write code the browser can parse as CSS.</p>\n</blockquote>\n<p>The benefit of Houdini is that developers can create CSS features without waiting for web standards specifications to define them and without waiting for every browser to fully implement the features.</p>\n<p>While many of the features Houdini enables can be created with JavaScript, interacting directly with the CSSOM before JavaScript is enabled provides for faster parse times. Browsers create the CSSOM —  including layout, paint, and composite processes — before applying any style updates found in scripts: layout, paint, and composite processes are repeated for updated JavaScript styles to be implemented. Houdini code doesn't wait for that first rendering cycle to be complete. Rather, it is included in that first cycle, creating renderable, understandable styles.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Houdini\">Houdini</a></li>\n<li><a href=\"/en-US/docs/Web/API/CSS_Object_Model\">CSSOM</a></li>\n<li><a href=\"/en-US/docs/Web/API/CSS_Painting_API\">CSS Paint API</a></li>\n<li><a href=\"/en-US/docs/Web/API/CSS_Typed_OM_API\">CSS Typed OM</a></li>\n</ul>\n<hr>\n<h2>Term:  HPKP</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTTP Public Key Pinning</strong> (<strong>HPKP</strong>) is a security feature that tells a web client to associate a specific cryptographic public key with a certain web server to decrease the risk of <em>Glossary(\"MITM\"</em>) attacks with forged certificates.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>HTTPHeader(\"Public-Key-Pins\"</em>)</li>\n<li><em>HTTPHeader(\"Public-Key-Pins-Report-Only\"</em>)</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc7469\">RFC 7469</a></li>\n<li>Wikipedia: <a href=\"https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning\">HTTP Public Key Pinning</a></li>\n</ul>\n<hr>\n<h2>Term:  HSTS</h2>\n<ul>\n<li>HTTP</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTTP Strict Transport Security</strong> lets a web site inform the browser that it should never load the site using HTTP and should automatically convert all attempts to access the site using HTTP to HTTPS requests instead. It consists in one HTTP header, <em>HTTPHeader(\"Strict-Transport-Security\"</em>), sent by the server with the resource.</p>\n</blockquote>\n<p>In other words, it tells the browser that changing the protocol from HTTP to HTTPS in a URL  works (and is more secure) and asks the browser to do it for every request.</p>\n<h4>See also</h4>\n<ul>\n<li><em>HTTPHeader(\"Strict-Transport-Security\"</em>)</li>\n<li>OWASP Article: <a href=\"https://www.owasp.org/index.php/HTTP_Strict_Transport_Security\">HTTP Strict Transport Security</a></li>\n<li>Wikipedia: <em>interwiki(\"wikipedia\", \"HTTP Strict Transport Security\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  HTML5</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>HTML5</li>\n<li>\n<h2>Markup</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term HTML5 is essentially a buzzword that refers to a set of modern web technologies. This includes the <em>Glossary(\"HTML\"</em>) Living Standard, along with <em>glossary(\"JavaScript\"</em>) <em>glossary(\"API\",\"APIs\"</em>) to enhance storage, multimedia, and hardware access.</p>\n</blockquote>\n<p>You may sometimes hear about \"new HTML5 elements\", or find HTML5 described as a new version of HTML. HTML5 was the successor to previous HTML versions and introduced new elements and capabilities to the language on top of the previous version, HTML 4.01, as well as improving or removing some existing functionality. However, as a Living Standard HTML now has no version. The up-to-date specification can be found at <a href=\"https://html.spec.whatwg.org/\">html.spec.whatwg.org/</a>.</p>\n<p>Any modern site should use the <a href=\"/en-US/docs/MDN/Guidelines/Code_guidelines/HTML#doctype\">HTML doctype</a> — this will ensure that you are using the latest version of HTML.</p>\n<blockquote>\n<p><strong>Note:</strong> Until 2019, the <em>glossary(\"W3C\"</em>) published a competing HTML5 standard with version numbers. Since <a href=\"https://www.w3.org/blog/news/archives/7753\">28 May 2019</a>, the WHATWG Living Standard was announced by the W3C as the sole version of HTML.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTML\">our HTML documentation</a></li>\n<li><a href=\"/en-US/docs/Learn/HTML\">HTML beginner's learning guides</a></li>\n<li><a href=\"/en-US/docs/Web/API\">Web APIs</a></li>\n</ul>\n<hr>\n<h2>Term:  HTML</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTML</strong> (HyperText Markup Language) is a descriptive language that specifies webpage structure.</p>\n</blockquote>\n<h2>Brief history</h2>\n<p>In 1990, as part of his vision of the <em>Glossary(\"World Wide Web\",\"Web\"</em>), Tim Berners-Lee defined the concept of <em>Glossary(\"hypertext\"</em>), which Berners-Lee formalized the following year through a markup mainly based on <em>Glossary(\"SGML\"</em>). The <em>Glossary(\"IETF\"</em>) began formally specifying HTML in 1993, and after several drafts released version 2.0 in 1995. In 1994 Berners-Lee founded the <em>Glossary(\"W3C\"</em>) to develop the Web. In 1996, the W3C took over the HTML work and published the HTML 3.2 recommendation a year later. HTML 4.0 was released in 1999 and became an <em>Glossary(\"ISO\"</em>) standard in 2000.</p>\n<p>At that time, the W3C nearly abandoned HTML in favor of <em>Glossary(\"XHTML\"</em>), prompting the founding of an independent group called <em>Glossary(\"WHATWG\"</em>) in 2004. Thanks to WHATWG, work on <em>Glossary(\"HTML5\"</em>) continued: the two organizations released the first draft in 2008 and the final standard in 2014.</p>\n<h2>Concept and syntax</h2>\n<p><img src=\"anatomy-of-an-html-element.png\" alt=\"Detail of the structure of an HTML element\"></p>\n<p>An HTML file is normally saved with an <code>.htm</code> or <code>.html</code> extension, served by a <em>Glossary(\"Server\",\"web server\"</em>), and can be rendered by any <em>Glossary(\"Browser\",\"Web browser\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"HTML\", \"HTML\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/HTML\">Our HTML tutorial</a></li>\n<li><a href=\"https://www.codecademy.com/learn/learn-html\">The web course on codecademy.com</a></li>\n<li><a href=\"/en-US/docs/Web/HTML\">The HTML documentation on MDN</a></li>\n<li><a href=\"https://www.w3.org/TR/html5/\">The HTML specification</a></li>\n</ul>\n<hr>\n<h2>Term:  HTTP/2</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Infrastructure</li>\n<li>Reference</li>\n<li>Web Performance</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTTP/2</strong> is a major revision of the <a href=\"/en-US/docs/Web/HTTP/Basics_of_HTTP\">HTTP network protocol</a>.</p>\n</blockquote>\n<p>The primary goals for HTTP/2 are to reduce <em>glossary(\"latency\"</em>) by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push.</p>\n<p>HTTP/2 does not modify the application semantics of HTTP in any way. All the core concepts found in HTTP 1.1, such as HTTP methods, status codes, URIs, and header fields, remain in place. Instead, HTTP/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides application complexity within the new framing layer. As a result, all existing applications can be delivered without modification.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP\">HTTP on MDN</a></li>\n<li><em>interwiki(\"wikipedia\", \"HTTP/2\", \"HTTP/2\"</em>) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>glossary(\"HTTP\"</em>)</li>\n<li><em>glossary(\"Latency\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  HTTP/3</h2>\n<ul>\n<li>HTTP</li>\n<li>Intro</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTTP/3</strong> is the upcoming major revision of the <a href=\"/en-US/docs/Web/HTTP/Basics_of_HTTP\">HTTP network protocol</a>, succeeding <em>glossary(\"HTTP 2\", \"HTTP/2\"</em>).</p>\n</blockquote>\n<p>The major point of HTTP/3 is that it uses a new <em>glossary(\"UDP\"</em>) protocol named QUIC, instead of <em>glossary(\"TCP\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP\">HTTP on MDN</a></li>\n<li><em>interwiki(\"wikipedia\", \"HTTP/3\", \"HTTP/3\"</em>) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>glossary(\"HTTP\"</em>)</li>\n<li><em>glossary(\"HTTP 2\"</em>)</li>\n<li><em>glossary(\"Latency\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  HTTP header</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP Header</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>HTTP header</strong> is a field of an HTTP request or response that passes additional context and metadata about the request or response. For example, a request message can use headers to indicate it's preferred media formats, while a response can use header to indicate the media format of the returned body. Headers are case-insensitive, begin at the start of a line and are immediately followed by a <code>':'</code> and a header-dependent value. The value finishes at the next CRLF or at the end of the message.</p>\n</blockquote>\n<p>The HTTP and Fetch specifications refer to a number of header categories, including:</p>\n<ul>\n<li><em>Glossary(\"Request header\"</em>): Headers containing more information about the resource to be fetched or about the client itself.</li>\n<li><em>Glossary(\"Response header\"</em>): Headers with additional information about the response, like its location or about the server itself (name, version, …).</li>\n<li><em>Glossary(\"Representation header\"</em>): metadata about the resource in the message body (e.g. encoding, media type, etc.).</li>\n<li><em>Glossary(\"Fetch metadata request header\"</em>): Headers with metadata about the resource in the message body (e.g. encoding, media type, etc.).</li>\n</ul>\n<p>A basic request with one header:</p>\n<pre><code class=\"language-plain\">GET /example.http HTTP/1.1\nHost: example.com\n</code></pre>\n<p>Redirects have mandatory headers (<em>HTTPHeader(\"Location\"</em>)):</p>\n<pre><code class=\"language-plain\">302 Found\nLocation: /NewPage.html\n</code></pre>\n<p>A typical set of headers:</p>\n<pre><code class=\"language-plain\">304 Not Modified\nAccess-Control-Allow-Origin: *\nAge: 2318192\nCache-Control: public, max-age=315360000\nConnection: keep-alive\nDate: Mon, 18 Jul 2016 16:06:00 GMT\nServer: Apache\nVary: Accept-Encoding\nVia: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (CloudFront)\nX-Amz-Cf-Id: TOl0FEm6uI4fgLdrKJx0Vao5hpkKGZULYN2TWD2gAWLtr7vlNjTvZw==\nX-Backend-Server: developer6.webapp.scl3.mozilla.com\nX-Cache: Hit from cloudfront\nX-Cache-Info: cached\n</code></pre>\n<blockquote>\n<p><strong>Note:</strong> Older versions of the specification referred to:</p>\n<ul>\n<li><em>Glossary(\"General header\"</em>): Headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.</li>\n<li><em>Glossary(\"Entity header\"</em>): Headers containing more information about the body of the entity, like its content length or its MIME-type (this is a superset of what are now referred to as the Representation metadata headers)</li>\n</ul>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">List of all HTTP headers</a></li>\n<li>Syntax of <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.2\">headers</a> in the HTTP specification</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"HTTP header\"</em>)</li>\n<li><em>Glossary(\"Request header\"</em>)</li>\n<li><em>Glossary(\"Response header\"</em>)</li>\n<li><em>Glossary(\"Representation header\"</em>)</li>\n<li><em>Glossary(\"Fetch metadata request header\"</em>)</li>\n<li><em>Glossary(\"Forbidden header name\"</em>)</li>\n<li><em>Glossary(\"Forbidden response header name\"</em>)</li>\n<li><em>Glossary(\"CORS-safelisted request header\"</em>)</li>\n<li><em>Glossary(\"CORS-safelisted response header\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Safe (HTTP Methods)</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>An HTTP method is <strong>safe</strong> if it doesn't alter the state of the server. In other words, a method is safe if it leads to a read-only operation. Several common HTTP methods are safe: <em>HTTPMethod(\"GET\"</em>), <em>HTTPMethod(\"HEAD\"</em>), or <em>HTTPMethod(\"OPTIONS\"</em>). All safe methods are also <em>glossary(\"idempotent\"</em>), but not all idempotent methods are safe. For example, <em>HTTPMethod(\"PUT\"</em>) and <em>HTTPMethod(\"DELETE\"</em>) are both idempotent but unsafe.</p>\n</blockquote>\n<p>Even if safe methods have a read-only semantic, servers can alter their state: e.g. they can log or keep statistics. What is important here is that by calling a safe method, the client doesn't request any server change itself, and therefore won't create an unnecessary load or burden for the server. Browsers can call safe methods without fearing to cause any harm to the server; this allows them to perform activities like pre-fetching without risk. Web crawlers also rely on calling safe methods.</p>\n<p>Safe methods don't need to serve static files only; a server can generate an answer to a safe method on-the-fly, as long as the generating script guarantees safety: it should not trigger external effects, like triggering an order in an e-commerce Web site.</p>\n<p>It is the responsibility of the application on the server to implement the safe semantic correctly, the webserver itself, being Apache, Nginx or IIS, can't enforce it by itself. In particular, an application should not allow <em>HTTPMethod(\"GET\"</em>) requests to alter its state.</p>\n<p>A call to a safe method, not changing the state of the server:</p>\n<pre><code>GET /pageX.html HTTP/1.1\n</code></pre>\n<p>A call to a non-safe method, that may change the state of the server:</p>\n<pre><code>POST /pageX.html HTTP/1.1\n</code></pre>\n<p>A call to an idempotent but non-safe method:</p>\n<pre><code>DELETE /idX/delete HTTP/1.1\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li>Definition of <a href=\"https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.1\">safe</a> in the HTTP specification.</li>\n<li>Description of common safe methods: <em>HTTPMethod(\"GET\"</em>), <em>HTTPMethod(\"HEAD\"</em>), <em>HTTPMethod(\"OPTIONS\"</em>)</li>\n<li>Description of common unsafe methods: <em>HTTPMethod(\"PUT\"</em>), <em>HTTPMethod(\"DELETE\"</em>), <em>HTTPMethod(\"POST\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  HTTPS RR</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTPS</li>\n<li>HTTPS RR</li>\n<li>Infrastructure</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTTPS RR</strong> (<strong><em>HTTPS Resource Records</em></strong>) are a type of DNS record that delivers configuration information and parameters for how to access a service via <em>Glossary(\"HTTPS\"</em>).</p>\n</blockquote>\n<p>An <em>HTTPS RR</em> can be used to optimize the process of connecting to a service using HTTPS.\nFurther, the presence of an <em>HTTPS RR</em> signals that all useful <em>Glossary(\"HTTP\"</em>) resources on the origin are reachable over HTTPS, which in turn means that a browser can safely upgrade connections to the domain from HTTP to HTTPS.</p>\n<h5>See also</h5>\n<ul>\n<li><a href=\"https://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https/00/\">Service binding and parameter specification via the DNS (DNS SVCB and HTTPS RRs)</a> (Draft IETF specification: draft-ietf-dnsop-svcb-https-00)</li>\n<li><a href=\"https://emilymstark.com/2020/10/24/strict-transport-security-vs-https-resource-records-the-showdown.html\">Strict Transport Security vs. HTTPS Resource Records: the showdown</a> (Emily M. Stark blog)</li>\n<li><em>glossary(\"SSL\"</em>)</li>\n<li><em>glossary(\"TLS\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  HTTPS</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTPS</li>\n<li>Infrastructure</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>HTTPS</strong> (<strong><em>HyperText Transfer Protocol Secure</em></strong>) is an encrypted version of the <em>Glossary(\"HTTP\"</em>) protocol. It uses <em>Glossary(\"SSL\"</em>) or <em>Glossary(\"TLS\"</em>) to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, such as when performing banking activities or online shopping.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"HTTPS\"</em>) on Wikipedia</li>\n<li><a href=\"https://movingtohttps.com/\">Moving to HTTPS community guide</a></li>\n<li><a href=\"/en-US/docs/Web/Security/Secure_Contexts\">Secure Contexts</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>glossary(\"HTTP\"</em>)</li>\n<li><em>glossary(\"SSL\"</em>)</li>\n<li><em>glossary(\"TLS\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Hyperlink</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p>Hyperlinks connect webpages or data items to one another. In HTML, <em>HTMLElement(\"a\"</em>) elements define hyperlinks from a spot on a webpage (like a text string or image) to another spot on some other webpage (or even on the same page).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Hyperlink\", \"Hyperlink\"</em>) on Wikipedia</li>\n<li>The <a href=\"/en-US/docs/Learn/HTML/Introduction_to_HTML/Creating_hyperlinks\">Hyperlink</a> guide on MDN</li>\n<li><a href=\"https://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html\">Links in HTML Documents - W3C</a></li>\n<li><a href=\"https://w3c.github.io/html-reference/a.html\">HTML5 a - hyperlink - W3C</a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/a\"><code>&#x3C;a></code> on MDN</a></li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/link\"><code>&#x3C;link></code> on MDN</a></li>\n</ul>\n<hr>\n<h2>Term:  Hypertext</h2>\n<ul>\n<li>Glossary</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>Hypertext is text that contains links to other texts, as opposed to a single linear flow like in a novel.</p>\n</blockquote>\n<p>The term was coined by Ted Nelson around 1965.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Hypertext\", \"Hypertext\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  I18N</h2>\n<ul>\n<li>Beginner</li>\n<li>Credibility</li>\n<li>Glossary</li>\n<li>Internationalization</li>\n<li>OpenPractices</li>\n<li>\n<h2>i18n</h2>\n</li>\n</ul>\n<blockquote>\n<p>i18n (from \"internationalization\", a 20-letter word) is the best practice that enables products or services to be readily adapted to any target culture.</p>\n</blockquote>\n<blockquote>\n<p><strong>Internationalization</strong> is the design and development of a product, application or document content that <strong><em>enables</em></strong> easy localization for target audiences that vary in culture, region, or language. (The <em>Glossary(\"W3C\"</em>) definition)</p>\n</blockquote>\n<p>Among other things, i18n requires support for multiple</p>\n<ul>\n<li>character sets (usually via <a href=\"https://searchcio-midmarket.techtarget.com/definition/Unicode\">Unicode</a>)</li>\n<li>units of measure (currency, °C/°F, km/miles, etc.)</li>\n<li>time and date formats</li>\n<li>keyboard layouts</li>\n<li>text directions</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Internationalization and localization\", \"i18n\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.w3.org/International/questions/qa-i18n.en#Internationalization\">i18n on W3C</a></li>\n<li><a href=\"https://www.gala-global.org/what-internationalization\">i18n on gala-global.org</a></li>\n<li><a href=\"http://www.i18nguy.com/\">i18n material on i18nguy.com</a></li>\n</ul>\n<hr>\n<h2>Term:  IANA</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>IANA</strong> (Internet Assigned Numbers Authority) is a subsidiary of <em>glossary(\"ICANN\"</em>) charged with recording and/or assigning <em>glossary(\"domain name\",\"domain names\"</em>), <em>glossary(\"IP address\",\"IP addresses\"</em>), and other names and numbers used by Internet <em>glossary(\"protocol\",\"protocols\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.iana.org/\">Official website</a></li>\n<li><em>interwiki(\"wikipedia\", \"Internet Assigned Numbers Authority\", \"IANA\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  ICANN</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>ICANN</strong> (Internet Corporation for Assigned Names and Numbers) is an international nonprofit that maintains the <em>glossary(\"DNS\",\"domain name system\"</em>) and the record of <em>glossary(\"IP address\",\"IP addresses\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.icann.org/\">Official website</a></li>\n<li><em>interwiki(\"wikipedia\", \"ICANN\", \"ICANN\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  ICE</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Networking</li>\n<li>Protocols</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>ICE</strong> (<em>Interactive Connectivity Establishment</em>) is a framework used by <em>glossary(\"WebRTC\"</em>) (among other technologies) for connecting two peers, regardless of network topology (usually for audio and video chat). This protocol lets two peers find and establish a connection with one another even though they may both be using Network Address Translator (<em>glossary(\"NAT\"</em>)) to share a global IP address with other devices on their respective local networks.</p>\n</blockquote>\n<p>The framework algorithm looks for the lowest-latency path for connecting the two peers, trying these options in order:</p>\n<ol>\n<li>Direct UDP connection (In this case—and only this case—a <em>glossary(\"STUN\"</em>) server is used to find the network-facing address of a peer)</li>\n<li>Direct TCP connection, via the HTTP port</li>\n<li>Direct TCP connection, via the HTTPS port</li>\n<li>Indirect connection via a relay/<em>glossary(\"TURN\"</em>) server (if a direct connection fails, e.g., if one peer is behind a firewall that blocks NAT traversal)</li>\n</ol>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API\">WebRTC</a>, the principal web-related protocol which uses ICE</li>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Protocols\">WebRTC protocols</a></li>\n<li><em>rfc(\"5245\"</em>), the IETF specification for ICE</li>\n<li><em>domxref(\"RTCIceCandidate\"</em>), the interface representing a ICE candidate</li>\n</ul>\n<hr>\n<h2>Term:  IDE</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An Integrated Development Environment (<strong>IDE</strong>) or Interactive Development environment is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Integrated</em>development<em>environment\", \"IDE\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Idempotent</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>An HTTP method is <strong>idempotent</strong> if an identical request can be made once or several times in a row with the same effect while leaving the server in the same state. In other words, an idempotent method should not have any side-effects (except for keeping statistics). Implemented correctly, the <em>HTTPMethod(\"GET\"</em>), <em>HTTPMethod(\"HEAD\"</em>), <em>HTTPMethod(\"PUT\"</em>), and <em>HTTPMethod(\"DELETE\"</em>) methods are <strong>idempotent</strong>, but not the <em>HTTPMethod(\"POST\"</em>) method. All <em>glossary(\"Safe/HTTP\", \"safe\"</em>) methods are also idempotent.</p>\n</blockquote>\n<p>To be idempotent, only the actual back-end state of the server is considered, the status code returned by each request may differ: the first call of a <em>HTTPMethod(\"DELETE\"</em>) will likely return a <em>HTTPStatus(\"200\"</em>), while successive ones will likely return a <em>HTTPStatus(\"404\"</em>). Another implication of <em>HTTPMethod(\"DELETE\"</em>) being idempotent is that developers should not implement RESTful APIs with a <em>delete last entry</em> functionality using the <code>DELETE</code> method.</p>\n<p>Note that the idempotence of a method is not guaranteed by the server and some applications may incorrectly break the idempotence constraint.</p>\n<p><code>GET /pageX HTTP/1.1</code> is idempotent. Called several times in a row, the client gets the same results:</p>\n<pre><code>GET /pageX HTTP/1.1\nGET /pageX HTTP/1.1\nGET /pageX HTTP/1.1\nGET /pageX HTTP/1.1\n</code></pre>\n<p><code>POST /add_row HTTP/1.1</code> is not idempotent; if it is called several times, it adds several rows:</p>\n<pre><code>POST /add_row HTTP/1.1\nPOST /add_row HTTP/1.1   -> Adds a 2nd row\nPOST /add_row HTTP/1.1   -> Adds a 3rd row\n</code></pre>\n<p><code>DELETE /idX/delete HTTP/1.1</code> is idempotent, even if the returned status code may change between requests:</p>\n<pre><code>DELETE /idX/delete HTTP/1.1   -> Returns 200 if idX exists\nDELETE /idX/delete HTTP/1.1   -> Returns 404 as it just got deleted\nDELETE /idX/delete HTTP/1.1   -> Returns 404\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li>Definition of <a href=\"https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.2\">idempotent</a> in the HTTP specification.</li>\n<li>Description of common idempotent methods: <em>HTTPMethod(\"GET\"</em>), <em>HTTPMethod(\"HEAD\"</em>), <em>HTTPMethod(\"PUT\"</em>), <em>HTTPMethod(\"DELETE\"</em>), <em>HTTPMethod(\"OPTIONS\"</em>), <em>HTTPMethod(\"TRACE\"</em>)</li>\n<li>Description of common non-idempotent methods: <em>HTTPMethod(\"POST\"</em>),<em>HTTPMethod(\"PATCH\"</em>), <em>HTTPMethod(\"CONNECT\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Identifier</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Sharing</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>identifier</strong> is a sequence of characters in the code that identifies a <em>glossary(\"variable\"</em>), <em>glossary(\"function\"</em>), or <em>glossary(\"property\"</em>).</p>\n</blockquote>\n<p>In <em>glossary(\"JavaScript\"</em>), identifiers are case-sensitive and can contain <em>glossary(\"Unicode\"</em>) letters, <code>$</code>, <code>_</code>, and digits (0-9), but may not start with a digit.</p>\n<p>An identifier differs from a string in that a <em>glossary(\"string\"</em>) is data, while an identifier is part of the code. In JavaScript, there is no way to convert identifiers to strings, but sometimes it is possible to parse strings into identifiers.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Identifier#In</em>computer<em>science\", \"Identifier\"</em>) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>glossary(\"Identifier\"</em>)</li>\n<li><em>glossary(\"Scope\"</em>)</li>\n<li><em>glossary(\"string\"</em>)</li>\n<li><em>glossary(\"Unicode\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  IDL</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>IDL</li>\n<li>\n<h2>Interface description language</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>IDL</strong> (<em>Interface Description Language</em>) is a generic language used to specified objects' interfaces apart from any specific programming language.</p>\n</blockquote>\n<h2>Content versus IDL attributes</h2>\n<p>In HTML, most attributes have two faces: the <strong>content attribute</strong> and the <strong>IDL attribute</strong>.</p>\n<p>The content attribute is the attribute as you set it from the content (the HTML code) and you can set it or get it via <em>domxref(\"element.setAttribute()\"</em>) or <em>domxref(\"element.getAttribute()\"</em>). The content attribute is always a string even when the expected value should be an integer. For example, to set an <em>HTMLElement(\"input\"</em>) element's <code>maxlength</code> to 42 using the content attribute, you have to call <code>setAttribute(\"maxlength\", \"42\")</code> on that element.</p>\n<p>The IDL attribute is also known as a JavaScript property. These are the attributes you can read or set using JavaScript properties like <code>element.foo</code>. The IDL attribute is always going to use (but might transform) the underlying content attribute to return a value when you get it and is going to save something in the content attribute when you set it. In other words, the IDL attributes, in essence, reflect the content attributes.</p>\n<p>Most of the time, IDL attributes will return their values as they are really used. For example, the default <code>type</code> for <em>HTMLElement(\"input\"</em>) elements is \"text\", so if you set <code>input.type=\"foobar\"</code>, the <code>&#x3C;input></code> element will be of type text (in the appearance and the behavior) but the \"type\" content attribute's value will be \"foobar\". However, the <code>type</code> IDL attribute will return the string \"text\".</p>\n<p>IDL attributes are not always strings; for example, <code>input.maxlength</code> is a number (a signed long). When using IDL attributes, you read or set values of the desired type, so <code>input.maxlength</code> is always going to return a number and when you set <code>input.maxlength</code>, it wants a number. If you pass another type, it is automatically converted to a number as specified by the standard JavaScript rules for type conversion.</p>\n<p>IDL attributes can <a href=\"https://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes\">reflect other types</a> such as unsigned long, URLs, booleans, etc. Unfortunately, there are no clear rules and the way IDL attributes behave in conjunction with their corresponding content attributes depends on the attribute. Most of the time, it will follow <a href=\"https://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes\">the rules laid out in the specification</a>, but sometimes it doesn't. HTML specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes behave oddly (<code>select.size</code>, for example) and you should read the specifications to understand how exactly they behave.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Interface description language\", \"IDL\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/HTML/Attributes\">HTML attribute reference</a></li>\n<li><a href=\"https://www.eecs.berkeley.edu/~messer/netappc/Supplements/10-idl.pdf\">Interface Definition Language</a></li>\n</ul>\n<hr>\n<h2>Term:  IETF</h2>\n<ul>\n<li>Glossary</li>\n<li>IETF</li>\n<li>Infrastructure</li>\n<li>\n<h2>Internet</h2>\n</li>\n</ul>\n<blockquote>\n<p>The Internet Engineering Task Force (<strong>IETF</strong>) is a worldwide organization that drafts <em>glossary('specification','specifications'</em>) governing the mechanisms behind the <em>glossary(\"Internet\"</em>), especially the <em>glossary(\"TCP\"</em>)/<em>glossary(\"IPv6\",\"IP\"</em>) or Internet <em>glossary(\"Protocol\"</em>) Suite.</p>\n</blockquote>\n<p>The IETF is open, run by volunteers, and sponsored by the <a href=\"https://www.internetsociety.org/\">Internet Society</a>.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.ietf.org/\">Official website</a></li>\n</ul>\n<hr>\n<h2>Term:  IIFE</h2>\n<ul>\n<li>CodingScripting</li>\n<li>DesignPattern</li>\n<li>Functions</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>IIFE</strong> (Immediately Invoked Function Expression) is a <em>glossary(\"JavaScript\"</em>) <em>glossary(\"function\"</em>) that runs as soon as it is defined.\nThe name IIFE is promoted by Ben Alman in <a href=\"https://web.archive.org/web/20171201033208/http://benalman.com/news/2010/11/immediately-invoked-function-expression/#iife\">his blog</a>.</p>\n</blockquote>\n<pre><code class=\"language-js\">(function () {\n  statements\n})();\n</code></pre>\n<p>It is a design pattern which is also known as a <em>glossary(\"Self-Executing Anonymous Function\"</em>) and contains two major parts:</p>\n<ol>\n<li>The first is the anonymous function with lexical scope enclosed within the <em>jsxref(\"Operators/Grouping\", \"Grouping Operator\"</em>) <code>()</code>. This prevents accessing variables within the IIFE idiom as well as polluting the global scope.</li>\n<li>The second part creates the immediately invoked function expression <code>()</code> through which the JavaScript engine will directly interpret the function.</li>\n</ol>\n<h2>Use cases</h2>\n<h3>Avoid polluting the global namespace</h3>\n<p>Because our application could include many functions and global variables from different source files, it's\nimportant to limit the number of global variables. If we have some initiation code that we don't need to use\nagain, we could use the IIFE pattern. As we will not reuse the code again, using IIFE in this case is better than\nusing a function declaration or a function expression.</p>\n<pre><code class=\"language-js\">(function () {\n  // some initiation code\n  let firstVariable;\n  let secondVariable;\n})();\n\n// firstVariable and secondVariable will be discarded after the function is executed.\n</code></pre>\n<h3>The module pattern</h3>\n<p>We would also use IIFE to create private and public variables and methods. For a more sophisticated use of the module\npattern and other use of IIFE, you could see the book Learning JavaScript Design Patterns by Addy Osmani.</p>\n<pre><code class=\"language-js\">const makeWithdraw = balance => (function(copyBalance) {\n  let balance = copyBalance; // This variable is private\n  let doBadThings = function() {\n    console.log(\"I will do bad things with your money\");\n  };\n  doBadThings();\n  return {\n    withdraw: function(amount) {\n      if (balance >= amount) {\n        balance -= amount;\n        return balance;\n      } else {\n        return \"Insufficient money\";\n      }\n    },\n  }\n})(balance);\n\nconst firstAccount = makeWithdraw(100); // \"I will do bad things with your money\"\nconsole.log(firstAccount.balance); // undefined\nconsole.log(firstAccount.withdraw(20)); // 80\nconsole.log(firstAccount.withdraw(30)); // 50\nconsole.log(firstAccount.doBadThings); // undefined; this method is private\nconst secondAccount = makeWithdraw(20); // \"I will do bad things with your money\"\nconsole.log(secondAccount.withdraw(30)); // \"Insufficient money\"\nconsole.log(secondAccount.withdraw(20));  // 0\n</code></pre>\n<h3>For loop with var before ES6</h3>\n<p>We could see the following use of IIFE in some old code, before the introduction of the statements <strong>let</strong> and <strong>const</strong>\nin <strong>ES6</strong> and the block scope. With the statement <strong>var</strong>, we have only function scopes and the global scope.\nSuppose we want to create 2 buttons with the texts Button 0 and Button 1 and we click\nthem, we would like them to alert 0 and 1. The following code doesn't work:</p>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 2; i++) {\n  const button = document.createElement(\"button\");\n  button.innerText = \"Button \" + i;\n  button.onclick = function () {\n    alert(i);\n  };\n  document.body.appendChild(button);\n}\nconsole.log(i); // 2\n</code></pre>\n<p>When clicked, both Button 0 and Button 1 alert 2 because <code>i</code> is global,\nwith the last value 2. To fix this problem before ES6, we could use the IIFE pattern:</p>\n<pre><code class=\"language-js\">for (var i = 0; i &#x3C; 2; i++) {\n  const button = document.createElement(\"button\");\n  button.innerText = \"Button \" + i;\n  button.onclick = (function (copyOfI) {\n    return function() {alert(copyOfI);};\n  })(i);\n  document.body.appendChild(button);\n}\nconsole.log(i); // 2\n</code></pre>\n<p>When clicked, Buttons 0 and 1 alert 0 and 1.\nThe variable <code>i</code> is globally defined.\nUsing the statement <strong>let</strong>, we could simply do:</p>\n<pre><code class=\"language-js\">for (let i = 0; i &#x3C; 2; i++) {\n  const button = document.createElement(\"button\");\n  button.innerText = \"Button \" + i;\n  button.onclick = function () {\n    alert(i);\n  };\n  document.body.appendChild(button);\n}\nconsole.log(i); // Uncaught ReferenceError: i is not defined.\n</code></pre>\n<p>When clicked, these buttons alert 0 and 1.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript#Functions\">Quick example</a> (at the end of the \"Functions\" section, right before \"Custom objects\")</li>\n<li><em>interwiki(\"wikipedia\", \"Immediately-invoked function expression\", \"IIFE\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Function\"</em>)</li>\n<li><em>Glossary(\"Self-Executing Anonymous Function\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  IMAP</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>MailNews</h2>\n</li>\n</ul>\n<blockquote>\n<p>IMAP (Internet Message Access Protocol) is a <em>Glossary(\"protocol\"</em>) used to retrieve and store emails. More recent than <em>Glossary(\"POP\"</em>), IMAP allows folders and rules on the server.</p>\n</blockquote>\n<p>Unlike POP3, IMAP allows multiple simultaneous connections to one mailbox. Clients accessing a mailbox can receive information about state changes made from other clients. IMAP also provides a mode for clients to stay connected and receive information on demand.</p>\n<p>Mark Crispin initially developed IMAP in 1986 as <em>Interim Mail Access Protocol</em>. IMAP4 revision 1 is the current version, defined by <a href=\"http://www.faqs.org/rfcs/rfc3501.html\">RFC 3501</a>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>RFC(3501</em>)</li>\n<li><em>Glossary(\"POP\"</em>)</li>\n<li><em>interwiki(\"wikipedia\", \"Internet Message Access Protocol\", \"IMAP\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Immutable</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An immutable <em>glossary(\"object\"</em>) is one whose content cannot be changed.\nAn object can be immutable for various reasons, for example:</p>\n</blockquote>\n<ul>\n<li>To improve performance (no planning for the object's future changes)</li>\n<li>To reduce memory use (make <em>glossary(\"object reference\",\"object references\"</em>) instead of cloning the whole object)</li>\n<li>Thread-safety (multiple threads can reference the same object without interfering with one other)</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Immutable object\", \"Immutable\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  'MDN Web Docs Glossary: Definitions of Web-related terms'</h2>\n<ul>\n<li>Beginner</li>\n<li>Definitions</li>\n<li>Dictionary</li>\n<li>Glossary</li>\n<li>Index</li>\n<li>Landing</li>\n<li>\n<h2>Terminology</h2>\n</li>\n</ul>\n<blockquote>\n<p>Web technologies contain long lists of jargon and abbreviations that are used in documentation and coding. This glossary provides definitions of words and abbreviations you need to know to successfully understand and build for the web.</p>\n</blockquote>\n<p>Glossary terms can be selected from the sidebar (or listed below on mobile devices and other narrow width screens).</p>\n<blockquote>\n<p><strong>Note:</strong> This glossary is a never-ending work in progress. You can help improve it by <a href=\"/en-US/docs/MDN/Contribute/Howto/Write_a_new_entry_in_the_Glossary\">writing new entries</a> or by making the existing ones better.</p>\n</blockquote>\n<p><em>LearnBox({\"title\":\"Learn a new word ...\"}</em>)</p>\n<section id=\"Quick_links\">\n <ol>\n  <li><strong><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></strong>_ListSubpagesForSidebar(\"/en-us/docs/Glossary\", 1_)</li>\n </ol>\n</section>\n<hr>\n<h2>Term:  IndexedDB</h2>\n<ul>\n<li>API</li>\n<li>CodingScripting</li>\n<li>Database</li>\n<li>Glossary</li>\n<li>\n<h2>Sql</h2>\n</li>\n</ul>\n<blockquote>\n<p>IndexedDB is a Web <em>glossary(\"API\"</em>) for storing large data structures within browsers and indexing them for high-performance searching. Like an <em>glossary(\"SQL\"</em>)-based <a href=\"https://en.wikipedia.org/wiki/Relational_database_management_system\" title=\"Relational DataBase Management System\">RDBMS</a>, IndexedDB is a transactional database system. However, it uses <em>glossary(\"JavaScript\"</em>) objects rather than fixed columns tables to store data.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>The <em>domxref('IndexedDB</em>API','IndexedDB API','',1_) on MDN</li>\n<li><a href=\"https://w3c.github.io/IndexedDB/\">The W3C specification for IndexedDB</a></li>\n</ul>\n<hr>\n<h2>Term:  Index</h2>\n<ul>\n<li>Glossary</li>\n<li>Index</li>\n<li>MDN Meta</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Index(\"/en-US/docs/Glossary\"</em>)</p>\n</blockquote>\n<hr>\n<h2>Term:  Information architecture</h2>\n<ul>\n<li>Design</li>\n<li>Glossary</li>\n<li>\n<h2>information architecture</h2>\n</li>\n</ul>\n<blockquote>\n<p>Information architecture, as applied to web design and development, is the practice of organizing the information / content / functionality of a web site so that it presents the best user experience it can, with information and services being easily usable and findable.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Information</em>architecture\", \"Information architecture\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Inheritance</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Inheritance</li>\n<li>\n<h2>Programming Language</h2>\n</li>\n</ul>\n<blockquote>\n<p>Inheritance is a major feature of <em>glossary(\"OOP\",\"object-oriented programming\"</em>).  Data abstraction can be carried up several levels, that is, <em>glossary(\"class\",\"classes\"</em>) can have superclasses and subclasses.</p>\n</blockquote>\n<p>As an app developer, you can choose which of the superclass's <em>glossary(\"attribute\",\"attributes\"</em>) and <em>glossary(\"method\",\"methods\"</em>) to keep and add your own, making class definition very flexible. Some languages let a class inherit from more than one parent (multiple inheritance).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">Inheritance and the prototype chain</a></li>\n</ul>\n<hr>\n<h2>Term:  Input method editor</h2>\n<ul>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An input method editor (IME) is a program that provides a specialized user interface for text input. Input method editors are used in many situations:</p>\n</blockquote>\n<ul>\n<li>to enter Chinese, Japanese, or Korean text using a Latin keyboard</li>\n<li>to enter Latin text using a numeric keypad</li>\n<li>to enter text on a touch screen using handwriting recognition</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Input method\"</em>)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"I18N\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Instance</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>NeedsExample</li>\n<li>\n<h2>OOP</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <em>glossary(\"object\"</em>) created by a <em>glossary(\"constructor\"</em>) is an instance of that constructor.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Instance (computer science)\", \"Instance\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Internationalization</h2>\n<ul>\n<li>Glossary</li>\n<li>Internationalization</li>\n<li>\n<h2>Reference</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Internationalization</strong>, often shortened to \"<a href=\"/en-US/docs/Glossary/I18N\">i18n</a>\", is the adapting of a web site or web application to different languages, regional differences, and technical requirements for different regions and countries. Internationalization is the process of architecting your web application so that it can be quickly and easily adapted to various languages and regions without much engineering effort when new languages and regions are supported. Also so that a user can browse features to translate or localize the application to access all the content without breaking the layout.</p>\n</blockquote>\n<p>Internationalization includes support for multiple character sets (usually via <a href=\"https://searchcio-midmarket.techtarget.com/definition/Unicode\">Unicode</a>), units of measure (<a href=\"/en-US/docs/Web/API/PaymentCurrencyAmount\">currency</a>, °C/°F, km/miles, etc.), date and time formats, keyboard layouts, and layout and text directions.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization\">Internationalization extension</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl\">Internationalization API</a></li>\n<li><a href=\"/en-US/docs/Learn/CSS/CSS_layout/Flexbox\">Flexbox</a> and <a href=\"/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout\">Grid layout</a></li>\n</ul>\n<hr>\n<h2>Term:  Internet</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Guide</li>\n<li>Intro</li>\n<li>NeedsContent</li>\n<li>Tutorial</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>The Internet is a worldwide network of networks that uses the Internet protocol suite (also named <em>glossary(\"TCP\"</em>)/<em>glossary(\"IPv6\",\"IP\"</em>) from its two most important <em>glossary(\"protocol\",\"protocols\"</em>)).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/How_does_the_Internet_work\">How the Internet works</a> (introduction for beginners)</li>\n</ul>\n<hr>\n<h2>Term:  Intrinsic size</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>\n<h2>Intrinsic size</h2>\n</li>\n</ul>\n<blockquote>\n<p>In CSS, the <em>intrinsic size</em> of an element is the size it would be based on its content, if no external factors were applied to it. For example, inline elements are sized intrinsically: <code>width</code>, <code>height</code>, and vertical margin and padding have no impact, though horizontal margin and padding do.</p>\n</blockquote>\n<p>How intrinsic sizes are calculated is defined in the <a href=\"https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes\">CSS Intrinsic and Extrinsic Sizing Specification</a>.</p>\n<p>Intrinsic sizing takes into account the <code>min-content</code> and <code>max-content</code> size of an element. For text the <code>min-content</code> size would be if the text wrapped as small as it can in the inline direction without causing an overflow, doing as much soft-wrapping as possible. For a box containing a string of text, the <code>min-content</code> size would be defined by the longest word. The keyword value of <code>min-content</code> for the <em>cssxref(\"width\"</em>) property will size an element according to the <code>min-content</code> size.</p>\n<p>The <code>max-content</code> size is the opposite — in the case of text, this would have the text display as wide as possible, doing no soft-wrapping, even if an overflow was caused. The keyword value <code>max-content</code> exposes this behavior.</p>\n<p>For images the intrinsic size has the same meaning — it is the size that an image would be displayed if no CSS was applied to change the rendering. By default images are assumed to have a \"1x\" pixel density (1 device pixel = 1 CSS pixel) and so the intrinsic size is simply the pixel height and width. The intrinsic image size and resolution can be explicitly specified in the <em>Glossary(\"EXIF\"</em>) data. The intrinsic pixel density may also be set for images using the <em>htmlattrxref(\"srcset\", \"img\"</em>) attribute (note that if both mechanisms are used, the <code>srcset</code> value is applied \"over\" the EXIF value).</p>\n<hr>\n<h2>Term:  IP Address</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Web</h2>\n</li>\n</ul>\n<blockquote>\n<p>An IP address is a number assigned to every device connected to a network that uses the Internet protocol.</p>\n</blockquote>\n<p>\"IP address\" typically still refers to 32-bit IPv4 addresses until IPv6 is deployed more broadly.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"IP address\", \"IP address\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  IPv4</h2>\n<ul>\n<li>Glossary</li>\n<li>IPv4</li>\n<li>Infrastructure</li>\n<li>Internet Protocol</li>\n<li>\n<h2>Protocol</h2>\n</li>\n</ul>\n<blockquote>\n<p>IPv4 is the fourth version of the communication <em>Glossary(\"protocol\"</em>) underlying the <em>glossary(\"Internet\"</em>) and the first version to be widely deployed.</p>\n</blockquote>\n<p>First formalized in 1981, IPv4 traces its roots to the initial development work for ARPAnet. IPv4 is a connectionless protocol to be used on packet-switched Link layer networks (ethernet). <em>glossary(\"IPv6\"</em>) is gradually replacing IPv4 owing to IPv4's security problems and the limitations of its address field. (Version number 5 was assigned in 1979 to the experimental Internet Stream Protocol, which however has never been called IPv5.)</p>\n<h4>See also</h4>\n<p><em>interwiki(\"wikipedia\", \"IPv4\", \"IPv4\"</em>) on Wikipedia</p>\n<hr>\n<h2>Term:  IPv6</h2>\n<ul>\n<li>Glossary</li>\n<li>IPv6</li>\n<li>Infrastructure</li>\n<li>Intermediate</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>IPv6</strong> is the current version of the communication <em>glossary(\"protocol\"</em>) underlying the <em>glossary(\"Internet\"</em>). Slowly IPv6 is replacing <em>Glossary(\"IPv4\"</em>), among other reasons because IPv6 allows for many different <em>Glossary(\"IP address\",\"IP addresses\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"IPv6\", \"IPv6\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  IRC</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Internet Relay Chat</li>\n<li>Open Protocol</li>\n<li>\n<h2>irc</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>IRC</strong> (<em>Internet Relay Chat</em>) is a worldwide chat system requiring an Internet connection and an IRC client, which sends and receives messages via the IRC server.</p>\n</blockquote>\n<p>Designed in the late 1980s by Jarrko Oikarinen, IRC uses <em>glossary(\"TCP\"</em>) and is an open protocol. The IRC server broadcasts messages to everyone connected to one of many IRC channels (each with their own ID).</p>\n<hr>\n<h2>Term:  ISO</h2>\n<ul>\n<li>Glossary</li>\n<li>ISO</li>\n<li>Infrastructure</li>\n<li>Web Standards</li>\n<li>\n<h2>web specifications</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>ISO</strong> (International Organization for Standardization) is a global association that develops uniform criteria coordinating the companies in each major industry.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.iso.org/iso/home.html\">Official website</a></li>\n</ul>\n<hr>\n<h2>Term:  ISP</h2>\n<ul>\n<li>Glossary</li>\n<li>ISP</li>\n<li>Internet Service Provider</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>An ISP (Internet Service Provider) sells Internet access, and sometimes email, web hosting, and voice over IP, either by a dial-up connection over a phone line (formerly more common), or through a broadband connection such as a cable modem or DSL service.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/How_does_the_Internet_work\">How the Internet works</a> (explanation for beginners)</li>\n<li><em>interwiki(\"wikipedia\", \"Internet service provider\", \"Internet service provider\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  ITU</h2>\n<ul>\n<li>Glossary</li>\n<li>ITU</li>\n<li>Standardization</li>\n<li>\n<h2>organization</h2>\n</li>\n</ul>\n<blockquote>\n<p>The International Telecommunication Union (ITU) is the organization authorized by the United Nations to establish standards and rules for telecommunication, including telegraph, radio, telephony and the internet.</p>\n</blockquote>\n<p>From defining rules for ensuring transmissions get to where they need to go to and creating the \"SOS\" alert signal used in Morse code, the ITU has long played a key role in how we use technology to exchange information and ideas.</p>\n<p>In the Internet Age, the ITU's role of establishing standards for video and audio data formats used for streaming, teleconferencing, and other purposes. For example, the ITU and the Moving Picture Experts Group (MPEG) worked together to develop and publish, as well as to maintain, the various MPEG specifications, such as MPEG-2 (ITU H.262), AVC (ITU H.264), and HEVC (ITU H.265).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.itu.int/\">ITU web site</a></li>\n<li><a href=\"https://www.itu.int/en/history/Pages/ITUsHistory.aspx\">ITU history portal</a></li>\n</ul>\n<hr>\n<h2>Term:  Jank</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Performance</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n</blockquote>\n<hr>\n<h2>Term:  Java</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Java</li>\n<li>\n<h2>Programming Language</h2>\n</li>\n</ul>\n<blockquote>\n<p>Java is a <em>glossary(\"Compile\", \"compiled\"</em>), <em>glossary(\"OOP\", \"object-oriented\"</em>), highly portable <em>Glossary(\"computer programming\", \"programming\"</em>) language.</p>\n</blockquote>\n<p>Java is statically typed and features a similar syntax to C. It comes with a large library of readily usable functions, the Java Software Development Kit (SDK).</p>\n<p>Programs are <em>glossary(\"Compile\", \"compiled\"</em>) only once ahead of time into a proprietary byte code and package format that runs inside the Java Virtual Machine (JVM). The JVM is available across many platforms, which allows Java programs to run almost everywhere without the need to be compiled or packaged again. This makes it a preferred language in many large enterprises with heterogenous landscapes, but may be perceived \"heavy\".</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Java (programming language)\", \"Java\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  JavaScript</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<h2>Summary</h2>\n</blockquote>\n<p>JavaScript (or \"JS\") is a programming language used most often for dynamic client-side scripts on webpages, but it is also often used on the <em>Glossary(\"Server\",\"server\"</em>)-side, using a runtime such as <a href=\"https://nodejs.org/\">Node.js</a>.</p>\n<p>JavaScript <strong>should not</strong> be confused with the <em>interwiki(\"wikipedia\", \"Java</em>(programming<em>language)\", \"Java programming language\"</em>). Although <em>\"Java\"</em> and <em>\"JavaScript\"</em> are trademarks (or registered trademarks) of Oracle in the U.S. and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.</p>\n<p>JavaScript is primarily used in the browser, enabling developers to manipulate webpage content through the <em>Glossary(\"DOM\"</em>), manipulate data with <em>Glossary(\"AJAX\"</em>) and <em>Glossary(\"IndexedDB\"</em>), draw graphics with <em>Glossary(\"canvas\"</em>), interact with the device running the browser through various <em>Glossary(\"API\",\"APIs\"</em>), and more. JavaScript is one of the world's most commonly-used languages, owing to the recent growth and performance improvement of <em>Glossary(\"API\",\"APIs\"</em>) available in browsers.</p>\n<h2>Origins and History</h2>\n<p>Conceived as a server-side language by Brendan Eich (then employed by the Netscape Corporation), JavaScript soon came to Netscape Navigator 2.0 in September 1995. JavaScript enjoyed immediate success and <em>glossary(\"Microsoft Internet Explorer\", \"Internet Explorer 3.0\"</em>) introduced JavaScript support under the name JScript in August 1996.</p>\n<p>In November 1996, Netscape began working with ECMA International to make JavaScript an industry standard. Since then, the standardized JavaScript is called ECMAScript and specified under ECMA-262, whose latest (eleventh, ES2020) edition is available as of June 2020.</p>\n<p>Recently, JavaScript's popularity has expanded even further through the successful <a href=\"https://nodejs.org/\">Node.js</a> platform—the most popular cross-platform JavaScript runtime environment outside the browser. Node.js - built using <a href=\"https://en.wikipedia.org/wiki/V8_(JavaScript_engine)\">Chrome's V8 JavaScript Engine</a> - allows developers to use JavaScript as a scripting language to automate things on a computer and build fully functional <em>Glossary(\"HTTP\"</em>) and <em>Glossary(\"WebSockets\"</em>) servers.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"JavaScript\", \"JavaScript\"</em>) on Wikipedia</li>\n<li>The <em>Link(\"/en-US/docs/Web/JavaScript/Guide\"</em>) on MDN</li>\n<li><a href=\"https://nodeschool.io/#workshoppers\">The \"javascripting\" workshop on NodeSchool</a></li>\n<li><a href=\"https://www.codecademy.com/tracks/javascript\">The JavaScript course on codecademy.com</a></li>\n<li><a href=\"https://www.ecma-international.org/publications/standards/Ecma-262.htm\">The latest ECMAScript standard</a></li>\n<li>The <em>Link(\"/en-US/docs/Web/JavaScript/reference\"</em>) on MDN</li>\n<li><a href=\"https://eloquentjavascript.net/\">The <em>Eloquent JavaScript</em> book</a></li>\n</ul>\n<hr>\n<h2>Term:  JPEG</h2>\n<ul>\n<li>Beginner</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Images</li>\n<li>\n<h2>JPEG</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>JPEG</strong> (Joint Photographic Experts Group) is a commonly used method of lossy compression for digital images.</p>\n</blockquote>\n<p>JPEG compression is composed of three compression techniques applied in successive layers, including chrominance subsampling, discrete cosine transformation and quantization, and run-length Delta &#x26; Huffman encoding. Chroma subsampling involves implementing less resolution for chroma information than for luma information, taking advantage of the human visual system's lower acuity for color differences than for luminance. A discrete cosine transform expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"JPEG\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  jQuery</h2>\n<ul>\n<li>Glossary</li>\n<li>JQuery</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>jQuery</strong> is a <em>Glossary(\"JavaScript\"</em>) <em>Glossary(\"Library\"</em>) that focuses on simplifying <em>Glossary(\"DOM\"</em>) manipulation, <em>Glossary(\"AJAX\"</em>) calls, and <em>Glossary(\"Event\"</em>) handling.</p>\n</blockquote>\n<p>jQuery uses a format, <code>$(selector).action()</code> to assign an element(s) to an event. To explain it in detail, <code>$(selector)</code> will call jQuery to select <code>selector</code> element(s), and assign it to an event <em>Glossary(\"API\"</em>) called <code>.action()</code>.</p>\n<pre><code class=\"language-js\">$(document).ready(function(){\n  alert(\"Hello World!\");\n  $(\"#blackBox\").hide();\n});\n</code></pre>\n<p>The above code carries out the same function as the following code:</p>\n<pre><code class=\"language-js\">window.onload = function() {\n  alert(\"Hello World!\");\n  document.getElementById(\"blackBox\").style.display = \"none\";\n};\n</code></pre>\n<p>Or:</p>\n<pre><code class=\"language-js\">window.addEventListener(\"load\", () => {\n  alert(\"Hello World!\");\n  document.getElementById(\"blackBox\").style.display = \"none\";\n});\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"jQuery\"</em>) on Wikipedia</li>\n<li><a href=\"https://jquery.com/\">jQuery Official Website</a></li>\n<li><a href=\"https://api.jquery.com/\">Official API reference documentation</a><a href=\"https://api.jquery.com/\"></a></li>\n</ul>\n<hr>\n<h2>Term:  JSON</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>JSON</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>JavaScript Object Notation</em> (<strong>JSON</strong>) is a data-interchange format.  Although not a strict subset, JSON closely resembles a subset of <em>Glossary(\"JavaScript\"</em>) syntax. Though many programming languages support JSON, it is especially useful for JavaScript-based apps, including websites and browser extensions.</p>\n</blockquote>\n<p>JSON can represent numbers, booleans, strings, <code>null</code>, arrays (ordered sequences of values), and objects (string-value mappings) made up of these values (or of other arrays and objects).  JSON does not natively represent more complex data types like functions, regular expressions, dates, and so on.  (Date objects by default serialize to a string containing the date in ISO format, so the information isn't completely lost.) If you need JSON to represent additional data types, transform values as they are serialized or before they are deserialized.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"JSON\", \"JSON\"</em>) on Wikipedia</li>\n<li><em>Link(\"/en-US/docs/Web/JavaScript/Reference/Global</em>Objects/JSON\"_) on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Key</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A key is a piece of information used by a <em>Glossary(\"cipher\"</em>) for <em>Glossary(\"encryption\"</em>) and/or <em>Glossary(\"decryption\"</em>).</p>\n</blockquote>\n<p>Encrypted messages should remain secure even if everything about the <em>Glossary(\"cryptosystem\"</em>), except for the key, is public knowledge.</p>\n<p>In <em>Glossary(\"symmetric-key cryptography\"</em>), the same key is used for both encryption and decryption. In <em>Glossary(\"public-key cryptography\"</em>), there exists a pair of related keys known as the <em>public key</em> and <em>private key</em>. The public key is freely available, whereas the private key is kept secret. The public key is able to encrypt messages that only the corresponding private key is able to decrypt, and vice versa.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Kerckhoffs%27s_principle\">Kerckhoffs's principle</a> on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Block cipher mode of operation\"</em>)</li>\n<li><em>Glossary(\"Cipher\"</em>)</li>\n<li><em>Glossary(\"Ciphertext\"</em>)</li>\n<li><em>Glossary(\"Cipher suite\"</em>)</li>\n<li><em>Glossary(\"Cryptanalysis\"</em>)</li>\n<li><em>Glossary(\"Cryptography\"</em>)</li>\n<li><em>Glossary(\"Decryption\"</em>)</li>\n<li><em>Glossary(\"Encryption\"</em>)</li>\n<li><em>Glossary(\"Key\"</em>)</li>\n<li><em>Glossary(\"Plaintext\"</em>)</li>\n<li><em>Glossary(\"Public-key cryptography\"</em>)</li>\n<li><em>Glossary(\"Symmetric-key cryptography\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Keyword</h2>\n<ul>\n<li>Glossary</li>\n<li>Keyword</li>\n<li>Search</li>\n<li>\n<h2>keyword search</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>keyword</strong> is a word or phrase that describes content.  Online keywords are used as queries for search engines or as words identifying content on websites.</p>\n</blockquote>\n<p>When you use a search engine, you use keywords to specify what you are looking for, and the search engine returns relevant webpages.  For more accurate results, try more specific keywords, such as \"Blue Mustang GTO\" instead of \"Mustang\".  Webpages also use keywords in a meta tag (in the <em>htmlelement(\"head\"</em>) section) to describe page content, so search engines can better identify and organize webpages.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Keyword</em>research\", \"Keyword\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  The Khronos Group</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Khronos</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>The Khronos Group</strong> is an open, non-profit, member-driven consortium of over 150 industry-leading companies. Their purpose is to create advanced, royalty-free interoperability standards for 3D graphics, augmented and virtual reality, parallel programming, vision acceleration, and machine learning.</p>\n</blockquote>\n<p>The organization maintains standards such as <em>Glossary(\"OpenGL\"</em>) and the <em>domxref(\"WebGL API\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Khronos</em>Group\", \"The Khronos Group\"_) on Wikipedia</li>\n<li><a href=\"https://www.khronos.org/\">The Khronos Group web site</a></li>\n</ul>\n<hr>\n<h2>Term:  Latency</h2>\n<ul>\n<li>Audio</li>\n<li>Glossary</li>\n<li>Media</li>\n<li>Networking</li>\n<li>Reference</li>\n<li>Video</li>\n<li>Web Performance</li>\n<li>\n<h2>latency</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Latency</strong> is the network time it takes for a requested resource to reach its destination. Low latency is good, meaning there is little or no delay. High latency is bad, meaning it takes a long time for the requested resource to reach its destination.</p>\n</blockquote>\n<p>Latency can be a factor in any kind of data flow, but is most commonly discussed in terms of network latency (the time it takes for a packet of data to travel from source to destination) and media codec latency (the time it takes for the source data to be encoded or decoded and reach the consumer of the resulting data).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/Understanding_latency\">Understanding Latency</a></li>\n</ul>\n<hr>\n<h2>Term:  Layout viewport</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Layout</li>\n<li>layout viewport</li>\n<li>\n<h2>viewport</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>layout viewport</strong> is the viewport into which the browser draws a web page. Essentially, it represents what is available to be seen, while the <em>Glossary(\"visual viewport\"</em>) represents what is currently visible on the user's display device.</p>\n</blockquote>\n<p>This becomes important, for example, on mobile devices, where a pinching gesture can usually be used to zoom in and out on a site's contents. The rendered document doesn't change in any way, so the layout viewport remains the same as the user adjusts the zoom level. Instead, the visual viewport is updated to indicate the area of the page that they can see.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Visual_Viewport_API\">Visual Viewport API</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Viewport\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.quirksmode.org/mobile/viewports.html\">A tale of two viewports</a> (Quirksmode)</li>\n<li><em>Glossary(\"Viewport\"</em>) in the MDN Glossary</li>\n<li><em>Glossary(\"Visual viewport\"</em>) in the MDN Glossary</li>\n</ul>\n<hr>\n<h2>Term:  Lazy load</h2>\n<ul>\n<li>Glossary</li>\n<li>Lazy loading</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Lazy loading</strong> is a strategy that delays the loading of some assets (e.g., images) until they are needed by the user based on the user's activity and navigation pattern; typically, these assets are only loaded when they are scrolled into view.</p>\n</blockquote>\n<p>If correctly implemented, this delay in asset loading is seamless to the user experience and might help improve initial load performance, including <a href=\"/en-US/docs/Glossary/Time_to_interactive\">time to interactive</a>, as fewer assets are required for the page to start working.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/Lazy_loading\">Lazy loading</a></li>\n</ul>\n<hr>\n<h2>Term:  LGPL</h2>\n<ul>\n<li>Glossary</li>\n<li>License</li>\n<li>OpenPractices</li>\n<li>Remixing</li>\n<li>\n<h2>Sharing</h2>\n</li>\n</ul>\n<blockquote>\n<p>LGPL (GNU Lesser General Public License) is a free software license published by the Free Software Foundation. The LGPL provides a more permissive alternative for the strictly <em>Glossary(\"copyleft\"</em>) <em>Glossary(\"GPL\"</em>). While any derivative work using a GPL-licensed program must be released under the same terms (free to use, share, study, and modify), the LGPL only requires the LGPL-licensed component of the derivative program to continue using the LGPL, not the whole program. LGPL is usually used to license shared components such as libraries (<code>.dll</code>, <code>.so</code>, <code>.jar</code>, etc.).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"GNU Lesser General Public License\", \"GNU LGPL\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.gnu.org/copyleft/lesser.html\">LGPL License</a> text on gnu.org</li>\n</ul>\n<hr>\n<h2>Term:  Ligature</h2>\n<ul>\n<li>CSS</li>\n<li>Design</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>ligature</strong> is a joining of two characters into one shape. For example, in French \"œ\" is a ligature of \"oe\".</p>\n</blockquote>\n<p>You can implement ligatures in your webpage with <em>cssxref(\"font-variant-ligatures\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Typographic ligature\", \"Ligature\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Literal</h2>\n<ul>\n<li>Literal</li>\n<li>JavaScript</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Literals</strong> represent values in JavaScript. These are fixed values—not variables—that you <em>literally</em> provide in your script.</p>\n</blockquote>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#array_literals\">Array literals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#boolean_literals\">Boolean literals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#floating-point_literals\">Floating-point literals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#numeric_literals\">Numeric literals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals\">Object literals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#regexp_literals\">RegExp literals</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#string_literals\">String literals</a></li>\n</ul>\n<h2>Examples</h2>\n<h3>String literals</h3>\n<p>A string literal is zero or more characters enclosed in double (<code>\"</code>) or single quotation marks (<code>'</code>). A string must be delimited by quotation marks of the same type (that is, either both single quotation marks, or both double quotation marks).</p>\n<p>The following are examples of string literals:</p>\n<pre><code class=\"language-js\">'foo'\n\"bar\"\n'1234'\n'one line \\n new line'\n\"John's cat\"\n</code></pre>\n<h3>Object literals</h3>\n<p>An object literal is a list of zero or more pairs of property names and associated values of an object, enclosed in curly braces (<code>{}</code>).</p>\n<p>The following is an example of an object literal. The first element of the <code>car</code> object defines a property, <code>myCar</code>, and assigns to it a new string, \"<code>Toyota</code>\"; the second element, the <code>getCar</code> property, is immediately assigned the result of invoking the function <code>carTypes('Honda')</code>; the third element, the <code>special</code> property, uses an existing variable (<code>sales</code>).</p>\n<pre><code class=\"language-js\">var sales = 'BMW';\n\nfunction carTypes(name) {\n  if (name == 'Honda') {\n    return name;\n  } else {\n    return \"Sorry, we don't sell \" + name + \".\";\n  }\n}\n\nvar car = { myCar: 'Toyota', getCar: carTypes('Honda'), special: sales };\n\nconsole.log(car.myCar);   // Toyota\nconsole.log(car.getCar);  // Honda\nconsole.log(car.special); // BMW\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Literal (computer programming)\", \"Literal\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Local scope</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>Local scope is a characteristic of <em>glossary(\"variable\",\"variables\"</em>) that makes them local (i.e., the variable name is only bound to its <em>glossary(\"value\"</em>) within a scope which is not the <em>glossary(\"global scope\"</em>)).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Scope (computer science)\", \"Scope\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Local variable</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>glossary(\"variable\"</em>) whose name is bound to its <em>glossary(\"value\"</em>) only within a <em>Glossary(\"local scope\"</em>).</p>\n</blockquote>\n<h2>Example</h2>\n<pre><code class=\"language-js\">var global = 5; //is a global variable\n\nfunction fun(){\n    var local = 10; //is a local variable\n}\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Local variable\", \"Local variable\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Locale</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>\n<h2>Locale</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Locale</strong> is a set of language- or country-based preferences for a user interface.</p>\n</blockquote>\n<p>A program draws its locale settings from the language of the host system. Among other things, locales represent paper format, currency, date format, and numbers according to the protocols in the given region.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Locale\", \"Locale\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Localization</h2>\n<ul>\n<li>Collaborating</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>Localization</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Localization</strong> (l10n) is the process of adapting a software user interface to a specific culture.</p>\n</blockquote>\n<p>The following are common factors to consider:</p>\n<ul>\n<li>language</li>\n<li>unit of measure (e.g., kilometers in Europe, miles in U.S.)</li>\n<li>text direction (e.g., European languages are left-to-right, Arabic right-to-left)</li>\n<li>capitalization in Latin script (e.g., English uses capitals for weekdays, Spanish uses lowercase)</li>\n<li>adaptation of idioms (e.g., \"raining cats and dogs\" makes no sense when translated literally)</li>\n<li>use of register (e.g., in Japanese respectful speech differs exceptionally from casual speech)</li>\n<li>number format (e.g., 10 000,00 in Germany vs. 10,000.00 in the U.S.)</li>\n<li>date format</li>\n<li>currency</li>\n<li>cultural references</li>\n<li>paper size</li>\n<li>color psychology</li>\n<li>compliance with local laws</li>\n<li>local holidays</li>\n<li>personal names</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Language localisation\", \"Localization\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Long task</h2>\n<ul>\n<li>Glossary</li>\n<li>Long Tasks API</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>long task</strong>  is a task that takes more than 50ms to complete.</p>\n</blockquote>\n<p>It is an uninterrupted period where the <a href=\"/en-US/docs/Glossary/Main_thread\">main UI thread</a> is busy for 50 ms or longer. Common examples include long running event handlers, expensive <a href=\"/en-US/docs/Glossary/Reflow\">reflows</a> and other re-renders, and work the browser does between different turns of the event loop that exceeds 50 ms.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Long_Tasks_API\">Long task API</a></li>\n</ul>\n<hr>\n<h2>Term:  Loop</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>control flow</li>\n<li>\n<h2>programming</h2>\n</li>\n</ul>\n<blockquote>\n<p>A loop is a sequence of instructions that is continually repeated until a certain condition is met in <em>Glossary(\"computer programming\"</em>). An example would be the process of getting an item of data and changing it, and then making sure some <em>Glossary(\"conditional\", \"condition\"</em>) is checked such as, if a counter has reached a prescribed number.</p>\n</blockquote>\n<h2>Examples</h2>\n<h3>For loop</h3>\n<h4>Syntax:</h4>\n<pre><code>for (statement 1; statement 2; statement 3){\n execute code block\n}\n</code></pre>\n<ul>\n<li>Statement 1 is executed once before the code block is run.</li>\n<li>Statement 2 defines the condition needed to execute the code block.</li>\n<li>Statement 3 is executed every time the code block is run.</li>\n</ul>\n<h4>Example:</h4>\n<pre><code class=\"language-js\">for(var i = 0; i &#x3C; 10; i++){\n    console.log(i)\n}\n//This loop will print numbers 0-9, will stop when condition is met (i = 10)\n</code></pre>\n<p>For the above example, the syntax is as follows:</p>\n<ul>\n<li>Statement 1 sets the variable for the loop (var i = 0).</li>\n<li>Statement 2 sets the loop condition (i &#x3C; 10).</li>\n<li>Statement 3 increases the value of i (i++) each time the code block is run.</li>\n</ul>\n<h3>While loop</h3>\n<h4>Syntax:</h4>\n<pre><code>while (condition){\n execute code block\n}\n</code></pre>\n<ul>\n<li>The code block will continue to loop as long as the condition is true.</li>\n</ul>\n<h4>Example:</h4>\n<pre><code class=\"language-js\">var i = 0;\nwhile(i &#x3C; 5){\n    console.log(i)\n    i++\n}\n//This loop  will print number 0-4, will stop when condition becomes false (i >=5)\n</code></pre>\n<p>For the above example, the syntax is as follows:</p>\n<ul>\n<li>The code block will continue to run as long as the variable (i) is less than 5.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Control</em>flow#Loops\",\"Control flow\"_) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Loop\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Lossless compression</h2>\n<ul>\n<li>Beginner</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Images</li>\n<li>Web Performance</li>\n<li>compression</li>\n<li>\n<h2>lossless</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Lossless compression</strong> is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. Lossless compression methods are reversible. Examples of lossless compression include <em>glossary(\"GZIP\"</em>), <em>glossary(\"Brotli\"</em>), WebP, and <em>glossary(\"PNG\"</em>),</p>\n</blockquote>\n<p><em>glossary(\"Lossy compression\"</em>), on the other hand, uses inexact approximations by discarding some data from the original file, making it an irreversible compression method.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>glossary(\"GZIP\"</em>)</li>\n<li><em>glossary(\"Brotli\"</em>)</li>\n<li><em>glossary(\"PNG\"</em>)</li>\n<li><em>glossary(\"Lossy compression\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  lossy compression</h2>\n<ul>\n<li>Beginner</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Images</li>\n<li>JPEG</li>\n<li>Lossy</li>\n<li>Web Performance</li>\n<li>\n<h2>compression</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Lossy compression</strong>, or irreversible compression, is a data-compression method that uses inexact approximations and partial-data discarding to represent content. In simpler terms: lossy compression causes data from the initial file to be lost, possibly causing degradation in quality. The process of such compression is irreversible; once lossy compression of the content has been performed, the content cannot be restored to its original state. Therefore, content that has undergone lossy compression should generally not be further edited.</p>\n</blockquote>\n<p>Lossy compression is widely used in image formats.</p>\n<p><img src=\"2019-11-18.png\" alt=\"Lossy compression image\"></p>\n<p>Although there is no obvious difference quality between the two images above, the size of the second image has been significantly reduced, using lossy compression.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/Lossless_compression\">Lossless compression</a></li>\n</ul>\n<hr>\n<h2>Term:  LTR (Left To Right)</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>\n<h2>Localization</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>LTR</strong> (<strong>Left To Right</strong>) is a <em>Glossary(\"locale\"</em>) property indicating that text is written from left to right. For example, the <code>en-US</code> locale (for US English) specifies left-to-right.</p>\n</blockquote>\n<p>Most Western languages, as well as many others around the world, are written LTR.</p>\n<p>The opposite of LTR, <em>Glossary(\"RTL\"</em>) (Right To Left) is used in other common languages, including Arabic (<code>ar</code>) and Hebrew (<code>he</code>).</p>\n<h2>Technical reference</h2>\n<ul>\n<li><a href=\"/en-US/docs/Web/Localization\">Localization and internationalization</a></li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"locale\"</em>)</li>\n<li><em>Glossary(\"LTR\"</em>)</li>\n<li><em>Glossary(\"RTL\"</em>)</li>\n</ul>\n</li>\n<li>\n<p><a href=\"/en-US/docs/Web/HTML/Global_attributes\">HTML global attributes</a></p>\n<ul>\n<li><em>htmlattrxref(\"dir\"</em>)</li>\n<li><em>htmlattrxref(\"lang\"</em>)</li>\n</ul>\n</li>\n<li>\n<p><a href=\"/en-US/docs/Web/CSS\">CSS</a></p>\n<ul>\n<li><em>cssxref(\":dir\"</em>)</li>\n<li><em>cssxref(\"direction\"</em>)</li>\n<li><em>cssxref(\"unicode-bidi\"</em>)</li>\n<li><em>cssxref(\"writing-mode\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Main Axis</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>Main axis</li>\n<li>\n<h2>flexbox</h2>\n</li>\n</ul>\n<blockquote>\n<p>The main axis in <em>glossary(\"flexbox\"</em>) is defined by the direction set by the <em>cssxref(\"flex-direction\"</em>) property. There are four possible values for <code>flex-direction</code>. These are:</p>\n</blockquote>\n<ul>\n<li><code>row</code></li>\n<li><code>row-reverse</code></li>\n<li><code>column</code></li>\n<li><code>column-reverse</code></li>\n</ul>\n<p>Should you choose <code>row</code> or <code>row-reverse</code> then your main axis will run along the row in the inline direction.</p>\n<p><img src=\"basics1.png\" alt=\"In this image the flex-direction is row which forms the main axis\"></p>\n<p>Choose <code>column</code> or <code>column-reverse</code> and your main axis will run top to bottom of the page in the block direction.</p>\n<p><img src=\"basics2.png\"></p>\n<p>On the main axis you can control the sizing of flex items by adding any available space to the items themselves, by way of <code>flex</code> properties on the items. Or, you can control the space between and around items by using the <code>justify-content</code> property.</p>\n<h4>See also</h4>\n<h3>Property reference</h3>\n<ul>\n<li><em>cssxref(\"flex-basis\"</em>)</li>\n<li><em>cssxref(\"flex-direction\"</em>)</li>\n<li><em>cssxref(\"flex-grow\"</em>)</li>\n<li><em>cssxref(\"flex-shrink\"</em>)</li>\n<li><em>cssxref(\"justify-content\"</em>)</li>\n<li><em>cssxref(\"flex\"</em>)</li>\n</ul>\n<h3>Further reading</h3>\n<ul>\n<li>CSS Flexbox Guide: <em>[Basic Concepts of Flexbox](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Basic<em>Concepts</em>of<em>Flexbox)</em></li>\n<li>CSS Flexbox Guide: <em>[Aligning items in a flex container](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Aligning<em>Items</em>in<em>a</em>Flex<em>Container)</em></li>\n<li>CSS Flexbox Guide: <em>[Controlling Ratios of flex items along the main axis](/en-US/docs/Web/CSS/CSS</em>Flexible<em>Box</em>Layout/Controlling<em>Ratios</em>of<em>Flex</em>Items<em>Along</em>the<em>Main</em>Ax)_</li>\n</ul>\n<hr>\n<h2>Term:  Main thread</h2>\n<ul>\n<li>Glossary</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>main thread</strong> is where a browser processes user events and paints. By default, the browser uses a single thread to run all the JavaScript in your page, as well as to perform layout, reflows, and garbage collection. This means that long-running JavaScript functions can block the thread, leading to an unresponsive page and a bad user experience.</p>\n</blockquote>\n<p>Unless intentionally using a <a href=\"/en-US/docs/Web/API/Web_Workers_API/Using_web_workers\">web worker</a>, such as a <a href=\"/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers\">service worker</a>, JavaScript runs on the main thread, so it's easy for a script to cause delays in event processing or painting. The less work required of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Asynchronous\">Asynchronous JavaScript</a></li>\n<li><a href=\"/en-US/docs/Web/API/Web_Workers_API\">Web worker API</a></li>\n<li><a href=\"/en-US/docs/Web/API/Service_Worker_API\">Service worker API</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Thread\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  markup</h2>\n<ul>\n<li>Glossary</li>\n<li>Intro</li>\n<li>Markup</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A markup language is one that is designed for defining and presenting text. <em>glossary(\"HTML\"</em>) (HyperText Markup Language), is an example of a markup language.</p>\n</blockquote>\n<h2>Types of markup language</h2>\n<ul>\n<li>\n<p><strong>Presentational Markup:</strong></p>\n<ul>\n<li>: Used by traditional word processing system with WYSIWYG (what you see it is what you get); this is hidden from human authors, users and editors.</li>\n</ul>\n</li>\n<li>\n<p><strong>Procedural Markup:</strong></p>\n<ul>\n<li>: Combined with text to provide instructions on text processing to programs. This text is visibly manipulated by the author.</li>\n</ul>\n</li>\n<li>\n<p><strong>Descriptive Markup:</strong></p>\n<ul>\n<li>: Labels sections of documents as to how the program should handle them. For example, the HTML <em>HTMLElement(\"td\"</em>) defines a cell in a HTML table.</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"HTML\"</em>)</li>\n<li><em>Glossary(\"XHTML\"</em>)</li>\n<li><em>Glossary(\"XML\"</em>)</li>\n<li><em>Glossary(\"SVG\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  MathML</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>MathML</li>\n<li>Mathematical Markup Language</li>\n<li>\n<h2>XML</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>MathML</strong> (an <em>glossary(\"XML\"</em>) application) is an open standard for representing mathematical expressions in webpages.  In 1998 the W3C first recommended MathML for representing mathematical expressions in the <em>glossary(\"browser\"</em>). MathML has other applications also including scientific content and voice synthesis.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"MathML\", \"MathML\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/MathML\">MathML</a></li>\n<li><a href=\"/en-US/docs/Web/MathML/Authoring\">Authoring MathML</a></li>\n<li><em>spec(\"<a href=\"http://www.w3.org/Math/whatIsMathML.html%22\">http://www.w3.org/Math/whatIsMathML.html\"</a>, \"MathML\", \"REC\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Media</h2>\n<ul>\n<li>Disambiguation</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>media</strong> is an overloaded one when talking about the web; it takes on different meanings depending on the context.</p>\n</blockquote>\n<p>_GlossaryDisambiguation}}</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Media\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Metadata</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>metadata</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Metadata</strong> is — in its very simplest definition — data that describes data. For example, an <em>glossary(\"HTML\"</em>) document is data, but HTML can also contain metadata in its <em>htmlelement(\"head\"</em>) element that describes the document — for example who wrote it, and its summary.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"metadata\", \"metadata\"</em>) on Wikipedia</li>\n<li>The <em>htmlelement(\"meta\"</em>) element on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Method</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>method</strong> is a <em>glossary(\"function\"</em>) which is a <em>glossary(\"property\"</em>) of an <em>glossary(\"object\"</em>). There are two kind of methods: <em>Instance Methods</em> which are built-in tasks performed by an object instance, or _<em>Glossary(\"static method\", \"Static Methods\"</em>)_ which are tasks that are called directly on an object constructor.</p>\n</blockquote>\n<blockquote>\n<p><strong>Note:</strong> In JavaScript functions themselves are objects, so, in that context, a method is actually an <em>glossary(\"object reference\"</em>) to a function.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>InterWiki(\"wikipedia\",\"Method (computer programming)\"</em>) in Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions\">Defining a method in JavaScript</a> (comparison of the traditional syntax and the new shorthand)</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference\">List of JavaScript built-in methods</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"function\"</em>)</li>\n<li><em>Glossary(\"object\"</em>)</li>\n<li><em>Glossary(\"property\"</em>)</li>\n<li><em>Glossary(\"static method\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Microsoft Edge</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Microsoft Edge</strong> is a free-of-cost graphical <em>glossary(\"World Wide Web\", \"Web\"</em>) <em>Glossary(\"browser\"</em>) bundled with Windows 10 and developed by Microsoft since 2014. Initially known as Spartan, Edge replaced the longstanding browser <em>glossary(\"Microsoft Internet Explorer\",\"Internet Explorer\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.microsoft.com/edge\">Official website</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Google Chrome\"</em>)</li>\n<li><em>Glossary(\"Microsoft Edge\"</em>)</li>\n<li><em>Glossary(\"Microsoft Internet Explorer\"</em>)</li>\n<li><em>Glossary(\"Mozilla Firefox\"</em>)</li>\n<li><em>Glossary(\"Netscape Navigator\"</em>)</li>\n<li><em>Glossary(\"Opera Browser\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Microsoft Internet Explorer</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>Internet Explorer</li>\n<li>Microsoft</li>\n<li>Microsoft Internet Explorer</li>\n<li>Navigation</li>\n<li>Web Browser</li>\n<li>Windows</li>\n<li>\n<h2>Windows Operating System</h2>\n</li>\n</ul>\n<blockquote>\n<p>Internet Explorer (or IE) is a free graphical <em>glossary(\"browser\"</em>) maintained by Microsoft for legacy enterprise uses. <em>glossary(\"Microsoft Edge\"</em>) is currently the default Windows browser.</p>\n</blockquote>\n<p>Microsoft first bundled IE with Windows in 1995 as part of the package called \"Microsoft Plus!\". By around 2002, Internet Explorer had become the most used browser in the world, but has since lost ground to Chrome, Firefox, Edge, and Safari.</p>\n<p>IE has gone through many releases and currently stands at version 11.0.12, with desktop, mobile, and Xbox Console versions available. Formerly available on Mac and UNIX, Microsoft discontinued those versions in 2003 and 2001 respectively.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Internet Explorer\", \"Internet Explorer\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"History of Internet Explorer\", \"History of Internet Explorer\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Internet Explorer versions\", \"Internet Explorer versions\"</em>) on Wikipedia</li>\n<li><a href=\"https://windows.microsoft.com/en-us/internet-explorer/download-ie\">http://windows.microsoft.com/en-us/internet-explorer/download-ie</a></li>\n<li><a href=\"https://windows.microsoft.com/en-us/windows7/getting-started-with-internet-explorer-9\">http://windows.microsoft.com/en-us/windows7/getting-started-with-internet-explorer-9</a></li>\n<li><a href=\"https://windows.microsoft.com/en-us/internet-explorer/internet-explorer-help\">http://windows.microsoft.com/en-us/internet-explorer/internet-explorer-help</a></li>\n<li><a href=\"https://windows.microsoft.com/en-us/internet-explorer/make-ie-default-browser#ie=ie-11\">http://windows.microsoft.com/en-us/internet-explorer/make-ie-default-browser#ie=ie-11</a></li>\n<li><a href=\"https://windows.microsoft.com/en-us/internet-explorer/products/ie-8/system-requirements\">http://windows.microsoft.com/en-us/internet-explorer/products/ie-8/system-requirements</a></li>\n<li><a href=\"https://windows.microsoft.com/en-us/internet-explorer/products/ie-9/system-requirements\">http://windows.microsoft.com/en-us/internet-explorer/products/ie-9/system-requirements</a></li>\n<li><a href=\"https://support.microsoft.com/kb/969393\">http://support.microsoft.com/kb/969393</a></li>\n</ul>\n<hr>\n<h2>Term:  Middleware</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Middleware is a (loosely defined) term for any software or service that enables the parts of a system to communicate and manage data. It is the software that handles communication between components and input/output, so developers can focus on the specific purpose of their application.</p>\n</blockquote>\n<p>In server-side web application frameworks, the term is often more specifically used to refer to pre-built software components that can be added to the framework's request/response processing pipeline, to handle tasks such as database access.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Middleware</em>(distributed<em>applications)\", \"Middleware</em>(distributed<em>applications)\"</em>) on Wikipedia</li>\n<li><em>Interwiki(\"wikipedia\", \"Middleware\", \"Middleware\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  MIME type</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>MIME type</strong> (now properly called \"media type\", but also sometimes \"content type\") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled <code>audio/ogg</code>, or an image file <code>image/png</code>).</p>\n</blockquote>\n<p>It serves the same purpose as filename extensions traditionally do on Windows. The name originates from the <em>glossary(\"mime\",\"MIME\"</em>) standard originally used in E-Mail.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Internet media type\", \"Internet media type\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.iana.org/assignments/media-types/media-types.xhtml\">List of MIME types</a></li>\n<li><a href=\"/en-US/docs/Learn/Server-side/Configuring_server_MIME_types\">Properly Configuring Server MIME Types</a></li>\n<li>Details information about the usage of <a href=\"/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME Types</a> in a Web context.</li>\n<li><a href=\"/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\">Incomplete list of MIME types</a></li>\n<li><a href=\"/en-US/docs/Web/API/MediaRecorder/mimeType\">MediaRecorder.mimeType</a></li>\n</ul>\n<hr>\n<h2>Term:  mime</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>MIME</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>MIME</strong> \"Multipurpose internet mail extensions\" is a standard to describe documents in other forms beside ASCII text, e.g. audio, video and images. Initially used for E-Mail attachments, it has become the de facto standard to define types of documents anywhere.</p>\n</blockquote>\n<p>See also <a href=\"/en-US/docs/Glossary/MIME_type\">MIME-Type</a></p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/MIME\">MIME </a>on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  minification</h2>\n<ul>\n<li>Glossary</li>\n<li>Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Minification</strong> is the process of removing unnecessary or redundant data without affecting how a resource is processed by the browser.</p>\n</blockquote>\n<p>Minification can include the removal of code comments, white space, and unused code, as well as the shortening of variable and function names. Minification is used to improve web performance by reducing file size. It is generally an automated step that occurs at build time.</p>\n<p>As minification makes code less legible to humans, developer tools have 'prettification' features that can add white space back into the code to make it a bit more legible.</p>\n<hr>\n<h2>Term:  MitM</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>manipulator-in-the-middle attack</strong> (MitM) intercepts a communication between two systems. For example, a Wi-Fi router can be compromised.</p>\n</blockquote>\n<p>Comparing this to physical mail: If you're writing letters to each other, the mail carrier can intercept each letter you mail. They open it, read it, eventually modify it, and then repackage the letter and only then send it to whom you intended to sent the letter for. The original recipient would then mail you a letter back, and the mail carrier would again open the letter, read it, eventually modify it, repackage it, and give it to you. You wouldn't know there's a manipulator in the middle in your communication channel - the mail carrier is invisible to you and to your recipient.</p>\n<p>In physical mail and in online communication, MITM attacks are tough to defend. A few tips:</p>\n<ul>\n<li>Don't just ignore certificate warnings. You could be connecting to a phishing server or an imposter server.</li>\n<li>Sensitive sites without HTTPS encryption on public Wi-Fi networks aren't trustworthy.</li>\n<li>Check for HTTPS in your address bar and ensure encryption is in-place before logging in.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li>OWASP: <a href=\"https://owasp.org/www-community/attacks/Manipulator-in-the-middle_attack\">Manipulator-in-the-middle attack</a></li>\n<li>PortSwigger: <a href=\"https://portswigger.net/daily-swig/mitm\">Latest manipulator-in-the-middle attacks news</a></li>\n<li>Wikipedia: <a href=\"https://en.wikipedia.org/wiki/Man-in-the-middle_attack\">Man-in-the-middle attack</a></li>\n<li>The <em>HTTPHeader(\"Public-Key-Pins\"</em>) header (<em>Glossary(\"HPKP\"</em>)) can significantly decrease the risk of MITM by instructing browsers to require an allowlisted certificate for all subsequent connections to that website.</li>\n</ul>\n<hr>\n<h2>Term:  Mixin</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Method</li>\n<li>Mixin</li>\n<li>\n<h2>Property</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>mixin</em> is a <em>Glossary(\"class\"</em>) (interface, in WebAPI spec terms) in which some or all of its <em>Glossary(\"method\", \"methods\"</em>) and/or <em>Glossary(\"property\", \"properties\"</em>) are unimplemented, requiring that another <em>Glossary(\"class\"</em>) or <em>Glossary(\"interface\"</em>) provide the missing implementations.</p>\n</blockquote>\n<p>The new class or interface then includes both the properties and methods from the mixin as well as those it defines itself. All of the methods and properties are used exactly the same regardless of whether they're implemented in the mixin or the interface or class that implements the mixin.</p>\n<p>The advantage of mixins is that they can be used to simplify the design of APIs in which multiple interfaces need to include the same methods and properties.</p>\n<p>For example, the <code>WindowOrWorkerGlobalScope</code> mixin is used to provide methods and properties that need to be available on both the <em>domxref(\"Window\"</em>) and <em>domxref(\"WorkerGlobalScope\"</em>) interfaces. The mixin is implemented by both of those interfaces.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Mixin\">Mixin</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Mobile First</h2>\n<ul>\n<li>Design</li>\n<li>Glossary</li>\n<li>Layout</li>\n<li>\n<h2>Layout mobile</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Mobile first</strong>, a form of <em>Glossary(\"progressive enhancement\"</em>), is a web-development and web-design approach that focuses on prioritizing design and development for mobile screen sizes over design and development for desktop screen sizes. The rationale behind the mobile-first approach is to provide users with good user experiences at all screen sizes—by starting with creating a user experience that works well on small screens, and then building on top of that to further enrich the user experience as the screen size increases. The mobile-first approach contrasts with the older approach of designing for desktop screen sizes first, and then only later adding some support for small screen sizes.</p>\n</blockquote>\n<hr>\n<h2>Term:  Modem</h2>\n<ul>\n<li>Infrastructure</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p>A modem (\"<strong>modulator-demodulator</strong>\") is a device that converts digital information to analog signals and vice-versa, for sending data through networks.</p>\n</blockquote>\n<p>Different kinds are used for different networks: DSL modems for telephone wires, WiFi modems for short-range wireless radio signals, 3G modems for cellular data towers, and so on.</p>\n<p>Modems are different from <em>Glossary(\"Router\",\"routers\"</em>), but many companies sell modems combined with routers.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Modem\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Modularity</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term Modularity refers to the degree to which a system's components may be separated and recombined, it is also division of a software package into logical units. The advantage of a modular system is that one can reason the parts independently</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Modularity\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Mozilla Firefox</h2>\n<ul>\n<li>Browser</li>\n<li>Firefox</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Mozilla</li>\n<li>\n<h2>Mozilla Firefox</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Mozilla Firefox</strong> is a free open-source <em>Glossary(\"browser\"</em>) whose development is overseen by the Mozilla Corporation. Firefox runs on Windows, OS X, Linux, and Android.</p>\n</blockquote>\n<p>First released in November 2004, Firefox is completely customizable with themes, plug-ins, and <a href=\"/en-US/docs/Mozilla/Add-ons\">add-ons</a>. Firefox uses <em>glossary(\"Gecko\"</em>) to render webpages, and implements both current and upcoming <em>glossary(\"world wide web\", \"Web\"</em>) standards.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.mozilla.org/firefox\">Mozilla Firefox official website</a></li>\n<li><a href=\"/en-US/docs/Mozilla/Firefox\">Firefox developer documentations</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Mutable</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Mutable</em> is a type of variable that can be changed. In <em>glossary(\"JavaScript\"</em>), only <em>Glossary(\"Object\",\"objects\"</em>) and <em>Glossary(\"Array\",\"arrays\"</em>) are mutable, not <em>Glossary(\"primitive\", \"primitive values\"</em>).</p>\n</blockquote>\n<p>(You <em>can</em> make a variable name point to a new value, but the previous value is still held in memory. Hence the need for garbage collection.)</p>\n<p>A <strong>mutable object</strong> is an object whose state can be modified after it is created.</p>\n<p><strong>Immutables</strong> are the objects whose state cannot be changed once the object is created.</p>\n<p><strong>Strings and Numbers</strong> are <strong>Immutable</strong>. Lets understand this with an example:</p>\n<pre><code>var immutableString = \"Hello\";\n\n// In the above code, a new object with string value is created.\n\nimmutableString = immutableString + \"World\";\n\n// We are now appending \"World\" to the existing value.\n</code></pre>\n<p>On appending the \"immutableString\" with a string value, following events occur:</p>\n<ol>\n<li>Existing value of \"immutableString\" is retrieved</li>\n<li>\"World\" is appended to the existing value of \"immutableString\"</li>\n<li>The resultant value is then allocated to a new block of memory</li>\n<li>\"immutableString\" object now points to the newly created memory space</li>\n<li>Previously created memory space is now available for garbage collection.</li>\n</ol>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Immutable object\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  MVC</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Intro</li>\n<li>MVC</li>\n<li>\n<h2>Model View Controller</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>MVC</strong> (Model-View-Controller) is a pattern in software design commonly used to implement user interfaces, data, and controlling logic. It emphasizes a separation between the software’s business logic and display. This \"separation of concerns\" provides for a better division of labor and improved maintenance. Some other design patterns are based on MVC, such as MVVM (Model-View-Viewmodel), MVP (Model-View-Presenter), and MVW (Model-View-Whatever).</p>\n</blockquote>\n<p>The three parts of the MVC software-design pattern can be described as follows:</p>\n<ol>\n<li>Model: Manages data and business logic.</li>\n<li>View: Handles layout and display.</li>\n<li>Controller: Routes commands to the model and view parts.</li>\n</ol>\n<h2>Model View Controller example</h2>\n<p>Imagine a simple shopping list app. All we want is a list of the name, quantity and price of each item we need to buy this week. Below we'll describe how we could implement some of this functionality using MVC.</p>\n<p><img src=\"model-view-controller-light-blue.png\" alt=\"Diagram to show the different parts of the mvc architecture.\"></p>\n<h3>The Model</h3>\n<p>The model defines what data the app should contain. If the state of this data changes, then the model will usually notify the view (so the display can change as needed) and sometimes the controller (if different logic is needed to control the updated view).</p>\n<p>Going back to our shopping list app, the model would specify what data the list items should contain — item, price, etc. — and what list items are already present.</p>\n<h3>The View</h3>\n<p>The view defines how the app's data should be displayed.</p>\n<p>In our shopping list app, the view would define how the list is presented to the user, and receive the data to display from the model.</p>\n<h3>The Controller</h3>\n<p>The controller contains logic that updates the model and/or view in response to input from the users of the app.</p>\n<p>So for example, our shopping list could have input forms and buttons that allow us to add or delete items. These actions require the model to be updated, so the input is sent to the controller, which then manipulates the model as appropriate, which then sends updated data to the view.</p>\n<p>You might however also want to just update the view to display the data in a different format, e.g., change the item order to alphabetical, or lowest to highest price. In this case the controller could handle this directly without needing to update the model.</p>\n<h2>MVC on the web</h2>\n<p>As a web developer, this pattern will probably be quite familiar even if you've never consciously used it before. Your data model is probably contained in some kind of database (be it a traditional server-side database like MySQL, or a client-side solution such as <a href=\"/en-US/docs/Web/API/IndexedDB_API\">IndexedDB [en-US]</a>.) Your app's controlling code is probably written in HTML/JavaScript, and your user interface is probably written using HTML/CSS/whatever else you like. This sounds very much like MVC, but MVC makes these components follow a more rigid pattern.</p>\n<p>In the early days of the Web, MVC architecture was mostly implemented on the server-side, with the client requesting updates via forms or links, and receiving updated views back to display in the browser. However, these days, more of the logic is pushed to the client with the advent of client-side data stores, and XMLHttpRequest allowing partial page updates as required.</p>\n<p>Web frameworks such as <a href=\"https://en.wikipedia.org/wiki/AngularJS\">AngularJS</a> and <a href=\"https://en.wikipedia.org/wiki/Ember.js\" title=\"Ember.js\">Ember.js</a> all implement an MVC architecture, albeit in slightly different ways.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Model-view-controller\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Namespace</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Operating System</h2>\n</li>\n</ul>\n<blockquote>\n<p>Namespace is a context for identifiers, a logical grouping of names used in a program. Within the same context and same scope,  an identifier must uniquely identify an entity.</p>\n</blockquote>\n<p>In an operating system a directory is a namespace. Each file or subdirectory has a unique name, but one file may use the same name multiple times.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Namespace\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  NaN</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Computing</li>\n<li>Glossary</li>\n<li>\n<h2>NaN</h2>\n</li>\n</ul>\n<blockquote>\n<p>NaN (Not a Number) is a numeric <em>Glossary(\"Type\", \"data type\"</em>) that means an undefined value or value that cannot be represented, especially results of floating-point calculations.</p>\n</blockquote>\n<p>For example, NaNs can represent infinity, result of division by zero, missing value, or the square root of a negative (which is imaginary, whereas a floating-point number is real).</p>\n<p>Practically speaking, if I divide two variables in a <em>glossary(\"JavaScript\"</em>) program, the result may be NaN, which is predefined in JavaScript as \"undefined\". Hence this division may break the program. Now, if this computation was a small part of a much larger algorithm, it would be really painful to figure out where the error actually occurs. Fortunately, since the result will be NaN and I know my divisor may turn out to be 0, I can set up testing conditions that prevent any such computations in the first place or notify me of where they happen.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"NaN\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\">NaN in JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  NAT</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>WebMechanics</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>NAT</strong> (Network Address Translation) is a technique for letting multiple computers share an IP address. NAT assigns unique addresses to each computer on the local network and adjusts incoming/outgoing network traffic to send data to the right place.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Protocols\">WebRTC protocols</a></li>\n<li><em>interwiki(\"wikipedia\", \"NAT\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Native</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>native</em> application has been compiled to run on the hardware/software environment that comprises the targeted architecture.</p>\n</blockquote>\n<p>An example of a native Android app would be a mobile application written in Java using the Android toolchain.</p>\n<p>On the other hand, a Web App that runs inside a browser is not native — it is run in the web browser, which sits on top of the native environment, not the native environment itself.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Native (computing)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Navigation directive</h2>\n<ul>\n<li>CSP</li>\n<li>HTTP</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong><em>Glossary(\"CSP\"</em>) navigation directives</strong> are used in a <em>HTTPHeader(\"Content-Security-Policy\"</em>) header and govern to which location a user can navigate to or submit a form to, for example.</p>\n</blockquote>\n<p>Navigation directives don't fall back to the <em>CSP(\"default-src\"</em>) directive.</p>\n<p>See <a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#navigation_directives\">Navigation directives</a> for a complete list.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/TR/CSP/#directives-navigation\">https://www.w3.org/TR/CSP/#directives-navigation</a></li>\n<li>\n<p>Other kinds of directives:</p>\n<ul>\n<li><em>Glossary(\"Fetch directive\"</em>)</li>\n<li><em>Glossary(\"Document directive\"</em>)</li>\n<li><em>Glossary(\"Reporting directive\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content\"><code>block-all-mixed-content</code></a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/upgrade-insecure-requests\"><code>upgrade-insecure-requests</code></a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/require-sri-for\"><code>require-sri-for</code></a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types\"><code>trusted-types</code></a></li>\n</ul>\n</li>\n<li><em>HTTPHeader(\"Content-Security-Policy\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Netscape Navigator</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>Navigation</li>\n<li>Netscape</li>\n<li>\n<h2>Netscape Navigator</h2>\n</li>\n</ul>\n<blockquote>\n<p>Netscape Navigator or Netscape was a leading <em>glossary(\"browser\"</em>) in the 1990s.  Netscape was based on Mosaic and the Netscape team was led by Marc Andreessen, a programmer who also wrote code for Mosaic.</p>\n</blockquote>\n<p>Netscape helped make the <em>glossary(\"World Wide Web\",\"Web\"</em>) graphical rather than a text-only experience.  Many browsing features became standard after Netscape introduced them. Netscape could display a webpage while loading, used JavaScript for forms and interactive content, and stored session information in cookies. Despite Netscape's technical advantages and initial dominance, by the late 1990s <em>glossary(\"Microsoft Internet Explorer\", \"Internet Explorer\"</em>) swiftly overtook Netscape in market share.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Netscape Navigator\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Network throttling</h2>\n<ul>\n<li>Glossary</li>\n<li>RUM</li>\n<li>Reference</li>\n<li>Synthetic monitoring</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Network throttling</strong> is an intentional slowing down of internet speed. In web performance, network throttling, or network condition emulation, it is used to emulate low bandwidth conditions experienced by likely a large segment of a site's target user base.</p>\n</blockquote>\n<p>It’s important not to overlook network conditions users experience on mobile. The internet speeds for developers creating web applications in a corporate office building on a powerful computer are generally very fast. As a developer, tech writer, or designer, this is likely your experience. The network speeds of a mobile user accessing that web application, possibly while traveling or in a remote area with poor data plan coverage, will likely be very slow, if they are able to get online at all. Network throttling enables a developer to emulate an experience of a user. Most browser developer tools, such as the browser inspector, provide a function to emulate different network conditions. By emulating your user's experience via network throttling, you can more readily identify and fix load time issues.</p>\n<p>Browser developer tools generally have network throttling options, to allow you to test your app under slow network conditions. Firefox's developer tools for example have a drop-down menu available in both the <a href=\"/en-US/docs/Tools/Network_Monitor\">Network Monitor</a> and <a href=\"/en-US/docs/Tools/Responsive_Design_Mode\">Responsive Design Mode</a> containing network speed options (e.g. wifi, good 3G, 2G...)</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/Synthetic_monitoring\">Synthetic monitoring</a></li>\n</ul>\n<hr>\n<h2>Term:  Node (networking)</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>In networking, a <strong>node</strong> is a connection point in the network. In physical networks, a node is usually a device, like a computer or a router.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Node (networking)\", \"Node\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  NNTP</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>NNTP</strong> (Network News Transfer Protocol) is a <em>Glossary(\"protocol\"</em>) used to transfer <em>Glossary(\"Usenet\"</em>) messages from client to server or between servers.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Network</em>News<em>Transfer</em>Protocol\", \"NNTP\"_) at Wikipedia</li>\n<li>From the IETF: <a href=\"https://datatracker.ietf.org/doc/html/rfc3977\">RFC 3977 about NNTP</a> (2006)</li>\n</ul>\n<hr>\n<h2>Term:  Node.js</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>JavaScript</li>\n<li>\n<h2>node.js</h2>\n</li>\n</ul>\n<blockquote>\n<p>Node.js is a cross-platform <em>Glossary(\"JavaScript\"</em>) runtime environment that allows developers to build server-side and network applications with JavaScript.</p>\n</blockquote>\n<h2>Node Package Manager (npm)</h2>\n<p><a href=\"https://www.npmjs.com/\">npm</a> is bundled with Node.js. It runs on the command line as the command <code>npm</code>. It is a package manager that downloads packages into a <code>node_modules</code> folder. You call the downloaded packages through <code>const libraryModule = require(\"libraryname\")</code>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"Wikipedia\", \"Node.js\"</em>) on Wikipedia</li>\n<li><a href=\"https://nodejs.org/\">Node.js website</a></li>\n<li><a href=\"https://nodejs.org/api/\">API reference documentation</a></li>\n<li><a href=\"https://nodejs.org/documentation/tutorials/\">Tutorials</a></li>\n<li><a href=\"https://docs.npmjs.com/\">npm Documentation</a></li>\n</ul>\n<hr>\n<h2>Term:  Node</h2>\n<ul>\n<li>Disambiguation</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>node</strong> can have several meanings depending on the context. It may refer to:</p>\n</blockquote>\n<p>_GlossaryDisambiguation}}</p>\n<p>Another use of the word is when talking about <em>Glossary(\"Node.js\"</em>)</p>\n<hr>\n<h2>Term:  non-normative</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Specification</li>\n<li>\n<h2>Standardization</h2>\n</li>\n</ul>\n<blockquote>\n<p>Software <em>Glossary(\"specification\", \"specifications\"</em>) often contains information marked as  <em>non-normative</em> or <em>informative,</em> which means that those are provided there for the purpose of helping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule. Sections that contain official part of the specification that must be followed are often marked as <em>Glossary(\"normative\", \"normative\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>Description of <a href=\"https://wiki.whatwg.org/wiki/Specs/howto#Content\">normative and informative content</a> in WHATWG wiki</li>\n</ul>\n<hr>\n<h2>Term:  Normative</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Specification</li>\n<li>\n<h2>Standardization</h2>\n</li>\n</ul>\n<blockquote>\n<p>Normative is a word commonly used in software <em>Glossary(\"specification\", \"specifications\"</em>) to denote sections that are standardized and must be followed as a rule. Specifications might also contain sections that are marked as _<em>Glossary(\"non-normative\"</em>)_ or <em>informative</em>, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>Description of <a href=\"https://wiki.whatwg.org/wiki/Specs/howto#Content\">normative and informative content</a> in WHATWG wiki</li>\n</ul>\n<hr>\n<h2>Term:  'Null'</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>In computer science, a <strong><code>null</code></strong> value represents a reference that points, generally intentionally, to a nonexistent or invalid <em>glossary(\"object\"</em>) or address. The meaning of a null reference varies among language implementations.</p>\n</blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), <code>null</code> is marked as one of the <em>Glossary(\"Primitive\", \"primitive values\"</em>), because its behavior is seemingly primitive.</p>\n<p>But in certain cases, <code>null</code> is not as \"primitive\" as it first seems! Every Object is derived from <code>null</code> value, and therefore <code>typeof</code> operator returns <code>object</code> for it:</p>\n<pre><code class=\"language-js\">typeof null === 'object' // true\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types</a></li>\n<li>The JavaScript global object: <em>jsxref(\"null\"</em>)</li>\n<li><em>Interwiki(\"wikipedia\", \"Null pointer\"</em>) on Wikipedia</li>\n<li>\n<p><strong><a href=\"/en-US/docs/Glossary\">Glossary</a></strong></p>\n<ul>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"string\"</em>)</li>\n<li><em>Glossary(\"number\"</em>)</li>\n<li><em>Glossary(\"bigint\"</em>)</li>\n<li><em>Glossary(\"boolean\"</em>)</li>\n<li><em>Glossary(\"null\"</em>)</li>\n<li><em>Glossary(\"undefined\"</em>)</li>\n<li><em>Glossary(\"symbol\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Nullish value</h2>\n<ul>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>'Null'</li>\n<li>Primitive</li>\n<li>\n<h2>undefined</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <a href=\"/en-US/docs/Glossary/JavaScript\">JavaScript</a>, a nullish value is the value which is either <em>JSxRef(\"null\"</em>) or <em>JSxRef(\"undefined\"</em>). Nullish values are always <a href=\"/en-US/docs/Glossary/Falsy\">falsy</a>.</p>\n</blockquote>\n<hr>\n<h2>Term:  Number</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), <strong>Number</strong> is a numeric data type in the <a href=\"https://en.wikipedia.org/wiki/Double_precision_floating-point_format\">double-precision 64-bit floating point format (IEEE 754)</a>. In other programming languages different numeric types exist; for example, Integers, Floats, Doubles, or Bignums.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Data type#Numeric</em>types\", \"Numeric types\"_) on Wikipedia</li>\n<li>The JavaScript type: <a href=\"/en-US/docs/Web/JavaScript/Data_structures#number_type\"><code>Number</code></a></li>\n<li>The JavaScript global object <em>jsxref(\"Number\"</em>)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary:</a></p>\n<ul>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"Primitive\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Object reference</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A link to an <strong><em>glossary(\"object\"</em>)</strong>. Object references can be used exactly like the linked objects.</p>\n</blockquote>\n<p>The concept of object references becomes clear when assigning the same object to more than one <strong><em>glossary(\"property\"</em>)</strong>. Rather than holding a copy of the object, each assigned property holds object references that link to the same object, so that when the object changes all properties referring to the object reflect the change.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Reference (computer science)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Object</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>\n<h2>Object</h2>\n</li>\n</ul>\n<blockquote>\n<p>In JavaScript, objects can be seen as a collection of properties. With the <a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals\">object literal syntax</a>, a limited set of properties are initialized; then properties can be added and removed. Property values can be values of any type, including other objects, which enables building complex data structures. Properties are identified using <em>key</em> values. A <em>key</em> value is either a <em>Glossary(\"String\", \"String value\"</em>) or a <em>Glossary(\"Symbol\", \"Symbol value\"</em>).</p>\n</blockquote>\n<p>There are two types of object properties: The <a href=\"/en-US/docs/Web/JavaScript/Data_structures#data_property\"><em>data</em> property</a> and the <a href=\"/en-US/docs/Web/JavaScript/Data_structures#accessor_property\"><em>accessor</em> property</a>.</p>\n<blockquote>\n<p><strong>Note:</strong> It’s important to recognize it’s accessor <em>property</em> — not accessor <em>method</em>. We can give a JavaScript object class-<em>like</em> accessors by using a function as a value — but that doesn't make the object a class.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures#objects\">Detailed explanation of JavaScript objects</a> in the <a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types and data structures</a> article</li>\n<li><em>jsxref(\"Object\"</em>) in the <a href=\"/en-US/docs/Web/JavaScript/Reference\">JavaScript reference</a></li>\n</ul>\n<hr>\n<h2>Term:  OOP</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>OOP</strong> (Object-Oriented Programming) is an approach in programming in which data is encapsulated within <strong><em>glossary(\"object\",\"objects\"</em>)</strong> and the object itself is operated on, rather than its component parts.</p>\n</blockquote>\n<p><em>glossary(\"JavaScript\"</em>) is heavily object-oriented. It follows a <strong>prototype</strong>-based model (<a href=\"/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages\">as opposed to class-based</a>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Object-oriented programming\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Objects\">Introduction to object-oriented JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  OpenGL</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>OpenGL</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>OpenGL</strong> (<strong>Open Graphics Library</strong>) is a cross-language, multi-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"OpenGL\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.opengl.org/\">OpenGL</a></li>\n</ul>\n<hr>\n<h2>Term:  OpenSSL</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>OpenSSL is an open-source implementation of <em>glossary(\"SSL\"</em>) and <em>glossary(\"TLS\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"OpenSSL\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.openssl.org/\">Official website</a></li>\n</ul>\n<hr>\n<h2>Term:  Opera Browser</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>Navigation</li>\n<li>Opera</li>\n<li>\n<h2>Opera Browser</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Opera</strong> is the fifth most used web <em>glossary(\"browser\"</em>), publicly released in 1996 and initially running on Windows only. Opera uses <em>glossary(\"Blink\"</em>) as its layout engine since 2013 (before that, <em>glossary(\"Presto\"</em>)). Opera also exists in mobile and tablet versions.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Opera Browser\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.opera.com/\">Opera browser web site</a></li>\n</ul>\n<hr>\n<h2>Term:  Operand</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <strong>operand</strong> is the part of an instruction representing the data manipulated by the <em>glossary(\"operator\"</em>). For example, when you add two numbers, the numbers are the operand and \"+\" is the operator.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Operand\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Operator</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Reserved <strong>syntax</strong> consisting of punctuation or alphanumeric characters that carries out built-in functionality. For example, in JavaScript the addition operator (\"+\") adds numbers together and concatenates strings, whereas the \"not\" operator (\"!\") negates an expression — for example making a <code>true</code> statement return <code>false</code>.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Operator (computer programming)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Operators\">JavaScript operators</a></li>\n</ul>\n<hr>\n<h2>Term:  Origin</h2>\n<ul>\n<li>Glossary</li>\n<li>Security</li>\n<li>WebMechanics</li>\n<li>\n<h2>origin</h2>\n</li>\n</ul>\n<blockquote>\n<p>Web content's <strong>origin</strong> is defined by the <em>scheme</em> (protocol), <em>hostname</em> (domain), and <em>port</em> of the <em>Glossary(\"URL\"</em>) used to access it. Two objects have the same origin only when the scheme, hostname, and port all match.</p>\n</blockquote>\n<p>Some operations are restricted to same-origin content, and this restriction can be lifted using <em>Glossary(\"CORS\"</em>).</p>\n<h2>Examples</h2>\n<p>These are same origin because they have the same scheme (<code>http</code>) and hostname (<code>example.com</code>), and the different file path does not matter:</p>\n<ul>\n<li><code>http://example.com/app1/index.html</code></li>\n<li><code>http://example.com/app2/index.html</code></li>\n</ul>\n<p>These are same origin because a server delivers HTTP content through port 80 by default:</p>\n<ul>\n<li><code>http://Example.com:80</code></li>\n<li><code>http://example.com</code></li>\n</ul>\n<p>These are not same origin because they use different schemes:</p>\n<ul>\n<li><code>http://example.com/app1</code></li>\n<li><code>https://example.com/app2</code></li>\n</ul>\n<p>These are not same origin because they use different hostnames:</p>\n<ul>\n<li><code>http://example.com</code></li>\n<li><code>http://www.example.com</code></li>\n<li><code>http://myapp.example.com</code></li>\n</ul>\n<p>These are not same origin because they use different ports:</p>\n<ul>\n<li><code>http://example.com</code></li>\n<li><code>http://example.com:8080</code></li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Security/Same-origin_policy\">Same-origin policy</a></li>\n<li><em>Glossary(\"Site\"</em>)</li>\n<li><a href=\"https://html.spec.whatwg.org/multipage/origin.html#origin\">HTML specification: origin</a></li>\n</ul>\n<hr>\n<h2>Term:  OTA</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Intro</li>\n<li>OTA</li>\n<li>Over the air</li>\n<li>\n<h2>updates</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Over The Air</em> (<strong>OTA</strong>) refers to automatic updating of software on connected devices from a central server. All device owners receiving a given set of updates are on the same \"channel\", and each device often can access several channels (e.g. for production or engineering builds).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Over-the-air programming\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  OWASP</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>OWASP</strong> (Open Web Application Security Project) is a non-profit organization and worldwide network that works for security in Free Software, especially on the Web.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.owasp.org\">Official website</a></li>\n</ul>\n<hr>\n<h2>Term:  P2P</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>\n<h2>P2P</h2>\n</li>\n</ul>\n<blockquote>\n<p>P2P (Peer-to-peer) is a computer networking architecture in which all participating nodes (<em>peers</em>) have equal privileges and share the workload. P2P differs from a client-server network architecture, where multiple <em>client</em> nodes connect to centralized <em>servers</em> for services. P2P is commonly found in Blockchain Applications.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Peer-to-peer\">P2P</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  PAC</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A Proxy Auto-Configuration file (<strong>PAC file</strong>) is a file which contains a function, <code>FindProxyForURL()</code>, which is used by the browser to determine whether requests (including HTTP, HTTPS, and FTP) should go directly to the destination or if they need to be forwarded through a web proxy server.</p>\n</blockquote>\n<pre><code class=\"language-js\">function FindProxyForURL(url, host) {\n  /* ... */\n}\n\nret = FindProxyForURL(url, host)\n</code></pre>\n<p>See <a href=\"/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file\">Proxy Auto-Configuration (PAC) file</a> for details about how these are used and how to create new ones.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Proxy_auto-config\" title=\"Read about PAC files on Wikipedia\">PAC</a> on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file\">Proxy Auto-Configuration file</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  Packet</h2>\n<ul>\n<li>Glossary</li>\n<li>Network packet</li>\n<li>Packet</li>\n<li>Reference</li>\n<li>TCP</li>\n<li>Web Performance</li>\n<li>\n<h2>payload</h2>\n</li>\n</ul>\n<blockquote>\n<p>A packet, or network packet, is a formatted chunk of data sent over a network. The main components of a network packet are the user data and control information. The user data is known as the <em>payload</em>. The control information is the information for delivering the payload. It consists of network addresses for the source and destination, sequencing information, and error detection codes and is generally found in packet headers and footer.</p>\n</blockquote>\n<h2>What a packet contains</h2>\n<h3>Hop limit</h3>\n<p>A hop occurs when a packet is passed from one network to the next network. It is a field that is decreases by one each time a packet goes through, once it reaches 0 it has failed and the packet is discarded.</p>\n<p>Over time the number packets can cause traversing within closed circuits, the number of packets circulating would build up and then ultimately lead to the networking in failing.</p>\n<h3>Error detection and correction</h3>\n<p>Error detection and correction are codes that are used to detect and apply corrections to the errors that occur when data is transmitted to the receiver. There are two types of error corrections backward and forward error correction. Backward error correction is when the receiver requests the sender to retransmit the entire data unit. Forward error correction is when the receiver uses the error-correcting code which automatically corrects the errors</p>\n<p>At the transmitter, the calculation is performed before the packet is sent. When received at the destination, the checksum is recalculated, and compared with the one in the packet.</p>\n<h3>Priority</h3>\n<p>This field indicates which packet should have higher priority over the others. The high priority queue is emptied more quickly than lower priority queues when the network is congested.</p>\n<h3>Addresses</h3>\n<p>When routing network packets it requires two network addresses the source address of the sending host, and the destination address of the receiving host.</p>\n<h3>User Data - Payload</h3>\n<p>Payload is the data that is carried on behalf of an application. It is usually of variable length, up to a maximum that is set by the network protocol and sometimes the equipment on the route.</p>\n<h2>References used</h2>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Network_packet\">https://en.wikipedia.org/wiki/Network_packet</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Hop_(networking)\">https://en.m.wikipedia.org/wiki/Hop_(networking)</a></li>\n<li><a href=\"https://www.techradar.com/news/computing/how-error-detection-and-correction-works-1080736\">https://www.techradar.com/news/computing/how-error-detection-and-correction-works-1080736</a></li>\n</ul>\n<hr>\n<h2>Term:  Page load time</h2>\n<ul>\n<li>Glossary</li>\n<li>Timings</li>\n<li>Web Performance</li>\n<li>metrics</li>\n<li>\n<h2>page load time</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Page load time</strong> is the time it takes for a page to load, measured from <a href=\"/en-US/docs/Web/API/PerformanceTiming/navigationStart\">navigation start</a> to the <a href=\"/en-US/docs/Web/API/PerformanceTiming/loadEventStart\">start of the load event</a>.</p>\n</blockquote>\n<pre><code class=\"language-js\">let time = performance.timing;\n\nlet pageloadtime = time.loadEventStart - time.navigationStart;\n</code></pre>\n<p>While page load time 'sounds' like the perfect web performance metric, it isn't. Load times can vary greatly between users depending on device capabilities, network conditions, and, to a lesser extent, distance from the server. The development environment, where page load time is measured, is likely an optimal experience, not reflective of your users' reality. In addition, web performance isn't just about when the load event happens. It's also about <a href=\"/en-US/docs/Glossary/Perceived_performance\">perceived performance</a>, responsiveness, <a href=\"/en-US/docs/Glossary/Jank\">jank</a> and jitter.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/Navigation_and_resource_timings\">Navigation and resource timing</a></li>\n<li><em>domxref(\"PerformanceNavigationTiming\"</em>)</li>\n<li><em>domxref(\"PerformanceResourceTiming\"</em>),</li>\n</ul>\n<hr>\n<h2>Term:  Page prediction</h2>\n<ul>\n<li>Glossary</li>\n<li>Security</li>\n<li>Web Performance</li>\n<li>\n<h2>page prediction</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Page Prediction</strong> is a browser feature or script which, when enabled, tells the browser to download resources the user is likely to visit before the user requests the content. Page prediction improves performance by enabling almost instant loading of predicted content. However, page prediction may also download content a user does not seek.</p>\n</blockquote>\n<p>Some web applications include a prediction feature completing search text and address bar URLs based on browsing history and related searches. For example, as the user types in the address bar, the browser might send the current text in the address bar to the search engine before the user submits the request.</p>\n<p>Although browser page prediction and prediction services enable faster page loads, they consume additional bandwidth. Also, pre-loaded websites and embedded content can set and read their cookies as if they were visited even if they weren't.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/prerender\">prerender</a></li>\n<li><a href=\"/en-US/docs/Glossary/Prefetch\">prefetch</a></li>\n</ul>\n<hr>\n<h2>Term:  Parameter</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A parameter is a named variable passed into a <em>Glossary(\"function\"</em>). Parameter variables are used to import <em>Glossary(\"argument\",\"arguments\"</em>) into functions.</p>\n</blockquote>\n<p>For example:</p>\n<pre><code class=\"language-js\">function example(parameter) {\n  console.log(parameter); // Output = foo\n}\n\nconst argument = 'foo';\n\nexample(argument);\n</code></pre>\n<p>Note the difference between <em>parameters</em> and <em>arguments</em>:</p>\n<ul>\n<li>Function parameters are the names listed in the function's definition.</li>\n<li>Function <em>Glossary(\"argument\",\"arguments\"</em>) are the real values passed to the function.</li>\n<li>Parameters are initialized to the values of the arguments supplied.</li>\n</ul>\n<p>Two kinds of parameters:</p>\n<ul>\n<li>\n<p>input parameters</p>\n<ul>\n<li>: the most common kind; they pass values into functions. Depending on programming language, input parameters can be passed several ways (e.g., call-by-value, call-by-address, call-by-reference).</li>\n</ul>\n</li>\n<li>\n<p>output/return parameters</p>\n<ul>\n<li>: primarily return multiple values from a function, but not recommended since they cause confusion</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Parameter_%28computer_programming%29#Parameters_and_arguments\">Difference between <em>parameter</em> and <em>argument</em></a> on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/function\">Function declaration</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/function\">Function expression</a></li>\n</ul>\n<hr>\n<h2>Term:  Parent object</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>glossary(\"object\"</em>) to which a given <em>glossary(\"property\"</em>) or <em>glossary(\"method\"</em>) belongs.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">Discussion of Inheritance and prototypes in JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  Parse</h2>\n<ul>\n<li>Browser</li>\n<li>CSS</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>JavaScript</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>Parsing means analyzing and converting a program into an internal format that a runtime environment can actually run, for example the <em>glossary(\"JavaScript\"</em>) engine inside browsers.</p>\n</blockquote>\n<p>When the browser encounters CSS styles, it parses the text into the CSS Object Model (or <em>glossary('CSSOM'</em>)), a data structure it then uses for styling layouts and painting. The browser then creates a render tree from both these structures to be able to paint the content to the screen. JavaScript is also downloaded, parsed, and then execute.</p>\n<p>JavaScript parsing is done during <em>glossary(\"compile time\"</em>) or whenever the <em>glossary(\"parser\"</em>) is invoked, such as during a call to a method.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Parsing\">Parse</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Parser</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>parser</strong> is the module of a compiler or interpreter that <em>glossary(\"parse\",\"parses\"</em>) a source code file.</p>\n</blockquote>\n<p>More generally, it's a piece of software that parses text and transforms its content to another representation.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Parsing#Parser\">Parser</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Payload body</h2>\n<ul>\n<li>HTTP</li>\n<li>\n<h2>HTTP Header</h2>\n</li>\n</ul>\n<blockquote>\n<p>The HTTP message <em>payload body</em> is the <em>information</em> (\"payload\") part of the data that is sent in the HTTP Message Body (if any), prior to <em>HTTPHeader(\"Transfer-Encoding\",\"transfer encoding\"</em>) being applied. If transfer encoding is not used, the <em>payload body</em> and <em>message body</em> are the same thing!</p>\n</blockquote>\n<p>For example, in this response the message body contains only the payload body: \"Mozilla Developer Network\":</p>\n<pre><code class=\"language-plain\">HTTP/1.1 200 OK\nContent-Type: text/plain\n\nMozilla Developer Network\n</code></pre>\n<p>By contrast, the below response uses <em>transfer encoding</em> to encode the payload body into chunks. The payload body (information) sent is still \"Mozilla Developer Network\", but the message body includes additional data to separate the chunks:</p>\n<pre><code class=\"language-plain\">HTTP/1.1 200 OK\nContent-Type: text/plain\nTransfer-Encoding: chunked\n\n7\\r\\n\nMozilla\\r\\n\n9\\r\\n\nDeveloper\\r\\n\n7\\r\\n\nNetwork\\r\\n\n0\\r\\n\n\\r\\n\n</code></pre>\n<p>For more information see <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.3\">RFC 7230, section 3.3: Message Body</a> and <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1\">RFC 7230, section 3.3.1: Transfer-Encoding</a>.</p>\n<hr>\n<h2>Term:  Payload header</h2>\n<ul>\n<li>Glossary</li>\n<li>Payload header</li>\n<li>Headers</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>payload header</strong> is an <em>Glossary(\"HTTP</em>header\", \"HTTP header\"<em>) that describes the payload information related to safe transport and reconstruction of the original resource _Glossary(\"Representation header\", \"representation\"</em>), from one or more messages. This includes information like the length of the message payload, which part of the resource is carried in this payload (for a multi-part message), any encoding applied for transport, message integrity checks, etc.</p>\n</blockquote>\n<p>Payload headers may be present in both HTTP request and response messages (i.e. in any message that is carrying payload data).</p>\n<p>The payload headers include: <em>HTTPHeader(\"Content-Length\"</em>), <em>HTTPHeader(\"Content-Range\"</em>), <em>HTTPHeader(\"Trailer\"</em>), and <em>HTTPHeader(\"Transfer-Encoding\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Web/HTTP/Headers\">List of all HTTP headers</a></p>\n<ul>\n<li><em>HTTPHeader(\"Content-Length\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Range\"</em>)</li>\n<li><em>HTTPHeader(\"Trailer\"</em>)</li>\n<li><em>HTTPHeader(\"Transfer-Encoding\"</em>)</li>\n<li><em>Glossary(\"Representation header\"</em>)</li>\n</ul>\n</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc7231#section-3.3\">RFC 7231, section 3.3: Payload semantics</a></li>\n</ul>\n<hr>\n<h2>Term:  PDF</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>PDF</li>\n<li>\n<h2>Portable Document Format</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>PDF</strong> (Portable Document Format) is a file format used to share documentation without depending on any particular software implementation, hardware platform, or operating system. PDF provides a digital image of a printed document, and keeps the same appearance when printed.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Portable Document Format\", \"PDF\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Perceived performance</h2>\n<ul>\n<li>Glossary</li>\n<li>Perceived Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Perceived performance</strong> is a measure of how fast, responsive, and reliable a website <em>feels</em> to its users. The perception of how well a site is performing can have more impact on the user experience that the actual load and response times.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Performance/Perceived_performance\">Perceived performance</a></li>\n</ul>\n<hr>\n<h2>Term:  Percent-encoding</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Percent-encoding</strong> is a mechanism to encode 8-bit characters that have specific meaning in the context of <em>Glossary(\"URL\", \"URLs\"</em>). It is sometimes called URL encoding. The encoding consists of substitution: A '%' followed by the hexadecimal representation of the ASCII value of the replace character.</p>\n</blockquote>\n<p>Special characters needing encoding are: <code>':'</code>, <code>'/'</code>, <code>'?'</code>, <code>'#'</code>, <code>'['</code>, <code>']'</code>, <code>'@'</code>, <code>'!'</code>, <code>'$'</code>, <code>'&#x26;'</code>, <code>\"'\"</code>, <code>'('</code>, <code>')'</code>, <code>'*'</code>, <code>'+'</code>, <code>','</code>, <code>';'</code>, <code>'='</code>, as well as <code>'%'</code> itself. Other characters don't need to be encoded, though they could.</p>\n<table>\n<thead>\n<tr>\n<th>Character</th>\n<th>Encoding</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>':'</code></td>\n<td><code>%3A</code></td>\n</tr>\n<tr>\n<td><code>'/'</code></td>\n<td><code>%2F</code></td>\n</tr>\n<tr>\n<td><code>'?'</code></td>\n<td><code>%3F</code></td>\n</tr>\n<tr>\n<td><code>'#'</code></td>\n<td><code>%23</code></td>\n</tr>\n<tr>\n<td><code>'['</code></td>\n<td><code>%5B</code></td>\n</tr>\n<tr>\n<td><code>']'</code></td>\n<td><code>%5D</code></td>\n</tr>\n<tr>\n<td><code>'@'</code></td>\n<td><code>%40</code></td>\n</tr>\n<tr>\n<td><code>'!'</code></td>\n<td><code>%21</code></td>\n</tr>\n<tr>\n<td><code>'$'</code></td>\n<td><code>%24</code></td>\n</tr>\n<tr>\n<td><code>'&#x26;'</code></td>\n<td><code>%26</code></td>\n</tr>\n<tr>\n<td><code>\"'\"</code></td>\n<td><code>%27</code></td>\n</tr>\n<tr>\n<td><code>'('</code></td>\n<td><code>%28</code></td>\n</tr>\n<tr>\n<td><code>')'</code></td>\n<td><code>%29</code></td>\n</tr>\n<tr>\n<td><code>'*'</code></td>\n<td><code>%2A</code></td>\n</tr>\n<tr>\n<td><code>'+'</code></td>\n<td><code>%2B</code></td>\n</tr>\n<tr>\n<td><code>','</code></td>\n<td><code>%2C</code></td>\n</tr>\n<tr>\n<td><code>';'</code></td>\n<td><code>%3B</code></td>\n</tr>\n<tr>\n<td><code>'='</code></td>\n<td><code>%3D</code></td>\n</tr>\n<tr>\n<td><code>'%'</code></td>\n<td><code>%25</code></td>\n</tr>\n<tr>\n<td><code>' '</code></td>\n<td><code>%20</code> or <code>+</code></td>\n</tr>\n</tbody>\n</table>\n<p>Depending on the context, the character <code>' '</code> is translated to a <code>'+'</code> (like in the percent-encoding version used in an <code>application/x-www-form-urlencoded</code> message), or in <code>'%20'</code> like on URLs.</p>\n<h4>See also</h4>\n<ul>\n<li>Definition of <a href=\"https://en.wikipedia.org/wiki/Percent-encoding\">percent-encoding</a> in Wikipedia.</li>\n<li><em>RFC(3986</em>), section 2.1, where this encoding is defined.</li>\n</ul>\n<hr>\n<h2>Term:  PHP</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Intro</li>\n<li>\n<h2>PHP</h2>\n</li>\n</ul>\n<blockquote>\n<p>PHP (a recursive initialism for PHP: Hypertext Preprocessor) is an open-source server-side scripting language that can be embedded into HTML to build web applications and dynamic websites.</p>\n</blockquote>\n<h2>Examples</h2>\n<h3>Basic syntax</h3>\n<pre><code class=\"language-php\">  // start of PHP code\n&#x3C;?php\n     // PHP code goes here\n ?>\n// end of PHP code\n</code></pre>\n<h3>Printing data on screen</h3>\n<pre><code class=\"language-php\">&#x3C;?php\n   echo \"Hello World!\";\n?>\n</code></pre>\n<h3>PHP variables</h3>\n<pre><code class=\"language-php\">&#x3C;?php\n // variables\n $nome='Danilo';\n $sobrenome='Santos';\n $pais='Brasil';\n $email='danilocarsan@gmailcom';\n\n // printing the variables\n echo $nome;\n echo $sobrenome;\n echo $pais;\n echo $email;\n?>\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://php.net/\">Official website</a></li>\n<li><em>Interwiki(\"wikipedia\", \"PHP\"</em>) on Wikipedia</li>\n<li><a href=\"https://en.wikibooks.org/wiki/PHP_Programming\">PHP</a> on Wikibooks</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Java\"</em>)</li>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"Python\"</em>)</li>\n<li><em>Glossary(\"Ruby\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Pixel</h2>\n<ul>\n<li>Design</li>\n<li>Glossary</li>\n<li>\n<h2>Graphics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A pixel is the smallest building block of a graphical display like a computer screen.</p>\n</blockquote>\n<p>Display resolution is expressed in the unit of pixels. eg: A “800 x 600” pixel resolution means that 800 pixels can be displayed in width and 600 pixels in height.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Pixel\">Pixel </a>on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Placeholder names</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>Placeholder names are commonly used in cryptography to indicate the participants in a conversation, without resorting to terminology such as \"Party A,\" \"eavesdropper,\" and \"malicious attacker.\"</p>\n</blockquote>\n<p>The most commonly used names are:</p>\n<ul>\n<li><em>Alice</em> and <em>Bob</em>, two parties who want to send messages to each other, occasionally joined by <em>Carol</em>, a third participant</li>\n<li><em>Eve</em>, a passive attacker who is eavesdropping on Alice and Bob's conversation</li>\n<li><em>Mallory</em>, an active attacker (\"man-in-the-middle\") who is able to modify their conversation and replay old messages</li>\n</ul>\n<hr>\n<h2>Term:  Plaintext</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>Plaintext refers to information that is being used as an input to an <em>Glossary(\"encryption\"</em>) <em>Glossary(\"algorithm\"</em>), or to <em>Glossary(\"ciphertext\"</em>) that has been decrypted.</p>\n</blockquote>\n<p>It is frequently used interchangeably with the term <em>cleartext</em>, which more loosely refers to any information, such as a text document, image, etc., that has not been encrypted and can be read by a human or computer without additional processing.</p>\n<hr>\n<h2>Term:  Plugin</h2>\n<hr>\n<blockquote>\n<p>A browser plugin is a software component that users can install to handle content that the browser can't support natively. Browser plugins are usually written using the <a href=\"https://en.wikipedia.org/wiki/NPAPI\">NPAPI</a> (Netscape Plugin Application Programming Interface) architecture.</p>\n</blockquote>\n<p>The most well-known and widely used plugin was the Adobe Flash player, which enabled browsers to run <em>Glossary(\"Adobe Flash\"</em>) content.</p>\n<p>As browsers have become more powerful, plugins have become less useful. Plugins also have a history of causing security and performance problems for web users.</p>\n<p>Between 2016 and 2021 browser vendors worked on a deprecation roadmap for plugins and in particular for Adobe Flash, and today plugins are no longer supported by any major browsers.</p>\n<p>Plugins should not be confused with browser extensions, which unlike plugins are distributed as source code rather than binaries, and which are still supported by browsers, notably using the <em>Glossary(\"WebExtensions\"</em>) system.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://blog.adobe.com/en/publish/2017/07/25/adobe-flash-update#gs.g8mmgf\">Adobe Flash end-of-life announcement</a></li>\n</ul>\n<hr>\n<h2>Term:  PNG</h2>\n<ul>\n<li>Beginner</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>PNG</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>PNG</strong> (Portable Network Graphics) is a graphics file format that supports lossless data compression.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Portable_Network_Graphics\">PNG </a>on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Polyfill</h2>\n<ul>\n<li>Browser Support</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>polyfill</h2>\n</li>\n</ul>\n<blockquote>\n<p>A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it.</p>\n</blockquote>\n<p>For example, a polyfill could be used to mimic the functionality of a <em>cssxref(\"text-shadow\"</em>) in IE7 using proprietary IE filters, or mimic rem units or media queries by using JavaScript to dynamically adjust the styling as appropriate, or whatever else you require.</p>\n<p>The reason why polyfills are not used exclusively is for better functionality and better performance. Native implementations of APIs can do more and are faster than polyfills. For example, the <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#polyfill\">Object.create polyfill</a> only contains the functionalities that are possible in a non-native implementation of Object.create.</p>\n<p>Other times, polyfills are used to address issues where browsers implement the same features in different ways. The polyfill uses non-standard features in a certain browser to give JavaScript a standards-compliant way to access the feature. Although this reason for polyfilling is very rare today, it was especially prevalent back in the days of IE6 and Netscape where each browser implemented JavaScript very differently. The <a href=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js\">1st version of JQuery</a> was an early example of a polyfill. It was essentially a compilation of browser-specific workarounds to provide JavaScript developers with a single common API that worked in all browsers. At the time, JavaScript developers were having major problems trying to get their website to work across all devices because there was such a discrepancy between browsers that the website might have to be programmed radically differently and have a much different user interface based upon the user's browser. Thus, the JavaScript developer had access to only a very tiny handful of JavaScript APIs that worked more-or-less consistently across all browsers. Using a polyfill to handle browser-specific implementations is less common today because modern browsers mostly implement a broad set of APIs according to standard semantics.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://remysharp.com/2010/10/08/what-is-a-polyfill\">What is a polyfill?</a> (article by Remy Sharp, the originator of the term)</li>\n</ul>\n<hr>\n<h2>Term:  Polymorphism</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Polymorphism is the presentation of one interface for multiple data types.</p>\n</blockquote>\n<p>For example, integers, floats, and doubles are implicitly polymorphic: regardless of their different types, they can all be added, subtracted, multiplied, and so on.</p>\n<p>In the case of <em>glossary(\"OOP\"</em>), by making the <em>glossary(\"class\"</em>) responsible for its code as well as its own data, polymorphism can be achieved in that each class has its own <em>glossary(\"function\"</em>) that (once called) behaves properly for any <em>glossary(\"object\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29\">Polymorphism</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  POP3</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>POP3</strong> (Post Office Protocol) is a very common <em>glossary(\"protocol\"</em>) for getting emails from a mail server over a <em>glossary(\"TCP\"</em>) connection. POP3 does not support folders, unlike the more recent <em>Glossary(\"IMAP\"</em>), which is harder to implement because of its more complex structure.</p>\n</blockquote>\n<p>Clients usually retrieve all messages and then delete them from the server, but POP3 does allow retaining a copy on the server. Nearly all email servers and clients currently support POP3.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Post Office Protocol\", \"POP\"</em>) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc1734\">RFC 1734</a> (Specification of POP3 authentication mechanism)</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc1939\">RFC 1939</a> (Specification of POP3)</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc2449\">RFC 2449</a> (Specification of POP3 extension mechanism)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a>:</p>\n<ul>\n<li><em>Glossary(\"IMAP\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Port</h2>\n<ul>\n<li>Glossary</li>\n<li>Intro</li>\n<li>Security</li>\n<li>computer network</li>\n<li>\n<h2>port</h2>\n</li>\n</ul>\n<blockquote>\n<p>For a computer connected to a network with an <em>Glossary(\"IP address\"</em>), a <strong>port</strong> is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific <em>Glossary(\"protocol\"</em>).</p>\n</blockquote>\n<p>For example, the default port for the <em>Glossary(\"HTTP\"</em>) protocol is 80 and the default port for the HTTPS protocol is 443, so a <em>Glossary(\"HTTP\"</em>) server waits for requests on those ports. Each Internet protocol is associated with a default port: <em>Glossary(\"SMTP\"</em>) (25), <em>Glossary(\"POP\"</em>) (110), <em>Glossary(\"IMAP\"</em>) (143), <em>Glossary(\"IRC\"</em>) (194), and so on.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Port (computer networking)\" , \"Port\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Prefetch</h2>\n<ul>\n<li>Glossary</li>\n<li>Prefetch</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>Prefetching is when content is downloaded in the background, this is based on the assumption that the content will likely be requested, enabling the content to load instantly if and when the user requests it. The content is downloaded and cached for anticipated future use without the user making an explicit request for it.</p>\n</blockquote>\n<h3>DNS Prefetching</h3>\n<p>Domain lookups can be slow, especially with network latency on mobile phones. They are most relevant when there are a plethora of links to external websites that may be clicked on, like search engine results, DNS prefetching resolves domain names in advance thereby speeding up load times by reducing the time associated with domain lookup at request time.</p>\n<pre><code>&#x3C;link rel=\"dns-prefetch\" href=\"https://example.com/\">\n</code></pre>\n<h3>Link prefetching</h3>\n<p>Link prefetching is a performance optimization technique that works by assuming which links the user is likely to click, then downloading the content of those links. If the user decides to click on one of the links, then the page will be rendered instantly as the content has already been downloaded.</p>\n<p>The prefetch hints are sent in HTTP headers:</p>\n<pre><code>Link: ; rel=dns-prefetch,\n      ; as=script; rel=preload,\n      ; rel=prerender,\n      ; as=style; rel=preload\n</code></pre>\n<h3>Prefetch attribute value</h3>\n<p>Browsers will prefetch content when the prefetch <a href=\"/en-US/docs/Web/HTML/Element/link\"><code>&#x3C;link></code></a> tag directs it to, giving the developer control over what resources should be prefetched.</p>\n<pre><code> &#x3C;link rel=\"prefetch\" href=\"https://www.example.com/solutions\" />\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li>defer</li>\n<li>async</li>\n<li><a href=\"/en-US/docs/Web/HTML/Link_types/preload\">preload</a></li>\n<li><a href=\"/en-US/docs/Glossary/Page_prediction\">page prediction</a></li>\n<li><a href=\"/en-US/docs/Web/Performance/Lazy_loading\">lazy loading</a></li>\n</ul>\n<hr>\n<h2>Term:  Preflight request</h2>\n<ul>\n<li>CORS</li>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Preflight</li>\n<li>\n<h2>request</h2>\n</li>\n</ul>\n<blockquote>\n<p>A CORS preflight request is a <em>Glossary(\"CORS\"</em>) request that checks to see if the CORS protocol is understood and a server is aware using specific methods and headers.</p>\n</blockquote>\n<p>It is an <em>HTTPMethod(\"OPTIONS\"</em>) request, using three HTTP request headers: <em>HTTPHeader(\"Access-Control-Request-Method\"</em>), <em>HTTPHeader(\"Access-Control-Request-Headers\"</em>), and the <em>HTTPHeader(\"Origin\"</em>) header.</p>\n<p>A preflight request is automatically issued by a browser and in normal cases, front-end developers don't need to craft such requests themselves. It appears when request is qualified as <a href=\"/en-US/docs/Web/HTTP/CORS#preflighted_requests\">\"to be preflighted\"</a> and omitted for <a href=\"/en-US/docs/Web/HTTP/CORS#simple_requests\">simple requests</a>.</p>\n<p>For example, a client might be asking a server if it would allow a <em>HTTPMethod(\"DELETE\"</em>) request, before sending a <code>DELETE</code> request, by using a preflight request:</p>\n<pre><code class=\"language-plain\">OPTIONS /resource/foo\nAccess-Control-Request-Method: DELETE\nAccess-Control-Request-Headers: origin, x-requested-with\nOrigin: https://foo.bar.org\n</code></pre>\n<p>If the server allows it, then it will respond to the preflight request with an <em>HTTPHeader(\"Access-Control-Allow-Methods\"</em>) response header, which lists <code>DELETE</code>:</p>\n<pre><code class=\"language-plain\">HTTP/1.1 204 No Content\nConnection: keep-alive\nAccess-Control-Allow-Origin: https://foo.bar.org\nAccess-Control-Allow-Methods: POST, GET, OPTIONS, DELETE\nAccess-Control-Max-Age: 86400\n</code></pre>\n<p>The preflight response can be optionally cached for the requests created in the same <em>Glossary(\"URL\"</em>) using <em>HTTPHeader(\"Access-Control-Max-Age\"</em>) header like in the above example.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Glossary(\"CORS\"</em>)</li>\n<li><em>HTTPMethod(\"OPTIONS\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Prerender</h2>\n<ul>\n<li>Glossary</li>\n<li>Prefetch</li>\n<li>Security</li>\n<li>Web Performance</li>\n<li>\n<h2>prerender</h2>\n</li>\n</ul>\n<blockquote>\n<p>With prerendering, the content is <a href=\"/en-US/docs/Glossary/Prefetch\">prefetched</a> and then rendered in the background by the browser as if the content had been rendered into an invisible separate tab. When the user navigates to the prerendered content, the current content is replaced by the prerendered content instantly.</p>\n</blockquote>\n<pre><code class=\"language-html\">&#x3C;link rel=\"prerender\" href=\"https://example.com/content/to/prerender\">\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/Prefetch\">prefetch</a></li>\n</ul>\n<hr>\n<h2>Term:  Presto</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>Presto was the proprietary browser layout engine used to power the <em>Glossary(\"Opera browser\"</em>) until version 15. Since then, the Opera browser is based on Chromium, which uses the <em>Glossary('Blink'</em>) layout engine.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Presto_%28layout_engine%29\">Presto layout engine</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Primitive</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), a <strong>primitive</strong> (primitive value, primitive data type) is data that is not an <em>Glossary(\"object\"</em>) and has no <em>glossary(\"method\",\"methods\"</em>). There are 7 primitive data types: <em>Glossary(\"string\"</em>), <em>Glossary(\"number\"</em>), <em>Glossary(\"bigint\"</em>), <em>Glossary(\"boolean\"</em>), <em>Glossary(\"undefined\"</em>), <em>Glossary(\"symbol\"</em>), and <em>Glossary(\"null\"</em>).</p>\n</blockquote>\n<p>Most of the time, a primitive value is represented directly at the lowest level of the language implementation.</p>\n<p>All primitives are <strong>immutable</strong>, i.e., they cannot be altered. It is important not to confuse a primitive itself with a variable assigned a primitive value. The variable may be reassigned a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered.</p>\n<h2>Example</h2>\n<p>This example will help you understand that primitive values are <strong>immutable.</strong></p>\n<h3>JavaScript</h3>\n<pre><code class=\"language-js\">// Using a string method doesn't mutate the string\nvar bar = \"baz\";\nconsole.log(bar);               // baz\nbar.toUpperCase();\nconsole.log(bar);               // baz\n\n// Using an array method mutates the array\nvar foo = [];\nconsole.log(foo);               // []\nfoo.push(\"plugh\");\nconsole.log(foo);               // [\"plugh\"]\n\n// Assignment gives the primitive a new (not a mutated) value\nbar = bar.toUpperCase();       // BAZ\n</code></pre>\n<p>A primitive can be replaced, but it can't be directly altered.</p>\n<h2>Primitive wrapper objects in JavaScript</h2>\n<p>Except for <code>null</code> and <code>undefined</code>, all primitive values have object equivalents that wrap around the primitive values:</p>\n<ul>\n<li><em>jsxref(\"String\"</em>) for the string primitive.</li>\n<li><em>jsxref(\"Number\"</em>) for the number primitive.</li>\n<li><em>jsxref(\"BigInt\"</em>) for the bigint primitive.</li>\n<li><em>jsxref(\"Boolean\"</em>) for the boolean primitive.</li>\n<li><em>jsxref(\"Symbol\"</em>) for the symbol primitive.</li>\n</ul>\n<p>The wrapper's <a href=\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf\"><code>valueOf()</code></a> method returns the primitive value.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Primitive data type\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"string\"</em>)</li>\n<li><em>Glossary(\"number\"</em>)</li>\n<li><em>Glossary(\"bigint\"</em>)</li>\n<li><em>Glossary(\"boolean\"</em>)</li>\n<li><em>Glossary(\"null\"</em>)</li>\n<li><em>Glossary(\"undefined\"</em>)</li>\n<li><em>Glossary(\"symbol\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  privileged code</h2>\n<ul>\n<li>\n<h2>privileged</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Privileged code</strong> - Javascript code of your extension. For example, code in content scripts.</p>\n</blockquote>\n<p><strong>Non-privileged</strong> - Javascript on web-page.</p>\n<hr>\n<h2>Term:  Privileged</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>Users are said to be <strong>privileged</strong> when they are granted additional rights to a system, or given ultimate access to content in a higher priority level when compared to normal users.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Privilege (computing)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/Security/Information_Security_Basics\">Information Security Tutorial</a></li>\n</ul>\n<hr>\n<h2>Term:  Progressive Enhancement</h2>\n<ul>\n<li>Accessibility</li>\n<li>Design</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Progressive enhancement</strong> is a design philosophy that provides a baseline of essential content and functionality to as many users as possible, while delivering the best possible experience only to users of the most modern browsers that can run all the required code.</p>\n</blockquote>\n<p>The word <em>progressive</em> in <em>progressive enhancement</em> means creating a design that achieves a simpler-but-still-usable experience for users of older browsers and devices with limited capabilities, while at the same time being a design that <strong>progresses the user experience up</strong> to a more-compelling, fully-featured experience for users of newer browsers and devices with richer capabilities.</p>\n<p><a href=\"/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection\">Feature detection</a> is generally used to determine whether browsers can handle more modern functionality, while <a href=\"/en-US/docs/Glossary/Polyfill\">polyfills</a> are often used to add missing features with JavaScript.</p>\n<p>Special notice should be taken of accessibility. Acceptable alternatives should be provided where possible.</p>\n<p>Progressive enhancement is a useful technique that allows web developers to focus on developing the best possible websites while making those websites work on multiple unknown user agents. <em>Glossary(\"Graceful degradation\"</em>) is related but is not the same thing and is often seen as going in the opposite direction to progressive enhancement. In reality both approaches are valid and can often complement one another.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Progressive enhancement\"</em>) at Wikipedia</li>\n<li><a href=\"https://www.freecodecamp.org/news/what-is-progressive-enhancement-and-why-it-matters-e80c7aaf834a/\">What is Progressive Enhancement, and why it matters</a> at freeCodeCamp</li>\n<li><a href=\"https://www.quirksmode.org/blog/archives/2021/02/progressive_enh_1.html\">Progressive Enhancement reading list 2021</a> at QuirksMode</li>\n<li><a href=\"https://alistapart.com/article/understandingprogressiveenhancement/\">Understanding Progressive Enhancement</a> by Aaron Gustafson; a 2008 <em>A List Apart</em> article which first “placed progressive enhancement at the forefront of web developer thinking”</li>\n<li><a href=\"http://hesketh.com/publications/inclusive_web_design_for_the_future/\">Inclusive Web Design For the Future with Progressive Enhancement</a> (<a href=\"http://www.hesketh.com/progressive_enhancement_and_the_future_of_web_design.html\">related article)</a> by Steve Champeon and Nick Finck; a 2003 SXSW presentation cited by Aaron Gustafson as “unveiling a blueprint for a new way of approaching web development”, and naming it “progressive enhancement”</li>\n</ul>\n<hr>\n<h2>Term:  Progressive web apps</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>\n<h2>Progressive web apps</h2>\n</li>\n</ul>\n<blockquote>\n<p>Progressive web apps is a term used to describe the modern state of web app development. This involves taking standard web sites/apps that enjoy all the best parts of the Web — such as discoverability via search engines, being linkable via <em>Glossary(\"URL\"</em>)s, and working across multiple form factors — and supercharging them with modern APIs (such as <a href=\"/en-US/docs/Web/API/Service_Worker_API\">Service Workers</a> and <a href=\"/en-US/docs/Web/API/Push_API\">Push</a>) and features that confer other benefits more commonly attributed to native apps.</p>\n</blockquote>\n<p>These features include being installable, working offline, and being easy to sync with and re-engage the user from the server.</p>\n<h4>See also</h4>\n<ul>\n<li>The <a href=\"/en-US/docs/Web/Progressive_web_apps\">App Center</a> on MDN</li>\n<li><a href=\"https://web.dev/progressive-web-apps/\">Progressive web apps</a> on Google Developers</li>\n</ul>\n<hr>\n<h2>Term:  Promise</h2>\n<ul>\n<li>Glossary</li>\n<li>Promise</li>\n<li>Promises</li>\n<li>\n<h2>asynchronous</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong><em>jsxref(\"Promise\"</em>)</strong> is an <em>Glossary(\"object\"</em>) that's returned by a <em>Glossary(\"function\"</em>) that has not yet completed its work. The promise literally represents a promise made by the function that it will eventually return a result through the promise object.</p>\n</blockquote>\n<p>When the called function finishes its work <em>Glossary(\"asynchronous\", \"asynchronously\"</em>), a function on the promise object called a resolution (or fulfillment, or completion) handler is called to let the original caller know that the task is complete.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Futures and promises\"</em>)</li>\n<li><em>jsxref(\"Promise\"</em>) in the <a href=\"/en-US/docs/Web/JavaScript/Reference\">JavaScript Reference</a>.</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Using_promises\">Using promises</a></li>\n</ul>\n<hr>\n<h2>Term:  Property</h2>\n<ul>\n<li>Disambiguation</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>property</strong> can have several meanings depending on the context. It may refer to:</p>\n</blockquote>\n<p>_GlossaryDisambiguation}}</p>\n<hr>\n<h2>Term:  Protocol</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Protocols</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>protocol</strong> is a system of rules that define how data is exchanged within or between computers. Communications between devices require that the devices agree on the format of the data that is being exchanged. The set of rules that defines a format is called a protocol.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Communications protocol\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.rfc-editor.org/search/standards.php\">RFC Official Internet Protocol Standards</a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Overview\">HTTP overview</a></li>\n<li>\n<p>Glossary:</p>\n<ul>\n<li><em>glossary(\"TCP\"</em>)</li>\n<li><em>glossary(\"Packet\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Prototype-based programming</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Prototype-based programming</strong> is a style of <em>Glossary(\"OOP\", \"object-oriented programming\"</em>) in which <em>Glossary('Class', 'classes'</em>) are not explicitly defined, but rather derived by adding properties and methods to an instance of another class or, less frequently, adding them to an empty object.</p>\n</blockquote>\n<p>In simple words: this type of style allows the creation of an <em>Glossary('Object', 'object'</em>) without first defining its <em>Glossary('Class', 'class'</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Prototype-based programming\", \"Prototype-based programming\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Prototype</h2>\n<ul>\n<li>Apps</li>\n<li>Composing</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A prototype is a model that displays the appearance and behavior of an application or product early in the development lifecycle.</p>\n</blockquote>\n<p>See <a href=\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">Inheritance and the prototype chain</a></p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Software Prototyping\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Proxy server</h2>\n<ul>\n<li>Glossary</li>\n<li>Proxy</li>\n<li>\n<h2>Server</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>proxy server</strong> is an intermediate program or computer used when navigating through different networks of the Internet. They facilitate access to content on the World Wide Web. A proxy intercepts requests and serves back responses; it may forward the requests, or not (for example in the case of a cache), and it may modify it (for example changing its headers, at the boundary between two networks).</p>\n</blockquote>\n<p>A proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the Internet. In general there are two main types of proxy servers:</p>\n<ul>\n<li>A <strong>forward proxy</strong> that handles requests from and to anywhere on the Internet.</li>\n<li>A <strong>reverse proxy</strong> taking requests from the Internet and forwarding them to servers in an internal network.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling\">Proxy servers and tunneling</a></li>\n<li><a href=\"https://en.wikipedia.org/wiki/Proxy_server\">Proxy server</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Pseudo-class</h2>\n<ul>\n<li>CSS</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Selector</h2>\n</li>\n</ul>\n<blockquote>\n<p>In CSS, a <strong>pseudo-class</strong> selector targets elements depending on their state rather than on information from the document tree. For example, the selector <code>a</code>_ cssxref(\":visited\") }} applies styles only to links that the user has already followed.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Pseudo-classes\">Pseudo-class documentation</a></li>\n</ul>\n<hr>\n<h2>Term:  Pseudo-element</h2>\n<ul>\n<li>CSS</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>In CSS, a <strong>pseudo-element</strong> selector applies styles to parts of your document content in scenarios where there isn't a specific HTML element to select. For example, rather than putting the first letter of each paragraph in its own element, you can style them all with <code>p</code>_ Cssxref(\"::first-letter\") }}.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/Pseudo-elements\">Pseudo-elements</a></li>\n</ul>\n<hr>\n<h2>Term:  Pseudocode</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Pseudocode</h2>\n</li>\n</ul>\n<blockquote>\n<p>Pseudocode refers to code-like syntax that is generally used to indicate to humans how some code syntax works, or illustrate the design of an item of code architecture. It <strong>won't</strong> work if you try to run it as code.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Pseudocode\", \"Pseudocode\"</em>) on Wikipedia.</li>\n</ul>\n<hr>\n<h2>Term:  Public-key cryptography</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Public-key cryptography</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>Public-key cryptography — or <em>asymmetric cryptography</em> — is a cryptographic system in which keys come in pairs. The transformation performed by one of the keys can only be undone with the other key. One key (the <em>private key</em>) is kept secret while the other is made public.</p>\n</blockquote>\n<p>When used for digital signatures, the private key is used to sign and the public key to verify. This means that anyone can verify a signature, but only the owner of the corresponding private key could have generated it.</p>\n<p>When used for encryption, the public key is used to encrypt and the private key is used to decrypt. This gives public-key encryption systems an advantage over symmetric encryption systems in that the encryption key can be made public. Anyone could encrypt a message to the owner of the private key, but only the owner of the private key could decrypt it. However, they are typically much slower than symmetric algorithms and the size of message they can encrypt is proportional to the size of the key, so they do not scale well for long messages.</p>\n<p>As a result, it's common for an encryption system to use a symmetric algorithm to encrypt the message, then a public-key system to encrypt the symmetric key. This arrangement can confer the benefits of both systems.</p>\n<p>Commonly used public-key cryptosystems are RSA (for both signing and encryption), DSA (for signing) and Diffie-Hellman (for key agreement).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Web_Crypto_API\">Web Crypto API</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Symmetric-key cryptography\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Python</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Language</li>\n<li>Python</li>\n<li>\n<h2>programming</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Python</strong> is a high level general-purpose programming language. It uses a multi-paradigm approach, meaning it supports procedural, object-oriented, and some functional programming constructs.</p>\n</blockquote>\n<p>It was created by Guido van Rossum as a successor to another language (called ABC) between 1985 and 1990, and is currently used on a large array of domains like web development, desktop applications, data science, DevOps, and automation/productivity.</p>\n<p>Python is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Python's license is administered by the <a href=\"https://www.python.org/psf\">Python Software Foundation</a>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki('wikipedia','Python (programming language)','Python'</em>) on Wikipedia</li>\n<li><a href=\"https://docs.python.org/3/tutorial/index.html\">Official Python docs tutorials</a></li>\n<li><a href=\"https://www.tutorialspoint.com/python/index.htm\">Tutorials Point Python tutorial</a></li>\n<li><a href=\"https://www.alphacodingskills.com/python/python-tutorial.php\">AlphaCodingSkills Python Tutorial</a></li>\n<li><a href=\"/en-US/docs/Learn/Server-side/Django\">Django Web Framework (Python)</a> on MDN</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Java\"</em>)</li>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"PHP\"</em>)</li>\n<li><em>Glossary(\"Python\"</em>)</li>\n<li><em>Glossary(\"Ruby\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Quality values</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Quality values</strong>, or <em>q-values</em> and <em>q-factors</em>, are used to describe the order of priority of values in a comma-separated list. It is a special syntax allowed in some <a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP headers</a> and in HTML.</p>\n</blockquote>\n<p>The importance of a value is marked by the suffix <code>';q='</code> immediately followed by a value between <code>0</code> and <code>1</code> included, with up to three decimal digits, the highest value denoting the highest priority. When not present, the default value is <code>1</code>.</p>\n<h2>Examples</h2>\n<p>The following syntax</p>\n<pre><code class=\"language-plain\">text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n</code></pre>\n<p>indicates the order of priority:</p>\n<table>\n<thead>\n<tr>\n<th>Value</th>\n<th>Priority</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>text/html</code> and <code>application/xhtml+xml</code></td>\n<td><code>1.0</code></td>\n</tr>\n<tr>\n<td><code>application/xml</code></td>\n<td><code>0.9</code></td>\n</tr>\n<tr>\n<td><code>*/*</code></td>\n<td><code>0.8</code></td>\n</tr>\n</tbody>\n</table>\n<p>If there is no priority defined for the first two values, the order in the list is irrelevant. Nevertheless, with the same quality, more specific values have priority over less specific ones:</p>\n<pre><code class=\"language-plain\">text/html;q=0.8,text/*;q=0.8,*/*;q=0.8\n</code></pre>\n<table>\n<thead>\n<tr>\n<th>Value</th>\n<th>Priority</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>text/html</code></td>\n<td><code>0.8</code> (but totally specified)</td>\n</tr>\n<tr>\n<td><code>text/*</code></td>\n<td><code>0.8</code> (partially specified)</td>\n</tr>\n<tr>\n<td><code>*/*</code></td>\n<td><code>0.8</code> (not specified)</td>\n</tr>\n</tbody>\n</table>\n<p>Some syntax, like the one of <em>HTTPHeader(\"Accept\"</em>), allow additional specifiers like <code>text/html;level=1</code>. These increase the specificity of the value. Their use is extremely rare.</p>\n<h2>Browser-specific information</h2>\n<h3>Firefox</h3>\n<p>Starting with Firefox 18, the quality factor values are clamped to 2 decimal places. They used to be clamped to only 1 decimal place in earlier versions (<em>bug(672448</em>)).</p>\n<h2>More information</h2>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">HTTP headers</a> using q-values in their syntax: <em>HTTPHeader(\"Accept\"</em>), <em>HTTPHeader(\"Accept-Language\"</em>), <em>HTTPHeader(\"TE\"</em>).</li>\n<li><a href=\"https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html\">Header field definitions.</a></li>\n</ul>\n<hr>\n<h2>Term:  Quaternion</h2>\n<ul>\n<li>Definition</li>\n<li>Glossary</li>\n<li>Orientation</li>\n<li>Quaternion</li>\n<li>WebXR</li>\n<li>\n<h2>rotation</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>quaternion</strong> is the quotient of two 3D vectors and is used in 3D graphics and in accelerometer-based sensors to represent orientation or rotational data.</p>\n</blockquote>\n<p>While mathematical quaternions are more involved than this, the <strong>unit quaternions</strong> (or <strong>rotational quaternions</strong>) used to represent rotation while using <a href=\"/en-US/docs/Glossary/WebGL\">WebGL</a> or <a href=\"/en-US/docs/Web/API/WebXR_Device_API\">WebXR</a>, for example, are represented using the same syntax as a 3D point. As such, the type <em>domxref(\"DOMPoint\"</em>) (or <em>domxref(\"DOMPointReadOnly\"</em>)) is used to store quaternions.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Quaternions and spatial rotation\"</em>) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Quaternion\"</em>) on Wikipedia</li>\n<li><em>domxref(\"XRRigidTransform.orientation\"</em>) in the WebXR Device API reference</li>\n</ul>\n<hr>\n<h2>Term:  QUIC</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>QUIC</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Quick UDP Internet Connection</strong>, or <strong>QUIC</strong>, is an experimental multiplexed transport protocol implemented on UDP. It was developed by Google as a way to experiment with ways to improve TCP and web application delivery.</p>\n</blockquote>\n<p>As TCP is built into the kernel of many operating systems being able to experiment with changes, test them and implement modifications is an extremely slow process. The creation of QUIC allows developers to conduct experiments and try new things faster.</p>\n<p>QUIC was designed to support the semantics of HTTP/2. It provides multiplexing, flow control, security and congestion control.</p>\n<p>Key features of QUIC include:</p>\n<ul>\n<li>Reduction in connection establishment time.</li>\n<li>Improved congestion control.</li>\n<li>Multiplexing without head-of-line blocking.</li>\n<li>Forward error correction.</li>\n<li>Connection migration.</li>\n</ul>\n<p>There is limited browser and server support for QUIC today.</p>\n<h3>Resources</h3>\n<ul>\n<li><a href=\"https://www.chromium.org/quic\">Chromium Projects Documentation</a></li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/draft-tsvwg-quic-protocol-02\">IETF Draft</a></li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/HTTP_2\">HTTP/2</a></li>\n</ul>\n<hr>\n<h2>Term:  RAIL</h2>\n<ul>\n<li>Glossary</li>\n<li>RAIL</li>\n<li>Timings</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>RAIL</strong>, an acronym for <strong>Response, Animation, Idle, and Load</strong>, is a performance model originated by the Google Chrome team in 2015, focused on user experience and performance within the browser. The performance mantra of RAIL is \"Focus on the user; the end goal isn't to make your site perform fast on any specific device, it's to make users happy.\" There are 4 stages of interaction: page load, idle, response to input, and scrolling and animation. In acronym order, the main tenets are:</p>\n</blockquote>\n<ul>\n<li>\n<p><strong>Response</strong></p>\n<ul>\n<li>: Respond to users immediately, acknowledging any user input in <strong>100ms</strong> or less.</li>\n</ul>\n</li>\n<li>\n<p><strong>Animation</strong></p>\n<ul>\n<li>: When animating, render each frame in under <strong>16ms</strong>, aiming for consistency and avoiding jank.</li>\n</ul>\n</li>\n<li>\n<p><strong>Idle</strong></p>\n<ul>\n<li>: When using the main JavaScript thread, work in chunks for less than <strong>50ms</strong> to free up the thread for user interactions.</li>\n</ul>\n</li>\n<li>\n<p><strong>Load</strong></p>\n<ul>\n<li>: Deliver interactive content in less than <strong>1 second</strong>.</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/How_long_is_too_long\">Recommended Web Performance Timings: How long is too long</a></li>\n</ul>\n<hr>\n<h2>Term:  Raster image</h2>\n<ul>\n<li>CUR</li>\n<li>Documents</li>\n<li>Glossary</li>\n<li>ICO</li>\n<li>JPEG</li>\n<li>PNG</li>\n<li>gif</li>\n<li>\n<h2>raster image</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong><em>raster image</em></strong> is an image file defined as a grid of pixels. They’re also referred to as <em>bitmaps</em>. Common raster image formats on the Web are <a href=\"/en-US/docs/Glossary/jpeg\">JPEG</a>, <a href=\"/en-US/docs/Glossary/PNG\">PNG</a>, <a href=\"/en-US/docs/Glossary/gif\">GIF</a>, and <a href=\"https://en.wikipedia.org/wiki/ICO_(file_format)\">ICO</a>.</p>\n</blockquote>\n<p>Raster image files usually contain one set of dimensions, but the ICO and CUR formats, used for favicons and <a href=\"/en-US/docs/Web/CSS/cursor\">CSS cursor images</a>, can contain multiple sizes.</p>\n<h4>See also</h4>\n<ul>\n<li><em>glossary(\"Vector images\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  RDF</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>OpenPractices</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>RDF</strong> (Resource Description Framework) is a language developed by W3C for representing information on the World Wide Web, such as Webpages. RDF provides a standard way of encoding resource information so that it can be exchanged in a fully automated way between applications.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Resource Description Framework\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Real User Monitoring (RUM)</h2>\n<ul>\n<li>Glossary</li>\n<li>RUM</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Real User Monitoring</strong> or RUM measures the performance of a page from real users' machines. Generally, a third party script injects a script on each page to measure and report page load data for every request made. This technique monitors an application’s actual user interactions. In RUM, the third party script collects performance metrics from the real users' browsers. RUM helps identify how an application is being used, including the geographic distribution of users and the impact of that distribution on the end user experience.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/Rum-vs-Synthetic\">Real User Monitoring (RUM) versus Synthetic Monitoring</a></li>\n<li><a href=\"/en-US/docs/Glossary/Synthetic_monitoring\">Synthetic Monitoring</a></li>\n<li><a href=\"/en-US/docs/Glossary/beacon\">Beacon</a></li>\n</ul>\n<hr>\n<h2>Term:  Recursion</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The act of a function calling itself, recursion is used to solve problems that contain smaller sub-problems. A recursive function can receive two inputs: a base case (ends recursion) or a recursive case (resumes recursion).</p>\n</blockquote>\n<h2>Examples</h2>\n<h3>Recursive function calls itself until condition met</h3>\n<p>The following Python code defines a function that takes a number, prints it, and then calls itself again with the number's value -1. It keeps going until the number is equal to 0, in which case it stops.</p>\n<pre><code class=\"language-js\">def recurse(x):\n   if x > 0:\n       print(x)\n       recurse(x - 1)\n\nrecurse(10)\n</code></pre>\n<p>The output will look like this:</p>\n<p>10\n9\n8\n7\n6\n5\n4\n3\n2\n1</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Recursion (computer science)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Functions#recursion\">More details about recursion in JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  Reference</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>In the context of <strong><em>glossary(\"object\",\"objects\"</em>)</strong>, this is an <strong><em>glossary(\"object reference\"</em>)</strong>. On MDN, we could be talking about the <em>glossary(\"JavaScript\"</em>) reference itself.</p>\n</blockquote>\n<p>In computing, a reference is a value that indirectly accesses data to retrieve a variable or a record in a computer's memory or other storage device.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Reference (computer science)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Reflow</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Reflow</strong> happens when a <em>glossary(\"browser\"</em>) must process and draw part or all of a webpage again, such as after an update on an interactive site.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://developers.google.com/speed/articles/reflow\">Google article \"Minimizing browser reflow\"</a></li>\n</ul>\n<hr>\n<h2>Term:  Regular expression</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Regular Expression</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Regular expressions</strong> (or <em>regex</em>) are rules that govern which sequences of characters come up in a search.</p>\n</blockquote>\n<p>Regular expressions are implemented in various languages, but the best-known implementation is the Perl Implementation, which has given rise to its own ecosystem of implementations called PCRE (<em>Perl Compatible Regular Expression</em>). On the Web, <em>glossary(\"JavaScript\"</em>) provides another regex implementation through the <em>jsxref(\"RegExp\"</em>) object.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Regular expressions\"</em>) on Wikipedia</li>\n<li><a href=\"https://regexone.com/\">Interactive tutorial</a></li>\n<li><a href=\"https://regexper.com/\">Visualized Regular Expression</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\">Writing regular expressions in JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  Rendering engine</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Rendering engine</li>\n<li>\n<h2>Web browser engine</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>rendering engine</strong> is software that draws text and images on the screen. The engine draws structured text from a document (often <em>glossary(\"HTML\"</em>)), and formats it properly based on the given style declarations (often given in <em>glossary(\"CSS\"</em>)). Examples of layout engines: <em>glossary(\"Blink\"</em>), <em>glossary(\"Gecko\"</em>), EdgeHTML, <em>glossary(\"WebKit\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Web browser engine\"</em>) on Wikipedia</li>\n<li><a href=\"https://medium.com/@ramsunvtech/behind-browser-basics-part-1-b733e9f3c0e6\">Venkatraman.R - Behind Browsers (Part 1, Basics) </a></li>\n</ul>\n<hr>\n<h2>Term:  Repo</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Intro</li>\n<li>Repo</li>\n<li>\n<h2>Repository</h2>\n</li>\n</ul>\n<blockquote>\n<p>In a revision control system like <em>Glossary(\"Git\"</em>) or <em>Glossary(\"SVN\"</em>), a repo (i.e. \"repository\") is a place that hosts an application's code source, together with various metadata.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Repository_%28revision_control%29\">Repository</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Reporting directive</h2>\n<ul>\n<li>CSP</li>\n<li>HTTP</li>\n<li>Policy</li>\n<li>Reporting</li>\n<li>Security</li>\n<li>\n<h2>Violation</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong><em>Glossary(\"CSP\"</em>) reporting directives</strong> are used in a <em>HTTPHeader(\"Content-Security-Policy\"</em>) header and control the reporting process of CSP violations.</p>\n</blockquote>\n<p>See <a href=\"/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#reporting_directives\">Reporting directives</a> for a complete list.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"CSP\"</em>)</li>\n<li><em>Glossary(\"Fetch directive\"</em>)</li>\n<li><em>Glossary(\"Document directive\"</em>)</li>\n<li><em>Glossary(\"Navigation directive\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Reference</p>\n<ul>\n<li><a href=\"https://www.w3.org/TR/CSP/#directives-reporting\">https://www.w3.org/TR/CSP/#directives-reporting</a></li>\n<li><em>HTTPHeader(\"Content-Security-Policy/upgrade-insecure-requests\", \"upgrade-insecure-requests\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Security-Policy/block-all-mixed-content\", \"block-all-mixed-content\"</em>)</li>\n<li><em>HTTPHeader(\"Content-Security-Policy/require-sri-for\", \"require-sri-for\"</em>) <em>deprecated</em>inline}}</li>\n<li><em>HTTPHeader(\"Content-Security-Policy\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Representation header</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>representation header</strong> is an <em>glossary(\"HTTP</em>header\", \"HTTP header\"<em>) that describes the particular _representation</em> of the resource sent in an HTTP message body.</p>\n</blockquote>\n<p>Representations are different forms of a particular resource.\nFor example, the same data might be formatted as a particular media type such as XML or JSON, localised to a particular written language or geographical region, and/or compressed or otherwise encoded for transmission.\nThe underlying resource is the same in each case, but its representation is different.</p>\n<p>Clients specify the formats that they prefer to be sent during <a href=\"/en-US/docs/Web/HTTP/Content_negotiation\">content negotiation</a> (using <code>Accept-*</code> headers), and the representation headers tell the client the format of the <em>selected representation</em> they actually received.</p>\n<p>Representation headers may be present in both HTTP request and response messages.\nIf sent as a response to a <code>HEAD</code> request, they describe the body content that <em>would</em> be selected if the resource was actually requested.</p>\n<p>Representation headers include: <em>HTTPHeader(\"Content-Type\"</em>), <em>HTTPHeader(\"Content-Encoding\"</em>), <em>HTTPHeader(\"Content-Language\"</em>), and <em>HTTPHeader(\"Content-Location\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc7231#section-3\">RFC 7231, section 3: Representations</a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">List of all HTTP headers</a></li>\n<li><em>Glossary(\"Payload header\"</em>)</li>\n<li><em>glossary(\"Entity header\"</em>)</li>\n<li><em>HTTPHeader(\"Digest\"</em>)/ <em>HTTPHeader(\"Want-Digest\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Request header</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>request header</strong> is an <em>glossary(\"HTTP header\"</em>) that can be used in an HTTP request to provide information about the request context, so that the server can tailor the response. For example, the <em>HTTPHeader(\"Accept\", \"Accept-*\"</em>) headers indicate the allowed and preferred formats of the response. Other headers can be used to supply authentication credentials (e.g.  <em>HTTPHeader(\"Authorization\"</em>)), to control caching, or to get information about the user agent or referrer, etc.</p>\n</blockquote>\n<p>Not all headers that can appear in a request are referred to as <em>request headers</em> by the specification. For example, the <em>HTTPHeader(\"Content-Type\"</em>) header is referred to as a <em>glossary(\"representation header\"</em>).</p>\n<p>In addition, <a href=\"/en-US/docs/Glossary/CORS\">CORS</a> defines a subset of request headers as <em>glossary('simple header', 'simple headers'</em>), request headers that are always considered authorized and are not explicitly listed in responses to <em>glossary(\"preflight request\", \"preflight\"</em>) requests.</p>\n<p>The HTTP message below shows a few request headers after a <em>HTTPMethod(\"GET\"</em>) request:</p>\n<pre><code class=\"language-bash\">GET /home.html HTTP/1.1\nHost: developer.mozilla.org\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate, br\nReferer: https://developer.mozilla.org/testpage.html\nConnection: keep-alive\nUpgrade-Insecure-Requests: 1\nIf-Modified-Since: Mon, 18 Jul 2016 02:36:04 GMT\nIf-None-Match: \"c561c68d0ba92bbeb8b0fff2a9199f722e3a621a\"\nCache-Control: max-age=0\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">List of all HTTP headers</a></li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc7231#section-5\">RFC 7231, section 5: Request header fields</a></li>\n</ul>\n<hr>\n<h2>Term:  Resource Timing</h2>\n<ul>\n<li>Glossary</li>\n<li>Timings</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>Diagnosing performance issues requires performance data at the granularity of the resource. The <a href=\"/en-US/docs/Web/API/Resource_Timing_API\">Resource Timing API</a> is a JavaScript API that is able to capture timing information for each individual resource that is fetched when a page is loaded.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API\">Using the resource timing API</a></li>\n<li><a href=\"https://www.w3.org/TR/server-timing/\">Server Timing</a></li>\n</ul>\n<hr>\n<h2>Term:  Response header</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>response header</strong> is an <em>glossary(\"HTTP header\"</em>) that can be used in an HTTP response and that doesn't relate to the content of the message. Response headers, like <em>HTTPHeader(\"Age\"</em>), <em>HTTPHeader(\"Location\"</em>) or <em>HTTPHeader(\"Server\"</em>) are used to give a more detailed context of the response.</p>\n</blockquote>\n<p>Not all headers appearing in a response are categorized as <em>response headers</em> by the specification. For example, the <em>HTTPHeader(\"Content-Type\"</em>) header is a <em>glossary(\"representation header\"</em>) indicating the original type of data in the body of the response message (prior to the encoding in the <em>HTTPHeader(\"Content-Encoding\"</em>) representation header being applied). However, \"conversationally\" all headers are usually referred to as response headers in a response message.</p>\n<p>The following shows a few response and representation headers after a <em>HTTPMethod(\"GET\"</em>) request.</p>\n<pre><code class=\"language-plain\">200 OK\nAccess-Control-Allow-Origin: *\nConnection: Keep-Alive\nContent-Encoding: gzip\nContent-Type: text/html; charset=utf-8\nDate: Mon, 18 Jul 2016 16:06:00 GMT\nEtag: \"c561c68d0ba92bbeb8b0f612a9199f722e3a621a\"\nKeep-Alive: timeout=5, max=997\nLast-Modified: Mon, 18 Jul 2016 02:36:04 GMT\nServer: Apache\nSet-Cookie: mykey=myvalue; expires=Mon, 17-Jul-2017 16:06:00 GMT; Max-Age=31449600; Path=/; secure\nTransfer-Encoding: chunked\nVary: Cookie, Accept-Encoding\nX-Backend-Server: developer2.webapp.scl3.mozilla.com\nX-Cache-Info: not cacheable; meta data too large\nX-kuma-revision: 1085259\nx-frame-options: DENY\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Headers\">List of all HTTP headers</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Representation header\"</em>)</li>\n<li><em>Glossary(\"HTTP header\"</em>)</li>\n<li><em>Glossary(\"Response header\"</em>)</li>\n<li><em>Glossary(\"Fetch metadata response header\"</em>)</li>\n<li><em>Glossary(\"Request header\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Responsive web design</h2>\n<ul>\n<li>Accessibility</li>\n<li>Design</li>\n<li>Glossary</li>\n<li>\n<h2>Responsive web design</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Responsive Web Design</em> (<strong>RWD</strong>) is a Web development concept focusing on making sites look and behave optimally on all personal computing devices, from desktop to mobile.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Progressive_web_apps\">Summary and resources</a></li>\n<li><a href=\"/en-US/docs/Web/Progressive_web_apps\">Pros and cons of going responsive</a></li>\n<li><a href=\"https://msdn.microsoft.com/en-us/magazine/hh653584.aspx\">Responsive Web Design</a></li>\n</ul>\n<hr>\n<h2>Term:  REST</h2>\n<ul>\n<li>Architecture</li>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Rest</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>REST</strong> (Representational State Transfer) refers to a group of software architecture design constraints that bring about efficient, reliable and scalable distributed systems.</p>\n</blockquote>\n<p>The basic idea of REST is that a resource, e.g. a document, is transferred via well-recognized, language-agnostic, and reliably standardized client/server interactions. Services are deemed RESTful when they adhere to these constraints.</p>\n<p>HTTP APIs in general are sometimes colloquially referred to as RESTful APIs, RESTful services, or REST services, although they don't necessarily adhere to all REST constraints. Beginners can assume a REST API means an HTTP service that can be called using standard web libraries and tools.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.restapitutorial.com/\">restapitutorial.com</a></li>\n<li><a href=\"https://restcookbook.com/\">restcookbook.com</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Representational</em>state<em>transfer\", \"REST\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.service-architecture.com/articles/web-services/representational_state_transfer_rest.html\">REST Architecture</a></li>\n</ul>\n<hr>\n<h2>Term:  RGB</h2>\n<ul>\n<li>Beginner</li>\n<li>CSS</li>\n<li>Design</li>\n<li>\n<h2>Guide</h2>\n</li>\n</ul>\n<blockquote>\n<p>Red Green Blue (RGB) is a color model that represents colors as mixtures of three underlying components (or channels), namely, red, green, and blue. Each color is described by a sequence of three numbers (typically between 0.0 and 1.0, or between 0 and 255) that represent the different intensities (or contributions) of red, green, and blue, in determining the final color.</p>\n</blockquote>\n<p>There are many ways to describe the RGB components of a color. In <em>Glossary(\"CSS\"</em>) they can be represented as a single 24-bit integer in hexadecimal notation (for example, <code>#``add</code>8e6 is light blue), or in functional notation as three separate 8-bit integers (for example, rgb(46, 139, 87) is sea green). In <em>Glossary(\"OpenGL\"</em>), <em>Glossary(\"WebGL\"</em>), and <em>Glossary(\"GLSL\"</em>) the red-green-blue components are fractions (floating-point numbers between  0.0  and 1.0), although in the actual color buffer they are typically stored as 8-bit integers. Graphically, a color can be represented as a point in a three-dimensional grid or cube, where each dimension (or axis) corresponds to a different channel.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/RGB_color_model\">RGB color model on Wikipedia</a></li>\n<li><a href=\"/en-US/docs/Web/CSS/color_value\">CSS data type: &#x3C;color></a></li>\n</ul>\n<hr>\n<h2>Term:  RIL</h2>\n<ul>\n<li>B2G</li>\n<li>Firefox OS</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Intro</li>\n<li>Mobile</li>\n<li>\n<h2>Telephony</h2>\n</li>\n</ul>\n<blockquote>\n<p>RIL (Radio Interface Layer) is a mobile operating system component which communicates between the device's software and the device's phone, radio, or modem hardware.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Radio Interface Layer\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Random Number Generator</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>PRNG</strong> (pseudorandom number generator) is an algorithm that outputs numbers in a complex, seemingly unpredictable pattern. Truly random numbers (say, from a radioactive source) are utterly unpredictable, whereas all algorithms are predictable, and a PRNG returns the same numbers when passed the same starting parameters or <em>seed</em>.</p>\n</blockquote>\n<p>PRNGs can be used for a variety of applications, such as games.</p>\n<p>A cryptographically secure PRNG is a PRNG with certain extra properties making it suitable for use in cryptography. These include:</p>\n<ul>\n<li>that it's computationally unfeasible for an attacker (without knowledge of the seed) to predict its output</li>\n<li>that if an attacker can work out its current state, this should not enable the attacker to work out previously emitted numbers.</li>\n</ul>\n<p>Most PRNGs are not cryptographically secure.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Pseudorandom number generator\"</em>) on Wikipedia</li>\n<li><em>jsxref(\"Math.random()\"</em>), a built-in JavaScript PRNG function. Note that this is not a cryptographically secure PRNG.</li>\n<li><em>domxref(\"Crypto.getRandomValues()\"</em>): this is intended to provide cryptographically secure numbers.</li>\n</ul>\n<hr>\n<h2>Term:  Robots.txt</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>Robots.txt is a file which is usually placed in the root of any website. It decides whether <em>Glossary(\"crawler\", \"crawlers\"</em>) are permitted or forbidden access to the web site.</p>\n</blockquote>\n<p>For example, the site admin can forbid crawlers to visit a certain folder (and all the files therein contained) or to crawl a specific file, usually to prevent those files being indexed by other search engines.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Robots.txt\"</em>) on Wikipedia</li>\n<li><a href=\"https://developers.google.com/search/reference/robots_txt\">https://developers.google.com/search/reference/robots_txt</a></li>\n<li>Standard specification draft: <a href=\"https://datatracker.ietf.org/doc/html/draft-rep-wg-topic-00\">https://datatracker.ietf.org/doc/html/draft-rep-wg-topic</a></li>\n<li><a href=\"https://www.robotstxt.org/\">https://www.robotstxt.org/</a></li>\n</ul>\n<hr>\n<h2>Term:  Round Trip Time (RTT)</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>Performance</li>\n<li>Resource</li>\n<li>Round Trip Time</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Round Trip Time (RTT)</strong> is the length time it takes for a data packet to be sent to a destination plus the time it takes for an acknowledgment of that packet to be received back at the origin. The RTT between a network and server can be determined by using the <code>ping</code> command.</p>\n</blockquote>\n<pre><code class=\"language-bash\">$ ping example.com\nPING example.com (216.58.194.174): 56 data bytes\n64 bytes from 216.58.194.174: icmp_seq=0 ttl=55 time=25.050 ms\n64 bytes from 216.58.194.174: icmp_seq=1 ttl=55 time=23.781 ms\n64 bytes from 216.58.194.174: icmp_seq=2 ttl=55 time=24.287 ms\n64 bytes from 216.58.194.174: icmp_seq=3 ttl=55 time=34.904 ms\n64 bytes from 216.58.194.174: icmp_seq=4 ttl=55 time=26.119 ms\n--- google.com ping statistics ---\n5 packets transmitted, 5 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 23.781/26.828/34.904/4.114 ms\n</code></pre>\n<p>In the above example, the average round trip time is shown on the final line as 26.8ms.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/time_to_first_byte\">Time to First Byte (TTFB)</a></li>\n<li><a href=\"/en-US/docs/Glossary/Latency\">Latency</a></li>\n</ul>\n<hr>\n<h2>Term:  Routers</h2>\n<ul>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p>There are three definitions for <strong>routers</strong> on the web:</p>\n</blockquote>\n<ol>\n<li>For the network layer, the router is a networking device that decides data <em>Glossary('Packet'</em>)s directions. They are distributed by retailers allowing user interaction to the internet.</li>\n<li>For a <em>Glossary('SPA', 'Single-page application' _) in the application layer, a router is a library that decides what web page is presented by a given _Glossary('URL'</em>). This middleware module is used for all URL functions, as these are given a path to a file that is rendered to open the next page.</li>\n<li>In the implementation of an <em>Glossary('API'</em>) in a service layer, a router is a software component that parses a request and directs or routes the request to various handlers within a program. The router code usually accepts a response from the handler and facilitates its return to the requester.</li>\n</ol>\n<h4>See also</h4>\n<p>For network layer context:</p>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Router (computing)\"</em>) on Wikipedia</li>\n</ul>\n<p>For SPA in application layer context, most of the popular SPA frameworks has its routing library:</p>\n<ul>\n<li><a href=\"https://angular.io/guide/router\">Angular router</a></li>\n<li><a href=\"https://reacttraining.com/react-router\">React router</a></li>\n<li><a href=\"https://router.vuejs.org\">Vue router</a></li>\n</ul>\n<hr>\n<h2>Term:  RSS</h2>\n<ul>\n<li>Glossary</li>\n<li>OpenPractices</li>\n<li>RSS</li>\n<li>Sharing</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>RSS</strong> (Really Simple Syndication) refers to several XML document formats designed for publishing site updates. When you subscribe to a website's RSS feed, the website sends information and updates to your RSS reader in an RSS document called a <em>feed</em>, so you don't need to check all your favorite websites manually.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"RSS\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.rssboard.org/rss-specification\">Latest specification</a></li>\n</ul>\n<hr>\n<h2>Term:  Rsync</h2>\n<hr>\n<blockquote>\n<p><a href=\"https://rsync.samba.org/\">Rsync</a> is an open-source file synchronizing tool that provides incremental file transfer It can be used over insecure and secure transports (like SSH).  It is available on most Unix-based systems (such as macOS and Linux) and Windows. There are also GUI-based tools that use rsync, for example, <a href=\"https://acrosync.com/mac.html\">Acrosync</a>.</p>\n</blockquote>\n<p>A basic command looks like this:</p>\n<pre><code class=\"language-bash\">rsync [-options] SOURCE user@x.x.x.x:DESTINATION\n</code></pre>\n<ul>\n<li><code>-options</code> is a dash followed by one or more letters, for example <code>-v</code> for verbose error messages, and <code>-b</code> to make backups. See the full list of options at the <a href=\"https://linux.die.net/man/1/rsync\">rsync man page.</a> (Search for \"Options summary.\")</li>\n<li><code>SOURCE</code> is the path to the local file or directory that you want to copy or synchronize</li>\n<li><code>user@</code> is the credentials of the user on the remote server you want to copy files over to.</li>\n<li><code>x.x.x.x</code> is the IP address of the remote server.</li>\n<li><code>DESTINATION</code> is the path to the location you want to copy your directory or files to on the remote server.</li>\n</ul>\n<p>You can also make a connection over SSH using the <code>-e</code> option as shown:</p>\n<pre><code class=\"language-bash\">rsync [-options] -e \"ssh [SSH DETAILS GO HERE]\" SOURCE user@x.x.x.x:DESTINATION\n</code></pre>\n<p>There are numerous examples on the Internet, including those at the <a href=\"https://rsync.samba.org/examples.html\">official website</a>, and at the <a href=\"https://en.wikipedia.org/wiki/Rsync#Examples\">Wikipedia entry</a> for rsync.</p>\n<hr>\n<h2>Term:  RTCP (RTP Control Protocol)</h2>\n<ul>\n<li>Glossary</li>\n<li>Media</li>\n<li>Networking</li>\n<li>Protocol</li>\n<li>RTCP</li>\n<li>\n<h2>control</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>RTP Control Protocol</strong> (<strong>RTCP</strong>) is a partner to the <em>Glossary(\"RTP\"</em>) protocol. RTCP is used to provide control and statistical information about an RTP media streaming session.</p>\n</blockquote>\n<p>This lets control and statistics packets be separated logically and functionally from the media streaming while using the underlying packet delivery layer to transmit the RTCP signals as well as the RTP and media contents.</p>\n<p>RTCP periodically transmits control packets to all of an RTP session's participants, using the same mechanism that is being used to transmit the data packets. That underlying protocol handles the multiplexing of the data and control packets and may use separate network ports for each type of packet.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Intro_to_RTP\">Introduction to the Real-time Transport Protocol</a></li>\n<li><em>interwiki(\"wikipedia\", \"RTP Control Protocol\"</em>)</li>\n<li><em>RFC(3550, 6, \"RFC 3550 Section 6\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  RTF</h2>\n<ul>\n<li>Composing</li>\n<li>Format</li>\n<li>Glossary</li>\n<li>RTF</li>\n<li>\n<h2>Rich Text Format</h2>\n</li>\n</ul>\n<blockquote>\n<p>RTF (Rich Text Format) is a plain-text-based file format with support for formatting instructions (like bold or italic).</p>\n</blockquote>\n<p>Three programmers in the Microsoft Word team created RTF in the 1980s, and Microsoft continued to develop the format until 2008. However, many word-processing programs can still read and write RTF.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Rich Text Format\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.microsoft.com/en-us/download/details.aspx?id=10725\">final specification from Microsoft</a></li>\n</ul>\n<hr>\n<h2>Term:  RTL (Right to Left)</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>\n<h2>Localization</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>RTL</strong> (<strong>Right To Left</strong>) is a <em>Glossary(\"locale\"</em>) property indicating that text is written from right to left.</p>\n</blockquote>\n<p>For example, the <code>he</code> locale (for Hebrew) specifies right-to-left. Arabic (<code>ar</code>) is another common language written RTL.</p>\n<p>The opposite of RTL, LTR (Left To Right) is used in other languages, including English (<code>en</code>, <code>en-US</code>, <code>en-GB</code>, etc.), Spanish (<code>es</code>), and French (<code>fr</code>).</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Localization\"</em>)</li>\n<li><em>Glossary(\"LTR\", \"LTR (Left to Right)\"</em>)</li>\n<li><em>Glossary(\"RTL\", \"RTL (Right to Left)\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  RTP (Real-time Transport Protocol) and SRTP (Secure RTP)</h2>\n<ul>\n<li>Glossary</li>\n<li>Network</li>\n<li>Protocol</li>\n<li>\n<h2>RTP</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>Real-time Transport Protocol</strong> (<strong>RTP</strong>) is a network protocol which described how to transmit various media (audio, video) from one endpoint to another in a real-time fashion. RTP is suitable for video-streaming application, telephony over <em>glossary(\"IP\"</em>) like Skype and conference technologies.</p>\n</blockquote>\n<p>The secure version of RTP, <strong>SRTP</strong>, is used by <a href=\"/en-US/docs/Web/API/WebRTC_API\">WebRTC</a>, and uses encryption and authentication to minimize the risk of denial-of-service attacks and security breaches.</p>\n<p>RTP is rarely used alone; instead, it is used in conjunction with other protocols like <em>glossary(\"RTSP\"</em>) and <em>glossary(\"SDP\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Intro_to_RTP\">Introduction to the Real-time Transport Protocol</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Real-time</em>Transport<em>Protocol\",\"RTP\"</em>) on Wikipedia</li>\n<li><em>RFC(3550</em>) (one of the documents that specify precisely how the protocol works)</li>\n</ul>\n<hr>\n<h2>Term:  'RTSP: Real-time streaming protocol'</h2>\n<ul>\n<li>Glossary</li>\n<li>Real-time streaming protocol</li>\n<li>Reference</li>\n<li>\n<h2>rtsp</h2>\n</li>\n</ul>\n<blockquote>\n<p>Real-time streaming protocol (RTSP) is a network protocol that controls how the streaming of a media should occur between a <em>glossary(\"server\"</em>) and a <em>glossary(\"client\"</em>). Basically, RTSP is the protocol that describes what happens when you click \"Pause\"/\"Play\" when streaming a video. If your computer were a remote control and the streaming server a television, RTSP would describe how the instruction of the remote control affects the TV.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Real</em>Time<em>Streaming</em>Protocol\",\"RTSP\"_) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc7826\">RFC 7826</a> (one of the documents that specifies precisely how the protocol works)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"RTSP\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Ruby</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Ruby</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Ruby</strong> is an open-source programming language. In a <em>glossary(\"world wide web\",\"Web\"</em>) context, Ruby is often used server-side with the <em>Ruby On Rails</em> (ROR) framework to produce websites/apps.</p>\n</blockquote>\n<p>Ruby is also a method for annotating east Asian text in HTML documents to provide pronunciation information; see the <em>HTMLElement(\"ruby\"</em>) element.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Ruby_%28programming_language%29\">Ruby</a> on Wikipedia</li>\n<li><a href=\"https://www.ruby-lang.org\">Ruby's official web site</a></li>\n<li><a href=\"https://rubyonrails.org/\">Ruby On Rails' official web site</a></li>\n</ul>\n<hr>\n<h2>Term:  Safe</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Disambiguation</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>safe</strong> can have several meanings depending on the context. It may refer to:</p>\n</blockquote>\n<p>_GlossaryDisambiguation}}</p>\n<hr>\n<h2>Term:  Same-origin policy</h2>\n<ul>\n<li>Glossary</li>\n<li>Same-origin policy</li>\n<li>\n<h2>origin</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong><a href=\"/en-US/docs/Web/Security/Same-origin_policy\">same-origin policy</a></strong> is a critical security mechanism that restricts how a document or script loaded from one <em>Glossary(\"origin\"</em>) can interact with a resource from another origin.</p>\n</blockquote>\n<p>It helps isolate potentially malicious documents, reducing possible attack vectors.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Security/Same-origin_policy\">Same-origin policy</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a>:</p>\n<ul>\n<li><em>Glossary(\"CORS\"</em>)</li>\n<li><em>Glossary(\"origin\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  SCM</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>SCM</h2>\n</li>\n</ul>\n<blockquote>\n<p>SCM (Source Control Management) is a system for managing source code. Usually it refers to the use of software to handle versioning of source files. A programmer can modify source code files without being afraid of editing out useful stuff, because a SCM keeps track of how the source code has changed and who made the changes.</p>\n</blockquote>\n<p>Some SCM systems include CVS, SVN, GIT.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Revision control\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Scope</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>The current context of execution. The context in which <em>glossary(\"value\",\"values\"</em>) and <strong>expressions</strong> are \"visible\" or can be referenced. If a <strong><em>glossary(\"variable\"</em>)</strong> or other expression is not \"in the current scope,\" then it is unavailable for use. Scopes can also be layered in a hierarchy, so that child scopes have access to parent scopes, but not vice versa.</p>\n</blockquote>\n<p>A <strong><em>glossary(\"function\"</em>)</strong> serves as a <strong>closure</strong> in <em>glossary(\"JavaScript\"</em>), and thus creates a scope, so that (for example) a variable defined exclusively within the function cannot be accessed from outside the function or within other functions. For instance, the following is invalid:</p>\n<pre><code class=\"language-js\">function exampleFunction() {\n    var x = \"declared inside function\";  // x can only be used in exampleFunction\n    console.log(\"Inside function\");\n    console.log(x);\n}\n\nconsole.log(x);  // Causes error\n</code></pre>\n<p>However, the following code is valid due to the variable being declared outside the function, making it global:</p>\n<pre><code class=\"language-js\">var x = \"declared outside function\";\n\nexampleFunction();\n\nfunction exampleFunction() {\n    console.log(\"Inside function\");\n    console.log(x);\n}\n\nconsole.log(\"Outside function\");\nconsole.log(x);\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Scope (computer science)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Screen reader</h2>\n<ul>\n<li>Accessibility</li>\n<li>Glossary</li>\n<li>Screen reader</li>\n<li>Voice Over</li>\n<li>\n<h2>Voiceover</h2>\n</li>\n</ul>\n<blockquote>\n<p>Screen readers are software applications that attempt to convey what is seen on a screen display in a non-visual way, usually as text to speech, but also into braille or sound icons. Screen readers are essential to people who are blind, as well as useful to people who are visually impaired, illiterate, or have a learning disability. There are some browser extension screen readers, but most screen readers operate system-wide for all user applications, not just the browser.</p>\n</blockquote>\n<p>In terms of web accessibility, most user agents provide an accessibility object model and screen readers interact with dedicated accessibility APIs, using various operating system features and employing hooking techniques.</p>\n<h2>VoiceOver</h2>\n<p>macOS comes with VoiceOver, a built-in screen reader. To access VoiceOver, go to System Preferences > Accessibility > VoiceOver. You can also toggle VoiceOver on and off with fn+command + F5. VoiceOver both reads aloud and displays content. The content read aloud is displayed in a dark grey box.</p>\n<p>Desktop/laptop screen reader users navigate websites with a keyboard or other non-pointing device. The best way to emulate use is to do the same.</p>\n<p>Just like keyboard navigation without VoiceOver, you can navigate through interactive elements using the tab key and the arrow keys:</p>\n<ul>\n<li>Next interactive element: Tab</li>\n<li>Previous interactive element: Shift + Tab</li>\n<li>Next radio button in a same named-group: right or down arrow</li>\n<li>Previous radio button in a same named-group: left or up arrow</li>\n</ul>\n<p>Navigating through the content of a page is done with the tab key and a series of other keys along with Control + Option keys</p>\n<ul>\n<li>Next heading: Control + Option + H</li>\n<li>Next list: Control + Option + X</li>\n<li>Next graphic: Control + Option + G</li>\n<li>Next table: Control + Option + T</li>\n<li>Down an HTML hierarchical order Control + Option + right arrow</li>\n<li>Previous heading: Shift + Control + Option + H</li>\n<li>Previous list: Shift + Control + Option + X</li>\n<li>Previous graphic: Shift + Control + Option + G</li>\n<li>Previous table: Shift + Control + Option + T</li>\n<li>Up an HTML hierarchical order: Control + Option + left arrow</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Accessibility/ARIA\">ARIA</a></li>\n</ul>\n<hr>\n<h2>Term:  Script-supporting element</h2>\n<ul>\n<li>Glossary</li>\n<li>HTML</li>\n<li>HTML Content Categories</li>\n<li>\n<h2>scripts</h2>\n</li>\n</ul>\n<blockquote>\n<p>In an <em>Glossary(\"HTML\"</em>) document, <strong>script-supporting elements</strong> are those elements that don't directly contribute to the appearance or layout of the page; instead, they're either scripts or contain information that's only used by scripts.</p>\n</blockquote>\n<p>These elements may be important, but do not affect the displayed page unless the page's scripts explicitly cause them to do so.</p>\n<p>There are only two script-supporting elements: <em>HTMLElement(\"script\"</em>) and <em>HTMLElement(\"template\"</em>).</p>\n<h4>See also</h4>\n<p><em>SectionOnPage(\"/en-US/docs/Web/HTML/Kinds</em>of<em>HTML</em>content\", \"Script-supporting elements\"_)</p>\n<hr>\n<h2>Term:  Block (scripting)</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>glossary(\"JavaScript\"</em>), a block is a collection of related <em>glossary(\"statement\",\"statements\"</em>) enclosed in braces (\"{}\"). For example, you can put a block of statements after an <em>jsxref(\"Statements/if...else\",\"if (condition)\"</em>) block, indicating that the interpreter should run the code inside the block if the condition is true, or skip the whole block if the condition is false.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/block\">JavaScript block statement</a></li>\n</ul>\n<hr>\n<h2>Term:  Scroll container</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>scroll container</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>scroll container</strong> is created by applying <code>overflow: scroll</code> to a container, or <code>overflow: auto</code> when there is enough content to cause overflow.</p>\n</blockquote>\n<p>The scroll container allows the user to scroll through parts of the overflow region that would otherwise be clipped and hidden from view. The visible part of the scroll container is referred to as the <em>glossary(\"Scrollport\", \"scrollport\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a>:</p>\n<ul>\n<li><em>glossary(\"Scroll container\"</em>)</li>\n<li><em>glossary(\"Scrollport\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Related CSS Properties:</p>\n<ul>\n<li><em>cssxref(\"overflow\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Scrollport</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>scrollport</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>scrollport</strong> is the visual viewport of a <em>glossary(\"Scroll container\", \"scroll container\"</em>) in a document. A scroll container is created by applying <code>overflow: scroll</code> to a container, or <code>overflow: auto</code> when there is enough content to cause overflow. The scrollport coincides with the padding box of that container and represents the content that can be seen as the box is scrolled.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a>:</p>\n<ul>\n<li><em>glossary(\"Scroll container\"</em>)</li>\n<li><em>glossary(\"Scrollport\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Related CSS Properties:</p>\n<ul>\n<li><em>cssxref(\"overflow\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  SCTP</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>SCTP</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>SCTP</strong> (Stream Control Transmission <em>glossary(\"Protocol\"</em>)) is an <em>Glossary(\"IETF\"</em>) standard for a transport protocol which enables the reliable, in-order transmission of messages while offering congestion control, multi-homing, and other features to improve reliability and stability of the connection. It's used for sending traditional telephone calls over the Internet, but is also used for <em>Glossary(\"WebRTC\"</em>) data.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>RFC(4960, \"Stream Control Transmission Protocol\"</em>)</li>\n<li><em>Interwiki(\"wikipedia\", \"Stream Control Transmission Protocol\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  SDP</h2>\n<ul>\n<li>Advanced</li>\n<li>Collaborating</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Protocol</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>SDP</strong> (Session Description <em>glossary(\"Protocol\"</em>)) is the standard describing a <em>Glossary(\"P2P\",\"peer-to-peer\"</em>) connection. SDP contains the <em>Glossary(\"codec\"</em>), source address, and timing information of audio and video.</p>\n</blockquote>\n<p>Here is a typical SDP message:</p>\n<pre><code>   v=0\n   o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\n   s=\n   c=IN IP4 host.anywhere.com\n   t=0 0\n   m=audio 49170 RTP/AVP 0\n   a=rtpmap:0 PCMU/8000\n   m=video 51372 RTP/AVP 31\n   a=rtpmap:31 H261/90000\n   m=video 53000 RTP/AVP 32\n   a=rtpmap:32 MPV/90000\n</code></pre>\n<p>SDP is never used alone, but by protocols like <em>Glossary(\"RTP\"</em>) and <em>Glossary(\"RTSP\"</em>). SDP is also as component of <em>Glossary(\"WebRTC\"</em>), which uses SDP as a way of describing a session.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Protocols\">WebRTC protocols</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Session Description Protocol\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Search engine</h2>\n<ul>\n<li>Definition</li>\n<li>Glossary</li>\n<li>Indexing</li>\n<li>Search Engine</li>\n<li>Searching</li>\n<li>Web Crawling</li>\n<li>WebMechanics</li>\n<li>World Wide Web</li>\n<li>details</li>\n<li>\n<h2>google</h2>\n</li>\n</ul>\n<blockquote>\n<p>A search engine is a software system that collects information from the <em>Glossary(\"World Wide Web\"</em>) and presents it to users who are looking for specific information.</p>\n</blockquote>\n<p>A search engine conducts the following processes:</p>\n<ul>\n<li><strong>Web crawling:</strong> Searching web sites by navigating <em>Glossary(\"Hyperlink\", \"Hyperlinks\"</em>) on web pages, both within a site, and from one site to another. A web site owner can exclude areas of the site from being accessed by a search engine's <em>web crawler</em> (or <em>spider</em>), by defining \"robot exclusion\" information in a file named <code>robots.txt</code>.</li>\n<li><strong>Indexing:</strong> Associating keywords and other information with specific web pages that have been crawled. This enables users to find relevant pages as quickly as possible.</li>\n<li><strong>Searching:</strong> Looking for relevant web pages based on queries consisting of key words and other commands to the search engine. The search engine finds the URLs of pages that match the query, and ranks them based on their relevance. It then presents results to the user in order of the ranking.</li>\n</ul>\n<p>The most popular search engine is Google. Other top search engines include Yahoo!, Bing, Baidu, and AOL.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Web_search_engine\">Web search engine</a> on Wikipedia</li>\n<li><a href=\"https://www.webopedia.com/TERM/S/search_engine.html\">Search engine</a> on Webopedia</li>\n<li><a href=\"https://computer.howstuffworks.com/internet/basics/search-engine.htm\">How Internet search engines work</a> on How Stuff Works</li>\n</ul>\n<hr>\n<h2>Term:  Second-level Domain</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>A Second Level Domain (<em>Glossary(\"SLD\"</em>)) is the part of the domain name that is located right before a Top Level Domain (<em>Glossary(\"TLD\"</em>)).</p>\n</blockquote>\n<p>For example, in <code>mozilla.org</code> the SLD is <code>mozilla</code> and the TLD is <code>org</code>.</p>\n<p>A domain name is not limited to a TLD and an SLD. Additional subdomains can be created in order to provide additional information about various functions of a server or to delimit areas under the same domain. For example, <code>www</code> is a commonly used subdomain to indicate the domain points to a web server.</p>\n<p>As another example, in <code>developer.mozilla.org</code>, the <code>developer</code> subdomain is used to specify that the subdomain contains the developer section of the Mozilla website.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Second-level domain\", \"SLD\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"DNS\"</em>)</li>\n<li><em>Glossary(\"Domain\"</em>)</li>\n<li><em>Glossary(\"Domain name\"</em>)</li>\n<li><em>Glossary(\"TLD\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Secure Context</h2>\n<ul>\n<li>Glossary</li>\n<li>Security</li>\n<li>\n<h2>Secure contexts</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>secure context</strong> is a <code>Window</code> or <code>Worker</code> in which certain minimum standards of authentication and confidentiality are met. Many Web APIs and features are only accessible in secure contexts, reducing the opportunity for misuse by malicious code.</p>\n</blockquote>\n<p>For more information see: <a href=\"/en-US/docs/Web/Security/Secure_Contexts\">Web > Security > Secure Contexts</a>.</p>\n<hr>\n<h2>Term:  Signature (security)</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Privacy</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>signature</strong>, or <em>digital signature</em>, is a <em>glossary(\"protocol\"</em>) showing that a message is authentic.</p>\n</blockquote>\n<p>From the <em>glossary(\"hash\"</em>) of a given message, the <strong>signing process</strong> first generates a digital signature linked to the signing entity, using the entity's private <em>glossary(\"key\"</em>).</p>\n<p>On receiving the message, the <strong>verification process</strong></p>\n<ul>\n<li><em>authenticates the sender -</em> uses the sender's public key to <em>glossary(\"decryption\",\"decrypt\"</em>) the signature and recover the hash, which can only be created with the sender's private key, and</li>\n<li><em>checks message integrity -</em> compares the hash with a newly calculated one from the received document (the two hashes will differ if the document has been tampered with)</li>\n</ul>\n<p>The system fails if the private key is compromised or the recipient is deceitfully given the wrong public key.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Digital signature\"</em>) on Wikipedia</li>\n<li>See <em>glossary(\"digest\"</em>), <em>glossary(\"encryption\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Self-Executing Anonymous Function</h2>\n<ul>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em>glossary(\"JavaScript\"</em>) <em>glossary(\"function\"</em>) that runs as soon as it is defined. Also known as an <em>glossary(\"IIFE\"</em>) (Immediately Invoked Function Expression).</p>\n</blockquote>\n<p>See the IIFE glossary page linked above for more information.</p>\n<hr>\n<h2>Term:  Semantics</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>semantics</h2>\n</li>\n</ul>\n<blockquote>\n<p>In programming, <strong>Semantics</strong> refers to the <em>meaning</em> of a piece of code — for example \"what effect does running that line of JavaScript have?\", or \"what purpose or role does that HTML element have\" (rather than \"what does it look like?\".)</p>\n</blockquote>\n<h2>Semantics in JavaScript</h2>\n<p>In JavaScript, consider a function that takes a string parameter, and returns an <em>htmlelement(\"li\"</em>) element with that string as its <code>textContent</code>. Would you need to look at the code to understand what the function did if it was called <code>build('Peach')</code>, or <code>createLiWithContent('Peach')</code>?</p>\n<h2>Semantics in CSS</h2>\n<p>In CSS, consider styling a list with <code>li</code> elements representing different types of fruits. Would you know what part of the DOM is being selected with <code>div > ul > li</code>, or <code>.fruits__item</code>?</p>\n<h2>Semantics in HTML</h2>\n<p>In HTML, for example, the <em>htmlelement(\"h1\"</em>) element is a semantic element, which gives the text it wraps around the role (or meaning) of \"a top level heading on your page.\"</p>\n<pre><code class=\"language-html\">&#x3C;h1>This is a top level heading&#x3C;/h1>\n</code></pre>\n<p>By default, most browser's <a href=\"/en-US/docs/Web/CSS/Cascade#user-agent_stylesheets\">user agent stylesheet</a> will style an <em>htmlelement(\"h1\"</em>) with a large font size to make it <em>look</em> like a heading (although you could style it to look like anything you wanted).</p>\n<p>On the other hand, you could make any element <em>look</em> like a top level heading. Consider the following:</p>\n<pre><code class=\"language-html\">&#x3C;span style=\"font-size: 32px; margin: 21px 0;\">Is this a top level heading?&#x3C;/span>\n</code></pre>\n<p>This will render it to look like a top level heading, but it has no semantic value, so it will not get any extra benefits as described above. It is therefore a good idea to use the right HTML element for the right job.</p>\n<p>HTML should be coded to represent the <em>data</em> that will be populated and not based on its default presentation styling. Presentation (how it should look), is the sole responsibility of <a href=\"/en-US/docs/Web/CSS\">CSS</a>.</p>\n<p>Some of the benefits from writing semantic markup are as follows:</p>\n<ul>\n<li>Search engines will consider its contents as important keywords to influence the page's search rankings (see <em>glossary(\"SEO\"</em>))</li>\n<li>Screen readers can use it as a signpost to help visually impaired users navigate a page</li>\n<li>Finding blocks of meaningful code is significantly easier than searching through endless <code>div</code>s with or without semantic or namespaced classes</li>\n<li>Suggests to the developer the type of data that will be populated</li>\n<li>Semantic naming mirrors proper custom element/component naming</li>\n</ul>\n<p>When approaching which markup to use, ask yourself, \"What element(s) best describe/represent the data that I'm going to populate?\" For example, is it a list of data?; ordered, unordered?; is it an article with sections and an aside of related information?; does it list out definitions?; is it a figure or image that needs a caption?; should it have a header and a footer in addition to the global site-wide header and footer?; etc.</p>\n<h2>Semantic elements</h2>\n<p>These are <em>some</em> of the roughly 100 semantic <a href=\"/en-US/docs/Web/HTML/Element\">elements</a> available:</p>\n<ul>\n<li><em>htmlelement(\"article\"</em>)</li>\n<li><em>htmlelement(\"aside\"</em>)</li>\n<li><em>htmlelement(\"details\"</em>)</li>\n<li><em>htmlelement(\"figcaption\"</em>)</li>\n<li><em>htmlelement(\"figure\"</em>)</li>\n<li><em>htmlelement(\"footer\"</em>)</li>\n<li><em>htmlelement(\"header\"</em>)</li>\n<li><em>htmlelement(\"main\"</em>)</li>\n<li><em>htmlelement(\"mark\"</em>)</li>\n<li><em>htmlelement(\"nav\"</em>)</li>\n<li><em>htmlelement(\"section\"</em>)</li>\n<li><em>htmlelement(\"summary\"</em>)</li>\n<li><em>htmlelement(\"time\"</em>)</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTML/Element#inline_text_semantics\">HTML element reference</a> on MDN</li>\n<li><a href=\"/en-US/docs/Web/HTML/Element/Heading_Elements#problems_solved_by_html5\">Using HTML sections and outlines</a> on MDN</li>\n<li><em>interwiki(\"wikipedia\", \"Semantics#Computer</em>science\", \"The meaning of semantics in computer science\"_) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"SEO\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Semantic elements in HTML:</p>\n<ul>\n<li><em>htmlelement(\"article\"</em>)</li>\n<li><em>htmlelement(\"aside\"</em>)</li>\n<li><em>htmlelement(\"details\"</em>)</li>\n<li><em>htmlelement(\"figcaption\"</em>)</li>\n<li><em>htmlelement(\"figure\"</em>)</li>\n<li><em>htmlelement(\"footer\"</em>)</li>\n<li><em>htmlelement(\"header\"</em>)</li>\n<li><em>htmlelement(\"main\"</em>)</li>\n<li><em>htmlelement(\"mark\"</em>)</li>\n<li><em>htmlelement(\"nav\"</em>)</li>\n<li><em>htmlelement(\"section\"</em>)</li>\n<li><em>htmlelement(\"summary\"</em>)</li>\n<li><em>htmlelement(\"time\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  SEO</h2>\n<ul>\n<li>Glossary</li>\n<li>Intro</li>\n<li>SEO</li>\n<li>Search</li>\n<li>\n<h2>WebMechanic</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>SEO</strong> (Search Engine Optimization) is the process of making a website more visible in search results, also termed improving search rankings.</p>\n</blockquote>\n<p>Search engines <em>Glossary(\"Crawler\", \"crawl\"</em>) the web, following links from page to page, and index the content found. When you search, the search engine displays the indexed content. Crawlers follow rules. If you follow those rules closely when doing SEO for a website, you give the site the best chances of showing up among the first results, increasing traffic and possibly revenue (for ecommerce and ads).</p>\n<p>Search engines give some guidelines for SEO, but big search engines keep result ranking as a trade secret. SEO combines official search engine guidelines, empirical knowledge, and theoretical knowledge from science papers or patents.</p>\n<p>SEO methods fall into three broad classes:</p>\n<ul>\n<li>\n<p>technical</p>\n<ul>\n<li>: Tag the content using semantic <em>Glossary(\"HTML\"</em>). When exploring the website, crawlers should only find the content you want indexed.</li>\n</ul>\n</li>\n<li>\n<p>copywriting</p>\n<ul>\n<li>: Write content using your visitors' vocabulary. Use text as well as images so that crawlers can understand the subject.</li>\n</ul>\n</li>\n<li>\n<p>popularity</p>\n<ul>\n<li>: You get most traffic when other established sites link to your site.</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SEO\"</em>) on Wikipedia</li>\n<li><a href=\"https://developers.google.com/search/docs\">Google Search Central</a></li>\n</ul>\n<hr>\n<h2>Term:  Serialization</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>Serialization</h2>\n</li>\n</ul>\n<blockquote>\n<p>The process whereby an object or data structure is translated into a format suitable for transferral over a network, or storage (e.g. in an array buffer or file format).</p>\n</blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), for example, you can serialize an object to a <em>Glossary(\"JSON\"</em>) <em>Glossary(\"string\"</em>) by calling the <em>Glossary(\"function\"</em>) <em>jsxref(\"JSON.stringify()\"</em>).</p>\n<p><em>Glossary(\"CSS\"</em>) values are serialized by calling the function <em>domxref(\"CSSStyleDeclaration.getPropertyValue()\"</em>).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Serialization\">Serialization</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Server Timing</h2>\n<ul>\n<li>Glossary</li>\n<li>Reference</li>\n<li>Server Timing</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <a href=\"https://www.w3.org/TR/server-timing/\">Server Timing specification</a> enables the server to communicate performance metrics from the request-response cycle to the user agent, and utilizes a JavaScript interface to allow applications to collect, process, and act on these metrics to optimize application delivery.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/TR/server-timing/\">https://www.w3.org/TR/server-timing/</a></li>\n<li><a href=\"https://www.w3.org/TR/resource-timing/\">Resource Timing</a></li>\n</ul>\n<hr>\n<h2>Term:  Server</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>Protocol</li>\n<li>\n<h2>Server</h2>\n</li>\n</ul>\n<blockquote>\n<p>A server is a software or hardware offering a service to a user, usually referred to as client.  A hardware server is a shared computer on a network, usually powerful and housed in a data center.  A software server (often running on a hardware server) is a program that provides services to client programs or a <em>glossary(\"UI\",\"user interface\"</em>) to human clients.</p>\n</blockquote>\n<p>Services are provided generally over local area networks or wide area networks such as the internet. A client program and server program traditionally connect by passing messages encoded using a <em>glossary(\"protocol\"</em>) over an <em>glossary(\"API\"</em>).</p>\n<p>For example:</p>\n<ul>\n<li>An Internet-connected Web server is sending a <em>glossary(\"HTML\"</em>) file to your browser software so that you can read this page</li>\n<li>Local area network server for file, name, mail, print, and fax</li>\n<li>Minicomputers, mainframes, and super computers at data centers</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/What_is_a_web_server\">Introduction to servers</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Server (computing)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Session Hijacking</h2>\n<ul>\n<li>Glossary</li>\n<li>Security</li>\n<li>\n<h2>session hijacking</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Session hijacking</strong> occurs when an attacker takes over a valid session between two computers. The attacker steals a valid session ID in order to break into the system and snoop data.</p>\n</blockquote>\n<p>Most authentication occurs only at the start of a <em>glossary(\"TCP\"</em>) session. In TCP session hijacking, an attacker gains access by taking over a TCP session between two machines in mid session.</p>\n<p><img src=\"session_hijacking_3.jpg\"></p>\n<h3>Session hijacking occurs because</h3>\n<ul>\n<li>no account lockout for invalid session IDs</li>\n<li>weak session-ID generation algorithm</li>\n<li>insecure handling</li>\n<li>indefinite session expiration time</li>\n<li>short session IDs</li>\n<li>transmission in plain text</li>\n</ul>\n<h3>Session hijacking process</h3>\n<ol>\n<li><strong>Sniff</strong>, that is perform a man-in-the-middle (MITM) attack, place yourself between victim and server.</li>\n<li><strong>Monitor</strong> packets flowing between server and user.</li>\n<li><strong>Break</strong> the victim machine's connection.</li>\n<li><strong>Take control</strong> of the session.</li>\n<li><strong>Inject</strong> new packets to the server using the Victim's Session ID.</li>\n</ol>\n<h3>Protection against session hijacking</h3>\n<ul>\n<li>create a secure communication channel with SSH (secure shell)</li>\n<li>pass authentication cookies over HTTPS connection</li>\n<li>implement logout functionality so the user can end the session</li>\n<li>generate the session ID after successful login</li>\n<li>pass encrypted data between the users and the web server</li>\n<li>use a string or long random number as a session key</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Session hijacking\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  SGML</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>\n<h2>SGML</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>Standard Generalized Markup Language</em> (<strong>SGML</strong>) is an <em>Glossary(\"ISO\"</em>) specification for defining declarative markup languages.</p>\n</blockquote>\n<p>On the web, <em>Glossary(\"HTML\"</em>) 4, <em>Glossary(\"XHTML\"</em>), and <em>Glossary(\"XML\"</em>) are popular SGML-based languages. It is worth noting that since its fifth edition, HTML is no longer SGML-based and has its own parsing rules.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SGML\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.isgmlug.org/\">Introduction to SGML</a></li>\n</ul>\n<hr>\n<h2>Term:  Shadow tree</h2>\n<ul>\n<li>DOM</li>\n<li>Glossary</li>\n<li>Shadow Tree</li>\n<li>\n<h2>shadow dom</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>shadow tree</strong> is a tree of DOM <em>Glossary(\"node\", \"nodes\"</em>) whose topmost node is a <strong>shadow root</strong>; that is, the topmost node within a <strong>shadow DOM</strong>. A shadow tree is a hidden set of standard DOM nodes which is attached to a standard DOM node that serves as a host. The hidden nodes are not directly visible using regular DOM functionality, but require the use of a special <a href=\"/en-US/docs/Web/Web_Components/Using_shadow_DOM\">Shadow DOM API</a> to access.</p>\n</blockquote>\n<p>Nodes within the shadow tree are not affected by anything applied outside the shadow tree, and vice versa. This provides a way to encapsulate implementation details, which is especially useful for custom elements and other advanced design paradigms.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Web_Components/Using_shadow_DOM\">Using shadow DOM</a></li>\n<li><em>domxref(\"Element.shadowRoot\"</em>) and <em>domxref(\"Element.attachShadow()\"</em>)</li>\n<li><em>domxref(\"ShadowRoot\"</em>)</li>\n<li><em>HTMLElement(\"slot\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Shim</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>shim</strong> is a piece of code used to correct the behavior of code that already exists, usually by adding new API that works around the problem. This differs from a <em>Glossary(\"polyfill\"</em>), which implements a new API that is not supported by the stock browser as shipped.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Shim (computing)\", \"Shim\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Signature</h2>\n<ul>\n<li>Disambiguation</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>The term <strong>signature</strong> can have several meanings depending on the context. It may refer to:</p>\n</blockquote>\n<p>_GlossaryDisambiguation}}</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Signature</em>(disambiguation)\", \"Signature\"_) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  SIMD</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>SIMD (pronounced \"sim-dee\") is short for <strong>Single Instruction/Multiple Data</strong> which is one <em>Interwiki(\"wikipedia\",\"Flynn%27s</em>taxonomy\",\"classification of computer architectures\"_). SIMD allows one same operation to be performed on multiple data points resulting in data level parallelism and thus performance gains — for example, for 3D graphics and video processing, physics simulations or cryptography, and other domains.</p>\n</blockquote>\n<p>See also <em>Glossary(\"SISD\"</em>) for a sequential architecture with no parallelism in either the instructions or the data sets.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SIMD\"</em>) on Wikipedia</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"SIMD\"</em>)</li>\n<li><em>Glossary(\"SISD\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Simple header</h2>\n<ul>\n<li>CORS</li>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>Old term for <em>Glossary(\"CORS-safelisted request header\"</em>).</p>\n</blockquote>\n<hr>\n<h2>Term:  Simple response header</h2>\n<ul>\n<li>CORS</li>\n<li>Glossary</li>\n<li>\n<h2>HTTP</h2>\n</li>\n</ul>\n<blockquote>\n<p>Old term for <em>Glossary(\"CORS-safelisted response header\"</em>).</p>\n</blockquote>\n<hr>\n<h2>Term:  SISD</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>SISD is short for <strong>Single Instruction/Single Data</strong> which is one <em>Interwiki(\"wikipedia\",\"Flynn%27s</em>taxonomy\",\"classification of computer architectures\"_). In SISD architecture, a single processor executes a single instruction and operates on a single data point in memory.</p>\n</blockquote>\n<p>See also <em>Glossary(\"SIMD\"</em>) for a parallel architecture that allows one same operation to be performed on multiple data points.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SISD\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Site map</h2>\n<ul>\n<li>Accessibility</li>\n<li>Glossary</li>\n<li>Search</li>\n<li>\n<h2>Site map</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>site map</strong> or <strong>sitemap</strong> is a list of pages of a web site.</p>\n</blockquote>\n<p>Structured listings of a site's page help with <a href=\"/en-US/docs/Glossary/SEO\">search engine optimization</a>, providing a link for web crawlers such as search engines to follow. Site maps also help users with site navigation by providing an overview of a site's content in a single glance.</p>\n<hr>\n<h2>Term:  Site</h2>\n<ul>\n<li>Glossary</li>\n<li>Security</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>site</em> of a piece of web content is determined by the <em>registrable domain</em> of the host within the origin. This is computed by consulting a <em>Public Suffix List</em> to find the portion of the host which is counted as the <em>public suffix</em> (e.g. <code>com</code>, <code>org</code> or <code>co.uk</code>).</p>\n</blockquote>\n<p>The concept of a <em>site</em> is used in <a href=\"/en-US/docs/Web/HTTP/Headers/Set-Cookie#directives\">SameSite cookies</a>, as well as a web application's <a href=\"/en-US/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)\">Cross-Origin Resource Policy</a>.</p>\n<h2>Examples</h2>\n<p>These are the same site because the registrable domain of <em>mozilla.org</em> is the same (different host and files path don't matter):</p>\n<ul>\n<li><code>https://developer.mozilla.org/en-US/docs/</code></li>\n<li><code>https://support.mozilla.org/en-US/</code></li>\n</ul>\n<p>These are the same site because scheme and port are not relevant:</p>\n<ul>\n<li><code>http://example.com:8080</code></li>\n<li><code>https://example.com</code></li>\n</ul>\n<p>These are not same site because the registrable domain of the two URLs differs:</p>\n<ul>\n<li><code>https://developer.mozilla.org/en-US/docs/</code></li>\n<li><code>https://example.com</code></li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/What_is_a_URL\">What is a URL</a></li>\n<li><em>Glossary(\"Origin\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/Security/Same-origin_policy\">Same-origin policy</a></li>\n</ul>\n<hr>\n<h2>Term:  SLD</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>An SLD (<a href=\"/en-US/docs/Glossary/Second-level_Domain\">Second Level Domain</a>) is the part of the domain name that is located right before a <em>Top Level Domain</em> (<em>Glossary(\"TLD\"</em>)). For example, in <code>mozilla.org</code> the SLD is <code>mozilla</code> and the TLD is <code>org</code>.</p>\n</blockquote>\n<p>See <a href=\"/en-US/docs/Glossary/Second-level_Domain\">Second Level Domain</a> for more information.</p>\n<hr>\n<h2>Term:  Sloppy mode</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>Sloppy</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Glossary(\"ECMAScript\"</em>) 5 and later let scripts opt in to a new <a href=\"/en-US/docs/Web/JavaScript/Reference/Strict_mode\">strict mode</a>, which alters the semantics of JavaScript in several ways to improve its resiliency and which make it easier to understand what's going on when there are problems.</p>\n</blockquote>\n<p>The normal, non-strict mode of JavaScript is sometimes referred to as <strong>sloppy mode</strong>. This isn't an official designation, but you are likely to come across it if you spend time doing serious JavaScript code.</p>\n<h4>See also</h4>\n<ul>\n<li>\"<a href=\"http://speakingjs.com/es5/ch07.html#strict_mode\">Strict Mode</a>\" in chapter 7 (\"JavaScript Syntax\") in the book Speaking <em>JavaScript</em>.</li>\n</ul>\n<hr>\n<h2>Term:  Slug</h2>\n<ul>\n<li>Community</li>\n<li>Glossary</li>\n<li>Intermediate</li>\n<li>MDN</li>\n<li>URL</li>\n<li>\n<h2>Web</h2>\n</li>\n</ul>\n<blockquote>\n<p>A Slug is the unique identifying part of a web address, typically at the end of the URL. In the context of MDN, it is the portion of the URL following \"<em>&#x3C;locale>/docs/</em>\".</p>\n</blockquote>\n<h4>See also</h4>\n<hr>\n<h2>Term:  Smoke Test</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>QA</li>\n<li>\n<h2>Testing</h2>\n</li>\n</ul>\n<blockquote>\n<p>A smoke test consists of functional or unit tests of critical software functionality. Smoke testing comes before further, in-depth testing.</p>\n</blockquote>\n<p>Smoke testing answers questions like</p>\n<ul>\n<li>\"Does the program start up correctly?\"</li>\n<li>\"Do the main control buttons function?\"</li>\n<li>\"Can you save a simple blank new test user account?\"</li>\n</ul>\n<p>If this basic functionality fails, there is no point investing time in more detailed QA work at this stage.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Smoke testing (software)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  SMPTE (Society of Motion Picture and Television Engineers)</h2>\n<ul>\n<li>Engineers</li>\n<li>Glossary</li>\n<li>Motion Picture</li>\n<li>Movies</li>\n<li>SMPTE</li>\n<li>Specifications</li>\n<li>Television</li>\n<li>\n<h2>standards</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>Society of Motion Picture and Television Engineers</strong> (<strong><a href=\"https://www.smpte.org/\">SMPTE</a></strong>) is the professional association of engineers and scientists that develop and define standards and technologies used to create, broadcast, store, and present entertainment media.</p>\n</blockquote>\n<p>For example, SMPTE defines the standards used for digital cinema used by modern digital movie theaters.</p>\n<hr>\n<h2>Term:  SMTP</h2>\n<ul>\n<li>Beginner</li>\n<li>Collaboration</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Sharing</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>SMTP</strong> (Simple Mail Transfer Protocol) is a <em>glossary(\"protocol\"</em>) used to send a new email.  Like <em>glossary(\"POP\"</em>) and <em>glossary(\"NNTP\"</em>), it is a <em>Glossary(\"state machine\"</em>)-driven protocol.</p>\n</blockquote>\n<p>The protocol is relatively straightforward. Primary complications include supporting various authentication mechanisms (<a href=\"https://en.wikipedia.org/wiki/Generic_Security_Services_Application_Program_Interface\">GSSAPI</a>, <a href=\"https://en.wikipedia.org/wiki/CRAM-MD5\">CRAM-MD5</a>, <a href=\"https://en.wikipedia.org/wiki/NTLM\">NTLM</a>, MSN, AUTH LOGIN, AUTH PLAIN, etc.), handling error responses, and falling back when authentication mechanisms fail (e.g., the server claims to support a mechanism, but doesn't).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SMTP\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>glossary(\"NNTP\"</em>)</li>\n<li><em>glossary(\"POP\"</em>)</li>\n<li><em>glossary(\"protocol\"</em>)</li>\n<li><em>Glossary(\"state machine\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Snap positions</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>snap positions</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <a href=\"/en-US/docs/Glossary/Scroll_container\">scroll container</a> may set <strong>snap positions</strong> — points that the <a href=\"/en-US/docs/Glossary/Scrollport\">scrollport</a> will stop moving at after a scrolling operation is completed. This allows a scrolling experience that gives the effect of paging through content rather than needing to drag content into view.</p>\n</blockquote>\n<p>Defining Snap positions on the scroll container was introduced in the <a href=\"/en-US/docs/Web/CSS/CSS_Scroll_Snap\">CSS Scroll Snap specification</a>.</p>\n<hr>\n<h2>Term:  SOAP</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>SOAP</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>SOAP</strong> (Simple Object Access Protocol) is a <em>glossary('protocol'</em>) for transmitting data in <em>glossary('XML'</em>) format.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SOAP\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.w3.org/TR/soap12-part1/\">Specification</a></li>\n</ul>\n<hr>\n<h2>Term:  SPA (Single-page application)</h2>\n<ul>\n<li>Glossary</li>\n<li>SPA</li>\n<li>\n<h2>single-page app</h2>\n</li>\n</ul>\n<blockquote>\n<p>An SPA (Single-page application) is a web app implementation that loads only a single web document, and then updates the body content of that single document via JavaScript APIs such as <em>domxref(\"XMLHttpRequest\"</em>) and <a href=\"/en-US/docs/Web/API/Fetch_API\">Fetch</a> when different content is to be shown.</p>\n</blockquote>\n<p>This therefore allows users to use websites without loading whole new pages from the server, which can result in performance gains and a more dynamic experience, with some tradeoff disadvantages such as SEO, more effort required to maintain state, implement navigation, and do meaningful performance monitoring.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Single-page application\"</em>) (Wikipedia)</li>\n<li><a href=\"/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks\">Understanding client-side JavaScript frameworks</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"API\"</em>)</li>\n<li><em>Glossary(\"AJAX\"</em>)</li>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>Popular SPA frameworks:</p>\n<ul>\n<li><a href=\"https://reactjs.org/\">React</a></li>\n<li><a href=\"https://angular.io/\">Angular</a></li>\n<li><a href=\"https://vuejs.org/\">Vue.JS</a></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Specification</h2>\n<ul>\n<li>Glossary</li>\n<li>OpenPractices</li>\n<li>\n<h2>Standardization</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>specification</strong> is a document that lays out in detail what functionality or attributes a product must include before delivery. In the context of describing the Web, the term \"specification\" (often shortened to \"spec\") generally means a document describing a language, technology, or <em>Glossary(\"API\"</em>) which makes up the complete set of open Web technologies.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Specification\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Speculative parsing</h2>\n<ul>\n<li>Advanced</li>\n<li>HTML</li>\n<li>HTML5</li>\n<li>NeedsUpdate</li>\n<li>Web Development</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>Traditionally in browsers the HTML parser ran on the main thread and was blocked after a <code>&#x3C;/script></code> tag until the script has been retrieved from the network and executed. Some HTML parser, such as Firefox since Firefox 4, support speculative parsing off of the main thread. It parses ahead while scripts are being downloaded and executed. The HTML parser starts speculative loads for scripts, style sheets and images it finds ahead in the stream and runs the HTML tree construction algorithm speculatively. The upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was already scanned for scripts, style sheets and images. The downside is that there's more work lost when the speculation fails.</p>\n</blockquote>\n<p>This document helps you avoid the kind of things that make speculation fail and slow down the loading of your page.</p>\n<p>To make speculative loads of linked scripts, style sheets and images successful, avoid <em>domxref('document.write'</em>). If you use a <code>&#x3C;base></code> element to override the base URI of your page, put the element in the non-scripted part of the document. Don't add it via <code>document.write()</code> or <em>domxref('document.createElement'</em>).</p>\n<h2>Avoiding losing tree builder output</h2>\n<p>Speculative tree building fails when <code>document.write()</code> changes the tree builder state such that the speculative state after the <code>&#x3C;/script></code> tag no longer holds when all the content inserted by <code>document.write()</code> has been parsed. However, only unusual uses of <code>document.write()</code> cause trouble. Here are the things to avoid:</p>\n<ul>\n<li>Don't write unbalanced trees. <code>&#x3C;script>document.write(\"&#x3C;div>\");&#x3C;/script></code> is bad. <code>&#x3C;script>document.write(\"&#x3C;div>&#x3C;/div>\");&#x3C;/script></code> is OK.</li>\n<li>Don't write an unfinished token. <code>&#x3C;script>document.write(\"&#x3C;div>&#x3C;/div\");&#x3C;/script></code> is bad.</li>\n<li>Don't finish your writing with a carriage return. <code>&#x3C;script>document.write(\"Hello World!\\r\");&#x3C;/script></code> is bad. <code>&#x3C;script>document.write(\"Hello World!\\n\");&#x3C;/script></code> is OK.</li>\n<li>Don't format part of a table. <code>&#x3C;table>&#x3C;script>document.write(\"&#x3C;tr>&#x3C;td>Hello World!&#x3C;/td>&#x3C;/tr>\");&#x3C;/script>&#x3C;/table></code> is bad.</li>\n</ul>\n<hr>\n<h2>Term:  Speed index</h2>\n<ul>\n<li>Glossary</li>\n<li>Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Speed Index</strong> (SI) is a page load performance metric that shows you how quickly the contents of a page are visibly populated. It is the average time at which visible parts of the page are displayed. Expressed in milliseconds, and dependent on the size of the viewport, the lower the score, the better.</p>\n</blockquote>\n<p><img src=\"speedindex.png\" alt=\"Calculation of SpeedIndex\"></p>\n<p>The calculation calculates what percent of the page is visually complete at every 100ms interval until the page is visually complete.  The overall score, the above the fold metric, is a sum of the individual 10 times per second intervals of the percent of the screen that is not-visually complete<strong>.</strong></p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Performance\">Learn web performance</a></li>\n</ul>\n<hr>\n<h2>Term:  SQL Injection</h2>\n<ul>\n<li>Glossary</li>\n<li>Security</li>\n<li>Sql</li>\n<li>Sql Injection</li>\n<li>\n<h2>Webapp</h2>\n</li>\n</ul>\n<blockquote>\n<p>SQL injection takes advantage of Web apps that fail to validate user input. Hackers can maliciously pass SQL commands through the Web app for execution by a backend database.</p>\n</blockquote>\n<p>SQL injection can gain unauthorized access to a database or to retrieve information directly from the database. Many data breaches are due to SQL injection.</p>\n<p><a href=\"https://www.acunetix.com/wp-content/uploads/2010/09/sql_inj_xss.gif\"><img src=\"sql_inj_xss.gif\"></a></p>\n<h2>How It Works</h2>\n<p><img src=\"updates_loginscreen.png\"></p>\n<p>After entering username and password, behind the GUI the SQL queries work as follows:</p>\n<pre><code class=\"language-sql\">\"SELECT Count(*) FROM Users WHERE Username=' \" + txt.User.Text+\" ' AND Password=' \"+ txt.Password.Text+\" ' \";\n</code></pre>\n<p>Now suppose User enters the User## Term: admin and Password: passwd123, so after clicking on the Log in button, SQL query will run as follows:</p>\n<pre><code class=\"language-sql\">\"SELECT Count(*) FROM Users WHERE Username=' admin ' AND Password=' passwd123 ' \";\n</code></pre>\n<p>If the credentials are correct, then the user is allowed to log in, so it's a very simple (and therefore insecure) mechanism. Hackers use this insecurity to gain unauthorized access.</p>\n<p>Hackers use a simple string called a Magical String, for example:</p>\n<p><strong>User## Term: <em>admin</em></strong></p>\n<p><strong>Password: <em>anything 'or'1'='1</em></strong></p>\n<p>After clicking on the login button, the SQL query will work as follows:</p>\n<pre><code class=\"language-sql\">\"SELECT Count(*) FROM Users WHERE Username=' admin ' AND Password=' anything 'or'1'='1 ' \";\n</code></pre>\n<p>Just take a closer look at the above query's password section.</p>\n<pre><code>Password=' anything 'or'1'='1 '\n</code></pre>\n<p>The password is not 'anything', hence password=anything results in FALSE, but '1'='1' is a TRUE statement and hence returns a TRUE value. Finally, due to the OR operator, the value ( FALSE OR TRUE ) is TRUE, so authentication bypasses successfully. Just due to a simple string (Magical String) the entire database is compromised.</p>\n<h2>How To Prevent</h2>\n<p>Before executing the queries for the user credentials, make some changes like the following:</p>\n<pre><code class=\"language-sql\">$id = $_GET['id']\n\n(1) $id = Stripslashes($id)\n\n(2) $id = mysql_real_escape_String($id)\n</code></pre>\n<p>So due to (1) each single quote (') in the input string is replaced with double quotes (\"), and due to (2) before every (') it adds (/). The revised magical string fails to bypass the authentication, and your database stays secure.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SQL injection\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.owasp.org/index.php/SQL_Injection\">Explanation of SQL injection </a>on OWASP (Open Web Application Security Project)</li>\n</ul>\n<hr>\n<h2>Term:  SQL</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Database</li>\n<li>Glossary</li>\n<li>\n<h2>Sql</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>SQL</strong> (Structured Query Language) is a descriptive computer language designed for updating, retrieving, and calculating data in table-based databases.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SQL\"</em>) on Wikipedia</li>\n<li><a href=\"https://sqlzoo.net/wiki/SQL_Tutorial\">Learn SQL on sqlzoo.net</a></li>\n<li><a href=\"https://www.tutorialspoint.com/sql/\">Tutorials Point</a></li>\n</ul>\n<hr>\n<h2>Term:  SRI</h2>\n<ul>\n<li>CSP</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Subresource Integrity</strong> (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a <em>Glossary(\"CDN\"</em>)) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Security/Subresource_Integrity\">Subresource Integrity</a></li>\n<li><em>HTTPHeader(\"Content-Security-Policy\"</em>): <em>CSP(\"require-sri-for\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Secure Sockets Layer (SSL)</h2>\n<ul>\n<li>Glossary</li>\n<li>SSL</li>\n<li>Security</li>\n<li>TLS</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>Secure Sockets Layer, or SSL, was the old standard security technology for creating an encrypted network link between a server and client, ensuring all data passed is private and secure. The current version of SSL is version 3.0, released by Netscape in 1996, and has been superseded by the <em>Glossary(\"TLS\", \"Transport Layer Security (TLS)\"</em>) protocol.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Transport Layer Security\"</em>) (Wikipedia)</li>\n<li><a href=\"/en-US/docs/Web/Security/Transport_Layer_Security\">Transport Layer Security (TLS) protocol</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"HTTPS\"</em>)</li>\n<li><em>Glossary(\"TLS\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Stacking context</h2>\n<ul>\n<li>CSS</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Stacking context</strong> refers to how elements on a webpage appear to sit on top of other elements, just as you can arrange index cards on your desk to lie side-by-side or overlap each other.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\">Further explanation and example</a></li>\n</ul>\n<hr>\n<h2>Term:  State machine</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Finite</li>\n<li>Glossary</li>\n<li>Input</li>\n<li>Mealy</li>\n<li>Moore</li>\n<li>State Machine</li>\n<li>\n<h2>Turing Machine</h2>\n</li>\n</ul>\n<blockquote>\n<p>A state machine is a mathematical abstraction used to design algorithms. A state machine reads a set of inputs and changes to a different state based on those inputs.</p>\n</blockquote>\n<p>A state is a description of the status of a system waiting to execute a transition. A transition is a set of actions to execute when a condition is fulfilled or an event received. In a state diagram, circles represent each possible state and arrows represent transitions between states.</p>\n<p>Looking at the final state, you can discern something about the series of inputs leading to that state.</p>\n<p>There are two types of basic state machines:</p>\n<ul>\n<li>\n<p>deterministic finite state machine</p>\n<ul>\n<li>: This kind allows only one possible transition for any allowed input. This is like the \"if\" <em>Glossary(\"statement\"</em>) in that <code>if x == true then doThis else doThat</code> is not possible. The computer must perform <em>one</em> of the two options.</li>\n</ul>\n</li>\n<li>\n<p>non-deterministic finite state machine</p>\n<ul>\n<li>: Given some state, an input can lead to more than one different state.</li>\n</ul>\n</li>\n</ul>\n<p><em>Figure 1: Deterministic Finite State Machine</em></p>\n<p><img src=\"statemachine1.png\"></p>\n<p>In <em>Figure 1</em>, the state begins in State 1; the state changes to State 2 given input 'X', or to State 3 given input 'Y'.</p>\n<p><em>Figure 2: Non-Deterministic Finite State Machine</em></p>\n<p><a href=\"http://postimg.org/image/mpq3nz82h/\"><img src=\"statemachine2.png\"></a></p>\n<p>In <em>Figure 2</em>, given input 'X', the state can persist or change to State 2.</p>\n<p>Note that any <em>Glossary(\"regular expression\"</em>) can be represented by a state machine.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Finite-state machine\"</em>) on Wikipedia</li>\n<li><em>Interwiki(\"wikipedia\", \"UML state machine\"</em>) on Wikipedia</li>\n<li><em>Interwiki(\"wikipedia\", \"Moore machine\"</em>) on Wikipedia</li>\n<li><em>Interwiki(\"wikipedia\", \"Mealy machine\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Statement</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>In a computer programming language, a <strong>statement</strong> is a line of code commanding a task. Every program consists of a sequence of statements.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Statement (computer science)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements\">JavaScript statements and declarations</a></li>\n</ul>\n<hr>\n<h2>Term:  Static method</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>Method</li>\n<li>Static</li>\n<li>\n<h2>Static Method</h2>\n</li>\n</ul>\n<blockquote>\n<p>A static method (or <em>static function</em>) is a <em>Glossary(\"method\"</em>) defined as a member of an <em>Glossary(\"object\"</em>) but is accessible directly from an API object's constructor, rather than from an object instance created via the constructor.</p>\n</blockquote>\n<p>In a <a href=\"/en-US/docs/Web/API\">Web API</a>, a static method is one which is defined by an interface but can be called without instantiating an object of that type first.</p>\n<p>Methods called on object instances are called <em>instance methods</em>.</p>\n<h2>Examples</h2>\n<p>In the <a href=\"/en-US/docs/Web/API/Notifications_API\">Notifications API</a>, the <em>domxref(\"Notification.requestPermission()\"</em>) method is called on the actual <em>domxref(\"Notification\"</em>) constructor itself — it is a static method:</p>\n<pre><code class=\"language-js\">let promise = Notification.requestPermission();\n</code></pre>\n<p>The <em>domxref(\"Notification.close()\"</em>) method on the other hand, is an instance method — it is called on an specific notification object instance to close the system notification it represents:</p>\n<pre><code class=\"language-js\">let myNotification = new Notification('This is my notification');\n\nmyNotification.close();\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.techopedia.com/definition/24034/static-method\">Static Method</a> on Techopedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Classes/static\">static</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Object\"</em>)</li>\n<li><em>Glossary(\"Method\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Static typing</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Type</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>statically-typed</strong> language is a language (such as Java, C, or C++) where variable types are known at compile time. In most of these languages, types must be expressly indicated by the programmer; in other cases (such as OCaml), type inference allows the programmer to not indicate their variable types.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Type system\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Strict mode</h2>\n<ul>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>Reference</h2>\n</li>\n</ul>\n<blockquote>\n<p>JavaScript's <strong>strict mode</strong> is a way to <em>opt in</em> to a restricted variant of JavaScript, thereby implicitly opting-out of \"<em>Glossary(\"Sloppy</em>mode\", \"sloppy mode\"<em>)\". Strict mode isn't just a subset: it _intentionally</em> has different semantics from normal code.</p>\n</blockquote>\n<p>Strict mode for an entire script is invoked by including the statement <code>\"use strict\";</code> before any other statements.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Strict_mode\">Strict mode</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode\">Transitioning to strict mode</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Sloppy mode\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Stringifier</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Stringifier</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <em>Glossary(\"object\", \"object's\"</em>) stringifier is any <em>Glossary(\"attribute\"</em>) or <em>Glossary(\"method\"</em>) that is defined to provide a textual representation of the object for use in situations where a <em>Glossary(\"string\"</em>) is expected.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>Stringifiers in <a href=\"/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#stringifier\">Information contained in a WebIDL file</a></li>\n</ul>\n<hr>\n<h2>Term:  String</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>String</h2>\n</li>\n</ul>\n<blockquote>\n<p>In any computer programming language, a string is a sequence of <em>Glossary(\"character\",\"characters\"</em>) used to represent text.</p>\n</blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), a String is one of the <em>Glossary(\"Primitive\", \"primitive values\"</em>) and the <em>jsxref(\"String\"</em>) object is a <em>Glossary(\"wrapper\"</em>) around a String primitive.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"String (computer science)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures#string_type\">JavaScript data types and data structures</a></li>\n</ul>\n<hr>\n<h2>Term:  STUN</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>STUN</li>\n<li>WebMechanics</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>STUN</strong> (Session Traversal Utilities for NAT) is an auxiliary protocol for transmitting data around a <em>glossary(\"NAT\"</em>) (Network Address Translator). STUN returns the <em>glossary(\"IP address\"</em>), <em>glossary(\"port\"</em>), and connectivity status of a networked computer behind a NAT.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"STUN\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Protocols\">WebRTC protocols</a></li>\n</ul>\n<h3>Technical reference</h3>\n<ul>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc5389\">Specification</a></li>\n</ul>\n<hr>\n<h2>Term:  Style origin</h2>\n<ul>\n<li>CSS</li>\n<li>Glossary</li>\n<li>Style</li>\n<li>Style Origin</li>\n<li>\n<h2>origin</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"CSS\"</em>), there are three categories of sources for style changes. These categories are called <strong>style origins</strong>. They are the <strong>user agent origin</strong>, <strong>user origin</strong>, and the <strong>author origin</strong>.</p>\n</blockquote>\n<ul>\n<li>\n<p>User-agent origin</p>\n<ul>\n<li>: The user agent origin is the style origin comprised of the default styles used by the user's web browser. If no other styles are applied to content, the user agent origin's styles are used while rendering elements.</li>\n</ul>\n</li>\n<li>\n<p>User origin</p>\n<ul>\n<li>: The user origin is the style origin containing any CSS that the user of the web browser has added. These may be from adding styles using a developer tool or from a browser extension that automatically applies custom styles to content, such as <a href=\"https://add0n.com/stylus.html\">Stylus</a> or <a href=\"https://userstyles.org/\">Stylish</a>.</li>\n</ul>\n</li>\n<li>\n<p>Author origin</p>\n<ul>\n<li>: The author origin is the style origin which contains all of the styles which are part of the document, whether embedded within the <em>Glossary(\"HTML\"</em>) or loaded from an external stylesheet file.</li>\n</ul>\n</li>\n</ul>\n<p>The style origins are used to determine where to stop rolling back (or backtracking through) the cascade of styles that have been applied to an element when removing styles, such as when using the <em>cssxref(\"unset\"</em>) or <em>cssxref(\"revert\"</em>) keywords.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://drafts.csswg.org/css-cascade-4/#cascading-origins\">CSS Cascading and Inheritance: Cascading Origins</a></li>\n</ul>\n<hr>\n<h2>Term:  Stylesheet</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>StyleSheet</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>stylesheet</strong> is a set of CSS rules used to control the layout and design of a webpage or document. <em>Internal</em> stylesheets are placed inside a <em>htmlelement(\"style\"</em>) element inside the <em>htmlelement(\"head\"</em>) of a web document, and <em>external</em> stylesheets are placed inside a separate <code>.css</code> file, which is applied to a document by referencing the file inside a <em>htmlelement(\"link\"</em>) element in the document's head.</p>\n</blockquote>\n<p>External stylesheets are generally preferred because they allow you to control the styling of multiple pages from a single place, rather than having to repeat the CSS across each page.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/CSS/First_steps\">CSS first steps</a></li>\n<li>Stylesheets on <a href=\"https://en.wikipedia.org/wiki/Style_sheet_(web_development)\">Wikipedia</a></li>\n</ul>\n<hr>\n<h2>Term:  SVG</h2>\n<ul>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Graphics</li>\n<li>SVG</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Scalable Vector Graphics</em> (<strong>SVG</strong>) is a 2D vector image format based on an <em>Glossary(\"XML\"</em>) syntax.</p>\n</blockquote>\n<p>The <em>Glossary(\"W3C\"</em>) began work on SVG in the late 1990s, but SVG only became popular when <em>Glossary(\"Microsoft Internet Explorer\", \"Internet Explorer\"</em>) 9 came out with SVG support. All major <em>Glossary(\"browser\",\"browsers\"</em>) now support SVG.</p>\n<p>As a <a href=\"https://en.wikipedia.org/wiki/Vector_graphics\">vector image format</a>, SVG graphics can scale infinitely, making them invaluable in <em>Glossary(\"responsive web design\", \"responsive design\"</em>), since you can create interface elements and graphics that scale to any screen size. SVG also provides a useful set of tools, such as clipping, masking, filters, and animations.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"SVG\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html\">W3.org's SVG Primer</a></li>\n<li><a href=\"/en-US/docs/Web/SVG\">SVG documentation on MDN</a></li>\n<li><a href=\"https://www.w3.org/TR/SVG/\">Latest SVG specification</a></li>\n</ul>\n<hr>\n<h2>Term:  SVN</h2>\n<ul>\n<li>Collaborating</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Apache Subversion (<strong>SVN</strong>) is a free source control management (<em>Glossary(\"SCM\"</em>)) system. It allows developers to keep a history of text and code modifications. Although SVN can also handle binary files, we do not recommend that you use it for such files.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Apache Subversion\"</em>) on Wikipedia</li>\n<li><a href=\"https://subversion.apache.org/\">Official website</a></li>\n</ul>\n<hr>\n<h2>Term:  Symbol</h2>\n<ul>\n<li>Data Type</li>\n<li>ECMAScript 2015</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>Sharing</li>\n<li>\n<h2>Symbol</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), Symbol is a <em>Glossary(\"Primitive\", \"primitive value\"</em>).</p>\n</blockquote>\n<p>A value having the data type <strong>Symbol</strong> can be referred to as a \"Symbol value\". In a JavaScript runtime environment, a symbol value is created by invoking the function <em>jsxref(\"Symbol\"</em>), which dynamically produces an anonymous, unique value. A symbol may be used as an object property.</p>\n<p>Symbol can have an optional description, but for debugging purposes only.</p>\n<p>A <strong>Symbol</strong> value represents a unique identifier. For example:</p>\n<pre><code class=\"language-js\">// Here are two symbols with the same description:\nlet Sym1 = Symbol(\"Sym\")\nlet Sym2 = Symbol(\"Sym\")\n\nconsole.log(Sym1 === Sym2) // returns \"false\"\n// Symbols are guaranteed to be unique.\n// Even if we create many symbols with the same description,\n// they are different values.\n</code></pre>\n<blockquote>\n<p><strong>Note:</strong> If you are familiar with Ruby (or another language) that also has a feature called <em>\"symbols\"</em>, please don’t be misled. JavaScript symbols are different.</p>\n</blockquote>\n<p><em>Symbol</em> type is a new feature in ECMAScript 2015. There is no ECMAScript 5 equivalent for Symbol.</p>\n<p>In some programming languages, the symbol data type is referred to as an \"atom.\"</p>\n<h3>Symbols don't \"Auto-Convert\" to strings</h3>\n<p>Most values in JavaScript support implicit conversion to a string. For instance, we can <code>alert</code> almost any value, and it will work. Symbols are special. They don’t auto-convert.</p>\n<p>For example:</p>\n<pre><code class=\"language-js\">let Sym = Symbol(\"Sym\")\nalert(Sym)  // TypeError: Cannot convert a Symbol value to a string\n</code></pre>\n<p>That’s a \"language guard\" against messing up, because strings and symbols are fundamentally different, and should not occasionally convert one into another.</p>\n<p>If you really want to show a symbol, we need to call <code>.toString()</code> on it.</p>\n<pre><code class=\"language-js\">let Sym = Symbol(\"Sym\")\nalert(Sym.toString())  // Symbol(Sym), now it works\n</code></pre>\n<p>Or you can use the <code>symbol.description</code> property to get its description:</p>\n<pre><code class=\"language-js\">let _Sym = Symbol(\"Sym\");\n\nalert(_Sym.description); // Sym\n</code></pre>\n<h3>Well-known symbols</h3>\n<p>The <em>jsxref(\"Symbol\"</em>) class has constants for so-called <em>well-known symbols</em>. These symbols let you configure how JS treats an object, by using them as property keys.</p>\n<p>Examples of well-known symbols are: <em>jsxref(\"Symbol.iterator\"</em>) for array-like objects, or <em>jsxref(\"Symbol.search\"</em>) for string objects.</p>\n<p>They are listed in the specification in the <a href=\"https://tc39.github.io/ecma262/#sec-well-known-symbols\">Well-known symbols</a> table:</p>\n<ul>\n<li><code>Symbol.hasInstance</code></li>\n<li><code>Symbol.isConcatSpreadable</code></li>\n<li><code>Symbol.iterator</code></li>\n<li><code>Symbol.toPrimitive</code></li>\n<li>…and so on.</li>\n</ul>\n<h3>Global symbol registry</h3>\n<p>There is a global symbol registry holding all available symbols. The methods that access the registry are <em>jsxref(\"Symbol.for()\"</em>) and <em>jsxref(\"Symbol.keyFor()\"</em>); these mediate between the global symbol table (or \"registry\") and the run-time environment. The global symbol registry is mostly built by JavaScript's compiler infrastructure, and the global symbol registry's content is not available to JavaScript's run-time infrastructure, except through these reflective methods.</p>\n<p>The method <code>Symbol.for(tokenString)</code> returns a symbol value from the registry, and <code>Symbol.keyFor(symbolValue)</code> returns a token string from the registry; each is the other's inverse, so the following is <code>true</code>:</p>\n<pre><code class=\"language-js\">Symbol.keyFor(Symbol.for(\"tokenString\")) === \"tokenString\" // true\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Symbol (programming)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types and data structures</a></li>\n<li><a href=\"https://2ality.com/2014/12/es6-symbols.html\">Symbols in ECMAScript 6</a></li>\n<li><em>jsxref(\"Symbol\"</em>) in the MDN JS reference</li>\n<li><em>jsxref(\"Object.getOwnPropertySymbols()\"</em>)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"Primitive\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Symmetric-key cryptography</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Security</li>\n<li>\n<h2>Symmetric-key cryptography</h2>\n</li>\n</ul>\n<blockquote>\n<p>Symmetric-key cryptography is a term used for cryptographic algorithms that use the same key for encryption and for decryption. The key is usually called a \"symmetric key\" or a \"secret key\".</p>\n</blockquote>\n<p>This is usually contrasted with <em>Glossary(\"public-key cryptography\"</em>), in which keys are generated in pairs and the transformation made by one key can only be reversed using the other key.</p>\n<p>Symmetric-key algorithms should be secure when used properly and are highly efficient, so they can be used to encrypt large amounts of data without having a negative effect on performance.</p>\n<p>Most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data one block at a time. The size of each block is fixed and determined by the algorithm: for example <em>Glossary(\"AES\"</em>) uses 16-byte blocks. Block ciphers are always used with a _<em>Glossary(\"Block cipher mode of operation\", \"mode\"</em>)_, which specifies how to securely encrypt messages that are longer than the block size. For example, AES is a cipher, while CTR, CBC, and GCM are all modes. Using an inappropriate mode, or using a mode incorrectly, can completely undermine the security provided by the underlying cipher.</p>\n<h4>See also</h4>\n<ul>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Block cipher mode of operation\"</em>)</li>\n<li><em>Glossary(\"Cryptography\"</em>)</li>\n<li><em>Glossary(\"Cryptographic hash function\"</em>)</li>\n<li><em>Glossary(\"Symmetric-key cryptography\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Synchronous</h2>\n<ul>\n<li>Glossary</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Synchronous</em> refers to real-time communication where each party receives (and if necessary, processes and replies to) messages instantly (or as near to instantly as possible).</p>\n</blockquote>\n<p>A human example is the telephone — during a telephone call you tend to respond to another person immediately.</p>\n<p>Many programming commands are also synchronous — for example when you type in a calculation, the environment will return the result to you instantly, unless you program it not to.</p>\n<h4>See also</h4>\n<ul>\n<li><em>glossary(\"Asynchronous\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests\">Synchronous and asynchronous requests</a> using the <a href=\"/en-US/docs/Web/API/XMLHttpRequest\">XMLHttpRequest()</a> <em>glossary(\"API\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  Syntax error</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>An <em>Glossary(\"exception\"</em>) caused by the incorrect use of a pre-defined <em>Glossary(\"syntax\"</em>). Syntax errors are detected while compiling or parsing source code.</p>\n</blockquote>\n<p>For example, if you leave off a closing brace (<code>}</code>) when defining a <em>Glossary(\"JavaScript\"</em>) function, you trigger a syntax error.  Browser development tools display <em>Glossary(\"JavaScript\"</em>) and <em>Glossary(\"CSS\"</em>) syntax errors in the console.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Syntax error\"</em>) on Wikipedia</li>\n<li><em>jsxref(\"SyntaxError\"</em>) JavaScript object</li>\n</ul>\n<hr>\n<h2>Term:  Syntax</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Syntax</h2>\n</li>\n</ul>\n<blockquote>\n<p>Syntax specifies the required combination and sequence of <em>Glossary(\"character\",\"characters\"</em>) making up correctly structured code. Syntax generally includes grammar and the rules that apply to writing it, such as indentation requirements in Python.</p>\n</blockquote>\n<p>Syntax varies from language to language (e.g., syntax is different in <em>Glossary(\"HTML\"</em>) and <em>Glossary(\"JavaScript\"</em>)). Although languages can share few similarities in terms of their syntaxes for example \"operand operator operand\" rule in javaScript and python. This does not mean the two languages share similarities with syntax.</p>\n<p>Syntax applies both to programming languages (commands to the computer) and markup languages (document structure information) alike.</p>\n<p>Syntax only governs ordering and structure; the instructions must also be <em>meaningful</em>, which is the province of <em>Glossary(\"semantics\"</em>).</p>\n<p>Code must have correct syntax in order to <em>Glossary(\"compile\"</em>) correctly, otherwise a <em>Glossary(\"syntax error\"</em>) occurs. Even small errors, like a missing parenthesis, can stop source code from compiling successfully.</p>\n<p>Frameworks are said to have a \"clean\" syntax if they produce simple, readable, concise results. If a codebase uses \"a lot of syntax\", it requires more characters to achieve the same functionality.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Syntax (programming languages)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Synthetic monitoring</h2>\n<ul>\n<li>Glossary</li>\n<li>RUM</li>\n<li>Reference</li>\n<li>Synthetic monitoring</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Synthetic monitoring</strong> involves monitoring the performance of a page in a 'laboratory' environment, typically with automation tooling in an environment that is as consistent as possible.</p>\n</blockquote>\n<p>With a consistent baseline, synthetic monitoring is good for measuring the effects of code changes on performance. However, it doesn't necessarily reflect what users are experiencing.</p>\n<p>Synthetic Monitoring involves deploying scripts to simulate the path an end-user might take through a web application, reporting back the performance of the simulator experiences. Examples of popular synthetic monitoring tools include <a href=\"https://webpagetest.org\">WebPageTest</a> and <a href=\"https://developers.google.com/web/tools/lighthouse/\">Lighthouse</a>. The traffic measured is not of your actual users, but rather synthetically generated traffic collecting data on page performance.</p>\n<p>Unlike <a href=\"/en-US/docs/Glossary/Real_User_Monitoring\">RUM</a>, synthetic monitoring provides a narrow view of performance that doesn't account for user differences, making it useful in getting basic data about an application's performance and spot-checking performance in development environments. Combined with other tools, such as network throttling, can provide excellent insight into potential problem areas.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Glossary/Real_User_Monitoring\">Real User Monitoring (RUM)</a></li>\n<li><a href=\"/en-US/docs/Web/Performance/Rum-vs-Synthetic\">Real User Monitoring (RUM) versus Synthetic Monitoring</a></li>\n<li><a href=\"/en-US/docs/Glossary/beacon\">Beacon</a></li>\n</ul>\n<hr>\n<h2>Term:  Table Grid Box</h2>\n<ul>\n<li>Glossary</li>\n<li>CSS</li>\n<li>\n<h2>Tables</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>Table Grid Box</strong> is a block level box which contains all of the table internal boxes, excluding the caption. The box which includes the caption is referred to as the <a href=\"/en-US/docs/Glossary/Table_Wrapper_Box\">Table Wrapper Box</a>.</p>\n</blockquote>\n<hr>\n<h2>Term:  Table Wrapper Box</h2>\n<ul>\n<li>Glossary</li>\n<li>CSS</li>\n<li>\n<h2>Tables</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <strong>Table Wrapper Box</strong> is the box generated around <a href=\"/en-US/docs/Glossary/Table_Grid_Box\">table grid boxes</a> which accounts for the space needed for any caption displayed for the table. This box will become the containing block for absolutely positioned items where the table is the containing block.</p>\n</blockquote>\n<hr>\n<h2>Term:  Tag</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>\n<h2>Intro</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"HTML\"</em>), a <strong>tag</strong> is used for creating an <em>Glossary(\"element\"</em>).</p>\n</blockquote>\n<p>The name of an HTML element is the name used in angle brackets such as <code>&#x3C;p></code> for paragraph. Note that the end tag's name is preceded by a slash character, <code>&#x3C;/p></code>, and that in <em>glossary(\"empty element\", \"empty elements\"</em>), the end tag is neither required nor allowed. If <em>Glossary(\"attribute\", \"attributes\"</em>) are not mentioned, default values are used in each case.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"HTML element\"</em>) on Wikipedia</li>\n<li><a href=\"https://html.spec.whatwg.org/multipage/syntax.html#elements-2\">HTML elements syntax</a> on <em>glossary(\"WHATWG\"</em>)</li>\n<li><a href=\"/en-US/docs/Learn/HTML/Introduction_to_HTML\">Introduction to HTML</a></li>\n</ul>\n<hr>\n<h2>Term:  TCP handshake</h2>\n<ul>\n<li>Glossary</li>\n<li>Networking</li>\n<li>SSL</li>\n<li>Security</li>\n<li>TCP</li>\n<li>TCP handshake</li>\n<li>TLS</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>glossary('Transmission Control Protocol (TCP)','TCP (Transmission Control Protocol)'</em>) uses a <strong>three-way handshake</strong> (aka TCP-handshake, three message handshake, and/or SYN-SYN-ACK) to set up a TCP/IP connection over an IP based network.</p>\n</blockquote>\n<p>The three messages transmitted by TCP to negotiate and start a TCP session are nicknamed SYN, <em>SYN-ACK</em>, and ACK for <strong>SYN</strong>chronize, <strong>SYN</strong>chronize-<strong>ACK</strong>nowledgement, and <strong>ACK</strong>nowledge respectively. The three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as HTTP browser requests.</p>\n<p>The host, generally the browser, sends a TCP SYNchronize packet to the server. The server receives the SYN and sends back a SYNchronize-ACKnowledgement. The host receives the server's SYN-ACK and sends an ACKnowledge. The server receives ACK and the TCP socket connection is established.</p>\n<p>This handshake step happens after a <em>glossary('DNS', 'DNS lookup'</em>) and before the <em>glossary('TLS'</em>) handshake, when creating a secure connection. The connection can be terminated independently by each side of the connection via a four-way handshake.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Security/Transport_Layer_Security\">Transport Layer Security (TLS) protocol</a></li>\n<li><em>Glossary(\"HTTPS\"</em>)</li>\n<li><em>Interwiki(\"wikipedia\", \"Transport Layer Security\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  TCP slow start</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>TCP</li>\n<li>Transmission Control Protocol</li>\n<li>Web Performance</li>\n<li>\n<h2>data</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>glossary('TCP'</em>) slow start helps buildup transmission speeds to the network's capabilities. It does this without initially knowing what those capabilities are and without creating congestion. <em>glossary('TCP'</em>) slow start is an algorithm used to detect the available bandwidth for packet transmission, and balances the speed of a network connection. It prevents the appearance of network congestion whose capabilities are initially unknown, and slowly increases the volume of information diffused until the network's maximum capacity is found.</p>\n</blockquote>\n<p>To implement TCP slow start, the congestion window (<em>cwnd</em>) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ACK). The slow start threshold (<em>ssthresh</em>) determines the (de)activation of slow start. When a new connection is made, cwnd is initialized to one TCP data or acknowledgment packet, and waits for an acknowledgement, or ACK. When that ACK is received, the congestion window is incremented until the <em>cwnd</em> is greater than <em>ssthresh</em>. Slow start also terminates when congestion is experienced.</p>\n<h2>Congestion control</h2>\n<p>Congestion itself is a state that happens within a network layer when the message traffic is too busy it slows the network response time. The server sends data in TCP packets, the user's client then confirms delivery by returning acknowledgements, or ACKs. The connection has a limited capacity depending on hardware and network conditions. If the server sends too many packets too quickly, they will be dropped. Meaning, there will be no acknowledgement. The server registers this as missing ACKs. Congestion control algorithms use this flow of sent packets and ACKs to determine a send rate.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Performance/How_browsers_work\">Populating the page: how browsers work</a></li>\n<li><a href=\"/en-US/docs/Web/HTTP/Overview\">http overview</a></li>\n</ul>\n<hr>\n<h2>Term:  TCP</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>TCP</li>\n<li>Transmission Control Protocol</li>\n<li>\n<h2>data</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>TCP (Transmission Control Protocol)</strong> is an important network <em>Glossary(\"protocol\"</em>) that lets two hosts connect and exchange data streams.  TCP guarantees the delivery of data and packets in the same order as they were sent.  Vint Cerf and Bob Kahn, who were DARPA scientists at the time, designed TCP in the 1970s.</p>\n</blockquote>\n<p>TCP's role is to ensure the packets are reliably delivered, error free.  TCP has concurrence control, which means the initial requests start small, increasing in size to the levels of bandwidth the computers, servers, and network can support.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Transmission Control Protocol\"</em>) (Wikipedia)</li>\n<li><a href=\"/en-US/docs/Web/HTTP/Overview\">HTTP Overview</a></li>\n<li><a href=\"/en-US/docs/Web/Performance/How_browsers_work\">How browsers work</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"IPv4\"</em>)</li>\n<li><em>Glossary(\"IPv6\"</em>)</li>\n<li><em>Glossary(\"Packet\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Telnet</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Telnet</strong> is a command line tool and an underlying TCP/IP protocol for accessing remote computers.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki('wikipedia','Telnet'</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Texel</h2>\n<ul>\n<li>3D</li>\n<li>Drawing</li>\n<li>Glossary</li>\n<li>Graphics</li>\n<li>Texel</li>\n<li>\n<h2>Texture</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>Texel</strong> is a single-pixel within a texture map, which is an image that gets used (in whole or in part) as the image presented on a polygon's surface within a 3D rendered image. It is not to be confused with pixel which is the unit of screen space. This is one of the main differences between Texel’s and pixels, pixels are image data. Texel components are made up of subjective data, therefore they can be an image as well as a depth map.</p>\n</blockquote>\n<p>The process of mapping the appropriate Texel’s to their corresponding points on a polygon is called <strong>texture mapping</strong>, which is a stage of the process of rendering a 3D image for display. Texture mapping is typically done prior to lighting the scene; however, in WebGL, lighting is performed as part of the texture mapping process.</p>\n<p>Textures are characterised by collections of Texel’s, as how images are characterised by collections of pixels. When texture mapping occurs the renderer maps Texel’s to the appropriate pixels.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Texel (graphics)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL\">Using textures in WebGL</a></li>\n<li><a href=\"/en-US/docs/Web/API/WebGL_API/Tutorial/Lighting_in_WebGL\">Lighting in WebGL</a></li>\n<li><a href=\"/en-US/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL\">Animating textures in WebGL</a></li>\n</ul>\n<hr>\n<h2>Term:  Thread</h2>\n<ul>\n<li>Glossary</li>\n<li>Thread</li>\n<li>\n<h2>asynchronous</h2>\n</li>\n</ul>\n<blockquote>\n<p>Thread in computer science is the execution of running multiple tasks or programs at the same time. Each unit capable of executing code is called a <strong>thread</strong>.</p>\n</blockquote>\n<p>However, modern <em>Glossary(\"JavaScript\"</em>) offers ways to create additional threads, each executing independently while possibly communicating between one another. This is done using technologies such as <strong><a href=\"/en-US/docs/Web/API/Web_Workers_API\">web workers</a></strong>, which can be used to spin off a sub-program which runs concurrently with the main thread in a thread of its own. This allows slow, complex, or long-running tasks to be executed independently of the main thread, preserving the overall performance of the site or app—as well as that of the browser overall. This also allows individuals to take advantage of modern multi-core processors.</p>\n<p>A special type of worker, called a <strong><a href=\"/en-US/docs/Web/API/Service_Worker_API\">service worker</a></strong>, can be created which can be left behind by a site—with the user's permission—to run even when the user isn't currently using that site. This is used to create sites capable of notifying the user when things happen while they're not actively engaged with a site. Such as notifying a user they have received new email even though they're not currently logged into their mail service.</p>\n<p>Overall it can be observed these threads within our operating system are extremely helpful. They help minimize the context switching time, enables more efficient communication and allows further use of the multiprocessor architecture.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/JavaScript/Asynchronous\">Asynchronous JavaScript</a></li>\n<li><a href=\"/en-US/docs/Web/API/Web_Workers_API\">Web worker API</a></li>\n<li><a href=\"/en-US/docs/Web/API/Service_Worker_API\">Service worker API</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Main thread\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Three js</h2>\n<ul>\n<li>Browser</li>\n<li>CodingScripting</li>\n<li>JavaScript</li>\n<li>Programming Language</li>\n<li>\n<h2>three.js</h2>\n</li>\n</ul>\n<blockquote>\n<p>three.js is a <em>Glossary(\"JavaScript\"</em>)-based <em>Glossary(\"WebGL\"</em>) engine that can run GPU-powered games and other graphics-powered apps straight from the <em>Glossary(\"browser\"</em>). The three.js library provides many features and <em>Glossary(\"API\",\"APIs\"</em>) for drawing 3D scenes in your browser.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Three.js\"</em>) on Wikipedia</li>\n<li><a href=\"https://threejs.org/\">three.js official website</a></li>\n</ul>\n<hr>\n<h2>Term:  Time to first byte</h2>\n<ul>\n<li>Glossary</li>\n<li>Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Time to First Byte</strong> (TTFB) refers to the time between the browser requesting a page and when it receives the first byte of information from the server.  This time includes <a href=\"/en-US/docs/Glossary/DNS\">DNS</a> lookup and establishing the connection using a <a href=\"/en-US/docs/Glossary/TCP\">TCP</a> handshake and <a href=\"/en-US/docs/Glossary/SSL\">SSL</a> handshake if the request is made over <a href=\"/en-US/docs/Glossary/https\">https</a>.</p>\n</blockquote>\n<p>TTFB is the time it takes between the start of the request and the start of the response, in milliseconds:</p>\n<pre><code>TTFB = responseStart - navigationStart\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Session\">A typical HTTP session</a></li>\n<li><a href=\"/en-US/docs/Web/API/PerformanceResourceTiming\">PerformanceResourceTiming</a></li>\n<li><a href=\"/en-US/docs/Web/API/PerformanceTiming\">PerformanceTiming</a></li>\n</ul>\n<hr>\n<h2>Term:  Time to interactive</h2>\n<ul>\n<li>Glossary</li>\n<li>Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Time to Interactive</strong> (TTI) is a non-standardized web performance 'progress' metric defined as the point in time when the last <a href=\"/en-US/docs/Web/API/Long_Tasks_API\">Long Task</a> finished and was followed by 5 seconds of network and main thread inactivity.</p>\n</blockquote>\n<p>TTI, proposed by the Web Incubator Community Group in 2018, is intended to provide a metric that describes when a page or application contains useful content and the main thread is idle and free to respond to user interactions, including having event handlers registered.</p>\n<h4>Caveat:</h4>\n<p>TTI is derived by leveraging information from the <em>domxref(\"Long Tasks API\"</em>). Although available in some performance monitoring tools, TTI is not a part of any official web specification at the time of writing.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://github.com/WICG/time-to-interactive\">Definition of TTI</a> from Web Incubator Community Group</li>\n<li><a href=\"https://building.calibreapp.com/time-to-interactive-focusing-on-the-human-centric-metrics-22eb7e64dd23\">Time to Interactive — focusing on human-centric metrics</a> by Radimir Bitsov</li>\n<li><a href=\"https://web.dev/user-centric-performance-metrics/#tracking_tti\">Tracking TTI</a></li>\n</ul>\n<hr>\n<h2>Term:  TLD</h2>\n<ul>\n<li>Glossary</li>\n<li>Web</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>A TLD (<em>top-level domain</em>) is the most generic <em>Glossary(\"domain\"</em>) in the Internet's hierarchical <em>Glossary(\"DNS\"</em>) (domain name system). A TLD is the final component of a <em>Glossary(\"domain name\"</em>), for example, \"org\" in <code>developer.mozilla.org</code>.</p>\n</blockquote>\n<p><em>Glossary(\"ICANN\"</em>) (Internet Corporation for Assigned Names and Numbers) designates organizations to manage each TLD. Depending on how strict an administrating organization might be, TLD often serves as a clue to the purpose, ownership, or nationality of a website.</p>\n<p>Consider an example Internet address: <code>https://developer.mozilla.org</code>\nHere org is the TLD; mozilla.org is the second-level domain name; and developer is a subdomain name. All together, these constitute a fully-qualified domain name; the addition of https:// makes this a complete URL.</p>\n<p><em>Glossary(\"IANA\"</em>) today distinguishes the following groups of top-level domains:</p>\n<ul>\n<li>\n<p>country-code top-level domains (ccTLD)</p>\n<ul>\n<li>: Two-character domains established for countries or territories. Example: <em>.us</em> for United States.</li>\n</ul>\n</li>\n<li>\n<p>internationalized country code top-level domains (IDN ccTLD)</p>\n<ul>\n<li>: ccTLDs in non-Latin character sets (e.g., Arabic or Chinese).</li>\n</ul>\n</li>\n<li>\n<p>generic top-level domains (gTLD)</p>\n<ul>\n<li>: Top-level domains with three or more characters.</li>\n</ul>\n</li>\n<li>\n<p>unsponsored top-level domains</p>\n<ul>\n<li>: Domains that operate directly under policies established by ICANN processes for the global Internet community, for example \"com\" and \"edu\".</li>\n</ul>\n</li>\n<li>\n<p>sponsored top-level domains (sTLD)</p>\n<ul>\n<li>: These domains are proposed and sponsored by private organizations that decide whether an applicant is eligible to use the TLD, based on community theme concepts.</li>\n</ul>\n</li>\n<li>\n<p>infrastructure top-level domain</p>\n<ul>\n<li>: This group consists of one domain, the <em>Glossary(\"ARPA\", \"Address and Routing Parameter Area\"</em>) (ARPA).</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"TLD\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.iana.org/domains/root/db\">List of top-level domains</a></li>\n</ul>\n<hr>\n<h2>Term:  Transport Layer Security (TLS)</h2>\n<ul>\n<li>Cryptography</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Security</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Transport Layer Security (TLS)</strong>, formerly known as <em>Glossary(\"SSL\", \"Secure Sockets Layer (SSL)\"</em>), is a <em>Glossary(\"protocol\"</em>) used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols. Both SSL and TLS are client / server protocols that ensure communication privacy by using cryptographic protocols to provide security over a network. When a server and client communicate using TLS, it ensures that no third party can eavesdrop or tamper with any message.</p>\n</blockquote>\n<p>All modern browsers support the TLS protocol, requiring the server to provide a valid <em>Glossary(\"Digital certificate\", \"digital certificate\"</em>) confirming its identity in order to establish a secure connection. It is possible for both the client and server to mutually authenticate each other, if both parties provide their own individual digital certificates.</p>\n<blockquote>\n<p><strong>Note:</strong> TLS 1.0 and 1.1 support will be removed from all major browsers in early 2020; you'll need to make sure your web server supports TLS 1.2 or 1.3 going forward. From version 74 onwards, Firefox will return a <a href=\"https://support.mozilla.org/en-US/kb/secure-connection-failed-firefox-did-not-connect\">Secure Connection Failed</a> error when connecting to servers using the older TLS versions (<em>bug(1606734</em>)).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Transport Layer Security\"</em>) (Wikipedia)</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc5246\">RFC 5246</a> (The Transport Layer Security Protocol, Version 1.2)</li>\n<li><a href=\"/en-US/docs/Web/Security/Transport_Layer_Security\">Transport Layer Security</a></li>\n<li><a href=\"https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet\">OWASP: Transport Layer Protection Cheat Sheet</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"HTTPS\"</em>)</li>\n<li><em>Glossary(\"SSL\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  TOFU</h2>\n<ul>\n<li>HTTP</li>\n<li>SSH</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Trust On First Use</strong> <strong>(TOFU</strong>) is a security model in which a client needs to create a trust relationship with an unknown server. To do that, clients will look for identifiers (for example public keys) stored locally. If an identifier is found, the client can establish the connection. If no identifier is found, the client can prompt the user to determine if the client should trust the identifier.</p>\n</blockquote>\n<p>TOFU is used in the SSH protocol, in <a href=\"/en-US/docs/Web/HTTP/Public_Key_Pinning\">HTTP Public Key Pinning</a> (<em>Glossary(\"HPKP\"</em>)) where the browsers will accept the first public key returned by the server, and in <em>HTTPHeader(\"Strict-Transport-Security\"</em>)  (<em>Glossary(\"HSTS\"</em>)) where a browser will obey the redirection rule.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/HTTP/Public_Key_Pinning\">HTTP Public Key Pinning</a> (<em>Glossary(\"HPKP\"</em>))</li>\n<li><em>HTTPHeader(\"Public-Key-Pins\"</em>)</li>\n<li>Wikipedia: <a href=\"https://en.wikipedia.org/wiki/Trust_on_first_use\">TOFU</a></li>\n</ul>\n<hr>\n<h2>Term:  Transferable objects</h2>\n<ul>\n<li>Transferable</li>\n<li>\n<h2>Workers</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Transferable objects</strong> are objects that own resources that can be <em>transferred</em> from one context to another, ensuring that the resources are only available in one context at a time.\nFollowing a transfer, the original object is no longer usable; it no longer points to the transferred resource, and any attempt to read or write the object will throw an exception.</p>\n</blockquote>\n<p><em>Transferrable objects</em> are commonly use to share resources that can only be safely exposed to a single JavaScript thread at a time.\nFor example, an <em>jsxref(\"ArrayBuffer\"</em>) is a transferrable object that owns a block of memory.\nWhen such a buffer is transferred between threads, the associated memory resource is detached from the original buffer and attached to the buffer object created in the new thread.\nThe buffer object in the original thread is no longer usable because it no longer owns a memory resource.</p>\n<p>Transferring may also be used when creating deep copies of objects with <em>domxref(\"structuredClone()\"</em>).\nFollowing the cloning operation, the transferred resources are moved rather than copied to the cloned object.</p>\n<p>The mechanism used to transfer an object's resources depends on the object.\nFor example, when an <em>jsxref(\"ArrayBuffer\"</em>) is transferred between threads, the memory resource that it points to is <em>literally</em> moved between contexts in a fast and efficient zero-copy operation.\nOther objects may be transferred by copying the associated resource and then deleting it from the old context.</p>\n<p>Not all objects are transferable.\nA list of transferable objects is <a href=\"#supported_objects\">provided below</a>.</p>\n<h2>Transferring objects between threads</h2>\n<p>The code below demonstrates how transferring works when sending a message from a main thread to a <em>domxref(\"Web Workers API\", \"web worker thread\",\"\",\"true\"</em>).\nThe <em>jsxref(\"Uint8Array\"</em>) is copied (duplicated) in the worker while its buffer is transferred.\nAfter transfer any attempt to read or write <code>uInt8Array</code> from the main thread will throw, but you can still check the <code>byteLength</code> to confirm it is now zero.</p>\n<pre><code class=\"language-js\">// Create an 8MB \"file\" and fill it.\nvar uInt8Array = new Uint8Array(1024 * 1024 * 8); // 8MB\nfor (var i = 0; i &#x3C; uInt8Array.length; ++i) {\n  uInt8Array[i] = i;\n}\nconsole.log(uInt8Array.byteLength);  // 8388608\n\n// Transfer the underlying buffer to a worker\nworker.postMessage(uInt8Array, [uInt8Array.buffer]);\nconsole.log(uInt8Array.byteLength);  // 0\n</code></pre>\n<blockquote>\n<p><strong>Note:</strong> <a href=\"en-US/docs/Web/JavaScript/Typed_arrays\">Typed arrays</a> like <em>jsxref(\"Int32Array\"</em>) and <em>jsxref(\"Uint8Array\"</em>), are serializable, but not transferable.\nHowever their underlying buffer is an <em>jsxref(\"ArrayBuffer\"</em>), which is a transferable object.\nWe could have sent <code>uInt8Array.buffer</code> in the data parameter, but not <code>uInt8Array</code> in the transfer array.</p>\n</blockquote>\n<h3>Transferring during a cloning operation</h3>\n<p>The code below shows a <em>domxref(\"structuredClone()\"</em>) operation where the underlying buffer is copied from the original object to the clone.</p>\n<pre><code class=\"language-js\">const original = new Uint8Array(1024);\nconst clone = structuredClone(original);\nconsole.log(original.byteLength);  // 1024\nconsole.log(clone.byteLength);  // 1024\n\noriginal[0] = 1;\nconsole.log(clone[0]);  // 0\n\n// Transferring the Uint8Array would throw an exception as it is not a transferrable object\n// const transferred = structuredClone(original, {transfer: [original]}); \n\n// We can transfer Uint8Array.buffer.\nconst transferred = structuredClone(original, {transfer: [original.buffer]});\nconsole.log(transferred.byteLength);  // 1024\nconsole.log(transferred[0]);  // 1\n\n// After transferring Uint8Array.buffer cannot be used.\nconsole.log(original.byteLength);  // 0\n</code></pre>\n<h2>Supported objects</h2>\n<p>The items that can be <em>transferred</em> are:</p>\n<ul>\n<li><em>jsxref(\"ArrayBuffer\"</em>)</li>\n<li><em>domxref(\"MessagePort\"</em>)</li>\n<li><em>domxref(\"ReadableStream\"</em>)</li>\n<li><em>domxref(\"WritableStream\"</em>)</li>\n<li><em>domxref(\"TransformStream\"</em>)</li>\n<li><em>domxref(\"AudioData\"</em>)</li>\n<li><em>domxref(\"ImageBitmap\"</em>)</li>\n<li><em>domxref(\"VideoFrame\"</em>)</li>\n<li><em>domxref(\"OffscreenCanvas\"</em>)</li>\n</ul>\n<blockquote>\n<p><strong>Note:</strong> Transferrable objects are marked up in <a href=\"https://github.com/w3c/webref/tree/main/ed/idl\">Web IDL files</a> with the attribute <code>Transferrable</code>.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast\">Transferable Objects: Lightning Fast!</a></li>\n<li><a href=\"/en-US/docs/Web/API/Web_Workers_API/Using_web_workers\">Using Web Workers</a></li>\n<li><a href=\"https://html.spec.whatwg.org/multipage/structured-data.html#transferable-objects\">Transferable objects in the HTML specification</a></li>\n<li>\n<h2><em>domxref(\"DedicatedWorkerGlobalScope.postMessage()\"</em>)</h2>\n</li>\n</ul>\n<h2>Term:  Transient activation</h2>\n<ul>\n<li>Transient activation</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Transient activation</strong> (or \"transient user activation\") is a window state that indicates a user has recently pressed a button, moved a mouse, used a menu, or performed some other user interaction.</p>\n</blockquote>\n<p>This state is sometimes used as a mechanism for ensuring that a web API can only function if triggered by user interaction.\nFor example, scripts cannot arbitrarily launch a popup that requires <em>transient activation</em> ⁠—it must be triggered from a UI element's event handler.</p>\n<p>Examples of APIs that require <em>transient activation</em> are:</p>\n<ul>\n<li><em>domxref(\"MediaDevices.selectAudioOutput()\"</em>)</li>\n</ul>\n<blockquote>\n<p><strong>Note:</strong> Transient activation expires after a timeout (if not renewed by further interaction), and may also be \"consumed\" by some APIs.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>domxref(\"MediaDevices.selectAudioOutput()\"</em>)</li>\n<li><a href=\"https://html.spec.whatwg.org/multipage/interaction.html#transient-activation\">HTML Living Standard > Transient activation</a></li>\n</ul>\n<hr>\n<h2>Term:  Tree shaking</h2>\n<ul>\n<li>JavaScript</li>\n<li>Modules</li>\n<li>Statement</li>\n<li>Web Performance</li>\n<li>export</li>\n<li>import</li>\n<li>\n<h2>tree shaking</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Tree shaking</strong> is a term commonly used within a JavaScript context to describe the removal of dead code.</p>\n</blockquote>\n<p>It relies on the <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/import\">import</a> and <a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/export\">export</a> statements in ES2015 to detect if code modules are exported and imported for use between JavaScript files.</p>\n<p>In modern JavaScript applications, we use module bundlers (e.g., <a href=\"https://webpack.js.org/\">webpack</a> or <a href=\"https://github.com/rollup/rollup\">Rollup</a>) to automatically remove dead code when bundling multiple JavaScript files into single files. This is important for preparing code that is production ready, for example with clean structures and minimal file size.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://exploringjs.com/es6/ch_modules.html#_benefit-dead-code-elimination-during-bundling\">\"Benefits of dead code elimination during bundling\"</a> in Axel Rauschmayer's book: \"Exploring JS: Modules\"</li>\n<li><a href=\"https://webpack.js.org/guides/tree-shaking/\">Tree shaking implementation with webpack</a></li>\n</ul>\n<hr>\n<h2>Term:  Trident</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>Trident</h2>\n</li>\n</ul>\n<blockquote>\n<p>Trident (or MSHTML) was a layout engine that powered <em>Glossary(\"Microsoft Internet Explorer\",\"Internet Explorer\"</em>). A Trident <em>Glossary(\"fork\"</em>) called <em>EdgeHTML</em> replaced Trident in Internet Explorer's successor, <em>Glossary(\"Microsoft Edge\",\"Edge\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Trident_%28layout_engine%29\">Trident layout engine</a> on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Truthy</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>In <em>Glossary(\"JavaScript\"</em>), a <strong>truthy</strong> value is a value that is considered <code>true</code> when encountered in a <em>Glossary(\"Boolean\"</em>) context. All values are truthy unless they are defined as <em>Glossary(\"Falsy\", \"falsy\"</em>) (i.e., except for <code>false</code>, <code>0</code>, <code>-0</code>, <code>0n</code>, <code>\"\"</code>, <code>null</code>, <code>undefined</code>, and <code>NaN</code>).</p>\n</blockquote>\n<p><em>Glossary(\"JavaScript\"</em>) uses <em>Glossary(\"Type</em>Coercion\", \"type coercion\"_) in Boolean contexts.</p>\n<p>Examples of <em>truthy</em> values in JavaScript (which will be coerced to <code>true</code> in boolean contexts, and thus execute the <code>if</code> block):</p>\n<pre><code class=\"language-js\">if (true)\nif ({})\nif ([])\nif (42)\nif (\"0\")\nif (\"false\")\nif (new Date())\nif (-42)\nif (12n)\nif (3.14)\nif (-3.14)\nif (Infinity)\nif (-Infinity)\n</code></pre>\n<h3>The logical AND operator, &#x26;&#x26;</h3>\n<p>If the first object is truthy, the <a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND\">logical AND operator</a> returns the second operand:</p>\n<pre><code class=\"language-js\">true &#x26;&#x26; \"dog\"\n// returns \"dog\"\n\n[] &#x26;&#x26; \"dog\"\n// returns \"dog\"\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Glossary(\"Falsy\"</em>)</li>\n<li><em>Glossary(\"Type</em>Coercion\", \"Type coercion\"_)</li>\n<li><em>Glossary(\"Boolean\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  TTL</h2>\n<ul>\n<li>Caching</li>\n<li>Domain Name System</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>\n<h2>Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p>Time To Live (TTL) can refer to either the lifetime of a packet in a network, or the expiry time of cached data.</p>\n</blockquote>\n<h2>Networking</h2>\n<p>In networking, the TTL, embedded in the packet, is a usually defined as a number of hops or as an expiration timestamp after which the packet is dropped. It provides a way to avoids network congestion, but releasing packets after they roamed the network too long.</p>\n<h2>Caching</h2>\n<p>In the context of caching, TTL (as an unsigned 32-bit integer) being a part of the <em>Glossary(\"Response header\", \"HTTP response header\"</em>) or the <em>Glossary(\"DNS\"</em>) query, indicates the amount of time in seconds during which the resource can be cached by the requester.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Time to live\", \"TTL\"</em>) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc2181#section-8\">RFC 2181</a> on IETF</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc1035\">RFC1035</a> on IETF</li>\n</ul>\n<hr>\n<h2>Term:  TURN</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>TURN</li>\n<li>WebMechanics</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>TURN</strong> (Traversal Using Relays around NAT) is a <em>Glossary('protocol'</em>) enabling a computer to receive and send data from behind a <em>glossary(\"NAT\", \"Network Address Translator\"</em>) (NAT) or firewall. TURN is used by <em>Glossary(\"WebRTC\"</em>) to allow any two devices on the Internet to enter a peer-to-peer connection.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"TURN\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API/Protocols\">WebRTC protocols</a></li>\n<li><a href=\"https://www.ietf.org/rfc/rfc5766.txt\">Specification</a></li>\n<li><a href=\"https://www.ietf.org/rfc/rfc6156.txt\">Specification update for IPv6</a></li>\n</ul>\n<hr>\n<h2>Term:  Type coercion</h2>\n<ul>\n<li>Coercion</li>\n<li>JavaScript</li>\n<li>\n<h2>Type coercion</h2>\n</li>\n</ul>\n<blockquote>\n<p>Type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to numbers). _<em>Glossary(\"Type conversion\"</em>)_ is similar to <em>type coercion</em> because they both convert values from one data type to another with one key difference — <em>type coercion</em> is implicit whereas <em>type conversion</em> can be either implicit <em>or</em> explicit.</p>\n</blockquote>\n<h2>Examples</h2>\n<pre><code class=\"language-js\">const value1 = '5';\nconst value2 = 9;\nlet sum = value1 + value2;\n\nconsole.log(sum);\n</code></pre>\n<p>In the above example, JavaScript has <em>coerced</em> the <code>9</code> from a number into a string and then concatenated the two values together, resulting in a string of <code>59</code>. JavaScript had a choice between a string or a number and decided to use a string.</p>\n<p>The compiler could have coerced the <code>5</code> into a number and returned a sum of <code>14</code>, but it did not. To return this result, you'd have to explicitly convert the <code>5</code> to a number using the <em>jsxref(\"Global</em>Objects/Number\", \"Number()\"_) method:</p>\n<pre><code class=\"language-js\">sum = Number(value1) + value2;\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Type conversion\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Type\"</em>)</li>\n<li><em>Glossary(\"Type conversion\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Type conversion</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Type casting</li>\n<li>\n<h2>Type conversion</h2>\n</li>\n</ul>\n<blockquote>\n<p>Type conversion (or typecasting) means transfer of data from one data type to another. <em>Implicit conversion</em> happens when the compiler automatically assigns data types, but the source code can also <em>explicitly</em> require a conversion to take place. For example, given the instruction <code>5+2.0</code>, the floating point <code>2.0</code> is implicitly typecasted into an integer, but given the instruction <code>Number(\"0x11\")</code>, the string \"0x11\" is explicitly typecasted as the number 17.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Type conversion\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"Type\"</em>)</li>\n<li><em>Glossary(\"Type coercion\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  Type</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Type</strong> is a characteristic of a <em>glossary(\"value\"</em>) affecting what kind of data it can store, and the structure that the data will adhere to. For example, a <em>Glossary(\"boolean\"</em>) <a href=\"/en-US/docs/Web/JavaScript/Data_structures\">Data Type</a> can hold only a <code>true</code> or <code>false</code> value at any given time, whereas a <em>Glossary(\"string\"</em>) has the ability to hold a string or a sequence of characters, a <em>Glossary(\"number\"</em>) can hold numerical values of any kind, and so on.</p>\n</blockquote>\n<p>A value's data type also affects the operations that are valid on that value. For example, a value of type number can be multiplied by another number, but not by a string - even if that string contains <em>only</em> a number, such as the string \"2\".</p>\n<p>Types also provides us with useful knowledge about the comparison between different values. Comparison between structured types is not always an easy assumption, as even if the previous data structure is the same, there could be inherited structures inside of the <a href=\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">Prototype Chain</a>.</p>\n<p>If you are unsure of the type of a value, you can use the <a href=\"/en-US/docs/Web/JavaScript/Reference/Operators/typeof\"><code>typeof</code></a> operator.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Data type\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types</a></li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ul>\n<li><em>Glossary(\"JavaScript\"</em>)</li>\n<li><em>Glossary(\"string\"</em>)</li>\n<li><em>Glossary(\"number\"</em>)</li>\n<li><em>Glossary(\"bigint\"</em>)</li>\n<li><em>Glossary(\"boolean\"</em>)</li>\n<li><em>Glossary(\"null\"</em>)</li>\n<li><em>Glossary(\"undefined\"</em>)</li>\n<li><em>Glossary(\"symbol\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  UDP (User Datagram Protocol)</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>Protocols</li>\n<li>\n<h2>UDP</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>UDP</strong> (User Datagram Protocol) is a long standing <em>glossary(\"protocol\"</em>) used together with <em>glossary(\"IPv6\",\"IP\"</em>) for sending data when transmission speed and efficiency matter more than security and reliability.</p>\n</blockquote>\n<p>UDP uses a simple <a href=\"https://en.wikipedia.org/wiki/Connectionless_communication\" title=\"Connectionless communication\">connectionless communication</a> model with a minimum of protocol mechanism. UDP provides <a href=\"https://en.wikipedia.org/wiki/Checksum\">checksums</a> for data integrity, and <a href=\"https://en.wikipedia.org/wiki/Port_numbers\" title=\"Port numbers\">port numbers</a> for addressing different functions at the source and destination of the datagram. It has no <a href=\"https://en.wikipedia.org/wiki/Handshaking\">handshaking</a> dialogues, and thus exposes the user's program to any <a href=\"https://en.wikipedia.org/wiki/Reliability_(computer_networking)\" title=\"Reliability (computer networking)\">unreliability</a> of the underlying network; There is no guarantee of delivery, ordering, or duplicate protection. If error-correction facilities are needed at the network interface level, an application may use the <a href=\"https://en.wikipedia.org/wiki/Transmission_Control_Protocol\" title=\"Transmission Control Protocol\">Transmission Control Protocol</a> (TCP) or <a href=\"https://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol\" title=\"Stream Control Transmission Protocol\">Stream Control Transmission Protocol</a> (SCTP) which are designed for this purpose.</p>\n<p>UDP is suitable for purposes where error checking and correction are either not necessary or are performed in the application; UDP avoids the overhead of such processing in the <a href=\"https://en.wikipedia.org/wiki/Protocol_stack\" title=\"Protocol stack\">protocol stack</a>. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for packets delayed due to <a href=\"https://en.wikipedia.org/wiki/Retransmission_(data_networks)\" title=\"Retransmission (data networks)\">retransmission</a>, which may not be an option in a <a href=\"https://en.wikipedia.org/wiki/Real-time_system\" title=\"Real-time system\">real-time system</a>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"User Datagram Protocol\"</em>) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc768\">Specification</a></li>\n</ul>\n<hr>\n<h2>Term:  UI</h2>\n<ul>\n<li>Accessibility</li>\n<li>Design</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>User Interface</strong> (UI) is anything that facilitates the interaction between a user and a machine. In the world of computers, it can be anything from a keyboard, a joystick, a screen or a program. In case of computer software, it can be a command-line prompt, a webpage, a user input form, or the front-end of any application.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"User</em>interface\", \"User interface\"_) on Wikipedia</li>\n<li><em>interwiki(\"wikipedia\", \"Front</em>end<em>development\", \"Front end development\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  undefined</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>JavaScript</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong><code>undefined</code></strong> is a <em>Glossary(\"primitive\"</em>) value automatically assigned to <em>glossary(\"variable\", \"variables\"</em>) that have just been declared, or to formal <em>Glossary(\"Argument\",\"arguments\"</em>) for which there are no actual arguments.</p>\n</blockquote>\n<h2>Example</h2>\n<pre><code class=\"language-js\">var x; //create a variable but assign it no value\n\nconsole.log(\"x's value is\", x) //logs \"x's value is undefined\"\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Undefined value\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Data_structures\">JavaScript data types and data structures</a></li>\n</ul>\n<hr>\n<h2>Term:  Unicode</h2>\n<ul>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>Unicode is a standard <em>Glossary(\"Character set\",\"character set\"</em>) that numbers and defines <em>Glossary(\"Character\",\"characters\"</em>) from the world's different languages, writing systems, and symbols.</p>\n</blockquote>\n<p>By assigning each character a number, programmers can create <em>Glossary(\"Character encoding\",\"character encodings\"</em>), to let computers store, process, and transmit any combination of languages in the same file or program.</p>\n<p>Before Unicode, it was difficult and error-prone to mix languages in the same data. For example, one character set would store Japanese characters, and another would store the Arabic alphabet. If it was not clearly marked which parts of the data were in which character set, other programs and computers would display the text incorrectly, or damage it during processing. If you've ever seen text where characters like curly quotes (<code>“”</code>) were replaced with gibberish like <code>Ã‚Â£</code>, then you've seen this problem, known as <em>Interwiki(\"wikipedia\", \"Mojibake\"</em>).</p>\n<p>The most common Unicode character encoding on the Web is <em>Glossary(\"UTF-8\"</em>). Other encodings exist, like UTF-16 or the obsolete UCS-2, but UTF-8 is recommended.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Unicode\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.unicode.org/standard/principles.html\">The Unicode Standard: A Technical Introduction</a></li>\n</ul>\n<hr>\n<h2>Term:  URI</h2>\n<ul>\n<li>Glossary</li>\n<li>HTTP</li>\n<li>Search</li>\n<li>URI</li>\n<li>\n<h2>URL</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>URI</strong> <em>(Uniform Resource Identifier)</em> is a string that refers to a resource.</p>\n</blockquote>\n<p>The most common are <em>Glossary(\"URL\",\"URL\"</em>)s, which identify the resource by giving its location on the Web. <em>Glossary(\"URN\",\"URN\"</em>)s, by contrast, refer to a resource by a name, in a given namespace, such as the ISBN of a book.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"URI\"</em>) on Wikipedia</li>\n<li><a href=\"https://datatracker.ietf.org/doc/html/rfc3986\">RFC 3986 on URI</a></li>\n</ul>\n<hr>\n<h2>Term:  URL</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Uniform Resource Locator</strong> (<strong>URL</strong>) is a text string that specifies where a resource (such as a web page, image, or video) can be found on the Internet.</p>\n</blockquote>\n<p>In the context of <em>Glossary(\"HTTP\"</em>), URLs are called \"Web address\" or \"link\". Your <em>glossary(\"browser\"</em>) displays URLs in its address bar, for example: <code>https://developer.mozilla.org</code> Some browsers display only the part of a URL after the \"//\", that is, the <em>Glossary(\"Domain name\"</em>).</p>\n<p>URLs can also be used for file transfer (<em>Glossary(\"FTP\"</em>)) , emails (<em>Glossary(\"SMTP\"</em>)), and other applications.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"URL\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Learn/Common_questions/What_is_a_URL\">Understanding URLs and their structure</a></li>\n<li>The syntax of URLs is defined in the <a href=\"https://url.spec.whatwg.org/\">URL Living Standard</a></li>\n</ul>\n<hr>\n<h2>Term:  URN</h2>\n<ul>\n<li>Glossary</li>\n<li>Intro</li>\n<li>Navigation</li>\n<li>\n<h2>urn</h2>\n</li>\n</ul>\n<blockquote>\n<p>URN (Uniform Resource Name) is a <em>Glossary(\"URI\"</em>) in a standard format, referring to a resource without specifying its location or whether it exists. This example comes from <a href=\"https://www.ietf.org/rfc/rfc3986.txt\">RFC3986</a>: <code>urn:oasis:names:specification:docbook:dtd:xml:4.1.2</code></p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"URN\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Usenet</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p>Usenet is an internet discussion system where each post is duplicated on many servers. The equivalent of Internet forums in its day, Usenet functioned like a bulletin board system.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Usenet\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  User agent</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>UA</li>\n<li>User-agent</li>\n<li>Web Browser</li>\n<li>WebMechanics</li>\n<li>agent</li>\n<li>user agent</li>\n<li>\n<h2>userAgent</h2>\n</li>\n</ul>\n<blockquote>\n<p>A user agent is a computer program representing a person, for example, a <em>Glossary(\"Browser\",\"browser\"</em>) in a <em>Glossary(\"World Wide Web\", \"Web\"</em>) context.</p>\n</blockquote>\n<p>Besides a browser, a user agent could be a bot scraping webpages, a download manager, or another app accessing the Web. Along with each request they make to the server, browsers include a self-identifying <em>HTTPHeader(\"User-Agent\"</em>) <em>Glossary(\"HTTP\"</em>) header called a user agent (UA) string. This string often identifies the browser, its version number, and its host operating system.</p>\n<p>Spam bots, download managers, and some browsers often send a fake UA string to announce themselves as a different client. This is known as <em>user agent spoofing</em>.</p>\n<p>The user agent string can be accessed with <em>Glossary(\"JavaScript\"</em>) on the client side using the <em>domxref(\"Navigator/userAgent\", \"NavigatorID.userAgent\"</em>) property.</p>\n<p>A typical user agent string looks like this: <code>\"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0\"</code>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"User agent\"</em>) on Wikipedia</li>\n<li><em>domxref(\"Navigator/userAgent\", \"NavigatorID.userAgent\"</em>)</li>\n<li><a href=\"/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent\">Browser detection using the user agent</a></li>\n<li><em>RFC(2616, \"14.43\"</em>): The <code>User-Agent</code> header</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary:</a></p>\n<ul>\n<li><em>Glossary(\"Browser\"</em>)</li>\n</ul>\n</li>\n<li>\n<p>HTTP Headers</p>\n<ul>\n<li><em>HTTPHeader(\"User-agent\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  UTF-8</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>JavaScript</li>\n<li>\n<h2>Utf-8</h2>\n</li>\n</ul>\n<blockquote>\n<p>UTF-8 (UCS Transformation Format 8) is the World Wide Web's most common <em>Glossary(\"Character encoding\", \"character encoding\"</em>). Each character is represented by one to four bytes. UTF-8 is backward-compatible with <em>Glossary(\"ASCII\"</em>) and can represent any standard Unicode character.</p>\n</blockquote>\n<p>The first 128 UTF-8 characters precisely match the first 128 ASCII characters (numbered 0-127), meaning that existing ASCII text is already valid UTF-8. All other characters use two to four bytes. Each byte has some bits reserved for encoding purposes. Since non-ASCII characters require more than one byte for storage, they run the risk of being corrupted if the bytes are separated and not recombined.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"UTF-8\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.unicode.org/faq/utf_bom.html#UTF8\">FAQ about UTF-8 on Unicode website</a></li>\n</ul>\n<hr>\n<h2>Term:  UUID</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <strong>Universally Unique Identifier</strong> (<strong>UUID</strong>) is a label used to uniquely identify a resource among all other resources of that type.</p>\n</blockquote>\n<p>Computer systems generate UUIDs locally using very large random numbers.\nIn theory the IDs may not be globally unique, but the probability of duplicates is vanishingly small.\nIf systems really need absolutely unique IDs then these might be allocated by a central authority.</p>\n<p>UUIDs are 128-bit values that are canonically represented as a 36-character string in the format <code>123e4567-e89b-12d3-a456-426614174000</code> (5 hex strings separated by hyphens).\nThere are a number of versions that differ slightly in the way they are calculated; for example, the inclusion of temporal information.</p>\n<p>The formal definition can be found in: <a href=\"https://www.rfc-editor.org/rfc/rfc4122\">RFC4122: A Universally Unique IDentifier (UUID) URN Namespace</a>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"UUID\"</em>) on Wikipedia</li>\n<li>\n<h2><a href=\"/en-US/docs/Web/API/Crypto/randomUUID\"><code>Crypto.randomUUID()</code></a></h2>\n</li>\n</ul>\n<h2>Term:  UX</h2>\n<ul>\n<li>Accessibility</li>\n<li>Composing</li>\n<li>Design</li>\n<li>Glossary</li>\n<li>\n<h2>Navigation</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>UX</strong> is an acronym that stands for User eXperience. It is the study of the interaction between users and a system. Its goal is to make a system easy to interact with from the user's point of view.</p>\n</blockquote>\n<p>The system can be any kind of product or application that an end user is meant to interact with. UX studies undertaken on a web page for example can demonstrate whether it is easy for users to understand the page, navigate to different areas, and complete common tasks, and where such processes could have less friction.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"User experience\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Validator</h2>\n<ul>\n<li>Beginner</li>\n<li>Glossary</li>\n<li>\n<h2>Security</h2>\n</li>\n</ul>\n<blockquote>\n<p>A validator is a program that checks for syntax errors in code. Validators can be created for any format or language, but in our context we speak of tools that check <em>Glossary(\"HTML\"</em>), <em>Glossary(\"CSS\"</em>), and <em>Glossary(\"XML\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Validator\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Tools/Validators\">Short list of validators</a></li>\n</ul>\n<hr>\n<h2>Term:  Value</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>NeedsContent</h2>\n</li>\n</ul>\n<blockquote>\n<p>In the context of data or an object <strong><em>Glossary(\"Wrapper\", \"wrapper\"</em>)</strong> around that data, the value is the <strong><em>Glossary(\"Primitive\",\"primitive value\"</em>)</strong> that the object wrapper contains. In the context of a <strong><em>Glossary(\"Variable\",\"variable\"</em>)</strong> or <strong><em>Glossary(\"Property\",\"property\"</em>)</strong>, the value can be either a primitive or an <strong><em>Glossary(\"Object reference\",\"object reference\"</em>)</strong>.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Primitive wrapper class\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Variable</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>JavaScript</h2>\n</li>\n</ul>\n<blockquote>\n<p>A variable is a named reference to a <em>Glossary(\"Value\", \"value\"</em>). That way an unpredictable value can be accessed through a predetermined name.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Variable (computer science)\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#declarations\">Declaring variables in JavaScript</a></li>\n<li><a href=\"/en-US/docs/Web/JavaScript/Reference/Statements/var\"><code>var</code> statement in JavaScript</a></li>\n</ul>\n<hr>\n<h2>Term:  Vendor Prefix</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>Browser vendors sometimes add prefixes to experimental or nonstandard CSS properties and JavaScript APIs, so developers can experiment with new ideas while—in theory—preventing their experiments from being relied upon and then breaking web developers' code during the standardization process. Developers should wait to include the unprefixed property until browser behavior is standardized.</p>\n</blockquote>\n<blockquote>\n<p><strong>Note:</strong> Browser vendors are working to stop using vendor prefixes for experimental features. Web developers have been using them on production Web sites, despite their experimental nature. This has made it more difficult for browser vendors to ensure compatibility and to work on new features; it's also been harmful to smaller browsers who wind up forced to add other browsers' prefixes in order to load popular web sites.</p>\n<p>Lately, the trend is to add experimental features behind user-controlled flags or preferences, and to create smaller specifications which can reach a stable state much more quickly.</p>\n</blockquote>\n<h2>CSS prefixes</h2>\n<p>The major browsers use the following prefixes:</p>\n<ul>\n<li><code>-webkit-</code> (Chrome, Safari, newer versions of Opera, almost all iOS browsers including Firefox for iOS; basically, any WebKit based browser)</li>\n<li><code>-moz-</code> (Firefox)</li>\n<li><code>-o-</code> (old pre-WebKit versions of Opera)</li>\n<li><code>-ms-</code> (Internet Explorer and Microsoft Edge)</li>\n</ul>\n<p>Sample usage:</p>\n<pre><code>-webkit-transition: all 4s ease;\n-moz-transition: all 4s ease;\n-ms-transition: all 4s ease;\n-o-transition: all 4s ease;\ntransition: all 4s ease;\n</code></pre>\n<h2>API prefixes</h2>\n<p>Historically, vendors have also used prefixes for experimental APIs. If an entire interface is experimental, then the interface's name is prefixed (but not the properties or methods within). If an experimental property or method is added to a standardized interface, then the individual method or property is prefixed.</p>\n<h3>Interface prefixes</h3>\n<p>Prefixes for interface names are upper-cased:</p>\n<ul>\n<li><code>WebKit</code> (Chrome, Safari, newer versions of Opera, almost all iOS browsers (including Firefox for iOS); basically, any WebKit based browser)</li>\n<li><code>Moz</code> (Firefox)</li>\n<li><code>O</code> (Older, pre-WebKit, versions of Opera)</li>\n<li><code>MS</code> (Internet Explorer and Microsoft Edge)</li>\n</ul>\n<h3>Property and method prefixes</h3>\n<p>The prefixes for properties and methods are lower-case:</p>\n<ul>\n<li><code>webkit</code> (Chrome, Safari, newer versions of Opera, almost all iOS browsers (including Firefox for iOS); basically, any WebKit based browser)</li>\n<li><code>moz</code> (Firefox)</li>\n<li><code>o</code> (Old, pre-WebKit, versions of Opera)</li>\n<li><code>ms</code> (Internet Explorer and Microsoft Edge)</li>\n</ul>\n<p>Sample usage:</p>\n<pre><code class=\"language-js\">var requestAnimationFrame = window.requestAnimationFrame ||\n                            window.mozRequestAnimationFrame ||\n                            window.webkitRequestAnimationFrame ||\n                            window.oRequestAnimationFrame ||\n                            window.msRequestAnimationFrame;\n</code></pre>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"CSS</em>hack#Browser<em>prefixes\", \"Vendor prefix\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Viewport</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Layout</li>\n<li>\n<h2>viewport</h2>\n</li>\n</ul>\n<blockquote>\n<p>A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view.</p>\n</blockquote>\n<p>The portion of the viewport that is currently visible is called the <strong><em>Glossary(\"visual viewport\"</em>)</strong>. This can be smaller than the layout viewport, such as when the user has pinched-zoomed. The <em>Glossary(\"layout viewport\"</em>) remains the same, but the visual viewport became smaller.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Visual_Viewport_API\">Visual Viewport API</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Viewport\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.quirksmode.org/mobile/viewports.html\">A tale of two viewports</a> (Quirksmode)</li>\n<li><em>Glossary(\"Visual viewport\"</em>) in the MDN Glossary</li>\n<li><em>Glossary(\"Layout viewport\"</em>) in the MDN Glossary</li>\n</ul>\n<hr>\n<h2>Term:  Visual Viewport</h2>\n<ul>\n<li>Glossary</li>\n<li>VisualViewport</li>\n<li>viewport</li>\n<li>\n<h2>visual viewport</h2>\n</li>\n</ul>\n<blockquote>\n<p>The portion of the <em>Glossary(\"viewport\"</em>) that is currently visible is called the visual viewport. This can be smaller than the layout viewport, such as when the user has pinched-zoomed. The visual viewport is the visual portion of a screen excluding on-screen keyboards, areas outside of a pinch-zoom area, or any other on-screen artifact that doesn't scale with the dimensions of a page.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/API/Visual_Viewport_API\">Visual Viewport API</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Viewport\"</em>) on Wikipedia</li>\n<li><a href=\"https://www.quirksmode.org/mobile/viewports.html\">A tale of two viewports</a> (Quirksmode)</li>\n<li><em>Glossary(\"Viewport\"</em>) in the MDN Glossary</li>\n<li><em>Glossary(\"Layout viewport\"</em>) in the MDN Glossary</li>\n</ul>\n<hr>\n<h2>Term:  VoIP</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>VoIP</h2>\n</li>\n</ul>\n<blockquote>\n<p>VoIP (Voice over Internet Protocol) is a technology used to transmit voice messages over IP (Internet Protocol) networks. Common VoIP packages include Skype, Msn Messenger, Yahoo and many more. Everything transferred through VoIP is digital. It is also known as IP telephony, or broadband telephony. The main reason for using VoIP technology is because of cost.</p>\n</blockquote>\n<p>VoIP allows you to make a call directly from a computer, a special VoIP phone, or a traditional phone connected to a special adapter. A high speed internet connection is required for VoIP. Usually, telephone calls over the Internet do not incur further charges beyond what the user is paying for Internet access, much in the same way that the user doesn't pay for sending individual emails over the Internet.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"VoIP\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  W3C</h2>\n<ul>\n<li>Community</li>\n<li>Consortium</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>W3C</li>\n<li>\n<h2>Web consortium</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>World Wide Web Consortium</em> (W3C) is an international body that maintains <em>Glossary(\"World Wide Web\", \"Web-related\"</em>) rules and frameworks.</p>\n</blockquote>\n<p>It consists of over 350 member-organizations that jointly develop Web standards, run outreach programs, and maintain an open forum for talking about the Web. The W3C coordinates companies in the industry to make sure they implement the same W3C standards.</p>\n<p>Each standard passes through four stages of maturity: Working Draft (WD), Candidate Recommendation (CR), Proposed Recommendation (PR), and W3C Recommendation (REC).</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/\">W3C website</a></li>\n<li><em>Interwiki(\"wikipedia\", \"World Wide Web Consortium\", \"W3C\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  WAI</h2>\n<ul>\n<li>Accessibility</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>WAI or Web Accessibility Initiative is an effort by the World Wide Web Consortium (W3C) to improve accessibility for people with various challenges, who may need a nonstandard <em>Glossary(\"browser\"</em>) or devices.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/WAI/\">WAI website</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Web Accessibility Initiative\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  WCAG</h2>\n<ul>\n<li>Accessibility</li>\n<li>Glossary</li>\n<li>WCAG</li>\n<li>\n<h2>Web Guidelines</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>Web Content Accessibility Guidelines</em> (<strong>WCAG</strong>) are a recommendation published by the <em>Glossary(\"WAI\",\"Web Accessibility Initiative\"</em>) group at the <em>Glossary(\"W3C\"</em>). They outline a set of guidelines for making content accessible primarily for people with disabilities but also for limited-resource devices such as mobile phones.</p>\n</blockquote>\n<p>WCAG 2.0 which superseded WCAG 1.0 was published as a W3C Recommendation on 11 December 2008. It consists of 12 guidelines organized under 4 principles (perceivable, operable, understandable, and robust) and each guideline has testable success criteria.</p>\n<p>WCAG uses three levels of conformance:</p>\n<ul>\n<li>Priority 1: Web developers <strong>must</strong> satisfy these requirements, otherwise it will be impossible for one or more groups to access the Web content. Conformance to this level is described as A.</li>\n<li>Priority 2: Web developers <strong>should</strong> satisfy these requirements, otherwise some groups will find it difficult to access the Web content. Conformance to this level is described as AA or Double-A.</li>\n<li>Priority 3: Web developers <strong>may</strong> satisfy these requirements, in order to make it easier for some groups to access the Web content. Conformance to this level is described as AAA or Triple-A.</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Web Content Accessibility Guidelines\", \"WCAG\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/Accessibility/Information_for_Web_authors\">Accessibility information on MDN</a></li>\n<li><a href=\"https://www.w3.org/TR/WCAG20/\">The WCAG 2.0 recommendation at the W3C</a></li>\n</ul>\n<hr>\n<h2>Term:  Web performance</h2>\n<ul>\n<li>Glossary</li>\n<li>Perceived Performance</li>\n<li>Reference</li>\n<li>\n<h2>Web Performance</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Web performance</strong> is the objective time from when a request for content is made until the requested content is displayed in the user's browser, objective render times, and the subjective user experience of load time and runtime.</p>\n</blockquote>\n<p>Objectively, it is measurable time, in milliseconds, it takes for the web page or web application to be downloaded, painted in the user's web browser, and become responsive and interactive. It is the frames per second and times the main thread is not available for user interactions. Subjectively, it is the user's perception of whether the time it takes between the time the user requests the content and the time until the user feels the content requested is available and usable <em>feels</em> slow or fast.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Performance\">Learn about web performance</a></li>\n<li><a href=\"/en-US/docs/Glossary/Perceived_performance\">Perceived performance</a></li>\n</ul>\n<hr>\n<h2>Term:  Web server</h2>\n<ul>\n<li>web server</li>\n<li>\n<h2>web-server</h2>\n</li>\n</ul>\n<blockquote>\n<p>A web server is a piece of software that often runs on a hardware server offering service to a user, usually referred to as the client. A server, on the other hand, is a piece of hardware that lives in a room full of computers, commonly known as a data center.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn/Common_questions/What_is_a_web_server\">Introduction to servers</a></li>\n<li><em>Interwiki(\"wikipedia\", \"Server (computing)\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  Web standards</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Web Standards</li>\n<li>standards</li>\n<li>\n<h2>web specifications</h2>\n</li>\n</ul>\n<blockquote>\n<p>Web standards are rules established by international standards bodies and defining how the <em>Glossary(\"World Wide Web\", \"Web\"</em>) works (and sometimes controlling the <em>Glossary(\"Internet\"</em>) as well).</p>\n</blockquote>\n<p>Several standards bodies are responsible for defining different aspects of the Web, and all the standards must coordinate to keep the Web maximally usable and accessible. Web standards also must evolve to improve the current status and adapt to new circumstances.</p>\n<p>This non-exhaustive list gives you an idea of which standards websites and network systems must conform to:</p>\n<ul>\n<li><strong>IETF</strong> (Internet Engineering Task Force): Internet standards (STD), which among other things govern set-up and use of <em>Glossary(\"URI\", \"URIs\"</em>), <em>Glossary(\"HTTP\"</em>), and <em>Glossary(\"MIME\"</em>)</li>\n<li><strong><em>Glossary(\"W3C\"</em>)</strong>: specifications for markup language (e.g., <em>Glossary(\"HTML\"</em>)), style definitions (i.e., <em>Glossary(\"CSS\"</em>)), <em>Glossary(\"DOM\"</em>), <em>Glossary(\"Accessibility\", \"accessibility\"</em>)</li>\n<li><strong>IANA</strong> (Internet Assigned Numbers Authority): name and number registries</li>\n<li><strong>Ecma Intl.:</strong> scripting standards, most prominently for <em>Glossary(\"JavaScript\"</em>)</li>\n<li><strong><em>Glossary(\"ISO\"</em>)</strong> (International Organization for Standardization): standards governing a diverse array of aspects, including character encodings, website management, and user-interface design</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Web standards\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  WebAssembly</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebAssembly</strong> (abbr. <em>Wasm</em>) is an open <em>Glossary(\"binary\"</em>) programming format that can be run in modern web <em>Glossary(\"Browser\", \"browsers\"</em>) in order to gain performance and/or provide new features for web pages.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki('wikipedia','WebAssembly'</em>) on Wikipedia</li>\n<li><a href=\"https://webassembly.org/\">Official website</a></li>\n<li><a href=\"/en-US/docs/WebAssembly\">WebAssembly</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  WebDAV</h2>\n<ul>\n<li>Glossary</li>\n<li>\n<h2>Infrastructure</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebDAV</strong> (<em>Web Distributed Authoring and Versioning</em>) is an <em>Glossary(\"HTTP\"</em>) Extension that lets web developers update their content remotely from a client.</p>\n</blockquote>\n<p>WebDAV is rarely used alone, but two extensions are very common: <em>Glossary(\"CalDAV\"</em>) (remote-access calendar) and <em>Glossary(\"CardDAV\"</em>) (remote-access address book).</p>\n<p>WebDAV allows clients to</p>\n<ul>\n<li>add, delete, and retrieve webpage metadata (e.g. author or creation date)</li>\n<li>link pages of any media type to related pages</li>\n<li>create sets of documents and retrieve hierarchical list</li>\n<li>copy and move webpages</li>\n<li>lock a document from being edited by more than one person at a time</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"WebDAV\"</em>) on Wikipedia</li>\n<li>\n<p>Specifications:</p>\n<ul>\n<li><em>rfc(2518</em>)</li>\n<li><em>rfc(3253</em>)</li>\n<li><em>rfc(3744</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  WebExtensions</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>NeedsContent</li>\n<li>\n<h2>WebExtensions</h2>\n</li>\n</ul>\n<blockquote>\n<p>WebExtensions is a cross-browser system for developing browser extensions in Firefox. This system provides APIs, which to a large extent are supported across different browsers like Mozilla Firefox, Google Chrome, Opera Browser, Microsoft Edge, or Apple Safari.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Mozilla/Add-ons/WebExtensions\">Browser extensions</a> on MDN</li>\n</ul>\n<hr>\n<h2>Term:  WebGL</h2>\n<ul>\n<li>Advanced</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Web Graphics</li>\n<li>\n<h2>WebGL</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebGL</strong> (<em>Web Graphics Library</em>) is a <em>Glossary(\"JavaScript\"</em>) <em>Glossary(\"API\"</em>) that draws interactive 2D and 3D graphics.</p>\n</blockquote>\n<p>The <a href=\"https://www.khronos.org/\">Khronos Group</a> maintains WebGL, which is based on <em>Glossary(\"OpenGL\"</em>) ES 2.0.</p>\n<p>You can invoke WebGL within the <em>Glossary(\"HTML\"</em>) <em>HTMLElement(\"canvas\"</em>) element, which provides a rendering surface.</p>\n<p>All major <em>Glossary(\"Browser\",\"browsers\"</em>) now support WebGL, but its availability depends also on external factors (e.g. GPU support).</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"WebGL\"</em>) on Wikipedia</li>\n<li><a href=\"https://get.webgl.org/\">Check for WebGL support</a></li>\n<li><a href=\"/en-US/docs/Web/API/WebGL_API\">WebGL on MDN</a></li>\n<li><a href=\"https://caniuse.com/#feat=webgl\">Support table for WebGL</a></li>\n</ul>\n<hr>\n<h2>Term:  WebIDL</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>WebIDL</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebIDL</strong> is the interface description language used to describe the <em>Glossary(\"type\", \"data types\"</em>), <em>Glossary(\"interface\", \"interfaces\"</em>), <em>Glossary(\"method\", \"methods\"</em>), <em>Glossary(\"property\", \"properties\"</em>), and other components which make up a Web application programming interface (<em>Glossary(\"API\"</em>)). It uses a somewhat stylized syntax which is independent of any specific programming language, so that the underlying code which is used to build each API can be written in whatever language is most appropriate, while still being possible to map the API's components to JavaScript-compatible constructs.</p>\n</blockquote>\n<p>WebIDL is used in nearly every API <em>Glossary(\"specification\"</em>) for the Web, and due to its standard format and syntax, the programmers who create Web browsers can more easily ensure that their browsers are compatible with one another, regardless of how they choose to write the code to implement the API.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/TR/WebIDL/\">Specification</a></li>\n<li><a href=\"/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file\">Information contained in a WebIDL file</a></li>\n<li><a href=\"/en-US/docs/Mozilla/WebIDL_bindings\">WebIDL bindings</a></li>\n<li><em>interwiki(\"wikipedia\", \"WebIDL\"</em>)</li>\n</ul>\n<hr>\n<h2>Term:  WebKit</h2>\n<ul>\n<li>Browser</li>\n<li>Glossary</li>\n<li>Intro</li>\n<li>Web</li>\n<li>WebKit</li>\n<li>\n<h2>WebMechanics</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>WebKit</em> is a framework that displays properly-formatted webpages based on their markup. <em>Glossary(\"Apple Safari\"</em>) depends on WebKit, and so do many mobile browsers (since WebKit is highly portable and customizable).</p>\n</blockquote>\n<p>WebKit began life as a fork of KDE's KHTML and KJS libraries, but many individuals and companies have since contributed (including KDE, Apple, Google, and Nokia).</p>\n<p>WebKit is an Apple trademark, and the framework is distributed under a BSD-form license. However, two important components fall under the <em>Glossary(\"LGPL\"</em>): the <strong>WebCore</strong> rendering library and the <strong>JavaScriptCore</strong> engine.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"WebKit\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/CSS/WebKit_Extensions\">WebKit CSS extensions</a></li>\n</ul>\n<hr>\n<h2>Term:  WebM</h2>\n<ul>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>WebM</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebM</strong> is royalty-free and is an open web video format natively supported in Mozilla Firefox.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/WebM\">WebM </a>on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  WebP</h2>\n<ul>\n<li>Beginner</li>\n<li>Composing</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>\n<h2>WebP</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebP</strong> is a lossless and lossy compression image format developed by Google.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/WebP\">WebP </a>on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  WebRTC</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>JavaScript</li>\n<li>P2P</li>\n<li>VoIP</li>\n<li>Web</li>\n<li>\n<h2>WebRTC</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>WebRTC</strong> (<em>Web Real-Time Communication</em>) is an <em>Glossary(\"API\"</em>) that can be used by video-chat, voice-calling, and P2P-file-sharing Web apps.</p>\n</blockquote>\n<p>WebRTC consists mainly of these parts:</p>\n<ul>\n<li>\n<p><em>domxref(\"MediaDevices.getUserMedia\", \"getUserMedia()\"</em>)</p>\n<ul>\n<li>: Grants access to a device's camera and/or microphone, and can plug in their signals to a RTC connection.</li>\n</ul>\n</li>\n<li>\n<p><em>domxref(\"RTCPeerConnection\"</em>)</p>\n<ul>\n<li>: An interface to configure video chat or voice calls.</li>\n</ul>\n</li>\n<li>\n<p><em>domxref(\"RTCDataChannel\"</em>)</p>\n<ul>\n<li>: Provides a method to set up a <em>Glossary(\"P2P\", \"peer-to-peer\"</em>) data pathway between browsers.</li>\n</ul>\n</li>\n</ul>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"WebRTC\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/WebRTC_API\">WebRTC API on MDN</a></li>\n<li><a href=\"https://caniuse.com/rtcpeerconnection\">Browser support for WebRTC</a></li>\n</ul>\n<hr>\n<h2>Term:  WebSockets</h2>\n<ul>\n<li>Connection</li>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>Networking</li>\n<li>Protocols</li>\n<li>Web</li>\n<li>\n<h2>WebSocket</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>WebSocket</em> is a <em>Glossary(\"protocol\"</em>) that allows for a persistent <em>Glossary(\"TCP\"</em>) connection between <em>Glossary(\"Server\", \"server\"</em>) and client so they can exchange data at any time.</p>\n</blockquote>\n<p>Any client or server application can use WebSocket, but principally web <em>Glossary(\"Browser\", \"browsers\"</em>) and web servers. Through WebSocket, servers can pass data to a client without prior client request, allowing for dynamic content updates.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Websocket\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/WebSocket\">WebSocket reference on MDN</a></li>\n<li><a href=\"/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications\">Writing WebSocket client applications</a></li>\n<li><a href=\"/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers\">Writing WebSocket servers</a></li>\n</ul>\n<hr>\n<h2>Term:  WebVTT</h2>\n<ul>\n<li>Audio</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Video</li>\n<li>Web</li>\n<li>\n<h2>WebVTT</h2>\n</li>\n</ul>\n<blockquote>\n<p>WebVTT (Web Video Text Tracks) is a <em>Glossary(\"W3C\"</em>) specification for a file format marking up text track resources in combination with the HTML <em>HTMLElement(\"track\"</em>) element.</p>\n</blockquote>\n<p>WebVTT files provide metadata that is time-aligned with audio or video content like captions or subtitles for video content, text video descriptions, chapters for content navigation, and more.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"WebVTT\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/API/WebVTT_API\">WebVTT</a> on MDN</li>\n<li><a href=\"https://www.w3.org/TR/webvtt1/\">Specification</a></li>\n</ul>\n<hr>\n<h2>Term:  WHATWG</h2>\n<ul>\n<li>Community</li>\n<li>DOM</li>\n<li>Glossary</li>\n<li>HTML</li>\n<li>HTML5</li>\n<li>WHATWG</li>\n<li>Web</li>\n<li>\n<h2>standards</h2>\n</li>\n</ul>\n<blockquote>\n<p>The WHATWG (<em>Web Hypertext Application Technology Working Group</em>) is a community that <a href=\"https://spec.whatwg.org/\">maintains and develops web standards</a>, including <em>Glossary(\"DOM\"</em>), Fetch, and <em>Glossary(\"HTML\"</em>). Employees of Apple, Mozilla, and Opera established WHATWG in 2004.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"WHATWG\"</em>) on Wikipedia</li>\n<li><a href=\"https://whatwg.org/\">WHATWG website</a></li>\n</ul>\n<hr>\n<h2>Term:  Whitespace</h2>\n<ul>\n<li>Glossary</li>\n<li>Lexical Grammar</li>\n<li>\n<h2>whitespace</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>Whitespace</strong> refers to <em>Glossary(\"Character\", \"characters\"</em>) which are used to provide horizontal or vertical space between other characters. Whitespace is often used to separate tokens in <em>Glossary(\"HTML\"</em>), <em>Glossary(\"CSS\"</em>), <em>Glossary(\"JavaScript\"</em>), and other computer languages.</p>\n</blockquote>\n<p>Whitespace characters and their usage vary among languages.</p>\n<h2>In HTML</h2>\n<p>The <a href=\"https://infra.spec.whatwg.org/#ascii-whitespace\">Infra Living Standard</a> defines five characters as “ASCII whitespace”: U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, and U+0020 SPACE.</p>\n<h2>In JavaScript</h2>\n<p>The <a href=\"https://tc39.es/ecma262/#sec-white-space\">ECMAScript Language Specification</a> defines several Unicode codepoints as “white space”: U+0009 CHARACTER TABULATION &#x3C;TAB>, U+000B LINE TABULATION &#x3C;VT>, U+000C FORM FEED &#x3C;FF>, U+0020 SPACE &#x3C;SP>, U+00A0 NO-BREAK SPACE &#x3C;NBSP>, U+FEFF ZERO WIDTH NO-BREAK SPACE &#x3C;ZWNBSP>, and any other Unicode “Space_Separator” code points &#x3C;USP>.</p>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"Whitespace character\"</em>) (Wikipedia)</li>\n<li><a href=\"/en-US/docs/Web/API/Document_Object_Model/Whitespace\">How whitespace is handled by HTML, CSS, and in the DOM</a></li>\n<li><em>cssxref(\"white-space\"</em>)</li>\n<li>\n<p>Specifications</p>\n<ul>\n<li><a href=\"https://infra.spec.whatwg.org/#ascii-whitespace\">ASCII whitespace spec</a></li>\n<li><a href=\"https://tc39.es/ecma262/#sec-white-space\">ECMAScript Language Specification</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">Glossary</a></p>\n<ol>\n<li><em>Glossary(\"Character\"</em>)</li>\n</ol>\n</li>\n</ul>\n<hr>\n<h2>Term:  WindowProxy</h2>\n<ul>\n<li>Glossary</li>\n<li>Window</li>\n<li>\n<h2>WindowProxy</h2>\n</li>\n</ul>\n<blockquote>\n<p>A <em><code>WindowProxy</code></em> object is a wrapper for a <a href=\"/en-US/docs/Web/API/Window\"><code>Window</code></a> object. A <code>WindowProxy</code> object exists in every <a href=\"/en-US/docs/Glossary/Browsing_context\">browsing context</a>. All operations performed on a <code>WindowProxy</code> object will also be applied to the underlying <code>Window</code> object it currently wraps. Therefore, interacting with a <code>WindowProxy</code> object is almost identical to directly interacting with a <code>Window</code> object. When a browsing context is navigated, the <code>Window</code> object its <code>WindowProxy</code> wraps is changed.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li>HTML specification: <a href=\"https://html.spec.whatwg.org/multipage/window-object.html#the-windowproxy-exotic-object\">WindowProxy section</a></li>\n<li>Stack Overflow question: <a href=\"https://stackoverflow.com/q/16092835/\">WindowProxy and Window objects?</a></li>\n</ul>\n<hr>\n<h2>Term:  World Wide Web</h2>\n<ul>\n<li>Glossary</li>\n<li>Infrastructure</li>\n<li>WWW</li>\n<li>\n<h2>World Wide Web</h2>\n</li>\n</ul>\n<blockquote>\n<p>The <em>World Wide Web</em>—commonly referred to as <strong>WWW</strong>, <strong>W3</strong>, or <strong>the Web</strong>—is an interconnected system of public webpages accessible through the <em>Glossary(\"Internet\"</em>). The Web is not the same as the Internet: the Web is one of many applications built on top of the Internet.</p>\n</blockquote>\n<p>Tim Berners-Lee proposed the architecture of what became known as the World Wide Web. He created the first web <em>Glossary(\"Server\",\"server\"</em>), web <em>Glossary(\"Browser\",\"browser\"</em>), and webpage on his computer at the CERN physics research lab in 1990. In 1991, he announced his creation on the alt.hypertext newsgroup, marking the moment the Web was first made public.</p>\n<p>The system we know today as \"the Web\" consists of several components:</p>\n<ul>\n<li>The <strong><em>Glossary(\"HTTP\"</em>)</strong> protocol governs data transfer between a server and a client.</li>\n<li>To access a Web component, a client supplies a unique universal identifier, called a <strong><em>Glossary(\"URL\"</em>)</strong> (uniform resource locator) or <em>Glossary(\"URI\"</em>) (uniform resource identifier) (formally called Universal Document Identifier (UDI)).</li>\n<li><strong><em>Glossary(\"HTML\"</em>)</strong> (hypertext markup language) is the most common format for publishing web documents.</li>\n</ul>\n<p>Linking, or connecting resources through <em>Glossary(\"Hyperlink\",\"hyperlinks\"</em>), is a defining concept of the Web, aiding its identity as a collection of connected documents.</p>\n<p>Soon after inventing the Web, Tim Berners-Lee founded the <em>Glossary(\"W3C\"</em>) (World Wide Web Consortium) to standardize and develop the Web further. This consortium consists of core Web interest groups, such as web browser developers, government entities, researchers, and universities. Its mission includes education and outreach.</p>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Learn\">Learn the Web</a></li>\n<li><em>Interwiki(\"wikipedia\", \"World Wide Web\"</em>) on Wikipedia</li>\n<li><a href=\"https://w3.org\">The W3C website</a></li>\n</ul>\n<hr>\n<h2>Term:  Wrapper</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>Wrapper</h2>\n</li>\n</ul>\n<blockquote>\n<p>In programming languages such as JavaScript, a wrapper is a function that is intended to call one or more other functions, sometimes purely for convenience, and sometimes adapting them to do a slightly different task in the process.</p>\n</blockquote>\n<p>For example, SDK Libraries for AWS are examples of wrappers.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"Wrapper function\"</em>) (Wikipedia)</li>\n<li>\n<p><a href=\"/en-US/docs/Glossary\">MDN Web Docs Glossary</a></p>\n<ul>\n<li><em>Glossary(\"API\"</em>)</li>\n<li><em>Glossary(\"Class\"</em>)</li>\n<li><em>Glossary(\"Function\"</em>)</li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2>Term:  XForms</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>Deprecated</li>\n<li>\n<h2>XForms</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>XForms</strong> is a convention for building Web forms and processing form data in the <em>glossary(\"XML\"</em>) format.</p>\n</blockquote>\n<blockquote>\n<p><strong>Note:</strong> No major browser supports XForms any longer—we suggest using <a href=\"/en-US/docs/Learn/Forms\">HTML5 forms</a> instead.</p>\n</blockquote>\n<hr>\n<h2>Term:  XHR (XMLHttpRequest)</h2>\n<ul>\n<li>API</li>\n<li>Beginner</li>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>XMLHttpRequest</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>domxref(\"XMLHttpRequest\"</em>) (XHR) is a <em>Glossary(\"JavaScript\"</em>) <em>Glossary(\"API\"</em>) to create <em>Glossary(\"AJAX\"</em>) requests. Its methods provide the ability to send network requests between the <em>Glossary(\"browser\"</em>) and a <em>Glossary(\"server\"</em>).</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><em>interwiki(\"wikipedia\", \"XMLHttpRequest\"</em>) on Wikipedia</li>\n<li><a href=\"https://peoplesofttutorial.com/difference-between-synchronous-and-asynchronous-messaging/\">Synchronous vs. Asynchronous Communications</a></li>\n<li>The <em>domxref(\"XMLHttpRequest\"</em>) object</li>\n<li>The <a href=\"/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest\">documentation on MDN about how to use XMLHttpRequest</a></li>\n</ul>\n<hr>\n<h2>Term:  XHTML</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>\n<h2>XHTML</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>XHTML</strong> is a term that was historically used to describe HTML documents written to conform with <em>Glossary(\"XML\"</em>) syntax rules.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/Guide/HTML/XHTML\">XHTML</a></li>\n</ul>\n<hr>\n<h2>Term:  XInclude</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p><a href=\"https://www.w3.org/TR/xinclude/#text-included-items\">XML Inclusions (XInclude)</a> is a W3C Recommendation to allow inclusion of XML more different sources in a more convenient fashion than XML external entities. When used in conjunction with XPointer (Firefox supports a subset of it, and is used in the code sample below), XInclude can also target just specific portions of a document for inclusion. Firefox does not support it natively, but the following function aims to allow its use with documents passed into it.</p>\n</blockquote>\n<h3>Code sample</h3>\n<p>(Note that this has not been thoroughly tested for all circumstances and may not necessarily reflect the standard behavior completely.)</p>\n<p>Note also that if you wish to allow xml:base, you will need the <a href=\"/en-US/docs/Archive/Add-ons/Code_snippets/XML/base_function\">xml:base function</a>, and the line beginning <code>var href = ...</code> should become:</p>\n<pre><code class=\"language-js\">var href = getXmlBaseLink (/* XLink sans xml:base */ xinclude.getAttribute('href'), /* Element to query from */ xinclude);\n</code></pre>\n<pre><code class=\"language-js\">function resolveXIncludes(docu) {\n    // http://www.w3.org/TR/xinclude/#xml-included-items\n    var xincludes = docu.getElementsByTagNameNS('http://www.w3.org/2001/XInclude', 'include');\n    if (xincludes) {\n        for (i=0; i &#x3C; xincludes.length; i++) {\n            var xinclude = xincludes[i];\n            var href = xinclude.getAttribute('href');\n            var parse = xinclude.getAttribute('parse');\n            var xpointer = xinclude.getAttribute('xpointer');\n            var encoding = xinclude.getAttribute('encoding'); // e.g., UTF-8 // \"text/xml or application/xml or matches text/*+xml or application/*+xml\" before encoding (then UTF-8)\n            var accept = xinclude.getAttribute('accept'); // header \"Accept: \"+x\n            var acceptLanguage = xinclude.getAttribute('accept-language'); // \"Accept-Language: \"+x\n            var xiFallback = xinclude.getElementsByTagNameNS('http://www.w3.org/2001/XInclude', 'fallback')[0]; // Only one such child is allowed\n            if (href === '' || href === null) { // Points to same document if empty (null is equivalent to empty string)\n                href = null; // Set for uniformity in testing below\n                if (parse === 'xml' &#x26;&#x26; xpointer === null) {\n                    alert('There must be an XPointer attribute present if \"href\" is empty an parse is \"xml\"');\n                    return false;\n                }\n            }\n            else if (href.match(/#$/, '') || href.match(/^#/, '')) {\n                alert('Fragment identifiers are disallowed in an XInclude \"href\" attribute');\n                return false;\n            }\n            var j;\n            var xincludeParent = xinclude.parentNode;\n            try {\n                netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserRead'); // Necessary with file:///-located files trying to reach external sites\n                if (href !== null) {\n                    var response, responseType;\n                    var request = new XMLHttpRequest();\n                    request.open('GET', href, false);\n                    request.setRequestHeader('If-Modified-Since', 'Thu, 1 Jan 1970 00:00:00 GMT');\n                    request.setRequestHeader('Cache-Control', 'no-cache');\n                    if (accept) {\n                        request.setRequestHeader('Accept', accept);\n                    }\n                    if (acceptLanguage) {\n                        request.setRequestHeader('Accept-Language', acceptLanguage);\n                    }\n                    switch (parse) {\n                        case 'text':\n                            // Priority should be on media type:\n\n                            var contentType = request.getResponseHeader('Content-Type');\n\n                            //text/xml; charset=\"utf-8\" // Send to get headers first?\n                            // Fix: We test for file extensions as well in case file:// doesn't return content type (as seems to be the case); can some other tool be used in FF (or IE) to detect encoding of local file? Probably just need BOM test since other encodings must be specified\n                            var patternXML = /\\.(svg|xml|xul|rdf|xhtml)$/;\n                            if ((contentType &#x26;&#x26; contentType.match(/[text|application]\\/(.*)\\+?xml/)) || (href.indexOf('file://') === 0 &#x26;&#x26; href.match(patternXML))) {\n                                /* Grab the response as text (see below for that routine) and then find encoding within*/\n                               var encName = '([A-Za-z][A-Za-z0-9._-]*)';\n                               var pattern = new RegExp('^&#x3C;\\\\?xml\\\\s+.*encoding\\\\s*=\\\\s*([\\'\"])'+encName+'\\\\1.*\\\\?>'); // Check document if not?\n                               // Let the request be processed below\n                            }\n                            else {\n                                if (encoding === '' || encoding === null) { // Encoding has no effect on XML\n                                    encoding = 'utf-8';\n                                }\n                                request.overrideMimeType('text/plain; charset='+encoding); //'x-user-defined'\n                            }\n                            responseType = 'responseText';\n                            break;\n                        case null:\n                        case 'xml':\n                            responseType = 'responseXML';\n                            break;\n                        default:\n                            alert('XInclude element contains an invalid \"parse\" attribute value');\n                            return false;\n                            break;\n                    }\n                    request.send(null);\n                    if((request.status === 200 || request.status === 0) &#x26;&#x26; request[responseType] !== null) {\n                        response = request[responseType];\n                         if (responseType === 'responseXML') {\n                            // apply xpointer (only xpath1() subset is supported)\n                            var responseNodes;\n                            if (xpointer) {\n                                var xpathResult = response.evaluate(\n                                                                 xpointer,\n                                                                 response,\n                                                                 null,\n                                                                 XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,\n                                                                 null\n                                                              );\n                                var a = [];\n                                for(var k = 0; k &#x3C; xpathResult.snapshotLength; k++) {\n                                a[k] = xpathResult.snapshotItem(k);\n                                }\n                                responseNodes = a;\n                            }\n                            else { // Otherwise, the response must be a single well-formed document response\n                                responseNodes = [response.documentElement]; // Put in array so can be treated the same way as the above\n                            }\n                            // PREPEND ANY NODE(S) (AS XML) THEN REMOVE XINCLUDE\n                            for (j=0; j &#x3C; responseNodes.length ; j++) {\n                                xincludeParent.insertBefore(responseNodes[j], xinclude);\n                            }\n                            xincludeParent.removeChild(xinclude);\n                         }\n                         else if (responseType === 'responseText') {\n                             if (encName) {\n                                  var encodingType = response.match(pattern);\n                                  if (encodingType) {\n                                      encodingType = encodingType[2];\n                                  }\n                                  else {\n                                      encodingType = 'utf-8';\n                                  }\n                                  // Need to make a whole new request apparently since cannot convert the encoding after receiving it (to know what the encoding was)\n                                  var request2 = new XMLHttpRequest();\n                                  request2.overrideMimeType('text/plain; charset='+encodingType);\n                                  request2.open('GET', href, false);\n                                  request2.setRequestHeader('If-Modified-Since', 'Thu, 1 Jan 1970 00:00:00 GMT');\n                                  request2.setRequestHeader('Cache-Control', 'no-cache');\n                                  request2.send(null);\n                                  response = request2[responseType]; // Update the response for processing\n                             }\n\n                             // REPLACE XINCLUDE WITH THE RESPONSE AS TEXT\n                             var textNode = docu.createTextNode(response);                             xincludeParent.replaceChild(textNode, xinclude);\n                         }\n\n                        // replace xinclude in doc with response now (as plain text or XML)\n                    }\n                }\n            }\n            catch (e) { // Use xi:fallback if XInclude retrieval above failed\n                var xiFallbackChildren = xiFallback.childNodes;\n                // PREPEND ANY NODE(S) THEN REMOVE XINCLUDE\n                for (j=0; j &#x3C; xiFallbackChildren.length ; j++) {\n                    xincludeParent.insertBefore(xiFallbackChildren[j], xinclude);\n                }\n                xincludeParent.removeChild(xinclude);\n            }\n        }\n    }\n    return docu;\n}\n</code></pre>\n<hr>\n<h2>Term:  XLink</h2>\n<ul>\n<li>CodingScripting</li>\n<li>\n<h2>Glossary</h2>\n</li>\n</ul>\n<blockquote>\n<p>XLink is a W3C standard which is used to describe links between XML and XML or other documents. Some its behaviors are left to the implementation to determine how to handle.</p>\n</blockquote>\n<p>Simple XLinks are \"supported\" in Firefox (at least in SVG and MathML), though they do not work as links if one loads a plain XML document with XLinks and attempts to click on the relevant points in the XML tree.</p>\n<p>For those who may have found XLink 1.0 cumbersome for regular links, XLink 1.1 drops the need to specify <code>xlink:type=\"simple\"</code> for simple links.</p>\n<p>XLink is used in <a href=\"/en-US/docs/Web/SVG\">SVG</a>, <a href=\"/en-US/docs/Web/MathML\">MathML</a>, and other important standards.</p>\n<h3>Specifications</h3>\n<ul>\n<li><a href=\"https://www.w3.org/TR/xlink/\">XLink 1.0</a></li>\n<li><a href=\"https://www.w3.org/TR/xlink11/\">XLink 1.1</a> (currently a Working Draft)</li>\n</ul>\n<h5>See also</h5>\n<ul>\n<li><a href=\"/en-US/docs/Web/XML\">XML</a></li>\n<li><a href=\"/en-US/docs/Web/API/Element/getAttributeNS\">Code snippets:getAttributeNS</a> - a wrapper for dealing with some browsers not supporting this DOM method</li>\n</ul>\n<hr>\n<h2>Term:  XML</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>XML</li>\n<li>\n<h2>l10n:priority</h2>\n</li>\n</ul>\n<blockquote>\n<p>eXtensible Markup Language (XML) is a generic markup language specified by the W3C. The information technology (IT) industry uses many languages based on XML as data-description languages.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/XML/XML_introduction\">XML introduction</a></li>\n</ul>\n<hr>\n<h2>Term:  XPath</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>XML</li>\n<li>\n<h2>XPath</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>XPath</strong> is a query language that can access sections and content in an <em>glossary(\"XML\"</em>) document.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"/en-US/docs/Web/XPath\">XPath documentation on MDN</a></li>\n<li><a href=\"https://www.w3.org/TR/xpath-30/\">XPath specification</a></li>\n<li><a href=\"https://www.w3.org/standards/techs/xpath#w3c_all\">Official website</a></li>\n<li><em>Interwiki(\"wikipedia\", \"XPath\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  XQuery</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>XML</li>\n<li>\n<h2>XQuery</h2>\n</li>\n</ul>\n<blockquote>\n<p><strong>XQuery</strong> is a computer language for updating, retrieving, and calculating data in <em>glossary(\"XML\"</em>) databases.</p>\n</blockquote>\n<h4>See also</h4>\n<ul>\n<li><a href=\"https://www.w3.org/XML/Query/\">Official website</a></li>\n<li><em>Interwiki(\"wikipedia\", \"XQuery\"</em>) on Wikipedia</li>\n</ul>\n<hr>\n<h2>Term:  XSLT</h2>\n<ul>\n<li>CodingScripting</li>\n<li>Glossary</li>\n<li>XML</li>\n<li>\n<h2>XSLT</h2>\n</li>\n</ul>\n<blockquote>\n<p><em>eXtensible Stylesheet Language Transformations</em> (<strong>XSLT</strong>) is a declarative language used to convert <em>Glossary(\"XML\"</em>) documents into other XML documents, <em>Glossary(\"HTML\"</em>), <em>Glossary(\"PDF\"</em>), plain text, and so on.</p>\n</blockquote>\n<p>XSLT has its own processor that accepts XML input, or any format convertible to an XQuery and XPath Data Model. The XSLT processor produces a new document based on the XML document and an XSLT stylesheet, making no changes to the original files in the process.</p>\n<h4>See also</h4>\n<ul>\n<li><em>Interwiki(\"wikipedia\", \"XSLT\"</em>) on Wikipedia</li>\n<li><a href=\"/en-US/docs/Web/XSLT\">XSLT documentation on MDN</a></li>\n</ul>"}],"site":{"siteMetadata":{"palette":"navy","header":{"logo_img":"images/DgqLkQjTmk.png","logo_img_alt":"webdevhub logo","has_nav":true,"nav_links":[{"url":"/docs/sitemap","label":"Navigation","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"has_subnav":true,"subnav_links":[{"label":"Docs","url":"/docs","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Showcase","url":"/showcase","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Contact!","url":"/docs/faq/contact","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Python","url":"/docs/python/python-ds","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"JavaScript","url":"/docs/javascript","style":"primary","icon_class":"dev","new_window":false,"no_follow":false}],"type":"action_menu"},{"label":"Blog","url":"/blog/","style":"primary","has_subnav":true,"subnav_links":[{"label":"Blog-Post-Archive","url":"https://bgoonz.blogspot.com/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"platform docs","url":"blog/platform-docs/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"nodejs","url":"docs/articles/nodejs/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Blog with Comments","url":"https://blog-w-comments.vercel.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}],"new_window":true},{"label":"Job Search","url":"/docs/interview/job-search-nav/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"has_subnav":true,"subnav_links":[{"label":"Job Boards","url":"interview/job-boards","style":"primary","icon_class":"dev","new_window":false,"no_follow":false},{"label":"lorem-ipsum","url":"#","style":"link","icon_class":"dev","new_window":false,"no_follow":false}]},{"label":"Archive","style":"primary","icon_class":"github","new_window":true,"no_follow":false,"has_subnav":true,"subnav_links":[{"label":"Resource-Archive-Server","url":"https://github.com/bgoonz/Learning-Assets","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Bootcamp Resources","url":"https://lambda-resources.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"OG-Blog","url":"https://web-dev-resource-hub.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Top Repos","url":"/docs","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"MY_DOCS","url":"https://bryan-guner.gitbook.io/my-docs/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false}],"type":"action_menu","url":"/docs/tools/archive/"},{"label":"Projects","url":"docs/projects","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"has_subnav":true,"subnav_links":[{"label":"Potluck Planner","url":"https://potluck-landing.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Meditation App","url":"https://meditate42app.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"SearchAwesome","url":"https://search-awesome.vercel.app/","style":"primary","icon_class":"github","new_window":true,"no_follow":false,"type":"action"},{"label":"Condensed -Portfolio","url":"https://bg-portfolio.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false},{"label":"Family Promise Tracker","url":"https://a.familypromiseservicetracker.dev/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false},{"label":"DTW-Guitar-FX-Automation","url":"https://github.com/bgoonz/Revamped-Automatic-Guitar-Effect-Triggering","style":"primary","icon_class":"dev","new_window":false,"no_follow":false},{"label":"Embeds Blog","url":"https://friendly-panda-b61ab.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"alt-blogs","url":"https://bgoonz-blog-v3-0.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Games","url":"https://bgoonz-games.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Blog Backup","url":"https://bgoonz-blog-v3-0.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Cover Letter","url":"https://bgoonz-cv.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Project Centric","url":"https://project-portfolio42.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Wordpress Blog","url":"https://web-dev-hub.com/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Project Portfolio Gallery","url":"https://project-portfolio42.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"github-stats-website","url":"https://bgoonz.github.io/github-stats-website/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false}],"type":"action_menu"},{"label":"Tools","url":"/docs/tools","style":"primary","has_subnav":true,"subnav_links":[{"label":"Github HTML Previewer","url":"https://githtmlpreview.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Text Tools","url":"https://devtools42.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Ternary 2 If Else","url":"https://ternary42.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Job Search Resources","url":"https://determined-dijkstra-ee7390.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"Setup Checker","url":"https://github.com/bgoonz/web-dev-setup-checker","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"PotluckPlanner","url":"https://potluck-landing.netlify.app/","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"WebDev Quizzes","url":"https://web-dev-interview-prep-quiz-website.netlify.app/","style":"primary","icon_class":"dev","new_window":false,"no_follow":false,"type":"action"},{"label":"Github-Advanced-Search","url":"https://github.com/search/advanced","style":"icon","icon_class":"github","new_window":true,"no_follow":false,"type":"action"}]}],"title":"WebDevHub"},"footer":{"has_social":true,"social_links":[{"label":"Twitter","url":"https://twitter.com/bgooonz","style":"icon","icon_class":"twitter","new_window":true},{"label":"LinkedIn","url":"https://www.linkedin.com/in/bryan-guner-046199128/","style":"icon","icon_class":"linkedin","new_window":true},{"label":"GitHub","url":"https://github.com/bgoonz","style":"icon","icon_class":"github","new_window":true},{"label":"Youtube","url":"https://www.youtube.com/channel/UC9-rYyUMsnEBK8G8fCyrXXA","style":"icon","icon_class":"youtube","new_window":true,"no_follow":false,"type":"action"},{"label":"Instagram","url":"https://www.instagram.com/bgoonz/?hl=en","style":"icon","icon_class":"instagram","new_window":true,"no_follow":false,"type":"action"},{"label":"dev.to","url":"https://dev.to/bgoonz","style":"icon","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"}],"links":[{"label":"BLM","url":"https://random-static-html-deploys.netlify.app/blm.html","style":"primary","icon_class":"dev","new_window":true,"no_follow":false,"type":"action"},{"label":"lorem-ipsum","url":"#","style":"link","icon_class":"dev","new_window":false,"no_follow":false}],"content":"@bgoonz on almost every platform"},"title":"webdevhub","domain":"https://bgoonz-blog.netlify.app/","favicon":"images/favicon-750d4390.png"},"pathPrefix":"","data":{"doc_sections":{"root_docs_path":"/docs","sections":["about","articles","audio","career","community","content","css","data-structures","docs","faq","interact","javascript","interview","leetcode","projects","python","quick-reference","react","reference","tools","tips","tutorials"]}}},"menus":{}}},"staticQueryHashes":[]}